From b56dfb09003079683c1dcae9a9ebcad81f19cb3c Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 11 Nov 2022 03:14:47 +0800
Subject: [PATCH] 20221021

---
 src/main/resources/templates/febs/views/dapp/money-change-flow.html |   57 ++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/src/main/resources/templates/febs/views/dapp/money-change-flow.html b/src/main/resources/templates/febs/views/dapp/money-change-flow.html
index 74d9473..6721b5e 100644
--- a/src/main/resources/templates/febs/views/dapp/money-change-flow.html
+++ b/src/main/resources/templates/febs/views/dapp/money-change-flow.html
@@ -30,26 +30,6 @@
                                             </select>
                                         </div>
                                     </div>
-<!--                                    <div class="layui-inline">-->
-<!--                                        <label class="layui-form-label layui-form-label-sm">可兑换</label>-->
-<!--                                        <div class="layui-input-inline">-->
-<!--                                            <select name="changeAble">-->
-<!--                                                <option value=""></option>-->
-<!--                                                <option value="2">否</option>-->
-<!--                                                <option value="1">是</option>-->
-<!--                                            </select>-->
-<!--                                        </div>-->
-<!--                                    </div>-->
-<!--                                    <div class="layui-inline">-->
-<!--                                        <label class="layui-form-label layui-form-label-sm">可提现</label>-->
-<!--                                        <div class="layui-input-inline">-->
-<!--                                            <select name="withdrawAble">-->
-<!--                                                <option value=""></option>-->
-<!--                                                <option value="2">否</option>-->
-<!--                                                <option value="1">是</option>-->
-<!--                                            </select>-->
-<!--                                        </div>-->
-<!--                                    </div>-->
                                 </div>
                             </div>
                             <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
@@ -111,7 +91,26 @@
         table.on('tool(moneyChangeTable)', function (obj) {
             var data = obj.data,
                 layEvent = obj.event;
+
+            if (layEvent === 'amountFlow') {
+                febs.modal.open( '资金流水详情', 'onHookView/amountFlow/' + data.orderId, {
+                    maxmin: true,
+                });
+            }
+
+            if (layEvent === 'amountFlowBack') {
+                febs.modal.confirm('回退', '是否回退当前资金流水?', function () {
+                    amountFlowBack(data.id);
+                });
+            }
         });
+
+        function amountFlowBack(id) {
+            febs.get(ctx + 'member/amountFlowBack/' + id, null, function () {
+                febs.alert.success('操作成功');
+                $query.click();
+            });
+        }
 
         table.on('sort(moneyChangeTable)', function (obj) {
             sortObject = obj;
@@ -147,7 +146,23 @@
                     {field: 'afterAmount', title: '变化后金额', minWidth: 100},
                     {field: 'content', title: '描述', minWidth: 130},
                     // {title: '类型', templet: '#type-format'},
-                    {field: 'createTime', title: '创建时间', minWidth: 180}
+                    {field: 'createTime', title: '创建时间', minWidth: 180},
+                    {title: '流水记录',
+                        templet: function (d) {
+                            if(d.orderId != null || d.orderId != ""){
+                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="amountFlow" shiro:hasPermission="user:update">流水记录</button>'
+                            }else{
+                                return ''
+                            }
+                        },minWidth: 120,align:'center'},
+                    {title: '流水回退',
+                        templet: function (d) {
+                            if(d.type == 7 || d.type == 8){
+                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="amountFlowBack" shiro:hasPermission="user:update">流水回退</button>'
+                            }else{
+                                return ''
+                            }
+                        },minWidth: 120,align:'center'}
                 ]]
             });
         }

--
Gitblit v1.9.1