fix:发货编号调整
This commit is contained in:
parent
8a445429ad
commit
e3c085beec
|
@ -522,17 +522,38 @@ export default {
|
|||
},
|
||||
selectBatchChange(item) {
|
||||
let that = this;
|
||||
that.wprList = [];
|
||||
that.mioitems = [];
|
||||
if(item){
|
||||
let count = 0;
|
||||
if(that.tableDatas.length>0){
|
||||
that.tableDatas.forEach((item) => {
|
||||
if(item.batch == that.selectBatch.batch){
|
||||
count += item.count;
|
||||
}
|
||||
})
|
||||
}
|
||||
that.$API.wpm.wpr.list.req({ page: 0, mb: item.id }).then((res) => {
|
||||
that.wprList = 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;
|
||||
}
|
||||
})
|
||||
}
|
||||
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;
|
||||
that.inputBatchDisable = true;
|
||||
})
|
||||
// that.getnumberOutLast();
|
||||
that.form.batch = item.batch;
|
||||
that.form.mb = item.id;
|
||||
that.batchcount = Number(item.count);
|
||||
that.form.count = Number(item.count);
|
||||
that.form.warehouse = item.warehouse;
|
||||
that.inputBatchDisable = true;
|
||||
}
|
||||
},
|
||||
selectBatchClear() {
|
||||
|
@ -541,7 +562,6 @@ export default {
|
|||
this.form.batch = "";
|
||||
this.form.count = "";
|
||||
this.form.warehouse = "";
|
||||
// this.warehouseDisable = false;
|
||||
this.inputBatchDisable = false;
|
||||
},
|
||||
//显示
|
||||
|
@ -557,15 +577,21 @@ export default {
|
|||
},
|
||||
countChange(){
|
||||
let that = this;
|
||||
if(that.mTracking == 20&&that.form.count>1&&( that.form.type == 'pur_in'|| that.form.type == 'other_in')){
|
||||
that.mioitems = [];that.mioitemw = [];
|
||||
for(let i=0;i<that.form.count;i++){
|
||||
let indexs = i+1;
|
||||
indexs = indexs<10?'0'+indexs:indexs;
|
||||
that.mioitems[i] = that.cate == "halfgood"?'': that.form.batch+'-'+indexs;
|
||||
let obj = {};
|
||||
obj.number = that.mioitems[i];
|
||||
that.mioitemw.push(obj);
|
||||
that.mioitems = [];that.mioitemw = [];
|
||||
if(that.form.count>1){
|
||||
if(that.form.type == 'pur_in'|| that.form.type == 'other_in'){
|
||||
for(let i=0;i<that.form.count;i++){
|
||||
let indexs = i+1;
|
||||
indexs = indexs<10?'0'+indexs:indexs;
|
||||
that.mioitems[i] = that.cate == "halfgood"?'': that.form.batch+'-'+indexs;
|
||||
let obj = {};
|
||||
obj.number = that.mioitems[i];
|
||||
that.mioitemw.push(obj);
|
||||
}
|
||||
}else{
|
||||
for(let i=0;i<that.form.count;i++){
|
||||
that.mioitems[i] = that.wprList[i].number_out;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//生产入库
|
||||
|
@ -686,21 +712,12 @@ export default {
|
|||
return;
|
||||
}
|
||||
}else if(that.form.type == 'sale_out'&&that.project_code=='bxerp'){
|
||||
let count = 0;
|
||||
if(that.tableDatas.length>0){
|
||||
that.tableDatas.forEach((item) => {
|
||||
if(item.batch==that.form.batch){
|
||||
count += item.count;
|
||||
}
|
||||
})
|
||||
}
|
||||
let mioitemw = [];
|
||||
that.mioitems.forEach((item,index) => {
|
||||
let index0 = count+index;
|
||||
mioitemw[index]={
|
||||
number: that.wprList[index0]? that.wprList[index0].number:'' ,
|
||||
number: that.wprList[index]? that.wprList[index].number:'' ,
|
||||
number_out : item,
|
||||
wpr:that.wprList[index0]? that.wprList[index0].id:null
|
||||
wpr:that.wprList[index]? that.wprList[index].id:null
|
||||
}
|
||||
})
|
||||
that.form.mioitemw = mioitemw.filter(item=>item.wpr!==null);
|
||||
|
|
Loading…
Reference in New Issue