From 46009b0dcca1ecd40392f6ea89ec76c633e5005e Mon Sep 17 00:00:00 2001 From: liuyp Date: Fri, 10 May 2024 09:11:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=80=BB=E8=BE=91=EF=BC=9A?= =?UTF-8?q?=E5=88=B0=E6=B4=BE=E6=89=AB=E6=8F=8F=E9=A1=B5=E5=92=8C=E6=94=B6?= =?UTF-8?q?=E5=8F=91=E6=89=AB=E6=8F=8F=E9=A1=B5=EF=BC=8C=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E7=94=A8=E7=9A=84=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../arrivalAndDispathScan.vue | 46 ++++++++++++++----- .../transmitReceiveScanning.vue | 40 ++++++++++++---- 2 files changed, 66 insertions(+), 20 deletions(-) diff --git a/src/views/emis/emisTmsScanRecord/arrivalAndDispathScan.vue b/src/views/emis/emisTmsScanRecord/arrivalAndDispathScan.vue index 41ae1a0b..064ee6a7 100644 --- a/src/views/emis/emisTmsScanRecord/arrivalAndDispathScan.vue +++ b/src/views/emis/emisTmsScanRecord/arrivalAndDispathScan.vue @@ -391,7 +391,7 @@ export default { }, // 扫描上传 - handleScanUpload(){ + async handleScanUpload(){ var selData = this.$refs.multipleTable.selection; console.log(selData); @@ -420,26 +420,38 @@ export default { let scanArrivalInfo = {scanType:"30",opType:2,scanData:scanArrivalData} console.log(scanArrivalInfo) - scanArrivalData.length > 0 && doScan(scanArrivalInfo).then(response => { - console.log(response); - let scanRstItem = response.data.scanResult[0]; - console.log(scanRstItem); + if(scanArrivalData.length > 0){ + let res = await doScan(scanArrivalInfo); + // console.log(response); + let scanRstItem = res.data.scanResult[0]; + // console.log(scanRstItem); if(scanRstItem.result != 'success'){ this.$modal.msgError(scanRstItem.message); return; } - this.$modal.msgSuccess("到件扫描上传"+scanRstItem.message); + } + + // scanArrivalData.length > 0 && doScan(scanArrivalInfo).then(response => { + // console.log(response); + // let scanRstItem = response.data.scanResult[0]; + // console.log(scanRstItem); + // if(scanRstItem.result != 'success'){ + // this.$modal.msgError(scanRstItem.message); + // return; + // } - }); + // this.$modal.msgSuccess("到件扫描上传"+scanRstItem.message); + + // }); // 派件扫描上传 let scanDispathInfo = {scanType:"40",opType:2,scanData:scanDispathData} console.log(scanDispathInfo) - scanDispathData.length > 0 && doScan(scanDispathInfo).then(response => { - console.log(response); - let scanRstItem = response.data.scanResult[0]; + if(scanDispathData.length > 0){ + let res = await doScan(scanDispathInfo); + let scanRstItem = res.data.scanResult[0]; console.log(scanRstItem); if(scanRstItem.result != 'success'){ this.$modal.msgError(scanRstItem.message); @@ -447,8 +459,20 @@ export default { } this.$modal.msgSuccess("派件扫描上传"+scanRstItem.message); + } + + // .then(response => { + // console.log(response); + // let scanRstItem = response.data.scanResult[0]; + // console.log(scanRstItem); + // if(scanRstItem.result != 'success'){ + // this.$modal.msgError(scanRstItem.message); + // return; + // } - }); + // this.$modal.msgSuccess("派件扫描上传"+scanRstItem.message); + + // }); }, handleScanInput(){ diff --git a/src/views/emis/emisTmsScanRecord/transmitReceiveScanning.vue b/src/views/emis/emisTmsScanRecord/transmitReceiveScanning.vue index 0699c973..e53997fd 100644 --- a/src/views/emis/emisTmsScanRecord/transmitReceiveScanning.vue +++ b/src/views/emis/emisTmsScanRecord/transmitReceiveScanning.vue @@ -465,7 +465,7 @@ export default { }, // 扫描上传 - handleScanUpload(){ + async handleScanUpload(){ var selData = this.$refs.multipleTable.selection; console.log(selData); @@ -499,9 +499,9 @@ export default { let scanRecordInfo = {scanType:"10",opType:2,scanData:scanRecordData} console.log(scanRecordInfo) - scanRecordData.length > 0 && doScan(scanRecordInfo).then(response => { - console.log(response); - let scanRstItem = response.data.scanResult[0]; + if(scanRecordData.length > 0){ + let res = await doScan(scanRecordInfo); + let scanRstItem = res.data.scanResult[0]; console.log(scanRstItem); if(scanRstItem.result != 'success'){ this.$modal.msgError(scanRstItem.message); @@ -509,16 +509,27 @@ export default { } this.$modal.msgSuccess("揽件扫描上传"+scanRstItem.message); + } + // scanRecordData.length > 0 && doScan(scanRecordInfo).then(response => { + // console.log(response); + // let scanRstItem = response.data.scanResult[0]; + // console.log(scanRstItem); + // if(scanRstItem.result != 'success'){ + // this.$modal.msgError(scanRstItem.message); + // return; + // } - }); + // this.$modal.msgSuccess("揽件扫描上传"+scanRstItem.message); + + // }); // 发件扫描上传 let scanOutgoingInfo = {scanType:"20",opType:2,scanData:scanOutgoingData} console.log(scanOutgoingInfo) - scanOutgoingData.length > 0 && doScan(scanOutgoingInfo).then(response => { - console.log(response); - let scanRstItem = response.data.scanResult[0]; + if(scanOutgoingData.length > 0){ + let res = await doScan(scanOutgoingInfo); + let scanRstItem = res.data.scanResult[0]; console.log(scanRstItem); if(scanRstItem.result != 'success'){ this.$modal.msgError(scanRstItem.message); @@ -526,8 +537,19 @@ export default { } this.$modal.msgSuccess("发件扫描上传"+scanRstItem.message); + } + // scanOutgoingData.length > 0 && doScan(scanOutgoingInfo).then(response => { + // console.log(response); + // let scanRstItem = response.data.scanResult[0]; + // console.log(scanRstItem); + // if(scanRstItem.result != 'success'){ + // this.$modal.msgError(scanRstItem.message); + // return; + // } - }); + // this.$modal.msgSuccess("发件扫描上传"+scanRstItem.message); + + // }); },