From 2aac78cda4c836ff43c43c27eb8d8c16e9558e13 Mon Sep 17 00:00:00 2001 From: Vergil <974548713@qq.com> Date: Wed, 8 Apr 2020 14:10:48 +0800 Subject: [PATCH] jinyong --- src/api/Outsourcing/OutsourcingTaskExecution.js | 4 ++-- .../OutsourcingPaymentPlanManagement/index.vue | 14 ++++++++++++-- .../OutsourcingTaskExecution/index.vue | 17 +++++++++++++---- .../Outsourcing/PreorderAssociation/index.vue | 7 ++++++- 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/api/Outsourcing/OutsourcingTaskExecution.js b/src/api/Outsourcing/OutsourcingTaskExecution.js index 7c92c8fa..8892255c 100644 --- a/src/api/Outsourcing/OutsourcingTaskExecution.js +++ b/src/api/Outsourcing/OutsourcingTaskExecution.js @@ -110,7 +110,7 @@ export function editData1(Number, manufacturers, freight, Explain) { ModularID: router.currentRoute.path, type: '2', name: '车间生产管理_外协加工任务单_修改数据', - param: '外协加工任务单流水号=' + Number + '=int&外协厂家=' + manufacturers + '=int&运费=0&单据状态=2&入库标志=1&扣款说明=&扣款_质量=0&扣款_计划=0&扣款_其他=0' + param: '外协加工任务单流水号=' + Number + '&外协厂家=' + manufacturers + '&运费=0&单据状态=2&入库标志=1&扣款说明=&扣款_质量=0&扣款_计划=0&扣款_其他=0' } }) } @@ -138,7 +138,7 @@ export function editData(Number, manufacturers, freight, Explain) { ModularID: router.currentRoute.path, type: '2', name: '车间生产管理_外协加工任务单_修改数据', - param: '外协加工任务单流水号=' + Number + '=int&外协厂家=' + manufacturers + '=int&运费=' + freight + '=int&扣款说明=' + Explain + param: '外协加工任务单流水号=' + Number + '&外协厂家=' + manufacturers + '&运费=' + freight + '&扣款说明=' + Explain } }) } diff --git a/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue b/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue index f5859b23..2cb9ccf7 100644 --- a/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue +++ b/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue @@ -155,7 +155,7 @@ @@ -182,7 +182,7 @@ @@ -193,6 +193,8 @@ import { searchtable, getInvoice, getPayment, AddType1, AddType2, handleChange1, export default { data() { return { + handleAdd1_disable: false, + handleAdd2_disable: false, ManufacturerName: '', // 外协厂家 外协厂家流水号: '', 外协厂家流水号_Select: '', @@ -318,6 +320,7 @@ export default { this.form1.开票时间 = '' this.form1.开票金额 = '' this.form1.外协厂家 = '' + this.handleAdd1_disable = false this.dialogFormVisible1 = true } else { this.$message.error('请先选择外协厂家') @@ -325,6 +328,7 @@ export default { }, // 增加确定 AddType1() { + this.handleAdd1_disable = true AddType1(this.外协厂家流水号, this.form1.发票号, this.form1.开票时间, this.form1.开票金额).then(response => { if (response.data[0].result === '1') { this.$message.success('信息增加成功') @@ -348,10 +352,12 @@ export default { this.form1.发票号 = row.发票号 this.form1.开票时间 = row.开票时间 this.form1.开票金额 = row.开票金额 + this.handleAdd1_disable = false this.dialogFormVisible1 = true }, // 编辑确定 handleChange1() { + this.handleAdd1_disable = true handleChange1(this.id_edit1, this.form1.发票号, this.form1.开票时间, this.form1.开票金额).then(response => { if (response.data[0].result === '1') { this.$message.success('信息修改成功') @@ -419,12 +425,14 @@ export default { this.title2 = '新增付款' this.form2.付款时间 = '' this.form2.付款金额 = '' + this.handleAdd2_disable = false this.dialogFormVisible2 = true } else { this.$message.error('请先选择外协厂家') } }, AddType2() { + this.handleAdd2_disable = true AddType2(this.外协厂家流水号, this.form2.付款金额, this.form2.付款时间).then(response => { if (response.data[0].result === '1') { this.$message.success('信息增加成功') @@ -446,10 +454,12 @@ export default { this.title2 = '编辑到票' this.form2.付款金额 = row.付款金额 this.form2.付款时间 = row.付款日期 + this.handleAdd2_disable = false this.dialogFormVisible2 = true }, // 编辑确定 handleChange2() { + this.handleAdd2_disable = true handleChange2(this.id_edit2, this.form2.付款金额, this.form2.付款时间).then(response => { if (response.data[0].result === '1') { this.$message.success('信息修改成功') diff --git a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue index e1de7a5a..0e618e34 100644 --- a/src/views/Outsourcing/OutsourcingTaskExecution/index.vue +++ b/src/views/Outsourcing/OutsourcingTaskExecution/index.vue @@ -144,7 +144,7 @@ @@ -161,6 +161,7 @@ export default { }, data() { return { + handleAdd_disable: false, 工艺计划流水号: [], isChecked: false, bianliang: [], @@ -393,6 +394,7 @@ export default { }) this.form.运费 = 0 this.form.外协厂家 = '' + this.handleAdd_disable = false this.dialogFormVisible = true }, // 编辑外协任务单 @@ -401,10 +403,9 @@ export default { this.$refs['form'].resetFields() } this.title = '编辑外协任务单' - this.dialogFormVisible = true this.form.表单号 = row.表单号 this.form.运费 = row.运费 - this.form.外协厂家 = row.外协厂家 + this.form.外协厂家 = parseInt(row.外协厂家流水号) this.form.下达任务日期 = row.任务下达日期 this.ManufactorNumber1 = row.外协厂家流水号 this.Number = row.外协加工任务单流水号 @@ -416,6 +417,8 @@ export default { } else { this.documentStatus = 2 } + this.handleAdd_disable = false + this.dialogFormVisible = true }, // 提交 submit(formName) { @@ -441,6 +444,7 @@ export default { this.form.运费 = '' this.$message.error('请输入数字') } else { + this.handleAdd_disable = true addTable(this.form.表单号, this.id, this.form.外协厂家, this.form.下达任务日期, this.form.运费).then(response => { if (response.data[0].result === '1') { this.$notify({ @@ -453,6 +457,7 @@ export default { this.fetchData() this.dialogFormVisible = false } else { + this.handleAdd_disable = false this.$message.error('信息添加失败') } }) @@ -460,13 +465,17 @@ export default { }, // 提交编辑 submitEdit() { + this.handleAdd_disable = true editData(this.Number, this.form.外协厂家, this.form.运费, this.Explain).then(response => { if (response.data[0].result === '1') { this.$message.success('编辑成功') this.dialogFormVisible = false this.title = '' this.fetchData() - } else { this.$message.error('编辑失败') } + } else { + this.handleAdd_disable = false + this.$message.error('编辑失败') + } }) }, // 删除任务单 diff --git a/src/views/Outsourcing/PreorderAssociation/index.vue b/src/views/Outsourcing/PreorderAssociation/index.vue index f671c51c..ddf5a62f 100644 --- a/src/views/Outsourcing/PreorderAssociation/index.vue +++ b/src/views/Outsourcing/PreorderAssociation/index.vue @@ -58,7 +58,7 @@ - 保存 + 保存 @@ -100,6 +100,7 @@ import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2, sa export default { data() { return { + saveRowPrice_disable: false, entryNameValue: '', entryName: [], // 项目名称 toolNumValue: '', @@ -273,6 +274,7 @@ export default { }, // 保存行价格 saveRowPrice() { + this.saveRowPrice_disable = true this.count = 0 for (let i = 0; i < this.tableData2.length; i++) { if (this.checkBox[i] === false) { @@ -281,6 +283,7 @@ export default { } if (this.tableData2.length === 0) { this.$message.error('请选择零件') + this.saveRowPrice_disable = false } else { if (this.count !== this.tableData2.length) { this.a = 0 @@ -290,11 +293,13 @@ export default { if (this.a === this.tableData2.length) { this.$message.success('保存成功') this.searchTable() + this.saveRowPrice_disable = false } }) } } else { this.$message.error('请选择需要外协工序') + this.saveRowPrice_disable = false } } },