diff --git a/src/views/emis/emisWaybill/waybillGot.vue b/src/views/emis/emisWaybill/waybillGot.vue index b13b214c..21bdee53 100644 --- a/src/views/emis/emisWaybill/waybillGot.vue +++ b/src/views/emis/emisWaybill/waybillGot.vue @@ -362,9 +362,9 @@ - + (kg) - + @@ -454,7 +454,7 @@
- + (m³)
@@ -1137,6 +1137,24 @@ computed: { } }, watch: { + // 监听实际重量 + 'form.billWeight': { + handler(newVal, oldVal) { + if(oldVal!=null){ + this.handleCalcSettlementWeightDebounce(); + } + }, + deep: true + }, + //监听总体积 + 'form.totalVolume': { + handler(newVal, oldVal) { + if(oldVal!=null){ + this.handleCalcVolumeWeightDebounce(); + } + }, + deep: true + }, }, created() { @@ -2165,6 +2183,11 @@ methods: { } }, + //防抖 计算体积重量 + handleCalcVolumeWeightDebounce:debounce(250,function(){ + this.handleCalcVolumeWeight(); + }), + // 计算结算重量 handleCalcSettlementWeight(){ @@ -2193,6 +2216,10 @@ methods: { } }, + // 防抖 计算结算重量 + handleCalcSettlementWeightDebounce:debounce(250,function(){ + this.handleCalcSettlementWeight(); + }), calcBillFee(){ diff --git a/src/views/emis/emisWaybill/waybillModify.vue b/src/views/emis/emisWaybill/waybillModify.vue index 033c6b04..0289ee11 100644 --- a/src/views/emis/emisWaybill/waybillModify.vue +++ b/src/views/emis/emisWaybill/waybillModify.vue @@ -364,7 +364,7 @@
- + (kg) @@ -456,7 +456,7 @@
- + (m³)
@@ -1168,7 +1168,25 @@ computed: { } }, watch: { - + + // 监听实际重量 + 'form.billWeight': { + handler(newVal, oldVal) { + if(oldVal!=null){ + this.handleCalcSettlementWeightDebounce(); + } + }, + deep: true + }, + //监听总体积 + 'form.totalVolume': { + handler(newVal, oldVal) { + if(oldVal!=null){ + this.handleCalcVolumeWeightDebounce(); + } + }, + deep: true + }, }, created() { @@ -2195,6 +2213,11 @@ methods: { } }, + // 防抖 计算体积重量 + handleCalcVolumeWeightDebounce:debounce(250,function(){ + this.handleCalcVolumeWeight(); + }), + // 计算结算重量 handleCalcSettlementWeight(){ @@ -2224,6 +2247,11 @@ methods: { } }, + // 防抖 计算结算重量 + handleCalcSettlementWeightDebounce:debounce(250,function(){ + this.handleCalcSettlementWeight(); + }), + calcBillFee(){ diff --git a/src/views/emis/emisWaybill/waybillRecord.vue b/src/views/emis/emisWaybill/waybillRecord.vue index eaba0a0b..3f274843 100644 --- a/src/views/emis/emisWaybill/waybillRecord.vue +++ b/src/views/emis/emisWaybill/waybillRecord.vue @@ -365,7 +365,7 @@
- + (kg) @@ -457,7 +457,7 @@
- + (m³)
@@ -1174,6 +1174,20 @@ computed: { }, watch: { + // 监听实际重量 + 'form.billWeight': { + handler(newVal, oldVal) { + this.handleCalcSettlementWeightDebounce(); + }, + deep: true + }, + //监听总体积 + 'form.totalVolume': { + handler(newVal, oldVal) { + this.handleCalcVolumeWeightDebounce(); + }, + deep: true + }, }, created() { @@ -2187,6 +2201,10 @@ methods: { } }, + //防抖 计算体积重量 + handleCalcVolumeWeightDebounce:debounce(250,function(){ + this.handleCalcVolumeWeight(); + }), // 计算结算重量 handleCalcSettlementWeight(){ @@ -2215,6 +2233,11 @@ methods: { } }, + // 防抖 计算结算重量 + handleCalcSettlementWeightDebounce:debounce(250,function(){ + this.handleCalcSettlementWeight(); + }), + calcBillFee(){