From ff01e3ec3ea500e01002519baa70912d1ed5598d Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 14 May 2026 09:23:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mlog=20=E6=8F=90=E4=BA=A4=E5=89=8D?= =?UTF-8?q?=E5=8F=AF=E5=8B=BE=E9=80=89=E3=80=8C=E5=90=88=E6=A0=BC=20B=20?= =?UTF-8?q?=E7=B1=BB=E4=B8=8D=E6=8B=86=E6=89=B9=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- src/views/wpm_bx/mlog_detail.vue | 40 +++++++++++++++++++++++++------- src/views/wpm_gx/mlog_detail.vue | 37 ++++++++++++++++++++++++----- 2 files changed, 62 insertions(+), 15 deletions(-) diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 4bd10c2b..91457c32 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -58,7 +58,11 @@ {{ wmState[mlogItem.wm_in_state]?.text }} -
+
+
+ 合格B类不拆批 + +
Array.isArray(row.mlogbdefect) + && row.mlogbdefect.some(d => Number(d.defect_okcate) === 20 && Number(d.count) > 0)); + }, + }, data() { return { wmState, @@ -976,14 +987,25 @@ export default { submitFun(){ let that = this; that.isSaveing = true; - that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => { - that.isSaveing = false; - that.visible = false; - that.$emit('closed',false); - that.$message.success("操作成功"); - }).catch(() => { - that.isSaveing = false; - }); + const doSubmit = () => { + that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => { + that.isSaveing = false; + that.visible = false; + that.$emit('closed',false); + that.$message.success("操作成功"); + }).catch(() => { + that.isSaveing = false; + }); + }; + if (that.hasOkBDefect) { + that.$API.wpm.mlog.change.req(that.mlogItem.id, { clear_defect: !!that.mlogItem.clear_defect }).then(() => { + doSubmit(); + }).catch(() => { + that.isSaveing = false; + }); + } else { + doSubmit(); + } }, saveMuserSubmit(row){ let that = this; diff --git a/src/views/wpm_gx/mlog_detail.vue b/src/views/wpm_gx/mlog_detail.vue index 5708975a..987d8b45 100644 --- a/src/views/wpm_gx/mlog_detail.vue +++ b/src/views/wpm_gx/mlog_detail.vue @@ -61,7 +61,11 @@ {{mlogItem.test_file}} -
+
+
+ 合格B类不拆批 + +
Array.isArray(row.mlogbdefect) + && row.mlogbdefect.some(d => Number(d.defect_okcate) === 20 && Number(d.count) > 0)); + }, + }, data() { return { wmState, @@ -638,11 +649,25 @@ export default { //表单提交方法 mlogSubmit() { let that = this; - that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => { - that.isSaveing = false; - that.visible = false; - that.$message.success("操作成功"); - }); + that.isSaveing = true; + const doSubmit = () => { + that.$API.wpm.mlog.submit.req(that.mlogItem.id).then((res) => { + that.isSaveing = false; + that.visible = false; + that.$message.success("操作成功"); + }).catch(() => { + that.isSaveing = false; + }); + }; + if (that.hasOkBDefect) { + that.$API.wpm.mlog.change.req(that.mlogItem.id, { clear_defect: !!that.mlogItem.clear_defect }).then(() => { + doSubmit(); + }).catch(() => { + that.isSaveing = false; + }); + } else { + doSubmit(); + } }, // //渲染工单提交按钮 // getInit() {