Authored by 匡佳华

优惠券详情页添加展示范围

@@ -383,7 +383,22 @@ @@ -383,7 +383,22 @@
383 </div> 383 </div>
384 </div> 384 </div>
385 </div> 385 </div>
  386 + </div>
  387 +
  388 + <div class="panel-heading">
  389 + <h4 class="panel-title">展示范围</h4>
  390 + </div>
  391 + <div class="panel-body">
  392 + <div class="row">
  393 + <div class="form-group">
  394 +
  395 + <label class="col-sm-2 control-label">展示范围</label>
386 396
  397 + <div class="col-sm-8">
  398 + <p>[[showScope]]</p>
  399 + </div>
  400 + </div>
  401 + </div>
387 </div> 402 </div>
388 </div> 403 </div>
389 </script> 404 </script>
@@ -20,8 +20,8 @@ new common.dropDown({el: '#filter-feeSharingType'}); @@ -20,8 +20,8 @@ new common.dropDown({el: '#filter-feeSharingType'});
20 20
21 var couponTypes = ["活动券", "B券", "券码", "生日券", "免邮券", "店铺券", "分享券", "会员营销券"]; 21 var couponTypes = ["活动券", "B券", "券码", "生日券", "免邮券", "店铺券", "分享券", "会员营销券"];
22 var useLimitTypes = ["无限制", "货物件数限制", "订单金额限制"]; 22 var useLimitTypes = ["无限制", "货物件数限制", "订单金额限制"];
23 -// var customTypes = ["新客户", "银卡会员", "金卡会员", "白金卡会员", "普通用户(不含新客)"];  
24 var customTypes = {1: "新客户", 2: "银卡会员", 3: "金卡会员", 4: "白金卡会员", 5: "普通用户(不含新客)", 9: "学生"}; 23 var customTypes = {1: "新客户", 2: "银卡会员", 3: "金卡会员", 4: "白金卡会员", 5: "普通用户(不含新客)", 9: "学生"};
  24 +var showScopes = {1: "购物车展示", 2: "详情页展示", 3:"店铺展示"}
25 var shopPriceLimitsTable = {1: "成交价低于吊牌价三折", 2: "限量商品"}; 25 var shopPriceLimitsTable = {1: "成交价低于吊牌价三折", 2: "限量商品"};
26 var thirdTypeEnum = {1: "微信", 2: "支付宝", 3: "微薄"}; 26 var thirdTypeEnum = {1: "微信", 2: "支付宝", 3: "微薄"};
27 27
@@ -379,6 +379,20 @@ $(document).on('click', '.coupon-info', function () { @@ -379,6 +379,20 @@ $(document).on('click', '.coupon-info', function () {
379 item1.customType = "无"; 379 item1.customType = "无";
380 } 380 }
381 381
  382 + //优惠券展示范围
  383 + if (item1.showScope) {
  384 + console.info("showScope:" + item1.showScope);
  385 + item1.showScope = item1.showScope.split(",");
  386 + var scopeLen = item1.showScope.length;
  387 + var scopes = [];
  388 + for(var i = 0; i < scopeLen; i++){
  389 + scopes.push(showScopes[item1.showScope[i]]);
  390 + }
  391 + item1.showScope = scopes.join(",")
  392 + }else {
  393 + item1.showScope = "无"
  394 + }
  395 +
382 // shopPriceLimitsTable 396 // shopPriceLimitsTable
383 if (item1.shopPriceLimits) { 397 if (item1.shopPriceLimits) {
384 item1.shopPriceLimits = item1.shopPriceLimits.split(","); 398 item1.shopPriceLimits = item1.shopPriceLimits.split(",");