Authored by pangjie

有效状态优惠券编辑

@@ -44,9 +44,9 @@ @@ -44,9 +44,9 @@
44 <div class="form-group"> 44 <div class="form-group">
45 <label class="col-sm-2 control-label">类型 <span class="red">*</span></label> 45 <label class="col-sm-2 control-label">类型 <span class="red">*</span></label>
46 46
47 - <div class="col-sm-8"> 47 + <div class="col-sm-8" >
48 <select id="filter-couponType" tabindex="-1" class="select2-offscreen brandBtn-group observe" 48 <select id="filter-couponType" tabindex="-1" class="select2-offscreen brandBtn-group observe"
49 - value="[[couponType]]" data-field="couponType" required> 49 + value="[[couponType]]" data-field="couponType" required [[if status==1]] disabled [[/if]]>
50 <option value="-1">优惠券类型</option> 50 <option value="-1">优惠券类型</option>
51 <option value="1">A</option> 51 <option value="1">A</option>
52 <option value="2">B</option> 52 <option value="2">B</option>
@@ -242,7 +242,7 @@ @@ -242,7 +242,7 @@
242 242
243 <div class="col-sm-4"> 243 <div class="col-sm-4">
244 <input type="text" match="numbers" class="form-control observe " data-field="couponAmount" 244 <input type="text" match="numbers" class="form-control observe " data-field="couponAmount"
245 - value="[[couponAmount]]" required placeholder="面额"> 245 + value="[[couponAmount]]" [[if status==1]] disabled [[/if]] required placeholder="面额">
246 </div> 246 </div>
247 <label class="col-sm-1 control-label"></label> 247 <label class="col-sm-1 control-label"></label>
248 </div> 248 </div>
@@ -94,14 +94,14 @@ var Bll = { @@ -94,14 +94,14 @@ var Bll = {
94 } 94 }
95 } 95 }
96 }, 96 },
97 - 97 + //modified by jie.pang@yoho.cn:20160812 去掉隐藏的功能
98 checkSortNum: function () { 98 checkSortNum: function () {
99 - if ($('.sort-wrap').find('.row').size() > 1) {  
100 - $('.sort-wrap').find('.row').find('.add-sort-btn').hide().end().find('.del-sort-btn').show();  
101 - $('.sort-wrap').find('.row:last').find('.add-sort-btn').show().end().find('.del-sort-btn').show();  
102 - } else {  
103 - $('.sort-wrap').find('.row:first').find('.add-sort-btn').show().end().find('.del-sort-btn').hide();  
104 - } 99 + // if ($('.sort-wrap').find('.row').size() > 1) {
  100 + // $('.sort-wrap').find('.row').find('.add-sort-btn').hide().end().find('.del-sort-btn').show();
  101 + // $('.sort-wrap').find('.row:last').find('.add-sort-btn').show().end().find('.del-sort-btn').show();
  102 + // } else {
  103 + // $('.sort-wrap').find('.row:first').find('.add-sort-btn').show().end().find('.del-sort-btn').hide();
  104 + // }
105 }, 105 },
106 setTabTree: function () {//分类数据,设置tabTree 106 setTabTree: function () {//分类数据,设置tabTree
107 var data = {}, NUMN = {}; 107 var data = {}, NUMN = {};
@@ -247,6 +247,8 @@ var initSort = function () {//初始化分类弹框 @@ -247,6 +247,8 @@ var initSort = function () {//初始化分类弹框
247 247
248 } 248 }
249 couponBean.sortLimit = ids.join(','); 249 couponBean.sortLimit = ids.join(',');
  250 + }else{
  251 + couponBean.sortLimit="";
250 } 252 }
251 if (Bll.selectSorts.length > 0) { 253 if (Bll.selectSorts.length > 0) {
252 var sorts = [], sortList = []; 254 var sorts = [], sortList = [];
@@ -262,6 +264,9 @@ var initSort = function () {//初始化分类弹框 @@ -262,6 +264,9 @@ var initSort = function () {//初始化分类弹框
262 264
263 couponBean.sortsList = sortList.join(";"); 265 couponBean.sortsList = sortList.join(";");
264 Bll.__render(couponBean, type); 266 Bll.__render(couponBean, type);
  267 + }else{
  268 + couponBean.sortsList = "";
  269 + Bll.__render(couponBean, type);
265 } 270 }
266 }, 271 },
267 css: "btn btn-primary" 272 css: "btn btn-primary"