diff --git a/src/views/emis/emisTmsScanRecord/arrivalAndDispathScan.vue b/src/views/emis/emisTmsScanRecord/arrivalAndDispathScan.vue index 07194a67..c8608810 100644 --- a/src/views/emis/emisTmsScanRecord/arrivalAndDispathScan.vue +++ b/src/views/emis/emisTmsScanRecord/arrivalAndDispathScan.vue @@ -265,6 +265,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code+"30"] || dm[code+"40"]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/arrivalScan.vue b/src/views/emis/emisTmsScanRecord/arrivalScan.vue index f2eeddb5..bcf3ff86 100644 --- a/src/views/emis/emisTmsScanRecord/arrivalScan.vue +++ b/src/views/emis/emisTmsScanRecord/arrivalScan.vue @@ -251,6 +251,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/coPackageScanning.vue b/src/views/emis/emisTmsScanRecord/coPackageScanning.vue index 2475a1dc..27c23edb 100644 --- a/src/views/emis/emisTmsScanRecord/coPackageScanning.vue +++ b/src/views/emis/emisTmsScanRecord/coPackageScanning.vue @@ -268,6 +268,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/customsClearScan.vue b/src/views/emis/emisTmsScanRecord/customsClearScan.vue index 8bfdc4b0..9d1173a4 100644 --- a/src/views/emis/emisTmsScanRecord/customsClearScan.vue +++ b/src/views/emis/emisTmsScanRecord/customsClearScan.vue @@ -259,6 +259,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/customsDeclearScan.vue b/src/views/emis/emisTmsScanRecord/customsDeclearScan.vue index c33b8d9f..fa574109 100644 --- a/src/views/emis/emisTmsScanRecord/customsDeclearScan.vue +++ b/src/views/emis/emisTmsScanRecord/customsDeclearScan.vue @@ -262,6 +262,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/deliveryScan.vue b/src/views/emis/emisTmsScanRecord/deliveryScan.vue index 76d5481c..4e44b8ac 100644 --- a/src/views/emis/emisTmsScanRecord/deliveryScan.vue +++ b/src/views/emis/emisTmsScanRecord/deliveryScan.vue @@ -253,6 +253,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/loadingScan.vue b/src/views/emis/emisTmsScanRecord/loadingScan.vue index 99525e8e..79dcd107 100644 --- a/src/views/emis/emisTmsScanRecord/loadingScan.vue +++ b/src/views/emis/emisTmsScanRecord/loadingScan.vue @@ -264,6 +264,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/outgoingScan.vue b/src/views/emis/emisTmsScanRecord/outgoingScan.vue index db232108..731af2af 100644 --- a/src/views/emis/emisTmsScanRecord/outgoingScan.vue +++ b/src/views/emis/emisTmsScanRecord/outgoingScan.vue @@ -261,6 +261,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/positionScanning.vue b/src/views/emis/emisTmsScanRecord/positionScanning.vue index 67dbcfc4..e952284a 100644 --- a/src/views/emis/emisTmsScanRecord/positionScanning.vue +++ b/src/views/emis/emisTmsScanRecord/positionScanning.vue @@ -262,6 +262,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/scanRecord.vue b/src/views/emis/emisTmsScanRecord/scanRecord.vue index 235b9c35..861f0a3a 100644 --- a/src/views/emis/emisTmsScanRecord/scanRecord.vue +++ b/src/views/emis/emisTmsScanRecord/scanRecord.vue @@ -252,6 +252,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/signAndRecord.vue b/src/views/emis/emisTmsScanRecord/signAndRecord.vue index 728a7f8f..d08e722b 100644 --- a/src/views/emis/emisTmsScanRecord/signAndRecord.vue +++ b/src/views/emis/emisTmsScanRecord/signAndRecord.vue @@ -321,6 +321,7 @@ export default { } let bcList=this.formBatch.billCode.split(/[;\;\,\,\n]/)||[]; bcList.forEach((code) => { + code = code.trim(); this.getDetail(code, true) }) this.openBatch=false; diff --git a/src/views/emis/emisTmsScanRecord/takeDeliveryScan.vue b/src/views/emis/emisTmsScanRecord/takeDeliveryScan.vue index abbab5f2..3eefbcc0 100644 --- a/src/views/emis/emisTmsScanRecord/takeDeliveryScan.vue +++ b/src/views/emis/emisTmsScanRecord/takeDeliveryScan.vue @@ -243,6 +243,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/transmitReceiveScanning.vue b/src/views/emis/emisTmsScanRecord/transmitReceiveScanning.vue index d9692e76..d1c71f0d 100644 --- a/src/views/emis/emisTmsScanRecord/transmitReceiveScanning.vue +++ b/src/views/emis/emisTmsScanRecord/transmitReceiveScanning.vue @@ -330,6 +330,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code+"10"] || dm[code+"20"]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/unloadingScan.vue b/src/views/emis/emisTmsScanRecord/unloadingScan.vue index 65b86c6a..c0feca23 100644 --- a/src/views/emis/emisTmsScanRecord/unloadingScan.vue +++ b/src/views/emis/emisTmsScanRecord/unloadingScan.vue @@ -245,6 +245,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsScanRecord/unpackScan.vue b/src/views/emis/emisTmsScanRecord/unpackScan.vue index 7c903fef..476c79b6 100644 --- a/src/views/emis/emisTmsScanRecord/unpackScan.vue +++ b/src/views/emis/emisTmsScanRecord/unpackScan.vue @@ -237,6 +237,7 @@ export default { let haveCode = null; let dm = this.dataMap; let scList=bcList.map(function(code) { + code = code.trim(); if(dm[code]){ haveCode = code; return; diff --git a/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue b/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue index c1815b59..cfc7be37 100644 --- a/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue +++ b/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue @@ -669,6 +669,21 @@ + + + + + + + + + + + + @@ -837,7 +852,7 @@ import { listEmisTmsSiteBatch, getTmsGroupBatchNo, getEmisTmsSiteBatch, delEmisTmsSiteBatch, addEmisTmsSiteBatch, updateEmisTmsSiteBatch } from "@/api/emis/emisTmsSiteBatch"; import { listEmisTmsSiteBatchDtl, delEmisTmsSiteBatchDtl, addEmisTmsSiteBatchDtl } from "@/api/emis/emisTmsSiteBatchDtl"; import { addEmisTmsSiteBatchLoading, listEmisTmsSiteBatchLoading, updateEmisTmsSiteBatchLoading } from "@/api/emis/emisTmsSiteBatchLoading"; -import { listEmisWaybill } from "@/api/emis/emisWaybill"; +import { listEmisWaybill, getWaybillDetail } from "@/api/emis/emisWaybill"; // import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker'; import emisTmsPackForm from '@/views/emis/emisTmsPack/emisTmsPackForm'; import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker'; @@ -897,6 +912,11 @@ export default { coData: { }, + + openBatch: false, + titleBatch: "", + formBatchBillList:"", + // 新增/修改包详情数据 emisCoPackDetail:[], blUnpack:"1", @@ -1508,6 +1528,81 @@ export default { this.tempCoPackList = selection; this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true; }, + async submitFormBatch(){ + if(this.formBatchBillList==null || this.formBatchBillList==''){ + this.$message.error("请输入单号"); + return; + } + let bcList=this.formBatchBillList.trim().split(/[;\;\,\,\n]/)||[]; + + bcList.forEach(async (billcode) => { + billcode = billcode.trim(); + + if(this.emisCoPackDetail.filter(wb => wb.billCode == billcode).length == 0){ + let billRes = await listEmisWaybill({billCode:billcode}); + if(!billRes || billRes.code != 200 || !billRes.rows || billRes.rows.length < 1){ + this.$modal.msgError((response && response.msg || '无此运单数据') + ": " + billcode) + return; + } + let item = billRes.rows[0]; + this.emisCoPackDetail.push(item); + if(this.coPackType=="edit"){ + let packDetail = { + batchNo: this.coData.batchNo, + billCode: item.billCode, + scanDate: item.scanDate, + scanStatus: item.scanStatus, + groupStatus: "1",//已组批次 + scanMan: item.scanMan, + scanSite: item.scanSite, + createBy: this.$store.getters.empCode, + createTime: parseTime(new Date()) + }; + let response = await addEmisTmsSiteBatchDtl(packDetail); + if(!response || response.code != 200){ + this.$modal.msgError(response && response.msg || '组批次明细新增失败') + return; + } + } + } + }) + this.titleBatch=""; + this.openBatch=false; + this.formBatchBillList = ""; + this.wayBillData = { + pageNum: 1, + pageSize: 20, + params:{} + }; + this.emisWayBillList=[]; + this.tempCoPackList=[]; + this.addWayBillDisabled = true; + this.wayBillotal=0; + this.computeTotal(); + // 更新主表 + if(this.coPackType=="edit"){ + this.tempCoPackInfo.batchName = this.coData.batchName; + this.tempCoPackInfo.transType = this.coData.transType; + this.tempCoPackInfo.startSiteCode = this.coData.startSiteCode; + this.tempCoPackInfo.startSiteName = this.coData.startSiteName || null; + this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode; + this.tempCoPackInfo.airBilllNo = this.coData.airBilllNo; + this.tempCoPackInfo.etd = this.coData.etd; + this.tempCoPackInfo.carNo = this.coData.carNo; + this.tempCoPackInfo.destCountry = this.coData.destCountry; + this.tempCoPackInfo.shipNo = this.coData.shipNo; + this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty; + this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty; + this.tempCoPackInfo.totalWeight = this.coData.totalWeight; + this.tempCoPackInfo.totalVolume = this.coData.totalVolume; + this.tempCoPackInfo.loadingFile = this.coData.loadingFile; + let res = await updateEmisTmsSiteBatch(this.tempCoPackInfo); + if(!res || res.code != 200){ + this.$modal.msgError(res && res.msg || '未知错误') + return; + } + } + }, async handleCoAdd(){ this.tempCoPackList.forEach(async (item) => { if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 0){ @@ -1782,8 +1877,15 @@ export default { this.$modal.msgError("请先选择必填项") return; } - this.openWayBillForm= true; - this.titleWayBill = "运单列表"; + // this.openWayBillForm= true; + // this.titleWayBill = "运单列表"; + this.openBatch = true; + this.titleBatch = "批量输入运单号"; + }, + cancelBatch(){ + this.openBatch=false; + this.titleBatch = ""; + this.formBatchBillList = ""; }, handleShowMoreInput(){ this.moreInputVisible = !this.moreInputVisible; diff --git a/src/views/emis/emisWaybillProblemInfo/problemEntry.vue b/src/views/emis/emisWaybillProblemInfo/problemEntry.vue index ccfadd97..9cbcdafa 100644 --- a/src/views/emis/emisWaybillProblemInfo/problemEntry.vue +++ b/src/views/emis/emisWaybillProblemInfo/problemEntry.vue @@ -669,12 +669,12 @@ export default { // return; // } // } - let exitlist = this.emisWaybillList.filter(item => (item.billCode == bcList[bc] && item.problemId == this.form.problemId)); + let exitlist = this.emisWaybillList.filter(item => (item.billCode == bcList[bc].trim() && item.problemId == this.form.problemId)); if(exitlist.length > 0){ - this.$message.error("单号:"+ bcList[bc] + ", 已存在"); + this.$message.error("单号:"+ bcList[bc].trim() + ", 已存在"); continue; }else{ - await this.addToList(bcList[bc]); + await this.addToList(bcList[bc].trim()); } } this.loading = false;