Showing
1 changed file
with
5 additions
and
8 deletions
@@ -148,8 +148,7 @@ var operationEdit={ | @@ -148,8 +148,7 @@ var operationEdit={ | ||
148 | this.promotionId=config.promotionId | 148 | this.promotionId=config.promotionId |
149 | } | 149 | } |
150 | _e.init(); | 150 | _e.init(); |
151 | - this.bindSaveEvent(); | ||
152 | - this.bindChangeEvent(); | 151 | + this.bindEvent(); |
153 | }, | 152 | }, |
154 | template:function(_htmlObj,_data){ | 153 | template:function(_htmlObj,_data){ |
155 | if(_data&_data.param_list){ | 154 | if(_data&_data.param_list){ |
@@ -175,7 +174,7 @@ var operationEdit={ | @@ -175,7 +174,7 @@ var operationEdit={ | ||
175 | } | 174 | } |
176 | } | 175 | } |
177 | }, | 176 | }, |
178 | - selectOne:function(){ | 177 | + selectOneOption:function(){ |
179 | var firstGroup=$("#tab_body>.row").find(".form-group:eq(0)"); | 178 | var firstGroup=$("#tab_body>.row").find(".form-group:eq(0)"); |
180 | firstGroup.nextAll().remove(); | 179 | firstGroup.nextAll().remove(); |
181 | var selectKey=$("#tab_body>#promotionType").val(); | 180 | var selectKey=$("#tab_body>#promotionType").val(); |
@@ -215,11 +214,9 @@ var operationEdit={ | @@ -215,11 +214,9 @@ var operationEdit={ | ||
215 | } | 214 | } |
216 | this.template(firstGroup,_selectObj); | 215 | this.template(firstGroup,_selectObj); |
217 | }, | 216 | }, |
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()}); | 217 | + bindEvent:function(){ |
218 | + $(document).on('click','#save',function(){return this.save()}); | ||
219 | + $("#promotionType").change(function(){return this.selectOneOption()}); | ||
223 | }, | 220 | }, |
224 | save:function(){ | 221 | save:function(){ |
225 | var e=this.edit; | 222 | var e=this.edit; |
-
Please register or login to post a comment