Bläddra i källkod

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

huangzhiguo 2 år sedan
förälder
incheckning
942a577470
44 ändrade filer med 9582 tillägg och 963 borttagningar
  1. 47 0
      src/main/java/com/caimei/modules/archive/utils/keyTask.java
  2. 23 4
      src/main/java/com/caimei/modules/baike/dao/CmBaikeProductDao.java
  3. 57 0
      src/main/java/com/caimei/modules/baike/entity/CmBaikeProduct.java
  4. 108 0
      src/main/java/com/caimei/modules/baike/entity/CmBaikeReferenceInfo.java
  5. 32 0
      src/main/java/com/caimei/modules/baike/entity/CmBaikeTextInfo.java
  6. 27 1
      src/main/java/com/caimei/modules/baike/entity/CmBaikeType.java
  7. 5 5
      src/main/java/com/caimei/modules/baike/service/CmBaikeHotSearchService.java
  8. 126 63
      src/main/java/com/caimei/modules/baike/service/CmBaikeProductService.java
  9. 230 8
      src/main/java/com/caimei/modules/baike/web/CmBaikeProductController.java
  10. 9 0
      src/main/java/com/caimei/modules/baike/web/CmBaikeTypeController.java
  11. 22 1
      src/main/java/com/caimei/modules/coupon/dao/CmCouponDao.java
  12. 10 1
      src/main/java/com/caimei/modules/coupon/entity/CmCoupon.java
  13. 9 0
      src/main/java/com/caimei/modules/coupon/entity/CmVipCoupon.java
  14. 9 0
      src/main/java/com/caimei/modules/coupon/entity/SvipCouponForm.java
  15. 288 2
      src/main/java/com/caimei/modules/coupon/service/CmVipCouponService.java
  16. 40 0
      src/main/java/com/caimei/modules/coupon/web/CmVipCouponController.java
  17. 3 3
      src/main/java/com/caimei/modules/supers/service/CmSvipPackageService.java
  18. 10 1
      src/main/java/com/caimei/modules/user/entity/ClubTemporary.java
  19. 1 1
      src/main/java/com/caimei/modules/user/entity/CmUser.java
  20. 4 0
      src/main/java/com/caimei/modules/user/service/ClubTemporaryService.java
  21. 15 13
      src/main/java/com/caimei/modules/user/service/CmBehaviorRecordService.java
  22. 10 4
      src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java
  23. 2 1
      src/main/resources/mappings/modules/baike/CmBaikeHotSearchMapper.xml
  24. 56 5
      src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml
  25. 21 7
      src/main/resources/mappings/modules/baike/CmBaikeTypeMapper.xml
  26. 96 4
      src/main/resources/mappings/modules/coupon/CmCouponMapper.xml
  27. 24 20
      src/main/resources/mappings/modules/user/ClubTemporaryMapper.xml
  28. 1492 402
      src/main/webapp/WEB-INF/views/modules/baikePage/auditBaikeProductPage.jsp
  29. 1913 191
      src/main/webapp/WEB-INF/views/modules/baikePage/checkBaikePage.jsp
  30. 12 12
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeHotSearchForm.jsp
  31. 863 146
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp
  32. 2361 0
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.old.jsp
  33. 41 41
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductList.jsp
  34. 166 0
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeTypeForm.jsp
  35. 3 3
      src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeTypeList.jsp
  36. 16 0
      src/main/webapp/WEB-INF/views/modules/baikePage/entryGuidance.jsp
  37. 8 8
      src/main/webapp/WEB-INF/views/modules/baikePage/shopBaikeProductList.jsp
  38. 8 8
      src/main/webapp/WEB-INF/views/modules/super/cmSvipPackageForm.jsp
  39. 980 0
      src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponConfiguration.jsp
  40. 9 2
      src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponForm.jsp
  41. 4 3
      src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponList.jsp
  42. 8 1
      src/main/webapp/WEB-INF/views/modules/user/clubTemporaryForm.jsp
  43. 6 2
      src/main/webapp/WEB-INF/views/modules/userNew/recordLinkageForm.jsp
  44. 408 0
      src/main/webapp/static/content-edit.js

+ 47 - 0
src/main/java/com/caimei/modules/archive/utils/keyTask.java

@@ -0,0 +1,47 @@
+//package com.caimei.modules.archive.utils;
+//
+//import com.alibaba.fastjson.JSONObject;
+//import com.caimei.modules.product.dao.KeywordFrequencyDao;
+//import com.caimei.modules.product.entity.SearchFrequency;
+//import com.caimei.modules.product.entity.SearchFrequencyVo;
+//import com.caimei.modules.product.service.RedisServiceCom;
+//import lombok.AllArgsConstructor;
+//import lombok.NoArgsConstructor;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.scheduling.annotation.EnableScheduling;
+//import org.springframework.scheduling.annotation.Scheduled;
+//
+//import java.util.List;
+//
+//@Slf4j
+//@Configuration
+//@EnableScheduling
+//@NoArgsConstructor
+//@AllArgsConstructor
+///**
+// * 获取已加入关键词库的关键词进行缓存
+// */
+//public class keyTask {
+//    @Autowired
+//    private KeywordFrequencyDao keywordFrequencyDao;
+//
+//    @Autowired
+//    private RedisServiceCom redisService;
+//    @Scheduled(cron = "0 0 2 0/15 * ? ")
+//    public void keyCache(){
+//        //查询已加入关键词库的关键词
+//        List<SearchFrequencyVo> keywordList=keywordFrequencyDao.getKeywordList();
+//        for (SearchFrequencyVo searchFrequency:keywordList) {
+//            String str=searchFrequency.getKeyword();
+//            String key="";
+//            for(int i=0;i<str.length();i++){
+//                key+=str.charAt(i);
+//                List<SearchFrequencyVo> searchFrequencyVos = keywordFrequencyDao.getvalueList(key);
+//                String keyword = JSONObject.toJSONString(searchFrequencyVos);//有值的字段才转
+//                redisService.set(key,keyword,60L * 60 * 24 * 30);
+//            }
+//        }
+//    }
+//}

+ 23 - 4
src/main/java/com/caimei/modules/baike/dao/CmBaikeProductDao.java

@@ -1,12 +1,9 @@
 package com.caimei.modules.baike.dao;
 
-import com.caimei.modules.baike.entity.CmBaikeProductFile;
-import com.caimei.modules.baike.entity.CmBaikeProductParam;
-import com.caimei.modules.baike.entity.CmBaikeProductQuestion;
+import com.caimei.modules.baike.entity.*;
 import com.caimei.modules.user.entity.NewCmShop;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
-import com.caimei.modules.baike.entity.CmBaikeProduct;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
@@ -43,6 +40,12 @@ public interface CmBaikeProductDao extends CrudDao<CmBaikeProduct> {
 
     void deleteQuestionsByProductId(String id);
 
+    void delMaterialinfoBYProductId(String id);
+
+    void delTextListByEntryId(String id);
+
+
+
     void insertProductImage(@Param("authImage") String authImage, @Param("produtId") String productId, @Param("imageType") int imageType);
 
     void insertProductParam(@Param("name") String name,@Param("content") String content,@Param("productId") String productId);
@@ -73,4 +76,20 @@ public interface CmBaikeProductDao extends CrudDao<CmBaikeProduct> {
 
     void updateRecommendType(@Param("productId") String productId, @Param("recommendType") Integer recommendType);
 
+    List<CmBaikeTextInfo> getTextInfo(@Param("productId") String productId);
+
+    void saveMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo);
+
+    void upMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo);
+
+    void insertText(CmBaikeTextInfo cmBaikeTextInfo);
+
+
+    List<CmBaikeReferenceInfo> getMaterialInfo(@Param("productId") Integer productId);
+
+    void delMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo);
+
+    CmBaikeReferenceInfo getMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo);
+
+
 }

+ 57 - 0
src/main/java/com/caimei/modules/baike/entity/CmBaikeProduct.java

@@ -52,10 +52,58 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	private Integer emptyNum;	//空数据条数
 	private Date addTime;		// 添加时间
 
+	private String  referenceImgUrl;
+
+	public String getReferenceImgUrl() {
+		return referenceImgUrl;
+	}
+
+	public void setReferenceImgUrl(String referenceImgUrl) {
+		this.referenceImgUrl = referenceImgUrl;
+	}
+
+	private String  referenceList;
+
+	public String getReferenceList() {
+		return referenceList;
+	}
+
+	public void setReferenceList(String referenceList) {
+		this.referenceList = referenceList;
+	}
+	private List<CmBaikeReferenceInfo> materialInfo;
+
+	public List<CmBaikeReferenceInfo> getMaterialInfo() {
+		return materialInfo;
+	}
+
+	public void setMaterialInfo(List<CmBaikeReferenceInfo> materialInfo) {
+		this.materialInfo = materialInfo;
+	}
 
 	private Integer topFlag;	//是否置顶标识:0否,1是
 	private String typeName;	//分类名称
 	private List<CmBaikeProductParam> paramList;	// 参数列表
+	private List<CmBaikeTextInfo> textInfolist;
+
+	public List<CmBaikeTextInfo> getTextInfolist() {
+		return textInfolist;
+	}
+
+	public void setTextInfolist(List<CmBaikeTextInfo> textInfolist) {
+		this.textInfolist = textInfolist;
+	}
+
+	private String textInfolistStr;//正文列表
+
+	public String getTextInfolistStr() {
+		return textInfolistStr;
+	}
+
+	public void setTextInfolistStr(String textInfolistStr) {
+		this.textInfolistStr = textInfolistStr;
+	}
+
 	private List<String> authImageList;			// 产品认证图片列表
 	private List<String> displayImageList;		// 效果展示图片列表
 	private List<CmBaikeProductQuestion> questionList;		//问题列表
@@ -72,6 +120,15 @@ public class CmBaikeProduct extends DataEntity<CmBaikeProduct> {
 	private String fileIds;			// 文件id,以,隔开
 	private String productIds;		// 产品/仪器id,以,隔开
 	private String[] recommendParams;	// 相关推荐产品/仪器json数据
+    private String entryId;//词条id
+
+	public String getEntryId() {
+		return entryId;
+	}
+
+	public void setEntryId(String entryId) {
+		this.entryId = entryId;
+	}
 
 	public CmBaikeProduct() {
 		super();

+ 108 - 0
src/main/java/com/caimei/modules/baike/entity/CmBaikeReferenceInfo.java

@@ -0,0 +1,108 @@
+package com.caimei.modules.baike.entity;
+
+import lombok.Data;
+
+import java.sql.Timestamp;
+
+@Data
+public class CmBaikeReferenceInfo {
+    private Integer id;
+    /**
+     * 参考类型资料(1.网络;2.著作;3.其他)
+     */
+    private Integer referenceType;
+    /**
+     * 网址
+     */
+    private String website;
+    /**
+     * 文章名字
+     */
+    private String articleName;
+    /**
+     * 网址名称
+     */
+    private String websiteName;
+    /**
+     * 发表时间
+     */
+    private Timestamp publishTime;
+
+    /**
+     * 发表时间
+     */
+    private String publishTimeStr;
+
+    /**
+     * 引文时间
+     */
+    private Timestamp acitationTime;
+
+    /**
+     * 引文时间
+     */
+    private String acitationTimeStr;
+    /**
+    /**
+     * 作者
+     */
+    private String author;
+    /**
+     * 著作名
+     */
+    private String workName;
+    /**
+     * 出版地
+     */
+    private String publicationPlace;
+    /**
+     * 出版社
+     */
+    private String press;
+    /**
+     * 出版年
+     */
+    private Timestamp publicationYear;
+
+    /**
+     * 出版年
+     */
+    private String publicationYearStr;
+    /**
+     * 引文页码
+     */
+    private String acitationWeb;
+    /**
+     * 参考资料说明
+     */
+    private String referenceDescription;
+    /**
+     * 图片描述
+     */
+    private String imageDescription;
+    /**
+     * 图片地址
+     */
+    private String imageUrl;
+    /**
+     * 词条id
+     */
+    private Integer productId;
+    /**
+     * 词条内容(1:义项名;2:词条概述;3:信息栏;4:正文)
+     */
+    private String productType;
+    /**
+     * 1:添加;2编辑
+     */
+    private String flagId;
+    /**
+     * 资料id用于前端传值修改
+     */
+    private String  zlId;
+
+    /**
+     * 关联id
+     */
+    private String ctrlId;
+}

+ 32 - 0
src/main/java/com/caimei/modules/baike/entity/CmBaikeTextInfo.java

@@ -0,0 +1,32 @@
+package com.caimei.modules.baike.entity;
+
+import lombok.Data;
+
+@Data
+public class CmBaikeTextInfo {
+    private Integer id;
+    /**
+     * 信息类型(1:定义;2:原理;3:特点;4:应用)
+     */
+    private Integer textType;
+    /**
+     * 目录内容
+     */
+    private String dictionaryContent;
+    /**
+     * 词条id
+     */
+    private String productId;
+    /**
+     * 参考资料id
+     */
+    private Integer referenceId;
+    /**
+     * 父级id
+     */
+    private Integer parentId;
+    /**
+     * 目录类型(1:一级目录;2:二级目录;3:内容
+     */
+    private Integer dictionaryType;
+}

+ 27 - 1
src/main/java/com/caimei/modules/baike/entity/CmBaikeType.java

@@ -20,7 +20,9 @@ public class CmBaikeType extends DataEntity<CmBaikeType> {
 	private Integer status;		// 状态:0停用,1启用
 	private Date addTime;		// 添加时间
 	private Integer addBy;		// 添加人
-
+    private String pcBanner;	//pc端banner
+	private String appBanner;	//移动端banner
+	private String bannerLink;	//banner跳转链接
 	private String addUserName;		//添加人名称
 	
 	public CmBaikeType() {
@@ -88,4 +90,28 @@ public class CmBaikeType extends DataEntity<CmBaikeType> {
 	public void setAddUserName(String addUserName) {
 		this.addUserName = addUserName;
 	}
+
+	public void setPcBanner(String pcBanner) {
+		this.pcBanner = pcBanner;
+	}
+
+	public void setAppBanner(String appBanner) {
+		this.appBanner = appBanner;
+	}
+
+	public void setBannerLink(String bannerLink) {
+		this.bannerLink = bannerLink;
+	}
+
+	public String getPcBanner() {
+		return pcBanner;
+	}
+
+	public String getAppBanner() {
+		return appBanner;
+	}
+
+	public String getBannerLink() {
+		return bannerLink;
+	}
 }

+ 5 - 5
src/main/java/com/caimei/modules/baike/service/CmBaikeHotSearchService.java

@@ -58,13 +58,13 @@ public class CmBaikeHotSearchService extends CrudService<CmBaikeHotSearchDao, Cm
 
 	@Transactional(readOnly = false)
 	public void saveBanner(CmBaikeBanner cmBaikeBanner) {
-        if (1 == cmBaikeBanner.getBannerType()) {
+//        if (1 == cmBaikeBanner.getBannerType()) {
             cmBaikeBanner.setProductPcBanner(UploadPicUtils.saveImageToServer(cmBaikeBanner.getProductPcBanner()));
             cmBaikeBanner.setProductAppBanner(UploadPicUtils.saveImageToServer(cmBaikeBanner.getProductAppBanner()));
-        } else {
-            cmBaikeBanner.setInstrumentPcBanner(UploadPicUtils.saveImageToServer(cmBaikeBanner.getInstrumentPcBanner()));
-            cmBaikeBanner.setInstrumentAppBanner(UploadPicUtils.saveImageToServer(cmBaikeBanner.getInstrumentAppBanner()));
-        }
+//        } else {
+//            cmBaikeBanner.setInstrumentPcBanner(UploadPicUtils.saveImageToServer(cmBaikeBanner.getInstrumentPcBanner()));
+//            cmBaikeBanner.setInstrumentAppBanner(UploadPicUtils.saveImageToServer(cmBaikeBanner.getInstrumentAppBanner()));
+//        }
 		cmBaikeHotSearchDao.saveBanner(cmBaikeBanner);
 	}
 }

+ 126 - 63
src/main/java/com/caimei/modules/baike/service/CmBaikeProductService.java

@@ -39,43 +39,43 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 
 	public CmBaikeProduct get(String id) {
 		CmBaikeProduct cmBaikeProduct = super.get(id);
-		String marketTime = cmBaikeProduct.getMarketTime();
-		if (StringUtils.isNotEmpty(marketTime)) {
-			String[] split = marketTime.split("-");
-			int length = split.length;
-			if (length > 0) {
-				cmBaikeProduct.setMarketYear(Integer.parseInt(split[0]));
-				if (length > 1) {
-					String splitMonth = split[1];
-					Integer marketMonth = Integer.parseInt(splitMonth.startsWith("0") ? splitMonth.replace("0", "") : splitMonth);
-					cmBaikeProduct.setMarketMonth(marketMonth);
-					if (length > 2) {
-						String splitDay = split[2];
-						Integer marketDay = Integer.parseInt(splitDay.startsWith("0") ? splitDay.replace("0", "") : splitDay);
-						cmBaikeProduct.setMarketDay(marketDay);
-					}
-				}
-			}
-		}
-		String nmpaTime = cmBaikeProduct.getNmpaTime();
-		if (StringUtils.isNotEmpty(nmpaTime)) {
-			String[] split = nmpaTime.split("-");
-			int length = split.length;
-			if (length > 0) {
-				cmBaikeProduct.setNmpaYear(Integer.parseInt(split[0]));
-				if (length > 1) {
-					String splitMonth = split[1];
-					Integer nmpaMonth = Integer.parseInt(splitMonth.startsWith("0") ? splitMonth.replace("0", "") : splitMonth);
-					cmBaikeProduct.setNmpaMonth(nmpaMonth);
-					if (length > 2) {
-						String splitDay = split[2];
-						Integer nmpaDay = Integer.parseInt(splitDay.startsWith("0") ? splitDay.replace("0", "") : splitDay);
-						cmBaikeProduct.setNmpaDay(nmpaDay);
-					}
-				}
-			}
-
-		}
+//		String marketTime = cmBaikeProduct.getMarketTime();
+//		if (StringUtils.isNotEmpty(marketTime)) {
+//			String[] split = marketTime.split("-");
+//			int length = split.length;
+//			if (length > 0) {
+//				cmBaikeProduct.setMarketYear(Integer.parseInt(split[0]));
+//				if (length > 1) {
+//					String splitMonth = split[1];
+//					Integer marketMonth = Integer.parseInt(splitMonth.startsWith("0") ? splitMonth.replace("0", "") : splitMonth);
+//					cmBaikeProduct.setMarketMonth(marketMonth);
+//					if (length > 2) {
+//						String splitDay = split[2];
+//						Integer marketDay = Integer.parseInt(splitDay.startsWith("0") ? splitDay.replace("0", "") : splitDay);
+//						cmBaikeProduct.setMarketDay(marketDay);
+//					}
+//				}
+//			}
+//		}
+//		String nmpaTime = cmBaikeProduct.getNmpaTime();
+//		if (StringUtils.isNotEmpty(nmpaTime)) {
+//			String[] split = nmpaTime.split("-");
+//			int length = split.length;
+//			if (length > 0) {
+//				cmBaikeProduct.setNmpaYear(Integer.parseInt(split[0]));
+//				if (length > 1) {
+//					String splitMonth = split[1];
+//					Integer nmpaMonth = Integer.parseInt(splitMonth.startsWith("0") ? splitMonth.replace("0", "") : splitMonth);
+//					cmBaikeProduct.setNmpaMonth(nmpaMonth);
+//					if (length > 2) {
+//						String splitDay = split[2];
+//						Integer nmpaDay = Integer.parseInt(splitDay.startsWith("0") ? splitDay.replace("0", "") : splitDay);
+//						cmBaikeProduct.setNmpaDay(nmpaDay);
+//					}
+//				}
+//			}
+//
+//		}
 		return cmBaikeProduct;
 	}
 	
@@ -86,7 +86,29 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 	public Page<CmBaikeProduct> findPage(Page<CmBaikeProduct> page, CmBaikeProduct cmBaikeProduct) {
 		return super.findPage(page, cmBaikeProduct);
 	}
-	
+	@Transactional(readOnly = false)
+	public void saveMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo) {
+		cmBaikeProductDao.saveMaterialinfo(cmBaikeReferenceInfo);
+
+	}
+	@Transactional(readOnly = false)
+	public void upMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo) {
+		cmBaikeProductDao.upMaterialinfo(cmBaikeReferenceInfo);
+
+	}
+
+	@Transactional(readOnly = false)
+	public void delMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo) {
+		cmBaikeProductDao.delMaterialinfo(cmBaikeReferenceInfo);
+
+	}
+	@Transactional(readOnly = false)
+	public CmBaikeReferenceInfo getMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo) {
+		return cmBaikeProductDao.getMaterialinfo(cmBaikeReferenceInfo);
+
+	}
+
+
 	@Transactional(readOnly = false)
 	public void save(CmBaikeProduct cmBaikeProduct) {
 		// 保存商品图片
@@ -95,18 +117,20 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 			cmBaikeProduct.setImage(UploadPicUtils.saveImageToServer(mainImage));
 		}
 		// 保存正品认证二维码
-		String authQrCode = cmBaikeProduct.getAuthQrCode();
-		if (StringUtils.isNotEmpty(authQrCode) && !authQrCode.startsWith("http:")) {
-			cmBaikeProduct.setAuthQrCode(UploadPicUtils.saveImageToServer(authQrCode));
-		}
+//		String authQrCode = cmBaikeProduct.getAuthQrCode();
+//		if (StringUtils.isNotEmpty(authQrCode) && !authQrCode.startsWith("http:")) {
+//			cmBaikeProduct.setAuthQrCode(UploadPicUtils.saveImageToServer(authQrCode));
+//		}
 		// 删除原先的图片/参数/问题数据
 		if (!cmBaikeProduct.getIsNewRecord()) {
 			cmBaikeProductDao.deleteParamsByProductId(cmBaikeProduct.getId());
 			cmBaikeProductDao.deleteImagesByProductId(cmBaikeProduct.getId());
-			cmBaikeProductDao.deleteQuestionsByProductId(cmBaikeProduct.getId());
+			cmBaikeProductDao.delMaterialinfoBYProductId(cmBaikeProduct.getId());
+			cmBaikeProductDao.delTextListByEntryId(cmBaikeProduct.getId());//正文
+
 		}
 		// 保存上市时间和nmpa时间
-		saveTime(cmBaikeProduct);
+//		saveTime(cmBaikeProduct);
 
 		// 管理员审核百科
 		if (null != cmBaikeProduct.getAuditFlag() && 1 == cmBaikeProduct.getAuditFlag()) {
@@ -131,16 +155,16 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 			cmBaikeProductDao.updateEmptyNum(cmBaikeProduct.getId(), emptyNum);
 		}
 		String productId = cmBaikeProduct.getId();
-		// 保存产品认证图片
-		List<String> authImageList = cmBaikeProduct.getAuthImageList();
-		authImageList.forEach(authImage->{
-			if (StringUtils.isNotEmpty(authImage)) {
-				if (!authImage.startsWith("http:")) {
-					authImage = UploadPicUtils.saveImageToServer(authImage);
-				}
-				cmBaikeProductDao.insertProductImage(authImage, productId, 1);
-			}
-		});
+//		// 保存产品认证图片
+//		List<String> authImageList = cmBaikeProduct.getAuthImageList();
+//		authImageList.forEach(authImage->{
+//			if (StringUtils.isNotEmpty(authImage)) {
+//				if (!authImage.startsWith("http:")) {
+//					authImage = UploadPicUtils.saveImageToServer(authImage);
+//				}
+//				cmBaikeProductDao.insertProductImage(authImage, productId, 1);
+//			}
+//		});
 		// 保存效果展示图片
 		List<String> displayImageList = cmBaikeProduct.getDisplayImageList();
 		displayImageList.forEach(displayImage->{
@@ -153,18 +177,56 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 		});
 		// 保存参数
 		List<CmBaikeProductParam> paramList = cmBaikeProduct.getParamList();
-		paramList.forEach(param->{
-			if (StringUtils.isNotEmpty(param.getName()) && StringUtils.isNotEmpty(param.getContent())) {
-				cmBaikeProductDao.insertProductParam(param.getName(), param.getContent(), productId);
+		if(null!=paramList&&paramList.size()>0){
+			paramList.forEach(param->{
+				if (StringUtils.isNotEmpty(param.getName()) && StringUtils.isNotEmpty(param.getContent())) {
+					cmBaikeProductDao.insertProductParam(param.getName(), param.getContent(), productId);
+				}
+			});
+		}
+		//保存资料
+		List<CmBaikeReferenceInfo> cmBaikeReferenceInfo = cmBaikeProduct.getMaterialInfo();
+		if(null!=cmBaikeReferenceInfo&&cmBaikeReferenceInfo.size()>0){
+		cmBaikeReferenceInfo.forEach(param->{
+			if(null!=param){
+				if(null==param.getPublicationYear()||" ".equals(param.getPublicationYear())){
+					param.setPublicationYear(null);
+				}
+				if(org.apache.commons.lang.StringUtils.isEmpty(param.getPublicationYearStr())||" ".equals(param.getPublicationYearStr())){
+					param.setPublicationYearStr(null);
+				}
+				if(null==param.getPublishTime()){
+					param.setPublishTime(null);
+				}
+				if(org.apache.commons.lang.StringUtils.isEmpty(param.getPublishTimeStr())||" ".equals(param.getPublishTimeStr())){
+					param.setPublishTimeStr(null);
+				}
+				if(null==param.getAcitationTime()){
+					param.setAcitationTime(null);
+				}
+				if(org.apache.commons.lang.StringUtils.isEmpty(param.getAcitationTimeStr())||" ".equals(param.getAcitationTimeStr())){
+					param.setAcitationTimeStr(null);
+				}
 			}
+				param.setProductId(Integer.valueOf(productId));
+				cmBaikeProductDao.saveMaterialinfo(param);
 		});
+		}
+		//保存正文
+		List<CmBaikeTextInfo> textInfolist = cmBaikeProduct.getTextInfolist();
+		if(null!=textInfolist&&textInfolist.size()>0){
+			textInfolist.forEach(param->{
+				param.setProductId(productId);
+				cmBaikeProductDao.insertText(param);
+			});
+		}
 		// 保存问题
-		List<CmBaikeProductQuestion> questionList = cmBaikeProduct.getQuestionList();
-		questionList.forEach(question->{
-			if (StringUtils.isNotEmpty(question.getQuestion()) && StringUtils.isNotEmpty(question.getAnswer())) {
-				cmBaikeProductDao.insertProductQuestion(question.getQuestion(), question.getAnswer(), productId);
-			}
-		});
+//		List<CmBaikeProductQuestion> questionList = cmBaikeProduct.getQuestionList();
+//		questionList.forEach(question->{
+//			if (StringUtils.isNotEmpty(question.getQuestion()) && StringUtils.isNotEmpty(question.getAnswer())) {
+//				cmBaikeProductDao.insertProductQuestion(question.getQuestion(), question.getAnswer(), productId);
+//			}
+//		});
 	}
 
 	private void saveTime(CmBaikeProduct cmBaikeProduct) {
@@ -344,6 +406,7 @@ public class CmBaikeProductService extends CrudService<CmBaikeProductDao, CmBaik
 			productFile.setFileTitle(fileTitle);
 			productFile.setFileName(fileName);
 			productFile.setOssName(filePath);
+			productFile.setOssUrl(url);
 			cmBaikeProductDao.insertProductFile(productFile);
 			productFile.setOssUrl(url);
 			map.put("success", true);

+ 230 - 8
src/main/java/com/caimei/modules/baike/web/CmBaikeProductController.java

@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.caimei.modules.baike.dao.CmBaikeProductDao;
 import com.caimei.modules.baike.dao.CmBaikeProductRecommendDao;
 import com.caimei.modules.baike.dao.CmBaikeTypeDao;
@@ -21,14 +22,12 @@ import com.caimei.modules.user.entity.NewCmShop;
 import com.caimei.redis.RedisService;
 import com.caimei.utils.AppUtils;
 import com.google.common.collect.Maps;
+import com.google.gson.Gson;
 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.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
@@ -38,6 +37,7 @@ import com.thinkgem.jeesite.common.web.BaseController;
 import com.thinkgem.jeesite.common.utils.StringUtils;
 import com.caimei.modules.baike.service.CmBaikeProductService;
 
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -112,10 +112,11 @@ public class CmBaikeProductController extends BaseController {
 	public String form(CmBaikeProduct cmBaikeProduct, Model model) {
 		CmBaikeType cmBaikeType = new CmBaikeType();
 		cmBaikeType.setTypeSort(cmBaikeProduct.getCommodityType());
+		cmBaikeType.setStatus(1);
 		// 分类列表
 		List<CmBaikeType> typeList = cmBaikeTypeService.findList(cmBaikeType);
 		// 商品类型
-		String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
+		String commodityType = "产品";
 		// 参数列表
 		List<CmBaikeProductParam> paramList = cmBaikeProductDao.findParamList(cmBaikeProduct.getId());
 		cmBaikeProduct.setParamList(paramList);
@@ -142,6 +143,49 @@ public class CmBaikeProductController extends BaseController {
 		cmBaikeProduct.setShopList(shopList);
 		// 敏感词
 		String sensitiveWords = infoDao.getSensitiveWords(4);
+		//正文
+		List<CmBaikeTextInfo> textInfo = cmBaikeProductDao.getTextInfo(cmBaikeProduct.getId());
+		cmBaikeProduct.setTextInfolist(textInfo);
+		//参考资料
+		if(StringUtils.isNotEmpty(cmBaikeProduct.getId())){
+			List<CmBaikeReferenceInfo> materialInfo = cmBaikeProductDao.getMaterialInfo(Integer.valueOf(cmBaikeProduct.getId()));
+			if(null!=materialInfo&&materialInfo.size()>0){
+				materialInfo.forEach(material->{
+					SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+					//时间格式转换(引文时间)
+					if(null!=material.getAcitationTime()){
+						String acitationTimeStr=simpleDateFormat.format(material.getAcitationTime());
+						material.setAcitationTimeStr(acitationTimeStr);
+						material.setAcitationTime(null);
+					}else{
+						material.setAcitationTimeStr(" ");
+						material.setAcitationTime(null);
+					}
+					//时间格式转换(发表时间)
+					if(null!=material.getPublishTime()){
+						String publishTimeStr=simpleDateFormat.format(material.getPublishTime());
+						material.setPublishTimeStr(publishTimeStr);
+						material.setPublishTime(null);
+					}else{
+						material.setPublishTimeStr(" ");
+						material.setPublishTime(null);
+					}
+					//时间格式转换(出版年)
+					if(null!=material.getPublicationYear()){
+						String publicationYearStr=simpleDateFormat.format(material.getPublicationYear());
+						material.setPublicationYearStr(publicationYearStr);
+						material.setPublicationYear(null);
+					}else{
+						material.setPublicationYearStr(" ");
+						material.setPublicationYear(null);
+					}
+				});
+				cmBaikeProduct.setMaterialInfo(materialInfo);
+				Gson g=new Gson();
+				String refrence=g.toJson(materialInfo);
+				cmBaikeProduct.setReferenceList(refrence);
+			}
+		}
 		//先从reids中获取keyword值,不存在时在查询数据库
 		List<SearchFrequencyVo> searchFrequencyVos=new ArrayList<>();
 		if(redisService.getExpireTime("keyword")>0){
@@ -154,17 +198,102 @@ public class CmBaikeProductController extends BaseController {
 		model.addAttribute("commodityType", commodityType);
 		model.addAttribute("sensitiveWords", sensitiveWords);
 		model.addAttribute("SearchFrequencyVo",searchFrequencyVos);
+		model.addAttribute("textInfo",textInfo);
+//		model.addAttribute("materialInfo",materialInfo);
 		return "modules/baikePage/cmBaikeProductForm";
 	}
 
+	@RequestMapping(value = "entry")
+	public String entryGuidance(){
+		return "modules/baikePage/entryGuidance";
+   }
+	/**
+	 *添加资料
+	 * @return
+	 */
+	@RequestMapping(value = "saveMaterialinfo")
+	@ResponseBody
+	public String saveMaterialinfo(CmBaikeReferenceInfo cmBaikeReferenceInfo){
+		if(null!=cmBaikeReferenceInfo){
+			if(cmBaikeReferenceInfo.getReferenceType()==1){
+				cmBaikeReferenceInfo.setPublicationYear(null);
+				cmBaikeReferenceInfo.setPublicationYearStr(null);
+			}else if(cmBaikeReferenceInfo.getReferenceType()==3){
+				cmBaikeReferenceInfo.setPublicationYear(null);
+				cmBaikeReferenceInfo.setPublicationYearStr(null);
+				cmBaikeReferenceInfo.setAcitationTime(null);
+				cmBaikeReferenceInfo.setAcitationTimeStr(null);
+				cmBaikeReferenceInfo.setPublishTime(null);
+				cmBaikeReferenceInfo.setPublishTimeStr(null);
+			} else{
+				cmBaikeReferenceInfo.setAcitationTime(null);
+				cmBaikeReferenceInfo.setAcitationTimeStr(null);
+				cmBaikeReferenceInfo.setPublishTime(null);
+				cmBaikeReferenceInfo.setPublishTimeStr(null);
+			}
+		}
+		if(StringUtils.isNotEmpty(cmBaikeReferenceInfo.getZlId())){
+			cmBaikeReferenceInfo.setId(Integer.valueOf(cmBaikeReferenceInfo.getZlId()));
+		}
+		if("2".equals(cmBaikeReferenceInfo.getFlagId())){
+			cmBaikeProductService.upMaterialinfo(cmBaikeReferenceInfo);
+
+		}else{
+			cmBaikeProductService.saveMaterialinfo(cmBaikeReferenceInfo);
+		}
+		return "modules/baikePage/entryGuidance";
+	}
+
+	/**
+	 * 删除资料
+	 * @return
+	 */
+	@RequestMapping(value = "delMaterialinfo")
+	@ResponseBody
+	public String delMaterialinfo(Integer mid){
+		CmBaikeReferenceInfo cmBaikeReferenceInfo=new CmBaikeReferenceInfo();
+		cmBaikeReferenceInfo.setId(mid);
+		cmBaikeProductService.delMaterialinfo(cmBaikeReferenceInfo);
+		return "modules/baikePage/entryGuidance";
+	}
+	@RequestMapping(value = "getMaterialinfo")
+	@ResponseBody
+	public CmBaikeReferenceInfo getMaterialinfo(Integer mid, Model model){
+		CmBaikeReferenceInfo cmBaikeReferenceInfo=new CmBaikeReferenceInfo();
+		cmBaikeReferenceInfo.setId(mid);
+		CmBaikeReferenceInfo material= cmBaikeProductService.getMaterialinfo(cmBaikeReferenceInfo);
+		SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		//时间格式转换(引文时间)
+		if(null!=material.getAcitationTime()){
+			String acitationTimeStr=simpleDateFormat.format(material.getAcitationTime());
+			material.setAcitationTimeStr(acitationTimeStr);
+		}
+		//时间格式转换(发表时间)
+		if(null!=material.getPublishTime()){
+			String publishTimeStr=simpleDateFormat.format(material.getPublishTime());
+			material.setPublishTimeStr(publishTimeStr);
+		}
+		//时间格式转换(出版年)
+		if(null!=material.getPublicationYear()){
+			String publicationYearStr=simpleDateFormat.format(material.getPublicationYear());
+			material.setPublicationYearStr(publicationYearStr);
+		}
+		return material;
+	}
 	@RequestMapping(value = "save")
 	public String save(CmBaikeProduct cmBaikeProduct, Model model, RedirectAttributes redirectAttributes) {
 		if (!beanValidator(model, cmBaikeProduct)){
 			return form(cmBaikeProduct, model);
 		}
+		//资料格式转换  string --->集合
+		if(null!=cmBaikeProduct&&StringUtils.isNotEmpty(cmBaikeProduct.getReferenceList())){
+			String referenceListStr =cmBaikeProduct.getReferenceList();
+			List<CmBaikeReferenceInfo> referenceList = JSONArray.parseArray(referenceListStr, CmBaikeReferenceInfo.class);
+			cmBaikeProduct.setMaterialInfo(referenceList);
+		}
 		cmBaikeProductService.save(cmBaikeProduct);
-        String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
-        addMessage(redirectAttributes, "保存" + commodityType + "成功");
+//        String commodityType = cmBaikeProduct.getCommodityType() == 1 ? "产品" : "仪器";
+        addMessage(redirectAttributes, "保存成功");
 		cleanRedisCache();
 		cmBaikeProduct.setPublishSource(null == cmBaikeProduct.getPublishSource() ? 1 : cmBaikeProduct.getPublishSource());
 		return "redirect:" + Global.getAdminPath() + "/baike/cmBaikeProduct/?repage&commodityType=" + cmBaikeProduct.getCommodityType() + "&publishSource="+cmBaikeProduct.getPublishSource();
@@ -269,7 +398,51 @@ public class CmBaikeProductController extends BaseController {
 		videoList.forEach(video->{
 			video.setOssUrl(OSSUtils.getOssUrl(video.getOssName()));
 		});
+		//正文
+		List<CmBaikeTextInfo> textInfo = cmBaikeProductDao.getTextInfo(cmBaikeProduct.getId());
+		cmBaikeProduct.setTextInfolist(textInfo);
+		//参考资料
+		if(StringUtils.isNotEmpty(cmBaikeProduct.getId())){
+			List<CmBaikeReferenceInfo> materialInfo = cmBaikeProductDao.getMaterialInfo(Integer.valueOf(cmBaikeProduct.getId()));
+			if(null!=materialInfo&&materialInfo.size()>0){
+				materialInfo.forEach(material->{
+					SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+					//时间格式转换(引文时间)
+					if(null!=material.getAcitationTime()){
+						String acitationTimeStr=simpleDateFormat.format(material.getAcitationTime());
+						material.setAcitationTimeStr(acitationTimeStr);
+						material.setAcitationTime(null);
+					}else{
+						material.setAcitationTimeStr(" ");
+						material.setAcitationTime(null);
+					}
+					//时间格式转换(发表时间)
+					if(null!=material.getPublishTime()){
+						String publishTimeStr=simpleDateFormat.format(material.getPublishTime());
+						material.setPublishTimeStr(publishTimeStr);
+						material.setPublishTime(null);
+					}else{
+						material.setPublishTimeStr(" ");
+						material.setPublishTime(null);
+					}
+					//时间格式转换(出版年)
+					if(null!=material.getPublicationYear()){
+						String publicationYearStr=simpleDateFormat.format(material.getPublicationYear());
+						material.setPublicationYearStr(publicationYearStr);
+						material.setPublicationYear(null);
+					}else{
+						material.setPublicationYearStr(" ");
+						material.setPublicationYear(null);
+					}
+				});
+				cmBaikeProduct.setMaterialInfo(materialInfo);
+				Gson g=new Gson();
+				String refrence=g.toJson(materialInfo);
+				cmBaikeProduct.setReferenceList(refrence);
+			}
+		}
 		cmBaikeProduct.setVideoList(videoList);
+//		model.addAttribute("materialInfo", materialInfo);
 		model.addAttribute("commodityType", commodityType);
 		return "modules/baikePage/checkBaikePage";
 	}
@@ -327,8 +500,57 @@ public class CmBaikeProductController extends BaseController {
 		model.addAttribute("typeList", typeList);
 		// 敏感词
 		String sensitiveWords = infoDao.getSensitiveWords(4);
+		//正文
+		List<CmBaikeTextInfo> textInfo = cmBaikeProductDao.getTextInfo(cmBaikeProduct.getId());
+//		Gson g=new Gson();
+//		String textInfoStr=g.toJson(textInfo);
+//		cmBaikeProduct.setTextInfolistStr(textInfoStr);
+		cmBaikeProduct.setTextInfolist(textInfo);
+		//参考资料
+		if(StringUtils.isNotEmpty(cmBaikeProduct.getId())){
+			List<CmBaikeReferenceInfo> materialInfo = cmBaikeProductDao.getMaterialInfo(Integer.valueOf(cmBaikeProduct.getId()));
+			if(null!=materialInfo&&materialInfo.size()>0){
+				materialInfo.forEach(material->{
+					SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+					//时间格式转换(引文时间)
+					if(null!=material.getAcitationTime()){
+						String acitationTimeStr=simpleDateFormat.format(material.getAcitationTime());
+						material.setAcitationTimeStr(acitationTimeStr);
+						material.setAcitationTime(null);
+					}else{
+						material.setAcitationTimeStr(" ");
+						material.setAcitationTime(null);
+					}
+					//时间格式转换(发表时间)
+					if(null!=material.getPublishTime()){
+						String publishTimeStr=simpleDateFormat.format(material.getPublishTime());
+						material.setPublishTimeStr(publishTimeStr);
+						material.setPublishTime(null);
+					}else{
+						material.setPublishTimeStr(" ");
+						material.setPublishTime(null);
+					}
+					//时间格式转换(出版年)
+					if(null!=material.getPublicationYear()){
+						String publicationYearStr=simpleDateFormat.format(material.getPublicationYear());
+						material.setPublicationYearStr(publicationYearStr);
+						material.setPublicationYear(null);
+					}else{
+						material.setPublicationYearStr(" ");
+						material.setPublicationYear(null);
+					}
+				});
+				cmBaikeProduct.setMaterialInfo(materialInfo);
+				Gson g=new Gson();
+				String refrence=g.toJson(materialInfo);
+				cmBaikeProduct.setReferenceList(refrence);
+			}
+		}
 		model.addAttribute("sensitiveWords", sensitiveWords);
-        return "modules/baikePage/auditBaikeProductPage";
+//		model.addAttribute("materialInfo", materialInfo);
+//		model.addAttribute("materialInfo", materialInfo);
+
+		return "modules/baikePage/auditBaikeProductPage";
 	}
 
 	@RequestMapping(value = "auditBaike")

+ 9 - 0
src/main/java/com/caimei/modules/baike/web/CmBaikeTypeController.java

@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.caimei.modules.baike.dao.CmBaikeTypeDao;
+import com.caimei.modules.miniprogram.utils.UploadPicUtils;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.google.common.collect.Maps;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -77,6 +78,14 @@ public class CmBaikeTypeController extends BaseController {
 		if (!beanValidator(model, cmBaikeType)){
 			return form(cmBaikeType, model);
 		}
+		String pcimg=cmBaikeType.getPcBanner();
+		if (StringUtils.isNotEmpty(pcimg) && !pcimg.startsWith("http:")) {
+			cmBaikeType.setPcBanner(UploadPicUtils.saveImageToServer(pcimg));
+		}
+		String appimg=cmBaikeType.getAppBanner();
+		if (StringUtils.isNotEmpty(appimg) && !appimg.startsWith("http:")) {
+			cmBaikeType.setAppBanner(UploadPicUtils.saveImageToServer(appimg));
+		}
 		cmBaikeTypeService.save(cmBaikeType);
 		addMessage(redirectAttributes, "保存分类成功");
 		cleanRedisCache();

+ 22 - 1
src/main/java/com/caimei/modules/coupon/dao/CmCouponDao.java

@@ -88,4 +88,25 @@ public interface CmCouponDao extends CrudDao<CmCoupon> {
     void updateClubCoupon(@Param("clubCouponId") Integer clubCouponId, @Param("orderId") Integer orderId);
 
     List<CmCoupon> findCouponList(@Param("userId")Integer userId,@Param("moneyCouponFlag")Integer moneyCouponFlag);
-}
+
+    List<CmCoupon> selconfigure();
+
+    Integer selCouponId(@Param("couponId") String couponId);
+    /**
+     * 专属优惠券配置插入
+     * @param cmCoupon
+     */
+    /*void insertConfigure(CmCoupon cmCoupon);
+
+    *//**
+     * 专属优惠券配置修改
+     * @param cmCoupon
+     *//*
+    void updateConfigure(CmCoupon cmCoupon);
+
+    List<Integer> configureCouponId(String couponId);
+
+    void insertCouponConfigure(CmCouponAssociate associate);
+
+    void updateCouponConfigure(CmCouponAssociate a);*/
+}

+ 10 - 1
src/main/java/com/caimei/modules/coupon/entity/CmCoupon.java

@@ -57,6 +57,7 @@ public class CmCoupon extends DataEntity<CmCoupon> {
     private Integer useTimeFlag; // 使用期限同上下架时间
     private Date receiveDate;   // 领取时间
     private Date useEndDate;    // 使用截止时间
+    private Integer configure;  // 专属优惠券配置  1是、0否
 
     public CmCoupon() {
         super();
@@ -386,4 +387,12 @@ public class CmCoupon extends DataEntity<CmCoupon> {
     public void setUseEndDate(Date useEndDate) {
         this.useEndDate = useEndDate;
     }
-}
+
+    public Integer getConfigure() {
+        return configure;
+    }
+
+    public void setConfigure(Integer configure) {
+        this.configure = configure;
+    }
+}

+ 9 - 0
src/main/java/com/caimei/modules/coupon/entity/CmVipCoupon.java

@@ -16,6 +16,7 @@ public class CmVipCoupon extends DataEntity<CmVipCoupon> {
     private String id;
     /** 生效月份 */
     private String useTime;
+    private String endTime;
     /**
      * 0未生效 1已生效 2已关闭 3已失效
      */
@@ -61,6 +62,14 @@ public class CmVipCoupon extends DataEntity<CmVipCoupon> {
         this.useTime = useTime;
     }
 
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
     public String getStatus() {
         return status;
     }

+ 9 - 0
src/main/java/com/caimei/modules/coupon/entity/SvipCouponForm.java

@@ -19,6 +19,7 @@ public class SvipCouponForm extends DataEntity<SvipCouponForm> {
      * 月份
      */
     private String month;
+    private String endMonth;
 
     private String status;
 
@@ -356,6 +357,14 @@ public class SvipCouponForm extends DataEntity<SvipCouponForm> {
         this.month = month;
     }
 
+    public String getEndMonth() {
+        return endMonth;
+    }
+
+    public void setEndMonth(String endMonth) {
+        this.endMonth = endMonth;
+    }
+
     public String getCouponType1() {
         return couponType1;
     }

+ 288 - 2
src/main/java/com/caimei/modules/coupon/service/CmVipCouponService.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.coupon.service;
 
+import com.alibaba.fastjson.JSON;
 import com.caimei.modules.coupon.dao.CmCouponDao;
 import com.caimei.modules.coupon.dao.CmCouponVipDao;
 import com.caimei.modules.coupon.entity.*;
@@ -15,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
@@ -37,6 +39,17 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
     public CmVipCoupon get(String id) {
         CmVipCoupon vipCoupon = super.get(id);
         if (null != vipCoupon) {
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
+            try {
+                Date parse = simpleDateFormat.parse(vipCoupon.getUseTime());
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(parse);
+                calendar.add(Calendar.MONTH,2);
+                Date time = calendar.getTime();
+                vipCoupon.setEndTime(simpleDateFormat.format(time));
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
             setVipCouponStatus(vipCoupon);
             List<CmCoupon> couponList = new ArrayList<>();
             List<String> bindCoupons = cmCouponVipDao.getBindCoupons(id);
@@ -51,9 +64,21 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
 
     @Override
     public Page<CmVipCoupon> findPage(Page<CmVipCoupon> page, CmVipCoupon cmVipCoupon) {
-        Page<CmVipCoupon> vipPage = super.findPage(page, cmVipCoupon);
+        CmVipCoupon couponEnt = quarter(cmVipCoupon);
+        Page<CmVipCoupon> vipPage = super.findPage(page, couponEnt);
         List<CmVipCoupon> cmVipCouponList = vipPage.getList();
         cmVipCouponList.forEach(vipCoupon -> {
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
+            try {
+                Date parse = simpleDateFormat.parse(vipCoupon.getUseTime());
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(parse);
+                calendar.add(Calendar.MONTH,2);
+                Date time = calendar.getTime();
+                vipCoupon.setEndTime(simpleDateFormat.format(time));
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
             setVipCouponStatus(vipCoupon);
             List<String> bindCoupons = cmCouponVipDao.getBindCoupons(vipCoupon.getId());
             List<CmCoupon> couponList = cmCouponVipDao.getCouponListByIds(bindCoupons, cmVipCoupon.getCouponType(), cmVipCoupon.getStatus());
@@ -75,11 +100,23 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
                 SimpleDateFormat df = new SimpleDateFormat("yyyy-MM");
                 String current = df.format(new Date());
                 String useTime = vipCoupon.getUseTime();
+                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
+                try {
+                    Date parse = simpleDateFormat.parse(vipCoupon.getUseTime());
+                    Calendar calendar = Calendar.getInstance();
+                    calendar.setTime(parse);
+                    calendar.add(Calendar.MONTH,2);
+                    Date time = calendar.getTime();
+                    vipCoupon.setEndTime(simpleDateFormat.format(time));
+                } catch (ParseException e) {
+                    e.printStackTrace();
+                }
+                String endTime = vipCoupon.getEndTime();
                 // 0未生效 1已生效 2已关闭 3已失效
                 if (df.parse(useTime).after(df.parse(current))) {
                     // 未生效
                     vipCoupon.setStatus("0");
-                } else if (df.parse(useTime).before(df.parse(current))) {
+                } else if (df.parse(endTime).before(df.parse(current))) {
                     // 已失效
                     vipCoupon.setStatus("3");
                 } else {
@@ -98,6 +135,7 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
     public SvipCouponForm setSvipcouponForms(CmVipCoupon cmVipCoupon){
         SvipCouponForm svipcouponForm = new SvipCouponForm();
         svipcouponForm.setMonth(cmVipCoupon.getUseTime());
+        svipcouponForm.setEndMonth(cmVipCoupon.getEndTime());
         if (null != cmVipCoupon.getCouponList()){
             List<CmCoupon> couponList = cmVipCoupon.getCouponList();
             for (int i = 0; i < couponList.size(); i++) {
@@ -370,6 +408,205 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
             cmCouponVipDao.updateVipCouponRelation(relation4);
         }
     }
+    /**
+     * 设置优惠券配置4张券的表单数据
+     */
+    public SvipCouponForm setSvipcouponConfigure(){
+        SvipCouponForm svipcouponForm = new SvipCouponForm();
+        List<CmCoupon> couponList = cmCouponDao.selconfigure();
+        if (0 != couponList.size()){
+
+            for (int i = 0; i < couponList.size(); i++) {
+                setSvipcouponForm(svipcouponForm, i, couponList.get(i));
+            }
+        }
+        return svipcouponForm;
+    }
+
+    @Transactional(readOnly = false)
+    public void saveConfigure(SvipCouponForm svipcouponForm) {
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM");
+        String current = df.format(new Date());
+        svipcouponForm.setMonth(current);
+        Integer integer = cmCouponDao.selCouponId(svipcouponForm.getCouponId1());
+        String id = "";
+        if (integer == null) {
+            id = null;
+        } else {
+            id = String.valueOf(integer);
+        }
+        CmVipCoupon cmVipCoupon = new CmVipCoupon();
+        cmVipCoupon.setId(id);
+        cmVipCoupon.setUseTime(svipcouponForm.getMonth());
+        cmVipCoupon.setUpdateTime(new Date());
+        cmVipCoupon.setStatus("1");
+        cmVipCoupon.setDelFlag("1");
+        setVipCouponStatus(cmVipCoupon);
+        // 解析 svipcouponForm -> 组装 CmCoupon 列表 保存
+        CmCoupon coupon1 = new CmCoupon();
+        CmCoupon coupon2 = new CmCoupon();
+        CmCoupon coupon3 = new CmCoupon();
+        CmCoupon coupon4 = new CmCoupon();
+        boolean flag = false;
+        if(StringUtils.isNotBlank(cmVipCoupon.getId())){
+            // 修改
+            coupon1.setId(svipcouponForm.getCouponId1());
+            coupon2.setId(svipcouponForm.getCouponId2());
+            coupon3.setId(svipcouponForm.getCouponId3());
+            coupon4.setId(svipcouponForm.getCouponId4());
+            cmCouponVipDao.updateVipCouponMonth(cmVipCoupon);
+        } else {
+            // 新增
+            flag = true;
+            cmCouponVipDao.insertVipCouponMonth(cmVipCoupon);
+        }
+        Date beginTime = DateUtil.getMinDay(svipcouponForm.getMonth());
+        Date endTime = DateUtil.getMaxDay(svipcouponForm.getMonth());
+        /*
+         * 第1张券
+         */
+        coupon1.setName("超级会员优惠券"+svipcouponForm.getMonth());
+        coupon1.setStartDate(beginTime);
+        coupon1.setEndDate(endTime);
+        coupon1.setCouponAmount(svipcouponForm.getCouponAmount1());
+        coupon1.setTouchPrice(svipcouponForm.getTouchPrice1());
+        coupon1.setStatus("1");
+        coupon1.setVipFlag(1);
+        coupon1.setConfigure(1);
+        // 0活动券 1品类券 3店铺券
+        if ("0".equals(svipcouponForm.getCouponType1())){
+            coupon1.setCouponType(0);
+            coupon1.setProductType(svipcouponForm.getProductType1());
+            if ("2".equals(svipcouponForm.getProductType1())){
+                // 指定商品
+                coupon1.setProductInfo(svipcouponForm.getProductInfo1());
+            }
+        } else if ("1".equals(svipcouponForm.getCouponType1())) {
+            coupon1.setCategoryType(svipcouponForm.getCategoryType1());
+            coupon1.setCouponType(1);
+        } else if ("3".equals(svipcouponForm.getCouponType1())) {
+            coupon1.setShopId(svipcouponForm.getShopId1());
+            coupon1.setCouponType(3);
+        }
+        cmCouponService.save(coupon1);
+        /*
+         * 第2张券
+         */
+        coupon2.setName("超级会员优惠券"+svipcouponForm.getMonth());
+        coupon2.setStartDate(beginTime);
+        coupon2.setEndDate(endTime);
+        coupon2.setCouponAmount(svipcouponForm.getCouponAmount2());
+        coupon2.setTouchPrice(svipcouponForm.getTouchPrice2());
+        coupon2.setStatus("1");
+        coupon2.setVipFlag(1);
+        coupon2.setConfigure(1);
+        // 0活动券 1品类券 3店铺券
+        if ("0".equals(svipcouponForm.getCouponType2())){
+            coupon2.setCouponType(0);
+            coupon2.setProductType(svipcouponForm.getProductType2());
+            if ("2".equals(svipcouponForm.getProductType2())){
+                // 指定商品
+                coupon2.setProductInfo(svipcouponForm.getProductInfo2());
+            }
+        } else if ("1".equals(svipcouponForm.getCouponType2())) {
+            coupon2.setCategoryType(svipcouponForm.getCategoryType2());
+            coupon2.setCouponType(1);
+        } else if ("3".equals(svipcouponForm.getCouponType2())) {
+            coupon2.setShopId(svipcouponForm.getShopId2());
+            coupon2.setCouponType(3);
+        }
+        cmCouponService.save(coupon2);
+        /*
+         * 第3张券
+         */
+        coupon3.setName("超级会员优惠券"+svipcouponForm.getMonth());
+        coupon3.setStartDate(beginTime);
+        coupon3.setEndDate(endTime);
+        coupon3.setCouponAmount(svipcouponForm.getCouponAmount3());
+        coupon3.setTouchPrice(svipcouponForm.getTouchPrice3());
+        coupon3.setStatus("1");
+        coupon3.setVipFlag(1);
+        coupon3.setConfigure(1);
+        // 0活动券 1品类券 3店铺券
+        if ("0".equals(svipcouponForm.getCouponType3())){
+            coupon3.setCouponType(0);
+            coupon3.setProductType(svipcouponForm.getProductType3());
+            if ("2".equals(svipcouponForm.getProductType3())){
+                // 指定商品
+                coupon3.setProductInfo(svipcouponForm.getProductInfo3());
+            }
+        } else if ("1".equals(svipcouponForm.getCouponType3())) {
+            coupon3.setCategoryType(svipcouponForm.getCategoryType3());
+            coupon3.setCouponType(1);
+        } else if ("3".equals(svipcouponForm.getCouponType3())) {
+            coupon3.setShopId(svipcouponForm.getShopId3());
+            coupon3.setCouponType(3);
+        }
+        cmCouponService.save(coupon3);
+        /*
+         * 第4张券
+         */
+        coupon4.setName("超级会员优惠券"+svipcouponForm.getMonth());
+        coupon4.setStartDate(beginTime);
+        coupon4.setEndDate(endTime);
+        coupon4.setCouponAmount(svipcouponForm.getCouponAmount4());
+        coupon4.setTouchPrice(svipcouponForm.getTouchPrice4());
+        coupon4.setStatus("1");
+        coupon4.setVipFlag(1);
+        coupon4.setConfigure(1);
+        // 0活动券 1品类券 3店铺券
+        if ("0".equals(svipcouponForm.getCouponType4())){
+            coupon4.setCouponType(0);
+            coupon4.setProductType(svipcouponForm.getProductType4());
+            if ("2".equals(svipcouponForm.getProductType4())){
+                // 指定商品
+                coupon4.setProductInfo(svipcouponForm.getProductInfo4());
+            }
+        } else if ("1".equals(svipcouponForm.getCouponType4())) {
+            coupon4.setCategoryType(svipcouponForm.getCategoryType4());
+            coupon4.setCouponType(1);
+        } else if ("3".equals(svipcouponForm.getCouponType4())) {
+            coupon4.setShopId(svipcouponForm.getShopId4());
+            coupon4.setCouponType(3);
+        }
+        cmCouponService.save(coupon4);
+        /*
+         * vip优惠券月份关系
+         */
+        CmVipCouponRelation relation1 = new CmVipCouponRelation();
+        CmVipCouponRelation relation2 = new CmVipCouponRelation();
+        CmVipCouponRelation relation3 = new CmVipCouponRelation();
+        CmVipCouponRelation relation4 = new CmVipCouponRelation();
+        relation1.setMontId(cmVipCoupon.getId());
+        relation2.setMontId(cmVipCoupon.getId());
+        relation3.setMontId(cmVipCoupon.getId());
+        relation4.setMontId(cmVipCoupon.getId());
+        relation1.setCouponId(coupon1.getId());
+        relation2.setCouponId(coupon2.getId());
+        relation3.setCouponId(coupon3.getId());
+        relation4.setCouponId(coupon4.getId());
+        relation1.setUpdateTime(new Date());
+        relation2.setUpdateTime(new Date());
+        relation3.setUpdateTime(new Date());
+        relation4.setUpdateTime(new Date());
+        relation1.setDelFlag("0");
+        relation2.setDelFlag("0");
+        relation3.setDelFlag("0");
+        relation4.setDelFlag("0");
+        if (flag) {
+            // 新增
+            cmCouponVipDao.insertVipCouponRelation(relation1);
+            cmCouponVipDao.insertVipCouponRelation(relation2);
+            cmCouponVipDao.insertVipCouponRelation(relation3);
+            cmCouponVipDao.insertVipCouponRelation(relation4);
+        } else {
+            // 修改
+            cmCouponVipDao.updateVipCouponRelation(relation1);
+            cmCouponVipDao.updateVipCouponRelation(relation2);
+            cmCouponVipDao.updateVipCouponRelation(relation3);
+            cmCouponVipDao.updateVipCouponRelation(relation4);
+        }
+    }
 
     @Override
     @Transactional(readOnly = false)
@@ -412,4 +649,53 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
     public List<String> getAllUseDateList(){
         return cmCouponVipDao.getAllUseDateList();
     };
+
+    /**
+     * 查询条件 优惠月份季度调整
+     * @param cmVipCoupon
+     * @return
+     */
+    public CmVipCoupon quarter(CmVipCoupon cmVipCoupon) {
+        String startDate  = "";
+        String endDate  = "";
+        String year = "";
+        String month = "";
+        if (com.thinkgem.jeesite.common.utils.StringUtils.isNotEmpty(cmVipCoupon.getStartDate())) {
+            year = cmVipCoupon.getStartDate().substring(0,cmVipCoupon.getStartDate().length() - 2);
+            month = cmVipCoupon.getStartDate().substring(cmVipCoupon.getStartDate().length() - 2);
+            if (month.equals("01") || month.equals("02") || month.equals("03")) {
+                month = "01";
+            }
+            if (month.equals("04") || month.equals("05") || month.equals("06")) {
+                month = "04";
+            }
+            if (month.equals("07") || month.equals("08") || month.equals("09")) {
+                month = "07";
+            }
+            if (month.equals("10") || month.equals("11") || month.equals("12")) {
+                month = "10";
+            }
+            startDate = year + month;
+        }
+        if (com.thinkgem.jeesite.common.utils.StringUtils.isNotEmpty(cmVipCoupon.getEndDate())) {
+            year = cmVipCoupon.getEndDate().substring(0,cmVipCoupon.getEndDate().length() - 2);
+            month = cmVipCoupon.getEndDate().substring(cmVipCoupon.getEndDate().length() - 2);
+            if (month.equals("01") || month.equals("02") || month.equals("03")) {
+                month = "03";
+            }
+            if (month.equals("04") || month.equals("05") || month.equals("06")) {
+                month = "06";
+            }
+            if (month.equals("07") || month.equals("08") || month.equals("09")) {
+                month = "09";
+            }
+            if (month.equals("10") || month.equals("11") || month.equals("12")) {
+                month = "12";
+            }
+            endDate = year + month;
+        }
+        cmVipCoupon.setStartDate(startDate);
+        cmVipCoupon.setEndDate(endDate);
+        return cmVipCoupon;
+    }
 }

+ 40 - 0
src/main/java/com/caimei/modules/coupon/web/CmVipCouponController.java

@@ -18,6 +18,8 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -45,13 +47,18 @@ public class CmVipCouponController extends BaseController {
 
     @RequestMapping(value = {"list", ""})
     public String list(CmVipCoupon cmVipCoupon, HttpServletRequest request, HttpServletResponse response, Model model) {
+        String startDate = cmVipCoupon.getStartDate();
+        String endDate = cmVipCoupon.getEndDate();
         Page<CmVipCoupon> page = cmVipCouponService.findPage(new Page<CmVipCoupon>(request, response), cmVipCoupon);
+        cmVipCoupon.setStartDate(startDate);
+        cmVipCoupon.setEndDate(endDate);
         model.addAttribute("page", page);
         return "modules/svip/cmSvipCouponList";
     }
 
     @RequestMapping(value = "form")
     public String form(CmVipCoupon cmVipCoupon, Model model) {
+//        cmVipCoupon.setEndTime(cmVipCoupon.getEndTime());
         model.addAttribute("cmVipCoupon", cmVipCoupon);
         // 设置4张券的表单
         SvipCouponForm svipcouponForm = cmVipCouponService.setSvipcouponForms(cmVipCoupon);
@@ -61,6 +68,17 @@ public class CmVipCouponController extends BaseController {
         return "modules/svip/cmSvipCouponForm";
     }
 
+    /**
+     * 专属优惠券配置
+     * @return
+     */
+    @RequestMapping(value = "configuration")
+    public String configuration(Model model) {
+        SvipCouponForm svipcouponForm = cmVipCouponService.setSvipcouponConfigure();
+
+        model.addAttribute("svipcouponForm",svipcouponForm);
+        return "modules/svip/cmSvipCouponConfiguration";
+    }
     /**
      * 保存
      *
@@ -86,6 +104,28 @@ public class CmVipCouponController extends BaseController {
         return "redirect:" + Global.getAdminPath() + "/vip/cmCoupon/?repage";
     }
 
+    /**
+     * 专属优惠券保存
+     * @param svipcouponForm
+     * @param model
+     * @param redirectAttributes
+     * @return
+     * @throws ParseException
+     */
+    @RequestMapping(value = "saveConfigure")
+    public String configureSave(SvipCouponForm svipcouponForm, Model model, RedirectAttributes redirectAttributes) throws ParseException {
+        if (StringUtils.isNotBlank(svipcouponForm.getCouponId1())) {
+            // 修改
+            cmVipCouponService.saveConfigure(svipcouponForm);
+            addMessage(redirectAttributes, "超级会员专属优惠券配置修改成功");
+        } else {
+            // 新增
+            cmVipCouponService.saveConfigure(svipcouponForm);
+            addMessage(redirectAttributes, "超级会员专属优惠券配置新增成功");
+        }
+        return "redirect:" + Global.getAdminPath() + "/vip/cmCoupon/?repage";
+    }
+
     @RequestMapping(value = "close")
     public String close(CmVipCoupon cmVipCoupon, RedirectAttributes redirectAttributes) {
         cmVipCouponService.close(cmVipCoupon);

+ 3 - 3
src/main/java/com/caimei/modules/supers/service/CmSvipPackageService.java

@@ -81,12 +81,12 @@ public class CmSvipPackageService extends CrudService<CmSvipPackageDao, CmSvipPa
         //1套餐12,2套餐3月,3套餐1月
         Double price1 = Double.valueOf(cmSvipPackage.getPrice1());
         Double price2 = Double.valueOf(cmSvipPackage.getPrice2());
-        Double price3 = Double.valueOf(cmSvipPackage.getPrice3());
+//        Double price3 = Double.valueOf(cmSvipPackage.getPrice3());
         String p = cmSvipPackage.getProportion();
         Integer proportion = Integer.valueOf(p);
         dao.updatePrice(price1, 12, proportion);
         dao.updatePrice(price2, 3, proportion);
-        dao.updatePrice(price3, 1, proportion);
+//        dao.updatePrice(price3, 1, proportion);
     }
 
     @Transactional(readOnly = false)
@@ -94,4 +94,4 @@ public class CmSvipPackageService extends CrudService<CmSvipPackageDao, CmSvipPa
         super.delete(cmSvipPackage);
     }
 
-}
+}

+ 10 - 1
src/main/java/com/caimei/modules/user/entity/ClubTemporary.java

@@ -22,6 +22,7 @@ public class ClubTemporary extends DataEntity<ClubTemporary> {
     private String bindMobile;        // 企业绑定手机号
     private String contractEmail;        // 联系邮箱
     private String linkMan;        // 联系人
+    private String linkManIdentity;        // 联系人
     private Integer provinceId;        // 省id
     private Integer cityId;        // 市id
     private Integer townId;        // 地址Id
@@ -124,6 +125,14 @@ public class ClubTemporary extends DataEntity<ClubTemporary> {
         this.linkMan = linkMan;
     }
 
+    public String getLinkManIdentity() {
+        return linkManIdentity;
+    }
+
+    public void setLinkManIdentity(String linkManIdentity) {
+        this.linkManIdentity = linkManIdentity;
+    }
+
     public Integer getProvinceId() {
         return provinceId;
     }
@@ -299,4 +308,4 @@ public class ClubTemporary extends DataEntity<ClubTemporary> {
     public void setImages(String[] images) {
         this.images = images;
     }
-}
+}

+ 1 - 1
src/main/java/com/caimei/modules/user/entity/CmUser.java

@@ -861,4 +861,4 @@ public class CmUser extends DataEntity<CmUser> {
     public void setStoreStatus(boolean storeStatus) {
         this.storeStatus = storeStatus;
     }
-}
+}

+ 4 - 0
src/main/java/com/caimei/modules/user/service/ClubTemporaryService.java

@@ -129,6 +129,10 @@ public class ClubTemporaryService extends CrudService<ClubTemporaryDao, ClubTemp
             club.setContractMobile(clubTemporary.getBindMobile());
             // 联系人
             club.setLinkMan(clubTemporary.getLinkMan());
+            // 联系人身份
+            if (StringUtils.isNotBlank(clubTemporary.getLinkManIdentity())) {
+                club.setLinkManIdentity(Integer.parseInt(clubTemporary.getLinkManIdentity()));
+            }
             // 用户Id
             club.setUserID(user.getUserID());
             // 设置协销ID

+ 15 - 13
src/main/java/com/caimei/modules/user/service/CmBehaviorRecordService.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.caimei.modules.user.dao.CmBehaviorRecordDao;
 import com.caimei.modules.user.entity.CmBehaviorRecord;
 import com.caimei.utils.AppUtils;
+import com.caimei.utils.StringUtils;
 import com.thinkgem.jeesite.common.persistence.Page;
 import com.thinkgem.jeesite.common.service.CrudService;
 import okhttp3.OkHttpClient;
@@ -170,22 +171,23 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
         cmBehaviorRecord.setPage(page);
 
         // 机构用户行为详情
-        List<CmBehaviorRecord> behaviorAgencyList = cmBehaviorRecordDao.behaviorAgency(cmBehaviorRecord);
+        if (StringUtils.isNotBlank(cmBehaviorRecord.getIP())) {
+            List<CmBehaviorRecord> behaviorAgencyList = cmBehaviorRecordDao.behaviorAgency(cmBehaviorRecord);
 
-        for (CmBehaviorRecord record: behaviorAgencyList) {
-            record.setProductImage(AppUtils.getImageURL("product", record.getProductImage(), 0, ""));
-            String time = calculationTime(record.getAccessDuration());
-            record.setAccessDuration(time);
-            String decode = null;
-            try {
-                decode = URLDecoder.decode(record.getPagePath(),"UTF-8");
-            } catch (UnsupportedEncodingException e) {
-                e.printStackTrace();
+            for (CmBehaviorRecord record : behaviorAgencyList) {
+                record.setProductImage(AppUtils.getImageURL("product", record.getProductImage(), 0, ""));
+                String time = calculationTime(record.getAccessDuration());
+                record.setAccessDuration(time);
+                String decode = null;
+                try {
+                    decode = URLDecoder.decode(record.getPagePath(), "UTF-8");
+                } catch (UnsupportedEncodingException e) {
+                    e.printStackTrace();
+                }
+                record.setPagePath(decode);
             }
-            record.setPagePath(decode);
+            page.setList(behaviorAgencyList);
         }
-
-        page.setList(behaviorAgencyList);
         return page;
     }
 

+ 10 - 4
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -1245,23 +1245,25 @@ private VisitRemarkDao visitRemarkDao;
             }
         }
         Page<CmBehaviorRecord> page = cmBehaviorRecordService.behaviorAgencyPage(new Page<>(request, response), record);
+        String masBehavior = "";
         List<CmBehaviorRecord> list = page.getList();
         for (int i = 0; i <= list.size()-1; i++) {
-            describe += list.get(i).getPageLabel();
+            masBehavior += list.get(i).getPageLabel();
             if (list.size()-1 != i) {
-                describe += ",";
+                masBehavior += ",";
             }
         }
         model.addAttribute("page",page);
         model.addAttribute("link",link);
         model.addAttribute("linkage",linkage);
         model.addAttribute("describe",describe);
+        model.addAttribute("masBehavior",masBehavior);
         model.addAttribute("clubId", clubId);
         return "modules/userNew/recordLinkageForm";
     }
 
     @RequestMapping("recordLinkageSave")
-    public String RecordLinkageSave(String describe,String link,Integer clubId,HttpServletRequest request, HttpServletResponse response, Model model,RedirectAttributes redirectAttributes) {
+    public String RecordLinkageSave(String describe,String masBehavior,String link,Integer clubId,HttpServletRequest request, HttpServletResponse response, Model model,RedirectAttributes redirectAttributes) {
         model.addAttribute("clubId", clubId);
 
         if(domain.contains("-b")){
@@ -1272,7 +1274,11 @@ private VisitRemarkDao visitRemarkDao;
             link="http://localhost:8081/clubinfo.html?clubId="+clubId;
         }
 //        StringSelection stsel = new StringSelection(link);
-        newCmClubDao.addRecordLinkage(describe,link,clubId);
+        String replace = describe;
+        if (describe.contains(masBehavior)) {
+            replace = describe.replace(masBehavior, "");
+        }
+        newCmClubDao.addRecordLinkage(replace,link,clubId);
         logger.info(">>>>>>>>>>>生成记录链接");
         addMessage(redirectAttributes, "链接已生成并自动复制,可直接粘贴");
 //        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stsel, stsel);

+ 2 - 1
src/main/resources/mappings/modules/baike/CmBaikeHotSearchMapper.xml

@@ -52,7 +52,8 @@
 				ORDER BY ${page.orderBy}
 			</when>
 			<otherwise>
-				order by -sort desc, a.addTime desc
+-- 				-sort desc,
+				order by  a.addTime desc
 			</otherwise>
 		</choose>
 	</select>

+ 56 - 5
src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml

@@ -89,9 +89,9 @@
 			<if test="status != null">
 				AND a.status = #{status}
 			</if>
-			<if test="commodityType != null">
-				and a.commodityType = #{commodityType}
-			</if>
+<!--			<if test="commodityType != null">-->
+<!--				and a.commodityType = #{commodityType}-->
+<!--			</if>-->
 			<if test="publishSource != null">
 				and a.publishSource = #{publishSource}
 			</if>
@@ -261,8 +261,8 @@
 	</insert>
 
 	<insert id="insertProductFile" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
-		insert into cm_baike_product_file(fileTitle, fileName, ossName)
-		values (#{fileTitle}, #{fileName}, #{ossName})
+		insert into cm_baike_product_file(fileTitle, fileName, ossName,ossUrl)
+		values (#{fileTitle}, #{fileName}, #{ossName},#{ossUrl})
 	</insert>
 
 	<update id="update">
@@ -350,8 +350,59 @@
 	<delete id="deleteQuestionsByProductId">
 		delete from cm_baike_product_question where productId = #{id}
 	</delete>
+	<delete id="delMaterialinfoBYProductId">
+		delete from cm_baike_reference_info where productId=#{id}
+	</delete>
+	<delete id="delTextListByEntryId">
+		delete from cm_baike_text_info where productId=#{id}
+	</delete>
 	<delete id="deleteProductFile">
 		delete from cm_baike_product_file where id = #{fileId}
 	</delete>
+	<select id="getTextInfo" resultType="com.caimei.modules.baike.entity.CmBaikeTextInfo">
+		select * from cm_baike_text_info where productId=#{productId}
+	</select>
+
+	<insert id="saveMaterialinfo">
+		insert into
+		    cm_baike_reference_info(referenceType, website, articleName,websiteName,publishTime,acitationTime,author,workName,publicationPlace,press,publicationYear,acitationWeb,referenceDescription,imageDescription,imageUrl,productId,productType,ctrlId)
+		values (#{referenceType}, #{website}, #{articleName},#{websiteName},#{publishTimeStr},#{acitationTimeStr},#{author},#{workName},#{publicationPlace},#{press},#{publicationYearStr},#{acitationWeb},#{referenceDescription},#{imageDescription},#{imageUrl},#{productId},#{productType},#{ctrlId})
+	</insert>
+	<update id="upMaterialinfo">
+		update cm_baike_reference_info
+		set
+			referenceType=#{referenceType},
+			website=#{website},
+			articleName=#{articleName},
+			websiteName=#{websiteName},
+			publishTime=#{publishTimeStr},
+			acitationTime=#{acitationTimeStr},
+			author=#{author},
+			workName=#{workName},
+			publicationPlace=#{publicationPlace},
+			press=#{press},
+			publicationYear=#{publicationYearStr},
+			acitationWeb=#{acitationWeb},
+			referenceDescription=#{referenceDescription},
+			imageDescription=#{imageDescription},
+			imageUrl=#{imageUrl}
+			where id=#{id}
+	</update>
 
+	<insert id="insertText">
+		insert into cm_baike_text_info(textType,productId,dictionaryContent,referenceId,parentId,dictionaryType)
+		values(#{textType},#{productId},#{dictionaryContent},#{referenceId},#{parentId},#{dictionaryType})
+	</insert>
+	<select id="getMaterialInfo" resultType="com.caimei.modules.baike.entity.CmBaikeReferenceInfo">
+		select * from cm_baike_reference_info where productId=#{productId}
+	</select>
+
+	<delete id="delMaterialinfo">
+		delete from cm_baike_reference_info where id=#{id}
+	</delete>
+	<select id="getMaterialinfo" resultType="com.caimei.modules.baike.entity.CmBaikeReferenceInfo">
+		select * from cm_baike_reference_info
+
+		where id=#{id}
+	</select>
 </mapper>

+ 21 - 7
src/main/resources/mappings/modules/baike/CmBaikeTypeMapper.xml

@@ -10,6 +10,9 @@
 		a.status AS "status",
 		a.addTime AS "addTime",
 		a.addBy AS "addBy",
+        a.pcBanner As pcBanner,
+		a.appBanner As appBanner,
+		a.bannerLink As bannerLink,
 		su.name as "addUserName"
 	</sql>
 	
@@ -31,7 +34,9 @@
 		FROM cm_baike_type a
 		<include refid="cmBaikeTypeJoins"/>
 		<where>
-			
+			<if test="status != null ">
+				 a.status = #{status}
+			</if>
 			<if test="id != null and id != ''">
 				AND a.id = #{id}
 			</if>
@@ -44,16 +49,16 @@
 			<if test="status != null">
 				AND a.status = #{status}
 			</if>
-			<if test="typeSort != null">
-				and a.typeSort = #{typeSort}
-			</if>
+<!--			<if test="typeSort != null">-->
+<!--				and a.typeSort = #{typeSort}-->
+<!--			</if>-->
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
 			</when>
 			<otherwise>
-				order by -sort desc,a.addTime desc
+				order by a.addTime desc
 			</otherwise>
 		</choose>
 	</select>
@@ -82,14 +87,20 @@
 			sort,
 			status,
 			addTime,
-			addBy
+			addBy,
+			pcBanner,
+			appBanner,
+			bannerLink
 		) VALUES (
 			#{typeSort},
 			#{name},
 			#{sort},
 			#{status},
 			NOW(),
-			#{createBy.id}
+			#{createBy.id},
+			#{pcBanner},
+			#{appBanner},
+			#{bannerLink}
 		)
 	</insert>
 	
@@ -97,6 +108,9 @@
 		UPDATE cm_baike_type SET 	
 			name = #{name},
 			sort = #{sort},
+			pcBanner=#{pcBanner},
+			appBanner=#{appBanner},
+			bannerLink=#{bannerLink},
 			status = #{status}
 		WHERE id = #{id}
 	</update>

+ 96 - 4
src/main/resources/mappings/modules/coupon/CmCouponMapper.xml

@@ -168,7 +168,8 @@
 			moneyCouponPrice,
 			moneyCouponFlag,
 			moneyCouponType,
-			delFlag
+			delFlag,
+			configure
 		) VALUES (
 			#{name},
 		    #{couponPayWay},
@@ -194,7 +195,8 @@
 		    #{moneyCouponPrice},
 		    #{moneyCouponFlag},
 			#{moneyCouponType},
-			#{delFlag}
+			#{delFlag},
+		    #{configure}
 		)
 	</insert>
 
@@ -221,7 +223,8 @@
 			categoryType = #{categoryType},
 			couponsMode = #{couponsMode},
 			moneyCouponPrice = #{moneyCouponPrice},
-			moneyCouponType = #{moneyCouponType}
+			moneyCouponType = #{moneyCouponType},
+			configure = #{configure}
 		WHERE id = #{id}
 	</update>
 
@@ -569,4 +572,93 @@
 		  id = #{clubCouponId}
 	</update>
 
-</mapper>
+	<select id="selconfigure" resultType="com.caimei.modules.coupon.entity.CmCoupon">
+		SELECT <include refid="cmCouponColumns"/> FROM cm_coupon a WHERE configure = 1
+	</select>
+	<select id="selCouponId" resultType="integer">
+		SELECT cscm.id as id FROM cm_svip_coupon_month cscm LEFT JOIN cm_svip_coupon csc ON csc.montId = cscm.id WHERE csc.couponId = #{couponId}
+	</select>
+	<!--<insert id="insertConfigure">
+		INSERT INTO cm_coupon_configure(
+			name,
+			couponPayWay,
+			couponAmount,
+			touchPrice,
+			startDate,
+			endDate,
+			receivePeriod,
+			receiveFlag,
+			useTimeFlag,
+			usePeriod,
+			status,
+			couponType,
+			vipFlag,
+			userId,
+			shopId,
+			productType,
+			pcBanner,
+			appletsBanner,
+			categoryType,
+			couponsMode,
+			createDate,
+			moneyCouponPrice,
+			moneyCouponFlag,
+			moneyCouponType,
+			delFlag
+		) VALUES (
+			 #{name},
+			 #{couponPayWay},
+			 #{couponAmount},
+			 #{touchPrice},
+			 #{startDate},
+			 #{endDate},
+			 #{receivePeriod},
+			 #{receiveFlag},
+			 #{useTimeFlag},
+			 #{usePeriod},
+			 #{status},
+			 #{couponType},
+			 #{vipFlag},
+			 #{userId},
+			 #{shopId},
+			 #{productType},
+			 #{pcBanner},
+			 #{appletsBanner},
+			 #{categoryType},
+			 #{couponsMode},
+			 #{createDate},
+			 #{moneyCouponPrice},
+			 #{moneyCouponFlag},
+			 #{moneyCouponType},
+			 #{delFlag}
+		 )
+	</insert>
+	<update id="updateConfigure">
+		UPDATE cm_coupon_configure SET
+		 name = #{name},
+		 couponPayWay = #{couponPayWay},
+		 couponAmount = #{couponAmount},
+		 touchPrice = #{touchPrice},
+		 startDate = #{startDate},
+		 endDate = #{endDate},
+		 receivePeriod = #{receivePeriod},
+		 receiveFlag = #{receiveFlag},
+		 useTimeFlag = #{useTimeFlag},
+		 usePeriod = #{usePeriod},
+		 status = #{status},
+		 couponType = #{couponType},
+		 vipFlag = #{vipFlag},
+		 userId = #{userId},
+		 shopId = #{shopId},
+		 productType = #{productType},
+		 pcBanner = #{pcBanner},
+		 appletsBanner = #{appletsBanner},
+		 categoryType = #{categoryType},
+		 couponsMode = #{couponsMode},
+		 moneyCouponPrice = #{moneyCouponPrice},
+		 moneyCouponType = #{moneyCouponType}
+		WHERE id = #{id}
+	</update>-->
+
+
+</mapper>

+ 24 - 20
src/main/resources/mappings/modules/user/ClubTemporaryMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.user.dao.ClubTemporaryDao">
-    
+
 	<sql id="clubTemporaryColumns">
 		a.id AS "id",
 		a.userId AS "userId",
@@ -11,6 +11,7 @@
 		a.bindMobile AS "bindMobile",
 		a.contractEmail AS "contractEmail",
 		a.linkMan AS "linkMan",
+		a.linkManIdentity AS "linkManIdentity",
 		a.provinceId AS "provinceId",
 		a.cityId AS "cityId",
 		a.townId AS "townId",
@@ -28,14 +29,14 @@
 		IFNULL(s.name,s.linkMan) AS "spName",
         if(csu.delFlag = '0' and now() <![CDATA[ < ]]> csu.endTime,1,0) as svipUserFlag
 	</sql>
-	
+
 	<sql id="clubTemporaryJoins">
 		LEFT JOIN serviceprovider s ON s.userID = a.userId
         LEFT JOIN cm_svip_user csu ON csu.userId = a.userId
 	</sql>
-    
+
 	<select id="get" resultType="ClubTemporary">
-		SELECT 
+		SELECT
 			<include refid="clubTemporaryColumns"/>,
 		d.name AS "province",
 		c.name AS "city",
@@ -47,33 +48,33 @@
 		LEFT JOIN province d ON d.provinceID=c.provinceID
 		WHERE a.id = #{id}
 	</select>
-	
+
 	<select id="findList" resultType="ClubTemporary">
-		SELECT 
+		SELECT
 			<include refid="clubTemporaryColumns"/>
 		FROM club_temporary a
 		<include refid="clubTemporaryJoins"/>
 		<where>
 			<if test="name != null and name != ''">
-				AND a.name LIKE 
+				AND a.name LIKE
 					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
 					<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
 					<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
 			</if>
 			<if test="bindMobile != null and bindMobile != ''">
-				AND a.bindMobile LIKE 
+				AND a.bindMobile LIKE
 					<if test="dbName == 'oracle'">'%'||#{bindMobile}||'%'</if>
 					<if test="dbName == 'mssql'">'%'+#{bindMobile}+'%'</if>
 					<if test="dbName == 'mysql'">concat('%',#{bindMobile},'%')</if>
 			</if>
 			<if test="contractEmail != null and contractEmail != ''">
-				AND a.contractEmail LIKE 
+				AND a.contractEmail LIKE
 					<if test="dbName == 'oracle'">'%'||#{contractEmail}||'%'</if>
 					<if test="dbName == 'mssql'">'%'+#{contractEmail}+'%'</if>
 					<if test="dbName == 'mysql'">concat('%',#{contractEmail},'%')</if>
 			</if>
 			<if test="linkMan != null and linkMan != ''">
-				AND a.linkMan LIKE 
+				AND a.linkMan LIKE
 					<if test="dbName == 'oracle'">'%'||#{linkMan}||'%'</if>
 					<if test="dbName == 'mssql'">'%'+#{linkMan}+'%'</if>
 					<if test="dbName == 'mysql'">concat('%',#{linkMan},'%')</if>
@@ -94,15 +95,15 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<select id="findAllList" resultType="ClubTemporary">
-		SELECT 
+		SELECT
 			<include refid="clubTemporaryColumns"/>
 		FROM club_temporary a
 		<include refid="clubTemporaryJoins"/>
 		<where>
-			
-		</where>		
+
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -111,7 +112,7 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<insert id="insert" parameterType="ClubTemporary"  keyProperty="id" useGeneratedKeys="true">
 		INSERT INTO club_temporary(
 			id,
@@ -121,6 +122,7 @@
 			bindMobile,
 			contractEmail,
 			linkMan,
+			linkManIdentity,
 			provinceId,
 			cityId,
 			townId,
@@ -143,6 +145,7 @@
 			#{bindMobile},
 			#{contractEmail},
 			#{linkMan},
+			#{linkManIdentity},
 			#{provinceId},
 			#{cityId},
 			#{townId},
@@ -159,9 +162,9 @@
 			#{addTime}
 		)
 	</insert>
-	
+
 	<update id="update">
-		UPDATE club_temporary SET 	
+		UPDATE club_temporary SET
 			userId = #{userId},
 			confirmUserId = #{confirmUserId},
 			name = #{name},
@@ -169,6 +172,7 @@
 			bindMobile = #{bindMobile},
 			contractEmail = #{contractEmail},
 			linkMan = #{linkMan},
+			linkManIdentity = #{linkManIdentity},
 			provinceId = #{provinceId},
 			cityId = #{cityId},
 			townId = #{townId},
@@ -185,7 +189,7 @@
 			addTime = #{addTime}
 		WHERE id = #{id}
 	</update>
-	
+
 	<delete id="delete">
 		DELETE FROM club_temporary
 		WHERE id = #{id}
@@ -232,5 +236,5 @@
 		<include refid="clubTemporaryJoins"/>
 		WHERE a.confirmUserId = #{userId}
 	</select>
-	
-</mapper>
+
+</mapper>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1492 - 402
src/main/webapp/WEB-INF/views/modules/baikePage/auditBaikeProductPage.jsp


+ 1913 - 191
src/main/webapp/WEB-INF/views/modules/baikePage/checkBaikePage.jsp

@@ -3,32 +3,170 @@
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
 <head>
-	<title>产品管理</title>
+	<title>采美词条</title>
 	<meta name="decorator" content="default"/>
 	<style>
-		.titleClass{
-			font-weight: bolder;
-			margin-left: -40px;
+		.applicationsan{
+			user-select: none;
+			cursor: pointer;
 		}
-		.keyClass{
-			font-weight: bolder;
+		.controls{
+			width: 520px;
 		}
-		.paramRow {
-			margin-top: 10px;
+		.controls.not-overflow{
+			overflow: initial !important;
 		}
-	</style>
-	<style>
-		.clearfix::after{
-			content: "";
+		.content-edit{
+			position: relative;
+			width: 100%;
+			z-index: 999;
+		}
+		.content-edit .bk-input{
+			padding: 4px 6px;
+			font-size: 14px;
+			line-height: 20px;
+			color: #555;
+			border-radius: 4px;
+			background-color: #fff;
+			border: 1px solid #ccc
+		}
+		.content-edit .bk-input img.scapegoat{
+			width: 16px;
+			height: 16px;
+			vertical-align: -3px;
+		}
+		.content-edit .bk-toolbar{
+			position: absolute;
+			padding: 6px 12px;
+			border: 1px solid #f1f1f1;
+			left: 0;
+			top: 0;
+			transform: translateY(-100%);
+			font-size: 14px;
+			text-align: center;
+			background: #fff;
+			color: #999;
+			cursor: pointer;
+			display: none;
+		}
+		.content-edit .bk-bubble{
+			font-size: 14px;
+			padding: 0 4px;
+			line-height: 18px;
+			border-radius: 12px;
+			position: absolute;
+			right: 0;
+			top: 0;
+			transform: translate(50%, -50%);
+			background: #ddd;
+			color: #fff;
+			box-sizing: border-box;
+			min-width: 18px;
+			text-align: center;
+			display: none;
+			cursor: pointer;
+		}
+		.content-edit .bk-literature{
+			position: absolute;
+			bottom: 0;
+			left: 0;
+			transform: translateY(100%);
+			background: #fff;
+			border: 1px solid #ddd;
+			padding: 0;
+			margin: 0;
+			width: 100%;
+			box-sizing: border-box;
+			display: none;
+		}
+		.content-edit .bk-literature li{
+			list-style-type: none;
+			padding: 8px 16px;
+			display: flex;
+			justify-content: space-between;
+			z-index: 200;
+		}
+		.content-edit .bk-literature li .controls{
+			margin-left: initial;
+			width: inherit;
+		}
+		.content-edit .bk-literature .bk-control{
+			max-width: 80%;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+		}
+		.content-edit .bk-literature .bk-control span{
+			cursor: pointer;
+		}
+		.content-edit .bk-literature .bk-control span:hover{
+			text-decoration: underline;
+		}
+		.content-edit .bk-literature .bk-literature-control span{
+			margin-left: 12px;
+			cursor: pointer;
+			color: #2fa4e7;
+		}
+		.bk-textInfo-item{
+			position: relative;
+			display: flex;
+			align-items: center;
+			margin-bottom: 16px;
+		}
+		.bk-textInfo-item input{
 			display: block;
-			clear: both;
+			width: 100%;
+		}
+		.bk-textInfo-item .bk-textInfo-control{
+			flex: 1;
+			display: flex;
+			flex-wrap: nowrap;
+			column-gap: 8px;
+			margin-left: 16px;
+			position: absolute;
+			right: 0;
+			top: 5px;
+			transform: translateX(105%);
+		}
+		.bk-textInfo-item .bk-textInfo-control span{
+			font-size: 12px;
+			text-decoration: underline;
+			white-space: nowrap;
+			cursor: pointer;
+			color:#2fa4e7;
+		}
+		.paramList{
+			position: relative;
+		}
+		.paramList .param-item{
+			display: flex;
+			align-items: center;
+			column-gap: 16px;
+			position: relative;
+			margin-bottom: 16px;
+		}
+		.paramList .param-name input{
+			display: block;
+			width: initial;
+		}
+		.paramList  .param-name{
+			width: 30%;
+		}
+		.paramList  .param-content{
+			flex: 1;
+		}
+		.paramList  a{
+			position: absolute;
+			right: 0;
+			top: 10%;
+			transform: translateX(130%);
+		}
+		.paramList .control-group{
+			position: relative;
+		}
+		.paramList .add-button{
+			margin-bottom: 16px;
 		}
-		.iconBox{
-			font-size: 0;
-		}/*
-		.controls{
-			margin-left: 0 !important;
-		}*/
 		.controls .conList{
 			display: inline-block;
 			margin-right: 15px;
@@ -95,8 +233,6 @@
 			width: 660px;
 			float: left;
 		}
-	</style>
-	<style>
 		.iconBox{
 			font-size: 0;
 		}
@@ -145,225 +281,1811 @@
 			cursor: pointer;
 			z-index: 100;
 		}
+
+		.display-image-list .cancel-upload{
+			top: -106px;
+			left: 114px;
+		}
+		.display-image-list .conList{
+			position: relative;
+		}
 		.hide-pic {
 			display: none !important;
 		}
+		.select2-choice{
+			width: 200px
+		}
+
+		.red {
+			color: red;
+		}
+		.upload {
+			position: relative;
+			display: inline-block;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 20px;
+		}
+
+		.upload input {
+			position: absolute;
+			width: 170px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.upload:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.add-submit {
+			position: relative;
+			display: inline;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 30px;
+		}
+
+		.add-submit input {
+			position: absolute;
+			width: 50px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.add-submit:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.upload-loading{
+			display: none;
+			width: 32px;
+			height: 32px;
+			margin-left: 10px;
+		}
+		.upload-loading img{
+			width: 16px;
+			height: 16px;
+			margin: 0 auto 0;
+		}
+
+		#file-list-display {
+			width: 600px;
+			height: auto;
+			float: left;
+			margin-left: 20px;
+		}
+
+		#file-list-display p {
+			line-height: 30px;
+			font-size: 14px;
+			color: #333333;
+			margin: 0;
+		}
+
+		#file-list-display p .del {
+			color: #2fa4e7;
+			font-size: 12px;
+			cursor: pointer;
+			margin-left: 20px;
+		}
+
+		.Main-content{
+			height: 100px;
+		}
+		.dialogmask {
+			position: fixed;
+			top: 0px;
+			height: 100%;
+			width: 100%;
+			z-index: 1000;
+			display: none;
+
+		}
+
+		.opacity { /*遮罩浑浊处理*/
+			opacity: 0.3;
+			filter: alpha(opacity=30);
+			background-color: #000;
+		}
+
+		.box {
+			overflow: hidden;
+			position: fixed;
+			width: 55%;
+			height: 60%;
+			z-index: 1005; /*值越大,和其他层层叠时越在上面*/
+			left: 20%;
+			top: 15%;
+			background-color: #fff;
+			border: 1px solid rgb(0, 153, 153);
+		}
+		.ckzl {
+			overflow: hidden;
+			position: fixed;
+			width: 600px;
+			max-height: 600px;
+			z-index: 1000; /*值越大,和其他层层叠时越在上面*/
+			left: 50%;
+			top: 50%;
+			background-color: #fff;
+			transform: translate(-50%, -50%);
+			padding: 32px;
+			border: 1px solid #ddd;
+		}
+
+		.ckzl .digcontent .dig-tab{
+			display: flex;
+			align-items: center;
+			padding-bottom: 24px;
+		}
+
+		.ckzl .digcontent .dig-tab a{
+			margin-right: 16px;
+		}
+
+		.ckzl .digcontent .control-group{
+			margin-left: 0 !important;
+			margin-top: 12px;
+		}
+
+		.ckzl .form-actions{
+			display: flex;
+			align-items: center;
+			background: transparent;
+			padding: 0;
+			padding-top: 20px;
+			background-color: transparent;
+			margin-bottom: 0;
+			border-top: 1px solid #e5e5e5
+		}
+
+		.ckzl .form-actions button{
+			margin-left: 16px;
+		}
+
+		.ckzl .auth-qrCode-list{
+			margin-top: -60px;
+			margin-left: 30px;
+		}
+
+		.ckzl .bk-upload-tip{
+			margin-left: 24px;
+			margin-top: 16px;
+			font-size: 12px;
+			color: #999;
+		}
+
+		.ckzl .bk-input-tip{
+			margin-left: 100px;
+			font-size: 12px;
+			color: #999;
+		}
+
+		.dialogtitle {
+			width: 100%;
+			height: 30px;
+			line-height: 30px;
+			position: absolute;
+			font-size: 18px;
+			top: 0px;
+			background-color: lightgrey;
+		}
+
+		.dialogcontent {
+			padding-top: 20px;
+			OVERFLOW: scroll;
+			height: calc(100% - 20px);
+			height: -webkit-calc(100% - 20px);
+			margin-left: 30px;
+		}
+
+		.logcontent {
+			padding: 10px;
+		}
+		.pla::-webkit-input-placeholder{
+			color: green;
+		}
+
+		#mainIgeBox{
+			margin-top: -174px;
+			margin-left:  0 !important;
+		}
+
+		#mainIgeBox label{
+			margin-left: 27px !important;
+			margin-top: 14px;
+		}
 	</style>
 	<script type="text/javascript">
+		//显示弹框,并且根据结果是true或false来更改标题部分的颜色
+		function showlog_result(result, info) {//展示具体弹框内容,以及根据结果是否正确变更title的颜色
+			$("#dialog").css({display: "block"});//通过Jquery的css()更改样式
+			$("#dialogmask").css({display: "block"});
+			// var s=document.getElementById("logcontent").innerHTML;
+			// $("#logcontent").html(s);
+		}
+		//关闭弹窗
+		function dialog(){
+			document.getElementById("dialog").style.display='none';
+			document.getElementById("dialogmask").style.display='none';
+		}
+		//显示资料弹窗
+		function digCk(type){
+			document.getElementById("dig").style.display='block';
+			document.getElementById("dig").title=type;
+		}
+		//隐藏资料弹窗
+		function cantral(){
+			document.getElementById("dig").style.display='none';
+		}
+		//添加资料
+		function addZl(){
+			document.getElementById("zl").style.display='block';
+			document.getElementById("yyzl").style.display='none';
+			document.getElementById("confimRefrence").style.display='block';
+		}
+		function removeZl(){
+			document.getElementById("zl").style.display='none';
+			document.getElementById("yyzl").style.display='block';
+			document.getElementById("confimRefrence").style.display='none';
+		}
+		//不同资料显示不同的内容
+		function ckzl_change(){
+			var content=$("#info").val();
+			if(2 == content){
+				document.getElementById("wlzl").style.display='none';
+				document.getElementById("zzzl").style.display='block';
+				document.getElementById("qtzl").style.display='none';
+			}else if(3 == content){
+				document.getElementById("wlzl").style.display='none';
+				document.getElementById("zzzl").style.display='none';
+				document.getElementById("qtzl").style.display='block';
+			}else{
+				document.getElementById("wlzl").style.display='block';
+				document.getElementById("zzzl").style.display='none';
+				document.getElementById("qtzl").style.display='none';
+			}
+		}
+		//信息栏只读设置
+		function readflag(index){
+			var info=document.getElementById("name["+index+"]").value;
+			//标题为空则内容只读
+			if(undefined != info && null!=info && '' !=info){
+				document.getElementById("content["+index+"]").readOnly=false;
+			}else{
+				document.getElementById("content["+index+"]").readOnly=true;
+			}
+		}
+		$(document).ready(function() {
+			var flag=document.getElementById("createEntryGuidance").innerHTML;
+			if('添加'==flag){
+				showlog_result(null,null);
+			}
+			$("#inputForm").validate({
+				submitHandler: function(form){
+					// $('.xxl-name').each(function (index, item) {
+					// 	$(item).attr('name', 'paramList['+ index +'].name')
+					// })
+					var status = $("input[name='status']:checked").val();
+					// 计算空数据条数
+					debugger
+					var propertyArr = [];
+					var name = $("#name").val();
+					// var alias = $("#alias").val();
+					// var discription = $("#discription").val();
+					var shopId = $("#shopId").val();
+					// var param0 = $('input[name="paramList[0].name"]').val();
+					var seoKeyword = $("#seoKeyword").val();
+					var publishTime = $('input[name="publishTime"]').val();
+					var basePv = $("#basePv").val();
+					var typeId = $("#typeId").val();
+
+					propertyArr[0] = name;
+					// propertyArr[1] = discription;
+					// propertyArr[1] = param0;
+					propertyArr[1] = seoKeyword;
+					propertyArr[2] = shopId;
+					propertyArr[3] = publishTime;
+					propertyArr[4] = basePv;
+					propertyArr[5] = typeId;
+					// propertyArr[8] = alias;
+					// propertyArr[9] = image;
+					// alert("1111111111111111");
+					var emptyNum = 0;
+					for (var i = 0; i < propertyArr.length; i++) {
+						var property = propertyArr[i].trim();
+						if ("" === property) {
+							emptyNum++;
+						}
+					}
+					$("#emptyNum").val(emptyNum);
+
+					// 检测敏感词
+					var propertyMap = new Map();
+					propertyMap.set("name", name);
+					// propertyMap.set("alias", alias);
+					// propertyMap.set("discription", discription);
+					// propertyMap.set("productLink", productLink);
+					for (var i = 0; i <= 9; i++) {
+						var paramName = "\"paramList[" + i + "].name\"";
+						var contentName = "\"paramList[" + i + "].content\"";
+						var param = $('input[name=' + paramName + ']').val();
+						var content = $('input[name=' + contentName + ']').val();
+						if ( param === undefined || param === '') {
+							break;
+						} else {
+							propertyMap.set("param" + i, param);
+							propertyMap.set("content" + i, content);
+						}
+					}
+					// propertyMap.set("advantage", advantage);
+					// propertyMap.set("disadvantage", disadvantage);
+					// propertyMap.set("principle", principle);
+					propertyMap.set("seoKeyword", seoKeyword);
+					// propertyMap.set("brand", brand);
+					// propertyMap.set("producePlace", producePlace);
+					// propertyMap.set("company", company);
+					// propertyMap.set("adaptiveMan", adaptiveMan);
+					// propertyMap.set("unAdaptiveMan", unAdaptiveMan);
+					// propertyMap.set("aroundOperation", aroundOperation);
+					// if (2 == commodityType) {
+					//     propertyMap.set("authLink", authLink);
+					// }
+					<%--for (var i = 0; i <= 20; i++) {--%>
+					<%--	var questionName = "\"questionList[" + i + "].question\"";--%>
+					<%--	var answerName = "\"questionList[" + i + "].answer\"";--%>
+					<%--	var question = $('input[name=' + questionName + ']').val();--%>
+					<%--	var answer = $('input[name=' + answerName + ']').val();--%>
+					<%--	if (question === undefined || question === '') {--%>
+					<%--		break;--%>
+					<%--	} else {--%>
+					<%--		propertyMap.set("question" + i, question);--%>
+					<%--		propertyMap.set("answer" + i, answer);--%>
+					<%--	}--%>
+					<%--}--%>
+					var sensitiveWords = '${sensitiveWords}';
+					const mint = new MintFilter(sensitiveWords.split('|'));
+					var filterSync = '';
+					var touchWords = '';
+					var touchNum = 0;
+					<%--debugger--%>
+					propertyMap.forEach(function (value,key,map) {
+						filterSync = mint.filterSync(value);
+						filterSync.words.forEach(word=>{
+							touchWords += touchWords === '' ? word : "," + word;
+						})
+						if (touchWords !== '') {
+							// 增加敏感词触发数量
+							touchNum++;
+							// 设置敏感词提示
+							$("#" + key + "SensitiveWords").text("敏感词:" + touchWords);
+							touchWords = '';
+						}
+					});
+					if (1 == status && emptyNum > 0) {
+						var msg = "您还剩余" + emptyNum + "项未完善,将会导致用户对您产品/仪器的认识度不够,确认是否提交?";
+						top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+							if (v == 'ok') {
+								if (touchNum > 0) {
+									var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
+											"请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
+											"当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
+											"将会影响发布时审核不通过!";
+									top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+										if (v == 'ok') {
+											loading('正在提交,请稍等...');
+											form.submit();
+										}
+									}, {buttonsFocus: 1, persistent: true});
+								} else{
+									loading('正在提交,请稍等...');
+									form.submit();
+								}
+							}
+						}, {buttonsFocus: 1, persistent: true});
+					} else {
+						if (touchNum > 0) {
+							var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
+									"请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
+									"当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
+									"将会影响发布时审核不通过!";
+							top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+								if (v == 'ok') {
+									loading('正在提交,请稍等...');
+									form.submit();
+								}
+							}, {buttonsFocus: 1, persistent: true});
+						} else{
+							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);
+					}
+				}
+			});
+		});
+		function saveInfo(){
+			var content=$("#info").val();//参考资料类型
+			var website=$("#website").val();//网址
+			var articleName=$("#articleName").val();//文章名字
+			var websiteName=$("#websiteName").val();//网站名称
+			var publishTimeStr=$("#publishTimeStr").val();//发布日期
+			var acitationTimeStr=$("#acitationTimeStr").val();//引文日期
+			var productId="";
+			<c:if test="${cmBaikeProduct.entryId eq 2}">
+			productId=${cmBaikeProduct.id}
+			</c:if>
+			var zlid=document.getElementById("dig").lang;
+			var params={}
+			if(content==1){
+				params={
+					//网络资料
+					"referenceType":content,
+					"website":website,
+					"articleName":articleName,
+					"websiteName":websiteName,
+					"publishTimeStr":publishTimeStr,
+					"acitationTimeStr":acitationTimeStr,
+					//公共
+					"productId":productId,//词条id
+					"productType":document.getElementById("dig").title,//词条内容
+					"flagId":document.getElementById("dig").tabIndex,//添加修改标识  1添加 2修改
+					"zlId":zlid//资料id 用于修改
+				}
+			}else if(content=2){
+				params={
+					"referenceType":content,
+					"author":$("#author").val(),//作者
+					"workName":$("#workName").val(),//著作名
+					"publicationPlace":$("#publicationPlace").val(),//出版地
+					"press":$("#press").val(),//出版社
+					"publicationYearStr":$("#publicationYearStr").val(),//出版年
+					"acitationWeb":$("#acitationWeb").val(),//引文页码
+					//公共
+					"productId":productId,//词条id
+					"productType":document.getElementById("dig").title,//词条内容
+					"flagId":document.getElementById("dig").tabIndex,//添加修改标识  1添加 2修改
+					"zlId":zlid//资料id 用于修改
+				}
+			}else if(content=3){
+				params={
+					//其他资料
+					"referenceDescription":$("#referenceDescription").val(),//参考资料说明
+					"imageDescription":$("#imageDescription").val(),//图片描述
+					"imageUrl":$("#image").val(),//图片地址
+					//公共
+					"productId":productId,//词条id
+					"productType":document.getElementById("dig").title,//词条内容
+					"flagId":document.getElementById("dig").tabIndex,//添加修改标识  1添加 2修改
+					"zlId":zlid//资料id 用于修改
+				}
+			}
+			// alert(content+"---"+website+"---"+articleName+"---"+websiteName+"---"+publishTime+"---"+acitationTime);
+			// var params={
+			// 	//网络资料
+			// 	"referenceType":content,
+			// 	"website":website,
+			// 	"articleName":articleName,
+			// 	"websiteName":websiteName,
+			// 	"publishTimeStr":publishTimeStr,
+			// 	"acitationTimeStr":acitationTimeStr,
+			// 	//著作资料
+			// 	"author":$("#author").val(),//作者
+			// 	"workName":$("#workName").val(),//著作名
+			// 	"publicationPlace":$("#publicationPlace").val(),//出版地
+			// 	"press":$("#press").val(),//出版社
+			// 	"publicationYearStr":$("#publicationYearStr").val(),//出版年
+			// 	"acitationWeb":$("#acitationWeb").val(),//引文页码
+			// 	//其他资料
+			// 	"referenceDescription":$("#referenceDescription").val(),//参考资料说明
+			// 	"imageDescription":$("#imageDescription").val(),//图片描述
+			// 	"imageUrl":$("#image").val(),//图片地址
+			//     //公共
+			// 	"productId":productId,//词条id
+			//     "productType":document.getElementById("dig").title,//词条内容
+			// 	"flagId":document.getElementById("dig").tabIndex,//添加修改标识  1添加 2修改
+			// 	"zlId":zlid//资料id 用于修改
+			// }
+			$.ajax({
+				url : "${ctx}/baike/cmBaikeProduct/saveMaterialinfo",
+				data : params,
+				type : 'post',
+				success : function(data){
+					document.getElementById("dig").style.display='none';
+					alert("保存资料成功");
+					$("#dig").load(location.href+" #dig>*","");
+					<%--window.location.href = "${ctx}/baike/cmBaikeProduct/form?commodityType=1";--%>
+
+				},
+				error : function(){
+					alert(222);
+				}
+			})
+		}
+		function saveMataInfo(){
+
+		}
+
+		function imgSizeChange(){
+			// if($("#img"+size).width==){
+			//
+			// }
+			// alert();
+			// document.getElementById("imgaa").style.width=100px;
+			parent.location.href = "https://zp.caimei365.com/12/ross/activity/challenge";
+		}
+		//删除资料
+		function delMaterial(mid){
+			var msg='确定删除该资料?';
+			top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
+				if(v=='ok'){
+					$.ajax({
+						url : "${ctx}/baike/cmBaikeProduct/delMaterialinfo",
+						data : {"mid":mid},
+						type : 'post',
+						success : function(data){
+							top.$.jBox.tip('删除资料成功', 'success');
+							$("#mata").load(location.href+" #mata>*","");
+							<%--window.location.href = "${ctx}/baike/cmBaikeProduct/form?commodityType=1";--%>
+						},
+						error : function(){
+							alert(222);
+						}
+					})
+				}
+				// top.$.jBox.tip('删除成功', 'success');
+				// window.location.reload();
+				return;
+			},{buttonsFocus:1,persistent: true});
+		}
+		//编辑资料
+		function upMaterial(mid){
+			$.ajax({
+				url : "${ctx}/baike/cmBaikeProduct/getMaterialinfo",
+				data : {"mid":mid},
+				type : 'post',
+				success : function(data){
+					$("#info").val(data.referenceType);
+					var content=$("#info").val();
+					// $("#info option[value='3']").prop("selected",true);
+					if(2 == content){
+						document.getElementById("wlzl").style.display='none';
+						document.getElementById("zzzl").style.display='block';
+						document.getElementById("qtzl").style.display='none';
+					}else if(3 == content){
+						document.getElementById("wlzl").style.display='none';
+						document.getElementById("zzzl").style.display='none';
+						document.getElementById("qtzl").style.display='block';
+					}else{
+						document.getElementById("wlzl").style.display='block';
+						document.getElementById("zzzl").style.display='none';
+						document.getElementById("qtzl").style.display='none';
+					}
+					//判断是编辑还是添加 1添加 2编辑
+					if(data.referenceType==1){
+						$("#website").val(data.website);
+						$("#articleName").val(data.articleName);
+						$("#websiteName").val(data.websiteName);
+						$("#publishTimeStr").val(data.publishTimeStr);
+						$("#acitationTimeStr").val(data.acitationTimeStr);
+						document.getElementById("dig").style.display='block';
+					}
+					if(data.referenceType==2){
+						$("#author").val(data.author);
+						$("#workName").val(data.workName);
+						$("#publicationPlace").val(data.publicationPlace);
+						$("#press").val(data.press);
+						$("#publicationYearStr").val(data.publicationYearStr);
+						$("#acitationWeb").val(data.acitationWeb);
+						document.getElementById("dig").style.display='block';
+					}
+					document.getElementById("dig").tabIndex=2;
+					document.getElementById("dig").lang=mid;
+				},
+				error : function(){
+					alert(222);
+				}
+			})
+		}
 	</script>
 </head>
 <body>
-	<ul class="nav nav-tabs">
-		<li><a href="${ctx}/baike/cmBaikeProduct/?commodityType=${cmBaikeProduct.commodityType}&publishSource=${cmBaikeProduct.publishSource}">${commodityType}</a></li>
-		<li class="active"><a href="${ctx}/baike/cmBaikeProduct/check?id=${cmBaikeProduct.id}">查看</a></li>
-	</ul><br/>
-	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
-		<div class="control-group">
-			<label class="control-label titleClass">${commodityType}简述</label>
-		</div>
-		<div class="control-group">
-			<label class="control-label">${commodityType}名称:</label>
-			<div class="controls">
-				${cmBaikeProduct.name}
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">${commodityType}别名:</label>
-			<div class="controls">
-				${cmBaikeProduct.alias}
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">${commodityType}概述:</label>
-			<div class="controls" style="width:812px">
-				${cmBaikeProduct.discription}
-            </div>
+<ul class="nav nav-tabs">
+	<li><a href="${ctx}/baike/cmBaikeProduct/?commodityType=${cmBaikeProduct.commodityType}">采美词条</a></li>
+	<li class="active"><a id="createEntryGuidance"  href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}&commodityType=${cmBaikeProduct.commodityType}">${not empty cmBaikeProduct.id?'编辑':'添加'}</a></li>
+</ul><br/>
+<%--	<div>--%>
+<%--		<button onclick="showlog_result(true,'展示正确内容的弹框')">展示正确弹框</button>--%>
+<%--	</div>--%>
+<div id="dialogmask" class="dialogmask opacity"></div>
+<div id="dig" class="ckzl" style="display: none"> 
+	<div id="dig_content" class="digcontent">
+		<div class="dig-tab">
+			<a class="btn btn-primary" onclick="addZl()">添加参考资料</a>
+			<a class="btn btn-primary" onclick="removeZl()">引用已有资料</a>
 		</div>
-		<div class="control-group">
-			<label class="control-label">${commodityType}概述:</label>
-			<div class="controls">
-				${cmBaikeProduct.productLink}
-            </div>
-		</div>
-		<div class="control-group">
-			<label class="control-label">${commodityType}图片:</label>
-			<div class="controls">
-				<a href="${cmBaikeProduct.image}" style="cursor: pointer;margin-left: 20px" target="_blank"><img src="${cmBaikeProduct.image}" style="width: 120px"></a>
+		<%--已有资料--%>
+		<div class="control-group" id="yyzl" style="display: none">
+			<div class="check-reference-list">
+				<c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">
+					<c:if test="${videoFile.referenceType eq '1'}">
+						<div class="controls applicationsan">
+							<span class="del">[${statusIndex.index}]</span>
+							<span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}.</a></span>
+							<span class="del">${videoFile.websiteName}).</span>
+							<span class="del">${videoFile.publishTime}.</span>
+							<span class="del">${videoFile.acitationTime}.</span>
+							<a onclick="saveMataInfo(${videoFile.id})"></a>
+						</div>
+					</c:if>
+					<c:if test="${videoFile.referenceType eq '2'}">
+						<div class="controls applicationsan">
+							<span class="del">[${statusIndex.index}]</span>
+							<span class="del">${videoFile.author}.</span>
+							<span class="del">${videoFile.workName}.</span>
+							<span class="del">${videoFile.publicationPlace}.</span>
+							<span class="del">${videoFile.press}.</span>
+							<span class="del">${videoFile.publicationYear}.</span>
+							<span class="del">${videoFile.acitationWeb}.</span>
+							<a onclick="saveMataInfo(${videoFile.id})"></a>
+
+						</div>
+					</c:if>
+					<c:if test="${videoFile.referenceType eq '3'}">
+						<div class="controls applicationsan">
+							<span class="del">[${statusIndex.index}]</span>
+							<span class="del">${videoFile.referenceDescription}.</span>
+							<span class="del">${videoFile.imageDescription}.</span>
+								<%--
+								<div class="conList">
+									<img id="imgaa"  src="${videoFile.imageUrl}" height="50px" width="50px" >(图片)</input>
+								</div>
+								--%>
+							<a onclick="saveMataInfo(${videoFile.id})">引用资料</a>
+						</div>
+					</c:if>
+				</c:forEach>
 			</div>
 		</div>
-        <div style="${cmBaikeProduct.commodityType eq 2?'':'display:none'}" >
-            <div class="control-group">
-                <label class="control-label titleClass">正品识别</label>
-            </div>
-            <div class="control-group">
-                <label class="control-label">认证链接:</label>
-                <div class="controls">
-					${cmBaikeProduct.authLink}
-                </div>
-            </div>
+		<%--添加参考资料--%>
+		<div id="zl">
 			<div class="control-group">
-				<label class="control-label">认证二维码:</label>
-				<div class="controls">
-					<a href="${cmBaikeProduct.authQrCode}" style="cursor: pointer;margin-left: 20px" target="_blank"><img src="${cmBaikeProduct.authQrCode}" style="width: 120px"></a>
+				<label class="red">*</label>
+				<label class="control-label">参考资料类型:</label>
+				<select id="info" onchange="ckzl_change()">
+					<option id="zllx1" value="1">网络资料</option>
+					<option id="zllx2" value="2">著作资料</option>
+					<option id="zllx3" value="3">其他资料</option>
+				</select>
+			</div>
+			<%--网络资料--%>
+			<div class="wlzl" style="display: block" id="wlzl">
+				<div class="control-group">
+					<label class="red">*</label>
+					<label class="control-label keyClass">输入网址:</label>
+					<input type="text" id="website" required="true"  htmlEscape="false" class="input-xlarge " placeholder="请以http(s)开头"/>
+				</div>
+				<div class="control-group">
+					<label class="red">*</label>
+					<label class="control-label keyClass">文章名字:</label>
+					<input type="text" id="articleName" required="true" htmlEscape="false" class="input-xlarge " placeholder="请输入文章名字"/>
+				</div>
+				<div class="control-group">
+					<label class="red">*</label>
+					<label class="control-label keyClass">网站名称:</label>
+					<input  type="text" id="websiteName"  htmlEscape="false" class="input-xlarge " placeholder="请输入网站名称 如:新华网"/>
+				</div>
+				<div class="control-group">
+					<label class="control-label keyClass">发表日期:</label>
+					<input type="text" id="publishTimeStr" name="publishTimeStr" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+						   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+				</div>
+				<div class="control-group">
+					<label class="control-label keyClass">引文日期:</label>
+					<input type="text" id="acitationTimeStr" name="publishTimeStr" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+						   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
 				</div>
 			</div>
-        </div>
-		<div class="paramList">
-			<div class="control-group">
-				<label class="control-label titleClass">${commodityType}参数</label>
+			<%--著作资料--%>
+			<div class="zzzl" style="display: none" id="zzzl">
+				<div class="control-group" >
+					<label class="red">*</label>
+					<label class="control-label keyClass">作者:</label>
+					<input type="text" id="author" htmlEscape="false" class="input-xlarge " placeholder="请输入作者名称 多个作者使用英文都好隔开"/>
+				</div>
+				<div class="control-group">
+					<label class="red">*</label>
+					<label class="control-label keyClass">著作名:</label>
+					<input type="text" id="workName"  htmlEscape="false" class="input-xlarge " placeholder="请输入著作名"/>
+				</div>
+				<div class="control-group">
+					<label class="control-label keyClass">出版地:</label>
+					<input type="text" id="publicationPlace" htmlEscape="false" class="input-xlarge " placeholder="请输入出版地信息"/>
+				</div>
+				<div class="control-group">
+					<label class="red">*</label>
+					<label class="control-label keyClass">出版社:</label>
+					<input type="text" id="press" htmlEscape="false" class="input-xlarge " placeholder="请输入出版社名称"/>
+				</div>
+				<div class="control-group">
+					<label class="control-label keyClass">出版年:</label>
+					<input type="text" id="publicationYearStr" name="publicationYearStr"  type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+						   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+				</div>
+				<div class="control-group">
+					<label class="control-label keyClass">引文编码:</label>
+					<input type="text" id="acitationWeb"  htmlEscape="false" class="input-xlarge " placeholder="请输入引用著作的页码 如 100 121"/>
+				</div>
 			</div>
-			<c:forEach items="${cmBaikeProduct.paramList}" var="productParam" varStatus="index">
+			<%--其他资料--%>
+			<div class="qtzl" id="qtzl" style="display: none" >
+				<div class="control-group">
+					<label class="red">*</label>
+					<label class="control-label keyClass">参考资料说明:</label>
+					<textarea id="referenceDescription" type="text"  style="position: relative;height: 100px; width: 450px;" maxlength="50" ></textarea>
+					<label class="bk-input-tip">其他类型参考资料,填写格式请参阅<a href="">《信息与文献 参考文献著录规则 GB/T 7714-2015》</a></label>
+				</div>
+				<div class="control-group" >
+					<label class="control-label keyClass">图片描述:</label>
+					<input type="text" id="imageDescription" htmlEscape="false" class="input-xlarge " placeholder="请输入其他参考资料的具体描述"/>
+				</div>
 				<div class="control-group">
-					<label class="control-label">${productParam.name}:</label>
-					<div class="controls">
-						${productParam.content}
+					<label class="control-label">图片上传:</label>
+					<div class="auth-qrCode-list clearfix">
+						<div class="controls upload-content iconBox mainImageBox" id="mainImageBox">
+							<div class="conList">
+								<hidden id="referenceImgUrl" path="referenceImgUrl" htmlEscape="false" maxlength="255" class="input-xlarge "/>
+								<sys:ckfinder input="referenceImgUrl" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
+								<label class="bk-upload-tip">请上传引用的图片资源,需同时上传资料的封面、以及含有对应具体内容的图片;注意:图片需要保证完整、不可遮挡且清晰</label>
+							</div>
+						</div>
 					</div>
 				</div>
-			</c:forEach>
-		</div>
-		<div class="control-group">
-			<label class="control-label keyClass">${commodityType}优点:</label>
-			<div class="controls" style="width:812px">
-				${cmBaikeProduct.advantage}
-			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label keyClass">${commodityType}缺点:</label>
-			<div class="controls" style="width:812px">
-				${cmBaikeProduct.disadvantage}
 			</div>
+
 		</div>
-		<div class="control-group">
-			<label class="control-label keyClass">${commodityType}原理:</label>
-			<div class="controls" style="width:812px">
-				${cmBaikeProduct.principle}
-			</div>
+	</div>
+	<div class="form-actions">
+		<button class="cancel btn btn-primary">取 消</button>
+	</div>
+</div>
+<%--	<div id="dialogmask" class="dialogmask opacity"></div>--%>
+<div id="dialog" class="box" style="display: none"> 
+	<div id="dialog_content" class="dialogcontent">
+		<%--			<div id="logcontent" class="logcontent"><a herf="https://www.baidu.com">三生三世</a></div>--%>
+		<%--			<a herf="https://www.baidu.com">十里桃花</a>--%>
+		<div><h4>创建词条引导</h4></div>
+		<br>
+		<div>欢迎进入创建词条引导,为便于您更好的通过审核,请务必确保您已知晓百科词条的<a href="${ctx}/baike/cmBaikeProduct/entry" target="_blank">编辑须知</a>,如有疑问,您可以<a>点此</a>求助采美工作人员。</div>
+		<br>
+		<div><h5>声明</h5></div>
+		<br>
+		<div>在正式创建词条前,首先请你承诺:</div>
+
+		<div>1.不在百科添加广告性质的内容, 如联系方式,官方网站链接等;</div>
+
+		<div>2.不在百科编写涉及反动,违法犯罪,色情,暴力的内容;</div>
+
+		<div>3.不在百科编写虚假的、捏造的、恶搞的、缺乏根据的内容;</div>
+
+		<div>4.不侵犯他人合理权益;</div>
+
+		<div>5.接受违反以上规则时,百科账号会被封禁的结果。</div>
+		<br>
+		<div><h5>词条名</h5></div>
+		<br>
+		<div>成功创建词条的首要条件是了解一些基础知识!</div>
+		<br>
+		<div><h5>■什么是词条?</h5></div>
+		<br>
+		<div>词条指的是对于单一事物内容的介绍,例如技术,成分等。每个词条都有属于自己的名称,你可以通过搜索词条的名称来找到它们。</div>
+		<div>已有词条重名?创建多义词!</div>
+		<div>与已有词条意义相同?反馈同义词!</div>
+		<br>
+		<div><h5>■什么是规范的词条名?</h5></div>	<br>
+
+		<div>采美百科规范的词条名是一个专有名词,请使用正式的全称或最广为人知的常见名。</div>
+		<div>例如:皮秒激光美容、光子嫩肤、线粒体、葡聚糖等</div>
+		<br>
+		<div><h5>主题</h5></div>	<br>
+		<div>恭喜你已经完成了创建词条的第一步!现在想一想你要创建的词条属于什么类型?</div>
+		<div>选择正确的类型,精确定位你的创建难点所在!</div>
+
+
+		<br>
+		<div><h5>产品成分类词条</h5></div>	<br>
+		<div>如玻尿酸钠、葡聚糖、虎杖等</div>
+
+
+		<br>
+		<div><h5>产品技术词条</h5></div>	<br>
+		<div>如射频、皮秒、808半导体激光技术、透热疗法、448KHz、LDM水滴提升等</div>
+		<br>
+		<div><h5>词条创建要求</h5></div>	<br>
+		<div><h6>1.描述客观</h6></div>
+		<div>描述事物时以事实为依
+			据不加入感情色彩,不掺杂个人的好恶。百科词条
+			是客观内容的集合,只站在第三方立场,以事实说话。例如,
+			某篮球运动员某一场的投篮命中率较差,一般的表述是命中率低,
+			甚至使用“打铁”之类的贬义词。而这样的表述模糊不清,多少算低,多
+			少算高各有标准;同时也会造成支持者和反对者的口水战。所以直接把赛事数据
+			列出,是高是低各自评说即可。另外在筛选内容时,也要保证公正客观,尤其对于争
+			议性内容,保留多方观点并附以可靠的参考资料,是处理争议内容较为可取的做法。</div>
+		<br>
+		<div><h6>2.修饰适当</h6></div>	<br>
+		<div>百科词条提倡用语“客观”,在一般性的叙述中(区别于引用原文的引述)尽量少的使用形容词和程度副词(最XXXX、十分XXX……)。</div>
+		<br>
+		<div><h6>3.参考资料要有效</h6></div>	<br>
+
+
+		<div>参考资料是正文内容客观的另一种表现形式。词条某条内容,光靠“说”自己客观是不够的,应以可信有效的参考资料作为佐证来源,才能证明该内容是否已获得公众知晓或认可。
+			特色词条应该保证一半以上的信息点都是有可靠来源的(由科学百科权威认证的特色词条,应确保词条正文中(含概述)每个目录模块中都有至少一条权威参考资料)。
+			这里的有来源不是要求一字一句的复制粘贴,而是“内容虽经必要提炼、整理,但却不失原意”。例如前述的两个姜文词条中的文段,整理后的内容要素和观点依然来自参考资料,并没有增减其原意。
 		</div>
-		<div class="control-group">
-			<label class="control-label">SEO关键词:</label>
-			<div class="controls">
-					${cmBaikeProduct.seoKeyword}
-			</div>
+
+		<br>
+		<div>可靠的来源一般包括文献、书籍等出版物、主流媒体发布的消息、政府或公众机构官网发布的内容等。关于可靠的来源的具体定义,请参阅百度百科:参考资料。</div>
+		<br>
+
+
+		<div>如,“<a>牛顿第一运动定律</a>”词条中,定律内容、发现者、适用范围等都是必不可少的重要内容,这些部分的缺失会导致读者对词条内容的错误认识。</div>
+		<div align="center"><input class="btn btn-primary" type="button" onclick="dialog()" value="我已阅读并知晓"></div>  
+	</div>
+</div>
+
+<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" enctype="application/json" method="post" class="form-horizontal">
+	<form:hidden path="id"/>
+	<form:hidden path="fileIds"/>
+	<form:hidden path="commodityType"/>
+	<form:hidden path="emptyNum"/>
+	<form:hidden path="referenceList"/>
+	<sys:message content="${message}"/>
+	<%--词条名称--%>
+	<div class="control-group">
+		<label class="control-label">词条名称:</label>
+		<div class="controls">
+			<form:input path="name" htmlEscape="false" class="input-xlarge "/>
+			<label id="nameSensitiveWords" class="red"></label>
 		</div>
-		<div class="control-group">
-			<label class="control-label titleClass">${commodityType}档案</label>
+	</div>
+	<%--义项名--%>
+	<div class="control-group">
+		<label class="control-label">义项名:</label>
+		<div class="controls not-overflow">
+			<div class="content-edit" id="bk-name" name="alias"></div>
 		</div>
-		<div class="control-group">
-			<label class="control-label">品牌:</label>
-			<div class="controls">
-				${cmBaikeProduct.brand}
-			</div>
+	</div>
+	<%--词条概述--%>
+	<div class="control-group">
+		<label class="control-label">词条概述:</label>
+		<div class="controls not-overflow">
+			<div class="content-edit" id="discription" name="discription"></div>
+			<label id="discriptionSensitiveWords" class="red"></label>
 		</div>
-		<div class="control-group">
-			<label class="control-label">产地:</label>
-			<div class="controls">
-				${cmBaikeProduct.producePlace}
-			</div>
+	</div>
+	<%--概述图册--%>
+	<div class="control-group" style="width: 1000px">
+		<label class="control-label keyClass">概述图册:</label>
+		<div class="display-image-list" style="display: flex;flex-wrap: nowrap; margin-top: -36px">
+			<c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">
+				<div class="controls upload-content iconBox" id="displayImageBox${index.index}" style="width: 170px">
+					<div class="conList">
+						<form:hidden id="displayImage${index.index}" path="displayImageList[${index.index}]" htmlEscape="false"
+									 maxlength="255"
+									 class="input-xlarge "/>
+						<sys:ckfinder input="displayImage${index.index}" type="images" uploadPath="/photo"
+									  selectMultiple="false"
+									  maxWidth="100" maxHeight="100"/><br>
+					</div>
+				</div>
+			</c:forEach>
+			<c:set var="size" value="${empty cmBaikeProduct.displayImageList?0:cmBaikeProduct.displayImageList.size()}"/>
+			<c:forEach var="emptyIndex" begin="${size}" end="${5}">
+				<div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="displayImageBox${emptyIndex}" style="width: 170px">
+					<div class="conList">
+						<form:hidden id="displayImage${emptyIndex}" path="displayImageList[${emptyIndex}]" htmlEscape="false"
+									 maxlength="255"
+									 class="input-xlarge "/>
+						<sys:ckfinder input="displayImage${emptyIndex}" type="images" uploadPath="/photo"
+									  selectMultiple="false"
+									  maxWidth="100" maxHeight="100"/><br>
+					</div>
+				</div>
+			</c:forEach>
 		</div>
+	</div>
+	<div class="control-group">
 		<div class="control-group">
-			<label class="control-label">上市时间:</label>
-			<div class="controls">
-				${cmBaikeProduct.marketTime}
-			</div>
+			<label class="control-label keyClass">相关视频(各视频大小不超过50M,最多上传6个)</label>
 		</div>
 		<div class="control-group">
-			<label class="control-label">供应商:</label>
+			<label class="control-label">标题:</label>
 			<div class="controls">
-				${cmBaikeProduct.company}
-			</div>
-		</div>
-		<div class="control-group" style="position: relative">
-			<label class="control-label">NMPA认证时间:</label>
-			<div class="controls">
-				${cmBaikeProduct.nmpaTime}
-			</div>
-		</div>
-		<div class="control-group" style="width: 1000px">
-			<label class="control-label keyClass">${commodityType}认证:</label>
-			<div class="controls">
-				<c:forEach items="${cmBaikeProduct.authImageList}" var="authImage" varStatus="index">
-					<a href="${authImage}" style="cursor: pointer;margin-left: 20px" target="_blank"><img src="${authImage}" style="width: 120px"></a>
-				</c:forEach>
+				<input id="fileTitle" htmlEscape="false" type="text">
 			</div>
-		</div>
-		<div class="control-group">
-			<label class="control-label keyClass">适应症:</label>
-			<div class="controls" style="width:812px">
-				${cmBaikeProduct.adaptiveMan}
+			<label class="control-label" style="margin-top:10px">视频路径:</label>
+			<div class="controls" style="margin-top:10px;width: 600px;">
+				<input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />
+				<div class="upload">
+					<input type="file" name="file" id="productFile" accept=".mp4" >选择文件
+				</div>
+				<div class="add-submit">
+					<input id="addSubmit" type="button" value="上传"/>上传&nbsp;
+				</div>
+				<div class="upload-loading">
+					<img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
+				</div>
 			</div>
 		</div>
 		<div class="control-group">
-			<label class="control-label keyClass">不适应人群:</label>
-			<div class="controls" style="width:812px">
-				${cmBaikeProduct.unAdaptiveMan}
+			<div id='file-list-display' style="margin-left:180px">
+				<c:if test="${not empty cmBaikeProduct.videoList}">
+					<c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">
+						<p>${videoFile.fileTitle}
+							<span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>
+							<span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>
+						</p>
+					</c:forEach>
+				</c:if>
 			</div>
 		</div>
-		<div class="control-group">
-			<label class="control-label keyClass">注意事项:</label>
-			<div class="controls" style="width:812px">
-				${cmBaikeProduct.aroundOperation}
-			</div>
+	</div>
+	<%--信息栏--%>
+	<div class="control-group paramList" id="paramList">
+		<label class="control-label titleClass">信息栏:(注:未填写的信息将不会显示在词条页上)</label>
+		<div class="controls add-button"><button class="btn btn-primary" type="button">增加信息项</button></div>
+		<div class="controls param-controls not-overflow"></div>
+	</div>
+	<%--正文--%>
+	<div class="control-group" id="textInfolist">
+		<label class="control-label titleClass">正文:</label>
+		<div class="controls not-overflow">
+				<%-- <div class="bk-textInfo-item">
+                     <div class="content-edit" id="textInfo-0" name="textInfolist[0].content"></div>
+                     <div class="bk-textInfo-control"><span>一级目录</span><span>二级目录</span><span>内容</span></div>
+                 </div>
+                 --%>
 		</div>
-		<div class="control-group" style="width: 1000px">
-			<label class="control-label keyClass">效果展示:</label>
-			<div class="controls">
-				<c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">
-					<a href="${displayImage}" style="cursor: pointer;margin-left: 20px" target="_blank"><img src="${displayImage}" style="width: 120px"></a>
-				</c:forEach>
-			</div>
-		</div>
-        <div class="questionList">
-            <div class="control-group">
-                <label class="control-label keyClass">常见问题:</label>
-            </div>
-			<c:forEach items="${cmBaikeProduct.questionList}" var="question" varStatus="index">
-				<div class="control-group">
-					<label class="control-label">问题${index.index+1}:</label>
-					<div class="controls">
-						${question.question}
+	</div>
+	<%--参考资料--%>
+	<div class="control-group" id="mata">
+		<label class="control-label titleClass">参考资料</label>
+		<div class="bk-reference-list">
+			<c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">
+				<c:if test="${videoFile.referenceType eq '1'}">
+					<div class="controls applicationsan" style="margin-top: 5px">
+						<span class="del">[${statusIndex.index+1}]</span>
+						<span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}</a></span>
+						<span class="del">${videoFile.websiteName}.</span>
+						<span class="del">${videoFile.publishTime}.</span>
+						<span class="del">${videoFile.acitationTime}.</span>
+						<a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>
+						<a onclick="delMaterial(${videoFile.id})">删除</a>
 					</div>
-				</div>
-				<div class="control-group">
-					<label class="control-label">答:</label>
-					<div class="controls">
-						${question.answer}
+				</c:if>
+				<c:if test="${videoFile.referenceType eq '2'}">
+					<div class="controls applicationsan" style="margin-top: 5px">
+						<span class="del">[${statusIndex.index+1}]</span>
+						<span class="del">${videoFile.author}.</span>
+						<span class="del">${videoFile.workName}.</span>
+						<span class="del">${videoFile.publicationPlace}.</span>
+						<span class="del">${videoFile.press}.</span>
+						<span class="del">${videoFile.publicationYear}.</span>
+						<span class="del">${videoFile.acitationWeb}.</span>
+						<a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>
+						<a onclick="delMaterial(${videoFile.id})">删除</a>
 					</div>
-				</div>
+				</c:if>
+				<c:if test="${videoFile.referenceType eq '3'}">
+					<div class="controls applicationsan" style="margin-top: 5px">
+						<span class="del">[${statusIndex.index+1}]</span>
+						<span class="del">${videoFile.referenceDescription}.</span>
+						<span class="del">${videoFile.imageDescription}.</span>
+							<%--
+							<div class="conList">
+								<img id="imgaa"  src="${videoFile.imageUrl}" height="50px" width="50px" ></input>
+							</div>
+							--%>
+						<a class="del" style="margin-left: 12px" onclick="upMaterial(${videoFile.id})">编辑</a>
+						<a onclick="delMaterial(${videoFile.id})">删除</a>
+					</div>
+				</c:if>
 			</c:forEach>
-        </div>
-
-		<div class="control-group">
-			<label class="control-label keyClass">发布时间:</label>
-			<div class="controls">
-				<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm"/>
-			</div>
 		</div>
-		<div class="control-group">
-			<label class="control-label keyClass">基础浏览量:</label>
-			<div class="controls">
-				${cmBaikeProduct.basePv}
+	</div>
+	<%--头图--%>
+	<div class="control-group" style="margin-top: 100px">
+		<label class="control-label">头图:</label>
+		<div class="main-image-list" style="display: flex;flex-wrap: wrap">
+			<div class="controls upload-content iconBox mainIgeBox" id="mainIgeBox">
+				<div class="conList">
+					<form:hidden id="image" path="image" htmlEscape="false" maxlength="255" class="input-xlarge "/>
+					<sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+								  maxHeight="100"/>
+					<br>
+					<label style="margin-left: 150px">建议图片尺寸210px*210px,并上传白底图片</label>
+				</div>
 			</div>
 		</div>
-		<div class="control-group">
-			<label class="control-label keyClass">产品类别:</label>
-			<div class="controls">
-				${cmBaikeProduct.typeName}
-			</div>
+	</div>
+	<%--分类--%>
+	<div class="control-group">
+		<label class="control-label keyClass">分类:</label>
+		<div class="controls">
+			<form:select path="typeId" class="input-xlarge ">
+				<form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
+			</form:select>
 		</div>
-		<div class="control-group">
-			<label class="control-label keyClass">供应商名称:</label>
-			<div class="controls">
-				${cmBaikeProduct.shopName}
-			</div>
+	</div>
+	<%--SEO关键词--%>
+	<div class="control-group">
+		<label class="control-label">SEO关键词:</label>
+		<div class="auto-input">
+			<form:input cssStyle="margin-left: 20px" path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge"/>
+		</div>
+	</div>
+	<%--关联供应商--%>
+	<div class="control-group">
+		<label class="control-label">关联供应商:</label>
+		<div class="controls">
+			<form:select path="shopId" class="input-xlarge ">
+				<form:option value="" label="请选择供应商"/>
+				<form:options items="${cmBaikeProduct.shopList}" class="input-xlarge" itemLabel="name" itemValue="shopID" htmlEscape="false"/>
+			</form:select>
 		</div>
-		<div class="form-actions">
-			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+	</div>
+	<%--发布时间--%>
+	<div class="control-group">
+		<label class="control-label keyClass">发布时间:</label>
+		<div class="controls">
+			<input name="publishTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+				   value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+				   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
 		</div>
-	</form:form>
+	</div>
+	<%--基础浏览量--%>
+	<div class="control-group">
+		<label class="control-label keyClass">基础浏览量:</label>
+		<div class="controls">
+			<form:input path="basePv" htmlEscape="false" onkeyup="onlynum(this)" class="input-xlarge  digits "/>
+		</div>
+	</div>
+	<%--状态--%>
+	<div class="control-group">
+		<label class="control-label keyClass">状态:</label>
+		<div class="controls">
+			<form:radiobutton path="status" label="发布" value="1" checked="${empty cmBaikeProduct.status?'checked':''}"/>
+			<form:radiobutton path="status" label="保存草稿箱" value="0"/>
+		</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>
 
 <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
 <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+<script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
+<script type="text/javascript" src="${ctxStatic}/auto-input.js"></script>
+<script type="text/javascript" src="${ctxStatic}/content-edit.js"></script>
 <script>
+	// 内容编辑器列表
+	var contentEditMap = new Map()
+	// 当前选中的编辑器
+	var currentContentEdit = null
+	// 当前选中的编辑器元素
+	var currentContentEditEl = null
+	// 添加资料数据
+	var referenceData = {}
+	// 资料编辑类型
+	var referenceEditTyp = 'add'
+	// 引用资料列表
+	var referenceList = []
+	// 资料标记数量
+	var markCount = referenceList.length || 1
+	// 正文列表
+	var textInfoList = [{}]
+	var textInfoItemIndex = 0
+	// 信息栏列表
+	var paramList = [{}]
+	var paramItemIndex = 0
+	// 创建内容编辑器
+	function createContentEdit(el, value) {
+		const contentEdit = new ContentEditInput({
+			el: el,
+			initValue: value,
+			toolbarClick(edit) {
+				// 添加
+				referenceEditTyp = 'add'
+				currentContentEdit = edit
+				console.log(currentContentEdit)
+				createReferenceList()
+				$('#dialogmask').fadeIn()
+				$('#dig').fadeIn()
+			},
+			referenceEdit(ctrid) {
+				// 编辑
+				referenceEditTyp = 'edit'
+				referenceData = referenceList.find(function(item){
+					return item.ctrlId == ctrid
+				})
+				if(!referenceData) return
+				initRefrenceFormData(referenceData)
+				$('#dialogmask').fadeIn()
+				$('#dig').fadeIn()
+			},
+		})
+		contentEditMap.set(el, contentEdit)
+	}
+	// 从表单获取资料数据
+	function setRefrenceData(data){
+		const referenceData = {}
+		referenceData.id = data.id || '' // 资料id
+		referenceData.ctrlId = data.ctrlId || '' // 关联id
+		/* (网络资料) */
+		referenceData.referenceType= $("#info").val() // '参考类型资料(1.网络;2.著作;3.其他)'
+		referenceData.website = $("#website").val()
+		referenceData.articleName = $("#articleName").val()
+		referenceData.websiteName = $("#websiteName").val()
+		referenceData.publishTimeStr = $("#publishTimeStr").val()
+		referenceData.acitationTimeStr = $("#acitationTimeStr").val()
+		/* 著作资料)*/
+		referenceData.author= $("#author").val()
+		referenceData.workName= $("#workName").val()
+		referenceData.publicationPlace= $("#publicationPlace").val()
+		referenceData.press= $("#press").val()
+		referenceData.publicationYearStr= $("#publicationYearStr").val()
+		referenceData.acitationWeb= $("#acitationWeb").val()
+		/* (其他资料) */
+		referenceData.referenceDescription= $("#referenceDescription").val()
+		referenceData.imageDescription= $("#imageDescription").val()
+		referenceData.imageUrl = $("#referenceImgUrl").val()
+		referenceData.entryId = data.entryId || '' // 词条id
+		referenceData.entryType = data.entryType || ''
+		return referenceData
+	}
+	// 设置资料表单数据
+	function initRefrenceFormData(data){
+		$("#info").val(data.referenceType)
+		$("#website").val(data.website)
+		$("#articleName").val(data.articleName)
+		$("#websiteName").val(data.websiteName)
+		$("#publishTimeStr").val(data.publishTimeStr)
+		$("#acitationTimeStr").val(data.acitationTimeStr)
+		$("#author").val(data.author)
+		$("#workName").val(data.workName)
+		$("#publicationPlace").val(data.publicationPlace)
+		$("#press").val(data.press)
+		$("#publicationYearStr").val(data.publicationYearStr)
+		$("#acitationWeb").val(data.acitationWeb)
+		$("#referenceDescription").val(data.referenceDescription)
+		$("#imageDescription").val(data.imageDescription)
+		$("#referenceImgUrl").val(data.imageUrl)
+	}
+	// 创建信息栏item
+	function createParamItem(index){
+		var paramItem = $('<div class="param-item"></div>')
+		var paramName = $('<div class="param-name"></div>')
+		var paramNameInput = $('<input type="text" placeholder="例如:型号">')
+		paramNameInput.attr('name', 'paramList['+ index +'].name')
+		paramNameInput.attr('class','xxl-name')
+		paramNameInput.attr('id','paramName-'+index)
+		var paramContent = $('<div class="param-content"></div>')
+		var paramContentInput = $('<div class="content-edit"></div>')
+		paramContentInput.attr('id', 'param-' + index)
+		paramContentInput.attr('name', 'paramList['+index+'].content')
+		var deleteBtn = $('<a style="cursor: pointer">删除</a>')
+		paramName.append(paramNameInput)
+		paramContent.append(paramContentInput)
+		paramItem.append([paramName,paramContent,deleteBtn ])
+		deleteBtn.on('click', function(){
+			$(this).parents('.param-item').remove()
+		})
+		return paramItem
+	}
+	// 初始化信息栏
+	function initParamList(){
+		<c:forEach items="${cmBaikeProduct.paramList}" var="videoFile" varStatus="statusIndex">
+		var index=${statusIndex.index}
+				paramItemIndex = index
+		var paramItem = createParamItem(index)
+		$('#paramList .param-controls').append(paramItem)
+		createContentEdit('#param-' + index,'${videoFile.content}')
+		console.log('${videoFile.name}')
+		$('#paramName-'+index).val('${videoFile.name}')
+		</c:forEach>
+		// paramList.forEach(function(item, index){
+		// 	paramItemIndex = index
+		// 	var paramItem = createParamItem(index)
+		// 	$('#paramList .param-controls').append(paramItem)
+		// 	createContentEdit('#param-' + index)
+		// })
+	}
+	// 创建正文item
+	function createTextInfoItem(index, type){
+		var inputId = 'textInfo-' + index
+		var textInfoItem = $('<div class="bk-textInfo-item"><div>')
+		var input = null
+		var inputType=null
+		if(type == 3){
+			input = $('<div class="content-edit"></div>')
+			input.attr('id', inputId)
+			input.attr('name', 'textInfolist[' + index + '].dictionaryContent')
+			inputType=$('<input type="text" />')
+			inputType.attr('name','textInfolist[' + index + '].dictionaryType')
+			inputType.attr('value',type)
+			inputType.attr('style','display: none')
+
+		}else{
+			input = $('<input type="text" />')
+			input.attr('id', inputId)
+			input.attr('name', 'textInfolist[' + index + '].dictionaryContent')
+			var placeholder = type == 1 ? '一级目录' : '二级目录'
+			input.attr('placeholder', placeholder)
+			inputType=$('<input type="text" />')
+			inputType.attr('name','textInfolist[' + index + '].dictionaryType')
+			inputType.attr('value',type)
+			inputType.attr('style','display: none')
+		}
+		var control = $('<div class="bk-textInfo-control"></div>')
+		var first = $('<span>一级目录</span>')
+		var second = $('<span>二级目录</span>')
+		var content = $('<span>内容</span>')
+		var deleteBtn = $('<span>删除</span>')
+		control.append([first, second, content, deleteBtn])
+		textInfoItem.append([input,inputType,control])
+		first.on('click', function(){
+			$(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 1))
+		})
+		second.on('click', function(){
+			var index = $(this).parents('.controls').find('.bk-textInfo-item').length +1
+			$(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 2))
+		})
+		content.on('click', function(){
+			var index = $(this).parents('.controls').find('.bk-textInfo-item').length +1
+			$(this).parents('.bk-textInfo-item').after(createTextInfoItem(++textInfoItemIndex, 3))
+			var inputId = 'textInfo-' + textInfoItemIndex
+			createContentEdit('#' + inputId)
+		})
+		deleteBtn.on('click', function(){
+			$(this).parents('.bk-textInfo-item').remove()
+		})
+		return textInfoItem
+	}
+	// 初始化正文内容
+	function initTextInfoList(){
+		var te='${cmBaikeProduct.textInfolist}'
+		if(''==te ||null==te ||te=='[]'){
+			var textInfoList = [{type:1},{type:2},{type:3}]
+			textInfoList.forEach(function(item,index){
+				textInfoItemIndex = index
+				var inputId = 'textInfo-' + index
+				const textInfoIem = createTextInfoItem(index, item.type)
+				$('#textInfolist .controls').append(textInfoIem)
+				if(item.type == 3){
+					createContentEdit('#' + inputId)
+				}
+			})
+		}else{
+			<c:forEach items="${cmBaikeProduct.textInfolist}" var="videoFile" varStatus="statusIndex">
+			var index=${statusIndex.index}
+					textInfoItemIndex = index
+			var inputId = 'textInfo-' + index
+			var textInfoIem = createTextInfoItem(index,  ${videoFile.dictionaryType})
+			$('#textInfolist .controls').append(textInfoIem)
+			console.log('${videoFile.dictionaryContent}')
+			if('${videoFile.dictionaryType}'=='3'){
+				createContentEdit('#' + inputId,'${videoFile.dictionaryContent}')
+			}else{
+				$('#textInfo-' + index).val('${videoFile.dictionaryContent}')
+			}
+			</c:forEach>
+		}
+		// $('#textInfolist .controls')
+	}
+
+	function createReferenceItem(referenceData){
+		var text=null
+		if(referenceData.publishTimeStr=='undefined'){
+			referenceData.publishTimeStr='111'
+		}
+		if(referenceData.referenceType == 1){
+			text = `
+				<div class="controls applicationsan">
+						<span class="del">
+							<a>\${referenceData.articleName}.</a>
+						</span>
+						<span class="del">\${referenceData.websiteName}.</span>
+						<span class="del">\${referenceData.publishTimeStr}.</span>
+						<span class="del">\${referenceData.acitationTimeStr}.</span>
+					</div>
+			`
+		}
+		if(referenceData.referenceType == 2){
+			text=	`
+				<div class="controls applicationsan">
+					<span class="del">\${referenceData.author}.</span>
+					<span class="del">\${referenceData.workName}.</span>
+					<span class="del">\${referenceData.publicationPlace}.</span>
+					<span class="del">\${referenceData.press}.</span>
+					<span class="del">\${referenceData.publicationYearStr}.</span>
+					<span class="del">\${referenceData.acitationWeb}</span>
+				</div>
+			`
+		}
+		if(referenceData.referenceType == 3){
+			text= `
+				<div class="controls applicationsan">
+					<span class="del">\${referenceData.referenceDescription}.</span>
+					<span class="del">\${referenceData.imageDescription}.</span>
+				</div>
+			`
+		}
+		return text
+	}
+
+	function createAllReferenceItem(referenceData){
+		var text=null
+		if(referenceData.referenceType == 1){
+			text = `
+					<div class="controls applicationsan">
+						<span class="del">[\${referenceList.length}]</span>
+						<span class="del"><a>\${referenceData.articleName}.</a></span>
+						<span class="del">\${referenceData.websiteName}.</span>
+						<span class="del">\${referenceData.publishTimeStr}.</span>
+						<span class="del">\${referenceData.acitationTimeStr}.</span>
+						<a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
+						<a onclick="delMaterial(\${referenceData.id})">删除</a>
+					</div>
+			`
+		}
+		if(referenceData.referenceType == 2){
+			text=	`
+				<div class="controls applicationsan">
+					<span class="del">[\${referenceList.length}]</span>
+					<span class="del">\${referenceData.author}.</span>
+					<span class="del">\${referenceData.workName}.</span>
+					<span class="del">\${referenceData.publicationPlace}.</span>
+					<span class="del">\${referenceData.press}.</span>
+					<span class="del">\${referenceData.publicationYearStr}.</span>
+					<span class="del">\${referenceData.acitationWeb}.</span>
+					<a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
+					<a onclick="delMaterial(\${referenceData.id})">删除</a>
+				</div>
+			`
+		}
+		if(referenceData.referenceType == 3){
+			text= `
+				<div class="controls applicationsan">
+					<span class="del">[\${referenceList.length}]</span>
+					<span class="del">\${referenceData.referenceDescription}.</span>
+					<span class="del">\${referenceData.imageDescription}.</span>
+					<a class="del" style="margin-left: 12px" onclick="upMaterial(\${referenceData.id})">编辑</a>
+					<a onclick="delMaterial(\${referenceData.id})">删除</a>
+				</div>
+			`
+		}
+		return text
+	}
+
+	// 只要referenceList数据有更新就执行一次
+	function createReferenceList(){
+		$('.check-reference-list').html('')
+		referenceList.forEach(function(refData, index){
+			console.log(refData)
+			var item = createReferenceItem(refData)
+			$('.check-reference-list').append(item)
+		})
+		$('.check-reference-list').find('.controls').on('click', function(){
+			var index = $(this).index() + 1
+			var result = referenceList[$(this).index()]
+			console.log(result)
+			if(!result) return
+			var con= createReferenceItem(result)
+			result.ctrlId = currentContentEdit.confirm(con, result.ctrlId, index)
+			$('#dialogmask').fadeOut()
+			$('#dig').fadeOut()
+		})
+	}
+
+	$(function(){
+		var refren='${cmBaikeProduct.referenceList}'
+		if(''==refren|| null==refren){
+		}else{
+			referenceList=JSON.parse(refren)
+			markCount=referenceList.length
+			console.log(markCount)
+		}
+		//初始化 义项名,词条概述
+		createContentEdit('#bk-name','${cmBaikeProduct.alias}')
+		createContentEdit('#discription','${cmBaikeProduct.discription}')
+		initParamList()
+		initTextInfoList()
+		$('#paramList .btn').on('click', function(){
+			var paramItem = createParamItem(++paramItemIndex)
+			$('#paramList .param-controls').append(paramItem)
+			createContentEdit('#param-' + paramItemIndex)
+		})
+		$('#dig .confirm').on('click', function(){
+			if(referenceEditTyp === 'add'){
+				markCount++
+				var result = setRefrenceData({})
+				var con=createReferenceItem(result)
+				result.ctrlId = currentContentEdit.confirm(con)
+				referenceList.push(result)
+				$(this).parents('#dig').siblings('#dialogmask').fadeOut()
+				$(this).parents('#dig').fadeOut()
+				initRefrenceFormData({})
+				var item = createAllReferenceItem(result)
+				$('.bk-reference-list').append(item)
+			}else{
+				var result = setRefrenceData(referenceData)
+				const index = referenceList.findIndex(function(item){
+					return item.ctrlId == referenceData.ctrlId
+				})
+				referenceList.splice(index, 1, result)
+				$(this).parents('#dig').siblings('#dialogmask').fadeOut()
+				$(this).parents('#dig').fadeOut()
+				initRefrenceFormData({})
+			}
+			var referen=JSON.stringify(referenceList)
+			$('#referenceList').val(referen);
+		})
+		$('#dig .cancel').on('click', function(){
+			$(this).parents('#dig').fadeOut()
+			$(this).parents('#dig').siblings('#dialogmask').fadeOut()
+			initRefrenceFormData({})
+		})
+		<%-- referenceList = [{ctrlId: 'FDIEKABKKNJEEJAN'}] // referenceList[0].reyt = 1 // referenceList:'[{"type": 1}]'--%>
+		<%--console.log('${cmBaikeProduct.materialInfo}')--%>
+		// 初始化编辑框引用资料列表
+		contentEditMap.forEach(function(item){
+			item.edit.ctridList.forEach(function(ctrlId){
+				var data = referenceList.find(function(ref){
+					return ref.ctrlId == ctrlId
+				})
+				if(!data) return
+				<%--				<c:forEach items="${cmBaikeProduct.materialInfo}" var="videoFile" varStatus="statusIndex">--%>
+				<%--				</c:forEach>--%>
+				var text = createReferenceItem(data)
+				item.addLiteratureItem(ctrlId, text)
+			})
+		})
+	})
+</script>
+
+<script>
+	var paramIndex = 1;
+	var questionIndex = 2;
+	//给涉及到参考资料的标签赋值
+	$(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();
+		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.parents('.controls').next();
+					thisWrapper.find('li').css('z-index', 99);
+					thisWrapper.find('.cancel-upload').show();
+					if (nextEle.hasClass('hide-pic')) {
+						nextEle.removeClass('hide-pic');
+					}
+				}
+			})
+		});
+		var observeEle1 = document.getElementsByClassName('main-image-list')[0];
+		var observeEle2 = document.getElementsByClassName('auth-qrCode-list')[0];
+		// var observeEle3 = document.getElementsByClassName('auth-image-list')[0];
+		var observeEle4 = document.getElementsByClassName('display-image-list')[0];
+		observer.observe(observeEle1, MutationObserverConfig);
+		observer.observe(observeEle2, MutationObserverConfig);
+		// observer.observe(observeEle3, MutationObserverConfig);
+		observer.observe(observeEle4, MutationObserverConfig);
+
+		$('body').on('click', '.cancel-upload',function() {
+			var wrapper = $(this).closest('.controls');
+			var controlsId = wrapper.attr('id');
+			wrapper.find('li').css('z-index','-1');
+			wrapper.find('input').val('');
+			$(this).hide();
+			if (controlsId == 'mainImageBox' || controlsId == 'authQrCodeBox' || controlsId=='mainIgeBox') {
+				wrapper.removeClass("hide-pic");
+			}
+					// else if (controlsId.indexOf('authImageBox') != -1) {
+					// 	if ($('.auth-image-list .cancel-upload:visible').length < 8) {
+					// 		wrapper.addClass("hide-pic");
+					// 	}else{
+					// 		wrapper.removeClass("hide-pic");
+					// 	}
+			// }
+			else if (controlsId.indexOf('displayImageBox') != -1) {
+				if ($('.display-image-list .cancel-upload:visible').length < 6) {
+					wrapper.addClass("hide-pic");
+				}else{
+					wrapper.removeClass("hide-pic");
+				}
+			}
+			wrapper.parent().append(wrapper.clone());
+			wrapper.remove();
+			$(".controls").each(function(i,ele){
+				if($(ele).find("input.input-xlarge").val()){
+					$(ele).next().removeClass("hide-pic")
+				}
+			})
+		});
+
+		$('body').on('click','.upload-content li',function() {
+			var index = $(this).closest('.conList').index() + 1,
+					str = 'image'+index+'FinderOpen';
+			eval(str+'()');
+		});
+
+		$(window).on("load", function () {
+			setTimeout(function () {
+				$("#authQrCodeBox").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).parent().parents(".controls").next().removeClass("hide-pic")
+					}
+				})
+				$("#mainImageBox").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).parent().parents(".controls").next().removeClass("hide-pic")
+					}
+				})
+				$("#mainIgeBox").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).parent().parents(".controls").next().removeClass("hide-pic")
+					}
+				})
+				for (var i = 0; i < 8; i++) {
+					$("#authImageBox"+i).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).parent().parents(".controls").next().removeClass("hide-pic")
+						}
+					})
+				}
+				for (var i = 0; i < 6; i++) {
+					$("#displayImageBox"+i).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).parent().parents(".controls").next().removeClass("hide-pic")
+						}
+					})
+				}
+			}, 200);
+		});
+
+
+		var fileIds = $("#fileIds").val();
+		//点击上传按钮后上传文件
+		$('#addSubmit').click(function () {
+			var fileIdArr = fileIds.split(',');
+			if (fileIdArr.length >= 7) {
+				alertx('最多上传6个视频');
+				return;
+			}
+			var filesById = document.getElementById('productFile');
+			var files = $('#productFile');
+			var fileList = files.prop('files');
+			var fileTitle = $('#fileTitle').val();
+			var fileName = $('#uploadFileName').val();
+			if (fileTitle == '') {
+				alertx('请输入视频标题')
+				return;
+			}
+			if (files === '' || files.length == 0 || fileName == '') {
+				alertx('请选择上传文件');
+				return;
+			}
+			$("#fileTitle").val("");
+			$("#uploadFileName").val("");
+			var data = new FormData();
+			var productId = $("#id").val();
+			data.append('file', fileList[0]);
+			data.append('fileTitle', fileTitle);
+			data.append('fileName', fileName);
+			data.append('productId', productId);
+			data.append('fileIds', fileIds);
+			$('.upload-loading').css("display", "inline");
+			$.ajax({
+				url: "${ctx}/baike/cmBaikeProduct/upload",
+				data: data,
+				type: "POST",
+				processData: false,
+				contentType: false,
+				dataType: "json",
+				success: function (res) {
+					if (res.success) {
+						filesById.value = '';
+						renderFileList(res.productFile);
+						$('.upload-loading').hide();
+					} else {
+						$.jBox.tip(res.msg, 'error');
+						$("#uploadFileName").val(fileName);
+						$('.upload-loading').hide();
+					}
+				},
+				error: function (json) {
+				}
+			});
+		})
+
+		var fileList = [];
+		var files = document.getElementById("productFile"), renderFileList;
+		//选择上传文件后显示文件名称
+		files.addEventListener("change", function (event) {
+			var name = event.target.files[0].name;
+			console.log(name)
+			$('#uploadFileName').val(name);
+		});
+		var fileListDisplay = document.getElementById('file-list-display');
+		renderFileList = function (data) {
+			fileIds += data.id + ',';
+			console.log(fileIds);
+			$('#fileIds').val(fileIds);
+			fileList.push({fileTitle: data.fileTitle, id: data.id, ossUrl: data.ossUrl});
+			fileList.forEach(function (file, index) {
+				var fileDisplayEl = document.createElement("p");
+				var deleteFile = document.createElement("span");
+				var viewFile = document.createElement("span");
+				var viewFileUrl = document.createElement("a");
+				//预览链接
+				viewFileUrl.innerHTML = '预览';
+				viewFileUrl.setAttribute("onclick", "previewVideo('" + file.ossUrl + "')");
+				viewFileUrl.setAttribute("target", "_blank");
+				//预览按钮
+				viewFile.className = 'viewFile';
+				console.log(viewFile);
+				viewFile.setAttribute("class","del");
+				viewFile.appendChild(viewFileUrl);
+				//删除按钮
+				deleteFile.innerHTML = '删除';
+				deleteFile.className = 'deleteFile';
+				console.log(deleteFile);
+				deleteFile.setAttribute("class","del");
+				deleteFile.setAttribute("onclick", "dataDelete(this, " + file.id + ")");
+
+				fileDisplayEl.setAttribute("id", file.id);
+				fileDisplayEl.innerHTML = file.fileTitle;
+				fileDisplayEl.appendChild(viewFile);
+				fileDisplayEl.appendChild(deleteFile);
+				fileListDisplay.appendChild(fileDisplayEl);
+			});
+			fileList.splice(0, fileList.length);
+		};
+	})
+
+	//删除参数
+	function deleteParam(index) {
+		$("#paramRow" + index).remove();
+	}
+	var content=10;
+
+	//添加正文
+	var d=1;
+	addDiction =function(dicname,diny,dicTyp){//输入框类型  输入框个数  按钮类型
+		$("."+dicname+diny).append("<div class=\"controls "+dicname+d+"\" style=\"margin-left: 0px;margin-top: 5px \">" +
+				"<input  name=\"textInfo[0].textType\" value =\"1\" type=\"hidden\"/>"+
+				"<input  htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"(请输入"+dicTyp+")\"/>" +
+				"<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"一级目录\"  style=\"margin-left: 15px\" onclick=\"addDiction('"+dicname+"',"+d+",'一级目录'"+")\">一级目录</button>"+
+				"<button class=\"btn btn-primary\" id=\"1\"  type=\"button\" name=\"二级目录\"  style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'二级目录'"+")\">二级目录</button>"+
+				"<button class=\"btn btn-primary\" id=\"1\"  type=\"button\" name=\"内容\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'内容'"+")\">内容</button>"+
+				"</div>")
+		d=d+1;
+	}
+
+	/**
+	 * @param obj
+	 * jquery控制input只能输入数字
+	 */
+	function onlynum(obj) {
+		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+	}
+
+	//删除文件
+	function dataDelete(that, id) {
+		console.log($(that).text());
+		$(that).parent().remove();
+		var fileIds = $("#fileIds").val();
+		if (fileIds.indexOf(id)) {
+			fileIds = fileIds.replace(id + ',', '');
+			$("#fileIds").val(fileIds);
+		}
+		$.ajax({
+			url: "${ctx}/baike/cmBaikeProduct/deleteFile",
+			data: {"fileId": id},
+			async: false,
+			type: "POST"
+		});
+	}
+
+	function previewVideo(url) {
+		var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
+		var title = "视频播放";
+		top.$.jBox("iframe:" + url, {
+			iframeScrolling: 'yes',
+			width: 1000,
+			height: 750,
+			persistent: true,
+			title: title,
+			buttons: {"关闭": '-1'}
+		});
+	}
+	//关键词联动
+	function autocomplete(text) {
+		var keywordlist=new Array();
+		<c:forEach items="${SearchFrequencyVo}" var="search">
+		keywordlist.push("${search.keyword}")
+		</c:forEach>
+		return keywordlist.filter(function (item) {
+			return text && item.indexOf(text) > -1;
+		});
+	}
+
+	new AutoComplete({
+		el: '.auto-input',
+		callback: autocomplete,
+		offsetLeft: -25
+	});
 </script>
 </body>
 </html>

+ 12 - 12
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeHotSearchForm.jsp

@@ -52,18 +52,18 @@
 			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>跳转方式:</label>
 			<div class="controls">
 				<form:radiobutton path="jumpType"  name="jumpType" value="1" label="仅搜索" checked="true" onclick="changeJumpType()"/>
-				<br> <br>
-				<form:radiobutton path="jumpType" name="jumpType" value="2" label="产品" onclick="changeJumpType()"/>
-				<form:select path="productId" class="input-xlarge productList">
-					<form:option value="" label="请选择"/>
-					<form:options items="${productList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
-				</form:select>
-				<br> <br>
-				<form:radiobutton path="jumpType" name="jumpType" value="3" label="仪器" onclick="changeJumpType()"/>
-				<form:select path="instrumentId" class="input-xlarge productList">
-					<form:option value="" label="请选择"/>
-					<form:options items="${instrumentList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
-				</form:select>
+<%--				<br> <br>--%>
+<%--				<form:radiobutton path="jumpType" name="jumpType" value="2" label="产品" onclick="changeJumpType()"/>--%>
+<%--				<form:select path="productId" class="input-xlarge productList">--%>
+<%--					<form:option value="" label="请选择"/>--%>
+<%--					<form:options items="${productList}" itemLabel="name" itemValue="id" htmlEscape="false"/>--%>
+<%--				</form:select>--%>
+<%--				<br> <br>--%>
+<%--				<form:radiobutton path="jumpType" name="jumpType" value="3" label="仪器" onclick="changeJumpType()"/>--%>
+<%--				<form:select path="instrumentId" class="input-xlarge productList">--%>
+<%--					<form:option value="" label="请选择"/>--%>
+<%--					<form:options items="${instrumentList}" itemLabel="name" itemValue="id" htmlEscape="false"/>--%>
+<%--				</form:select>--%>
 				<br> <br>
 				<form:radiobutton path="jumpType" name="jumpType" value="4" label="链接" onclick="changeJumpType()"/>
 				<form:input path="jumpLink" htmlEscape="false" class="input-xlarge jumpType"/>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 863 - 146
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp


+ 2361 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.old.jsp

@@ -0,0 +1,2361 @@
+<%@ page import="com.thinkgem.jeesite.common.config.Global" %>
+<%@ 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>
+		.controls.not-overflow{
+			overflow: initial !important;
+		}
+		.content-edit{
+			position: relative;
+			width: 100%;
+			z-index: 10;
+		}
+		.content-edit .bk-input{
+			line-height: 30px;
+			border: 1px solid #ddd;
+			box-sizing: border-box;
+			padding: 0 16px;
+			border-radius: 4px;
+			font-size: 16px;
+		}
+		.content-edit .bk-toolbar{
+			position: absolute;
+			padding: 6px 12px;
+			border: 1px solid #f1f1f1;
+			left: 0;
+			top: 0;
+			transform: translateY(-100%);
+			font-size: 14px;
+			text-align: center;
+			background: #fff;
+			color: #999;
+			cursor: pointer;
+		}
+		.content-edit .bk-bubble{
+			font-size: 14px;
+			padding: 0 4px;
+			line-height: 18px;
+			border-radius: 12px;
+			position: absolute;
+			right: 0;
+			top: 0;
+			transform: translate(50%, -50%);
+			background: #ddd;
+			color: #fff;
+			box-sizing: border-box;
+			min-width: 18px;
+			text-align: center;
+		}
+		.content-edit .bk-literature{
+			position: absolute;
+			bottom: 0;
+			left: 0;
+			transform: translateY(100%);
+			background: #fff;
+			border: 1px solid #ddd;
+			padding: 0;
+			margin: 0;
+			width: 100%;
+			box-sizing: border-box;
+		}
+		.content-edit .bk-literature li{
+			list-style-type: none;
+			padding: 8px 16px;
+			display: flex;
+			justify-content: space-between;
+		}
+		.content-edit .bk-literature .bk-control{
+			max-width: 80%;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+		}
+		.content-edit .bk-literature .bk-control span{
+			cursor: pointer;
+		}
+		.content-edit .bk-literature .bk-control span:hover{
+			text-decoration: underline;
+		}
+	</style>
+	<style>
+		.titleClass{
+			font-weight: bolder;
+			margin-left: -40px;
+		}
+		.keyClass{
+			font-weight: bolder;
+		}
+		.paramRow {
+			margin-top: 10px;
+		}
+	</style>
+	<style>
+		.clearfix::after{
+			content: "";
+			display: block;
+			clear: both;
+		}
+		.iconBox{
+			font-size: 0;
+		}/*
+		.controls{
+			margin-left: 0 !important;
+		}*/
+		.controls .conList{
+			display: inline-block;
+			margin-right: 15px;
+		}
+		.conList .btn:nth-of-type(1){
+			margin-left: 25px;
+		}
+		.select2-choice{
+			width: 100px;
+		}
+		.upload-content {
+			float: left;
+			margin-top: -100px;
+			margin-right: -40px;
+		}
+		.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;
+			height: 100px;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			box-sizing: border-box;
+		}
+		.hide-pic {
+			display: none !important;
+		}
+		.upload-image-list{
+			width: 660px;
+			float: left;
+		}
+	</style>
+	<style>
+		.iconBox{
+			font-size: 0;
+		}
+		.controls .conList{
+			display: inline-block;
+			margin-right: 15px;
+		}
+		.conList .btn:nth-of-type(1){
+			margin-left: 25px;
+		}
+		.select2-choice{
+			width: 100px;
+		}
+		.upload-content {
+			float: left;
+			margin-top: -70px;
+			margin-left: 20px !important;
+		}
+		.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;
+		}
+		.hide-pic {
+			display: none !important;
+		}
+		.select2-choice{
+			width: 200px
+		}
+
+		.red {
+			color: red;
+		}
+
+
+
+		.upload {
+			position: relative;
+			display: inline-block;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 20px;
+		}
+
+		.upload input {
+			position: absolute;
+			width: 170px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.upload:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.add-submit {
+			position: relative;
+			display: inline;
+			background: #D0EEFF;
+			border: 1px solid #99D3F5;
+			border-radius: 4px;
+			padding: 4px 12px;
+			color: #1E88C7;
+			text-decoration: none;
+			text-indent: 0;
+			line-height: 20px;
+			margin-left: 20px;
+			cursor: pointer;
+			width: 52px;
+			height: 30px;
+		}
+
+		.add-submit input {
+			position: absolute;
+			width: 50px;
+			font-size: 20px;
+			right: 0;
+			top: 0;
+			opacity: 0;
+			cursor: pointer;
+		}
+
+		.add-submit:hover {
+			background: #AADFFD;
+			border-color: #78C3F3;
+			color: #004974;
+			text-decoration: none;
+		}
+
+		.upload-loading{
+			 display: none;
+			 width: 32px;
+			 height: 32px;
+			 margin-left: 10px;
+		 }
+		.upload-loading img{
+			width: 16px;
+			height: 16px;
+			margin: 0 auto 0;
+		}
+
+		#file-list-display {
+			 width: 600px;
+			 height: auto;
+			 float: left;
+			 margin-left: 20px;
+		 }
+
+		#file-list-display p {
+			line-height: 30px;
+			font-size: 14px;
+			color: #333333;
+			margin: 0;
+		}
+
+		#file-list-display p .del {
+			color: #2fa4e7;
+			font-size: 12px;
+			cursor: pointer;
+			margin-left: 20px;
+		}
+
+		.Main-content{
+			height: 100px;
+		}
+		.dialogmask {
+			position: fixed;
+			top: 0px;
+			height: 100%;
+			width: 100%;
+			z-index: 80;
+			display: none;
+
+		}
+
+		.opacity { /*遮罩浑浊处理*/
+			opacity: 0.3;
+			filter: alpha(opacity=30);
+			background-color: #000;
+		}
+
+		.box {
+			overflow: hidden;
+			position: absolute;
+			width: 55%;
+			height: 60%;
+			z-index: 100; /*值越大,和其他层层叠时越在上面*/
+			left: 20%;
+			top: 15%;
+			background-color: #fff;
+			border: 1px solid rgb(0, 153, 153);
+		}
+		.ckzl {
+			overflow: hidden;
+			position: absolute;
+			width: 60%;
+			height: 80%;
+			z-index: 100; /*值越大,和其他层层叠时越在上面*/
+			left: 20%;
+			top: 15%;
+			background-color: #fff;
+			border: 1px solid rgb(0, 153, 153);
+		}
+
+		.dialogtitle {
+			width: 100%;
+			height: 30px;
+			line-height: 30px;
+			position: absolute;
+			font-size: 18px;
+			top: 0px;
+			background-color: lightgrey;
+		}
+
+		.dialogcontent {
+			padding-top: 20px;
+			OVERFLOW: scroll;
+			height: calc(100% - 20px);
+			height: -webkit-calc(100% - 20px);
+		}
+
+		.logcontent {
+			padding: 10px;
+		}
+		.pla::-webkit-input-placeholder{
+			color: green;
+		}
+	</style>
+	<script type="text/javascript">
+		//显示弹框,并且根据结果是true或false来更改标题部分的颜色
+		function showlog_result(result, info) {//展示具体弹框内容,以及根据结果是否正确变更title的颜色
+			$("#dialog").css({display: "block"});//通过Jquery的css()更改样式
+			$("#dialogmask").css({display: "block"});
+			// var s=document.getElementById("logcontent").innerHTML;
+			// $("#logcontent").html(s);
+		}
+		//关闭弹窗
+		function dialog(){
+			document.getElementById("dialog").style.display='none';
+			document.getElementById("dialogmask").style.display='none';
+		}
+		//显示资料弹窗
+		function digCk(type){
+			document.getElementById("dig").style.display='block';
+             document.getElementById("dig").title=type;
+		}
+		//隐藏资料弹窗
+		function cantral(){
+			document.getElementById("dig").style.display='none';
+		}
+		//添加资料
+		function addZl(){
+			document.getElementById("zl").style.display='block';
+			document.getElementById("yyzl").style.display='none';
+
+		}
+		function removeZl(){
+			document.getElementById("zl").style.display='none';
+			document.getElementById("yyzl").style.display='block';
+
+		}
+		//不同资料显示不同的内容
+		function ckzl_change(){
+			var content=$("#info").val();
+			if(2 == content){
+				document.getElementById("wlzl").style.display='none';
+				document.getElementById("zzzl").style.display='block';
+				document.getElementById("qtzl").style.display='none';
+			}else if(3 == content){
+				document.getElementById("wlzl").style.display='none';
+				document.getElementById("zzzl").style.display='none';
+				document.getElementById("qtzl").style.display='block';
+			}else{
+				document.getElementById("wlzl").style.display='block';
+				document.getElementById("zzzl").style.display='none';
+				document.getElementById("qtzl").style.display='none';
+			}
+		}
+		//信息栏只读设置
+		function readflag(index){
+			var info=document.getElementById("name["+index+"]").value;
+			//标题为空则内容只读
+			if(undefined != info && null!=info && '' !=info){
+				document.getElementById("content["+index+"]").readOnly=false;
+			}else{
+				document.getElementById("content["+index+"]").readOnly=true;
+			}
+		}
+		$(document).ready(function() {
+			//添加词条时弹出创建词条须知窗口
+			<%--window.showModalDialog("${ctx}/baike/cmBaikeProduct/entry",'window','dialogWidth:504px;dialogHeight:310px;status:no;help:no;scroll:no;status:0;help:0;scroll:0;');--%>
+            <%--window.open("${ctx}/baike/cmBaikeProduct/entry", "window","height=100, width=400,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes, location=yes,status=yes");--%>
+			//$("#name").focus();
+			<c:forEach items="${materialInfo}" var="videoFile" varStatus="statusIndex">
+			  var productType=""+${videoFile.productType};
+				if(productType.indexOf("1")>-1){
+					var n=${statusIndex.index}+1;
+                    var h="";
+					if(n==1){
+						h="①";
+					}else if(n==2){
+						h="②";
+
+					}else if(n==3){
+						h="③";
+
+					}else if(n==4){
+						h="④";
+
+					}else if(n==5){
+						h="⑤";
+
+					}else if(n==6){
+						h="⑥";
+
+					}else if(n==7){
+						h="⑦";
+
+					}else if(n==8){
+						h="⑧";
+					}
+					// document.getElementById("yixiandiv").innerHTML=h;
+					// document.getElementById("yixiandiv").style.display='block';
+				}
+			</c:forEach>
+			var flag=document.getElementById("createEntryGuidance").innerHTML;
+            if('添加'==flag){
+					showlog_result(null,null);
+					}
+			$("#inputForm").validate({
+				submitHandler: function(form){
+					var status = $("input[name='status']:checked").val();
+					var commodityType = $("#commodityType").val();
+					// 计算空数据条数
+					var propertyArr = [];
+					var name = $("#name").val();
+					var alias = $("#alias").val();
+					var discription = $("#discription").val();
+					var shopId = $("#shopId").val();
+					// var productLink = $("#productLink").val();
+					var image = $("#image").val();
+					var authLink = $("#authLink").val();
+					var authQrCode = $("#authQrCode").val();
+					var param0 = $('input[name="paramList[0].name"]').val();
+					// var advantage = $("#advantage").val();
+					// var disadvantage = $("#disadvantage").val();
+					// var principle = $("#principle").val();
+					var seoKeyword = $("#seoKeyword").val();
+					// var brand = $("#brand").val();
+					// var producePlace = $("#producePlace").val();
+					// var marketYear = $("#marketYear").val();
+					var company = $("#company").val();
+					// var nmpaYear = $("#nmpaYear").val();
+					// var authImage0 = $("#authImage0").val();
+					// var adaptiveMan = $("#adaptiveMan").val();
+					// var unAdaptiveMan = $("#unAdaptiveMan").val();
+					// var aroundOperation = $("#aroundOperation").val();
+					// var displayImage0 = $("#displayImage0").val();
+					// var question0 = $('input[name="questionList[0].question"]').val();
+					var publishTime = $('input[name="publishTime"]').val();
+					var basePv = $("#basePv").val();
+					var typeId = $("#typeId").val();
+					propertyArr[0] = name;
+					propertyArr[1] = alias;
+					propertyArr[2] = discription;
+					// propertyArr[3] = shopId;
+					// propertyArr[4] = productLink;
+					propertyArr[3] = param0;
+					// propertyArr[6] = advantage;
+					// propertyArr[7] = disadvantage;
+					// propertyArr[8] = principle;
+					propertyArr[4] = seoKeyword;
+					// propertyArr[10] = brand;
+					// propertyArr[11] = producePlace;
+					// propertyArr[12] = marketYear;
+					propertyArr[5] = company;
+					// propertyArr[14] = nmpaYear;
+					// propertyArr[15] = authImage0;
+					// propertyArr[16] = adaptiveMan;
+					// propertyArr[17] = unAdaptiveMan;
+					// propertyArr[18] = aroundOperation;
+					// propertyArr[19] = displayImage0;
+					// propertyArr[6] = question0;
+					propertyArr[6] = publishTime;
+					propertyArr[7] = basePv;
+					propertyArr[8] = typeId;
+					propertyArr[9] = image;
+					alert("1111111111111111");
+					var emptyNum = 0;
+					for (var i = 0; i < propertyArr.length; i++) {
+						var property = propertyArr[i].trim();
+						if ("" === property) {
+							emptyNum++;
+						}
+					}
+					$("#emptyNum").val(emptyNum);
+
+					// 检测敏感词
+					var propertyMap = new Map();
+					propertyMap.set("name", name);
+					propertyMap.set("alias", alias);
+					propertyMap.set("discription", discription);
+					// propertyMap.set("productLink", productLink);
+					for (var i = 0; i <= 9; i++) {
+						var paramName = "\"paramList[" + i + "].name\"";
+						var contentName = "\"paramList[" + i + "].content\"";
+						var param = $('input[name=' + paramName + ']').val();
+						var content = $('input[name=' + contentName + ']').val();
+						if ( param === undefined || param === '') {
+							break;
+						} else {
+							propertyMap.set("param" + i, param);
+							propertyMap.set("content" + i, content);
+						}
+					}
+					// propertyMap.set("advantage", advantage);
+					// propertyMap.set("disadvantage", disadvantage);
+					// propertyMap.set("principle", principle);
+					propertyMap.set("seoKeyword", seoKeyword);
+					// propertyMap.set("brand", brand);
+					// propertyMap.set("producePlace", producePlace);
+					propertyMap.set("company", company);
+					// propertyMap.set("adaptiveMan", adaptiveMan);
+					// propertyMap.set("unAdaptiveMan", unAdaptiveMan);
+					// propertyMap.set("aroundOperation", aroundOperation);
+                    // if (2 == commodityType) {
+                    //     propertyMap.set("authLink", authLink);
+                    // }
+					<%--for (var i = 0; i <= 20; i++) {--%>
+					<%--	var questionName = "\"questionList[" + i + "].question\"";--%>
+					<%--	var answerName = "\"questionList[" + i + "].answer\"";--%>
+					<%--	var question = $('input[name=' + questionName + ']').val();--%>
+					<%--	var answer = $('input[name=' + answerName + ']').val();--%>
+					<%--	if (question === undefined || question === '') {--%>
+					<%--		break;--%>
+					<%--	} else {--%>
+					<%--		propertyMap.set("question" + i, question);--%>
+					<%--		propertyMap.set("answer" + i, answer);--%>
+					<%--	}--%>
+					<%--}--%>
+					var sensitiveWords = '${sensitiveWords}';
+					const mint = new MintFilter(sensitiveWords.split('|'));
+					var filterSync = '';
+					var touchWords = '';
+					var touchNum = 0;
+					<%--debugger--%>
+					propertyMap.forEach(function (value,key,map) {
+						filterSync = mint.filterSync(value);
+						filterSync.words.forEach(word=>{
+							touchWords += touchWords === '' ? word : "," + word;
+						})
+						if (touchWords !== '') {
+							// 增加敏感词触发数量
+							touchNum++;
+							// 设置敏感词提示
+							$("#" + key + "SensitiveWords").text("敏感词:" + touchWords);
+							touchWords = '';
+						}
+					});
+					if (1 == status && emptyNum > 0) {
+						var msg = "您还剩余" + emptyNum + "项未完善,将会导致用户对您产品/仪器的认识度不够,确认是否提交?";
+						top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+							if (v == 'ok') {
+								if (touchNum > 0) {
+									var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
+											"请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
+											"当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
+											"将会影响发布时审核不通过!";
+									top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+										if (v == 'ok') {
+                                            loading('正在提交,请稍等...');
+                                            form.submit();
+										}
+									}, {buttonsFocus: 1, persistent: true});
+								} else{
+                                    loading('正在提交,请稍等...');
+                                    form.submit();
+                                }
+							}
+						}, {buttonsFocus: 1, persistent: true});
+					} else {
+						if (touchNum > 0) {
+							var msg = 1 == status?"当前发布内容存在敏感词,已为您标记在输入框下方," +
+									"请修改后,再进行保存发布,强行保存发布将会导致审核不通过!":
+									"当前内容存在敏感词,已为您标记在输入框下方,建议修改后再进行保存!否则," +
+									"将会影响发布时审核不通过!";
+							top.$.jBox.confirm(msg, '系统提示', function (v, h, f) {
+								if (v == 'ok') {
+									loading('正在提交,请稍等...');
+									form.submit();
+								}
+							}, {buttonsFocus: 1, persistent: true});
+						} else{
+							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);
+					}
+				}
+			});
+		});
+        function saveInfo(){
+			var content=$("#info").val();//参考资料类型
+			var website=$("#website").val();//网址
+			var articleName=$("#articleName").val();//文章名字
+			var websiteName=$("#websiteName").val();//网站名称
+			var publishTimeStr=$("#publishTimeStr").val();//发布日期
+			var acitationTimeStr=$("#acitationTimeStr").val();//引文日期
+			var productId="";
+			<c:if test="${cmBaikeProduct.entryId eq 2}">
+			productId=${cmBaikeProduct.id}
+			</c:if>
+			var zlid=document.getElementById("dig").lang;
+			var params={}
+			if(content==1){
+				params={
+					//网络资料
+					"referenceType":content,
+					"website":website,
+					"articleName":articleName,
+					"websiteName":websiteName,
+					"publishTimeStr":publishTimeStr,
+					"acitationTimeStr":acitationTimeStr,
+					//公共
+					"productId":productId,//词条id
+					"productType":document.getElementById("dig").title,//词条内容
+					"flagId":document.getElementById("dig").tabIndex,//添加修改标识  1添加 2修改
+					"zlId":zlid//资料id 用于修改
+				}
+			}else if(content=2){
+				params={
+				"referenceType":content,
+				"author":$("#author").val(),//作者
+				"workName":$("#workName").val(),//著作名
+				"publicationPlace":$("#publicationPlace").val(),//出版地
+				"press":$("#press").val(),//出版社
+				"publicationYearStr":$("#publicationYearStr").val(),//出版年
+				"acitationWeb":$("#acitationWeb").val(),//引文页码
+				//公共
+				"productId":productId,//词条id
+				"productType":document.getElementById("dig").title,//词条内容
+				"flagId":document.getElementById("dig").tabIndex,//添加修改标识  1添加 2修改
+				"zlId":zlid//资料id 用于修改
+				}
+			}else if(content=3){
+				params={
+				//其他资料
+				"referenceDescription":$("#referenceDescription").val(),//参考资料说明
+				"imageDescription":$("#imageDescription").val(),//图片描述
+				"imageUrl":$("#image").val(),//图片地址
+				//公共
+				"productId":productId,//词条id
+				"productType":document.getElementById("dig").title,//词条内容
+				"flagId":document.getElementById("dig").tabIndex,//添加修改标识  1添加 2修改
+				"zlId":zlid//资料id 用于修改
+				}
+			}
+			// alert(content+"---"+website+"---"+articleName+"---"+websiteName+"---"+publishTime+"---"+acitationTime);
+			// var params={
+			// 	//网络资料
+			// 	"referenceType":content,
+			// 	"website":website,
+			// 	"articleName":articleName,
+			// 	"websiteName":websiteName,
+			// 	"publishTimeStr":publishTimeStr,
+			// 	"acitationTimeStr":acitationTimeStr,
+			// 	//著作资料
+			// 	"author":$("#author").val(),//作者
+			// 	"workName":$("#workName").val(),//著作名
+			// 	"publicationPlace":$("#publicationPlace").val(),//出版地
+			// 	"press":$("#press").val(),//出版社
+			// 	"publicationYearStr":$("#publicationYearStr").val(),//出版年
+			// 	"acitationWeb":$("#acitationWeb").val(),//引文页码
+			// 	//其他资料
+			// 	"referenceDescription":$("#referenceDescription").val(),//参考资料说明
+			// 	"imageDescription":$("#imageDescription").val(),//图片描述
+			// 	"imageUrl":$("#image").val(),//图片地址
+            //     //公共
+			// 	"productId":productId,//词条id
+            //     "productType":document.getElementById("dig").title,//词条内容
+			// 	"flagId":document.getElementById("dig").tabIndex,//添加修改标识  1添加 2修改
+			// 	"zlId":zlid//资料id 用于修改
+			// }
+            $.ajax({
+				url : "${ctx}/baike/cmBaikeProduct/saveMaterialinfo",
+				data : params,
+				type : 'post',
+				success : function(data){
+					document.getElementById("dig").style.display='none';
+					alert("保存资料成功");
+					$("#dig").load(location.href+" #dig>*","");
+					<%--window.location.href = "${ctx}/baike/cmBaikeProduct/form?commodityType=1";--%>
+
+				},
+				error : function(){
+					alert(222);
+				}
+			})
+		}
+		function saveMataInfo(){
+
+		}
+
+		function imgSizeChange(){
+			// if($("#img"+size).width==){
+			//
+			// }
+			// alert();
+			// document.getElementById("imgaa").style.width=100px;
+			parent.location.href = "https://zp.caimei365.com/12/ross/activity/challenge";
+		}
+		//删除资料
+		function delMaterial(mid){
+			var msg='确定删除该资料?';
+			top.$.jBox.confirm(msg,'系统提示',function(v,h,f){
+				if(v=='ok'){
+					$.ajax({
+						url : "${ctx}/baike/cmBaikeProduct/delMaterialinfo",
+						data : {"mid":mid},
+						type : 'post',
+						success : function(data){
+							top.$.jBox.tip('删除资料成功', 'success');
+							$("#mata").load(location.href+" #mata>*","");
+							<%--window.location.href = "${ctx}/baike/cmBaikeProduct/form?commodityType=1";--%>
+						},
+						error : function(){
+							alert(222);
+						}
+					})
+				}
+				// top.$.jBox.tip('删除成功', 'success');
+				// window.location.reload();
+				return;
+			},{buttonsFocus:1,persistent: true});
+		}
+		//编辑资料
+		function upMaterial(mid){
+			$.ajax({
+				url : "${ctx}/baike/cmBaikeProduct/getMaterialinfo",
+				data : {"mid":mid},
+				type : 'post',
+				success : function(data){
+					$("#info").val(data.referenceType);
+					var content=$("#info").val();
+					// $("#info option[value='3']").prop("selected",true);
+					if(2 == content){
+						document.getElementById("wlzl").style.display='none';
+						document.getElementById("zzzl").style.display='block';
+						document.getElementById("qtzl").style.display='none';
+					}else if(3 == content){
+						document.getElementById("wlzl").style.display='none';
+						document.getElementById("zzzl").style.display='none';
+						document.getElementById("qtzl").style.display='block';
+					}else{
+						document.getElementById("wlzl").style.display='block';
+						document.getElementById("zzzl").style.display='none';
+						document.getElementById("qtzl").style.display='none';
+					}
+					//判断是编辑还是添加 1添加 2编辑
+					if(data.referenceType==1){
+						$("#website").val(data.website);
+						$("#articleName").val(data.articleName);
+						$("#websiteName").val(data.websiteName);
+						$("#publishTimeStr").val(data.publishTimeStr);
+						$("#acitationTimeStr").val(data.acitationTimeStr);
+						document.getElementById("dig").style.display='block';
+					}
+					if(data.referenceType==2){
+						$("#author").val(data.author);
+						$("#workName").val(data.workName);
+						$("#publicationPlace").val(data.publicationPlace);
+						$("#press").val(data.press);
+						$("#publicationYearStr").val(data.publicationYearStr);
+						$("#acitationWeb").val(data.acitationWeb);
+						document.getElementById("dig").style.display='block';
+					}
+					document.getElementById("dig").tabIndex=2;
+					document.getElementById("dig").lang=mid;
+				},
+				error : function(){
+					alert(222);
+				}
+			})
+		}
+	</script>
+</head>
+<body>
+	<ul class="nav nav-tabs">
+		<li><a href="${ctx}/baike/cmBaikeProduct/?commodityType=${cmBaikeProduct.commodityType}">采美词条</a></li>
+		<li class="active"><a id="createEntryGuidance"  href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}&commodityType=${cmBaikeProduct.commodityType}">${not empty cmBaikeProduct.id?'编辑':'添加'}</a></li>
+	</ul><br/>
+<%--	<div>--%>
+<%--		<button onclick="showlog_result(true,'展示正确内容的弹框')">展示正确弹框</button>--%>
+<%--	</div>--%>
+	<div><input type="button" onclick="digCk()" value="参考资料"></div>
+	<div id="dialogmask" class="dialogmask opacity"></div>
+	<div id="dig" class="ckzl" style="display: none"> 
+		<div id="dig_content" class="digcontent">
+			<div>
+				<a onclick="addZl()">添加参考资料</a>
+				<a onclick="removeZl()">引用已有资料</a>
+			</div>
+			<%--已有资料--%>
+			<div class="control-group" id="yyzl" style="display: none">
+				<label class="control-label titleClass">参考资料</label>
+				<c:forEach items="${materialInfo}" var="videoFile" varStatus="statusIndex">
+					<c:if test="${videoFile.referenceType eq '1'}">
+						<div class="controls applicationsan" style="margin-top: 5px">
+							<span class="del">[${statusIndex.index}]</span>
+							<span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}(文章名称)</a></span>
+							<span class="del">${videoFile.websiteName}(网站名称)</span>
+							<span class="del">${videoFile.publishTime}(发表日期)</span>
+							<span class="del">${videoFile.acitationTime}(引文日期)</span>
+							<a onclick="saveMataInfo(${videoFile.id})">引用资料</a>
+						</div>
+					</c:if>
+					<c:if test="${videoFile.referenceType eq '2'}">
+						<div class="controls applicationsan" style="margin-top: 5px">
+							<span class="del">[${statusIndex.index}]</span>
+							<span class="del">${videoFile.author}(作者)</span>
+							<span class="del">${videoFile.workName}(著作名)</span>
+							<span class="del">${videoFile.publicationPlace}(出版地)</span>
+							<span class="del">${videoFile.press}(出版社)</span>
+							<span class="del">${videoFile.publicationYear}(出版年)</span>
+							<span class="del">${videoFile.acitationWeb}(引文页码)</span>
+							<a onclick="saveMataInfo(${videoFile.id})">引用资料</a>
+
+						</div>
+					</c:if>
+					<c:if test="${videoFile.referenceType eq '3'}">
+						<div class="controls applicationsan" style="margin-top: 5px">
+							<span class="del">[${statusIndex.index}]</span>
+							<span class="del">${videoFile.referenceDescription}(参考资料说明)</span>
+							<span class="del">${videoFile.imageDescription}(图片描述)</span>
+							<div class="conList">
+									<%--							onclick="imgSizeChange()"--%>
+								<img id="imgaa"  src="${videoFile.imageUrl}" height="50px" width="50px" >(图片)</input>
+							</div>
+							<a onclick="saveMataInfo(${videoFile.id})">引用资料</a>
+
+						</div>
+					</c:if>
+				</c:forEach>
+			</div>
+
+
+			<div id="zl" style="margin-top: 10px">
+			<div class="control-group" style="margin-left: 100px">
+				<label id="" class="red">*</label>
+				<label class="control-label">参考资料类型:</label>
+				<select id="info" style="margin-left: 20px" onchange="ckzl_change()">
+					<option id="zllx1" value="1">网络资料</option>
+					<option id="zllx2" value="2">著作资料</option>
+					<option id="zllx3" value="3">其他资料</option>
+				</select>
+			</div>
+			<%--网络资料--%>
+			<div class="wlzl" style="display: block" id="wlzl">
+			<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+				<label id="" class="red">*</label>
+				<label class="control-label keyClass">输入网址:</label>
+				<input id="website" style="margin-left: 45px" htmlEscape="false" class="input-xlarge " placeholder="请以http(s)开头"/>
+			</div>
+			<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+				<label id="" class="red">*</label>
+				<label class="control-label keyClass">文章名字:</label>
+				<input id="articleName" style="margin-left: 45px" htmlEscape="false" class="input-xlarge " placeholder="请输入文章名字"/>
+			</div>
+			<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+				<label id="" class="red">*</label>
+				<label class="control-label keyClass">网站名称:</label>
+					<input  id="websiteName" style="margin-left: 45px" htmlEscape="false" class="input-xlarge " placeholder="请输入网站名称 如:新华网"/>
+			</div>
+			<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+				<label class="control-label keyClass">发表日期:</label>
+					<input id="publishTimeStr" name="publishTime" style="margin-left: 55px" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+						   value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+						   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+			</div>
+			<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+				<label class="control-label keyClass">引文日期:</label>
+					<input id="acitationTimeStr" name="publishTime" style="margin-left: 55px" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+						   value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+						   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+			</div>
+			<div class="form-actions" align="center">
+				<%--			onclick="checkInfo()"--%>
+				<input id="" onclick="saveInfo()" class="btn btn-primary" type="submit" value="确 定"/>&nbsp;
+				<input id="" class="btn" type="button" value="取 消" onclick="cantral()"/>
+			</div>
+			</div>
+            <%--著作资料--%>
+			<div class="zzzl" style="display: none" id="zzzl">
+				<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+					<label id="" class="red">*</label>
+					<label class="control-label keyClass">作者:</label>
+					<input id="author" style="margin-left: 70px" htmlEscape="false" class="input-xlarge " placeholder="请输入作者名称 多个作者使用英文都好隔开"/>
+				</div>
+				<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+					<label id="" class="red">*</label>
+					<label class="control-label keyClass">著作名:</label>
+					<input id="workName" style="margin-left: 60px" htmlEscape="false" class="input-xlarge " placeholder="请输入著作名"/>
+				</div>
+				<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+					<label class="control-label keyClass">出版地:</label>
+					<input id="publicationPlace" style="margin-left: 70px" htmlEscape="false" class="input-xlarge " placeholder="请输入出版地信息"/>
+				</div>
+				<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+					<label id="" class="red">*</label>
+					<label class="control-label keyClass">出版社:</label>
+					<input id="press" style="margin-left: 60px" htmlEscape="false" class="input-xlarge " placeholder="请输入出版社名称"/>
+				</div>
+				<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+					<label class="control-label keyClass">出版年:</label>
+					<input id="publicationYearStr" name="publishTime" style="margin-left: 65px" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+						   value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+						   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
+				</div>
+				<div class="control-group" style="margin-left: 100px;margin-top: 30px">
+					<label class="control-label keyClass">引文编码:</label>
+					<input id="acitationWeb" style="margin-left: 60px" htmlEscape="false" class="input-xlarge " placeholder="请输入引用著作的页码 如 100 121"/>
+				</div>
+				<div class="form-actions" align="center">
+					<%--			onclick="checkInfo()"--%>
+					<input id="" onclick="saveInfo()" class="btn btn-primary" type="submit" value="确 定"/>&nbsp;
+					<input id="" class="btn" type="button" value="取 消" onclick="cantral()"/>
+				</div>
+			</div>
+			<%--其他资料--%>
+			<div class="qtzl" style="display:none;" id="qtzl">
+				<div class="control-group" style="margin-left: 20px">
+					<label id="" class="red">*</label>
+					<label class="control-label keyClass">参考资料说明:</label>
+					<textarea id="referenceDescription" type="text"  style="position: relative;height: 100px; width: 450px;" maxlength="50" ></textarea>
+					<label style="margin-left: 150px">其他类型参考资料,填写格式请参阅<a href="">《信息与文献 参考文献著录规则 GB/T 7714-2015》</a></label>
+				</div>
+				<div class="control-group" style="margin-left: 20px">
+					<label class="control-label keyClass">图片描述:</label>
+					<input id="imageDescription" style="margin-left: 45px" htmlEscape="false" class="input-xlarge " placeholder="请输入其他参考资料的具体描述"/>
+				</div>
+				<div class="control-group" style="margin-top: 28px">
+					<label class="control-label">图片上传:</label>
+					<div class="main-image-list" style="display: flex;flex-wrap: wrap">
+						<div class="controls upload-content iconBox mainImageBox" id="mainImageBox">
+							<div class="conList">
+								<hidden id="image" path="image" htmlEscape="false" maxlength="255" class="input-xlarge "/>
+								<sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+											  maxHeight="100"/>
+								<br>
+								<label style="margin-left: 150px">请上传引用的图片资源,需同时上传资料的封面、以及含有对应具体内容的图片;注意:图片需要保证完整、不可遮挡且清晰</label>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="form-actions" align="center">
+					<%--			onclick="checkInfo()"--%>
+					<input id="" onclick="saveInfo()" class="btn btn-primary" type="submit" value="确 定"/>&nbsp;
+					<input id="" class="btn" type="button" value="取 消" onclick="cantral()"/>
+				</div>
+			</div>
+			</div>
+		</div>
+	</div>
+<%--	<div id="dialogmask" class="dialogmask opacity"></div>--%>
+	<div id="dialog" class="box" style="display: none"> 
+		<div id="dialog_content" class="dialogcontent">
+<%--			<div id="logcontent" class="logcontent"><a herf="https://www.baidu.com">三生三世</a></div>--%>
+<%--			<a herf="https://www.baidu.com">十里桃花</a>--%>
+	<div><h4>创建词条引导</h4></div>
+	<br>
+	<div>欢迎进入创建词条引导,为便于您更好的通过审核,请务必确保您已知晓百科词条的<a href="${ctx}/baike/cmBaikeProduct/entry">编辑须知</a>,如有疑问,您可以<a>点此</a>求助采美工作人员。</div>
+	<br>
+	<div><h5>声明</h5></div>
+	<br>
+	<div>在正式创建词条前,首先请你承诺:</div>
+
+		<div>1.不在百科添加广告性质的内容, 如联系方式,官方网站链接等;</div>
+
+	    <div>2.不在百科编写涉及反动,违法犯罪,色情,暴力的内容;</div>
+
+		<div>3.不在百科编写虚假的、捏造的、恶搞的、缺乏根据的内容;</div>
+
+		<div>4.不侵犯他人合理权益;</div>
+
+		<div>5.接受违反以上规则时,百科账号会被封禁的结果。</div>
+	<br>
+	<div><h5>词条名</h5></div>
+	<br>
+	<div>成功创建词条的首要条件是了解一些基础知识!</div>
+	<br>
+	<div><h5>■什么是词条?</h5></div>
+	<br>
+	<div>词条指的是对于单一事物内容的介绍,例如技术,成分等。每个词条都有属于自己的名称,你可以通过搜索词条的名称来找到它们。</div>
+	<div>已有词条重名?创建多义词!</div>
+	<div>与已有词条意义相同?反馈同义词!</div>
+	<br>
+	<div><h5>■什么是规范的词条名?</h5></div>	<br>
+
+	<div>采美百科规范的词条名是一个专有名词,请使用正式的全称或最广为人知的常见名。</div>
+	<div>例如:皮秒激光美容、光子嫩肤、线粒体、葡聚糖等</div>
+	<br>
+	<div><h5>主题</h5></div>	<br>
+	<div>恭喜你已经完成了创建词条的第一步!现在想一想你要创建的词条属于什么类型?</div>
+	<div>选择正确的类型,精确定位你的创建难点所在!</div>
+
+
+	<br>
+	<div><h5>产品成分类词条</h5></div>	<br>
+	<div>如玻尿酸钠、葡聚糖、虎杖等</div>
+
+
+	<br>
+	<div><h5>产品技术词条</h5></div>	<br>
+	<div>如射频、皮秒、808半导体激光技术、透热疗法、448KHz、LDM水滴提升等</div>
+	<br>
+	<div><h5>词条创建要求</h5></div>	<br>
+	<div><h6>1.描述客观</h6></div>
+	<div>描述事物时以事实为依
+	据不加入感情色彩,不掺杂个人的好恶。百科词条
+	是客观内容的集合,只站在第三方立场,以事实说话。例如,
+	某篮球运动员某一场的投篮命中率较差,一般的表述是命中率低,
+	甚至使用“打铁”之类的贬义词。而这样的表述模糊不清,多少算低,多
+	少算高各有标准;同时也会造成支持者和反对者的口水战。所以直接把赛事数据
+	列出,是高是低各自评说即可。另外在筛选内容时,也要保证公正客观,尤其对于争
+	议性内容,保留多方观点并附以可靠的参考资料,是处理争议内容较为可取的做法。</div>
+	<br>
+	<div><h6>2.修饰适当</h6></div>	<br>
+	<div>百科词条提倡用语“客观”,在一般性的叙述中(区别于引用原文的引述)尽量少的使用形容词和程度副词(最XXXX、十分XXX……)。</div>
+	<br>
+	<div><h6>3.参考资料要有效</h6></div>	<br>
+
+
+	<div>参考资料是正文内容客观的另一种表现形式。词条某条内容,光靠“说”自己客观是不够的,应以可信有效的参考资料作为佐证来源,才能证明该内容是否已获得公众知晓或认可。
+	特色词条应该保证一半以上的信息点都是有可靠来源的(由科学百科权威认证的特色词条,应确保词条正文中(含概述)每个目录模块中都有至少一条权威参考资料)。
+	这里的有来源不是要求一字一句的复制粘贴,而是“内容虽经必要提炼、整理,但却不失原意”。例如前述的两个姜文词条中的文段,整理后的内容要素和观点依然来自参考资料,并没有增减其原意。
+	</div>
+
+	<br>
+	<div>可靠的来源一般包括文献、书籍等出版物、主流媒体发布的消息、政府或公众机构官网发布的内容等。关于可靠的来源的具体定义,请参阅百度百科:参考资料。</div>
+	<br>
+
+
+	<div>如,“<a>牛顿第一运动定律</a>”词条中,定律内容、发现者、适用范围等都是必不可少的重要内容,这些部分的缺失会导致读者对词条内容的错误认识。</div>
+	<div align="center"><input class="btn btn-primary" type="button" onclick="dialog()" value="我已阅读并知晓"></div>  
+		</div>
+	</div>
+
+	<form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="fileIds"/>
+		<form:hidden path="commodityType"/>
+		<form:hidden path="emptyNum"/>
+		<sys:message content="${message}"/>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label titleClass">${commodityType}简述</label>--%>
+<%--		</div>--%>
+		<div class="control-group">
+			<label class="control-label">词条名称:</label>
+			<div class="controls">
+				<form:input path="name" htmlEscape="false" class="input-xlarge "/>
+				<label id="nameSensitiveWords" class="red"></label>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">义项名:</label>
+			<div class="controls not-overflow">
+				<div class="content-edit" id="bk-name">
+					<div class="bk-toolbar">[&nbsp;|&nbsp;]</div>
+					<div class="bk-bubble">1</div>
+					<div class="bk-input" contenteditable="true"></div>
+					<ul class="bk-literature">
+						<li>
+							<div class="bk-content">参考资料1</div>
+							<div class="bk-control">
+								<span class="bk-edit">编辑</span>
+								<span class="bk-delete">删除</span>
+							</div>
+						</li>
+					</ul>
+				</div>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">词条概述:</label>
+			<div class="controls" style="width:812px">
+                <textarea type="text" id="discription" name="discription" style="position: relative;height: 100px; width: 450px;" maxlength="50" >${cmBaikeProduct.discription}</textarea>
+                <label id="discriptionSensitiveWords" class="red"></label>
+            </div>
+		</div>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label">供应商链接:</label>--%>
+<%--			<div class="controls">--%>
+<%--				<form:select path="shopId" class="input-xlarge ">--%>
+<%--					<form:option value="" label="选择供应商"/>--%>
+<%--					<form:options items="${cmBaikeProduct.shopList}" class="input-xlarge" itemLabel="name" itemValue="shopID" htmlEscape="false"/>--%>
+<%--				</form:select>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group" style="position: relative">--%>
+<%--			<label class="control-label">${commodityType}链接:</label>--%>
+<%--			<div class="controls">--%>
+<%--				<form:input path="productLink" htmlEscape="false" class="input-xxlarge " placeholder="输入采美商城的相关商品详情链接,便于用户精准找到"/>--%>
+<%--                <label id="productLinkSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+		<div class="control-group" style="width: 1000px">
+			<label class="control-label keyClass">概述图册:</label>
+			<div class="display-image-list" style="display: flex;flex-wrap: wrap">
+				<c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">
+					<div class="controls upload-content iconBox" id="displayImageBox${index.index}">
+						<div class="conList">
+							<form:hidden id="displayImage${index.index}" path="displayImageList[${index.index}]" htmlEscape="false"
+										 maxlength="255"
+										 class="input-xlarge "/>
+							<sys:ckfinder input="displayImage${index.index}" type="images" uploadPath="/photo"
+										  selectMultiple="false"
+										  maxWidth="100" maxHeight="100"/><br>
+						</div>
+					</div>
+				</c:forEach>
+				<c:set var="size" value="${empty cmBaikeProduct.displayImageList?0:cmBaikeProduct.displayImageList.size()}"/>
+				<c:forEach var="emptyIndex" begin="${size}" end="${5}">
+					<div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="displayImageBox${emptyIndex}" >
+						<div class="conList">
+							<form:hidden id="displayImage${emptyIndex}" path="displayImageList[${emptyIndex}]" htmlEscape="false"
+										 maxlength="255"
+										 class="input-xlarge "/>
+							<sys:ckfinder input="displayImage${emptyIndex}" type="images" uploadPath="/photo"
+										  selectMultiple="false"
+										  maxWidth="100" maxHeight="100"/><br>
+						</div>
+					</div>
+				</c:forEach>
+			</div>
+		</div>
+
+		<div class="control-group">
+			<div class="control-group">
+				<label class="control-label keyClass">相关视频(各视频大小不超过50M,最多上传6个)</label>
+			</div>
+			<div class="control-group">
+				<label class="control-label">标题:</label>
+				<div class="controls">
+					<input id="fileTitle" style="width: 457px" htmlEscape="false" >
+				</div>
+				<label class="control-label" style="margin-top:10px">视频路径:</label>
+				<div class="controls" style="margin-top:10px">
+					<input id="uploadFileName" type="text" style="display: inline;" placeholder="支持mp4" disabled="true" class="input-xlarge required" />
+					<div class="upload">
+						<input type="file" name="file" id="productFile" accept=".mp4" >选择文件
+					</div>
+					<div class="add-submit">
+						<input id="addSubmit" type="button" value="上传"/>上传&nbsp;
+					</div>
+					<div class="upload-loading">
+						<img alt="gif" src="/static/images/upload.gif" width="32px" border="none">
+					</div>
+				</div>
+			</div>
+			<div class="control-group">
+				<div id='file-list-display' style="margin-left:180px">
+					<c:if test="${not empty cmBaikeProduct.videoList}">
+						<c:forEach items="${cmBaikeProduct.videoList}" var="videoFile" varStatus="statusIndex">
+							<p>${videoFile.fileTitle}
+								<span class="del"><a onclick="previewVideo('${videoFile.ossUrl}')">预览</a></span>
+								<span class="del" onclick="dataDelete(this,'${videoFile.id}')">删除</span>
+							</p>
+						</c:forEach>
+					</c:if>
+				</div>
+			</div>
+		</div>
+<%--		${cmBaikeProduct.commodityType eq 2?'':}--%>
+        <div style="display:none" >
+            <div class="control-group">
+                <label class="control-label titleClass">正品识别</label>
+            </div>
+            <div class="control-group">
+                <label class="control-label">认证链接:</label>
+                <div class="controls">
+                    <form:input path="authLink" htmlEscape="false" class="input-xxlarge " cssStyle="position: relative"/>
+                    <label id="authLinkSensitiveWords" class="red"></label>
+                </div>
+            </div>
+			<div class="control-group">
+				<label class="control-label">认证二维码:</label>
+				<div class="auth-qrCode-list" style="display: flex;flex-wrap: wrap">
+					<div class="controls upload-content iconBox authQrCodeBox" id="authQrCodeBox">
+						<div class="conList">
+							<form:hidden id="authQrCode" path="authQrCode" htmlEscape="false" maxlength="255" class="input-xlarge "/>
+							<sys:ckfinder input="authQrCode" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+										  maxHeight="100"/>
+							<br>
+							<label style="margin-left: 150px">建议图片尺寸210px*210px,并上传白底图片</label>
+						</div>
+					</div>
+				</div>
+			</div>
+        </div>
+		<div class="control-group paramList">
+			<label class="control-label titleClass">信息栏:</label>
+			<label>(注:未填写的信息将不会显示在词条页上)</label>
+			<div class="controls paramRow" id="paramRow0">
+				<input id="name[0]" name="paramList[0].name" htmlEscape="false" class="input-small "
+					   placeholder="例如:型号" onblur="readflag(0)">
+                <label id="param0SensitiveWords" class="red"></label>
+				<input id="content[0]" name="paramList[0].content" htmlEscape="false" class="input-xlarge "
+					   placeholder="请输入内容" readonly>
+                <label id="content0SensitiveWords" class="red"></label>
+			</div>
+			<div class="controls paramRow" id="paramRow1">
+				<input id="name[1]" name="paramList[1].name" htmlEscape="false" class="input-small "
+					   placeholder="例如:性质类型" onblur="readflag(1)">
+                <label id="param1SensitiveWords" class="red"></label>
+				<input id="content[1]" name="paramList[1].content" htmlEscape="false" class="input-xlarge "
+					   placeholder="请输入内容" readonly>
+                <label id="content1SensitiveWords" class="red"></label>
+				<a onclick="deleteParam(1)" style="cursor: pointer">删除</a>
+			</div>
+			<div class="controls paramRow" id="paramRow2">
+				<input id="name[2]" name="paramList[2].name" htmlEscape="false" class="input-small "
+					   placeholder="例如:成分" onblur="readflag(2)">
+                <label id="param2SensitiveWords" class="red"></label>
+				<input id="content[2]" name="paramList[2].content" htmlEscape="false" class="input-xlarge "
+					   placeholder="请输入内容" readonly>
+                <label id="content2SensitiveWords" class="red"></label>
+				<a onclick="deleteParam(2)" style="cursor: pointer">删除</a>
+			</div>
+<%--			<div class="controls paramRow" id="paramRow3">--%>
+<%--				<input name="paramList[3].name" htmlEscape="false" class="input-small "--%>
+<%--					   placeholder="例如:规格">--%>
+<%--                <label id="param3SensitiveWords" class="red"></label>--%>
+<%--				<input name="paramList[3].content" htmlEscape="false" class="input-xlarge "--%>
+<%--					   placeholder="输入参数信息">--%>
+<%--                <label id="content3SensitiveWords" class="red"></label>--%>
+<%--				<a onclick="deleteParam(3)" style="cursor: pointer">删除</a>--%>
+<%--			</div>--%>
+<%--			<div class="controls paramRow" id="paramRow4">--%>
+<%--				<input name="paramList[4].name" htmlEscape="false" class="input-small "--%>
+<%--					   placeholder="例如:性质类型">--%>
+<%--                <label id="param4SensitiveWords" class="red"></label>--%>
+<%--				<input name="paramList[4].content" htmlEscape="false" class="input-xlarge "--%>
+<%--					   placeholder="输入参数信息">--%>
+<%--                <label id="content4SensitiveWords" class="red"></label>--%>
+<%--				<a onclick="deleteParam(4)" style="cursor: pointer">删除</a>--%>
+<%--			</div>--%>
+<%--			<div class="controls paramRow" id="paramRow5">--%>
+<%--				<input name="paramList[5].name" htmlEscape="false" class="input-small "--%>
+<%--					   placeholder="例如:性质类型">--%>
+<%--                <label id="param5SensitiveWords" class="red"></label>--%>
+<%--				<input name="paramList[5].content" htmlEscape="false" class="input-xlarge "--%>
+<%--					   placeholder="输入参数信息">--%>
+<%--                <label id="content5SensitiveWords" class="red"></label>--%>
+<%--				<a onclick="deleteParam(5)" style="cursor: pointer">删除</a>--%>
+<%--			</div>--%>
+		</div>
+		<div class="control-group"><button class="btn btn-primary" type="button" style="margin-left: 500px" onclick="addParam()">增加信息项</button></div>
+		<div class="control-group paramListall">
+			<label class="control-label titleClass">正文:</label><hr>
+			<div class="control-group">
+				<label class="control-label">定义:</label>
+				<div class="controls definitionyi0">
+					<input  name="textInfo[0].textType" value ="1" type="hidden"/>
+					<input  id="dy1" htmlEscape="false" name="textInfo[0].dictionaryContent" class="input-xlarge pla" placeholder="(定义)一级目录"/>
+					<button class="btn btn-primary" id="yidefinitionyi" type="button" style="margin-left: 10px" onclick="addDiction('definitionyi',0,'一级目录')">一级目录</button>
+					<button class="btn btn-primary" id="erdefinitionyi" type="button" style="margin-left: 10px" onclick="addDiction('definitionyi',0,'二级目录')">二级目录</button>
+					<button class="btn btn-primary" id="sandefinitionyi" type="button" style="margin-left: 10px" onclick="addDiction('definitionyi',0,'内容')">内容</button>
+				</div>
+				<div class="controls definitioner0" style="margin-top: 5px">
+					<input  id="dy2"  htmlEscape="false" name="textInfo[1].dictionaryContent" class="input-xlarge pla" placeholder="(定义)二级目录"/>
+					<button class="btn btn-primary" id="yidefinitioner" type="button" style="margin-left: 10px" onclick="addDiction('definitioner',0,'一级目录')">一级目录</button>
+					<button class="btn btn-primary" id="erdefinitioner" type="button" style="margin-left: 10px" onclick="addDiction('definitioner',0,'二级目录')">二级目录</button>
+					<button class="btn btn-primary" id="sandefinitioner" type="button" style="margin-left: 10px" onclick="addDiction('definitioner',0,'内容')">内容</button>
+				</div>
+				<div class="controls definitionsan0" style="margin-top: 5px">
+					<textarea id="dy3"  class="pla" name="textInfo[2].dictionaryContent" placeholder="(定义)内容" type="text" style="position: relative;height: 100px; width: 450px;"  ></textarea>
+					<button class="btn btn-primary" id="yidefinitionsan" type="button" style="margin-left: 10px" onclick="addDiction('definitionsan',0,'一级目录')">一级目录</button>
+					<button class="btn btn-primary" id="erdefinitionsan" type="button" style="margin-left: 10px" onclick="addDiction('definitionsan',0,'二级目录')">二级目录</button>
+					<button class="btn btn-primary" id="sandefinitionsan" type="button" style="margin-left: 10px" onclick="addDiction('definitionsan',0,'内容')">内容</button>
+				</div>
+			</div>
+			<div class="control-group">
+				<label class="control-label">原理:</label>
+				<div class="controls principleyi">
+					<input id="yl1"  htmlEscape="false" name="textInfo[4].dictionaryContent" class="input-xlarge pla" placeholder="(原理)一级目录"/>
+					<button class="btn btn-primary" id="yiprincipleyi" type="button" style="margin-left: 10px" onclick="addDiction(2,'一级目录','principleyi',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="erprincipleyi" type="button" style="margin-left: 10px" onclick="addDiction(2,'二级目录','principleyi',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sanprincipleyi" type="button" style="margin-left: 10px" onclick="addDiction(2,'内容','principleyi',2,0,this.id)">内容</button>
+
+				</div>
+				<div class="controls principleer" style="margin-top: 5px">
+					<input id="yl2"  htmlEscape="false" name="textInfo[5].dictionaryContent"  class="input-xlarge pla" placeholder="(原理)二级目录"/>
+					<button class="btn btn-primary" id="yiprincipleer" type="button" style="margin-left: 10px" onclick="addDiction(2,'一级目录','principleer',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="erprincipleer" type="button" style="margin-left: 10px" onclick="addDiction(2,'二级目录','principleer',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sanprincipleer" type="button" style="margin-left: 10px" onclick="addDiction(2,'内容','principleer',2,0,this.id)">内容</button>
+				</div>
+				<div class="controls principlesan" style="margin-top: 5px">
+					<textarea id="yl3" class="pla" name="textInfo[6].dictionaryContent"  placeholder="(原理)内容" type="text" style="position: relative;height: 100px; width: 450px;"  ></textarea>
+					<button class="btn btn-primary" id="yiprinciplesan" type="button" style="margin-left: 10px" onclick="addDiction(2,'一级目录','principlesan',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="erprinciplesan" type="button" style="margin-left: 10px" onclick="addDiction(2,'二级目录','principlesan',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sanprinciplesan" type="button" style="margin-left: 10px" onclick="addDiction(2,'内容','principlesan',2,0,this.id)">内容</button>
+				</div>
+			</div>
+
+			<div class="control-group">
+				<label class="control-label">特点:</label>
+				<div class="controls characteristicyi">
+					<input id="td1"  htmlEscape="false" name="textInfo[7].dictionaryContent" class="input-xlarge pla" placeholder="(特点)一级目录"/>
+					<button class="btn btn-primary" id="yicharacteristicyi" type="button" style="margin-left: 10px" onclick="addDiction(3,'一级目录','characteristicyi',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="ercharacteristicyi" type="button" style="margin-left: 10px" onclick="addDiction(3,'二级目录','characteristicyi',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sancharacteristicyi" type="button" style="margin-left: 10px" onclick="addDiction(3,'内容','characteristicyi',2,0,this.id)">内容</button>
+
+				</div>
+				<div class="controls characteristicer" style="margin-top: 5px">
+					<input  id="td2"  htmlEscape="false" name="textInfo[8].dictionaryContent" class="input-xlarge pla" placeholder="(特点)二级目录"/>
+					<button class="btn btn-primary" id="yicharacteristicer" type="button" style="margin-left: 10px" onclick="addDiction(3,'一级目录','characteristicer',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="ercharacteristicer" type="button" style="margin-left: 10px" onclick="addDiction(3,'二级目录','characteristicer',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sancharacteristicer" type="button" style="margin-left: 10px" onclick="addDiction(3,'内容','characteristicer',2,0,this.id)">内容</button>
+				</div>
+				<div class="controls characteristicsan" style="margin-top: 5px">
+					<textarea id="td3"   class="pla" name="textInfo[9].dictionaryContent" placeholder="(特点)内容" type="text" style="position: relative;height: 100px; width: 450px;"  ></textarea>
+					<label id="3" class="red"></label>
+					<button class="btn btn-primary" id="yicharacteristicsan" type="button" style="margin-left: 10px" onclick="addDiction(3,'一级目录','characteristicsan',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="ercharacteristicsan" type="button" style="margin-left: 10px" onclick="addDiction(3,'二级目录','characteristicsan',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sancharacteristicsan" type="button" style="margin-left: 10px" onclick="addDiction(3,'内容','characteristicsan',2,0,this.id)">内容</button>
+				</div>
+			</div>
+
+			<div class="control-group">
+				<label class="control-label">应用:</label>
+				<div class="controls applicationyi">
+					<input  id="yy1"  htmlEscape="false" name="textInfo[10].dictionaryContent" class="input-xlarge pla" placeholder="(应用)一级目录"/>
+					<button class="btn btn-primary" id="yiapplicationyi" type="button" style="margin-left: 10px" onclick="addDiction(4,'一级目录','applicationyi',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="erapplicationyi" type="button" style="margin-left: 10px" onclick="addDiction(4,'二级目录','applicationyi',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sanapplicationyi" type="button" style="margin-left: 10px" onclick="addDiction(4,'内容','applicationyi',2,0,this.id)">内容</button>
+
+				</div>
+				<div class="controls applicationer" style="margin-top: 5px">
+					<input  id="yy2"  htmlEscape="false" name="textInfo[11].dictionaryContent" class="input-xlarge pla" placeholder="(应用)二级目录"/>
+					<button class="btn btn-primary" id="yiapplicationer" type="button" style="margin-left: 10px" onclick="addDiction(4,'一级目录','applicationer',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="erapplicationer" type="button" style="margin-left: 10px" onclick="addDiction(4,'二级目录','applicationer',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sanapplicationer" type="button" style="margin-left: 10px" onclick="addDiction(4,'内容','applicationer',2,0,this.id)">内容</button>
+				</div>
+				<div class="controls applicationsan" style="margin-top: 5px">
+					<textarea id="yy3"  class="pla" name="textInfo[12].dictionaryContent" placeholder="(应用)内容" type="text" style="position: relative;height: 100px; width: 450px;"  ></textarea>
+					<button class="btn btn-primary" id="yiapplicationsan" type="button" style="margin-left: 10px" onclick="addDiction(4,'一级目录','applicationsan',0,0,this.id)">一级目录</button>
+					<button class="btn btn-primary" id="erapplicationsan" type="button" style="margin-left: 10px" onclick="addDiction(4,'二级目录','applicationsan',1,0,this.id)">二级目录</button>
+					<button class="btn btn-primary" id="sanapplicationsan" type="button" style="margin-left: 10px" onclick="addDiction(4,'内容','applicationsan',2,0,this.id)">内容</button>
+				</div>
+			</div>
+		</div>
+		<div class="control-group" id="mata">
+			<label class="control-label titleClass">参考资料</label>
+			<c:forEach items="${materialInfo}" var="videoFile" varStatus="statusIndex">
+				<c:if test="${videoFile.referenceType eq '1'}">
+					<div class="controls applicationsan" style="margin-top: 5px">
+						<span class="del">[${statusIndex.index+1}]</span>
+						<span class="del"><a href="${videoFile.website}" target="_blank">${videoFile.articleName}(文章名称)</a></span>
+						<span class="del">${videoFile.websiteName}(网站名称)</span>
+						<span class="del">${videoFile.publishTime}(发表日期)</span>
+						<span class="del">${videoFile.acitationTime}(引文日期)</span>
+						<a class="del" style="margin-left: 100px" onclick="upMaterial(${videoFile.id})">编辑</a>
+						<a onclick="delMaterial(${videoFile.id})">删除</a>
+					</div>
+				</c:if>
+				<c:if test="${videoFile.referenceType eq '2'}">
+					<div class="controls applicationsan" style="margin-top: 5px">
+						<span class="del">[${statusIndex.index+1}]</span>
+						<span class="del">${videoFile.author}(作者)</span>
+						<span class="del">${videoFile.workName}(著作名)</span>
+						<span class="del">${videoFile.publicationPlace}(出版地)</span>
+						<span class="del">${videoFile.press}(出版社)</span>
+						<span class="del">${videoFile.publicationYear}(出版年)</span>
+						<span class="del">${videoFile.acitationWeb}(引文页码)</span>
+						<a class="del" style="margin-left: 100px" onclick="upMaterial(${videoFile.id})">编辑</a>
+<%--						<span class="del" onclick="delMaterial(${videoFile.id})">删除</span>--%>
+						<a onclick="delMaterial(${videoFile.id})">删除</a>
+
+					</div>
+				</c:if>
+				<c:if test="${videoFile.referenceType eq '3'}">
+					<div class="controls applicationsan" style="margin-top: 5px">
+						<span class="del">[${statusIndex.index+1}]</span>
+						<span class="del">${videoFile.referenceDescription}(参考资料说明)</span>
+						<span class="del">${videoFile.imageDescription}(图片描述)</span>
+						<div class="conList">
+<%--							onclick="imgSizeChange()"--%>
+						<img id="imgaa"  src="${videoFile.imageUrl}" height="50px" width="50px" >(图片)</input>
+						</div>
+						<a class="del" style="margin-left: 100px" onclick="upMaterial(${videoFile.id})">编辑</a>
+<%--						<span class="del" onclick="delMaterial(${videoFile.id})">删除</span>--%>
+						<a onclick="delMaterial(${videoFile.id})">删除</a>
+
+					</div>
+				</c:if>
+			</c:forEach>
+		</div>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label keyClass">${commodityType}优点:</label>--%>
+<%--			<div class="controls" style="width:812px">--%>
+<%--				<form:textarea path="advantage" htmlEscape="false" class="input-xlarge  hide" />--%>
+<%--				<div id="advantageEditor" class="contentEditor">${cmBaikeProduct.advantage}</div>--%>
+<%--                <label id="advantageSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label keyClass">${commodityType}缺点:</label>--%>
+<%--			<div class="controls" style="width:812px">--%>
+<%--				<form:textarea path="disadvantage" htmlEscape="false" class="input-xlarge  hide" />--%>
+<%--				<div id="disadvantageEditor" class="contentEditor">${cmBaikeProduct.disadvantage}</div>--%>
+<%--                <label id="disadvantageSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label keyClass">${commodityType}原理:</label>--%>
+<%--			<div class="controls" style="width:812px">--%>
+<%--				<form:textarea path="principle" htmlEscape="false" class="input-xlarge  hide" />--%>
+<%--				<div id="principleEditor" class="contentEditor">${cmBaikeProduct.principle}</div>--%>
+<%--                <label id="principleSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+
+		<div class="control-group" style="margin-top: 100px">
+			<label class="control-label">头图:</label>
+			<div class="main-image-list" style="display: flex;flex-wrap: wrap">
+				<div class="controls upload-content iconBox mainImageBox" id="mainImageBox">
+					<div class="conList">
+						<form:hidden id="" path="" htmlEscape="false" maxlength="255" class="input-xlarge "/>
+						<sys:ckfinder input="image" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+									  maxHeight="100"/>
+						<br>
+						<label style="margin-left: 150px">建议图片尺寸210px*210px,并上传白底图片</label>
+					</div>
+				</div>
+			</div>
+		</div>
+
+		<div class="control-group">
+			<label class="control-label keyClass">分类:</label>
+			<div class="controls">
+				<form:select path="typeId" class="input-xlarge ">
+					<form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
+				</form:select>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">SEO关键词:</label>
+			<div class="auto-input">
+				<form:input path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge"/>
+                <label id="seoKeywordSensitiveWords" class="red"></label>
+			</div>
+		</div>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label titleClass">${commodityType}档案</label>--%>
+<%--		</div>--%>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label">品牌:</label>--%>
+<%--			<div class="controls">--%>
+<%--				<form:input path="brand" htmlEscape="false" class="input-xlarge "/>--%>
+<%--                <label id="brandSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label">产地:</label>--%>
+<%--			<div class="controls">--%>
+<%--				<form:input path="producePlace" htmlEscape="false" class="input-xlarge "/>--%>
+<%--                <label id="producePlaceSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label">上市时间:</label>--%>
+<%--			<div class="controls">--%>
+<%--				<form:input path="marketYear" htmlEscape="false" placeholder="年" class="input-medium" maxlength="4" onkeyup="onlynum(this)"/>---%>
+<%--				<form:input path="marketMonth" htmlEscape="false" placeholder="月" class="input-medium" maxlength="2" onkeyup="onlynum(this)"/>---%>
+<%--				<form:input path="marketDay" htmlEscape="false" placeholder="日" class="input-medium" maxlength="2" onkeyup="onlynum(this)"/>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+		<div class="control-group">
+			<label class="control-label">关联供应商:</label>
+			<div class="controls">
+				<form:select path="shopId" class="input-xlarge ">
+					<form:option value="" label="请选择供应商"/>
+					<form:options items="${cmBaikeProduct.shopList}" class="input-xlarge" itemLabel="name" itemValue="shopID" htmlEscape="false"/>
+				</form:select>
+			</div>
+		</div>
+<%--		<div class="control-group" style="position: relative">--%>
+<%--			<label class="control-label">NMPA认证时间:</label>--%>
+<%--			<div class="controls">--%>
+<%--				<form:input path="nmpaYear" htmlEscape="false" placeholder="年" class="input-medium" maxlength="4" onkeyup="onlynum(this)"/>---%>
+<%--				<form:input path="nmpaMonth" htmlEscape="false" placeholder="月" class="input-medium" maxlength="2" onkeyup="onlynum(this)"/>---%>
+<%--				<form:input path="nmpaDay" htmlEscape="false" placeholder="日" class="input-medium" maxlength="2" onkeyup="onlynum(this)"/>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group" style="width: 1000px">--%>
+<%--			<label class="control-label keyClass">${commodityType}认证:</label>--%>
+<%--			<div class="auth-image-list" style="display: flex;flex-wrap: wrap">--%>
+<%--				<c:forEach items="${cmBaikeProduct.authImageList}" var="authImage" varStatus="index">--%>
+<%--					<div class="controls upload-content iconBox" id="authImageBox${index.index}">--%>
+<%--						<div class="conList">--%>
+<%--							<form:hidden id="authImage${index.index}" path="authImageList[${index.index}]" htmlEscape="false"--%>
+<%--										 maxlength="255"--%>
+<%--										 class="input-xlarge "/>--%>
+<%--							<sys:ckfinder input="authImage${index.index}" type="images" uploadPath="/photo"--%>
+<%--										  selectMultiple="false"--%>
+<%--										  maxWidth="100" maxHeight="100"/><br>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</c:forEach>--%>
+<%--				<c:set var="size" value="${empty cmBaikeProduct.authImageList?0:cmBaikeProduct.authImageList.size()}"/>--%>
+<%--				<c:forEach var="emptyIndex" begin="${size}" end="${7}">--%>
+<%--					<div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="authImageBox${emptyIndex}" >--%>
+<%--						<div class="conList">--%>
+<%--							<form:hidden id="authImage${emptyIndex}" path="authImageList[${emptyIndex}]" htmlEscape="false"--%>
+<%--										 maxlength="255"--%>
+<%--										 class="input-xlarge "/>--%>
+<%--							<sys:ckfinder input="authImage${emptyIndex}" type="images" uploadPath="/photo"--%>
+<%--										  selectMultiple="false"--%>
+<%--										  maxWidth="100" maxHeight="100"/><br>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</c:forEach>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label keyClass">适应症:</label>--%>
+<%--			<div class="controls" style="width:812px">--%>
+<%--				<form:textarea path="adaptiveMan" htmlEscape="false" class="input-xlarge  hide" />--%>
+<%--				<div id="adaptiveManEditor" class="contentEditor">${cmBaikeProduct.adaptiveMan}</div>--%>
+<%--                <label id="adaptiveManSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label keyClass">不适应人群:</label>--%>
+<%--			<div class="controls" style="width:812px">--%>
+<%--				<form:textarea path="unAdaptiveMan" htmlEscape="false" class="input-xlarge  hide" />--%>
+<%--				<div id="unAdaptiveManEditor" class="contentEditor">${cmBaikeProduct.unAdaptiveMan}</div>--%>
+<%--                <label id="unAdaptiveManSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group">--%>
+<%--			<label class="control-label keyClass">注意事项:</label>--%>
+<%--			<div class="controls" style="width:812px">--%>
+<%--				<form:textarea path="aroundOperation" htmlEscape="false" class="input-xlarge  hide" />--%>
+<%--				<div id="aroundOperationEditor" class="contentEditor">${cmBaikeProduct.aroundOperation}</div>--%>
+<%--                <label id="aroundOperationSensitiveWords" class="red"></label>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--		<div class="control-group" style="width: 1000px">--%>
+<%--			<label class="control-label keyClass">效果展示:</label>--%>
+<%--			<div class="display-image-list" style="display: flex;flex-wrap: wrap">--%>
+<%--				<c:forEach items="${cmBaikeProduct.displayImageList}" var="displayImage" varStatus="index">--%>
+<%--					<div class="controls upload-content iconBox" id="displayImageBox${index.index}">--%>
+<%--						<div class="conList">--%>
+<%--							<form:hidden id="displayImage${index.index}" path="displayImageList[${index.index}]" htmlEscape="false"--%>
+<%--										 maxlength="255"--%>
+<%--										 class="input-xlarge "/>--%>
+<%--							<sys:ckfinder input="displayImage${index.index}" type="images" uploadPath="/photo"--%>
+<%--										  selectMultiple="false"--%>
+<%--										  maxWidth="100" maxHeight="100"/><br>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</c:forEach>--%>
+<%--				<c:set var="size" value="${empty cmBaikeProduct.displayImageList?0:cmBaikeProduct.displayImageList.size()}"/>--%>
+<%--				<c:forEach var="emptyIndex" begin="${size}" end="${5}">--%>
+<%--					<div class="controls upload-content iconBox conList ${emptyIndex eq 0?'':'hide-pic'}" id="displayImageBox${emptyIndex}" >--%>
+<%--						<div class="conList">--%>
+<%--							<form:hidden id="displayImage${emptyIndex}" path="displayImageList[${emptyIndex}]" htmlEscape="false"--%>
+<%--										 maxlength="255"--%>
+<%--										 class="input-xlarge "/>--%>
+<%--							<sys:ckfinder input="displayImage${emptyIndex}" type="images" uploadPath="/photo"--%>
+<%--										  selectMultiple="false"--%>
+<%--										  maxWidth="100" maxHeight="100"/><br>--%>
+<%--						</div>--%>
+<%--					</div>--%>
+<%--				</c:forEach>--%>
+<%--			</div>--%>
+<%--		</div>--%>
+<%--        <div class="questionList">--%>
+<%--            <div class="control-group">--%>
+<%--                <label class="control-label keyClass">常见问题:</label>--%>
+<%--                <button class="btn btn-primary" type="button" style="margin-left: 500px" onclick="addQuestion()">添加问题</button>--%>
+<%--            </div>--%>
+<%--            <div class="control-group" id="questionRow0">--%>
+<%--                <label class="control-label">问题1:</label>--%>
+<%--                <div class="controls">--%>
+<%--                    <input name="questionList[0].question" style="width: 550px" htmlEscape="false" class="input-xlarge ">--%>
+<%--                    <label id="question0SensitiveWords" class="red"></label>--%>
+<%--                </div>--%>
+<%--            </div>--%>
+<%--            <div class="control-group" id="answerRow0">--%>
+<%--                <label class="control-label">答:</label>--%>
+<%--                <div class="controls">--%>
+<%--                    <input name="questionList[0].answer" style="width: 550px" htmlEscape="false" class="input-xlarge ">--%>
+<%--                    <label id="answer0SensitiveWords" class="red"></label>--%>
+<%--                </div>--%>
+<%--            </div>--%>
+<%--            <div class="control-group" id="questionRow1">--%>
+<%--                <label class="control-label">问题2:</label>--%>
+<%--                <div class="controls">--%>
+<%--                    <input name="questionList[1].question" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">--%>
+<%--                    <label id="question1SensitiveWords" class="red"></label>--%>
+<%--                    <a id="questionDelBtn1" onclick="deleteQuestion(1)" style="cursor: pointer">删除</a>--%>
+<%--                </div>--%>
+<%--            </div>--%>
+<%--            <div class="control-group" id="answerRow1">--%>
+<%--                <label class="control-label">答:</label>--%>
+<%--                <div class="controls">--%>
+<%--                    <input name="questionList[1].answer" style="width: 550px" htmlEscape="false" class="input-xlarge  questionInput">--%>
+<%--                    <label id="answer1SensitiveWords" class="red"></label>--%>
+<%--                </div>--%>
+<%--            </div>--%>
+<%--        </div>--%>
+
+		<div class="control-group">
+			<label class="control-label keyClass">发布时间:</label>
+			<div class="controls">
+				<input name="publishTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
+					value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" 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 keyClass">基础浏览量:</label>
+			<div class="controls">
+				<form:input path="basePv" htmlEscape="false" onkeyup="onlynum(this)" class="input-xlarge  digits "/>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label keyClass">状态:</label>
+			<div class="controls">
+				<form:radiobutton path="status" label="发布" value="1" checked="${empty cmBaikeProduct.status?'checked':''}"/>
+				<form:radiobutton path="status" label="保存草稿箱" value="0"/>
+			</div>
+		</div>
+		<div class="form-actions">
+<%--			onclick="checkInfo()"--%>
+			<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>
+
+<% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
+<script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
+<script type="text/javascript" src="${ctxStatic}/sensitiveWords/mint-filter.umd.js"></script>
+<script type="text/javascript" src="${ctxStatic}/auto-input.js"></script>
+<script type="text/javascript" src="${ctxStatic}/content-edit.js"></script>
+<script>
+	$(function(){
+		console.log(123)
+	})
+	var contentEditMap = new Map()
+	function createContentEdit(el){
+		contentEditMap.set(el, new ContentEdit({
+			el: el + ' .bk-input',
+			hiddenMark: false,
+			markCountKey: 'markCount',
+			change: (html) => {
+				console.log(html)
+			}
+		}))
+	}
+	createContentEdit('#bk-name')
+	$('.content-edit .bk-input').on('blur', function(){
+		console.log('失去焦点')
+		var self = $(this)
+		setTimeout(function(){
+			self.siblings('.bk-toolbar').hide()
+		},200)
+	})
+	$('.content-edit .bk-input').on('focus', function(){
+		console.log('获取焦点')
+		$(this).siblings('.bk-toolbar').show()
+	})
+	$('.content-edit .bk-toolbar').on('click', function(){
+		console.log('工具栏点击')
+		$('#dig').show()
+	})
+	$('.content-edit .bk-bubble').on('click', function(){
+		console.log('气泡点击')
+	})
+	$('.content-edit .bk-literature .bk-edit').on('click', function(){
+		console.log('编辑资料')
+		$(this).siblings('.bk-toolbar').show()
+	})
+	$('.content-edit .bk-literature .bk-delete').on('click', function(){
+		console.log('删除引用资料')
+	})
+</script>
+
+<script>
+	var paramIndex = 3;
+	var questionIndex = 2;
+	$(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.parents('.controls').next();
+					thisWrapper.find('li').css('z-index', 99);
+					thisWrapper.find('.cancel-upload').show();
+					if (nextEle.hasClass('hide-pic')) {
+						nextEle.removeClass('hide-pic');
+					}
+				}
+			})
+		});
+		var observeEle1 = document.getElementsByClassName('main-image-list')[0];
+		var observeEle2 = document.getElementsByClassName('auth-qrCode-list')[0];
+		// var observeEle3 = document.getElementsByClassName('auth-image-list')[0];
+		var observeEle4 = document.getElementsByClassName('display-image-list')[0];
+		observer.observe(observeEle1, MutationObserverConfig);
+		observer.observe(observeEle2, MutationObserverConfig);
+		// observer.observe(observeEle3, MutationObserverConfig);
+		observer.observe(observeEle4, MutationObserverConfig);
+
+		$('body').on('click', '.cancel-upload',function() {
+			var wrapper = $(this).closest('.controls');
+			var controlsId = wrapper.attr('id');
+			wrapper.find('li').css('z-index','-1');
+			wrapper.find('input').val('');
+			$(this).hide();
+			if (controlsId == 'mainImageBox' || controlsId == 'authQrCodeBox') {
+				wrapper.removeClass("hide-pic");
+			}
+			// else if (controlsId.indexOf('authImageBox') != -1) {
+			// 	if ($('.auth-image-list .cancel-upload:visible').length < 8) {
+			// 		wrapper.addClass("hide-pic");
+			// 	}else{
+			// 		wrapper.removeClass("hide-pic");
+			// 	}
+			// }
+			else if (controlsId.indexOf('displayImageBox') != -1) {
+				if ($('.display-image-list .cancel-upload:visible').length < 6) {
+					wrapper.addClass("hide-pic");
+				}else{
+					wrapper.removeClass("hide-pic");
+				}
+			}
+			wrapper.parent().append(wrapper.clone());
+			wrapper.remove();
+			$(".controls").each(function(i,ele){
+				if($(ele).find("input.input-xlarge").val()){
+					$(ele).next().removeClass("hide-pic")
+				}
+			})
+		});
+
+		$('body').on('click','.upload-content li',function() {
+			var index = $(this).closest('.conList').index() + 1,
+					str = 'image'+index+'FinderOpen';
+			eval(str+'()');
+		});
+
+		$(window).on("load", function () {
+			setTimeout(function () {
+				$("#authQrCodeBox").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).parent().parents(".controls").next().removeClass("hide-pic")
+					}
+				})
+				$("#mainImageBox").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).parent().parents(".controls").next().removeClass("hide-pic")
+					}
+				})
+				for (var i = 0; i < 8; i++) {
+					$("#authImageBox"+i).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).parent().parents(".controls").next().removeClass("hide-pic")
+						}
+					})
+				}
+				for (var i = 0; i < 6; i++) {
+					$("#displayImageBox"+i).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).parent().parents(".controls").next().removeClass("hide-pic")
+						}
+					})
+				}
+			}, 200);
+		});
+
+
+		// 初始化参数
+		var paramListSize = ${empty cmBaikeProduct.paramList.size() ? 0: cmBaikeProduct.paramList.size()};
+		paramIndex = paramListSize > 0 ? paramListSize : paramIndex;
+		if (paramListSize > 3) {
+			var index = 3;
+			while (index < paramListSize) {
+				$(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + index + "\">\n" +
+						"\t\t\t\t<input id=\"name[" + index + "]\" name=\"paramList[" + index + "].name\" htmlEscape=\"false\" class=\"input-small \" placeholder=\"请输入名称\" onblur=\"readflag(" + index + ")\">\n" +
+						"\t\t\t\t<label id=\"param" + index + "SensitiveWords\" class=\"red\"></label>\n" +
+						"\t\t\t\t<input id=\"content[" + index + "]\" name=\"paramList[" + index + "].content\" htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"请输入内容\" readonly>\n" +
+						"\t\t\t\t<label id=\"content" + index + "SensitiveWords\" class=\"red\"></label>\n" +
+						"\t\t\t\t<a onclick=\"deleteParam(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +
+						"            </div>");
+				index = index + 1;
+			}
+		}
+        if (paramListSize > 0 && paramListSize < 3) {
+            for (var i = paramListSize; i < 3; i++) {
+                deleteParam(i);
+            }
+        }
+
+        var nameArray = new Array();
+		var contentArray = new Array();
+		<c:forEach items="${cmBaikeProduct.paramList}" var="item">
+		nameArray.push('${item.name}')
+		contentArray.push('${item.content}')
+		</c:forEach>
+		for (var i = 0; i < nameArray.length; i++) {
+			var nameInput = "paramList[" + i + "].name";
+			var contentInput = "paramList[" + i + "].content";
+			$('input[name="' + nameInput + '"]').val(nameArray[i]);
+			$('input[name="' + contentInput + '"]').val(contentArray[i]);
+			if(undefined !=contentArray[i]&&null!=contentArray[i]&& '' !=contentArray[i]){
+				$('input[name="' + contentInput + '"]').readOnly=false;
+			}else{
+				$('input[name="' + contentInput + '"]').readOnly=true;
+			}
+		}
+
+		// 初始化问题
+		<%--var questionListSize = ${empty cmBaikeProduct.questionList.size() ? 0: cmBaikeProduct.questionList.size()};--%>
+		<%--questionIndex = questionListSize > 0 ? questionListSize : questionIndex;--%>
+		<%--if (questionListSize > 2) {--%>
+		<%--	var index = 2;--%>
+		<%--	while (index < questionListSize) {--%>
+		<%--		$(".questionList").append("" +--%>
+		<%--				"<div class=\"control-group\" id=\"questionRow" + index + "\">\n" +--%>
+		<%--				"                <label class=\"control-label\">问题" + (index+1) + ":</label>\n" +--%>
+		<%--				"                <div class=\"controls\">\n" +--%>
+		<%--				"                    <input name=\"questionList[" + index + "].question\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +--%>
+		<%--				"\t\t\t\t<label id=\"question" + index + "SensitiveWords\" class=\"red\"></label>\n" +--%>
+		<%--				"\t\t\t\t<a id=\"questionDelBtn" + index + "\" onclick=\"deleteQuestion(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +--%>
+		<%--				"                </div>\n" +--%>
+		<%--				"            </div>\n" +--%>
+		<%--				"            <div class=\"control-group\" id=\"answerRow" + index + "\">\n" +--%>
+		<%--				"                <label class=\"control-label\">答:</label>\n" +--%>
+		<%--				"                <div class=\"controls\">\n" +--%>
+		<%--				"                    <input name=\"questionList[" + index + "].answer\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +--%>
+		<%--				"\t\t\t\t<label id=\"answer" + index + "SensitiveWords\" class=\"red\"></label>\n" +--%>
+		<%--				"                </div>\n" +--%>
+		<%--				"            </div>");--%>
+		<%--		index = index + 1;--%>
+		<%--	}--%>
+		<%--}--%>
+
+        // if (questionListSize > 0 && questionListSize < 2) {
+        //     for (var i = questionListSize; i < 2; i++) {
+        //         deleteQuestion(i);
+        //     }
+        // }
+		// 初始化正文
+		<c:forEach items="${cmBaikeProduct.textInfo}" var="tex">
+		//定义
+		<c:if test="${tex.textType eq 1}">
+			<c:if test="${tex.dictionaryType eq 1}">
+			$("#dy1").val('${tex.dictionaryContent}')
+			</c:if>
+			<c:if test="${tex.dictionaryType eq 2}">
+			$("#dy2").val('${tex.dictionaryContent}')
+			</c:if>
+			<c:if test="${tex.dictionaryType eq 3}">
+			$("#dy3").val('${tex.dictionaryContent}')
+			</c:if>
+		</c:if>
+
+		//原理
+		<c:if test="${tex.textType eq 2}">
+			<c:if test="${tex.dictionaryType eq 1}">
+			$("#yl1").val('${tex.dictionaryContent}')
+			</c:if>
+			<c:if test="${tex.dictionaryType eq 2}">
+			$("#yl2").val('${tex.dictionaryContent}')
+			</c:if>
+			<c:if test="${tex.dictionaryType eq 3}">
+			$("#yl3").val('${tex.dictionaryContent}')
+			</c:if>
+		</c:if>
+
+		//特点
+		<c:if test="${tex.textType eq 3}">
+			<c:if test="${tex.dictionaryType eq 1}">
+			$("#td1").val('${tex.dictionaryContent}')
+			</c:if>
+			<c:if test="${tex.dictionaryType eq 2}">
+			$("#td2").val('${tex.dictionaryContent}')
+			</c:if>
+			<c:if test="${tex.dictionaryType eq 3}">
+			$("#td3").val('${tex.dictionaryContent}')
+			</c:if>
+		</c:if>
+
+		//应用
+		<c:if test="${tex.textType eq 4}">
+			<c:if test="${tex.dictionaryType eq 1}">
+			$("#yy1").val('${tex.dictionaryContent}')
+			</c:if>
+			<c:if test="${tex.dictionaryType eq 2}">
+			$("#yy2").val('${tex.dictionaryContent}')
+			</c:if>
+			<c:if test="${tex.dictionaryType eq 3}">
+			$("#yy1").val('${tex.dictionaryContent}')
+			</c:if>
+		</c:if>
+		</c:forEach>
+		var questionArray = new Array();
+		var answerArray = new Array();
+		<c:forEach items="${cmBaikeProduct.questionList}" var="item">
+        questionArray.push('${item.question}')
+        answerArray.push('${item.answer}')
+		</c:forEach>
+		for (var i = 0; i < questionArray.length; i++) {
+			var questionInput = "questionList[" + i + "].question";
+			var answerInput = "questionList[" + i + "].answer";
+			$('input[name="' + questionInput + '"]').val(questionArray[i]);
+			$('input[name="' + answerInput + '"]').val(answerArray[i]);
+		}
+
+		var fileIds = $("#fileIds").val();
+		//点击上传按钮后上传文件
+		$('#addSubmit').click(function () {
+			var fileIdArr = fileIds.split(',');
+			if (fileIdArr.length >= 7) {
+				alertx('最多上传6个视频');
+				return;
+			}
+			var filesById = document.getElementById('productFile');
+			var files = $('#productFile');
+			var fileList = files.prop('files');
+			var fileTitle = $('#fileTitle').val();
+			var fileName = $('#uploadFileName').val();
+			if (fileTitle == '') {
+				alertx('请输入视频标题')
+				return;
+			}
+			if (files === '' || files.length == 0 || fileName == '') {
+				alertx('请选择上传文件');
+				return;
+			}
+			$("#fileTitle").val("");
+			$("#uploadFileName").val("");
+			var data = new FormData();
+			var productId = $("#id").val();
+			data.append('file', fileList[0]);
+			data.append('fileTitle', fileTitle);
+			data.append('fileName', fileName);
+			data.append('productId', productId);
+			data.append('fileIds', fileIds);
+			$('.upload-loading').css("display", "inline");
+			$.ajax({
+				url: "${ctx}/baike/cmBaikeProduct/upload",
+				data: data,
+				type: "POST",
+				processData: false,
+				contentType: false,
+				dataType: "json",
+				success: function (res) {
+					if (res.success) {
+						filesById.value = '';
+						renderFileList(res.productFile);
+						$('.upload-loading').hide();
+					} else {
+						$.jBox.tip(res.msg, 'error');
+						$("#uploadFileName").val(fileName);
+						$('.upload-loading').hide();
+					}
+
+				},
+				error: function (json) {
+
+				}
+			});
+		})
+
+		var fileList = [];
+		var files = document.getElementById("productFile"), renderFileList;
+		//选择上传文件后显示文件名称
+		files.addEventListener("change", function (event) {
+			var name = event.target.files[0].name;
+			console.log(name)
+			$('#uploadFileName').val(name);
+		});
+		var fileListDisplay = document.getElementById('file-list-display');
+		renderFileList = function (data) {
+			fileIds += data.id + ',';
+			console.log(fileIds);
+			$('#fileIds').val(fileIds);
+			fileList.push({fileTitle: data.fileTitle, id: data.id, ossUrl: data.ossUrl});
+			fileList.forEach(function (file, index) {
+				var fileDisplayEl = document.createElement("p");
+				var deleteFile = document.createElement("span");
+				var viewFile = document.createElement("span");
+				var viewFileUrl = document.createElement("a");
+				//预览链接
+				viewFileUrl.innerHTML = '预览';
+				viewFileUrl.setAttribute("onclick", "previewVideo('" + file.ossUrl + "')");
+				viewFileUrl.setAttribute("target", "_blank");
+				//预览按钮
+				viewFile.className = 'viewFile';
+				console.log(viewFile);
+				viewFile.setAttribute("class","del");
+				viewFile.appendChild(viewFileUrl);
+				//删除按钮
+				deleteFile.innerHTML = '删除';
+				deleteFile.className = 'deleteFile';
+				console.log(deleteFile);
+				deleteFile.setAttribute("class","del");
+				deleteFile.setAttribute("onclick", "dataDelete(this, " + file.id + ")");
+
+				fileDisplayEl.setAttribute("id", file.id);
+				fileDisplayEl.innerHTML = file.fileTitle;
+				fileDisplayEl.appendChild(viewFile);
+				fileDisplayEl.appendChild(deleteFile);
+				fileListDisplay.appendChild(fileDisplayEl);
+			});
+			fileList.splice(0, fileList.length);
+		};
+	})
+
+	//删除参数
+	function deleteParam(index) {
+		$("#paramRow" + index).remove();
+	}
+
+	//添加参数
+	function addParam() {
+		$(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + paramIndex + "\">\n" +
+				"\t\t\t\t<input id=\"name[" + paramIndex + "]\" name=\"paramList[" + paramIndex + "].name\" htmlEscape=\"false\" class=\"input-small \" placeholder=\"例如:性质类型\" onblur=\"readflag(" + paramIndex + ")\">\n" +
+				"\t\t\t\t<label id=\"param" + paramIndex + "SensitiveWords\" class=\"red\"></label>\n" +
+				"\t\t\t\t<input id=\"content[" + paramIndex + "]\" name=\"paramList[" + paramIndex + "].content\" htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"请输入内容\" readonly>\n" +
+				"\t\t\t\t<label id=\"content" + paramIndex + "SensitiveWords\" class=\"red\"></label>\n" +
+				"\t\t\t\t<a onclick=\"deleteParam(" + paramIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
+				"            </div>")
+		paramIndex = paramIndex + 1;
+	}
+	var content=10;
+	// addDiction =function(dicType,buttType,aa,bb,ff,dicId){// 控制输入框显示名称,控制显示文本域,控制目录显示(一级,二级,内容),参与控制按钮隐藏,控制是否根目录,控制隐藏
+	// 	var dic="";
+	// 	if(dicType ==1){
+	// 		dic="定义";
+	// 	}else if(dicType ==2){
+	// 		dic="原理";
+	// 	}else if(dicType ==3){
+	// 		dic="特点";
+	// 	}else if(dicType ==4){
+	// 		dic="应用";
+	// 	}
+	// 	content=content+5;
+	// 	var yi=content-1;
+	// 	var er=content;
+	// 	var san=content+1;
+	// 	// "+dicType+","+this.name+"
+	// 	var num=bb+1;//111
+	// 	var cc=aa+num;//definitionyi111
+	// 	var dd=cc;
+	// 	if(ff==0){
+	// 		//第一个
+	// 		dd=aa;
+	// 	}else{
+	// 		//新建
+	// 		dd=ff;//definitionyi11
+	// 	}
+	// 	if("内容"==buttType){
+	// 		$("."+dd).append("<div class=\"controls "+cc+"\" style=\"margin-left: 0px;margin-top: 5px \">" +
+	// 				"<textarea type=\"text\" style=\"position: relative;height: 100px; width: 450px;\" placeholder=\"("+dic+") "+buttType+"\"/>" +
+	// 				"<button class=\"btn btn-primary\" id=\"yi"+aa+num+"\" type=\"button\" name=\"一级目录\"  style=\"margin-left: 15px\" onclick=\"addDiction('"+dicType+"','一级目录','"+aa+"','"+yi+"','"+cc+"','yi"+aa+num+"')\">一级目录</button>"+
+	// 				"<button class=\"btn btn-primary\" id=\"er"+aa+num+"\" type=\"button\" name=\"二级目录\"  style=\"margin-left: 10px\" onclick=\"addDiction('"+dicType+"','二级目录','"+aa+"','"+er+"','"+cc+"','er"+aa+num+"')\">二级目录</button>"+
+	// 				"<button class=\"btn btn-primary\" id=\"san"+aa+num+"\" type=\"button\" name=\"内容\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicType+"','内容','"+aa+"','"+san+"','"+cc+"','san"+aa+num+"')\">内容</button>"+
+	// 				"</div>")
+	//
+	// 	}else{
+	// 		$("."+dd).append("<div class=\"controls "+cc+"\" style=\"margin-left: 0px;margin-top: 5px \">" +
+	// 				"<input  htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"("+dic+") "+buttType+"\"/>" +
+	// 				"<button class=\"btn btn-primary\" id=\"yi"+aa+num+"\" type=\"button\" name=\"一级目录\"  style=\"margin-left: 15px\" onclick=\"addDiction('"+dicType+"','一级目录','"+aa+"','"+yi+"','"+cc+"','yi"+aa+num+"')\">一级目录</button>"+
+	// 				"<button class=\"btn btn-primary\" id=\"er"+aa+num+"\"  type=\"button\" name=\"二级目录\"  style=\"margin-left: 10px\" onclick=\"addDiction('"+dicType+"','二级目录','"+aa+"','"+er+"','"+cc+"','er"+aa+num+"')\">二级目录</button>"+
+	// 				"<button class=\"btn btn-primary\" id=\"san"+aa+num+"\"  type=\"button\" name=\"内容\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicType+"','内容','"+aa+"','"+san+"','"+cc+"','san"+aa+num+"')\">内容</button>"+
+	// 				"</div>")
+	// 	}
+	// 	document.getElementById(""+dicId).style.display="none";
+	// }
+	//添加正文
+	var d=1;
+	addDiction =function(dicname,diny,dicTyp){//输入框类型  输入框个数  按钮类型
+		$("."+dicname+diny).append("<div class=\"controls "+dicname+d+"\" style=\"margin-left: 0px;margin-top: 5px \">" +
+						"<input  name=\"textInfo[0].textType\" value =\"1\" type=\"hidden\"/>"+
+						"<input  htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"(请输入"+dicTyp+")\"/>" +
+						"<button class=\"btn btn-primary\" id=\"1\" type=\"button\" name=\"一级目录\"  style=\"margin-left: 15px\" onclick=\"addDiction('"+dicname+"',"+d+",'一级目录'"+")\">一级目录</button>"+
+						"<button class=\"btn btn-primary\" id=\"1\"  type=\"button\" name=\"二级目录\"  style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'二级目录'"+")\">二级目录</button>"+
+						"<button class=\"btn btn-primary\" id=\"1\"  type=\"button\" name=\"内容\" style=\"margin-left: 10px\" onclick=\"addDiction('"+dicname+"',"+d+",'内容'"+")\">内容</button>"+
+						"</div>")
+		d=d+1;
+	}
+
+	//删除问题
+	// function deleteQuestion(index) {
+	// 	$("#questionRow" + index).remove();
+	// 	$("#answerRow" + index).remove();
+	// 	questionIndex--;
+    //     $("#questionDelBtn" + (questionIndex - 1)).attr("style", "cursor: pointer");
+    // }
+
+	//添加问题
+	// function addQuestion() {
+	// 	$(".questionList").append("" +
+    //         "<div class=\"control-group\" id=\"questionRow" + questionIndex + "\">\n" +
+    //         "                <label class=\"control-label\">问题" + (questionIndex+1) + ":</label>\n" +
+    //         "                <div class=\"controls\">\n" +
+    //         "                    <input name=\"questionList[" + questionIndex + "].question\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
+	// 			"\t\t\t\t<label id=\"question" + questionIndex + "SensitiveWords\" class=\"red\"></label>\n" +
+    //         "\t\t\t\t<a id=\"questionDelBtn" + questionIndex + "\" onclick=\"deleteQuestion(" + questionIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
+    //         "                </div>\n" +
+    //         "            </div>\n" +
+    //         "            <div class=\"control-group\" id=\"answerRow" + questionIndex + "\">\n" +
+    //         "                <label class=\"control-label\">答:</label>\n" +
+    //         "                <div class=\"controls\">\n" +
+    //         "                    <input name=\"questionList[" + questionIndex + "].answer\" style=\"width: 550px\" htmlEscape=\"false\" class=\"input-xlarge \">\n" +
+	// 			"\t\t\t\t<label id=\"answer" + questionIndex + "SensitiveWords\" class=\"red\"></label>\n" +
+    //         "                </div>\n" +
+    //         "            </div>")
+    //     $("#questionDelBtn" + (questionIndex - 1)).attr("style", "display:none;cursor: pointer");
+	// 	questionIndex = questionIndex + 1;
+	// }
+
+	<%--$(document).ready(function () {--%>
+	<%--	ClassicEditor.create(document.querySelector('#advantageEditor'), {--%>
+	<%--		ckfinder: {--%>
+	<%--			uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'--%>
+	<%--		}--%>
+	<%--	}).then(function (editor) {--%>
+	<%--		window.advantageEditor = editor;--%>
+	<%--	}).catch(function (error) {--%>
+	<%--		console.log(error);--%>
+	<%--	});--%>
+	<%--	ClassicEditor.create(document.querySelector('#disadvantageEditor'), {--%>
+	<%--		ckfinder: {--%>
+	<%--			uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'--%>
+	<%--		}--%>
+	<%--	}).then(function (editor) {--%>
+	<%--		window.disadvantageEditor = editor;--%>
+	<%--	}).catch(function (error) {--%>
+	<%--		console.log(error);--%>
+	<%--	});--%>
+	<%--	ClassicEditor.create(document.querySelector('#principleEditor'), {--%>
+	<%--		ckfinder: {--%>
+	<%--			uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'--%>
+	<%--		}--%>
+	<%--	}).then(function (editor) {--%>
+	<%--		window.principleEditor = editor;--%>
+	<%--	}).catch(function (error) {--%>
+	<%--		console.log(error);--%>
+	<%--	});--%>
+	<%--	ClassicEditor.create(document.querySelector('#adaptiveManEditor'), {--%>
+	<%--		ckfinder: {--%>
+	<%--			uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'--%>
+	<%--		}--%>
+	<%--	}).then(function (editor) {--%>
+	<%--		window.adaptiveManEditor = editor;--%>
+	<%--	}).catch(function (error) {--%>
+	<%--		console.log(error);--%>
+	<%--	});--%>
+	<%--	ClassicEditor.create(document.querySelector('#unAdaptiveManEditor'), {--%>
+	<%--		ckfinder: {--%>
+	<%--			uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'--%>
+	<%--		}--%>
+	<%--	}).then(function (editor) {--%>
+	<%--		window.unAdaptiveManEditor = editor;--%>
+	<%--	}).catch(function (error) {--%>
+	<%--		console.log(error);--%>
+	<%--	});--%>
+	<%--	ClassicEditor.create(document.querySelector('#aroundOperationEditor'), {--%>
+	<%--		ckfinder: {--%>
+	<%--			uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'--%>
+	<%--		}--%>
+	<%--	}).then(function (editor) {--%>
+	<%--		window.aroundOperationEditor = editor;--%>
+	<%--	}).catch(function (error) {--%>
+	<%--		console.log(error);--%>
+	<%--	});--%>
+	<%--});--%>
+
+	//富文本框编辑
+	// function checkInfo(){
+	// 	var advantage=advantageEditor.getData();
+	// 	var disadvantage=disadvantageEditor.getData();
+	// 	var principle=principleEditor.getData();
+	// 	var adaptiveMan=adaptiveManEditor.getData();
+	// 	var unAdaptiveMan=unAdaptiveManEditor.getData();
+	// 	var aroundOperation=aroundOperationEditor.getData();
+	// 	$("#advantage").val(advantage);
+	// 	$("#disadvantage").val(disadvantage);
+	// 	$("#principle").val(principle);
+	// 	$("#adaptiveMan").val(adaptiveMan);
+	// 	$("#unAdaptiveMan").val(unAdaptiveMan);
+	// 	$("#aroundOperation").val(aroundOperation);
+	// }
+
+	/**
+	 * @param obj
+	 * jquery控制input只能输入数字
+	 */
+	function onlynum(obj) {
+		obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+	}
+
+	//删除文件
+	function dataDelete(that, id) {
+		console.log($(that).text());
+		$(that).parent().remove();
+		var fileIds = $("#fileIds").val();
+		if (fileIds.indexOf(id)) {
+			fileIds = fileIds.replace(id + ',', '');
+			$("#fileIds").val(fileIds);
+		}
+		$.ajax({
+			url: "${ctx}/baike/cmBaikeProduct/deleteFile",
+			data: {"fileId": id},
+			async: false,
+			type: "POST"
+		});
+	}
+
+	function previewVideo(url) {
+		var url = "${ctx}/archive/cmProductArchiveContent/preview?url=" + encodeURIComponent(url);
+		var title = "视频播放";
+		top.$.jBox("iframe:" + url, {
+			iframeScrolling: 'yes',
+			width: 1000,
+			height: 750,
+			persistent: true,
+			title: title,
+			buttons: {"关闭": '-1'}
+		});
+	}
+	//关键词联动
+	function autocomplete(text) {
+		// return ['三全鲜食(北新泾店)', 'Hot honey 首尔炸鸡(仙霞路)', '新旺角茶餐厅', '泷千家(天山西路店)', '胖仙女纸杯蛋糕(上海凌空店)', '贡茶', '豪大大香鸡排超级奶爸', '茶芝兰(奶茶,手抓饼)', '十二泷町', '星移浓缩咖啡', '阿姨奶茶/豪大大', '新麦甜四季甜品炸鸡', 'Monica摩托主题咖啡店', '浮生若茶(凌空soho店)', 'NONO JUICE  鲜榨果汁', 'CoCo都可(北新泾店)', '快乐柠檬(神州智慧店)', 'Merci Paul cafe', '猫山王(西郊百联店)', '枪会山', '纵食', '钱记', '壹杯加', '唦哇嘀咖', '爱茜茜里(西郊百联)', '爱茜茜里(近铁广场)', '鲜果榨汁(金沙江路和美广店)', '开心丽果(缤谷店)', '超级鸡车(丰庄路店)', '妙生活果园(北新泾店)', '香宜度麻辣香锅', '凡仔汉堡(老真北路店)', '港式小铺', '蜀香源麻辣香锅(剑河路店)', '北京饺子馆', '饭典*新简餐(凌空SOHO店)', '焦耳·川式快餐(金钟路店)', '动力鸡车', '浏阳蒸菜', '四海游龙(天山西路店)', '樱花食堂(凌空店)', '壹分米客家传统调制米粉(天山店)', '福荣祥烧腊(平溪路店)', '速记黄焖鸡米饭', '红辣椒麻辣烫', '(小杨生煎)西郊百联餐厅', '阳阳麻辣烫', '南拳妈妈龙虾盖浇饭'].filter(function (item) {
+		//     return text && item.indexOf(text) > -1;
+		// });
+		var keywordlist=new Array();
+		<c:forEach items="${SearchFrequencyVo}" var="search">
+		keywordlist.push("${search.keyword}")
+		</c:forEach>
+		return keywordlist.filter(function (item) {
+			return text && item.indexOf(text) > -1;
+		});
+	}
+
+	new AutoComplete({
+		el: '.auto-input',
+		callback: autocomplete,
+		offsetLeft: -25
+	});
+</script>
+</body>
+</html>

+ 41 - 41
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductList.jsp

@@ -2,7 +2,7 @@
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
 <head>
-	<title>产品管理</title>
+	<title>采美词条</title>
 	<meta name="decorator" content="default"/>
 	<style type="text/css">
 		.table th{text-align: center;}
@@ -28,8 +28,8 @@
 </head>
 <body>
 	<ul class="nav nav-tabs">
-		<li class=${cmBaikeProduct.commodityType eq 1?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=1&publishSource=1">产品</a></li>
-		<li class=${cmBaikeProduct.commodityType eq 2?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=2&publishSource=1">仪器</a></li>
+		<li class=${cmBaikeProduct.commodityType eq 1?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=1&publishSource=1">采美词条</a></li>
+<%--		<li class=${cmBaikeProduct.commodityType eq 2?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=2&publishSource=1">仪器</a></li>--%>
 	</ul>
 	<form:form id="searchForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/" method="post" class="breadcrumb form-search">
 		<form:hidden path="commodityType"/>
@@ -38,16 +38,16 @@
 		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 		<div class="ul-form">
 			 <label>ID:</label>
-				<form:input path="id" htmlEscape="false" class="input-medium"/>
-			 <label>${commodityType}名称:</label>
+				<form:input path="id" maxlength="11" htmlEscape="false" class="input-medium"/>
+			 <label>词条名称:</label>
 				<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
-			 <label>首页置顶:</label>
-			 <form:select path="topFlag" class="input-medium">
-				<form:option value="" label="全部"/>
-				<form:option value="1" label="是"/>
-				<form:option value="0" label="否"/>
-			 </form:select>
-			 <label>${commodityType}分类:</label>
+<%--			 <label>首页置顶:</label>--%>
+<%--			 <form:select path="topFlag" class="input-medium">--%>
+<%--				<form:option value="" label="全部"/>--%>
+<%--				<form:option value="1" label="是"/>--%>
+<%--				<form:option value="0" label="否"/>--%>
+<%--			 </form:select>--%>
+			 <label>分类:</label>
 				<form:select path="typeId" class="input-medium">
 					<form:option value="" label="全部"/>
 					<form:options items="${typeList}" itemLabel="name" itemValue="id" htmlEscape="false"/>
@@ -59,7 +59,7 @@
 					<form:option value="0" label="停用"/>
 				</form:select>
 			&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
-			&nbsp;&nbsp;<a class="btn btn-primary" style="width: 50px" href="${ctx}/baike/cmBaikeProduct/form?commodityType=${cmBaikeProduct.commodityType}">添加</a>
+			&nbsp;&nbsp;<a class="btn btn-primary" style="width: 50px" href="${ctx}/baike/cmBaikeProduct/form?commodityType=${cmBaikeProduct.commodityType}&entryId=1">添加</a>
 			<div class="clearfix"></div>
 		</div>
 	</form:form>
@@ -68,11 +68,11 @@
 		<thead>
 			<tr>
 				<th>ID</th>
-				<th>${commodityType}名称</th>
-				<th>${commodityType}分类</th>
+				<th>词条名称</th>
+				<th>分类</th>
 				<th>基础浏览量</th>
 				<th>实际浏览量</th>
-				<th>首页置顶位</th>
+<%--				<th>首页置顶位</th>--%>
 				<th>发布时间</th>
 				<th>添加时间</th>
 				<th>状态</th>
@@ -97,9 +97,9 @@
 				<td>
 					${cmBaikeProduct.actualPv}
 				</td>
-				<td>
-					${cmBaikeProduct.topPosition eq 1?'第一位':cmBaikeProduct.topPosition eq 2?'第二位':cmBaikeProduct.topPosition eq 3?'第三位':''}
-				</td>
+<%--				<td>--%>
+<%--					${cmBaikeProduct.topPosition eq 1?'第一位':cmBaikeProduct.topPosition eq 2?'第二位':cmBaikeProduct.topPosition eq 3?'第三位':''}--%>
+<%--				</td>--%>
 				<td>
 					<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
 				</td>
@@ -121,29 +121,29 @@
 					</c:if>
 				</td>
 				<td>
-					<a target="_blank" href="${fns:getConfig('wwwServer')}encyclopedia/${cmBaikeProduct.commodityType eq 1?'product':'instrument'}-${cmBaikeProduct.id}.html">查看</a>
-    				<a href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}">编辑</a>
+					<a target="_blank" href="${fns:getConfig('wwwServer')}encyclopedia/detail-${cmBaikeProduct.id}.html">查看</a>
+    				<a href="${ctx}/baike/cmBaikeProduct/form?id=${cmBaikeProduct.id}&entryId=2">编辑</a>
 					<a href="${ctx}/baike/cmBaikeProduct/delete?id=${cmBaikeProduct.id}" onclick="return confirmx('确认要删除该产品吗?', this.href)">删除</a>
-					<a onclick="showTopSelect(${index.index},'open')" href="javascript:void(0)">首页置顶</a>
-					<c:if test="${cmBaikeProduct.topPosition ne null}">
-						<a onclick="updateTopPosition('','${cmBaikeProduct.id}','clearTopPosition')" href="javascript:void(0)">清除置顶</a>
-					</c:if>
-					<div style="display: none" class="topSelect" id="topSelect${index.index}" onmouseleave="showTopSelect(${index.index},'close')">
-						<table style="border: 2px solid #000000;" cellpadding="0" cellspacing="0">
-							<tbody>
-							<tr>
-								<td><a onclick="updateTopPosition('1',${cmBaikeProduct.id},'setTopPosition')" href="javascript:void(0)">置顶第一位</a></td>
-							</tr>
-							<tr>
-								<td><a onclick="updateTopPosition('2',${cmBaikeProduct.id},'setTopPosition')" href="javascript:void(0)">置顶第二位</a></td>
-							</tr>
-							<tr>
-								<td><a onclick="updateTopPosition('3',${cmBaikeProduct.id},'setTopPosition')" href="javascript:void(0)">置顶第三位</a></td>
-							</tr>
-							</tbody>
-						</table>
-					</div>
-					<a href="${ctx}/baike/cmBaikeProduct/recommend/form?id=${cmBaikeProduct.id}">相关推荐</a>
+<%--					<a onclick="showTopSelect(${index.index},'open')" href="javascript:void(0)">首页置顶</a>--%>
+<%--					<c:if test="${cmBaikeProduct.topPosition ne null}">--%>
+<%--						<a onclick="updateTopPosition('','${cmBaikeProduct.id}','clearTopPosition')" href="javascript:void(0)">清除置顶</a>--%>
+<%--					</c:if>--%>
+<%--					<div style="display: none" class="topSelect" id="topSelect${index.index}" onmouseleave="showTopSelect(${index.index},'close')">--%>
+<%--						<table style="border: 2px solid #000000;" cellpadding="0" cellspacing="0">--%>
+<%--							<tbody>--%>
+<%--							<tr>--%>
+<%--								<td><a onclick="updateTopPosition('1',${cmBaikeProduct.id},'setTopPosition')" href="javascript:void(0)">置顶第一位</a></td>--%>
+<%--							</tr>--%>
+<%--							<tr>--%>
+<%--								<td><a onclick="updateTopPosition('2',${cmBaikeProduct.id},'setTopPosition')" href="javascript:void(0)">置顶第二位</a></td>--%>
+<%--							</tr>--%>
+<%--							<tr>--%>
+<%--								<td><a onclick="updateTopPosition('3',${cmBaikeProduct.id},'setTopPosition')" href="javascript:void(0)">置顶第三位</a></td>--%>
+<%--							</tr>--%>
+<%--							</tbody>--%>
+<%--						</table>--%>
+<%--					</div>--%>
+<%--					<a href="${ctx}/baike/cmBaikeProduct/recommend/form?id=${cmBaikeProduct.id}">相关推荐</a>--%>
 				</td>
 			</tr>
 		</c:forEach>

+ 166 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeTypeForm.jsp

@@ -23,7 +23,141 @@
 				}
 			});
 		});
+		$(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');
+						}
+					}
+				})
+			});
+			for (var i = 0; i < 2; i++) {
+				var observeEle = document.getElementsByClassName('upload-content')[i];
+				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 () {
+					for (var i = 1;i<=4;i++) {
+						$("#bannerBox" + i).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>
+	<style>
+		.jumpType{
+			margin-left: 20px;
+			width: 400px;
+		}
+	</style>
+	<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: -27px;
+		}
+
+		.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>
 </head>
 <body>
 	<ul class="nav nav-tabs">
@@ -40,6 +174,38 @@
 				<form:input path="name" htmlEscape="false" maxlength="30" class="input-xlarge required"/>
 			</div>
 		</div>
+		<div class="control-group iconBox">
+			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>PC端banner:</label>
+			<div class="controls upload-content" id="bannerBox1">
+				<div class="conList">
+					<form:hidden id="pcBanner" path="pcBanner" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
+					<sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
+								  maxHeight="500"/>
+					<br>
+					<label style="margin-left: 150px">建议图片分辨率1920px*510px</label>
+				</div>
+			</div>
+		</div>
+		<div class="control-group iconBox">
+			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>移动端banner:</label>
+			<div class="controls upload-content" id="bannerBox2">
+				<div class="conList">
+					<form:hidden id="appBanner" path="appBanner" htmlEscape="false" maxlength="255"
+								 class="input-xlarge required"/>
+					<sys:ckfinder input="appBanner" type="images" uploadPath="/photo" selectMultiple="false"
+								  maxWidth="100" maxHeight="200"/>
+					<br>
+					<label style="margin-left: 150px">建议图片分辨率750px*366px</label>
+				</div>
+			</div>
+		</div>
+		<div class="control-group">
+			<label class="control-label">banner跳转链接:</label>
+			<div class="controls">
+				<form:input path="bannerLink" htmlEscape="false" placeholder="输入URL地址"
+							class="input-xlarge"/>
+			</div>
+		</div>
 		<div class="control-group">
 			<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>排序:</label>
 			<div class="controls">

+ 3 - 3
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeTypeList.jsp

@@ -22,8 +22,8 @@
 </head>
 <body>
 	<ul class="nav nav-tabs">
-		<li class=${cmBaikeType.typeSort eq 1?"active":""}><a href="${ctx}/baike/cmBaikeType/?typeSort=1">产品分类</a></li>
-		<li class=${cmBaikeType.typeSort eq 2?"active":""}><a href="${ctx}/baike/cmBaikeType/?typeSort=2">仪器分类</a></li>
+		<li class=${cmBaikeType.typeSort eq 1?"active":""}><a href="${ctx}/baike/cmBaikeType/?typeSort=1">分类管理</a></li>
+<%--		<li class=${cmBaikeType.typeSort eq 2?"active":""}><a href="${ctx}/baike/cmBaikeType/?typeSort=2">仪器分类</a></li>--%>
 	</ul>
 	<form:form id="searchForm" modelAttribute="cmBaikeType" action="${ctx}/baike/cmBaikeType/" method="post" class="breadcrumb form-search">
 		<form:hidden path="typeSort" />
@@ -94,7 +94,7 @@
 					${cmBaikeType.addUserName}
 				</td>
 				<td>
-    				<a href="${ctx}/baike/cmBaikeType/form?id=${cmBaikeType.id}">编辑</a>
+    				<a href="${ctx}/baike/cmBaikeType/form?id=${cmBaikeType.id}&&pcBanner=${cmBaikeType.pcBanner}&&appBanner=${cmBaikeType.appBanner}&&bannerLink=${cmBaikeType.bannerLink}">编辑</a>
 					<a href="${ctx}/baike/cmBaikeType/delete?id=${cmBaikeType.id}" onclick="return confirmx('确认要删除该分类吗?', this.href)">删除</a>
 				</td>
 			</tr>

+ 16 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/entryGuidance.jsp

@@ -0,0 +1,16 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: Administrator
+  Date: 2022/12/15
+  Time: 10:37
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+<head>
+    <title>创建词条引导</title>
+</head>
+<body>
+        编辑须知
+</body>
+</html>

+ 8 - 8
src/main/webapp/WEB-INF/views/modules/baikePage/shopBaikeProductList.jsp

@@ -2,7 +2,7 @@
 <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
 <html>
 <head>
-	<title>产品管理</title>
+	<title>供应商词条</title>
 	<meta name="decorator" content="default"/>
 	<style type="text/css">
 		.table th{text-align: center;}
@@ -28,8 +28,8 @@
 </head>
 <body>
 	<ul class="nav nav-tabs">
-		<li class=${cmBaikeProduct.commodityType eq 1?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=1&publishSource=2">产品</a></li>
-		<li class=${cmBaikeProduct.commodityType eq 2?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=2&publishSource=2">仪器</a></li>
+		<li class=${cmBaikeProduct.commodityType eq 1?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=1&publishSource=2">供应商词条</a></li>
+<%--		<li class=${cmBaikeProduct.commodityType eq 2?"active":""}><a href="${ctx}/baike/cmBaikeProduct/?commodityType=2&publishSource=2">仪器</a></li>--%>
 	</ul>
 	<form:form id="searchForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/" method="post" class="breadcrumb form-search">
 		<form:hidden path="commodityType"/>
@@ -39,7 +39,7 @@
 		<div class="ul-form">
 			 <label>ID:</label>
 				<form:input path="id" htmlEscape="false" class="input-medium"/>
-			 <label>${commodityType}名称:</label>
+			 <label>词条名称:</label>
 				<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
 			 <label>${commodityType}分类:</label>
 				<form:select path="typeId" class="input-medium">
@@ -71,8 +71,8 @@
 		<thead>
 			<tr>
 				<th>ID</th>
-				<th>${commodityType}名称</th>
-				<th>${commodityType}分类</th>
+				<th>词条名称</th>
+				<th>分类</th>
 				<th>浏览量</th>
 				<th>审核状态</th>
 				<th>上线状态</th>
@@ -118,10 +118,10 @@
 					<fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
 				</td>
 				<td>
-					<a href="${ctx}/baike/cmBaikeProduct/toAuditPage?id=${cmBaikeProduct.id}&commodityType=${cmBaikeProduct.commodityType}"
+					<a href="${ctx}/baike/cmBaikeProduct/toAuditPage?id=${cmBaikeProduct.id}&commodityType=1&entryId=2"
 					   style="display: ${cmBaikeProduct.auditStatus eq 1 or cmBaikeProduct.auditStatus eq 3?'':'none'}">审核</a>
 					<a href="${ctx}/baike/cmBaikeProduct/check?id=${cmBaikeProduct.id}
-					&commodityType=${cmBaikeProduct.commodityType}&publishSource=2">查看</a>
+					&commodityType=1&publishSource=2&entryId=2">查看</a>
 					<c:if test="${cmBaikeProduct.onlineStatus eq 2}">
 						<a href="javascript:;" onclick="offline(${cmBaikeProduct.id})">下线</a>
 					</c:if>

+ 8 - 8
src/main/webapp/WEB-INF/views/modules/super/cmSvipPackageForm.jsp

@@ -19,11 +19,11 @@
                         alert("套餐2售价应为正整数且不能为0,如100");
                         return false;
                     }
-                    var places3 = $(".input-xlarge3").val();
+                    /*var places3 = $(".input-xlarge3").val();
                     if (!(/(^[1-9]\d*$)/.test(places3))) {
                         alert("套餐3售价应为正整数且不能为0,如100");
                         return false;
-                    }
+                    }*/
                     var places4 = $(".input-xlarge4").val();
                     if (!(/(^[1-9]\d*$)/.test(places4))) {
                         alert("美豆比例应为正整数且不能为0,如100");
@@ -55,11 +55,11 @@
                 alert("套餐2售价应为正整数且不能为0,如100");
                 return false;
             }
-            var places3 = $(".input-xlarge3").val();
+            /*var places3 = $(".input-xlarge3").val();
             if (!(/(^[1-9]\d*$)/.test(places3))) {
                 alert("套餐3售价应为正整数且不能为0,如100");
                 return false;
-            }
+            }*/
             var places4 = $(".input-xlarge4").val();
             if (!(/(^[1-9]\d*$)/.test(places4))) {
                 alert("美豆比例应为正整数且不能为0,如100");
@@ -70,7 +70,7 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li><a href="${ctx}/super/cmSvipPackage/">超级会员套餐配置</a></li>
+    <li class="active"><a href="${ctx}/super/cmSvipPackage/">超级会员套餐配置</a></li>
 </ul>
 <br/>
 <form:form id="inputForm" modelAttribute="cmSvipPackage" action="${ctx}/super/cmSvipPackage/update" method="post"
@@ -97,12 +97,12 @@
         </div>
     </div>
 
-    <div class="control-group">
+    <%--<div class="control-group">
         <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐3:</label>
         <div class="controls">
             1个月超级会员,售价:<form:input path="price3" htmlEscape="false" class="input-xlarge3" style="width: 60px" onblur="checkNum()"/>
         </div>
-    </div>
+    </div>--%>
     <div class="control-group">
         <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>采美豆兑换套餐:</label>
         <div class="controls">
@@ -114,4 +114,4 @@
     </div>
 </form:form>
 </body>
-</html>
+</html>

+ 980 - 0
src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponConfiguration.jsp

@@ -0,0 +1,980 @@
+<%@ page import="java.util.Date" %>
+<%@ 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>
+        .coupon-wrap {
+            border: 1px solid #aaa;
+            padding: 20px 20px 0;
+            margin-bottom: 20px;
+        }
+        .couponType {
+            margin-right: 15px;
+        }
+    </style>
+    <script type="text/javascript">
+        $(document).ready(function () {
+            var dateList = [];
+            if (${not empty useDateList}) {
+                <c:forEach items="${useDateList}" var="date" varStatus="index">
+                dateList.push("${date}");
+                </c:forEach>
+            }
+            $("#inputForm").validate({
+                submitHandler: function (form) {
+                    if (imageList1.length > 0) {
+                        var productInfo1 = JSON.stringify(imageList1);
+                        $('#productInfo1').val(productInfo1);
+                    }
+                    if (imageList2.length > 0) {
+                        var productInfo2 = JSON.stringify(imageList2);
+                        $('#productInfo2').val(productInfo2);
+                    }
+                    if (imageList3.length > 0) {
+                        var productInfo3 = JSON.stringify(imageList3);
+                        $('#productInfo3').val(productInfo3);
+                    }
+                    if (imageList4.length > 0) {
+                        var productInfo4 = JSON.stringify(imageList4);
+                        $('#productInfo4').val(productInfo4);
+                    }
+                    var couponType1 = $("#couponType1").val();
+                    var shopId1 = $("#shopId1").val();
+                    if (couponType1 == 3) {
+                        if (shopId1 == "" || shopId1 == null) {
+                            alert("店铺券供应商不能为空 !");
+                            return false;
+                        }
+                    }
+                    /*var month = $("#month").val();
+                    // 判断月份 ...
+                    if (month == null || month == "") {
+                        alert("请选择生效时间! ");
+                        return false;
+                    }
+                    var vipId = $("#id").val();
+                    if (!vipId && dateList.indexOf(month)>=0){
+                        alert("已存在该月优惠券,请修改月份!");
+                        return false;
+                    }*/
+                    var couponAmount1 = $("#couponAmount1").val() * 1;
+                    var touchPrice1 = $("#touchPrice1").val() * 1;
+                    if (couponAmount1 == "") {
+                        alertx("【优惠券1】优惠券金额不能为空");
+                        return false;
+                    }
+                    if (touchPrice1 == "") {
+                        alertx("【优惠券1】优惠条件不能为空");
+                        return false;
+                    }
+                    if (couponAmount1 >= touchPrice1) {
+                        alertx("【优惠券1】优惠券金额必须小于优惠条件金额");
+                        return false;
+                    }
+                    var couponAmount2 = $("#couponAmount2").val() * 1;
+                    var touchPrice2 = $("#touchPrice2").val() * 1;
+                    if (couponAmount2 == "") {
+                        alertx("【优惠券2】优惠券金额不能为空");
+                        return false;
+                    }
+                    if (touchPrice2 == "") {
+                        alertx("【优惠券2】优惠条件不能为空");
+                        return false;
+                    }
+                    if (couponAmount2 >= touchPrice2) {
+                        alertx("【优惠券2】优惠券金额必须小于优惠条件金额");
+                        return false;
+                    }
+                    var couponAmount3 = $("#couponAmount3").val() * 1;
+                    var touchPrice3 = $("#touchPrice3").val() * 1;
+                    if (couponAmount3 == "") {
+                        alertx("【优惠券3】优惠券金额不能为空");
+                        return false;
+                    }
+                    if (touchPrice3 == "") {
+                        alertx("【优惠券3】优惠条件不能为空");
+                        return false;
+                    }
+                    if (couponAmount3 >= touchPrice3) {
+                        alertx("【优惠券3】优惠券金额必须小于优惠条件金额");
+                        return false;
+                    }
+                    var couponAmount4 = $("#couponAmount4").val() * 1;
+                    var touchPrice4 = $("#touchPrice4").val() * 1;
+                    if (couponAmount4 == "") {
+                        alertx("【优惠券4】优惠券金额不能为空");
+                        return false;
+                    }
+                    if (touchPrice4 == "") {
+                        alertx("【优惠券4】优惠条件不能为空");
+                        return false;
+                    }
+                    if (couponAmount4 >= touchPrice4) {
+                        alertx("【优惠券4】优惠券金额必须小于优惠条件金额");
+                        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><a href="${ctx}/vip/cmCoupon/">超级会员专属优惠券</a></li>
+    <li class="active"><a href="${ctx}/vip/cmCoupon/configuration">专属优惠券配置</a></li>
+</ul>
+<form:form id="inputForm" modelAttribute="svipcouponForm" action="${ctx}/vip/cmCoupon/saveConfigure" method="post" class="form-horizontal">
+    <div style="height: 50px; background: #f5f5f5;">
+        <span style="color: red; line-height: 50px; font-size: 15px;">在本页面,对每三个月给超级会员自动发放的优惠券进行配置,配置完成后下一阶段才生效</span>
+    </div>
+    <sys:message content="${message}"/>
+    <form:hidden path="id" value="${cmVipCoupon.id}"/>
+    <div class="coupon-wrap" id="couponWrap1">
+        <div class="control-group">
+            <label class="control-label"><font color="red">*</font><b>优惠券1:</b></label>
+            <div class="controls">
+                <form:radiobutton path="couponType1" class="couponType" label="请选择" value="" checked="true"></form:radiobutton>
+                <form:radiobutton path="couponType1" class="couponType" label="活动券" value="0"></form:radiobutton>
+                <form:radiobutton path="couponType1" class="couponType" label="品类券" value="1" onclick="cType(1)"></form:radiobutton>
+                <form:radiobutton path="couponType1" class="couponType" label="店铺券" value="3" onclick="cType(1)"></form:radiobutton>
+            </div>
+        </div>
+        <form:hidden path="couponId1" id="couponId1"/>
+        <div class="control-group coupon-line l0" ${svipcouponForm.couponType1 ne '3' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>供应商:</label>
+            <div class="controls">
+                <a href="javascript:void(0);" onclick="showSelectShop(1)" id="chooseShop1">请选择供应商</a>
+                <form:hidden path="shopId1" id="shopId1"/>
+                <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead></thead>
+                    <tbody class="hotSearchShop"></tbody>
+                </table>
+            </div>
+        </div>
+        <div class="control-group coupon-line l1" ${empty svipcouponForm.couponId1 ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠券金额:</label>
+            <div class="controls">
+                <form:input path="couponAmount1" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l2" ${empty svipcouponForm.couponId1 ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠条件:</label>
+            <div class="controls"> 订单商品总额满
+                <form:input path="touchPrice1" htmlEscape="false" maxlength="20" class="input-medium required"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l3" ${svipcouponForm.couponType1 ne '1' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠品类:</label>
+            <div class="controls">
+                <form:radiobutton path="categoryType1" value="1" label="产品"/>
+                <form:radiobutton path="categoryType1" value="2" label="仪器"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l4" ${svipcouponForm.couponType1 ne '0' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠商品:</label>
+            <div class="controls">
+                <form:radiobutton path="productType1" value="1" label="全商城商品" onclick="productShow(value,1)"/>
+                <form:radiobutton path="productType1" value="2" label="指定商品" onclick="productShow(value,1)"/>
+            </div>
+        </div>
+        <div class="productData1" hidden="hidden">
+            <form:hidden path="productInfo1" id="productInfo1"/>
+            <div class="control-group">
+                <input class="btn del" style="width: 50px" onclick="batchDeletion(1)" value="删除"/>
+                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(1)" value="添加"/>
+                <br><br>
+                <table class="contentTableProduct table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead></thead>
+                    <tbody class="hotSearchProduct"></tbody>
+                </table>
+            </div>
+        </div>
+    </div>
+
+    <div class="coupon-wrap" id="couponWrap2">
+        <div class="control-group">
+            <label class="control-label"><font color="red">*</font><b>优惠券2:</b></label>
+            <div class="controls">
+                <form:radiobutton path="couponType2" class="couponType" label="请选择" value="" checked="true"></form:radiobutton>
+                <form:radiobutton path="couponType2" class="couponType" label="活动券" value="0"></form:radiobutton>
+                <form:radiobutton path="couponType2" class="couponType" label="品类券" value="1" onclick="cType(2)"></form:radiobutton>
+                <form:radiobutton path="couponType2" class="couponType" label="店铺券" value="3" onclick="cType(2)"></form:radiobutton>
+            </div>
+        </div>
+        <form:hidden path="couponId2" id="couponId2"/>
+        <div class="control-group coupon-line l0" ${svipcouponForm.couponType2 ne '3' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>供应商:</label>
+            <div class="controls">
+                <a href="javascript:void(0);" onclick="showSelectShop(2)" id="chooseShop2">请选择供应商</a>
+                <form:hidden path="shopId2" id="shopId2"/>
+                <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead></thead>
+                    <tbody class="hotSearchShop"></tbody>
+                </table>
+            </div>
+        </div>
+        <div class="control-group coupon-line l1"  ${empty svipcouponForm.couponId2 ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠券金额:</label>
+            <div class="controls">
+                <form:input path="couponAmount2" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l2" ${empty svipcouponForm.couponId2 ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠条件:</label>
+            <div class="controls"> 订单商品总额满
+                <form:input path="touchPrice2" htmlEscape="false" maxlength="20" class="input-medium required"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l3" ${svipcouponForm.couponType2 ne '1' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠品类:</label>
+            <div class="controls">
+                <form:radiobutton path="categoryType2" value="1" label="产品"/>
+                <form:radiobutton path="categoryType2" value="2" label="仪器"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l4" ${svipcouponForm.couponType2 ne '0' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠商品:</label>
+            <div class="controls">
+                <form:radiobutton path="productType2" value="1" label="全商城商品" onclick="productShow(value,2)"/>
+                <form:radiobutton path="productType2" value="2" label="指定商品" onclick="productShow(value,2)"/>
+            </div>
+        </div>
+        <div class="productData2" hidden="hidden">
+            <form:hidden path="productInfo2" id="productInfo2"/>
+            <div class="control-group">
+                <input class="btn del" style="width: 50px" onclick="batchDeletion(2)" value="删除"/>
+                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(2)" value="添加"/>
+                <br><br>
+                <table class="contentTableProduct table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead></thead>
+                    <tbody class="hotSearchProduct"></tbody>
+                </table>
+            </div>
+        </div>
+    </div>
+
+    <div class="coupon-wrap" id="couponWrap3">
+        <div class="control-group">
+            <label class="control-label"><font color="red">*</font><b>优惠券3:</b></label>
+            <div class="controls">
+                <form:radiobutton path="couponType3" class="couponType" label="请选择" value="" checked="true"></form:radiobutton>
+                <form:radiobutton path="couponType3" class="couponType" label="活动券" value="0"></form:radiobutton>
+                <form:radiobutton path="couponType3" class="couponType" label="品类券" value="1" onclick="cType(3)"></form:radiobutton>
+                <form:radiobutton path="couponType3" class="couponType" label="店铺券" value="3" onclick="cType(3)"></form:radiobutton>
+            </div>
+        </div>
+        <form:hidden path="couponId3" id="couponId3"/>
+        <div class="control-group coupon-line l0" ${svipcouponForm.couponType3 ne '3' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>供应商:</label>
+            <div class="controls">
+                <a href="javascript:void(0);" onclick="showSelectShop(3)" id="chooseShop3">请选择供应商</a>
+                <form:hidden path="shopId3" id="shopId3"/>
+                <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead></thead>
+                    <tbody class="hotSearchShop"></tbody>
+                </table>
+            </div>
+        </div>
+        <div class="control-group coupon-line l1"  ${empty svipcouponForm.couponId3 ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠券金额:</label>
+            <div class="controls">
+                <form:input path="couponAmount3" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l2" ${empty svipcouponForm.couponId3 ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠条件:</label>
+            <div class="controls"> 订单商品总额满
+                <form:input path="touchPrice3" htmlEscape="false" maxlength="20" class="input-medium required"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l3" ${svipcouponForm.couponType3 ne '1' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠品类:</label>
+            <div class="controls">
+                <form:radiobutton path="categoryType3" value="1" label="产品"/>
+                <form:radiobutton path="categoryType3" value="2" label="仪器"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l4" ${svipcouponForm.couponType3 ne '0' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠商品:</label>
+            <div class="controls">
+                <form:radiobutton path="productType3" value="1" label="全商城商品" onclick="productShow(value,3)"/>
+                <form:radiobutton path="productType3" value="2" label="指定商品" onclick="productShow(value,3)"/>
+            </div>
+        </div>
+        <div class="productData3" hidden="hidden">
+            <form:hidden path="productInfo3" id="productInfo3"/>
+            <div class="control-group">
+                <input class="btn del" style="width: 50px" onclick="batchDeletion(3)" value="删除"/>
+                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(3)" value="添加"/>
+                <br><br>
+                <table class="contentTableProduct table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead></thead>
+                    <tbody class="hotSearchProduct"></tbody>
+                </table>
+            </div>
+        </div>
+    </div>
+
+    <div class="coupon-wrap" id="couponWrap4">
+        <div class="control-group">
+            <label class="control-label"><font color="red">*</font><b>优惠券4:</b></label>
+            <div class="controls">
+                <form:radiobutton path="couponType4" class="couponType" label="请选择" value="" checked="true"></form:radiobutton>
+                <form:radiobutton path="couponType4" class="couponType" label="活动券" value="0"></form:radiobutton>
+                <form:radiobutton path="couponType4" class="couponType" label="品类券" value="1" onclick="cType(1)"></form:radiobutton>
+                <form:radiobutton path="couponType4" class="couponType" label="店铺券" value="3" onclick="cType(1)"></form:radiobutton>
+            </div>
+        </div>
+        <form:hidden path="couponId4" id="couponId4"/>
+        <div class="control-group coupon-line l0" ${svipcouponForm.couponType4 ne '3' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>供应商:</label>
+            <div class="controls">
+                <a href="javascript:void(0);" onclick="showSelectShop(4)" id="chooseShop4">请选择供应商</a>
+                <form:hidden path="shopId4" id="shopId4"/>
+                <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead></thead>
+                    <tbody class="hotSearchShop"></tbody>
+                </table>
+            </div>
+        </div>
+        <div class="control-group coupon-line l1" ${empty svipcouponForm.couponId4 ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠券金额:</label>
+            <div class="controls">
+                <form:input path="couponAmount4" htmlEscape="false" maxlength="20" class="input-xlarge required"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l2" ${empty svipcouponForm.couponId4 ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠条件:</label>
+            <div class="controls"> 订单商品总额满
+                <form:input path="touchPrice4" htmlEscape="false" maxlength="20" class="input-medium required"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l3" ${svipcouponForm.couponType4 ne '1' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠品类:</label>
+            <div class="controls">
+                <form:radiobutton path="categoryType4" value="1" label="产品"/>
+                <form:radiobutton path="categoryType4" value="2" label="仪器"/>
+            </div>
+        </div>
+        <div class="control-group coupon-line l4" ${svipcouponForm.couponType4 ne '0' ? 'style="display:none"':''}>
+            <label class="control-label"><font color="red">*</font>优惠商品:</label>
+            <div class="controls">
+                <form:radiobutton path="productType4" value="1" label="全商城商品" onclick="productShow(value,4)"/>
+                <form:radiobutton path="productType4" value="2" label="指定商品" onclick="productShow(value,4)"/>
+            </div>
+        </div>
+        <div class="productData4" hidden="hidden">
+            <form:hidden path="productInfo4" id="productInfo4"/>
+            <div class="control-group">
+                <input class="btn del" style="width: 50px" onclick="batchDeletion(4)" value="删除"/>
+                <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct(4)" value="添加"/>
+                <br><br>
+                <table class="contentTableProduct table table-striped table-bordered table-condensed" hidden="hidden">
+                    <thead></thead>
+                    <tbody class="hotSearchProduct"></tbody>
+                </table>
+            </div>
+        </div>
+    </div>
+    <div class="form-actions">
+        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
+        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
+    </div>
+</form:form>
+<script type="text/javascript">
+    $(".contentTableShop thead").html('<tr><th>供应商名称</th><th>供应商简称</th><th>联系人</th><th>手机号</th><th>操作</th></tr>');
+    $(".contentTableProduct thead").html('<tr><th style="width:20px;"><input class="check-all" type="checkbox" onclick="clickAllSelect(this)"/>全选</th>' +
+        '<th>商品图片</th><th>商品名称</th><th>供应商</th><th>网站状态</th><th>小程序状态</th><th>排序</th><th>添加时间</th><th>操作</th></tr>');
+
+    var productIds1 = '';
+    var productIds2 = '';
+    var productIds3 = '';
+    var productIds4 = '';
+    var imageList1 = [];
+    var imageList2 = [];
+    var imageList3 = [];
+    var imageList4 = [];
+
+    //店铺券供应商回显
+    if (${not empty svipcouponForm.shop1}) {
+        var shop = {
+            "shopId": "${svipcouponForm.shop1.shopID}",
+            "name": "${svipcouponForm.shop1.name}",
+            "sname": "${svipcouponForm.shop1.sname}",
+            "linkMan": "${svipcouponForm.shop1.linkMan}",
+            "contractMobile": "${svipcouponForm.shop1.contractMobile}"
+        }
+        appendShopOrderHead(shop, 1);
+    }
+    if (${not empty svipcouponForm.shop2}) {
+        var shop = {
+            "shopId": "${svipcouponForm.shop2.shopID}",
+            "name": "${svipcouponForm.shop2.name}",
+            "sname": "${svipcouponForm.shop2.sname}",
+            "linkMan": "${svipcouponForm.shop2.linkMan}",
+            "contractMobile": "${svipcouponForm.shop2.contractMobile}"
+        }
+        appendShopOrderHead(shop, 2);
+    }
+    if (${not empty svipcouponForm.shop3}) {
+        var shop = {
+            "shopId": "${svipcouponForm.shop3.shopID}",
+            "name": "${svipcouponForm.shop3.name}",
+            "sname": "${svipcouponForm.shop3.sname}",
+            "linkMan": "${svipcouponForm.shop3.linkMan}",
+            "contractMobile": "${svipcouponForm.shop3.contractMobile}"
+        }
+        appendShopOrderHead(shop, 3);
+    }
+    if (${not empty svipcouponForm.shop4}) {
+        var shop = {
+            "shopId": "${svipcouponForm.shop4.shopID}",
+            "name": "${svipcouponForm.shop4.name}",
+            "sname": "${svipcouponForm.shop4.sname}",
+            "linkMan": "${svipcouponForm.shop4.linkMan}",
+            "contractMobile": "${svipcouponForm.shop4.contractMobile}"
+        }
+        appendShopOrderHead(shop, 4);
+    }
+    //产品回显
+    if (${not empty svipcouponForm.associateList1}) {
+        <c:forEach items="${svipcouponForm.associateList1}" var="associate" varStatus="index">
+        imageList1.push({
+            id: "${associate.id}",
+            productId: "${empty associate.productId ? "":associate.productId}",
+            image: "${associate.image}",
+            productName: "${associate.productName}",
+            shopName: "${associate.shopName}",
+            sort: "${associate.sort}",
+            pcStatus: "${associate.pcStatus}",
+            appletsStatus: "${associate.appletsStatus}",
+            addTime: "<fmt:formatDate value="${associate.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+        });
+        </c:forEach>
+        if (imageList1.length > 0) {
+            $('#couponWrap1').find('.contentTableProduct').show();
+            batchSaveSort(1);
+            productShow(2,1);
+        }
+    }
+    if (${not empty svipcouponForm.associateList2}) {
+        <c:forEach items="${svipcouponForm.associateList2}" var="associate" varStatus="index">
+        imageList2.push({
+            id: "${associate.id}",
+            productId: "${empty associate.productId ? "":associate.productId}",
+            image: "${associate.image}",
+            productName: "${associate.productName}",
+            shopName: "${associate.shopName}",
+            sort: "${associate.sort}",
+            pcStatus: "${associate.pcStatus}",
+            appletsStatus: "${associate.appletsStatus}",
+            addTime: "<fmt:formatDate value="${associate.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+        });
+        </c:forEach>
+        if (imageList2.length > 0) {
+            $('#couponWrap2').find('.contentTableProduct').show();
+            batchSaveSort(2);
+            productShow(2,2);
+        }
+    }
+    if (${not empty svipcouponForm.associateList3}) {
+        <c:forEach items="${svipcouponForm.associateList3}" var="associate" varStatus="index">
+        imageList3.push({
+            id: "${associate.id}",
+            productId: "${empty associate.productId ? "":associate.productId}",
+            image: "${associate.image}",
+            productName: "${associate.productName}",
+            shopName: "${associate.shopName}",
+            sort: "${associate.sort}",
+            pcStatus: "${associate.pcStatus}",
+            appletsStatus: "${associate.appletsStatus}",
+            addTime: "<fmt:formatDate value="${associate.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+        });
+        </c:forEach>
+        if (imageList3.length > 0) {
+            $('#couponWrap3').find('.contentTableProduct').show();
+            batchSaveSort(3);
+            productShow(2,3);
+        }
+    }
+    if (${not empty svipcouponForm.associateList4}) {
+        <c:forEach items="${svipcouponForm.associateList4}" var="associate" varStatus="index">
+        imageList4.push({
+            id: "${associate.id}",
+            productId: "${empty associate.productId ? "":associate.productId}",
+            image: "${associate.image}",
+            productName: "${associate.productName}",
+            shopName: "${associate.shopName}",
+            sort: "${associate.sort}",
+            pcStatus: "${associate.pcStatus}",
+            appletsStatus: "${associate.appletsStatus}",
+            addTime: "<fmt:formatDate value="${associate.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
+        });
+        </c:forEach>
+        if (imageList4.length > 0) {
+            $('#couponWrap4').find('.contentTableProduct').show();
+            batchSaveSort(4);
+            productShow(2,4);
+        }
+    }
+
+    $("body").on("change", ".couponType", function () {
+        var value = $(this).parent().find('input.couponType:checked').val() * 1;
+        $(this).parents(".coupon-wrap").find(".coupon-line").hide();
+        if (0 === value) {
+            $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
+            $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
+            $(this).parents(".coupon-wrap").find(".coupon-line.l4").show();
+        } else if (1 === value) {
+            $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
+            $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
+            $(this).parents(".coupon-wrap").find(".coupon-line.l3").show();
+        } else if (3 === value) {
+            $(this).parents(".coupon-wrap").find(".coupon-line.l0").show();
+            $(this).parents(".coupon-wrap").find(".coupon-line.l1").show();
+            $(this).parents(".coupon-wrap").find(".coupon-line.l2").show();
+        }
+    });
+
+    function cType(id) {
+        $("#couponWrap" + id).find(".productData" + id).hide();
+    }
+
+    // 点击添加供应商
+    function showSelectShop(id) {
+        var url = "${ctx}/coupon/cmCoupon/toAddShop";
+        var title = '';
+        title = "选择供应商";
+        top.$.jBox("iframe:" + url, {
+            iframeScrolling: 'yes',
+            width: $(top.document).width() - 400,
+            height: $(top.document).height() - 160,
+            persistent: true,
+            title: title,
+            buttons: {"确定": '1', "取消": '-1'},
+            submit: function (v, h, f) {
+                //确定
+                var $jboxFrame = top.$('#jbox-iframe');
+                var $mainFrame = top.$('#mainFrame');
+                if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+                    var items = $jboxFrame[0].contentWindow.getCheckedItems();
+                    console.log(items);
+                    appendShopOrderHead(items, id);
+                }
+                return true;
+            }
+        });
+    }
+
+    function productShow(value, id) {
+        if (value == 2) {
+            $(".productData" + id).show();
+        } else {
+            $(".productData" + id).hide();
+        }
+    }
+
+    //点击添加
+    function showSelectProduct(id) {
+        var url = "${ctx}/coupon/cmCoupon/toAddProduct?productIds=";
+        if (id * 1 === 1) {
+            url += productIds1;
+        }
+        if (id * 1 === 2) {
+            url += productIds2;
+        }
+        if (id * 1 === 3) {
+            url += productIds3;
+        }
+        if (id * 1 === 4) {
+            url += productIds4;
+        }
+        var title = '';
+        title = "选择商品";
+        top.$.jBox("iframe:" + url, {
+            iframeScrolling: 'yes',
+            width: $(top.document).width() - 400,
+            height: $(top.document).height() - 160,
+            persistent: true,
+            title: title,
+            buttons: {"确定": '1', "取消": '-1'},
+            submit: function (v, h, f) {
+                //确定
+                var $jboxFrame = top.$('#jbox-iframe');
+                var $mainFrame = top.$('#mainFrame');
+                if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
+                    var items = $jboxFrame[0].contentWindow.getCheckedItems();
+                    console.log(items);
+                    console.log(items[0]);
+                    for (var i = 0; i < items.length; i++) {
+                        console.log(items[i]);
+                        if (id * 1 === 1) {
+                            imageList1.push(items[i]);
+                        }
+                        if (id * 1 === 2) {
+                            imageList2.push(items[i]);
+                        }
+                        if (id * 1 === 3) {
+                            imageList3.push(items[i]);
+                        }
+                        if (id * 1 === 4) {
+                            imageList4.push(items[i]);
+                        }
+                        $("#couponWrap" + id).find(".contentTableProduct").show();
+                        $(".del").removeAttr("disabled");
+                        batchSaveSort(id);
+                    }
+                    ;
+                }
+                return true;
+            }
+        });
+    }
+
+    //一键排序
+    function batchSaveSort(id) {
+        if (id * 1 === 1) {
+            imageList1.sort(sort);
+            insertHtmlProduct(imageList1, id);
+        }
+        if (id * 1 === 2) {
+            imageList2.sort(sort);
+            insertHtmlProduct(imageList2, id);
+        }
+        if (id * 1 === 3) {
+            imageList3.sort(sort);
+            insertHtmlProduct(imageList3, id);
+        }
+        if (id * 1 === 4) {
+            imageList4.sort(sort);
+            insertHtmlProduct(imageList4, id);
+        }
+
+    }
+
+    //根据sort值 从小到大排序
+    function sort(a, b) {
+        return a.sort - b.sort;
+    }
+
+    //相关图片列表数据
+    function appendProductOrderHead(data, index, id) {
+        var html = '<tr id ="ai' + index + '">' +
+            '<td>' +
+            '<input class="check-item" type="checkbox" name="info" value="' + index + '"/>' + (index + 1) +
+            '</td>' +
+            '<td>' +
+            '<img src="' + data.image + '" width="60px" border="none" title="启用">' +
+            '</td>' +
+            '<td>' +
+            data.productName +
+            '</td>' +
+            '<td>' +
+            data.shopName +
+            '</td>' +
+            '<td>' +
+            (data.pcStatus == 1 ? (
+                '<font color="green">已启用</font>' +
+                '<a href="javascript:void(0);" onclick="updatePcStatus(0,' + index + ',' + id + ');" >' +
+                '停用</a>'
+            ) : (
+                '<font color="red">已停用</font>' +
+                '<a href="javascript:void(0)" onclick="updatePcStatus(1,' + index + ',' + id + ');">' +
+                '启用</a>'
+            )) +
+            '</td>' +
+            '<td>' +
+            (data.appletsStatus == 1 ? (
+                '<font color="green">已启用</font>' +
+                '<a href="javascript:void(0);" onclick="updateAppletsStatus(0,' + index + ',' + id + ');" >' +
+                '停用</a>'
+            ) : (
+                '<font color="red">已停用</font>' +
+                '<a href="javascript:void(0)" onclick="updateAppletsStatus(1,' + index + ',' + id + ');">' +
+                '启用</a>'
+            )) +
+            '</td>' +
+            '<td>' +
+            '<input name="sort" style="width:50px;" value="' + data.sort + '"  onkeyup="onlynum(this)"  onchange="changeSort(' + index + ',this,' + id + ')"></td>' +
+            '</td>' +
+            '<td>' +
+            (data.addTime == '' ? (
+                '<fmt:formatDate value="<%=new Date()%>" pattern="yyyy-MM-dd HH:mm:ss"/>'
+            ) : (
+                data.addTime
+            )) +
+            '</td>' +
+            '<td>' +
+            '<a href="javascript:;" onclick="delect(' + index + ',' + id + ')">删除</a>' +
+            '</td>' +
+            '</tr>';
+        return html;
+    }
+
+    function insertHtmlProduct(list, id) {
+        var html = '';
+        tempIds = '';
+        if (list && list.length > 0) {
+            list.forEach(function (item, index) {
+                html += appendProductOrderHead(item, index, id);
+                tempIds += "," + item.productId;
+            });
+        }
+        if (id * 1 === 1) {
+            productIds1 = tempIds;
+        }
+        if (id * 1 === 2) {
+            productIds2 = tempIds;
+        }
+        if (id * 1 === 3) {
+            productIds3 = tempIds;
+        }
+        if (id * 1 === 4) {
+            productIds4 = tempIds;
+        }
+        $("#couponWrap" + id).find(".hotSearchProduct").html(html);
+    }
+
+    function changeSort(index, sortThis, id) {
+        var sort = sortThis.value;
+        if (sort > 0) {
+            var image;
+            if (id * 1 === 1) {
+                image = imageList1[index];
+            }
+            if (id * 1 === 2) {
+                image = imageList2[index];
+            }
+            if (id * 1 === 3) {
+                image = imageList3[index];
+            }
+            if (id * 1 === 4) {
+                image = imageList4[index];
+            }
+            if (image) {
+                image.sort = sort;
+            }
+        }
+    }
+
+    function updatePcStatus(status, index, id) {
+        var image;
+        if (id * 1 === 1) {
+            image = imageList1[index];
+        }
+        if (id * 1 === 2) {
+            image = imageList2[index];
+        }
+        if (id * 1 === 3) {
+            image = imageList3[index];
+        }
+        if (id * 1 === 4) {
+            image = imageList4[index];
+        }
+        if (image) {
+            confirmx(status == 0 ? '确定停用吗?' : '确定启用吗?', function () {
+                image.pcStatus = status;
+                batchSaveSort(id);
+            });
+        }
+    }
+
+    function updateAppletsStatus(status, index, id) {
+        var image;
+        if (id * 1 === 1) {
+            image = imageList1[index];
+        }
+        if (id * 1 === 2) {
+            image = imageList2[index];
+        }
+        if (id * 1 === 3) {
+            image = imageList3[index];
+        }
+        if (id * 1 === 4) {
+            image = imageList4[index];
+        }
+        if (image) {
+            confirmx(status == 0 ? '确定停用吗?' : '确定启用吗?', function () {
+                image.appletsStatus = status;
+                batchSaveSort(id);
+            });
+        }
+    }
+
+    /**
+     * 批量删除
+     */
+    function batchDeletion(id) {
+        var index = -1;
+        var i = 1;
+        return confirmx("确定删除吗?", function () {
+            $('input[name="info"]:checked').each(function () {
+                var thisIndex = $(this).val();
+                if (index >= 0 && index < thisIndex) {
+                    thisIndex = thisIndex - i;
+                    i++;
+                } else {
+                    index = thisIndex;
+                }
+                var image, tempList;
+                if (id * 1 === 1) {
+                    image = imageList1[index];
+                    if (image.productId != '') {
+                        productIds1 = productIds1.replace(image.productId, "");
+                    }
+                    imageList1.splice(thisIndex, 1);
+                    tempList = imageList1;
+                }
+                if (id * 1 === 2) {
+                    image = imageList2[index];
+                    if (image.productId != '') {
+                        productIds2 = productIds2.replace(image.productId, "");
+                    }
+                    imageList2.splice(thisIndex, 1);
+                    tempList = imageList2;
+                }
+                if (id * 1 === 3) {
+                    image = imageList3[index];
+                    if (image.productId != '') {
+                        productIds3 = productIds3.replace(image.productId, "");
+                    }
+                    imageList3.splice(thisIndex, 1);
+                    tempList = imageList3;
+                }
+                if (id * 1 === 4) {
+                    image = imageList4[index];
+                    if (image.productId != '') {
+                        productIds4 = productIds4.replace(image.productId, "");
+                    }
+                    imageList4.splice(thisIndex, 1);
+                    tempList = imageList4;
+                }
+                insertHtmlProduct(tempList, id);
+                if (tempList.length == 0) {
+                    $("#couponWrap" + id).find('.contentTableProduct').hide();
+                    $(".del").attr("disabled", "disabled");
+                }
+            });
+        });
+    }
+
+    function appendShopOrderHead(data, id) {
+        var html = '<tr>' +
+            '<td>' +
+            data.name +
+            '</td>' +
+            '<td>' +
+            data.sname +
+            '</td>' +
+            '<td>' +
+            data.linkMan +
+            '</td>' +
+            '<td>' +
+            data.contractMobile +
+            '</td>' +
+            '<td>' +
+            '<a href="javascript:;" onclick="delectShop(' + id + ')">删除</a>' +
+            '</td>' +
+            '</tr>';
+        $("#couponWrap" + id).find(".hotSearchShop").html(html);
+        $("#chooseShop" + id).hide();
+        $("#couponWrap" + id).find(".contentTableShop").show();
+        $("#shopId" + id).val(data.shopId);
+    }
+
+    function delectShop(id) {
+        return confirmx("确定删除吗?", function () {
+            $("#chooseShop" + id).show();
+            $("#couponWrap" + id).find(".contentTableShop").hide();
+            $("#shopId" + id).val("");
+        });
+    }
+
+    /**
+     * 删除操作
+     */
+    function delect(index, id) {
+        return confirmx("确定删除吗?", function () {
+            var image;
+            if (id * 1 === 1) {
+                image = imageList1[index];
+                if (image.productId != '') {
+                    productIds1 = productIds1.replace(image.productId, "");
+                }
+                imageList1.splice(index, 1);
+                insertHtmlProduct(imageList1, id);
+                if (imageList1.length == 0) {
+                    $("#couponWrap" + id).find('#contentTableProduct').hide();
+                    $(".del").attr("disabled", "disabled");
+                }
+            }
+            if (id * 1 === 2) {
+                image = imageList2[index];
+                if (image.productId != '') {
+                    productIds2 = productIds2.replace(image.productId, "");
+                }
+                imageList2.splice(index, 1);
+                insertHtmlProduct(imageList2, id);
+                if (imageList2.length == 0) {
+                    $("#couponWrap" + id).find('#contentTableProduct').hide();
+                    $(".del").attr("disabled", "disabled");
+                }
+            }
+            if (id * 1 === 3) {
+                image = imageList3[index];
+                if (image.productId != '') {
+                    productIds3 = productIds3.replace(image.productId, "");
+                }
+                imageList3.splice(index, 1);
+                insertHtmlProduct(imageList3, id);
+                if (imageList3.length == 0) {
+                    $("#couponWrap" + id).find('#contentTableProduct').hide();
+                    $(".del").attr("disabled", "disabled");
+                }
+            }
+            if (id * 1 === 4) {
+                image = imageList4[index];
+                if (image.productId != '') {
+                    productIds4 = productIds4.replace(image.productId, "");
+                }
+                imageList4.splice(index, 1);
+                insertHtmlProduct(imageList4, id);
+                if (imageList4.length == 0) {
+                    $("#couponWrap" + id).find('#contentTableProduct').hide();
+                    $(".del").attr("disabled", "disabled");
+                }
+            }
+        });
+    }
+
+
+    function clickAllSelect(ckb) {
+        var isChecked = ckb.checked;
+        $(".check-item").attr('checked', isChecked);
+    }
+
+    /**
+     * @param obj
+     * jquery控制input只能输入数字
+     */
+    function onlynum(obj) {
+        obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字"以外的字符
+    }
+
+</script>
+</body>
+</html>

+ 9 - 2
src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponForm.jsp

@@ -55,6 +55,11 @@
                     alert("请选择生效时间! ");
                     return false;
                 }
+                var endMonth = $("#endMonth").val();
+                if (endMonth < month) {
+                    $.jBox.alert('优惠月份设置错误','提示');
+                    return false;
+                }
                 var vipId = $("#id").val();
                 if (!vipId && dateList.indexOf(month)>=0){
                     alert("已存在该月优惠券,请修改月份!");
@@ -135,7 +140,7 @@
 <body>
 <ul class="nav nav-tabs">
     <li><a href="${ctx}/vip/cmCoupon/">超级会员专属优惠券</a></li>
-    <li class="active"><a href="${ctx}/vip/cmCoupon/form?id=${cmVipCoupon.id}">${not empty cmVipCoupon.id?'编辑':'添加'}</a>
+    <li class="active"><a href="${ctx}/vip/cmCoupon/form?id=${cmVipCoupon.id}&endTime=${cmVipCoupon.endTime}">${not empty cmVipCoupon.id?'编辑':'添加'}</a>
     </li>
 </ul><br>
 <form:form id="inputForm" modelAttribute="svipcouponForm" action="${ctx}/vip/cmCoupon/save" method="post" class="form-horizontal">
@@ -145,6 +150,8 @@
         <label class="control-label"><font color="red">*</font>优惠月份:</label>
         <div class="controls">
             <form:input path="month" type="text" maxlength="20" class="input-medium Wdate" value="${useTime}"
+                        onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>&nbsp;&nbsp; —— &nbsp;&nbsp;
+            <form:input path="endMonth" type="text" maxlength="20" class="input-medium Wdate" value="${endMonth}" disabled="true"
                         onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>
         </div>
     </div>
@@ -983,4 +990,4 @@
 
 </script>
 </body>
-</html>
+</html>

+ 4 - 3
src/main/webapp/WEB-INF/views/modules/svip/cmSvipCouponList.jsp

@@ -21,6 +21,7 @@
 <body>
 <ul class="nav nav-tabs">
     <li class="active"><a href="${ctx}/vip/cmCoupon/">超级会员专属优惠券</a></li>
+    <li><a href="${ctx}/vip/cmCoupon/configuration">专属优惠券配置</a></li>
 </ul>
 <form:form id="searchForm" modelAttribute="cmVipCoupon" action="${ctx}/vip/cmCoupon" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
@@ -57,7 +58,7 @@
             </div>
             <div class="item">
                 <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" />
-                <input class="btn btn-primary" onclick="window.location='${ctx}/vip/cmCoupon/form'" value="添加优惠券"/>
+<%--                <input class="btn btn-primary" onclick="window.location='${ctx}/vip/cmCoupon/form'" value="添加优惠券"/>--%>
             </div>
         </div>
     </div>
@@ -75,7 +76,7 @@
     <tbody>
     <c:forEach items="${page.list}" var="vip">
         <tr>
-            <td><label>${vip.useTime}</label></td>
+            <td><label>${vip.useTime} &nbsp;&nbsp;--&nbsp;&nbsp; ${vip.endTime}</label></td>
             <td>
                 <c:forEach items="${vip.couponList}" var="cmCoupon" varStatus="index">
                 <p>优惠券${index.index+1}:
@@ -108,7 +109,7 @@
                 </c:if>
             </td>
             <td>
-                <a href="${ctx}/vip/cmCoupon/form?id=${vip.id}">编辑</a>
+                <a href="${ctx}/vip/cmCoupon/form?id=${vip.id}&endTime=${vip.endTime}">编辑</a>
                 <c:if test="${vip.status ne '2'}">
                     <a href="${ctx}/vip/cmCoupon/close?id=${vip.id}"
                        onclick="return confirmx('确定关闭该该月份的优惠券吗?关闭后该月份将不赠送优惠券?', this.href)">关闭</a>

+ 8 - 1
src/main/webapp/WEB-INF/views/modules/user/clubTemporaryForm.jsp

@@ -419,7 +419,14 @@
 				<form:input path="linkMan" htmlEscape="false" maxlength="20" class="input-medium required"/>
 			</td>
 			<th width="12%"><font color="red">*</font> 手机号:</th>
-			<td colspan="3"><form:input path="bindMobile" htmlEscape="false" maxlength="20" class="input-medium required"  onchange="checkMobile()"/></td>
+			<td width="13%"><form:input path="bindMobile" htmlEscape="false" maxlength="20" class="input-medium required"  onchange="checkMobile()"/></td>
+			<th width="12%"><font color="red">*</font> 联系人身份:</th>
+			<td width="13%">
+				<form:radiobutton path="linkManIdentity" name="linkManIdentity" class="required" value="1" label="老板"/>
+				<form:radiobutton path="linkManIdentity" name="linkManIdentity" class="required" value="2" label="采购"/>
+				<form:radiobutton path="linkManIdentity" name="linkManIdentity" class="required" value="3" label="运营"/>
+				<form:radiobutton path="linkManIdentity" name="linkManIdentity" class="required" value="4" label="其他"/>
+			</td>
 		</tr>
 	</table>
 </div>

+ 6 - 2
src/main/webapp/WEB-INF/views/modules/userNew/recordLinkageForm.jsp

@@ -128,14 +128,17 @@
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>描述:</label>
             <textarea id='describe' <c:if test="${empty describe}">placeholder="请输入该用户的行为信息,例如查看了什么商品或者文章,以及任何需要销售人员注意的信息"</c:if>
-					  name='describe' rows='5' cols='12' style="width: 700px" maxlength="200"><c:if test="${not empty describe}">${describe}</c:if></textarea>
-		</div>
+					  name='describe' rows='5' cols='12' style="width: 700px" maxlength="200"><c:if test="${not empty describe}">${describe}</c:if><c:if test="${masBehavior ne ''}">,${masBehavior}</c:if></textarea>
+			<textarea hidden id="masBehavior" path="masBehavior"  name="masBehavior" style="width: 700px; visibility: hidden" maxlength="200"><c:if test="${masBehavior ne ''}">,${masBehavior}</c:if></textarea>
+		</div><%--<c:if test="${masBehavior ne ''}">,${masBehavior}</c:if>--%>
+
 	<div class="control-label">链接:</div><span id='link' name='link'>${link}</span>
 		<div class="form-actions">
 			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
 			<input id="btnSubmit" class="btn btn-primary"  type="submit" value="确定并生成链接"/>
 		</div>
 	</form:form>
+<c:if test="${masBehavior ne ''}">
 <form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/new/user/agency/recordLinkage?clubId=${clubId}" 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}"/>
@@ -187,6 +190,7 @@
 	</C:forEach>
 	</tbody>
 </table>
+</c:if>
 <div class="pagination">${page}</div>
 
 	<script type="text/javascript">

+ 408 - 0
src/main/webapp/static/content-edit.js

@@ -0,0 +1,408 @@
+/** 生成uuid的方法 */
+function uuid(len = 16, radix = 16) {
+  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
+  const value = []
+  let i = 0
+  radix = radix || chars.length
+  if (len) {
+      for (i = 0; i < len; i++) value[i] = chars[0 | (Math.random() * radix)]
+  } else {
+      let r
+      value[8] = value[13] = value[18] = value[23] = '-'
+      value[14] = '4'
+      for (i = 0; i < 36; i++) {
+          if (!value[i]) {
+              r = 0 | (Math.random() * 16)
+              value[i] = chars[i === 19 ? (r & 0x3) | 0x8 : r]
+          }
+      }
+  }
+  return value.join('')
+}
+
+class ContentEdit {
+  constructor(options) {
+      this.options = {
+          markCountKey: 'markCount',
+          ...options
+      }
+      if(typeof this.options.el === 'string'){
+          this.container = document.querySelector(this.options.el)
+      }else{
+          this.container = this.options.el
+      }
+      this.hiddenMark = options.hiddenMark
+      this.selection = null
+      this.range = null
+      this.ctrid = '' // 当前标记id
+      this.ctridList = []
+      this.registEventListener()
+      this.initCtridList()
+  }
+
+  get innerHTML() {
+      return this.container.innerHTML
+  }
+
+  /** 开始节点 */
+  get startContainer() {
+      return this.isTextNode(this.range.startContainer) ? this.range.startContainer : this.range.endContainer
+  }
+
+  /** 结束节点 */
+  get endContainer() {
+      return this.isTextNode(this.range.endContainer) ? this.range.endContainer : this.range.startContainer
+  }
+
+  /** 选中文本类容 */
+  get selectionText() {
+      return this.selection.toString()
+  }
+
+  /** 开始节点与结束接单公共父节点 */
+  get commonNode() {
+      return this.isTextNode(this.range.commonAncestorContainer)
+          ? this.range.commonAncestorContainer.parentNode
+          : this.range.commonAncestorContainer
+  }
+
+  /** 开始节点的最外层节点 */
+  get startNode() {
+      return this.getTopNode(this.commonNode, this.startContainer)
+  }
+
+  /** 结束节点的最外层节点 */
+  get endNode() {
+      return this.getTopNode(this.commonNode, this.endContainer)
+  }
+
+  /** 开始节点与结束节点之间的节点列表 */
+  get centerNodes() {
+      if (this.startNode === this.endNode) return []
+      if (this.startNode.nextSibling === this.endNode) return []
+      return this.nextUntil(this.startNode, this.endNode)
+  }
+
+  initCtridList(){
+      const nodeList = this.container.querySelectorAll('.scapegoat')
+      nodeList.forEach((node) => {
+          const id = node.getAttribute('data-ctrid')
+          if (!this.ctridList.includes(id)){
+              this.ctridList.push(id)
+          }
+      })
+  }
+
+  /** 文本选中变动 */
+  selectionChange() {
+      this.selection = document.getSelection()
+      if (this.selection.type.toLowerCase() !== 'range') return
+      this.range = this.selection.getRangeAt(0)
+  }
+
+  /** 包裹 */
+  parcel(ctrid, index) {
+      this.ctrid = ctrid ? ctrid : uuid()
+      this.markNum = index
+      this.ctridList.push(this.ctrid)
+      try {
+          this.parcelNode(this.commonNode, this.centerNodes)
+          this.parcelStartNode(this.startContainer)
+          this.parcelEndNode(this.endContainer)
+          this.parcelNodeContent()
+          this.selection.removeAllRanges()
+          this.options.change && this.options.change(this.innerHTML)
+          return this.ctrid
+      } catch (e) {
+          return this.ctrid
+      }
+  }
+
+  /** 包裹元素 */
+  parcelNode(container, nodeList = []) {
+      if (nodeList.length === 0) return
+      const parcel = this.createParcel()
+      container.insertBefore(parcel, nodeList[0])
+      nodeList.forEach((node) => {
+          container.removeChild(node)
+          parcel.appendChild(node)
+      })
+  }
+
+  /** 包裹开始元素 */
+  parcelStartNode(node) {
+      if (node === this.commonNode) return
+      if (node === this.startNode) return
+      this.parcelNode(node.parentNode, this.nextAll(node))
+      this.parcelStartNode(node.parentNode)
+  }
+
+  /** 包裹结束元素 */
+  parcelEndNode(node) {
+      if (node === this.commonNode) return
+      if (node === this.endNode) return
+      this.parcelNode(node.parentNode, this.prevAll(node))
+      this.parcelEndNode(node.parentNode)
+  }
+
+  /** 包裹开始结束节点内容 */
+  parcelNodeContent() {
+      const mark = this.createMark()
+      // 开始节点与结束节点相同
+      if (this.startContainer === this.endContainer) {
+          const prefixText = this.startContainer.nodeValue.substring(0, this.range.startOffset)
+          const centerText = this.startContainer.nodeValue.substring(this.range.startOffset, this.range.endOffset)
+          const suffixText = this.startContainer.nodeValue.substring(this.range.endOffset)
+          const prefix = document.createTextNode(prefixText)
+          const suffix = document.createTextNode(suffixText)
+          const parcel = this.createParcel()
+          parcel.innerText = centerText
+          const fragment = this.createFragment([prefix, parcel, mark, suffix])
+          this.startContainer.parentNode.replaceChild(fragment, this.startContainer)
+      } else {
+          // 开始节点
+          const prefixText = this.startContainer.nodeValue.substring(0, this.range.startOffset)
+          const startText = this.startContainer.nodeValue.substring(this.range.startOffset)
+          const prefix = document.createTextNode(prefixText)
+          const startSpan = this.createParcel()
+          startSpan.innerText = startText
+          const startFragment = this.createFragment([prefix, startSpan])
+          this.startContainer.parentNode.replaceChild(startFragment, this.startContainer)
+          // 结束节点
+          const endText = this.endContainer.nodeValue.substring(0, this.range.endOffset)
+          const suffixText = this.endContainer.nodeValue.substring(this.range.endOffset)
+          const suffix = document.createTextNode(suffixText)
+          const endSpan = this.createParcel()
+          endSpan.innerText = endText
+          const endFragment = this.createFragment([endSpan, mark, suffix])
+          this.endContainer.parentNode.replaceChild(endFragment, this.endContainer)
+      }
+  }
+
+  /** 标记清除 */
+  unParcel(ctrid) {
+      this.ctridList = this.ctridList.filter((item) => item !== ctrid)
+      const nodeList = this.container.querySelectorAll('.scapegoat')
+      nodeList.forEach((node) => {
+          const id = node.getAttribute('data-ctrid')
+          if (id !== ctrid) return
+          const parentNode = node.parentNode
+          if (node.nodeName === 'IMG') {
+              parentNode.removeChild(node)
+          } else if (node.nodeName === 'SPAN') {
+              const fragment = this.createFragment(node.childNodes)
+              parentNode.replaceChild(fragment, node)
+          }
+          // 清除空节点
+          parentNode.normalize()
+      })
+      this.options.change && this.options.change(this.innerHTML)
+      this.ctridList = this.ctridList.filter(item => item !== ctrid)
+  }
+
+  /** 创建标记 */
+  createMark() {
+      if (this.hiddenMark) return document.createDocumentFragment()
+      const img = document.createElement('img')
+      const index = this.markNum || window[this.options.markCountKey]
+      img.classList.add('scapegoat')
+      img.setAttribute('height', 20)
+      img.setAttribute('data-ctrid', this.ctrid)
+      img.setAttribute('src', `https://baikebcs.bdimg.com/cms/wiki-react-editor/ref/${index}.svg`)
+      img.addEventListener('mouseover', (e) => this.markMouseOver(e))
+      img.addEventListener('mouseleave', (e) => this.markMouseLeave(e))
+      // img.addEventListener('click', (e) => this.markMouseClick(e))
+      return img
+  }
+
+  /** 创建片段 */
+  createFragment(chidlren = []) {
+      const fragment = document.createDocumentFragment()
+      chidlren.forEach((node) => {
+          fragment.appendChild(node)
+      })
+      return fragment
+  }
+
+  /** 鼠标放在标记上 */
+  markMouseOver(e) {
+      const ctrid = e.target.getAttribute('data-ctrid')
+      const nodeList = document.querySelectorAll('.scapegoat')
+      nodeList.forEach((node) => {
+          const id = node.getAttribute('data-ctrid')
+          if (id === ctrid) {
+              node.classList.add('hover')
+          }
+      })
+  }
+
+  /** 鼠标从标记上移开 */
+  markMouseLeave(e) {
+      const ctrid = e.target.getAttribute('data-ctrid')
+      const nodeList = document.querySelectorAll('.scapegoat')
+      nodeList.forEach((node) => {
+          const id = node.getAttribute('data-ctrid')
+          if (id === ctrid) {
+              node.classList.remove('hover')
+          }
+      })
+  }
+
+  /* 注册事件监听 */
+  registEventListener() {
+      // 获取文本选中
+      this.container.addEventListener('focus', () => {
+          document.addEventListener('selectionchange', () => this.selectionChange())
+      })
+      this.container.addEventListener('blur', () => {
+          this.options.change && this.options.change(this.innerHTML)
+          document.removeEventListener('selectionchange', () => this.selectionChange())
+      })
+  }
+
+  /** 获取节点元素 */
+  getTopNode(parent, node) {
+      if (parent === node.parentNode) return node
+      return this.getTopNode(parent, node.parentNode)
+  }
+
+  /** 开始节点与结束节点之间的节点列表 */
+  nextUntil(startNode, endNode) {
+      if (startNode.nextSibling === endNode) return []
+      return [startNode.nextSibling, ...this.nextUntil(startNode.nextSibling, endNode)]
+  }
+
+  /** 获取紧接着之后兄弟节点 */
+  nextAll(node) {
+      if (!node.nextSibling) return []
+      return [node.nextSibling, ...this.nextAll(node.nextSibling)]
+  }
+
+  /** 获取紧接着之前的兄弟节点 */
+  prevAll(node) {
+      if (!node.previousSibling) return []
+      return [node.previousSibling, ...this.prevAll(node.previousSibling)]
+  }
+
+  /** 是文本节点 */
+  isTextNode(node) {
+      return node.nodeType === 3
+  }
+
+  /** 创建包裹元素 */
+  createParcel() {
+      const parcel = document.createElement('span')
+      parcel.classList.add('scapegoat')
+      parcel.setAttribute('data-ctrid', this.ctrid)
+      return parcel
+  }
+}
+
+class ContentEditInput {
+    constructor(options) {
+        this.options = {
+            el: '.content-edit',
+            markCountKey: 'markCount',
+            bubbleSize: options.bubbleSize || 0,
+            initValue: options.initValue || '',
+            toolbarClick: () => {},
+            referenceEdit: () => {},
+            ...options,
+        }
+        this.createElement()
+        this.addEventListener()
+        this.edit = new ContentEdit({
+            el: this.input[0],
+            change: (html) => {
+                this.realInput.attr('value', html)
+            },
+        })
+        if(this.edit){
+            this.setBubbleNum(this.edit.ctridList.length)
+        }
+    }
+
+    setBubbleNum(num) {
+        this.options.bubbleSize = num
+        this.options.bubbleSize > 0 ? this.bubble.show() : this.bubble.hide()
+        this.bubble.text(this.options.bubbleSize)
+    }
+
+    createElement() {
+        this.container = $(this.options.el)
+        this.toolbar = $('<div class="bk-toolbar">[&nbsp;|&nbsp;]</div>')
+        this.toolbar.hide()
+        this.bubble = $('<div class="bk-bubble"></div>')
+        this.setBubbleNum(this.options.bubbleSize)
+        this.input = $('<div class="bk-input" contenteditable="plaintext-only"></div>')
+        this.realInput = $('<input type="text"/>')
+        if (this.container.attr('name')) {
+            this.realInput.attr('name', this.container.attr('name'))
+            this.container.attr('name', '')
+        }
+        this.realInput.hide()
+        if (this.options.initValue) {
+            this.input.html(this.options.initValue)
+            this.realInput.attr('value', this.options.initValue)
+        }
+        this.literature = $('<ul class="bk-literature"></ul>')
+        this.literature.hide()
+        this.container.append([this.toolbar, this.bubble, this.input, this.realInput, this.literature])
+    }
+
+    addLiteratureItem(ctrid, text) {
+        const literatureItem = $('<li></li>')
+        const content = $('<div class="bk-literature-content"></div>')
+        content.append(text)
+        const control = $('<div class="bk-literature-control"></div>')
+        const editBtn = $('<span>编辑</span>')
+        editBtn.attr('data-id', ctrid)
+        const deleteBtn = $('<span>删除</span>')
+        deleteBtn.attr('data-id', ctrid)
+        control.append([editBtn, deleteBtn])
+        literatureItem.append([content, control])
+        this.literature.append(literatureItem)
+        editBtn.on('click', () => {
+            this.options.referenceEdit(editBtn.attr('data-id'))
+        })
+        deleteBtn.on('click', () => {
+            this.edit.unParcel(editBtn.attr('data-id'))
+            literatureItem.remove()
+            this.setBubbleNum(this.edit.ctridList.length)
+        })
+    }
+
+    confirm(text, ctrlId, index) {
+        const ctrid = this.edit.parcel(ctrlId, index)
+        this.addLiteratureItem(ctrid, text)
+        this.setBubbleNum(this.edit.ctridList.length)
+        return ctrid
+    }
+
+    addEventListener() {
+        this.toolbar.on('click', this.toolbarClick)
+        this.bubble.on('click', this.bubbleClick)
+        this.input.on('focus', this.inputFocus)
+        this.input.on('blur', this.inputBlur)
+        $(window).on('click', (e) => {
+            if (this.literature[0].contains(e.target) || this.bubble[0].contains(e.target)) return
+            this.literature.hide()
+        })
+    }
+
+    inputFocus = () => {
+        this.toolbar.fadeIn(200)
+    }
+
+    inputBlur = () => {
+        this.toolbar.fadeOut(200)
+    }
+
+    toolbarClick = () => {
+        this.options.toolbarClick(this)
+    }
+
+    bubbleClick = () => {
+        this.literature.toggle()
+    }
+}

Vissa filer visades inte eftersom för många filer har ändrats