From 2b148dbd91b88022dc39cc8838e073bd08f0442f Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 10 Jan 2024 16:06:26 +0800 Subject: [PATCH] =?UTF-8?q?mtask=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm/mlog6_form.vue | 77 ++++++++++++++++++++--------------- src/views/wpm/mlog_dept10.vue | 33 +++++++++++---- src/views/wpm/mlog_dept6.vue | 19 +++++++-- src/views/wpm/mlog_dept7.vue | 19 ++++++--- 4 files changed, 99 insertions(+), 49 deletions(-) diff --git a/src/views/wpm/mlog6_form.vue b/src/views/wpm/mlog6_form.vue index 085abf2d..c12e7c4b 100644 --- a/src/views/wpm/mlog6_form.vue +++ b/src/views/wpm/mlog6_form.vue @@ -232,10 +232,22 @@ - - - + + + + + + - + - + - + - + - + - + - - - - + - + - + - + - + - + - - - - - - - - + + + + + + + + + { - this.$message.success('操作成功') - if (row.id == this.currentMtask.id) { - this.mtaskClick(row) - } - this.$refs.table_mtask.refresh() - }).catch(err => { - + 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 => {}) }) }, + // table_submit(row) { + // this.$API.pm.mtask.submit.req(row.id).then(res => { + // this.$message.success('操作成功') + // if (row.id == this.currentMtask.id) { + // this.mtaskClick(row) + // } + // this.$refs.table_mtask.refresh() + // }).catch(err => { + + // }) + // }, table_show(row) { this.mlogId = row.id; this.visibleDrawer = true; diff --git a/src/views/wpm/mlog_dept6.vue b/src/views/wpm/mlog_dept6.vue index fa1b4277..e18bc280 100644 --- a/src/views/wpm/mlog_dept6.vue +++ b/src/views/wpm/mlog_dept6.vue @@ -230,10 +230,21 @@ export default { this.$refs.table.queryData(this.queryMtask); }, table_submit(row) { - this.$API.pm.mtask.submit.req(row.id).then(res => { - this.$message.success('操作成功') - this.rowClick(row); - }).catch(err => { }) + 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 => {}) + }) }, handover_submit(row) { this.$API.wpm.handover.submit.req(row.id).then(res => { diff --git a/src/views/wpm/mlog_dept7.vue b/src/views/wpm/mlog_dept7.vue index b8ad28d8..3500fbb2 100644 --- a/src/views/wpm/mlog_dept7.vue +++ b/src/views/wpm/mlog_dept7.vue @@ -402,11 +402,20 @@ export default { this.getMlogs() }, mtask_submit(row) { - this.$API.pm.mtask.submit.req(row.id).then(res => { - this.$message.success('操作成功') - this.$refs.table_mtask.refresh() - this.mtaskClick(this.currentMtask) - }).catch(err => { + 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() {