From 4a2343b5cb50f284846d144a4858221a892a39a5 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Fri, 20 Dec 2024 09:48:11 +0800
Subject: [PATCH] refactor(runVip): 优化提现列表展示和操作逻辑

---
 src/main/resources/templates/febs/views/modules/runVip/sellVipList.html |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/runVip/sellVipList.html b/src/main/resources/templates/febs/views/modules/runVip/sellVipList.html
index 27614f5..f2fe76d 100644
--- a/src/main/resources/templates/febs/views/modules/runVip/sellVipList.html
+++ b/src/main/resources/templates/febs/views/modules/runVip/sellVipList.html
@@ -62,13 +62,13 @@
     0: {title: '失败', color: 'blue'}
     }[d.status];
     }}
-    <span class="layui-badge febs-bg-{{state.color}}">{{ status.title }}</span>
+    <span class="layui-badge febs-bg-{{status.color}}">{{ status.title }}</span>
 </script>
 
-<script type="text/html" id="commissionOption">
-    {{#  if(d.state == 2){ }}
-        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="user:update" lay-event="chargeAgreeEvent">确认</button>
-        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="user:update" lay-event="chargeDisAgreeEvent">取消</button>
+<script type="text/html" id="withdrawOption">
+    {{#  if(d.status == 2){ }}
+        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="withdraw:update" lay-event="chargeAgreeEvent">确认</button>
+        <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" shiro:hasPermission="withdraw:update" lay-event="chargeDisAgreeEvent">取消</button>
     {{#  } }}
 </script>
 <script data-th-inline="none" type="text/javascript">
@@ -122,8 +122,8 @@
                 });
             }
         });
-        function chargeAgreeEvent(state,id) {
-            febs.get(ctx + 'admin/runVip/sellAgree/'+ state +'/'+ id, null, function (e) {
+        function chargeAgreeEvent(status,id) {
+            febs.get(ctx + 'admin/runVip/sellAgree/'+ status +'/'+ id, null, function (e) {
                 febs.alert.success(e.message);
                 $query.click();
             });
@@ -141,23 +141,23 @@
                     {field: 'withdrawNo', title: '编号', minWidth: 100,align:'center', totalRowText: '合计'},
                     {field: 'account', title: '账号', minWidth: 150,align:'center'},
                     {field: 'type', title: '链', minWidth: 100,align:'center'},
-                    {field: 'name', title: '提现地址', minWidth: 100,align:'center'},
+                    {field: 'name', title: '提现地址', minWidth: 200,align:'center'},
                     {field: 'amount', title: '金额', minWidth: 100,align:'center', totalRow:true},
                     {field: 'amountFee', title: '手续费', minWidth: 100,align:'center', totalRow:true},
                     {title: '状态', templet: '#statusType', minWidth: 100,align:'center'},
                     {field: 'createdTime', title: '创建时间', minWidth: 180,align:'center'},
-                    {title: '操作', toolbar: '#commissionOption', minWidth: 200}
+                    {title: '操作', toolbar: '#withdrawOption', minWidth: 100}
                 ]],
                 done: function(res, curr, count) {
                     // 遍历每一行数据
                     res.data.forEach(function(item, index) {
                         // 根据状态值控制按钮显示
-                        if (item.state === 2) {
+                        if (item.status === 2) {
                             // 如果状态为1,显示
-                            $('#commissionOption' + index).show();
+                            $('#withdrawOption' + index).show();
                         } else {
                             // 否则,隐藏
-                            $('#commissionOption' + index).hide();
+                            $('#withdrawOption' + index).hide();
                         }
                     });
                 }

--
Gitblit v1.9.1