mayf
2024-09-06 b380df2227b605408d746849ee6cfaf82471fed5
优惠券领取记录开发
已添加1个文件
128 ■■■■■ 文件已修改
pages/marketing/coupon/receive-record.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/marketing/coupon/receive-record.vue
对比新文件
@@ -0,0 +1,128 @@
<template>
  <el-bus-crud v-bind="tableConfig" />
</template>
<script>
export default {
  data() {
    return {
      tableConfig: {
        url: 'flower/v2/coupon-record/page',
        hasNew: false,
        hasOperation: false,
        columns: [
          { label: '序号', type: 'index', minWidth: 60, fixed: 'left' },
          {
            label: '店铺名称',
            prop: 'customerName',
            minWidth: 150,
            fixed: 'left',
          },
          { label: '联系方式', prop: 'tel', minWidth: 120 },
          { label: '优惠券名称', prop: 'couponName', minWidth: 150 },
          {
            label: '优惠券分类',
            prop: 'categoryName',
            minWidth: 120,
          },
          {
            label: '优惠券类型',
            prop: 'couponDiscountTypeName',
            minWidth: 120,
          },
          { label: '状态', prop: 'statusName', minWidth: 120 },
          { label: '领取时间', prop: 'createTime', minWidth: 180 },
          {
            label: '有效期',
            formatter: (row) =>
              row.effectiveStart
                ? `${row.effectiveStart} ~ ${row.effectiveEnd || ''}`
                : '',
            minWidth: 320,
          },
          { label: '面值', prop: 'couponDiscountValue', minWidth: 120 },
          {
            label: '使用条件',
            formatter: (row) => `满${row.minOrderAmount}`,
            minWidth: 150,
          },
          { label: '领取渠道', prop: 'getTypeName', minWidth: 150 },
          { label: '使用的订单号', prop: 'orderNo', minWidth: 150 },
        ],
        searchForm: [
          {
            type: 'row',
            items: [
              {
                label: '优惠券分类',
                id: 'category',
                type: 'bus-select-dict',
                el: {
                  code: 'COUPON_CATEGORY',
                  style: 'width:100%',
                  clearable: true,
                },
              },
              {
                label: '优惠券类型',
                id: 'couponDiscountType',
                type: 'bus-select-dict',
                el: {
                  code: 'COUPON_TYPE',
                  style: 'width:100%',
                  clearable: true,
                },
              },
              {
                label: '优惠券名称',
                id: 'name',
                type: 'input',
              },
              {
                label: '订单号',
                id: 'orderNo',
                type: 'input',
              },
              {
                label: '用户id/店铺名称',
                id: 'keyword',
                type: 'input',
              },
              {
                label: '联系方式',
                id: 'tel',
                type: 'input',
              },
              {
                label: '领取渠道',
                id: 'getType',
                type: 'bus-select-dict',
                el: {
                  code: 'COUPON_GET_TYPE',
                  style: 'width:100%',
                  clearable: true,
                },
              },
              {
                label: '状态',
                id: 'status',
                type: 'bus-select-dict',
                el: {
                  code: 'COUPON_USED_STATUS',
                  style: 'width:100%',
                  clearable: true,
                },
              },
            ],
          },
        ],
      },
    }
  },
  head() {
    return {
      title: '优惠券领取记录',
    }
  },
}
</script>