大宝管理后台代码
jhzh
2024-09-28 bcbd848449b293b70a4376b0b180d872ef2bc543
src/views/userlist/index.vue
@@ -5,10 +5,47 @@
        <a-form layout="inline">
          <a-row :gutter="48">
            <a-col :md="12" :lg="6" :sm="24">
              <a-form-item label="交易状态">
                <a-select v-model="queryParam.isLock" placeholder="请选择交易状态" :default-value="{ key: '0' }">
                  <a-select-option :value="0">可交易</a-select-option>
                  <a-select-option :value="1">不可交易</a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="12" :lg="6" :sm="24">
              <a-form-item label="登录状态">
                <a-select v-model="queryParam.isLogin" placeholder="请选择登录状态" :default-value="{ key: '0' }">
                  <a-select-option :value="0">可登录</a-select-option>
                  <a-select-option :value="1">不可登录</a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="12" :lg="6" :sm="24">
              <a-form-item label="注册时间">
                 <a-date-picker
                   show-time
                   style="width: 50%"
                   @change="getregTime"
                   v-model="regTime"
                   format="YYYY-MM-DD HH:mm:ss"
                 >
                 </a-date-picker>
              </a-form-item>
            </a-col>
            <a-col :md="12" :lg="6" :sm="24">
              <a-form-item label="用户筛选">
                <a-select v-model="queryParam.accountType" placeholder="请选择用户类型" :default-value="{ key: '0' }">
                  <a-select-option :value="0">真实用户</a-select-option>
                  <a-select-option :value="1">模拟用户</a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
            <a-col :md="12" :lg="6" :sm="24">
              <a-form-item label="实名状态">
                <a-select v-model="queryParam.isActive" placeholder="请选择实名状态" :default-value="{ key: '0' }">
                  <a-select-option :value="0">未实名</a-select-option>
                  <a-select-option :value="2">已实名</a-select-option>
                  <a-select-option :value="3">被驳回</a-select-option>
                </a-select>
              </a-form-item>
            </a-col>
@@ -70,6 +107,7 @@
        :columns="columns"
        :data-source="dataList"
        rowKey="phone"
        :scroll="{ x: 2800 }"
      >
        <span slot="agentName" slot-scope="text, record">
          <template>
@@ -109,8 +147,8 @@
          <a-divider type="vertical" />
          <a slot="action" href="javascript:;" @click="$refs.EditUserinfodialog.getEditorder(record)">编辑</a>
          <a-divider type="vertical" />
          <a slot="action" href="javascript:;" @click="$refs.editUserbankdialog.getbankinfo(record)">银行卡</a>
          <a-divider type="vertical" />
<!--          <a slot="action" href="javascript:;" @click="$refs.editUserbankdialog.getbankinfo(record)">银行卡</a>
          <a-divider type="vertical" /> -->
          <a slot="action" href="javascript:;" @click="getMoneyzj(record)">资金</a>
          <a-divider type="vertical" />
          <a
@@ -160,10 +198,15 @@
  },
  data() {
    return {
      regTime:'',
      queryParam: {
        agentId: undefined,
        realName: '',
        isLock:'',
        isLogin:'',
        isActive:'',
        phone: '',
        regTime:'',
        pageNum: 1,
        pageSize: 10,
        accountType: 0,
@@ -188,8 +231,23 @@
          align: 'center',
        },
        {
          title: '手机号',
          title: '账号',
          dataIndex: 'phone',
          align: 'center',
        },
        {
          title: '总资产',
          dataIndex: 'totalMoney',
          align: 'center',
        },
        {
          title: '可用余额',
          dataIndex: 'availableBalance',
          align: 'center',
        },
        {
          title: '冻结金额',
          dataIndex: 'freezeMoney',
          align: 'center',
        },
        {
@@ -197,14 +255,15 @@
          dataIndex: 'realName',
          align: 'center',
        },
        {
          title: '资金使用百分比',
          dataIndex: 'fundRatio',
          align: 'center',
        },
        // {
        //   title: '总资金',
        //   dataIndex: 'userAmt',
        //   title: '杠杠',
        //   dataIndex: 'lever',
        //   align: 'center',
        //   customRender: (text, row, index) => {
        //     return text ? text.toFixed(2) : '0'
        //     // return text.toFixed(2)
        //   },
        // },
        {
          title: '认证信息',
@@ -234,10 +293,18 @@
            return moment(text).format('YYYY-MM-DD HH:mm:ss')
          },
        },
        // {
        //   title: '操作',
        //   key: 'action',
        //   align: 'center',
        //   scopedSlots: { customRender: 'action' },
        // },
        {
          title: '操作',
          key: 'action',
          align: 'center',
          fixed: 'right',
          width: 400,
          scopedSlots: { customRender: 'action' },
        },
      ], // 表头
@@ -268,6 +335,9 @@
    this.getagentlist()
  },
  methods: {
    getregTime(date, dateString) {
      this.regTime = dateString
    },
    getMoneyzj(record) {
      console.log(record.id)
      getMoney({ userId: record.id }).then((res) => {
@@ -306,12 +376,17 @@
      this.queryParam = {
        agentId: undefined,
        realName: '',
        isLock:'',
        isLogin:'',
        isActive:'',
        phone: '',
        regTime:'',
        pageNum: 1,
        pageSize: 10,
        accountType: 0,
      }
      this.pagination.current = 1
      this.regTime = ''
      this.getuserList()
    },
    geteditinit() {
@@ -320,6 +395,7 @@
    getuserList() {
      var that = this
      this.loading = true
      this.queryParam.regTime = this.regTime
      usermanag(this.queryParam).then((res) => {
        this.dataList = res.data.list
        this.pagination.total = res.data.total
@@ -339,8 +415,9 @@
      this.getuserList()
    },
    onSizeChange(current, pageSize) {
      // console.log(current, pageSize)
      this.queryParam.pageNum = current
      this.pagination.current = page
      // this.pagination.current = page
      this.queryParam.pageSize = pageSize
      this.getuserList()
    },