Commit 467352db authored by 罗超's avatar 罗超

新增条码识别

parent 3b48ef29
...@@ -799,13 +799,16 @@ export default { ...@@ -799,13 +799,16 @@ export default {
var zhifu=[]; var zhifu=[];
wechat = OcrStr.match(/商户单号.\d+/); wechat = OcrStr.match(/商户单号.\d+/);
zhifu = OcrStr.match(/商家可扫码退款或查询交易.\d+/); zhifu = OcrStr.match(/商家可扫码退款或查询交易.\d+/);
if(wechat==null&&zhifu==null){ let barcode=x.data.Barcode;
if(wechat==null&&zhifu==null&&barcode==""){
return; return;
} }
if(zhifu==null&&wechat.length>0){ if(zhifu==null&&wechat!=null&&wechat.length>0){
this.setCode = wechat[wechat.length-1].replace('商户单号',''); this.setCode = wechat[wechat.length-1].replace('商户单号','');
}else if(wechat==null&&zhifu.length>0){ }else if(wechat==null&&zhifu!=null&&zhifu.length>0){
this.setCode = zhifu[zhifu.length-1].replace('商家可扫码退款或查询交易',''); this.setCode = zhifu[zhifu.length-1].replace('商家可扫码退款或查询交易','');
}else if(barcode!=""){
this.setCode=barcode;
} }
this.$confirm('匹配到交易流水号是否替换?', '提示', { this.$confirm('匹配到交易流水号是否替换?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment