mayf
2024-09-04 8e219beed40e701537eac9ea8b5817b884d947ec
优惠券修改
已修改8个文件
49 ■■■■■ 文件已修改
pages/marketing/coupon/activity/_id.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/coupon/member/_id.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/coupon/user/_id.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/coupon/user/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/point-mall/coupon/_id.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/point-mall/coupon/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/point-mall/goods.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/coupon-form.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/coupon/activity/_id.vue
@@ -35,9 +35,11 @@
          type: 'row',
          items: [
            ...couponForm(),
            { label: '总数:', id: 'couponAmount', type: 'input' },
            { label: '发放数量:', id: 'couponAmount', type: 'input' },
            { label: '每人限领:', id: 'getLimit', type: 'input' },
            { label: '已领取:', id: 'getNum', type: 'input' },
            { label: '剩余:', id: 'unGetNum', type: 'input' },
            { label: '领取渠道:', id: 'getTypeName', type: 'input' },
            {
              label: '领取时间:',
              id: 'getStartDate',
@@ -55,7 +57,7 @@
      ],
      recordTableConfig: {
        ...recordTableConfig(this.$route.params.id),
        columns: [...couponRecordColumn()],
        columns: [...couponRecordColumn('领取时间')],
      },
    }
  },
pages/marketing/coupon/member/_id.vue
@@ -33,7 +33,7 @@
          type: 'row',
          items: [
            ...couponForm(),
            { label: '已发放总数:', id: 'todo' },
            { label: '已发放总数:', id: 'getNum' },
            {
              label: '有效期:',
              id: 'usageStartDate',
@@ -49,7 +49,7 @@
      ],
      recordTableConfig: {
        ...recordTableConfig(this.$route.params.id),
        columns: [...couponRecordColumn()],
        columns: [...couponRecordColumn('发放时间')],
      },
    }
  },
pages/marketing/coupon/user/_id.vue
@@ -34,12 +34,17 @@
          items: [
            ...couponForm(),
            {
              label: '发放时间:',
              id: 'createTime',
              type: 'input',
            },
            {
              label: '有效期:',
              id: 'usageStartDate',
              id: 'effectiveTime',
              inputFormat: (row) => {
                return row.usageStartDate
                  ? `${row.usageStartDate} ~ ${row.usageEndDate || ''}`
                  : ''
                  : `发放后${row.usageTimeNum}${row.usageTimeTypeName || ''}`
              },
              span: 24,
            },
@@ -48,7 +53,7 @@
      ],
      recordTableConfig: {
        ...recordTableConfig(this.$route.params.id),
        columns: [...couponRecordColumn()],
        columns: [...couponRecordColumn('发放时间')],
      },
    }
  },
pages/marketing/coupon/user/index.vue
@@ -33,13 +33,13 @@
        },
        columns: [
          ...couponColumn(),
          { label: '发放时间', prop: 'usageStartDate', minWidth: 180 },
          { label: '发放时间', prop: 'createTime', minWidth: 180 },
          {
            label: '有效期',
            formatter: (row) =>
              row.usageStartDate
                ? `${row.usageStartDate} ~ ${row.usageEndDate || ''}`
                : '',
                : `发放后${row.usageTimeNum}${row.usageTimeTypeName || ''}`,
            minWidth: 400,
          },
          { label: '状态', prop: 'statusName', minWidth: 120 },
@@ -78,7 +78,7 @@
            rules: { required: true, message: '请选择领取用户' },
            inputFormat: (row) => {
              if ('customerList' in row) {
                return row.customerList
                return row.customerList.filter((i) => i)
              }
            },
            outputFormat: (val) => {
pages/marketing/point-mall/coupon/_id.vue
@@ -47,13 +47,13 @@
      ],
      recordTableConfig: {
        ...recordTableConfig(this.$route.params.id),
        columns: [...couponRecordColumn()],
        columns: [...couponRecordColumn('兑换时间')],
      },
    }
  },
  head() {
    return {
      title: '会员优惠券详情',
      title: '积分优惠券详情',
    }
  },
}
pages/marketing/point-mall/coupon/index.vue
@@ -1,5 +1,5 @@
<template>
  <el-bus-crud v-bind="tableConfig" />
  <el-bus-crud ref="crud" v-bind="tableConfig" />
</template>
<script>
@@ -158,6 +158,7 @@
                )
                if (code === 0) {
                  this.$message.success('上架成功')
                  this.$refs.crud.clearSelection()
                }
              } catch (e) {
                return false
@@ -184,6 +185,7 @@
                )
                if (code === 0) {
                  this.$message.success('下架成功')
                  this.$refs.crud.clearSelection()
                }
              } catch (e) {
                return false
pages/marketing/point-mall/goods.vue
@@ -177,6 +177,7 @@
                )
                if (code === 0) {
                  this.$message.success('上架成功')
                  this.$refs.crud.clearSelection()
                }
              } catch (e) {
                return false
@@ -200,6 +201,7 @@
                )
                if (code === 0) {
                  this.$message.success('下架成功')
                  this.$refs.crud.clearSelection()
                }
              } catch (e) {
                return false
utils/coupon-form.js
@@ -144,18 +144,14 @@
}
// 优惠券领取/发放记录
export const couponRecordColumn = () => {
export const couponRecordColumn = (timeName) => {
  return [
    { label: '序号', type: 'index' },
    { label: '店铺名称', prop: 'customerName' },
    { label: '优惠券类型', prop: 'couponDiscountTypeName' },
    {
      label: '使用条件',
      formatter: (row) => `满${row.minOrderAmount}`,
    },
    { label: '优惠券面值', prop: 'couponDiscountValue' },
    { label: '联系方式', prop: 'tel' },
    { label: timeName, prop: 'createTime' },
    { label: '状态', prop: 'statusName' },
    { label: '使用时间', prop: 'index' },
    { label: '使用时间', prop: 'usedTime' },
    { label: '订单号', prop: 'orderNo' },
  ]
}