大宝管理后台代码
ne1
zzzz
2024-04-07 69ff731fbacf2f2ae16f98a355506bfeb01dd567
src/views/allotment/expand.vue
@@ -11,12 +11,13 @@
            </a-col>
            <a-col :md="12" :xxl="7" :sm="24">
              <a-form-item label="类型选择">
                <div style="display:flex;">
                <div style="display: flex">
                  <a-select
                    v-model="queryParam.appendType"
                    style="width: 140px"
                    placeholder="类型"
                    :default-value="{ key: '1' }">
                    :default-value="{ key: '1' }"
                  >
                    <a-select-option :value="1">扩大配资</a-select-option>
                    <a-select-option :value="2">追加保证金</a-select-option>
                    <a-select-option :value="3">续期</a-select-option>
@@ -24,9 +25,10 @@
                  </a-select>
                  <a-select
                    v-model="queryParam.status"
                    style="width: 140px;margin-left: 10px;"
                    style="width: 140px; margin-left: 10px"
                    placeholder="类型"
                    :default-value="{ key: '0' }">
                    :default-value="{ key: '0' }"
                  >
                    <a-select-option :value="0">申请列表</a-select-option>
                    <a-select-option :value="1">记录列表</a-select-option>
                  </a-select>
@@ -37,19 +39,14 @@
              <a-col :md="24" :xxl="6" :sm="24">
                <a-form-item>
                  <span class="table-page-search-submitButtons" style="white-space:wrap">
                    <a-button
                      type="primary"
                      icon="search"
                      @click="queryParam.pageNum = 1, getlist()">查询
                    <a-button type="primary" icon="search" @click=";(queryParam.pageNum = 1), getlist()"
                      >查询
                    </a-button>
                    <a-button @click="getqueryParam" style="margin-left: 8px" icon="redo">
                      重置</a-button>
                    <a-button @click="getqueryParam" style="margin-left: 8px" icon="redo"> 重置</a-button>
                  </span>
                </a-form-item>
              </a-col>
            </template>
          </a-row>
        </a-form>
      </div>
@@ -63,13 +60,13 @@
        :columns="columns"
        :data-source="datalist"
        rowKey="id"
        :scroll="{ x: 2400 }">
        :scroll="{ x: 2400 }"
      >
        <span slot="fundsType" slot-scope="text,record">
          <template>
            <div>
              <a-tag :color="record.fundsType == 0 ? 'blue' : record.fundsType == 1 ? 'green' : 'red'">{{
                record.fundsType | statusFilter
              }}
              <a-tag :color="record.fundsType == 0 ? 'blue' : record.fundsType == 1 ? 'green' : 'red'"
                >{{ record.fundsType | statusFilter }}
              </a-tag>
            </div>
          </template>
@@ -77,9 +74,8 @@
        <span slot="status" slot-scope="text,record">
          <template>
            <div>
              <a-tag :color="record.status == 0 ? 'blue' : record.status == 1 ? 'green' : 'red'">{{
                record.status == 0 ? '审核中' : record.status == 1 ? '已通过' : '未通过'
              }}
              <a-tag :color="record.status == 0 ? 'blue' : record.status == 1 ? 'green' : 'red'"
                >{{ record.status == 0 ? '审核中' : record.status == 1 ? '已通过' : '未通过' }}
              </a-tag>
            </div>
          </template>
@@ -89,22 +85,30 @@
            slot="action"
            href="javascript:;"
            @click="onUser(record)"
            v-if="record.status == 0 && record.appendType == 1">扩大资金修改</a>
            v-if="record.status == 0 && record.appendType == 1"
            >扩大资金修改</a
          >
          <a
            slot="action"
            href="javascript:;"
            @click="onUser(record)"
            v-if="record.status == 0 && record.appendType == 2">追加保证金修改</a>
            v-if="record.status == 0 && record.appendType == 2"
            >追加保证金修改</a
          >
          <a
            slot="action"
            href="javascript:;"
            @click="onUser(record)"
            v-if="record.status == 0 && record.appendType == 3">续期修改</a>
            v-if="record.status == 0 && record.appendType == 3"
            >续期修改</a
          >
          <a
            slot="action"
            href="javascript:;"
            @click="onUser(record)"
            v-if="record.status == 0 && record.appendType == 4">终止操盘修改</a>
            v-if="record.status == 0 && record.appendType == 4"
            >终止操盘修改</a
          >
        </template>
      </a-table>
    </a-card>
