|
@@ -221,13 +221,13 @@
|
|
|
<div class="control-group">
|
|
|
<label class="control-label"><font color="red">*</font>${commodityType}名称:</label>
|
|
|
<div class="controls">
|
|
|
- <form:input path="name" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
+ <form:input path="name" htmlEscape="false" maxlength="50" class="input-xlarge required"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
<label class="control-label"><font color="red">*</font>${commodityType}别名:</label>
|
|
|
<div class="controls">
|
|
|
- <form:input path="alias" htmlEscape="false" maxlength="50" class="input-xlarge " placeholder="输入英文名或者其他名称"/>
|
|
|
+ <form:input path="alias" htmlEscape="false" maxlength="50" class="input-xlarge required" placeholder="输入英文名或者其他名称"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
@@ -250,6 +250,31 @@
|
|
|
</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 required"/>
|
|
|
+ <sys:ckfinder input="authQrCode" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100"
|
|
|
+ maxHeight="100"/>
|
|
|
+ <br>
|
|
|
+ <label style="margin-left: 150px">建议图片分辨率1000px*450px</label>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="control-group paramList">
|
|
|
<label class="control-label titleClass"><font color="red">*</font>${commodityType}参数</label>
|
|
|
<button class="btn btn-primary" type="button" style="margin-left: 500px" onclick="addParam()">添加参数</button>
|
|
@@ -322,19 +347,19 @@
|
|
|
<div class="control-group">
|
|
|
<label class="control-label"><font color="red">*</font>品牌:</label>
|
|
|
<div class="controls">
|
|
|
- <form:input path="brand" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
+ <form:input path="brand" htmlEscape="false" maxlength="50" class="input-xlarge required"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
<label class="control-label"><font color="red">*</font>产地:</label>
|
|
|
<div class="controls">
|
|
|
- <form:input path="producePlace" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
+ <form:input path="producePlace" htmlEscape="false" maxlength="50" class="input-xlarge required"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
<label class="control-label"><font color="red">*</font>上市时间:</label>
|
|
|
<div class="controls">
|
|
|
- <input name="marketTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
|
|
|
+ <input name="marketTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
|
|
|
value="<fmt:formatDate value="${cmBaikeProduct.marketTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
|
|
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
</div>
|
|
@@ -342,19 +367,19 @@
|
|
|
<div class="control-group">
|
|
|
<label class="control-label"><font color="red">*</font>公司/厂商:</label>
|
|
|
<div class="controls">
|
|
|
- <form:input path="company" htmlEscape="false" maxlength="50" class="input-xlarge "/>
|
|
|
+ <form:input path="company" htmlEscape="false" maxlength="50" class="input-xlarge required"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
|
<label class="control-label"><font color="red">*</font>NMPA认证时间:</label>
|
|
|
<div class="controls">
|
|
|
- <input name="nmpaTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
|
|
|
+ <input name="nmpaTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
|
|
|
value="<fmt:formatDate value="${cmBaikeProduct.nmpaTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
|
|
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group" style="width: 1000px">
|
|
|
- <label class="control-label keyClass"><font color="red">*</font>产品认证:</label>
|
|
|
+ <label class="control-label keyClass"><font color="red">*</font>${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}">
|
|
@@ -469,7 +494,7 @@
|
|
|
<div class="control-group">
|
|
|
<label class="control-label keyClass"><font color="red">*</font>发布时间:</label>
|
|
|
<div class="controls">
|
|
|
- <input name="publishTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
|
|
|
+ <input name="publishTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
|
|
|
value="<fmt:formatDate value="${cmBaikeProduct.publishTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
|
|
|
onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
|
|
|
</div>
|
|
@@ -477,7 +502,7 @@
|
|
|
<div class="control-group">
|
|
|
<label class="control-label keyClass"><font color="red">*</font>基础浏览量:</label>
|
|
|
<div class="controls">
|
|
|
- <form:input path="basePv" htmlEscape="false" onkeyup="onlynum(this)" class="input-xlarge digits"/>
|
|
|
+ <form:input path="basePv" htmlEscape="false" onkeyup="onlynum(this)" class="input-xlarge digits required"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group">
|
|
@@ -520,7 +545,6 @@
|
|
|
};
|
|
|
var observer = new MutationObserver(function (mutations) {
|
|
|
$.each(mutations, function (index, item) {
|
|
|
- debugger
|
|
|
if (item.type === 'childList') {
|
|
|
// 在创建新的 element 时调用
|
|
|
var target = $(item.target),
|
|
@@ -535,6 +559,7 @@
|
|
|
})
|
|
|
});
|
|
|
var observeEle1 = document.getElementsByClassName('main-image-list')[0];
|
|
|
+ var observeEle1 = document.getElementsByClassName('auth-qrCode-list')[0];
|
|
|
var observeEle2 = document.getElementsByClassName('auth-image-list')[0];
|
|
|
var observeEle3 = document.getElementsByClassName('display-image-list')[0];
|
|
|
observer.observe(observeEle1, MutationObserverConfig);
|
|
@@ -547,7 +572,7 @@
|
|
|
wrapper.find('li').css('z-index','-1');
|
|
|
wrapper.find('input').val('');
|
|
|
$(this).hide();
|
|
|
- if (controlsId == 'mainImageBox') {
|
|
|
+ if (controlsId == 'mainImageBox' || controlsId == 'authQrCodeBox') {
|
|
|
wrapper.removeClass("hide-pic");
|
|
|
}else if (controlsId.indexOf('authImageBox') != -1) {
|
|
|
if ($('.auth-image-list .cancel-upload:visible').length < 8) {
|
|
@@ -579,6 +604,13 @@
|
|
|
|
|
|
$(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");
|
|
@@ -635,7 +667,6 @@
|
|
|
$('input[name="' + contentInput + '"]').val(contentArray[i]);
|
|
|
}
|
|
|
|
|
|
- debugger
|
|
|
// 初始化问题
|
|
|
var questionListSize = ${empty cmBaikeProduct.questionList.size() ? 0: cmBaikeProduct.questionList.size()};
|
|
|
questionIndex = questionListSize > 0 ? questionListSize : questionIndex;
|
|
@@ -717,16 +748,6 @@
|
|
|
}
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
- //富文本框
|
|
|
- ClassicEditor.create(document.querySelector('#discriptionEditor'), {
|
|
|
- ckfinder: {
|
|
|
- uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
|
- }
|
|
|
- }).then(function (editor) {
|
|
|
- window.discriptionEditor = editor;
|
|
|
- }).catch(function (error) {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
ClassicEditor.create(document.querySelector('#advantageEditor'), {
|
|
|
ckfinder: {
|
|
|
uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
|
|
@@ -785,14 +806,12 @@
|
|
|
|
|
|
//富文本框编辑
|
|
|
function checkInfo(){
|
|
|
- var discription=discriptionEditor.getData();
|
|
|
var advantage=advantageEditor.getData();
|
|
|
var disadvantage=disadvantageEditor.getData();
|
|
|
var principle=principleEditor.getData();
|
|
|
var adaptiveMan=adaptiveManEditor.getData();
|
|
|
var unAdaptiveMan=unAdaptiveManEditor.getData();
|
|
|
var aroundOperation=aroundOperationEditor.getData();
|
|
|
- $("#discription").val(discription);
|
|
|
$("#advantage").val(advantage);
|
|
|
$("#disadvantage").val(disadvantage);
|
|
|
$("#principle").val(principle);
|