Showing
1 changed file
with
8 additions
and
5 deletions
@@ -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){ |
@@ -174,10 +175,6 @@ var operationEdit={ | @@ -174,10 +175,6 @@ var operationEdit={ | ||
174 | } | 175 | } |
175 | } | 176 | } |
176 | }, | 177 | }, |
177 | - bindEvent:function(){ | ||
178 | - $(document).on('click','#save',function(){return this.save()}); | ||
179 | - $(document).on('change','#promotionType',function(){return this.selectOne()}); | ||
180 | - }, | ||
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) { |
-
Please register or login to post a comment