From fc8453995e0332ff313dacc27d081568caa0975f Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 24 Sep 2021 15:32:58 +0800 Subject: [PATCH] Merge branch 'master' of http://120.27.238.55:7000/r/xc-mall --- src/main/resources/templates/febs/views/modules/order/orderDetail.html | 2 src/main/java/cc/mrbird/febs/mall/mapper/MallMemberMapper.java | 1 src/main/java/cc/mrbird/febs/mall/vo/AdminMallOrderInfoVo.java | 3 src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallOrderService.java | 44 ++++++++ src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java | 17 +++ src/main/resources/mapper/modules/MallMemberMapper.xml | 2 src/main/resources/templates/febs/views/modules/order/refundList.html | 15 +++ src/main/resources/mapper/modules/MallOrderInfoMapper.xml | 2 src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html | 70 ++++++++++++++ src/main/java/cc/mrbird/febs/mall/service/IAdminMallOrderService.java | 2 src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java | 12 ++ src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html | 7 + src/main/java/cc/mrbird/febs/mall/controller/ViewMallMemberController.java | 24 ++++ src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java | 27 +++++ src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java | 11 ++ src/main/resources/mapper/modules/MallMoneyFlowMapper.xml | 5 + src/main/resources/templates/febs/views/modules/mallMember/detail.html | 8 + src/main/resources/templates/febs/views/modules/order/orderList.html | 8 + src/main/java/cc/mrbird/febs/mall/mapper/MallMoneyFlowMapper.java | 8 + src/main/java/cc/mrbird/febs/mall/service/IAdminMallMemberService.java | 4 20 files changed, 269 insertions(+), 3 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java index aee034e..9ef0804 100644 --- a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java +++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java @@ -5,6 +5,7 @@ import cc.mrbird.febs.common.entity.FebsResponse; import cc.mrbird.febs.common.entity.QueryRequest; import cc.mrbird.febs.mall.entity.MallMember; +import cc.mrbird.febs.mall.entity.MallOrderRefund; import cc.mrbird.febs.mall.service.IAdminMallMemberService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -59,4 +60,20 @@ public FebsResponse openAccount(@NotNull(message = "{required}") @PathVariable Long id) { return mallMemberService.openAccount(id); } + + /** + * 会员列表-资金流水 + */ + @GetMapping("/moneyFlow") + public FebsResponse moneyFlow(QueryRequest request, MallMember mallMember, Integer parentId) { + if(parentId==null){ + ViewMallMemberController.idFromMoneyFlow=0; + } + mallMember.setId(ViewMallOrderController.idFromRefund); + Map<String, Object> dataTable = getDataTable(mallMemberService.moneyFlow(request, mallMember)); + return new FebsResponse().success().data(dataTable); + } + + + } diff --git a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java index 3495527..dde4ce5 100644 --- a/src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java +++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java @@ -97,6 +97,17 @@ return adminMallOrderService.disagreeRefund(id); } + /** + * 订单退款-退款确认 + * @param id + * @return + */ + @GetMapping("refundConfirm/{id}") + @ControllerEndpoint(operation = "订单退款-退款确认", exceptionMessage = "操作失败") + public FebsResponse refundConfirm(@NotNull(message = "{required}") @PathVariable Long id) { + return adminMallOrderService.refundConfirm(id); + } + diff --git a/src/main/java/cc/mrbird/febs/mall/controller/ViewMallMemberController.java b/src/main/java/cc/mrbird/febs/mall/controller/ViewMallMemberController.java index 4faee7f..9057754 100644 --- a/src/main/java/cc/mrbird/febs/mall/controller/ViewMallMemberController.java +++ b/src/main/java/cc/mrbird/febs/mall/controller/ViewMallMemberController.java @@ -21,6 +21,8 @@ private final IAdminMallMemberService mallMemberService; + public static long idFromMoneyFlow; + /** * 会员列表 * @return @@ -45,4 +47,26 @@ return FebsUtil.view("modules/mallMember/detail"); } + /** + * 会员列表-资金流水 + * @param id + * @param model + * @return + */ + @GetMapping("moneyFlow/{id}") + public String moneyFlow(@PathVariable long id, Model model) { + idFromMoneyFlow = id; + return FebsUtil.view("modules/mallMember/moneyFlow"); + } + + + + + + + + + + + } diff --git a/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberMapper.java b/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberMapper.java index 513984a..3708e77 100644 --- a/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberMapper.java +++ b/src/main/java/cc/mrbird/febs/mall/mapper/MallMemberMapper.java @@ -20,5 +20,6 @@ MallMember selectInfoByInviteId(@Param("inviteId") String inviteId); MallMember selectInfoByAccountAndPwd(@Param("account") String account, @Param("password") String password); + MallMemberVo getMallMemberInfoById(@Param("id")long id); } diff --git a/src/main/java/cc/mrbird/febs/mall/mapper/MallMoneyFlowMapper.java b/src/main/java/cc/mrbird/febs/mall/mapper/MallMoneyFlowMapper.java index 7e1e324..026adac 100644 --- a/src/main/java/cc/mrbird/febs/mall/mapper/MallMoneyFlowMapper.java +++ b/src/main/java/cc/mrbird/febs/mall/mapper/MallMoneyFlowMapper.java @@ -1,7 +1,15 @@ package cc.mrbird.febs.mall.mapper; +import cc.mrbird.febs.mall.entity.MallMember; import cc.mrbird.febs.mall.entity.MallMoneyFlow; +import cc.mrbird.febs.mall.vo.AdminMallMoneyFlowVo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; public interface MallMoneyFlowMapper extends BaseMapper<MallMoneyFlow> { + + IPage<AdminMallMoneyFlowVo> selectMoneyFlowInPage(Page<AdminMallMoneyFlowVo> page, @Param("record")MallMember mallMember); + } diff --git a/src/main/java/cc/mrbird/febs/mall/service/IAdminMallMemberService.java b/src/main/java/cc/mrbird/febs/mall/service/IAdminMallMemberService.java index 91a6cdc..174be53 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/IAdminMallMemberService.java +++ b/src/main/java/cc/mrbird/febs/mall/service/IAdminMallMemberService.java @@ -4,6 +4,8 @@ import cc.mrbird.febs.common.entity.QueryRequest; import cc.mrbird.febs.mall.dto.RegisterDto; import cc.mrbird.febs.mall.entity.MallMember; +import cc.mrbird.febs.mall.entity.MallMoneyFlow; +import cc.mrbird.febs.mall.vo.AdminMallMoneyFlowVo; import cc.mrbird.febs.mall.vo.MallMemberVo; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; @@ -19,4 +21,6 @@ FebsResponse openAccount(@NotNull(message = "{required}") Long id); MallMemberVo getMallMemberInfoById(@NotNull(message = "{required}") long id); + + IPage<AdminMallMoneyFlowVo> moneyFlow(QueryRequest request, MallMember mallMember); } diff --git a/src/main/java/cc/mrbird/febs/mall/service/IAdminMallOrderService.java b/src/main/java/cc/mrbird/febs/mall/service/IAdminMallOrderService.java index 09fced6..a682fa8 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/IAdminMallOrderService.java +++ b/src/main/java/cc/mrbird/febs/mall/service/IAdminMallOrderService.java @@ -28,4 +28,6 @@ FebsResponse agreeRefund(Long id); FebsResponse disagreeRefund(Long id); + + FebsResponse refundConfirm(Long id); } diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java index bc8642c..6a0273e 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java @@ -4,7 +4,10 @@ import cc.mrbird.febs.common.entity.QueryRequest; import cc.mrbird.febs.mall.entity.MallMember; import cc.mrbird.febs.mall.mapper.MallMemberMapper; +import cc.mrbird.febs.mall.mapper.MallMoneyFlowMapper; import cc.mrbird.febs.mall.service.IAdminMallMemberService; +import cc.mrbird.febs.mall.vo.AdminMallMoneyFlowVo; +import cc.mrbird.febs.mall.vo.AdminMallOrderRefundOperationVo; import cc.mrbird.febs.mall.vo.MallMemberVo; import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -24,6 +27,8 @@ public class AdminMallMemberServiceImpl extends ServiceImpl<MallMemberMapper, MallMember> implements IAdminMallMemberService { private final MallMemberMapper mallMemberMapper; + + private final MallMoneyFlowMapper mallMoneyFlowMapper; @Override public IPage<MallMember> getMallMemberList(MallMember mallMember, QueryRequest request) { @@ -60,4 +65,11 @@ return mallMemberVo; } + @Override + public IPage<AdminMallMoneyFlowVo> moneyFlow(QueryRequest request, MallMember mallMember) { + Page<AdminMallMoneyFlowVo> page = new Page<>(request.getPageNum(), request.getPageSize()); + IPage<AdminMallMoneyFlowVo> adminMallMoneyFlowVos = mallMoneyFlowMapper.selectMoneyFlowInPage(page, mallMember); + return adminMallMoneyFlowVos; + } + } diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallOrderService.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallOrderService.java index b862a1a..3de0c88 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallOrderService.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallOrderService.java @@ -8,6 +8,7 @@ import cc.mrbird.febs.mall.entity.*; import cc.mrbird.febs.mall.mapper.*; import cc.mrbird.febs.mall.service.IAdminMallOrderService; +import cc.mrbird.febs.mall.service.IApiMallMemberWalletService; import cc.mrbird.febs.mall.vo.*; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; @@ -35,6 +36,10 @@ private final MallOrderRefundMapper mallOrderRefundMapper; private final MallOrderRefundOperationMapper mallOrderRefundOperationMapper; + + private final MallMoneyFlowMapper mallMoneyFlowMapper; + + private final IApiMallMemberWalletService iApiMallMemberWalletService; @Override public IPage<AdminMallOrderInfoVo> getOrderListInPage(MallOrderInfoDto mallOrderInfo, QueryRequest request) { @@ -67,7 +72,8 @@ return new FebsResponse().fail().message("请输入物流公司"); } MallExpressInfo mallExpressInfo = new MallExpressInfo(); - mallExpressInfo.setMemberId(mallExpressInfo.getMemberId()); + mallExpressInfo.setMemberId(mallOrderInfo.getMemberId()); + mallExpressInfo.setOrderId(mallOrderInfo.getId()); mallExpressInfo.setExpressNo(expressNo); mallExpressInfo.setExpressCom(expressCom); mallExpressInfoMapper.insert(mallExpressInfo); @@ -149,5 +155,41 @@ return new FebsResponse().success(); } + @Override + public FebsResponse refundConfirm(Long id) { + MallOrderRefund mallOrderRefund = mallOrderRefundMapper.selectById(id); + if(ObjectUtil.isEmpty(mallOrderRefund)){ + return new FebsResponse().fail().message("系统繁忙,请刷新重试"); + } + mallOrderRefund.setStatus(5); + mallOrderRefundMapper.updateById(mallOrderRefund); + + MallOrderRefundOperation mallOrderRefundOperation = new MallOrderRefundOperation(); + mallOrderRefundOperation.setRefundId(mallOrderRefund.getId()); + mallOrderRefundOperation.setOrderId(mallOrderRefund.getOrderId()); + mallOrderRefundOperation.setContent("已退款到用户账户"); + mallOrderRefundOperationMapper.insert(mallOrderRefundOperation); + + MallOrderInfo mallOrderInfo = mallOrderInfoMapper.selectById(mallOrderRefund.getOrderId()); + if(ObjectUtil.isEmpty(mallOrderInfo)){ + return new FebsResponse().fail().message("系统繁忙,请刷新重试"); + } + mallOrderInfo.setStatus(6); + mallOrderInfoMapper.updateById(mallOrderInfo); + + //用户钱包增加对应的余额 + iApiMallMemberWalletService.addBalance(mallOrderInfo.getAmount(),mallOrderInfo.getMemberId()); + + //新增一条资金流水 + MallMoneyFlow mallMoneyFlow = new MallMoneyFlow(); + mallMoneyFlow.setMemberId(mallOrderRefund.getMemberId()); + mallMoneyFlow.setOrderNo(mallOrderInfo.getOrderNo()); + mallMoneyFlow.setType(4); + mallMoneyFlow.setAmount(mallOrderInfo.getAmount()); + mallMoneyFlowMapper.insert(mallMoneyFlow); + + return new FebsResponse().success(); + } + } diff --git a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java new file mode 100644 index 0000000..56dcbb7 --- /dev/null +++ b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java @@ -0,0 +1,27 @@ +package cc.mrbird.febs.mall.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +@Data +@ApiModel(value = "AdminMallMoneyFlowVo", description = "信息返回类") +public class AdminMallMoneyFlowVo { + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createdTime; + + private BigDecimal amount; + + private Integer type; + + private String orderNo; + + private String description; + + private String remark; + +} diff --git a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallOrderInfoVo.java b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallOrderInfoVo.java index e3e6e31..0a402ce 100644 --- a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallOrderInfoVo.java +++ b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallOrderInfoVo.java @@ -1,5 +1,6 @@ package cc.mrbird.febs.mall.vo; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import lombok.Data; @@ -16,8 +17,10 @@ private Long memberId; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date orderTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date payTime; private BigDecimal amount; diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml index 148abc5..96f8df2 100644 --- a/src/main/resources/mapper/modules/MallMemberMapper.xml +++ b/src/main/resources/mapper/modules/MallMemberMapper.xml @@ -36,9 +36,11 @@ a.level, a.account_status, a.CREATED_TIME, + c.balance, b.name FROM mall_member a LEFT JOIN mall_member b on a.referrer_id = b.invite_id + LEFT JOIN mall_member_wallet c on c.member_id = a.id where a.id = #{id} </select> diff --git a/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml b/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml index 9d3fa8b..9dfef8f 100644 --- a/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml +++ b/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml @@ -2,4 +2,9 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="cc.mrbird.febs.mall.mapper.MallMoneyFlowMapper"> + <select id="selectMoneyFlowInPage" resultType="cc.mrbird.febs.mall.vo.AdminMallMoneyFlowVo"> + select * from mall_money_flow a where a.member_id = #{record.id} + order by a.CREATED_TIME desc + </select> + </mapper> \ No newline at end of file diff --git a/src/main/resources/mapper/modules/MallOrderInfoMapper.xml b/src/main/resources/mapper/modules/MallOrderInfoMapper.xml index 85d9104..6128a0c 100644 --- a/src/main/resources/mapper/modules/MallOrderInfoMapper.xml +++ b/src/main/resources/mapper/modules/MallOrderInfoMapper.xml @@ -7,7 +7,7 @@ </select> <select id="selectOrderListInPage" resultType="cc.mrbird.febs.mall.vo.AdminMallOrderInfoVo"> - select * + select *,b.name memberName,b.phone memberPhone from mall_order_info a left join mall_member b on a.member_id = b.id <where> diff --git a/src/main/resources/templates/febs/views/modules/mallMember/detail.html b/src/main/resources/templates/febs/views/modules/mallMember/detail.html index 77577db..36606ba 100644 --- a/src/main/resources/templates/febs/views/modules/mallMember/detail.html +++ b/src/main/resources/templates/febs/views/modules/mallMember/detail.html @@ -33,6 +33,13 @@ </div> </div> <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">余额:</label> + <div class="layui-input-block"> + <input type="text" name="balance" data-th-id="${member.balance}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> <label class="layui-form-label febs-form-item-require">代理层级:</label> <div class="layui-input-block"> <input type="text" name="level" data-th-id="${member.level}" @@ -116,6 +123,7 @@ "phone": member.phone, "email": member.email, "sex": member.sex, + "balance": member.balance, "inviteId": member.inviteId, "referrerName": member.referrerName, "level": member.level, diff --git a/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html b/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html index dcff9c6..cffe25b 100644 --- a/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html +++ b/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html @@ -92,6 +92,11 @@ maxmin: true, }); } + if (layEvent === 'moneyFlow') { + febs.modal.open( '用户资金流水', 'modules/mallMember/moneyFlow/' + data.id, { + maxmin: true, + }); + } }); function closeAccount(id) { febs.get(ctx + 'admin/mallMember/closeAccount/' + id, null, function () { @@ -157,10 +162,12 @@ if (d.accountStatus === 1) { return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="see" shiro:hasPermission="user:update">详情</button>' +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="close" shiro:hasPermission="user:update">禁用</button>' + +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="moneyFlow" shiro:hasPermission="user:update">资金流水</button>' }else{ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="see" shiro:hasPermission="user:update">详情</button>' +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="open" shiro:hasPermission="user:update">启用</button>' + +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="moneyFlow" shiro:hasPermission="user:update">资金流水</button>' } },minWidth: 300,align:'center'} diff --git a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html new file mode 100644 index 0000000..880ec15 --- /dev/null +++ b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html @@ -0,0 +1,70 @@ +<div class="layui-fluid layui-anim febs-anim" id="febs-moneyFlow-child" lay-title="用户资金流水"> + <div class="layui-row febs-container"> + <div class="layui-col-md12"> + <div class="layui-card"> + <div class="layui-card-body febs-table-full"> + <table lay-filter="moneyFlowChild" lay-data="{id: 'moneyFlowChild'}"></table> + </div> + </div> + </div> + </div> +</div> +<script data-th-inline="none" type="text/javascript"> + layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect' ,'eleTree'], function () { + var $ = layui.jquery, + laydate = layui.laydate, + febs = layui.febs, + form = layui.form, + table = layui.table, + treeSelect = layui.treeSelect, + dropdown = layui.dropdown, + $view = $('#febs-moneyFlow-child'), + $query = $view.find('#queryChild'), + $searchForm = $view.find('formChild'), + sortObject = {field: 'createTime', type: null}, + tableIns, + createTimeFrom, + createTimeTo; + + form.render(); + + initTable(); + + laydate.render({ + elem: '#user-createTime', + range: true, + trigger: 'click' + }); + + + function initTable() { + tableIns = febs.table.init({ + elem: $view.find('table'), + id: 'moneyFlowChild', + url: ctx + 'admin/mallMember/moneyFlow?parentId=1', + cols: [[ + {field: 'orderNo', title: '订单编号', minWidth: 150,align:'center'}, + {field: 'type', title: '流水类型', + templet: function (d) { + if (d.type === 1) { + return '<span>分红收入</span>' + } else if (d.type === 2) { + return '<span>业绩奖励</span>' + } else if (d.type === 3) { + return '<span>订单支付</span>' + } else if (d.type === 4) { + return '<span>退款</span>' + }else{ + return '' + } + }, minWidth: 80,align:'center'}, + {field: 'amount', title: '金额', minWidth: 80,align:'center'}, + {field: 'createdTime', title: '时间', minWidth: 150,align:'left'}, + {field: 'description', title: '描述', minWidth: 150,align:'left'}, + {field: 'remark', title: '备注', minWidth: 150,align:'left'}, + ]] + }); + } + + }) +</script> \ No newline at end of file diff --git a/src/main/resources/templates/febs/views/modules/order/orderDetail.html b/src/main/resources/templates/febs/views/modules/order/orderDetail.html index b10a203..749b692 100644 --- a/src/main/resources/templates/febs/views/modules/order/orderDetail.html +++ b/src/main/resources/templates/febs/views/modules/order/orderDetail.html @@ -103,6 +103,8 @@ "phone": orderDetail.phone, "amount": orderDetail.amount, "orderItems": orderDetail.orderItems, + "expressNo": orderDetail.expressNo, + "expressCom": orderDetail.expressCom, "address": orderDetail.address }); } diff --git a/src/main/resources/templates/febs/views/modules/order/orderList.html b/src/main/resources/templates/febs/views/modules/order/orderList.html index 11bff7c..d5ac1aa 100644 --- a/src/main/resources/templates/febs/views/modules/order/orderList.html +++ b/src/main/resources/templates/febs/views/modules/order/orderList.html @@ -133,7 +133,12 @@ id: 'orderTable', url: ctx + 'admin/order/orderList', cols: [[ - {field: 'orderNo', title: '商品名称', minWidth: 150,align:'left'}, + {field: 'orderNo', title: '订单编号', minWidth: 150,align:'left'}, + {field: 'memberName', title: '购买人', minWidth: 150,align:'left'}, + {field: 'memberPhone', title: '联系方式', minWidth: 150,align:'left'}, + {field: 'amount', title: '订单金额', minWidth: 150,align:'left'}, + {field: 'orderTime', title: '下单时间', minWidth: 150,align:'left'}, + {field: 'payTime', title: '支付时间', minWidth: 150,align:'left'}, {field: 'status', title: '状态', templet: function (d) { if (d.status === 1) { @@ -169,6 +174,7 @@ templet: function (d) { if (d.status === 2) { return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="deliverGoods" shiro:hasPermission="user:update">发货</button>' + +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" 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>' } 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 6670c4c..69b1d7e 100644 --- a/src/main/resources/templates/febs/views/modules/order/refundList.html +++ b/src/main/resources/templates/febs/views/modules/order/refundList.html @@ -100,6 +100,11 @@ disagreeRefund(data.id); }); } + if (layEvent === 'refundConfirm') { + febs.modal.confirm('退款确认', '确认已退款?', function () { + refundConfirm(data.id); + }); + } }); function agreeRefund(id) { @@ -111,6 +116,13 @@ 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(); }); @@ -172,6 +184,9 @@ 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 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>' }else{ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="refunding" shiro:hasPermission="user:update">退款进度</button>' } -- Gitblit v1.9.1