From 759ea84461a2858c9ff552de3622dea2557e32a9 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 24 Sep 2021 11:11:52 +0800
Subject: [PATCH] Merge branch 'master' of http://120.27.238.55:7000/r/xc-mall
---
src/main/resources/templates/febs/views/modules/order/refundList.html | 62 ++++++++++++++++++------------
1 files changed, 37 insertions(+), 25 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..6670c4c 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,36 @@
table.on('tool(orderRefundTable)', function (obj) {
var data = obj.data,
layEvent = obj.event;
- if (layEvent === 'deliverGoods') {
- febs.modal.open('发货', 'modules/order/deliverGoods/' + data.id, {
- btn: ['确认', '取消'],
- yes: function (index, layero) {
- $('#deliver-update').find('#submit').trigger('click');
- },
- btn2: function () {
- layer.closeAll();
- }
- });
- }
- if (layEvent === 'seeOrder') {
- febs.modal.open( '订单详情', 'modules/order/orderDetail/' + data.id, {
+ if (layEvent === 'refunding') {
+ febs.modal.open( '退款进度', 'modules/order/seeRefund/' + data.id, {
maxmin: true,
});
}
+ if (layEvent === 'agree') {
+ febs.modal.confirm('同意', '同意此次退款申请?', function () {
+ agreeRefund(data.id);
+ });
+ }
+ if (layEvent === 'disagree') {
+ febs.modal.confirm('拒绝', '拒绝此次退款申请?', function () {
+ disagreeRefund(data.id);
+ });
+ }
});
+
+ 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();
+ });
+ }
// 查询按钮
$query.on('click', function () {
@@ -114,10 +127,6 @@
$searchForm[0].reset();
sortObject.type = 'null';
tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
- });
-
- $add.on('click', function () {
- febs.view.tab.change("/modules/goods/goodsAddNew/");
});
function initTable() {
@@ -157,14 +166,17 @@
// }
// }, 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'}
+ {title: '操作',
+ templet: function (d) {
+ if(d.status === 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>'
+ }else{
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refunding" shiro:hasPermission="user:update">退款进度</button>'
+ }
+
+ },minWidth: 300,align:'center'}
]]
});
}
--
Gitblit v1.9.1