|
@@ -20,22 +20,103 @@
|
|
|
$("#inputForm").validate({
|
|
|
submitHandler: function (form) {
|
|
|
if (imageList1.length > 0) {
|
|
|
- var productInfo = JSON.stringify(imageList1);
|
|
|
+ var productInfo1 = JSON.stringify(imageList1);
|
|
|
$('#productInfo1').val(productInfo1);
|
|
|
}
|
|
|
if (imageList2.length > 0) {
|
|
|
- var productInfo = JSON.stringify(imageList2);
|
|
|
+ var productInfo2 = JSON.stringify(imageList2);
|
|
|
$('#productInfo2').val(productInfo2);
|
|
|
}
|
|
|
if (imageList3.length > 0) {
|
|
|
- var productInfo = JSON.stringify(imageList3);
|
|
|
+ var productInfo3 = JSON.stringify(imageList3);
|
|
|
$('#productInfo3').val(productInfo3);
|
|
|
}
|
|
|
if (imageList4.length > 0) {
|
|
|
- var productInfo = JSON.stringify(imageList4);
|
|
|
+ var productInfo4 = JSON.stringify(imageList4);
|
|
|
$('#productInfo4').val(productInfo4);
|
|
|
}
|
|
|
+
|
|
|
+ var month = $("#month").val();
|
|
|
+ // 判断月份 ...
|
|
|
+ if(month == null || month == ""){
|
|
|
+ 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>
|
|
@@ -53,18 +134,19 @@
|
|
|
<div class="control-group">
|
|
|
<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="${startDate}"
|
|
|
- onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>
|
|
|
+ <form:input path="month" type="text" maxlength="20" class="input-medium Wdate" value="${useTime}"
|
|
|
+ onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
<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="99" checked="true" ></form:radiobutton>
|
|
|
<form:radiobutton path="couponType1" class="couponType" label="活动券" value="0"></form:radiobutton>
|
|
|
- <form:radiobutton path="couponType1" class="couponType" label="品类券" value="1"></form:radiobutton>
|
|
|
- <form:radiobutton path="couponType1" class="couponType" label="店铺券" value="3"></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>
|
|
|
<div class="control-group coupon-line l0" style="display:none">
|
|
@@ -113,31 +195,32 @@
|
|
|
<form:radiobutton path="productType1" value="2" label="指定商品" onclick="productShow(value,1)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <form:hidden path="productInfo1" id="productInfo1"/>
|
|
|
+
|
|
|
<div class="productData1" hidden="hidden">
|
|
|
+ <form:hidden path="productInfo1" id="productInfo1"/>
|
|
|
+<%-- <div class="control-group">--%>
|
|
|
+<%-- <label class="control-label"><font color="red">*</font>网站活动页banner:</label>--%>
|
|
|
+<%-- <div class="controls upload-content-image iconBox">--%>
|
|
|
+<%-- <div class="conList">--%>
|
|
|
+<%-- <form:hidden id="pcBanner" path="pcBanner1" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
|
|
|
+<%-- <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
|
|
|
+<%-- <br>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- <div class="control-group">--%>
|
|
|
+<%-- <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>--%>
|
|
|
+<%-- <div class="controls upload-content-image iconBox">--%>
|
|
|
+<%-- <div class="conList">--%>
|
|
|
+<%-- <form:hidden id="appletsBanner" path="appletsBanner1" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
|
|
|
+<%-- <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
|
|
|
+<%-- <br>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label"><font color="red">*</font>网站活动页banner:</label>
|
|
|
- <div class="controls upload-content-image iconBox">
|
|
|
- <div class="conList">
|
|
|
- <form:hidden id="pcBanner" path="pcBanner1" htmlEscape="false" maxlength="255" class="input-xlarge"/>
|
|
|
- <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>
|
|
|
- <div class="controls upload-content-image iconBox">
|
|
|
- <div class="conList">
|
|
|
- <form:hidden id="appletsBanner" path="appletsBanner1" htmlEscape="false" maxlength="255" class="input-xlarge"/>
|
|
|
- <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <input class="btn" class="del" style="width: 50px" onclick="batchDeletion(1)" value="删除"/>
|
|
|
- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(1)" value="一键排序"/>
|
|
|
+ <input class="btn" class="del" style="width: 50px" onclick="batchDeletion(1)" value="删除"/>
|
|
|
+<%-- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(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">
|
|
@@ -167,8 +250,8 @@
|
|
|
<div class="controls">
|
|
|
<form:radiobutton path="couponType2" class="couponType" label="请选择" value="99" checked="true" ></form:radiobutton>
|
|
|
<form:radiobutton path="couponType2" class="couponType" label="活动券" value="0"></form:radiobutton>
|
|
|
- <form:radiobutton path="couponType2" class="couponType" label="品类券" value="1"></form:radiobutton>
|
|
|
- <form:radiobutton path="couponType2" class="couponType" label="店铺券" value="3"></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>
|
|
|
<div class="control-group coupon-line l0" style="display:none">
|
|
@@ -216,31 +299,32 @@
|
|
|
<form:radiobutton path="productType2" value="2" label="指定商品" onclick="productShow(value,2)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <form:hidden path="productInfo2" id="productInfo2"/>
|
|
|
+
|
|
|
<div class="productData2" hidden="hidden">
|
|
|
+ <form:hidden path="productInfo2" id="productInfo2"/>
|
|
|
+<%-- <div class="control-group">--%>
|
|
|
+<%-- <label class="control-label"><font color="red">*</font>网站活动页banner:</label>--%>
|
|
|
+<%-- <div class="controls upload-content-image iconBox">--%>
|
|
|
+<%-- <div class="conList">--%>
|
|
|
+<%-- <form:hidden id="pcBanner" path="pcBanner2" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
|
|
|
+<%-- <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
|
|
|
+<%-- <br>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- <div class="control-group">--%>
|
|
|
+<%-- <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>--%>
|
|
|
+<%-- <div class="controls upload-content-image iconBox">--%>
|
|
|
+<%-- <div class="conList">--%>
|
|
|
+<%-- <form:hidden id="appletsBanner" path="appletsBanner2" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
|
|
|
+<%-- <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
|
|
|
+<%-- <br>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label"><font color="red">*</font>网站活动页banner:</label>
|
|
|
- <div class="controls upload-content-image iconBox">
|
|
|
- <div class="conList">
|
|
|
- <form:hidden id="pcBanner" path="pcBanner2" htmlEscape="false" maxlength="255" class="input-xlarge"/>
|
|
|
- <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>
|
|
|
- <div class="controls upload-content-image iconBox">
|
|
|
- <div class="conList">
|
|
|
- <form:hidden id="appletsBanner" path="appletsBanner2" htmlEscape="false" maxlength="255" class="input-xlarge"/>
|
|
|
- <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <input class="btn" class="del" style="width: 50px" onclick="batchDeletion(2)" value="删除"/>
|
|
|
- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(2)" value="一键排序"/>
|
|
|
+ <input class="btn" class="del" style="width: 50px" onclick="batchDeletion(2)" value="删除"/>
|
|
|
+<%-- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(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">
|
|
@@ -270,8 +354,8 @@
|
|
|
<div class="controls">
|
|
|
<form:radiobutton path="couponType3" class="couponType" label="请选择" value="99" checked="true" ></form:radiobutton>
|
|
|
<form:radiobutton path="couponType3" class="couponType" label="活动券" value="0"></form:radiobutton>
|
|
|
- <form:radiobutton path="couponType3" class="couponType" label="品类券" value="1"></form:radiobutton>
|
|
|
- <form:radiobutton path="couponType3" class="couponType" label="店铺券" value="3"></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>
|
|
|
<div class="control-group coupon-line l0" style="display:none">
|
|
@@ -319,31 +403,32 @@
|
|
|
<form:radiobutton path="productType3" value="2" label="指定商品" onclick="productShow(value,3)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <form:hidden path="productInfo3" id="productInfo3"/>
|
|
|
+
|
|
|
<div class="productData3" hidden="hidden">
|
|
|
+ <form:hidden path="productInfo3" id="productInfo3"/>
|
|
|
+<%-- <div class="control-group">--%>
|
|
|
+<%-- <label class="control-label"><font color="red">*</font>网站活动页banner:</label>--%>
|
|
|
+<%-- <div class="controls upload-content-image iconBox">--%>
|
|
|
+<%-- <div class="conList">--%>
|
|
|
+<%-- <form:hidden id="pcBanner" path="pcBanner3" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
|
|
|
+<%-- <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
|
|
|
+<%-- <br>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- <div class="control-group">--%>
|
|
|
+<%-- <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>--%>
|
|
|
+<%-- <div class="controls upload-content-image iconBox">--%>
|
|
|
+<%-- <div class="conList">--%>
|
|
|
+<%-- <form:hidden id="appletsBanner" path="appletsBanner3" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
|
|
|
+<%-- <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
|
|
|
+<%-- <br>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label"><font color="red">*</font>网站活动页banner:</label>
|
|
|
- <div class="controls upload-content-image iconBox">
|
|
|
- <div class="conList">
|
|
|
- <form:hidden id="pcBanner" path="pcBanner3" htmlEscape="false" maxlength="255" class="input-xlarge"/>
|
|
|
- <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>
|
|
|
- <div class="controls upload-content-image iconBox">
|
|
|
- <div class="conList">
|
|
|
- <form:hidden id="appletsBanner" path="appletsBanner3" htmlEscape="false" maxlength="255" class="input-xlarge"/>
|
|
|
- <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <input class="btn" class="del" style="width: 50px" onclick="batchDeletion(3)" value="删除"/>
|
|
|
- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(3)" value="一键排序"/>
|
|
|
+ <input class="btn" class="del" style="width: 50px" onclick="batchDeletion(3)" value="删除"/>
|
|
|
+<%-- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(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">
|
|
@@ -371,10 +456,10 @@
|
|
|
<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="99" checked="true" ></form:radiobutton>
|
|
|
+ <form:radiobutton path="couponType4" class="couponType" label="请选择" value="99" checked="true"></form:radiobutton>
|
|
|
<form:radiobutton path="couponType4" class="couponType" label="活动券" value="0"></form:radiobutton>
|
|
|
- <form:radiobutton path="couponType4" class="couponType" label="品类券" value="1"></form:radiobutton>
|
|
|
- <form:radiobutton path="couponType4" class="couponType" label="店铺券" value="3"></form:radiobutton>
|
|
|
+ <form:radiobutton path="couponType4" class="couponType" label="品类券" value="1" onclick="cType(4)"></form:radiobutton>
|
|
|
+ <form:radiobutton path="couponType4" class="couponType" label="店铺券" value="3" onclick="cType(4)"></form:radiobutton>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group coupon-line l0" style="display:none">
|
|
@@ -422,31 +507,32 @@
|
|
|
<form:radiobutton path="productType4" value="2" label="指定商品" onclick="productShow(value,4)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <form:hidden path="productInfo4" id="productInfo4"/>
|
|
|
+
|
|
|
<div class="productData4" hidden="hidden">
|
|
|
+ <form:hidden path="productInfo4" id="productInfo4"/>
|
|
|
+<%-- <div class="control-group">--%>
|
|
|
+<%-- <label class="control-label"><font color="red">*</font>网站活动页banner:</label>--%>
|
|
|
+<%-- <div class="controls upload-content-image iconBox">--%>
|
|
|
+<%-- <div class="conList">--%>
|
|
|
+<%-- <form:hidden id="pcBanner" path="pcBanner4" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
|
|
|
+<%-- <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
|
|
|
+<%-- <br>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- <div class="control-group">--%>
|
|
|
+<%-- <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>--%>
|
|
|
+<%-- <div class="controls upload-content-image iconBox">--%>
|
|
|
+<%-- <div class="conList">--%>
|
|
|
+<%-- <form:hidden id="appletsBanner" path="appletsBanner4" htmlEscape="false" maxlength="255" class="input-xlarge"/>--%>
|
|
|
+<%-- <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>--%>
|
|
|
+<%-- <br>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
+<%-- </div>--%>
|
|
|
<div class="control-group">
|
|
|
- <label class="control-label"><font color="red">*</font>网站活动页banner:</label>
|
|
|
- <div class="controls upload-content-image iconBox">
|
|
|
- <div class="conList">
|
|
|
- <form:hidden id="pcBanner" path="pcBanner4" htmlEscape="false" maxlength="255" class="input-xlarge"/>
|
|
|
- <sys:ckfinder input="pcBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <label class="control-label"><font color="red">*</font>小程序活动页banner:</label>
|
|
|
- <div class="controls upload-content-image iconBox">
|
|
|
- <div class="conList">
|
|
|
- <form:hidden id="appletsBanner" path="appletsBanner4" htmlEscape="false" maxlength="255" class="input-xlarge"/>
|
|
|
- <sys:ckfinder input="appletsBanner" type="images" uploadPath="/photo" selectMultiple="false" maxWidth="100" maxHeight="100"/>
|
|
|
- <br>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="control-group">
|
|
|
- <input class="btn" class="del" style="width: 50px" onclick="batchDeletion(4)" value="删除"/>
|
|
|
- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(4)" value="一键排序"/>
|
|
|
+ <input class="btn" class="del" style="width: 50px" onclick="batchDeletion(4)" value="删除"/>
|
|
|
+<%-- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort(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">
|
|
@@ -493,6 +579,11 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+
|
|
|
+ function cType(id){
|
|
|
+ $("#couponWrap"+id).find(".productData"+id).hide();
|
|
|
+ }
|
|
|
+
|
|
|
// 点击添加供应商
|
|
|
function showSelectShop(id) {
|
|
|
var url = "${ctx}/coupon/cmCoupon/toAddShop";
|
|
@@ -533,73 +624,73 @@
|
|
|
<%-- }--%>
|
|
|
<%--});--%>
|
|
|
|
|
|
- $(function () {
|
|
|
- $('.upload-content-image .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
|
|
|
- $('.upload-content-image .conList .btn:nth-of-type(2)').after('<img class="cancel-upload-image" src="/static/images/close-btn1.png">').remove();
|
|
|
- $('.upload-content-image .conList').find('.cancel-upload-image').hide();
|
|
|
- var observeEleImage = document.getElementsByClassName('upload-content-image')[0];
|
|
|
- var observeEleImage1 = document.getElementsByClassName('upload-content-image')[1];
|
|
|
- var MutationObserverImage = window.MutationObserver || window.WebKitMutationObserver;
|
|
|
- var MutationObserverConfigImage = {
|
|
|
- childList: true,
|
|
|
- subtree: true,
|
|
|
- characterData: true
|
|
|
- };
|
|
|
- var observerImage = new MutationObserverImage(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-image').show();
|
|
|
- if (nextEle.hasClass('hide-pic-image')) {
|
|
|
- nextEle.removeClass('hide-pic-image');
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- });
|
|
|
- observerImage.observe(observeEleImage, MutationObserverConfigImage);
|
|
|
- observerImage.observe(observeEleImage1, MutationObserverConfigImage);
|
|
|
-
|
|
|
- $('body').on('click', '.upload-content-image li', function () {
|
|
|
- var index = $(this).closest('.conList').index() + 1,
|
|
|
- str = 'remarkImage' + index + 'FinderOpen';
|
|
|
- eval(str + '()');
|
|
|
- });
|
|
|
- $('body').on('click', '.cancel-upload-image', function () {
|
|
|
- var wrapper = $(this).closest('.conList');
|
|
|
- wrapper.find('li').css('z-index', '-1');
|
|
|
- wrapper.find('input').val('');
|
|
|
- $(this).hide();
|
|
|
- wrapper.removeClass("hide-pic-image");
|
|
|
- wrapper.parent().append(wrapper.clone());
|
|
|
- wrapper.remove();
|
|
|
- $(".conList").each(function (i, ele) {
|
|
|
- if ($(ele).find("input.input-xlarge").val()) {
|
|
|
- $(ele).next().removeClass("hide-pic-image")
|
|
|
- }
|
|
|
- })
|
|
|
- });
|
|
|
- $(window).on("load", function () {
|
|
|
- setTimeout(function () {
|
|
|
- var input = $("#pcBanner");
|
|
|
- if (input.val()) {
|
|
|
- input.next().find("li").css("z-index", "99");
|
|
|
- input.parents(".conList").find(".cancel-upload-image").show();
|
|
|
- input.parents(".conList").next().removeClass("hide-pic-image")
|
|
|
- }
|
|
|
- input = $("#appletsBanner");
|
|
|
- if (input.val()) {
|
|
|
- input.next().find("li").css("z-index", "99");
|
|
|
- input.parents(".conList").find(".cancel-upload-image").show();
|
|
|
- input.parents(".conList").next().removeClass("hide-pic-image")
|
|
|
- }
|
|
|
- }, 500);
|
|
|
- });
|
|
|
- productShow()
|
|
|
- });
|
|
|
+ // $(function () {
|
|
|
+ // $('.upload-content-image .conList .btn:nth-of-type(1)').html('<div><span>+</span><h5>选择图片</h5></div>');
|
|
|
+ // $('.upload-content-image .conList .btn:nth-of-type(2)').after('<img class="cancel-upload-image" src="/static/images/close-btn1.png">').remove();
|
|
|
+ // $('.upload-content-image .conList').find('.cancel-upload-image').hide();
|
|
|
+ // var observeEleImage = document.getElementsByClassName('upload-content-image')[0];
|
|
|
+ // var observeEleImage1 = document.getElementsByClassName('upload-content-image')[1];
|
|
|
+ // var MutationObserverImage = window.MutationObserver || window.WebKitMutationObserver;
|
|
|
+ // var MutationObserverConfigImage = {
|
|
|
+ // childList: true,
|
|
|
+ // subtree: true,
|
|
|
+ // characterData: true
|
|
|
+ // };
|
|
|
+ // var observerImage = new MutationObserverImage(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-image').show();
|
|
|
+ // if (nextEle.hasClass('hide-pic-image')) {
|
|
|
+ // nextEle.removeClass('hide-pic-image');
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // });
|
|
|
+ // observerImage.observe(observeEleImage, MutationObserverConfigImage);
|
|
|
+ // observerImage.observe(observeEleImage1, MutationObserverConfigImage);
|
|
|
+ //
|
|
|
+ // $('body').on('click', '.upload-content-image li', function () {
|
|
|
+ // var index = $(this).closest('.conList').index() + 1,
|
|
|
+ // str = 'remarkImage' + index + 'FinderOpen';
|
|
|
+ // eval(str + '()');
|
|
|
+ // });
|
|
|
+ // $('body').on('click', '.cancel-upload-image', function () {
|
|
|
+ // var wrapper = $(this).closest('.conList');
|
|
|
+ // wrapper.find('li').css('z-index', '-1');
|
|
|
+ // wrapper.find('input').val('');
|
|
|
+ // $(this).hide();
|
|
|
+ // wrapper.removeClass("hide-pic-image");
|
|
|
+ // wrapper.parent().append(wrapper.clone());
|
|
|
+ // wrapper.remove();
|
|
|
+ // $(".conList").each(function (i, ele) {
|
|
|
+ // if ($(ele).find("input.input-xlarge").val()) {
|
|
|
+ // $(ele).next().removeClass("hide-pic-image")
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // });
|
|
|
+ // $(window).on("load", function () {
|
|
|
+ // setTimeout(function () {
|
|
|
+ // var input = $("#pcBanner");
|
|
|
+ // if (input.val()) {
|
|
|
+ // input.next().find("li").css("z-index", "99");
|
|
|
+ // input.parents(".conList").find(".cancel-upload-image").show();
|
|
|
+ // input.parents(".conList").next().removeClass("hide-pic-image")
|
|
|
+ // }
|
|
|
+ // input = $("#appletsBanner");
|
|
|
+ // if (input.val()) {
|
|
|
+ // input.next().find("li").css("z-index", "99");
|
|
|
+ // input.parents(".conList").find(".cancel-upload-image").show();
|
|
|
+ // input.parents(".conList").next().removeClass("hide-pic-image")
|
|
|
+ // }
|
|
|
+ // }, 500);
|
|
|
+ // });
|
|
|
+ // // productShow(value,id)
|
|
|
+ // });
|
|
|
|
|
|
|
|
|
function productShow(value,id) {
|
|
@@ -818,7 +909,6 @@
|
|
|
batchSaveSort(id);
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
function updateAppletsStatus(status, index, id) {
|
|
@@ -915,7 +1005,7 @@
|
|
|
data.contractMobile +
|
|
|
'</td>' +
|
|
|
'<td>' +
|
|
|
- '<a href="javascript:;" onclick="delectShop())">删除</a>' +
|
|
|
+ '<a href="javascript:;" onclick="delectShop('+id+')">删除</a>' +
|
|
|
'</td>' +
|
|
|
'</tr>';
|
|
|
$("#couponWrap"+id).find(".hotSearchShop").html(html);
|
|
@@ -924,11 +1014,11 @@
|
|
|
$("#shopId"+id).val(data.shopId);
|
|
|
}
|
|
|
|
|
|
- function delectShop() {
|
|
|
+ function delectShop(id) {
|
|
|
return confirmx("确定删除吗?", function () {
|
|
|
- $("#chooseShop").show();
|
|
|
- $("#couponWrap").find(".contentTableShop").hide();
|
|
|
- $("#shopId").val("");
|
|
|
+ $("#chooseShop"+id).show();
|
|
|
+ $("#couponWrap"+id).find(".contentTableShop").hide();
|
|
|
+ $("#shopId"+id).val("");
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -988,6 +1078,13 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ function clickAllSelect(ckb) {
|
|
|
+ var isChecked = ckb.checked;
|
|
|
+ $(".check-item").attr('checked', isChecked);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @param obj
|
|
|
* jquery控制input只能输入数字
|
|
@@ -1000,14 +1097,6 @@
|
|
|
//$("#name").focus();
|
|
|
$("#inputForm").validate({
|
|
|
submitHandler: function (form) {
|
|
|
- var couponAmount1 = $("#couponAmount1").val() * 1;
|
|
|
- var touchPrice1 = $("#touchPrice1").val() * 1;
|
|
|
- if (couponAmount1 >= touchPrice1) {
|
|
|
- alertx("【优惠券1】优惠券金额必须小于优惠条件金额");
|
|
|
- return false;
|
|
|
- }
|
|
|
- var month = $("#month").val();
|
|
|
- // 判断月份 ...
|
|
|
|
|
|
loading('正在提交,请稍等...');
|
|
|
form.submit();
|