Showing
2 changed files
with
61 additions
and
57 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 | ... | ... |
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,usId){ | 4 | init : function(actId,usId){ |
4 | //页面初始化 | 5 | //页面初始化 |
5 | - var panel = getSelectedPanel(); | 6 | + var panel = indexlayout.getSelectedPanel(); |
6 | - var page = panel.children(".crm-accountset-detail").show().layout({fit:true}); | 7 | + var page = panel.children(".crm-accountset-detail").layout({fit:true}); |
7 | var levelQuery="d02d277c-a662-4298-8fba-a98e815cc243"; | 8 | var levelQuery="d02d277c-a662-4298-8fba-a98e815cc243"; |
8 | var levelCondition="8c00b574-cdc7-4ade-b471-6599f5cceeee"; | 9 | var levelCondition="8c00b574-cdc7-4ade-b471-6599f5cceeee"; |
9 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); | 10 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); |
... | @@ -13,7 +14,6 @@ define(function() { | ... | @@ -13,7 +14,6 @@ define(function() { |
13 | var custDiscountDialog = initSetCustDiscountDialog();//初始化顾客消费优惠折数 | 14 | var custDiscountDialog = initSetCustDiscountDialog();//初始化顾客消费优惠折数 |
14 | var custDiscountDatagrid = initSetCustDiscountDatagrid();//优惠折数datagrid | 15 | var custDiscountDatagrid = initSetCustDiscountDatagrid();//优惠折数datagrid |
15 | var isMember=panel.find(".isMember").val(); | 16 | var isMember=panel.find(".isMember").val(); |
16 | - initValidateboxForm();//验证 | ||
17 | var initLevelName = initLevelName(); | 17 | var initLevelName = initLevelName(); |
18 | panel.find(".isMember").combobox({ | 18 | panel.find(".isMember").combobox({ |
19 | onChange:function(newValue){ | 19 | onChange:function(newValue){ |
... | @@ -35,7 +35,7 @@ define(function() { | ... | @@ -35,7 +35,7 @@ define(function() { |
35 | if(panel.find("input[name='ratName']").val()!=""){ | 35 | if(panel.find("input[name='ratName']").val()!=""){ |
36 | updateRatName(); | 36 | updateRatName(); |
37 | }else{ | 37 | }else{ |
38 | - $.messager.alert(resource.msg_title, "评级名称不能为空!"); | 38 | + $.messager.alert(base.resource.msg_title, "评级名称不能为空!"); |
39 | } | 39 | } |
40 | }); // 验证评级名称 | 40 | }); // 验证评级名称 |
41 | 41 | ||
... | @@ -71,13 +71,13 @@ define(function() { | ... | @@ -71,13 +71,13 @@ define(function() { |
71 | isMember:isMember, | 71 | isMember:isMember, |
72 | isFans:isFans | 72 | isFans:isFans |
73 | }, function(result){ | 73 | }, function(result){ |
74 | - if(responseUtils(result)){ | 74 | + if($.response(result)){ |
75 | panel.find(".setCustDiscountForm").find("input[name='actId']").val(ratingId); | 75 | panel.find(".setCustDiscountForm").find("input[name='actId']").val(ratingId); |
76 | datagridReload(); | 76 | datagridReload(); |
77 | } | 77 | } |
78 | }); | 78 | }); |
79 | }else{ | 79 | }else{ |
80 | - $.messager.alert(resource.msg_title, "请先选择CRM账套再操作!"); | 80 | + $.messager.alert(base.resource.msg_title, "请先选择CRM账套再操作!"); |
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
... | @@ -90,10 +90,10 @@ define(function() { | ... | @@ -90,10 +90,10 @@ define(function() { |
90 | actId:ratingId, | 90 | actId:ratingId, |
91 | ratName:ratingName | 91 | ratName:ratingName |
92 | }, function(result){ | 92 | }, function(result){ |
93 | - responseUtils(result) | 93 | + $.response(result) |
94 | }); | 94 | }); |
95 | }else{ | 95 | }else{ |
96 | - $.messager.alert(resource.msg_title, "请先选择CRM账套再操作!"); | 96 | + $.messager.alert(base.resource.msg_title, "请先选择CRM账套再操作!"); |
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
... | @@ -126,28 +126,30 @@ define(function() { | ... | @@ -126,28 +126,30 @@ define(function() { |
126 | function initcustLevelDatagrid(){ | 126 | function initcustLevelDatagrid(){ |
127 | return panel.find(".custlevel").datagrid({ | 127 | return panel.find(".custlevel").datagrid({ |
128 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 128 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
129 | - authz:getAuthzUtils('customerRank'), | 129 | + authz:base.getAuthz('customerRank'), |
130 | buttons:[ | 130 | buttons:[ |
131 | { | 131 | { |
132 | code:'add', | 132 | code:'add', |
133 | - text:resource.btn.add, | 133 | + text:base.resource.btn.add, |
134 | iconCls:'btn-add', | 134 | iconCls:'btn-add', |
135 | handler: addCustLevelDialog | 135 | handler: addCustLevelDialog |
136 | },{ | 136 | },{ |
137 | code:'edit', | 137 | code:'edit', |
138 | - text:resource.btn.edit, | 138 | + text:base.resource.btn.edit, |
139 | iconCls:'btn-edit', | 139 | iconCls:'btn-edit', |
140 | handler:editCustLevelDialog | 140 | handler:editCustLevelDialog |
141 | },{ | 141 | },{ |
142 | code:'delete', | 142 | code:'delete', |
143 | - text:resource.btn.remove, | 143 | + text:base.resource.btn.remove, |
144 | iconCls:'btn-remove', | 144 | iconCls:'btn-remove', |
145 | handler: removeCustLevelSubmit | 145 | handler: removeCustLevelSubmit |
146 | }], | 146 | }], |
147 | tools:[{ | 147 | tools:[{ |
148 | - text:resource.btn.refresh, | 148 | + text:base.resource.btn.refresh, |
149 | iconCls:'btn-refresh', | 149 | iconCls:'btn-refresh', |
150 | - handler:panelRefreshUtils | 150 | + handler:function() { |
151 | + indexlayout.getSelectedPanel().panel("refresh"); | ||
152 | + } | ||
151 | }] | 153 | }] |
152 | }), | 154 | }), |
153 | url:"./query/"+levelQuery+".json?"+levelCondition+"="+actId, | 155 | url:"./query/"+levelQuery+".json?"+levelCondition+"="+actId, |
... | @@ -194,44 +196,44 @@ define(function() { | ... | @@ -194,44 +196,44 @@ define(function() { |
194 | 196 | ||
195 | if(thisActId!=null&&thisActId!=""){ | 197 | if(thisActId!=null&&thisActId!=""){ |
196 | url = "./accountSetDetail/customerLevelInit?rankId="+rankId+"&actId="+thisActId+"&rankIndex="+rakIndex+"&flag=0&isMember="+isMember; | 198 | url = "./accountSetDetail/customerLevelInit?rankId="+rankId+"&actId="+thisActId+"&rankIndex="+rakIndex+"&flag=0&isMember="+isMember; |
197 | - showTabUtils({text:"新增顾客评级页面",url:url}, true, function(){}); | 199 | + indexlayout.showPanel({text:"新增顾客评级页面",url:url}, true, function(){}); |
198 | }else{ | 200 | }else{ |
199 | - $.messager.alert(resource.msg_title, "请先选择CRM账套再操作!"); | 201 | + $.messager.alert(base.resource.msg_title, "请先选择CRM账套再操作!"); |
200 | } | 202 | } |
201 | } | 203 | } |
202 | //弹出编辑顾客等级页面方法 | 204 | //弹出编辑顾客等级页面方法 |
203 | function editCustLevelDialog(){ | 205 | function editCustLevelDialog(){ |
204 | var row = selectRow(); | 206 | var row = selectRow(); |
205 | if(row == null){ | 207 | if(row == null){ |
206 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 208 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
207 | }else{ | 209 | }else{ |
208 | var thisActId=panel.find("input[name='actId']").val(); | 210 | var thisActId=panel.find("input[name='actId']").val(); |
209 | if(thisActId!=null&&thisActId!=""){ | 211 | if(thisActId!=null&&thisActId!=""){ |
210 | url = "./accountSetDetail/customerLevelInit?rankId="+row.rakId+"&actId="+row.actId+"&rankIndex="+row.rakIndex+"&flag=1&isMember="+isMember; | 212 | url = "./accountSetDetail/customerLevelInit?rankId="+row.rakId+"&actId="+row.actId+"&rankIndex="+row.rakIndex+"&flag=1&isMember="+isMember; |
211 | - showTabUtils({text:"编辑顾客评级页面",url:url}, true, function(){}); | 213 | + indexlayout.showPanel({text:"编辑顾客评级页面",url:url}, true, function(){}); |
212 | }else{ | 214 | }else{ |
213 | - $.messager.alert(resource.msg_title, "请先选择CRM账套再操作!"); | 215 | + $.messager.alert(base.resource.msg_title, "请先选择CRM账套再操作!"); |
214 | } | 216 | } |
215 | } | 217 | } |
216 | } | 218 | } |
217 | //验证顾客等级是否重名字的方法 | 219 | //验证顾客等级是否重名字的方法 |
218 | function isRepetitionName(){ | 220 | function isRepetitionName(){ |
219 | $.JSON("./accountSetDetail/isRepetitionName.json",{rakName:repeCustName.val(),actId:repeCustName.next().val()}, function(result){ | 221 | $.JSON("./accountSetDetail/isRepetitionName.json",{rakName:repeCustName.val(),actId:repeCustName.next().val()}, function(result){ |
220 | - responseUtils(result) | 222 | + $.response(result) |
221 | }); | 223 | }); |
222 | } | 224 | } |
223 | //删除顾客等级的方法 | 225 | //删除顾客等级的方法 |
224 | function removeCustLevelSubmit(){ | 226 | function removeCustLevelSubmit(){ |
225 | var row = selectRow(); | 227 | var row = selectRow(); |
226 | if(row == null){ | 228 | if(row == null){ |
227 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 229 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
228 | }else if(row.RAK_INDEX==1){ | 230 | }else if(row.RAK_INDEX==1){ |
229 | - $.messager.alert(resource.msg_title, resource.accountset.deleteRank); | 231 | + $.messager.alert(base.resource.msg_title, resource.accountset.deleteRank); |
230 | }else{ | 232 | }else{ |
231 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(result) { | 233 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(result) { |
232 | if(result){ | 234 | if(result){ |
233 | $.JSON("./accountSetDetail/removeCustRank.json",row,function(r){ | 235 | $.JSON("./accountSetDetail/removeCustRank.json",row,function(r){ |
234 | - if(responseUtils(r)){ | 236 | + if($.response(r)){ |
235 | datagridReload(); | 237 | datagridReload(); |
236 | } | 238 | } |
237 | }); | 239 | }); |
... | @@ -247,14 +249,14 @@ define(function() { | ... | @@ -247,14 +249,14 @@ define(function() { |
247 | setUpgrade.dialog({ | 249 | setUpgrade.dialog({ |
248 | buttons : [ | 250 | buttons : [ |
249 | /* { | 251 | /* { |
250 | - text : resource.btn.discount, | 252 | + text : base.resource.btn.discount, |
251 | handler : editCustDiscount | 253 | handler : editCustDiscount |
252 | },*/ | 254 | },*/ |
253 | { | 255 | { |
254 | - text : resource.btn.confirm, | 256 | + text : base.resource.btn.confirm, |
255 | handler : updateConfim | 257 | handler : updateConfim |
256 | }, { | 258 | }, { |
257 | - text : resource.btn.cancel, | 259 | + text : base.resource.btn.cancel, |
258 | handler :hideWindow | 260 | handler :hideWindow |
259 | 261 | ||
260 | }], | 262 | }], |
... | @@ -272,10 +274,10 @@ define(function() { | ... | @@ -272,10 +274,10 @@ define(function() { |
272 | editDiscount.find("span[name='remove-row']").unbind("remove-row").bind("click.remove-row", removeEditDiscount); | 274 | editDiscount.find("span[name='remove-row']").unbind("remove-row").bind("click.remove-row", removeEditDiscount); |
273 | editDiscount.dialog({ | 275 | editDiscount.dialog({ |
274 | buttons : [ { | 276 | buttons : [ { |
275 | - text : resource.btn.confirm, | 277 | + text : base.resource.btn.confirm, |
276 | handler : confirmEditDiscount | 278 | handler : confirmEditDiscount |
277 | }, { | 279 | }, { |
278 | - text : resource.btn.cancel, | 280 | + text : base.resource.btn.cancel, |
279 | handler :function(){ | 281 | handler :function(){ |
280 | editDiscountDialog.dialog("close"); | 282 | editDiscountDialog.dialog("close"); |
281 | } | 283 | } |
... | @@ -310,14 +312,14 @@ define(function() { | ... | @@ -310,14 +312,14 @@ define(function() { |
310 | function removeEditDiscount(){ | 312 | function removeEditDiscount(){ |
311 | var array = editDiscountDialog.find(".add-discount").length; | 313 | var array = editDiscountDialog.find(".add-discount").length; |
312 | if(array>1){ | 314 | if(array>1){ |
313 | - $.messager.confirm(resource.msg_title, '你确定要删除最后一行吗?', function(result) { | 315 | + $.messager.confirm(base.resource.msg_title, '你确定要删除最后一行吗?', function(result) { |
314 | if(result){ | 316 | if(result){ |
315 | $("#"+array).remove(); | 317 | $("#"+array).remove(); |
316 | $("#"+(array-1)).find("input:last").removeAttr("readonly"); | 318 | $("#"+(array-1)).find("input:last").removeAttr("readonly"); |
317 | } | 319 | } |
318 | }); | 320 | }); |
319 | }else{ | 321 | }else{ |
320 | - $.messager.alert(resource.msg_title, "至少保留一行!"); | 322 | + $.messager.alert(base.resource.msg_title, "至少保留一行!"); |
321 | } | 323 | } |
322 | } | 324 | } |
323 | //设置顾客等级消费折数 | 325 | //设置顾客等级消费折数 |
... | @@ -332,7 +334,7 @@ define(function() { | ... | @@ -332,7 +334,7 @@ define(function() { |
332 | //根据查询条件动态修改列样式 | 334 | //根据查询条件动态修改列样式 |
333 | function initDiscount(){ | 335 | function initDiscount(){ |
334 | $.post("./policyDiscount/query.json",custDiscountDialog.find(".setCustDiscountForm").serialize(), function(result){ | 336 | $.post("./policyDiscount/query.json",custDiscountDialog.find(".setCustDiscountForm").serialize(), function(result){ |
335 | - if(responseUtils(result)){ | 337 | + if($.response(result)){ |
336 | var dynamicColumns=[]; | 338 | var dynamicColumns=[]; |
337 | var total=0; | 339 | var total=0; |
338 | for (var i = 0; i < result.list.length; i++) { | 340 | for (var i = 0; i < result.list.length; i++) { |
... | @@ -431,7 +433,7 @@ define(function() { | ... | @@ -431,7 +433,7 @@ define(function() { |
431 | }; | 433 | }; |
432 | //先去删除然后在进行添加 | 434 | //先去删除然后在进行添加 |
433 | $.JSON("./discountItem/update.json",param, function(result){ | 435 | $.JSON("./discountItem/update.json",param, function(result){ |
434 | - if(responseUtils(result)){ | 436 | + if($.response(result)){ |
435 | editDiscountDialog.dialog('close'); | 437 | editDiscountDialog.dialog('close'); |
436 | custDiscountDialog.find(".datagrid").find(".datagrid-toolbar").empty(); | 438 | custDiscountDialog.find(".datagrid").find(".datagrid-toolbar").empty(); |
437 | initDiscount(); | 439 | initDiscount(); |
... | @@ -470,9 +472,9 @@ define(function() { | ... | @@ -470,9 +472,9 @@ define(function() { |
470 | rakId:custDiscountDialog.find(".setCustDiscountForm").find(".rakId").val() | 472 | rakId:custDiscountDialog.find(".setCustDiscountForm").find(".rakId").val() |
471 | }; | 473 | }; |
472 | $.JSON("./policyDiscount/queryBrIds.json",param,function(result){ | 474 | $.JSON("./policyDiscount/queryBrIds.json",param,function(result){ |
473 | - if(responseUtils(result)){ | 475 | + if($.response(result)){ |
474 | console.log('-----------fromDB_brIdArr = '+result.value.brIds); | 476 | console.log('-----------fromDB_brIdArr = '+result.value.brIds); |
475 | - showCondObject({id:"dff2379d-5995-40d2-8d28-6c835ecdd955",showGrid:true, singleSelect:false,onBeforeLoad:function(params){ | 477 | + base.showCondObject({id:"dff2379d-5995-40d2-8d28-6c835ecdd955",showGrid:true, singleSelect:false,onBeforeLoad:function(params){ |
476 | var params; | 478 | var params; |
477 | params["aa3c85d3-e1e0-4b33-bf13-941fec1a8d92"]=panel.find("input[name='actId']").val(); // 当前账套ID | 479 | params["aa3c85d3-e1e0-4b33-bf13-941fec1a8d92"]=panel.find("input[name='actId']").val(); // 当前账套ID |
478 | return params; | 480 | return params; |
... | @@ -508,7 +510,7 @@ define(function() { | ... | @@ -508,7 +510,7 @@ define(function() { |
508 | list:list | 510 | list:list |
509 | } | 511 | } |
510 | $.JSON("./applyBrand/addBrand.json",pamra,function(result){ | 512 | $.JSON("./applyBrand/addBrand.json",pamra,function(result){ |
511 | - responseUtils(result); | 513 | + $.response(result); |
512 | initDiscount(); | 514 | initDiscount(); |
513 | }); | 515 | }); |
514 | } | 516 | } |
... | @@ -526,7 +528,7 @@ define(function() { | ... | @@ -526,7 +528,7 @@ define(function() { |
526 | editDiscountDialog.find(".rakId").val(rakId); | 528 | editDiscountDialog.find(".rakId").val(rakId); |
527 | editDiscountDialog.find(".actId").val(panel.find(".actId").val()); | 529 | editDiscountDialog.find(".actId").val(panel.find(".actId").val()); |
528 | $.post("./discountItem/query.json",rows[0], function(result){ | 530 | $.post("./discountItem/query.json",rows[0], function(result){ |
529 | - if(responseUtils(result)){ | 531 | + if($.response(result)){ |
530 | editDiscountDialog.find(".dialog-form").children("div:not(:first)").remove(); | 532 | editDiscountDialog.find(".dialog-form").children("div:not(:first)").remove(); |
531 | var _len = result.list.length; | 533 | var _len = result.list.length; |
532 | for(var i=0;i<_len;i++){ | 534 | for(var i=0;i<_len;i++){ |
... | @@ -557,7 +559,7 @@ define(function() { | ... | @@ -557,7 +559,7 @@ define(function() { |
557 | } | 559 | } |
558 | }); | 560 | }); |
559 | }else{ | 561 | }else{ |
560 | - $.messager.alert(resource.msg_title, '请先增加一条行数据!'); | 562 | + $.messager.alert(base.resource.msg_title, '请先增加一条行数据!'); |
561 | } | 563 | } |
562 | } | 564 | } |
563 | //添加折数带(行) | 565 | //添加折数带(行) |
... | @@ -581,13 +583,13 @@ define(function() { | ... | @@ -581,13 +583,13 @@ define(function() { |
581 | discountItemList:discountItemList | 583 | discountItemList:discountItemList |
582 | } | 584 | } |
583 | $.JSON("./policyDiscount/uptate.json",param, function(r){ | 585 | $.JSON("./policyDiscount/uptate.json",param, function(r){ |
584 | - if(responseUtils(r)){} | 586 | + if($.response(r)){} |
585 | }); | 587 | }); |
586 | } | 588 | } |
587 | } | 589 | } |
588 | 590 | ||
589 | $.post("./policyDiscount/create.json",custDiscountDialog.find(".setCustDiscountForm").serialize(), function(result){ | 591 | $.post("./policyDiscount/create.json",custDiscountDialog.find(".setCustDiscountForm").serialize(), function(result){ |
590 | - if(responseUtils(result)){ | 592 | + if($.response(result)){ |
591 | custDiscountDialog.find(".datagrid").find(".datagrid-toolbar").empty(); | 593 | custDiscountDialog.find(".datagrid").find(".datagrid-toolbar").empty(); |
592 | initDiscount(); | 594 | initDiscount(); |
593 | } | 595 | } |
... | @@ -597,12 +599,12 @@ define(function() { | ... | @@ -597,12 +599,12 @@ define(function() { |
597 | function removeCustDiscountRow(){ | 599 | function removeCustDiscountRow(){ |
598 | var custDiscount = custDiscountDatagrid.datagrid('getSelected'); | 600 | var custDiscount = custDiscountDatagrid.datagrid('getSelected'); |
599 | if(custDiscount == null){ | 601 | if(custDiscount == null){ |
600 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 602 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
601 | }else{ | 603 | }else{ |
602 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(result) { | 604 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(result) { |
603 | if(result){ | 605 | if(result){ |
604 | $.JSON("./policyDiscount/remove.json",custDiscount, function(r){ | 606 | $.JSON("./policyDiscount/remove.json",custDiscount, function(r){ |
605 | - if(responseUtils(r)){ | 607 | + if($.response(r)){ |
606 | custDiscountDialog.find(".datagrid").find(".datagrid-toolbar").empty(); | 608 | custDiscountDialog.find(".datagrid").find(".datagrid-toolbar").empty(); |
607 | initDiscount(); | 609 | initDiscount(); |
608 | } | 610 | } |
... | @@ -633,7 +635,7 @@ define(function() { | ... | @@ -633,7 +635,7 @@ define(function() { |
633 | discountItemList:discountItemList | 635 | discountItemList:discountItemList |
634 | } | 636 | } |
635 | $.JSON("./policyDiscount/uptate.json",param, function(r){ | 637 | $.JSON("./policyDiscount/uptate.json",param, function(r){ |
636 | - if(responseUtils(r)){ | 638 | + if($.response(r)){ |
637 | custDiscountDialog.find(".datagrid").find(".datagrid-toolbar").empty(); | 639 | custDiscountDialog.find(".datagrid").find(".datagrid-toolbar").empty(); |
638 | initDiscount(); | 640 | initDiscount(); |
639 | } | 641 | } | ... | ... |
-
Please register or login to post a comment