diff --git a/src/views/emis/emisTmsPack/packageManagement.vue b/src/views/emis/emisTmsPack/packageManagement.vue
index 67dca799..3127d8e1 100644
--- a/src/views/emis/emisTmsPack/packageManagement.vue
+++ b/src/views/emis/emisTmsPack/packageManagement.vue
@@ -136,13 +136,22 @@
-->
-
+
+
+
+
+
-
+
+
+ {{ scope.row.blUnpack == "1" ? "是" : "否" }}
+
+
+
@@ -235,12 +244,12 @@
- {{$t('总件数') + ': ' + (coData.parcelQty || 0)}}
+ {{$t('总件数') + ': ' + (coData.totalParcelQty || 0)}}
@@ -480,8 +489,7 @@ import { parseTime } from "@/utils/custom";
export default {
name: "PackageManagement",
components: { CountryPicker, EmisSiteSimplePicker, elDateAdvPicker, emisTmsPackForm, TransLinePicker, TransProductPicker},
- dicts: [
- ],
+ dicts: ['emis_pack_status'],
data() {
return {
// 遮罩层
@@ -625,7 +633,7 @@ export default {
console.log("date picker---->", value)
this.wayBillData.dateTimeRange=value;
},
- handleAddCoPack(){
+ async handleAddCoPack(){
if(!this.coData.destCountry || !this.coData.sendStiteCode || !this.coData.nextSiteCode || !this.blUnpack){
this.$modal.msgError("请先选择必填项")
return;
@@ -651,12 +659,13 @@ export default {
opMan: this.$store.getters.empCode
}
if(this.coPackType == "add"){// 新增
- addEmisTmsPack(coPackItem).then(response => {
+ let response = await addEmisTmsPack(coPackItem);
+ // addEmisTmsPack(coPackItem).then(response => {
if(!response || response.code != 200){
this.$modal.msgError(response && response.msg || '新增合包失败')
return;
}
- })
+ // })
for(let i = 0; i< this.emisCoPackDetail.length;i++){
let packDetail = {
packNo:this.coData.packNo,
@@ -668,12 +677,13 @@ export default {
createBy: this.$store.getters.empCode,
createTime: parseTime(new Date())
};
- addEmisTmsPackDtl(packDetail).then(response => {
+ let response = await addEmisTmsPackDtl(packDetail);
+ // addEmisTmsPackDtl(packDetail).then(response => {
if(!response || response.code != 200){
this.$modal.msgError(response && response.msg || '合包明细新增失败')
return;
}
- })
+ // })
}
}else if(this.coPackType == "edit"){// 修改
//第一步:处理合包信息的更新;
@@ -682,7 +692,7 @@ export default {
|| this.tempCoPackInfo.nextSiteCode != this.coData.nextSiteCode
|| this.tempCoPackInfo.blUnpack != this.blUnpack
|| this.tempCoPackInfo.totalWaybillQty != this.coData.totalWaybillQty
- || this.tempCoPackInfo.parcelQty != this.coData.parcelQty
+ || this.tempCoPackInfo.totalParcelQty != this.coData.totalParcelQty
|| this.tempCoPackInfo.totalWeight != this.coData.totalWeight
|| this.tempCoPackInfo.totalVolume != this.coData.totalVolume
){
@@ -691,15 +701,16 @@ export default {
this.tempCoPackInfo.nextSiteCode = this.coData.nextSiteCode;
this.tempCoPackInfo.blUnpack = this.blUnpack;
this.tempCoPackInfo.totalWaybillQty = this.coData.totalWaybillQty;
- this.tempCoPackInfo.parcelQty = this.coData.parcelQty;
+ this.tempCoPackInfo.totalParcelQty = this.coData.totalParcelQty;
this.tempCoPackInfo.totalWeight = this.coData.totalWeight;
this.tempCoPackInfo.totalVolume = this.coData.totalVolume;
- updateEmisTmsPack(this.tempCoPackInfo).then(res => {
+ let res = await updateEmisTmsPack(this.tempCoPackInfo);
+ // updateEmisTmsPack(this.tempCoPackInfo).then(res => {
if(!res || res.code != 200){
this.$modal.msgError(res && res.msg || '未知错误')
return;
}
- });
+ // });
}
//第二步:处理运单列表的数据
let tempDelList = [];
@@ -715,14 +726,18 @@ export default {
return true;
}
})
- tempDelList.forEach(item =>{
- delEmisTmsPackDtl(item.id).then(res => {
+ // 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;
}
- })
- })
+ // })
+ }
+ // })
//2.2:计算要新增的运单
tempAddList = this.emisCoPackDetail.filter(item => {
let ls = this.tempExistCoPackWayBillList.filter(cd => {
@@ -734,7 +749,9 @@ export default {
return true;
}
})
- tempAddList.forEach(item =>{
+ // tempAddList.forEach(item =>{
+ for(let tal = 0; tal < tempAddList.length; tal++){
+ let item = tempAddList[tal];
let packDetail = {
packNo:this.coData.packNo,
billCode: item.billCode,
@@ -745,13 +762,15 @@ export default {
createBy: this.$store.getters.empCode,
createTime: parseTime(new Date())
};
- addEmisTmsPackDtl(packDetail).then(response => {
+ let response = await addEmisTmsPackDtl(packDetail);
+ // addEmisTmsPackDtl(packDetail).then(response => {
if(!response || response.code != 200){
this.$modal.msgError(response && response.msg || '合包明细新增失败')
return;
}
- })
- })
+ // })
+ }
+ // })
}
this.openForm= false;
this.titleForm = "";
@@ -844,12 +863,12 @@ export default {
this.coMultiple = !selection.length
},
computeTotal(){
- let parcelQty=0;
+ let totalParcelQty=0;
let totalWeight=0;
let totalVolume=0;
this.emisCoPackDetail.forEach(item =>{
- parcelQty +=item.parcelQty;
- totalWeight +=item.totalWeight;
+ totalParcelQty +=item.parcelQty;
+ totalWeight +=item.billWeight;
totalVolume +=item.totalVolume;
item.destCountry = this.coData.destCountry;
item.sendStiteCode = this.coData.sendStiteCode;
@@ -857,7 +876,7 @@ export default {
item.blUnpack = this.blUnpack;
})
this.coData.totalWaybillQty=this.emisCoPackDetail.length;
- this.coData.parcelQty=parcelQty;
+ this.coData.totalParcelQty=totalParcelQty;
this.coData.totalWeight=totalWeight;
this.coData.totalVolume=totalVolume;
},