|
@@ -15,6 +15,30 @@
|
|
|
margin-right:15px;
|
|
|
}
|
|
|
</style>
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(document).ready(function() {
|
|
|
+ $("#inputForm").validate({
|
|
|
+ submitHandler: function (form) {
|
|
|
+ if (imageList1.length > 0) {
|
|
|
+ var productInfo = JSON.stringify(imageList1);
|
|
|
+ $('#productInfo1').val(productInfo1);
|
|
|
+ }
|
|
|
+ if (imageList2.length > 0) {
|
|
|
+ var productInfo = JSON.stringify(imageList2);
|
|
|
+ $('#productInfo2').val(productInfo2);
|
|
|
+ }
|
|
|
+ if (imageList3.length > 0) {
|
|
|
+ var productInfo = JSON.stringify(imageList3);
|
|
|
+ $('#productInfo3').val(productInfo3);
|
|
|
+ }
|
|
|
+ if (imageList4.length > 0) {
|
|
|
+ var productInfo = JSON.stringify(imageList4);
|
|
|
+ $('#productInfo4').val(productInfo4);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ </script>
|
|
|
</head>
|
|
|
<body>
|
|
|
<ul class="nav nav-tabs">
|
|
@@ -23,11 +47,8 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
<br/>
|
|
|
-<%--<font style="color: red;margin-left: 20px">品类券只适合在某种品类需要优惠时创建,适用于该品类商品和全部客户。</font><br><br>--%>
|
|
|
+
|
|
|
<form:form id="inputForm" modelAttribute="svipcouponForm" action="${ctx}/vip/cmCoupon/save" method="post" class="form-horizontal">
|
|
|
- <%-- <form:hidden path="id"/>--%>
|
|
|
- <%-- <form:hidden path="productInfo" id="productInfo"/>--%>
|
|
|
- <%-- <input type="hidden" name="couponType" value="1"/>--%>
|
|
|
<sys:message content="${message}"/>
|
|
|
<div class="control-group">
|
|
|
<label class="control-label"><font color="red">*</font>优惠月份:</label>
|
|
@@ -36,7 +57,7 @@
|
|
|
onclick="WdatePicker({dateFmt:'yyyy-MM',isShowClear:false});"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="coupon-wrap">
|
|
|
+ <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">
|
|
@@ -49,9 +70,9 @@
|
|
|
<div class="control-group coupon-line l0" style="display:none">
|
|
|
<label class="control-label"><font color="red">*</font>供应商:</label>
|
|
|
<div class="controls">
|
|
|
- <a href="javascript:void(0);" onclick="showSelectShop()" id="chooseShop">请选择供应商</a>
|
|
|
+ <a href="javascript:void(0);" onclick="showSelectShop(1)" id="chooseShop1">请选择供应商</a>
|
|
|
<form:hidden path="shopId1"/>
|
|
|
- <table id="contentTableShop" class="table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
+ <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>机构名称</th>
|
|
@@ -61,7 +82,7 @@
|
|
|
<th>操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
- <tbody id="hotSearchShop1"></tbody>
|
|
|
+ <tbody class="hotSearchShop"></tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -88,57 +109,59 @@
|
|
|
<div class="control-group coupon-line l4" style="display:none">
|
|
|
<label class="control-label"><font color="red">*</font>优惠商品:</label>
|
|
|
<div class="controls">
|
|
|
- <form:radiobutton path="productType1" value="1" label="全商城商品" checked="${empty cmCoupon.categoryType ? true:false}"/>
|
|
|
- <form:radiobutton path="productType1" value="2" label="指定商品"/>
|
|
|
+ <form:radiobutton path="productType1" value="1" label="全商城商品" onclick="productShow(value,1)" checked="${empty cmCoupon.productType ? true:false}"/>
|
|
|
+ <form:radiobutton path="productType1" value="2" label="指定商品" onclick="productShow(value,1)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
-<%-- <div class="productData" hidden="hidden">--%>
|
|
|
-<%-- <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="pcBanner" 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="appletsBanner" 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" id="del" style="width: 50px" onclick="batchDeletion()" value="删除"/> --%>
|
|
|
-<%-- <input class="btn btn-primary" style="width: 70px" onclick="batchSaveSort()" value="一键排序"/> --%>
|
|
|
-<%-- <input class="btn btn-primary" style="width: 50px" onclick="showSelectProduct()" value="添加"/>--%>
|
|
|
-<%-- <br><br>--%>
|
|
|
-<%-- <table id="contentTableProduct" class="table table-striped table-bordered table-condensed" hidden="hidden">--%>
|
|
|
-<%-- <thead>--%>
|
|
|
-<%-- <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>--%>
|
|
|
-<%-- </thead>--%>
|
|
|
-<%-- <tbody id="hotSearchProduct"></tbody>--%>
|
|
|
-<%-- </table>--%>
|
|
|
-<%-- </div>--%>
|
|
|
-<%-- </div>--%>
|
|
|
+ <form:hidden path="productInfo1" id="productInfo1"/>
|
|
|
+ <div class="productData1" hidden="hidden">
|
|
|
+ <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 btn-primary" style="width: 50px" onclick="showSelectProduct(1)" value="添加"/>
|
|
|
+ <br><br>
|
|
|
+ <table class="contentTableProduct table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
+ <thead>
|
|
|
+ <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>
|
|
|
+ </thead>
|
|
|
+ <tbody class="hotSearchProduct"></tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
- <div class="coupon-wrap">
|
|
|
+ <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">
|
|
@@ -151,9 +174,9 @@
|
|
|
<div class="control-group coupon-line l0" style="display:none">
|
|
|
<label class="control-label"><font color="red">*</font>供应商:</label>
|
|
|
<div class="controls">
|
|
|
- <a href="javascript:void(0);" onclick="showSelectShop()" id="chooseShop">请选择供应商</a>
|
|
|
+ <a href="javascript:void(0);" onclick="showSelectShop(2)" id="chooseShop2">请选择供应商</a>
|
|
|
<form:hidden path="shopId2"/>
|
|
|
- <table id="contentTableShop" class="table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
+ <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>机构名称</th>
|
|
@@ -163,7 +186,7 @@
|
|
|
<th>操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
- <tbody id="hotSearchShop2"></tbody>
|
|
|
+ <tbody class="hotSearchShop"></tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -189,12 +212,59 @@
|
|
|
<div class="control-group coupon-line l4" style="display:none">
|
|
|
<label class="control-label"><font color="red">*</font>优惠商品:</label>
|
|
|
<div class="controls">
|
|
|
- <form:radiobutton path="productType2" value="1" label="全商城商品" checked="${empty cmCoupon.categoryType ? true:false}"/>
|
|
|
- <form:radiobutton path="productType2" value="2" label="指定商品"/>
|
|
|
+ <form:radiobutton path="productType2" value="1" label="全商城商品" onclick="productShow(value,2)" checked="${empty cmCoupon.productType ? true:false}"/>
|
|
|
+ <form:radiobutton path="productType2" value="2" label="指定商品" onclick="productShow(value,2)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <form:hidden path="productInfo2" id="productInfo2"/>
|
|
|
+ <div class="productData2" hidden="hidden">
|
|
|
+ <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 btn-primary" style="width: 50px" onclick="showSelectProduct(2)" value="添加"/>
|
|
|
+ <br><br>
|
|
|
+ <table class="contentTableProduct table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
+ <thead>
|
|
|
+ <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>
|
|
|
+ </thead>
|
|
|
+ <tbody class="hotSearchProduct"></tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
- <div class="coupon-wrap">
|
|
|
+ <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">
|
|
@@ -205,11 +275,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group coupon-line l0" style="display:none">
|
|
|
-
|
|
|
+ <label class="control-label"><font color="red">*</font>供应商:</label>
|
|
|
<div class="controls">
|
|
|
- <a href="javascript:;">请选择供应商</a>
|
|
|
+ <a href="javascript:void(0);" onclick="showSelectShop(3)" id="chooseShop3">请选择供应商</a>
|
|
|
<form:hidden path="shopId3"/>
|
|
|
- <table id="contentTableShop" class="table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
+ <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>机构名称</th>
|
|
@@ -219,7 +289,7 @@
|
|
|
<th>操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
- <tbody id="hotSearchShop3"></tbody>
|
|
|
+ <tbody class="hotSearchShop"></tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -245,12 +315,59 @@
|
|
|
<div class="control-group coupon-line l4" style="display:none">
|
|
|
<label class="control-label"><font color="red">*</font>优惠商品:</label>
|
|
|
<div class="controls">
|
|
|
- <form:radiobutton path="productType3" value="1" label="全商城商品" checked="${empty cmCoupon.categoryType ? true:false}"/>
|
|
|
- <form:radiobutton path="productType3" value="2" label="指定商品"/>
|
|
|
+ <form:radiobutton path="productType3" value="1" label="全商城商品" onclick="productShow(value,3)" checked="${empty cmCoupon.productType ? true:false}"/>
|
|
|
+ <form:radiobutton path="productType3" value="2" label="指定商品" onclick="productShow(value,3)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <form:hidden path="productInfo3" id="productInfo3"/>
|
|
|
+ <div class="productData3" hidden="hidden">
|
|
|
+ <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 btn-primary" style="width: 50px" onclick="showSelectProduct(3)" value="添加"/>
|
|
|
+ <br><br>
|
|
|
+ <table class="contentTableProduct table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
+ <thead>
|
|
|
+ <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>
|
|
|
+ </thead>
|
|
|
+ <tbody class="hotSearchProduct"></tbody>
|
|
|
+ </table>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
</div>
|
|
|
- <div class="coupon-wrap">
|
|
|
+ <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">
|
|
@@ -263,23 +380,20 @@
|
|
|
<div class="control-group coupon-line l0" style="display:none">
|
|
|
<label class="control-label"><font color="red">*</font>供应商:</label>
|
|
|
<div class="controls">
|
|
|
- <div class="controls">
|
|
|
- <a href="javascript:void(0);" onclick="showSelectShop()" id="chooseShop">请选择供应商</a>
|
|
|
- <form:hidden path="shopId4"/>
|
|
|
- <table id="contentTableShop" class="table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>机构名称</th>
|
|
|
- <th>机构简称</th>
|
|
|
- <th>联系人</th>
|
|
|
- <th>手机号</th>
|
|
|
- <th>操作</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="hotSearchShop4"></tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
-
|
|
|
+ <a href="javascript:void(0);" onclick="showSelectShop(4)" id="chooseShop4">请选择供应商</a>
|
|
|
+ <form:hidden path="shopId4"/>
|
|
|
+ <table class="contentTableShop table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>机构名称</th>
|
|
|
+ <th>机构简称</th>
|
|
|
+ <th>联系人</th>
|
|
|
+ <th>手机号</th>
|
|
|
+ <th>操作</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody class="hotSearchShop"></tbody>
|
|
|
+ </table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="control-group coupon-line l1" style="display:none">
|
|
@@ -304,8 +418,54 @@
|
|
|
<div class="control-group coupon-line l4" style="display:none">
|
|
|
<label class="control-label"><font color="red">*</font>优惠商品:</label>
|
|
|
<div class="controls">
|
|
|
- <form:radiobutton path="productType4" value="1" label="全商城商品" checked="${empty cmCoupon.categoryType ? true:false}"/>
|
|
|
- <form:radiobutton path="productType4" value="2" label="指定商品"/>
|
|
|
+ <form:radiobutton path="productType4" value="1" label="全商城商品" onclick="productShow(value,4)" checked="${empty cmCoupon.productType ? true:false}"/>
|
|
|
+ <form:radiobutton path="productType4" value="2" label="指定商品" onclick="productShow(value,4)"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <form:hidden path="productInfo4" id="productInfo4"/>
|
|
|
+ <div class="productData4" hidden="hidden">
|
|
|
+ <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 btn-primary" style="width: 50px" onclick="showSelectProduct(4)" value="添加"/>
|
|
|
+ <br><br>
|
|
|
+ <table class="contentTableProduct table table-striped table-bordered table-condensed" hidden="hidden">
|
|
|
+ <thead>
|
|
|
+ <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>
|
|
|
+ </thead>
|
|
|
+ <tbody class="hotSearchProduct"></tbody>
|
|
|
+ </table>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -334,7 +494,7 @@
|
|
|
});
|
|
|
|
|
|
// 点击添加供应商
|
|
|
- function showSelectShop() {
|
|
|
+ function showSelectShop(id) {
|
|
|
var url = "${ctx}/coupon/cmCoupon/toAddShop";
|
|
|
var title = '';
|
|
|
title = "选择供应商";
|
|
@@ -352,28 +512,395 @@
|
|
|
if ('1' == v && 1 == $jboxFrame.size() && 1 == $mainFrame.size()) {
|
|
|
var items = $jboxFrame[0].contentWindow.getCheckedItems();
|
|
|
console.log(items);
|
|
|
- appendShopOrderHead(items);
|
|
|
+ appendShopOrderHead(items, id);
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- $(function() {
|
|
|
- //店铺券供应商回显
|
|
|
- if (${not empty cmCoupon.shop}) {
|
|
|
- var shop = {
|
|
|
- "shopId": "${cmCoupon.shop.shopID}",
|
|
|
- "name": "${cmCoupon.shop.name}",
|
|
|
- "sname": "${cmCoupon.shop.sname}",
|
|
|
- "linkMan": "${cmCoupon.shop.linkMan}",
|
|
|
- "contractMobile": "${cmCoupon.shop.contractMobile}"
|
|
|
+ <%--$(function() {--%>
|
|
|
+ <%-- //店铺券供应商回显--%>
|
|
|
+ <%-- if (${not empty cmCoupon.shop}) {--%>
|
|
|
+ <%-- var shop = {--%>
|
|
|
+ <%-- "shopId": "${cmCoupon.shop.shopID}",--%>
|
|
|
+ <%-- "name": "${cmCoupon.shop.name}",--%>
|
|
|
+ <%-- "sname": "${cmCoupon.shop.sname}",--%>
|
|
|
+ <%-- "linkMan": "${cmCoupon.shop.linkMan}",--%>
|
|
|
+ <%-- "contractMobile": "${cmCoupon.shop.contractMobile}"--%>
|
|
|
+ <%-- }--%>
|
|
|
+ <%-- appendShopOrderHead(shop);--%>
|
|
|
+ <%-- }--%>
|
|
|
+ <%--});--%>
|
|
|
+
|
|
|
+ $(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 productShow(value,id) {
|
|
|
+ if (value == 2){
|
|
|
+ $(".productData"+id).show();
|
|
|
+ }else {
|
|
|
+ $(".productData"+id).hide();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ var productIds1 = '';
|
|
|
+ var productIds2 = '';
|
|
|
+ var productIds3 = '';
|
|
|
+ var productIds4 = '';
|
|
|
+ var imageList1 = [];
|
|
|
+ var imageList2 = [];
|
|
|
+ var imageList3 = [];
|
|
|
+ var imageList4 = [];
|
|
|
+ //点击添加
|
|
|
+ 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;
|
|
|
}
|
|
|
- appendShopOrderHead(shop);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ //一键排序
|
|
|
+ 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);
|
|
|
}
|
|
|
- });
|
|
|
|
|
|
- function appendShopOrderHead(data) {
|
|
|
+ }
|
|
|
+ //根据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 +
|
|
@@ -388,16 +915,79 @@
|
|
|
data.contractMobile +
|
|
|
'</td>' +
|
|
|
'<td>' +
|
|
|
- '<a href="javascript:;" onclick="delectShop()">删除</a>' +
|
|
|
+ '<a href="javascript:;" onclick="delectShop())">删除</a>' +
|
|
|
'</td>' +
|
|
|
'</tr>';
|
|
|
- $("#hotSearchShop").html(html);
|
|
|
- $("#chooseShop").hide();
|
|
|
- $('#contentTableShop').show();
|
|
|
- $("#shopId").val(data.shopId);
|
|
|
+ $("#couponWrap"+id).find(".hotSearchShop").html(html);
|
|
|
+ $("#chooseShop"+id).hide();
|
|
|
+ $("#couponWrap"+id).find(".contentTableShop").show();
|
|
|
+ $("#shopId"+id).val(data.shopId);
|
|
|
}
|
|
|
|
|
|
+ function delectShop() {
|
|
|
+ return confirmx("确定删除吗?", function () {
|
|
|
+ $("#chooseShop").show();
|
|
|
+ $("#couponWrap").find(".contentTableShop").hide();
|
|
|
+ $("#shopId").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");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
/**
|
|
|
* @param obj
|
|
|
* jquery控制input只能输入数字
|