Aslee 3 年之前
父節點
當前提交
18e0c957e0
共有 40 個文件被更改,包括 586 次插入78 次删除
  1. 11 5
      pom.xml
  2. 3 2
      src/main/java/com/caimei/modules/archive/utils/FFMPEG.java
  3. 2 3
      src/main/java/com/caimei/modules/archive/utils/WaterMarkUtils.java
  4. 5 1
      src/main/java/com/caimei/modules/hehe/dao/CmHeheDiscountDao.java
  5. 6 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheProductDao.java
  6. 10 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheActivity.java
  7. 10 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheFloor.java
  8. 19 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheProduct.java
  9. 6 3
      src/main/java/com/caimei/modules/hehe/service/CmHeheDiscountService.java
  10. 15 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheProductService.java
  11. 24 2
      src/main/java/com/caimei/modules/hehe/web/CmHeheProductController.java
  12. 9 0
      src/main/java/com/caimei/modules/order/entity/CmOrderRemark.java
  13. 3 0
      src/main/java/com/caimei/modules/order/utils/OrderUtil.java
  14. 5 3
      src/main/java/com/caimei/modules/order/web/CmOrderRemarkController.java
  15. 2 1
      src/main/java/com/caimei/modules/order/web/NewOrderController.java
  16. 10 0
      src/main/resources/mappings/modules/archive/CmOrderArchiveMapper.xml
  17. 2 3
      src/main/resources/mappings/modules/archive/CmProductArchiveContentMapper.xml
  18. 1 1
      src/main/resources/mappings/modules/hehe/CmHeheCouponMapper.xml
  19. 8 2
      src/main/resources/mappings/modules/hehe/CmHeheDiscountMapper.xml
  20. 3 1
      src/main/resources/mappings/modules/hehe/CmHeheFloorMapper.xml
  21. 1 1
      src/main/resources/mappings/modules/hehe/CmHeheFloorProductMapper.xml
  22. 19 2
      src/main/resources/mappings/modules/hehe/CmHeheProductMapper.xml
  23. 1 1
      src/main/resources/mappings/modules/order/OrderMapper.xml
  24. 2 2
      src/main/webapp/WEB-INF/views/modules/archive/addFileForm.jsp
  25. 2 2
      src/main/webapp/WEB-INF/views/modules/archive/cmProductArchiveContentList.jsp
  26. 1 2
      src/main/webapp/WEB-INF/views/modules/archive/previewFilePage.jsp
  27. 9 3
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/addOrderRemarksForm.jsp
  28. 1 1
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/orderReturnRecord.jsp
  29. 6 1
      src/main/webapp/WEB-INF/views/modules/bulkpurchase/refundRecord.jsp
  30. 1 2
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheDiscountForm.jsp
  31. 10 1
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheFloorProductList.jsp
  32. 255 16
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheProductForm.jsp
  33. 1 1
      src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderDetail.jsp
  34. 2 2
      src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderList.jsp
  35. 8 3
      src/main/webapp/WEB-INF/views/modules/order/cmOrderRemarksFormNew.jsp
  36. 27 2
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopCheck.jsp
  37. 26 2
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp
  38. 26 3
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopEdit.jsp
  39. 27 2
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp
  40. 7 2
      src/main/webapp/WEB-INF/views/modules/order/logisticsDetails.jsp

+ 11 - 5
pom.xml

@@ -37,7 +37,7 @@
 		<xstream.version>1.4.7</xstream.version>
 		<guava.version>17.0</guava.version>
 		<dozer.version>5.5.1</dozer.version>
-		<poi.version>3.9</poi.version>
+<!--		<poi.version>3.9</poi.version>-->
 		<freemarker.version>2.3.20</freemarker.version>
 
 		<!-- jdbc driver setting -->
@@ -663,13 +663,13 @@
 		<dependency>
 			<groupId>org.apache.poi</groupId>
 			<artifactId>poi</artifactId>
-			<version>3.17</version>
+			<version>3.16</version>
 		</dependency>
 		<!--2007 docx文件读取,需要导入poi-ooxml-->
 		<dependency>
 			<groupId>org.apache.poi</groupId>
 			<artifactId>poi-ooxml</artifactId>
-			<version>3.17</version>
+			<version>3.16</version>
 		</dependency>
 		<!--2003 doc文件的读取,需要导入poi-scratchpad-->
 		<dependency>
@@ -678,17 +678,23 @@
 			<version>3.8</version>
 		</dependency>
 		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml-schemas</artifactId>
+			<version>3.16</version>
+		</dependency>
+
+		<!--<dependency>
 			<groupId>org.apache.poi</groupId>
 			<artifactId>ooxml-schemas</artifactId>
 			<version>1.0</version>
 			<exclusions>
-				<!--解决含嵌入文件ppt转换报错 ArrayStoreException-->
+				&lt;!&ndash;解决含嵌入文件ppt转换报错 ArrayStoreException&ndash;&gt;
 				<exclusion>
 					<artifactId>xmlbeans</artifactId>
 					<groupId>org.apache.xmlbeans</groupId>
 				</exclusion>
 			</exclusions>
-		</dependency>
+		</dependency>-->
 
 		<dependency>
 			<groupId>com.itextpdf</groupId>

+ 3 - 2
src/main/java/com/caimei/modules/archive/utils/FFMPEG.java

