From 58183849bdd0957a100c3b3d3736b367f41622dd Mon Sep 17 00:00:00 2001 From: chenjianan Date: Mon, 24 Jun 2019 14:16:30 +0800 Subject: [PATCH 1/3] fixed bug --- src/views/Outsourcing/OutsourcingQCSearch/index.vue | 6 +++--- src/views/Outsourcing/OutsourcingTaskExecution/index.vue | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/Outsourcing/OutsourcingQCSearch/index.vue b/src/views/Outsourcing/OutsourcingQCSearch/index.vue index c4a471a8..ee7edf7e 100644 --- a/src/views/Outsourcing/OutsourcingQCSearch/index.vue +++ b/src/views/Outsourcing/OutsourcingQCSearch/index.vue @@ -180,7 +180,7 @@ export default { if (index === 0) { sums[index] = '总价' } else if (index === 3) { - const values = data.map(item => Number(item['批次数量'])) + const values = data.map(item => Number(item['批次数量']) || 0) if (!values.every(value => isNaN(value))) { sums[index] = values.reduce((prev, curr) => { const value = Number(curr) @@ -195,7 +195,7 @@ export default { sums[index] = 'N/A' } } else if (index === 4) { - const values = data.map(item => Number(item['检验数量'])) + const values = data.map(item => Number(item['检验数量']) || 0) if (!values.every(value => isNaN(value))) { sums[index] = values.reduce((prev, curr) => { const value = Number(curr) @@ -210,7 +210,7 @@ export default { sums[index] = 'N/A' } } else if (index === 5) { - const values = data.map(item => Number(item['不合格数量'])) + const values = data.map(item => Number(item['不合格数量']) || 0) if (!values.every(value => isNaN(value))) { sums[index] = values.reduce((prev, curr) => { const value = Number(curr) diff --git a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue index 4227dce6..216b91d3 100644 --- a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue +++ b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue @@ -7,7 +7,7 @@ 外协厂家: 下达任务日期: - From ee6c5b0fdf6625391c67c8941ee51452400463fc Mon Sep 17 00:00:00 2001 From: chenjianan Date: Tue, 25 Jun 2019 10:09:15 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A3=85=E9=85=8D=E9=80=80=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assembly/AssemblyExecution/index.vue | 78 ++++++++++++++----- 1 file changed, 57 insertions(+), 21 deletions(-) diff --git a/src/views/Assembly/AssemblyExecution/index.vue b/src/views/Assembly/AssemblyExecution/index.vue index 1d6d3e95..35689774 100644 --- a/src/views/Assembly/AssemblyExecution/index.vue +++ b/src/views/Assembly/AssemblyExecution/index.vue @@ -47,14 +47,18 @@ {{ scope.row.机床数量 }} - + @@ -95,8 +99,10 @@ @@ -125,6 +131,50 @@ export default { this.initProject() }, methods: { + // 取消开始总装 + handleCancelStart_1(row) { + MachineToolStateUpdate(row.机床流水号, 3).then(response => { + this.searchTable1() + this.searchTable2() + }) + }, + // 取消结束总装 + handleCancelEnd_1(row) { + MachineToolStateUpdate(row.机床流水号, 4).then(response => { + this.searchTable1() + this.searchTable2() + }) + }, + // 取消开始调试 + handleCancelStart_2(row) { + DebugStatusUpdate(row.机床流水号, 3).then(response => { + this.searchTable1() + this.searchTable2() + }) + }, + // 取消结束调试 + handleCancelEnd_2(row) { + DebugStatusUpdate(row.机床流水号, 4).then(response => { + this.searchTable1() + this.searchTable2() + }) + }, + // 取消开始部装 + handleCancelStart_3(row) { + ComponentStateUpdate(row.组件流水号, 3).then(response => { + this.searchTable1() + row.buttonStatus = 1 + // this.searchTable2() + }) + }, + // 取消结束部装 + handleCancelEnd_3(row) { + ComponentStateUpdate(row.组件流水号, 4).then(response => { + this.searchTable1() + row.buttonStatus = 2 + // this.searchTable2() + }) + }, initProject() { initProject().then(response => { for (let i = 0; i < response.data.length; i++) { @@ -153,7 +203,6 @@ export default { if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 } searchTable1(this.machineNumberValue, this.check2).then(response => { this.tableData1 = response.data - console.log(response.data, 1111) }) }, searchTable2() { @@ -161,7 +210,6 @@ export default { if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 } if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check3 = 1 } else { this.check3 = 0 } searchTable2(this.machineNumberValue, this.check2).then(response => { - console.log(response.data, 222) this.tableData2 = response.data this.tableData2.map(v => { if (v.组件是否完成 === null || v.组件是否完成 === 0) { @@ -177,45 +225,35 @@ export default { }, // 总装开始装配 handlestart_1(row) { // 弹出单据编辑 - console.log(row) MachineToolStateUpdate(row.机床流水号, 1).then(response => { - console.log(response.data) this.searchTable1() this.searchTable2() }) }, // 总装结束装配 handleend_1(row) { // 弹出单据编辑 - console.log(row) MachineToolStateUpdate(row.机床流水号, 2).then(response => { - console.log(response.data) this.searchTable1() this.searchTable2() }) }, // 总装开始调试 handlestart_2(row) { // 弹出单据编辑 - console.log(row) DebugStatusUpdate(row.机床流水号, 1).then(response => { - console.log(response.data) this.searchTable1() this.searchTable2() }) }, // 总装结束调试 handleend_2(row) { // 弹出单据编辑 - console.log(row) DebugStatusUpdate(row.机床流水号, 2).then(response => { - console.log(response.data) this.searchTable1() this.searchTable2() }) }, // 部装开始装配 handlestart_3(row) { // 弹出单据编辑 - console.log(row) ComponentStateUpdate(row.组件流水号, 1).then(response => { - console.log(response.data) this.searchTable1() row.buttonStatus = 2 // this.searchTable2() @@ -223,9 +261,7 @@ export default { }, // 部装结束装配 handleend_3(row) { // 弹出单据编辑 - console.log(row) ComponentStateUpdate(row.组件流水号, 2).then(response => { - console.log(response.data) this.searchTable1() row.buttonStatus = 3 // this.searchTable2() From 64eb0bf1dcf6cb9a589de07e5ec9e6afd20394e6 Mon Sep 17 00:00:00 2001 From: chenjianan Date: Tue, 25 Jun 2019 10:13:52 +0800 Subject: [PATCH 3/3] . --- src/utils/request.js | 3 --- src/views/Assembly/AssemblyExecution/index.vue | 1 - 2 files changed, 4 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 05ba122c..4f2bcb33 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,7 +1,4 @@ import axios from 'axios' -// import { Message, MessageBox } from 'element-ui' -// import store from '../store' -// import { getToken } from '@/utils/auth' export const wsuri = `ws://192.168.1.232:61101//WebMoudule//websocket` export const name = `OP8888` diff --git a/src/views/Assembly/AssemblyExecution/index.vue b/src/views/Assembly/AssemblyExecution/index.vue index 71e459ff..f1fe9ce8 100644 --- a/src/views/Assembly/AssemblyExecution/index.vue +++ b/src/views/Assembly/AssemblyExecution/index.vue @@ -207,7 +207,6 @@ export default { } else { searchTable1(this.machineNumberValue, this.check2).then(response => { this.tableData1 = response.data - console.log(response.data, 1111) }) } },