fix:光芯领料数量问题
This commit is contained in:
parent
6b9962a8ee
commit
07ea5f9a23
|
|
@ -152,7 +152,7 @@
|
|||
<el-input-number
|
||||
v-model="form.count"
|
||||
:min="1"
|
||||
:disabled="form.type == 'do_out'"
|
||||
:disabled="form.type == 'do_out'&&project_code=='bxerp'"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue