From d768f952d11fa81f1578d2fa63d9cc78ab6a5557 Mon Sep 17 00:00:00 2001 From: chenjianan Date: Fri, 21 Jun 2019 11:05:59 +0800 Subject: [PATCH 1/3] fixed bug --- src/api/Outsourcing/OutsourcingQCSearch.js | 28 ++++ src/icons/svg/OutsourcingQCSearch.svg | 1 + src/utils/tool.js | 2 +- .../Outsourcing/OutsourcingQCSearch/index.vue | 149 +++++++++++++++++- 4 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 src/icons/svg/OutsourcingQCSearch.svg diff --git a/src/api/Outsourcing/OutsourcingQCSearch.js b/src/api/Outsourcing/OutsourcingQCSearch.js index e69de29b..cd3a4590 100644 --- a/src/api/Outsourcing/OutsourcingQCSearch.js +++ b/src/api/Outsourcing/OutsourcingQCSearch.js @@ -0,0 +1,28 @@ +import request from '@/utils/request' + +// 查询外协到货单列表 +export function searchTable1(...params) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理_外协到货单_查询数据', + param: ``, + Pagination: params[0] + '&' + params[1] + } + }) +} +// 查询外协到货单明细 +export function searchTable2(...params) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '车间生产管理_外协到货单明细_查询数据', + param: `外协到货单流水号=${params[2]}`, + Pagination: params[0] + '&' + params[1] + } + }) +} diff --git a/src/icons/svg/OutsourcingQCSearch.svg b/src/icons/svg/OutsourcingQCSearch.svg new file mode 100644 index 00000000..6366a880 --- /dev/null +++ b/src/icons/svg/OutsourcingQCSearch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/utils/tool.js b/src/utils/tool.js index b84e353b..005cfadf 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -128,7 +128,7 @@ export function groupBy(datas, keys) { group.data1 = group.data1 || 0 group.key.数量 = group.data1 += v.数量 group.data2 = group.data2 || '' - group.key.机床图号_组号 = group.data2 += (v.机床图号 || '') + '-' + (v.组号 ? v.组号.split('组')[0] : '') + ';' + group.key.机床图号_组号 = group.data2 += (v.机床图号 || '') + '-' + (v.组号 ? v.组号.split('组')[0] : '') + ' ' group.data3 = group.data3 || 0 group.key.合计 = group.data3 += v.合计 }) diff --git a/src/views/Outsourcing/OutsourcingQCSearch/index.vue b/src/views/Outsourcing/OutsourcingQCSearch/index.vue index 8422f332..b5b97528 100644 --- a/src/views/Outsourcing/OutsourcingQCSearch/index.vue +++ b/src/views/Outsourcing/OutsourcingQCSearch/index.vue @@ -1,10 +1,155 @@ From c36ebf051f6069c375110a9b5f2993c8b8687479 Mon Sep 17 00:00:00 2001 From: chenjianan Date: Fri, 21 Jun 2019 12:46:22 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BE=85=E5=88=86=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/index.vue | 55 ++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 37eed699..707ff73a 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -9,16 +9,26 @@ {{ sudoku.name }} - -
- - - - +
+ 待分配零件数 + + + + +
+ {{ machine.机床图号 }} +
+
+
+
+
+ + +
@@ -35,7 +45,9 @@ export default { sudokus: [], curSelect: null, number: '', - timer: '' + timer: '', + timer2: '', + machines: [] } }, computed: { @@ -47,11 +59,18 @@ 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: '', @@ -85,6 +104,28 @@ 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 + }) } } } From 84b3e6ca9a5636989c80214bda627397d56508dd Mon Sep 17 00:00:00 2001 From: chenjianan Date: Fri, 21 Jun 2019 14:43:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B4=A8=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Outsourcing/OutsourcingQCSearch.js | 15 +- .../Outsourcing/OutsourcingQCSearch/index.vue | 174 ++++++++++++++---- 2 files changed, 152 insertions(+), 37 deletions(-) diff --git a/src/api/Outsourcing/OutsourcingQCSearch.js b/src/api/Outsourcing/OutsourcingQCSearch.js index cd3a4590..b4dace89 100644 --- a/src/api/Outsourcing/OutsourcingQCSearch.js +++ b/src/api/Outsourcing/OutsourcingQCSearch.js @@ -21,8 +21,19 @@ export function searchTable2(...params) { data: { type: '1', name: '车间生产管理_外协到货单明细_查询数据', - param: `外协到货单流水号=${params[2]}`, - Pagination: params[0] + '&' + params[1] + param: `外协到货单流水号=${params[0]}` + } + }) +} +// 查询外协到货单明细 +export function searchTableDetail(...params) { + return request({ + url: '', + method: 'post', + data: { + type: '1', + name: '质检管理_外协质检数据_查询数据', + param: `检测类型=${params[0]}&外协到货单明细流水号=${params[1]}` } }) } diff --git a/src/views/Outsourcing/OutsourcingQCSearch/index.vue b/src/views/Outsourcing/OutsourcingQCSearch/index.vue index b5b97528..a0da4aa5 100644 --- a/src/views/Outsourcing/OutsourcingQCSearch/index.vue +++ b/src/views/Outsourcing/OutsourcingQCSearch/index.vue @@ -33,9 +33,9 @@ @size-change="handleSizeChange1" @current-change="handleCurrentChange1"/> - + - + @@ -45,17 +45,17 @@ {{ scope.row.零件图号 }} - + - + - + @@ -65,39 +65,88 @@ {{ scope.row.检验时间 || '—' }} - + - + - + -
- -