1
admin
2026-01-10 83985c18e5043ca11a3a36ff8d8c6162a9a9b937
src/views/userlist/index.vue
@@ -16,11 +16,8 @@
            <a-col :md="12" :lg="6" :sm="24">
              <a-form-item label="下级代理">
                <a-select v-model="queryParam.agentId" placeholder="请选择下级代理">
                  <a-select-option
                    v-for="(item, index) in agentlist"
                    :key="index"
                    :value="item.id"
                  >{{ item.agentName }}
                  <a-select-option v-for="(item, index) in agentlist" :key="index" :value="item.id"
                    >{{ item.agentName }}
                  </a-select-option>
                </a-select>
              </a-form-item>
@@ -48,14 +45,14 @@
                    icon="search"
                    style="margin-left: 8px"
                    @click=";(queryParam.pageNum = 1), getuserList()"
                  >查询</a-button
                    >查询</a-button
                  >
                  <a-button
                    type="primary"
                    icon="plus"
                    style="margin-left: 8px"
                    @click="$refs.adduserdialog.addUserdialog = true"
                  >添加账户</a-button
                    >添加账户</a-button
                  >
                </span>
              </a-form-item>
@@ -107,6 +104,8 @@
          <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
            slot="action"
            href="javascript:;"
@@ -114,7 +113,7 @@
              currentDetails = record
              $refs.audituserdialog.userDialog = true
            "
          >实名审核</a
            >实名审核</a
          >
        </template>
      </a-table>
@@ -124,10 +123,16 @@
    <EditUserinfodialog ref="EditUserinfodialog" :getinit="geteditinit" :agentlist="agentlist"></EditUserinfodialog>
    <editUserbankdialog ref="editUserbankdialog" :getinit="geteditinit"></editUserbankdialog>
    <audituserdialog ref="audituserdialog" :currentDetails="currentDetails" :getinit="geteditinit"></audituserdialog>
    <editCapitaluserdialog
      :activeArr="activeArr"
      ref="editCapitaluserdialog"
      :getinit="geteditinit"
    ></editCapitaluserdialog>
  </page-header-wrapper>
</template>
<script>
import { agentuserlist, agentgetSecondAgent, agentgetAgentInfo, getMoney } from '@/api/home'
import editCapitaluserdialog from './components/editCapitaluserdialog'
import adduserdialog from './components/adduserdialog'
import detailuserdialog from './components/detailuserdialog'
import EditUserinfodialog from './components/EditUserinfodialog'
@@ -141,9 +146,10 @@
    detailuserdialog,
    EditUserinfodialog,
    editUserbankdialog,
    audituserdialog
    audituserdialog,
    editCapitaluserdialog,
  },
  data () {
  data() {
    return {
      queryParam: {
        agentId: undefined,
@@ -151,36 +157,36 @@
        phone: '',
        pageNum: 1,
        pageSize: 10,
        accountType: 0
        accountType: 0,
      },
      labelCol: {
        xs: { span: 24 },
        sm: { span: 7 }
        sm: { span: 7 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 13 }
        sm: { span: 13 },
      },
      columns: [
        {
          title: '用户ID',
          dataIndex: 'id',
          align: 'center'
          align: 'center',
        },
        {
          title: '所属代理(Id)',
          scopedSlots: { customRender: 'agentName' },
          align: 'center'
          align: 'center',
        },
        {
          title: '手机号',
          dataIndex: 'phone',
          align: 'center'
          align: 'center',
        },
        {
          title: '真实姓名',
          dataIndex: 'realName',
          align: 'center'
          align: 'center',
        },
        {
          title: '总资金',
@@ -188,7 +194,7 @@
          align: 'center',
          customRender: (text, row, index) => {
            return text.toFixed(2)
          }
          },
        },
        {
          title: '可用余额',
@@ -212,26 +218,26 @@
          align: 'center',
          customRender: (text, row, index) => {
            return text == 0 ? '待认证' : text == 1 ? '待审核' : text == 2 ? '认证成功' : text == 3 ? '驳回' : ''
          }
          },
        },
        {
          title: '交易状态',
          dataIndex: 'isLock',
          align: 'center',
          scopedSlots: { customRender: 'isLock' }
          scopedSlots: { customRender: 'isLock' },
        },
        {
          title: '登录状态',
          dataIndex: 'isLogin',
          align: 'center',
          scopedSlots: { customRender: 'isLogin' }
          scopedSlots: { customRender: 'isLogin' },
        },
        {
          title: '操作',
          key: 'action',
          align: 'center',
          scopedSlots: { customRender: 'action' }
        }
          scopedSlots: { customRender: 'action' },
        },
      ], // 表头
      dataList: [],
      pagination: {
@@ -241,25 +247,36 @@
        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,
      agentqueryParam: {
        pageNum: 1,
        pageSize: 100
        pageSize: 100,
      },
      agentlist: [],
      userid: '',
      currentDetails: {}
      currentDetails: {},
      activeArr: [],
    }
  },
  created () {
  created() {
    this.getuserList()
    this.getagentlist()
    this.getagentuserinfo()
  },
  methods: {
    async userInfo (val) {
    getMoneyzj(record) {
      console.log(record.id)
      getMoney({ userId: record.id }).then((res) => {
        if (res.status === 0) {
          const arr = res.data.filter((item) => item.accectType !== 'ALL')
          this.activeArr = arr
          this.$refs.editCapitaluserdialog.getEditorder(record)
        }
      })
    },
    async userInfo(val) {
      const res = await getMoney({ userId: val.id })
      if (res.success) {
        res.data.map((item) => {
@@ -270,21 +287,21 @@
      this.currentDetails = val
      this.$refs.detailuserdialog.userDialog = true
    },
    geteditinit () {
    geteditinit() {
      this.getuserList()
    },
    getinit () {
    getinit() {
      this.queryParam = {
        agentId: undefined,
        realName: '',
        phone: '',
        pageNum: 1,
        pageSize: 10,
        accountType: 0
        accountType: 0,
      }
      this.getuserList()
    },
    getuserList () {
    getuserList() {
      var that = this
      this.loading = true
      agentuserlist(this.queryParam).then((res) => {
@@ -295,27 +312,27 @@
        }, 500)
      })
    },
    getagentuserinfo () {
    getagentuserinfo() {
      agentgetAgentInfo(this.agentqueryParam).then((res) => {
        console.log(res)
        this.userid = res.data.id
      })
    },
    getagentlist () {
    getagentlist() {
      agentgetSecondAgent(this.agentqueryParam).then((res) => {
        this.agentlist = res.data.list
      })
    },
    onPageChange (page, pageSize) {
    onPageChange(page, pageSize) {
      this.queryParam.pageNum = page
      this.getuserList()
    },
    onSizeChange (current, pageSize) {
    onSizeChange(current, pageSize) {
      this.queryParam.pageNum = current
      this.queryParam.pageSize = pageSize
      this.getuserList()
    },
    handleTableChange () {}
  }
    handleTableChange() {},
  },
}
</script>