ソースを参照

联合丽格V1.0.2

kaick 2 年 前
コミット
5f39d7ea84
27 ファイル変更1534 行追加1087 行削除
  1. 64 58
      src/main/java/com/caimei/modules/bulkpurchase/web/CmRefundsProductController.java
  2. 1 1
      src/main/java/com/caimei/modules/order/dao/NewOrderDao.java
  3. 1 1
      src/main/java/com/caimei/modules/order/entity/CmDiscernReceipt.java
  4. 34 2
      src/main/java/com/caimei/modules/order/entity/CmReturnedPurchase.java
  5. 19 1
      src/main/java/com/caimei/modules/order/entity/CmReturnedPurchaseProduct.java
  6. 21 0
      src/main/java/com/caimei/modules/order/entity/NewShopOrder.java
  7. 11 0
      src/main/java/com/caimei/modules/order/service/CmReceiptOrderRelationService.java
  8. 1 0
      src/main/java/com/caimei/modules/order/service/CmReturnedPurchaseService.java
  9. 2 2
      src/main/java/com/caimei/modules/order/service/NewOrderService.java
  10. 4 1
      src/main/java/com/caimei/modules/order/web/CmReturnedPurchaseController.java
  11. 58 35
      src/main/java/com/caimei/modules/order/web/NewOrderController.java
  12. 19 18
      src/main/resources/mappings/modules/cmpage/CmPageCentreMapper.xml
  13. 2 1
      src/main/resources/mappings/modules/newhome/NewPageFloorMapper.xml
  14. 2 1
      src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml
  15. 6 0
      src/main/resources/mappings/modules/order/CmReturnedPurchaseMapper.xml
  16. 3 0
      src/main/resources/mappings/modules/order/CmReturnedPurchaseProductMapper.xml
  17. 1 1
      src/main/resources/mappings/modules/order/OrderMapper.xml
  18. 2 1
      src/main/resources/mappings/modules/product/CmPromotionMapper.xml
  19. 4 1
      src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml
  20. 19 12
      src/main/resources/mappings/modules/product/ProductMapper.xml
  21. 9 13
      src/main/resources/mappings/modules/weisha/CmOrganizeProductMapper.xml
  22. 184 171
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderConfirmReturnRecord.jsp
  23. 238 225
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderReturnRecord.jsp
  24. 365 175
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/refundRecord.jsp
  25. 8 1
      src/main/webapp/WEB-INF/views/modules/order/cmDiscernReceiptList.jsp
  26. 24 13
      src/main/webapp/WEB-INF/views/modules/order/cmReturnedPurchaseList.jsp
  27. 432 353
      src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp

+ 64 - 58
src/main/java/com/caimei/modules/bulkpurchase/web/CmRefundsProductController.java

