Showing
2 changed files
with
14 additions
and
12 deletions
1 | -define(function() { | 1 | +define(['i18n!accountset/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, indexlayout) { |
2 | return { | 2 | return { |
3 | + resource:resource, | ||
3 | init : function(actId,isMember,flag,rakIndex) { | 4 | init : function(actId,isMember,flag,rakIndex) { |
4 | - var panel = getSelectedPanel(); | 5 | + var panel = indexlayout.getSelectedPanel(); |
5 | var page = panel.children(".crm-rank-detail").show().layout({fit:true}); | 6 | var page = panel.children(".crm-rank-detail").show().layout({fit:true}); |
6 | var button = initButton();// 初始化按钮 | 7 | var button = initButton();// 初始化按钮 |
7 | var rankForm = page.find(".custLevelDetail").find(".custLevelAddForm"); | 8 | var rankForm = page.find(".custLevelDetail").find(".custLevelAddForm"); |
8 | var rankWindow = page.find(".custLevelDetail"); | 9 | var rankWindow = page.find(".custLevelDetail"); |
9 | - initValidateboxForm();//验证 | ||
10 | var chkValidate=initValidate(); | 10 | var chkValidate=initValidate(); |
11 | 11 | ||
12 | initOptionLevel(); | 12 | initOptionLevel(); |
... | @@ -131,7 +131,7 @@ define(function() { | ... | @@ -131,7 +131,7 @@ define(function() { |
131 | data:{scope:"RATED"}, | 131 | data:{scope:"RATED"}, |
132 | async:false,//同步 | 132 | async:false,//同步 |
133 | success:function(result) { | 133 | success:function(result) { |
134 | - if(responseUtils(result)){ | 134 | + if($.response(result)){ |
135 | for(var i=0;i<result.list.length;i++){ | 135 | for(var i=0;i<result.list.length;i++){ |
136 | page.find(".colNamesSelect").append("<option value='"+result.list[i].fldSql+"'>"+result.list[i].fldName+"</option>") | 136 | page.find(".colNamesSelect").append("<option value='"+result.list[i].fldSql+"'>"+result.list[i].fldName+"</option>") |
137 | } | 137 | } |
... | @@ -164,7 +164,7 @@ define(function() { | ... | @@ -164,7 +164,7 @@ define(function() { |
164 | ratDays:rankForm.find(".ratDays").val(), | 164 | ratDays:rankForm.find(".ratDays").val(), |
165 | rakExpiry:rankForm.find(".rakExpiry").val() | 165 | rakExpiry:rankForm.find(".rakExpiry").val() |
166 | }, function(result){ | 166 | }, function(result){ |
167 | - if(responseUtils(result)){ | 167 | + if($.response(result)){ |
168 | closeAndRefresh(); | 168 | closeAndRefresh(); |
169 | } | 169 | } |
170 | }); | 170 | }); |
... | @@ -183,7 +183,7 @@ define(function() { | ... | @@ -183,7 +183,7 @@ define(function() { |
183 | ratDays:rankForm.find(".ratDays").val(), | 183 | ratDays:rankForm.find(".ratDays").val(), |
184 | rakExpiry:rankForm.find(".rakExpiry").val() | 184 | rakExpiry:rankForm.find(".rakExpiry").val() |
185 | }, function(result){ | 185 | }, function(result){ |
186 | - if(responseUtils(result)){ | 186 | + if($.response(result)){ |
187 | closeAndRefresh(); | 187 | closeAndRefresh(); |
188 | } | 188 | } |
189 | }); | 189 | }); |
... | @@ -191,7 +191,7 @@ define(function() { | ... | @@ -191,7 +191,7 @@ define(function() { |
191 | } | 191 | } |
192 | 192 | ||
193 | function closeAndRefresh(){ | 193 | function closeAndRefresh(){ |
194 | - closeSelectedPanel(); | 194 | + indexlayout.closeSelectedPanel(); |
195 | var levelQuery="d02d277c-a662-4298-8fba-a98e815cc243"; | 195 | var levelQuery="d02d277c-a662-4298-8fba-a98e815cc243"; |
196 | //8c00b574-cdc7-4ade-b471-6599f5cceeee | 196 | //8c00b574-cdc7-4ade-b471-6599f5cceeee |
197 | //c1612bd8-0b0d-449b-976c-f790a1998f71 | 197 | //c1612bd8-0b0d-449b-976c-f790a1998f71 |
... | @@ -204,14 +204,16 @@ define(function() { | ... | @@ -204,14 +204,16 @@ define(function() { |
204 | var button = panel.find(".button"); | 204 | var button = panel.find(".button"); |
205 | button.rs_toolbar({ | 205 | button.rs_toolbar({ |
206 | buttons:[{ | 206 | buttons:[{ |
207 | - text:resource.btn.submit, | 207 | + text:base.resource.btn.submit, |
208 | iconCls:'btn-submit submit-condition', | 208 | iconCls:'btn-submit submit-condition', |
209 | handler:submitBtn | 209 | handler:submitBtn |
210 | }], | 210 | }], |
211 | tools:[{ | 211 | tools:[{ |
212 | - text:resource.btn.refresh, | 212 | + text:base.resource.btn.refresh, |
213 | iconCls:'btn-refresh', | 213 | iconCls:'btn-refresh', |
214 | - handler:panelRefreshUtils | 214 | + handler:function() { |
215 | + indexlayout.getSelectedPanel().panel("refresh"); | ||
216 | + } | ||
215 | }], | 217 | }], |
216 | content:button.children('div.custLevelDetail') | 218 | content:button.children('div.custLevelDetail') |
217 | }); | 219 | }); |
... | @@ -327,7 +329,7 @@ define(function() { | ... | @@ -327,7 +329,7 @@ define(function() { |
327 | //验证顾客等级是否重名字的方法 | 329 | //验证顾客等级是否重名字的方法 |
328 | function isRepetitionName(){ | 330 | function isRepetitionName(){ |
329 | $.JSON("./accountSetDetail/isRepetitionName.json",{rakName:rankForm.find(".rakName").val(),actId:actId}, function(result){ | 331 | $.JSON("./accountSetDetail/isRepetitionName.json",{rakName:rankForm.find(".rakName").val(),actId:actId}, function(result){ |
330 | - responseUtils(result) | 332 | + $.response(result) |
331 | }); | 333 | }); |
332 | } | 334 | } |
333 | 335 | ||
... | @@ -335,7 +337,7 @@ define(function() { | ... | @@ -335,7 +337,7 @@ define(function() { |
335 | //验证顾客等级代号是否重名字的方法 | 337 | //验证顾客等级代号是否重名字的方法 |
336 | function isRepetitionRakId(){ | 338 | function isRepetitionRakId(){ |
337 | $.JSON("./accountSetDetail/isRepetitionRakId.json",{rakId:rankForm.find(".rakId").val(),actId:actId}, function(result){ | 339 | $.JSON("./accountSetDetail/isRepetitionRakId.json",{rakId:rankForm.find(".rakId").val(),actId:actId}, function(result){ |
338 | - responseUtils(result) | 340 | + $.response(result) |
339 | }); | 341 | }); |
340 | } | 342 | } |
341 | 343 | ... | ... |
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment