分类表格文字修改
积分优惠券限制库存为0不能发布
删除用户优惠券选择用户弹窗中的新增按钮
优惠券使用条件和面值校验问题
已修改4个文件
36 ■■■■ 文件已修改
components/coupon/select-shop-user.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/goods/category-list.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/point-mall/coupon/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/coupon-form.js 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/coupon/select-shop-user.vue
@@ -66,6 +66,7 @@
      tableConfig: {
        url: 'flower/api/customer/page',
        saveQuery: false,
        hasNew: false,
        hasEdit: false,
        hasDelete: false,
        hasView: false,
pages/goods/category-list.vue
@@ -83,7 +83,7 @@
            ),
          },
          { label: '排序', prop: 'sortBy' },
          { label: '下级数量', formatter: (row) => row.childrenCount },
          { label: '品种数量', formatter: (row) => row.childrenCount },
          {
            label: '是否显示',
            formatter: (row) => (
pages/marketing/point-mall/coupon/index.vue
@@ -101,7 +101,8 @@
          {
            text: '上架',
            show: (row) =>
              row.status === 'inactive' || row.status === 'expired',
              (row.status === 'inactive' || row.status === 'expired') &&
              row.couponAmount > 0,
            atClick: async (row) => {
              try {
                await this.$elBusUtil.confirm('确定要上架吗?')
utils/coupon-form.js
@@ -28,6 +28,8 @@
            obj.elBusForm
              .getComponentById('minOrderAmount')
              .$parent.clearValidate()
          } else {
            updateForm({ minOrderAmount: undefined })
          }
        },
      },
@@ -55,12 +57,12 @@
      label: '优惠券使用条件:',
      id: 'minOrderAmount',
      type: 'input-number',
      el: {
        min: 0,
      el: (row) => ({
        min: row.couponDiscountType === 'discount' ? 0.01 : 0,
        max: 99999999,
        precision: 2,
        controls: false,
      },
      }),
      prefix: '满',
      unit: '元',
      rules: {
@@ -81,10 +83,24 @@
        controls: false,
      },
      unit: '元',
      rules: {
        required: true,
        message: '请输入优惠券面值',
        trigger: 'blur',
      rules: (row) => {
        return [
          {
            required: true,
            message: '请输入优惠券面值',
            trigger: 'blur',
          },
          {
            validator: (rule, value, callback) => {
              if (value && row.minOrderAmount && value > row.minOrderAmount) {
                callback(new Error('优惠券面值不能大于优惠券使用条件'))
              } else {
                callback()
              }
            },
            trigger: 'blur',
          },
        ]
      },
    },
  ]