md
This commit is contained in:
parent
b3219a31ca
commit
970b015cf6
@ -107,21 +107,30 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<!-- <el-col :span="12">
|
||||
<div style="display:flex;padding-left: 30px;">
|
||||
|
||||
<el-checkbox-group v-model="form.printTypeCheckList">
|
||||
<el-col :span="18">
|
||||
<el-form-item label="打印选项:" prop="sendSiteName">
|
||||
<el-checkbox-group v-model="printTypeCheckList">
|
||||
<el-checkbox
|
||||
v-for="dict in dict.type.emis_print_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
>
|
||||
<span style="font-size:10px" >{{dict.label}}</span>
|
||||
<span style="font-size:13px" >{{dict.label}}</span>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</el-col> -->
|
||||
</el-form-item>
|
||||
<!-- <div style="display:flex;padding-left: 30px;">
|
||||
<el-checkbox-group v-model="printTypeCheckList">
|
||||
<el-checkbox
|
||||
v-for="dict in dict.type.emis_print_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
>
|
||||
<span style="font-size:13px" >{{dict.label}}</span>
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div> -->
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :xs="{span: 24}" :sm="{span: 12}" :md="{span: 12}" :lg="{span: 6}" :xl="{span: 6}">
|
||||
<el-form-item label="寄件客户" prop="customerCode">
|
||||
@ -367,7 +376,7 @@
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="实际重量" prop="billWeight" label-width="70px">
|
||||
<el-input v-model="form.billWeight" style="text-align: right;min-width: 80px" placeholder="请输入实际重量" >
|
||||
<el-input v-model="form.billWeight" @blur="reCalcSettlementWeight" style="text-align: right;min-width: 80px" placeholder="请输入实际重量" >
|
||||
<span slot="suffix">(kg)</span>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -742,6 +751,7 @@ data() {
|
||||
loading: true,
|
||||
isInit:true,
|
||||
triggerCount:0,
|
||||
printTypeCheckList:['1','2','5'],
|
||||
// 表单参数
|
||||
form: {},
|
||||
timer:null,
|
||||
@ -872,60 +882,40 @@ data() {
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// "billCode": {
|
||||
// handler (newValue, oldValue) {
|
||||
|
||||
// },
|
||||
// immediate:false,
|
||||
// deep: true
|
||||
// },
|
||||
// "form.transLine":{
|
||||
// handler (newValue, oldValue) {
|
||||
// this.calcDestSite();
|
||||
// },
|
||||
// immediate:false,
|
||||
// deep: true
|
||||
// },
|
||||
"form.reciever.province":{
|
||||
handler (newValue, oldValue) {
|
||||
this.calcDestSite();
|
||||
},
|
||||
immediate:false,
|
||||
deep: true
|
||||
},
|
||||
"form.totalVolume":{
|
||||
handler (newValue, oldValue) {
|
||||
this.reCalcVolumeWeight();
|
||||
},
|
||||
immediate:false,
|
||||
deep: true
|
||||
},
|
||||
"form.volumeWeight":{
|
||||
handler (newValue, oldValue) {
|
||||
this.reCalcSettlementWeight();
|
||||
},
|
||||
immediate:false,
|
||||
deep: true
|
||||
},
|
||||
"form.billWeight":{
|
||||
handler (newValue, oldValue) {
|
||||
this.reCalcSettlementWeight();
|
||||
},
|
||||
immediate:false,
|
||||
deep: true
|
||||
},
|
||||
"form.calcFeeType":{
|
||||
handler (newValue, oldValue) {
|
||||
this.calcBillFee();
|
||||
},
|
||||
immediate:false,
|
||||
deep: true
|
||||
},
|
||||
"form.settlementWeight":{
|
||||
handler (newValue, oldValue) {
|
||||
this.calcBillFee();
|
||||
},
|
||||
immediate:false,
|
||||
deep: true
|
||||
},
|
||||
|
||||
@ -944,9 +934,12 @@ methods: {
|
||||
},
|
||||
onFeeItemChange(item){
|
||||
this.$refs.popoverFeeRef.doClose();
|
||||
let newItem=Object.assign({},item)
|
||||
this.form.feeItems.push(newItem);
|
||||
// console.log(item);
|
||||
if(item!=null){
|
||||
let newItem=Object.assign({},item)
|
||||
this.form.feeItems.push(newItem);
|
||||
this.handleCalcFeeItem();
|
||||
}
|
||||
|
||||
},
|
||||
deleteFeeItem(row){
|
||||
if(row.blAutoGen==1){
|
||||
@ -1232,8 +1225,6 @@ methods: {
|
||||
}
|
||||
|
||||
let totalVolume=0.0;
|
||||
|
||||
// console.log(row);
|
||||
if(row!=null){
|
||||
let volume=parseFloat(row.length)*parseFloat(row.width)*parseFloat(row.height);
|
||||
row.volume=parseFloat((volume/1000000).toFixed(5));
|
||||
@ -1259,19 +1250,6 @@ methods: {
|
||||
});
|
||||
this.form.freight = totalFee;
|
||||
},
|
||||
// 计算体积
|
||||
calcVolume(){
|
||||
// 初始化不计算
|
||||
if(this.isInit){
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.form.length && this.form.width && this.form.height){
|
||||
let totalVolume=parseFloat(this.form.length)*parseFloat(this.form.width)*parseFloat(this.form.height);
|
||||
this.form.totalVolume = totalVolume/1000000;
|
||||
// this.reCalcVolumeWeight();
|
||||
}
|
||||
},
|
||||
// 计算体积重量
|
||||
reCalcVolumeWeight(){
|
||||
// 初始化不计算
|
||||
@ -1310,9 +1288,8 @@ methods: {
|
||||
volumeWeight: this.form.volumeWeight,
|
||||
billWeight: this.form.billWeight,
|
||||
}
|
||||
// console.log(postData);
|
||||
|
||||
calcSetteldWeight(postData).then(response => {
|
||||
console.log(response);
|
||||
this.form.settlementWeight = response.data.settlementWeight;
|
||||
this.form.feeWeight = this.form.settlementWeight ;
|
||||
});
|
||||
@ -1327,7 +1304,6 @@ methods: {
|
||||
}
|
||||
|
||||
if(this.form.settlementWeight
|
||||
&& this.form.totalVolume
|
||||
&& this.form.productType
|
||||
&& this.form.sendSiteCode
|
||||
&& this.form.dispatchUnderlingSiteCode
|
||||
@ -1339,17 +1315,27 @@ methods: {
|
||||
custNo: this.form.custNo,
|
||||
calcFeeType: this.form.calcFeeType,
|
||||
settlementWeight: this.form.settlementWeight,
|
||||
totalVolume: this.form.totalVolume,
|
||||
sendSiteCode: this.form.sendSiteCode,
|
||||
dispatchUnderlingSiteCode: this.form.dispatchUnderlingSiteCode,
|
||||
}
|
||||
|
||||
console.log(postData);
|
||||
calcWaybillFee(postData).then(response => {
|
||||
console.log(response);
|
||||
this.form.freight = response.data.totalFee;
|
||||
this.form.feeItems = response.data.feeList ;
|
||||
let newFeeList=response.data.feeList;
|
||||
let newFeeMap = new Map();
|
||||
newFeeList.forEach(item=>{
|
||||
newFeeMap[item.feeCode]=item;
|
||||
});
|
||||
|
||||
|
||||
let custFeeList = [];
|
||||
this.form.feeItems.forEach(item=>{
|
||||
if(item.blAutoGen!='1' && !(item.feeCode in newFeeMap)){
|
||||
custFeeList.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
this.form.feeItems = newFeeList.concat(custFeeList);
|
||||
this.handleCalcFeeItem();
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -1362,7 +1348,7 @@ methods: {
|
||||
this.form.dispatchSite= item.siteName;
|
||||
},
|
||||
onGoodsChange(goodsList,goodsInfo){
|
||||
this.form.goodsInfo = goodsInfo;
|
||||
|
||||
if(goodsList!=null && goodsList.length>0) {
|
||||
// 旧map
|
||||
let nameOldMap = new Map();
|
||||
@ -1378,16 +1364,6 @@ methods: {
|
||||
nameNewMap[item.goodsName]=item;
|
||||
});
|
||||
|
||||
let newList=[];
|
||||
// 删除没有的,添加有的
|
||||
if(this.form.cargoList!=null&& this.form.cargoList.length>0){
|
||||
this.form.cargoList.forEach(item=>{
|
||||
if(item.goodsName in nameNewMap){
|
||||
newList.push(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 添加没有的
|
||||
goodsList.forEach(item=>{
|
||||
if(!(item.goodsName in nameOldMap)){
|
||||
@ -1400,16 +1376,22 @@ methods: {
|
||||
"height": 0,
|
||||
"volume": 0,
|
||||
}
|
||||
newList.push(cargo);
|
||||
this.form.cargoList.push(cargo);
|
||||
}
|
||||
});
|
||||
|
||||
this.form.cargoList=newList;
|
||||
let goodsInfo='';
|
||||
|
||||
if(this.form.cargoList!=null&& this.form.cargoList.length>0){
|
||||
this.form.cargoList.forEach(item=>{
|
||||
goodsInfo=goodsInfo+item.goodsName+",";
|
||||
});
|
||||
}
|
||||
|
||||
this.form.goodsInfo = goodsInfo;
|
||||
|
||||
this.handleCalcQty();
|
||||
this.handleCalcVolume();
|
||||
}else{
|
||||
this.form.cargoList = [];
|
||||
}
|
||||
},
|
||||
showLocalTime(){
|
||||
@ -1457,16 +1439,6 @@ methods: {
|
||||
font-size: 12px!important;
|
||||
}
|
||||
|
||||
// .el-form-item{
|
||||
// margin-bottom: 8px !important;
|
||||
// }
|
||||
|
||||
.form-row-group-panel{
|
||||
// margin-right: 5px;
|
||||
// padding: 8px;
|
||||
// border-right: 1px solid #ededed;
|
||||
}
|
||||
|
||||
|
||||
.platform-auto-complete {
|
||||
.el-autocomplete-suggestion__wrap {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user