@@ -114,29 +118,21 @@
      :visible="addUserdialog"
      :confirmLoading="addUserDialogloading"
      @ok="OkaddUserdialog"
      @cancel="CanceladdUserdialog">
      @cancel="CanceladdUserdialog"
    >
      <a-descriptions bordered :column="{ xxl: 3, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
        <a-descriptions-item label="用户应交总费用">
          ¥{{ modeldetail.payAmount }}
        </a-descriptions-item>
        <a-descriptions-item label="审核前配资金额">
          ¥{{ modeldetail.fundsAmount }}
        </a-descriptions-item>
        <a-descriptions-item label="审核后配资金额">
          ¥{{ modeldetail.fundsAmount }}
        </a-descriptions-item>
        <a-descriptions-item label="审核前操盘总金额">
          ¥{{ modeldetail.totalTradingAmount }}
        </a-descriptions-item>
        <a-descriptions-item label="审核后操盘总金额">
          ¥{{ modeldetail.totalTradingAmount }}
        </a-descriptions-item>
        <a-descriptions-item label="用户应交总费用"> ¥{{ modeldetail.payAmount }} </a-descriptions-item>
        <a-descriptions-item label="审核前配资金额"> ¥{{ modeldetail.fundsAmount }} </a-descriptions-item>
        <a-descriptions-item label="审核后配资金额"> ¥{{ modeldetail.fundsAmount }} </a-descriptions-item>
        <a-descriptions-item label="审核前操盘总金额"> ¥{{ modeldetail.totalTradingAmount }} </a-descriptions-item>
        <a-descriptions-item label="审核后操盘总金额"> ¥{{ modeldetail.totalTradingAmount }} </a-descriptions-item>
      </a-descriptions>
      <a-form :form="addUserform" ref="addUserform">
        <a-form-item label="审核状态">
          <a-select
            placeholder="请选择审核状态"
            v-decorator="['status', { rules: [{ required: true, message: '请选择审核状态', }] }]">
            v-decorator="['status', { rules: [{ required: true, message: '请选择审核状态' }] }]"
          >
            <a-select-option value="1">审核通过</a-select-option>
            <a-select-option value="2">未通过</a-select-option>
          </a-select>
