mayf
2024-09-20 4b817609eef42dbf9246248b68fbe1e3a91e4fa1
pages/marketing/member-level.vue
@@ -15,9 +15,35 @@
        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,
          },
        ],
        beforeOpen: (row, isNew) => {
          if (!isNew) {
@@ -49,9 +75,9 @@
            el: {
              unit: '',
              separator: '<= 成长值范围 <',
              inputAttrs: {
                controls: false,
              },
              controls: false,
              min: 0,
              max: 99999999,
            },
            commonFormat: true,
            commonFormatProps: ['startPoint', 'endPoint'],
@@ -103,9 +129,10 @@
            el: {
              precision: 2,
              min: 0,
              max: 99999999,
              controls: false,
            },
            unit: '元',
            unit: '元/扎',
            rules: {
              required: true,
              message: '请输入会员优惠',
@@ -129,6 +156,7 @@
            el: {
              precision: 0,
              min: 0,
              max: 99999999,
              controls: false,
            },
            unit: '成长值',
@@ -138,6 +166,42 @@
              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',
            },
          },
        ],
      },
    }