Sfoglia il codice sorgente

fix: 点发货按钮不查询发货信息,防止信息错误

xieyong 1 mese fa
parent
commit
82578ce936
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      src/views/entrust/components/goodsDetail.vue

+ 9 - 0
src/views/entrust/components/goodsDetail.vue

@@ -236,6 +236,13 @@
         ];
       }
     },
+    watch:{
+      visible(newVal, oldVal) {
+        if(!newVal) {
+          this.goodsList = [];
+        }
+      }
+    },
 
     methods: {
       // 根据后端 status 返回对应的展示文案和 el-tag 类型,未匹配时回落为驳回
@@ -276,6 +283,8 @@
           // isReceiptDetail 在 open() 里已经重置,此处只处理 params
         }
 
+        if(this.type === "add") return;
+
         await pleaseEntrustGoodsDetail(params).then(async (res) => {
           this.goodsList = [];
           res.data.forEach((item) => {