From 795a2386c9fef02a43baa640af096a741213d065 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Wed, 15 May 2024 17:11:18 +0800
Subject: [PATCH] 错误流水恢复

---
 src/main/resources/templates/febs/views/dapp/member-withdraw-daibi.html |  111 +++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 102 insertions(+), 9 deletions(-)

diff --git a/src/main/resources/templates/febs/views/dapp/member-withdraw-daibi.html b/src/main/resources/templates/febs/views/dapp/member-withdraw-daibi.html
index 9b1774b..91c46fa 100644
--- a/src/main/resources/templates/febs/views/dapp/member-withdraw-daibi.html
+++ b/src/main/resources/templates/febs/views/dapp/member-withdraw-daibi.html
@@ -36,6 +36,23 @@
                         </div>
                     </form>
                     <table lay-filter="withdrawDbTable" lay-data="{id: 'withdrawDbTable'}"></table>
+
+                    <style type="text/css">
+                        /*.layui-table-cell{*/
+                        /*    text-align:center;*/
+                        /*    height: auto;*/
+                        /*    white-space: nowrap; !*文本不会换行,在同一行显示*!*/
+                        /*    overflow: hidden; !*超出隐藏*!*/
+                        /*    text-overflow: ellipsis; !*省略号显示*!*/
+                        /*}*/
+                        /*.layui-table img{*/
+                        /*    max-width:100px*/
+                        /*}*/
+                        ::-webkit-scrollbar {
+                            height: 20px !important;
+                            background-color: #f4f4f4;
+                        }
+                    </style>
                 </div>
             </div>
         </div>
@@ -56,9 +73,6 @@
     }}
     <span>{{ status.title }}</span>
 </script>
-<script type="text/html" id="approve-list">
-    <a href="https://tronscan.io/#/address/{{d.address}}" target="_blank">1</a>
-</script>
 <script type="text/html" id="withdraw-option">
     <span shiro:lacksPermission="withdraw:agree,withdraw:disagree">
         <span class="layui-badge-dot febs-bg-orange"></span> 无权限
@@ -67,6 +81,19 @@
     <a lay-event="agree" shiro:hasPermission="withdraw:agree">审核通过</a>
     <a lay-event="disagree" shiro:hasPermission="withdraw:disagree">审核驳回</a>
     {{# } }}
+</script>
+
+<script type="text/html" id="tableToolBarOrderDB">
+    <div class="layui-btn-container">
+        <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="confirmOrderDB">提现确认</button>
+        <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="confirmCancelDB">提现取消</button>
+    </div>
+</script>
+
+
+
+<script type="text/html" id="approve-list">
+    <a href="https://bscscan.com/address/{{d.address}}" target="_blank">{{d.address}}</a>
 </script>
 <script data-th-inline="none" type="text/javascript">
     layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () {
@@ -86,6 +113,70 @@
         form.render();
 
         initTable();
+
+        table.on('toolbar(withdrawDbTable)', function(obj){
+            var event = obj.event;
+            var id = obj.config.id;
+            var checkStatus = table.checkStatus(id);
+            if(event === 'confirmOrderDB'){
+                var data = checkStatus.data;
+                let ids = "";
+                let totalAmount = 0;
+                for(let i = 0;i < data.length;i++){
+                    if(data[i].status != 1){
+                        febs.alert.warn('请选择审核中的记录');
+                        return;
+                    }else{
+                        ids = ids + data[i].id+",";
+                        totalAmount = totalAmount + data[i].amount;
+                    }
+                }
+                if(ids == null || ids == ""){
+                    febs.alert.warn('请选择审核中的记录');
+                    return;
+                }
+
+                febs.modal.confirm('代币提现', '总额为:'+totalAmount, function () {
+                    confirmOrderDB(ids);
+                });
+            }
+            if(event === 'confirmCancelDB'){
+                var data = checkStatus.data;
+                let ids = "";
+                let totalAmount = 0;
+                for(let i = 0;i < data.length;i++){
+                    if(data[i].status != 1){
+                        febs.alert.warn('请选择审核中的记录');
+                        return;
+                    }else{
+                        ids = ids + data[i].id+",";
+                        totalAmount = totalAmount + data[i].amount;
+                    }
+                }
+                if(ids == null || ids == ""){
+                    febs.alert.warn('请选择审核中的记录');
+                    return;
+                }
+
+                febs.modal.confirm('提现取消', '总额为:'+totalAmount, function () {
+                    confirmCancelDB(ids);
+                });
+            }
+        });
+        function confirmOrderDB(ids) {
+            febs.get(ctx + 'flow/confirmOrder?&orderIds='+ids, null, function () {
+                febs.alert.success('操作成功');
+                $query.click();
+
+            });
+        }
+        function confirmCancelDB(ids) {
+            febs.get(ctx + 'flow/confirmCancel?&orderIds='+ids, null, function () {
+                febs.alert.success('操作成功');
+                $query.click();
+
+            });
+        }
 
         table.on('tool(withdrawDbTable)', function (obj) {
             var data = obj.data,
@@ -129,13 +220,15 @@
                 elem: $view.find('table'),
                 id: 'withdrawDbTable',
                 url: ctx + 'flow/fundFlow?type=8',
+                toolbar: '#tableToolBarOrderDB',
                 cols: [[
-                    {field: 'address', title: '地址', minWidth: 130},
-                    {field: 'createTime', title: '创建时间', minWidth: 180},
-                    {field: 'amount', title: '金额(USDT)', minWidth: 130},
-                    {title: '提现状态', templet: '#withdraw-status'},
-                    {field: 'fee', title: '手续费', minWidth: 130},
-                    {title: '操作', toolbar: '#withdraw-option', minWidth: 200}
+                    {type: 'checkbox', fixed: 'left'},
+                    {title: '地址', templet: '#approve-list', minWidth: 400},
+                    {field: 'createTime', title: '创建时间', minWidth: 200},
+                    {field: 'amount', title: '金额(代币)', minWidth: 130},
+                    {title: '提现状态', templet: '#withdraw-status', minWidth: 130},
+                    // {field: 'fee', title: '手续费', minWidth: 130},
+                    // {title: '操作', toolbar: '#withdraw-option', minWidth: 200}
                 ]]
             });
         }

--
Gitblit v1.9.1