修复bug-559:批量扫描未判断当天是否重复扫描

This commit is contained in:
liuyp 2024-05-18 22:35:23 +08:00
parent bde3147a24
commit a98d45a6b5
11 changed files with 239 additions and 90 deletions

View File

@ -246,15 +246,35 @@ export default {
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendMan = this.form.dispatchOrSendMan; let dispatchOrSendMan = this.form.dispatchOrSendMan;
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
// let scList=bcList.map(function(code) {
// return {
// billCode:code,
// scanWeight:scanWeight,
// // scanWeight:null,
// dispatchOrSendManCode: dispatchOrSendManCode
// }
// }
// )
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code+"30"] || dm[code+"40"]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, scanWeight:scanWeight,
// scanWeight:null, // scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
// 到件批量 // 到件批量
let scanArrivalInfo = { let scanArrivalInfo = {

View File

@ -236,15 +236,27 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, scanWeight:scanWeight,
// scanWeight:null, // scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"30", scanType:"30",

View File

@ -235,8 +235,14 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight; let scanWeight = this.form.scanWeight;
let bagNo = this.form.bagNo; let bagNo = this.form.bagNo;
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
bagNo:bagNo, bagNo:bagNo,
@ -244,8 +250,13 @@ export default {
// scanWeight:null, // scanWeight:null,
scanDate:null scanDate:null
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"200", scanType:"200",

View File

@ -242,15 +242,27 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, scanWeight:scanWeight,
// scanWeight:null, // scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"40", scanType:"40",

View File

@ -228,15 +228,36 @@ export default {
// let scanWeight = this.form.scanWeight // let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let carNo = this.form.carNo; let carNo = this.form.carNo;
// let scList=bcList.map(function(code) {
// return {
// billCode:code,
// // scanWeight:scanWeight,
// carNo:carNo,
// dispatchOrSendManCode: dispatchOrSendManCode
// }
// }
// )
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
// scanWeight:scanWeight, // scanWeight:scanWeight,
carNo:carNo, carNo:carNo,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"301", scanType:"301",

View File

@ -229,23 +229,34 @@ export default {
this.openBatch=false; this.openBatch=false;
}, },
submitFormBatch(){ submitFormBatch(){
if(this.formBatch.billCode==null || this.formBatch.billCode==''){ if(this.formBatch.billCode==null || this.formBatch.billCode==''){
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, scanWeight:scanWeight,
// scanWeight:null, // scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"20", scanType:"20",

View File

@ -247,15 +247,27 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, scanWeight:scanWeight,
// scanWeight:null, // scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"70", scanType:"70",

View File

@ -242,15 +242,27 @@ export default {
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode; let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, scanWeight:scanWeight,
// scanWeight:null, // scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"10", scanType:"10",

View File

@ -278,6 +278,16 @@ export default {
this.form.ids= arr.map(item=>item.id+item.scanType) this.form.ids= arr.map(item=>item.id+item.scanType)
}, },
handleBatchScan(){ handleBatchScan(){
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let preOrNextStationCode = this.form.preOrNextStationCode;
if(dispatchOrSendManCode==null || dispatchOrSendManCode==''){
this.$message.error("请选择取件员");
return;
}
if(preOrNextStationCode==null||preOrNextStationCode==''){
this.$message.error("请选择下一站");
return;
}
this.formBatch = { this.formBatch = {
billCode: null, billCode: null,
} }
@ -310,23 +320,26 @@ export default {
this.$message.error("输入单号后回车"); this.$message.error("输入单号后回车");
return; return;
} }
if(dispatchOrSendManCode==null || dispatchOrSendManCode==''){ let haveCode = null;
this.$message.error("请选择取件员"); let dm = this.dataMap;
return;
}
if(preOrNextStationCode==null||preOrNextStationCode==''){
this.$message.error("请选择下一站");
return;
}
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code+"10"] || dm[code+"20"]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, scanWeight:scanWeight,
// scanWeight:null, // scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
// 揽件批量 // 揽件批量
let scanArrivalInfo = { let scanArrivalInfo = {

View File

@ -210,16 +210,32 @@ export default {
// let scanWeight = this.form.scanWeight // let scanWeight = this.form.scanWeight
// let dispatchOrSendManCode = this.form.dispatchOrSendManCode; // let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let carNo = this.form.carNo; let carNo = this.form.carNo;
// let scList=bcList.map(function(code) {
// return {
// billCode:code,
// carNo: carNo
// }
// }
// )
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
carNo: carNo carNo: carNo
// scanWeight:scanWeight,
// scanWeight:null,
// dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"302", scanType:"302",

View File

@ -223,16 +223,25 @@ export default {
} }
let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[]; let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[];
let scanWeight = this.form.scanWeight let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
let haveCode = null;
let dm = this.dataMap;
let scList=bcList.map(function(code) { let scList=bcList.map(function(code) {
if(dm[code]){
haveCode = code;
return;
}
return { return {
billCode:code, billCode:code,
scanWeight:scanWeight, scanWeight:scanWeight,
// scanWeight:null,
// dispatchOrSendManCode: dispatchOrSendManCode
} }
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
} }
)
let scanInfo = { let scanInfo = {
scanType:"201", scanType:"201",