From 3ba5f52ac5d3e5e834534717063cb3fdb7e51440 Mon Sep 17 00:00:00 2001 From: liuyp Date: Thu, 13 Jun 2024 22:18:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emis/emisTmsPack/packageManagement.vue | 413 ++++++++++--- .../emisTmsSiteBatch/centerGenBatchMgnt.vue | 583 +++++++++++------- .../orderEntryAndReceiptPictureManagement.vue | 4 +- .../emisWaybillProblemInfo/problemEntry.vue | 14 +- .../emisWaybillTransfer/waybillTransfer.vue | 11 +- 5 files changed, 692 insertions(+), 333 deletions(-) diff --git a/src/views/emis/emisTmsPack/packageManagement.vue b/src/views/emis/emisTmsPack/packageManagement.vue index 6917065a..d1cb8f74 100644 --- a/src/views/emis/emisTmsPack/packageManagement.vue +++ b/src/views/emis/emisTmsPack/packageManagement.vue @@ -4,10 +4,11 @@ - +
- + 合包号 + 运单号
@@ -62,6 +96,15 @@ @click="handleAdd" v-hasPermi="['emis:emisTmsPack:add']" >新增合包 --> + 修改 - + @@ -304,19 +347,19 @@ - + - + {{ $t('生成网点') }} - - + + @@ -334,8 +377,8 @@ {{ $t('是否可拆') }} - 是 - 否 + 是 + 否 @@ -406,7 +449,7 @@ plain size="mini" @click="handleCoPackListDelete" - :disabled="coSingle" + :disabled="coMultiple" >删除 @@ -679,11 +722,14 @@ import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicke import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue'; import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue'; import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue'; +import ProblemTypePicker from '@/views/emis/EmisBaseTools/ProblemTypePicker.vue'; + import { parseTime, dateToStr } from "@/utils/custom"; +import { formatSearchStr } from '@/utils/index' export default { name: "PackageManagement", - components: { EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker}, + components: { ProblemTypePicker, EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker}, dicts: ['emis_pack_status', 'emis_qujian_fangshi', 'emis_payment_type'], data() { return { @@ -702,6 +748,8 @@ export default { coSingle: true, coMultiple: true, + packDisabled:false,//是否禁用可拆分包的按钮 + addWayBillDisabled: true, // packDisabled: true, activeName:'first', @@ -774,7 +822,7 @@ export default { destCountry: null, destCountryName: null, blUnpack: null, - sendSiteCode: null, + sendStiteCode: null, totalParcelQty: null, totalWaybillQty: null, totalVolume: null, @@ -783,7 +831,10 @@ export default { opMan: null, remark: null, delFlag: null, - params:{} + params:{}, + packNo:'', + queryOrderType: '1', + billCode: '' }, queryCoParams: { params:{} @@ -845,12 +896,39 @@ export default { /** 查询TMS合包列表 */ getList() { this.loading = true; + this.single = true; + this.multiple = true; // this.queryParams.params = {}; + if(this.queryParams.packNo){ + let qBillCode=formatSearchStr(this.queryParams.packNo); + let billArr = qBillCode.split(","); + let newBillCodeStr=""; + billArr.forEach(item=>{ + if(item.startsWith("T")){ + let mainBillCode=item.substr(0,14); + newBillCodeStr=newBillCodeStr+mainBillCode+","; + }else if(item == ""){ + + }else{ + newBillCodeStr=newBillCodeStr+item+","; + } + }); + if(this.queryParams.queryOrderType == "1"){ + this.queryParams.packNo=newBillCodeStr; + this.queryParams.billCode=null; + }else{ + // 处理子单号 + this.queryParams.billCode=newBillCodeStr; + this.queryParams.packNo=null; + } + } + this.emisTmsPackList = []; if (null != this.dateTimeRange && '' != this.dateTimeRange) { - this.queryParams.params["beginCreateTime"] = dateToStr(new Date(this.dateTimeRange[0])); - this.queryParams.params["endCreateTime"] = dateToStr(new Date(this.dateTimeRange[1])); + this.queryParams.params["beginSendDate"] = dateToStr(new Date(this.dateTimeRange[0])); + this.queryParams.params["endSendDate"] = dateToStr(new Date(this.dateTimeRange[1])); } + this.queryParams.destCountry = this.queryParams.receiveCountry; listEmisTmsPack(this.queryParams).then(response => { this.emisTmsPackList = response.rows; this.total = response.total; @@ -858,11 +936,35 @@ export default { }); }, handleQueryWait(){ + this.single = true; + this.multiple = true; + this.queryWaitParams = {...this.queryParams}; if(null != this.dateTimeRange && '' != this.dateTimeRange){ this.queryWaitParams.params.beginSendDate = dateToStr(new Date(this.dateTimeRange[0])); this.queryWaitParams.params.endSendDate = dateToStr(new Date(this.dateTimeRange[1])); } - this.queryWaitParams.packNo = this.queryParams.packNo; + // this.queryWaitParams.packNo = this.queryParams.packNo; + let qBillCode=formatSearchStr(this.queryParams.packNo); + let billArr = qBillCode.split(","); + let newBillCodeStr=""; + billArr.forEach(item=>{ + if(item.startsWith("T")){ + let mainBillCode=item.substr(0,14); + newBillCodeStr=newBillCodeStr+mainBillCode+","; + }else if(item == ""){ + + }else{ + newBillCodeStr=newBillCodeStr+item+","; + } + }); + if(this.queryParams.queryOrderType == "1"){ + this.queryWaitParams.packNo=newBillCodeStr; + this.queryWaitParams.billCode=null; + }else{ + // 处理子单号 + this.queryWaitParams.billCode=newBillCodeStr; + this.queryWaitParams.packNo=null; + } this.loadingWait = true; this.queryWaitParams.params.isNeedPack = 1; @@ -883,12 +985,36 @@ export default { this.waitPackList = selection; }, async handleQueryDone(){ + this.single = true; + this.multiple = true; this.loadingDone = true; + this.queryDoneParams = {...this.queryParams}; if(null != this.dateTimeRange && '' != this.dateTimeRange){ this.queryDoneParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0])); this.queryDoneParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1])); } - this.queryDoneParams.packNo = this.queryParams.packNo; + // this.queryDoneParams.packNo = this.queryParams.packNo; + let qBillCode=formatSearchStr(this.queryParams.packNo); + let billArr = qBillCode.split(","); + let newBillCodeStr=""; + billArr.forEach(item=>{ + if(item.startsWith("T")){ + let mainBillCode=item.substr(0,14); + newBillCodeStr=newBillCodeStr+mainBillCode+","; + }else if(item == ""){ + + }else{ + newBillCodeStr=newBillCodeStr+item+","; + } + }); + if(this.queryParams.queryOrderType == "1"){ + this.queryDoneParams.packNo=newBillCodeStr; + this.queryDoneParams.billCode=null; + }else{ + // 处理子单号 + this.queryDoneParams.billCode=newBillCodeStr; + this.queryDoneParams.packNo=null; + } let resList = await listEmisTmsPackDtl(this.queryDoneParams); this.loadingDone = false; if(!resList || resList.code != 200){ @@ -942,9 +1068,8 @@ export default { this.wayBillData.dateTimeRange=value; }, async handleAddCoPack(){ - debugger - console.log(this.coData) - if(!this.coData.destCountry || !this.coData.sendSiteCode || !this.coData.nextSiteCode || !this.blUnpack){ + // if(!this.coData.destCountry || !this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){ + if(!this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){ this.$modal.msgError("请先选择必填项") return; } @@ -960,7 +1085,7 @@ export default { nextSiteCode: this.coData.nextSiteCode, // destCountryName: this.coData., blUnpack: this.coData.blUnpack, - sendSiteCode: this.coData.sendSiteCode, + sendStiteCode: this.coData.sendStiteCode, sendSiteName: this.coData.sendSiteName, totalParcelQty: this.coData.totalParcelQty, totalWaybillQty: this.coData.totalWaybillQty, @@ -970,6 +1095,10 @@ export default { opMan: this.$store.getters.empCode } if(this.coPackType == "add"){// 新增 + if(this.emisCoPackDetail.length<2){ + this.$message.error("合包总件数少于2件"); + return; + } let resPack = await getPackNo(); if(!resPack || resPack.code != 200){ this.$message.error(resPack && resPack.msg || "未知错误"); @@ -1007,7 +1136,7 @@ export default { }else if(this.coPackType == "edit"){// 修改 //第一步:处理合包信息的更新; if(this.tempCoPackInfo.destCountry != this.coData.destCountry - || this.tempCoPackInfo.sendSiteCode != this.coData.sendSiteCode + || this.tempCoPackInfo.sendStiteCode != this.coData.sendStiteCode || this.tempCoPackInfo.nextSiteCode != this.coData.nextSiteCode || this.tempCoPackInfo.blUnpack != this.blUnpack || this.tempCoPackInfo.totalWaybillQty != this.coData.totalWaybillQty @@ -1016,7 +1145,7 @@ export default { || this.tempCoPackInfo.totalVolume != this.coData.totalVolume ){ this.tempCoPackInfo.destCountry = this.coData.destCountry; - this.tempCoPackInfo.sendSiteCode = this.coData.sendSiteCode; + this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode; this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode; this.tempCoPackInfo.blUnpack = this.blUnpack; this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty; @@ -1032,64 +1161,31 @@ export default { // }); } //第二步:处理运单列表的数据 - let tempDelList = []; - let tempAddList=[]; //2.1:计算要删除的运单 - tempDelList = this.tempExistCoPackWayBillList.filter(item => { - let ls = this.emisCoPackDetail.filter(cd => { - return cd.billCode == item.billCode - }) - if(ls.length > 0){ - return false; - }else{ - return true; - } - }) - // tempDelList.forEach(item =>{ - for(let tdl = 0; tdl < tempDelList.length; tdl++){ - let item = tempDelList[tdl]; - let res = await delEmisTmsPackDtl(item.id); - // delEmisTmsPackDtl(item.id).then(res => { - if(!res || res.code != 200){ - this.$modal.msgError(res && res.msg || '未知错误') - return; - } - // }) - } + // let tempDelList = []; + // tempDelList = this.tempExistCoPackWayBillList.filter(item => { + // let ls = this.emisCoPackDetail.filter(cd => { + // return cd.billCode == item.billCode + // }) + // if(ls.length > 0){ + // return false; + // }else{ + // return true; + // } // }) - //2.2:计算要新增的运单 - tempAddList = this.emisCoPackDetail.filter(item => { - let ls = this.tempExistCoPackWayBillList.filter(cd => { - return cd.billCode == item.billCode - }) - if(ls.length > 0){ - return false; - }else{ - return true; - } - }) - // tempAddList.forEach(item =>{ - for(let tal = 0; tal < tempAddList.length; tal++){ - let item = tempAddList[tal]; - let packDetail = { - packNo:this.coData.packNo, - billCode: item.billCode, - scanDate: item.scanDate, - scanStatus: item.scanStatus, - packStatus: null, - scanMan: item.scanMan, - createBy: this.$store.getters.empCode, - createTime: parseTime(new Date()) - }; - let response = await addEmisTmsPackDtl(packDetail); - // addEmisTmsPackDtl(packDetail).then(response => { - if(!response || response.code != 200){ - this.$modal.msgError(response && response.msg || '合包明细新增失败') - return; - } - // }) - } + // // tempDelList.forEach(item =>{ + // for(let tdl = 0; tdl < tempDelList.length; tdl++){ + // let item = tempDelList[tdl]; + // let res = await delEmisTmsPackDtl(item.id); + // // delEmisTmsPackDtl(item.id).then(res => { + // if(!res || res.code != 200){ + // this.$modal.msgError(res && res.msg || '未知错误') + // return; + // } + // // }) + // } // }) + } this.openForm= false; this.titleForm = ""; @@ -1115,15 +1211,33 @@ export default { this.coData={}; this.blUnpack="1"; this.emisCoPackDetail=[]; + this.getQuery(); }, handleWayBillSelectionChange(selection){ this.tempCoPackList = selection; this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true; }, - handleCoAdd(){ - this.tempCoPackList.forEach(item => { + async handleCoAdd(){ + this.tempCoPackList.forEach(async (item) => { if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 0){ this.emisCoPackDetail.push(item); + if(this.coPackType=="edit"){ + let packDetail = { + packNo:this.coData.packNo, + billCode: item.billCode, + scanDate: item.scanDate, + scanStatus: item.scanStatus, + packStatus: null, + scanMan: item.scanMan, + createBy: this.$store.getters.empCode, + createTime: parseTime(new Date()) + }; + let response = await addEmisTmsPackDtl(packDetail); + if(!response || response.code != 200){ + this.$modal.msgError(response && response.msg || '合包明细新增失败') + return; + } + } } }) this.titleWayBill=""; @@ -1138,6 +1252,23 @@ export default { this.addWayBillDisabled = true; this.wayBillotal=0; this.computeTotal(); + if(this.coPackType=="edit"){ + // 更新主表 + this.tempCoPackInfo.destCountry = this.coData.destCountry; + this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode; + this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode; + this.tempCoPackInfo.blUnpack = this.blUnpack; + this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty; + this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty; + this.tempCoPackInfo.totalWeight = this.coData.totalWeight; + this.tempCoPackInfo.totalVolume = this.coData.totalVolume; + let res = await updateEmisTmsPack(this.tempCoPackInfo); + if(!res || res.code != 200){ + this.$modal.msgError(res && res.msg || '未知错误') + return; + } + this.$modal.msgSuccess('追加成功') + } }, handleCloseWayBill(){ this.titleWayBill=""; @@ -1152,15 +1283,80 @@ export default { this.addWayBillDisabled = true; this.wayBillotal=0; }, - handleCoPackListDelete(){ - let newList =[]; - this.emisCoPackDetail.forEach(item=>{ - if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){ - newList.push(item); - } - }); - this.emisCoPackDetail = newList; - this.computeTotal(); + async handleCoPackListDelete(){ + // if(!this.coData.destCountry || !this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){ + if(!this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){ + this.$modal.msgError("请先选择必填项") + return; + } + if(this.coPackType == "edit"){ + this.$confirm('确认删除该条数据吗?', '确认信息') + .then(async (isPass) => { + if (isPass) { + //计算要删除的运单, “删除”按钮的操作逻辑 + // let tempDelList = []; + // 计算出选中的数据是已存在还是新增的; + let idsArrTemp=[]; + for(let gti=0; gti < this.tempExistCoPackWayBillList.length;gti++){ + if(this.coSelection.filter(item => { + return this.tempExistCoPackWayBillList[gti].billCode == item.billCode + }).length > 0){ + // 已存在 + let res = await delEmisTmsPackDtl(this.tempExistCoPackWayBillList[gti].id); + if(!res || res.code != 200){ + this.$modal.msgError(res && res.msg || '未知错误') + return; + } + idsArrTemp.push(this.tempExistCoPackWayBillList[gti].id) + } + } + let newList =[]; + this.emisCoPackDetail.forEach(item=>{ + if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){ + newList.push(item); + } + }); + this.emisCoPackDetail = newList; + let afterList=[]; + for(let ai = 0; ai < this.tempExistCoPackWayBillList.length; ai++){ + debugger + console.log(idsArrTemp) + console.log(this.tempExistCoPackWayBillList[ai]) + if(idsArrTemp.indexOf(this.tempExistCoPackWayBillList[ai].id) == -1){ + afterList.push(this.tempExistCoPackWayBillList[ai]); + } + } + this.tempExistCoPackWayBillList = afterList;//this.tempExistCoPackWayBillList.filter(item => {idsArrTemp.indexOf(item.id) == -1}) + + this.computeTotal(); + // 更新主表 + this.tempCoPackInfo.destCountry = this.coData.destCountry; + this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode; + this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode; + this.tempCoPackInfo.blUnpack = this.blUnpack; + this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty; + this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty; + this.tempCoPackInfo.totalWeight = this.coData.totalWeight; + this.tempCoPackInfo.totalVolume = this.coData.totalVolume; + let res = await updateEmisTmsPack(this.tempCoPackInfo); + if(!res || res.code != 200){ + this.$modal.msgError(res && res.msg || '未知错误') + return; + } + this.$modal.msgSuccess('删除成功') + } + }) + .catch() + }else{ + let newList =[]; + this.emisCoPackDetail.forEach(item=>{ + if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){ + newList.push(item); + } + }); + this.emisCoPackDetail = newList; + this.computeTotal(); + } }, /** 搜索按钮操作 */ handleQuery() { @@ -1183,22 +1379,33 @@ export default { handleCoPackSelectionChange(selection){ // this.coSelection = selection.map(item => item.id) this.coSelection = selection; - this.coSingle = selection.length!==1 + this.coSingle = selection.length !== 1; this.coMultiple = !selection.length }, computeTotal(){ let totalParcelQty=0; let totalWeight=0; let totalVolume=0; + let firstItem = this.emisCoPackDetail.length > 0 ? this.emisCoPackDetail[0] : null; + let blUnpack = true; this.emisCoPackDetail.forEach(item =>{ totalParcelQty +=item.parcelQty; totalWeight +=item.billWeight; totalVolume +=item.totalVolume; item.destCountry = this.coData.destCountry; - item.sendSiteCode = this.coData.sendSiteCode; + item.sendStiteCode = this.coData.sendStiteCode; item.nextSiteCode = this.coData.nextSiteCode; item.blUnpack = this.blUnpack; + if(firstItem.receiveCountry != item.receiveCountry){ + blUnpack = false; + } }) + if(!blUnpack){ + this.packDisabled = true; + this.blUnpack = "1"; + }else{ + this.packDisabled = false; + } this.coData.totalWaybillQty=this.emisCoPackDetail.length; this.coData.totalParcelQty=totalParcelQty; this.coData.totalWeight=totalWeight; @@ -1225,12 +1432,12 @@ export default { this.coData.createTime = parseTime(new Date()); this.coData.destCountry = null; this.coData.destCountryName = null; - // this.coData.sendSiteCode = null; + // this.coData.sendStiteCode = null; this.coData.nextSiteCode = null; this.coData.nextStation = null; this.blUnpack = "1"; - this.coData.sendSiteCode = this.$store.getters.ownerSiteCode; + this.coData.sendStiteCode = this.$store.getters.ownerSiteCode; this.coData.sendSiteName=this.$store.getters.ownerSiteName; this.computeTotal(); @@ -1240,6 +1447,11 @@ export default { this.titleForm = "新增合包"; }, handleAddWayBill(){ + // if(!this.coData.destCountry || !this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){ + if(!this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){ + this.$modal.msgError("请先选择必填项") + return; + } this.openWayBillForm= true; this.titleWayBill = "运单列表"; }, @@ -1247,9 +1459,10 @@ export default { this.moreInputVisible = !this.moreInputVisible; }, /** 修改按钮操作 */ - async handleUpdate(row) { + async handleUpdate() { + let id = this.ids[0] this.coPackType="edit"; - let response = await getEmisTmsPack(row.id); + let response = await getEmisTmsPack(id); if(!response || response.code != 200){ this.$message.error(response && response.msg || "未知错误"); return; @@ -1259,8 +1472,8 @@ export default { this.coData.createTime = resData.createTime; this.coData.destCountry = resData.destCountry; // this.coData.destCountryName = null; - this.coData.sendSiteCode = resData.sendSiteCode; - // this.coData.sendSiteCode = resData.sendSiteName; + this.coData.sendStiteCode = resData.sendStiteCode; + this.coData.sendSiteName = resData.sendSiteName; this.coData.nextSiteCode = resData.nextSiteCode; // this.coData.nextStation = null; this.blUnpack = resData.blUnpack; @@ -1324,7 +1537,7 @@ export default { const curList = response.rows import('@/vendor/Export2Excel').then(excel => { const tHeader = ['id','合包号','合包名称','合包时间','目的国家','目的国家名称','是否可拆','发出网点','下一网点','下一站','总件数','总运单数','总体积','总重量','合包状态','扩展数据','操作员','ext1','ext2','ext3','ext4','备注','租户ID','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建网点','更新网点',]; - const filterVal = ['id','packNo','packName','packDate','destCountry','destCountryName','blUnpack','sendSiteCode','nextSiteCode','nextStation','totalParcelQty','totalWaybillQty','totalVolume','totalWeight','packStatus','extData','opMan','ext1','ext2','ext3','ext4','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',]; + const filterVal = ['id','packNo','packName','packDate','destCountry','destCountryName','blUnpack','sendStiteCode','nextSiteCode','nextStation','totalParcelQty','totalWaybillQty','totalVolume','totalWeight','packStatus','extData','opMan','ext1','ext2','ext3','ext4','remark','tenantId','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',]; const data = this.formatJson(filterVal, curList, response.rows) excel.export_json_to_excel({ header: tHeader, diff --git a/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue b/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue index 57e03882..4583b834 100644 --- a/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue +++ b/src/views/emis/emisTmsSiteBatch/centerGenBatchMgnt.vue @@ -7,8 +7,8 @@
+ 批次号 运单号 - 订单号
- - - + --> @@ -111,6 +92,14 @@ @click="handleAdd" v-hasPermi="['emis:emisTmsSiteBatchLoading:add']" >新增组批次 --> + 修改 打印组批次 + >下载批次文件 @@ -302,8 +291,18 @@ - - + + + + + + - + - + @@ -357,40 +356,48 @@ - + + + + - + + --> - + + @@ -427,7 +434,7 @@ - + @@ -440,48 +447,22 @@ - {{$t('总票数') + ': ' + (coData.totalWaybillQty || 0)}} - {{$t('总件数') + ': ' + (coData.totalParcelQty || 0)}} - {{$t('总重量') + ': ' + (coData.totalWeight || 0)}} - @@ -558,7 +539,7 @@ plain size="mini" @click="handleCoPackListDelete" - :disabled="coSingle" + :disabled="coMultiple" >删除 @@ -833,11 +814,12 @@ import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePic import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue'; import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue'; import { parseTime, dateToStr } from "@/utils/custom"; +import { formatSearchStr } from '@/utils/index' export default { name: "CenterGenBatchMgnt", components: { EmisGetNextSitePicker, CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker}, - dicts: ['emis_pack_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi'], + dicts: ['emis_pack_status', 'emis_payment_type', 'emis_biz_shipping_method', 'emis_qujian_fangshi', 'cebp_return_status'], data() { return { // 遮罩层 @@ -878,7 +860,7 @@ export default { waitPackList:[],//选择未组包的运单先保存起来,在后续新增组批次的弹框中使用 // 新增/修改弹窗数据 coData: { - blUnpack:"1" + }, // 新增/修改包详情数据 emisCoPackDetail:[], @@ -949,7 +931,9 @@ export default { // opMan: null, // remark: null, // delFlag: null, - params:{} + params:{ + queryOrderType: '0', + }, }, queryCoParams: { params:{} @@ -1006,11 +990,39 @@ export default { }, donothing(){ + }, + test(ctx){ + debugger; }, /** 查询TMS组批次列表 */ getList() { this.loading = true; + this.single = true; + this.multiple = true; // this.queryParams.params = {}; + if(this.queryParams.billCode){ + let qBillCode=formatSearchStr(this.queryParams.billCode); + let billArr = qBillCode.split(","); + let newBillCodeStr=""; + billArr.forEach(item=>{ + if(item.startsWith("T")){ + let mainBillCode=item.substr(0,14); + newBillCodeStr=newBillCodeStr+mainBillCode+","; + }else if(item == ""){ + + }else{ + newBillCodeStr=newBillCodeStr+item+","; + } + }); + if(this.queryParams.params.queryOrderType == "0"){ + this.queryParams.batchNo=newBillCodeStr; + this.queryParams.billCode=null; + }else{ + // 处理子单号 + this.queryParams.billCode=newBillCodeStr; + this.queryParams.batchNo=null; + } + } this.emisTmsPackList = []; if (null != this.dateTimeRange && '' != this.dateTimeRange) { this.queryParams.params["beginCreateTime"] = dateToStr(new Date(this.dateTimeRange[0])); @@ -1024,14 +1036,40 @@ export default { }); }, handleQueryWait(){ + this.single = true; + this.multiple = true; if(null != this.dateTimeRange && '' != this.dateTimeRange){ this.queryWaitParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0])); this.queryWaitParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1])); } - this.queryWaitParams.packNo = this.queryParams.packNo; + // this.queryWaitParams.packNo = this.queryParams.packNo; this.queryWaitParams.receiveCountry = this.queryParams.receiveCountry; this.queryWaitParams.sendCountry = this.queryParams.sendCountry; + if(this.queryParams.billCode){ + let qBillCode=formatSearchStr(this.queryParams.billCode); + let billArr = qBillCode.split(","); + let newBillCodeStr=""; + billArr.forEach(item=>{ + if(item.startsWith("T")){ + let mainBillCode=item.substr(0,14); + newBillCodeStr=newBillCodeStr+mainBillCode+","; + }else if(item == ""){ + + }else{ + newBillCodeStr=newBillCodeStr+item+","; + } + }); + if(this.queryParams.params.queryOrderType == "0"){ + this.queryWaitParams.batchNo=newBillCodeStr; + this.queryWaitParams.billCode=null; + }else{ + // 处理子单号 + this.queryWaitParams.billCode=newBillCodeStr; + this.queryWaitParams.batchNo=null; + } + } + this.loadingWait = true; this.queryWaitParams.params.isNeedBatch = 1; listEmisWaybill(this.queryWaitParams).then(response => { @@ -1051,12 +1089,38 @@ export default { this.waitPackList = selection; }, async handleQueryDone(){ + this.single = true; + this.multiple = true; this.loadingDone = true; if(null != this.dateTimeRange && '' != this.dateTimeRange){ this.queryDoneParams.params.beginCreateTime = dateToStr(new Date(this.dateTimeRange[0])); this.queryDoneParams.params.endCreateTime = dateToStr(new Date(this.dateTimeRange[1])); } - this.queryDoneParams.packNo = this.queryParams.packNo; + // this.queryDoneParams.packNo = this.queryParams.packNo; + if(this.queryParams.billCode){ + let qBillCode=formatSearchStr(this.queryParams.billCode); + let billArr = qBillCode.split(","); + let newBillCodeStr=""; + billArr.forEach(item=>{ + if(item.startsWith("T")){ + let mainBillCode=item.substr(0,14); + newBillCodeStr=newBillCodeStr+mainBillCode+","; + }else if(item == ""){ + + }else{ + newBillCodeStr=newBillCodeStr+item+","; + } + }); + if(this.queryParams.params.queryOrderType == "0"){ + this.queryDoneParams.batchNo=newBillCodeStr; + this.queryDoneParams.billCode=null; + }else{ + // 处理子单号 + this.queryDoneParams.billCode=newBillCodeStr; + this.queryDoneParams.batchNo=null; + } + } + this.queryDoneParams.receiveCountry = this.queryParams.receiveCountry; this.queryDoneParams.sendCountry = this.queryParams.sendCountry; let resList = await listEmisTmsSiteBatchDtl(this.queryDoneParams); @@ -1121,10 +1185,14 @@ export default { this.wayBillData.dateTimeRange=value; }, async handleAddCoPack(){ - // if(!this.coData.destCountry || !this.coData.sendSiteCode || !this.coData.nextSiteCode || !this.blUnpack){ - // this.$modal.msgError("请先选择必填项") - // return; - // } + if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType + || (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime)) + || (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime)) + || ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime)) + ){ + this.$modal.msgError("请先选择必填项") + return; + } if(this.emisCoPackDetail.length == 0){ this.$modal.msgError("请先选择至少一条运单信息") return; @@ -1150,14 +1218,8 @@ export default { startSiteName: this.coData.startSiteName || null, nextSiteCode: this.coData.nextSiteCode || null, airBilllNo: this.coData.airBilllNo || null, - // airTime: this.coData.airTime || null, - // etd: this.coData.etd || null, - // eta: this.coData.eta || null, - // packNum: this.coData.packNum || null, carNo: this.coData.carNo || null, - // carTime: this.coData.carTime || null, shipNo: this.coData.shipNo || null, - // shipTime: this.coData.shipTime || null, clearanceResStatus: this.coData.clearanceResStatus || null, declareResStatus: this.coData.declareResStatus || null, destCountry: this.coData.destCountry || null, @@ -1166,23 +1228,6 @@ export default { totalWaybillQty: this.coData.totalWaybillQty || null, totalVolume: this.coData.totalVolume || null, totalWeight: this.coData.totalWeight || null, - // batchType: this.coData.batchType || null, - // batchType: this.coData.batchType || null, - // batchType: this.coData.batchType || null, - - // destCountry: this.coData.destCountry, - // // startSiteCode: this.coData.startSiteCode, - // // nextSiteCode: this.coData.nextSiteCode, - // // destCountryName: this.coData., - // blUnpack: this.coData.blUnpack, - // // startSiteCode: this.coData.startSiteCode, - // // sendSiteName: this.coData.sendSiteName, - // totalParcelQty: this.coData.totalParcelQty, - // totalWaybillQty: this.coData.totalWaybillQty, - // totalVolume: this.coData.totalVolume, - // totalWeight: this.coData.totalWeight, - // // packStatus: this.coData., - // opMan: this.$store.getters.empCode } if(this.coData.transType == 2){ coPackItem.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}'); @@ -1200,10 +1245,8 @@ export default { this.$message.error(resPack && resPack.msg || "未知错误"); return; } - // this.coData.packNo = resPack.data; coPackItem.batchNo = resPack.data; let response = await addEmisTmsSiteBatch(coPackItem); - // addEmisTmsSiteBatch(coPackItem).then(response => { if(!response || response.code != 200){ this.$modal.msgError(response && response.msg || '新增组批次失败') return; @@ -1222,25 +1265,10 @@ export default { createTime: parseTime(new Date()) }; let response = await addEmisTmsSiteBatchDtl(packDetail); - // addEmisTmsSiteBatchDtl(packDetail).then(response => { if(!response || response.code != 200){ this.$modal.msgError(response && response.msg || '组批次明细新增失败') return; } - // 待确认 - // let batchLoading = { - // batchNo:resPack.data, - // posNo: this.emisCoPackDetail[i].posNo, - // row: this.emisCoPackDetail[i].row, - // col: this.emisCoPackDetail[i].col, - // layer: this.emisCoPackDetail[i].layer, - // posDesc: this.emisCoPackDetail[i].posDesc, - // } - // let resBL = await addEmisTmsSiteBatchLoading(batchLoading); - // if(!resBL || resBL.code != 200){ - // this.$modal.msgError(resBL && resBL.msg || '配载新增失败') - // return; - // } this.waitPackList=[]; } @@ -1305,64 +1333,63 @@ export default { } } //第二步:处理运单列表的数据 - let tempDelList = []; - let tempAddList=[]; - //2.1:计算要删除的运单 - tempDelList = this.tempExistCoPackWayBillList.filter(item => { - let ls = this.emisCoPackDetail.filter(cd => { - return cd.billCode == item.billCode - }) - if(ls.length > 0){ - return false; - }else{ - return true; - } - }) - // tempDelList.forEach(item =>{ - for(let tdl = 0; tdl < tempDelList.length; tdl++){ - let item = tempDelList[tdl]; - let res = await delEmisTmsSiteBatchDtl(item.id); - // delEmisTmsSiteBatchDtl(item.id).then(res => { - if(!res || res.code != 200){ - this.$modal.msgError(res && res.msg || '未知错误') - return; - } - // }) - } + + //2.1:计算要删除的运单,提到“删除”按钮的操作逻辑 + // let tempDelList = []; + // + // tempDelList = this.tempExistCoPackWayBillList.filter(item => { + // let ls = this.emisCoPackDetail.filter(cd => { + // return cd.billCode == item.billCode + // }) + // if(ls.length > 0){ + // return false; + // }else{ + // return true; + // } + // }) + // // tempDelList.forEach(item =>{ + // for(let tdl = 0; tdl < tempDelList.length; tdl++){ + // let item = tempDelList[tdl]; + // let res = await delEmisTmsSiteBatchDtl(item.id); + // // delEmisTmsSiteBatchDtl(item.id).then(res => { + // if(!res || res.code != 200){ + // this.$modal.msgError(res && res.msg || '未知错误') + // return; + // } + // // }) + // } // }) //2.2:计算要新增的运单 - tempAddList = this.emisCoPackDetail.filter(item => { - let ls = this.tempExistCoPackWayBillList.filter(cd => { - return cd.billCode == item.billCode - }) - if(ls.length > 0){ - return false; - }else{ - return true; - } - }) - // tempAddList.forEach(item =>{ - for(let tal = 0; tal < tempAddList.length; tal++){ - let item = tempAddList[tal]; - 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); - // addEmisTmsSiteBatchDtl(packDetail).then(response => { - if(!response || response.code != 200){ - this.$modal.msgError(response && response.msg || '组批次明细新增失败') - return; - } - // }) - } + // let tempAddList=[]; + // tempAddList = this.emisCoPackDetail.filter(item => { + // let ls = this.tempExistCoPackWayBillList.filter(cd => { + // return cd.billCode == item.billCode + // }) + // if(ls.length > 0){ + // return false; + // }else{ + // return true; + // } + // }) + // for(let tal = 0; tal < tempAddList.length; tal++){ + // let item = tempAddList[tal]; + // 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; + // } + // } // }) // 修改配载数据 for(let lr = 0; lr < 3; lr++){ @@ -1370,14 +1397,7 @@ export default { if(this.tempCoPackInfo.tableData[lr][ll] != this.tableData[lr][ll]){ let batchLoadingData = { id: this.tempCoPackInfo.tableDataId[lr][ll], - // batchNo: resPack.data, posDesc:this.tableData[lr][ll], - // row: lr, - // col: ll, - // layer: 1, - // posDesc:"", - // remark:"", - // tenantId:"", } let resLD = await updateEmisTmsSiteBatchLoading(batchLoadingData); if(!resLD || resLD.code != 200){ @@ -1412,15 +1432,34 @@ export default { this.coData={}; this.blUnpack="1"; this.emisCoPackDetail=[]; + this.getQuery(); }, handleWayBillSelectionChange(selection){ this.tempCoPackList = selection; this.tempCoPackList.length > 0 ? this.addWayBillDisabled = false : this.addWayBillDisabled = true; }, - handleCoAdd(){ - this.tempCoPackList.forEach(item => { + async handleCoAdd(){ + this.tempCoPackList.forEach(async (item) => { if(this.emisCoPackDetail.filter(wb => wb.billCode == item.billCode).length == 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.titleWayBill=""; @@ -1435,6 +1474,29 @@ export default { 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; + } + } }, handleCloseWayBill(){ this.titleWayBill=""; @@ -1450,14 +1512,83 @@ export default { this.wayBillotal=0; }, handleCoPackListDelete(){ - let newList =[]; - this.emisCoPackDetail.forEach(item=>{ - if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){ - newList.push(item); - } - }); - this.emisCoPackDetail = newList; - this.computeTotal(); + if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType + || (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime)) + || (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime)) + || ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime)) + ){ + this.$modal.msgError("请先选择必填项") + return; + } + + if(this.coPackType == "edit"){ + this.$confirm('确认删除该条数据吗?', '确认信息') + .then(async (isPass) => { + if (isPass) { + //计算要删除的运单, “删除”按钮的操作逻辑 + // let tempDelList = []; + // 计算出选中的数据是已存在还是新增的; + let idsArrTemp=[]; + for(let gti=0; gti < this.tempExistCoPackWayBillList.length;gti++){ + if(this.coSelection.filter(item => { + return this.tempExistCoPackWayBillList[gti].billCode == item.billCode + }).length > 0){ + // 已存在 + let res = await delEmisTmsSiteBatchDtl(this.tempExistCoPackWayBillList[gti].id); + if(!res || res.code != 200){ + this.$modal.msgError(res && res.msg || '未知错误') + return; + } + idsArrTemp.push(this.tempExistCoPackWayBillList[gti].id) + } + } + let newList =[]; + this.emisCoPackDetail.forEach(item=>{ + if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){ + newList.push(item); + } + }); + this.emisCoPackDetail = newList; + let afterList=[]; + for(let ai = 0; ai < this.tempExistCoPackWayBillList.length; ai++){ + debugger + console.log(idsArrTemp) + console.log(this.tempExistCoPackWayBillList[ai]) + if(idsArrTemp.indexOf(this.tempExistCoPackWayBillList[ai].id) == -1){ + afterList.push(this.tempExistCoPackWayBillList[ai]); + } + } + this.tempExistCoPackWayBillList = afterList;//this.tempExistCoPackWayBillList.filter(item => {idsArrTemp.indexOf(item.id) == -1}) + + this.computeTotal(); + // 更新主表 + this.tempCoPackInfo.destCountry = this.coData.destCountry; + this.tempCoPackInfo.sendStiteCode = this.coData.sendStiteCode; + this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode; + this.tempCoPackInfo.blUnpack = this.blUnpack; + this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty; + this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty; + this.tempCoPackInfo.totalWeight = this.coData.totalWeight; + this.tempCoPackInfo.totalVolume = this.coData.totalVolume; + let res = await updateEmisTmsSiteBatch(this.tempCoPackInfo); + if(!res || res.code != 200){ + this.$modal.msgError(res && res.msg || '未知错误') + return; + } + this.$modal.msgSuccess('删除成功') + } + }) + .catch() + }else{ + let newList =[]; + this.emisCoPackDetail.forEach(item=>{ + if(this.coSelection.filter(cs => cs.billCode == item.billCode) == 0){ + newList.push(item); + } + }); + this.emisCoPackDetail = newList; + this.computeTotal(); + } }, /** 搜索按钮操作 */ handleQuery() { @@ -1532,7 +1663,7 @@ export default { // this.coData.sendSiteCode = null; this.coData.nextSiteCode = null; this.coData.nextStation = null; - this.blUnpack = "1"; + // this.blUnpack = "1"; this.tableData = [ { 1: '', 2: '', 3: '', 4: '', 5: '', 6: '' }, @@ -1555,6 +1686,14 @@ export default { this.titleForm = "新增组批次"; }, handleAddWayBill(){ + if(!this.coData.batchName || !this.coData.destCountry || !this.coData.nextSiteCode || !this.coData.startSiteCode || !this.coData.transType + || (this.coData.transType == "2" && (!this.coData.airBilllNo || !this.coData.airTime)) + || (this.coData.transType == "4" && (!this.coData.shipNo || !this.coData.shipTime)) + || ((this.coData.transType == "1" || this.coData.transType == "3" || this.coData.transType == "5") && (!this.coData.carNo || !this.coData.carTime)) + ){ + this.$modal.msgError("请先选择必填项") + return; + } this.openWayBillForm= true; this.titleWayBill = "运单列表"; }, @@ -1562,52 +1701,46 @@ export default { this.moreInputVisible = !this.moreInputVisible; }, /** 修改按钮操作 */ - async handleUpdate(row) { + async handleUpdate() { + // this.coData={}; + let id = this.ids[0] this.coPackType="edit"; - let response = await getEmisTmsSiteBatch(row.id); + let response = await getEmisTmsSiteBatch(id); if(!response || response.code != 200){ this.$message.error(response && response.msg || "未知错误"); return; } let resData = response.data; - this.coData.batchNo = resData.batchNo; - // this.coData.createTime = resData.createTime; - this.coData.destCountry = resData.destCountry; - // this.coData.startSiteCode = resData.startSiteCode; - // this.coData.nextSiteCode = resData.nextSiteCode; - // this.blUnpack = resData.blUnpack; - this.coData.batchName = resData.batchName || ''; - this.coData.batchDate = resData.createTime; - this.coData.batchType = resData.batchType || null; - this.coData.transType = resData.transType || null; - this.coData.startSiteCode = resData.startSiteCode || null; - this.coData.startSiteName = resData.startSiteName || null; - this.coData.nextSiteCode = resData.nextSiteCode || null; - this.coData.airBilllNo = resData.airBilllNo || null; - // this.coData.airTime = resData.airTime || null; - // this.coData.etd = resData.etd || null; - // this.coData.eta = resData.eta || null; - // this.coData.packNum = resData.packNum || null; - this.coData.carNo = resData.carNo || null; - // this.coData.carTime = resData.carTime || null; - this.coData.shipNo = resData.shipNo || null; - // this.coData.shipTime = resData.shipTime || null; - this.coData.clearanceResStatus = resData.clearanceResStatus || null; - this.coData.declareResStatus = resData.declareResStatus || null; - this.coData.destCountry = resData.destCountry || null; - this.coData.destCountryName = resData.destCountryName || null; - this.coData.totalParcelQty = resData.totalParcelQty || null; - this.coData.totalWaybillQty = resData.totalWaybillQty || null; - this.coData.totalVolume = resData.totalVolume || null; - this.coData.totalWeight = resData.totalWeight || null; - + let time = {}; if(resData.transType == 2){ - this.coData.airTime = resData.etd; + time.airTime = resData.etd; }else if(resData.transType == 4){ - this.coData.shipTime = resData.etd; + time.shipTime = resData.etd; }else{ - this.coData.carTime = resData.etd; + time.carTime = resData.etd; } + this.coData = {...resData, ...{batchDate:resData.createTime}, ...time}; + // this.coData.batchNo = resData.batchNo; + // this.coData.destCountry = resData.destCountry; + // this.coData.batchDate = resData.createTime; + // this.coData.batchType = resData.batchType || null; + // this.coData.transType = resData.transType; + // this.coData.startSiteCode = resData.startSiteCode || null; + // this.coData.startSiteName = resData.startSiteName || null; + // this.coData.nextSiteCode = resData.nextSiteCode || null; + // this.coData.airBilllNo = resData.airBilllNo || null; + // this.coData.carNo = resData.carNo || ""; + // this.coData.shipNo = resData.shipNo || null; + // this.coData.clearanceResStatus = resData.clearanceResStatus || null; + // this.coData.declareResStatus = resData.declareResStatus || null; + // this.coData.destCountry = resData.destCountry || null; + // this.coData.destCountryName = resData.destCountryName || null; + // this.coData.totalParcelQty = resData.totalParcelQty || null; + // this.coData.totalWaybillQty = resData.totalWaybillQty || null; + // this.coData.totalVolume = resData.totalVolume || null; + // this.coData.totalWeight = resData.totalWeight || null; + + this.emisCoPackDetail=[]; let resList = await listEmisTmsSiteBatchDtl({batchNo: resData.batchNo}); if(!resList || resList.code != 200){ diff --git a/src/views/emis/emisWaybill/orderEntryAndReceiptPictureManagement.vue b/src/views/emis/emisWaybill/orderEntryAndReceiptPictureManagement.vue index 23eb9027..10561b77 100644 --- a/src/views/emis/emisWaybill/orderEntryAndReceiptPictureManagement.vue +++ b/src/views/emis/emisWaybill/orderEntryAndReceiptPictureManagement.vue @@ -94,7 +94,9 @@ diff --git a/src/views/emis/emisWaybillProblemInfo/problemEntry.vue b/src/views/emis/emisWaybillProblemInfo/problemEntry.vue index 1c6b753b..ff088fb2 100644 --- a/src/views/emis/emisWaybillProblemInfo/problemEntry.vue +++ b/src/views/emis/emisWaybillProblemInfo/problemEntry.vue @@ -393,8 +393,18 @@ export default { notifySiteName:this.tempRecord.dispatchUnderlingSiteName, } ] - this.form.notifySiteCode = this.tempRecord.sendSiteCode; - this.form.notifySiteName = this.tempRecord.sendSiteName; + if(this.tempRecord.sendSiteCode == this.$store.getters.ownerSiteCode){ + this.form.notifySiteCode = this.tempRecord.dispatchUnderlingSiteCode; + this.form.notifySiteName = this.tempRecord.dispatchUnderlingSiteName; + } + // else if(this.tempRecord.dispatchUnderlingSiteCode == this.$store.getters.ownerSiteCode){ + // this.form.notifySiteCode = this.tempRecord.sendSiteCode; + // this.form.notifySiteName = this.tempRecord.sendSiteName; + // } + else{ + this.form.notifySiteCode = this.tempRecord.sendSiteCode; + this.form.notifySiteName = this.tempRecord.sendSiteName; + } // this.billInputDisabled = true; // this.emisWaybillList.push(tempRecord); // this.dataMap[this.form.billCode]=tempRecord; diff --git a/src/views/emis/emisWaybillTransfer/waybillTransfer.vue b/src/views/emis/emisWaybillTransfer/waybillTransfer.vue index dcba139e..bcea4999 100644 --- a/src/views/emis/emisWaybillTransfer/waybillTransfer.vue +++ b/src/views/emis/emisWaybillTransfer/waybillTransfer.vue @@ -237,16 +237,17 @@ - - - - - + + + + + +