From 62b4846ee406ffb8b2af8adf5670e95a078d8ee4 Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Tue, 19 Nov 2019 10:22:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=8F=E9=97=B4=E5=A4=96=E5=8D=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 4 +- src/views/Inventory/OfflinePartOut/index.vue | 18 +- .../Outsourcing/PreorderAssociation/index.vue | 354 ++++++++---------- 3 files changed, 173 insertions(+), 203 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 03220e7d..2cb92ad8 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -17,8 +17,8 @@ export const uploadInvoiceScan1 = `http://192.168.1.231:8411/submit/uploadInvoic export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // ContractInformationManagement export const uploadPerson = `http://192.168.1.231:8411/submit/uploadPerson.ashx` export const uploadOP = `http://192.168.1.231:8411/submit/uploadOP.ashx` -export const url = `http://192.168.0.110:8002/submit/MESCommonBase.ashx` // 采购件入库、离线件入库 -export const ExcelDownLoad = 'http://192.168.0.110:8002/submit/downloadFile.ashx' // 导出excel +export const url = `http://192.168.1.231:8411/submit/MESCommonBase.ashx` // 采购件入库、离线件入库 +export const ExcelDownLoad = 'http://192.168.1.231:8411/submit/downloadFile.ashx' // 导出excel // 技术中心程序发布时要更改下面所有的IP到0段 export const ServerIP = `http://192.168.1.231:8411/webpage/file/` export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231 diff --git a/src/views/Inventory/OfflinePartOut/index.vue b/src/views/Inventory/OfflinePartOut/index.vue index 5bbd2eee..19abb8d8 100644 --- a/src/views/Inventory/OfflinePartOut/index.vue +++ b/src/views/Inventory/OfflinePartOut/index.vue @@ -164,15 +164,15 @@ - - - - - + + + + + + + + + diff --git a/src/views/Outsourcing/PreorderAssociation/index.vue b/src/views/Outsourcing/PreorderAssociation/index.vue index 2f6b0c62..8368823e 100644 --- a/src/views/Outsourcing/PreorderAssociation/index.vue +++ b/src/views/Outsourcing/PreorderAssociation/index.vue @@ -1,17 +1,8 @@ @@ -161,6 +123,7 @@ export default { Num: [], // 分组 count: 0, // 计数器 (表二是否有外协工序) InOut: 1, // 工序间是否外协变量 1自家 2外协 + index: 0, // 当前点击行(改变颜色不刷新用) num1: '', checkBox: [], loading1: false, @@ -170,7 +133,7 @@ export default { tableData1: [], // 表格数据 tableData2: [], total1: null, // 总条数 - pageSize1: 10, // 每页显示条数 + pageSize1: 50, // 每页显示条数 pageCurrent1: 1 } }, @@ -254,10 +217,6 @@ export default { this.checkBox = [] this.tableData2 = [] searchTable2(row.工艺计划流水号).then(response => { - for (let i = 0; i < response.data.length; i++) { - console.log(response.data[i].工序顺序) - } - console.log(response.data, 1111111) this.num1 = row.工艺计划流水号 if (response.data.length === 0) { this.loading0 = false @@ -280,9 +239,19 @@ export default { this.loading2 = false }) }, + tableData1ClassName({ row, rowIndex }) { + row.index = rowIndex + if (row.工序间是否外协 === 2) { + return 'XJWXwx' + } + if (parseInt(row.工序状态) !== 3 || parseInt(row.工艺编号) === 29) { + return 'XJWXywc' + } + }, // 修改外协状态 edit(index, row) { this.count = 0 + this.index = row.index for (let i = 0; i < this.tableData2.length; i++) { if (this.checkBox[i] === false) { this.count = this.count + 1 @@ -296,68 +265,62 @@ export default { edit(row.工序流水号, this.InOut).then(response => { edit2(row.工序流水号, row.工艺计划流水号, 1).then(response => { this.$message.success('工序外协状态更改成功') - this.loading2 = true - this.checkBox = [] - this.tableData2 = [] - searchTable2(this.num1).then(response => { - for (let i = 0; i < response.data.length; i++) { - console.log(response.data[i].工序顺序) - } - console.log(response.data, 1111111) - if (response.data.length === 0) { - this.loading0 = false - } else { - for (let i = 0; i < response.data.length; i++) { - if (response.data[i].工序间是否外协 === 1) { - this.checkBox.push(false) - } else { - this.checkBox.push(true) - } - } - for (let i = 0; i < response.data.length; i++) { - response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0] - response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0] - response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0] - } - this.tableData2 = response.data - } - }).then(() => { - this.loading2 = false - }) + this.tableData2[this.index].工序间是否外协 = 2 + // this.loading2 = true + // this.checkBox = [] + // this.tableData2 = [] + // searchTable2(this.num1).then(response => { + // if (response.data.length === 0) { + // this.loading0 = false + // } else { + // for (let i = 0; i < response.data.length; i++) { + // if (response.data[i].工序间是否外协 === 1) { + // this.checkBox.push(false) + // } else { + // this.checkBox.push(true) + // } + // } + // for (let i = 0; i < response.data.length; i++) { + // response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0] + // response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0] + // response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0] + // } + // this.tableData2 = response.data + // } + // }).then(() => { + // this.loading2 = false + // }) }) }) } else { this.InOut = 1 edit(row.工序流水号, this.InOut).then(response => { this.$message.success('工序外协状态更改成功') - this.loading2 = true - this.checkBox = [] - this.tableData2 = [] - searchTable2(this.num1).then(response => { - for (let i = 0; i < response.data.length; i++) { - console.log(response.data[i].工序顺序) - } - console.log(response.data, 1111111) - if (response.data.length === 0) { - this.loading0 = false - } else { - for (let i = 0; i < response.data.length; i++) { - if (response.data[i].工序间是否外协 === 1) { - this.checkBox.push(false) - } else { - this.checkBox.push(true) - } - } - for (let i = 0; i < response.data.length; i++) { - response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0] - response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0] - response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0] - } - this.tableData2 = response.data - } - }).then(() => { - this.loading2 = false - }) + this.tableData2[this.index].工序间是否外协 = 1 + // this.loading2 = true + // this.checkBox = [] + // this.tableData2 = [] + // searchTable2(this.num1).then(response => { + // if (response.data.length === 0) { + // this.loading0 = false + // } else { + // for (let i = 0; i < response.data.length; i++) { + // if (response.data[i].工序间是否外协 === 1) { + // this.checkBox.push(false) + // } else { + // this.checkBox.push(true) + // } + // } + // for (let i = 0; i < response.data.length; i++) { + // response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0] + // response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0] + // response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0] + // } + // this.tableData2 = response.data + // } + // }).then(() => { + // this.loading2 = false + // }) }) } }, @@ -388,6 +351,13 @@ export default {