cloudroam
2024-10-28 491df5ea13a34c46cab555469fc310fa985c20e8
add:钱包
已添加2个文件
240 ■■■■■ 文件已修改
pages/wallet/supplier-finance.vue 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/wallet/withdraw-audit.vue 152 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/wallet/supplier-finance.vue
对比新文件
@@ -0,0 +1,88 @@
<template>
  <div>
    <el-bus-crud ref="crud" v-bind="tableConfig" />
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableConfig: {
        url: 'flower/v2/wallet-bill-record/list',
        hasNew: false,
        hasEdit: false,
        hasDelete: false,
        hasView: false,
        hasExport: true,
        exportUrl: 'flower/v2/wallet-bill-record/export',
        exportText: '导出',
        hasOperation:false,
        columns: [
          {label: '供应商信息',
            minWidth: 120,
            formatter: (row) => `${row.supplierName || ''}:${row.supplierId || ''}`},
          {label: '变动类型', prop: 'typeName', minWidth: 100},
          {label: '原金额', prop: 'originalAmount', minWidth: 100},
          {label: '变动金额', prop: 'changeAmount', minWidth: 120},
          {label: '现余额', prop: 'balance', minWidth: 120},
          {label: '提交时间', prop: 'createTime', minWidth: 120},
          {label: '审核时间', prop: 'approveTime', minWidth: 120},
          {label: '备注', prop: 'remark', minWidth: 120},
        ],
        searchFormAttrs: {
          labelWidth: 'auto',
        },
        searchForm: [
          {
            type: 'row',
            items: [
              {label: '供应商ID:', id: 'supplierId', type: 'input'},
              {label: '供应商名称:', id: 'supplierName', type: 'input'},
              {
                label: '提交时间',
                id: 'createStartDate',
                component: 'el-bus-date-range',
                commonFormat: true,
                commonFormatProps: ['createStartDate', 'endEndDate'],
                customClass: 'in-bus-form',
              },
              {
                label: '审核时间',
                id: 'approveStartDate',
                component: 'el-bus-date-range',
                commonFormat: true,
                commonFormatProps: ['approveStartDate', 'approveEndDate'],
                customClass: 'in-bus-form',
              },
              {
                label: '变动类型',
                id: 'type',
                type: 'bus-select-dict',
                el: {
                  code: 'BILL_CHANGE_TYPE',
                  clearable: true,
                  style: 'width:100%',
                },
              },
              {label: '订单号:', id: 'orderNo', type: 'input'},
            ],
          },
        ],
      },
    }
  },
  head() {
    return {
      title: '供应商财务',
    }
  },
}
</script>
pages/wallet/withdraw-audit.vue
对比新文件
@@ -0,0 +1,152 @@
<template>
  <div>
  <el-bus-crud ref="crud" v-bind="tableConfig" />
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableConfig: {
        url: 'flower/v2/withdraw-record/list',
        hasNew: false,
        hasEdit: false,
        hasDelete: false,
        hasView: false,
        columns: [
          {label: '供应商信息',
            minWidth: 120,
            formatter: (row) => `${row.supplierName || ''}:${row.supplierId || ''}`},
          {label: '申请时间', prop: 'createTime', minWidth: 100},
          {label: '提现类型', prop: 'withdrawTypeStr', minWidth: 100},
          {label: '提现金额(元)', prop: 'amount', minWidth: 120},
          {label: '提现状态', prop: 'withdrawStateStr', minWidth: 120},
          {label: '提现方式', prop: 'methodStr', minWidth: 120},
          {label: '审核状态', prop: 'approveStateStr', minWidth: 120},
          {label: '审核时间', prop: 'approveTime', minWidth: 120},
          {label: '拒绝原因', prop: 'rejectReason', minWidth: 120},
        ],
        searchFormAttrs: {
          labelWidth: 'auto',
        },
        searchForm: [
          {
            type: 'row',
            items: [
              {
                label: '审核状态:',
                id: 'approveState',
                type: 'bus-radio',
                el: {
                  hasAll: true,
                  childType: 'el-radio-button',
                  code: 'WALLET_APPROVE_STATE',
                },
                default: '',
                span: 24,
                searchImmediately: true,
              },
              {label: '供应商ID:', id: 'supplierId', type: 'input'},
              {label: '供应商名称:', id: 'supplierName', type: 'input'},
              {
                label: '提交时间',
                id: 'createStartDate',
                component: 'el-bus-date-range',
                commonFormat: true,
                commonFormatProps: ['createStartDate', 'endEndDate'],
                customClass: 'in-bus-form',
              },
              {
                label: '审核时间',
                id: 'approveStartDate',
                component: 'el-bus-date-range',
                commonFormat: true,
                commonFormatProps: ['approveStartDate', 'approveEndDate'],
                customClass: 'in-bus-form',
              },
            ],
          },
        ],
        extraDialogs: [
          {
            title: '提现拒绝',
            form: [
              {
                label: '原因:',
                id: 'rejectReason',
                type: 'input',
                el: {
                  type: 'textarea',
                  rows: 6,
                },
                rules: {
                  required: true,
                  message: '请输入原因',
                  trigger: 'blur',
                },
              },
            ],
            atConfirm: async (val) => {
              const { code } = await this.$elBusHttp.request(
                'flower/v2/withdraw-record/refuse',
                {
                  method: 'post',
                  data: val,
                }
              )
              if (code === 0) {
                this.$message.success('拒绝操作成功')
              }
            },
          },
        ],
        extraButtons: [
          {
            text: '通过',
            show: (row) => row.approveState === 'WAITING',
            atClick: async (row) => {
              try {
                await this.$elBusUtil.confirm('确定要通过吗?')
                const {code} = await this.$elBusHttp.request(
                  'flower/v2/withdraw-record/pass',
                  {
                    method: 'post',
                    data: {
                      id: row.id,
                    },
                  }
                )
                if (code === 0) {
                  this.$message.success('已通过')
                }
              } catch (e) {
                return false
              }
            },
          },
          {
            text: '拒绝',
            show: (row) => row.approveState === 'WAITING',
            atClick: (row) => {
              this.$refs.crud.$refs.extraDialog[0].show(row)
              return false
            },
          },
        ],
      },
    }
  },
  head() {
    return {
      title: '供应商提现审核',
    }
  },
}
</script>