Merge branch 'dev_link' into test6.5
Showing
9 changed files
with
91 additions
and
14 deletions
@@ -59,7 +59,9 @@ module.exports = { | @@ -59,7 +59,9 @@ module.exports = { | ||
59 | productLimit:{type:String}, | 59 | productLimit:{type:String}, |
60 | isNew : {type:Number}, | 60 | isNew : {type:Number}, |
61 | isUseLimitRule:{type:String}, | 61 | isUseLimitRule:{type:String}, |
62 | - prdPoolLimit : {type:String} | 62 | + prdPoolLimit : {type:String}, |
63 | + cusPublicCouponName:{type:String}, | ||
64 | + publicCouponType:{type:Number} | ||
63 | } | 65 | } |
64 | }, | 66 | }, |
65 | reject: { | 67 | reject: { |
@@ -61,22 +61,38 @@ | @@ -61,22 +61,38 @@ | ||
61 | <input type="hidden" value="[[isNew]]" id="isNew" for="checkbox" | 61 | <input type="hidden" value="[[isNew]]" id="isNew" for="checkbox" |
62 | placeholder="前台展示"> | 62 | placeholder="前台展示"> |
63 | [[/if]] | 63 | [[/if]] |
64 | + [[if couponType=='3']] | ||
65 | + <label class="checkbox-inline"><input type="checkbox" value="1" name="isUseLimitRule" class="custom-1" [[if isUseLimitRule=='N']]checked[[/if]]> 市场通用</label> | ||
66 | + [[/if]] | ||
64 | </div> | 67 | </div> |
65 | </div> | 68 | </div> |
66 | </div> | 69 | </div> |
67 | [[if couponType==3]] | 70 | [[if couponType==3]] |
68 | <div class="row"> | 71 | <div class="row"> |
69 | - <div class="form-group"> | ||
70 | - <label class="col-sm-2 control-label"></label> | 72 | + <div class="form-group" > |
73 | + <label class="col-sm-2 control-label">生成方式 <span class="red">*</span></label> | ||
71 | 74 | ||
72 | - <div class="col-sm-8" > | 75 | + <div class="col-sm-8" class="radio-inline"> |
76 | + <input type="radio" name="publicCouponType" value="0" [[if publicCouponType==0]]checked[[/if]]>系统生成</label> | ||
73 | 77 | ||
74 | - <input type="checkbox" value="1" name="isUseLimitRule" class="custom-1" [[if isUseLimitRule=='N']]checked[[/if]]> 市场通用 | 78 | + <input type="radio" name="publicCouponType" value="1" [[if publicCouponType==1]]checked[[/if]]>手动配置</label> |
79 | + </div> | ||
80 | + </div> | ||
75 | </div> | 81 | </div> |
82 | + [[if publicCouponType==1]] | ||
83 | + <div class="row"> | ||
84 | + <div class="form-group"> | ||
85 | + <label class="col-sm-2 control-label">码值 <span class="red">*</span></label> | ||
86 | + | ||
87 | + <div class="col-sm-8" > | ||
88 | + <input type="text" name="cusPublicCouponName" placeholder='以"#"开头,支持数字,字母(不区分大小写),汉字,20字符内' class="form-control observe" | ||
89 | + data-field="cusPublicCouponName" required maxlength="20" value="[[cusPublicCouponName]]"> | ||
76 | </div> | 90 | </div> |
77 | </div> | 91 | </div> |
78 | </div> | 92 | </div> |
79 | [[/if]] | 93 | [[/if]] |
94 | + [[/if]] | ||
95 | + </div> | ||
80 | <div class="panel-heading"> | 96 | <div class="panel-heading"> |
81 | <h4 class="panel-title">基本信息</h4> | 97 | <h4 class="panel-title">基本信息</h4> |
82 | </div> | 98 | </div> |
@@ -95,7 +111,7 @@ | @@ -95,7 +111,7 @@ | ||
95 | <label class="col-sm-2 control-label">数量<i class="red">*</i></label> | 111 | <label class="col-sm-2 control-label">数量<i class="red">*</i></label> |
96 | 112 | ||
97 | <div class="col-sm-8"> | 113 | <div class="col-sm-8"> |
98 | - <input type="text" placeholder="数量" prompt="数量" class="form-control observe number" | 114 | + <input type="text" name="couponNum" placeholder="数量" prompt="数量" class="form-control observe number" |
99 | data-field="couponNum" | 115 | data-field="couponNum" |
100 | required value="[[couponNum]]" > | 116 | required value="[[couponNum]]" > |
101 | </div> | 117 | </div> |
@@ -96,6 +96,18 @@ | @@ -96,6 +96,18 @@ | ||
96 | </div> | 96 | </div> |
97 | </div> | 97 | </div> |
98 | </div> | 98 | </div> |
99 | + [[if publicCouponType=='1']] | ||
100 | + <div class="panel-body"> | ||
101 | + <div class="row"> | ||
102 | + <div class="form-group"> | ||
103 | + <label class="col-sm-2 control-label">码值</label> | ||
104 | + <div class="col-sm-8"> | ||
105 | + <p> [[cusPublicCouponName]]</p> | ||
106 | + </div> | ||
107 | + </div> | ||
108 | + </div> | ||
109 | + </div> | ||
110 | + [[/if]] | ||
99 | [[/if]] | 111 | [[/if]] |
100 | <div class="panel-heading"> | 112 | <div class="panel-heading"> |
101 | <h4 class="panel-title">基本信息</h4> | 113 | <h4 class="panel-title">基本信息</h4> |
@@ -25,8 +25,8 @@ | @@ -25,8 +25,8 @@ | ||
25 | <td>url类型</td> | 25 | <td>url类型</td> |
26 | <td> | 26 | <td> |
27 | <label>url类型<span style="color:red">*</span></label>   | 27 | <label>url类型<span style="color:red">*</span></label>   |
28 | - <label class="radio-inline"><input type="radio" name="urlType" value="1" checked>http</label> | ||
29 | - <label class="radio-inline"><input type="radio" name="urlType" value="2">https</label> | 28 | + <label class="radio-inline"><input type="radio" name="urlType" value="1" >http</label> |
29 | + <label class="radio-inline"><input type="radio" name="urlType" value="2" checked>https</label> | ||
30 | </td> | 30 | </td> |
31 | </tr> | 31 | </tr> |
32 | </table> | 32 | </table> |
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | <div class="form-group"> | 64 | <div class="form-group"> |
65 | <label>url类型<span style="color:red">*</span></label></label>   | 65 | <label>url类型<span style="color:red">*</span></label></label>   |
66 | <label class="radio-inline"><input type="radio" name="urlType" value="1">http</label> | 66 | <label class="radio-inline"><input type="radio" name="urlType" value="1">http</label> |
67 | - <label class="radio-inline"><input type="radio" name="urlType" value="2">https</label> | 67 | + <label class="radio-inline"><input type="radio" name="urlType" value="2" checked>https</label> |
68 | <input type="hidden" value="[[urlType]]" id="urlType" for="radio" required> | 68 | <input type="hidden" value="[[urlType]]" id="urlType" for="radio" required> |
69 | </div> | 69 | </div> |
70 | <div class="form-group"> | 70 | <div class="form-group"> |
@@ -49,7 +49,7 @@ var Iaccount = { | @@ -49,7 +49,7 @@ var Iaccount = { | ||
49 | var apiCofig = { | 49 | var apiCofig = { |
50 | //root:__dirname, | 50 | //root:__dirname, |
51 | EnvConst:{ | 51 | EnvConst:{ |
52 | - domain:"http://192.168.102.48:8088/platform", | 52 | + domain:"http://127.0.0.1:8088/platform", |
53 | //domain:"http://127.0.0.1:8088/platform", | 53 | //domain:"http://127.0.0.1:8088/platform", |
54 | // domain:"http://172.16.6.200:8088/platform", | 54 | // domain:"http://172.16.6.200:8088/platform", |
55 | //domain:"http://192.168.102.202:8088/platform", | 55 | //domain:"http://192.168.102.202:8088/platform", |
@@ -13,6 +13,7 @@ var endTimeObj; | @@ -13,6 +13,7 @@ var endTimeObj; | ||
13 | var customType = []; | 13 | var customType = []; |
14 | var shopPriceLimits=[]; | 14 | var shopPriceLimits=[]; |
15 | var isNew ; | 15 | var isNew ; |
16 | +var publicCouponType; | ||
16 | /** | 17 | /** |
17 | * 监听输入值的变化 | 18 | * 监听输入值的变化 |
18 | */ | 19 | */ |
@@ -172,7 +173,14 @@ var Bll = { | @@ -172,7 +173,14 @@ var Bll = { | ||
172 | if(couponBean.isNew){ | 173 | if(couponBean.isNew){ |
173 | isNew = couponBean.isNew; | 174 | isNew = couponBean.isNew; |
174 | } | 175 | } |
175 | - | 176 | + if(couponBean.couponType=='3'){ |
177 | + $("input[name='publicCouponType']").attr("disabled",true); | ||
178 | + if(couponBean.publicCouponType=='1'){ | ||
179 | + $("input[name='cusPublicCouponName']").attr("disabled",true); | ||
180 | + $("input[name='couponNum']").attr("disabled",true); | ||
181 | + $("#filter-couponType").attr("disabled",true); | ||
182 | + } | ||
183 | + } | ||
176 | } | 184 | } |
177 | 185 | ||
178 | }, | 186 | }, |
@@ -326,6 +334,21 @@ $(document).on("click", "input[name='customType']", function () { | @@ -326,6 +334,21 @@ $(document).on("click", "input[name='customType']", function () { | ||
326 | } | 334 | } |
327 | couponBean.customType = customType.join(","); | 335 | couponBean.customType = customType.join(","); |
328 | }); | 336 | }); |
337 | + | ||
338 | +$(document).on("click", "input[name='publicCouponType']", function () { | ||
339 | + publicCouponType = $(this).val(); | ||
340 | + console.log("publicCouponType",publicCouponType); | ||
341 | + if(publicCouponType=='1'){ | ||
342 | + couponBean.couponNum = 1; | ||
343 | + $("input[name='couponNum']").attr("disabled",true); | ||
344 | + } | ||
345 | + | ||
346 | + couponBean.publicCouponType = publicCouponType | ||
347 | + Bll.__render(couponBean, type);; | ||
348 | + if(publicCouponType=='1'){ | ||
349 | + $("input[name='couponNum']").attr("disabled",true); | ||
350 | + } | ||
351 | +}); | ||
329 | /** | 352 | /** |
330 | * 免邮券开关 | 353 | * 免邮券开关 |
331 | */ | 354 | */ |
@@ -377,6 +400,27 @@ $(document).on("click", "#save_brand", function () { | @@ -377,6 +400,27 @@ $(document).on("click", "#save_brand", function () { | ||
377 | return false; | 400 | return false; |
378 | } | 401 | } |
379 | } | 402 | } |
403 | + if(couponBean.couponType=='3'){ | ||
404 | + if(couponBean.publicCouponType=='0'){ | ||
405 | + couponBean.cusPublicCouponName = ''; | ||
406 | + } | ||
407 | + if(couponBean.publicCouponType=='1'){ | ||
408 | + var cusPublicCouponName = couponBean.cusPublicCouponName; | ||
409 | + if(cusPublicCouponName==''){ | ||
410 | + common.util.__tip('码值不能为空!', 'warning'); | ||
411 | + return false; | ||
412 | + } | ||
413 | + //名称不能包含特殊字符 | ||
414 | + if(!cusPublicCouponName.startsWith("#")||/[~^$@%&!*]/gi.test(cusPublicCouponName)){ | ||
415 | + common.util.__tip('码值格式输入错误', 'warning'); | ||
416 | + return false; | ||
417 | + } | ||
418 | + if(cusPublicCouponName.length>20){ | ||
419 | + common.util.__tip('码值不可超出20个汉字', 'warning'); | ||
420 | + return false; | ||
421 | + } | ||
422 | + } | ||
423 | + } | ||
380 | var productLimit = $("textarea[name=\"productLimit\"]").val(); | 424 | var productLimit = $("textarea[name=\"productLimit\"]").val(); |
381 | if(productLimit){ | 425 | if(productLimit){ |
382 | couponBean.productLimit = productLimit; | 426 | couponBean.productLimit = productLimit; |
@@ -27,7 +27,10 @@ var couponBean = { | @@ -27,7 +27,10 @@ var couponBean = { | ||
27 | shopIds:"", | 27 | shopIds:"", |
28 | feeSharingType:"0", | 28 | feeSharingType:"0", |
29 | feeSharingRatio:"", | 29 | feeSharingRatio:"", |
30 | - isUseLimitRule:"" | 30 | + isUseLimitRule:"", |
31 | + cusPublicCouponName:"", | ||
32 | + publicCouponType:"" | ||
33 | + | ||
31 | }; | 34 | }; |
32 | 35 | ||
33 | module.exports = couponBean; | 36 | module.exports = couponBean; |
@@ -9,12 +9,12 @@ common = require('../../../common/common'); | @@ -9,12 +9,12 @@ common = require('../../../common/common'); | ||
9 | var module = { | 9 | var module = { |
10 | channelId: 2, | 10 | channelId: 2, |
11 | linkType: "app", | 11 | linkType: "app", |
12 | - urlType:1 | 12 | + urlType:2 |
13 | }, | 13 | }, |
14 | singleModule = { | 14 | singleModule = { |
15 | action: "go.brand", | 15 | action: "go.brand", |
16 | linkType: "app", | 16 | linkType: "app", |
17 | - urlType:1 | 17 | + urlType:2 |
18 | }; | 18 | }; |
19 | var edit = new common.edit2("#generate-content"); | 19 | var edit = new common.edit2("#generate-content"); |
20 | var role = $("#wrap-content").attr("role"), | 20 | var role = $("#wrap-content").attr("role"), |
-
Please register or login to post a comment