浏览代码

bugfix-呵呵改版

Aslee 3 年之前
父节点
当前提交
11d85e64c0
共有 30 个文件被更改,包括 579 次插入84 次删除
  1. 15 0
      src/main/java/com/caimei/modules/hehe/dao/CmHeheRelatedImagesDao.java
  2. 33 0
      src/main/java/com/caimei/modules/hehe/entity/CmHeheRelatedImages.java
  3. 46 0
      src/main/java/com/caimei/modules/hehe/service/CmHeheRelatedImagesService.java
  4. 79 0
      src/main/java/com/caimei/modules/hehe/web/CmHeheRelatedImagesController.java
  5. 0 1
      src/main/java/com/caimei/modules/product/entity/CmBigtype.java
  6. 0 1
      src/main/java/com/caimei/modules/product/entity/CmSmalltype.java
  7. 74 0
      src/main/resources/mappings/modules/hehe/CmHeheRelatedImagesMapper.xml
  8. 0 1
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeBannerForm.jsp
  9. 1 2
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheBigtypeList.jsp
  10. 6 6
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheDiscountActivityForm.jsp
  11. 9 1
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheDiscountActivityList.jsp
  12. 45 64
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheFloorContentForm.jsp
  13. 2 2
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheProductForm.jsp
  14. 184 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheRelatedImagesForm.jsp
  15. 66 0
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheRelatedImagesList.jsp
  16. 2 2
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheSmalltypeForm.jsp
  17. 1 1
      src/main/webapp/WEB-INF/views/modules/hehe/cmHeheSmalltypeList.jsp
  18. 5 0
      src/main/webapp/WEB-INF/views/modules/hehe/heheDiscountActivityProductForm.jsp
  19. 1 1
      src/main/webapp/WEB-INF/views/modules/hehe/heheHomeTypeList.jsp
  20. 9 1
      src/main/webapp/WEB-INF/views/modules/hehe/heheHomeTypeProductList.jsp
  21. 1 1
      src/main/webapp/WEB-INF/views/modules/hehe/heheNewOrderDetail.jsp
  22. 二进制
      src/main/webapp/static/template/hehe/1.png
  23. 二进制
      src/main/webapp/static/template/hehe/2.png
  24. 二进制
      src/main/webapp/static/template/hehe/3.png
  25. 二进制
      src/main/webapp/static/template/hehe/4.png
  26. 二进制
      src/main/webapp/static/template/hehe/5.png
  27. 二进制
      src/main/webapp/static/template/hehe/6.png
  28. 二进制
      src/main/webapp/static/template/hehe/7.png
  29. 二进制
      src/main/webapp/static/template/hehe/8.png
  30. 二进制
      src/main/webapp/static/template/hehe/9.png

+ 15 - 0
src/main/java/com/caimei/modules/hehe/dao/CmHeheRelatedImagesDao.java

@@ -0,0 +1,15 @@
+package com.caimei.modules.hehe.dao;
+
+import com.thinkgem.jeesite.common.persistence.CrudDao;
+import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import com.caimei.modules.hehe.entity.CmHeheRelatedImages;
+
+/**
+ * 呵呵相关图片DAO接口
+ * @author Aslee
+ * @version 2022-05-24
+ */
+@MyBatisDao
+public interface CmHeheRelatedImagesDao extends CrudDao<CmHeheRelatedImages> {
+	
+}

+ 33 - 0
src/main/java/com/caimei/modules/hehe/entity/CmHeheRelatedImages.java

@@ -0,0 +1,33 @@
+package com.caimei.modules.hehe.entity;
+
+import org.hibernate.validator.constraints.Length;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * 呵呵相关图片Entity
+ * @author Aslee
+ * @version 2022-05-24
+ */
+public class CmHeheRelatedImages extends DataEntity<CmHeheRelatedImages> {
+	
+	private static final long serialVersionUID = 1L;
+	private String image;		// 图片:1微信群二维码
+	
+	public CmHeheRelatedImages() {
+		super();
+	}
+
+	public CmHeheRelatedImages(String id){
+		super(id);
+	}
+
+	public String getImage() {
+		return image;
+	}
+
+	public void setImage(String image) {
+		this.image = image;
+	}
+	
+}

+ 46 - 0
src/main/java/com/caimei/modules/hehe/service/CmHeheRelatedImagesService.java

