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