Forráskód Böngészése

Merge remote-tracking branch 'origin/developer' into developerB

zhijiezhao 3 éve
szülő
commit
a15e115b9a

+ 17 - 8
src/main/java/com/caimei/modules/order/entity/CmRefundShop.java

@@ -13,13 +13,13 @@ import java.util.List;
  * @version 2019-07-01
  */
 public class CmRefundShop extends DataEntity<CmRefundShop> {
-	
+
 	private static final long serialVersionUID = 1L;
 	private String shopID;		// 供应商Id
 	private String shopName;		// 供应商名称
 	private String operator;		// 操作人ID
 	private String operatTime;		// 操作时间
-	private String refundWay;       //退款方式:1线下转账,2余额账号,3线下和余额同时退
+	private String refundWay;       //退款方式:1线下转账,2余额账号,3线下和余额同时退,4收款CRM(供应商退款)
 	private Double refundBalanceAmount;   //退款余额金额(余额账号)
 	private Double refundAmount;		// 退款金额(线下转账)
 	private String refundType;		// 线下转账具体银行
@@ -30,6 +30,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	private String endTime;
 	private String shopOrderIDs; //关联子订单ids
 	private String operatorName; //操作人名称
+	private String crmOperatorName;
 	private String shopOrderID;  //子订单ID
 	private String orderID;      //主订单ID
 	private String orderNo;      //订单编号
@@ -61,7 +62,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setShopID(String shopID) {
 		this.shopID = shopID;
 	}
-	
+
 	@Length(min=0, max=11, message="操作人ID长度必须介于 0 和 11 之间")
 	public String getOperator() {
 		return operator;
@@ -70,7 +71,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setOperator(String operator) {
 		this.operator = operator;
 	}
-	
+
 	@Length(min=0, max=19, message="操作时间长度必须介于 0 和 19 之间")
 	public String getOperatTime() {
 		return operatTime;
@@ -79,7 +80,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setOperatTime(String operatTime) {
 		this.operatTime = operatTime;
 	}
-	
+
 	public Double getRefundAmount() {
 		return refundAmount;
 	}
@@ -87,7 +88,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setRefundAmount(Double refundAmount) {
 		this.refundAmount = refundAmount;
 	}
-	
+
 	@Length(min=0, max=1, message="接收退款方式长度必须介于 0 和 1 之间")
 	public String getRefundType() {
 		return refundType;
@@ -96,7 +97,7 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setRefundType(String refundWay) {
 		this.refundType = refundWay;
 	}
-	
+
 	@Length(min=0, max=100, message="付款时间长度必须介于 0 和 100 之间")
 	public String getRemark() {
 		return remark;
@@ -155,6 +156,14 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 		this.operatorName = operatorName;
 	}
 
+	public String getCrmOperatorName() {
+		return crmOperatorName;
+	}
+
+	public void setCrmOperatorName(String crmOperatorName) {
+		this.crmOperatorName = crmOperatorName;
+	}
+
 	public String getShopOrderID() {
 		return shopOrderID;
 	}
@@ -210,4 +219,4 @@ public class CmRefundShop extends DataEntity<CmRefundShop> {
 	public void setShopDifference(ChangePayShopDifference shopDifference) {
 		this.shopDifference = shopDifference;
 	}
-}
+}

+ 43 - 36
src/main/java/com/caimei/modules/order/service/CmDiscernReceiptService.java

@@ -11,6 +11,7 @@ import com.caimei.utils.MathUtil;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import com.thinkgem.jeesite.common.utils.DateUtils;
+import com.thinkgem.jeesite.common.utils.ObjectUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.thinkgem.jeesite.modules.sys.entity.User;
 import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
@@ -71,29 +72,31 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
             if ("1".equals(bean.getReceiptType()) || "3".equals(bean.getReceiptType()) || "5".equals(bean.getReceiptType())) {
                 List<Map<String, Object>> orderIDs = cmDiscernReceiptDao.getOrderIDStr(bean.getId());
                 for (Map<String, Object> map : orderIDs) {
-                    if ("".equals(type)) {
-//					协销订单 0 普通订单 1',
-                        Integer orderType = (Integer) map.get("orderType");
-                        if (null != map.get("orderType")) {
-                            type += map.get("orderType").toString().equals("0") ? "协销" : "自主";
+                    if (!ObjectUtils.isEmpty(map)) {
+                        if ("".equals(type)) {
+                            // 协销订单 0 普通订单 1',
+                            Integer orderType = (Integer) map.get("orderType");
+                            if (null != map.get("orderType")) {
+                                type += map.get("orderType").toString().equals("0") ? "协销" : "自主";
+                            } else {
+                                type += "自主";
+                            }
+                            if (2 == orderType) {
+                                //呵呵商城订单
+                                Integer orderId = ((Long) map.get("orderID")).intValue();
+                                NewOrder order = newOrderDao.findByOrderID(orderId);
+                                String name = heHeNewOrderDao.findHeUser(order.getUserID());
+                                bean.setName(name);
+                                bean.setReceiptOrderType("2");
+                            }
                         } else {
-                            type += "自主";
+                            type += ("<br>" + (map.get("orderType").toString().equals("0") ? "协销" : "自主"));
                         }
-                        if (2 == orderType) {
-                            //呵呵商城订单
-                            Integer orderId = ((Long) map.get("orderID")).intValue();
-                            NewOrder order = newOrderDao.findByOrderID(orderId);
-                            String name = heHeNewOrderDao.findHeUser(order.getUserID());
-                            bean.setName(name);
-                            bean.setReceiptOrderType("2");
+                        if ("".equals(no)) {
+                            no += "<a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo") + "</a>";
+                        } else {
+                            no += ("<br><a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo")) + "</a>";
                         }
-                    } else {
-                        type += ("<br>" + (map.get("orderType").toString().equals("0") ? "协销" : "自主"));
-                    }
-                    if ("".equals(no)) {
-                        no += "<a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo") + "</a>";
-                    } else {
-                        no += ("<br><a href='/a/order/detail?id=" + map.get("orderID") + "'>" + map.get("orderNo")) + "</a>";
                     }
                 }
             }
@@ -137,29 +140,33 @@ public class CmDiscernReceiptService extends CrudService<CmDiscernReceiptDao, Cm
             ReceiptOrderInfoVo roi = null; //这是通过订单列表上的一条收款记录对应的多个订单中的一个订单
             if ("1".equals(relation.getRelationType())) { // relation.orderID 指的是子订单id
                 roi = cmDiscernReceiptDao.getOrderInfoByShopOrderID(relation.getOrderID());
-                roi.setRelationType("1");
-                if ("5".equals(vo.getReceiptType())) {
-                    //供应商退款,已退金额
-                    List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(roi.getShopOrderID());
-                    if (records != null && records.size() > 0) {
-                        Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
-                        roi.setRefundsAmount(collect);
-                    } else {
-                        roi.setRefundsAmount(0d);
+                if (null != roi) {
+                    roi.setRelationType("1");
+                    if ("5".equals(vo.getReceiptType())) {
+                        //供应商退款,已退金额
+                        List<CmRefundShopRecord> records = cmRefundShopRecordDao.getRefundedRecords(roi.getShopOrderID());
+                        if (records != null && records.size() > 0) {
+                            Double collect = records.stream().mapToDouble(CmRefundShopRecord::getRefundAmount).sum();
+                            roi.setRefundsAmount(collect);
+                        } else {
+                            roi.setRefundsAmount(0d);
+                        }
+                        //查询收款供应商退款金额
+                        BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
+                        BigDecimal refundsAmount = MathUtil.add(roi.getRefundsAmount(), shopRefundAmount);
+                        roi.setRefundsAmount(refundsAmount.doubleValue());
                     }
-                    //查询收款供应商退款金额
-                    BigDecimal shopRefundAmount = cmRefundShopRecordDao.findShopRefund(Integer.valueOf(roi.getShopOrderID()));
-                    BigDecimal refundsAmount = MathUtil.add(roi.getRefundsAmount(), shopRefundAmount);
-                    roi.setRefundsAmount(refundsAmount.doubleValue());
                 }
             }
             if ("2".equals(relation.getRelationType())) { // relation.orderID 指的是主订单id
                 roi = cmDiscernReceiptDao.getOrderInfoByOrderID(relation.getOrderID());
-                roi.setRelationType("2");
+                if (null != roi) {
+                    roi.setRelationType("2");
+                }
             }
-            if (roi != null) {
+            if (null != roi) {
                 List<ReceiptRecordVo> receiptRecordByOrderID = cmDiscernReceiptDao.findReceiptRecordByOrderID(roi);
-//                暂时不启用抹平明细
+                //                暂时不启用抹平明细
                 if (CollectionUtils.isNotEmpty(receiptRecordByOrderID)) {
                     for (ReceiptRecordVo v : receiptRecordByOrderID) {
                         if (StringUtils.equals("3", v.getConfirmType())) {

+ 9 - 7
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -158,13 +158,15 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                 }
             }
             newShopOrders.forEach(shopOrder -> {
-                NewOrder order = newOrderDao.findByOrderID(shopOrder.getOrderID());
-                if ("2".equals(order.getOrderType())) {
-                    //呵呵商城订单
-                    shopOrder.setOrderType(2);
-                    if (StringUtils.isBlank(shopOrder.getClubName())) {
-                        String name = heHeNewOrderDao.findHeUser(order.getUserID());
-                        shopOrder.setClubName(name);
+                if (null != shopOrder) {
+                    NewOrder order = newOrderDao.findByOrderID(shopOrder.getOrderID());
+                    if (null != order && "2".equals(order.getOrderType())) {
+                        //呵呵商城订单
+                        shopOrder.setOrderType(2);
+                        if (StringUtils.isBlank(shopOrder.getClubName())) {
+                            String name = heHeNewOrderDao.findHeUser(order.getUserID());
+                            shopOrder.setClubName(name);
+                        }
                     }
                 }
             });

+ 47 - 12
src/main/java/com/caimei/modules/order/service/CmRefundShopService.java

@@ -67,18 +67,20 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
             String str = "";
             String ono = "";
             for (String i : idInfo) {
-                String no = i.split("_")[0];
-                String od = i.split("_")[1];
-                String id = i.split("_")[2];
-                if ("".equals(str)) {
-                    str += ("<a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + no + "</a>");
-                } else {
-                    str += ("<br><a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + no + "</a>");
-                }
-                if ("".equals(ono)) {
-                    ono += ("<a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + od + "</a>");
-                } else {
-                    ono += ("<br><a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + od + "</a>");
+                if (StringUtils.isNotEmpty(i)) {
+                    String no = i.split("_")[0];
+                    String od = i.split("_")[1];
+                    String id = i.split("_")[2];
+                    if ("".equals(str)) {
+                        str += ("<a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + no + "</a>");
+                    } else {
+                        str += ("<br><a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + no + "</a>");
+                    }
+                    if ("".equals(ono)) {
+                        ono += ("<a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + od + "</a>");
+                    } else {
+                        ono += ("<br><a href=" + Global.getAdminPath() + "/order/detail?id=" + id + ">" + od + "</a>");
+                    }
                 }
             }
             crs.setShopOrderIDs(str);
@@ -88,6 +90,39 @@ public class CmRefundShopService extends CrudService<CmRefundShopDao, CmRefundSh
         return page;
     }
 
+    public List<CmRefundShop> exports(Page<CmRefundShop> page, CmRefundShop cmRefundShop){
+        cmRefundShop.setPage(page);
+        List<CmRefundShop> result = cmRefundShopDao.findList(cmRefundShop);
+        for (CmRefundShop crs : result) {
+            List<String> idInfo = cmRefundShopRecordDao.findByRefundShopID(crs.getId());
+            String str = "";
+            String ono = "";
+            for (String i : idInfo) {
+                if (StringUtils.isNotEmpty(i)) {
+                    String no = i.split("_")[0];
+                    String od = i.split("_")[1];
+                    String id = i.split("_")[2];
+                    if ("".equals(str)) {
+                        str += no;
+                    } else {
+                        str += "," + no;
+                    }
+                    if ("".equals(ono)) {
+                        ono += od;
+                    } else {
+                        ono += "," + od;
+                    }
+                }
+            }
+            crs.setShopOrderIDs(str);
+            crs.setOrderNo(ono);
+            if ("4".equals(crs.getRefundWay())){
+                crs.setOperatorName(crs.getCrmOperatorName()+"(CRM)");
+            }
+        }
+        return result;
+    }
+
     @Transactional(readOnly = false)
     public void save(CmRefundShop cmRefundShop) {
         super.save(cmRefundShop);

+ 40 - 14
src/main/java/com/caimei/modules/order/web/CmRefundShopController.java

@@ -1,10 +1,15 @@
 package com.caimei.modules.order.web;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.caimei.modules.common.utils.ExcelUtil;
+import com.caimei.modules.order.entity.CmPayShop;
+import com.caimei.modules.order.entity.CmRefundShop;
+import com.caimei.modules.order.service.CmRefundShopService;
 import com.caimei.modules.user.entity.CmUserOrganize;
 import com.caimei.modules.user.service.CmUserOrganizeService;
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -14,14 +19,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
-import com.thinkgem.jeesite.common.config.Global;
-import com.thinkgem.jeesite.common.persistence.Page;
-import com.thinkgem.jeesite.common.web.BaseController;
-import com.thinkgem.jeesite.common.utils.StringUtils;
-import com.caimei.modules.order.entity.CmRefundShop;
-import com.caimei.modules.order.service.CmRefundShopService;
-
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 退款表--供应商退款给采美Controller
@@ -37,7 +39,7 @@ public class CmRefundShopController extends BaseController {
 
 	@Autowired
 	private CmUserOrganizeService cmUserOrganizeService;
-	
+
 	@ModelAttribute
 	public CmRefundShop get(@RequestParam(required=false) String id) {
 		CmRefundShop entity = null;
@@ -49,7 +51,7 @@ public class CmRefundShopController extends BaseController {
 		}
 		return entity;
 	}
-	
+
 	@RequiresPermissions("order:cmRefundShop:view")
 	@RequestMapping(value = {"list", ""})
 	public String list(CmRefundShop cmRefundShop, HttpServletRequest request, HttpServletResponse response, Model model) {
@@ -69,6 +71,30 @@ public class CmRefundShopController extends BaseController {
 		return "modules/order/cmRefundShopList";
 	}
 
+	@RequestMapping(value = "export")
+	public void exports(CmRefundShop cmRefundShop, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		if (null != cmRefundShop.getStartTime() && !"".equals(cmRefundShop.getStartTime()) && !cmRefundShop.getStartTime().endsWith("00:00:00")) {
+			cmRefundShop.setStartTime(cmRefundShop.getStartTime().trim() + " 00:00:00");
+		}
+		if (null != cmRefundShop.getEndTime() && !"".equals(cmRefundShop.getEndTime()) && !cmRefundShop.getEndTime().endsWith("23:59:59")) {
+			cmRefundShop.setEndTime(cmRefundShop.getEndTime().trim() + " 23:59:59");
+		}
+		//获取订单数据
+		String fileName = "退款记录列表.xls";
+		String template = Global.getConfig("export.template");
+		String templateFileName = template + "/refundShopList.xls";
+		try {
+			Map data = new HashMap<String, Object>();
+			List<CmRefundShop> list = cmRefundShopService.exports(new Page<CmRefundShop>(request, response), cmRefundShop);
+			data.put("list", list);
+			new ExcelUtil().createExcel(templateFileName, data, fileName, response);
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "退款记录列表导出失败!" + e.getMessage());
+			logger.info(e.getMessage());
+			e.printStackTrace();
+		}
+	}
+
 	@RequiresPermissions("order:cmRefundShop:view")
 	@RequestMapping(value = "form")
 	public String form(CmRefundShop cmRefundShop, Model model) {
@@ -86,7 +112,7 @@ public class CmRefundShopController extends BaseController {
 		addMessage(redirectAttributes, "保存退款表--供应商退款给采美成功");
 		return "redirect:"+Global.getAdminPath()+"/order/cmRefundShop/?repage";
 	}
-	
+
 	@RequiresPermissions("order:cmRefundShop:delete")
 	@RequestMapping(value = "delete")
 	public String delete(CmRefundShop cmRefundShop, RedirectAttributes redirectAttributes) {
@@ -145,4 +171,4 @@ public class CmRefundShopController extends BaseController {
 		}
 		return "redirect:"+Global.getAdminPath()+"/order/cmRefundShop/?repage";
 	}
-}
+}

+ 1 - 0
src/main/java/com/thinkgem/jeesite/common/service/CrudService.java

@@ -11,6 +11,7 @@ import com.caimei.modules.bulkpurchase.entity.PurchaseProduct;
 import com.caimei.modules.hehe.entity.HeheOrder;
 import com.caimei.modules.hehe.entity.HeheProduct;
 import com.caimei.modules.hehe.entity.HeheTransaction;
+import com.caimei.modules.order.entity.CmRefundShop;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 

BIN
src/main/resources/export/refundShopList.xls


+ 18 - 14
src/main/resources/mappings/modules/order/CmRefundShopMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.order.dao.CmRefundShopDao">
-    
+
 	<sql id="cmRefundShopColumns">
 		a.id AS "id",
 		a.shopID AS "shopID",
@@ -14,31 +14,35 @@
 		a.refundBalanceAmount AS "refundBalanceAmount",
 		a.delFlag AS "delFlag"
 	</sql>
-	
+
 	<sql id="cmRefundShopJoins">
 	</sql>
-    
+
 	<select id="get" resultType="CmRefundShop">
-		SELECT 
+		SELECT
 			<include refid="cmRefundShopColumns"/>,
-			s.name AS shopName
+			s.name AS shopName,
+		    up.name AS crmOperatorName
 		FROM cm_refund_shop a
 		<include refid="cmRefundShopJoins"/>
 		left join shop s on s.shopID = a.shopID
+		left join receipt_user_permission up on up.id = a.operator
 		WHERE a.id = #{id}
 		AND a.delFlag='0'
 	</select>
-	
+
 	<select id="findList" resultType="CmRefundShop">
 		SELECT DISTINCT
 			<include refid="cmRefundShopColumns"/>,
 			crsr.refundType AS recordRefundType,
 			u.name AS operatorName,
+			up.name AS crmOperatorName,
 			s.name AS shopName
 		FROM cm_refund_shop a
 		LEFT JOIN cm_refund_shop_record crsr ON crsr.refundShopID = a.id
 		left join shop s on s.shopID = a.shopID
 		left join sys_user u on u.id = a.operator
+		left join receipt_user_permission up on up.id = a.operator
 		<where>
 			<if test="organizeID != null and organizeID != 9999 and organizeID != 0 ">
 				AND a.id IN (
@@ -102,15 +106,15 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<select id="findAllList" resultType="CmRefundShop">
-		SELECT 
+		SELECT
 			<include refid="cmRefundShopColumns"/>
 		FROM cm_refund_shop a
 		<include refid="cmRefundShopJoins"/>
 		<where>
 			AND a.delFlag='0'
-		</where>		
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -119,7 +123,7 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert" parameterType="CmRefundShop"  keyProperty="id" useGeneratedKeys="true">
 		INSERT INTO cm_refund_shop(
 			id,
@@ -145,9 +149,9 @@
 			#{delFlag}
 		)
 	</insert>
-	
+
 	<update id="update">
-		UPDATE cm_refund_shop SET 	
+		UPDATE cm_refund_shop SET
 			shopID = #{shopID},
 			operator = #{operator},
 			operatTime = #{operatTime},
@@ -159,7 +163,7 @@
 			delFlag = #{delFlag}
 		WHERE id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		DELETE FROM cm_refund_shop
 		WHERE id = #{id}
@@ -192,4 +196,4 @@
 		group by cfs.id
 		ORDER BY cfs.operatTime desc;
 	</select>
-</mapper>
+</mapper>

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp

@@ -220,12 +220,12 @@
                     <span class="org-note">星范</span>
                 </c:if>
                     ${cmDiscernReceipt.name}
+                <c:if test="${cmDiscernReceipt.name eq null or cmDiscernReceipt.name  == ''}">
+                    ${cmDiscernReceipt.userName}
+                </c:if>
                 <c:if test="${cmDiscernReceipt.receiptOrderType eq 2}">
                     <font color="red">(呵呵商城)</font>
                 </c:if>
-                <c:if test="${cmDiscernReceipt.organizeID == 3}">
-
-                </c:if>
             </td>
             <td>
                 <c:if test="${cmDiscernReceipt.receiptType != 6}">${cmDiscernReceipt.orderType}</c:if>

+ 8 - 2
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopDetail.jsp

@@ -247,7 +247,7 @@
 					<label>接收退款方式:</label>
 					<div>
 						<div class="refund-wrapper">
-							<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'}">
+							<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'||cmRefundShop.refundWay == '4'}">
 								线下转账:
 								<c:if test="${cmRefundShop.refundType == '1'}">
 									建设银行7297
@@ -268,6 +268,9 @@
 									虚拟银行0000
 								</c:if>
 								,¥${cmRefundShop.refundAmount}
+								<c:if test="${cmRefundShop.refundWay eq 4}">
+									,${cmRefundShop.crmOperatorName}确认(CRM收款:${cmRefundShop.operatTime})
+								</c:if>
 							</c:if>
 						</div>
 						<div class="refund-wrapper">
@@ -296,7 +299,7 @@
 				<ul><b>接收退款方式:</b></ul>
 				<div style="margin-left: 100px">
 					<div class="refund-wrapper">
-						<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'}">
+						<c:if test="${cmRefundShop.refundWay == '1'||cmRefundShop.refundWay == '3'||cmRefundShop.refundWay == '4'}">
 							线下转账:
 							<c:if test="${cmRefundShop.refundType == '1'}">
 								建设银行7297
@@ -317,6 +320,9 @@
 								虚拟银行0000
 							</c:if>
 							,¥${cmRefundShop.refundAmount}
+							<c:if test="${cmRefundShop.refundWay eq 4}">
+								,${cmRefundShop.crmOperatorName}确认(CRM收款:${cmRefundShop.operatTime})
+							</c:if>
 						</c:if>
 					</div>
 					<div class="refund-wrapper">

+ 16 - 3
src/main/webapp/WEB-INF/views/modules/order/cmRefundShopList.jsp

@@ -40,6 +40,12 @@
 			$("#searchForm").submit();
         	return false;
         }
+		$(function () {
+			$('#export').click(function () {
+				var formData = $('#searchForm').serialize();
+				window.location.href = "${ctx}/order/cmRefundShop/export?" + formData;
+			});
+		})
 	</script>
 </head>
 <body>
@@ -82,7 +88,8 @@
 					<form:options items="${cmUserOrganizeList}" itemLabel="organizeName" itemValue="id"
 								  htmlEscape="false"/>
 				</form:select>
-				<input id="btnSubmit"  class="btn btn-primary"  type="submit" value="查询"  style="width:120px;margin-left:730px;"/>
+				<input id="btnSubmit"  class="btn btn-primary"  type="submit" value=" 查询 " style="padding-left:50px;padding-right:50px;margin:0 20px;"/>
+				<input id="export" class="btn btn-primary" value="导出筛选结果"/>
 				<div class="clearfix"></div>
 			</div>
 		</div>
@@ -114,11 +121,17 @@
 				</td>
 				<td>${cmRefundShop.shopOrderIDs}</td>
 				<td>${cmRefundShop.orderNo}</td>
-				<td>${cmRefundShop.operatorName}</td>
+				<td><c:if test="${cmRefundShop.refundWay ne 4}">
+						${cmRefundShop.operatorName}
+					</c:if>
+					<c:if test="${cmRefundShop.refundWay eq 4}">
+						${cmRefundShop.crmOperatorName}(CRM)
+					</c:if>
+				</td>
 				<td>${cmRefundShop.operatTime}</td>
 				<shiro:hasPermission name="order:cmRefundShop:view"><td>
     				<a href="${ctx}/order/cmRefundShop/toRefund?id=${cmRefundShop.id}">查看详情</a>&nbsp&nbsp
-					<c:if test="${cmRefundShop.recordRefundType ne 5}">
+					<c:if test="${cmRefundShop.recordRefundType ne 5 and cmRefundShop.refundWay ne 4}">
 						<a href="${ctx}/order/cmRefundShop/revocation?id=${cmRefundShop.id}" onclick="return confirmx('确定撤销此次退款吗?', this.href)">撤销退款</a>
 					</c:if>
 				</td></shiro:hasPermission>