From 7564db1c48282c3c40d72973bca3a716574c6b56 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 19 Feb 2025 09:08:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=85=89=E5=AD=90=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E9=A1=B5=E9=9D=A2=E6=93=8D=E4=BD=9C=E5=90=8E?= =?UTF-8?q?=E7=9A=84=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm/mlog_dept10.vue | 145 ++++++++++------------------------ src/views/wpm/mlog_dept6.vue | 71 +++++++++-------- src/views/wpm/mlog_dept7.vue | 129 +++++++++--------------------- 3 files changed, 116 insertions(+), 229 deletions(-) diff --git a/src/views/wpm/mlog_dept10.vue b/src/views/wpm/mlog_dept10.vue index 83a0b1e5..09f2b781 100644 --- a/src/views/wpm/mlog_dept10.vue +++ b/src/views/wpm/mlog_dept10.vue @@ -180,13 +180,9 @@ type="primary" icon="el-icon-plus" @click="addMlog" - v-if=" - currentMtask && - currentMtask.state == 20 - " + v-if="currentMtask &¤tMtask.state == 20" v-auth="'mlog.create'" - >新增 + >新增 @@ -218,40 +214,19 @@ width="300" > @@ -265,17 +240,7 @@ prop="count" > 编辑 删除 提交 撤回 - @@ -843,13 +779,12 @@ export default { this.$refs.table_mtask.queryData(this.queryMtask); }, handover_submit(row) { - this.$API.wpm.handover.submit - .req(row.id) - .then((res) => { - this.$refs.table_handover.refresh(); - this.$message.success("操作成功"); - }) - .catch((e) => {}); + let that = this; + that.$API.wpm.handover.submit.req(row.id).then((res) => { + that.$refs.table_wm.refresh(); + that.$refs.table_handover.refresh(); + that.$message.success("操作成功"); + }).catch((e) => {}); }, getMlogs() { this.$API.wpm.mlog.list @@ -895,6 +830,7 @@ export default { } }, table_submit(row) { + let that = this; let lengths = row.mlogs.length, infoText = ""; if (lengths > 0) { @@ -902,18 +838,16 @@ export default { } else { infoText = "该任务没有日志,确定提交吗?"; } - this.$confirm(infoText, "提示", { + that.$confirm(infoText, "提示", { type: "warning", }).then(() => { - this.$API.pm.mtask.submit - .req(row.id) - .then((res) => { - this.$message.success("操作成功"); - this.$refs.table_wm.refresh(); - this.$refs.table_mtask.refresh(); - this.mtaskClick(this.currentMtask); - }) - .catch((err) => {}); + that.$API.pm.mtask.submit.req(row.id).then((res) => { + that.$message.success("操作成功"); + that.$refs.table_wm.refresh(); + that.$refs.table_mtask.refresh(); + that.mtaskClick(that.currentMtask); + that.currentMtask.state = 20 + }).catch((err) => {}); }); }, // table_submit(row) { @@ -965,18 +899,19 @@ export default { this.getMlogs(); }, mlog_submit(row) { - this.mlogHandleLoading = true; - this.$API.wpm.mlog.submit + let that = this; + that.mlogHandleLoading = true; + that.$API.wpm.mlog.submit .req(row.id) .then((res) => { - this.$message.success("操作成功"); - this.mtaskClick(this.currentMtask); - this.$refs.table_wm.refresh(); - this.$refs.table_mtask.refresh(); - this.mlogHandleLoading = false; + that.$message.success("操作成功"); + that.mtaskClick(that.currentMtask); + that.$refs.table_wm.refresh(); + that.$refs.table_mtask.refresh(); + that.mlogHandleLoading = false; }) .catch((err) => { - this.mlogHandleLoading = false; + that.mlogHandleLoading = false; }); }, //从生产日志生成交接记录 diff --git a/src/views/wpm/mlog_dept6.vue b/src/views/wpm/mlog_dept6.vue index 7e190176..cdcf1076 100644 --- a/src/views/wpm/mlog_dept6.vue +++ b/src/views/wpm/mlog_dept6.vue @@ -90,8 +90,8 @@ ref="tableprocess" row-key="id" stripe - :hideDo="hideDo" - :data="processList" + :params="paramsProcess" + :apiObj="apiObjProcess" @row-click="itemClick" > { - that.processList = res.results; - }); + that.clickRow = row; + that.paramsProcess.start_date = row.start_date; + that.paramsProcess.end_date = row.end_date; + that.paramsProcess.utask = row.utask; + that.apiObjProcess = that.$API.pm.mtask.list; + that.$refs.tableprocess.refresh(); }, //工序详情 itemClick(row) { @@ -522,26 +524,23 @@ export default { that.$confirm(infoText, "提示", { type: "warning", }).then(() => { - that.$API.pm.mtask.submit - .req(row.id) - .then((res) => { - that.$message.success("操作成功"); - that.$refs.table_mtask.refresh(); - that.mtaskClick(that.currentMtask); - }) - .catch((err) => {}); + that.$API.pm.mtask.submit.req(row.id).then((res) => { + that.$message.success("操作成功"); + that.$refs.table.refresh(); + that.$refs.table_wm.refresh(); + that.$refs.tableprocess.refresh(); + that.$refs.table_handover.refresh(); + that.mtaskClick(that.currentMtask); + }).catch((err) => {}); }); }, handover_submit(row) { let that = this; - that.$API.wpm.handover.submit - .req(row.id) - .then((res) => { - that.$message.success("操作成功"); - that.$refs.table_handover.refresh(); - that.$refs.table_wm.refresh(); - }) - .catch((err) => {}); + that.$API.wpm.handover.submit.req(row.id).then((res) => { + that.$message.success("操作成功"); + that.$refs.table_handover.refresh(); + that.$refs.table_wm.refresh(); + }).catch((err) => {}); }, //从生产日志生成交接记录 addHandover() { @@ -564,6 +563,14 @@ export default { this.$refs.checkDrawers.open(); }); }, + showDrawerClose(){ + let that = this; + that.visibleDrawer = false; + that.$refs.table.refresh(); + that.$refs.table_wm.refresh(); + that.$refs.tableprocess.refresh(); + that.$refs.table_handover.refresh(); + }, }, }; diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue index f8fcb3da..520921fb 100644 --- a/src/views/wpm/mlog_dept7.vue +++ b/src/views/wpm/mlog_dept7.vue @@ -164,10 +164,7 @@ type="primary" icon="el-icon-plus" @click="addMlog" - v-if=" - currentMtask && - currentMtask.state == 20 - " + v-if="currentMtask &¤tMtask.state == 20" v-auth="'mlog.create'" >新增 @@ -193,15 +190,7 @@ min-width="120" > 编辑 删除 提交 撤回 - @@ -813,13 +757,12 @@ export default { this.$refs.table_mtask.queryData(this.queryMtask); }, handover_submit(row) { - this.$API.wpm.handover.submit - .req(row.id) - .then((res) => { - this.$refs.table_handover.refresh(); - this.$message.success("操作成功"); - }) - .catch((e) => {}); + let that = this; + that.$API.wpm.handover.submit.req(row.id).then((res) => { + that.$refs.table_handover.refresh(); + that.$refs.table_wm.refresh(); + that.$message.success("操作成功"); + }).catch((e) => {}); }, getMlogs() { this.$API.wpm.mlog.list @@ -839,6 +782,7 @@ export default { this.getMlogs(); }, mtask_submit(row) { + let that = this; let lengths = row.mlogs.length, infoText = ""; if (lengths > 0) { @@ -846,17 +790,16 @@ export default { } else { infoText = "该任务没有日志,确定提交吗?"; } - this.$confirm(infoText, "提示", { + that.$confirm(infoText, "提示", { type: "warning", }).then(() => { - this.$API.pm.mtask.submit - .req(row.id) - .then((res) => { - this.$message.success("操作成功"); - this.$refs.table_mtask.refresh(); - this.mtaskClick(this.currentMtask); - }) - .catch((err) => {}); + that.$API.pm.mtask.submit.req(row.id).then((res) => { + that.$message.success("操作成功"); + that.$refs.table_mtask.refresh(); + that.$refs.table_wm.refresh(); + that.mtaskClick(that.currentMtask); + that.currentMtask.state = 20 + }).catch((err) => {}); }); }, handleSaveSuccess() { @@ -871,17 +814,19 @@ export default { }); }, mlog_submit(row) { - this.mlogHandleLoading = true; - this.$API.wpm.mlog.submit + let that = this; + that.mlogHandleLoading = true; + that.$API.wpm.mlog.submit .req(row.id) .then((res) => { - this.$message.success("操作成功"); - this.mtaskClick(this.currentMtask); - this.$refs.table_wm.refresh(); - this.mlogHandleLoading = false; + that.$message.success("操作成功"); + that.mtaskClick(that.currentMtask); + that.$refs.table_wm.refresh(); + that.getMlogs(); + that.mlogHandleLoading = false; }) .catch((err) => { - this.mlogHandleLoading = false; + that.mlogHandleLoading = false; }); }, //从生产日志生成交接记录