fix:交接记录可以更改批次号,以及解决扫码重复的情况
This commit is contained in:
parent
d3db926789
commit
c99e2c8d1b
|
@ -113,6 +113,16 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24">
|
||||||
|
<el-form-item label="更改批次">
|
||||||
|
<el-switch v-model="change_batch"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||||
|
<el-form-item label="新批次号">
|
||||||
|
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="处理备注">
|
<el-form-item label="处理备注">
|
||||||
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
||||||
|
@ -182,7 +192,7 @@
|
||||||
v-model="listItem.count"
|
v-model="listItem.count"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
:min="0"
|
:min="0"
|
||||||
step="1"
|
:step="1"
|
||||||
:max="listItem.count_cando"
|
:max="listItem.count_cando"
|
||||||
:disabled="mode==='show'"
|
:disabled="mode==='show'"
|
||||||
:step-strictly="true"
|
:step-strictly="true"
|
||||||
|
@ -258,6 +268,7 @@ export default {
|
||||||
recive_user: null,
|
recive_user: null,
|
||||||
recive_mgroup: null,
|
recive_mgroup: null,
|
||||||
handoverb:[],
|
handoverb:[],
|
||||||
|
new_batch:''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
batch: [
|
batch: [
|
||||||
|
@ -321,6 +332,7 @@ export default {
|
||||||
bwVisible:false,
|
bwVisible:false,
|
||||||
scanVisible:false,
|
scanVisible:false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
change_batch:false,
|
||||||
setFiltersVisible: false,
|
setFiltersVisible: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -364,7 +376,6 @@ export default {
|
||||||
},
|
},
|
||||||
showbw(index){
|
showbw(index){
|
||||||
this.bwIndex = index;
|
this.bwIndex = index;
|
||||||
console.log('this.form.handoverb[index].handoverbw',this.form.handoverb[index].handoverbw);
|
|
||||||
this.bwVisible = true;
|
this.bwVisible = true;
|
||||||
},
|
},
|
||||||
bwVisibleClose(){
|
bwVisibleClose(){
|
||||||
|
@ -390,6 +401,10 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.getCkUserList();//废品库接收人
|
that.getCkUserList();//废品库接收人
|
||||||
|
}else if(that.type==30){
|
||||||
|
this.getUserList3();
|
||||||
|
}else{
|
||||||
|
this.getUserList2();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -563,6 +578,9 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
this.getUserList2();
|
this.getUserList2();
|
||||||
}
|
}
|
||||||
|
if(data.new_batch!==''&&data.new_batch!==undefined&&data.new_batch!==null){
|
||||||
|
this.change_batch = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
setFilters(filters) {
|
setFilters(filters) {
|
||||||
|
@ -592,20 +610,21 @@ export default {
|
||||||
//handoverb里有这个物料批次
|
//handoverb里有这个物料批次
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
//判断是否有wpr,若无将wpr放进去
|
//判断是否有wpr,若无将wpr放进去
|
||||||
if(arr[0].handoverbw&&arr[0].handoverbw.length>0){
|
if(that.form.handoverb[0].handoverbw&&that.form.handoverb[0].handoverbw.length>0){
|
||||||
let arr1 = [];
|
let arr1 = [];
|
||||||
arr1 = arr[0].handoverbw.filter((item1) => {
|
arr1 = that.form.handoverb[0].handoverbw.filter((item1) => {
|
||||||
item1.wpr = item1.id;
|
return item1.wpr == res.id;
|
||||||
})
|
})
|
||||||
if(arr1.length>0){
|
if(arr1.length>0){
|
||||||
that.$message.error("该物料已存在");
|
that.$message.error("该物料已存在");
|
||||||
|
// console.log('0',that.form);
|
||||||
}else{
|
}else{
|
||||||
let obj1 = {};
|
let obj1 = {};
|
||||||
obj1.wpr = res.id;
|
obj1.wpr = res.id;
|
||||||
obj1.number = res.number;
|
obj1.number = res.number;
|
||||||
that.form.handoverb[indexs].count+=1;
|
that.form.handoverb[indexs].count+=1;
|
||||||
that.form.handoverb[indexs].handoverbw.push(obj1);
|
that.form.handoverb[indexs].handoverbw.push(obj1);
|
||||||
console.log('1',that.form);
|
// console.log('1',that.form);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.form.handoverb[indexs].handoverbw = [];
|
that.form.handoverb[indexs].handoverbw = [];
|
||||||
|
@ -614,11 +633,10 @@ export default {
|
||||||
obj1.number = res.number;
|
obj1.number = res.number;
|
||||||
that.form.handoverb[indexs].count=1;
|
that.form.handoverb[indexs].count=1;
|
||||||
that.form.handoverb[indexs].handoverbw.push(obj1);
|
that.form.handoverb[indexs].handoverbw.push(obj1);
|
||||||
console.log('2',that.form);
|
// console.log('2',that.form);
|
||||||
}
|
}
|
||||||
}else{//handoverb里没有有这个物料批次
|
}else{//handoverb里没有有这个物料批次
|
||||||
that.materialOptions.forEach((item) => {
|
that.materialOptions.forEach((item) => {
|
||||||
console.log('item.id',item.id);
|
|
||||||
if(item.id == res.wm){
|
if(item.id == res.wm){
|
||||||
let obj2 = {};
|
let obj2 = {};
|
||||||
obj2.wm = item.id;
|
obj2.wm = item.id;
|
||||||
|
@ -631,7 +649,7 @@ export default {
|
||||||
obj3.number = res.number;
|
obj3.number = res.number;
|
||||||
obj2.handoverbw.push(obj3);
|
obj2.handoverbw.push(obj3);
|
||||||
that.form.handoverb.push(obj2);
|
that.form.handoverb.push(obj2);
|
||||||
console.log('3',that.form);
|
// console.log('3',that.form);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -653,7 +671,7 @@ export default {
|
||||||
obj.count_cando = item.count;
|
obj.count_cando = item.count;
|
||||||
obj.count = item.count;
|
obj.count = item.count;
|
||||||
that.form.handoverb.push(obj);
|
that.form.handoverb.push(obj);
|
||||||
console.log('4',that.form);
|
// console.log('4',that.form);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue