fix bug : all coupons add prd_limit
new add prd_limit display undefined
Showing
2 changed files
with
11 additions
and
5 deletions
@@ -191,13 +191,15 @@ | @@ -191,13 +191,15 @@ | ||
191 | <div class="col-sm-4"> | 191 | <div class="col-sm-4"> |
192 | <div class="col-sm-10"> | 192 | <div class="col-sm-10"> |
193 | <select id="useRange" class="form-control input-form" value="[[useRange]]"> | 193 | <select id="useRange" class="form-control input-form" value="[[useRange]]"> |
194 | + <option value="">请选择</option> | ||
194 | [[if couponType!=6]] | 195 | [[if couponType!=6]] |
195 | <option value="0">分类</option> | 196 | <option value="0">分类</option> |
196 | [[/if]] | 197 | [[/if]] |
197 | - [[if couponType==1||couponType==3]] | 198 | + <option value="2">店铺</option> |
199 | + [[if couponType > 0]] | ||
198 | <option value="3">商品</option> | 200 | <option value="3">商品</option> |
199 | [[/if]] | 201 | [[/if]] |
200 | - <option value="2">店铺</option> | 202 | + |
201 | </select>   | 203 | </select>   |
202 | 204 | ||
203 | [[if useRange==1]] | 205 | [[if useRange==1]] |
@@ -206,7 +208,7 @@ | @@ -206,7 +208,7 @@ | ||
206 | [[if useRange==3]] | 208 | [[if useRange==3]] |
207 | <a class="btn btn-primary btn-xs" href="javascript:;" id="importPrds">导入商品</a> | 209 | <a class="btn btn-primary btn-xs" href="javascript:;" id="importPrds">导入商品</a> |
208 | [[/if]] | 210 | [[/if]] |
209 | - [[if useRange==2||couponType==6]] | 211 | + [[if useRange==2]] |
210 | <a class="btn btn-primary btn-xs" href="javascript:;" id="addShop">添加店铺</a> | 212 | <a class="btn btn-primary btn-xs" href="javascript:;" id="addShop">添加店铺</a> |
211 | [[/if]] | 213 | [[/if]] |
212 | [[if useRange==0&&couponType!=6]] | 214 | [[if useRange==0&&couponType!=6]] |
@@ -241,7 +243,7 @@ | @@ -241,7 +243,7 @@ | ||
241 | </div> | 243 | </div> |
242 | </div> | 244 | </div> |
243 | [[/if ]] | 245 | [[/if ]] |
244 | - [[if couponType !=1 && couponType!=3]] | 246 | + [[if couponType !=1 && couponType!=3 && useRange!=3 ]] |
245 | <div class="form-group"> | 247 | <div class="form-group"> |
246 | <label class="col-sm-2 control-label">SKN除外</label> | 248 | <label class="col-sm-2 control-label">SKN除外</label> |
247 | <div class="col-sm-4"> | 249 | <div class="col-sm-4"> |
@@ -33,7 +33,11 @@ var _import = function(el, type) { | @@ -33,7 +33,11 @@ var _import = function(el, type) { | ||
33 | response.data.successList.forEach(function(o,i){ | 33 | response.data.successList.forEach(function(o,i){ |
34 | import_skns.push(o.productSkn); | 34 | import_skns.push(o.productSkn); |
35 | }); | 35 | }); |
36 | - var productLimit = window.ViewModel.productLimit + "," + import_skns.join(","); | 36 | + var productLimit = ''; |
37 | + if(window.ViewModel.productLimit){ | ||
38 | + productLimit += window.ViewModel.productLimit + ","; | ||
39 | + } | ||
40 | + productLimit += import_skns.join(","); | ||
37 | $("textarea[name=\"productLimit\"]").val(productLimit); | 41 | $("textarea[name=\"productLimit\"]").val(productLimit); |
38 | } | 42 | } |
39 | }else{ | 43 | }else{ |
-
Please register or login to post a comment