zhengjinyi 1 年之前
父节点
当前提交
43ed2a3291
共有 1 个文件被更改,包括 7 次插入4 次删除
  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) {
       if (data.coupons.length > 0) {
         this.delFlag = true
         this.delFlag = true
         this.form.formList = data.coupons.map((el) => {
         this.form.formList = data.coupons.map((el) => {
-          el.shopData = []
           if (el.shop) {
           if (el.shop) {
+            el.shopData = []
             el.shopData.push(el.shop)
             el.shopData.push(el.shop)
+          } else {
+            el.shopData = []
           }
           }
           return el
           return el
         })
         })
@@ -314,10 +316,11 @@ export default {
       formItem.shopId = ''
       formItem.shopId = ''
       formItem.shopData = []
       formItem.shopData = []
       this.$nextTick(() => {
       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) {
     handleShopConfirm(data) {
       // 确认选择供应商
       // 确认选择供应商