fix:车间出入库调整,massage语法错误修改
This commit is contained in:
parent
8040516eb7
commit
833eba96c5
|
@ -217,7 +217,7 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.$message.console.error("请先设置打印机");
|
that.$message.error("请先设置打印机");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -282,18 +282,11 @@ export default {
|
||||||
if (that.mgroupId != null &&that.mgroupId != undefined &&that.mgroupId != "") {
|
if (that.mgroupId != null &&that.mgroupId != undefined &&that.mgroupId != "") {
|
||||||
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
that.$API.wpm.wmaterial.list.req(obj).then((res) => {
|
||||||
that.wbatchOptions = res;
|
that.wbatchOptions = res;
|
||||||
if(res.length>0&&that.codeText!==''){
|
if(that.codeText!==''){
|
||||||
that.codeTextChange(that.codeText);
|
setTimeout(() => {
|
||||||
// let arr = [];
|
that.codeTextChange(that.codeText);
|
||||||
// arr = res.filter(item => item.batch == that.codeText);
|
this.codeText = '';
|
||||||
// if(arr.length>0){
|
}, 100);
|
||||||
// that.selectBatch = arr[0].id;
|
|
||||||
// that.form.batch = arr[0].batch;
|
|
||||||
// that.form.wm = arr[0].id;
|
|
||||||
// that.form.count = arr[0].count;
|
|
||||||
// }else{
|
|
||||||
// this.$message.warning("该物料没有库存");
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -306,21 +299,6 @@ export default {
|
||||||
obj.material = that.form.material;
|
obj.material = that.form.material;
|
||||||
this.$API.inm.warehouse.batch.req(obj).then((res) => {
|
this.$API.inm.warehouse.batch.req(obj).then((res) => {
|
||||||
this.batchOptions = res;
|
this.batchOptions = res;
|
||||||
if(res.length>0&&that.codeText!==''){
|
|
||||||
that.codeTextChange(that.codeText);
|
|
||||||
// let arr = [];
|
|
||||||
// arr = res.filter(item => item.batch == that.codeText);
|
|
||||||
// if(arr.length>0){
|
|
||||||
// that.form.material = arr[0].material
|
|
||||||
// that.selectBatch = arr[0].id;
|
|
||||||
// that.form.batch = arr[0].batch;
|
|
||||||
// that.form.warehouse = arr[0].warehouse;
|
|
||||||
// that.form.mb = arr[0].id;
|
|
||||||
// that.form.count = arr[0].count;
|
|
||||||
// }else{
|
|
||||||
// this.$message.warning("该物料没有库存");
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
codeTextChange(data){
|
codeTextChange(data){
|
||||||
|
@ -337,23 +315,28 @@ export default {
|
||||||
}else{//入库----工段
|
}else{//入库----工段
|
||||||
arr = this.wbatchOptions.filter(item => item.batch == res.batch);
|
arr = this.wbatchOptions.filter(item => item.batch == res.batch);
|
||||||
}
|
}
|
||||||
console.log('arr',arr);
|
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
// that.selectBatch = arr[0].id;
|
|
||||||
if(that.mode == "add"){
|
if(that.mode == "add"){
|
||||||
that.selectBatch.push(arr[0].id);
|
let arrF = that.selectList.filter(item =>
|
||||||
let obj = {};
|
item.batch == arr[0].batch
|
||||||
obj.batch = arr[0].batch;
|
)
|
||||||
obj.warehouse = arr[0].warehouse;
|
if(arrF.length>0){
|
||||||
obj.mb = arr[0].id;
|
that.$message.error("该批次已存在");
|
||||||
obj.count = Number(arr[0].count);
|
that.codeText = "";
|
||||||
if(this.cate == 'do_out'){
|
|
||||||
obj.mb = arr[0].id;
|
|
||||||
obj.warehouse = arr[0].warehouse;
|
|
||||||
}else{
|
}else{
|
||||||
obj.wm = arr[0].id;
|
let obj = {};
|
||||||
|
obj.batch = arr[0].batch;
|
||||||
|
obj.warehouse = arr[0].warehouse;
|
||||||
|
obj.mb = arr[0].id;
|
||||||
|
obj.count = Number(arr[0].count);
|
||||||
|
if(this.cate == 'do_out'){
|
||||||
|
obj.mb = arr[0].id;
|
||||||
|
obj.warehouse = arr[0].warehouse;
|
||||||
|
}else{
|
||||||
|
obj.wm = arr[0].id;
|
||||||
|
}
|
||||||
|
that.selectList.push(obj);
|
||||||
}
|
}
|
||||||
that.selectList.push(obj);
|
|
||||||
}else{
|
}else{
|
||||||
that.selectBatch = arr[0].id;
|
that.selectBatch = arr[0].id;
|
||||||
that.form.material = arr[0].material;
|
that.form.material = arr[0].material;
|
||||||
|
@ -368,6 +351,7 @@ export default {
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.$message.error("该批次不存在")
|
that.$message.error("该批次不存在")
|
||||||
|
that.codeText = "";
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue