diff --git a/components/buns-post-edit-templates/bpe-cost-tmp.vue b/components/buns-post-edit-templates/bpe-cost-tmp.vue index d802786..988353a 100644 --- a/components/buns-post-edit-templates/bpe-cost-tmp.vue +++ b/components/buns-post-edit-templates/bpe-cost-tmp.vue @@ -161,11 +161,14 @@ }, watch: { searchParam: { - handler(newVal){ + handler(newVal, oldVal){ let vals = Object.values(newVal) - // 所有关联入参都有值再 执行自动计算 + // 所有关联入参都有值再 执行自动计算,数据未变化不做计算 if(vals.length == vals.filter(v => !!v).length) { - this.calcWaybillFee(newVal); + if(JSON.stringify(newVal) != JSON.stringify(oldVal || {})) { + console.log("====watch cost calcWaybillFee===") + this.calcWaybillFee(newVal); + } } }, deep: true, diff --git a/pages/post/openorder.vue b/pages/post/openorder.vue index 603bbca..d4d8bcd 100644 --- a/pages/post/openorder.vue +++ b/pages/post/openorder.vue @@ -1,6 +1,6 @@