|
@@ -0,0 +1,850 @@
|
|
|
|
+<%@ 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>
|
|
|
|
+ .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
|
|
|
|
+ }
|
|
|
|
+ </style>
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
+ //$("#name").focus();
|
|
|
|
+ $("#inputForm").validate({
|
|
|
|
+ submitHandler: function(form){
|
|
|
|
+ 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}/baike/cmBaikeProduct/?commodityType=${cmBaikeProduct.commodityType}">${commodityType}</a></li>
|
|
|
|
+ <li class="active"><a href="${ctx}/baike/cmBaikeProduct/toAuditPage?id=${cmBaikeProduct.id}&commodityType=${cmBaikeProduct.commodityType}">审核</a></li>
|
|
|
|
+ </ul><br/>
|
|
|
|
+ <form:form id="inputForm" modelAttribute="cmBaikeProduct" action="${ctx}/baike/cmBaikeProduct/save" method="post" class="form-horizontal">
|
|
|
|
+ <form:hidden path="id"/>
|
|
|
|
+ <form:hidden path="commodityType"/>
|
|
|
|
+ <form:hidden path="auditFlag"/>
|
|
|
|
+ <form:hidden path="shopId"/>
|
|
|
|
+ <sys:message content="${message}"/>
|
|
|
|
+ <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">
|
|
|
|
+ <form:input path="name" htmlEscape="false" class="input-xlarge "/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group">
|
|
|
|
+ <label class="control-label">${commodityType}别名:</label>
|
|
|
|
+ <div class="controls">
|
|
|
|
+ <form:input path="alias" htmlEscape="false" class="input-xlarge " placeholder="输入英文名或者其他名称"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group">
|
|
|
|
+ <label class="control-label">${commodityType}概述:</label>
|
|
|
|
+ <div class="controls" style="width:812px">
|
|
|
|
+ <textarea type="text" id="discription" name="discription" style="position: relative;height: 100px; width: 450px;" >${cmBaikeProduct.discription}</textarea>
|
|
|
|
+ </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="输入采美商城的相关商品详情链接,便于用户精准找到"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group">
|
|
|
|
+ <label class="control-label">${commodityType}图片:</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="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>
|
|
|
|
+ <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">
|
|
|
|
+ <form:input path="authLink" htmlEscape="false" class="input-xxlarge " cssStyle="position: relative"/>
|
|
|
|
+ </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">${commodityType}参数</label>
|
|
|
|
+ <button class="btn btn-primary" type="button" style="margin-left: 500px" onclick="addParam()">添加参数</button>
|
|
|
|
+ <div class="controls paramRow" id="paramRow0">
|
|
|
|
+ <input name="paramList[0].name" htmlEscape="false" class="input-small "
|
|
|
|
+ placeholder="例如:型号">
|
|
|
|
+ <input name="paramList[0].content" htmlEscape="false" class="input-xlarge "
|
|
|
|
+ placeholder="输入参数信息">
|
|
|
|
+ </div>
|
|
|
|
+ <div class="controls paramRow" id="paramRow1">
|
|
|
|
+ <input name="paramList[1].name" htmlEscape="false" class="input-small "
|
|
|
|
+ placeholder="例如:性质类型">
|
|
|
|
+ <input name="paramList[1].content" htmlEscape="false" class="input-xlarge "
|
|
|
|
+ placeholder="输入参数信息">
|
|
|
|
+ <a onclick="deleteParam(1)" style="cursor: pointer">删除</a>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="controls paramRow" id="paramRow2">
|
|
|
|
+ <input name="paramList[2].name" htmlEscape="false" class="input-small "
|
|
|
|
+ placeholder="例如:成分">
|
|
|
|
+ <input name="paramList[2].content" htmlEscape="false" class="input-xlarge "
|
|
|
|
+ placeholder="输入参数信息">
|
|
|
|
+ <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="例如:规格">
|
|
|
|
+ <input name="paramList[3].content" htmlEscape="false" class="input-xlarge "
|
|
|
|
+ placeholder="输入参数信息">
|
|
|
|
+ <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="例如:性质类型">
|
|
|
|
+ <input name="paramList[4].content" htmlEscape="false" class="input-xlarge "
|
|
|
|
+ placeholder="输入参数信息">
|
|
|
|
+ <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="例如:性质类型">
|
|
|
|
+ <input name="paramList[5].content" htmlEscape="false" class="input-xlarge "
|
|
|
|
+ placeholder="输入参数信息">
|
|
|
|
+ <a onclick="deleteParam(5)" style="cursor: pointer">删除</a>
|
|
|
|
+ </div>
|
|
|
|
+ </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>
|
|
|
|
+ </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>
|
|
|
|
+ </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>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group">
|
|
|
|
+ <label class="control-label">SEO关键词:</label>
|
|
|
|
+ <div class="controls">
|
|
|
|
+ <form:input path="seoKeyword" htmlEscape="false" style="position: relative" class="input-xlarge"/>
|
|
|
|
+ </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 "/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group">
|
|
|
|
+ <label class="control-label">产地:</label>
|
|
|
|
+ <div class="controls">
|
|
|
|
+ <form:input path="producePlace" htmlEscape="false" class="input-xlarge "/>
|
|
|
|
+ </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:input path="company" htmlEscape="false" class="input-xlarge "/>
|
|
|
|
+ </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>
|
|
|
|
+ </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>
|
|
|
|
+ </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>
|
|
|
|
+ </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 ">
|
|
|
|
+ </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 ">
|
|
|
|
+ </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">
|
|
|
|
+ <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">
|
|
|
|
+ </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"/>"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group">
|
|
|
|
+ <label class="control-label keyClass">基础浏览量:</label>
|
|
|
|
+ <div class="controls">
|
|
|
|
+ <form:input path="basePv" htmlEscape="false" onkeyup="onlynum(this)" readonly="true" class="input-xlarge digits "/>
|
|
|
|
+ </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 keyClass">添加时间:</label>
|
|
|
|
+ <div class="controls">
|
|
|
|
+ <input name="addTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
|
|
|
|
+ value="<fmt:formatDate value="${cmBaikeProduct.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group">
|
|
|
|
+ <label class="control-label keyClass">供应商:</label>
|
|
|
|
+ <div class="controls">
|
|
|
|
+ <form:input path="shopName" htmlEscape="false" readonly="true" class="input-xlarge "/>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group">
|
|
|
|
+ <label class="control-label keyClass">审核:</label>
|
|
|
|
+ <div class="controls">
|
|
|
|
+ <input type="radio" name="auditStatus" value="2" onclick="updateAuditStatus(2)" ${empty cmBaikeProduct.auditStatus?'checked=checked':cmBaikeProduct.auditStatus eq 1?'checked=checked':''}> 审核通过
|
|
|
|
+ <input type="radio" name="auditStatus" value="3" onclick="updateAuditStatus(3)" ${cmBaikeProduct.auditStatus eq 3?'checked=checked':''}> 审核失败
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="control-group" id="failReasonDiv" style="${empty cmBaikeProduct.auditStatus or cmBaikeProduct.auditStatus eq 1?'display: none':''}">
|
|
|
|
+ <label class="control-label">失败原因</label>
|
|
|
|
+ <div class="controls">
|
|
|
|
+ <textarea type="text" id="failReason" name="failReason" style="width: 400px;height: 90px">${cmBaikeProduct.failReason}</textarea>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-actions">
|
|
|
|
+ <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存" onclick="checkInfo()"/>
|
|
|
|
+ <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>
|
|
|
|
+ var paramIndex = 6;
|
|
|
|
+ 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 > 6) {
|
|
|
|
+ var index = 6;
|
|
|
|
+ while (index < paramListSize) {
|
|
|
|
+ $(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + index + "\">\n" +
|
|
|
|
+ "\t\t\t\t<input name=\"paramList[" + index + "].name\" htmlEscape=\"false\" class=\"input-small \" placeholder=\"参数名称\">\n" +
|
|
|
|
+ "\t\t\t\t<input name=\"paramList[" + index + "].content\" htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"输入参数信息\">\n" +
|
|
|
|
+ "\t\t\t\t<a onclick=\"deleteParam(" + index + ")\" style=\"cursor: pointer\">删除</a>\n" +
|
|
|
|
+ " </div>");
|
|
|
|
+ index = index + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (paramListSize > 0 && paramListSize < 6) {
|
|
|
|
+ for (var i = paramListSize; i < 6; 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]);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 初始化问题
|
|
|
|
+ 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<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" +
|
|
|
|
+ " </div>\n" +
|
|
|
|
+ " </div>");
|
|
|
|
+ index = index + 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (questionListSize > 0 && questionListSize < 2) {
|
|
|
|
+ for (var i = questionListSize; i < 2; i++) {
|
|
|
|
+ deleteQuestion(i);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ 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]);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ //删除参数
|
|
|
|
+ function deleteParam(index) {
|
|
|
|
+ $("#paramRow" + index).remove();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //添加参数
|
|
|
|
+ function addParam() {
|
|
|
|
+ $(".paramList").append("<div class=\"controls paramRow\" id=\"paramRow" + paramIndex + "\">\n" +
|
|
|
|
+ "\t\t\t\t<input name=\"paramList[" + paramIndex + "].name\" htmlEscape=\"false\" class=\"input-small \" placeholder=\"例如:性质类型\">\n" +
|
|
|
|
+ "\t\t\t\t<input name=\"paramList[" + paramIndex + "].content\" htmlEscape=\"false\" class=\"input-xlarge \" placeholder=\"输入参数信息\">\n" +
|
|
|
|
+ "\t\t\t\t<a onclick=\"deleteParam(" + paramIndex + ")\" style=\"cursor: pointer\">删除</a>\n" +
|
|
|
|
+ " </div>")
|
|
|
|
+ paramIndex = paramIndex + 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<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" +
|
|
|
|
+ " </div>\n" +
|
|
|
|
+ " </div>")
|
|
|
|
+ $("#questionDelBtn" + (questionIndex - 1)).attr("style", "display:none;cursor: pointer");
|
|
|
|
+ questionIndex = questionIndex + 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function updateAuditStatus(auditStatus) {
|
|
|
|
+ var elementById = document.getElementById("failReasonDiv");
|
|
|
|
+ if (auditStatus === 2) {
|
|
|
|
+ elementById.style.cssText = "display:none";
|
|
|
|
+ } else {
|
|
|
|
+ elementById.style.cssText = "";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $(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, ""); //清除"数字"以外的字符
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+</body>
|
|
|
|
+</html>
|