diff --git a/src/views/emis/emisTmsScanRecord/outgoingScan.vue b/src/views/emis/emisTmsScanRecord/outgoingScan.vue index ff80d686..4cf0b768 100644 --- a/src/views/emis/emisTmsScanRecord/outgoingScan.vue +++ b/src/views/emis/emisTmsScanRecord/outgoingScan.vue @@ -420,27 +420,32 @@ export default { // 检查 let scanInfo = {scanType:"20",opType:2,scanData:scanData, blLastTrack:this.blLastTrack?1:0} - + let count = 0; doScan(scanInfo).then(response => { - console.log(response); let scanRstItem = response.data.scanResult[0]; - console.log(scanRstItem); - if(scanRstItem.result != 'success'){ - this.$modal.msgError(scanRstItem.message); - return; - } + let scanRstItems = response.data.scanResult; + // if(scanRstItem.result != 'success'){ + // this.$modal.msgError(scanRstItem.message); + // return; + // } let newList = []; this.emisTmsScanRecordList.forEach(item => { - if(this.ids.indexOf(item.billCode) > -1){ - this.dataMap[item.billCode]=null; - }else{ + // item.billcode 在 scanResultItem 里面result 不是成功 就加入newList + let scanRstItemResult = scanRstItems.find(scanRstItem => scanRstItem.billCode == item.billCode); + if (scanRstItemResult.result != 'success') { + if (count == 0) { + this.$modal.msgError(scanRstItem.message); + } + count++; newList.push(item); } }) this.ids = []; this.selection = null; this.emisTmsScanRecordList = newList; - this.$modal.msgSuccess(scanRstItem.message); + if(newList.length == 0){ // 所有都成功 + this.$modal.msgSuccess("上传成功"); + } });