From e8449383c80b024b461edbe273f097128af588d0 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 7 Feb 2025 10:12:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:bwcheck=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlog_detail.vue | 55 +++++++++++++++---------------- src/views/wpm_bx/mlogbw_check.vue | 14 ++++---- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index 4ee14e9d..d9bd721d 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -356,7 +356,6 @@ ref="checkDialogSingle" :mlogb="mlogb" :wm = "wm" - :qct="qct" :handle_user="handle_user" :handle_date="handle_date" @success="handlesCheckSuccess" @@ -479,6 +478,7 @@ export default { mlogb: "", isEdit: true, }, + qct:null, defectlist:[], }; }, @@ -545,25 +545,7 @@ export default { table_in_edit(row) { this.saveInForm = row; this.saveInDialog = true; - // this.getdefects(row.qct); }, - // getdefects(qct){ - // let that = this; - // that.$API.qm.qct.item.req(qct).then((res) => { - // that.defectOptions = []; - // that.defectOptions = res.qct_defects; - // }) - // }, - // formTableSave(row){ - // let that = this; - // let obj = new Object(); - // obj.count = row.count; - // obj.defect = row.defect; - // obj.mlogb = that.saveInForm.id; - // that.$API.wpm.mlogbdefect.create.req(obj).then((res) => { - - // }) - // }, //提交自检 saveInSubmit() { let that = this; @@ -610,15 +592,32 @@ export default { }); }, table_out_check_single(row,type){ - this.mlogb = row.id; - this.wm = row.wm_in; - this.qct = row.qct; - this.handle_date=this.mlogItem.handle_date; - this.handle_user = this.mlogItem.handle_user; - this.dialog.check_single = true; - this.$nextTick(() => { - this.$refs.checkDialogSingle.open(type); - }); + let that = this; + that.mlogb = row.id; + that.wm = row.wm_in; + that.handle_date=that.mlogItem.handle_date; + that.handle_user = that.mlogItem.handle_user; + that.dialog.check_single = true; + if(row.qct==null){ + that.$API.qm.qct.list.req({qctmat__material:row.material_out,page:0}).then((res)=>{ + if(res.length>0){ + that.qct = res[0].id; + console.log('that.qct',that.qct); + that.$nextTick(() => { + that.$refs.checkDialogSingle.open(type,that.qct); + }); + }else{ + that.$nextTick(() => { + that.$refs.checkDialogSingle.open(type); + }); + } + }) + }else{ + that.qct = row.qct; + that.$nextTick(() => { + that.$refs.checkDialogSingle.open(type,that.qct); + }); + } }, //表单提交方法 mlogSubmit() { diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue index 1ca32c87..cf453a02 100644 --- a/src/views/wpm_bx/mlogbw_check.vue +++ b/src/views/wpm_bx/mlogbw_check.vue @@ -173,10 +173,6 @@ export default { type: String, default: "", }, - qct: { - type: String, - default: "", - }, handle_user:{ type: String, default: "", @@ -197,6 +193,7 @@ export default { mode:'ins', //表单数据 form: {}, + qct:"", mgroup: "", params: {mlogb:'',page:0}, visible: false, @@ -218,13 +215,14 @@ export default { mounted() { let that = this; that.params.mlogb = that.addTemplate.mlogb = that.mlogb; - that.getOptions(); - that.getdefects(); }, methods: { - open(mode = "ins") { + open(mode = "ins",qct = '') { + let that = this; this.mode = mode; - console.log(this.mode); + this.qct = qct; + that.getOptions(); + that.getdefects(); this.visible = true; setTimeout(() => { this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;