@@ -158,14 +154,14 @@
                    dataIndex: 'userName',
                    align: 'center',
                    width: 150,
                    fixed: 'left'
          fixed: 'left',
                },
                {
                    title: '手机号',
                    dataIndex: 'userPhone',
                    align: 'center',
                    width: 150,
                    fixed: 'left'
          fixed: 'left',
                },
                {
                    title: '申请时长(天)',
@@ -173,20 +169,20 @@
                    align: 'center',
                    customRender: (text, row, index) => {
                        return this.queryParam.appendType == 3 ? text : '--'
                    }
          },
                },
                {
                    title: '申请服务费',
                    dataIndex: 'appendServiceFee',
                    align: 'center',
                    customRender: (text, row, index) => {
                        return (this.queryParam.appendType != 2) ? text : '--'
                    }
            return this.queryParam.appendType != 2 ? text : '--'
          },
                },
                {
                    title: '原保证金',
                    dataIndex: 'margin',
                    align: 'center'
          align: 'center',
                },
                {
                    title: '追加保证金',
@@ -194,50 +190,50 @@
                    align: 'center',
                    customRender: (text, row, index) => {
                        return this.queryParam.appendType == 2 ? text : '--'
                    }
          },
                },
                {
                    title: '原操盘金额',
                    dataIndex: 'totalTradingAmount',
                    align: 'center'
          align: 'center',
                },
                {
                    title: '配资倍数',
                    dataIndex: 'lever',
                    align: 'center'
          align: 'center',
                },
                {
                    title: '配资金额',
                    dataIndex: 'fundsAmount',
                    align: 'center'
          align: 'center',
                },
                {
                    title: '预警线',
                    dataIndex: 'lineWarning',
                    align: 'center'
          align: 'center',
                },
                {
                    title: '止损线',
                    dataIndex: 'lineUnwind',
                    align: 'center'
          align: 'center',
                },
                {
                    title: '使用时长',
                    dataIndex: 'tradersCycle',
                    align: 'center'
          align: 'center',
                },
                {
                    title: '配资类型',
                    dataIndex: 'fundsType',
                    align: 'center',
                    scopedSlots: { customRender: 'fundsType' }
          scopedSlots: { customRender: 'fundsType' },
                },
                {
                    title: '状态',
                    dataIndex: 'status',
                    align: 'center',
                    scopedSlots: { customRender: 'status' }
          scopedSlots: { customRender: 'status' },
                },
                {
                    title: '申请时间',
@@ -246,7 +242,7 @@
                    width: 200,
                    customRender: (text, row, index) => {
                        return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
                    }
          },
                },
                {
                    title: '终止时间',
@@ -255,7 +251,7 @@
                    width: 200,
                    customRender: (text, row, index) => {
                        return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
                    }
          },
                },
                {
                    title: '操作',
@@ -263,9 +259,8 @@
                    align: 'center',
                    width: 150,
                    fixed: 'right',
                    scopedSlots: { customRender: 'action' }
                }
          scopedSlots: { customRender: 'action' },
        },
            ],
            // 表头
            pagination: {
@@ -275,7 +270,7 @@
                pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
                onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
                onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
                showTotal: total => `共有 ${total} 条数据` // 分页中显示总的数据
        showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
            },
            loading: false,
            queryParam: {
@@ -283,7 +278,7 @@
                pageSize: 10,
                keyword: '',
                status: 0,
                appendType: 1
        appendType: 1,
            },
            datalist: [],
            currentDetails: '',
@@ -291,7 +286,7 @@
            addUserform: this.$form.createForm(this),
            addUserdialog: false,
            addUserDialogloading: false,
            modeldetail: ''
      modeldetail: '',
        }
    },
    created () {
@@ -308,12 +303,12 @@
            } else {
                this.auditTitle = '扩大配资审核'
            }
        }
    },
    },
    filters: {
        statusFilter (status) {
            return status == 2 ? '按周配资' : status == 3 ? '按月配资' : '按天配资'
        }
    },
    },
    methods: {
        CanceladdUserdialog () {
@@ -329,14 +324,14 @@
                if (!errors) {
                    values.id = this.currentDetails.id
                    values.applyId = this.currentDetails.applyId
                    applysaveAppendApply(values).then(res => {
          applysaveAppendApply(values).then((res) => {
                        if (res.status == 0) {
                            this.addUserdialog = false
                            this.$message.success({ content: res.msg, duration: 2 })
              this.$message.success(res.msg)
                            form.resetFields()
                            this.getlist()
                        } else {
                            this.$message.error({ content: res.msg })
              this.$message.error(res.msg)
                        }
                        this.addUserDialogloading = false
                    })
@@ -349,9 +344,9 @@
        },
        applydetail () {
            var data = {
                id: this.currentDetails.id
        id: this.currentDetails.id,
            }
            applygetAppendDetail(data).then(res => {
      applygetAppendDetail(data).then((res) => {
                if (res.status == 0) {
                    this.modeldetail = res.data
                    this.addUserdialog = true
@@ -364,13 +359,13 @@
                pageSize: 10,
                keyword: '',
                status: 0,
                appendType: 1
        appendType: 1,
            }
        },
        getlist () {
            var that = this
            this.loading = true
            getAppendList(this.queryParam).then(res => {
      getAppendList(this.queryParam).then((res) => {
                this.datalist = res.data.list
                this.pagination.total = res.data.total
                setTimeout(() => {
@@ -386,7 +381,7 @@
            this.queryParam.pageNum = current
            this.queryParam.pageSize = pageSize
            this.getlist()
        }
    }
    },
  },
}
</script>