From 23fdd0f466813bb8b0fef76e73d1173e5a40a4ac Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 30 May 2025 10:51:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=89=A9=E6=96=99=E5=88=86=E6=89=B9?= =?UTF-8?q?=E6=97=B6=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E6=89=B9=E6=AC=A1?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/handover_form2.vue | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/views/wpm_gx/handover_form2.vue b/src/views/wpm_gx/handover_form2.vue index 9455924f..fa95d0c8 100644 --- a/src/views/wpm_gx/handover_form2.vue +++ b/src/views/wpm_gx/handover_form2.vue @@ -22,12 +22,11 @@ {{saveCount}} - - + @@ -46,7 +45,7 @@ - + @@ -92,7 +91,6 @@ export default { process:{ type:String, default:"" - } }, components: { @@ -134,6 +132,7 @@ export default { batchOrign:{}, totalCount: 0, materialOptions: [], + first_batch_num:0, visible: false, isSaveing: false, setFiltersVisible: false, @@ -162,19 +161,31 @@ export default { this.saveCount = 0; this.form.handoverb.push(obj) this.visible = true; + this.getbatchesTo(); return this; }, + getbatchesTo(){ + let that = this; + let obj = {}; + obj.batch= that.codeText; + that.$API.wpm.batchlog.batchesTo.req(obj).then((res) => { + console.log('res',res); + that.last_batch_num = res.last_batch_num; + let batch_num = that.first_batch_num = res.last_batch_num+1; + that.form.handoverb[0].batch = that.codeText+"-"+batch_num; + }); + }, batchAdd(){ let that = this; if(that.saveCount>0){ - let indexs = that.form.handoverb.length+1; + let indexs = that.first_batch_num + that.form.handoverb.length; let count = 0; that.form.handoverb.forEach(item=>{ count+=item.count; }) let obj = { }; obj.wm = that.batchOrign.id; - obj.batch = that.codeText+"-"+indexs; + obj.batch = that.codeText+"-"+indexs; obj.count = that.batchOrign.count - count; that.saveCount = 0; that.form.handoverb.push(obj) @@ -205,9 +216,7 @@ export default { that.saveCount = 0; }else{ that.saveCount = that.batchOrign.count-totalCount; - } - } }, //提交 @@ -234,7 +243,6 @@ export default { that.$message.success("操作成功"); }); }).catch((err) => { - //可以处理校验错误 that.isSaveing = false; return err; });