@@ -0,0 +1,46 @@
+package com.caimei.modules.hehe.service;
+
+import java.util.List;
+
+import com.caimei.modules.miniprogram.utils.UploadPicUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.service.CrudService;
+import com.caimei.modules.hehe.entity.CmHeheRelatedImages;
+import com.caimei.modules.hehe.dao.CmHeheRelatedImagesDao;
+
+/**
+ * 呵呵相关图片Service
+ * @author Aslee
+ * @version 2022-05-24
+ */
+@Service
+@Transactional(readOnly = true)
+public class CmHeheRelatedImagesService extends CrudService<CmHeheRelatedImagesDao, CmHeheRelatedImages> {
+
+	public CmHeheRelatedImages get(String id) {
+		return super.get(id);
+	}
+	
+	public List<CmHeheRelatedImages> findList(CmHeheRelatedImages cmHeheRelatedImages) {
+		return super.findList(cmHeheRelatedImages);
+	}
+	
+	public Page<CmHeheRelatedImages> findPage(Page<CmHeheRelatedImages> page, CmHeheRelatedImages cmHeheRelatedImages) {
+		return super.findPage(page, cmHeheRelatedImages);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(CmHeheRelatedImages cmHeheRelatedImages) {
+		cmHeheRelatedImages.setImage(UploadPicUtils.saveImageToServer(cmHeheRelatedImages.getImage()));
+		super.save(cmHeheRelatedImages);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(CmHeheRelatedImages cmHeheRelatedImages) {
+		super.delete(cmHeheRelatedImages);
+	}
+	
+}

+ 79 - 0
src/main/java/com/caimei/modules/hehe/web/CmHeheRelatedImagesController.java

@@ -0,0 +1,79 @@
+package com.caimei.modules.hehe.web;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import com.thinkgem.jeesite.common.config.Global;
+import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.web.BaseController;
+import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.caimei.modules.hehe.entity.CmHeheRelatedImages;
+import com.caimei.modules.hehe.service.CmHeheRelatedImagesService;
+
+/**
+ * 呵呵相关图片Controller
+ * @author Aslee
+ * @version 2022-05-24
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/hehe/cmHeheRelatedImages")
+public class CmHeheRelatedImagesController extends BaseController {
+
+	@Autowired
+	private CmHeheRelatedImagesService cmHeheRelatedImagesService;
+	
+	@ModelAttribute
+	public CmHeheRelatedImages get(@RequestParam(required=false) String id) {
+		CmHeheRelatedImages entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = cmHeheRelatedImagesService.get(id);
+		}
+		if (entity == null){
+			entity = new CmHeheRelatedImages();
+		}
+		return entity;
+	}
+	
+	@RequestMapping(value = {"list", ""})
+	public String list(CmHeheRelatedImages cmHeheRelatedImages, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<CmHeheRelatedImages> page = cmHeheRelatedImagesService.findPage(new Page<CmHeheRelatedImages>(request, response), cmHeheRelatedImages); 
+		model.addAttribute("page", page);
+		return "modules/hehe/cmHeheRelatedImagesList";
+	}
+
+	@RequestMapping(value = "form")
+	public String form(CmHeheRelatedImages cmHeheRelatedImages, Model model) {
+		model.addAttribute("cmHeheRelatedImages", cmHeheRelatedImages);
+		return "modules/hehe/cmHeheRelatedImagesForm";
+	}
+
+	@RequestMapping(value = "save")
+	public String save(CmHeheRelatedImages cmHeheRelatedImages, Model model, RedirectAttributes redirectAttributes) {
+		if (!beanValidator(model, cmHeheRelatedImages)){
+			return form(cmHeheRelatedImages, model);
+		}
+		cmHeheRelatedImagesService.save(cmHeheRelatedImages);
+		addMessage(redirectAttributes, "保存图片成功");
+		if ("1".equals(cmHeheRelatedImages.getId())) {
+			return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheRelatedImages/form?id=1";
+		}
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheRelatedImages/?repage";
+	}
+	
+	@RequestMapping(value = "delete")
+	public String delete(CmHeheRelatedImages cmHeheRelatedImages, RedirectAttributes redirectAttributes) {
+		cmHeheRelatedImagesService.delete(cmHeheRelatedImages);
+		addMessage(redirectAttributes, "删除图片成功");
+		return "redirect:"+Global.getAdminPath()+"/hehe/cmHeheRelatedImages/?repage";
+	}
+
+}

+ 0 - 1
src/main/java/com/caimei/modules/product/entity/CmBigtype.java

@@ -41,7 +41,6 @@ public class CmBigtype extends  DataEntity<CmBigtype> {
 		this.bigTypeID = bigTypeID;
 	}
 	
-	@Length(min=0, max=10, message="name长度必须介于 0 和 10 之间")
 	public String getName() {
 		return name;
 	}

+ 0 - 1
src/main/java/com/caimei/modules/product/entity/CmSmalltype.java

@@ -53,7 +53,6 @@ public class CmSmalltype extends DataEntity<CmSmalltype> {
 		this.bigTypeID = bigTypeID;
 	}
 	
-	@Length(min=0, max=10, message="名称长度必须介于 0 和 10 之间")
 	public String getName() {
 		return name;
 	}

+ 74 - 0
src/main/resources/mappings/modules/hehe/CmHeheRelatedImagesMapper.xml

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.modules.hehe.dao.CmHeheRelatedImagesDao">
+    
+	<sql id="cmHeheRelatedImagesColumns">
+		a.id AS "id",
+		a.image AS "image"
+	</sql>
+	
+	<sql id="cmHeheRelatedImagesJoins">
+	</sql>
+    
+	<select id="get" resultType="CmHeheRelatedImages">
+		SELECT 
+			<include refid="cmHeheRelatedImagesColumns"/>
+		FROM cm_hehe_related_images a
+		<include refid="cmHeheRelatedImagesJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="CmHeheRelatedImages">
+		SELECT 
+			<include refid="cmHeheRelatedImagesColumns"/>
+		FROM cm_hehe_related_images a
+		<include refid="cmHeheRelatedImagesJoins"/>
+		<where>
+			
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findAllList" resultType="CmHeheRelatedImages">
+		SELECT 
+			<include refid="cmHeheRelatedImagesColumns"/>
+		FROM cm_hehe_related_images a
+		<include refid="cmHeheRelatedImagesJoins"/>
+		<where>
+			
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert" parameterType="CmHeheRelatedImages"  keyProperty="id" useGeneratedKeys="true">
+		INSERT INTO cm_hehe_related_images(
+			image
+		) VALUES (
+			#{image}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE cm_hehe_related_images SET 	
+			image = #{image}
+		WHERE id = #{id}
+	</update>
+	
+	<delete id="delete">
+		DELETE FROM cm_hehe_related_images
+		WHERE id = #{id}
+	</delete>
+	
+</mapper>

+ 0 - 1
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeBannerForm.jsp

@@ -248,7 +248,6 @@
 		};
 		var observer = new MutationObserver(function (mutations) {
 			$.each(mutations, function (index, item) {
-			    debugger
 				if (item.type === 'childList') {
 					// 在创建新的 element 时调用
 					var target = $(item.target),

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

@@ -119,7 +119,6 @@
     </div>
 </form:form>
 <sys:message content="${message}"/>
-<label style="display: block;font-size: medium;margin-bottom: 5px">一级分类列表</label>
 <label style="display: block;margin-bottom: 5px">注:排序值越小越靠前</label>
 <table id="contentTable" class="table table-striped table-bordered table-condensed">
     <thead>
@@ -167,7 +166,7 @@
                     <a href="javascript:;" onclick="updateStatus('1','${cmBigtype.bigTypeID}','crmValidFlag')">上架</a>
                 </c:if>
                 <a href="${ctx}/product/cmSmalltype/list?bigTypeID=${cmBigtype.bigTypeID}&typeSort=1&mallType=2">二级分类</a>
-                <a href="${ctx}/product/cmBigtype/delete?bigTypeID=${cmBigtype.bigTypeID}&mallType=2">删除</a>
+                <a href="${ctx}/product/cmBigtype/delete?bigTypeID=${cmBigtype.bigTypeID}&mallType=2" onclick="return confirmx('确认要删除该分类吗?删除后需要重新添加', this.href)">删除</a>
             </td>
         </tr>
     </c:forEach>

+ 6 - 6
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheDiscountActivityForm.jsp

@@ -41,23 +41,23 @@
 		<form:hidden path="id"/>
 		<sys:message content="${message}"/>		
 		<div class="control-group">
-			<label class="control-label">活动名称:</label>
+			<label class="control-label"><font color="red">*</font>活动名称:</label>
 			<div class="controls">
-				<form:input path="name" htmlEscape="false" maxlength="30" class="input-xlarge "/>
+				<form:input path="name" htmlEscape="false" maxlength="30" class="input-xlarge required"/>
 			</div>
 		</div>
 		<div class="control-group">
-			<label class="control-label">上架时间:</label>
+			<label class="control-label"><font color="red">*</font>上架时间:</label>
 			<div class="controls">
-				<input id="onlineTime" name="onlineTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+				<input id="onlineTime" name="onlineTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
 					value="<fmt:formatDate value="${cmHeheDiscountActivity.onlineTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
 			</div>
 		</div>
 		<div class="control-group">
-			<label class="control-label">下架时间:</label>
+			<label class="control-label"><font color="red">*</font>下架时间:</label>
 			<div class="controls">
-				<input id="offlineTime" name="offlineTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+				<input id="offlineTime" name="offlineTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
 					value="<fmt:formatDate value="${cmHeheDiscountActivity.offlineTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
 			</div>

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

@@ -83,7 +83,7 @@
 							${cmHeheDiscountActivity.status eq 2?'下架':'上架'}
 					</a>
 					<a href="${ctx}/hehe/heheDiscountActivityProduct/?activityId=${cmHeheDiscountActivity.id}">商品列表</a>
-					<a href="${ctx}/hehe/cmHeheDiscountActivity/form?id=${cmHeheDiscountActivity.id}">编辑</a>
+					<a href="javascript:;" onclick="edit(${cmHeheDiscountActivity.status},${cmHeheDiscountActivity.id})">编辑</a>
 					<a href="${ctx}/hehe/cmHeheDiscountActivity/delete?id=${cmHeheDiscountActivity.id}" onclick="return confirmx('确认要删除该活动吗?', this.href)">删除</a>
 				</td>
 			</tr>
@@ -167,6 +167,14 @@
 			});
 		}
 	}
+
+	function edit(status,id) {
+		if (2 === status) {
+			alertx("请下架后再进行编辑");
+		} else {
+			window.location.href = "${ctx}/hehe/cmHeheDiscountActivity/form?id=" + id;
+		}
+	}
 </script>
 </body>
 </html>

+ 45 - 64
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheFloorContentForm.jsp

@@ -171,7 +171,7 @@
                         var stringify = JSON.stringify(productImageList);
                         $('#images').val(stringify);
                     } else {
-                        alertx("至少上传一张图片");
+                        alertx("至少上传一个商品");
                         return;
                     }
                     var appletsIcon1 = $("#appletsIcon1").val();
@@ -179,7 +179,6 @@
                     var appletsIcon3 = $("#appletsIcon3").val();
                     var appletsIcon4 = $("#appletsIcon4").val();
                     var appletsIcon5 = $("#appletsIcon5").val();
-                    debugger
                     if (templateType == 1 || templateType == 2 || templateType == 3 || templateType == 6 || templateType == 7 || templateType == 8) {
                         if (appletsIcon1 == '') {
                             alertx("请上传广告图1");
@@ -279,77 +278,77 @@
             <tr>
                 <td id="templateTd" style="display: block;height: 580px;overflow-y:scroll;width: 380px !important;">
                     <div>
-                        <div id="pcTemplate" style="position: relative">
-                            <div id="pcTemplate1" class="displayTemplate" style="position: relative;">
+                        <div id="template" style="position: relative">
+                            <div id="template1" class="displayTemplate" style="position: relative;">
                                 <form:radiobutton path="templateType" name="templateType" value="1" label="模板1" id="templateType1"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/1.png">
+                                    <img src="/static/template/hehe/1.png">
                                 </div>
                             </div>
-                            <div id="pcTemplate2" class="displayTemplate">
+                            <div id="template2" class="displayTemplate">
                                 <form:radiobutton path="templateType" name="templateType" value="2" label="模板2" id="templateType2"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/2.png">
+                                    <img src="/static/template/hehe/2.png">
                                 </div>
                             </div>
-                            <div id="pcTemplate3" class="displayTemplate">
+                            <div id="template3" class="displayTemplate">
                                 <form:radiobutton path="templateType" name="templateType" value="3" label="模板3" id="templateType3"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/3.png">
+                                    <img src="/static/template/hehe/3.png">
                                 </div>
                             </div>
-                            <div id="pcTemplate4" class="displayTemplate">
+                            <div id="template4" class="displayTemplate">
                                 <form:radiobutton path="templateType" name="templateType" value="4" label="模板4" id="templateType4"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/4.png">
+                                    <img src="/static/template/hehe/4.png">
                                 </div>
                             </div>
-                            <div id="pcTemplate5" class="displayTemplate">
+                            <div id="template5" class="displayTemplate">
                                 <form:radiobutton path="templateType" name="templateType" value="5" label="模板5" id="templateType5"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/5.png">
+                                    <img src="/static/template/hehe/5.png">
                                 </div>
                             </div>
-                            <div id="pcTemplate6" class="displayTemplate">
+                            <div id="template6" class="displayTemplate">
                                 <form:radiobutton path="templateType" name="templateType" value="6" label="模板6" id="templateType6"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/6.png">
+                                    <img src="/static/template/hehe/6.png">
                                 </div>
                             </div>
-                            <div id="pcTemplate7" class="displayTemplate">
+                            <div id="template7" class="displayTemplate">
                                 <form:radiobutton path="templateType" name="templateType" value="7" label="模板7" id="templateType7"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/7.png">
+                                    <img src="/static/template/hehe/7.png">
                                 </div>
                             </div>
-                            <div id="pcTemplate8" class="displayTemplate">
+                            <div id="template8" class="displayTemplate">
                                 <form:radiobutton path="templateType" name="templateType" value="8" label="模板8" id="templateType8"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/8.png">
+                                    <img src="/static/template/hehe/8.png">
                                 </div>
                             </div>
-                            <div id="pcTemplate9" class="displayTemplate">
+                            <div id="template9" class="displayTemplate">
                                 <form:radiobutton path="templateType" name="templateType" value="9" label="模板9" id="templateType9"
                                                   cssClass="templateButton"
                                                   onclick="showContent()"/>
                                 <div class="templateImageDiv">
-                                    <img src="/static/template/beauty/pc/9.png">
+                                    <img src="/static/template/hehe/9.png">
                                 </div>
                             </div>
                         </div>
@@ -369,7 +368,7 @@
                                         <sys:ckfinder input="appletsIcon1" type="images" uploadPath="/photo"
                                                       selectMultiple="false"
                                                       maxWidth="100" maxHeight="100"/> <br>
-                                        <label id="pcImageSize1">建议图片分辨率1184px*160px</label>
+                                        <label id="imageSize1">建议图片分辨率1184px*160px</label>
                                     </div>
                                 </div>
                             </div>
@@ -391,7 +390,7 @@
                                         <sys:ckfinder input="appletsIcon2" type="images" uploadPath="/photo"
                                                       selectMultiple="false"
                                                       maxWidth="100" maxHeight="100"/><br>
-                                        <label id="pcImageSize2">建议图片分辨率344px*268px</label>
+                                        <label id="imageSize2">建议图片分辨率344px*268px</label>
                                     </div>
                                 </div>
                             </div>
@@ -413,7 +412,7 @@
                                         <sys:ckfinder input="appletsIcon3" type="images" uploadPath="/photo"
                                                       selectMultiple="false"
                                                       maxWidth="100" maxHeight="100"/><br>
-                                        <label id="pcImageSize3">建议图片分辨率344px*268px</label>
+                                        <label id="imageSize3">建议图片分辨率344px*268px</label>
                                     </div>
                                 </div>
                             </div>
@@ -435,7 +434,7 @@
                                         <sys:ckfinder input="appletsIcon4" type="images" uploadPath="/photo"
                                                       selectMultiple="false"
                                                       maxWidth="100" maxHeight="100"/><br>
-                                        <label id="pcImageSize4">建议图片分辨率344px*268px</label>
+                                        <label id="imageSize4">建议图片分辨率344px*268px</label>
                                     </div>
                                 </div>
                             </div>
@@ -457,7 +456,7 @@
                                         <sys:ckfinder input="appletsIcon5" type="images" uploadPath="/photo"
                                                       selectMultiple="false"
                                                       maxWidth="100" maxHeight="100"/><br>
-                                        <label id="pcImageSize5">建议图片分辨率344px*268px</label>
+                                        <label id="imageSize5">建议图片分辨率344px*268px</label>
                                     </div>
                                 </div>
                             </div>
@@ -635,44 +634,26 @@
             }
 
             //广告图建议尺寸
-            /*if (templateType == 11) {
-                $("#pcImageSize1").text("建议图片分辨率1140px*150px");
-                $("#appletsImageSize1").text("建议图片分辨率702px*240px");
-                $("#pcImageSize2").text("建议图片分辨率560px*220px");
-                $("#appletsImageSize2").text("建议图片分辨率339px*260px");
-                $("#pcImageSize3").text("建议图片分辨率560px*220px");
-                $("#appletsImageSize3").text("建议图片分辨率339px*260px");
-            } else if (templateType == 12) {
-                $("#pcImageSize1").text("建议图片分辨率660px*330px");
-                $("#appletsImageSize1").text("建议图片分辨率339px*516px");
-                $("#pcImageSize2").text("建议图片分辨率470px*160px");
-                $("#appletsImageSize2").text("建议图片分辨率339px*246px");
-                $("#pcImageSize3").text("建议图片分辨率470px*160px");
-                $("#appletsImageSize3").text("建议图片分辨率339px*246px");
-            } else if (templateType == 13) {
-                $("#pcImageSize1").text("建议图片分辨率640px*320px");
-                $("#appletsImageSize1").text("建议图片分辨率339px*516px");
-                $("#pcImageSize2").text("建议图片分辨率240px*150px");
-                $("#appletsImageSize2").text("建议图片分辨率339px*246px");
-                $("#pcImageSize3").text("建议图片分辨率240px*150px");
-                $("#appletsImageSize3").text("建议图片分辨率339px*246px");
-                $("#pcImageSize4").text("建议图片分辨率240px*150px");
-                $("#appletsImageSize4").text("建议图片分辨率339px*246px");
-                $("#pcImageSize5").text("建议图片分辨率240px*150px");
-                $("#appletsImageSize5").text("建议图片分辨率339px*246px");
-            } else if (templateType == 15 || templateType == 16 || templateType == 19 || templateType == 20) {
-                $("#pcImageSize1").text("建议图片分辨率1140px*150px");
-                $("#appletsImageSize1").text("建议图片分辨率702px*240px");
-                $("#pcImageSize2").text("建议图片分辨率660px*330px");
-                $("#appletsImageSize2").text("建议图片分辨率339px*516px");
-                $("#pcImageSize3").text("建议图片分辨率460px*330px");
-                $("#appletsImageSize3").text("建议图片分辨率339px*516px");
-            } else if (templateType == 17 || templateType == 18) {
-                $("#pcImageSize1").text("建议图片分辨率660px*330px");
-                $("#appletsImageSize1").text("建议图片分辨率339px*516px");
-                $("#pcImageSize2").text("建议图片分辨率460px*330px");
-                $("#appletsImageSize2").text("建议图片分辨率339px*516px");
-            }*/
+            if (templateType == 1 || templateType == 8) {
+                $("#imageSize1").text("建议图片分辨率702px*240px");
+            } else if (templateType == 2) {
+                $("#imageSize1").text("建议图片分辨率702px*240px");
+                $("#imageSize2").text("建议图片分辨率343px*524px");
+                $("#imageSize3").text("建议图片分辨率343px*524px");
+            } else if (templateType == 3) {
+                $("#imageSize1").text("建议图片分辨率343px*524px");
+                $("#imageSize2").text("建议图片分辨率343px*524px");
+            } else if (templateType == 6) {
+                $("#imageSize1").text("建议图片分辨率343px*524px");
+                $("#imageSize2").text("建议图片分辨率343px*254px");
+                $("#imageSize3").text("建议图片分辨率343px*254px");
+            } else if (templateType == 7) {
+                $("#imageSize1").text("建议图片分辨率343px*524px");
+                $("#imageSize2").text("建议图片分辨率343px*254px");
+                $("#imageSize3").text("建议图片分辨率343px*254px");
+                $("#imageSize4").text("建议图片分辨率343px*254px");
+                $("#imageSize5").text("建议图片分辨率343px*254px");
+            }
             showImage();
             batchSaveSort();
         } else {

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

@@ -560,8 +560,8 @@
 	});
 
 	// 网站分类
