diff --git a/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue b/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue
index c40eeec2..03493a16 100644
--- a/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue
+++ b/src/views/emis/emisTmsSiteBatch/panel/BigBatchEditForm.vue
@@ -258,10 +258,9 @@
{{ parseTime(scope.row.estimateDate || '') }}
-
-
-
+
+
@@ -439,7 +438,7 @@
- {{ parseTime(estimateDate || "") }}
+ {{ parseTime(scope.row.estimateDate || "") }}
@@ -761,6 +760,7 @@ export default {
opMan: null,
remark: null,
tenantId: null,
+
};
this.resetForm("formCo");
},
@@ -774,13 +774,15 @@ export default {
}
let resData = response.data;
let time = {};
- if(resData.transType == 2){
- time.airTime = resData.etd;
- }else if(resData.transType == 4){
- time.shipTime = resData.etd;
- }else{
- time.carTime = resData.etd;
- }
+ // if(resData.transType == 2){
+ // time.airTime = resData.etd;
+ // }else if(resData.transType == 4){
+ // time.shipTime = resData.etd;
+ // }else{
+
+ // }
+
+ time.carTime = resData.etd;
this.coData = {...resData, ...{batchDate:resData.createTime}, ...time};
this.emisCoPackDetail=[];
@@ -789,7 +791,8 @@ export default {
this.$modal.msgError(resList && resList.msg || "未知错误");
return;
}
- this.tempExistCoPackWayBillList = resList.rows;//临时存储,用于运单号校验
+ this.tempExistCoPackWayBillList = resList.rows;
+ //临时存储,用于运单号校验
this.tempCoPackInfo = resData;
for(let p = 0; p < resList.rows.length;p++){
this.emisCoPackDetail.push(resList.rows[p].waybillDetail);
@@ -1019,76 +1022,30 @@ export default {
this.wayBillData.dateTimeRange=value;
},
async handleAddCoPack(){
- // 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;
}
- // let firstItemCountry = this.emisCoPackDetail.length > 0 ? this.emisCoPackDetail[0].receiveCountry : '';
- // 将选中的“待组批次”的运单 置为 追加的运单号
- // for(let p = 0; p < this.emisCoPackDetail.length;p++){
- // if(this.emisCoPackDetail[p].receiveCountry != firstItemCountry){
- // this.$modal.msgError("存在了不同的目的国家!");
- // return ;
- // }
- // }
-
- let coPackItem={
- batchNo: this.coData.batchNo,
- batchName: this.coData.batchName || '',
- batchDate: this.coData.createTime,
- batchType: this.coData.batchType || null,
- transType: this.coData.transType || null,
- destCountry: this.coData.destCountry || null,
- startSiteCode: this.coData.startSiteCode || null,
- startSiteName: this.coData.startSiteName || null,
- nextSiteCode: this.coData.nextSiteCode || null,
- nextSiteName: this.coData.nextSiteName || null,
- airBilllNo: this.coData.airBilllNo || null,
- carNo: this.coData.carNo || null,
- shipNo: this.coData.shipNo || null,
- clearanceResStatus: this.coData.clearanceResStatus || null,
- declareResStatus: this.coData.declareResStatus || null,
- destCountry: this.coData.destCountry || null,
- destCountryName: this.coData.destCountryName || null,
- totalParcelQty: this.coData.totalParcelQty || null,
- totalWaybillQty: this.coData.totalWaybillQty || null,
- totalVolume: this.coData.totalVolume || null,
- totalWeight: this.coData.totalWeight || null,
- }
- // if(this.coData.transType == 2){
- // coPackItem.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
- // this.coData.etd = parseTime(this.coData.airTime, '{y}-{m}-{d} {h}:{i}:{s}');
- // }else if(this.coData.transType == 4){
- // coPackItem.etd = parseTime(this.coData.shipTime, '{y}-{m}-{d} {h}:{i}:{s}');
- // this.coData.etd = parseTime(this.coData.shipTime, '{y}-{m}-{d} {h}:{i}:{s}');
- // }else{
- // }
-
- coPackItem.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
this.coData.etd = parseTime(this.coData.carTime, '{y}-{m}-{d} {h}:{i}:{s}');
- if(this.coPackType == "add"){// 新增
+ // 新增
+ if(this.coPackType == "add")
+ {
let resPack = await getTmsGroupBatchNo();
if(!resPack || resPack.code != 200){
this.$modal.msgError(resPack && resPack.msg || "未知错误");
return;
}
- coPackItem.batchNo = resPack.data;
- let response = await addEmisTmsSiteBatch(coPackItem);
+ this.coData.batchNo = resPack.data;
+
+ let response = await addEmisTmsSiteBatch(this.coData);
if(!response || response.code != 200){
this.$modal.msgError(response && response.msg || '新增组批次失败')
return;
}
- // })
+
for(let i = 0; i< this.emisCoPackDetail.length;i++){
let packDetail = {
batchNo:resPack.data,
@@ -1129,106 +1086,14 @@ export default {
}
}
}
- }else if(this.coPackType == "edit"){// 修改
- //第一步:处理组批次信息的更新;
- if(this.tempCoPackInfo.batchName != this.coData.batchName
- || this.tempCoPackInfo.transType != this.coData.transType
- || this.tempCoPackInfo.startSiteCode != this.coData.startSiteCode
- || 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.shipTime != this.coData.shipTime
- || 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
- ){
- 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.nextSiteName = this.coData.nextSiteName;
- 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.shipTime = this.coData.shipTime;
- 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;
- }
+ }
+ else if(this.coPackType == "edit"){// 修改
+ let res = await updateEmisTmsSiteBatch(this.coData);
+ 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:计算要新增的运单
- // 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++){
for(let ll = 0; ll < 6; ll++){
@@ -1246,23 +1111,16 @@ export default {
}
}
}
- // this.openForm= false;
- // this.titleForm = "";
this.$modal.msgSuccess('操作成功!');
this.$emit("on-changed");
},
handleCancelCo(){
- // this.titleForm='';
- // this.openForm=false;
this.coData={};
this.blUnpack="1";
this.emisCoPackDetail=[];
-
this.$emit("on-cancel");
-
-
},
handleWayBillSelectionChange(selection){
this.tempCoPackList = selection;
@@ -1332,23 +1190,7 @@ export default {
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.nextSiteName = this.coData.nextSiteName;
- 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);
+ let res = await updateEmisTmsSiteBatch(this.coData);
if(!res || res.code != 200){
this.$modal.msgError(res && res.msg || '未知错误')
return;
@@ -1393,30 +1235,12 @@ export default {
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.nextSiteName = this.coData.nextSiteName;
- 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);
+ let res = await updateEmisTmsSiteBatch(this.coData);
if(!res || res.code != 200){
this.$modal.msgError(res && res.msg || '未知错误')
return;
}
}
-
- // this.$emit("on-changed");
},
handleCloseWayBill(){
this.titleWayBill="";
@@ -1432,14 +1256,6 @@ export default {
this.wayBillotal=0;
},
handleCoPackListDelete(){
- // 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('确认删除该条数据吗?', '确认信息')
@@ -1569,16 +1385,6 @@ export default {
},
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 = "运单列表";
this.openBatch = true;
this.titleBatch = "批量输入运单号";
},
@@ -1602,36 +1408,9 @@ export default {
}
let resData = response.data;
let time = {};
- // if(resData.transType == 2){
- // time.airTime = resData.etd;
- // }else if(resData.transType == 4){
- // time.shipTime = resData.etd;
- // }else{
- // time.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});
diff --git a/src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue b/src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue
index e0c531c0..8cd38759 100644
--- a/src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue
+++ b/src/views/emis/emisTmsSiteBatch/panel/BigBatchListPanel.vue
@@ -166,13 +166,13 @@
-
+
- {{scope.row.airBilllNo}}
- {{scope.row.shipNo}}
- {{scope.row.carNo}}
+ {{scope.row.carNo}}
+
+
{{ parseTime(scope.row.etd, '{y}-{m}-{d}') }}