Authored by chenchao

i can not see Y

@@ -148,7 +148,8 @@ var operationEdit={ @@ -148,7 +148,8 @@ var operationEdit={
148 this.promotionId=config.promotionId 148 this.promotionId=config.promotionId
149 } 149 }
150 _e.init(); 150 _e.init();
151 - this.bindEvent(); 151 + this.bindSaveEvent();
  152 + this.bindChangeEvent();
152 }, 153 },
153 template:function(_htmlObj,_data){ 154 template:function(_htmlObj,_data){
154 if(_data&_data.param_list){ 155 if(_data&_data.param_list){
@@ -173,11 +174,7 @@ var operationEdit={ @@ -173,11 +174,7 @@ var operationEdit={
173 _htmlObj.last().append(_html); 174 _htmlObj.last().append(_html);
174 } 175 }
175 } 176 }
176 - },  
177 - bindEvent:function(){  
178 - $(document).on('click','#save',function(){return this.save()});  
179 - $(document).on('change','#promotionType',function(){return this.selectOne()});  
180 - }, 177 + },
181 selectOne:function(){ 178 selectOne:function(){
182 var firstGroup=$("#tab_body>.row").find(".form-group:eq(0)"); 179 var firstGroup=$("#tab_body>.row").find(".form-group:eq(0)");
183 firstGroup.nextAll().remove(); 180 firstGroup.nextAll().remove();
@@ -218,6 +215,12 @@ var operationEdit={ @@ -218,6 +215,12 @@ var operationEdit={
218 } 215 }
219 this.template(firstGroup,_selectObj); 216 this.template(firstGroup,_selectObj);
220 }, 217 },
  218 + bindSaveEvent:function(){
  219 + $(document).on('click','#save',function(){return this.save()});
  220 + },
  221 + bindChangeEvent:function(){
  222 + $(document).on('change','#promotionType',function(){return this.selectOne()});
  223 + },
221 save:function(){ 224 save:function(){
222 var e=this.edit; 225 var e=this.edit;
223 e.submit(this.action, function (option) { 226 e.submit(this.action, function (option) {