-	var currentBigtype = ${cmHeheProduct.bigTypeId};
-	var currentSmalltype = ${cmHeheProduct.smallTypeId};
+	var currentBigtype = ${empty cmHeheProduct.bigTypeId?0:cmHeheProduct.bigTypeId};
+	var currentSmalltype = ${empty cmHeheProduct.smallTypeId?0:cmHeheProduct.smallTypeId};
 	var bigTypeList = [
 		<c:forEach items="${classify.bigTypeList}" var="bigType" varStatus="index">
 		<c:if test="${index.index > 0}">, </c:if>

+ 184 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheRelatedImagesForm.jsp

@@ -0,0 +1,184 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>图片管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		.iconBox {
+			font-size: 0;
+		}
+
+		.controls .conList {
+			display: inline-block;
+			margin-right: 15px;
+		}
+
+		.conList .btn:nth-of-type(1) {
+			margin-left: 25px;
+		}
+
+		.upload-content {
+			margin-top: -70px;
+		}
+
+		.upload-content .conList .btn:nth-of-type(1) {
+			width: 90px;
+			height: 100px;
+			border: 2px solid #eee;
+			background: #fff;
+			position: relative;
+		}
+
+		.upload-content .conList .btn:nth-of-type(1) > div {
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+			color: #666;
+		}
+
+		.upload-content .conList .btn:nth-of-type(1) span {
+			font-size: 35px;
+		}
+
+		.upload-content .conList .btn:nth-of-type(1) h5 {
+			color: #666;
+		}
+
+		.cancel-upload {
+			background: transparent;
+			border: none;
+			box-shadow: none;
+			position: relative;
+			top: -38px;
+			left: -25px;
+			cursor: pointer;
+			z-index: 100;
+		}
+
+		.upload-content .conList ol li {
+			width: 114px;
+			min-height: 80px;
+			text-align: center;
+			background: #fff;
+			position: relative;
+			top: 120px;
+			margin-left: 2px;
+		}
+
+		.hide-pic {
+			display: none !important;
+		}
+
+		.paramRow {
+			margin-top: 10px;
+		}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			//$("#name").focus();
+			$("#inputForm").validate({
+				submitHandler: function(form){
+					var image = $("#image").val();
+					if (image === '') {
+						alertx("请上传二维码图片");
+						return false;
+					}
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="${ctx}/hehe/cmHeheRelatedImages/form?id=1">首页二维码</a></li>
+	</ul><br/>
+	<form:form id="inputForm" modelAttribute="cmHeheRelatedImages" action="${ctx}/hehe/cmHeheRelatedImages/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<sys:message content="${message}"/>		
+		<div class="control-group iconBox">
+			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>二维码:</label>
+			<div class="controls upload-content" id="imageBox1">
+				<div class="conList">
+					<form:hidden id="image" path="image" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+					<sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+								  maxHeight="100"/>
+					<br>
+					<label style="margin-left: 150px">建议图片分辨率500px*500px</label>
+				</div>
+			</div>
+		</div>
+		<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)"/>
+		</div>
+	</form:form>
+<script>
+	$(function () {
+		$('.upload-content .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
+		$('.upload-content .conList .btn:nth-of-type(2)').after('<img class="cancel-upload" src="/static/images/close-btn1.png">').remove();
+		$('.upload-content .conList').find('.cancel-upload').hide();
+		var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
+		var MutationObserverConfig = {
+			childList: true,
+			subtree: true,
+			characterData: true
+		};
+		var observer = new MutationObserver(function (mutations) {
+			$.each(mutations, function (index, item) {
+				if (item.type === 'childList') {
+					// 在创建新的 element 时调用
+					var target = $(item.target),
+							thisWrapper = target.closest('.conList'),
+							nextEle = thisWrapper.next();
+					thisWrapper.find('li').css('z-index', 99);
+					thisWrapper.find('.cancel-upload').show();
+					if (nextEle.hasClass('hide-pic')) {
+						nextEle.removeClass('hide-pic');
+					}
+				}
+			})
+		});
+		var observeEle = document.getElementsByClassName('upload-content')[0];
+		observer.observe(observeEle, MutationObserverConfig)
+		$('body').on('click', '.cancel-upload', function () {
+			var wrapper = $(this).closest('.conList');
+			wrapper.find('li').css('z-index', '-1');
+			wrapper.find('input').val('');
+			$(this).hide();
+			wrapper.removeClass("hide-pic");
+			wrapper.parent().append(wrapper.clone());
+			wrapper.remove();
+			$(".conList").each(function (i, ele) {
+				if ($(ele).find("input.input-xlarge").val()) {
+					$(ele).next().removeClass("hide-pic")
+				}
+			})
+		});
+		$(window).on("load", function () {
+			setTimeout(function () {
+				$("#imageBox1").find("input.input-xlarge").each(function (i, ele) {
+					if ($(ele).val()) {
+						$(ele).next().find("li").css("z-index", "99");
+						$(ele).parents(".conList").find(".cancel-upload").show();
+						$(ele).parents(".conList").next().removeClass("hide-pic")
+					}
+				});
+			}, 200);
+		});
+	});
+</script>
+</body>
+</html>

+ 66 - 0
src/main/webapp/WEB-INF/views/modules/hehe/cmHeheRelatedImagesList.jsp

@@ -0,0 +1,66 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
+<html>
+<head>
+	<title>图片管理</title>
+	<meta name="decorator" content="default"/>
+	<style type="text/css">
+		.table th{text-align: center;}
+		.table td{text-align: center;}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			
+		});
+		function page(n,s){
+			$("#pageNo").val(n);
+			$("#pageSize").val(s);
+			$("#searchForm").submit();
+        	return false;
+        }
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li class="active"><a href="${ctx}/hehe/cmHeheRelatedImages/">图片列表</a></li>
+		<shiro:hasPermission name="hehe:cmHeheRelatedImages:edit"><li><a href="${ctx}/hehe/cmHeheRelatedImages/form">图片添加</a></li></shiro:hasPermission>
+	</ul>
+	<form:form id="searchForm" modelAttribute="cmHeheRelatedImages" action="${ctx}/hehe/cmHeheRelatedImages/" 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">
+			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+			<div class="clearfix"></div>
+		</div>
+	</form:form>
+	<sys:message content="${message}"/>
+	<table id="contentTable" class="table table-striped table-bordered table-condensed">
+		<thead>
+			<tr>
+				<th>id</th>
+				<th>图片:1微信群二维码</th>
+				<shiro:hasPermission name="hehe:cmHeheRelatedImages:edit"><th>操作</th></shiro:hasPermission>
+			</tr>
+		</thead>
+		<tbody>
+		<c:forEach items="${page.list}" var="cmHeheRelatedImages">
+			<tr>
+				<td><a href="${ctx}/hehe/cmHeheRelatedImages/form?id=${cmHeheRelatedImages.id}">
+					${cmHeheRelatedImages.id}
+				</a></td>
+				<td>
+					${cmHeheRelatedImages.image}
+				</td>
+				<shiro:hasPermission name="hehe:cmHeheRelatedImages:edit"><td>
+    				<a href="${ctx}/hehe/cmHeheRelatedImages/form?id=${cmHeheRelatedImages.id}">编辑</a>
+    				<shiro:hasPermission name="hehe:cmHeheRelatedImages:delete">
+					<a href="${ctx}/hehe/cmHeheRelatedImages/delete?id=${cmHeheRelatedImages.id}" onclick="return confirmx('确认要删除该图片吗?', this.href)">删除</a>
+					</shiro:hasPermission>
+				</td></shiro:hasPermission>
+			</tr>
+		</c:forEach>
+		</tbody>
+	</table>
+	<div class="pagination">${page}</div>
+</body>
+</html>

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

@@ -121,7 +121,7 @@
 <body>
 	<ul class="nav nav-tabs">
 		<li><a href="${ctx}/product/cmSmalltype/list?bigTypeID=${bigTypeID}&mallType=2">二级分类列表</a></li>
-		<li class="active"><a href="${ctx}/product/cmSmalltype/form?id=${cmSmalltype.smallTypeID}&typeSort=${cmSmalltype.typeSort}&mallType=2">二级分类<shiro:hasPermission name="product:cmSmalltype:edit">${not empty cmSmalltype.smallTypeID?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission name="product:cmSmalltype:edit">查看</shiro:lacksPermission></a></li>
+		<li class="active"><a href="${ctx}/product/cmSmalltype/form?id=${cmSmalltype.smallTypeID}&bigTypeId=${bigTypeID}&mallType=2">二级分类<shiro:hasPermission name="product:cmSmalltype:edit">${not empty cmSmalltype.smallTypeID?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission name="product:cmSmalltype:edit">查看</shiro:lacksPermission></a></li>
 	</ul><br/>
 	<form:form id="inputForm" modelAttribute="cmSmalltype" action="${ctx}/product/cmSmalltype/save" method="post" class="form-horizontal">
 		<form:hidden path="id"/>
@@ -131,7 +131,7 @@
 		<div class="control-group">
 			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>二级分类名称:</label>
 			<div class="controls">
-				<form:input path="name" cssStyle="position: relative" htmlEscape="false" placeholder="最多输入30个汉字" maxlength="8" class="input-xlarge"/>
+				<form:input path="name" cssStyle="position: relative" htmlEscape="false" placeholder="最多输入30个汉字" maxlength="30" class="input-xlarge"/>
 			</div>
 		</div>
 		<div class="control-group iconBox">

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

@@ -160,7 +160,7 @@
 					<c:if test="${cmSmalltype.crmValidFlag ne 1 }">
 						<a href="javascript:;" onclick="updateStatus('1','${cmSmalltype.smallTypeID}','crmValidFlag')">上架</a>
 					</c:if>
-					<a href="${ctx}/product/cmSmalltype/delete?smallTypeID=${cmSmalltype.smallTypeID}&bigTypeID=${bigTypeID}&mallType=2">删除</a>
+					<a href="${ctx}/product/cmSmalltype/delete?smallTypeID=${cmSmalltype.smallTypeID}&bigTypeID=${bigTypeID}&mallType=2" onclick="return confirmx('确认要删除该分类吗?删除后需要重新添加', this.href)">删除</a>
 				</td>
 			</tr>
 		</c:forEach>

+ 5 - 0
src/main/webapp/WEB-INF/views/modules/hehe/heheDiscountActivityProductForm.jsp

@@ -9,6 +9,11 @@
 			//$("#name").focus();
 			$("#inputForm").validate({
 				submitHandler: function(form){
+					var productId = $("#productId").val();
+					if (productId === '') {
+						alertx("请选择商品");
+						return false;
+					}
 					loading('正在提交,请稍等...');
 					form.submit();
 				},

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

@@ -155,7 +155,7 @@
 					</c:if>
                     <a href="${ctx}/hehe/heheHomeType/form?id=${heheHomeType.id}&mallType=2">编辑</a>
                     <a href="${ctx}/hehe/heheHomeTypeProduct/?homeTypeId=${heheHomeType.id}">商品列表</a>
-                    <a href="${ctx}/hehe/heheHomeType/delete?id=${heheHomeType.id}">删除</a>
+                    <a href="${ctx}/hehe/heheHomeType/delete?id=${heheHomeType.id}" onclick="return confirmx('确认要删除该分类吗?', this.href)">删除</a>
 				</td>
 			</tr>
 		</c:forEach>

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

@@ -107,6 +107,14 @@
 				return;
 			}, {buttonsFocus: 1, persistent: true});
 		}
+
+		/**
+		 * @param obj
+		 * jquery控制input只能输入数字
+		 */
+		function onlynum(obj) {
+			obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+		}
 	</script>
 </head>
 <body>
@@ -120,7 +128,7 @@
 		<form:hidden path="homeTypeId"/>
 		<div class="ul-form">
 			 <label>商品ID:</label>
-				<form:input path="productId" htmlEscape="false" class="input-medium"/>
+				<form:input path="productId" htmlEscape="false" class="input-medium" onkeyup="onlynum(this)"/>
 			 <label>商品名称:</label>
 			 	<form:input path="name" htmlEscape="false" class="input-medium"/>
 			 <label>供应商名称:</label>

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

@@ -539,7 +539,7 @@
                                 <c:if test="${op.productPromotion.mode ne 1}">
                                     <fmt:formatNumber value="${op.price}" type="currency"/>
                                 </c:if>
-                                <c:if test="${op.ladderPriceFlag eq 1 || op.isActProduct eq 2}">
+                                <c:if test="${op.ladderPriceFlag eq 1 || op.isActProduct eq 1}">
                                     <a href="javascript:;" class="ladderPrice"><span> (阶梯价格)</span>
                                         <c:if test="${not empty op.orderProductLadderPriceList}">
                                             <div class="list">

二进制
src/main/webapp/static/template/hehe/1.png


二进制
src/main/webapp/static/template/hehe/2.png


二进制
src/main/webapp/static/template/hehe/3.png


二进制
src/main/webapp/static/template/hehe/4.png


二进制
src/main/webapp/static/template/hehe/5.png


二进制
src/main/webapp/static/template/hehe/6.png


二进制
src/main/webapp/static/template/hehe/7.png


二进制
src/main/webapp/static/template/hehe/8.png


二进制
src/main/webapp/static/template/hehe/9.png