修复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 dispatchOrSendMan = this.form.dispatchOrSendMan;
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) {
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code+"30"] || dm[code+"40"]){
haveCode = code;
return;
}
)
return {
billCode:code,
scanWeight:scanWeight,
// scanWeight:null,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
// 到件批量
let scanArrivalInfo = {

View File

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

View File

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

View File

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

View File

@ -228,15 +228,36 @@ export default {
// let scanWeight = this.form.scanWeight
let dispatchOrSendManCode = this.form.dispatchOrSendManCode;
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) {
return {
billCode:code,
// scanWeight:scanWeight,
carNo:carNo,
dispatchOrSendManCode: dispatchOrSendManCode
}
if(dm[code]){
haveCode = code;
return;
}
)
return {
billCode:code,
// scanWeight:scanWeight,
carNo:carNo,
dispatchOrSendManCode: dispatchOrSendManCode
}
})
if(haveCode){
this.$message.error("重复扫描:"+haveCode);
this.playNoticeTone(1);
return;//终止批量扫描逻辑
}
let scanInfo = {
scanType:"301",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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