@@ -99,8 +99,6 @@ public class FFMPEG {
         // String ffmpeg_path,String input_path,String video_converted_path,String logo,String screen_size,String xaxis,String yaxis,String vb,String ab
         List<String> cmd = new ArrayList<String>();
         cmd.add(dto.get("ffmpeg_path"));
-        cmd.add("-protocol_whitelist");
-        cmd.add(dto.get("whitelist"));
         cmd.add("-y");
         cmd.add("-i");
         cmd.add(dto.get("input_path"));
@@ -139,6 +137,9 @@ public class FFMPEG {
         }
         cmd.add("-q:v");
         cmd.add("4");
+        // h264转码,可以在video标签内播放
+        cmd.add("-vcodec");
+        cmd.add("libx264");
         cmd.add(dto.get("video_converted_path"));
         String converted_time = CmdExecuter.exec(cmd);
         //获取转换时间

+ 2 - 3
src/main/java/com/caimei/modules/archive/utils/WaterMarkUtils.java

@@ -26,7 +26,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.web.multipart.MultipartFile;
-import schemasMicrosoftComVml.CTShape;
 import sun.misc.BASE64Encoder;
 
 import javax.imageio.ImageIO;
@@ -365,7 +364,7 @@ public class WaterMarkUtils {
      * @param outPath
      * @param markStr
      */
-    public static void setExcelWaterMark(String inputPath, String outPath, String markStr) {
+    /*public static void setExcelWaterMark(String inputPath, String outPath, String markStr) {
         //读取excel文件
         XSSFWorkbook workbook = null;
         try {
@@ -419,7 +418,7 @@ public class WaterMarkUtils {
                 }
             }
         }
-    }
+    }*/
 
     /**
      * PPT设置水印

+ 5 - 1
src/main/java/com/caimei/modules/hehe/dao/CmHeheDiscountDao.java

@@ -28,7 +28,7 @@ public interface CmHeheDiscountDao extends CrudDao<CmHeheDiscount> {
 
     void deleteDiscountProduct(Integer id);
 
-    List<Integer> findDiscountUserIds(String id);
+    List<Integer> findDiscountUserIds(String discountId);
 
     void insertDiscountUser(CmHeheDiscountUser a);
 
@@ -37,4 +37,8 @@ public interface CmHeheDiscountDao extends CrudDao<CmHeheDiscount> {
     List<CmHeheDiscountProduct> findDiscountProductList(String id);
 
     List<CmHeheDiscountUser> findDiscountUserList(String id);
+
+    String findAllUserIds();
+
+    void deleteUserByDiscountId(String id);
 }

+ 6 - 0
src/main/java/com/caimei/modules/hehe/dao/CmHeheProductDao.java

@@ -46,4 +46,10 @@ public interface CmHeheProductDao extends CrudDao<CmHeheProduct> {
      * @return
      */
     List<Product> findCouponProduct(Product product);
+
+    Integer findProductActivity(Integer productId);
+
+    void addActivityProduct(@Param("productId") Integer productId, @Param("activityId") Integer activityId);
+
+    void addFloorProduct(@Param("productId") Integer productId, @Param("floorId") String floorId);
 }

+ 10 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheActivity.java

@@ -22,6 +22,8 @@ public class CmHeheActivity extends DataEntity<CmHeheActivity> {
 	private Date endTime;		// 结束时间
 	private Date addTime;		// 创建时间
 	private Integer activityStatus;  	//活动状态:1未开始,2进行中,3已结束
+
+    private Boolean checked;        //是否被选中
 	
 	public CmHeheActivity() {
 		super();
@@ -99,4 +101,12 @@ public class CmHeheActivity extends DataEntity<CmHeheActivity> {
 	public void setActivityStatus(Integer activityStatus) {
 		this.activityStatus = activityStatus;
 	}
+
+    public Boolean getChecked() {
+        return checked;
+    }
+
+    public void setChecked(Boolean checked) {
+        this.checked = checked;
+    }
 }

+ 10 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheFloor.java

@@ -20,6 +20,8 @@ public class CmHeheFloor extends DataEntity<CmHeheFloor> {
 	private String status;		// 状态
 	private Date createTime;		// 创建时间
 
+	private Boolean checked;	//是否被选中
+
 	public CmHeheFloor() {
 		super();
 	}
@@ -69,4 +71,12 @@ public class CmHeheFloor extends DataEntity<CmHeheFloor> {
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
+
+	public Boolean getChecked() {
+		return checked;
+	}
+
+	public void setChecked(Boolean checked) {
+		this.checked = checked;
+	}
 }

+ 19 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheProduct.java

@@ -33,6 +33,9 @@ public class CmHeheProduct extends DataEntity<CmHeheProduct> {
     private String shopName;        //供应商名称
     private List<Integer> ids;             //刚添加的活动id
 
+    private Integer activityId;     //活动id
+    private String floorIds;        //楼层id,以,隔开
+
     public CmHeheProduct() {
         super();
     }
@@ -165,4 +168,20 @@ public class CmHeheProduct extends DataEntity<CmHeheProduct> {
     public void setIds(List<Integer> ids) {
         this.ids = ids;
     }
+
+    public Integer getActivityId() {
+        return activityId;
+    }
+
+    public void setActivityId(Integer activityId) {
+        this.activityId = activityId;
+    }
+
+    public String getFloorIds() {
+        return floorIds;
+    }
+
+    public void setFloorIds(String floorIds) {
+        this.floorIds = floorIds;
+    }
 }

+ 6 - 3
src/main/java/com/caimei/modules/hehe/service/CmHeheDiscountService.java

@@ -91,15 +91,14 @@ public class CmHeheDiscountService extends CrudService<CmHeheDiscountDao, CmHehe
 		}
 		//删除用户
 		if (userIds != null && userIds.size() > 0) {
-			userIds.forEach(id -> {
-				cmHeheDiscountDao.deleteDiscountUser(id);
-			});
+			userIds.forEach(id -> cmHeheDiscountDao.deleteDiscountUser(id));
 		}
 	}
 	
 	@Transactional(readOnly = false)
 	public void delete(CmHeheDiscount cmHeheDiscount) {
 		super.delete(cmHeheDiscount);
+		cmHeheDiscountDao.deleteUserByDiscountId(cmHeheDiscount.getId());
 	}
 
     public Map<String, Object> updateStatus(Integer id, Integer status) {
@@ -130,12 +129,16 @@ public class CmHeheDiscountService extends CrudService<CmHeheDiscountDao, CmHehe
 	public Page<CmUser> findUserList(Page<CmUser> cmUserPage, CmUser user) {
 		user.setPage(cmUserPage);
 		List<CmUser> userList = cmHeheCouponDao.findAllUser(user);
+		String discountUserIds = cmHeheDiscountDao.findAllUserIds();
 		if (userList != null && userList.size() > 0) {
 			userList.forEach(item -> {
 				item.setUserIds(user.getUserIds());
 				if (StringUtils.isNotBlank(user.getUserIds()) && user.getUserIds().contains(item.getUserID().toString())) {
 					item.setStoreStatus(true);
 				}
+                if (StringUtils.isNotBlank(discountUserIds)  && discountUserIds.contains(item.getUserID().toString())) {
+                    item.setStoreStatus(true);
+                }
 			});
 		}
 		cmUserPage.setList(userList);

+ 15 - 0
src/main/java/com/caimei/modules/hehe/service/CmHeheProductService.java

@@ -7,6 +7,7 @@ import com.caimei.modules.product.entity.Product;
 import com.caimei.utils.AppUtils;
 import com.caimei.utils.MathUtil;
 import com.caimei.utils.StringUtil;
+import com.caimei.utils.StringUtils;
 import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
@@ -56,7 +57,21 @@ public class CmHeheProductService extends CrudService<CmHeheProductDao, CmHehePr
 
     @Transactional(readOnly = false)
     public void save(CmHeheProduct cmHeheProduct) {
+        if (cmHeheProduct.getIsNewRecord()) {
+            // 添加商品时保存商品楼层和活动
+            Integer newActivityId = cmHeheProduct.getActivityId();
+            if (newActivityId != null) {
+                cmHeheProductDao.addActivityProduct(cmHeheProduct.getProductId(), newActivityId);
+            }
+            String newFloorIds = cmHeheProduct.getFloorIds();
+            String[] floorIdArr = newFloorIds.split(",");
+            for (int i = 0; i < floorIdArr.length; i++) {
+                String floorId = floorIdArr[i];
+                cmHeheProductDao.addFloorProduct(cmHeheProduct.getProductId(), floorId);
+            }
+        }
         super.save(cmHeheProduct);
+
     }
 
     @Transactional(readOnly = false)

+ 24 - 2
src/main/java/com/caimei/modules/hehe/web/CmHeheProductController.java

@@ -72,9 +72,31 @@ public class CmHeheProductController extends BaseController {
     @RequestMapping(value = "form")
     public String form(CmHeheProduct cmHeheProduct, Model model) {
         model.addAttribute("cmHeheProduct", cmHeheProduct);
-        List<CmHeheFloor> floorList = cmHeheFloorService.findList(null);
+        CmHeheFloor cmHeheFloor = new CmHeheFloor();
+        cmHeheFloor.setStatus("1");
+        // 查询启用的楼层
+        List<CmHeheFloor> floorList = cmHeheFloorService.findList(cmHeheFloor);
+        String floorIds = cmHeheProduct.getFloorIds();
+        if (StringUtils.isNotEmpty(floorIds)) {
+            floorList.forEach(floor->{
+                if (floorIds.contains(floor.getId())) {
+                    floor.setChecked(true);
+                }
+            });
+        }
         model.addAttribute("floorList", floorList);
-        List<CmHeheActivity> activityList = cmHeheActivityService.findList(null);
+        CmHeheActivity cmHeheActivity = new CmHeheActivity();
+        cmHeheActivity.setActivityStatus(2);
+        // 查询进行中的活动
+        List<CmHeheActivity> activityList = cmHeheActivityService.findList(cmHeheActivity);
+        String activityId = cmHeheProduct.getActivityId() + "";
+        if (StringUtils.isNotEmpty(activityId)) {
+            activityList.forEach(activity->{
+                if (activityId.equals(activity.getId())) {
+                    activity.setChecked(true);
+                }
+            });
+        }
         model.addAttribute("activityList", activityList);
         return "modules/hehe/cmHeheProductForm";
     }

+ 9 - 0
src/main/java/com/caimei/modules/order/entity/CmOrderRemark.java

@@ -25,6 +25,7 @@ public class CmOrderRemark extends DataEntity<CmOrderRemark> {
 
     private String fileIds;  //备注文件id,以","隔开
     private List<CmOrderRemarkFile> remarkFileList; //备注文件
+    private Integer orderType;  //2呵呵订单,其他采美订单
 
     public Integer getOrderID() {
         return orderID;
@@ -161,4 +162,12 @@ public class CmOrderRemark extends DataEntity<CmOrderRemark> {
     public void setRemarkFileList(List<CmOrderRemarkFile> remarkFileList) {
         this.remarkFileList = remarkFileList;
     }
+
+    public Integer getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(Integer orderType) {
+        this.orderType = orderType;
+    }
 }

+ 3 - 0
src/main/java/com/caimei/modules/order/utils/OrderUtil.java

@@ -327,6 +327,9 @@ public class OrderUtil {
         if ("18".equals(payType)) {
             return "建设银行1854";
         }
+        if ("19".equals(payType)) {
+            return "建设银行6256";
+        }
         return "";
     }
 

+ 5 - 3
src/main/java/com/caimei/modules/order/web/CmOrderRemarkController.java

@@ -103,7 +103,7 @@ public class CmOrderRemarkController extends BaseController {
 
     //订单备注新
     @RequestMapping(value = "remarksViewNew")
-    public String remarksViewNew(Integer orderID, Model model, String source) {
+    public String remarksViewNew(Integer orderID, Model model, String source, Integer orderType) {
         //通过商品ID获取对应备注信息
         CmOrderRemark remark = new CmOrderRemark();
         remark.setOrderID(orderID);
@@ -121,13 +121,15 @@ public class CmOrderRemarkController extends BaseController {
         model.addAttribute("remarksList", remarksList);
         model.addAttribute("orderID", orderID);
         model.addAttribute("source", source);
+        model.addAttribute("orderType", orderType);
         return "modules/order/cmOrderRemarksFormNew";
     }
 
     @RequestMapping(value = "toAddRemarksViewNew")
-    public String toAddRemarksViewNew(Integer orderID, Model model, String source) {
+    public String toAddRemarksViewNew(Integer orderID, Model model, String source, Integer orderType) {
         model.addAttribute("orderID", orderID);
         model.addAttribute("source", source);
+        model.addAttribute("orderType", orderType);
         return "modules/bulkpurchase/addOrderRemarksForm";
     }
 
@@ -236,7 +238,7 @@ public class CmOrderRemarkController extends BaseController {
             addMessage(redirectAttributes, "添加失败");
         }
         model.addAttribute("source", source);
-        return remarksViewNew(cmOrderRemark.getOrderID(), model, source);
+        return remarksViewNew(cmOrderRemark.getOrderID(), model, source, cmOrderRemark.getOrderType());
     }
 
 

+ 2 - 1
src/main/java/com/caimei/modules/order/web/NewOrderController.java

@@ -1374,10 +1374,11 @@ public class NewOrderController extends BaseController {
      */
     @RequiresPermissions("order:order:edit")
     @RequestMapping("logisticsDetails")
-    public String logisticsDetails(Integer orderID, String logisticsBatchID, Model model) {
+    public String logisticsDetails(Integer orderID, String logisticsBatchID, Model model, Integer orderType) {
         List<LogisticsInfoVo> logisticsInfoVos = new ArrayList<>();
         logisticsInfoVos = newShopOrderService.logisticsDetails(orderID, logisticsBatchID);
         model.addAttribute("orderID", orderID);
+        model.addAttribute("orderType", orderType);
         model.addAttribute("logisticsInfoVos", logisticsInfoVos);
         return "modules/order/logisticsDetails";
     }

+ 10 - 0
src/main/resources/mappings/modules/archive/CmOrderArchiveMapper.xml

@@ -75,6 +75,16 @@
             <if test="rebateFlag != null">
                 AND a.rebateFlag = #{rebateFlag}
             </if>
+            <if test="orderStatus != null">
+                <choose>
+                    <when test="orderStatus == 99">
+                        AND co.status in (11,12,13,21,22,23,31,32,33)
+                    </when>
+                    <otherwise>
+                        AND co.status = #{orderStatus}
+                    </otherwise>
+                </choose>
+            </if>
         </where>
         group by a.id
         <choose>

+ 2 - 3
src/main/resources/mappings/modules/archive/CmProductArchiveContentMapper.xml

@@ -8,11 +8,10 @@
 		a.title AS "title",
 		a.type AS "type",
 		a.addTime AS "addTime",
-		cf.waterOssName as ossName,
+		if(a.type=2,cf.ossName,ifnull(cf.waterOssName,cf.ossName)) as ossName,
 		cf.fileName,
 		cf.uploadTime,
-		cf.ossUrl,
-		cf.waterOssUrl
+		if(a.type=2,cf.ossUrl,ifnull(cf.waterOssUrl,cf.ossUrl)) as ossUrl
 	</sql>
 	
 	<sql id="cmProductArchiveContentJoins">

+ 1 - 1
src/main/resources/mappings/modules/hehe/CmHeheCouponMapper.xml

@@ -110,7 +110,7 @@
 			- sort DESC
 	</select>
 	<select id="findAllUser" resultType="com.caimei.modules.user.entity.CmUser">
-		select userId as userID, nickName,mobile,userIdentity,openId as openID
+		select id,userId as userID, nickName,mobile,userIdentity,openId as openID
 		from cm_hehe_user
 		<where>
 			<if test="mobile != null and mobile != ''">

+ 8 - 2
src/main/resources/mappings/modules/hehe/CmHeheDiscountMapper.xml

@@ -107,7 +107,7 @@
 	</select>
 
 	<select id="findDiscountUserIds" resultType="java.lang.Integer">
-		SELECT id FROM cm_hehe_discount_user WHERE discountId = #{discountId}
+		SELECT id FROM cm_hehe_discount_user where  discountId = #{discountId}
 	</select>
 
 	<insert id="insertDiscountProduct">
@@ -146,7 +146,10 @@
 	<delete id="deleteDiscountUser">
 		delete from cm_hehe_discount_user where id = #{id}
 	</delete>
-	<select id="findDiscountProductList" resultType="com.caimei.modules.hehe.entity.CmHeheDiscountProduct">
+    <delete id="deleteUserByDiscountId">
+        delete from cm_hehe_discount_user where discountId = #{id}
+    </delete>
+    <select id="findDiscountProductList" resultType="com.caimei.modules.hehe.entity.CmHeheDiscountProduct">
 		SELECT
 			cca.id,
 			cca.discountId,
@@ -174,4 +177,7 @@
 		where chu.discountId = #{id}
 		order by chu.addTime desc
 	</select>
+    <select id="findAllUserIds" resultType="java.lang.String">
+        select group_concat(userId) from cm_hehe_discount_user;
+    </select>
 </mapper>

+ 3 - 1
src/main/resources/mappings/modules/hehe/CmHeheFloorMapper.xml

@@ -28,7 +28,9 @@
 		FROM cm_hehe_floor a
 		<include refid="cmHeheFloorJoins"/>
 		<where>
-			
+			<if test="status != null and status != ''">
+				and a.status = #{status}
+			</if>
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">

+ 1 - 1
src/main/resources/mappings/modules/hehe/CmHeheFloorProductMapper.xml

@@ -101,7 +101,7 @@
 		<where>
 			hp.validFlag = 1
 			<if test="productID != null" >
-				AND hp.productId = #{productID}
+				AND hp.id = #{productID}
 			</if>
 			<if test="name != null and name != ''">
 				AND p.name LIKE concat('%',#{name},'%')

+ 19 - 2
src/main/resources/mappings/modules/hehe/CmHeheProductMapper.xml

@@ -17,12 +17,16 @@
 		a.addTime AS "addTime",
 		p.name AS "name",
 		p.mainImage AS "mainImage",
-		s.name AS "shopName"
+		s.name AS "shopName",
+		chap.activityId,
+		group_concat(chfp.floorId) as floorIds
 	</sql>
 	
 	<sql id="cmHeheProductJoins">
 		LEFT JOIN product p ON  a.productId = p.productID
 		LEFT JOIN shop s ON s.shopID = p.shopID
+		left join cm_hehe_activity_product chap on a.productId = chap.productId
+		left join cm_hehe_floor_product chfp on a.productId = chfp.productId
 	</sql>
     
 	<select id="get" resultType="CmHeheProduct">
@@ -31,6 +35,7 @@
 		FROM cm_hehe_product a
 		<include refid="cmHeheProductJoins"/>
 		WHERE a.id = #{id}
+		group by a.id
 	</select>
 	
 	<select id="findList" resultType="CmHeheProduct">
@@ -61,6 +66,7 @@
 				AND s.name LIKE CONCAT('%',#{shopName},'%')
 			</if>
 		</where>
+		group by a.id
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -109,7 +115,15 @@
 			NOW()
 		)
 	</insert>
-	
+	<insert id="addActivityProduct">
+		insert into cm_hehe_activity_product (activityId, productId, addTime, delFlag)
+		values (#{activityId}, #{productId}, NOW(), 0)
+	</insert>
+	<insert id="addFloorProduct">
+		insert into cm_hehe_floor_product(floorId, productId, validFlag, recommend, sort, addTime)
+		VALUES (#{floorId}, #{productId}, 1, 0, 1, NOW())
+	</insert>
+
 	<update id="update">
 		UPDATE cm_hehe_product SET 	
 			productId = #{productId},
@@ -195,6 +209,9 @@
 			</otherwise>
 		</choose>
 	</select>
+	<select id="findProductActivity" resultType="java.lang.Integer">
+		select activityId from cm_hehe_activity_product where productId = #{productId}
+	</select>
 
 
 	<update id="deleteActivityProduct">

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

@@ -773,7 +773,7 @@
 	</update>
 
 	<update id="updatePayAndReceipt">
-		update cm_order set payStatus= 3, receiptStatus= 3 where orderID= #{orderId}
+		update cm_order set status = concat('3',sendOutStatus), payStatus= 3, receiptStatus= 3 where orderID= #{orderId}
 	</update>
 	
 	<update id="updateOrderStatus">

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/archive/addFileForm.jsp

@@ -186,7 +186,7 @@
         <label class="control-label"><font color="red">*</font>文件路径:</label>
         <input id="uploadFileName" type="text" style="display: inline;margin-left:20px" disabled="true" class="input-xlarge required" />
         <div class="upload">
-            <input type="file" name="file" id="archiveFile" accept=".pdf,.doc,.docx,.ppt,.pptx">选择文件
+            <input type="file" name="file" id="archiveFile" accept=".pdf,.docx,.pptx">选择文件
         </div>
         <div class="add-submit">
             <input id="addSubmit" type="button" value="上传" style="cursor: pointer"/>上传&nbsp;
@@ -195,7 +195,7 @@
             <img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
         </div>
         <div style="margin:5px 0 0 180px">
-            <font color="red">支持上传pdf丶word丶ppt文件格式</font>
+            <font color="red">支持上传pdf丶docx丶pptx文件格式</font>
         </div>
     </div>
 </form:form>

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/archive/cmProductArchiveContentList.jsp

@@ -140,12 +140,12 @@
 	}
 
 	function previewVideo(url) {
-		var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + url;
+		var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
 		var title = "视频播放";
 		top.$.jBox("iframe:" + url, {
 			iframeScrolling: 'yes',
 			width: 1000,
-			height: 800,
+			height: 750,
 			persistent: true,
 			title: title,
 			buttons: {"关闭": '-1'}

+ 1 - 2
src/main/webapp/WEB-INF/views/modules/archive/previewFilePage.jsp

@@ -6,8 +6,7 @@
     <meta name="decorator" content="default"/>
 </head>
 <body>
-abc
-<video src="${url}"/>
+<video width="1000" height="680" controls src="${url}"></video>
 </body>
 </html>
 

+ 9 - 3
src/main/webapp/WEB-INF/views/modules/bulkpurchase/addOrderRemarksForm.jsp

@@ -118,18 +118,24 @@
 <body>
 <ul class="nav nav-tabs">
 		<c:if test="${source eq 1 or empty source}">
-			<li><a href="${ctx}/order/orderList">订单列表</a></li>
+            <c:if test="${orderType eq 2}">
+                <li><a href="${ctx}/hehe/new/order/orderList">订单列表</a></li>
+            </c:if>
+            <c:if test="${orderType ne 2}">
+                <li><a href="${ctx}/order/orderList">订单列表</a></li>
+            </c:if>
 		</c:if>
 		<c:if test="${source eq 2}">
 			<li><a href="${ctx}/order/detail?id=${orderID}">订单详情</a></li>
 		</c:if>
-		<li><a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${orderID}&source=${source}">订单备注</a></li>
-		<li  class="active"><a href="${ctx}/order/cmOrderRemark/toAddRemarksViewNew.rpc?orderID=${orderID}&source=${source}">添加订单备注</a></li>
+		<li><a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${orderID}&source=${source}&orderType=${orderType}">订单备注</a></li>
+		<li  class="active"><a href="${ctx}/order/cmOrderRemark/toAddRemarksViewNew.rpc?orderID=${orderID}&source=${source}&orderType=${orderType}">添加订单备注</a></li>
 	</ul><br/>
 <br/>
 <form:form id="inputForm" modelAttribute="cmOrderRemark" action="${ctx}/order/cmOrderRemark/addRemarksViewNew?source=${source}" method="post" class="form-horizontal">
 		<form:hidden path="orderID" value="${orderID}"/>
 		<form:hidden path="fileIds" id="fileIds"/>
+        <form:hidden path="orderType" value="${orderType}" />
 		<sys:message content="${message}"/>
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>备注内容:</label>

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

@@ -135,7 +135,7 @@
 <br/>
 <div class="refund-btn-top">
     <c:if test="${from ne '3'}">
-    <input type="button" class="btn btn-primary" onclick="window.location.href='${ctx}/order/orderList'"  value="返回">
+    <input type="button" class="btn btn-primary" onclick="window.location.href='${ctx}${cmReturnedPurchase.orderType eq 2?'/hehe/new/order/orderList':'/order/orderList'}'"  value="返回">
     </c:if>
 </div>
 <c:forEach items="${cmReturnedPurchaseList}" var="cmReturnedPurchase" varStatus="cmReturnedPurchaseStatus">

+ 6 - 1
src/main/webapp/WEB-INF/views/modules/bulkpurchase/refundRecord.jsp

@@ -96,7 +96,12 @@
 <input type="hidden" id="ctx" value="${ctx}">
 <ul class="nav nav-tabs">
     <c:if test="${from eq '1' or from eq '2'}">
-        <li><a href="${ctx}/order/orderList">订单列表</a></li>
+        <c:if test="${orderType eq 2}">
+            <li><a href="${ctx}/hehe/new/order/orderList">订单列表</a></li>
+        </c:if>
+        <c:if test="${orderType ne 2}">
+            <li><a href="${ctx}/order/orderList">订单列表</a></li>
+        </c:if>
     </c:if>
     <c:if test="${from eq '2'}">
         <li><a href="${ctx}/order/detail?id=${orderID}">订单详情</a></li>

+ 1 - 2
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheDiscountForm.jsp

@@ -68,7 +68,7 @@
 		<form:hidden path="id"/>
 		<form:hidden path="productInfo"/>
 		<form:hidden path="userInfo"/>
-		<sys:message content="${message}"/>		
+		<sys:message content="${message}"/>
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>标题:</label>
 			<div class="controls">
@@ -170,7 +170,6 @@
 			addTime: "<fmt:formatDate value="${product.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
 		});
 		</c:forEach>
-		debugger
 		<c:forEach items="${userList}" var="user" varStatus="index">
 		userList.push({
 			userId: "${user.userId}",

+ 10 - 1
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheFloorProductList.jsp

@@ -18,6 +18,15 @@
 			$("#searchForm").submit();
         	return false;
         }
+
+		/**
+		 * @param obj
+		 * jquery控制input只能输入数字
+		 */
+		function onlynum(obj) {
+			obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+		}
+
 	</script>
 </head>
 <body>
@@ -31,7 +40,7 @@
 		<div class="ul-form">
 			<form:hidden path="floorId"/>
 			 <label>商品ID:</label>
-				<form:input path="productId" htmlEscape="false" class="input-medium"/>
+				<form:input path="productId" htmlEscape="false" onkeyup="onlynum(this)" class="input-medium"/>
 			<label>商品名称:</label>
 				<form:input path="productName" htmlEscape="false" class="input-medium"/>
 			<label>供应商名称:</label>

+ 255 - 16
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheProductForm.jsp

@@ -4,6 +4,133 @@
 <head>
 	<title>呵呵商品管理</title>
 	<meta name="decorator" content="default"/>
+	<style>
+		body {
+			font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
+			font-size: 14px;
+			line-height: 1.42857143;
+			color: #666;
+			margin: 0;
+		}
+
+		.hidden {
+			display: none !important;
+		}
+		.selectPickerWrapper * {
+			box-sizing: border-box;
+		}
+		.selectPickerWrapper {
+			position: relative;
+			/* margin: 50px; */
+			display: inline-block;
+		}
+		.select-picker-search {
+			width: 200px;
+			height: 32px;
+			line-height: 32px;
+			color: #666;
+			border-radius: 3px;
+			border: 1px solid #ddd;
+			padding: 0 10px;
+			font-size: 14px;
+			cursor: pointer;
+		}
+		.select-picker-search-checked {
+			position: relative;
+			width: 180px;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			overflow: hidden;
+			padding-right: 5px;
+		}
+		.select-picker-search-checked:after {
+			border: 5px solid transparent;
+			content: ' ';
+			height: 0;
+			position: absolute;
+			width: 0;
+			top: 12.2px;
+			border-top: 8px solid #666;
+			right: 0;
+		}
+		.select-picker-options-wrp {
+			display: none;
+			width: 200px;
+			border-radius: 2px;
+			box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
+			background-color: #fff;
+			position: absolute;
+			top: 36px;
+			left: 0;
+			z-index: 999;
+		}
+		.select-picker-options-serch input {
+			width: 160px;
+			height: 32px;
+			line-height: 32px;
+			border: 1px solid #ddd;
+			border-radius: 3px;
+			margin: 12px 0 0 10px;
+			padding-left: 8px;
+		}
+		.select-picker-options-serch input:focus {
+			border-color: #2fa4e7;
+			outline: 0;
+			-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+			box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
+		}
+		.select-picker-options-list {
+			width: 100%;
+			padding: 8px 0;
+		}
+		.select-picker-options-list-item {
+			width: 100%;
+			line-height: 36px;
+			cursor: pointer;
+			padding: 0 12px;
+		}
+		.select-picker-options-list-item:hover {
+			background: #ebf1f5;
+		}
+		.duihao {
+			display: inline-block;
+			width: 18px;
+			height: 18px;
+			border-radius: 3px;
+			transform: translateY(4px);
+			margin-right: 6px;
+		}
+		.duihao-checked {
+			background: #2fa4e7;
+			position: relative;
+		}
+		.duihao-checked:before,
+		.duihao-checked::after {
+			content: '';
+			height: 10px;
+			width: 2px;
+			border-radius: 10px;
+			display: block;
+			background: white;
+			position: absolute;
+			top: 4px;
+			left: 10px;
+			transform: rotate(45deg);
+			-ms-transform: rotate(45deg);
+		}
+		.duihao-checked::before {
+			height: 6px;
+			transform: rotate(-45deg);
+			-ms-transform: rotate(-45deg);
+			position: absolute;
+			top: 7px;
+			left: 5px;
+		}
+		.duihao-nocheck {
+			border: 1px solid #ddd;
+		}
+
+	</style>
 	<script type="text/javascript">
 		$(document).ready(function() {
 			//$("#name").focus();
@@ -28,6 +155,112 @@
 				}
 			});
 		});
+
+
+		;(function ($, window, document, undefined) {
+			//用一个自调用匿名函数把插架代码包裹起来,防止代码污染
+			$.fn.mySelect = function (options) {
+				var defaults = {
+					//defaults 使我们设置的默认参数。
+					callback: function (res) {
+						console.log(res)
+					},
+				}
+				var options = $.extend(defaults, options) //将传入参数和默认参数合并
+				var $this = $(this) //当然响应事件对象
+				var selectValues = []
+				//生成option-item并追加展示
+				var html = ''
+				html += '<div class="select-picker-search">'
+				html += '<div class="select-picker-search-checked">请选择</div>'
+				html += '</div>'
+				html += '<div class="select-picker-options-wrp">'
+				// html += '<div class="select-picker-options-serch">';
+				// html += '<input type="text" placeholder="">';
+				// html += '</div>';
+				html += '<div class="select-picker-options-list">'
+				$this.find('option').each(function () {
+					let _this = $(this)
+					html += '<div class="select-picker-options-list-item"'
+					html += 'value="' + _this.attr('value') + '">'
+					html += '<b class="duihao duihao-nocheck"></b>'
+					html += '<span>' + _this.text() + '</span>'
+					html += '</div>'
+				})
+				html += '</div>'
+				html += '</div>'
+				$this.append(html)
+				// 下拉显示隐藏
+				$this.on('click', '.select-picker-search', function (e) {
+					//功能代码部分,绑定事件
+					$(this).next('.select-picker-options-wrp').toggle()
+					// $(this).next('.select-picker-options-wrp').find('.select-picker-options-serch input').focus()
+				})
+				// 点击选中或不选
+				$this.on('click', '.select-picker-options-list-item', function () {
+					let _this = $(this)
+					if (_this.find('.duihao-nocheck').length > 0) {
+						_this.find('.duihao').removeClass('duihao-nocheck').addClass('duihao-checked')
+					} else {
+						_this.find('.duihao').addClass('duihao-nocheck').removeClass('duihao-checked')
+					}
+					// 循环遍历options中选中的项添加到选项栏中
+					var checkedArr = []
+					selectValues = []
+					$this.find('.select-picker-options-list-item').each(function () {
+						let _this = $(this)
+						if (_this.find('.duihao-checked').length > 0) {
+							checkedArr.push($.trim(_this.text()))
+							selectValues.push(_this.attr('value'))
+						}
+					})
+					if (checkedArr.length > 0) {
+						$this.find('.select-picker-search-checked').text(checkedArr.join(','))
+						// $this.find('.select-picker-search-checked').text(checkedArr.join(',')).css('color', '#fff');
+					} else {
+						$this.find('.select-picker-search-checked').text('请选择').css('color', '#757575')
+					}
+					// 回调
+					options.callback(selectValues)
+				})
+				// 前端实现下拉搜索
+				// $this.on('keyup', '.select-picker-options-serch input', function () {
+				// 	var text = $(this).val()
+				// 	var html = ''
+				// 	$this.find('option').each(function () {
+				// 		let _this = $(this)
+				// 		if (_this.text().indexOf(text) != -1) {
+				// 			html += '<div class="select-picker-options-list-item">'
+				// 			html += '<b class="duihao duihao-nocheck"></b>'
+				// 			html += '<span>' + _this.text() + '</span>'
+				// 			html += '</div>'
+				// 		}
+				// 	})
+				// 	if (html == '') {
+				// 		html += '<p style="text-align:center;">没有相关内容</p>'
+				// 	}
+				// 	$this.find('.select-picker-options-list').html('').append(html)
+				// })
+				// 点击document任意地方 下拉消失
+				$(document).click(function (event) {
+					var _con = $('.select-picker-options-wrp') // 设置目标区域
+					var _con2 = $('.select-picker-search-checked') // 设置目标区域
+					if (!_con2.is(event.target) && !_con.is(event.target) && _con.has(event.target).length === 0) {
+						// Mark 1
+						$('.select-picker-options-wrp').hide() //淡出消失
+					}
+				})
+			}
+		})(jQuery, window, document)
+
+		$(function () {
+			$('#demo1').mySelect({
+				callback: function (res) {
+					console.log(res);
+					$("#floorIds").val(res)
+				},
+			})
+		})
 	</script>
 </head>
 <body>
@@ -39,6 +272,7 @@
 		<form:hidden path="id"/>
 		<form:hidden path="productId" id="productId"/>
 		<sys:message content="${message}"/>
+        <form:hidden path="floorIds"/>
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>商品:</label>
 			<div class="controls" id="addProduct">
@@ -124,24 +358,29 @@
 				</form:select>
 			</div>
 		</div>
-		<%--<div class="control-group">
-			<label class="control-label">首页楼层:</label>
-			<div class="controls">
-				<form:select path="floorId" class="input-small">
-					<form:option value="" label="请选择"/>
-					<form:options items="${floorList}" itemLabel="title" itemValue="id" htmlEscape="false"/>
-				</form:select>
+		<c:if test="${cmHeheProduct.id eq null}">
+			<div class="control-group">
+				<label class="control-label">首页楼层:</label>
+				<div class="controls" style="overflow: visible">
+					<div id="demo1" class="selectPickerWrapper">
+						<select class="hidden" multiple="multiple" id="select">
+							<c:forEach items="${floorList}" var="floor">
+								<option value="${floor.id}" checked="${floor.checked?'checked':''}">${floor.title}</option>
+							</c:forEach>
+						</select>
+					</div>
+				</div>
 			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">商城活动:</label>
-			<div class="controls">
-				<form:select path="activityId" class="input-small">
-					<form:option value="" label="请选择"/>
-					<form:options items="${activityList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
-				</form:select>
+			<div class="control-group">
+				<label class="control-label">商城活动:</label>
+				<div class="controls">
+					<form:select path="activityId" class="input-small">
+						<form:option value="" label="选择活动"/>
+						<form:options items="${activityList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
+					</form:select>
+				</div>
 			</div>
-		</div>--%>
+		</c:if>
 		<div class="form-actions">
 			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
 			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderDetail.jsp

@@ -325,7 +325,7 @@
                         <a href="${ctx}/order/printOrder?orderID=${order.orderID}">打印发货单</a>
                     </c:if>
                     <a href="${ctx}/order/exportOrder?id=${order.orderID}">订单导出</a>
-                    <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=2">订单备注</a>
+                    <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=2&orderType=2">订单备注</a>
                     <%--包含订单充值商品就不显示--%>
                     <c:if test="${empty order.rechargeGoods}">
                         <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 21 && order.status ne 6 && order.status ne 4}">

+ 2 - 2
src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderList.jsp

@@ -947,11 +947,11 @@
                         </c:if>
                         <%--<a href="/">供应商链接</a>--%>
                         <a href="${ctx}/order/exportOrder?id=${order.orderID}">订单导出</a>
-                        <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=1">订单备注</a>
+                        <a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${order.orderID}&source=1&orderType=2">订单备注</a>
                         <%--包含订单充值商品就不显示--%>
                         <c:if test="${empty order.rechargeGoods}">
                             <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 21 && order.status ne 6 && order.status ne 4}">
-                                <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}">发货记录</a>
+                                <a href="${ctx}/order/logisticsDetails?orderID=${order.orderID}&orderType=2">发货记录</a>
                             </c:if>
                             <c:if test="${order.status ne 0 && order.status ne 11 && order.status ne 6}">
                                 <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${order.orderID}&from=1">收退款记录

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

@@ -28,13 +28,18 @@
 <body>
 	<ul class="nav nav-tabs">
 		<c:if test="${source eq 1 or empty source}">
-			<li><a href="${ctx}/order/orderList">订单列表</a></li>
+			<c:if test="${orderType eq 2}">
+				<li><a href="${ctx}/hehe/new/order/orderList">订单列表</a></li>
+			</c:if>
+			<c:if test="${orderType ne 2}">
+				<li><a href="${ctx}/order/orderList">订单列表</a></li>
+			</c:if>
 		</c:if>
 		<c:if test="${source eq 2}">
 			<li><a href="${ctx}/order/detail?id=${orderID}">订单详情</a></li>
 		</c:if>
-		<li class="active"><a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${orderID}&source=${source}">订单备注</a></li>
-		<li><a href="${ctx}/order/cmOrderRemark/toAddRemarksViewNew.rpc?orderID=${orderID}&source=${source}">添加订单备注</a></li>
+		<li class="active"><a href="${ctx}/order/cmOrderRemark/remarksViewNew.rpc?orderID=${orderID}&source=${source}&orderType=${orderType}">订单备注</a></li>
+		<li><a href="${ctx}/order/cmOrderRemark/toAddRemarksViewNew.rpc?orderID=${orderID}&source=${source}&orderType=${orderType}">添加订单备注</a></li>
 	</ul><br/>
 	<form:form id="inputForm" modelAttribute="cmOrderRemark" action="${ctx}" method="post" class="form-horizontal">
 	<sys:message content="${message}"/>

+ 27 - 2
src/main/webapp/WEB-INF/views/modules/order/cmPayShopCheck.jsp

@@ -277,6 +277,9 @@
             display: inline-block;
             border-radius: 2px
         }
+
+        .clubFreight{display: none}
+        .discountFee{display: none}
     </style>
 </head>
 <body>
@@ -336,6 +339,16 @@
                     <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
                            style="text-decoration: underline">${s.receiptTotalFee}</a></td>
                     <td colspan="2">
+                        <label class="discountFee">
+                            <c:choose>
+                                <c:when test="${s.discountTotalFee gt 0 && s.discountTotalFee gt s.returnedPurchaseTotalFee}">
+                                    <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"/>
+                                </c:when>
+                                <c:otherwise>
+                                    0
+                                </c:otherwise>
+                            </c:choose>
+                        </label>
                         <c:if test="${s.discountTotalFee gt 0}">
                             <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
                                 <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"
@@ -378,6 +391,16 @@
                     <td>${s.shopName}</td>
                     <td colspan="3">${s.buyer}<c:if test="${s.organizeID == 3}"></c:if></td>
                     <td>
+                        <label class="clubFreight">
+                            <c:choose>
+                                <c:when test="${s.freight != -1 && s.freight != 0 && s.freight != -2 && s.returnedFreightFlag ne true}">
+                                    <fmt:formatNumber value="${s.freight}"/>
+                                </c:when>
+                                <c:otherwise>
+                                    <fmt:formatNumber value="0"/>
+                                </c:otherwise>
+                            </c:choose>
+                        </label>
                         <c:if test="${s.freight == 0}">
                             包邮
                         </c:if>
@@ -635,11 +658,13 @@
             totalComissionEle = thisEle.find('.payCm'),
                 comissionEle = thisEle.find('.payCm-t'),
                 thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',', ''),
-                freightVal = thisEle.find('.freight').text().replace(',', '');
+                freightVal = thisEle.find('.freight').text().replace(',', ''),
+                clubFreight = Number(thisEle.find('.clubFreight').text().replace(',','')),
+                discountFee = Number(thisEle.find('.discountFee').text().replace(',',''));
             totalComissionEle.each(function () {
                 totalComissionVal += Number($(this).text().replace(',', ''));
             })
-            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
+            resVal = (totalComissionVal + clubFreight - discountFee - thirdPartyVal - freightVal).toFixed(2);
             comissionEle.text(resVal);
         })
 

+ 26 - 2
src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp

@@ -46,6 +46,8 @@
 		.payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}
 		.wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}
 		.weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
+		.clubFreight{display: none}
+		.discountFee{display: none}
 	</style>
 	<style media="print">
 		.styleWidth{width:6%;word-break:break-all}
@@ -114,6 +116,16 @@
                         <c:if test="${s.receiptStatus == 3}"><font color="green">已收款</font></c:if></a></td>
 					<td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">${s.receiptTotalFee}</a></td>
 					<td colspan="2">
+						<label class="discountFee">
+							<c:choose>
+								<c:when test="${s.discountTotalFee gt 0 && s.discountTotalFee gt s.returnedPurchaseTotalFee}">
+									<fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"/>
+								</c:when>
+								<c:otherwise>
+									0
+								</c:otherwise>
+							</c:choose>
+						</label>
 						<c:if test="${s.discountTotalFee gt 0}">
 							<c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
 								<fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}" type="currency"/>
@@ -157,6 +169,16 @@
 						<c:if test="${s.organizeID == 3}"></c:if>
 					</td>
 					<td>
+						<label class="clubFreight">
+							<c:choose>
+								<c:when test="${s.freight != -1 && s.freight != 0 && s.freight != -2 && s.returnedFreightFlag ne true}">
+									<fmt:formatNumber value="${s.freight}"/>
+								</c:when>
+								<c:otherwise>
+									<fmt:formatNumber value="0"/>
+								</c:otherwise>
+							</c:choose>
+						</label>
                         <c:if test="${s.freight == 0}">
                             包邮
                         </c:if>
@@ -402,11 +424,13 @@
 					totalComissionEle = thisEle.find('.payCm'),
 					comissionEle = thisEle.find('.payCm-t'),
 					thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',',''),
-					freightVal = thisEle.find('.freight').text().replace(',','');
+					freightVal = thisEle.find('.freight').text().replace(',',''),
+					clubFreight = Number(thisEle.find('.clubFreight').text().replace(',','')),
+					discountFee = Number(thisEle.find('.discountFee').text().replace(',',''));
                 totalComissionEle.each(function(){
                     totalComissionVal += Number($(this).text().replace(',',''));
 				})
-                resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
+				resVal = (totalComissionVal + clubFreight - discountFee - thirdPartyVal - freightVal).toFixed(2);
                 comissionEle.text(resVal);
 			})
 

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

@@ -39,6 +39,8 @@
 		.payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}
 		.wipeImgs img{width:120px;height:90px;background-color:#eee;margin-right:15px;}
         .weishaIcon {background:darkorange;color:white;margin:0 0px;padding:0 3px;font-style:normal;font-size: 12px; display:inline-block;border-radius:2px}
+        .clubFreight{display: none}
+        .discountFee{display: none}
     </style>
     <style media="print">
         .styleWidth{width:6%;word-break:break-all}
@@ -103,6 +105,16 @@
                         <c:if test="${s.receiptStatus == 3}"><font color="green">已收款</font></c:if></a></td>
                         <td><a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1" style="text-decoration: underline">${s.receiptTotalFee}</a></td>
                         <td colspan="2">
+                            <label class="discountFee">
+                                <c:choose>
+                                    <c:when test="${s.discountTotalFee gt 0 && s.discountTotalFee gt s.returnedPurchaseTotalFee}">
+                                        <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"/>
+                                    </c:when>
+                                    <c:otherwise>
+                                        0
+                                    </c:otherwise>
+                                </c:choose>
+                            </label>
                             <c:if test="${s.discountTotalFee gt 0}">
                                 <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
                                     <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}" type="currency"/>
@@ -142,6 +154,16 @@
                         <td>${s.shopName}</td>
                         <td colspan="3">${s.buyer}<c:if test="${s.organizeID == 3}"></c:if></td>
                         <td>
+                        <label class="clubFreight">
+                            <c:choose>
+                                <c:when test="${s.freight != -1 && s.freight != 0 && s.freight != -2 && s.returnedFreightFlag ne true}">
+                                    <fmt:formatNumber value="${s.freight}"/>
+                                </c:when>
+                                <c:otherwise>
+                                    <fmt:formatNumber value="0"/>
+                                </c:otherwise>
+                            </c:choose>
+                        </label>
                         <c:if test="${s.freight == 0}">
                             包邮
                         </c:if>
@@ -365,15 +387,16 @@
             var thisEle = $(this),
                 totalComissionVal = 0,
                 resVal = '';
-            debugger;
             totalComissionEle = thisEle.find('.payCm'),
                 comissionEle = thisEle.find('.payCm-t'),
                 thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',', ''),
-                freightVal = thisEle.find('.freight').text().replace(',', '');
+                freightVal = thisEle.find('.freight').text().replace(',', ''),
+                clubFreight = Number(thisEle.find('.clubFreight').text().replace(',','')),
+                discountFee = Number(thisEle.find('.discountFee').text().replace(',',''));
             totalComissionEle.each(function () {
                 totalComissionVal += Number($(this).text().replace(',', ''));
             })
-            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
+            resVal = (totalComissionVal + clubFreight - discountFee - thirdPartyVal - freightVal).toFixed(2);
             comissionEle.text(resVal);
         })
 

