From 83985c18e5043ca11a3a36ff8d8c6162a9a9b937 Mon Sep 17 00:00:00 2001
From: admin <344137771@qq.com>
Date: Sat, 10 Jan 2026 17:10:58 +0800
Subject: [PATCH] 1

---
 src/views/userlist/index.vue |  206 ++++++++++++++-------------------------------------
 1 files changed, 56 insertions(+), 150 deletions(-)

diff --git a/src/views/userlist/index.vue b/src/views/userlist/index.vue
index 6d97163..8baeed8 100644
--- a/src/views/userlist/index.vue
+++ b/src/views/userlist/index.vue
@@ -5,47 +5,10 @@
         <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>
@@ -81,7 +44,7 @@
                     type="primary"
                     icon="search"
                     style="margin-left: 8px"
-                    @click=";(queryParam.pageNum = 1), (pagination.current = 1), getuserList()"
+                    @click=";(queryParam.pageNum = 1), getuserList()"
                     >查询</a-button
                   >
                   <a-button
@@ -107,7 +70,6 @@
         :columns="columns"
         :data-source="dataList"
         rowKey="phone"
-        :scroll="{ x: 2800 }"
       >
         <span slot="agentName" slot-scope="text, record">
           <template>
@@ -135,20 +97,13 @@
           </template>
         </span>
         <template slot="action" slot-scope="text, record">
-          <a
-            slot="action"
-            href="javascript:;"
-            @click="
-              currentDetails = record
-              $refs.detailuserdialog.userDialog = true
-            "
-            >用户详情</a
-          >
+          <!-- currentDetails = record; $refs.detailuserdialog.userDialog = true -->
+          <a slot="action" href="javascript:;" @click="userInfo(record)">用户详情</a>
           <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,32 +115,30 @@
             "
             >实名审核</a
           >
-          <a-divider type="vertical" />
-          <a slot="action" href="javascript:;" @click="getDeluser(record)">删除</a>
         </template>
       </a-table>
     </a-card>
-    <adduserdialog ref="adduserdialog" :getinit="getinit" :agentlist="agentlist"></adduserdialog>
+    <adduserdialog ref="adduserdialog" :getinit="getinit"></adduserdialog>
     <detailuserdialog ref="detailuserdialog" :currentDetails="currentDetails"></detailuserdialog>
     <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>
-    <audituserdialog ref="audituserdialog" :currentDetails="currentDetails" :getinit="geteditinit"></audituserdialog>
   </page-header-wrapper>
 </template>
 <script>
-import { usermanag, nextagent, userdelete, getMoney, updateMoney } from '@/api/home'
+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'
 import editUserbankdialog from './components/editUserbankdialog'
-import editCapitaluserdialog from './components/editCapitaluserdialog'
 import audituserdialog from './components/audituserdialog'
