From 7fd151fce83fdd613e1f04d92825f6bcb7f37155 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 7 Aug 2026 14:34:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:IQC=E5=B7=A5=E5=BA=8F=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=97=B6=E5=8F=AF=E4=BB=A5=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/mlogb_form.vue | 96 +++++++++++++++++++++++++++++---- 1 file changed, 87 insertions(+), 9 deletions(-) diff --git a/src/views/wpm_gx/mlogb_form.vue b/src/views/wpm_gx/mlogb_form.vue index e7f30af0..a305036e 100644 --- a/src/views/wpm_gx/mlogb_form.vue +++ b/src/views/wpm_gx/mlogb_form.vue @@ -49,6 +49,7 @@ :labelField="'batch'" style="width: 100%;" :params = "paramsM" + :multiple="isMultipleBatch" @change="materialBatchChange" > @@ -66,6 +67,28 @@ + + + + + - + that.formatWmaterialLabel(o)).join(";"); + let prevMap = {}; + that.multiBatchList.forEach(m => { prevMap[m.id] = m.count_use; }); + that.multiBatchList = list.map(o => ({ + id: o.id, + batch: o.batch, + material: o.material, + count_cando: o.count_cando, + count_use: prevMap[o.id] != null ? prevMap[o.id] : o.count_cando, + })); + let firstObj = list[0]; + that.getRoute(firstObj.material); + that.form.batch = firstObj.batch; + that.batch_count = firstObj.count; + if(that.is_fix){ + that.materialFix = firstObj.material; + } + that.getdefects(firstObj.material); + return; + } if(!that.selectObj || !that.selectObj.id){ that.wmInLabel = ""; return; @@ -505,11 +562,6 @@ export default { if (valid) { that.isSaveing = true; that.form.mlog = that.mlog; - that.form.batch = that.selectObj.batch; - // that.form.count_use = that.selectObj.count_cando; - if(that.mgroupMtype==10&&that.cellsList.length>0){ - that.form.count_json_from = that.cellsList; - } let count_pn_jgqbl = 0,mlogbdefect=[]; that.qct_defects.forEach(item => { if(that.defectform[item.defect_name]>0){ @@ -522,8 +574,34 @@ export default { }) that.form.mlogbdefect = mlogbdefect; that.form.count_pn_jgqbl = count_pn_jgqbl; - console.log(that.form); - console.log(that.selectObj); + if(that.isMultipleBatch){ + let list = that.multiBatchList || []; + if(list.length == 0){ + that.isSaveing = false; + that.$message.error("请选择批次号"); + return; + } + try { + for(let item of list){ + let payload = { ...that.form }; + payload.wm_in = item.id; + payload.batch = item.batch; + payload.count_use = item.count_use; + await that.$API.wpm.mlogb.in.req(payload); + } + that.isSaveing = false; + that.$emit("success"); + that.visible = false; + that.$message.success("操作成功"); + } catch(err) { + that.isSaveing = false; + } + return; + } + that.form.batch = that.selectObj.batch; + if(that.mgroupMtype==10&&that.cellsList.length>0){ + that.form.count_json_from = that.cellsList; + } that.$API.wpm.mlogb.in.req(that.form).then((res) => { that.isSaveing = false; that.$emit("success"); From c5c1e254621f872071d39c9cf7755d670bae7629 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 7 Aug 2026 16:24:46 +0800 Subject: [PATCH 2/2] feat(wpm): use recommended equipment selector --- src/api/model/wpm.js | 9 +++++++ src/views/wpm/mlog6_form.vue | 31 ++++++++---------------- src/views/wpm_bx/mlog_form.vue | 37 ++++++++--------------------- src/views/wpm_bx/mlog_form2.vue | 37 ++++++++--------------------- src/views/wpm_gx/f_mlogs_form.vue | 38 ++++++++---------------------- src/views/wpm_gx/mlog_form.vue | 39 +++++++++---------------------- 6 files changed, 60 insertions(+), 131 deletions(-) diff --git a/src/api/model/wpm.js b/src/api/model/wpm.js index 382986cc..090d4312 100644 --- a/src/api/model/wpm.js +++ b/src/api/model/wpm.js @@ -177,6 +177,15 @@ export default { } }, mlog: { + equipmentOptions: { + name: "日志设备选项", + req: async function (data) { + return await http.get( + `${config.API_URL}/wpm/mlog/equipment_options/`, + data + ); + }, + }, list: { name: "列表", req: async function (data) { diff --git a/src/views/wpm/mlog6_form.vue b/src/views/wpm/mlog6_form.vue index 53b2f8c7..a8faf55d 100644 --- a/src/views/wpm/mlog6_form.vue +++ b/src/views/wpm/mlog6_form.vue @@ -127,20 +127,19 @@ - - - + + + + + @@ -427,7 +423,6 @@ export default { userList:[], visible: false, isSaveing: false, - options: [], testitems:[], mlogdefect:[], qct_defects:[], @@ -506,7 +501,6 @@ export default { that.deptId = res.belong_dept; that.mgroupName = res.name; this.getTeam(); - that.getEquipment(); that.getUserList(); }); }, @@ -564,18 +558,6 @@ export default { } } }, - getEquipment() { - let that = this; - that.options = []; - that.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup }).then((res) => { - res.forEach((item) => { - let obj = {}; - Object.assign(obj, item); - obj.label = item.name+'-'+item.number; - that.options.push(obj); - }); - }); - }, getRoute() { let that = this; if(!that.is_fix){//正常生产 diff --git a/src/views/wpm_gx/mlog_form.vue b/src/views/wpm_gx/mlog_form.vue index 1956e00f..e74e7d60 100644 --- a/src/views/wpm_gx/mlog_form.vue +++ b/src/views/wpm_gx/mlog_form.vue @@ -157,24 +157,20 @@ - - - {{item.name}} - {{item.number}} - - + + + + + @@ -375,7 +371,6 @@ export default { is_fix:false, visible: false, isSaveing: false, - options: [], teamOptions:[], routeOptions: [], userOptions: [], @@ -390,7 +385,6 @@ export default { this.getRoute(); this.getTeam(); this.getSupplier(); - this.getEquipment(); this.gettestitem(); let date = new Date(); this.form.work_start_time = this.form.work_end_time = this.$TOOL.dateFormat(date); @@ -447,17 +441,6 @@ export default { } }); }, - getEquipment() { - let that = this; - this.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup}).then((res) => { - res.forEach((item) => { - let obj = {}; - Object.assign(obj, item); - obj.label = item.name+'-'+item.number; - that.options.push(obj); - }); - }); - }, getSupplier() { let that = this; let obj = {};