+ 27 - 2
src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp

@@ -367,6 +367,9 @@
             display: inline-block;
             border-radius: 2px
         }
+
+        .clubFreight{display: none}
+        .discountFee{display: none}
     </style>
 </head>
 <body>
@@ -433,6 +436,16 @@
                             <a href="${ctx}/bulkpurchase/cmRefundsProduct/toRefundRecord.rpc?orderID=${s.orderID}&from=1"
                                style="text-decoration: underline">${s.receiptTotalFee}</a></td>
                         <td colspan="2">
+                            <label class="discountFee">
+                                <c:choose>
+                                    <c:when test="${s.discountTotalFee gt 0 && s.discountTotalFee gt s.returnedPurchaseTotalFee}">
+                                        <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"/>
+                                    </c:when>
+                                    <c:otherwise>
+                                        0
+                                    </c:otherwise>
+                                </c:choose>
+                            </label>
                             <c:if test="${s.discountTotalFee gt 0}">
                                 <c:if test="${s.discountTotalFee gt s.returnedPurchaseTotalFee}">
                                     <fmt:formatNumber value="${s.discountTotalFee - s.returnedPurchaseTotalFee}"
@@ -477,6 +490,16 @@
                             <c:if test="${s.orderType eq 2}"><font color="red">(呵呵商城)</font></c:if>
                             <c:if test="${s.organizeID == 3}"></c:if></td>
                         <td>
