From 9147e6cd8678a7ec2d81bc36a28ccc44aab6cc82 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 23 Jan 2026 10:55:00 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=B8=8A=E7=9B=98=E5=B9=B3?= =?UTF-8?q?=E7=A3=A8=E5=90=88=E6=89=B9=E6=97=B6=E6=89=B9=E6=AC=A1=E5=8F=B7?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=EF=BC=9AHP+=E6=A8=A1=E6=9D=BF+=E5=B9=B4?= =?UTF-8?q?=E6=9C=88=E6=97=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/handover_form.vue | 28 ++++++++++++++++++++++++++-- src/views/wpm_bx/inmIn.vue | 3 +++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/views/wpm_bx/handover_form.vue b/src/views/wpm_bx/handover_form.vue index 88a4ee83..4eefbebe 100644 --- a/src/views/wpm_bx/handover_form.vue +++ b/src/views/wpm_bx/handover_form.vue @@ -274,6 +274,10 @@ export default { type: String, default: "", }, + Mmodel:{ + type: String, + default: "", + } }, components: { scanDialog @@ -423,7 +427,7 @@ export default { month = month>9?month:'0'+month; let day = date.getDate(); day = day>9?day:'0'+day; - that.form.new_batch = 'HP'+year+month+day; + that.form.new_batch = 'HP'+that.Mmodel+year+month+day; } }) // type=10 正常交接 物料都可交接,接收工段有限制 @@ -679,6 +683,7 @@ export default { that.form.new_batch = that.route_code=='shangpaipingmo'?that.form.new_batch:""; let totalCount = 0,data = []; if(that.selectItems.length>0){ + console.log('that.selectItems',that.selectItems) data = that.materialOptions.filter((item) => { return that.selectItems.indexOf(item.id)>-1; }); @@ -704,6 +709,15 @@ export default { } }) } + if(data.length>0&&that.route_code=='shangpaipingmo'&&that.mtype==30&&that.new_wm==''&&that.route!=''&&data[0].material_.model!==null){ + let date = new Date(); + let year = date.getFullYear(); + let month = date.getMonth()+1; + month = month>9?month:'0'+month; + let day = date.getDate(); + day = day>9?day:'0'+day; + that.form.new_batch = 'HP'+data[0].material_.model+year+month+day; + } data.forEach((item,index)=>{ item.wm = item.id; item.count = item.count_canhandover; @@ -926,7 +940,17 @@ export default { }) } }) - if(hasArr.length>0){}else{ + if(hasArr.length>0&&hasArr[0].material_&&hasArr[0].material_.model!==null){ + if(that.route_code=='shangpaipingmo'&&that.mtype==30&&that.new_wm==''&&that.route!=''){ + let date = new Date(); + let year = date.getFullYear(); + let month = date.getMonth()+1; + month = month>9?month:'0'+month; + let day = date.getDate(); + day = day>9?day:'0'+day; + that.form.new_batch = 'HP'+hasArr[0].material_.model+year+month+day; + } + }else{ that.$message.error("该批次不存在或没有可交接数量") } } diff --git a/src/views/wpm_bx/inmIn.vue b/src/views/wpm_bx/inmIn.vue index faa0fa32..61faefdc 100644 --- a/src/views/wpm_bx/inmIn.vue +++ b/src/views/wpm_bx/inmIn.vue @@ -263,6 +263,7 @@ :tag="tag" :new_wm="new_wm" :wmItem="wmItem" + :Mmodel="Mmodel" :mgroupName="mgroup_name" :mgroupId="mgroupId" @success="handleScrapSuccess" @@ -408,6 +409,7 @@ export default { }, tag:"", wmId:"", + Mmodel:"", route_code:"", showBatch: "", wmMaterial:'', @@ -517,6 +519,7 @@ export default { let handoverb = []; if(this.selection.length>0){ this.selection.forEach(item=>{ + that.Mmodel = item.material_.model; let obj = {}; obj.id = item.id; obj.wm = item.id;