From b9e72195af77fd629cf1479d59c59832ca8f4b12 Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Wed, 19 Jun 2024 14:26:41 +0800 Subject: [PATCH] uu --- .../buns-post-edit-templates/bpe-cost-tmp.vue | 9 +- pages/post/openorder.vue | 423 +++++++++--------- 2 files changed, 220 insertions(+), 212 deletions(-) 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 @@