|
|
|
@ -393,6 +393,13 @@ export default {
|
|
|
|
|
|
|
|
|
|
//是否已经有单据
|
|
|
|
|
if (this.orderData.billNo == null) {
|
|
|
|
|
|
|
|
|
|
if (this.scanCode != null) {
|
|
|
|
|
if (this.validateFormat(this.scanCode)) {
|
|
|
|
|
this.parseInvoice(this.scanCode)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.enterBillNoKey()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -491,7 +498,14 @@ export default {
|
|
|
|
|
checkCode(code) {
|
|
|
|
|
return this.checkCodeList.includes(code)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
parseInvoice(inputText) {
|
|
|
|
|
const separator = inputText.includes(',') ? ',' : ',';
|
|
|
|
|
const arr = inputText.split(separator);
|
|
|
|
|
if (arr.length == 8 ) this.scanCode = arr[3];
|
|
|
|
|
},
|
|
|
|
|
validateFormat(str) {
|
|
|
|
|
return str?.length >= 3 && /^(10|01|04|32|31)[,,]/.test(str)
|
|
|
|
|
},
|
|
|
|
|
enterBillNoKey(billNo) {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
this.filterQuery.code = this.scanCode
|
|
|
|
@ -501,9 +515,7 @@ export default {
|
|
|
|
|
busType: this.filterQuery.busType,
|
|
|
|
|
code: this.filterQuery.code.trim()
|
|
|
|
|
}
|
|
|
|
|
if (billNo != null) {
|
|
|
|
|
tQuery.code = billNo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
enterCodeBillNo(tQuery).then((response) => {
|
|
|
|
|
if (response.code == 601) {
|
|
|
|
|
this.placeholder = '已选入单据,请扫描追溯码进行审核'
|
|
|
|
|