|
|
|
@ -631,6 +631,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
getInputFocus(event) {
|
|
|
|
|
event.currentTarget.select();
|
|
|
|
|
``
|
|
|
|
|
},
|
|
|
|
|
//todo 前端执行区分分两个接口不要用同一个接口
|
|
|
|
|
|
|
|
|
@ -640,8 +641,15 @@ export default {
|
|
|
|
|
this.enterBillNoKey()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.checkSuccess = true;
|
|
|
|
|
this.filterQuery.code = this.scanCode;
|
|
|
|
|
if (!this.parseString(this.filterQuery.code)) {
|
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
|
this.$refs.inputRef.select();
|
|
|
|
|
this.$message.error("非法产品编码");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let tQuery = {
|
|
|
|
|
viewType: "tagCode",
|
|
|
|
|
workPlaceCode: this.workplaceId,
|
|
|
|
@ -658,7 +666,6 @@ export default {
|
|
|
|
|
this.filterQuery.code = response.data.code;
|
|
|
|
|
this.scanCode = ""
|
|
|
|
|
this.originCode = ""
|
|
|
|
|
|
|
|
|
|
this.addCode();
|
|
|
|
|
} else {
|
|
|
|
|
if (response.code == 502) {
|
|
|
|
@ -1011,7 +1018,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
startDeal() {
|
|
|
|
|
|
|
|
|
|
this.curRow = this.formData;
|
|
|
|
|
this.dealSplitOrder()
|
|
|
|
|
//处理哪个活动的明细子组件
|
|
|
|
@ -1021,6 +1027,7 @@ export default {
|
|
|
|
|
// this.refreshCodesPanel(this);
|
|
|
|
|
this.$refs.inputRef.focus();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
selectTabsname(value) {
|
|
|
|
|
if (this.$isBlank(this.filterQuery.code) && this.busTypeList.length > 0) {
|
|
|
|
|
let busType = this.busTypeList.find(item => item.documentTypeCode === value);
|
|
|
|
@ -1191,7 +1198,7 @@ export default {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.scanCode = this.valiCodes.join(";");
|
|
|
|
|
// this.scanCode = this.valiCodes.join(";");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
@ -1199,6 +1206,28 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
parseString(str) {
|
|
|
|
|
// 1. 判断是否以 "MA" 开头
|
|
|
|
|
if (str.startsWith("MA")) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
// 2. 判断是否以 "01" 开头且长度大于等于 18
|
|
|
|
|
if (str.startsWith("01") && str.length >= 18) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
// 3. 判断是否以 "#" 开头且 "#" 的个数大于等于 4
|
|
|
|
|
if (str.startsWith("#") && (str.match(/#/g) || []).length >= 4) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
// 4. 判断是否以 "8" 开头且长度为 20 位
|
|
|
|
|
if (str.startsWith("8") && str.length === 20) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
// 如果没有任何条件满足,返回 false
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|