zhengjinyi 1 ano atrás
pai
commit
43ed2a3291
1 arquivos alterados com 7 adições e 4 exclusões
  1. 7 4
      src/views/member/coupon/edit.vue

+ 7 - 4
src/views/member/coupon/edit.vue

@@ -286,9 +286,11 @@ export default {
       if (data.coupons.length > 0) {
         this.delFlag = true
         this.form.formList = data.coupons.map((el) => {
-          el.shopData = []
           if (el.shop) {
+            el.shopData = []
             el.shopData.push(el.shop)
+          } else {
+            el.shopData = []
           }
           return el
         })
@@ -314,10 +316,11 @@ export default {
       formItem.shopId = ''
       formItem.shopData = []
       this.$nextTick(() => {
-        console.log('index', formItem)
-        this.form.formList[index].shopId
-        this.form.formList[index].shopData
+        this.form.formList[index].shopId = ''
+        this.form.formList[index].shopData = []
       })
+      this.$forceUpdate()
+      console.log('shopData', this.form.formList)
     },
     handleShopConfirm(data) {
       // 确认选择供应商