diff --git a/src/views/Outsourcing/OutsourcingQCSearch/index.vue b/src/views/Outsourcing/OutsourcingQCSearch/index.vue
index 2bb437b5..c4a471a8 100644
--- a/src/views/Outsourcing/OutsourcingQCSearch/index.vue
+++ b/src/views/Outsourcing/OutsourcingQCSearch/index.vue
@@ -8,7 +8,7 @@
查询
-
+
@@ -20,7 +20,7 @@
{{ scope.row.外协厂家名称 }}
-
+
{{ scope.row.操作日期 }}
@@ -37,7 +37,7 @@
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
-
+
@@ -236,7 +236,6 @@ export default {
this.orderNumber ? check1 = 1 : check1 = 0
this.outsourcingSupplier ? check2 = 1 : check2 = 0
searchTable1(this.pageCurrent1, this.pageSize1, check1, this.orderNumber, check2, this.outsourcingSupplier).then(response => {
- console.log(response.data, 1)
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
@@ -251,7 +250,6 @@ export default {
this.searchTable1()
},
searchTable2(row) {
- console.log(row, 2)
searchTable2(row.外协到货单流水号).then(response => {
this.tableData2 = response.data
})
@@ -260,7 +258,6 @@ export default {
searchTableDetail(type, num).then(response => {
this.gridData = response.data
})
- console.log(type)
}
}
}
diff --git a/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue b/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue
index 67f090c0..4f1d21dc 100644
--- a/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue
+++ b/src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue
@@ -611,6 +611,25 @@
+
+
+
+ 刷新 | 待分配零件数
+
+
+
+
+
+
+ {{ machine.机床图号 }}
+
+
+
+
+
+
+
+
@@ -618,11 +637,14 @@
import { initMaterialCategory, initMaterialVariety, initProject, initBuyer, searchMachine, searchGroup, searchTable1, searchTable2, allocateTask1,
allocateTask2, executeReturn1, executeReturn2, retract1, retract2 } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
import { mapGetters } from 'vuex'
+import request from '@/utils/request'
export default {
name: '', // 采购任务分配
data() {
return {
+ timer2: '',
+ machines: [],
source: [
{
text: 'BZ',
@@ -707,14 +729,42 @@ export default {
computed: {
...mapGetters([
'name',
+ 'token',
'id'
])
},
created() {
this.searchTable0() // 查表1
this.fetchData() // 初始化数据
+ this.searchUnallocatePartNumber()
+ this.timer2 = setInterval(this.searchUnallocatePartNumber, 20 * 60 * 1000) // 20 分钟一刷新
+ },
+ beforeDestroy() {
+ clearInterval(this.timer2)
},
methods: {
+ // 选择机床
+ clickCard(project, machine) {
+ this.projectValue = project
+ this.machine = []
+ this.machineValue = ''
+ this.group = []
+ this.groupValue = ''
+ searchMachine(this.projectValue).then(response => {
+ for (let i = 0; i < response.data.length; i++) {
+ this.machine.push({
+ value: response.data[i].机床流水号,
+ label: response.data[i].机床图号,
+ name: response.data[i].机床名称
+ })
+ }
+ this.machineValue = machine
+ this.materialStatusValue = [1]
+ this.searchTable0()
+ this.searchTable1()
+ this.searchTable2()
+ })
+ },
filterSource(value, row) {
return Number(row['零件类型']) === Number(value)
},
@@ -994,6 +1044,28 @@ export default {
})
})
}
+ },
+ async searchUnallocatePartNumber() {
+ this.machines = []
+ await request({
+ url: '',
+ method: 'post',
+ data: {
+ type: '3',
+ name: ` select 项目流水号,机床流水号,机床图号,sum(未分配零件数) as 未分配零件数 from (
+ select 项目流水号,机床流水号,机床图号,COUNT(*) as 未分配零件数 from MRP_计划订单_组件零件清单_标准件和外购件_视图
+ where 人员编号 is null
+ group by 项目流水号,机床流水号,机床图号
+ union all
+ select 项目流水号,机床流水号,机床图号,COUNT(*) as 未分配零件数 from MRP_计划订单_组件零件清单_基本件_视图
+ where 人员编号 is null
+ group by 项目流水号,机床流水号,机床图号
+ ) as tb1
+ group by 项目流水号,机床流水号,机床图号`
+ }
+ }).then(res => {
+ this.machines = res.data
+ })
}
}
}
@@ -1016,3 +1088,45 @@ export default {
margin: 10px 0 10px 10px;
}
+
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 707ff73a..d19d2f35 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -13,22 +13,6 @@
-
-
待分配零件数
-
-
-
-
-
- {{ machine.机床图号 }}
-
-
-
-
-
-
-
-
@@ -45,9 +29,7 @@ export default {
sudokus: [],
curSelect: null,
number: '',
- timer: '',
- timer2: '',
- machines: []
+ timer: ''
}
},
computed: {
@@ -59,18 +41,11 @@ export default {
mounted() {
this.getFileList()
this.timer = setInterval(this.getFileList, 60 * 60 * 1000) // 60 分钟一刷新
- this.searchUnallocatePartNumber()
- this.timer2 = setInterval(this.searchUnallocatePartNumber, 20 * 60 * 1000) // 20 分钟一刷新
},
beforeDestroy() {
clearInterval(this.timer)
- clearInterval(this.timer2)
},
methods: {
- // 选择机床
- clickCard() {
- this.$router.push({ path: '/PurchaseTaskAllocate/index' })
- },
async getFileList() {
await request({
url: '',
@@ -104,28 +79,6 @@ export default {
value: res.data[0].Column1
})
})
- },
- async searchUnallocatePartNumber() {
- this.machines = []
- await request({
- url: '',
- method: 'post',
- data: {
- type: '3',
- name: ` select 项目流水号,机床流水号,机床图号,sum(未分配零件数) as 未分配零件数 from (
- select 项目流水号,机床流水号,机床图号,COUNT(*) as 未分配零件数 from MRP_计划订单_组件零件清单_标准件和外购件_视图
- where 人员编号 is null
- group by 项目流水号,机床流水号,机床图号
- union all
- select 项目流水号,机床流水号,机床图号,COUNT(*) as 未分配零件数 from MRP_计划订单_组件零件清单_基本件_视图
- where 人员编号 is null
- group by 项目流水号,机床流水号,机床图号
- ) as tb1
- group by 项目流水号,机床流水号,机床图号`
- }
- }).then(res => {
- this.machines = res.data
- })
}
}
}