Authored by chenchao

fix bug : all coupons add prd_limit

new add prd_limit display undefined
... ... @@ -191,13 +191,15 @@
<div class="col-sm-4">
<div class="col-sm-10">
<select id="useRange" class="form-control input-form" value="[[useRange]]">
<option value="">请选择</option>
[[if couponType!=6]]
<option value="0">分类</option>
[[/if]]
[[if couponType==1||couponType==3]]
<option value="2">店铺</option>
[[if couponType > 0]]
<option value="3">商品</option>
[[/if]]
<option value="2">店铺</option>
</select>&emsp;&emsp;
[[if useRange==1]]
... ... @@ -206,7 +208,7 @@
[[if useRange==3]]
<a class="btn btn-primary btn-xs" href="javascript:;" id="importPrds">导入商品</a>
[[/if]]
[[if useRange==2||couponType==6]]
[[if useRange==2]]
<a class="btn btn-primary btn-xs" href="javascript:;" id="addShop">添加店铺</a>
[[/if]]
[[if useRange==0&&couponType!=6]]
... ... @@ -241,7 +243,7 @@
</div>
</div>
[[/if ]]
[[if couponType !=1 && couponType!=3]]
[[if couponType !=1 && couponType!=3 && useRange!=3 ]]
<div class="form-group">
<label class="col-sm-2 control-label">SKN除外</label>
<div class="col-sm-4">
... ...
... ... @@ -33,7 +33,11 @@ var _import = function(el, type) {
response.data.successList.forEach(function(o,i){
import_skns.push(o.productSkn);
});
var productLimit = window.ViewModel.productLimit + "," + import_skns.join(",");
var productLimit = '';
if(window.ViewModel.productLimit){
productLimit += window.ViewModel.productLimit + ",";
}
productLimit += import_skns.join(",");
$("textarea[name=\"productLimit\"]").val(productLimit);
}
}else{
... ...