+                            <label class="clubFreight">
+                                <c:choose>
+                                    <c:when test="${s.freight != -1 && s.freight != 0 && s.freight != -2 && s.returnedFreightFlag ne true}">
+                                        <fmt:formatNumber value="${s.freight}"/>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <fmt:formatNumber value="0"/>
+                                    </c:otherwise>
+                                </c:choose>
+                            </label>
                             <c:if test="${s.freight == 0}">
                                 包邮
                             </c:if>
@@ -891,11 +914,13 @@
             totalComissionEle = thisEle.find('.payCm'),
                 comissionEle = thisEle.find('.payCm-t'),
                 thirdPartyVal = thisEle.find('.third-party-fee').text().replace(',', ''),
-                freightVal = thisEle.find('.freight').text().replace(',', '');
+                freightVal = thisEle.find('.freight').text().replace(',', ''),
+                clubFreight = Number(thisEle.find('.clubFreight').text().replace(',','')),
+                discountFee = Number(thisEle.find('.discountFee').text().replace(',',''));
             totalComissionEle.each(function () {
                 totalComissionVal += Number($(this).text().replace(',', ''));
             })
-            resVal = (totalComissionVal - thirdPartyVal - freightVal).toFixed(2);
+            resVal = (totalComissionVal + clubFreight - discountFee - thirdPartyVal - freightVal).toFixed(2);
             comissionEle.text(resVal);
         })
 

+ 7 - 2
src/main/webapp/WEB-INF/views/modules/order/logisticsDetails.jsp

@@ -33,8 +33,13 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/order/orderList">订单列表</a></li>
-    <li class="active"><a href="${ctx}/order/logisticsDetails?orderID=${orderID}">发货记录</a></li>
+    <c:if test="${orderType eq 2}">
+        <li><a href="${ctx}/hehe/new/order/orderList">订单列表</a></li>
+    </c:if>
+    <c:if test="${orderType ne 2}">
+        <li><a href="${ctx}/order/orderList">订单列表</a></li>
+    </c:if>
+    <li class="active"><a href="${ctx}/order/logisticsDetails?orderID=${orderID}&orderType=${orderType}">发货记录</a></li>
 </ul>
 <div class="bj" style="display: none"></div>
 <div class="body-margin">