From 4c935cb4a268da3f634c11fec044e188b8b56cc7 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 28 Mar 2024 17:02:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:6=E3=80=817=E3=80=8110=E8=BD=A6=E9=97=B4?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E6=98=BE=E7=A4=BA=E5=B7=B2=E7=BB=88=E6=AD=A2?= =?UTF-8?q?=E7=9A=84=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm/mlog_dept10.vue | 1355 +++++++++++++++++++++------------ src/views/wpm/mlog_dept6.vue | 703 ++++++++++------- src/views/wpm/mlog_dept7.vue | 1202 ++++++++++++++++++----------- 3 files changed, 2040 insertions(+), 1220 deletions(-) diff --git a/src/views/wpm/mlog_dept10.vue b/src/views/wpm/mlog_dept10.vue index 4cf8bd4f..aa5adee6 100644 --- a/src/views/wpm/mlog_dept10.vue +++ b/src/views/wpm/mlog_dept10.vue @@ -1,519 +1,864 @@ \ No newline at end of file + // }) + // }, + table_show(row) { + this.mlogId = row.id; + this.visibleDrawer = true; + this.$nextTick(() => { + this.$refs.showDrawer.open(); + }); + }, + table_edit(row) { + this.brothersList = row.mlogb; + this.dialogSave = true; + this.$nextTick(() => { + this.$refs.saveDialog.open("edit").setData(row); + }); + }, + //删除 + table_del(row) { + let that = this; + this.$confirm(`确定删除吗?`, "提示", { + type: "warning", + }) + .then(() => { + that.$API.wpm.mlog.delete + .req(row.id) + .then((res) => { + that.$message.success("删除成功"); + that.getMlogs(); + return res; + }) + .catch((err) => { + return err; + }); + }) + .catch(() => {}); + }, + handleSaveSuccess() { + this.getMlogs(); + }, + mlog_submit(row) { + this.mlogHandleLoading = true; + this.$API.wpm.mlog.submit + .req(row.id) + .then((res) => { + this.$message.success("操作成功"); + this.mtaskClick(this.currentMtask); + this.$refs.table_wm.refresh(); + this.mlogHandleLoading = false; + }) + .catch((err) => { + this.mlogHandleLoading = false; + }); + }, + }, +}; + diff --git a/src/views/wpm/mlog_dept6.vue b/src/views/wpm/mlog_dept6.vue index 524b308a..7ad85391 100644 --- a/src/views/wpm/mlog_dept6.vue +++ b/src/views/wpm/mlog_dept6.vue @@ -1,293 +1,446 @@ \ No newline at end of file + diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue index 833fdf30..e64d298a 100644 --- a/src/views/wpm/mlog_dept7.vue +++ b/src/views/wpm/mlog_dept7.vue @@ -1,448 +1,770 @@ \ No newline at end of file + this.paramsWm.belong_dept = this.currentDept.id; + this.paramsWm.count__gte = 1; + this.apiObjWm = this.$API.wpm.wmaterial.list; + } else { + this.$message.error("未找到车间"); + } + }); + }, + handleQueryMtask() { + if (this.queryMtaskState) { + this.queryMtask.state__in = "20,30,34,40"; + } else { + this.queryMtask.state__in = "20,30,40"; + } + 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) => {}); + }, + getMlogs() { + this.$API.wpm.mlog.list + .req({ mtask: this.currentMtask.id, page: 0 }) + .then((res) => { + this.mlogs = res; + }); + }, + getMtask() { + this.$API.pm.mtask.item.req(this.currentMtask.id).then((res) => { + this.currentMtask = res; + }); + }, + mtaskClick(row) { + this.currentMtask = row; + this.getMtask(); + this.getMlogs(); + }, + mtask_submit(row) { + let lengths = row.mlogs.length, + infoText = ""; + if (lengths > 0) { + infoText = "该任务有" + lengths + "条日志,确定提交吗?"; + } else { + infoText = "该任务没有日志,确定提交吗?"; + } + this.$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) => {}); + }); + }, + handleSaveSuccess() { + this.getMlogs(); + }, + table_show(row) { + this.mlogId = row.id; + this.visibleDrawer = true; + this.$nextTick(() => { + this.$refs.showDrawer.open(); + }); + }, + mlog_submit(row) { + this.mlogHandleLoading = true; + this.$API.wpm.mlog.submit + .req(row.id) + .then((res) => { + this.$message.success("操作成功"); + this.mtaskClick(this.currentMtask); + this.$refs.table_wm.refresh(); + this.mlogHandleLoading = false; + }) + .catch((err) => { + this.mlogHandleLoading = false; + }); + }, + }, +}; +