-import moment from 'moment'
+import { async } from 'regenerator-runtime'
 export default {
   name: 'Agentlist',
   components: {
@@ -193,20 +146,15 @@
     detailuserdialog,
     EditUserinfodialog,
     editUserbankdialog,
-    editCapitaluserdialog,
     audituserdialog,
+    editCapitaluserdialog,
   },
   data() {
     return {
-      regTime:'',
       queryParam: {
         agentId: undefined,
         realName: '',
-        isLock:'',
-        isLogin:'',
-        isActive:'',
         phone: '',
-        regTime:'',
         pageNum: 1,
         pageSize: 10,
         accountType: 0,
@@ -231,28 +179,8 @@
           align: 'center',
         },
         {
-          title: '账号',
+          title: '手机号',
           dataIndex: 'phone',
-          align: 'center',
-        },
-        {
-          title: '待补资金',
-          dataIndex: 'amountToBeCovered',
-          align: 'center',
-        },
-        {
-          title: '总资产',
-          dataIndex: 'totalMoney',
-          align: 'center',
-        },
-        {
-          title: '可用余额',
-          dataIndex: 'availableBalance',
-          align: 'center',
-        },
-        {
-          title: '冻结金额',
-          dataIndex: 'freezeMoney',
           align: 'center',
         },
         {
@@ -261,15 +189,29 @@
           align: 'center',
         },
         {
-          title: '资金使用百分比',
-          dataIndex: 'fundRatio',
+          title: '总资金',
+          dataIndex: 'userAmt',
           align: 'center',
+          customRender: (text, row, index) => {
+            return text.toFixed(2)
+          },
         },
-        // {
-        //   title: '杠杠',
-        //   dataIndex: 'lever',
-        //   align: 'center',
-        // },
+        {
+          title: '可用余额',
+          dataIndex: 'availableBalance',
+          align: 'center',
+          // customRender: (text, row, index) => {
+          //   return text.toFixed(2)
+          // }
+        },
+        {
+          title: '冻结金额',
+          dataIndex: 'freezeMoney',
+          align: 'center',
+          // customRender: (text, row, index) => {
+          //   return text.toFixed(2)
+          // }
+        },
         {
           title: '认证信息',
           dataIndex: 'isActive',
@@ -291,25 +233,9 @@
           scopedSlots: { customRender: 'isLogin' },
         },
         {
-          title: '注册时间',
-          dataIndex: 'regTime',
-          align: 'center',
-          customRender: (text, row, index) => {
-            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' },
         },
       ], // 表头
@@ -317,7 +243,6 @@
       pagination: {
         total: 0,
         pageSize: 10, // 每页中显示10条数据
-        current: 1,
         showSizeChanger: true,
         pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
         onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
@@ -330,19 +255,17 @@
         pageSize: 100,
       },
       agentlist: [],
+      userid: '',
       currentDetails: {},
       activeArr: [],
     }
   },
   created() {
     this.getuserList()
-
     this.getagentlist()
+    this.getagentuserinfo()
   },
   methods: {
-    getregTime(date, dateString) {
-      this.regTime = dateString
-    },
     getMoneyzj(record) {
       console.log(record.id)
       getMoney({ userId: record.id }).then((res) => {
@@ -353,55 +276,35 @@
         }
       })
     },
-
-    getDeluser(val) {
-      var that = this
-      this.$confirm({
-        title: '提示',
-        content: '确认删除该用户吗?此操作不可恢复,将删除该用户所有的充值、提现与持仓记录!',
-        onOk() {
-          var data = {
-            userId: val.id,
-          }
-          userdelete(data).then((res) => {
-            if (res.status == 0) {
-              that.$message.success(res.msg)
-              that.getinit()
-            } else {
-              that.$message.error(res.msg)
-            }
-          })
-        },
-        onCancel() {
-          console.log('Cancel')
-        },
-      })
+    async userInfo(val) {
+      const res = await getMoney({ userId: val.id })
+      if (res.success) {
+        res.data.map((item) => {
+          val[item.accectType] = item.totalMoney
+          val[item.accectType + 'sybol'] = item.symbolCode
+        })
+      }
+      this.currentDetails = val
+      this.$refs.detailuserdialog.userDialog = true
+    },
+    geteditinit() {
+      this.getuserList()
     },
     getinit() {
       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() {
       this.getuserList()
     },
     getuserList() {
       var that = this
       this.loading = true
-      this.queryParam.regTime = this.regTime
-      usermanag(this.queryParam).then((res) => {
+      agentuserlist(this.queryParam).then((res) => {
         this.dataList = res.data.list
         this.pagination.total = res.data.total
         setTimeout(() => {
@@ -409,20 +312,23 @@
         }, 500)
       })
     },
+    getagentuserinfo() {
+      agentgetAgentInfo(this.agentqueryParam).then((res) => {
+        console.log(res)
+        this.userid = res.data.id
+      })
+    },
     getagentlist() {
-      nextagent(this.agentqueryParam).then((res) => {
+      agentgetSecondAgent(this.agentqueryParam).then((res) => {
         this.agentlist = res.data.list
       })
     },
     onPageChange(page, pageSize) {
       this.queryParam.pageNum = page
-      this.pagination.current = page
       this.getuserList()
     },
     onSizeChange(current, pageSize) {
-      // console.log(current, pageSize)
       this.queryParam.pageNum = current
-      // this.pagination.current = page
       this.queryParam.pageSize = pageSize
       this.getuserList()
     },

--
Gitblit v1.9.3