diff --git a/src/views/emis/emisTmsScanRecord/arrivalScan.vue b/src/views/emis/emisTmsScanRecord/arrivalScan.vue new file mode 100644 index 00000000..f65cd849 --- /dev/null +++ b/src/views/emis/emisTmsScanRecord/arrivalScan.vue @@ -0,0 +1,441 @@ + + + diff --git a/src/views/emis/emisTmsScanRecord/outgoingScan.vue b/src/views/emis/emisTmsScanRecord/outgoingScan.vue index 28b16da1..d3f7499b 100644 --- a/src/views/emis/emisTmsScanRecord/outgoingScan.vue +++ b/src/views/emis/emisTmsScanRecord/outgoingScan.vue @@ -199,7 +199,7 @@ export default { // this.form.dispatchOrSendMan=item.empName; // this.form.dispatchOrSendManCode=item.empCode; this.form.preOrNextStation=item.destSiteName; - // this.form.preOrNextStation=item.destSiteName; + this.form.preOrNextStationCode=item.destSite; // Todo }, @@ -230,6 +230,52 @@ export default { }, submitFormBatch(){ + if(this.formBatch.billCode==null || this.formBatch.billCode==''){ + this.$message.error("输入单号后回车"); + return; + } + let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; + let scanWeight = this.form.scanWeight + let dispatchOrSendManCode = this.form.dispatchOrSendManCode; + let scList=bcList.map(function(code) { + return { + billCode:code, + scanWeight:scanWeight, + // scanWeight:null, + dispatchOrSendManCode: dispatchOrSendManCode + } + } + ) + + let scanInfo = { + scanType:"20", + opType:1, + scanData:scList + }; + + doScan(scanInfo).then(response => { + if(!response.data.scanResult || response.data.scanResult.length == 0){ + this.$message.error("未查到单号"); + return; + } + for (let index = 0; index < response.data.scanResult.length; index++) { + let scanRstItem = response.data.scanResult[index]; + console.log(scanRstItem); + if(scanRstItem.result != 'success'){ + this.$modal.msgError(scanRstItem.message); + return; + } + + this.form.scanType = '20'; + this.form.scanDate = new Date(); + let record =Object.assign({}, this.form) + record.billCode=scanRstItem.billCode; + console.log(record) + let indexBillCode=record.billCode; + this.dataMap[indexBillCode]=record; + this.emisTmsScanRecordList.push(record); + } + }); this.openBatch=false; }, @@ -310,7 +356,9 @@ export default { { billCode:item.billCode, scanWeight:item.scanWeight, - dispatchOrSendManCode:item.dispatchOrSendManCode + preOrNextStationCode:item.preOrNextStationCode, + scanDate:item.scanDate + // dispatchOrSendManCode:item.dispatchOrSendManCode } ); }); @@ -386,7 +434,6 @@ export default { let indexBillCode=record.billCode; this.dataMap[indexBillCode]=record; this.emisTmsScanRecordList.push(record); - console.log("test----->this.emisTmsScanRecordList", this.emisTmsScanRecordList); }); diff --git a/src/views/emis/emisTmsScanRecord/scanRecord.vue b/src/views/emis/emisTmsScanRecord/scanRecord.vue index a42343ab..c68233b9 100644 --- a/src/views/emis/emisTmsScanRecord/scanRecord.vue +++ b/src/views/emis/emisTmsScanRecord/scanRecord.vue @@ -231,6 +231,52 @@ export default { }, submitFormBatch(){ + if(this.formBatch.billCode==null || this.formBatch.billCode==''){ + this.$message.error("输入单号后回车"); + return; + } + let bcList=this.formBatch.billCode.split(/[;\;\,\,]/)||[]; + let scanWeight = this.form.scanWeight + let dispatchOrSendManCode = this.form.dispatchOrSendManCode; + let scList=bcList.map(function(code) { + return { + billCode:code, + scanWeight:scanWeight, + // scanWeight:null, + dispatchOrSendManCode: dispatchOrSendManCode + } + } + ) + + let scanInfo = { + scanType:"10", + opType:1, + scanData:scList + }; + + doScan(scanInfo).then(response => { + if(!response.data.scanResult || response.data.scanResult.length == 0){ + this.$message.error("未查到单号"); + return; + } + for (let index = 0; index < response.data.scanResult.length; index++) { + let scanRstItem = response.data.scanResult[index]; + console.log(scanRstItem); + if(scanRstItem.result != 'success'){ + this.$modal.msgError(scanRstItem.message); + return; + } + + this.form.scanType = '10'; + this.form.scanDate = new Date(); + let record =Object.assign({}, this.form) + record.billCode=scanRstItem.billCode; + console.log(record) + let indexBillCode=record.billCode; + this.dataMap[indexBillCode]=record; + this.emisTmsScanRecordList.push(record); + } + }); this.openBatch=false; },