Explorar el Código

订单详情/列表

zhijiezhao hace 1 año
padre
commit
354840d260

+ 2 - 0
src/main/java/com/caimei/modules/order/dao/NewShopOrderDao.java

@@ -193,4 +193,6 @@ public interface NewShopOrderDao extends CrudDao<NewShopOrder> {
      * @return 结果
      */
     public int updateDelCmShopOrderByShopOrderIDs(@Param("shopOrderIDs") String[] shopOrderIDs,@Param("delFlag") Integer delFlag);
+
+    List<NewShopOrder> getShopOrderlist(NewShopOrder newShopOrder);
 }

+ 34 - 1290
src/main/java/com/caimei/modules/order/entity/NewShopOrder.java

@@ -1,7 +1,9 @@
 package com.caimei.modules.order.entity;
 
+import com.caimei.modules.bulkpurchase.entity.OrderInvoice;
 import com.caimei.modules.product.entity.CmPromotion;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
+import lombok.Data;
 
 import java.beans.Transient;
 import java.math.BigDecimal;
@@ -13,7 +15,20 @@ import java.util.List;
  * @date 2018-07-24
  * @description 子订单表
  */
+@Data
 public class NewShopOrder extends DataEntity<NewShopOrder> {
+
+    private Integer orderSeen;
+    private OrderInvoice orderInvoice;
+    private Integer clauseID;
+    private String mobile;
+    private Integer serviceProviderId;
+    private String startConfirmTime;
+    private String endConfirmTime;
+    private String spName;
+    private Integer shopStatus;
+    private Integer returnedPurchaseStatus;//待审核退款 1审核中,0不是审核中
+    private Integer rebateFlag; // 主订单返佣订单标记 0非返佣订单,1返佣订单
     private Integer onlineFlag;    //是否线上支付过1是,0否
     private Double couponAmount;   //子订单使用优惠券金额
     private Integer shopOrderID;//        int(11) not null auto_increment comment '子订单ID',
@@ -75,7 +90,6 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private Double allServeAmount;   // 总平台服务费
 
 
-
     private String rebateOrder;  //是不是返佣订单 是的1,  不是的0
     private Integer splitCount; //分账记录数
     private Integer settleRecordNum;   //佣金结算数量
@@ -159,23 +173,33 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private String shopPostFlag; //免邮标志 运费:2到付,0包邮,1需要运费,-2仪器到付其它包邮
     private String postageInfo; //运费字符串
 
-    /**  */
+    /**
+     *
+     */
     private Integer returnGoodsStatus;
 
-    /** 二手商品订单标识  0非二手商品订单、 1二手商品订单 */
+    /**
+     * 二手商品订单标识  0非二手商品订单、 1二手商品订单
+     */
     private String secondHandOrderFlag;
-    /** 外部商城付采美佣金 */
+    /**
+     * 外部商城付采美佣金
+     */
     private BigDecimal payCmAmount;
-    /**  */
+    /**
+     *
+     */
     private String receiptedFlag;
 
-    /**  */
+    /**
+     *
+     */
     private String receiptedType;
-    /** 子订单已支付成功次数统计 */
+    /**
+     * 子订单已支付成功次数统计
+     */
     private Integer paySuccessCounter;
 
-
-
     private List<CmOrderPaymentVoucherVo> voucherVo; //支付凭证
 
     // 备注图片
@@ -190,1289 +214,9 @@ public class NewShopOrder extends DataEntity<NewShopOrder> {
     private String remarkImage9;
     private String remarkImage10;
 
-    public Integer getReturnGoodsStatus() {
-        return returnGoodsStatus;
-    }
-
-    public void setReturnGoodsStatus(Integer returnGoodsStatus) {
-        this.returnGoodsStatus = returnGoodsStatus;
-    }
-
-    public String getSecondHandOrderFlag() {
-        return secondHandOrderFlag;
-    }
-
-    public void setSecondHandOrderFlag(String secondHandOrderFlag) {
-        this.secondHandOrderFlag = secondHandOrderFlag;
-    }
-
-    public BigDecimal getPayCmAmount() {
-        return payCmAmount;
-    }
-
-    public void setPayCmAmount(BigDecimal payCmAmount) {
-        this.payCmAmount = payCmAmount;
-    }
-
-    public String getReceiptedFlag() {
-        return receiptedFlag;
-    }
-
-    public void setReceiptedFlag(String receiptedFlag) {
-        this.receiptedFlag = receiptedFlag;
-    }
-
-    public String getReceiptedType() {
-        return receiptedType;
-    }
-
-    public void setReceiptedType(String receiptedType) {
-        this.receiptedType = receiptedType;
-    }
-
-    public Integer getPaySuccessCounter() {
-        return paySuccessCounter;
-    }
-
-    public void setPaySuccessCounter(Integer paySuccessCounter) {
-        this.paySuccessCounter = paySuccessCounter;
-    }
-
-
-    public String getShopPostFlag() {
-        return shopPostFlag;
-    }
-
-    public void setShopPostFlag(String shopPostFlag) {
-        this.shopPostFlag = shopPostFlag;
-    }
-    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; //是否可以付第三方申请
 
-    public String getOnlinePayWays() {
-        return onlinePayWays;
-    }
-
-    public void setOnlinePayWays(String onlinePayWays) {
-        this.onlinePayWays = onlinePayWays;
-    }
-
-    public String getRebateFee() {
-        return rebateFee;
-    }
-
-    public void setRebateFee(String rebateFee) {
-        this.rebateFee = rebateFee;
-    }
-
-    public Integer getSettleStatus() {
-        return settleStatus;
-    }
-
-    public void setSettleStatus(Integer settleStatus) {
-        this.settleStatus = settleStatus;
-    }
-
-    public Double getSettleAmount() {
-        return settleAmount;
-    }
-
-    public void setSettleAmount(Double settleAmount) {
-        this.settleAmount = settleAmount;
-    }
-
-    public Integer getPayWay() {
-        return payWay;
-    }
-
-    public void setPayWay(Integer payWay) {
-        this.payWay = payWay;
-    }
-
-    public Double getIncome() {
-        return income;
-    }
-
-    public void setIncome(Double income) {
-        this.income = income;
-    }
-
-    public Integer getOnlineFlag() {
-        return onlineFlag;
-    }
-
-    public void setOnlineFlag(Integer onlineFlag) {
-        this.onlineFlag = onlineFlag;
-    }
-
-    public List<String> getShopOrderNos() {
-        return shopOrderNos;
-    }
-
-    public void setShopOrderNos(List<String> shopOrderNos) {
-        this.shopOrderNos = shopOrderNos;
-    }
-
-    public Double getCouponAmount() {
-        return couponAmount;
-    }
-
-    public void setCouponAmount(Double couponAmount) {
-        this.couponAmount = couponAmount;
-    }
-
-    public Integer getOrderPromotionsId() {
-        return orderPromotionsId;
-    }
-
-    public void setOrderPromotionsId(Integer orderPromotionsId) {
-        this.orderPromotionsId = orderPromotionsId;
-    }
-
-    public Double getPromotionFullReduction() {
-        return promotionFullReduction;
-    }
-
-    public void setPromotionFullReduction(Double promotionFullReduction) {
-        this.promotionFullReduction = promotionFullReduction;
-    }
-
-    public String getRebateOrder() {
-        return rebateOrder;
-    }
-
-    public void setRebateOrder(String rebateOrder) {
-        this.rebateOrder = rebateOrder;
-    }
-
-    public Integer getSplitCount() {
-        return splitCount;
-    }
-
-    public void setSplitCount(Integer splitCount) {
-        this.splitCount = splitCount;
-    }
-
-    public Integer getSettleRecordNum() {
-        return settleRecordNum;
-    }
-
-    public void setSettleRecordNum(Integer settleRecordNum) {
-        this.settleRecordNum = settleRecordNum;
-    }
-
-    public Integer getIsColdChina() {
-        return isColdChina;
-    }
-
-    public void setIsColdChina(Integer isColdChina) {
-        this.isColdChina = isColdChina;
-    }
-    public String getClubName() {
-        return clubName;
-    }
-
-    public void setClubName(String clubName) {
-        this.clubName = clubName;
-    }
-
-    public String getReceiptStatus() {
-        return receiptStatus;
-    }
-
-    public void setReceiptStatus(String receiptStatus) {
-        this.receiptStatus = receiptStatus;
-    }
-
-    public Double getReceiptTotalFee() {
-        return receiptTotalFee;
-    }
-
-    public void setReceiptTotalFee(Double receiptTotalFee) {
-        this.receiptTotalFee = receiptTotalFee;
-    }
-
-    public Double getShouldPayProduct() {
-        return shouldPayProduct;
-    }
-
-    public void setShouldPayProduct(Double shouldPayProduct) {
-        this.shouldPayProduct = shouldPayProduct;
-    }
-
-    public Integer getShopOrderID() {
-        return shopOrderID;
-    }
-
-    public void setShopOrderID(Integer shopOrderID) {
-        this.shopOrderID = shopOrderID;
-    }
-
-    public String getShopOrderNo() {
-        return shopOrderNo;
-    }
-
-    public void setShopOrderNo(String shopOrderNo) {
-        this.shopOrderNo = shopOrderNo;
-    }
-
-    public String getOrderNo() {
-        return orderNo;
-    }
-
-    public void setOrderNo(String orderNo) {
-        this.orderNo = orderNo;
-    }
-
-    public Integer getUserID() {
-        return userID;
-    }
-
-    public void setUserID(Integer userID) {
-        this.userID = userID;
-    }
-
-    public Integer getShopID() {
-        return shopID;
-    }
-
-    public void setShopID(Integer shopID) {
-        this.shopID = shopID;
-    }
-
-    public Integer getItemCount() {
-        return itemCount;
-    }
-
-    public void setItemCount(Integer itemCount) {
-        this.itemCount = itemCount;
-    }
-
-    public Integer getTownID() {
-        return townID;
-    }
-
-    public void setTownID(Integer townID) {
-        this.townID = townID;
-    }
-
-    public Double getProductAmount() {
-        return productAmount;
-    }
-
-    public void setProductAmount(Double productAmount) {
-        this.productAmount = productAmount;
-    }
-
-    public Double getFee() {
-        return fee;
-    }
-
-    public void setFee(Double fee) {
-        this.fee = fee;
-    }
-
-    public Double getDiscountAmount() {
-        return discountAmount;
-    }
-
-    public void setDiscountAmount(Double discountAmount) {
-        this.discountAmount = discountAmount;
-    }
-
-    public Double getAccountAmount() {
-        return accountAmount;
-    }
-
-    public void setAccountAmount(Double accountAmount) {
-        this.accountAmount = accountAmount;
-    }
-
-    public Double getTotalAmount() {
-        return totalAmount;
-    }
-
-    public void setTotalAmount(Double totalAmount) {
-        this.totalAmount = totalAmount;
-    }
-
-    public String getPayFlag() {
-        return payFlag;
-    }
-
-    public void setPayFlag(String payFlag) {
-        this.payFlag = payFlag;
-    }
-
-    public String getPayTime() {
-        return payTime;
-    }
-
-    public void setPayTime(String payTime) {
-        this.payTime = payTime;
-    }
-
-    public String getFinishTime() {
-        return finishTime;
-    }
-
-    public void setFinishTime(String finishTime) {
-        this.finishTime = finishTime;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public Integer getRefundStatus() {
-        return refundStatus;
-    }
-
-    public void setRefundStatus(Integer refundStatus) {
-        this.refundStatus = refundStatus;
-    }
-
-    public Double getNeedPayAmount() {
-        return needPayAmount;
-    }
-
-    public void setNeedPayAmount(Double needPayAmount) {
-        this.needPayAmount = needPayAmount;
-    }
-
-    public Double getCanRefundAmount() {
-        return canRefundAmount;
-    }
-
-    public void setCanRefundAmount(Double canRefundAmount) {
-        this.canRefundAmount = canRefundAmount;
-    }
-
-    public Double getRefundAmount() {
-        return refundAmount;
-    }
-
-    public void setRefundAmount(Double refundAmount) {
-        this.refundAmount = refundAmount;
-    }
-
-    public Integer getClubID() {
-        return clubID;
-    }
-
-    public void setClubID(Integer clubID) {
-        this.clubID = clubID;
-    }
-
-    public Integer getSpID() {
-        return spID;
-    }
-
-    public void setSpID(Integer spID) {
-        this.spID = spID;
-    }
-
-    public Integer getMainSpID() {
-        return mainSpID;
-    }
-
-    public void setMainSpID(Integer mainSpID) {
-        this.mainSpID = mainSpID;
-    }
-
-    public Integer getOrderBeanAmount() {
-        return orderBeanAmount;
-    }
-
-    public void setOrderBeanAmount(Integer orderBeanAmount) {
-        this.orderBeanAmount = orderBeanAmount;
-    }
-
-    public Integer getUseBeanAmount() {
-        return useBeanAmount;
-    }
-
-    public void setUseBeanAmount(Integer useBeanAmount) {
-        this.useBeanAmount = useBeanAmount;
-    }
-
-    public Integer getUseBeanFlag() {
-        return useBeanFlag;
-    }
-
-    public void setUseBeanFlag(Integer useBeanFlag) {
-        this.useBeanFlag = useBeanFlag;
-    }
-
-    public Integer getCanRefundFlag() {
-        return canRefundFlag;
-    }
-
-    public void setCanRefundFlag(Integer canRefundFlag) {
-        this.canRefundFlag = canRefundFlag;
-    }
-
-    public Integer getUseBalanceFlag() {
-        return useBalanceFlag;
-    }
-
-    public void setUseBalanceFlag(Integer useBalanceFlag) {
-        this.useBalanceFlag = useBalanceFlag;
-    }
-
-    public Integer getCanRefundBeans() {
-        return canRefundBeans;
-    }
-
-    public void setCanRefundBeans(Integer canRefundBeans) {
-        this.canRefundBeans = canRefundBeans;
-    }
-
-    public Integer getOrderDeliveryID() {
-        return orderDeliveryID;
-    }
-
-    public void setOrderDeliveryID(Integer orderDeliveryID) {
-        this.orderDeliveryID = orderDeliveryID;
-    }
-
-    public Double getFreePostageFee() {
-        return freePostageFee;
-    }
-
-    public void setFreePostageFee(Double freePostageFee) {
-        this.freePostageFee = freePostageFee;
-    }
-
-    public String getAssociationType() {
-        return associationType;
-    }
-
-    public void setAssociationType(String associationType) {
-        this.associationType = associationType;
-    }
-
-    public String getConfirmType() {
-        return confirmType;
-    }
-
-    public void setConfirmType(String confirmType) {
-        this.confirmType = confirmType;
-    }
-
-    public String getConfirmTime() {
-        return confirmTime;
-    }
-
-    public void setConfirmTime(String confirmTime) {
-        this.confirmTime = confirmTime;
-    }
-
-    public boolean isReceiptOrderFlag() {
-        return receiptOrderFlag;
-    }
-
-    public void setReceiptOrderFlag(boolean receiptOrderFlag) {
-        this.receiptOrderFlag = receiptOrderFlag;
-    }
-
-    public Double getOrderReceivedAmount() {
-        return orderReceivedAmount;
-    }
-
-    public void setOrderReceivedAmount(Double orderReceivedAmount) {
-        this.orderReceivedAmount = orderReceivedAmount;
-    }
-
-    public Double getReturnBalanceAmount() {
-        return returnBalanceAmount;
-    }
-
-    public void setReturnBalanceAmount(Double returnBalanceAmount) {
-        this.returnBalanceAmount = returnBalanceAmount;
-    }
-
-    public Double getAllServeAmount() {
-        return allServeAmount;
-    }
-
-    public void setAllServeAmount(Double allServeAmount) {
-        this.allServeAmount = allServeAmount;
-    }
-
-    public Integer getFreePostageTicketID() {
-        return freePostageTicketID;
-    }
-
-    public void setFreePostageTicketID(Integer freePostageTicketID) {
-        this.freePostageTicketID = freePostageTicketID;
-    }
-
-    public Double getBrokerage() {
-        return brokerage;
-    }
-
-    public void setBrokerage(Double brokerage) {
-        this.brokerage = brokerage;
-    }
-
-    @Override
-    public String getDelFlag() {
-        return delFlag;
-    }
-
-    @Override
-    public void setDelFlag(String delFlag) {
-        this.delFlag = delFlag;
-    }
-
-    public Double getRefundsAmount() {
-        return refundsAmount;
-    }
-
-    public void setRefundsAmount(Double refundsAmount) {
-        this.refundsAmount = refundsAmount;
-    }
-
-    public String getOrderStatusFlag() {
-        return orderStatusFlag;
-    }
-
-    public void setOrderStatusFlag(String orderStatusFlag) {
-        this.orderStatusFlag = orderStatusFlag;
-    }
-
-    public String getBuyStatus() {
-        return buyStatus;
-    }
-
-    public void setBuyStatus(String buyStatus) {
-        this.buyStatus = buyStatus;
-    }
-
-    public NewOrder getOrder() {
-        return order;
-    }
-
-    public void setOrder(NewOrder order) {
-        this.order = order;
-    }
-
-    public List<NewOrderProduct> getNewOrderProducts() {
-        return newOrderProducts;
-    }
-
-    public void setNewOrderProducts(List<NewOrderProduct> newOrderProducts) {
-        this.newOrderProducts = newOrderProducts;
-    }
-
-    public Integer getOrderID() {
-        return orderID;
-    }
-
-    public void setOrderID(Integer orderID) {
-        this.orderID = orderID;
-    }
-
-    public Integer getOrderType() {
-        return orderType;
-    }
-
-    public void setOrderType(Integer orderType) {
-        this.orderType = orderType;
-    }
-
-    @Transient
-    public String getShopName() {
-        return shopName;
-    }
-
-    public void setShopName(String shopName) {
-        this.shopName = shopName;
-    }
-
-
-    public String getContactName() {
-        return contactName;
-    }
-
-    public void setContactName(String contactName) {
-        this.contactName = contactName;
-    }
-
-    public String getDockingPeopleName() {
-        return dockingPeopleName;
-    }
-
-    public void setDockingPeopleName(String dockingPeopleName) {
-        this.dockingPeopleName = dockingPeopleName;
-    }
-
-    @Transient
-    public String getReceiver() {
-        return receiver;
-    }
-
-    public void setReceiver(String receiver) {
-        this.receiver = receiver;
-    }
-
-    @Transient
-    public String getBuyer() {
-        return buyer;
-    }
-
-    public void setBuyer(String buyer) {
-        this.buyer = buyer;
-    }
-
-    @Transient
-    public String getOrderSource() {
-        return orderSource;
-    }
-
-    public void setOrderSource(String orderSource) {
-        this.orderSource = orderSource;
-    }
-
-    public String getOrderTime() {
-        return orderTime;
-    }
-
-    public void setOrderTime(String orderTime) {
-        this.orderTime = orderTime;
-    }
-
-    @Transient
-    public String getAlreadyReceipt() {
-        return alreadyReceipt;
-    }
-
-    public void setAlreadyReceipt(String alreadyReceipt) {
-        this.alreadyReceipt = alreadyReceipt;
-    }
-
-    @Transient
-    public String getUnReceipt() {
-        return unReceipt;
-    }
-
-    public void setUnReceipt(String unReceipt) {
-        this.unReceipt = unReceipt;
-    }
-
-    @Transient
-    public String getPaid() {
-        return paid;
-    }
-
-    public void setPaid(String paid) {
-        this.paid = paid;
-    }
-
-    @Transient
-    public String getUnpaid() {
-        return unpaid;
-    }
-
-    public void setUnpaid(String unpaid) {
-        this.unpaid = unpaid;
-    }
-
-    public Double getPreferential() {
-        return preferential;
-    }
-
-    public void setPreferential(Double preferential) {
-        this.preferential = preferential;
-    }
-
-    public Integer getOrderSubmitType() {
-        return orderSubmitType;
-    }
-
-    public void setOrderSubmitType(Integer orderSubmitType) {
-        this.orderSubmitType = orderSubmitType;
-    }
-
-    public BigInteger getDeliveryTimeMills() {
-        return deliveryTimeMills;
-    }
-
-    public void setDeliveryTimeMills(BigInteger deliveryTimeMills) {
-        this.deliveryTimeMills = deliveryTimeMills;
-    }
-
-    public Integer getPresentNum() {
-        return presentNum;
-    }
-
-    public void setPresentNum(Integer presentNum) {
-        this.presentNum = presentNum;
-    }
-
-    public Integer getOutStoreNum() {
-        return outStoreNum;
-    }
-
-    public void setOutStoreNum(Integer outStoreNum) {
-        this.outStoreNum = outStoreNum;
-    }
-
-    public Integer getOutStoreTimes() {
-        return outStoreTimes;
-    }
-
-    public void setOutStoreTimes(Integer outStoreTimes) {
-        this.outStoreTimes = outStoreTimes;
-    }
-
-    public Double getTotalAddedValueTax() {
-        return totalAddedValueTax;
-    }
-
-    public void setTotalAddedValueTax(Double totalAddedValueTax) {
-        this.totalAddedValueTax = totalAddedValueTax;
-    }
-
-    @Transient
-    public String getSplitFlag() {
-        return splitFlag;
-    }
-
-    public void setSplitFlag(String splitFlag) {
-        this.splitFlag = splitFlag;
-    }
-
-    public Double getDiscountFee() {
-        return discountFee;
-    }
-
-    public void setDiscountFee(Double discountFee) {
-        this.discountFee = discountFee;
-    }
-
-    public Long getAutoReceiveTimeMills() {
-        return autoReceiveTimeMills;
-    }
-
-    public void setAutoReceiveTimeMills(Long autoReceiveTimeMills) {
-        this.autoReceiveTimeMills = autoReceiveTimeMills;
-    }
-
-    public Long getAutoOverTimeMills() {
-        return autoOverTimeMills;
-    }
-
-    public void setAutoOverTimeMills(Long autoOverTimeMills) {
-        this.autoOverTimeMills = autoOverTimeMills;
-    }
-
-    public String getReceiveGoodsTime() {
-        return receiveGoodsTime;
-    }
-
-    public void setReceiveGoodsTime(String receiveGoodsTime) {
-        this.receiveGoodsTime = receiveGoodsTime;
-    }
-
-    public String getNote() {
-        return note;
-    }
-
-    public void setNote(String note) {
-        this.note = note;
-    }
-
-    public List<NewOrderProduct> getSnOrderProducts() {
-        return snOrderProducts;
-    }
-
-    public void setSnOrderProducts(List<NewOrderProduct> snOrderProducts) {
-        this.snOrderProducts = snOrderProducts;
-    }
-
-    public String getPayStatus() {
-        return payStatus;
-    }
-
-    public void setPayStatus(String payStatus) {
-        this.payStatus = payStatus;
-    }
-
-    public String getSendOutStatus() {
-        return sendOutStatus;
-    }
-
-    public void setSendOutStatus(String sendOutStatus) {
-        this.sendOutStatus = sendOutStatus;
-    }
-
-    public String getPostFeeCos() {
-        return postFeeCos;
-    }
-
-    public void setPostFeeCos(String postFeeCos) {
-        this.postFeeCos = postFeeCos;
-    }
-
-    public Boolean getDefaultStatus() {
-        return defaultStatus;
-    }
-
-    public void setDefaultStatus(Boolean defaultStatus) {
-        this.defaultStatus = defaultStatus;
-    }
-
-    public String getPaying() {
-        return paying;
-    }
-
-    public void setPaying(String paying) {
-        this.paying = paying;
-    }
-
-    @Transient
-    public Double getPayTotalFee() {
-        return payTotalFee;
-    }
-
-    public void setPayTotalFee(Double payTotalFee) {
-        this.payTotalFee = payTotalFee;
-    }
-
-    public Double getShopProductAmount() {
-        return shopProductAmount;
-    }
-
-    public void setShopProductAmount(Double shopProductAmount) {
-        this.shopProductAmount = shopProductAmount;
-    }
-
-    public Double getShopPostFee() {
-        return shopPostFee;
-    }
-
-    public void setShopPostFee(Double shopPostFee) {
-        this.shopPostFee = shopPostFee;
-    }
-
-    public Double getShopTaxFee() {
-        return shopTaxFee;
-    }
-
-    public void setShopTaxFee(Double shopTaxFee) {
-        this.shopTaxFee = shopTaxFee;
-    }
-
-    public Double getShouldPayShopAmount() {
-        return shouldPayShopAmount;
-    }
-
-    public void setShouldPayShopAmount(Double shouldPayShopAmount) {
-        this.shouldPayShopAmount = shouldPayShopAmount;
-    }
-
-    public Double getPayedShopAmount() {
-        return payedShopAmount;
-    }
-
-    public void setPayedShopAmount(Double payedShopAmount) {
-        this.payedShopAmount = payedShopAmount;
-    }
-
-    public Double getShopOtherFee() {
-        return shopOtherFee;
-    }
-
-    public void setShopOtherFee(Double shopOtherFee) {
-        this.shopOtherFee = shopOtherFee;
-    }
-
-    @Transient
-    public String getStartTime() {
-        return startTime;
-    }
-
-    public void setStartTime(String startTime) {
-        this.startTime = startTime;
-    }
-
-    @Transient
-    public String getEndTime() {
-        return endTime;
-    }
-
-    public void setEndTime(String endTime) {
-        this.endTime = endTime;
-    }
-
-    @Transient
-    public Double getWaitPayShop() {
-        return waitPayShop;
-    }
-
-    public void setWaitPayShop(Double waitPayShop) {
-        this.waitPayShop = waitPayShop;
-    }
-
-    @Transient
-    public Double getWipePayment() {
-        return wipePayment;
-    }
-
-    public void setWipePayment(Double wipePayment) {
-        this.wipePayment = wipePayment;
-    }
-
-    @Transient
-    public String getRefunding() {
-        return refunding;
-    }
-
-    public void setRefunding(String refunding) {
-        this.refunding = refunding;
-    }
-
-    @Transient
-    public String getOperatingMode() {
-        return operatingMode;
-    }
-
-    public void setOperatingMode(String operatingMode) {
-        this.operatingMode = operatingMode;
-    }
-
-    public String getCostType() {
-        return costType;
-    }
-
-    public void setCostType(String costType) {
-        this.costType = costType;
-    }
-
-    public Double getProportional() {
-        return proportional;
-    }
-
-    public void setProportional(Double proportional) {
-        this.proportional = proportional;
-    }
-
-    public String[] getPs() {
-        return ps;
-    }
-
-    public void setPs(String[] ps) {
-        this.ps = ps;
-    }
-
-    public String getModifyShouldPayNote() {
-        return modifyShouldPayNote;
-    }
-
-    public void setModifyShouldPayNote(String modifyShouldPayNote) {
-        this.modifyShouldPayNote = modifyShouldPayNote;
-    }
-
-    public String getModifyShouldPayUserID() {
-        return modifyShouldPayUserID;
-    }
-
-    public void setModifyShouldPayUserID(String modifyShouldPayUserID) {
-        this.modifyShouldPayUserID = modifyShouldPayUserID;
-    }
-
-    public String getModifyShouldPayDate() {
-        return modifyShouldPayDate;
-    }
-
-    public void setModifyShouldPayDate(String modifyShouldPayDate) {
-        this.modifyShouldPayDate = modifyShouldPayDate;
-    }
-
-    @Transient
-    public Double getPayed() {
-        return payed;
-    }
-
-    public void setPayed(Double payed) {
-        this.payed = payed;
-    }
-
-    public Integer getOrganizeID() {
-        return organizeID;
-    }
-
-    public void setOrganizeID(Integer organizeID) {
-        this.organizeID = organizeID;
-    }
-
-    public String getRemarkImage1() {
-        return remarkImage1;
-    }
-
-    public void setRemarkImage1(String remarkImage1) {
-        this.remarkImage1 = remarkImage1;
-    }
-
-    public String getRemarkImage2() {
-        return remarkImage2;
-    }
-
-    public void setRemarkImage2(String remarkImage2) {
-        this.remarkImage2 = remarkImage2;
-    }
-
-    public String getRemarkImage3() {
-        return remarkImage3;
-    }
-
-    public void setRemarkImage3(String remarkImage3) {
-        this.remarkImage3 = remarkImage3;
-    }
-
-    public String getRemarkImage4() {
-        return remarkImage4;
-    }
-
-    public void setRemarkImage4(String remarkImage4) {
-        this.remarkImage4 = remarkImage4;
-    }
-
-    public String getRemarkImage5() {
-        return remarkImage5;
-    }
-
-    public void setRemarkImage5(String remarkImage5) {
-        this.remarkImage5 = remarkImage5;
-    }
-
-    public String getRemarkImage6() {
-        return remarkImage6;
-    }
-
-    public void setRemarkImage6(String remarkImage6) {
-        this.remarkImage6 = remarkImage6;
-    }
-
-    public String getRemarkImage7() {
-        return remarkImage7;
-    }
-
-    public void setRemarkImage7(String remarkImage7) {
-        this.remarkImage7 = remarkImage7;
-    }
-
-    public String getRemarkImage8() {
-        return remarkImage8;
-    }
-
-    public void setRemarkImage8(String remarkImage8) {
-        this.remarkImage8 = remarkImage8;
-    }
-
-    public String getRemarkImage9() {
-        return remarkImage9;
-    }
-
-    public void setRemarkImage9(String remarkImage9) {
-        this.remarkImage9 = remarkImage9;
-    }
-
-    public String getRemarkImage10() {
-        return remarkImage10;
-    }
-
-    public void setRemarkImage10(String remarkImage10) {
-        this.remarkImage10 = remarkImage10;
-    }
-
-    public CmPromotion getShopPromotion() {
-        return shopPromotion;
-    }
-
-    public void setShopPromotion(CmPromotion shopPromotion) {
-        this.shopPromotion = shopPromotion;
-    }
-
-    public Integer getZeroCostFlag() {
-        return zeroCostFlag;
-    }
-
-    public void setZeroCostFlag(Integer zeroCostFlag) {
-        this.zeroCostFlag = zeroCostFlag;
-    }
-
-    public Double getReturnedPurchaseTotalFee() {
-        return returnedPurchaseTotalFee;
-    }
-
-    public void setReturnedPurchaseTotalFee(Double returnedPurchaseTotalFee) {
-        this.returnedPurchaseTotalFee = returnedPurchaseTotalFee;
-    }
-
-    public Double getDiscountTotalFee() {
-        return discountTotalFee;
-    }
-
-    public void setDiscountTotalFee(Double discountTotalFee) {
-        this.discountTotalFee = discountTotalFee;
-    }
-
-    public Double getFreight() {
-        return freight;
-    }
-
-    public void setFreight(Double freight) {
-        this.freight = freight;
-    }
-
-    public Boolean getReturnedFreightFlag() {
-        return returnedFreightFlag;
-    }
-
-    public void setReturnedFreightFlag(Boolean returnedFreightFlag) {
-        this.returnedFreightFlag = returnedFreightFlag;
-    }
-
-    public boolean isModifyPayable() {
-        return modifyPayable;
-    }
-
-    public void setModifyPayable(boolean modifyPayable) {
-        this.modifyPayable = modifyPayable;
-    }
-
-    public String getCommercialCode() {
-        return commercialCode;
-    }
-
-    public void setCommercialCode(String commercialCode) {
-        this.commercialCode = commercialCode;
-    }
-
-    public Integer getDifferenceType() {
-        return differenceType;
-    }
-
-    public void setDifferenceType(Integer differenceType) {
-        this.differenceType = differenceType;
-    }
-
-    public BigDecimal getDifferencePrice() {
-        return differencePrice;
-    }
-
-    public void setDifferencePrice(BigDecimal differencePrice) {
-        this.differencePrice = differencePrice;
-    }
-
-    public Integer getUserBeans() {
-        return userBeans;
-    }
-
-    public void setUserBeans(Integer userBeans) {
-        this.userBeans = userBeans;
-    }
-
-    public boolean getPayShopOtherFee() {
-        return payShopOtherFee;
-    }
-
-    public void setPayShopOtherFee(boolean payShopOtherFee) {
-        this.payShopOtherFee = payShopOtherFee;
-    }
-
-    public Integer getOrderArchiveId() {
-        return orderArchiveId;
-    }
-
-    public void setOrderArchiveId(Integer orderArchiveId) {
-        this.orderArchiveId = orderArchiveId;
-    }
-
-    public Double getSvipShopReduction() {
-        return svipShopReduction;
-    }
-
-    public void setSvipShopReduction(Double svipShopReduction) {
-        this.svipShopReduction = svipShopReduction;
-    }
-
-    public Double getRealPay() {
-        return realPay;
-    }
-
-    public void setRealPay(Double realPay) {
-        this.realPay = realPay;
-    }
-
-    public Double getEachDiscount() {
-        return eachDiscount;
-    }
-
-    public void setEachDiscount(Double eachDiscount) {
-        this.eachDiscount = eachDiscount;
-    }
-
-    public Double getReceiptAmount() {
-        return receiptAmount;
-    }
-
-    public void setReceiptAmount(Double receiptAmount) {
-        this.receiptAmount = receiptAmount;
-    }
-
-    public Double getRestAmount() {
-        return restAmount;
-    }
-
-    public void setRestAmount(Double restAmount) {
-        this.restAmount = restAmount;
-    }
-
-    public Double getPayShopAmount() {
-        return payShopAmount;
-    }
-
-    public void setPayShopAmount(Double payShopAmount) {
-        this.payShopAmount = payShopAmount;
-    }
-
-    public Integer getShopReceiptStatus() {
-        return shopReceiptStatus;
-    }
-
-    public void setShopReceiptStatus(Integer shopReceiptStatus) {
-        this.shopReceiptStatus = shopReceiptStatus;
-    }
-
-    public String getSplitCode() {
-        return splitCode;
-    }
-
-    public void setSplitCode(String splitCode) {
-        this.splitCode = splitCode;
-    }
+    private String productName;
 }

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

@@ -131,10 +131,10 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
     private MessageCenterDao messageCenterDao;
 
 
-    public List<CmOrderPaymentVoucherVo> findVoucherVoOrderID( Integer shopOrderId){
+    public List<CmOrderPaymentVoucherVo> findVoucherVoOrderID(Integer shopOrderId) {
         List<CmOrderPaymentVoucherVo> voucherVo = newOrderDao.findVoucherVoOrderID(shopOrderId);
-        if (null != voucherVo &&voucherVo.size() > 0) {
-            for(CmOrderPaymentVoucherVo vou : voucherVo) {
+        if (null != voucherVo && voucherVo.size() > 0) {
+            for (CmOrderPaymentVoucherVo vou : voucherVo) {
                 if (vou.getRemarks().length() > 100) {
                     String start = vou.getRemarks().substring(0, 100);
                     String end = vou.getRemarks().substring(100, vou.getRemarks().length());
@@ -968,6 +968,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         newOrderDao.insertShortLink(markId, shortLink, url);
         return shortLink;
     }
+
     @Transactional(readOnly = false)
     public boolean getSendSms(int markId, String mobile, String content) throws Exception {
         String config = Global.getConfig("cm.config");
@@ -1308,12 +1309,12 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
             if (count > 1) {
                 newOrder.setRechargeGoods(3);
             }
-            BigDecimal payTotalFee=new BigDecimal(0);
+            BigDecimal payTotalFee = new BigDecimal(0);
             if (CollectionUtils.isNotEmpty(shopOrders)) {
                 for (NewShopOrder shopOrder : shopOrders) {
-                     payTotalFee = MathUtil.add(payTotalFee,shopOrder.getRealPay() != null ? shopOrder.getRealPay() : shopOrder.getNeedPayAmount());
+                    payTotalFee = MathUtil.add(payTotalFee, shopOrder.getRealPay() != null ? shopOrder.getRealPay() : shopOrder.getNeedPayAmount());
 
-                    BigDecimal add = MathUtil.add(shopOrder.getReceiptAmount(),cmDiscernReceiptService.findShoOrderIDReceipt(shopOrder.getShopOrderID()));
+                    BigDecimal add = MathUtil.add(shopOrder.getReceiptAmount(), cmDiscernReceiptService.findShoOrderIDReceipt(shopOrder.getShopOrderID()));
                     shopOrder.setReceiptAmount(add.doubleValue());
                     BigDecimal sub = MathUtil.sub((shopOrder.getRealPay() != null ? shopOrder.getRealPay() : shopOrder.getNeedPayAmount()).doubleValue()
                             , shopOrder.getReceiptAmount().doubleValue());
@@ -1341,13 +1342,13 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                         }
                     }
                     //拼接运费
-                    String shopPostFlag = shopOrder.getShopPostFlag()!=null?shopOrder.getShopPostFlag():"0";
+                    String shopPostFlag = shopOrder.getShopPostFlag() != null ? shopOrder.getShopPostFlag() : "0";
                     String PostageInfo = null;
 
                     PostageInfo = shopPostFlag.equals("2") ? "到付" : shopPostFlag.equals("0") ? "包邮" : "¥" + shopOrder.getShopPostFee();
 
                     //支付凭证
-                    List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(shopOrder.getShopOrderID() );
+                    List<CmOrderPaymentVoucherVo> voucherVo = newOrderService.findVoucherVoOrderID(shopOrder.getShopOrderID());
                     shopOrder.setPostageInfo(PostageInfo);
                     shopOrder.setVoucherVo(voucherVo);
                     List<String> code = newShopOrderDao.findCommercialCode(shopOrder.getOrderID());
@@ -1455,7 +1456,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                      * (4)商品分账号是采美信息的商品的子订单(走了线上支付才排除)
                      */
                     if ((1161 != shopOrder.getShopID() || 2 != shopOrder.getOrderType() || !flag ||
-                            (!"E1807059160".equals(shopOrder.getSplitCode()) &&  null != discernPayWay && 1 == discernPayWay))) {
+                            (!"E1807059160".equals(shopOrder.getSplitCode()) && null != discernPayWay && 1 == discernPayWay))) {
                         // 线下支付的订单
                         if (null != discernPayWay && 1 != discernPayWay) {
                             // 订单下线收款, 付款状态与收款状态同步显示
@@ -1629,7 +1630,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
     public void confirmOrder(Integer orderID, Integer shopOrderID) {
         NewOrder order = get(orderID.toString());
         order.setConfirmFlag("1");//确认订单标识 后台确认 1
-        if (order.getNewShopOrders().stream().filter(newShopOrder -> newShopOrder.getStatus().equals(0)).collect(Collectors.toList()).size()==1) {
+        if (order.getNewShopOrders().stream().filter(newShopOrder -> newShopOrder.getStatus().equals(0)).collect(Collectors.toList()).size() == 1) {
             order.setStatus("11");//订单状态变成 ==> 待收款待付款 11
         }
         //过滤子订单
@@ -1652,12 +1653,12 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         //        order.getBalancePayFee()
         Double balancePayFee = order.getNewShopOrders().get(0).getAccountAmount();
         //修改子订单状态(余额抵扣)
-        if (order.getNewShopOrders().get(0).getUseBalanceFlag() !=null&&order.getNewShopOrders().get(0).getUseBalanceFlag() == 1) {
-            if ( balancePayFee != null && balancePayFee .equals(order.getNewShopOrders().get(0).getRealPay())) {
+        if (order.getNewShopOrders().get(0).getUseBalanceFlag() != null && order.getNewShopOrders().get(0).getUseBalanceFlag() == 1) {
+            if (balancePayFee != null && balancePayFee.equals(order.getNewShopOrders().get(0).getRealPay())) {
                 order.getNewShopOrders().get(0).setReceiptStatus("3");
-            } else if ( balancePayFee != null && balancePayFee <order.getNewShopOrders().get(0).getRealPay()) {
+            } else if (balancePayFee != null && balancePayFee < order.getNewShopOrders().get(0).getRealPay()) {
                 order.getNewShopOrders().get(0).setReceiptStatus("2");
-          }
+            }
         }
         Date date = new Date();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -2388,7 +2389,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
                 //通过子订单ID查询子订单信息
                 NewShopOrder newShopOrder = newShopOrderDao.get(String.valueOf(shopOrderID));
                 if (null != newShopOrder) {
-                    shopOrderNoAndId += "<b style=\"font-size: 15px;\">"+newShopOrder.getShopOrderID()+"</b>"+"("+newShopOrder.getShopOrderNo()+")<br>";
+                    shopOrderNoAndId += "<b style=\"font-size: 15px;\">" + newShopOrder.getShopOrderID() + "</b>" + "(" + newShopOrder.getShopOrderNo() + ")<br>";
                     shopOrder.setFee(newShopOrder.getFee());
                     shopOrder.setShouldPayProduct(newShopOrder.getShouldPayProduct());
                     List<NewOrderProduct> pList = newOrderProductDao.findListByShopOrderID(shopOrderID);
@@ -2876,7 +2877,7 @@ public class NewOrderService extends CrudService<NewOrderDao, NewOrder> {
         return newOrderDao.getSplitRecord(orderID);
     }
 
-    public String productDataVerification(Integer orderID,String firstClubType) {
+    public String productDataVerification(Integer orderID, String firstClubType) {
         String mes = null;
         List<NewOrderProduct> productList = newOrderProductDao.findListProductOrderID(orderID);
         if (!"1".equals(firstClubType)) {

+ 14 - 20
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -1,14 +1,8 @@
 package com.caimei.modules.order.service;
 
-
-import com.caimei.modules.bulkpurchase.entity.BpOrderUserinfo;
-import com.caimei.modules.bulkpurchase.entity.OrderInvoice;
-import com.caimei.modules.coupon.entity.CmCouponOrderRecord;
 import com.caimei.modules.hehe.dao.HeHeNewOrderDao;
-import com.caimei.modules.hehe.entity.CmHeheCouponOrderRecord;
 import com.caimei.modules.order.dao.*;
 import com.caimei.modules.order.entity.*;
-import com.caimei.modules.order.utils.NewOrderStatus;
 import com.caimei.modules.product.dao.CmPromotionDao;
 import com.caimei.modules.product.dao.CmSecondHandDetailDao;
 import com.caimei.modules.product.dao.ProductDao;
@@ -16,9 +10,6 @@ import com.caimei.modules.product.entity.CmPromotion;
 import com.caimei.modules.product.entity.CmSecondHandDetail;
 import com.caimei.modules.product.entity.CmSku;
 import com.caimei.modules.product.entity.OrderProductLadderPrice;
-import com.caimei.modules.user.entity.CmUser;
-import com.caimei.modules.user.entity.NewCmClub;
-import com.caimei.po.neworder.CmShopOrder;
 import com.caimei.utils.AppKeys;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.MathUtil;
@@ -71,10 +62,6 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
     @Resource
     private CmRefundShopDao cmRefundShopDao;
     @Resource
-    private CmDiscernReceiptDao cmDiscernReceiptDao;
-    @Resource
-    private CmReturnedPurchaseDao cmReturnedPurchaseDao;
-    @Resource
     private CmPromotionDao cmPromotionDao;
     @Resource
     private HeHeNewOrderDao heHeNewOrderDao;
@@ -187,13 +174,13 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
      *
      * @param orderID
      */
-    public List<LogisticsInfoVo> logisticsDetails(Integer orderID,Integer shopOrderID ,String logisticsBatchID) {
+    public List<LogisticsInfoVo> logisticsDetails(Integer orderID, Integer shopOrderID, String logisticsBatchID) {
         List<LogisticsInfoVo> result = new ArrayList<>();
         //查询这个子订单所有的发货批次记录
         List<LogisticsBatch> lbs = logisticsBatchDao.findBatch(orderID, logisticsBatchID);
-        if(null!=shopOrderID){
+        if (null != shopOrderID) {
             //过滤子订单
-            lbs=lbs.stream().filter(s -> s.getShopOrderID().equals(shopOrderID)).collect(Collectors.toList());
+            lbs = lbs.stream().filter(s -> s.getShopOrderID().equals(shopOrderID)).collect(Collectors.toList());
         }
 
         for (LogisticsBatch l : lbs) {
@@ -335,9 +322,9 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
             if (null != discernPayWay && 1 != discernPayWay) {
                 // 线下收款,结算金额设置为已付金额
                 so.setSettleAmount(shopAmountShopOrderId);
-                if ( so.getSettleAmount() > 0 && (MathUtil.sub(so.getShouldPayShopAmount(), so.getShopOtherFee()).doubleValue()) == so.getSettleAmount()) {
+                if (so.getSettleAmount() > 0 && (MathUtil.sub(so.getShouldPayShopAmount(), so.getShopOtherFee()).doubleValue()) == so.getSettleAmount()) {
                     so.setSettleStatus(3);
-                } else if(so.getSettleAmount() > 0 &&  (MathUtil.sub(so.getShouldPayShopAmount(), so.getShopOtherFee()).doubleValue()) > so.getSettleAmount()) {
+                } else if (so.getSettleAmount() > 0 && (MathUtil.sub(so.getShouldPayShopAmount(), so.getShopOtherFee()).doubleValue()) > so.getSettleAmount()) {
                     so.setSettleStatus(2);
                 } else {
                     so.setSettleStatus(1);
@@ -384,7 +371,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
             if ("1".equals(newOrder.getFreePostFlag())) {
                 so.setFreight(newOrder.getFreight());
             } else {
-                so.setFreight(Double.valueOf(newOrder.getFreePostFlag()!=null ?newOrder.getFreePostFlag():"-2"));
+                so.setFreight(Double.valueOf(newOrder.getFreePostFlag() != null ? newOrder.getFreePostFlag() : "-2"));
             }
             //订单采美豆
             so.setUserBeans(newOrder.getUserBeans());
@@ -997,7 +984,7 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
             initCmOrderProduct(orderProduct);
         });
         shopOrder.setNewOrderProducts(pList);
-        if (pList.stream().anyMatch(p -> p.getProductID().intValue() == 999)){
+        if (pList.stream().anyMatch(p -> p.getProductID().intValue() == 999)) {
             shopOrder.setPostFeeCos("1");
         }
         Double payed = cmPayShopRecordDao.sumByShopOrderID(shopOrder.getShopOrderID());
@@ -1071,4 +1058,11 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
             }
         }
     }
+
+    public Page<NewShopOrder> findShopOrderPage(Page<NewShopOrder> page, NewShopOrder newShopOrder) {
+        newShopOrder.setPage(page);
+        List<NewShopOrder> shopOrders = newShopOrderDao.getShopOrderlist(newShopOrder);
+        page.setList(shopOrders);
+        return page;
+    }
 }

+ 31 - 8
src/main/java/com/caimei/modules/order/web/CmShopOrderController.java

@@ -1,5 +1,9 @@
 package com.caimei.modules.order.web;
 
+import com.caimei.modules.bulkpurchase.dao.OrderInvoiceDao;
+import com.caimei.modules.bulkpurchase.entity.BpClause;
+import com.caimei.modules.bulkpurchase.entity.OrderInvoice;
+import com.caimei.modules.bulkpurchase.service.BpClauseService;
 import com.caimei.modules.order.dao.CmPayShopRecordDao;
 import com.caimei.modules.order.entity.*;
 import com.caimei.modules.order.service.CmChangePayShopProductService;
@@ -48,8 +52,10 @@ public class CmShopOrderController extends BaseController {
     private CmChangePayShopProductService cmChangePayShopProductService;
     @Resource
     private CmPayShopRecordDao cmPayShopRecordDao;
-
-
+    @Resource
+    private BpClauseService bpClauseService;
+    @Resource
+    private OrderInvoiceDao orderInvoiceDao;
 
     @ModelAttribute
     public NewShopOrder get(@RequestParam(required = false) String id) {
@@ -63,6 +69,22 @@ public class CmShopOrderController extends BaseController {
         return entity;
     }
 
+    @RequestMapping("detail")
+    public String detail(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model) {
+        newShopOrder = newShopOrderService.findByShopOrderID(newShopOrder.getShopOrderID());
+        model.addAttribute("order", newShopOrder);
+        BpClause bpClause = new BpClause();
+        bpClause.setEnabledStatus("1");
+        List<BpClause> bpClauses = bpClauseService.findList(bpClause);
+        model.addAttribute("bpClauses", bpClauses);
+        //获取订单发票
+        OrderInvoice orderInvoice = orderInvoiceDao.getWithorderId(newShopOrder.getOrderID().toString());
+        if (null != orderInvoice) {
+            newShopOrder.setOrderInvoice(orderInvoice);
+        }
+        return "modules/order/shopOrderDetail";
+    }
+
     @RequiresPermissions("order:cmPayShop:view")
     @RequestMapping("payOrderList")
     public String payOrderList(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model) {
@@ -91,6 +113,7 @@ public class CmShopOrderController extends BaseController {
 
     /**
      * 申请付第三方
+     *
      * @param newShopOrder
      * @param request
      * @param response
@@ -282,12 +305,12 @@ public class CmShopOrderController extends BaseController {
         List<CmRefundShopRecord> rr = new ArrayList<>();
         List<CmDiscernReceipt> receipts = new ArrayList<>();
         // for (Integer shopOrderID : shopOrderIDs) {
-            List<CmPayShopRecord> payShopRecordList = newShopOrderService.getPayedRecords(shopOrderId.toString());
-            pr.addAll(payShopRecordList);
-            List<CmRefundShopRecord> refundShopRecordList = newShopOrderService.getRefundedRecords(shopOrderId.toString());
-            rr.addAll(refundShopRecordList);
-            List<CmDiscernReceipt> receiptList = newShopOrderService.getDiscernReceipts(shopOrderId);
-            receipts.addAll(receiptList);
+        List<CmPayShopRecord> payShopRecordList = newShopOrderService.getPayedRecords(shopOrderId.toString());
+        pr.addAll(payShopRecordList);
+        List<CmRefundShopRecord> refundShopRecordList = newShopOrderService.getRefundedRecords(shopOrderId.toString());
+        rr.addAll(refundShopRecordList);
+        List<CmDiscernReceipt> receiptList = newShopOrderService.getDiscernReceipts(shopOrderId);
+        receipts.addAll(receiptList);
         // }
         model.addAttribute("pr", pr);
         model.addAttribute("rr", rr);

+ 18 - 27
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -144,40 +144,31 @@ public class NewOrderController extends BaseController {
 
     @RequiresPermissions("order:order:view")
     @RequestMapping("orderList")
-    public String orderList(NewOrder order, HttpServletRequest request, HttpServletResponse response, Model model) {
-        if (null != order.getStartTime() && !"".equals(order.getStartTime()) && !order.getStartTime().endsWith("00:00:00")) {
-            model.addAttribute("startTime", order.getStartTime());
-            order.setStartTime(order.getStartTime().trim() + " 00:00:00");
-        }
-        if (null != order.getEndTime() && !"".equals(order.getEndTime()) && !order.getEndTime().endsWith("23:59:59")) {
-            model.addAttribute("endTime", order.getEndTime());
-            order.setEndTime(order.getEndTime().trim() + " 23:59:59");
+    public String orderList(NewShopOrder newShopOrder, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if (null != newShopOrder.getStartTime() && !"".equals(newShopOrder.getStartTime()) && !newShopOrder.getStartTime().endsWith("00:00:00")) {
+            model.addAttribute("startTime", newShopOrder.getStartTime());
+            newShopOrder.setStartTime(newShopOrder.getStartTime().trim() + " 00:00:00");
         }
-        if (null != order.getStartConfirmTime() && !"".equals(order.getStartConfirmTime()) && !order.getStartConfirmTime().endsWith("00:00:00")) {
-            model.addAttribute("startConfirmTime", order.getStartConfirmTime());
-            order.setStartConfirmTime(order.getStartConfirmTime().trim() + " 00:00:00");
-        }
-        if (null != order.getEndConfirmTime() && !"".equals(order.getEndConfirmTime()) && !order.getEndConfirmTime().endsWith("23:59:59")) {
-            model.addAttribute("endConfirmTime", order.getEndConfirmTime());
-            order.setEndConfirmTime(order.getEndConfirmTime().trim() + " 23:59:59");
+        if (null != newShopOrder.getEndTime() && !"".equals(newShopOrder.getEndTime()) && !newShopOrder.getEndTime().endsWith("23:59:59")) {
+            model.addAttribute("endTime", newShopOrder.getEndTime());
+            newShopOrder.setEndTime(newShopOrder.getEndTime().trim() + " 23:59:59");
         }
-        if (null != order.getStartRefundTime() && !"".equals(order.getStartRefundTime()) && !order.getStartRefundTime().endsWith("00:00:00")) {
-            model.addAttribute("startRefundTime", order.getStartRefundTime());
-            order.setStartRefundTime(order.getStartRefundTime().trim() + " 00:00:00");
+        if (null != newShopOrder.getStartConfirmTime() && !"".equals(newShopOrder.getStartConfirmTime()) && !newShopOrder.getStartConfirmTime().endsWith("00:00:00")) {
+            model.addAttribute("startConfirmTime", newShopOrder.getStartConfirmTime());
+            newShopOrder.setStartConfirmTime(newShopOrder.getStartConfirmTime().trim() + " 00:00:00");
         }
-        if (null != order.getEndRefundTime() && !"".equals(order.getEndRefundTime()) && !order.getEndRefundTime().endsWith("23:59:59")) {
-            model.addAttribute("endRefundTime", order.getEndRefundTime());
-            order.setEndRefundTime(order.getEndRefundTime().trim() + " 23:59:59");
+        if (null != newShopOrder.getEndConfirmTime() && !"".equals(newShopOrder.getEndConfirmTime()) && !newShopOrder.getEndConfirmTime().endsWith("23:59:59")) {
+            model.addAttribute("endConfirmTime", newShopOrder.getEndConfirmTime());
+            newShopOrder.setEndConfirmTime(newShopOrder.getEndConfirmTime().trim() + " 23:59:59");
         }
-        model.addAttribute("orderRefundType", order.getOrderRefundType());
-        if (null != order.getBuyer()) {
-            order.setBuyer(order.getBuyer().trim());
+        if (null != newShopOrder.getBuyer()) {
+            newShopOrder.setBuyer(newShopOrder.getBuyer().trim());
         }
-        if (null != order.getReceiver()) {
-            order.setReceiver(order.getReceiver().trim());
+        if (null != newShopOrder.getReceiver()) {
+            newShopOrder.setReceiver(newShopOrder.getReceiver().trim());
         }
         //查询内部处理了已收,未付统计(包含运费)
-        Page<NewOrder> page = newOrderService.findPage(new Page<>(request, response, 20), order);
+        Page<NewShopOrder> page = newShopOrderService.findShopOrderPage(new Page<>(request, response, 20), newShopOrder);
         //获取组织列表
         List<CmUserOrganize> cmUserOrganizeList = cmUserOrganizeService.findOrganize();
         model.addAttribute("cmUserOrganizeList", cmUserOrganizeList);

+ 149 - 16
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -220,8 +220,14 @@
     <select id="findByShopOrderID" resultType="newShopOrder">
         select
         <include refid="shopOrderColumns"/>
+        ,bou.shouHuoRen as receiver,
+        bou.mobile,
+        bou.name as buyer,
+        co.orderSeen,
+        co.clauseID
         from cm_shop_order a
         left join cm_order co on co.orderID = a.orderID
+        left join bp_order_userinfo bou on bou.orderId = a.orderID
         where a.shopOrderID = #{shopOrderID}
     </select>
 
@@ -285,11 +291,14 @@
         FROM cm_freight_rule cfr
                  LEFT JOIN cm_freight_template cft ON cft.id = cfr.freightId
                  LEFT JOIN product p ON p.freightTemplateId = cft.id
-        WHERE productId = #{productId} and cft.delFlag = 0
+        WHERE productId = #{productId}
+          and cft.delFlag = 0
     </select>
 
     <select id="getShopOrderId" resultType="com.caimei.modules.product.entity.Shop">
-        select shopId, AccountOwnership, bankAccount from shop where shopId = #{shopId}
+        select shopId, AccountOwnership, bankAccount
+        from shop
+        where shopId = #{shopId}
     </select>
 
     <select id="findCommercialCode" resultType="String">
@@ -865,7 +874,7 @@
                 and a.payStatus = 3 and co.status NOT IN (6,7)
             </if>
             and co.delFlag = 0
-            --              and not (co.secondHandOrderFlag=1 AND co.rebateFlag=1)
+            -- and not (co.secondHandOrderFlag=1 AND co.rebateFlag=1)
             and a.delFlag = 0
             and (a.organizeID!=4 or a.organizeID is null)
             and a.shopID != 998
@@ -944,7 +953,7 @@
                 AND a.shopOrderNo like concat('%', #{shopOrderNo} ,'%')
             </if>
             and co.delFlag = 0
-            --              and not (co.secondHandOrderFlag=1 AND co.rebateFlag=1)
+            -- and not (co.secondHandOrderFlag=1 AND co.rebateFlag=1)
             and a.delFlag = 0
             and (a.organizeID!=4 or a.organizeID is null)
             and a.shopID != 998
@@ -961,7 +970,8 @@
         SELECT IFNULL(SUM(cpsr.payAmount), 0)
         FROM cm_pay_shop cps
                  LEFT JOIN cm_pay_shop_record cpsr ON cps.id = cpsr.payShopID
-        WHERE cps.delFlag = 0 AND cpsr.delFlag = 0
+        WHERE cps.delFlag = 0
+          AND cpsr.delFlag = 0
           AND cpsr.shopOrderID = #{shopOrderId}
     </select>
 
@@ -975,15 +985,16 @@
         SELECT IFNULL(SUM(cpsr.payCmAmount), 0)
         FROM cm_pay_shop cps
                  LEFT JOIN cm_pay_shop_record cpsr ON cps.id = cpsr.payShopID
-        WHERE cpsr.delFlag = 0 AND cpsr.shopOrderID = 29478
+        WHERE cpsr.delFlag = 0
+          AND cpsr.shopOrderID = 29478
     </select>
 
     <select id="returnedPurchaseFeeByShopOrderId" resultType="java.lang.Double">
-        SELECT
-            IFNULL(SUM(crp.returnedPurchaseFee), 0)
+        SELECT IFNULL(SUM(crp.returnedPurchaseFee), 0)
         FROM cm_returned_purchase crp
                  LEFT JOIN cm_returned_purchase_product crpp ON crp.id = crpp.returnedID
-        WHERE crp.delFlag = 0 AND crp.status = 2
+        WHERE crp.delFlag = 0
+          AND crp.status = 2
           AND crp.shopOrderId = #{shopOrderId}
     </select>
     <select id="findSplitCount" resultType="java.lang.Integer">
@@ -1277,13 +1288,13 @@
                s.name                     AS shopName,
                c.name                     AS clubName
         FROM cm_shop_order a
-        LEFT JOIN cm_pay_shop_record cpsr ON a.shopOrderID = cpsr.shopOrderID
-        LEFT JOIN bp_order_userinfo bou ON bou.orderId = a.orderID
-        LEFT JOIN cm_order co ON co.orderID = a.orderID
-        LEFT JOIN cm_receipt_order_relation cror ON cror.orderId = co.orderId
-        LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id
-        LEFT JOIN shop s ON s.shopID = a.shopID
-        LEFT JOIN club c ON c.userID = a.userID
+                 LEFT JOIN cm_pay_shop_record cpsr ON a.shopOrderID = cpsr.shopOrderID
+                 LEFT JOIN bp_order_userinfo bou ON bou.orderId = a.orderID
+                 LEFT JOIN cm_order co ON co.orderID = a.orderID
+                 LEFT JOIN cm_receipt_order_relation cror ON cror.orderId = co.orderId
+                 LEFT JOIN cm_discern_receipt cdr ON cror.receiptID = cdr.id
+                 LEFT JOIN shop s ON s.shopID = a.shopID
+                 LEFT JOIN club c ON c.userID = a.userID
         WHERE co.organizeID = 0
           AND a.refundStatus = 1
           AND co.delFlag = 0
@@ -2356,6 +2367,128 @@
         limit 0,1
     </select>
 
+    <select id="getShopOrderlist" resultType="com.caimei.modules.order.entity.NewShopOrder">
+        select cso.shopOrderID,
+        cso.shopOrderNo,
+        cso.orderId,
+        cso.orderNo,
+        cso.organizeID,
+        cso.userID,
+        cso.orderType,
+        bou.shouHuoRen AS receiver,
+        co.orderSource,
+        cso.needPayAmount,
+        cso.orderTime,
+        cso.confirmTime,
+        cso.payStatus,
+        cso.sendOutStatus,
+        cso.receiptStatus,
+        cso.refundStatus,
+        cso.shopStatus,
+        u.name AS buyer,
+        (case when co.orderType = '0' then
+        (select case status when 91 then '采美默认协销经理(官方账号)' else linkMan end from serviceprovider where serviceProviderID
+        = co.spID)
+        else
+        ''
+        end) AS spName,
+        co.rebateFlag,
+        cso.closeTime,
+        (SELECT COUNT(*) FROM cm_returned_purchase
+        WHERE shopOrderId = cso.shopOrderId AND status =1 AND delFLag = 0) AS returnedPurchaseStatus,
+        co.closeReason AS closeReason
+        from cm_shop_order cso
+        left join cm_order co on cso.orderId = co.orderId
+        left join bp_order_userinfo bou on bou.orderId = cso.orderId
+        <if test="productName != null and productName != ''">
+            LEFT JOIN cm_order_product cop ON co.orderID = cop.orderID
+            LEFT JOIN product p ON cop.productID = p.productID
+        </if>
+        LEFT JOIN user u ON u.userID = cso.userID
+        <where>
+            cso.orderType != 2
+            <if test="serviceProviderId != null and serviceProviderId != 0">
+                and cso.orderType = 0
+                and co.spID = #{serviceProviderId}
+            </if>
+            <if test="shopOrderNo != null and shopOrderNo != ''">
+                AND cso.shopOrderNo = #{shopOrderNo}
+            </if>
+            <if test="shopOrderID != null and shopOrderID != ''">
+                AND cso.shopOrderID = #{shopOrderID}
+            </if>
+            <if test="orderNo != null and orderNo != ''">
+                AND cso.orderNo = #{orderNo}
+            </if>
+            <if test="orderID != null and orderID != ''">
+                AND cso.orderID = #{orderID}
+            </if>
+            <if test="buyer != null and buyer != ''">
+                AND u.name LIKE concat('%',#{buyer},'%')
+            </if>
+            <if test="status != null">
+                AND cso.shopStatus = #{status}
+            </if>
+            <if test="productName != null and productName != ''">
+                and p.name like CONCAT('%',#{productName},'%')
+            </if>
+            <if test="receiptStatus != null and receiptStatus != ''">
+                AND cso.receiptStatus = #{receiptStatus}
+            </if>
+            <if test="sendOutStatus != null and sendOutStatus != ''">
+                AND cso.sendOutStatus = #{sendOutStatus}
+            </if>
+            <if test="payStatus != null  and payStatus != ''">
+                AND cso.payStatus = #{payStatus}
+            </if>
+            <if test="refundStatus != null  and refundStatus != ''">
+                AND cso.refundStatus = #{refundStatus}
+            </if>
+            <if test="orderType != null   and orderType != ''">
+                AND cso.orderType = #{orderType}
+            </if>
+            <if test="spID != null  and spID != ''">
+                AND co.spId = #{spID}
+            </if>
+            <if test="rebateFlag != null  and rebateFlag != ''">
+                AND co.rebateFlag = #{rebateFlag}
+            </if>
+            <if test="orderSource != null  and orderSource != ''">
+                AND co.orderSource = #{orderSource}
+            </if>
+            <if test="organizeID != null and organizeID != ''">
+                AND cso.organizeID = #{organizeID}
+            </if>
+            <if test="receiver != null and receiver != ''">
+                AND bou.shouHuoRen LIKE concat('%',#{receiver},'%')
+            </if>
+            <if test="startTime != null and startTime != ''">
+                AND cso.orderTime <![CDATA[  >=  ]]> #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND cso.orderTime <![CDATA[   <=  ]]> #{endTime}
+            </if>
+            <if test="startConfirmTime != null and startConfirmTime != ''">
+                AND cso.confirmTime <![CDATA[  >=  ]]> #{startConfirmTime}
+            </if>
+            <if test="endConfirmTime != null and endConfirmTime != ''">
+                AND cso.confirmTime <![CDATA[   <=  ]]> #{endConfirmTime}
+            </if>
+            <if test="returnedPurchaseStatus != null and returnedPurchaseStatus != ''">
+                AND
+                <if test="returnedPurchaseStatus == 1">
+                    exists
+                </if>
+                <if test="returnedPurchaseStatus == 0">
+                    not exists
+                </if>
+                (select 1 from cm_returned_purchase
+                where status = 1 and shopOrderId = cso.shopOrderId and delFlag= 0)
+            </if>
+        </where>
+        ORDER BY cso.shopOrderID DESC
+    </select>
+
     <insert id="addCmShopOrder" parameterType="com.caimei.modules.order.entity.NewShopOrder" useGeneratedKeys="true"
             keyProperty="shopOrderID">
         insert into cm_shop_order

+ 59 - 43
src/main/webapp/WEB-INF/views/modules/order/newOrderList.jsp

@@ -66,20 +66,12 @@
 <%--    </shiro:hasPermission>--%>
 </ul>
 <sys:message content="${message}"/>
-<form:form id="searchForm" modelAttribute="newOrder" onsubmit="return checkfun()" action="${ctx}/order/orderList"
+<form:form id="searchForm" modelAttribute="newShopOrder" onsubmit="return checkfun()" action="${ctx}/order/orderList"
            method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="ul-form">
         <div class="flex-wrap">
-            <div class="item">
-                <label>订单ID:</label>
-                <form:input path="orderID" id="orderID" htmlEscape="false" maxlength="30" class="input-medium"/>
-            </div>
-            <div class="item">
-                <label>订单号:</label>
-                <form:input path="orderNo" htmlEscape="false" maxlength="30" class="input-medium"/>
-            </div>
             <div class="item">
                 <label>子订单ID:</label>
                 <form:input path="shopOrderID" id="shipOrderID" htmlEscape="false" maxlength="30" class="input-medium"/>
@@ -88,6 +80,14 @@
                 <label>子订单号:</label>
                 <form:input path="shopOrderNo" htmlEscape="false" maxlength="30" class="input-medium"/>
             </div>
+            <div class="item">
+                <label>订单ID:</label>
+                <form:input path="orderID" id="orderID" htmlEscape="false" maxlength="30" class="input-medium"/>
+            </div>
+            <div class="item">
+                <label>订单号:</label>
+                <form:input path="orderNo" htmlEscape="false" maxlength="30" class="input-medium"/>
+            </div>
             <div class="item">
                 <label>机构:</label>
                 <form:input path="buyer" maxlength="20" class="input-medium"/>
@@ -101,10 +101,10 @@
                 <form:input path="productName" class="input-large"/>
             </div>
             <div class="item">
-                <label>订单状态:</label>
+                <label>订单状态:</label>
                 <form:select path="status" class="select-ele input-medium required">
                     <form:option value="" label="所有"/>
-                    <form:options items="${fns:getDictList('order_status')}" itemLabel="label" itemValue="value"
+                    <form:options items="${fns:getDictList('shopStatus')}" itemLabel="label" itemValue="value"
                                   htmlEscape="false"/>
                 </form:select>
             </div>
@@ -135,11 +135,10 @@
 
             <div class="item">
                 <label>退款状态:</label>
-                <form:select path="refundType" class="select-ele input-medium required">
+                <form:select path="refundStatus" class="select-ele input-medium required">
                     <form:option value="" label="所有"/>
-                    <form:option value="0" label="无退款"/>
-                    <form:option value="1" label="部分退款"/>
-                    <form:option value="2" label="已退款"/>
+                    <form:option value="1" label="无退款"/>
+                    <form:option value="3" label="有退款"/>
                 </form:select>
             </div>
             <div class="item">
@@ -176,7 +175,7 @@
             </div>
             <div class="item">
                 <label>返佣订单:</label>
-                <form:select path="rebateOrder" class="select-ele input-medium required">
+                <form:select path="rebateFlag" class="select-ele input-medium required">
                     <form:option value="" label="请选择"/>
                     <form:option value="1" label="是"/>
                     <form:option value="0" label="否"/>
@@ -229,8 +228,8 @@
 <fmt:formatDate value="<%=new Date()%>" var="monthFirst" pattern="yyyy-MM-01"/>
 <div class="data-title">
     <ul>
-        <li style="width: 190px; ">订单ID(订单编号)</li>
         <li style="width: 195px; ">子订单ID(子订单编号)</li>
+        <li style="width: 190px; ">订单ID(订单编号)</li>
         <li>订单类型</li>
         <li>返佣订单</li>
 <%--        <li>二手订单</li>--%>
@@ -238,13 +237,14 @@
         <li>收货人</li>
         <li>订单来源</li>
 <%--        <li>订单状态</li>--%>
+        <li>子订单状态</li>
         <li>收款状态</li>
         <li>付款状态</li>
         <li>发货状态</li>
         <li>退款状态</li>
         <li>待审核退款</li>
-        <li>订单金额</li>
-        <li>返佣服务费</li>
+        <li>订单金额</li>
+<%--        <li>返佣服务费</li>--%>
         <li>下单时间</li>
 <%--        <li>确认时间</li>--%>
         <li>操作</li>
@@ -252,8 +252,8 @@
     <c:forEach items="${page.list}" var="order">
         <%--颜色区分分期不分期订单以及终止订单--%>
         <ul class="spileOrder" data-id="${order.orderNo}">
+            <li style="position: relative"><b style="font-size: 15px;">${order.shopOrderID}</b>(${order.shopOrderNo})</li>
             <li><b style="font-size: 15px;">${order.orderID}</b>(${order.orderNo})</li>
-            <li style="position: relative">${order.shopOrderNoAndId}</li>
             <li>
                 <c:if test="${order.orderType == 1}">
                     自主订单
@@ -267,13 +267,12 @@
                 <c:if test="${order.orderType > 1}">
                     ---
                 </c:if>
-
             </li>
             <li>
-                <c:if test="${order.rebateOrder == '0'}">
+                <c:if test="${order.rebateFlag == 0}">
                 </c:if>
-                <c:if test="${order.rebateOrder ne '0'}">
+                <c:if test="${order.rebateFlag ne 0}">
                 </c:if>
             </li>
@@ -305,6 +304,26 @@
 <%--                </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>--%>
 <%--            </li>--%>
+            <li>
+                <c:if test="${order.shopStatus == 0}">
+                    <font color="red">待确认</font>
+                </c:if>
+                <c:if test="${order.shopStatus == 1}">
+                    <font color="green">已确认</font>
+                </c:if>
+                <c:if test="${order.shopStatus == 2}">
+                    <font color="green">交易完成</font>
+                </c:if>
+                <c:if test="${order.shopStatus == 3}">
+                    <font color="green">订单完成</font>
+                </c:if>
+                <c:if test="${order.shopStatus == 4}">
+                    <font color="red">已关闭</font>
+                </c:if>
+                <c:if test="${order.shopStatus == 5}">
+                    <font color="red">交易全退</font>
+                </c:if>
+            </li>
             <li>
                 <c:if test="${order.receiptStatus == 1}">
                     <font color="red">待收款</font>
@@ -321,7 +340,7 @@
                     <c:if test="${order.receiptOrderFlag}">
                         一款多单:少收抹平金额未知
                     </c:if>
-                    <c:if test="${!order.receiptOrderFlag}">
+                    <c:if test="${!order.receiptOrderFlag}">tui
                         <font>少收抹平:<br>
                             ¥<fmt:formatNumber
                                     value="${order.payableAmount - (empty order.orderReceivedAmount ? 0 : order.orderReceivedAmount)}"
@@ -377,19 +396,16 @@
                 </c:if>
             </li>
             <li>
-                <c:if test="${order.refundType == 1}">
-                      <font>部分退款</font>
+                <c:if test="${order.refundStatus == 1}">
+                      <font>退款</font>
                 </c:if>
-                <c:if test="${order.refundType == 2}">
-                      <font>已退款</font>
-                </c:if>
-                <c:if test="${order.refundType ne 1 and order.refundType ne 2 }">
-                     <font>无退款</font>
+                <c:if test="${order.refundStatus == 3}">
+                      <font>有退款</font>
                 </c:if>
             </li>
             <li>
-                <c:if test="${order.returnedPurchaseStatus == 1}">
-                    <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}">
+                <c:if test="${order.returnedPurchaseStatus > 0}">
+                    <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecord.rpc?shopOrderID=${order.shopOrderID}&orderID=${order.orderID}">
                     </a>
                 </c:if>
@@ -398,16 +414,16 @@
                 </c:if>
             </li>
             <li>                    <%-- 订单金额 --%>
-                <fmt:formatNumber value="${order.payTotalFee}" type="currency"/>
-            </li>
-            <li>                    <%-- 返佣服务费 --%>
-                <c:if test="${not empty order.rebateFee}">
-                <fmt:formatNumber value="${order.rebateFee}" type="currency"/>
-                </c:if>
-                <c:if test="${empty order.rebateFee}">
-                    ---
-                </c:if>
+                <fmt:formatNumber value="${order.needPayAmount}" type="currency"/>
             </li>
+<%--            <li>                    &lt;%&ndash; 返佣服务费 &ndash;%&gt;--%>
+<%--                <c:if test="${not empty order.rebateFee}">--%>
+<%--                <fmt:formatNumber value="${order.rebateFee}" type="currency"/>--%>
+<%--                </c:if>--%>
+<%--                <c:if test="${empty order.rebateFee}">--%>
+<%--                    -----%>
+<%--                </c:if>--%>
+<%--            </li>--%>
             <li>${order.orderTime}</li>
 <%--            <li>--%>
 <%--                <c:if test="${empty order.confirmTime}">--%>
@@ -418,7 +434,7 @@
 <%--                </c:if>--%>
 <%--            </li>--%>
             <li class="operation-wrap">
-                <a href="${ctx}/order/detail?id=${order.orderID}&returnGoodsStutas=${order.returnGoodsStutas}">查看详情</a>
+                <a href="${ctx}/shopOrder/detail?id=${order.shopOrderID}">查看详情</a>
             </li>
         </ul>
     </c:forEach>

+ 1234 - 0
src/main/webapp/WEB-INF/views/modules/order/shopOrderDetail.jsp

@@ -0,0 +1,1234 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<html>
+<head>
+    <title>订单列表</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        * {
+            margin: 0;
+            padding: 0
+        }
+
+        a {
+            list-style: none;
+            text-decoration: none
+        }
+
+        body {
+            background-color: rgb(255, 255, 255)
+        }
+
+        h3 {
+            line-height: 20px;
+            padding: 20px 0 20px 15px;
+            border-bottom: 1px solid #CCCCCC
+        }
+
+        .now-status p {
+            padding: 20px
+        }
+
+        .now-status span {
+            display: inline-block;
+            width: 160px;
+            line-height: 35px;
+            margin-right: 15px;
+            cursor: pointer;
+            border: 1px solid #CCCCCC;
+            text-align: center;
+            border-radius: 5px
+        }
+
+        .buyInfo p {
+            padding: 15px 5px 0
+        }
+
+        .buyInfo p label {
+            width: 60px;
+            display: inline-block
+        }
+
+        .buyInfo p span {
+            padding-left: 10px
+        }
+
+        .table th {
+            background-color: #CCCCCC
+        }
+
+        .table th, .table td {
+            font-weight: normal;
+            border: 1px solid #CCCCCC;
+            height: 35px;
+            text-align: center
+        }
+
+        .table td .div-img {
+            box-sizing: border-box
+        }
+
+        .table td .div-img img {
+            width: 100px;
+            height: 100px;
+            vertical-align: middle
+        }
+
+        .table td .div-img span {
+        }
+
+        .div-order span {
+            width: 260px;
+            display: inline-block;
+            margin-right: 50px
+        }
+
+        .text-result p {
+            padding-top: 15px
+        }
+
+        .text-cost p {
+            padding: 20px 0
+        }
+
+        .moeny-cost p {
+            padding: 10px 0 0 0;
+            text-align: left
+        }
+
+        .moeny-cost p label {
+            display: inline-block
+        }
+
+        .Staging table {
+            width: 100%;
+            border-collapse: collapse;
+            margin-top: 20px
+        }
+
+        .Staging table th, .Staging table td {
+            font-weight: normal;
+            border: 1px solid #000;
+            height: 35px;
+            text-align: center;
+            width: 10%
+        }
+
+        .change-info {
+            position: fixed;
+            top: 0%;
+            left: 50%;
+            transform: translateX(-50%);
+            z-index: 999;
+            width: 800px;
+            background-color: #fff;
+            box-shadow: 0px 0px 15px #ccc
+        }
+
+        .item-div label {
+            width: 260px;
+            text-align: right;
+            display: inline-block;
+            margin-right: 50px
+        }
+
+        .item-div input {
+            width: 300px;
+            line-height: 35px;
+            height: 35px;
+            box-sizing: border-box;
+            border: 1px solid #CCCCCC;
+            display: inline-block
+        }
+
+        .item-div select {
+            width: 90px;
+            height: 35px;
+            margin-right: 10px
+        }
+
+        .item-div textarea {
+            border: 1px solid #CCCCCC;
+            margin-top: 20px;
+            width: 300px;
+            height: 80px;
+            resize: none;
+            display: block
+        }
+
+        .layer-status span {
+            display: inline-block;
+            width: 80px;
+            line-height: 35px;
+            background-color: #00A6C7;
+            text-align: center;
+            color: #fff;
+            cursor: pointer
+        }
+
+        .layer-status span:nth-of-type(1) {
+        }
+
+        .layer-status span:nth-of-type(2) {
+            margin-left: 72px
+        }
+
+        .same-style {
+            position: fixed;
+            top: 20%;
+            left: 50%;
+            transform: translateX(-50%);
+            width: 500px;
+            background-color: #fff;
+            z-index: 999;
+            box-shadow: 0 0 15px #666
+        }
+
+        .reason-cancel label {
+            margin-right: 20px
+        }
+
+        .reason-cancel textarea {
+            width: 270px;
+            height: 80px;
+            resize: none;
+            vertical-align: text-top;
+            border: 1px solid #CCCCCC
+        }
+
+        .order-details-heading {
+            background: #eee
+        }
+
+        .order-details-heading td {
+            white-space: nowrap;
+            padding: 0 10px
+        }
+
+        .order-rows, .order-details-heading {
+            width: 100%;
+            border-bottom: 1px solid #ccc;
+            border-left: 1px solid #ccc;
+            border-right: 1px solid #ccc;
+            color: #666;
+            padding: 10px;
+            line-height: 30px
+        }
+
+        .order-details-heading {
+            border-top: 1px solid #ccc
+        }
+
+        .order-details-heading span, .order-rows span {
+            margin-right: 80px
+        }
+
+        .order-details-heading span {
+            width: 230px;
+            margin-right: 0px;
+            display: inline-block
+        }
+
+        .order-details-heading span label, .order-rows span label {
+            font-weight: bold
+        }
+
+        .order-rows .supplier-img {
+            width: 100px
+        }
+
+        .operation-wrapper {
+            position: relative
+        }
+
+        .operation-btn {
+            cursor: pointer
+        }
+
+        .operation-block {
+            background: #fff;
+            width: 125px;
+            position: absolute;
+            left: 826px;
+            top: 5px;
+            padding: 10px;
+            border: 1px solid #666;
+            -webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px;
+            z-index: 100001;
+            display: none
+        }
+
+        .operation-block a {
+            display: block;
+            padding: 3px 0
+        }
+
+        .print-wrapper {
+            display: inline-block
+        }
+
+        .supplier-product-name, .supplier-product-alias {
+            width: 200px;
+            line-height: 20px
+        }
+
+        .supplier-product-info {
+            width: 55%;
+            display: inline-block;
+            position: relative;
+            top: 50%;
+            transform: translateY(30%)
+        }
+
+        .supplier-product-promotionInfo {
+            width: 20%;
+            display: inline-block;
+            position: relative;
+            top: 50%;
+            transform: translateY(30%)
+        }
+
+        .supplier-product-item {
+            margin-bottom: 10px
+        }
+
+        .supplier-product-alias {
+            display: inline-block;
+            margin-top: 5px
+        }
+
+        .supplier-name {
+            display: inline-block;
+            vertical-align: middle;
+            margin: 0 10px
+        }
+
+        #auditBox {
+            padding: 20px;
+            line-height: 30px
+        }
+
+        #auditBox p {
+            font-size: 16px;
+            margin: 0 0 0 0
+        }
+
+        #auditBox .note-div {
+            font-size: 16px
+        }
+
+        .downSpan {
+            display: block;
+            margin-left: 5px;
+            margin-bottom: -8px
+        }
+
+        .upSpan {
+            display: block;
+            margin-left: 5px;
+            margin-top: -8px
+        }
+
+        .promotionsName {
+            margin: 2px
+        }
+
+        .ladderPrice > span {
+            text-decoration: underline;
+            color: red
+        }
+
+        .ladderPrice .list {
+            display: none;
+            position: absolute;
+            z-index: 999;
+            background: #FFF;
+            white-space: nowrap;
+            border: 1px solid #EEE;
+            padding: 10px 0;
+            color: #333
+        }
+
+        .ladderPrice:hover .list {
+            display: block
+        }
+
+        .ladderPrice .list span {
+            margin: 0 20px;
+            width: 60px;
+            text-align: center;
+            display: inline-block
+        }
+
+        .ladderPrice .list span.price {
+            color: red
+        }
+
+        .weishaIcon {
+            background: darkorange;
+            color: white;
+            margin: 0 0px;
+            padding: 0 3px;
+            font-style: normal;
+            font-size: 12px;
+            display: inline-block;
+            border-radius: 2px
+        }
+
+        .acticer_span {
+            display: inline-block;
+            width: 14px;
+            height: 14px;
+            border-radius: 50%;
+            box-sizing: border-box;
+            border: 1px solid #999999;
+            text-align: center;
+            color: #333333;
+            font-size: 12px;
+            line-height: 14px;
+            float: none;
+            margin-left: 3px;
+        }
+    </style>
+    <script type="text/javascript" src="${ctxStatic}/QRCode/jquery.qrcode.min.js"></script>
+    <script type="text/javascript" src="static/common/clipboard.min.js"></script>
+</head>
+<body>
+<ul class="nav nav-tabs">
+
+    <li class="active"><a href="${ctx}/shopOrder/detail?id=${order.shopOrderID}">订单详情</a></li>
+    <shiro:hasPermission name="order:order:view">
+        <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    </shiro:hasPermission>
+    <shiro:hasPermission name="order:order:secondhandOrder">
+        <li><a href="${ctx}/order/secondhandOrderList">二手订单列表</a></li>
+    </shiro:hasPermission>
+</ul>
+<sys:message content="${message}"/>
+<table class="order-details-heading">
+    <tr>
+        <td>下单时间: ${order.orderTime}</td>
+        <td>子订单ID(子订单编号): <b style="font-size: 15px;">${order.shopOrderID}</b>(${order.shopOrderNo})</td>
+        <td>订单ID(订单编号): <b style="font-size: 15px;">${order.orderID}</b>(${order.orderNo})</td>
+    </tr>
+
+    <tr>
+        <td>订单类型: <c:if test="${order.orderType == 1}">自主订单</c:if><c:if test="${order.orderType == 0}">协销订单</c:if></td>
+        <td>订单来源: ${fns:getDictLabel(order.orderSource,"bp_orderSource","" )}</td>
+        <td>返佣订单: ${(order.rebateOrder ne '0' || order.rebateFlag eq '1')?'是':'否'}</td>
+    </tr>
+
+    <tr>
+        <td>机构:${order.buyer}
+            <font id="svipFlagLabel" style="margin-left:0px" color="red">
+                <%--                <c:if test="${order.bpOrderUserinfo.firstClubType eq 1 and order.bpOrderUserinfo.svipFlag eq 1}">--%>
+                <%--                    (医美机构,超级会员)--%>
+                <%--                </c:if>--%>
+                <%--                <c:if test="${order.bpOrderUserinfo.firstClubType eq 1 and order.bpOrderUserinfo.svipFlag eq null}">--%>
+                <%--                    ${order.bpOrderUserinfo.firstClubType eq 1?'(医美机构)':''}--%>
+                <%--                </c:if>--%>
+                <%--                <c:if test="${order.bpOrderUserinfo.firstClubType eq null and order.bpOrderUserinfo.svipFlag eq 1}">--%>
+                <%--                    ${order.bpOrderUserinfo.svipFlag eq 1?'(超级会员)':''}--%>
+                <%--                </c:if>--%>
+                <c:if test="${order.organizeID == 4}">(联合丽格)</c:if>
+            </font>
+        </td>
+        <td>收货人: ${order.receiver}</td>
+        <td>手机: ${order.mobile}</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.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>付款状态:
+            <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>
+    </tr>
+
+    <tr>
+        <td>
+            退款状态:
+            <c:if test="${order.refundStatus == 1}">
+                <font>无退款</font>
+            </c:if>
+            <c:if test="${order.refundStatus == 3}">
+                <font>有退款</font>
+            </c:if>
+        </td>
+        <td>机构:${order.buyer}
+            <font id="svipFlagLabel" style="margin-left:0px" color="red">
+                <%--                <c:if test="${order.bpOrderUserinfo.firstClubType eq 1 and order.bpOrderUserinfo.svipFlag eq 1}">--%>
+                <%--                    (医美机构,超级会员)--%>
+                <%--                </c:if>--%>
+                <%--                <c:if test="${order.bpOrderUserinfo.firstClubType eq 1 and order.bpOrderUserinfo.svipFlag eq null}">--%>
+                <%--                    ${order.bpOrderUserinfo.firstClubType eq 1?'(医美机构)':''}--%>
+                <%--                </c:if>--%>
+                <%--                <c:if test="${order.bpOrderUserinfo.firstClubType eq null and order.bpOrderUserinfo.svipFlag eq 1}">--%>
+                <%--                    ${order.bpOrderUserinfo.svipFlag eq 1?'(超级会员)':''}--%>
+                <%--                </c:if>--%>
+                <c:if test="${order.organizeID == 4}">(联合丽格)</c:if>
+            </font>
+        </td>
+    </tr>
+
+    <tr>
+        <td>
+            <%--            地址: ${fns:appendLast(fns:appendLast1(order.bpOrderUserinfo.province,order.bpOrderUserinfo.city,order.bpOrderUserinfo.town), order.bpOrderUserinfo.address)}--%>
+        </td>
+        <td>订单可见度:</td>
+        <td style="position: relative;"><a class="operation-btn btn"
+                                           onclick="operation(${order.shopOrderID})">功能</a>
+            <div style="position: relative;">
+                <div class="operation-block ${order.shopOrderID}">
+                    <shiro:hasPermission name="order:order:edit">
+                        <%--包含订单充值商品就不显示--%>
+                        <c:if test="${order.status == 0}">
+                            <a href="${ctx}/order/confirmOrder?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}"
+                               onclick="return confirmx('是否确认订单?', this.href)">确认订单</a>
+                        </c:if>
+                    </shiro:hasPermission>
+
+
+                    <shiro:hasPermission name="order:order:edit">
+                        <%--包含订单充值商品就不显示--%>
+                        <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}">发货记录</a>
+                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}&from=2">收付款记录</a>
+                        <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRecturnRecordByOrderID.rpc?orderID=${order.orderID}&shopOrderID=${order.shopOrderID}">退款(退货)记录</a>
+                        <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=2&shopOrderID=${order.shopOrderID}">订单备注</a>
+                    </shiro:hasPermission>
+                </div>
+            </div>
+        </td>
+        <fmt:setLocale value="zh_CN" scope="session"/>
+    </tr>
+
+</table>
+<textarea id="copyValue" style="display: none"></textarea>
+
+<div class="order-rows">
+    <tr>
+        <span><label>子订单状态:</label>${fns:getDictLabel(order.status,"shopStatus","" )}</span>
+
+        <span>运费:${order.postageInfo}</span>
+
+        <span>子订单总额:<fmt:formatNumber value="${order.totalAmount}" type="currency"/></span>
+
+        <span>应收金额:
+            <c:if test="${order.realPay!=null}"><fmt:formatNumber value="${order.realPay}"
+                                                                  type="currency"/></c:if>
+            <c:if test="${order.realPay==null}"><fmt:formatNumber value="${order.needPayAmount}"
+                                                                  type="currency"/></c:if>
+        </span>
+
+        <span>
+                已收金额:<fmt:formatNumber value="${order.receiptAmount}" type="currency"/>
+                <c:if test="${order.useBalanceFlag eq 1 and order.accountAmount ne null}">(余额抵扣¥${order.accountAmount})</c:if>
+        </span>
+    </tr>
+
+    <tr>
+        <span>商品总额:<fmt:formatNumber value="${order.productAmount}" type="currency"/></span>
+        <span>
+                收款状态:
+                            <c:if test="${order.shopReceiptStatus == 1}">
+                                <font color="red">待收款</font>
+                            </c:if>
+                            <c:if test="${order.shopReceiptStatus == 2}">
+                                <font color="#ff8c00">部分收款</font>
+                            </c:if>
+                            <c:if test="${order.shopReceiptStatus == 3}">
+                                <font color="green">已收款</font>
+                            </c:if>
+                            <%--抹平明细--%>
+                            <c:if test="${order.confirmType eq 1}">
+                                <c:if test="${order.receiptOrderFlag}">
+                                    <font color="red">(一款多单:少收抹平金额未知)</font>
+                                </c:if>
+                                <c:if test="${!order.receiptOrderFlag}">
+                                    <font color="red">(少收抹平:
+                                        ¥<fmt:formatNumber
+                                                value="${order.needPayAmount - (empty order.orderReceivedAmount ? 0 : order.orderReceivedAmount)}"
+                                                pattern="#0.00"/>)
+                                    </font>
+                                </c:if>
+                            </c:if>
+                            <c:if test="${order.confirmType eq 2}">
+                                <c:if test="${order.receiptOrderFlag}">
+                                    <font color="red">(一款多单:多收抹平金额未知)</font>
+                                </c:if>
+                                <c:if test="${!order.receiptOrderFlag}">
+                                    <font color="red">(多收抹平:
+                                        ¥<fmt:formatNumber
+                                                value="${(empty order.receiptAmount ? 0 : order.orderReceivedAmount) - order.payableAmount}"
+                                                pattern="#0.00"/>)
+                                    </font>
+                                </c:if>
+                            </c:if>
+                            <c:if test="${order.confirmType eq 3}">
+                                <c:if test="${order.receiptOrderFlag}">
+                                    <font color="red">(一款多单:多收退余额)</font>
+                                </c:if>
+                                <c:if test="${!order.receiptOrderFlag}">
+                                    <font color="red">(多收退余额&nbsp;&nbsp;${order.associationType eq 2 ? "(自动)" : ""}:
+                                        ¥<fmt:formatNumber
+                                                value="${(empty order.returnBalanceAmount ? 0 : order.returnBalanceAmount)}"
+                                                pattern="#0.00"/>)
+                                    </font>
+                                </c:if>
+                            </c:if>
+        </span>
+
+        <span>发货状态:
+                            <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>
+        </span>
+        <span>付款状态:
+                            <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>
+        </span>
+        <span>退款状态:
+                                <c:if test="${order.refundStatus == 1}">
+                                    <font>无退款</font>
+                                </c:if>
+                                <c:if test="${order.refundStatus == 3}">
+                                    <font>已退款</font>
+                                </c:if>
+        </span>
+    </tr>
+
+    <tr>
+        <span>待收金额:<fmt:formatNumber value="${order.restAmount}" type="currency"/></span>
+    </tr>
+</div>
+<div class="order-rows">
+    <span><label>供应商:</label>${order.shopName}</span>
+    <c:if test="${order.contactName ne null}">
+        <span><label>供应商联系人:</label>${order.contactName}</span>
+    </c:if>
+    <c:if test="${order.dockingPeopleName ne null}">
+        <span><label>采美对接人:</label>${order.dockingPeopleName}</span>
+    </c:if>
+    <c:if test="${order.shopPromotion ne null && order.shopPromotion.type eq 3}">
+        <c:if test="${order.shopPromotion.mode eq 2}">
+                <span><label
+                        style="background-color: #F60;color: white">${order.shopPromotion.name}</label> 满<fmt:formatNumber
+                        value="${order.shopPromotion.touchPrice}" pattern="#,##0.00"
+                        maxFractionDigits="2"/>,减<fmt:formatNumber value="${order.shopPromotion.reducedPrice}"
+                                                                   pattern="#,##0.00" maxFractionDigits="2"/></span>
+        </c:if>
+        <c:if test="${order.shopPromotion.mode eq 3}">
+                <span><label
+                        style="background-color: purple;color: white">${order.shopPromotion.name}</label> 满<fmt:formatNumber
+                        value="${order.shopPromotion.touchPrice}" pattern="#,##0.00"
+                        maxFractionDigits="2"/>,赠送商品</span>
+        </c:if>
+    </c:if>
+    <div>
+        <c:forEach items="${order.newOrderProducts}" var="op" varStatus="varIndex">
+        <c class="supplier-product-item" style="z-index:${100000 - varIndex.index};position:relative;">
+                <%--二手订单详情--%>
+            <c:if test="${order.secondHandOrderFlag eq 1}">
+            <a href="${fns:getConfig('wwwServer')}flea-market-${op.productID}.html" target="_blank">
+                <img class="supplier-img" src="${op.image}" style="width: 100px"/>
+            </a>
+            </c:if>
+                <%--正常订单详情--%>
+            <c:if test="${order.secondHandOrderFlag ne 1}">
+            <a href="${fns:getConfig('wwwServer')}product-${op.productID}.html" target="_blank">
+                <img class="supplier-img" src="${op.image}" style="width: 100px"/>
+            </a>
+            </c:if>
+            <c:if test="${order.organizeID != 4}">
+            <div class="supplier-name">
+                <c:if test="${op.name eq op.aliasName || op.productID eq 6060}">
+                    <div class="supplier-product-name">${op.name}</div>
+                </c:if>
+                <c:if test="${op.name ne op.aliasName && op.productID ne 6060}">
+                    <div class="supplier-product-name">${op.name}</div>
+                    <div class="supplier-product-alias">${op.aliasName}</div>
+                </c:if>
+                <c:if test="${op.productType eq 1}">
+                    <div class="supplier-product-name"><label style="color: red">协商赠品</label></div>
+                </c:if>
+                <c:if test="${op.productType eq 2}">
+                    <div class="supplier-product-name"><label style="color: red">促销赠品</label></div>
+                </c:if>
+                <c:if test="${op.includedTax eq 1}">
+                    <div class="supplier-product-name"><label style="color: red">(含税)</label></div>
+                </c:if>
+                <c:if test="${op.includedTax ne '' and op.includedTax eq 0}">
+                    <c:if test="${op.invoiceType eq 3 }">
+                        <div class="supplier-product-name"><label style="color: red">(不含税-不能开票)</label></div>
+                    </c:if>
+                    <c:if test="${op.invoiceType eq 2 or op.invoiceType eq 1}">
+                        <div class="supplier-product-name"><label style="color: red">(不含税-能开票)</label></div>
+                    </c:if>
+                </c:if>
+                <c:if test="${op.machineType eq 3}">
+                    <div class="supplier-product-name"><font style="font-size: 16px" color="red">械字号三类</font></div>
+                </c:if>
+            </div>
+            </c:if>
+            <c:if test="${op.productID ne 999}">
+            <div class="supplier-product-info">
+                            <span>
+                                规格:
+                                <label>${op.unit}</label>
+                            </span>
+                <span>单价:
+                                <c:if test="${op.svipPriceFlag eq 1 or op.productPromotion.mode eq 1}">
+                                    <label style="text-decoration: line-through"><fmt:formatNumber value="${op.price}"
+                                                                                                   type="currency"/></label>
+                                </c:if>
+                                <c:if test="${op.svipPriceFlag ne 1 and op.productPromotion.mode ne 1}">
+                                    <fmt:formatNumber value="${op.price}" type="currency"/>
+                                </c:if>
+                                <c:if test="${op.svipPriceFlag eq 1}">
+                                    <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>
+                    </a>
+                </c:if>
+                </span>
+                <span>数量:  x${op.num}</span>
+
+                <br>
+                <c:if test="${order.organizeID != 4}">
+                    <span>税率:  ${(op.includedTax != '' and op.includedTax eq 0 and op.invoiceType eq 3)?'---': op.taxRate ne null?op.taxRate:0.0}%</span>
+                    <span>税费: ${(op.includedTax eq 1 or (op.includedTax != '' and op.includedTax eq 0 and op.invoiceType eq 3))?'---': empty op.totalAddedValueTax ?0.00:(op.totalAddedValueTax)}</span>
+                </c:if>
+                <span>总额:  <fmt:formatNumber value="${op.totalFee}" type="currency"/></span>
+                <c:if test="${order.sendOutStatus == 2 || order.sendOutStatus == 3}">
+                    <span>已发/已收  ${(op.num == null ? 0 : op.num)+ (op.presentNum == null ? 0 : op.presentNum)- (op.notOutStore == null ? 0 : op.notOutStore)}/${op.receivedNum}</span>
+                </c:if>
+                <c:if test="${fns:hasReturn(order.status)}">
+                    <span>退款(退货)中/已完成  ${op.returningNum}/${op.returnedNum}</span>
+                </c:if>
+            </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}">
+                                                    <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}">
+                                                    <span class="upSpan"> 满<fmt:formatNumber
+                                                            value="${op.productPromotion.touchPrice}" pattern="#,##0.00"
+                                                            maxFractionDigits="2"/>,赠送商品</span>
+                            </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.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>
+            <c:if test="${op.productID eq 999}">
+            <span>数量:  x${op.num}</span>
+            </c:if>
+            <br>
+            </c:forEach>
+    </div>
+</div>
+<%--组织订单暂时不显示发票和条款信息--%>
+<%--<c:if test="${order.organizeID == 0}">--%>
+<c:if test="${order.organizeID != 4}">
+    <div class="order-rows">
+        <label>订单对机构是否可见:</label>
+                    <c:if test="${order.orderSeen eq 1}">
+                        <label>可见</label>
+                    </c:if>
+                    <c:if test="${order.orderSeen eq 2}">
+                        <label>不可见</label>
+                    </c:if>
+                    <c:if test="${order.orderSeen ne 1 and order.orderSeen ne 2}">
+                        <label>未定义</label>
+                    </c:if>
+    </div>
+</c:if>
+<div class="order-rows">
+    <label>发票信息:</label>
+        <c:if test="${order.orderInvoice.type eq 0}">
+            <%--            <input name="invoice" type="radio" checked="checked">--%>
+            <label>不需要发票</label>
+        </c:if>
+        <c:if test="${order.orderInvoice.type eq 1}">
+            <%--            <input name="invoice" type="radio" checked="checked">--%>
+            <label>增值税普通发票</label>
+        </c:if>
+        <c:if test="${order.orderInvoice.type eq 2}">
+            <%--            <input name="invoice" type="radio" checked="checked">--%>
+            <label>增值税专用发票</label>
+        </c:if>
+        <c:if test="${order.orderInvoice.type eq null}">
+            <%--            <input name="invoice" type="radio" checked="checked">--%>
+            <label>不需要发票</label>
+        </c:if>
+        <c:if test="${order.orderInvoice.type == 1}">
+            <br>
+            <div>
+                    <span>
+                        <c:if test="${order.orderInvoice.invoiceTitleType eq 0}">
+                            个人抬头:
+                            <span>${order.orderInvoice.invoiceTitle}</span>
+                        </c:if>
+                        <c:if test="${order.orderInvoice.invoiceTitleType eq 1}">
+                            企业抬头:
+                            <span>${order.orderInvoice.invoiceTitle}</span>
+                            &nbsp;&nbsp;&nbsp;&nbsp;
+                            纳税人识别号:
+                            <span>${order.orderInvoice.corporationTaxNum}</span>
+                        </c:if>
+                    </span>
+            </div>
+        </c:if>
+        <c:if test="${order.orderInvoice.type == 2}">
+            <table>
+                <tr>
+                    <td><span>单位名称:${order.orderInvoice.invoiceTitle}</span></td>
+                    <td><span>纳税人识别号:${order.orderInvoice.corporationTaxNum}</span></td>
+                    <td><span>注册地址:${order.orderInvoice.registeredAddress}</span></td>
+                </tr>
+                <tr>
+                    <td><span>注册电话:${order.orderInvoice.registeredPhone}</span></td>
+                    <td><span>开户银行:${order.orderInvoice.openBank}</span></td>
+                    <td><span>银行账号:${order.orderInvoice.bankAccountNo}</span></td>
+                </tr>
+            </table>
+        </c:if>
+</div>
+<c:if test="${order.organizeID != 4}">
+    <div class="order-rows">
+        <label>售后条款:</label>
+                    <c:forEach items="${bpClauses}" var="items" varStatus="index">
+                        <c:if test="${items.clauseType ne 0  }">
+                            <span>
+                                <input id="clauseId${index.index+1}" class="clauseId" name="clauseID" type="radio"
+                                       value="${items.id}"${(order.clauseID)==(items.id)?'checked="checked"':''}
+                                       class="required" class="clauseId" disabled="disabled">
+                                <input type="hidden" class="clauseContent" id="clauseContent${index.index+1}"
+                                       value="${fns:escapeHtml(items.content)}">
+                                <input type="hidden" class="clauseName" id="clauseName${index.index+1}" value="${items.name}">
+                                <a href="javascript:void(0);"
+                                   onclick="openClauseInfo(${index.index+1});"><label>${items.name}</label></a>
+                            </span>
+                        </c:if>
+                    </c:forEach>
+    </div>
+</c:if>
+<script type="text/javascript">
+    (function () {
+
+        $('.clauseId').each(function () {
+            var self = $(this);
+            if (!self.prop("checked")) {
+                self.parent().hide();
+            } else {
+                self.hide();
+            }
+        });
+
+        $('#invoice1, #invoice2, #invoice3').each(function () {
+            var self = $(this);
+            if (!self.prop("checked")) {
+                self.next().remove();
+                self.remove();
+            } else {
+                self.remove();
+            }
+        })
+    })();
+
+    function operation(shopOrderID) {
+        var operationBlok = $('.' + shopOrderID)
+        if (operationBlok.css('display') == 'none') {
+            $('.operation-block').hide()
+            operationBlok.show()
+        } else {
+            operationBlok.hide()
+        }
+    }
+
+    function openClauseInfo(index) {
+        var content = $("#clauseContent" + index).val();
+        if (content == '') {
+            return false;
+        }
+        $.jBox(content, {
+            title: $("#clauseName" + index).val(),
+            width: $(top.document).width() - 440,
+            height: $(top.document).height() - 240,
+            buttons: {'关闭': true}
+        });
+    }
+
+    //编辑经理折扣
+    function modelShow(orderID) {
+        top.$.jBox("iframe:${ctx}/order/DiscountFee?orderID=" + orderID, {
+            iframeScrolling: 'yes',
+            top: 150,
+            width: 480,
+            height: 250,
+            persistent: true,
+            title: "编辑经理折扣",
+            buttons: {"确认": '1', "取消": '-1'},
+            submit: function (v, h, f) {
+                //确定
+                var $jboxFrame = top.$('#jbox-iframe');
+                var $mainFrame = top.$('#mainFrame');
+                if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+                    var rechargeInfo = $jboxFrame[0].contentWindow.submit();
+                    var split = rechargeInfo.split(",");
+                    var payTotalFee = split[0];
+                    var discountFee = split[1];
+                    //取值,然后调用后台接口传入参数,最后刷新页面
+                    if (payTotalFee <= 0) {
+                        return false;
+                    }
+                    $.post("${ctx}/order/saveDiscountFee", {
+                        'discountFee': discountFee,
+                        'orderID': orderID,
+                        'payTotalFee': payTotalFee
+                    }, function (data) {
+                        if (true == data.success) {
+                            refresh(data.msg);
+                        } else {
+                            alertx(data.msg, 1000);
+                        }
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
+                }
+                return true;
+            }, closed: function () {/* 窗口关闭后执行的函数 */
+            }
+        });
+    }
+
+    function rebateFeeEdit(orderID) {
+        top.$.jBox("iframe:${ctx}/order/RebateFee?orderID=" + orderID, {
+            iframeScrolling: 'yes',
+            top: 150,
+            width: 480,
+            height: 250,
+            persistent: true,
+            title: "编辑返佣服务费",
+            buttons: {"确认": '1', "取消": '-1'},
+            submit: function (v, h, f) {
+                //确定
+                var $jboxFrame = top.$('#jbox-iframe');
+                var $mainFrame = top.$('#mainFrame');
+                if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+                    var rebateFee = $jboxFrame[0].contentWindow.submit();
+                    if (!rebateFee) {
+                        return false;
+                    }
+                    $.post("${ctx}/order/saveRebateFee", {
+                        'rebateFee': rebateFee,
+                        'orderID': orderID
+                    }, function (data) {
+                        if (true == data.success) {
+                            refresh(data.msg);
+                        } else {
+                            alertx(data.msg, 1000);
+                        }
+                    }, "JSON");//这里返回的类型有:json,html,xml,text
+                }
+                return true;
+            }, closed: function () {/* 窗口关闭后执行的函数 */
+            }
+        });
+    }
+
+    //订单商品备注
+    function remarks(orderID, shopOrderID) {
+        top.$.jBox("iframe:${ctx}/order/cmOrderRemark/remarksView?orderID=" + orderID + "&shopOrderID=" + shopOrderID, {
+            iframeScrolling: 'yes',
+            top: 150,
+            width: 400,
+            height: 480,
+            persistent: true,
+            title: "订单备注信息",
+            buttons: {"确认": '1', "关闭": '-1'},
+            submit: function (v, h, f) {
+                //确定
+                var $jboxFrame = top.$('#jbox-iframe');
+                var $mainFrame = top.$('#mainFrame');
+                if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+                    var remarks = $jboxFrame[0].contentWindow.submit();
+                    if ('' == remarks) {
+                        alertx("备注信息不能为空!!!")
+                        return false;
+                    }
+                    saveRemarks(remarks, orderID, shopOrderID);
+                    return true;
+                }
+                return true;
+            },
+            loaded: function (h) {   //隐藏滚动条
+                $(".jbox-content", top.document).css("overflow-y", "hidden");
+            }
+        });
+    }
+
+    function saveRemarks(remarks, orderID, shopOrderID) {
+        $.post("${ctx}/order/cmOrderRemark/addRemarks", {
+            "remarks": remarks, "orderID": orderID, "shopOrderID": shopOrderID
+        }, function (data) {
+            if (true == data.success) {
+                refresh(data.msg);
+            } else {
+                $.jBox.tip(data.msg, 'error');
+            }
+        }, "JSON");//这里返回的类型有:json,html,xml,text
+    }
+
+    // 二维码分享
+    function QRCodewin(orderId, orderNo) {
+        var html = '<div style="padding:10px;">订单号:' + orderNo + '' +
+            '<div class="code" style="text-align: center;"></div>' +
+            '</div>';
+        $.jBox(html, {
+            title: "订单二维码分享",
+            width: $(top.document).width() - 1700,
+            height: $(top.document).height() - 1600,
+            buttons: {'关闭': true}
+        });
+
+        var enCodeRedirectUrl;
+        var redirectUrl = '${fns:getConfig('caimei.crm.server')}oauth.action?orderId=' + orderId;
+        $.ajax({
+            url: "${ctx}/bulkpurchase/contractOrder/enCode",
+            data: {"redirectUrl": redirectUrl},
+            type: "POST",
+            async: false,
+            success: function (data) {
+                enCodeRedirectUrl = data.enCodeRedirectUrl;
+            }
+        });
+        var shareUrl = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=${fns:getConfig('weixin.appId')}&redirect_uri=' + enCodeRedirectUrl + '&response_type=code&scope=snsapi_base&state=bulkpurchase#wechat_redirect';
+        $('.code').qrcode({
+            width: 150,
+            height: 150,
+            text: shareUrl
+        });
+    }
+
+    //刷新页面
+    function refresh(msg) {
+        $.jBox.tip(msg, 'info', {timeout: 1000});
+        setTimeout(function () {
+            window.location.href = "${ctx}/order/detail?id=${order.orderID}"
+        }, 1000)
+    }
+</script>
+<script>
+    if ("${time}" != "") {
+        window.onload = clock;
+
+        function clock() {
+            var today = new Date(),//当前时间
+                h = today.getHours(),
+                m = today.getMinutes(),
+                s = today.getSeconds();
+            var stopTime = new Date("${time}"),//结束时间
+                stopH = stopTime.getHours(),
+                stopM = stopTime.getMinutes(),
+                stopS = stopTime.getSeconds();
+            var shenyu = stopTime.getTime() - today.getTime(),//倒计时毫秒数
+                shengyuD = parseInt(shenyu / (60 * 60 * 24 * 1000)),//转换为天
+                D = parseInt(shenyu) - parseInt(shengyuD * 60 * 60 * 24 * 1000),//除去天的毫秒数
+                shengyuH = parseInt(D / (60 * 60 * 1000)),//除去天的毫秒数转换成小时
+                H = D - shengyuH * 60 * 60 * 1000,//除去天、小时的毫秒数
+                shengyuM = parseInt(H / (60 * 1000)),//除去天的毫秒数转换成分钟
+                M = H - shengyuM * 60 * 1000;//除去天、小时、分的毫秒数
+            S = parseInt((shenyu - shengyuD * 60 * 60 * 24 * 1000 - shengyuH * 60 * 60 * 1000 - shengyuM * 60 * 1000) / 1000)//除去天、小时、分的毫秒数转化为秒
+            document.getElementById("time").innerHTML = ("(剩余" + shengyuD + "天" + shengyuH + "小时" + shengyuM + "分" + S + "秒)" + "<br>");
+            setTimeout(clock, 500);
+        }
+    }
+
+    function copyText(shopOrderID) {
+        $.post("${ctx}/order/shopOrderLink", {'shopOrderId': shopOrderID}, function (data) {
+            if (data.success) {
+                var imageSrc = "data:image/jpeg|png|gif;base64," + data.imageBuffer;
+                top.$.jBox.info('<img  width="150px" height="150px" style="margin-left: 65px;" src=' + imageSrc + '>', '小程序扫码发货');
+            } else {
+                alertx(data.msg);
+            }
+        });
+
+
+    }
+
+    $(document).ready(function () {
+        if ($(".operation-block").length > 0) {
+            var length = $(".operation-block").length;
+            for (var i = 0; i < length; i++) {
+                var b = $(".operation-block").get(i);
+                if ($(b).html().trim() == '') {
+                    $(b).hide();
+                    $(b).prev().hide();
+                }
+            }
+        }
+        if ($('.supplier-product-name').html() == $('.supplier-product-alias').html()) {
+            $('.supplier-product-alias').remove();
+        }
+    })
+
+    //抹平收款
+    function collection(orderId) {
+        $.post("${ctx}/order/gatheringData", {
+            'orderId': orderId
+        }, function (data) {
+            if (true == data.success) {
+                var html = "<div id='auditBox'>" +
+                    "<P>确定抹平收款吗?抹平后该订单将变为已收款状态</p>" +
+                    "<P><span>订单金额:<b>¥" + Number(data.payTotalFee).toFixed(2) + "</b></span></p>" +
+                    "<P><span>应收金额:<b>¥" + Number(data.payableAmount).toFixed(2) + "</b><span style='color:#FF0000'>(账户余额抵扣: ¥<b>" + Number(data.balancePayFee).toFixed(2) + "</b>)</span></span></p>" +
+                    "<P><span>已收金额:<b>¥" + Number(data.associateAmount).toFixed(2) + "</b></span></p>" +
+                    "<div><div class='note-div'><span style='color:#FF0000'>*</span>备注</div></div>" +
+                    "<textarea name='auditNote' style='width: 100%;min-height:60px;'></textarea>" +
+                    "<div class='note-div' style='display: none' id='noteError'><span style='color:#FF0000'>请填写备注</span> </div>" +
+                    "</div>";
+                $.jBox(html, {
+                    title: "确认提示", width: 500, height: 400, buttons: {"确定": '1', "取消": '-1'},
+                    submit: function (v, h, f) {
+                        if ('1' == v) {
+                            if ((Number(data.payTotalFee) - Number(data.associateAmount)) > 10) {
+                                alertx("订单剩余应收金额大于¥10.00,不能抹平!");
+                                return false;
+                            }
+                            var content = document.getElementsByName("auditNote")[0].value;
+                            if (content == '' || content == null) {
+                                document.getElementById('noteError').style.display = 'block';
+                                return false;
+                            }
+                            $.post("${ctx}/order/smoothOutCollection", {
+                                'orderID': orderId,
+                                'balanceAccountsRemark': content
+                            });
+                            window.location.href = "${ctx}/order/detail?id=" + orderId;
+                        }
+                    }
+                });
+
+            } else {
+                $.jBox.tip(data.msg, 'error');
+            }
+        }, "JSON");//这里返回的类型有:json,html,xml,text
+    };
+</script>
+</body>
+</html>