cloudroam
2024-12-31 2eeea7a6431f0b5fb25b338e2512c48deab8652e
pages/marketing/member-level.vue
@@ -15,9 +15,36 @@
        columns: [
          { label: '序号', type: 'index' },
          { label: '等级名称', prop: 'name' },
          { label: '成长值', prop: 'startPoint' },
          {
            label: '成长值',
            formatter: (row) =>
              `${row.startPoint ?? ''} ~ ${row.endPoint ?? ''}`,
          },
          { label: '等级折扣', prop: 'discountTypeStr' },
          { label: '操作人', prop: 'createName' },
          {
            label: '背景图片',
            formatter: (row) =>
              row.background ? (
                <el-bus-image
                  src={row.background}
                  lazy={true}
                  style="width:50px;height:50px"
                ></el-bus-image>
              ) : null,
          },
          {
            label: '样式图片',
            formatter: (row) =>
              row.pictures ? (
                <el-bus-image
                  src={row.pictures}
                  lazy={true}
                  style="width:50px;height:50px"
                ></el-bus-image>
              ) : null,
          },
          { label: '成长值获取规则', prop: 'growthValueDesc' },
        ],
        beforeOpen: (row, isNew) => {
          if (!isNew) {
@@ -49,9 +76,9 @@
            el: {
              unit: '',
              separator: '<= 成长值范围 <',
              inputAttrs: {
                controls: false,
              },
              controls: false,
              min: 0,
              max: 99999999,
            },
            commonFormat: true,
            commonFormatProps: ['startPoint', 'endPoint'],
@@ -103,9 +130,10 @@
            el: {
              precision: 2,
              min: 0,
              max: 99999999,
              controls: false,
            },
            unit: '元',
            unit: '元/扎',
            rules: {
              required: true,
              message: '请输入会员优惠',
@@ -129,6 +157,7 @@
            el: {
              precision: 0,
              min: 0,
              max: 99999999,
              controls: false,
            },
            unit: '成长值',
@@ -138,6 +167,56 @@
              trigger: 'blur',
            },
          },
          {
            label: '背景图片:',
            id: 'background',
            type: 'bus-upload',
            el: {
              listType: 'picture-card',
              limit: 1,
              limitSize: 2,
              tipText: '大小不超过2M',
              valueType: 'string',
            },
            forceDisabled: true,
            rules: {
              required: true,
              message: '请上传背景图片',
              trigger: 'blur',
            },
          },
          {
            label: '样式图片:',
            id: 'pictures',
            type: 'bus-upload',
            el: {
              listType: 'picture-card',
              limit: 1,
              limitSize: 2,
              tipText: '大小不超过2M',
              valueType: 'string',
            },
            forceDisabled: true,
            rules: {
              required: true,
              message: '请上传样式图片',
              trigger: 'blur',
            },
          },
          {
            label: '会员成长值获取规则:',
            id: 'growthValueDesc',
            type: 'input',
            el: {
              type: 'textarea',
              rows: 6,
            },
            rules: {
              required: true,
              message: '请输入会员成长值获取规则',
              trigger: 'blur',
            },
          },
        ],
      },
    }