Browse Source

fix[litemall-admin]: gitee #I1X232

linlinjava 5 years ago
parent
commit
d4dde95b46
1 changed files with 6 additions and 0 deletions
  1. 6 0
      litemall-admin/src/views/promotion/coupon.vue

+ 6 - 0
litemall-admin/src/views/promotion/coupon.vue

@@ -462,6 +462,12 @@ export default {
     updateData() {
       this.$refs['dataForm'].validate(valid => {
         if (valid) {
+          if (this.dataForm.goodsType === 1) {
+            this.dataForm.goodsValue = this.couponCategoryList.map(item => (item.goodsCategoryId))
+          }
+          if (this.dataForm.goodsType === 2) {
+            this.dataForm.goodsValue = this.couponGoodsList.map(item => (item.goodsId))
+          }
           updateCoupon(this.dataForm)
             .then(() => {
               for (const v of this.list) {