From 099dffa7f3dc1d246de2336998ba545404aeaa3e Mon Sep 17 00:00:00 2001 From: "yu.wu" Date: Thu, 2 Dec 2021 16:29:56 +0800 Subject: [PATCH] =?UTF-8?q?fis=E6=9C=AA=E7=9F=A5=E6=80=BB=E6=88=90?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pg-fis/basedate/m100Online/index.vue | 6 +-- .../pg-fis/basedate/r100Online/index.vue | 4 +- .../pg-fis/basedate/unknownAssembly/index.vue | 50 ++++++++++++++----- .../pg-fis/basedate/weldingAssembly/index.vue | 9 ++-- 4 files changed, 47 insertions(+), 22 deletions(-) diff --git a/vue/src/views/pg-fis/basedate/m100Online/index.vue b/vue/src/views/pg-fis/basedate/m100Online/index.vue index bcc117ed..9f0fd026 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/index.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/index.vue @@ -434,8 +434,8 @@ export default { ], }, billState:[ - {id:0,name:"已匹配"}, - {id:1,name:"已导出"} + {id:2,name:"已匹配"}, + {id:3,name:"已导出"} ], valueSelect: "", customerInfos: [], @@ -748,7 +748,7 @@ export default { /** 格式化字段 */ fieldFormatter(row, column) { if (column.property === "billStatus") { - return { 0: "未生效", 2: "已生效", 3: "已发布" }[row[column.property]]; + return { 1: "未匹配", 2: "已匹配", 3: "已发布" }[row[column.property]]; } if (column.property == "onlineTime" || column.property == "receiveTime") { var date = row[column.property]; diff --git a/vue/src/views/pg-fis/basedate/r100Online/index.vue b/vue/src/views/pg-fis/basedate/r100Online/index.vue index caccc20d..468f9cde 100644 --- a/vue/src/views/pg-fis/basedate/r100Online/index.vue +++ b/vue/src/views/pg-fis/basedate/r100Online/index.vue @@ -325,8 +325,8 @@ export default { ], }, billState:[ - {id:0,name:"已匹配"}, - {id:1,name:"已导出"} + {id:2,name:"已匹配"}, + {id:3,name:"已导出"} ], valueSelect: "", customerInfos: [], diff --git a/vue/src/views/pg-fis/basedate/unknownAssembly/index.vue b/vue/src/views/pg-fis/basedate/unknownAssembly/index.vue index 4ab2080e..9ee991a2 100644 --- a/vue/src/views/pg-fis/basedate/unknownAssembly/index.vue +++ b/vue/src/views/pg-fis/basedate/unknownAssembly/index.vue @@ -98,6 +98,7 @@ size="mini" type="primary" icon="el-icon-plus" + :loading="buttonLoading" @click="handleUpdate()" >重新解析(批量操作) @@ -159,6 +160,7 @@ size="mini" type="success" icon="el-icon-check" + :loading="button2Loading" @click="handleUpdateAll()" >重新解析(执行全部) @@ -361,7 +363,7 @@ @@ -389,7 +391,7 @@ @@ -501,6 +503,8 @@ export default { numTitle: "", isEdit: false, formLoading: false, + buttonLoading:false, + button2Loading:false, //dialogFormVisible: false, tableHeight: document.documentElement.clientHeight - 220, //columns: [ @@ -640,6 +644,7 @@ export default { type: "warning", }) .then(() => { + this.button2Loading = true; this.$axios .posts("/api/newjit/unknown-assembly/to-parse", params) .then((response) => { @@ -650,26 +655,35 @@ export default { type: "success", duration: 2000, }); + this.button2Loading = false; this.getList(); } else { + this.button2Loading = false; this.$message({ type: "warning", message: response.message, }); } + }) + .catch(() => { + this.button2Loading = false; + this.$message({ + type: "warning", + message: response.message, + }); }); }) - .catch(() => {}); }, /** 重新计算总成 */ handleUpdate(row) { if (this.multipleSelection.length == 0) { this.$message({ - message: "必须选择一行", + message: "至少选择一行", type: "warning", }); return; } else { + this.buttonLoading = true; //批量操作 var params = { isSelectAll: false, @@ -696,13 +710,22 @@ export default { type: "success", duration: 2000, }); + this.buttonLoading = false; this.getList(); } else { + this.buttonLoading = false; this.$message({ type: "warning", message: response.message, }); } + }) + .catch(() => { + this.buttonLoading = false; + this.$message({ + type: "warning", + message: response.message, + }); }); } }, @@ -918,6 +941,7 @@ export default { }); return; } + this.formLoading = true; var lastSubmit = { billId:this.listUnknownAssemblyQuery.billId, @@ -970,9 +994,17 @@ export default { ) .then((response) => { if(response.status === true){ + this.dialogFormVisible = false; + this.leftRowTemp = []; + this.rightRowTemp = []; + this.tempAssCfgList = []; + this.tempdetails = []; + this.erpAssemblyCfgList =[]; + this.asTemp = []; + this.$notify({ title: "成功", - message: "数据导入成功!", + message: "添加总成成功!", type: "success", duration: 2000, }); @@ -981,14 +1013,6 @@ export default { .catch(() => { //this.listLoading = false; }); - - this.leftRowTemp = []; - this.rightRowTemp = []; - this.tempAssCfgList = []; - this.tempdetails = []; - this.erpAssemblyCfgList =[]; - this.asTemp = []; - this.dialogFormVisible = false; // } // else{ // alert("未知零件未分配完,请确认!") diff --git a/vue/src/views/pg-fis/basedate/weldingAssembly/index.vue b/vue/src/views/pg-fis/basedate/weldingAssembly/index.vue index 37df3875..1252aaba 100644 --- a/vue/src/views/pg-fis/basedate/weldingAssembly/index.vue +++ b/vue/src/views/pg-fis/basedate/weldingAssembly/index.vue @@ -677,9 +677,6 @@ export default { /** 格式化字段 */ fieldFormatter(row, column) { - if (column.property === "billStatus") { - return { 0: "未生效", 2: "已生效", 3: "已发布" }[row[column.property]]; - } if (column.property == "onlineTime" || column.property == "receiveTime") { var date = row[column.property]; if (date == undefined) { @@ -687,7 +684,11 @@ export default { } return moment(date).format("YYYY-MM-DD HH:mm:ss"); } - return row[column.property] ;//|| "--"加上后会掩盖m100单据状态为0不显示 + if(column.property == "r100BillStatus" || column.property == "m100BillStatus") + { + return { 1: "未匹配", 2: "已匹配", 3: "已发布" }[row[column.property]]; + } + return row[column.property] || "--";//|| "--"加上后会掩盖m100单据状态为0不显示 }, roleFilter(type) { return projectTypeKeyValue[type];