From 5ec43bd5842165c4f83e438ec7e76f39717e9cd4 Mon Sep 17 00:00:00 2001 From: liushuai Date: Tue, 24 Dec 2019 17:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 2 +- .../Outsourcing/PreorderAssociation/index.vue | 28 +++++++++++++------ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 95596fb9..fc41e22d 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -18,7 +18,7 @@ export const download = `http://192.168.1.231:8411/submit/downloadFile.ashx` // 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.1.231:8411/submit/MESCommonBase.ashx` // 采购件入库、离线件入库 -export const ExcelDownLoad = 'http://192.168.0.104:8079/submit/downloadFile.ashx' // 导出excel +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/Outsourcing/PreorderAssociation/index.vue b/src/views/Outsourcing/PreorderAssociation/index.vue index 361a99eb..2eb8064b 100644 --- a/src/views/Outsourcing/PreorderAssociation/index.vue +++ b/src/views/Outsourcing/PreorderAssociation/index.vue @@ -327,18 +327,28 @@ export default { }, // 保存行价格 saveRowPrice() { + this.count = 0 + for (let i = 0; i < this.tableData2.length; i++) { + if (this.checkBox[i] === false) { + this.count = this.count + 1 + } + } if (this.tableData2.length === 0) { this.$message.error('请选择零件') } else { - this.a = 0 - for (let i = 0; i < this.tableData2.length; i++) { - saveRowPrice(this.tableData2[i].工序流水号, 0, this.tableData2[i].工艺计划流水号, 0).then(response => { - this.a += parseInt(response.data[0].result) - if (this.a === this.tableData2.length) { - this.$message.success('保存成功') - this.searchTable() - } - }) + if (this.count !== this.tableData2.length) { + this.a = 0 + for (let i = 0; i < this.tableData2.length; i++) { + saveRowPrice(this.tableData2[i].工序流水号, 0, this.tableData2[i].工艺计划流水号, 0).then(response => { + this.a += parseInt(response.data[0].result) + if (this.a === this.tableData2.length) { + this.$message.success('保存成功') + this.searchTable() + } + }) + } + } else { + this.$message.error('请选择需要外协工序') } } },