From be1448c25d4d874618351d0d78c3f032ab150c2e Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 7 Aug 2025 16:37:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=8F=91=E8=B4=A7=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=89=A9=E6=96=99=E6=89=B9=E6=AC=A1=E6=97=B6=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=9C=80=E5=A4=9A=E6=98=BE=E7=A4=BA50=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inm/mioitem_form.vue | 52 ++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index 99d66483..1aa87d60 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -96,7 +96,7 @@ color: var(--el-text-color-secondary); font-size: 13px; " - >{{ item.count }} -- {{ item.warehouse_name }}{{ item.count_canmio }} -- {{ item.warehouse_name }} @@ -520,38 +520,46 @@ export default { } } }, - selectBatchChange(item) { + selectBatchChange(items) { let that = this; that.wprList = []; that.mioitems = []; - if(item){ + if(items){ let count = 0; if(that.tableDatas.length>0){ - that.tableDatas.forEach((item) => { - if(item.batch == that.selectBatch.batch){ - count += item.count; + that.tableDatas.forEach((item0) => { + if(item0.batch == that.selectBatch.batch){ + count += item0.count; } }) } - that.$API.wpm.wpr.list.req({ page: 0, mb: item.id }).then((res) => { - res.forEach((item,index) => { - if(index>=count){ - that.wprList.push(item); - } - }) - console.log('that.wprList',that.wprList) - if(that.wprList.length>0){ - that.wprList.forEach((item,index) => { - if(item.number_out!==null){ - that.mioitems[index] = item.number_out; + let canDo = Number(items.count_canmio); + that.$API.wpm.wpr.list.req({ page: 0, mb: items.id,querys:"{id,number,number_out}" }).then((res) => { + if (canDo>50) { + res.forEach((item,index) => { + if(index>=count&&index<50+count){ + that.wprList.push(item); + } + }) + }else{ + res.forEach((item,index) => { + if(index>=count){ + that.wprList.push(item); } }) } - that.form.batch = item.batch; - that.form.mb = item.id; - that.batchcount = that.wprList.length; - that.form.count = that.wprList.length; - that.form.warehouse = item.warehouse; + if(that.wprList.length>0){ + that.wprList.forEach((item1,index) => { + if(item1.number_out!==null){ + that.mioitems[index] = item1.number_out; + } + }) + } + that.form.batch = items.batch; + that.form.mb = items.id; + that.batchcount = canDo; + that.form.count =canDo>50?50: that.wprList.length; + that.form.warehouse = items.warehouse; that.inputBatchDisable = true; }) }