diff --git a/src/views/inm/mioitem_form.vue b/src/views/inm/mioitem_form.vue index ba6e1351..d615dec6 100644 --- a/src/views/inm/mioitem_form.vue +++ b/src/views/inm/mioitem_form.vue @@ -152,7 +152,7 @@ @@ -529,43 +529,56 @@ export default { that.wprList = []; that.mioitems = []; if(items){ - let count = 0; - if(that.tableDatas.length>0){ - that.tableDatas.forEach((item0) => { - if(item0.batch == that.selectBatch.batch){ - count += item0.count; + if(that.form.type == 'do_out'&&that.project_code=='bxerp'){ + let count = 0; + if(that.tableDatas.length>0){ + that.tableDatas.forEach((item0) => { + if(item0.batch == that.selectBatch.batch){ + count += item0.count; + } + }) + } + 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); + } + }) } + 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; }) - } - 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); - } - }) - } - if(that.wprList.length>0){ - that.wprList.forEach((item1,index) => { - if(item1.number_out!==null){ - that.mioitems[index] = item1.number_out; - } - }) - } + }else{ + that.$API.wpm.wpr.list.req({ page: 0, mb: items.id }).then((res) => { + that.wprList = res; + }) + // that.getnumberOutLast(); that.form.batch = items.batch; that.form.mb = items.id; - that.batchcount = canDo; - that.form.count =canDo>50?50: that.wprList.length; + that.batchcount = Number(items.count); + that.form.count = Number(items.count); that.form.warehouse = items.warehouse; that.inputBatchDisable = true; - }) + } } }, selectBatchClear() {