From e16ac98e0d1049d18c508799d64f11d942c74920 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Sun, 27 Apr 2025 14:32:57 +0800
Subject: [PATCH] refactor(votesActivity): 修改自主报名字段名称

---
 src/main/resources/templates/febs/views/modules/order/refundList.html |  151 ++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 121 insertions(+), 30 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/order/refundList.html b/src/main/resources/templates/febs/views/modules/order/refundList.html
index e0e3301..c07452a 100644
--- a/src/main/resources/templates/febs/views/modules/order/refundList.html
+++ b/src/main/resources/templates/febs/views/modules/order/refundList.html
@@ -85,23 +85,69 @@
         table.on('tool(orderRefundTable)', function (obj) {
             var data = obj.data,
                 layEvent = obj.event;
-            if (layEvent === 'deliverGoods') {
-                febs.modal.open('发货', 'modules/order/deliverGoods/' + data.id, {
+            if (layEvent === 'refunding') {
+                febs.modal.open( '退款进度', 'modules/order/refunding/' + data.id, {
+                    maxmin: true,
+                });
+            }
+            if (layEvent === 'refundOrderDetail') {
+                febs.modal.open( '订单详情', 'modules/order/refundOrderDetail/' + data.id, {
+                    maxmin: true,
+                });
+            }
+            if (layEvent === 'agree') {
+                febs.modal.confirm('同意', '同意此次退款申请?', function () {
+                    agreeRefund(data.id);
+                });
+            }
+            if (layEvent === 'agreeWithAddress') {
+                febs.modal.open('选择退货地址', 'modules/order/withAddress/' + data.id, {
                     btn: ['确认', '取消'],
                     yes: function (index, layero) {
-                        $('#deliver-update').find('#submit').trigger('click');
+                        $('#address-choose').find('#submit').trigger('click');
                     },
                     btn2: function () {
                         layer.closeAll();
                     }
                 });
             }
-            if (layEvent === 'seeOrder') {
-                febs.modal.open( '订单详情', 'modules/order/orderDetail/' + data.id, {
+            if (layEvent === 'disagree') {
+                febs.modal.confirm('拒绝', '拒绝此次退款申请?', function () {
+                    disagreeRefund(data.id);
+                });
+            }
+            if (layEvent === 'refundConfirm') {
+                febs.modal.confirm('退款确认', '确认已退款?', function () {
+                    refundConfirm(data.id);
+                });
+            }
+            if (layEvent === 'paymentInfo') {
+                febs.modal.open( '收款信息', 'modules/order/refundPayInfo/' + data.id, {
                     maxmin: true,
                 });
             }
         });
+
+        function agreeRefund(id) {
+            febs.get(ctx + 'admin/order/agreeRefund/' + id, null, function () {
+                febs.alert.success('操作成功');
+                $query.click();
+            });
+        }
+
+        function disagreeRefund(id) {
+            febs.get(ctx + 'admin/order/disagreeRefund/' + id, null, function () {
+                febs.alert.success('操作成功');
+                $query.click();
+            });
+        }
+
+        function refundConfirm(id) {
+            febs.get(ctx + 'admin/order/refundConfirm/' + id, null, function () {
+                febs.alert.success('操作成功');
+                $query.click();
+            });
+        }
 
         // 查询按钮
         $query.on('click', function () {
@@ -116,19 +162,47 @@
             tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
         });
 
-        $add.on('click', function () {
-            febs.view.tab.change("/modules/goods/goodsAddNew/");
-        });
-
         function initTable() {
             tableIns = febs.table.init({
                 elem: $view.find('table'),
                 id: 'orderRefundTable',
                 url: ctx + 'admin/order/refundList',
                 cols: [[
-                    {field: 'name', title: '用户名', minWidth: 150,align:'left'},
-                    {field: 'phone', title: '电话', minWidth: 150,align:'left'},
                     {field: 'orderNo', title: '订单编号', minWidth: 150,align:'left'},
+                    {field: 'buyName', title: '用户名', minWidth: 150,align:'left'},
+                    {field: 'buyPhone', title: '账号', minWidth: 150,align:'left'},
+                    {field: 'buyBindPhone', title: '手机号', minWidth: 150,align:'left'},
+                    {field: 'beforeStatus', title: '发货状态',
+                        templet: function (d) {
+                            if (d.beforeStatus === 1) {
+                                return '<span style="color:red;">待支付</span>'
+                            } else if (d.beforeStatus === 2) {
+                                return '<span style="color:green;">待发货</span>'
+                            }else if (d.beforeStatus === 3) {
+                                return '<span style="color:green;">待收货</span>'
+                            }else if (d.beforeStatus === 4) {
+                                return '<span style="color:green;">已完成</span>'
+                            }else if (d.beforeStatus === 5) {
+                                return '<span style="color:green;">退款中</span>'
+                            }else if (d.beforeStatus === 6) {
+                                return '<span style="color:green;">已退款</span>'
+                            }else if (d.beforeStatus === 7) {
+                                return '<span style="color:green;">已取消</span>'
+                            }else{
+                                return ''
+                            }
+                        }, minWidth: 80,align:'center'},
+                    {field: 'amount', title: '退款金额', minWidth: 150,align:'left'},
+                    {field: 'type', title: '退款类型',
+                        templet: function (d) {
+                            if (d.type === 1) {
+                                return '<span">仅退款不退货</span>'
+                            } else if (d.type === 2) {
+                                return '<span>退款退货</span>'
+                            }else{
+                                return ''
+                            }
+                        }, minWidth: 80,align:'center'},
                     {field: 'reason', title: '退款原因', minWidth: 150,align:'left'},
                     {field: 'status', title: '状态',
                         templet: function (d) {
@@ -146,25 +220,42 @@
                                 return ''
                             }
                         }, minWidth: 80,align:'center'},
-                    //     {field: 'accountStatus', title: '账号状态',
-                    //         templet: function (d) {
-                    //             if (d.accountStatus === 1) {
-                    //                 return '<span style="color:green;">正常</span>'
-                    //             } else if (d.accountStatus === 2) {
-                    //                 return '<span style="color:red;">禁用</span>'
-                    //             }else{
-                    //                 return ''
-                    //             }
-                    //         }, minWidth: 80,align:'center'},
-                    //     {field: 'createdTime', title: '注册时间', minWidth: 180,align:'center'},
-                    // {title: '操作',
-                    //     templet: function (d) {
-                    //         if (d.status === 1) {
-                    //             return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="deliverGoods" shiro:hasPermission="user:update">发货</button>'
-                    //         }else{
-                    //             return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" shiro:hasPermission="user:update">详情</button>'
-                    //         }
-                    //     },minWidth: 300,align:'center'}
+                    {field: 'addressDetail', title: '收货信息', minWidth: 150,align:'left'},
+                    {field: 'createdTime', title: '创建时间', minWidth: 150,align:'left'},
+                    {title: '操作',
+                        templet: function (d) {
+                        if(d.status === 1){
+                            if(d.type === 1){
+                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="agree" shiro:hasPermission="user:update">同意</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="disagree" shiro:hasPermission="user:update">拒绝</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refunding" shiro:hasPermission="user:update">退款进度</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refundOrderDetail" shiro:hasPermission="user:update">订单详情</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="paymentInfo" shiro:hasPermission="user:update">收款方式</button>'
+                            }else if(d.type === 2){
+                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="agreeWithAddress" shiro:hasPermission="user:update">同意</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="disagree" shiro:hasPermission="user:update">拒绝</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refunding" shiro:hasPermission="user:update">退款进度</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refundOrderDetail" shiro:hasPermission="user:update">订单详情</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="paymentInfo" shiro:hasPermission="user:update">收款方式</button>'
+                            }else{
+                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="agree" shiro:hasPermission="user:update">同意</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="disagree" shiro:hasPermission="user:update">拒绝</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refunding" shiro:hasPermission="user:update">退款进度</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refundOrderDetail" shiro:hasPermission="user:update">订单详情</button>'
+                                    +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="paymentInfo" shiro:hasPermission="user:update">收款方式</button>'
+                            }
+                        }else if(d.status === 4){
+                            return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refunding" shiro:hasPermission="user:update">退款进度</button>'
+                                +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refundConfirm" shiro:hasPermission="user:update">退款确认</button>'
+                                +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refundOrderDetail" shiro:hasPermission="user:update">订单详情</button>'
+                                +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="paymentInfo" shiro:hasPermission="user:update">收款方式</button>'
+                        }else{
+                            return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refunding" shiro:hasPermission="user:update">退款进度</button>'
+                                +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refundOrderDetail" shiro:hasPermission="user:update">订单详情</button>'
+                                +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="paymentInfo" shiro:hasPermission="user:update">收款方式</button>'
+                        }
+
+                        },minWidth: 300,align:'center'}
                 ]]
             });
         }

--
Gitblit v1.9.1