fix:光芯领料数量问题
This commit is contained in:
parent
6b9962a8ee
commit
07ea5f9a23
|
|
@ -152,7 +152,7 @@
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count"
|
v-model="form.count"
|
||||||
:min="1"
|
:min="1"
|
||||||
:disabled="form.type == 'do_out'"
|
:disabled="form.type == 'do_out'&&project_code=='bxerp'"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -529,43 +529,56 @@ export default {
|
||||||
that.wprList = [];
|
that.wprList = [];
|
||||||
that.mioitems = [];
|
that.mioitems = [];
|
||||||
if(items){
|
if(items){
|
||||||
let count = 0;
|
if(that.form.type == 'do_out'&&that.project_code=='bxerp'){
|
||||||
if(that.tableDatas.length>0){
|
let count = 0;
|
||||||
that.tableDatas.forEach((item0) => {
|
if(that.tableDatas.length>0){
|
||||||
if(item0.batch == that.selectBatch.batch){
|
that.tableDatas.forEach((item0) => {
|
||||||
count += item0.count;
|
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;
|
||||||
})
|
})
|
||||||
}
|
}else{
|
||||||
let canDo = Number(items.count_canmio);
|
that.$API.wpm.wpr.list.req({ page: 0, mb: items.id }).then((res) => {
|
||||||
that.$API.wpm.wpr.list.req({ page: 0, mb: items.id,querys:"{id,number,number_out}" }).then((res) => {
|
that.wprList = res;
|
||||||
if (canDo>50) {
|
})
|
||||||
res.forEach((item,index) => {
|
// that.getnumberOutLast();
|
||||||
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.batch = items.batch;
|
||||||
that.form.mb = items.id;
|
that.form.mb = items.id;
|
||||||
that.batchcount = canDo;
|
that.batchcount = Number(items.count);
|
||||||
that.form.count =canDo>50?50: that.wprList.length;
|
that.form.count = Number(items.count);
|
||||||
that.form.warehouse = items.warehouse;
|
that.form.warehouse = items.warehouse;
|
||||||
that.inputBatchDisable = true;
|
that.inputBatchDisable = true;
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectBatchClear() {
|
selectBatchClear() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue