Commit 3271d496 authored by Mac's avatar Mac

1

parent 73ba8050
...@@ -1088,14 +1088,17 @@ ...@@ -1088,14 +1088,17 @@
let path = "/Upload/Temporary/" let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong')) this.$message.info(this.$t('tips.shangchuanzhong'))
UploadSelfFile('Temporary', file.file, x => { UploadSelfFile('Temporary', file.file, x => {
let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0); if(x.Code==1){
this.saveMsg.push({ let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0);
Content: x.FileUrl, this.saveMsg.push({
ID: 0, Content: x.FileUrl,
Type: fileTypeNumber, ID: 0,
Url: x.FileUrl, Type: fileTypeNumber,
}) Url: x.FileUrl,
this.$message.success(this.$t('tips.scchenggong')) })
this.$message.success(this.$t('tips.scchenggong'))
}
}, 1); }, 1);
}, },
AuditOrRefund() { AuditOrRefund() {
......
...@@ -989,46 +989,48 @@ ...@@ -989,46 +989,48 @@
let path = "/Upload/Temporary/" let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong')) this.$message.info(this.$t('tips.shangchuanzhong'))
UploadSelfFile('Temporary', file.file, x => { UploadSelfFile('Temporary', file.file, x => {
let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0); if(x.Code==1){
this.saveMsg.push({ let fileSize = file.file.size < 1024 ? file.file.size : (file.file.size / 1024).toFixed(0);
Content: x.FileUrl, this.saveMsg.push({
ID: 0, Content: x.FileUrl,
Type: fileTypeNumber, ID: 0,
Url: x.FileUrl, Type: fileTypeNumber,
}) Url: x.FileUrl,
this.Success(this.$t('tips.scchenggong'))
if (this.bankType == 13 && x.data.Ocr.length > 0) {
var OcrStr = '';
x.data.Ocr.forEach(x => {
OcrStr += x.words
}) })
var wechat = []; this.Success(this.$t('tips.scchenggong'))
var zhifu = []; if (this.bankType == 13 && x.data.Ocr.length > 0) {
wechat = OcrStr.match(/商户单号.\d+/); var OcrStr = '';
zhifu = OcrStr.match(/商家可扫码退款或查询交易.\d+/); x.data.Ocr.forEach(x => {
let barcode = x.data.Barcode; OcrStr += x.words
if (wechat == null && zhifu == null && barcode == "") { })
return; var wechat = [];
} var zhifu = [];
if (zhifu == null && wechat != null && wechat.length > 0 && wechat[wechat.length - 1].length > 20) { wechat = OcrStr.match(/商户单号.\d+/);
this.setCode = wechat[wechat.length - 1].replace('商户单号', ''); zhifu = OcrStr.match(/商家可扫码退款或查询交易.\d+/);
} else if (wechat == null && zhifu != null && zhifu.length > 0 && zhifu[zhifu.length - 1].length > 20) { let barcode = x.data.Barcode;
this.setCode = zhifu[zhifu.length - 1].replace('商家可扫码退款或查询交易', ''); if (wechat == null && zhifu == null && barcode == "") {
} else if (barcode != "") { return;
this.setCode = barcode; }
} if (zhifu == null && wechat != null && wechat.length > 0 && wechat[wechat.length - 1].length > 20) {
this.$confirm('匹配到交易流水号是否替换?', '提示', { this.setCode = wechat[wechat.length - 1].replace('商户单号', '');
confirmButtonText: '确定', } else if (wechat == null && zhifu != null && zhifu.length > 0 && zhifu[zhifu.length - 1].length > 20) {
cancelButtonText: '取消', this.setCode = zhifu[zhifu.length - 1].replace('商家可扫码退款或查询交易', '');
type: 'warning' } else if (barcode != "") {
}).then(() => { this.setCode = barcode;
this.msg.AccountNumber = this.setCode }
}).catch(() => { this.$confirm('匹配到交易流水号是否替换?', '提示', {
this.$message({ confirmButtonText: '确定',
type: 'info', cancelButtonText: '取消',
message: '已取消删除' type: 'warning'
}).then(() => {
this.msg.AccountNumber = this.setCode
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
}); });
}); }
} }
}, 1); }, 1);
}, },
......
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