This commit is contained in:
linfso 2024-05-25 22:50:01 +08:00
parent b592850a0a
commit d867e19fbe
2 changed files with 81 additions and 38 deletions

View File

@ -8,6 +8,7 @@
</template> </template>
<div> <div>
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;"> <el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
@ -486,7 +487,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="包装类型" prop="packType" label-width="70px""> <el-form-item label="包装类型" prop="packType" label-width="70px"">
<el-select v-model="form.packType" placeholder="请选择"> <el-select multiple="" v-model="form.packType" placeholder="请选择">
<el-option <el-option
v-for="dict in dict.type.emis_tab_packing_type" v-for="dict in dict.type.emis_tab_packing_type"
:key="dict.value" :key="dict.value"
@ -1058,6 +1059,8 @@ methods: {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
closeOnClickModal: false closeOnClickModal: false
}).then(() => { }).then(() => {
this.billCode=null;
this.form.billCode=null;
this.initData(); this.initData();
}); });
} }
@ -1105,16 +1108,19 @@ methods: {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
closeOnClickModal: false closeOnClickModal: false
}).then(() => { }).then(() => {
this.billCode=null;
this.form.billCode=null;
this.initData(); this.initData();
}); });
} }
}, },
onDestCountryChange(item){ onDestCountryChange(item){
if(item){
this.form.reciever.country=item.code; this.form.reciever.country=item.code;
}
}, },
onSelectMonthUser(item){ onSelectMonthUser(item){
console.log(item);
this.form.payee=item.payee; this.form.payee=item.payee;
this.form.salesmen=item.salesmen; this.form.salesmen=item.salesmen;
}, },
@ -1169,7 +1175,6 @@ methods: {
initData() { initData() {
this.reset(); this.reset();
console.log(this.billCode)
if(this.billCode && this.billCode!=undefined) { if(this.billCode && this.billCode!=undefined) {
this.loading = true; this.loading = true;
getWaybillDetail(this.billCode).then(response => { getWaybillDetail(this.billCode).then(response => {
@ -1181,6 +1186,9 @@ methods: {
this.form.printTypeCheckList=[1,5] this.form.printTypeCheckList=[1,5]
this.form.destinationCountry=this.form.reciever.country; this.form.destinationCountry=this.form.reciever.country;
if(this.form.packType){
this.form.packType=this.form.packType.split(",");
}
}); });
}else{ }else{
@ -1196,7 +1204,7 @@ methods: {
// this.form.billWeight=1.0; // this.form.billWeight=1.0;
// this.form.totalVolume=0.0; // this.form.totalVolume=0.0;
this.form.parcelQty=1; this.form.parcelQty=1;
this.form.packType='2'; this.form.packType=['2'];
this.form.blOverWeight='0'; this.form.blOverWeight='0';
this.form.blGenSubbill=1; this.form.blGenSubbill=1;
this.form.paymentType='1'; this.form.paymentType='1';
@ -1341,10 +1349,30 @@ methods: {
} }
if(this.action=="modify" && this.billCode !=this.form.billCode){ if(this.action=="modify" && this.billCode !=this.form.billCode){
this.$modal.msgError("当前单号"+this.form.billCode+"与编辑单号"+this.billCode+"不一致,不允许提交"); this.$confirm("当前单号"+this.form.billCode+"与修改单号"+this.billCode+"不一致,不允许提交!", '提示', {
return ; confirmButtonText: '确认',
cancelButtonText: '返回',
type: 'warning'
}).then(() => {
this.calcDestSite();
}).catch(() => {
})
}else{
this.realSaveOrderInfo();
} }
}
});
},
realSaveOrderInfo(){
// 调整包装类型为多选
if(this.form.packType){
this.form.packType=this.form.packType.join(",");
}
realSubmitOrder(this.form).then(response => { realSubmitOrder(this.form).then(response => {
this.$modal.msgSuccess("下单成功"); this.$modal.msgSuccess("下单成功");
@ -1353,8 +1381,6 @@ methods: {
// this.$emit("on-changed"); // this.$emit("on-changed");
}); });
}
});
}, },
// 弹出地址簿选择 // 弹出地址簿选择
handleSelectCustomerAddress(addressType){ handleSelectCustomerAddress(addressType){
@ -1422,7 +1448,6 @@ methods: {
if(this.form.reciever.province){ if(this.form.reciever.province){
getDestSite(queryParams).then(response => { getDestSite(queryParams).then(response => {
console.log(response);
this.form.destinationCode = response.data.destCode+''; this.form.destinationCode = response.data.destCode+'';
this.form.dispatchSiteCode= response.data.siteCode; this.form.dispatchSiteCode= response.data.siteCode;
this.form.dispatchSite = response.data.siteName; this.form.dispatchSite = response.data.siteName;
@ -1672,9 +1697,6 @@ methods: {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// let newList = this.form.cargoList.filter(item => item.goodsName !== row.goodsName);
// this.form.cargoList=newList;
console.log(index);
this.form.cargoList.splice(index,1) this.form.cargoList.splice(index,1)
this.handleCalcVolume(row); this.handleCalcVolume(row);
}).catch(() => { }).catch(() => {

View File

@ -487,7 +487,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="包装类型" prop="packType" label-width="70px""> <el-form-item label="包装类型" prop="packType" label-width="70px"">
<el-select v-model="form.packType" placeholder="请选择"> <el-select multiple="" v-model="form.packType" placeholder="请选择">
<el-option <el-option
v-for="dict in dict.type.emis_tab_packing_type" v-for="dict in dict.type.emis_tab_packing_type"
:key="dict.value" :key="dict.value"
@ -1059,6 +1059,8 @@ methods: {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
closeOnClickModal: false closeOnClickModal: false
}).then(() => { }).then(() => {
this.billCode=null;
this.form.billCode=null;
this.initData(); this.initData();
}); });
} }
@ -1106,16 +1108,19 @@ methods: {
distinguishCancelAndClose: true, distinguishCancelAndClose: true,
closeOnClickModal: false closeOnClickModal: false
}).then(() => { }).then(() => {
this.billCode=null;
this.form.billCode=null;
this.initData(); this.initData();
}); });
} }
}, },
onDestCountryChange(item){ onDestCountryChange(item){
if(item){
this.form.reciever.country=item.code; this.form.reciever.country=item.code;
}
}, },
onSelectMonthUser(item){ onSelectMonthUser(item){
console.log(item);
this.form.payee=item.payee; this.form.payee=item.payee;
this.form.salesmen=item.salesmen; this.form.salesmen=item.salesmen;
}, },
@ -1170,7 +1175,6 @@ methods: {
initData() { initData() {
this.reset(); this.reset();
console.log(this.billCode)
if(this.billCode && this.billCode!=undefined) { if(this.billCode && this.billCode!=undefined) {
this.loading = true; this.loading = true;
getWaybillDetail(this.billCode).then(response => { getWaybillDetail(this.billCode).then(response => {
@ -1182,6 +1186,9 @@ methods: {
this.form.printTypeCheckList=[1,5] this.form.printTypeCheckList=[1,5]
this.form.destinationCountry=this.form.reciever.country; this.form.destinationCountry=this.form.reciever.country;
if(this.form.packType){
this.form.packType=this.form.packType.split(",");
}
}); });
}else{ }else{
@ -1197,7 +1204,7 @@ methods: {
// this.form.billWeight=1.0; // this.form.billWeight=1.0;
// this.form.totalVolume=0.0; // this.form.totalVolume=0.0;
this.form.parcelQty=1; this.form.parcelQty=1;
this.form.packType='2'; this.form.packType=['2'];
this.form.blOverWeight='0'; this.form.blOverWeight='0';
this.form.blGenSubbill=1; this.form.blGenSubbill=1;
this.form.paymentType='1'; this.form.paymentType='1';
@ -1342,10 +1349,30 @@ methods: {
} }
if(this.action=="modify" && this.billCode !=this.form.billCode){ if(this.action=="modify" && this.billCode !=this.form.billCode){
this.$modal.msgError("当前单号"+this.form.billCode+"与编辑单号"+this.billCode+"不一致,不允许提交"); this.$confirm("当前单号"+this.form.billCode+"与修改单号"+this.billCode+"不一致,不允许提交!", '提示', {
return ; confirmButtonText: '确认',
cancelButtonText: '返回',
type: 'warning'
}).then(() => {
this.calcDestSite();
}).catch(() => {
})
}else{
this.realSaveOrderInfo();
} }
}
});
},
realSaveOrderInfo(){
// 调整包装类型为多选
if(this.form.packType){
this.form.packType=this.form.packType.join(",");
}
realSubmitOrder(this.form).then(response => { realSubmitOrder(this.form).then(response => {
this.$modal.msgSuccess("下单成功"); this.$modal.msgSuccess("下单成功");
@ -1354,8 +1381,6 @@ methods: {
// this.$emit("on-changed"); // this.$emit("on-changed");
}); });
}
});
}, },
// 弹出地址簿选择 // 弹出地址簿选择
handleSelectCustomerAddress(addressType){ handleSelectCustomerAddress(addressType){
@ -1423,7 +1448,6 @@ methods: {
if(this.form.reciever.province){ if(this.form.reciever.province){
getDestSite(queryParams).then(response => { getDestSite(queryParams).then(response => {
console.log(response);
this.form.destinationCode = response.data.destCode+''; this.form.destinationCode = response.data.destCode+'';
this.form.dispatchSiteCode= response.data.siteCode; this.form.dispatchSiteCode= response.data.siteCode;
this.form.dispatchSite = response.data.siteName; this.form.dispatchSite = response.data.siteName;
@ -1673,9 +1697,6 @@ methods: {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// let newList = this.form.cargoList.filter(item => item.goodsName !== row.goodsName);
// this.form.cargoList=newList;
console.log(index);
this.form.cargoList.splice(index,1) this.form.cargoList.splice(index,1)
this.handleCalcVolume(row); this.handleCalcVolume(row);
}).catch(() => { }).catch(() => {