@@ -651,8 +651,12 @@ public class CmRefundsProductController extends BaseController {
     public String toRecturnRecordByOrderID(CmReturnedPurchase cmReturnedPurchase, String from, HttpServletRequest request, HttpServletResponse response, Model model) {
         try {
             NewOrder newOrder = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
+            //过滤子订单
+            List<NewShopOrder>  newShopOrders= newOrder.getNewShopOrders().stream().filter(newShopOrder -> newShopOrder.getShopOrderID() ==cmReturnedPurchase.getShopOrderID()).collect(Collectors.toList());
+            newOrder.setNewShopOrders(newShopOrders);
             cmReturnedPurchase.setOrderType(Integer.valueOf(newOrder.getOrderType()));
             List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
+
             Double returnedPurchaseFee = 0D;    //退款(退货)总金额
             Double refundFee = 0D;  //退款总额(给买家)
             for (CmReturnedPurchase bean : dataList) {
@@ -671,26 +675,29 @@ public class CmRefundsProductController extends BaseController {
             List<BpClause> bpClauses = bpClauseService.findList(bpClause);
             Integer lastReceiptDetailId = cmDiscernReceiptDao.findOrderLastReceiptDetailId(newOrder.getOrderID().toString());
             //联合丽格运费
-            String PostageInfo = null;
-            // 拼接运费信息--联合丽格
-            boolean isColdChina = newOrder.getNewShopOrders().stream().map(NewShopOrder::getIsColdChina).collect(Collectors.toList()).contains(1);
-            Double ColdChina = Double.valueOf(700);
-
-            if (isColdChina) {
-                if ("-1" == newOrder.getFreePostFlag()) {
-                    // 到付
-                    PostageInfo = "¥" + newOrder.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
-                } else if ("0" == newOrder.getFreePostFlag()) {
-                    // 包邮
-                    PostageInfo = "¥" + newOrder.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
+            for (NewShopOrder newShopOrder : newOrder.getNewShopOrders()) {
+                Double coldChina = Double.valueOf(700);
+                String postageInfo = null;
+
+                if (newShopOrder.getIsColdChina() == 1) {
+                    if ("-1" == newOrder.getFreePostFlag()) {
+                        // 到付
+                        postageInfo = "¥" + newShopOrder.getFreePostageFee() + "(" + (newShopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + coldChina + "," : "") + "其他: 到付)";
+                    } else if ("0" == newOrder.getFreePostFlag()) {
+                        // 包邮
+                        postageInfo = "¥" + newShopOrder.getFreePostageFee() + "(" + (newShopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + coldChina + "," : "") + "其他: 包邮)";
+                    } else {
+                        // 有运费
+                        postageInfo = "¥" + newShopOrder.getShopPostFee() + "(" + (newShopOrder.getIsColdChina() == 1 ? "冷链费: ¥" + coldChina + "," : "") + "其他: ¥" + MathUtil.sub(newOrder.getFreight(), coldChina) + ")";
+                    }
                 } else {
-                    // 有运费
-                    PostageInfo = "¥" + newOrder.getFreight() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + MathUtil.sub(newOrder.getFreight(), ColdChina)+ ")";
+                    postageInfo = newOrder.getFreePostFlag() == "-1" ? "到付" : newOrder.getFreePostFlag() == "0" ? "包邮" : "¥" + newShopOrder.getShopPostFee();
                 }
-            } else {
-                PostageInfo = newOrder.getFreePostFlag() == "-1" ? "到付" : newOrder.getFreePostFlag() == "0" ? "包邮" : "¥" + newOrder.getFreight();
+                newShopOrder.setPostageInfo(postageInfo);
+                //支付凭证
+//            Integer orderID = order.getOrderID() == null ? 0: order.getOrderID();
+//            List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(order.getOrderID());
             }
-            model.addAttribute("postageInfo", PostageInfo);
             model.addAttribute("lastReceiptDetailId", lastReceiptDetailId);
             model.addAttribute("from", from);
             model.addAttribute("bpClauses", bpClauses);
@@ -717,6 +724,11 @@ public class CmRefundsProductController extends BaseController {
             NewOrder order = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
             cmReturnedPurchase.setOrderType(Integer.valueOf(order.getOrderType()));
             List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
+            for (CmReturnedPurchase returnedPurchase : dataList) {
+                List<ShopOrderReturned> shopOrderReturneds = returnedPurchase.getShopOrderReturnedList().stream().filter(newShopOrder -> newShopOrder.getShopOrderID() == cmReturnedPurchase.getShopOrderID()).collect(Collectors.toList());
+                returnedPurchase.setShopOrderReturnedList(shopOrderReturneds);
+            }
+
             BpClause bpClause = new BpClause();
             bpClause.setEnabledStatus("1");
             List<BpClause> bpClauses = bpClauseService.findList(bpClause);
@@ -773,6 +785,9 @@ public class CmRefundsProductController extends BaseController {
     public String toReviewRecturnRecord(CmReturnedPurchase cmReturnedPurchase, HttpServletRequest request, HttpServletResponse response, Model model) {
         try {
             NewOrder newOrder = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
+//            //过滤子订单
+//            List<NewShopOrder>  newShopOrders= newOrder.getNewShopOrders().stream().filter(newShopOrder -> newShopOrder.getShopOrderID() ==cmReturnedPurchase.getShopOrderID()).collect(Collectors.toList());
+//            newOrder.setNewShopOrders(newShopOrders);
             cmReturnedPurchase.setOrderType(Integer.valueOf(newOrder.getOrderType()));
             List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
             BpClause bpClause = new BpClause();
@@ -813,53 +828,44 @@ public class CmRefundsProductController extends BaseController {
      */
     @RequestMapping(value = "toRefundRecord")
     public String toRefundRecord(CmReturnedPurchase cmReturnedPurchase, String from, HttpServletRequest request, HttpServletResponse response, Model model) {
-        try {
-            NewOrder newOrder = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
-            List<CmReceiptOrderRelation> listRelation = cmReceiptOrderRelationService.findByOrderID(newOrder.getOrderID().toString());
-            List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
-            Double refundFee = 0D;  //退款总额
-            for (CmReturnedPurchase bean : dataList) {
-                if (!bean.getStatus().equals("3")) {
-                    refundFee += bean.getRefundFee();
+        NewOrder newOrder = newOrderService.get(cmReturnedPurchase.getOrderID().toString());
+        //过滤子订单
+        List<NewShopOrder> newShopOrders = newOrder.getNewShopOrders().stream().filter(newShopOrder -> newShopOrder.getShopOrderID() == cmReturnedPurchase.getShopOrderID()).collect(Collectors.toList());
+        newOrder.setNewShopOrders(newShopOrders);
+//        List<CmReceiptOrderRelation> listRelation = cmReceiptOrderRelationService.findByOrderID(newOrder.getOrderID().toString());
+        List<CmReceiptOrderRelation> listRelation = cmReceiptOrderRelationService.findByShopOrderIds(Arrays.asList(cmReturnedPurchase.getShopOrderID()));
+        List<CmReturnedPurchase> dataList = cmReturnedPurchaseService.getReturnedPurchaseList(cmReturnedPurchase);
+        Double refundFee = 0D;  //退款总额
+        for (CmReturnedPurchase bean : dataList) {
+            for (ShopOrderReturned shopOrderReturned : bean.getShopOrderReturnedList()) {
+                if (shopOrderReturned.getShopOrderID().equals(cmReturnedPurchase.getShopOrderID())) {
+
+                    if (!bean.getStatus().equals("3")) {
+                        refundFee += bean.getRefundFee();
+                    }
+
                 }
             }
-            List<Integer> shopOrderIDs = newShopOrderService.findIDsByOrderID(cmReturnedPurchase.getOrderID());
-            List<CmPayShopRecord> pr = new ArrayList<>();
-            for (Integer shopOrderID : shopOrderIDs) {
-                List<CmPayShopRecord> payShopRecordList = newShopOrderService.getPayedRecords(shopOrderID.toString());
+        }
+        List<Integer> shopOrderIDs = newShopOrderService.findIDsByOrderID(cmReturnedPurchase.getOrderID());
+        List<CmPayShopRecord> pr = new ArrayList<>();
+        for (Integer shopOrderId : shopOrderIDs) {
+            if (shopOrderId == Integer.valueOf(cmReturnedPurchase.getShopOrderID())) {
+
+                List<CmPayShopRecord> payShopRecordList = newShopOrderService.getPayedRecords(shopOrderId.toString());
                 pr.addAll(payShopRecordList);
-            }
-            //联合丽格运费
-            String PostageInfo = null;
-            // 拼接运费信息--联合丽格
-            boolean isColdChina = newOrder.getNewShopOrders().stream().map(NewShopOrder::getIsColdChina).collect(Collectors.toList()).contains(1);
-            Double ColdChina = Double.valueOf(700);
 
-            if (isColdChina) {
-                if ("-1" == newOrder.getFreePostFlag()) {
-                    // 到付
-                    PostageInfo = "¥" + newOrder.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
-                } else if ("0" == newOrder.getFreePostFlag()) {
-                    // 包邮
-                    PostageInfo = "¥" + newOrder.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
-                } else {
-                    // 有运费
-                    PostageInfo = "¥" + newOrder.getFreight() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + MathUtil.sub(newOrder.getFreight(), ColdChina)+ ")";
-                }
-            } else {
-                PostageInfo = newOrder.getFreePostFlag() == "-1" ? "到付" : newOrder.getFreePostFlag() == "0" ? "包邮" : "¥" + newOrder.getFreight();
             }
-            model.addAttribute("postageInfo", PostageInfo);
-            model.addAttribute("pr", pr);
-            model.addAttribute("cmReturnedPurchaseList", dataList);
-            model.addAttribute("order", newOrder);
-            model.addAttribute("receipt", listRelation);
-            model.addAttribute("refundFee", refundFee);
-            model.addAttribute("from", from);
-            model.addAttribute("orderID", cmReturnedPurchase.getOrderID().toString());
-        } catch (Exception e) {
-            e.printStackTrace();
         }
+
+        model.addAttribute("pr", pr);
+        model.addAttribute("cmReturnedPurchaseList", dataList);
+        model.addAttribute("order", newOrder);
+        model.addAttribute("receipt", listRelation);
+        model.addAttribute("refundFee", refundFee);
+        model.addAttribute("from", from);
+        model.addAttribute("orderID", cmReturnedPurchase.getOrderID().toString());
+
         return "modules/bulkpurchase/refundRecord";
     }
 

+ 1 - 1
src/main/java/com/caimei/modules/order/dao/NewOrderDao.java

@@ -16,7 +16,7 @@ import java.util.Set;
 @MyBatisDao
 public interface NewOrderDao extends CrudDao<NewOrder> {
 
-    List<CmOrderPaymentVoucherVo> findVoucherVoOrderID(@Param("orderId") Integer orderID);
+    List<CmOrderPaymentVoucherVo> findVoucherVoOrderID(@Param("shopOrderId") Integer shopOrderId);
 
     List<CmVoucherImage> findCmVoucherImageoOrderID(@Param("id") Integer id);
 

+ 1 - 1
src/main/java/com/caimei/modules/order/entity/CmDiscernReceipt.java

@@ -69,7 +69,7 @@ public class    CmDiscernReceipt extends DataEntity<CmDiscernReceipt> {
     private Double orderReceivedAmount;//订单已收金额(此收款只计算线上线下收款记录表金额)
     private Double returnBalanceAmount;// 退款余额金额
     private Integer newReceiptType;//收款款项二级类别1.上架费2.订单返佣3.认证通会员4.认证通企划
-    private String shopOrderNo;
+    private String shopOrderNo;//子订单id编号
     private Integer shopOrderId;//子订单id
     private Double productAmount;//订单总金额
     private Double needPayAmount;//应收金额

+ 34 - 2
src/main/java/com/caimei/modules/order/entity/CmReturnedPurchase.java

@@ -20,9 +20,14 @@ public class CmReturnedPurchase extends DataEntity<CmReturnedPurchase> {
     private Integer organizeID;    //组织id
     private String orderNo;         //主订单号
     private String userName;        //买家名
-//    private Integer userOrganizeId;     //机构所属组织Id
-    //	private Integer shopOrderID;		// 子订单Id
+    //    private Integer userOrganizeId;     //机构所属组织Id
+    private Integer shopOrderID;        // 子订单Id
+
+
+
+    private String shopOrderNo;        // 子订单Id
     private Integer userID;        // 用户ID(买家)
+
     private String status;        // 状态:1待审核、2审核通过、3审核不通过
     private String returnedWay;        // 退款方式 1有支付有退款(退款方式可多选具体参考以上金额)、4未支付无退款(未支付发起退款)
     private String payType;//付款方式 付款方式 1建设银行7297, 2中信银行0897, 3中信银行7172, 4广发银行0115, 5广发银行5461
@@ -77,11 +82,30 @@ public class CmReturnedPurchase extends DataEntity<CmReturnedPurchase> {
 
     private Integer pageType;   //1跳转结算记录页面2跳转分账记录页面
     private String bankNameType;
+    NewOrder newOrder;
+
+    public NewOrder getNewOrder() {
+        return newOrder;
+    }
+
+    public void setNewOrder(NewOrder newOrder) {
+        this.newOrder = newOrder;
+    }
+
+        //订单信息
 
     public Integer getPageType() {
         return pageType;
     }
 
+    public Integer getShopOrderID() {
+        return shopOrderID;
+    }
+
+    public void setShopOrderID(Integer shopOrderID) {
+        this.shopOrderID = shopOrderID;
+    }
+
     public void setPageType(Integer pageType) {
         this.pageType = pageType;
     }
@@ -533,4 +557,12 @@ public class CmReturnedPurchase extends DataEntity<CmReturnedPurchase> {
     public void setReturnGoodsStutas(Integer returnGoodsStutas) {
         this.returnGoodsStutas = returnGoodsStutas;
     }
+
+    public String getShopOrderNo() {
+        return shopOrderNo;
+    }
+
+    public void setShopOrderNo(String shopOrderNo) {
+        this.shopOrderNo = shopOrderNo;
+    }
 }

+ 19 - 1
src/main/java/com/caimei/modules/order/entity/CmReturnedPurchaseProduct.java

@@ -44,6 +44,24 @@ public class CmReturnedPurchaseProduct extends DataEntity<CmReturnedPurchaseProd
 	private Integer cancelProductNum;   //取消数量
 	private String commercialCode;      //分账方,子商户商编
 
+	private Integer orderStatusFlag; //订单状态标识,1:非退货退款订单、2:退货退款中、3退货退款完成
+	private String shopPostFee;//运费
+
+	public Integer getOrderStatusFlag() {
+		return orderStatusFlag;
+	}
+
+	public void setOrderStatusFlag(Integer orderStatusFlag) {
+		this.orderStatusFlag = orderStatusFlag;
+	}
+
+	public String getShopPostFee() {
+		return shopPostFee;
+	}
+
+	public void setShopPostFee(String shopPostFee) {
+		this.shopPostFee = shopPostFee;
+	}
 
 	
 	public CmReturnedPurchaseProduct() {
@@ -289,4 +307,4 @@ public class CmReturnedPurchaseProduct extends DataEntity<CmReturnedPurchaseProd
 	public void setCommercialCode(String commercialCode) {
 		this.commercialCode = commercialCode;
 	}
-}
+}

+ 21 - 0
src/main/java/com/caimei/modules/order/entity/NewShopOrder.java

@@ -144,6 +144,11 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private String clubName; //会所名称
     private Integer orderArchiveId; //订单资料id
     private String rebateFee; //主订单返佣服务费
+    private String postageInfo; //运费字符串
+
+
+
+    private List<CmOrderPaymentVoucherVo> voucherVo; //支付凭证
 
     // 备注图片
     private String remarkImage1;
@@ -157,6 +162,22 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private String remarkImage9;
     private String remarkImage10;
 
+
+    public List<CmOrderPaymentVoucherVo> getVoucherVo() {
+        return voucherVo;
+    }
+
+    public void setVoucherVo(List<CmOrderPaymentVoucherVo> voucherVo) {
+        this.voucherVo = voucherVo;
+    }
+    public String getPostageInfo() {
+        return postageInfo;
+    }
+
+    public void setPostageInfo(String postageInfo) {
+        this.postageInfo = postageInfo;
+    }
+
     private boolean modifyPayable = false; //是否线上支付
 
     private boolean payShopOtherFee = true; //是否可以付第三方申请

+ 11 - 0
src/main/java/com/caimei/modules/order/service/CmReceiptOrderRelationService.java

@@ -72,6 +72,17 @@ public class CmReceiptOrderRelationService extends CrudService<CmReceiptOrderRel
         }
         return list;
     }
+    public List<CmReceiptOrderRelation> findByShopOrderIds(List<Integer> shopOrderIds) {
+        List<CmReceiptOrderRelation> list = cmReceiptOrderRelationDao.findByShopOrderIds(shopOrderIds);
+        for (CmReceiptOrderRelation bean : list) {
+            CmReceiType cmReceiType = collectionDao.oneData(bean.getPayType());
+            if (cmReceiType != null) {
+                bean.setPayType(cmReceiType.getType());
+            }
+//            bean.setPayType(OrderUtil.getPayTypeStr(bean.getPayType()));
+        }
+        return list;
+    }
 
     /**
      * 查询该主订单以下所有子订单的付款信息,按照每个账号的一个付款账号合并金额显示

+ 1 - 0
src/main/java/com/caimei/modules/order/service/CmReturnedPurchaseService.java

@@ -346,6 +346,7 @@ public class CmReturnedPurchaseService extends CrudService<CmReturnedPurchaseDao
             for (CmReturnedPurchase bean : dataList) {
                 CmReturnedPurchaseProduct cmReturnedPurchaseProduct = new CmReturnedPurchaseProduct();
                 cmReturnedPurchaseProduct.setReturnedID(Integer.parseInt(bean.getId()));
+                cmReturnedPurchaseProduct.setShopOrderID(bean.getShopOrderID());
                 List<CmReturnedPurchaseProduct> list = cmReturnedPurchaseProductDao.findList(cmReturnedPurchaseProduct);
                 for (CmReturnedPurchaseProduct item : list) {
                     String wwwServer = Global.getConfig("wwwServer");

+ 2 - 2
src/main/java/com/caimei/modules/order/service/NewOrderService.java

@@ -128,8 +128,8 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
     private MessageCenterDao messageCenterDao;
 
 
-    public List<CmOrderPaymentVoucherVo> findVoucherVoOrderID( Integer orderID){
-        return newOrderDao.findVoucherVoOrderID(orderID);
+    public List<CmOrderPaymentVoucherVo> findVoucherVoOrderID( Integer shopOrderId){
+        return newOrderDao.findVoucherVoOrderID(shopOrderId);
     }
 
     @Transactional(readOnly = false)

+ 4 - 1
src/main/java/com/caimei/modules/order/web/CmReturnedPurchaseController.java

@@ -7,6 +7,7 @@ import javax.servlet.http.HttpServletResponse;
 import com.caimei.modules.bulkpurchase.entity.OrderProduct;
 import com.caimei.modules.common.utils.ExcelUtil;
 import com.caimei.modules.order.entity.NewOrder;
+import com.caimei.modules.order.entity.NewShopOrder;
 import com.caimei.modules.order.service.NewOrderService;
 import com.caimei.modules.user.entity.CmUserOrganize;
 import com.caimei.modules.user.service.CmUserOrganizeService;
@@ -30,6 +31,7 @@ import java.math.BigDecimal;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * 退货退款Controller
@@ -74,6 +76,7 @@ public class CmReturnedPurchaseController extends BaseController {
             cmReturnedPurchase.setEndTime(cmReturnedPurchase.getEndTime().trim() + " 23:59:59");
         }
         Page<CmReturnedPurchase> page = cmReturnedPurchaseService.findPage(new Page<CmReturnedPurchase>(request, response), cmReturnedPurchase);
+
         //获取组织列表
         List<CmUserOrganize> cmUserOrganizeList = cmUserOrganizeService.findOrganize();
         model.addAttribute("cmUserOrganizeList", cmUserOrganizeList);
@@ -150,4 +153,4 @@ public class CmReturnedPurchaseController extends BaseController {
         }
     }
 
-}
+}

+ 58 - 35
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -1227,19 +1227,11 @@ public class NewOrderController extends BaseController {
         if (ids != null && ids.size() > 0) {
             order.setToAudit("1");
         }
-        //一个子订单只有一个商品时,不可拆分
-        int count = 0;
-        for (NewShopOrder newShopOrder : order.getNewShopOrders()) {
-            if (newShopOrder.getShopID() != 998) {
-                count++;
-            }
-        }
+
         if (order.getProductCount() == null) {
             order.setProductCount(1);
         }
-        if (order.getProductCount() <= count) {
-            order.setSplitFlag("0");
-        }
+
         //是否抹平支付过(抹平最多只允许存在一次)
         CmDiscernReceipt cmDiscernReceipt = cmDiscernReceiptDao.findSmoothoutInfo(order.getOrderID().toString());
         if (null != cmDiscernReceipt) {
@@ -1285,7 +1277,38 @@ public class NewOrderController extends BaseController {
                 }
             }
         }
+        //一个子订单只有一个商品时,不可拆分
+        int count = 0;
+        for (NewShopOrder newShopOrder : order.getNewShopOrders()) {
+            if (newShopOrder.getShopID() != 998) {
+                count++;
+            }
+            Double ColdChina = Double.valueOf(700);
+            String PostageInfo = null;
+
+            if (newShopOrder.getIsColdChina()==1) {
+                if ("-1" == order.getFreePostFlag()) {
+                    // 到付
+                    PostageInfo = "¥" + newShopOrder.getFreePostageFee() + "(" + (newShopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
+                } else if ("0" == order.getFreePostFlag()) {
+                    // 包邮
+                    PostageInfo = "¥" + newShopOrder.getFreePostageFee() + "(" + (newShopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
+                } else {
+                    // 有运费
+                    PostageInfo = "¥" + newShopOrder.getShopPostFee() + "(" + (newShopOrder.getIsColdChina()==1 ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + MathUtil.sub(order.getFreight(), ColdChina)+ ")";
+                }
+            } else {
+                PostageInfo = order.getFreePostFlag() == "-1" ? "到付" : order.getFreePostFlag() == "0" ? "包邮" : "¥" + newShopOrder.getShopPostFee();
+            }
+            List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(newShopOrder.getShopOrderID() );
 
+            newShopOrder.setPostageInfo(PostageInfo);
+            newShopOrder.setVoucherVo(voucherVo);
+            //支付凭证
+        }
+        if (order.getProductCount() <= count) {
+            order.setSplitFlag("0");
+        }
         model.addAttribute("order", order);
         if ("0".equals(order.getStatus())) {
             try {
@@ -1325,33 +1348,33 @@ public class NewOrderController extends BaseController {
             }
         }
 
-        //联合丽格运费
-        String PostageInfo = null;
-        // 拼接运费信息--联合丽格
-        boolean isColdChina = order.getNewShopOrders().stream().map(NewShopOrder::getIsColdChina).collect(Collectors.toList()).contains(1);
-        Double ColdChina = Double.valueOf(700);
-
-        if (isColdChina) {
-            if ("-1" == order.getFreePostFlag()) {
-                // 到付
-                PostageInfo = "¥" + order.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
-            } else if ("0" == order.getFreePostFlag()) {
-                // 包邮
-                PostageInfo = "¥" + order.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
-            } else {
-                // 有运费
-                PostageInfo = "¥" + order.getFreight() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + MathUtil.sub(order.getFreight(), ColdChina)+ ")";
-            }
-        } else {
-            PostageInfo = order.getFreePostFlag() == "-1" ? "到付" : order.getFreePostFlag() == "0" ? "包邮" : "¥" + order.getFreight();
-        }
-        //支付凭证
-        Integer orderID = order.getOrderID() == null ? 0: order.getOrderID();
-        List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(order.getOrderID());
+//        //联合丽格运费
+//        String PostageInfo = null;
+//        // 拼接运费信息--联合丽格
+//        boolean isColdChina = order.getNewShopOrders().stream().map(NewShopOrder::getIsColdChina).collect(Collectors.toList()).contains(1);
+//        Double ColdChina = Double.valueOf(700);
+//
+//        if (isColdChina) {
+//            if ("-1" == order.getFreePostFlag()) {
+//                // 到付
+//                PostageInfo = "¥" + order.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 到付)";
+//            } else if ("0" == order.getFreePostFlag()) {
+//                // 包邮
+//                PostageInfo = "¥" + order.getFreePostFlag() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: 包邮)";
+//            } else {
+//                // 有运费
+//                PostageInfo = "¥" + order.getFreight() + "(" + (isColdChina ? "冷链费: ¥" + ColdChina + "," : "") + "其他: ¥" + MathUtil.sub(order.getFreight(), ColdChina)+ ")";
+//            }
+//        } else {
+//            PostageInfo = order.getFreePostFlag() == "-1" ? "到付" : order.getFreePostFlag() == "0" ? "包邮" : "¥" + order.getFreight();
+//        }
+//        //支付凭证
+//        Integer orderID = order.getOrderID() == null ? 0: order.getOrderID();
+//        List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(order.getOrderID());
         //订单已收金额
         Double brokerage = cmUtilsDao.selectPayTotalFees(order.getOrderID());
-        model.addAttribute("voucherVo", voucherVo.size()==0?null:voucherVo);
-        model.addAttribute("postageInfo", PostageInfo);
+//        model.addAttribute("voucherVo", voucherVo.size()==0?null:voucherVo);
+//        model.addAttribute("postageInfo", PostageInfo);
         model.addAttribute("brokerage", brokerage);
         Double receiptAmount = cmDiscernReceiptService.findOrderReceipt(order.getOrderID());
         model.addAttribute("returnValue", returnValue);

+ 19 - 18
src/main/resources/mappings/modules/cmpage/CmPageCentreMapper.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.cmpage.dao.CmPageCentreDao">
-    
+
 	<sql id="cmPageCentreColumns">
 		a.id AS "id",
 		a.pageId AS "pageId",
@@ -17,30 +17,30 @@
 		a.updateDate AS "updateDate",
 		(SELECT count(1) FROM cm_page_centre_image a1 WHERE a1.centreId = a.id ) imageNum
 	</sql>
-	
+
 	<sql id="cmPageCentreJoins">
 	</sql>
-    
+
 	<select id="get" resultType="CmPageCentre">
-		SELECT 
+		SELECT
 			<include refid="cmPageCentreColumns"/>
 		FROM cm_page_centre a
 		<include refid="cmPageCentreJoins"/>
 		WHERE a.id = #{id}
 	</select>
-	
+
 	<select id="findList" resultType="CmPageCentre">
-		SELECT 
+		SELECT
 			<include refid="cmPageCentreColumns"/>
 		FROM cm_page_centre a
 		<include refid="cmPageCentreJoins"/>
 		<where>
-			
+
 			<if test="pageId != null and pageId != ''">
 				AND a.pageId = #{pageId}
 			</if>
 			<if test="title != null and title != ''">
-				AND a.title LIKE 
+				AND a.title LIKE
 					<if test="dbName == 'oracle'">'%'||#{title}||'%'</if>
 					<if test="dbName == 'mssql'">'%'+#{title}+'%'</if>
 					<if test="dbName == 'mysql'">concat('%',#{title},'%')</if>
@@ -55,15 +55,15 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<select id="findAllList" resultType="CmPageCentre">
-		SELECT 
+		SELECT
 			<include refid="cmPageCentreColumns"/>
 		FROM cm_page_centre a
 		<include refid="cmPageCentreJoins"/>
 		<where>
-			
-		</where>		
+
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -72,7 +72,7 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert" parameterType="CmPageCentre"  keyProperty="id" useGeneratedKeys="true">
 		INSERT INTO cm_page_centre(
 			pageId,
@@ -100,9 +100,9 @@
 			#{updateDate}
 		)
 	</insert>
-	
+
 	<update id="update">
-		UPDATE cm_page_centre SET 	
+		UPDATE cm_page_centre SET
 			pageId = #{pageId},
 			title = #{title},
 			link = #{link},
@@ -114,7 +114,7 @@
 			updateDate = #{updateDate}
 		WHERE id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		DELETE FROM cm_page_centre
 		WHERE id = #{id}
@@ -193,11 +193,12 @@
 		  a.sort,
 		  a.displaySort,
 		  DATE_FORMAT(a.createDate, '%Y-%m-%d %H:%i:%S') AS createDate,
-		  p.validFlag,
+		  copi.validFlag,
 		  s.name as shopName
 		FROM
 		  new_page_floor_image a
 		  LEFT JOIN product p ON a.productId = p.productID
+		left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
 		  LEFT JOIN shop s on p.shopID = s.shopID
 		  left join cm_hehe_product chp on a.productId = chp.productId
 		WHERE
@@ -219,4 +220,4 @@
 		  cpi.id = cpci.imageId
 		  AND cpci.centreId = #{centreId}
 	</delete>
-</mapper>
+</mapper>

+ 2 - 1
src/main/resources/mappings/modules/newhome/NewPageFloorMapper.xml

@@ -225,10 +225,11 @@
 		  a.appletsStatus,
 		  a.sort,
 		  DATE_FORMAT(a.createDate, '%Y-%m-%d %H:%i:%S') AS createDate,
-		  p.validFlag
+		  copi.validFlag
 		FROM
 		  new_page_floor_image a
 		  LEFT JOIN product p ON a.productId = p.productID
+		  left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
 		WHERE
 		  a.floorId = #{floorId}
 	</select>

+ 2 - 1
src/main/resources/mappings/modules/order/CmDiscernReceiptMapper.xml

@@ -92,6 +92,7 @@
         cso_s.orderID AS orderID,
         cso_s.shopOrderNo as shopOrderNos,
         cso.shopOrderId as shopOrderId,
+        cso.shopOrderNo as shopOrderNo,
         cof.bankAccount AS bankNameType,
         s.checkMan,
         IF(crr.relationType = '1', s.name,IFNULL(s_a.name,'')) AS shopName,
@@ -108,7 +109,7 @@
         left join cm_order cr on cr.orderID = crr.orderID
         left join user u on u.userID = cr.userID
         -- 子订单
-        left join cm_shop_order cso on cso.shopOrderID = crr.orderID
+        left join cm_shop_order cso on cso.shopOrderID = crr.shopOrderID
         left join cm_order cso_cr on cso.orderID = cso_cr.orderID
         LEFT JOIN USER u_cr ON u_cr.userID = cso_cr.userID
             -- 供应商

+ 6 - 0
src/main/resources/mappings/modules/order/CmReturnedPurchaseMapper.xml

@@ -6,6 +6,7 @@
         a.id AS "id",
 		a.returnedNo AS "returnedNo",
 		a.orderID AS "orderID",
+		a.shopOrderId AS "shopOrderId",
 		a.userID AS "userID",
 		a.status AS "status",
 		a.returnedWay AS "returnedWay",
@@ -101,11 +102,13 @@
         ,s.name AS "applicationUserName",
         s1.name AS "reviewUserName",
         co.organizeID AS "organizeID",
+        cso.shopOrderNo AS "shopOrderNo",
         f.bankAccount as bankNameType
         FROM cm_returned_purchase a
         LEFT JOIN sys_user s on s.id = a.applicationUserID
         LEFT JOIN sys_user s1 on s1.id = a.reviewUserID
         LEFT JOIN cm_order co ON a.orderID=co.orderID
+        LEFT JOIN cm_shop_order cso ON a.shopOrderId=cso.shopOrderId
         LEFT JOIN cm_offline_collection f ON a.payType = f.type
         <include refid="cmReturnedPurchaseJoins"/>
         <where>
@@ -124,6 +127,9 @@
             <if test="orderID != null and orderID != ''">
                 AND a.orderID = #{orderID}
             </if>
+            <if test="shopOrderID != null and shopOrderID != ''">
+                AND a.shopOrderId = #{shopOrderID}
+            </if>
             <if test="userID != null and userID != ''">
                 AND a.userID = #{userID}
             </if>

+ 3 - 0
src/main/resources/mappings/modules/order/CmReturnedPurchaseProductMapper.xml

@@ -38,6 +38,9 @@
 		<where>
             <if test="returnedID != null and returnedID != ''">
                 AND a.returnedID = #{returnedID}
+            </if>
+            <if test="shopOrderID != null and shopOrderID != ''">
+                AND a.shopOrderID = #{shopOrderID}
             </if>
 		</where>
 		<choose>

+ 1 - 1
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -1465,7 +1465,7 @@
 --         SELECT * from cm_order_payment_voucher v
         SELECT v.*,i.* from cm_order_payment_voucher v
         LEFT JOIN cm_voucher_image i on  i.voucherId=v.id
-        where orderId = #{orderId}
+        where shopOrderId = #{shopOrderId}
     </select>
     <select id="findCmVoucherImageoOrderID" resultType="com.caimei.modules.order.entity.CmVoucherImage">
         SELECT * from cm_voucher_image

+ 2 - 1
src/main/resources/mappings/modules/product/CmPromotionMapper.xml

@@ -165,10 +165,11 @@
         s.name AS shopName
         FROM
         product p
+        left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
         LEFT JOIN shop s ON s.shopID = p.shopID
         <where>
             p.productCategory = 1
-            and p.validFlag = 2
+            and copi.validFlag = 2
             and p.priceFlag != 1
             <if test="productID != null">
                 AND p.productID = #{productID}

+ 4 - 1
src/main/resources/mappings/modules/product/CmSecondHandDetailMapper.xml

@@ -39,7 +39,7 @@
 		a.fileName AS "fileName",
 		a.ossName AS "ossName",
 		a.commitmentImage AS "commitmentImage",
-		p.validFlag AS "validFlag",
+		copi.validFlag AS "validFlag",
 		p.productCategory AS "productCategory",
 		p.name AS "name",
 		cs.normalPrice AS "normalPrice",
@@ -63,6 +63,7 @@
         <include refid="cmSecondHandDetailColumns"/>
         FROM cm_second_hand_detail a
         <include refid="cmSecondHandDetailJoins"/>
+        left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
         WHERE a.productID = #{id}
     </select>
 
@@ -71,6 +72,7 @@
         <include refid="cmSecondHandDetailColumns"/>
         FROM cm_second_hand_detail a
         <include refid="cmSecondHandDetailJoins"/>
+        left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
         <where>
 
             <if test="productID != null and productID != ''">
@@ -91,6 +93,7 @@
         <include refid="cmSecondHandDetailColumns"/>
         FROM cm_second_hand_detail a
         <include refid="cmSecondHandDetailJoins"/>
+        left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
         <where>
 
         </where>

+ 19 - 12
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -129,10 +129,11 @@
 
 
     <select id="getAllExistsProductList" resultType="Integer">
-        SELECT a.productID
-        FROM cm_mall_organize_products a
-        WHERE a.delFlag = 0
-          and a.organizeID = #{organizeID}
+        SELECT p.productID
+        FROM product p
+        left join cm_organize_product_info copi on copi.productId = p.productID
+        WHERE
+          and copi.organizeID = #{organizeID}
     </select>
 
     <select id="findRecommendPage" resultType="Product">
@@ -564,6 +565,7 @@
         <include refid="productColumns"/>
         FROM product a
         <include refid="productJoins"/>
+        left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
         <where>
             <if test="productID !=null">
                 AND a.productID=#{productID}
@@ -585,7 +587,7 @@
             </if>
             AND p.newvalidFlag = 1
             AND p.newProductType=1
-            AND p.validFlag = 2
+            AND copi.validFlag = 2
             # AND p.showFlag!=2
 
         </where>
@@ -1743,8 +1745,9 @@
                p.productCategory as "productCategory"
         from product p
                  left join shop s on s.shopID = p.shopID
+                 left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
         where p.productID = #{productID}
-          AND p.validFlag = '2'
+          AND copi.validFlag = '2'
     </select>
 
     <select id="querySecondHandRecommend" resultType="CmSecondHandRecommendVo">
@@ -1756,6 +1759,7 @@
         s.name AS shopName,
         p.productCategory as "productCategory"
         from product p
+        left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
         left join shop s on s.shopID = p.shopID
         <where>
             <if test="productID != null and productID != ''">
@@ -1764,7 +1768,7 @@
             <if test="productName != null and productName != ''">
                 and p.name like concat('%', #{productName} ,'%')
             </if>
-            AND p.validFlag = '2'
+            AND copi.validFlag = '2'
             and p.productCategory = #{queryProductType}
         </where>
         limit 0, 10
@@ -1847,9 +1851,12 @@
     </select>
 
     <select id="findAllProduct" resultType="com.caimei.modules.product.entity.Product">
-        select p.productID,p.mainImage,p.name,s.name as shopName from product p left join shop s on p.shopID = s.shopID
+        select p.productID,p.mainImage,p.name,s.name as shopName
+        from product p
+        left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
+        left join shop s on p.shopID = s.shopID
         <where>
-            (p.actFlag=0 or p.actType is null) and p.validFlag = 2 and p.productCategory = 1
+            (p.actFlag=0 or p.actType is null) and copi.validFlag = 2 and p.productCategory = 1
             <if test="productIds != null and productIds != '' ">
                 and p.productID != #{productIds}
             </if>
@@ -1974,7 +1981,7 @@
         where cs.productId = #{productID}
     </select>
     <select id="findSkuOrganizeList" resultType="com.caimei.modules.product.entity.CmSku">
-        select id as skuId,
+        select skuId,
                productId,
                mallProductId,
                unit,
@@ -1988,7 +1995,7 @@
                organizePercent,
                shopPercent,
                cmPercent
-        from cm_mall_product_sku
+        from cm_sku
         where productId = #{productID}
     </select>
     <select id="findLadderPriceBySku" resultType="com.caimei.modules.product.entity.CmLadderPrice">
@@ -2048,7 +2055,7 @@
     </select>
     <select id="findOrganizeSku" resultType="com.caimei.modules.product.entity.CmSku">
         SELECT price, ifnull(costPrice, 0),"1" AS costCheckFlag, shopPercent AS shopPercent, normalPrice
-        FROM cm_mall_product_sku
+        FROM cm_sku
         WHERE productId = #{productId}
         ORDER BY price ASC
         LIMIT 1

+ 9 - 13
src/main/resources/mappings/modules/weisha/CmOrganizeProductMapper.xml

@@ -31,7 +31,6 @@
 
     <select id="getOrganizeProductList" resultType="com.caimei.modules.weisha.entity.CmOrganizeProduct">
         SELECT
-        cmop.id,
         cmop.productID,
         p.name as productName,
         p.mainImage as productImage,
@@ -39,14 +38,12 @@
         cmop.validFlag as status,
         p.includedTax,
         p.invoiceType,
-        cmop.addTime,
         cmps.minBuyNumber
-        FROM cm_mall_organize_products cmop
+        FROM cm_organize_product_info  cmop
         LEFT JOIN product p ON p.productId = cmop.productId
         LEFT JOIN shop s ON s.shopID = p.shopID
-        LEFT JOIN cm_mall_product_sku cmps ON cmop.productID=cmps.productId
+        LEFT JOIN cm_sku cmps ON cmop.productID=cmps.productId
         <where>
-            cmop.delFlag = 0
             <if test="productId != null and productId != ''">
                 AND cmop.productId = #{productId}
             </if>
@@ -69,13 +66,11 @@
                 AND cmop.organizeID = #{organizeId}
             </if>
         </where>
-        GROUP BY cmop.id
-        order by cmop.addTime desc
     </select>
 
     <select id="getOrganizeSku" resultType="com.caimei.modules.weisha.entity.CmOrganizeSku">
         SELECT
-        cmps.id,
+        cmps.skuId,
         cmps.productId,
         cmps.minBuyNumber,
         cmps.price,
@@ -85,7 +80,8 @@
         cmps.organizePercent,
         cmps.shopPercent,
         cmps.cmPercent
-        FROM cm_mall_product_sku cmps
+--         FROM cm_mall_product_sku cmps
+        FROM cm_sku cmps
         <where>
             <if test="productIds.size() > 0">
                 cmps.productId in
@@ -104,13 +100,13 @@
 
     <select id="findProductList" resultType="com.caimei.modules.product.entity.Product">
         select p.productID, p.mainImage, p.name,
-        s.name as shopName, IF(cmop.productId is not null, 0, 1) as validFlag,k.price
+        s.name as shopName, copi.validFlag,k.price
         from product p
-        left join cm_mall_organize_products cmop on p.productID = cmop.productId and cmop.organizeId = #{organizeId} and cmop.delFlag = 0
+        left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = #{organizeId}
         left join shop s on p.shopID = s.shopID
         left join cm_sku k on p.productID = k.productId
         <where>
-            p.productCategory = 1 AND p.validFlag not in ( 0,1,8 ) and s.shopType != 2 and cmop.productId is null
+            p.productCategory = 1 AND copi.validFlag not in ( 0,1,8 ) and s.shopType != 2 and copi.productId is null
             AND p.shopID not in (SELECT s.`value` FROM `sys_dict` s WHERE s.type='heheShopID')
             AND p.productID NOT IN (6060, 6061, 6062, 6063, 6064,6065, 6066, 6067, 6068, 6069)
             <if test="productID != null">
@@ -253,7 +249,7 @@
                p.taxPoint,
                p.supplierTaxPoint
         FROM product p
-                 LEFT JOIN cm_mall_organize_products cmop ON p.productID = cmop.productId
+                 left join cm_organize_product_info copi on copi.productId = p.productID and copi.organizeId = 0
                  LEFT JOIN shop s ON p.shopID = s.shopID
         WHERE p.productCategory = 1
           AND cmop.id = #{id}

+ 184 - 171
src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderConfirmReturnRecord.jsp

@@ -140,9 +140,9 @@
             <td><b>退款编号:</b>
                     ${empty cmReturnedPurchase.returnedNo?'':(cmReturnedPurchase.returnedNo)}
             </td>
-            <td><b>退款模式:</b>
-                    ${cmReturnedPurchase.refundType eq 1?'按商品退回':'自定义金额退款'}
-            </td>
+<%--            <td><b>退款模式:</b>--%>
+<%--                    ${cmReturnedPurchase.refundType eq 1?'按商品退回':'自定义金额退款'}--%>
+<%--            </td>--%>
             <td><b>申请时间:</b>
                     ${cmReturnedPurchase.returnTime}
             </td>
@@ -151,22 +151,22 @@
                         value="${empty cmReturnedPurchase.refundFee?'0.00':(cmReturnedPurchase.refundFee)}"
                         pattern="#0.00"/></span>元
             </td>
-            <td><b>退款状态:</b>
-                <c:if test="${empty cmReturnedPurchase.status}">
-                    待申请
-                </c:if>
-                <c:if test="${ not empty cmReturnedPurchase.status}">
-                    <c:if test="${cmReturnedPurchase.status eq 1}">
-                        待审核
-                    </c:if>
-                    <c:if test="${cmReturnedPurchase.status eq 2}">
-                        审核通过
-                    </c:if>
-                    <c:if test="${cmReturnedPurchase.status eq 3}">
-                        审核不通过
-                    </c:if>
-                </c:if>
-            </td>
+<%--            <td><b>退款状态:</b>--%>
+<%--                <c:if test="${empty cmReturnedPurchase.status}">--%>
+<%--                    待申请--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${ not empty cmReturnedPurchase.status}">--%>
+<%--                    <c:if test="${cmReturnedPurchase.status eq 1}">--%>
+<%--                        待审核--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${cmReturnedPurchase.status eq 2}">--%>
+<%--                        审核通过--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${cmReturnedPurchase.status eq 3}">--%>
+<%--                        审核不通过--%>
+<%--                    </c:if>--%>
+<%--                </c:if>--%>
+<%--            </td>--%>
         </tr>
         <tr>
             <td colspan="4">
@@ -188,7 +188,7 @@
                     <c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">
                         线下转账:<fmt:formatNumber type="number" pattern="#,##0.00"
                                                value="${cmReturnedPurchase.refundOfflineFee}"/>元&nbsp;&nbsp;&nbsp;&nbsp;
-                        采美退款银行:${cmReturnedPurchase.bankNameType}
+<%--                        采美退款银行:${cmReturnedPurchase.bankNameType}--%>
 <%--                        <c:if test="${cmReturnedPurchase.payType == '1'}">--%>
 <%--                            建设银行7297--%>
 <%--                        </c:if>--%>
@@ -221,162 +221,162 @@
                     <%--存在线下打款才显示银行信息--%>
                 <br>
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                <c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">
-                    <b>开户名:</b>${empty cmReturnedPurchase.bankAccountName?'':(cmReturnedPurchase.bankAccountName)}
-                    &nbsp;&nbsp;&nbsp;&nbsp;
-                    <b>账号:</b>${empty cmReturnedPurchase.bankAccountNo?'':(cmReturnedPurchase.bankAccountNo)}
-                    &nbsp;&nbsp;&nbsp;&nbsp;
-                    <b>开户行:</b>${empty cmReturnedPurchase.openBank?'':(cmReturnedPurchase.openBank)}
-                    &nbsp;&nbsp;&nbsp;&nbsp;
-                    <b>账户类型:</b>
-                    <c:if test="${cmReturnedPurchase.bankAccountType eq 1}">
-                        公账
-                    </c:if>
-                    <c:if test="${cmReturnedPurchase.bankAccountType eq 2}">
-                        私账
-                    </c:if>
-                </c:if>
+<%--                <c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">--%>
+<%--                    <b>开户名:</b>${empty cmReturnedPurchase.bankAccountName?'':(cmReturnedPurchase.bankAccountName)}--%>
+<%--                    &nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                    <b>账号:</b>${empty cmReturnedPurchase.bankAccountNo?'':(cmReturnedPurchase.bankAccountNo)}--%>
+<%--                    &nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                    <b>开户行:</b>${empty cmReturnedPurchase.openBank?'':(cmReturnedPurchase.openBank)}--%>
+<%--                    &nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                    <b>账户类型:</b>--%>
+<%--                    <c:if test="${cmReturnedPurchase.bankAccountType eq 1}">--%>
+<%--                        公账--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${cmReturnedPurchase.bankAccountType eq 2}">--%>
+<%--                        私账--%>
+<%--                    </c:if>--%>
+<%--                </c:if>--%>
             </td>
         </tr>
     </table>
 </c:forEach>
 <table id="orderTable" class="table table-striped table-bordered table-condensed">
-    <thead>
-    </thead>
-    <tr>
-        <td>
-            订单编号(ID):${order.orderNo}(${order.orderID})
-        </td>
-        <td>
-            下单时间:${order.orderTime}
-        </td>
-        <td colspan="2">
-            订单状态:
-            <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
-				order.status eq 23 || order.status eq 31 ||order.status eq 32 ||order.status eq 33}">交易中(${fns:getDictLabel(order.status,"order_detail_status","" )})</c:if>
-            <c:if test="${order.status eq 0 || order.status eq 4 || order.status eq 5 || order.status eq 6 || order.status eq 7}">${fns:getDictLabel(order.status,"order_detail_status","" )}</c:if>
-        </td>
-    </tr>
-    <tr>
-        <td>
-            订单金额:¥<fmt:formatNumber type="number" value="${order.payTotalFee}" pattern="0.00" maxFractionDigits="2"/>&nbsp;
-            <c:if test="${not empty order.couponOrderRecord}">
-                <c:if test="${order.couponOrderRecord.couponType eq 0}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
-                            color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                </c:if>
-                <c:if test="${order.couponOrderRecord.couponType eq 1}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
-                            color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                </c:if>
-                <c:if test="${order.couponOrderRecord.couponType eq 2}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                </c:if>
-                <c:if test="${order.couponOrderRecord.couponType eq 3}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
-                            color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                </c:if>
-                <c:if test="${order.couponOrderRecord.couponType eq 4}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font
-                            color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                </c:if>
-            </c:if>
-            <c:if test="${not empty order.heheCouponRecord}">
-                <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">
-                    <font color="red">
-                        (${order.heheCouponRecord.couponType eq 1 ? '活动':order.heheCouponRecord.couponType eq 2?'专享':order.heheCouponRecord.couponType eq 3?'新人':order.heheCouponRecord.couponType eq 4?'好友分享':order.heheCouponRecord.couponType eq 5?'好友消费':'消费分享'}券抵扣¥${order.heheCouponRecord.couponAmount},满${order.heheCouponRecord.touchPrice}减${order.heheCouponRecord.couponAmount})
-                    </font>
-                </a>
-            </c:if>
-        </td>
-        <td>
-            应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00" maxFractionDigits="2"/>
-            <c:if test="${order.organizeID != 4}">
-                (账户余额抵扣:${order.balancePayFee})
-            </c:if>
-            <a href="${ctx}/order/cmDiscernReceipt/detail?id=${lastReceiptDetailId}"
-               style="text-decoration: underline;margin-left: 20px">查看订单收款情况</a>
-        </td>
-        <c:if test="${order.organizeID != 4}">
-            <td>
-                经理折扣:¥<fmt:formatNumber type="number" value="${order.discountFee}" pattern="0.00"
-                                        maxFractionDigits="2"/>
-            </td>
-        </c:if>
-        <td>
-            运费:
-            <c:if test="${order.organizeID != 4}">
-                <c:if test="${order.freePostFlag == 0}">
-                    包邮
-                </c:if>
-                <c:if test="${order.freePostFlag == -1}">
-                    到付
-                </c:if>
-                <c:if test="${order.freePostFlag == -2}">
-                    仪器到付-产品包邮
-                </c:if>
-                <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
-                    <fmt:formatNumber value="${order.freight}" type="currency"/>
-                </c:if>
-                <c:if test="${order.userBeans > 0}">
-                    <font color="red">(采美豆抵用:${order.userBeans})</font>
-                </c:if>
-            </c:if>
-            <c:if test="${order.organizeID == 4}">
-                ${postageInfo}
-            </c:if>
-        </td>
-    </tr>
-    <tr>
-        <td>
-            收款状态:
-            <c:if test="${order.receiptStatus == 1}">
-                <font color="red">待收款</font>
-            </c:if>
-            <c:if test="${order.receiptStatus == 2}">
-                <font color="#ff8c00">部分收款</font>
-            </c:if>
-            <c:if test="${order.receiptStatus == 3}">
-                <font color="green">已收款</font>
-            </c:if></td>
-        </td>
-        <td>
-            发货状态:
-            <c:if test="${order.sendOutStatus == 1}">
-                <font color="red">待发货</font>
-            </c:if>
-            <c:if test="${order.sendOutStatus == 2}">
-                <font color="#ff8c00">部分发货</font>
-            </c:if>
-            <c:if test="${order.sendOutStatus == 3}">
-                <font color="green">已发货</font>
-            </c:if></td>
-        </td>
-        <td>
-            付款状态:
-            <c:if test="${order.payStatus == 1}">
-                <font color="red">待付款</font>
-            </c:if>
-            <c:if test="${order.payStatus == 2}">
-                <font color="#ff8c00">部分付款</font>
-            </c:if>
-            <c:if test="${order.payStatus == 3}">
-                <font color="green">已付款</font>
-            </c:if></td>
-        </td>
-        <td>
-            退款状态:
-            <c:if test="${empty order.refundType}">
-                <font>无退款</font>
-            </c:if>
-            <c:if test="${order.refundType == 1}">
-                <font>部分退款</font>
-            </c:if>
-            <c:if test="${order.refundType == 2}">
-                <font>已退款</font>
-            </c:if></td>
-        </td>
-    </tr>
+<%--    <thead>--%>
+<%--    </thead>--%>
+<%--    <tr>--%>
+<%--        <td>--%>
+<%--            订单编号(ID):${order.orderNo}(${order.orderID})--%>
+<%--        </td>--%>
+<%--        <td>--%>
+<%--            下单时间:${order.orderTime}--%>
+<%--        </td>--%>
+<%--        <td colspan="2">--%>
+<%--            订单状态:--%>
+<%--            <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||--%>
+<%--				order.status eq 23 || order.status eq 31 ||order.status eq 32 ||order.status eq 33}">交易中(${fns:getDictLabel(order.status,"order_detail_status","" )})</c:if>--%>
+<%--            <c:if test="${order.status eq 0 || order.status eq 4 || order.status eq 5 || order.status eq 6 || order.status eq 7}">${fns:getDictLabel(order.status,"order_detail_status","" )}</c:if>--%>
+<%--        </td>--%>
+<%--    </tr>--%>
+<%--    <tr>--%>
+<%--        <td>--%>
+<%--            订单金额:¥<fmt:formatNumber type="number" value="${order.payTotalFee}" pattern="0.00" maxFractionDigits="2"/>&nbsp;--%>
+<%--            <c:if test="${not empty order.couponOrderRecord}">--%>
+<%--                <c:if test="${order.couponOrderRecord.couponType eq 0}">--%>
+<%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+<%--                            color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${order.couponOrderRecord.couponType eq 1}">--%>
+<%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+<%--                            color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${order.couponOrderRecord.couponType eq 2}">--%>
+<%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${order.couponOrderRecord.couponType eq 3}">--%>
+<%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+<%--                            color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${order.couponOrderRecord.couponType eq 4}">--%>
+<%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+<%--                            color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                </c:if>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${not empty order.heheCouponRecord}">--%>
+<%--                <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">--%>
+<%--                    <font color="red">--%>
+<%--                        (${order.heheCouponRecord.couponType eq 1 ? '活动':order.heheCouponRecord.couponType eq 2?'专享':order.heheCouponRecord.couponType eq 3?'新人':order.heheCouponRecord.couponType eq 4?'好友分享':order.heheCouponRecord.couponType eq 5?'好友消费':'消费分享'}券抵扣¥${order.heheCouponRecord.couponAmount},满${order.heheCouponRecord.touchPrice}减${order.heheCouponRecord.couponAmount})--%>
+<%--                    </font>--%>
+<%--                </a>--%>
+<%--            </c:if>--%>
+<%--        </td>--%>
+<%--        <td>--%>
+<%--            应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00" maxFractionDigits="2"/>--%>
+<%--            <c:if test="${order.organizeID != 4}">--%>
+<%--                (账户余额抵扣:${order.balancePayFee})--%>
+<%--            </c:if>--%>
+<%--            <a href="${ctx}/order/cmDiscernReceipt/detail?id=${lastReceiptDetailId}"--%>
+<%--               style="text-decoration: underline;margin-left: 20px">查看订单收款情况</a>--%>
+<%--        </td>--%>
+<%--        <c:if test="${order.organizeID != 4}">--%>
+<%--            <td>--%>
+<%--                经理折扣:¥<fmt:formatNumber type="number" value="${order.discountFee}" pattern="0.00"--%>
+<%--                                        maxFractionDigits="2"/>--%>
+<%--            </td>--%>
+<%--        </c:if>--%>
+<%--        <td>--%>
+<%--            运费:--%>
+<%--            <c:if test="${order.organizeID != 4}">--%>
+<%--                <c:if test="${order.freePostFlag == 0}">--%>
+<%--                    包邮--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${order.freePostFlag == -1}">--%>
+<%--                    到付--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${order.freePostFlag == -2}">--%>
+<%--                    仪器到付-产品包邮--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">--%>
+<%--                    <fmt:formatNumber value="${order.freight}" type="currency"/>--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${order.userBeans > 0}">--%>
+<%--                    <font color="red">(采美豆抵用:${order.userBeans})</font>--%>
+<%--                </c:if>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.organizeID == 4}">--%>
+<%--                ${postageInfo}--%>
+<%--            </c:if>--%>
+<%--        </td>--%>
+<%--    </tr>--%>
+<%--    <tr>--%>
+<%--        <td>--%>
+<%--            收款状态:--%>
+<%--            <c:if test="${order.receiptStatus == 1}">--%>
+<%--                <font color="red">待收款</font>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.receiptStatus == 2}">--%>
+<%--                <font color="#ff8c00">部分收款</font>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.receiptStatus == 3}">--%>
+<%--                <font color="green">已收款</font>--%>
+<%--            </c:if></td>--%>
+<%--        </td>--%>
+<%--        <td>--%>
+<%--            发货状态:--%>
+<%--            <c:if test="${order.sendOutStatus == 1}">--%>
+<%--                <font color="red">待发货</font>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.sendOutStatus == 2}">--%>
+<%--                <font color="#ff8c00">部分发货</font>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.sendOutStatus == 3}">--%>
+<%--                <font color="green">已发货</font>--%>
+<%--            </c:if></td>--%>
+<%--        </td>--%>
+<%--        <td>--%>
+<%--            付款状态:--%>
+<%--            <c:if test="${order.payStatus == 1}">--%>
+<%--                <font color="red">待付款</font>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.payStatus == 2}">--%>
+<%--                <font color="#ff8c00">部分付款</font>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.payStatus == 3}">--%>
+<%--                <font color="green">已付款</font>--%>
+<%--            </c:if></td>--%>
+<%--        </td>--%>
+<%--        <td>--%>
+<%--            退款状态:--%>
+<%--            <c:if test="${empty order.refundType}">--%>
+<%--                <font>无退款</font>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.refundType == 1}">--%>
+<%--                <font>部分退款</font>--%>
+<%--            </c:if>--%>
+<%--            <c:if test="${order.refundType == 2}">--%>
+<%--                <font>已退款</font>--%>
+<%--            </c:if></td>--%>
+<%--        </td>--%>
+<%--    </tr>--%>
     <tr>
         <td>
             机构:${order.buyer}
@@ -412,6 +412,18 @@
                         <td>付款状态:
                                 ${fns:getDictLabel(shopOrderReturneds.payStatus,'payStatus' ,'' )}
                         </td>
+                        <td>
+                            退款状态:
+                            <c:if test="${order.newShopOrders.get(shopOrderReturnedStatus.index).orderStatusFlag == 1}">
+                                <font>无退款</font>
+                            </c:if>
+                            <c:if test="${order.newShopOrders.get(shopOrderReturnedStatus.index).orderStatusFlag == 2}">
+                                <font>退款中</font>
+                            </c:if>
+                            <c:if test="${order.newShopOrders.get(shopOrderReturnedStatus.index).orderStatusFlag == 3}">
+                                <font>已退款</font>
+                            </c:if>
+                        </td>
                         <td>
                             供应商:${shopOrderReturneds.shopName}&nbsp;&nbsp;
                             <c:if test="${not empty shopOrderReturneds.commercialCode}">
@@ -457,6 +469,7 @@
                                 <td>折后单价:¥${cmReturnedPurchaseProduct.discountPrice}</td>
                             </c:if>
                             <td>购买数量(赠品数)X${cmReturnedPurchaseProduct.num}(${cmReturnedPurchaseProduct.presentNum})</td>
+                            <td>运费:${order.newShopOrders.get(shopOrderReturnedStatus.index).postageInfo}</td>
                         </tr>
                         <tr>
                             <td>规格:${cmReturnedPurchaseProduct.unit}</td>

+ 238 - 225
src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderReturnRecord.jsp

@@ -287,22 +287,22 @@
                         (账户余额抵扣:${order.balancePayFee})
                     </c:if>
                 </td>
-                <td><b>退款审核状态:</b>
-                    <c:if test="${empty cmReturnedPurchase.status}">
-                        待申请
-                    </c:if>
-                    <c:if test="${ not empty cmReturnedPurchase.status}">
-                        <c:if test="${cmReturnedPurchase.status eq 1}">
-                            待审核
-                        </c:if>
-                        <c:if test="${cmReturnedPurchase.status eq 2}">
-                            审核通过
-                        </c:if>
-                        <c:if test="${cmReturnedPurchase.status eq 3}">
-                            审核不通过
-                        </c:if>
-                    </c:if>
-                </td>
+<%--                <td><b>退款审核状态:</b>--%>
+<%--                    <c:if test="${empty cmReturnedPurchase.status}">--%>
+<%--                        待申请--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${ not empty cmReturnedPurchase.status}">--%>
+<%--                        <c:if test="${cmReturnedPurchase.status eq 1}">--%>
+<%--                            待审核--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${cmReturnedPurchase.status eq 2}">--%>
+<%--                            审核通过--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${cmReturnedPurchase.status eq 3}">--%>
+<%--                            审核不通过--%>
+<%--                        </c:if>--%>
+<%--                    </c:if>--%>
+<%--                </td>--%>
             </tr>
             <tr>
                 <td colspan="4">
@@ -321,35 +321,35 @@
                         </c:if>
                         <br>
                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">
-                            线下转账:<fmt:formatNumber type="number" pattern="#,##0.00"
-                                                   value="${cmReturnedPurchase.refundOfflineFee}"/>元&nbsp;&nbsp;&nbsp;&nbsp;
-                            采美退款银行:
-                            <c:if test="${cmReturnedPurchase.payType == '1'}">
-                                建设银行7297
-                            </c:if>
-                            <c:if test="${cmReturnedPurchase.payType == '2'}">
-                                中信银行0897
-                            </c:if>
-                            <c:if test="${cmReturnedPurchase.payType == '3'}">
-                                中信银行7172
-                            </c:if>
-                            <c:if test="${cmReturnedPurchase.payType == '4'}">
-                                广发银行0115
-                            </c:if>
-                            <c:if test="${cmReturnedPurchase.payType == '5'}">
-                                广发银行5461
-                            </c:if>
-                            <c:if test="${cmReturnedPurchase.payType == '6'}">
-                                虚拟银行0000
-                            </c:if>
-                            <c:if test="${cmReturnedPurchase.payType == '7'}">
-                                华夏银行2400
-                            </c:if>
-                            <c:if test="${cmReturnedPurchase.payType == '8'}">
-                                中国银行9452
-                            </c:if>
-                        </c:if>
+<%--                        <c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">--%>
+<%--                            线下转账:<fmt:formatNumber type="number" pattern="#,##0.00"--%>
+<%--                                                   value="${cmReturnedPurchase.refundOfflineFee}"/>元&nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                            采美退款银行:--%>
+<%--                            <c:if test="${cmReturnedPurchase.payType == '1'}">--%>
+<%--                                建设银行7297--%>
+<%--                            </c:if>--%>
+<%--                            <c:if test="${cmReturnedPurchase.payType == '2'}">--%>
+<%--                                中信银行0897--%>
+<%--                            </c:if>--%>
+<%--                            <c:if test="${cmReturnedPurchase.payType == '3'}">--%>
+<%--                                中信银行7172--%>
+<%--                            </c:if>--%>
+<%--                            <c:if test="${cmReturnedPurchase.payType == '4'}">--%>
+<%--                                广发银行0115--%>
+<%--                            </c:if>--%>
+<%--                            <c:if test="${cmReturnedPurchase.payType == '5'}">--%>
+<%--                                广发银行5461--%>
+<%--                            </c:if>--%>
+<%--                            <c:if test="${cmReturnedPurchase.payType == '6'}">--%>
+<%--                                虚拟银行0000--%>
+<%--                            </c:if>--%>
+<%--                            <c:if test="${cmReturnedPurchase.payType == '7'}">--%>
+<%--                                华夏银行2400--%>
+<%--                            </c:if>--%>
+<%--                            <c:if test="${cmReturnedPurchase.payType == '8'}">--%>
+<%--                                中国银行9452--%>
+<%--                            </c:if>--%>
+<%--                        </c:if>--%>
                         <c:if test="${empty cmReturnedPurchase.refundFee or cmReturnedPurchase.refundFee eq 0}">
                             暂无支付方式
                         </c:if>
@@ -360,21 +360,21 @@
                         <%--存在线下打款才显示银行信息--%>
                     <br>
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                    <c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">
-                        <b>开户名:</b>${empty cmReturnedPurchase.bankAccountName?'':(cmReturnedPurchase.bankAccountName)}
-                        &nbsp;&nbsp;&nbsp;&nbsp;
-                        <b>账号:</b>${empty cmReturnedPurchase.bankAccountNo?'':(cmReturnedPurchase.bankAccountNo)}
-                        &nbsp;&nbsp;&nbsp;&nbsp;
-                        <b>开户行:</b>${empty cmReturnedPurchase.openBank?'':(cmReturnedPurchase.openBank)}
-                        &nbsp;&nbsp;&nbsp;&nbsp;
-                        <b>账户类型:</b>
-                        <c:if test="${cmReturnedPurchase.bankAccountType eq 1}">
-                            公账
-                        </c:if>
-                        <c:if test="${cmReturnedPurchase.bankAccountType eq 2}">
-                            私账
-                        </c:if>
-                    </c:if>
+<%--                    <c:if test="${not empty cmReturnedPurchase.refundOfflineFee && cmReturnedPurchase.refundOfflineFee ne 0 }">--%>
+<%--                        <b>开户名:</b>${empty cmReturnedPurchase.bankAccountName?'':(cmReturnedPurchase.bankAccountName)}--%>
+<%--                        &nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                        <b>账号:</b>${empty cmReturnedPurchase.bankAccountNo?'':(cmReturnedPurchase.bankAccountNo)}--%>
+<%--                        &nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                        <b>开户行:</b>${empty cmReturnedPurchase.openBank?'':(cmReturnedPurchase.openBank)}--%>
+<%--                        &nbsp;&nbsp;&nbsp;&nbsp;--%>
+<%--                        <b>账户类型:</b>--%>
+<%--                        <c:if test="${cmReturnedPurchase.bankAccountType eq 1}">--%>
+<%--                            公账--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${cmReturnedPurchase.bankAccountType eq 2}">--%>
+<%--                            私账--%>
+<%--                        </c:if>--%>
+<%--                    </c:if>--%>
                 </td>
             </tr>
         </table>
@@ -383,171 +383,171 @@
         <table id="orderTable" class="table table-striped table-bordered table-condensed">
             <thead>
             </thead>
-            <tr>
-                <td>
-                    订单编号(ID):${order.orderNo}(${order.orderID})
-                </td>
-                <td>
-                    下单时间:${order.orderTime}
-                </td>
-                <c:if test="${order.orderType eq 2}">
-                    <td>
-                        订单类型:${order.collageFlag eq 1?'拼团订单':'独立订单'}
-                    </td>
-                </c:if>
-                <td colspan="2">
-                    订单状态:
-                    <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
-				order.status eq 23 || order.status eq 31 ||order.status eq 32 ||order.status eq 33}">交易中(${fns:getDictLabel(order.status,"order_detail_status","" )})</c:if>
-                    <c:if test="${order.status eq 0 || order.status eq 4 || order.status eq 5 || order.status eq 6 || order.status eq 7}">${fns:getDictLabel(order.status,"order_detail_status","" )}</c:if>
-                </td>
-            </tr>
-            <tr>
-                <td>
-                    订单金额:¥<fmt:formatNumber type="number" value="${order.payTotalFee}" pattern="0.00"
-                                            maxFractionDigits="2"/>
-                    <c:if test="${not empty order.couponOrderRecord}">
-                        <c:if test="${order.couponOrderRecord.couponType eq 0}">
-                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                        </c:if>
-                        <c:if test="${order.couponOrderRecord.couponType eq 1}">
-                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                        </c:if>
-                        <c:if test="${order.couponOrderRecord.couponType eq 2}">
-                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                        </c:if>
-                        <c:if test="${order.couponOrderRecord.couponType eq 3}">
-                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                        </c:if>
-                        <c:if test="${order.couponOrderRecord.couponType eq 4}">
-                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
-                        </c:if>
-                    </c:if>
-                    <c:if test="${not empty order.heheCouponRecord}">
-                        <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">
-                            <font color="red">
-                                (${order.heheCouponRecord.couponType eq 1 ? '活动':order.heheCouponRecord.couponType eq 2?'专享':order.heheCouponRecord.couponType eq 3?'新人':order.heheCouponRecord.couponType eq 4?'好友分享':order.heheCouponRecord.couponType eq 5?'好友消费':'消费分享'}券抵扣¥${order.heheCouponRecord.couponAmount},满${order.heheCouponRecord.touchPrice}减${order.heheCouponRecord.couponAmount})
-                            </font>
-                        </a>
-                    </c:if>
-                    <c:if test="${order.reductionAmount > 0}">
-                        (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
-                    </c:if>
-                </td>
-                <td>
-                    应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00"
-                                            maxFractionDigits="2"/>
-                    <c:if test="${order.organizeID != 4}">
-                        (账户余额抵扣:${order.balancePayFee})
-                    </c:if>
-                    <a href="${ctx}/order/cmDiscernReceipt/detail?id=${lastReceiptDetailId}"
-                       style="text-decoration: underline;margin-left: 20px">查看订单收款情况</a>
-                </td>
-                <c:if test="${order.organizeID != 4}">
-                    <td>
-                        经理折扣:¥<fmt:formatNumber type="number" value="${order.discountFee}"
-                                                pattern="0.00"></fmt:formatNumber>
-                    </td>
-                </c:if>
-                <td>
-                    机构运费:
-                    <c:if test="${order.organizeID != 4}">
-
-                        <c:if test="${order.freePostFlag == 0}">
-                            包邮
-                        </c:if>
-                        <c:if test="${order.freePostFlag == -1}">
-                            到付
-                        </c:if>
-                        <c:if test="${order.freePostFlag == -2}">
-                            仪器到付-产品包邮
-                        </c:if>
-                        <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
-                            <fmt:formatNumber value="${order.freight}" type="currency"/>
-                            <c:if test="${order.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>
-                        </c:if>
-                        <c:if test="${order.userBeans > 0}">
-                            <font color="red">(采美豆抵用:${order.userBeans})</font>
-                        </c:if>
-                    </c:if>
-                    <c:if test="${order.organizeID == 4}">
-                        ${postageInfo}
-                    </c:if>
-                </td>
-            </tr>
-            <tr>
-                <td>
-                    收款状态:
-                    <c:if test="${order.receiptStatus == 1}">
-                        <font color="red">待收款</font>
-                    </c:if>
-                    <c:if test="${order.receiptStatus == 2}">
-                        <font color="#ff8c00">部分收款</font>
-                    </c:if>
-                    <c:if test="${order.receiptStatus == 3}">
-                        <font color="green">已收款</font>
-                    </c:if></td>
-                </td>
-                <c:if test="${order.orderType eq 2}">
-                    <td>
-                        拼团状态:
-                        <c:choose>
-                            <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
-                                <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
-                                        ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
-                                </font>
-                            </c:when>
-                            <c:otherwise>
-                                -
-                            </c:otherwise>
-                        </c:choose>
-                    </td>
-                </c:if>
-                <td>
-                    发货状态:
-                    <c:if test="${order.sendOutStatus == 1}">
-                        <font color="red">待发货</font>
-                    </c:if>
-                    <c:if test="${order.sendOutStatus == 2}">
-                        <font color="#ff8c00">部分发货</font>
-                    </c:if>
-                    <c:if test="${order.sendOutStatus == 3}">
-                        <font color="green">已发货</font>
-                    </c:if></td>
-                </td>
-                <td>
-                    付款状态:
-                    <c:if test="${order.payStatus == 1}">
-                        <font color="red">待付款</font>
-                    </c:if>
-                    <c:if test="${order.payStatus == 2}">
-                        <font color="#ff8c00">部分付款</font>
-                    </c:if>
-                    <c:if test="${order.payStatus == 3}">
-                        <font color="green">已付款</font>
-                        <c:if test="${order.zeroCostFlag eq 1}">
-                            <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg"
-                                                                               style="width: 15px;margin-bottom: 4px"></span>
-                                <div class="message">
-                                    <span>商品成本为0,直接置为已付款,无需付款供应商</span>
-                                </div>
-                            </a>
-                        </c:if>
-                    </c:if></td>
-                </td>
-                <td>
-                    退款状态:
-                    <c:if test="${empty order.refundType}">
-                        <font>无退款</font>
-                    </c:if>
-                    <c:if test="${order.refundType == 1}">
-                        <font>部分退款</font>
-                    </c:if>
-                    <c:if test="${order.refundType == 2}">
-                        <font>已退款</font>
-                    </c:if></td>
-                </td>
-            </tr>
+<%--            <tr>--%>
+<%--                <td>--%>
+<%--                    订单编号(ID):${order.orderNo}(${order.orderID})--%>
+<%--                </td>--%>
+<%--                <td>--%>
+<%--                    下单时间:${order.orderTime}--%>
+<%--                </td>--%>
+<%--                <c:if test="${order.orderType eq 2}">--%>
+<%--                    <td>--%>
+<%--                        订单类型:${order.collageFlag eq 1?'拼团订单':'独立订单'}--%>
+<%--                    </td>--%>
+<%--                </c:if>--%>
+<%--                <td colspan="2">--%>
+<%--                    订单状态:--%>
+<%--                    <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||--%>
+<%--				order.status eq 23 || order.status eq 31 ||order.status eq 32 ||order.status eq 33}">交易中(${fns:getDictLabel(order.status,"order_detail_status","" )})</c:if>--%>
+<%--                    <c:if test="${order.status eq 0 || order.status eq 4 || order.status eq 5 || order.status eq 6 || order.status eq 7}">${fns:getDictLabel(order.status,"order_detail_status","" )}</c:if>--%>
+<%--                </td>--%>
+<%--            </tr>--%>
+<%--            <tr>--%>
+<%--                <td>--%>
+<%--                    订单金额:¥<fmt:formatNumber type="number" value="${order.payTotalFee}" pattern="0.00"--%>
+<%--                                            maxFractionDigits="2"/>--%>
+<%--                    <c:if test="${not empty order.couponOrderRecord}">--%>
+<%--                        <c:if test="${order.couponOrderRecord.couponType eq 0}">--%>
+<%--                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${order.couponOrderRecord.couponType eq 1}">--%>
+<%--                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${order.couponOrderRecord.couponType eq 2}">--%>
+<%--                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${order.couponOrderRecord.couponType eq 3}">--%>
+<%--                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${order.couponOrderRecord.couponType eq 4}">--%>
+<%--                            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+<%--                        </c:if>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${not empty order.heheCouponRecord}">--%>
+<%--                        <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">--%>
+<%--                            <font color="red">--%>
+<%--                                (${order.heheCouponRecord.couponType eq 1 ? '活动':order.heheCouponRecord.couponType eq 2?'专享':order.heheCouponRecord.couponType eq 3?'新人':order.heheCouponRecord.couponType eq 4?'好友分享':order.heheCouponRecord.couponType eq 5?'好友消费':'消费分享'}券抵扣¥${order.heheCouponRecord.couponAmount},满${order.heheCouponRecord.touchPrice}减${order.heheCouponRecord.couponAmount})--%>
+<%--                            </font>--%>
+<%--                        </a>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.reductionAmount > 0}">--%>
+<%--                        (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})--%>
+<%--                    </c:if>--%>
+<%--                </td>--%>
+<%--                <td>--%>
+<%--                    应收总额:¥<fmt:formatNumber type="number" value="${order.payableAmount}" pattern="0.00"--%>
+<%--                                            maxFractionDigits="2"/>--%>
+<%--                    <c:if test="${order.organizeID != 4}">--%>
+<%--                        (账户余额抵扣:${order.balancePayFee})--%>
+<%--                    </c:if>--%>
+<%--                    <a href="${ctx}/order/cmDiscernReceipt/detail?id=${lastReceiptDetailId}"--%>
+<%--                       style="text-decoration: underline;margin-left: 20px">查看订单收款情况</a>--%>
+<%--                </td>--%>
+<%--                <c:if test="${order.organizeID != 4}">--%>
+<%--                    <td>--%>
+<%--                        经理折扣:¥<fmt:formatNumber type="number" value="${order.discountFee}"--%>
+<%--                                                pattern="0.00"></fmt:formatNumber>--%>
+<%--                    </td>--%>
+<%--                </c:if>--%>
+<%--                <td>--%>
+<%--                    机构运费:--%>
+<%--                    <c:if test="${order.organizeID != 4}">--%>
+
+<%--                        <c:if test="${order.freePostFlag == 0}">--%>
+<%--                            包邮--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${order.freePostFlag == -1}">--%>
+<%--                            到付--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${order.freePostFlag == -2}">--%>
+<%--                            仪器到付-产品包邮--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">--%>
+<%--                            <fmt:formatNumber value="${order.freight}" type="currency"/>--%>
+<%--                            <c:if test="${order.returnedFreightFlag eq true}"><font color="red">(已退)</font></c:if>--%>
+<%--                        </c:if>--%>
+<%--                        <c:if test="${order.userBeans > 0}">--%>
+<%--                            <font color="red">(采美豆抵用:${order.userBeans})</font>--%>
+<%--                        </c:if>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.organizeID == 4}">--%>
+<%--                        ${postageInfo}--%>
+<%--                    </c:if>--%>
+<%--                </td>--%>
+<%--            </tr>--%>
+<%--            <tr>--%>
+<%--                <td>--%>
+<%--                    收款状态:--%>
+<%--                    <c:if test="${order.receiptStatus == 1}">--%>
+<%--                        <font color="red">待收款</font>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.receiptStatus == 2}">--%>
+<%--                        <font color="#ff8c00">部分收款</font>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.receiptStatus == 3}">--%>
+<%--                        <font color="green">已收款</font>--%>
+<%--                    </c:if></td>--%>
+<%--                </td>--%>
+<%--                <c:if test="${order.orderType eq 2}">--%>
+<%--                    <td>--%>
+<%--                        拼团状态:--%>
+<%--                        <c:choose>--%>
+<%--                            <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">--%>
+<%--                                <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">--%>
+<%--                                        ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}--%>
+<%--                                </font>--%>
+<%--                            </c:when>--%>
+<%--                            <c:otherwise>--%>
+<%--                                ---%>
+<%--                            </c:otherwise>--%>
+<%--                        </c:choose>--%>
+<%--                    </td>--%>
+<%--                </c:if>--%>
+<%--                <td>--%>
+<%--                    发货状态:--%>
+<%--                    <c:if test="${order.sendOutStatus == 1}">--%>
+<%--                        <font color="red">待发货</font>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.sendOutStatus == 2}">--%>
+<%--                        <font color="#ff8c00">部分发货</font>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.sendOutStatus == 3}">--%>
+<%--                        <font color="green">已发货</font>--%>
+<%--                    </c:if></td>--%>
+<%--                </td>--%>
+<%--                <td>--%>
+<%--                    付款状态:--%>
+<%--                    <c:if test="${order.payStatus == 1}">--%>
+<%--                        <font color="red">待付款</font>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.payStatus == 2}">--%>
+<%--                        <font color="#ff8c00">部分付款</font>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.payStatus == 3}">--%>
+<%--                        <font color="green">已付款</font>--%>
+<%--                        <c:if test="${order.zeroCostFlag eq 1}">--%>
+<%--                            <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg"--%>
+<%--                                                                               style="width: 15px;margin-bottom: 4px"></span>--%>
+<%--                                <div class="message">--%>
+<%--                                    <span>商品成本为0,直接置为已付款,无需付款供应商</span>--%>
+<%--                                </div>--%>
+<%--                            </a>--%>
+<%--                        </c:if>--%>
+<%--                    </c:if></td>--%>
+<%--                </td>--%>
+<%--                <td>--%>
+<%--                    退款状态:--%>
+<%--                    <c:if test="${empty order.refundType}">--%>
+<%--                        <font>无退款</font>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.refundType == 1}">--%>
+<%--                        <font>部分退款</font>--%>
+<%--                    </c:if>--%>
+<%--                    <c:if test="${order.refundType == 2}">--%>
+<%--                        <font>已退款</font>--%>
+<%--                    </c:if></td>--%>
+<%--                </td>--%>
+<%--            </tr>--%>
             <tr>
                 <td>
                     机构:${order.buyer}
@@ -612,6 +612,18 @@
                                         <font color="green">已付款</font>
                                     </c:if>
                                 </td>
+                                <td>
+                                    退款状态:
+                                    <c:if test="${order.newShopOrders.get(shopOrderReturnedStatus.index).orderStatusFlag == 1}">
+                                        <font>无退款</font>
+                                    </c:if>
+                                    <c:if test="${order.newShopOrders.get(shopOrderReturnedStatus.index).orderStatusFlag == 2}">
+                                        <font>退款中</font>
+                                    </c:if>
+                                    <c:if test="${order.newShopOrders.get(shopOrderReturnedStatus.index).orderStatusFlag == 3}">
+                                        <font>已退款</font>
+                                    </c:if>
+                                </td>
                                 <td>供应商:${shopOrderReturneds.shopName}</td>
                             </tr>
                             <c:if test="${order.onlinePayFlag eq 0}">
@@ -658,6 +670,7 @@
                                     <td>
                                         购买数量(赠品数)X${cmReturnedPurchaseProduct.num}(${cmReturnedPurchaseProduct.presentNum})
                                     </td>
+                                    <td>运费:${order.newShopOrders.get(shopOrderReturnedStatus.index).postageInfo}</td>
                                 </tr>
                                 <tr>
                                     <td>规格:${cmReturnedPurchaseProduct.unit}</td>

+ 365 - 175
src/main/webapp/WEB-INF/views/modules/bulkpurchase/refundRecord.jsp

@@ -113,199 +113,389 @@
 </ul>
 <br/>
 <table id="orderTable" class="table table-striped table-bordered table-condensed">
-    <thead>
-    </thead>
-    <tr>
-        <td>
-            下单时间:${order.orderTime}
-        </td>
-        <td>
-            订单号(ID):${order.orderNo}(${order.orderID})
-        </td>
-        <c:if test="${order.organizeID != 4}">
+    <%--    <thead>--%>
+    <%--    </thead>--%>
+    <%--    <tr>--%>
+    <%--        <td>--%>
+    <%--            下单时间:${order.orderTime}--%>
+    <%--        </td>--%>
+    <%--        <td>--%>
+    <%--            订单号(ID):${order.orderNo}(${order.orderID})--%>
+    <%--        </td>--%>
+    <%--        <c:if test="${order.organizeID != 4}">--%>
+    <%--            <td>--%>
+    <%--                <c:if test="${order.organizeID != 1}">--%>
+    <%--                    订单类型:${fns:getDictLabel(order.orderType,'order_type' ,'' )}--%>
+    <%--                    <c:if test="${order.orderType eq 2}">--%>
+    <%--                        ${order.collageFlag eq 1?'拼团订单':'独立订单'}--%>
+    <%--                    </c:if>--%>
+    <%--                </c:if>--%>
+    <%--            </td>--%>
+    <%--        </c:if>--%>
+    <%--        <td>--%>
+    <%--            <c:if test="${order.organizeID != 1}">--%>
+    <%--                订单来源:${fns:getDictLabel(order.orderSource,'bp_orderSource' ,'' )}--%>
+    <%--            </c:if>--%>
+    <%--        </td>--%>
+    <%--    </tr>--%>
+    <%--    <tr>--%>
+    <%--        <td>--%>
+    <%--            订单状态:--%>
+    <%--            <c:if test="${ not empty order.status}">--%>
+    <%--                ${fns:getNewOrderStatus(order.status)}--%>
+    <%--            </c:if>--%>
+    <%--        </td>--%>
+    <%--        <td>--%>
+    <%--            收款状态:&lt;%&ndash;${fns:getDictLabel(order.receiptStatus,'receiptStatus' ,'' )}&ndash;%&gt;--%>
+    <%--            <c:if test="${order.receiptStatus == 1}">--%>
+    <%--                <font color="red">待收款</font>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${order.receiptStatus == 2}">--%>
+    <%--                <font color="#ff8c00">部分收款</font>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${order.receiptStatus == 3}">--%>
+    <%--                <font color="green">已收款</font>--%>
+    <%--            </c:if>--%>
+    <%--        </td>--%>
+    <%--        <c:if test="${order.orderType eq 2}">--%>
+    <%--            <td>--%>
+    <%--                拼团状态:--%>
+    <%--                <c:choose>--%>
+    <%--                    <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">--%>
+    <%--                        <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">--%>
+    <%--                                ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}--%>
+    <%--                        </font>--%>
+    <%--                    </c:when>--%>
+    <%--                    <c:otherwise>--%>
+    <%--                        ---%>
+    <%--                    </c:otherwise>--%>
+    <%--                </c:choose>--%>
+    <%--            </td>--%>
+    <%--        </c:if>--%>
+    <%--        <td>--%>
+    <%--            付款状态:&lt;%&ndash;${fns:getDictLabel(order.payStatus,'payStatus' ,'' )}&ndash;%&gt;--%>
+    <%--            <c:if test="${order.payStatus == 1}">--%>
+    <%--                <font color="red">待付款</font>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${order.payStatus == 2}">--%>
+    <%--                <font color="#ff8c00">部分付款</font>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${order.payStatus == 3}">--%>
+    <%--                <font color="green">已付款</font>--%>
+    <%--            </c:if>--%>
+
+    <%--            <c:if test="${order.zeroCostFlag eq 1}">--%>
+    <%--                <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg" style="width: 15px;margin-bottom: 4px"></span>--%>
+    <%--                    <div class="message">--%>
+    <%--                        <span>商品成本为0,直接置为已付款,无需付款供应商</span>--%>
+    <%--                    </div>--%>
+    <%--                </a>--%>
+    <%--            </c:if>--%>
+    <%--        </td>--%>
+    <%--        <c:if test="${order.onlinePayFlag == 0}">--%>
+    <%--        <td>--%>
+    <%--            结算状态:--%>
+    <%--            <c:if test="${order.settleStatus == 1}">--%>
+    <%--                <font color="red">待结算</font>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${order.settleStatus == 2}">--%>
+    <%--                <font color="#ff8c00">部分结算</font>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${order.settleStatus == 3}">--%>
+    <%--                <font color="green">已结算</font>--%>
+    <%--            </c:if>--%>
+    <%--        </td>--%>
+    <%--        </c:if>--%>
+    <%--        <td>--%>
+    <%--&lt;%&ndash;            退款(退货)状态:${fns:getDictLabel(order.refundType,'refundType' ,'' )}&ndash;%&gt;--%>
+    <%--    <c:if test="${order.refundType == 1}">--%>
+    <%--        <font color="red">待发货</font>--%>
+    <%--    </c:if>--%>
+    <%--    <c:if test="${order.refundType == 2}">--%>
+    <%--        <font color="#ff8c00">部分发货</font>--%>
+    <%--    </c:if>--%>
+    <%--    <c:if test="${order.refundType == 3}">--%>
+    <%--        <font color="green">已发货</font>--%>
+    <%--    </c:if>--%>
+    <%--        </td>--%>
+    <%--    </tr>--%>
+    <%--    <tr>--%>
+    <%--        <td>--%>
+    <%--            机构:${order.bpOrderUserinfo.name}<c:if test="${order.organizeID == 3}"></c:if>--%>
+    <%--        </td>--%>
+    <%--        <td>--%>
+    <%--            收货人:${order.bpOrderUserinfo.shouHuoRen}--%>
+    <%--        </td>--%>
+    <%--        <td>--%>
+    <%--            手机:${order.bpOrderUserinfo.mobile}--%>
+    <%--        </td>--%>
+    <%--        <td>--%>
+    <%--            地址:${order.bpOrderUserinfo.province}${order.bpOrderUserinfo.city}${order.bpOrderUserinfo.town}${order.bpOrderUserinfo.address}--%>
+    <%--        </td>--%>
+    <%--    </tr>--%>
+    <%--    <tr>--%>
+    <%--        <td>--%>
+    <%--            订单金额:¥${order.payTotalFee}--%>
+    <%--            <c:if test="${not empty order.couponOrderRecord}">--%>
+    <%--                <c:if test="${order.couponOrderRecord.couponType eq 0}">--%>
+    <%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+    <%--                </c:if>--%>
+    <%--                <c:if test="${order.couponOrderRecord.couponType eq 1}">--%>
+    <%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+    <%--                </c:if>--%>
+    <%--                <c:if test="${order.couponOrderRecord.couponType eq 2}">--%>
+    <%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+    <%--                </c:if>--%>
+    <%--                <c:if test="${order.couponOrderRecord.couponType eq 3}">--%>
+    <%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+    <%--                </c:if>--%>
+    <%--                <c:if test="${order.couponOrderRecord.couponType eq 4}">--%>
+    <%--                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+    <%--                </c:if>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${not empty order.heheCouponRecord}">--%>
+    <%--                <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">--%>
+    <%--                    <font color="red">--%>
+    <%--                        (${order.heheCouponRecord.couponType eq 1 ? '活动':order.heheCouponRecord.couponType eq 2?'专享':order.heheCouponRecord.couponType eq 3?'新人':order.heheCouponRecord.couponType eq 4?'好友分享':order.heheCouponRecord.couponType eq 5?'好友消费':'消费分享'}券抵扣¥${order.heheCouponRecord.couponAmount},满${order.heheCouponRecord.touchPrice}减${order.heheCouponRecord.couponAmount})--%>
+    <%--                    </font>--%>
+    <%--                </a>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${order.reductionAmount > 0}">--%>
+    <%--                (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})--%>
+    <%--            </c:if>--%>
+    <%--        </td>--%>
+    <%--        <td>--%>
+    <%--            应收总额:¥${order.payableAmount}--%>
+    <%--        </td>--%>
+    <%--        <c:if test="${order.organizeID != 4}">--%>
+    <%--            <td>--%>
+    <%--                经理折扣:¥${order.discountFee}--%>
+    <%--            </td>--%>
+    <%--        </c:if>--%>
+    <%--        &lt;%&ndash;<td>--%>
+    <%--            运费:--%>
+    <%--            <c:if test="${order.organizeID != 4}">--%>
+
+    <%--                <c:if test="${order.freePostFlag == 0}">--%>
+    <%--                    包邮--%>
+    <%--                </c:if>--%>
+    <%--                <c:if test="${order.freePostFlag == -1}">--%>
+    <%--                    到付--%>
+    <%--                </c:if>--%>
+    <%--                <c:if test="${order.freePostFlag == -2}">--%>
+    <%--                    仪器到付-产品包邮--%>
+    <%--                </c:if>--%>
+    <%--                <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">--%>
+    <%--                    ¥<fmt:formatNumber value="${order.freight}" pattern="0.00"/>--%>
+    <%--                </c:if>--%>
+    <%--                <c:if test="${order.userBeans > 0}">--%>
+    <%--                    <font color="red">(采美豆抵用:${order.userBeans})</font>--%>
+    <%--                </c:if>--%>
+    <%--            </c:if>--%>
+    <%--            <c:if test="${order.organizeID == 4}">--%>
+    <%--                ${postageInfo}--%>
+    <%--            </c:if>--%>
+    <%--        </td>&ndash;%&gt;--%>
+    <%--    </tr>--%>
+    <%--    <tr>--%>
+    <%--        <c:if test="${order.organizeID != 4}">--%>
+    <%--            <td>优惠券:${order.couponAmount}</td>--%>
+    <%--        </c:if>--%>
+    <%--        <td>退款总额:¥${refundFee}</td>--%>
+    <%--        <td COLSPAN="3">--%>
+
+    <%--        </td>--%>
+    <%--    </tr>--%>
+
+
+    <c:forEach items="${order.newShopOrders}" var="shopOrder" varStatus="s">
+
+        <tr>
             <td>
-                <c:if test="${order.organizeID != 1}">
-                    订单类型:${fns:getDictLabel(order.orderType,'order_type' ,'' )}
-                    <c:if test="${order.orderType eq 2}">
-                        ${order.collageFlag eq 1?'拼团订单':'独立订单'}
-                    </c:if>
-                </c:if>
+                下单时间:${shopOrder.orderTime}
             </td>
-        </c:if>
-        <td>
-            <c:if test="${order.organizeID != 1}">
-                订单来源:${fns:getDictLabel(order.orderSource,'bp_orderSource' ,'' )}
-            </c:if>
-        </td>
-    </tr>
-    <tr>
-        <td>
-            订单状态:
-            <c:if test="${ not empty order.status}">
-                ${fns:getNewOrderStatus(order.status)}
-            </c:if>
-        </td>
-        <td>
-            收款状态:<%--${fns:getDictLabel(order.receiptStatus,'receiptStatus' ,'' )}--%>
-            <c:if test="${order.receiptStatus == 1}">
-                <font color="red">待收款</font>
-            </c:if>
-            <c:if test="${order.receiptStatus == 2}">
-                <font color="#ff8c00">部分收款</font>
-            </c:if>
-            <c:if test="${order.receiptStatus == 3}">
-                <font color="green">已收款</font>
-            </c:if>
-        </td>
-        <c:if test="${order.orderType eq 2}">
             <td>
-                拼团状态:
-                <c:choose>
-                    <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">
-                        <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">
-                                ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}
-                        </font>
-                    </c:when>
-                    <c:otherwise>
-                        -
-                    </c:otherwise>
-                </c:choose>
+                子订单号(ID):${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})
             </td>
-        </c:if>
-        <td>
-            付款状态:<%--${fns:getDictLabel(order.payStatus,'payStatus' ,'' )}--%>
-            <c:if test="${order.payStatus == 1}">
-                <font color="red">待付款</font>
-            </c:if>
-            <c:if test="${order.payStatus == 2}">
-                <font color="#ff8c00">部分付款</font>
-            </c:if>
-            <c:if test="${order.payStatus == 3}">
-                <font color="green">已付款</font>
-            </c:if>
-
-            <c:if test="${order.zeroCostFlag eq 1}">
-                <a href="javascript:;" class="zeroCost"><span><img src="/static/images/info.jpg" style="width: 15px;margin-bottom: 4px"></span>
-                    <div class="message">
-                        <span>商品成本为0,直接置为已付款,无需付款供应商</span>
-                    </div>
-                </a>
-            </c:if>
-        </td>
-        <c:if test="${order.onlinePayFlag == 0}">
-        <td>
-            结算状态:
-            <c:if test="${order.settleStatus == 1}">
-                <font color="red">待结算</font>
-            </c:if>
-            <c:if test="${order.settleStatus == 2}">
-                <font color="#ff8c00">部分结算</font>
-            </c:if>
-            <c:if test="${order.settleStatus == 3}">
-                <font color="green">已结算</font>
+            <c:if test="${order.organizeID != 4}">
+                <td>
+                    <c:if test="${order.organizeID != 1}">
+                        订单类型:${fns:getDictLabel(shopOrder.orderType,'order_type' ,'' )}
+                        <%--                        <c:if test="${shopOrder.orderType eq 2}">--%>
+                        <%--                            ${order.collageFlag eq 1?'拼团订单':'独立订单'}--%>
+                        <%--                        </c:if>--%>
+                    </c:if>
+                </td>
             </c:if>
-        </td>
-        </c:if>
-        <td>
-<%--            退款(退货)状态:${fns:getDictLabel(order.refundType,'refundType' ,'' )}--%>
-    <c:if test="${order.refundType == 1}">
-        <font color="red">待发货</font>
-    </c:if>
-    <c:if test="${order.refundType == 2}">
-        <font color="#ff8c00">部分发货</font>
-    </c:if>
-    <c:if test="${order.refundType == 3}">
-        <font color="green">已发货</font>
-    </c:if>
-        </td>
-    </tr>
-    <tr>
-        <td>
-            机构:${order.bpOrderUserinfo.name}<c:if test="${order.organizeID == 3}"></c:if>
-        </td>
-        <td>
-            收货人:${order.bpOrderUserinfo.shouHuoRen}
-        </td>
-        <td>
-            手机:${order.bpOrderUserinfo.mobile}
-        </td>
-        <td>
-            地址:${order.bpOrderUserinfo.province}${order.bpOrderUserinfo.city}${order.bpOrderUserinfo.town}${order.bpOrderUserinfo.address}
-        </td>
-    </tr>
-    <tr>
-        <td>
-            订单金额:¥${order.payTotalFee}
-            <c:if test="${not empty order.couponOrderRecord}">
-                <c:if test="${order.couponOrderRecord.couponType eq 0}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+            <td>
+                <c:if test="${order.organizeID != 1}">
+                    订单来源:${fns:getDictLabel(order.orderSource,'bp_orderSource' ,'' )}
                 </c:if>
-                <c:if test="${order.couponOrderRecord.couponType eq 1}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                订单状态:
+                <c:if test="${ not empty shopOrder.status}">
+                    ${fns:getNewOrderStatus(shopOrder.status)}
                 </c:if>
-                <c:if test="${order.couponOrderRecord.couponType eq 2}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+            </td>
+            <td>收款状态:
+                <c:if test="${shopOrder.shopReceiptStatus == 1}">
+                    <font color="red">待收款</font>
                 </c:if>
-                <c:if test="${order.couponOrderRecord.couponType eq 3}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+                <c:if test="${shopOrder.shopReceiptStatus == 2}">
+                    <font color="#ff8c00">部分收款</font>
                 </c:if>
-                <c:if test="${order.couponOrderRecord.couponType eq 4}">
-                    <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>
+                <c:if test="${shopOrder.shopReceiptStatus == 3}">
+                    <font color="green">已收款</font>
                 </c:if>
-            </c:if>
-            <c:if test="${not empty order.heheCouponRecord}">
-                <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">
-                    <font color="red">
-                        (${order.heheCouponRecord.couponType eq 1 ? '活动':order.heheCouponRecord.couponType eq 2?'专享':order.heheCouponRecord.couponType eq 3?'新人':order.heheCouponRecord.couponType eq 4?'好友分享':order.heheCouponRecord.couponType eq 5?'好友消费':'消费分享'}券抵扣¥${order.heheCouponRecord.couponAmount},满${order.heheCouponRecord.touchPrice}减${order.heheCouponRecord.couponAmount})
-                    </font>
-                </a>
-            </c:if>
-            <c:if test="${order.reductionAmount > 0}">
-                (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})
-            </c:if>
-        </td>
-        <td>
-            应收总额:¥${order.payableAmount}
-        </td>
-        <c:if test="${order.organizeID != 4}">
-            <td>
-                经理折扣:¥${order.discountFee}
             </td>
-        </c:if>
-        <%--<td>
-            运费:
-            <c:if test="${order.organizeID != 4}">
 
-                <c:if test="${order.freePostFlag == 0}">
-                    包邮
+                <%--            <c:if test="${order.orderType eq 2}">--%>
+                <%--                <td>--%>
+                <%--                    拼团状态:--%>
+                <%--                    <c:choose>--%>
+                <%--                        <c:when test="${order.collageFlag eq 1 && (order.status eq 31 || order.status eq 32 || order.status eq 33)}">--%>
+                <%--                            <font color="${order.collageStatus eq 1?'#00CC66':(order.collageStatus eq 2?'red':'')}">--%>
+                <%--                                    ${order.collageStatus eq 1?'拼团中':(order.collageStatus eq 2?'已拼成':'-')}--%>
+                <%--                            </font>--%>
+                <%--                        </c:when>--%>
+                <%--                        <c:otherwise>--%>
+                <%--                            ---%>
+                <%--                        </c:otherwise>--%>
+                <%--                    </c:choose>--%>
+                <%--                </td>--%>
+                <%--            </c:if>--%>
+
+            <td>
+                付款状态:<%--${fns:getDictLabel(order.payStatus,'payStatus' ,'' )}--%>
+                <c:if test="${shopOrder.payStatus == 1}">
+                    <font color="red">待付款</font>
                 </c:if>
-                <c:if test="${order.freePostFlag == -1}">
-                    到付
+                <c:if test="${shopOrder.payStatus == 2}">
+                    <font color="#ff8c00">部分付款</font>
                 </c:if>
-                <c:if test="${order.freePostFlag == -2}">
-                    仪器到付-产品包邮
+                <c:if test="${shopOrder.payStatus == 3}">
+                    <font color="green">已付款</font>
                 </c:if>
-                <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
-                    ¥<fmt:formatNumber value="${order.freight}" pattern="0.00"/>
+            </td>
+            <td>
+                结算状态:
+                <c:if test="${shopOrder.settleStatus == 1}">
+                    <font color="red">待结算</font>
                 </c:if>
-                <c:if test="${order.userBeans > 0}">
-                    <font color="red">(采美豆抵用:${order.userBeans})</font>
+                <c:if test="${shopOrder.settleStatus == 2}">
+                    <font color="#ff8c00">部分结算</font>
                 </c:if>
-            </c:if>
-            <c:if test="${order.organizeID == 4}">
-                ${postageInfo}
-            </c:if>
-        </td>--%>
-    </tr>
-    <tr>
-        <c:if test="${order.organizeID != 4}">
-            <td>优惠券:${order.couponAmount}</td>
-        </c:if>
-        <td>退款总额:¥${refundFee}</td>
-        <td COLSPAN="3">
+                <c:if test="${shopOrder.settleStatus == 3}">
+                    <font color="green">已结算</font>
+                </c:if>
+            </td>
+            <td>
+                    <%--            退款(退货)状态:${fns:getDictLabel(order.refundType,'refundType' ,'' )}--%>
+                    <%--    <c:if test="${order.refundType == 1}">--%>
+                    <%--        <font color="red">待发货</font>--%>
+                    <%--    </c:if>--%>
+                    <%--    <c:if test="${order.refundType == 2}">--%>
+                    <%--        <font color="#ff8c00">部分发货</font>--%>
+                    <%--    </c:if>--%>
+                    <%--    <c:if test="${order.refundType == 3}">--%>
+                    <%--        <font color="green">已发货</font>--%>
+                    <%--    </c:if>--%>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                机构:${order.bpOrderUserinfo.name}
+                <c:if test="${order.organizeID == 3}"></c:if>
+            </td>
+            <td>
+                收货人:${order.bpOrderUserinfo.shouHuoRen}
+            </td>
+            <td>
+                手机:${order.bpOrderUserinfo.mobile}
+            </td>
+            <td>
+                地址:${order.bpOrderUserinfo.province}${order.bpOrderUserinfo.city}${order.bpOrderUserinfo.town}${order.bpOrderUserinfo.address}
+            </td>
+        </tr>
+        <tr>
+            <td>
+                订单金额:¥${shopOrder.totalAmount}
+                    <%--    <c:if test="${not empty order.couponOrderRecord}">--%>
+                    <%--        <c:if test="${order.couponOrderRecord.couponType eq 0}">--%>
+                    <%--            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+                    <%--                    color="red">(活动券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+                    <%--        </c:if>--%>
+                    <%--        <c:if test="${order.couponOrderRecord.couponType eq 1}">--%>
+                    <%--            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+                    <%--                    color="red">(品类券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+                    <%--        </c:if>--%>
+                    <%--        <c:if test="${order.couponOrderRecord.couponType eq 2}">--%>
+                    <%--            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+                    <%--                    color="red">(用户专享券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+                    <%--        </c:if>--%>
+                    <%--        <c:if test="${order.couponOrderRecord.couponType eq 3}">--%>
+                    <%--            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+                    <%--                    color="red">(店铺券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+                    <%--        </c:if>--%>
+                    <%--        <c:if test="${order.couponOrderRecord.couponType eq 4}">--%>
+                    <%--            <a href="${ctx}/coupon/cmCouponClub/couponDetails?userId=${order.userID}"><font--%>
+                    <%--                    color="red">(新用户券抵扣¥${order.couponOrderRecord.couponAmount},满${order.couponOrderRecord.touchPrice}减${order.couponOrderRecord.couponAmount})</font></a>--%>
+                    <%--        </c:if>--%>
+                    <%--    </c:if>--%>
+                    <%--    <c:if test="${not empty order.heheCouponRecord}">--%>
+                    <%--        <a href="${ctx}/hehe/cmHeheCoupon/receiveDetails?userId=${order.userID}">--%>
+                    <%--            <font color="red">--%>
+                    <%--                (${order.heheCouponRecord.couponType eq 1 ? '活动':order.heheCouponRecord.couponType eq 2?'专享':order.heheCouponRecord.couponType eq 3?'新人':order.heheCouponRecord.couponType eq 4?'好友分享':order.heheCouponRecord.couponType eq 5?'好友消费':'消费分享'}券抵扣¥${order.heheCouponRecord.couponAmount},满${order.heheCouponRecord.touchPrice}减${order.heheCouponRecord.couponAmount})--%>
+                    <%--            </font>--%>
+                    <%--        </a>--%>
+                    <%--    </c:if>--%>
+                    <%--    <c:if test="${order.reductionAmount > 0}">--%>
+                    <%--        (分享减免¥${order.reductionAmount},满${order.reductionTouchPrice}减${order.reductionAmount})--%>
+                    <%--    </c:if>--%>
+            </td>
+            <td>
+                应收总额:¥${shopOrder.realPay}
+            </td>
+                <%--    <c:if test="${order.organizeID != 4}">--%>
+                <%--        <td>--%>
+                <%--            经理折扣:¥${order.discountFee}--%>
+                <%--        </td>--%>
+                <%--    </c:if>--%>
+                <%--<td>
+                    运费:
+                    <c:if test="${order.organizeID != 4}">
 
-        </td>
-    </tr>
+                        <c:if test="${order.freePostFlag == 0}">
+                            包邮
+                        </c:if>
+                        <c:if test="${order.freePostFlag == -1}">
+                            到付
+                        </c:if>
+                        <c:if test="${order.freePostFlag == -2}">
+                            仪器到付-产品包邮
+                        </c:if>
+                        <c:if test="${order.freePostFlag != -1 && order.freePostFlag != 0 && order.freePostFlag != -2}">
+                            ¥<fmt:formatNumber value="${order.freight}" pattern="0.00"/>
+                        </c:if>
+                        <c:if test="${order.userBeans > 0}">
+                            <font color="red">(采美豆抵用:${order.userBeans})</font>
+                        </c:if>
+                    </c:if>
+                    <c:if test="${order.organizeID == 4}">
+                        ${postageInfo}
+                    </c:if>
+                </td>--%>
+        </tr>
+        <tr>
+
+            <td>退款总额:¥${refundFee}</td>
+            <td COLSPAN="3">
+        </tr>
+
+    </c:forEach>
 </table>
 <c:if test="${not empty receipt}">
     <div class="record-title">收款记录:</div>

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

@@ -272,7 +272,14 @@
                         <c:if test="${cmDiscernReceipt.newReceiptType eq 5}">-其他</c:if>
                         </c:if>
             </td>
-            <td>${cmDiscernReceipt.bankNameType}</td>
+            <td>
+                <c:if test="${cmDiscernReceipt.organizeID == 1||cmDiscernReceipt.organizeID == 4}">
+                <span class="org-note">线下凭证</span>
+                </c:if>
+                <c:if test="${!(cmDiscernReceipt.organizeID == 1||cmDiscernReceipt.organizeID == 4)}">
+                <span class="org-note"> ${cmDiscernReceipt.bankNameType}</span>
+                </c:if>
+            </td>
             <td>
                 <c:if test="${cmDiscernReceipt.payWay == 2 && cmDiscernReceipt.newReceiptType == 3}">
                     <c:if test="${empty cmDiscernReceipt.receiptStatus}"><strong>____</strong></c:if>

+ 24 - 13
src/main/webapp/WEB-INF/views/modules/order/cmReturnedPurchaseList.jsp

@@ -49,7 +49,7 @@
 	</style>
 	<script type="text/javascript">
 		$(document).ready(function() {
-			
+
 		});
 		function page(n,s){
 			$("#pageNo").val(n);
@@ -141,7 +141,7 @@
 				<th>退款编号</th>
 				<th>退款审核状态</th>
 				<th>${empty orderType ? "机构" : "买家"}</th>
-				<th>订单编号(ID)</th>
+				<th>订单编号(ID)</th>
 				<th>退款金额</th>
 				<th class="refund-type-title">退款方式</th>
 				<th>申请人</th>
@@ -156,9 +156,10 @@
 			<tr>
 				<td>${cmReturnedPurchase.returnedNo}</td>
 				<td>
-					<c:if test="${cmReturnedPurchase.status eq 1}"><font color="#ff8c00">待审核</font></c:if>
-					<c:if test="${cmReturnedPurchase.status eq 2}"><font color="green">审核通过</font></c:if>
-					<c:if test="${cmReturnedPurchase.status eq 3}"><font color="red">审核不通过</font></c:if>
+					----
+<%--					<c:if test="${cmReturnedPurchase.status eq 1}"><font color="#ff8c00">待审核</font></c:if>--%>
+<%--					<c:if test="${cmReturnedPurchase.status eq 2}"><font color="green">审核通过</font></c:if>--%>
+<%--					<c:if test="${cmReturnedPurchase.status eq 3}"><font color="red">审核不通过</font></c:if>--%>
 				</td>
 				<td>
 					<c:if test="${cmReturnedPurchase.organizeID == 1}">
@@ -166,7 +167,7 @@
 					</c:if>
 						${cmReturnedPurchase.name}<c:if test="${cmReturnedPurchase.organizeID == 3}"></c:if>
 				</td>
-				<td>${cmReturnedPurchase.orderNo}(${cmReturnedPurchase.orderID})</td>
+				<td>${cmReturnedPurchase.shopOrderNo}(${cmReturnedPurchase.shopOrderID})</td>
 				<td><fmt:formatNumber type="number" pattern="#,##0.00"
 									  value="${cmReturnedPurchase.refundFee}" />
 				<td class="refund-type">
@@ -191,19 +192,29 @@
 						----
 					</c:if>
 				</td>
-				<td>${cmReturnedPurchase.applicationUserName eq null?"----":cmReturnedPurchase.applicationUserName}</td>
-				<td>${cmReturnedPurchase.returnTime eq null?"----":cmReturnedPurchase.returnTime}</td>
-				<td>${cmReturnedPurchase.reviewUserName eq null?"----":cmReturnedPurchase.reviewUserName}</td>
-				<td>${cmReturnedPurchase.confirmReturnTime eq null?"----":cmReturnedPurchase.confirmReturnTime}</td>
 				<td>
-					<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecord.rpc?id=${cmReturnedPurchase.id}&orderID=${cmReturnedPurchase.orderID}">查看详情</a>
+					----
+<%--						${cmReturnedPurchase.applicationUserName eq null?"----":cmReturnedPurchase.applicationUserName}--%>
+				</td>
+				<td>${cmReturnedPurchase.returnTime eq null?"----":cmReturnedPurchase.returnTime}
+				</td>
+				<td>
+					----
+<%--						${cmReturnedPurchase.reviewUserName eq null?"----":cmReturnedPurchase.reviewUserName}--%>
+				</td>
+				<td>
+					----
+<%--						${cmReturnedPurchase.confirmReturnTime eq null?"----":cmReturnedPurchase.confirmReturnTime}--%>
+				</td>
+				<td>
+					<a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecord.rpc?id=${cmReturnedPurchase.id}&orderID=${cmReturnedPurchase.orderID}&shopOrderID=${cmReturnedPurchase.shopOrderID}">查看详情</a>
 					<%--待审核----{审核退款}--%>
 					<c:if test="${cmReturnedPurchase.status eq 1}">
 							<shiro:hasPermission name="order:cmReturnedPurchase:shenqing">
 								<a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${cmReturnedPurchase.orderID}&id=${cmReturnedPurchase.id}" >申请退款</a>
 							</shiro:hasPermission>
 							<shiro:hasPermission name="order:cmReturnedPurchase:shenhe">
-								<a href="${ctx}/bulkpurchase/cmRefundsProduct/toReviewRecturnRecord.rpc?id=${cmReturnedPurchase.id}&orderID=${cmReturnedPurchase.orderID}">审核退款</a>
+								<a href="${ctx}/bulkpurchase/cmRefundsProduct/toReviewRecturnRecord.rpc?id=${cmReturnedPurchase.id}&orderID=${cmReturnedPurchase.orderID}&shopOrderID=${cmReturnedPurchase.shopOrderID}">审核退款</a>
 							</shiro:hasPermission>
 							<shiro:hasPermission name="order:cmReturnedPurchase:quxiao">
 								<a href="#" onclick="cancelApply1(${cmReturnedPurchase.id})">取消退款</a>
@@ -234,4 +245,4 @@
 	</table>
 	<div class="pagination">${page}</div>
 </body>
-</html>
+</html>

+ 432 - 353
src/main/webapp/WEB-INF/views/modules/order/orderDetail.jsp

@@ -660,150 +660,150 @@
                 ${postageInfo}
             </c:if>
         </td>
-        <td style="position: relative;"><a class="operation-btn btn">功能</a>
-            <div class="operation-block">
-                <shiro:hasPermission name="order:order:edit">
-                    <%--包含订单充值商品就不显示--%>
-                    <c:if test="${order.rechargeGoods ne 1 and order.rechargeGoods ne 2}">
-                        <c:if test="${order.status == 11 || order.status == 12 || order.status == 21 || order.status == 22 || order.status == 31 || order.status == 32}">
-                            <a href="${ctx}/order/toDeliveryPage?id=${order.orderID}">发货</a>
-                        </c:if>
-                        <c:if test="${order.receiptStatus == 2 && order.status != 6 && order.status != 7&& order.organizeID != 4}">
-                            <a href="javascript:void(0);" onclick="collection(${order.orderID})">抹平收款</a>
-                        </c:if>
-                    </c:if>
-                    <c:if test="${order.organizeID != 4}">
-                        <c:if test="${order.organizeID == 0}">
-                            <c:if test="${order.status == 0}">
-                                <a href="${ctx}/order/confirmOrder?orderID=${order.orderID}"
-                                   onclick="return confirmx('是否确认订单?', this.href)">确认订单</a>
-                            </c:if>
-                            <c:if test="${order.status == 0 || order.status == 11}">
-                                <a href="${ctx}/order/cancelOrder?orderID=${order.orderID}"
-                                   onclick="return confirmx('是否取消订单?', this.href)">取消订单</a>
-                            </c:if>
-                            <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||
-				            order.status eq 23 || order.status eq 0}">
-                                <c:if test="${order.rechargeGoods ne 1 && order.rechargeGoods ne 2 && (order.ableUserMoney > 0 || order.status eq 0)}">
-                                    <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag != 1}">
-                                        <a href="${ctx}/order/form?id=${order.orderID}">修改订单</a>
-                                    </c:if>
-                                    <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag == 1}">
-                                        <a href="${ctx}/order/secondeProductOrderForm?id=${order.orderID}">修改订单</a>
-                                    </c:if>
-                                </c:if>
-                            </c:if>
-                            <c:if test="${order.status == 0}">
-                                <c:if test="${order.postageOrderFlag == 1}">
-                                    <a href="${ctx}/order/postageOrderForm?id=${order.orderID}">修改邮费订单</a>
-                                </c:if>
-                            </c:if>
-                        </c:if>
-                        <c:if test="${(order.organizeID == 0 or order.organizeID > 2) && order.status == 11 && order.payStatus == 1}">
-                            <a href="javascript:void(0);"
-                               onclick="modelShow('${order.orderID}')">编辑经理折扣</a>
-                        </c:if>
-
-                        <c:if test="${order.secondHandOrderFlag ne 1 && order.rebateFlag ne 1 && order.status != 0 && order.status != 6 && order.status != 7 && empty order.rechargeGoods}">
-                            <a href="javascript:void(0);"
-                               onclick="rebateFeeEdit('${order.orderID}')">编辑返佣服务费</a>
-                        </c:if>
-
-                        <c:if test="${order.orderType != 1 && order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1 && order.secondHandOrderFlag ne 1 && order.rechargeGoods ne 1 && order.rechargeGoods ne 3}">
-                            <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}"
-                               onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为返佣订单</a>
-                        </c:if>
-                        <c:if test="${order.orderType != 1 && order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1 && order.secondHandOrderFlag eq 1}">
-                            <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}"
-                               onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为二手返佣订单</a>
-                        </c:if>
-                    </c:if>
-
-
-                </shiro:hasPermission>
-                <shiro:hasPermission name="order:order:applyrefound">
-                    <%--线下订单以主订单为单位退款--%>
-                    <c:if test="${order.onlinePayFlag == 1}">
-                        <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">
-                            <%--  返佣订单不能申请退款(退货) --%>
-                            <c:if test="${order.rebateOrder == '0'}">
-                                <c:if test="${order.toAudit eq 1}">
-                                    <%--如果存在审核收款则不允许申请:1不能申请,其它可以申请--%>
-                                    <c:if test="${order.toAudit eq 1}">
-                                        <%--弹窗提示--%>
-                                        <a href="#" onclick="return alertx('订单存在未审核的收款,暂不能退款。请将收款审核通过后再操作退款。')">申请退款</a>
-                                    </c:if>
-                                </c:if>
-                                <c:if test="${order.toAudit ne 1}">
-                                    <c:if test="${order.applyReturnedPurchaseFlag eq 1}">
-                                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}&refundType=1&returnGoodsStutas=${order.returnGoodsStutas}"
-                                           <c:if test="${order.status == 21 || order.status == 22 || order.status == 23}">onclick="return confirmx('部分收款的订单、申请退款只能申请全部退款!', this.href)"
-                                        </c:if>
-                                        >申请退款</a>
-                                    </c:if>
-                                    <c:if test="${order.applyReturnedPurchaseFlag ne 1}">
-                                        <font title="存在未处理完的申请,请前往退款列表处理!">申请退款</font>
-                                    </c:if>
-                                </c:if>
-                            </c:if>
-                        </c:if>
-                    </c:if>
-                </shiro:hasPermission>
-
-                <shiro:hasPermission name="order:order:edit">
-                    <c:if test="${order.organizeID != 4}">
-                        <c:if test="${(order.rebateOrder == '1' ) && (brokerage == 0) && (order.status != 0)}">
-                            <a href="${ctx}/order/toChangePay?orderId=${order.orderID}"
-                               onclick="return confirmx('确定将该返佣订单直接置为已收款和已付款状态吗?', this.href)">置为已收款已付款</a>
-                        </c:if>
-                        <c:if test="${order.organizeID == 0}">
-                            <c:if test="${order.status == 11}">
-                                <c:if test="${order.splitFlag == 1}">
-                                    <a href="${ctx}/order/toSplit?id=${order.orderID}">
-                                        拆分订单
-                                    </a>
-                                </c:if>
-                            </c:if>
-                            <a href="javascript:" onclick="QRCodewin(${order.orderID},'${order.orderNo}')">分享二维码</a>
-                            <c:if test="${order.status ne 6 && order.status ne 7}">
-                                <a href="${ctx}/order/editclausecontent?id=${order.orderID}">修改售后条款</a>
-                            </c:if>
-                        </c:if>
-                        <c:if test="${order.status ne 0}">
-                            <a href="${ctx}/order/printOrder?orderID=${order.orderID}">打印发货单</a>
-                        </c:if>
-                        <a href="${ctx}/order/exportOrder?id=${order.orderID}">订单导出</a>
-                        <%--                        <a href="javascript:void(0);" onclick="remarks('${order.orderID}','')">备注</a>--%>
-                        <c:if test="${order.orderType ==0}">
-                            <a href="${ctx}/bulkpurchase/commissions?orderId=${order.orderID}">销售提成记录</a>
-                        </c:if>
-                        <c:if test="${order.orderType !=0}">
-                            <c:if test="${order.spID!=null}">
-                                <a href="${ctx}/bulkpurchase/commissions?orderId=${order.orderID}">销售提成记录</a>
-                            </c:if>
-                        </c:if>
-                    </c:if>
-
-
-                    <%--包含订单充值商品就不显示--%>
-                    <c:if test="${order.rechargeGoods ne 1 and order.rechargeGoods ne 2}">
-                        <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 21 && order.status ne 6}">
-                            <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}">发货记录</a>
-                        </c:if>
-                        <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
-                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=2">收付款记录
-                            </a>
-                        </c:if>
-                        <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
-                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款(退货)记录
-                            </a>
-                        </c:if>
-                    </c:if>
-                    <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=2">订单备注</a>
-
-                </shiro:hasPermission>
-            </div>
-        </td>
+        <%--                    <td style="position: relative;"><a class="operation-btn btn">功能</a>--%>
+        <%--                        <div class="operation-block">--%>
+        <%--                            <shiro:hasPermission name="order:order:edit">--%>
+        <%--                                &lt;%&ndash;包含订单充值商品就不显示&ndash;%&gt;--%>
+        <%--                                <c:if test="${order.rechargeGoods ne 1 and order.rechargeGoods ne 2}">--%>
+        <%--                                    <c:if test="${order.status == 11 || order.status == 12 || order.status == 21 || order.status == 22 || order.status == 31 || order.status == 32}">--%>
+        <%--                                        <a href="${ctx}/order/toDeliveryPage?id=${order.orderID}">发货</a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <c:if test="${order.receiptStatus == 2 && order.status != 6 && order.status != 7&& order.organizeID != 4}">--%>
+        <%--                                        <a href="javascript:void(0);" onclick="collection(${order.orderID})">抹平收款</a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                </c:if>--%>
+        <%--                                <c:if test="${order.organizeID != 4}">--%>
+        <%--                                    <c:if test="${order.organizeID == 0}">--%>
+        <%--                                        <c:if test="${order.status == 0}">--%>
+        <%--                                            <a href="${ctx}/order/confirmOrder?orderID=${order.orderID}"--%>
+        <%--                                               onclick="return confirmx('是否确认订单?', this.href)">确认订单</a>--%>
+        <%--                                        </c:if>--%>
+        <%--                                        <c:if test="${order.status == 0 || order.status == 11}">--%>
+        <%--                                            <a href="${ctx}/order/cancelOrder?orderID=${order.orderID}"--%>
+        <%--                                               onclick="return confirmx('是否取消订单?', this.href)">取消订单</a>--%>
+        <%--                                        </c:if>--%>
+        <%--                                        <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||--%>
+        <%--            				            order.status eq 23 || order.status eq 0}">--%>
+        <%--                                            <c:if test="${order.rechargeGoods ne 1 && order.rechargeGoods ne 2 && (order.ableUserMoney > 0 || order.status eq 0)}">--%>
+        <%--                                                <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag != 1}">--%>
+        <%--                                                    <a href="${ctx}/order/form?id=${order.orderID}">修改订单</a>--%>
+        <%--                                                </c:if>--%>
+        <%--                                                <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag == 1}">--%>
+        <%--                                                    <a href="${ctx}/order/secondeProductOrderForm?id=${order.orderID}">修改订单</a>--%>
+        <%--                                                </c:if>--%>
+        <%--                                            </c:if>--%>
+        <%--                                        </c:if>--%>
+        <%--                                        <c:if test="${order.status == 0}">--%>
+        <%--                                            <c:if test="${order.postageOrderFlag == 1}">--%>
+        <%--                                                <a href="${ctx}/order/postageOrderForm?id=${order.orderID}">修改邮费订单</a>--%>
+        <%--                                            </c:if>--%>
+        <%--                                        </c:if>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <c:if test="${(order.organizeID == 0 or order.organizeID > 2) && order.status == 11 && order.payStatus == 1}">--%>
+        <%--                                        <a href="javascript:void(0);"--%>
+        <%--                                           onclick="modelShow('${order.orderID}')">编辑经理折扣</a>--%>
+        <%--                                    </c:if>--%>
+
+        <%--                                    <c:if test="${order.secondHandOrderFlag ne 1 && order.rebateFlag ne 1 && order.status != 0 && order.status != 6 && order.status != 7 && empty order.rechargeGoods}">--%>
+        <%--                                        <a href="javascript:void(0);"--%>
+        <%--                                           onclick="rebateFeeEdit('${order.orderID}')">编辑返佣服务费</a>--%>
+        <%--                                    </c:if>--%>
+
+        <%--                                    <c:if test="${order.orderType != 1 && order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1 && order.secondHandOrderFlag ne 1 && order.rechargeGoods ne 1 && order.rechargeGoods ne 3}">--%>
+        <%--                                        <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}"--%>
+        <%--                                           onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为返佣订单</a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <c:if test="${order.orderType != 1 && order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1 && order.secondHandOrderFlag eq 1}">--%>
+        <%--                                        <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}"--%>
+        <%--                                           onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为二手返佣订单</a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                </c:if>--%>
+
+
+        <%--                            </shiro:hasPermission>--%>
+        <%--                            <shiro:hasPermission name="order:order:applyrefound">--%>
+        <%--                                &lt;%&ndash;线下订单以主订单为单位退款&ndash;%&gt;--%>
+        <%--                                <c:if test="${order.onlinePayFlag == 1}">--%>
+        <%--                                    <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">--%>
+        <%--                                        &lt;%&ndash;  返佣订单不能申请退款(退货) &ndash;%&gt;--%>
+        <%--                                        <c:if test="${order.rebateOrder == '0'}">--%>
+        <%--                                            <c:if test="${order.toAudit eq 1}">--%>
+        <%--                                                &lt;%&ndash;如果存在审核收款则不允许申请:1不能申请,其它可以申请&ndash;%&gt;--%>
+        <%--                                                <c:if test="${order.toAudit eq 1}">--%>
+        <%--                                                    &lt;%&ndash;弹窗提示&ndash;%&gt;--%>
+        <%--                                                    <a href="#" onclick="return alertx('订单存在未审核的收款,暂不能退款。请将收款审核通过后再操作退款。')">申请退款</a>--%>
+        <%--                                                </c:if>--%>
+        <%--                                            </c:if>--%>
+        <%--                                            <c:if test="${order.toAudit ne 1}">--%>
+        <%--                                                <c:if test="${order.applyReturnedPurchaseFlag eq 1}">--%>
+        <%--                                                    <a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}&refundType=1&returnGoodsStutas=${order.returnGoodsStutas}"--%>
+        <%--                                                       <c:if test="${order.status == 21 || order.status == 22 || order.status == 23}">onclick="return confirmx('部分收款的订单、申请退款只能申请全部退款!', this.href)"--%>
+        <%--                                                    </c:if>--%>
+        <%--                                                    >申请退款</a>--%>
+        <%--                                                </c:if>--%>
+        <%--                                                <c:if test="${order.applyReturnedPurchaseFlag ne 1}">--%>
+        <%--                                                    <font title="存在未处理完的申请,请前往退款列表处理!">申请退款</font>--%>
+        <%--                                                </c:if>--%>
+        <%--                                            </c:if>--%>
+        <%--                                        </c:if>--%>
+        <%--                                    </c:if>--%>
+        <%--                                </c:if>--%>
+        <%--                            </shiro:hasPermission>--%>
+
+        <%--                            <shiro:hasPermission name="order:order:edit">--%>
+        <%--                                <c:if test="${order.organizeID != 4}">--%>
+        <%--                                    <c:if test="${(order.rebateOrder == '1' ) && (brokerage == 0) && (order.status != 0)}">--%>
+        <%--                                        <a href="${ctx}/order/toChangePay?orderId=${order.orderID}"--%>
+        <%--                                           onclick="return confirmx('确定将该返佣订单直接置为已收款和已付款状态吗?', this.href)">置为已收款已付款</a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <c:if test="${order.organizeID == 0}">--%>
+        <%--                                        <c:if test="${order.status == 11}">--%>
+        <%--                                            <c:if test="${order.splitFlag == 1}">--%>
+        <%--                                                <a href="${ctx}/order/toSplit?id=${order.orderID}">--%>
+        <%--                                                    拆分订单--%>
+        <%--                                                </a>--%>
+        <%--                                            </c:if>--%>
+        <%--                                        </c:if>--%>
+        <%--                                        <a href="javascript:" onclick="QRCodewin(${order.orderID},'${order.orderNo}')">分享二维码</a>--%>
+        <%--                                        <c:if test="${order.status ne 6 && order.status ne 7}">--%>
+        <%--                                            <a href="${ctx}/order/editclausecontent?id=${order.orderID}">修改售后条款</a>--%>
+        <%--                                        </c:if>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <c:if test="${order.status ne 0}">--%>
+        <%--                                        <a href="${ctx}/order/printOrder?orderID=${order.orderID}">打印发货单</a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <a href="${ctx}/order/exportOrder?id=${order.orderID}">订单导出</a>--%>
+        <%--                                    &lt;%&ndash;                        <a href="javascript:void(0);" onclick="remarks('${order.orderID}','')">备注</a>&ndash;%&gt;--%>
+        <%--                                    <c:if test="${order.orderType ==0}">--%>
+        <%--                                        <a href="${ctx}/bulkpurchase/commissions?orderId=${order.orderID}">销售提成记录</a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <c:if test="${order.orderType !=0}">--%>
+        <%--                                        <c:if test="${order.spID!=null}">--%>
+        <%--                                            <a href="${ctx}/bulkpurchase/commissions?orderId=${order.orderID}">销售提成记录</a>--%>
+        <%--                                        </c:if>--%>
+        <%--                                    </c:if>--%>
+        <%--                                </c:if>--%>
+
+
+        <%--                                &lt;%&ndash;包含订单充值商品就不显示&ndash;%&gt;--%>
+        <%--                                <c:if test="${order.rechargeGoods ne 1 and order.rechargeGoods ne 2}">--%>
+        <%--                                    <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 21 && order.status ne 6}">--%>
+        <%--                                        <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}">发货记录</a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">--%>
+        <%--                                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=2">收付款记录--%>
+        <%--                                        </a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                    <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">--%>
+        <%--                                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款(退货)记录--%>
+        <%--                                        </a>--%>
+        <%--                                    </c:if>--%>
+        <%--                                </c:if>--%>
+        <%--                                <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=2">订单备注</a>--%>
+
+        <%--                            </shiro:hasPermission>--%>
+        <%--                        </div>--%>
+        <%--                    </td>--%>
     </tr>
     <c:if test="${order.svipFullReduction gt 0}">
         <tr>
@@ -831,51 +831,131 @@
     <div class="order-rows">
         <span><label>下单时间:</label>${order.orderTime}</span>
         <span><label>子订单号(ID):</label>${shopOrder.shopOrderNo}(${shopOrder.shopOrderID})</span>
-        <span><label>子订单金额:</label><fmt:formatNumber value="${order.onlinePayFlag eq 0?shopOrder.realPay:shopOrder.needPayAmount}" type="currency"/></span>
-        <c:if test="${shopOrder.postFeeCos eq '0'}">
-            <div class="print-wrapper">
-                <a href="${ctx}/order/printOrder?shopOrderID=${shopOrder.shopOrderID}">打印</a>
-                <a href="${ctx}/order/exportSubOrder?shopOrderID=${shopOrder.shopOrderID}">导出</a>
-                <c:if test="${order.status ne '0'}">
-                    <a onclick="copyText('${shopOrder.shopOrderID}')" style="cursor:pointer;">供应商订单二维码</a>
-                </c:if>
-                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=2">收付款记录</a>
-                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款(退货)记录</a>
-                <c:if test="${order.onlinePayFlag eq 0}">
-                    <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">
-                        <%--  返佣订单不能申请退款(退货) --%>
-                        <c:if test="${order.rebateOrder == '0'}">
-                            <c:if test="${order.toAudit eq 1}">
-                                <%--如果存在审核收款则不允许申请:1不能申请,其它可以申请--%>
-                                <c:if test="${order.toAudit eq 1}">
-                                    <%--弹窗提示--%>
-                                    <a href="#" onclick="return alertx('订单存在未审核的收款,暂不能退款。请将收款审核通过后再操作退款。')">申请退款</a>
-                                </c:if>
-                            </c:if>
-                            <c:if test="${order.toAudit ne 1}">
-                                <c:if test="${order.applyReturnedPurchaseFlag eq 1}">
-                                    <a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}&onlineShopOrderId=${shopOrder.shopOrderID}&refundType=1&returnGoodsStutas=${order.returnGoodsStutas}"
-                                       <c:if test="${order.status == 21 || order.status == 22 || order.status == 23}">onclick="return confirmx('部分收款的订单、申请退款只能申请全部退款!', this.href)"
-                                    </c:if>
-                                    >申请退款</a>
-                                </c:if>
-                                <c:if test="${order.applyReturnedPurchaseFlag ne 1}">
-                                    <font title="存在未处理完的申请,请前往退款列表处理!">申请退款</font>
-                                </c:if>
-                            </c:if>
+        <span><label>子订单金额:</label><fmt:formatNumber
+                value="${order.onlinePayFlag eq 0?shopOrder.realPay:shopOrder.needPayAmount}" type="currency"/></span>
+        <td style="position: relative;"><a class="operation-btn btn">功能</a>
+            <div class="operation-block">
+                <shiro:hasPermission name="order:order:edit">
+                    <%--包含订单充值商品就不显示--%>
+                    <%--                    <c:if test="${order.rechargeGoods ne 1 and order.rechargeGoods ne 2}">--%>
+                    <%--                        <c:if test="${order.status == 11 || order.status == 12 || order.status == 21 || order.status == 22 || order.status == 31 || order.status == 32}">--%>
+                    <%--                            <a href="${ctx}/order/toDeliveryPage?id=${order.orderID}">发货</a>--%>
+                    <%--                        </c:if>--%>
+                    <%--                        <c:if test="${order.receiptStatus == 2 && order.status != 6 && order.status != 7&& order.organizeID != 4}">--%>
+                    <%--                            <a href="javascript:void(0);" onclick="collection(${order.orderID})">抹平收款</a>--%>
+                    <%--                        </c:if>--%>
+                    <%--                    </c:if>--%>
+                    <c:if test="${order.status == 0}">
+                        <a href="${ctx}/order/confirmOrder?orderID=${order.orderID}"
+                           onclick="return confirmx('是否确认订单?', this.href)">确认订单</a>
+                    </c:if>
+                    <%--                            <c:if test="${order.status == 0 || order.status == 11}">--%>
+                    <%--                                <a href="${ctx}/order/cancelOrder?orderID=${order.orderID}"--%>
+                    <%--                                   onclick="return confirmx('是否取消订单?', this.href)">取消订单</a>--%>
+                    <%--                            </c:if>--%>
+                    <%--                            <c:if test="${order.status eq 11 || order.status eq 12 || order.status eq 13 ||order.status eq 21 ||order.status eq 22 ||--%>
+                    <%--				            order.status eq 23 || order.status eq 0}">--%>
+                    <%--                                <c:if test="${order.rechargeGoods ne 1 && order.rechargeGoods ne 2 && (order.ableUserMoney > 0 || order.status eq 0)}">--%>
+                    <%--                                    <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag != 1}">--%>
+                    <%--                                        <a href="${ctx}/order/form?id=${order.orderID}">修改订单</a>--%>
+                    <%--                                    </c:if>--%>
+                    <%--                                    <c:if test="${order.postageOrderFlag == 0 && order.secondHandOrderFlag == 1}">--%>
+                    <%--                                        <a href="${ctx}/order/secondeProductOrderForm?id=${order.orderID}">修改订单</a>--%>
+                    <%--                                    </c:if>--%>
+                    <%--                                </c:if>--%>
+                    <%--                            </c:if>--%>
+                    <%--                            <c:if test="${order.status == 0}">--%>
+                    <%--                                <c:if test="${order.postageOrderFlag == 1}">--%>
+                    <%--                                    <a href="${ctx}/order/postageOrderForm?id=${order.orderID}">修改邮费订单</a>--%>
+                    <%--                                </c:if>--%>
+                    <%--                            </c:if>--%>
+                    <%--                        <c:if test="${(order.organizeID == 0 or order.organizeID > 2) && order.status == 11 && order.payStatus == 1}">--%>
+                    <%--                            <a href="javascript:void(0);"--%>
+                    <%--                               onclick="modelShow('${order.orderID}')">编辑经理折扣</a>--%>
+                    <%--                        </c:if>--%>
+
+                    <%--                        <c:if test="${order.secondHandOrderFlag ne 1 && order.rebateFlag ne 1 && order.status != 0 && order.status != 6 && order.status != 7 && empty order.rechargeGoods}">--%>
+                    <%--                            <a href="javascript:void(0);"--%>
+                    <%--                               onclick="rebateFeeEdit('${order.orderID}')">编辑返佣服务费</a>--%>
+                    <%--                        </c:if>--%>
+
+                    <%--                        <c:if test="${order.orderType != 1 && order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1 && order.secondHandOrderFlag ne 1 && order.rechargeGoods ne 1 && order.rechargeGoods ne 3}">--%>
+                    <%--                            <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}"--%>
+                    <%--                               onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为返佣订单</a>--%>
+                    <%--                        </c:if>--%>
+                    <%--                        <c:if test="${order.orderType != 1 && order.rebateFlag eq 0 && order.receiptStatus eq 1 && order.payStatus eq 1 && order.secondHandOrderFlag eq 1}">--%>
+                    <%--                            <a href="${ctx}/order/modifyRebate?orderId=${order.orderID}"--%>
+                    <%--                               onclick="return confirmx('确定将订单转为返佣订单吗?', this.href)">转为二手返佣订单</a>--%>
+                    <%--                        </c:if>--%>
+                </shiro:hasPermission>
+
+
+                <shiro:hasPermission name="order:order:edit">
+
+
+                    <%--包含订单充值商品就不显示--%>
+                    <c:if test="${order.rechargeGoods ne 1 and order.rechargeGoods ne 2}">
+                        <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 21 && order.status ne 6}">
+                            <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}">发货记录</a>
+                        </c:if>
+                        <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
+                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&shopOrderID=${shopOrder.shopOrderID}&from=2">收付款记录
+                            </a>
+                        </c:if>
+                        <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
+                            <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}&shopOrderID=${shopOrder.shopOrderID}">退款(退货)记录
+                            </a>
                         </c:if>
                     </c:if>
-                </c:if>
-                <c:if test="${shopOrder.orderArchiveId ne null}">
-                    <a href="${ctx}/archive/cmOrderArchive/form?id=${shopOrder.orderArchiveId}">查看订单资料</a>
-                </c:if>
+                    <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=2">订单备注</a>
+
+                </shiro:hasPermission>
             </div>
-        </c:if>
-        <c:if test="${order.onlinePayFlag eq 0}">
-            <br/>
-            <span>商品总额:<fmt:formatNumber value="${shopOrder.needPayAmount}" type="currency"/></span>
-            <span>优惠:<fmt:formatNumber value="${shopOrder.eachDiscount}" type="currency"/></span>
-            <span>运费:
+        </td>
+        </tr>
+            <%--        <c:if test="${shopOrder.postFeeCos eq '0'}">--%>
+            <%--            <div class="print-wrapper">--%>
+            <%--                <a href="${ctx}/order/printOrder?shopOrderID=${shopOrder.shopOrderID}">打印</a>--%>
+            <%--                <a href="${ctx}/order/exportSubOrder?shopOrderID=${shopOrder.shopOrderID}">导出</a>--%>
+            <%--                <c:if test="${order.status ne '0'}">--%>
+            <%--                    <a onclick="copyText('${shopOrder.shopOrderID}')" style="cursor:pointer;">供应商订单二维码</a>--%>
+            <%--                </c:if>--%>
+            <%--                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=2">收付款记录</a>--%>
+            <%--                <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">退款(退货)记录</a>--%>
+            <%--                <c:if test="${order.onlinePayFlag eq 0}">--%>
+            <%--                    <c:if test="${order.status == 12 || order.status == 13 || order.status == 21 || order.status == 22 || order.status == 23 || order.status == 31 || order.status == 32 || order.status == 33 || order.status == 4 || order.status == 5}">--%>
+            <%--                        &lt;%&ndash;  返佣订单不能申请退款(退货) &ndash;%&gt;--%>
+            <%--                        <c:if test="${order.rebateOrder == '0'}">--%>
+            <%--                            <c:if test="${order.toAudit eq 1}">--%>
+            <%--                                &lt;%&ndash;如果存在审核收款则不允许申请:1不能申请,其它可以申请&ndash;%&gt;--%>
+            <%--                                <c:if test="${order.toAudit eq 1}">--%>
+            <%--                                    &lt;%&ndash;弹窗提示&ndash;%&gt;--%>
+            <%--                                    <a href="#" onclick="return alertx('订单存在未审核的收款,暂不能退款。请将收款审核通过后再操作退款。')">申请退款</a>--%>
+            <%--                                </c:if>--%>
+            <%--                            </c:if>--%>
+            <%--                            <c:if test="${order.toAudit ne 1}">--%>
+            <%--                                <c:if test="${order.applyReturnedPurchaseFlag eq 1}">--%>
+            <%--                                    <a href="${ctx}/bulkpurchase/cmRefundsProduct/applyRefound.rpc?orderID=${order.orderID}&onlineShopOrderId=${shopOrder.shopOrderID}&refundType=1&returnGoodsStutas=${order.returnGoodsStutas}"--%>
+            <%--                                       <c:if test="${order.status == 21 || order.status == 22 || order.status == 23}">onclick="return confirmx('部分收款的订单、申请退款只能申请全部退款!', this.href)"--%>
+            <%--                                    </c:if>--%>
+            <%--                                    >申请退款</a>--%>
+            <%--                                </c:if>--%>
+            <%--                                <c:if test="${order.applyReturnedPurchaseFlag ne 1}">--%>
+            <%--                                    <font title="存在未处理完的申请,请前往退款列表处理!">申请退款</font>--%>
+            <%--                                </c:if>--%>
+            <%--                            </c:if>--%>
+            <%--                        </c:if>--%>
+            <%--                    </c:if>--%>
+            <%--                </c:if>--%>
+            <%--                <c:if test="${shopOrder.orderArchiveId ne null}">--%>
+            <%--                    <a href="${ctx}/archive/cmOrderArchive/form?id=${shopOrder.orderArchiveId}">查看订单资料</a>--%>
+            <%--                </c:if>--%>
+            <%--            </div>--%>
+            <%--        </c:if>--%>
+            <%--        <c:if test="${order.onlinePayFlag eq 0}">--%>
+        <br/>
+        <span>商品总额:<fmt:formatNumber value="${shopOrder.needPayAmount}" type="currency"/></span>
+        <span>运费:
                 <c:if test="${order.organizeID != 4}">
                     <c:if test="${order.freePostFlag == 0}">
                         包邮
@@ -894,12 +974,14 @@
                     </c:if>
                 </c:if>
                 <c:if test="${order.organizeID == 4}">
-                    ${postageInfo}
+                    <%--                    ${postageInfo}--%>
+                    ${shopOrder.postageInfo}
                 </c:if>
             </span>
-            <span>子订单总额:<fmt:formatNumber value="${shopOrder.totalAmount}" type="currency"/></span>
-            <span>应付金额:<fmt:formatNumber value="${shopOrder.realPay}" type="currency"/></span>
-            <span>
+        <span>子订单总额:<fmt:formatNumber value="${shopOrder.totalAmount}" type="currency"/></span>
+        <span>优惠:<fmt:formatNumber value="${shopOrder.eachDiscount}" type="currency"/></span>
+        <span>应收金额:<fmt:formatNumber value="${shopOrder.realPay}" type="currency"/></span>
+        <span>
                 已收金额:<fmt:formatNumber value="${shopOrder.receiptAmount}" type="currency"/>
                 <c:if test="${shopOrder.useBalanceFlag eq 1 and shopOrder.accountAmount ne null}">(余额抵扣¥${shopOrder.accountAmount})</c:if>
                 <c:if test="${order.organizeID != 4&&shopOrder.commercialCode eq 'E1807059160' && (order.receiptStatus == 2 || order.receiptStatus == 3)}">
@@ -907,50 +989,31 @@
                 </c:if>
 
             </span>
-            <span>待收金额:<fmt:formatNumber value="${shopOrder.restAmount}" type="currency"/></span>
-            <br/>
-            <span>收款状态:
-                <c:if test="${shopOrder.shopReceiptStatus == 1}">
-                    <font color="red">待收款</font>
-                </c:if>
-                <c:if test="${shopOrder.shopReceiptStatus == 2}">
-                    <font color="#ff8c00">部分收款</font>
-                </c:if>
-                <c:if test="${shopOrder.shopReceiptStatus == 3}">
-                    <font color="green">已收款</font>
-                </c:if>
-            </span>
-            <span>付款状态:
-                <c:if test="${shopOrder.payStatus == 1}">
-                    <font color="red">待付款</font>
-                </c:if>
-                <c:if test="${shopOrder.payStatus == 2}">
-                    <font color="#ff8c00">部分付款</font>
-                </c:if>
-                <c:if test="${shopOrder.payStatus == 3}">
-                    <font color="green">已付款</font>
-                </c:if>
-            </span>
-            <span>发货状态:
-                <c:if test="${shopOrder.sendOutStatus == 1}">
-                    <font color="red">待发货</font>
-                </c:if>
-                <c:if test="${shopOrder.sendOutStatus == 2}">
-                    <font color="#ff8c00">部分发货</font>
-                </c:if>
-                <c:if test="${shopOrder.sendOutStatus == 3}">
-                    <font color="green">已发货</font>
-                </c:if>
-            </span>
-            <c:if test="${not empty shopOrder.note}">
-                <span>留言:${shopOrder.note}</span>
-            </c:if>
-        </c:if>
-        <c:if test="${order.onlinePayFlag eq 1}">
-            <c:if test="${shopOrder.postFeeCos eq '0'}">
-                <c:if test="${order.status ne 0 && order.status ne 11}">
-                    <div class="delivery-wrapper">
-                        <span>发货状态:
+        <span>待收金额:<fmt:formatNumber value="${shopOrder.restAmount}" type="currency"/></span>
+        <br/>
+        <span>收款状态:
+                            <c:if test="${shopOrder.shopReceiptStatus == 1}">
+                                <font color="red">待收款</font>
+                            </c:if>
+                            <c:if test="${shopOrder.shopReceiptStatus == 2}">
+                                <font color="#ff8c00">部分收款</font>
+                            </c:if>
+                            <c:if test="${shopOrder.shopReceiptStatus == 3}">
+                                <font color="green">已收款</font>
+                            </c:if>
+                        </span>
+        <span>付款状态:
+                            <c:if test="${shopOrder.payStatus == 1}">
+                                <font color="red">待付款</font>
+                            </c:if>
+                            <c:if test="${shopOrder.payStatus == 2}">
+                                <font color="#ff8c00">部分付款</font>
+                            </c:if>
+                            <c:if test="${shopOrder.payStatus == 3}">
+                                <font color="green">已付款</font>
+                            </c:if>
+                        </span>
+        <span>发货状态:
                             <c:if test="${shopOrder.sendOutStatus == 1}">
                                 <font color="red">待发货</font>
                             </c:if>
@@ -961,33 +1024,25 @@
                                 <font color="green">已发货</font>
                             </c:if>
                         </span>
-                        <span>付款状态:<c:if test="${shopOrder.payStatus == 1}">
-                            <font color="red">待付款</font>
-                        </c:if>
-                                        <c:if test="${shopOrder.payStatus == 2}">
-                                            <font color="#ff8c00">部分付款</font>
-                                        </c:if>
-                                        <c:if test="${shopOrder.payStatus == 3}">
-                                            <font color="green">已付款</font>
-                                        </c:if></span>
-                        <c:if test="${shopOrder.payStatus == 3 or shopOrder.payStatus == 2}">
-                                <span>
-                                    已付金额: <fmt:formatNumber value="${shopOrder.payed}" type="currency"/>
-                                      <c:if test="${order.organizeID == 4&& voucherVo eq null }">
-                                          <font color="red">(联合丽格线上收款)</font>
-                                      </c:if>
-                                        <c:if test="${order.organizeID == 4&& voucherVo ne null }">
-                                            <font color="red">(联合丽格线下收款)</font>
-                                        </c:if>
-                                </span>
-                        </c:if>
-                    </div>
-                </c:if>
-                <c:if test="${not empty shopOrder.note}">
-                    <div><label>留言:</label>${shopOrder.note}</div>
-                </c:if>
-            </c:if>
+        <span>
+                                退款状态:
+                                <c:if test="${shopOrder.orderStatusFlag == 1}">
+                                    <font>无退款</font>
+                                </c:if>
+                                <c:if test="${shopOrder.orderStatusFlag == 2}">
+                                    <font>退款中</font>
+                                </c:if>
+<%--                                <c:if test="${shopOrder.orderStatusFlag == 2}">--%>
+<%--                                    <font>部分退款</font>--%>
+<%--                                </c:if>--%>
+                                <c:if test="${shopOrder.orderStatusFlag == 3}">
+                                    <font>已退款</font>
+                                </c:if>
+                            </span>
+        <c:if test="${not empty shopOrder.note}">
+            <span>留言:${shopOrder.note}</span>
         </c:if>
+            <%--        </c:if>--%>
     </div>
     <div class="order-rows">
         <span><label>供应商:</label>${shopOrder.shopName}</span>
@@ -1082,21 +1137,21 @@
                                     <label style="margin-left:5px"><fmt:formatNumber value="${op.discountPrice}"
                                                                                      type="currency"/></label>
                                     <font color="red">(超级会员价)</font></span>
+                    </c:if>
+                    <c:if test="${op.ladderPriceFlag eq 1 || op.isActProduct eq 2}">
+                        <a href="javascript:;" class="ladderPrice"><span> (阶梯价格)</span>
+                            <c:if test="${not empty op.orderProductLadderPriceList}">
+                                <div class="list">
+                                    <p><span>起订量</span><span>价格</span></p>
+                                    <c:forEach items="${op.orderProductLadderPriceList}" var="ladderPrice">
+                                        <p data-num="${ladderPrice.buyNum}">
+                                            <span>${ladderPrice.buyNumRangeShow}</span><span
+                                                class="price">${ladderPrice.buyPrice}</span></p>
+                                    </c:forEach>
+                                </div>
                             </c:if>
-                            <c:if test="${op.ladderPriceFlag eq 1 || op.isActProduct eq 2}">
-                                <a href="javascript:;" class="ladderPrice"><span> (阶梯价格)</span>
-                                    <c:if test="${not empty op.orderProductLadderPriceList}">
-                                        <div class="list">
-                                            <p><span>起订量</span><span>价格</span></p>
-                                            <c:forEach items="${op.orderProductLadderPriceList}" var="ladderPrice">
-                                                <p data-num="${ladderPrice.buyNum}">
-                                                    <span>${ladderPrice.buyNumRangeShow}</span><span
-                                                        class="price">${ladderPrice.buyPrice}</span></p>
-                                            </c:forEach>
-                                        </div>
-                                    </c:if>
-                                </a>
-                            </c:if>
+                        </a>
+                    </c:if>
                     </span>
                     <c:if test="${order.organizeID != 4}">
                         <span>折扣: ${op.discount}%</span>
@@ -1126,71 +1181,71 @@
                 </div>
                 <c:if test="${op.productPromotion ne null}">
                 <c:if test="${op.productPromotion.type eq 2}">
-                                <div class="supplier-product-promotionInfo">
-                                    <table>
-                                        <tr>
-                                            <td rowspan="2">
-                                                <c:if test="${op.productPromotion.mode eq 2}">
-                                                    <label style="background-color: #F60;color: white"><label
-                                                            class="promotionsName">${op.productPromotion.name}</label></label>
-                                                </c:if>
-                                                <c:if test="${op.productPromotion.mode eq 3}">
-                                                    <label style="background-color: purple;color: white"><label
-                                                            class="promotionsName">${op.productPromotion.name}</label></label>
-                                                </c:if>
-                                            </td>
-                                            <td>
-                                                <span class="downSpan">${op.productPromotion.description}</span>
-                                                <c:if test="${op.productPromotion.mode eq 2}">
+                <div class="supplier-product-promotionInfo">
+                    <table>
+                        <tr>
+                            <td rowspan="2">
+                                <c:if test="${op.productPromotion.mode eq 2}">
+                                    <label style="background-color: #F60;color: white"><label
+                                            class="promotionsName">${op.productPromotion.name}</label></label>
+                                </c:if>
+                                <c:if test="${op.productPromotion.mode eq 3}">
+                                    <label style="background-color: purple;color: white"><label
+                                            class="promotionsName">${op.productPromotion.name}</label></label>
+                                </c:if>
+                            </td>
+                            <td>
+                                <span class="downSpan">${op.productPromotion.description}</span>
+                                <c:if test="${op.productPromotion.mode eq 2}">
                                                     <span class="upSpan"> 满<fmt:formatNumber
                                                             value="${op.productPromotion.touchPrice}" pattern="#,##0.00"
                                                             maxFractionDigits="2"/>,减<fmt:formatNumber
                                                             value="${op.productPromotion.reducedPrice}"
                                                             pattern="#,##0.00" maxFractionDigits="2"/></span>
-                                                </c:if>
-                                                <c:if test="${op.productPromotion.mode eq 3}">
+                                </c:if>
+                                <c:if test="${op.productPromotion.mode eq 3}">
                                                     <span class="upSpan"> 满<fmt:formatNumber
                                                             value="${op.productPromotion.touchPrice}" pattern="#,##0.00"
                                                             maxFractionDigits="2"/>,赠送商品</span>
-                                                </c:if>
-                                            </td>
-                                        </tr>
-                                    </table>
-                                </div>
+                                </c:if>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+                </c:if>
+                <c:if test="${op.productPromotion.type eq 1}">
+                <div class="supplier-product-promotionInfo">
+                    <table>
+                        <tr>
+                            <c:if test="${op.productPromotion.mode eq 1}">
+                                <td><label style="background-color: green;color: white"><label
+                                        class="promotionsName">${op.productPromotion.name}</label></label>
+                                </td>
+                                <td> 优惠价: <label style="color: red"><fmt:formatNumber
+                                        value="${op.productPromotion.touchPrice}" pattern="#,##0.00"
+                                        maxFractionDigits="2"/></label></td>
                             </c:if>
-                            <c:if test="${op.productPromotion.type eq 1}">
-                                <div class="supplier-product-promotionInfo">
-                                    <table>
-                                        <tr>
-                                            <c:if test="${op.productPromotion.mode eq 1}">
-                                                <td><label style="background-color: green;color: white"><label
-                                                        class="promotionsName">${op.productPromotion.name}</label></label>
-                                                </td>
-                                                <td> 优惠价: <label style="color: red"><fmt:formatNumber
-                                                        value="${op.productPromotion.touchPrice}" pattern="#,##0.00"
-                                                        maxFractionDigits="2"/></label></td>
-                                            </c:if>
-                                            <c:if test="${op.productPromotion.mode eq 2}">
-                                                <td><label style="background-color: #F60;color: white"><label
-                                                        class="promotionsName">${op.productPromotion.name}</label></label>
-                                                </td>
-                                                <td> 满<fmt:formatNumber value="${op.productPromotion.touchPrice}"
-                                                                        pattern="#,##0.00"
-                                                                        maxFractionDigits="2"/>,减<fmt:formatNumber
-                                                        value="${op.productPromotion.reducedPrice}" pattern="#,##0.00"
-                                                        maxFractionDigits="2"/></td>
-                                            </c:if>
-                                            <c:if test="${op.productPromotion.mode eq 3}">
-                                                <td><label style="background-color: purple;color: white"><label
-                                                        class="promotionsName">${op.productPromotion.name}</label></label>
-                                                </td>
-                                                <td> 满<fmt:formatNumber value="${op.productPromotion.touchPrice}"
-                                                                        pattern="#,##0.00" maxFractionDigits="2"/>,赠送商品
-                                                </td>
-                                            </c:if>
-                                        </tr>
-                                    </table>
-                                </div>
+                            <c:if test="${op.productPromotion.mode eq 2}">
+                                <td><label style="background-color: #F60;color: white"><label
+                                        class="promotionsName">${op.productPromotion.name}</label></label>
+                                </td>
+                                <td> 满<fmt:formatNumber value="${op.productPromotion.touchPrice}"
+                                                        pattern="#,##0.00"
+                                                        maxFractionDigits="2"/>,减<fmt:formatNumber
+                                        value="${op.productPromotion.reducedPrice}" pattern="#,##0.00"
+                                        maxFractionDigits="2"/></td>
+                            </c:if>
+                            <c:if test="${op.productPromotion.mode eq 3}">
+                                <td><label style="background-color: purple;color: white"><label
+                                        class="promotionsName">${op.productPromotion.name}</label></label>
+                                </td>
+                                <td> 满<fmt:formatNumber value="${op.productPromotion.touchPrice}"
+                                                        pattern="#,##0.00" maxFractionDigits="2"/>,赠送商品
+                                </td>
+                            </c:if>
+                        </tr>
+                    </table>
+                </div>
                 </c:if>
                 </c:if>
                 </c:if>
@@ -1202,6 +1257,30 @@
         </div>
     </div>
 
+    <c:if test="${order.organizeID == 4&& shopOrder.voucherVo ne null }">
+        <div class="order-rows">
+
+            <label>线下支付凭证:</label>
+            <c:forEach items="${shopOrder.voucherVo}" var="voucher">
+                <div>
+                    <p><fmt:formatDate value="${voucher.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
+                    <c:if test="${voucher.images ne null  }">
+                        <div>
+                            <c:forEach items="${voucher.images}" var="items" varStatus="index">
+                                <c:if test="${items.image ne null  }">
+                                    <a href="${items.image}" target="_blank">
+                                        <img class="supplier-img" src="${items.image}"
+                                             style="width: 120px;height: 120px"/>
+                                    </a>
+                                </c:if>
+                            </c:forEach>
+                        </div>
+                    </c:if>
+                    <p>备注: ${voucher.remarks}</p>
+                </div>
+            </c:forEach>
+        </div>
+    </c:if>
 </c:forEach>
 <%--组织订单暂时不显示发票和条款信息--%>
 <%--<c:if test="${order.organizeID == 0}">--%>
@@ -1290,29 +1369,29 @@
     </div>
 </c:if>
 <%--</c:if>--%>
-<c:if test="${order.organizeID == 4&& voucherVo ne null }">
-    <div class="order-rows">
-
-        <label>线下支付凭证:</label>
-        <c:forEach items="${voucherVo}" var="voucher">
-            <div>
-                <p><fmt:formatDate value="${voucher.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
-                <c:if test="${voucher.images ne null  }">
-                    <div>
-                        <c:forEach items="${voucher.images}" var="items" varStatus="index">
-                            <c:if test="${items.image ne null  }">
-                                <a href="${items.image}" target="_blank">
-                                    <img class="supplier-img" src="${items.image}" style="width: 120px;height: 120px"/>
-                                </a>
-                            </c:if>
-                        </c:forEach>
-                    </div>
-                </c:if>
-                <p>备注: ${voucher.remarks}</p>
-            </div>
-        </c:forEach>
-    </div>
-</c:if>
+<%--<c:if test="${order.organizeID == 4&& voucherVo ne null }">--%>
+<%--    <div class="order-rows">--%>
+
+<%--        <label>线下支付凭证:</label>--%>
+<%--        <c:forEach items="${voucherVo}" var="voucher">--%>
+<%--            <div>--%>
+<%--                <p><fmt:formatDate value="${voucher.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>--%>
+<%--                <c:if test="${voucher.images ne null  }">--%>
+<%--                    <div>--%>
+<%--                        <c:forEach items="${voucher.images}" var="items" varStatus="index">--%>
+<%--                            <c:if test="${items.image ne null  }">--%>
+<%--                                <a href="${items.image}" target="_blank">--%>
+<%--                                    <img class="supplier-img" src="${items.image}" style="width: 120px;height: 120px"/>--%>
+<%--                                </a>--%>
+<%--                            </c:if>--%>
+<%--                        </c:forEach>--%>
+<%--                    </div>--%>
+<%--                </c:if>--%>
+<%--                <p>备注: ${voucher.remarks}</p>--%>
+<%--            </div>--%>
+<%--        </c:forEach>--%>
+<%--    </div>--%>
+<%--</c:if>--%>
 <script type="text/javascript">
     (function () {
         $('body').click(function (e) {