Showing
110 changed files
with
1666 additions
and
614 deletions
... | @@ -81,5 +81,6 @@ | ... | @@ -81,5 +81,6 @@ |
81 | <modules> | 81 | <modules> |
82 | <module>portal.base</module> | 82 | <module>portal.base</module> |
83 | <module>portal.query</module> | 83 | <module>portal.query</module> |
84 | + <module>portal.web</module> | ||
84 | </modules> | 85 | </modules> |
85 | </project> | 86 | </project> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | dataSource.driverClassName=com.mysql.jdbc.Driver | 1 | dataSource.driverClassName=com.mysql.jdbc.Driver |
2 | -dataSource.url=jdbc:mysql://192.168.14.237/portal1?allowMultiQueries=true | 2 | +dataSource.url=jdbc:mysql://58.216.158.26:13306/portal?allowMultiQueries=true |
3 | -dataSource.username=runsa | 3 | +dataSource.username=root |
4 | -dataSource.password=Runsa&237 | 4 | +dataSource.password=ROOTROOT |
5 | +#dataSource.url=jdbc:mysql://tel.runsa.cn:62370/portal1?allowMultiQueries=true | ||
6 | +#dataSource.username=runsa | ||
7 | +#dataSource.password=Runsa&237 | ||
8 | +#dataSource.url=jdbc:mysql://tel.runsa.cn:62370/portal?allowMultiQueries=true | ||
9 | +#dataSource.username=runsa | ||
10 | +#dataSource.password=runsacrm2016 | ||
11 | +#dataSource.url=jdbc:mysql://139.196.77.11:63406/portal0731?allowMultiQueries=true | ||
12 | +#dataSource.username=crm | ||
13 | +#dataSource.password=Runsa&2016 | ||
14 | +#dataSource.url=jdbc:mysql://satcrmdb.mysqldb.chinacloudapi.cn:3306/portal?allowMultiQueries=true | ||
15 | +#dataSource.username=satcrmdb%satadmin | ||
16 | +#dataSource.password=satadmin@2016 | ||
17 | +#dataSource.url=jdbc:mysql://satcrmdbtest.mysqldb.chinacloudapi.cn:3306/portal?allowMultiQueries=true | ||
18 | +#dataSource.username=satcrmdbtest%satadmin | ||
19 | +#dataSource.password=sat@2016 | ||
5 | dataSource.filters=stat | 20 | dataSource.filters=stat |
6 | dataSource.maxActive=20 | 21 | dataSource.maxActive=20 |
7 | dataSource.initialSize=5 | 22 | dataSource.initialSize=5 |
... | @@ -20,9 +35,14 @@ mns.accountendpoint=http://1379859149635672.mns.cn-hangzhou.aliyuncs.com/ | ... | @@ -20,9 +35,14 @@ mns.accountendpoint=http://1379859149635672.mns.cn-hangzhou.aliyuncs.com/ |
20 | mns.accesskeyid=gHCcZmqW2qd0CfPd | 35 | mns.accesskeyid=gHCcZmqW2qd0CfPd |
21 | mns.accesskeysecret=TcGMbmalY6oubWpDvJIaOmOME9Bwd3 | 36 | mns.accesskeysecret=TcGMbmalY6oubWpDvJIaOmOME9Bwd3 |
22 | 37 | ||
23 | -redis.host=192.168.14.237 | 38 | + |
24 | -redis.port=6379 | 39 | +redis.host=58.216.158.26 |
40 | +#redis.host=114.112.29.180 | ||
41 | +redis.port=16379 | ||
25 | redis.password= | 42 | redis.password= |
43 | +#redis.host=satcrmredistest.redis.cache.chinacloudapi.cn | ||
44 | +#redis.port=6379 | ||
45 | +#redis.password=fRseoZB7JnbBKmOgRBPZOC+DvNVGpJr8m7h2PkIL8+g= | ||
26 | redis.expire=1800 | 46 | redis.expire=1800 |
27 | 47 | ||
28 | auto.coupon.rule.default.org=1 | 48 | auto.coupon.rule.default.org=1 |
... | @@ -42,4 +62,5 @@ weixin.message.js=http://tel.runsa.cn:8083/mpplat-rest/static/js/mpplat.js | ... | @@ -42,4 +62,5 @@ weixin.message.js=http://tel.runsa.cn:8083/mpplat-rest/static/js/mpplat.js |
42 | 62 | ||
43 | crm.msgTimeOut=3600 | 63 | crm.msgTimeOut=3600 |
44 | 64 | ||
45 | - | 65 | +runsa.portal.path.temp=res:temp |
66 | +runsa.portal.path.template=res:template | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> | 1 | <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> |
2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> | 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> |
3 | <%@ page isELIgnored ="false" %> | 3 | <%@ page isELIgnored ="false" %> |
4 | -<script> | ||
5 | -function goPage(i){ | ||
6 | - switch (i){ | ||
7 | - case 1: // 审请发行券 | ||
8 | - showTabUtils({text:'券发行',url:'./coupon/coupons?flagCM=1'}, true, function(){}); | ||
9 | - break; | ||
10 | - case 2: // 审批发行券 | ||
11 | - showTabUtils({text:'券发行',url:'./coupon/coupons?flagCM=2'}, true, function(){}); | ||
12 | - break; | ||
13 | - case 3: // 查看发行券 | ||
14 | - showTabUtils({text:'券发行',url:'./coupon/coupons?flagCM=3'}, true, function(){}); | ||
15 | - break; | ||
16 | - case 4: // 审请雇员发券额度 | ||
17 | - showTabUtils({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=4'}, true, function(){}); | ||
18 | - break; | ||
19 | - case 5: // 审批雇员发券额度 | ||
20 | - showTabUtils({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=5'}, true, function(){}); | ||
21 | - break; | ||
22 | - case 6: // 查看雇员发券额度 | ||
23 | - showTabUtils({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=6'}, true, function(){}); | ||
24 | - break; | ||
25 | - default: // 查看顾客券账户 | ||
26 | - showTabUtils({text:'顾客券账户',url:'./coupon/custCouponAcount'}, true, function(){}); | ||
27 | - break; | ||
28 | - } | ||
29 | -} | ||
30 | -</script> | ||
31 | <div class="crm-coupon-detail"> | 4 | <div class="crm-coupon-detail"> |
32 | <div class="north" data-options="region:'north',border:false"> | 5 | <div class="north" data-options="region:'north',border:false"> |
33 | <div class="rs-navi"> | 6 | <div class="rs-navi"> |
... | @@ -36,14 +9,15 @@ function goPage(i){ | ... | @@ -36,14 +9,15 @@ function goPage(i){ |
36 | <div align="center"> | 9 | <div align="center"> |
37 | <img style="margin-top: 50px;" src ="./css/default/images/portal/couponMgr.png" alt="couponMgr" usemap ="#couponMgrMap" /> | 10 | <img style="margin-top: 50px;" src ="./css/default/images/portal/couponMgr.png" alt="couponMgr" usemap ="#couponMgrMap" /> |
38 | <map id="couponMgrMap" name="couponMgrMap"> | 11 | <map id="couponMgrMap" name="couponMgrMap"> |
39 | - <area shape="rect" coords="24,1,110,74" href="javascript:goPage(1);" /> | 12 | + <area shape="rect" coords="24,1,110,74" href="javascript:void(0);" type="1"/> |
40 | - <area shape="rect" coords="258,1,346,75" href="javascript:goPage(2);" /> | 13 | + <area shape="rect" coords="258,1,346,75" href="javascript:void(0);" type="2"/> |
41 | - <area shape="rect" coords="486,1,570,76" href="javascript:goPage(3);" /> | 14 | + <area shape="rect" coords="486,1,570,76" href="javascript:void(0);" type="3"/> |
42 | - <area shape="rect" coords="1,114,142,198" href="javascript:goPage(4);" /> | 15 | + <area shape="rect" coords="1,114,142,198" href="javascript:void(0);" type="4"/> |
43 | - <area shape="rect" coords="228,113,372,197" href="javascript:goPage(5);" /> | 16 | + <area shape="rect" coords="228,113,372,197" href="javascript:void(0);" type="5"/> |
44 | - <area shape="rect" coords="452,113,592,197" href="javascript:goPage(6);" /> | 17 | + <area shape="rect" coords="452,113,592,197" href="javascript:void(0);" type="6"/> |
45 | - <area shape="rect" coords="6,247,134,319" href="javascript:goPage(7);" /> | 18 | + <area shape="rect" coords="6,247,134,319" href="javascript:void(0);" type="7"/> |
46 | </map> | 19 | </map> |
47 | </div> | 20 | </div> |
48 | </div> | 21 | </div> |
49 | </div> | 22 | </div> |
23 | +<script type="text/javascript">require(["coupons/couponMgr"], function(fn){fn();});</script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -79,6 +79,14 @@ define({ | ... | @@ -79,6 +79,14 @@ define({ |
79 | discount:'适用现价折数带', | 79 | discount:'适用现价折数带', |
80 | maxdiscount:'最低综合折数限制', | 80 | maxdiscount:'最低综合折数限制', |
81 | chooseSuitBrand:'选择适用品牌' | 81 | chooseSuitBrand:'选择适用品牌' |
82 | + }, | ||
83 | + customerLevel:{ | ||
84 | + title:'顾客评级', | ||
85 | + datagrid_col_rak_index_title:'等级', | ||
86 | + datagrid_col_rak_id_title:'代号', | ||
87 | + datagrid_col_rak_name_title:'名称', | ||
88 | + datagrid_col_rak_desc_title:'描述', | ||
89 | + datagrid_col_discount_title:'会员消费优惠折数' | ||
82 | } | 90 | } |
83 | }, | 91 | }, |
84 | "en-US": true, | 92 | "en-US": true, | ... | ... |
... | @@ -190,9 +190,11 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi | ... | @@ -190,9 +190,11 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi |
190 | JSONToCSVConvertor(result.list, fileName, true); | 190 | JSONToCSVConvertor(result.list, fileName, true); |
191 | } | 191 | } |
192 | } | 192 | } |
193 | - }) | 193 | + }); |
194 | }, | 194 | }, |
195 | - //通用下载方法 | 195 | + /** |
196 | + * 通用下载 | ||
197 | + */ | ||
196 | download:function(filename,path,url){ | 198 | download:function(filename,path,url){ |
197 | if(!url){ | 199 | if(!url){ |
198 | url='./download'; | 200 | url='./download'; |
... | @@ -209,12 +211,16 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi | ... | @@ -209,12 +211,16 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi |
209 | }, 60*10000); | 211 | }, 60*10000); |
210 | } | 212 | } |
211 | }, | 213 | }, |
212 | - //excel错误文件下载 | 214 | + /** |
213 | - downloadErrorExcel:function(fileName,path){ | 215 | + * excel错误文件下载 |
216 | + */ | ||
217 | + downloadErrorExcel:function(filename,path){ | ||
214 | var url = "./excelImport/downloadError"; | 218 | var url = "./excelImport/downloadError"; |
215 | - this.download(fileName,path,url); | 219 | + this.download(filename,path,url); |
216 | }, | 220 | }, |
217 | - //excel模板文件下载 | 221 | + /** |
222 | + * excel模板文件下载 | ||
223 | + */ | ||
218 | downloadExcelTemplate:function(filename){ | 224 | downloadExcelTemplate:function(filename){ |
219 | var url = "./excelImport/downloadExcelTemplate"; | 225 | var url = "./excelImport/downloadExcelTemplate"; |
220 | this.download(filename,null,url); | 226 | this.download(filename,null,url); |
... | @@ -233,7 +239,8 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi | ... | @@ -233,7 +239,8 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi |
233 | }); | 239 | }); |
234 | }*/ | 240 | }*/ |
235 | }); | 241 | }); |
236 | - return new Base(); | 242 | + var base=new Base(); |
243 | + return base; | ||
237 | 244 | ||
238 | function extendJqueryFunction() { | 245 | function extendJqueryFunction() { |
239 | $.appendZero = function (num, n) { | 246 | $.appendZero = function (num, n) { |
... | @@ -597,7 +604,7 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi | ... | @@ -597,7 +604,7 @@ define(['i18n!base/nls/resource', 'cls', 'jquery', '../authz.jsonp?callback=defi |
597 | prompt: '不限', | 604 | prompt: '不限', |
598 | searcher: function () { | 605 | searcher: function () { |
599 | var index = $(this).searchbox("options").rowIndex; | 606 | var index = $(this).searchbox("options").rowIndex; |
600 | - showCondObject(opts, function (rows) { | 607 | + base.showCondObject(opts, function (rows) { |
601 | var extIds = ""; | 608 | var extIds = ""; |
602 | var name = ""; | 609 | var name = ""; |
603 | if (usdType == 1) { | 610 | if (usdType == 1) { | ... | ... |
... | @@ -30,13 +30,17 @@ define({ | ... | @@ -30,13 +30,17 @@ define({ |
30 | addByFile:'导入', /*import 在IE浏览器上是关键字,请引用到的地方修改*/ | 30 | addByFile:'导入', /*import 在IE浏览器上是关键字,请引用到的地方修改*/ |
31 | selCustomer:"选择用户", | 31 | selCustomer:"选择用户", |
32 | downloadExcel:"导出模板", | 32 | downloadExcel:"导出模板", |
33 | + accept:'可用', | ||
34 | + finish:'完成', | ||
33 | exportPdf:'导出PDF' | 35 | exportPdf:'导出PDF' |
34 | }, | 36 | }, |
35 | confirmDelete:'你确定要删除这条信息吗?', | 37 | confirmDelete:'你确定要删除这条信息吗?', |
36 | msgEditTip:'请选择要编辑的数据!', | 38 | msgEditTip:'请选择要编辑的数据!', |
37 | msgRemoveTip:'请选择要删除的数据!', | 39 | msgRemoveTip:'请选择要删除的数据!', |
40 | + msgSaveTitle:'您确定保存?', | ||
38 | msgDefaultTip:'请选择对象!', | 41 | msgDefaultTip:'请选择对象!', |
39 | msg_title:"系统提示", | 42 | msg_title:"系统提示", |
43 | + msgSelect:'请选择', | ||
40 | onExit:'您确定退出门户吗?', | 44 | onExit:'您确定退出门户吗?', |
41 | msgOptTip:'确定进行该操作?', | 45 | msgOptTip:'确定进行该操作?', |
42 | msgSuccess:'操作成功', | 46 | msgSuccess:'操作成功', | ... | ... |
This diff is collapsed. Click to expand it.
1 | -define(function(){ | 1 | +define(['i18n!company/nls/resource','cls', 'base/index', 'index/index'],function(resource,Class,base,layout){ |
2 | return function(){ | 2 | return function(){ |
3 | var plId = $.cookie("rs-platform-id"); | 3 | var plId = $.cookie("rs-platform-id"); |
4 | - var body=$(document.body); | 4 | + var pannel = layout.getSelectedPanel();//初始化面板 |
5 | - var pannel = getSelectedPanel();//初始化面板 | ||
6 | var page = pannel.children(".corp-index-page").layout({ | 5 | var page = pannel.children(".corp-index-page").layout({ |
7 | fit:true | 6 | fit:true |
8 | });//定义面板内div | 7 | });//定义面板内div |
... | @@ -14,44 +13,44 @@ define(function(){ | ... | @@ -14,44 +13,44 @@ define(function(){ |
14 | return $('<div></div>').appendTo(center).datagrid({ | 13 | return $('<div></div>').appendTo(center).datagrid({ |
15 | url:'./query/'+condId+'.json', | 14 | url:'./query/'+condId+'.json', |
16 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 15 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
17 | - title: resource.company.title, | 16 | + title: resource.title, |
18 | - authz:getAuthzUtils('company'), | 17 | + authz:base.getAuthz('company'), |
19 | buttons:[{ | 18 | buttons:[{ |
20 | - text:resource.btn.select, | 19 | + text:base.resource.btn.select, |
21 | iconCls:'btn-select select-condition', | 20 | iconCls:'btn-select select-condition', |
22 | code:'view', | 21 | code:'view', |
23 | handler: function(){ | 22 | handler: function(){ |
24 | - showCondObject(condId,datagridReload); | 23 | + base.showCondObject(condId,datagridReload); |
25 | } | 24 | } |
26 | },{ | 25 | },{ |
27 | - text:resource.btn.add, | 26 | + text:base.resource.btn.add, |
28 | iconCls:'btn-add', | 27 | iconCls:'btn-add', |
29 | code:'edit', | 28 | code:'edit', |
30 | handler: addEvent | 29 | handler: addEvent |
31 | },{ | 30 | },{ |
32 | - text:resource.btn.edit, | 31 | + text:base.resource.btn.edit, |
33 | iconCls:'btn-edit', | 32 | iconCls:'btn-edit', |
34 | code:'edit', | 33 | code:'edit', |
35 | handler: editEvent | 34 | handler: editEvent |
36 | },{ | 35 | },{ |
37 | - text:resource.btn.remove, | 36 | + text:base.resource.btn.remove, |
38 | iconCls:'btn-remove', | 37 | iconCls:'btn-remove', |
39 | code:'edit', | 38 | code:'edit', |
40 | handler: deleteEvent | 39 | handler: deleteEvent |
41 | }], | 40 | }], |
42 | tools:[{ | 41 | tools:[{ |
43 | - text:resource.btn.refresh, | 42 | + text:base.resource.btn.refresh, |
44 | iconCls:'btn-refresh', | 43 | iconCls:'btn-refresh', |
45 | - handler:panelRefreshUtils | 44 | + handler:function(){datagridReload();} |
46 | }] | 45 | }] |
47 | }), | 46 | }), |
48 | columns:[[ | 47 | columns:[[ |
49 | {field:'ck',checkbox:true }, | 48 | {field:'ck',checkbox:true }, |
50 | - {field:'COCODE',title:resource.company.grid.code, width:80}, | 49 | + {field:'COCODE',title:resource.grid.code, width:80}, |
51 | - {field:'CONAME',title:resource.company.grid.name, width:300}, | 50 | + {field:'CONAME',title:resource.grid.name, width:300}, |
52 | - {field:'BENAME',title:resource.company.grid.bizentity, width:300,formatter:formatText}, | 51 | + {field:'BENAME',title:resource.grid.bizentity, width:300,formatter:formatText}, |
53 | - {field:'CODESC',title:resource.company.grid.desc, width:300,formatter:formatText}, | 52 | + {field:'CODESC',title:resource.grid.desc, width:300,formatter:formatText}, |
54 | - {field:'VALID',title:resource.company.grid.valid, width:80} | 53 | + {field:'VALID',title:resource.grid.valid, width:80} |
55 | ]], | 54 | ]], |
56 | onSelect:function(index,row){ | 55 | onSelect:function(index,row){ |
57 | if(row.PLID == plId){// 任何平台均只能编辑自身创建的公司 | 56 | if(row.PLID == plId){// 任何平台均只能编辑自身创建的公司 |
... | @@ -74,15 +73,15 @@ define(function(){ | ... | @@ -74,15 +73,15 @@ define(function(){ |
74 | } | 73 | } |
75 | // 新增页面弹出绑定按钮 | 74 | // 新增页面弹出绑定按钮 |
76 | function addEvent(){ | 75 | function addEvent(){ |
77 | - showTabUtils({text:resource.company.detailsTitle,url:'./company/detailAdd'},datagridReload,true); | 76 | + layout.showPanel({text:resource.detailsTitle,url:'./company/detailAdd'},datagridReload,true); |
78 | } | 77 | } |
79 | // 编辑页面弹出绑定按钮 | 78 | // 编辑页面弹出绑定按钮 |
80 | function editEvent(){ | 79 | function editEvent(){ |
81 | var row = grid.datagrid('getSelected'); | 80 | var row = grid.datagrid('getSelected'); |
82 | if(row == null){ | 81 | if(row == null){ |
83 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 82 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
84 | }else{ | 83 | }else{ |
85 | - showTabUtils({text:resource.company.detailsTitle,url:"./company/detailEdit?coId="+row.COID}, true, function(){ | 84 | + layout.showPanel({text:resource.detailsTitle,url:"./company/detailEdit?coId="+row.COID}, true, function(){ |
86 | grid.datagrid("reload"); | 85 | grid.datagrid("reload"); |
87 | }); | 86 | }); |
88 | } | 87 | } |
... | @@ -91,13 +90,13 @@ define(function(){ | ... | @@ -91,13 +90,13 @@ define(function(){ |
91 | function deleteEvent(){ | 90 | function deleteEvent(){ |
92 | var row = grid.datagrid('getSelected'); | 91 | var row = grid.datagrid('getSelected'); |
93 | if(row == null){ | 92 | if(row == null){ |
94 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 93 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
95 | }else{ | 94 | }else{ |
96 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 95 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){ |
97 | if(r){ | 96 | if(r){ |
98 | $.post("./company/deleteCompany.json",{coId:row.COID},function(result){ | 97 | $.post("./company/deleteCompany.json",{coId:row.COID},function(result){ |
99 | - if(responseUtils(result)){ | 98 | + if($.response(result)){ |
100 | - $.messager.alert(resource.msg_title,resource.msgSuccess); | 99 | + $.messager.alert(base.resource.msg_title,base.resource.msgSuccess); |
101 | grid.datagrid("reload"); | 100 | grid.datagrid("reload"); |
102 | } | 101 | } |
103 | }); | 102 | }); |
... | @@ -109,7 +108,7 @@ define(function(){ | ... | @@ -109,7 +108,7 @@ define(function(){ |
109 | if(params){ | 108 | if(params){ |
110 | grid.datagrid("reload",params); | 109 | grid.datagrid("reload",params); |
111 | }else{ | 110 | }else{ |
112 | - grid.datagrid("reload",getCondObjectValue(condId)); | 111 | + grid.datagrid("reload",base.getCondObjectValue(condId)); |
113 | } | 112 | } |
114 | } | 113 | } |
115 | }; | 114 | }; | ... | ... |
1 | +define({ | ||
2 | + root:{ | ||
3 | + title:'公司', | ||
4 | + detailsTitle:'公司详情', | ||
5 | + grid:{ | ||
6 | + code:'编号', | ||
7 | + name:'名称', | ||
8 | + desc:'描述 ', | ||
9 | + bizentity:'适用经营主体', | ||
10 | + valid:'可用' | ||
11 | + }, | ||
12 | + saveTitle:'是否保存基本资料', | ||
13 | + selectMoveRow:'请选择要移动的数据!', | ||
14 | + letterOrNumberValid:'只能输入数字、字母或其组合!', | ||
15 | + select:'请选择', | ||
16 | + country:'国家', | ||
17 | + province:'省/市', | ||
18 | + city:'市/县', | ||
19 | + area:'县/区', | ||
20 | + addr:'详细地址', | ||
21 | + zipCodeValid:'请输入正确的邮编!', | ||
22 | + telphoneValid:'请输入正确的电话!', | ||
23 | + phoneValid:'请输入正确的手机!', | ||
24 | + saveCompanyInfo:'请先保存公司基本资料', | ||
25 | + dept:{ | ||
26 | + cannotAddNext:'根节点无法插入平级部门!', | ||
27 | + cannotDeleteRoot:'根节点无法删除!', | ||
28 | + isDelete:'您确定要删除此部门及其下属部门和岗位吗?', | ||
29 | + isMove:'您确定要移动此部门及其下属部门吗?', | ||
30 | + cannotMoveRoot:'根节点无法移动!', | ||
31 | + selectAddRow:'请选择相应部门节点添加', | ||
32 | + selectDeleteRow:'请选择相应部门节点删除', | ||
33 | + selectMoveRow:'请选择相应部门节点移动' | ||
34 | + }, | ||
35 | + post:{ | ||
36 | + grid:{ | ||
37 | + title:'岗位', | ||
38 | + code:'编号', | ||
39 | + name:'名称' | ||
40 | + }, | ||
41 | + cannotAdd:'根节点无法配置岗位!', | ||
42 | + newPost:'新增', | ||
43 | + updatePost:'编辑', | ||
44 | + removePost:'删除', | ||
45 | + moveUpPost:'上移', | ||
46 | + moveDownPost:'下移', | ||
47 | + selectAddRow:'请选择要添加岗位的部门!', | ||
48 | + isDelete:'您确定要删除此岗位吗?' | ||
49 | + }, | ||
50 | + employee:{ | ||
51 | + grid:{ | ||
52 | + title:'雇员', | ||
53 | + emid:'雇员id', | ||
54 | + code:'工号', | ||
55 | + name:'姓名', | ||
56 | + phone:'手机', | ||
57 | + deName:'部门' | ||
58 | + } | ||
59 | + } | ||
60 | + }, | ||
61 | + "en-US": true, | ||
62 | + "en-US-paris": true | ||
63 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 | +define(['i18n!coupons/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, layout) { | ||
2 | + return function(){ | ||
3 | + var panel = layout.getSelectedPanel(); | ||
4 | + panel.find("area").bind("click",function(){ | ||
5 | + var type=$(this).attr("type"); | ||
6 | + switch (type){ | ||
7 | + case "1": // 审请发行券 | ||
8 | + layout.showPanel({text:'券发行',url:'./coupon/coupons?flagCM=1'}, true, function(){}); | ||
9 | + break; | ||
10 | + case "2": // 审批发行券 | ||
11 | + layout.showPanel({text:'券发行',url:'./coupon/coupons?flagCM=2'}, true, function(){}); | ||
12 | + break; | ||
13 | + case "3": // 查看发行券 | ||
14 | + layout.showPanel({text:'券发行',url:'./coupon/coupons?flagCM=3'}, true, function(){}); | ||
15 | + break; | ||
16 | + case "4": // 审请雇员发券额度 | ||
17 | + layout.showPanel({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=4'}, true, function(){}); | ||
18 | + break; | ||
19 | + case "5": // 审批雇员发券额度 | ||
20 | + layout.showPanel({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=5'}, true, function(){}); | ||
21 | + break; | ||
22 | + case "6": // 查看雇员发券额度 | ||
23 | + layout.showPanel({text:'雇员发券额度',url:'./coupon/employeeIssueCouponQuota?flagCM=6'}, true, function(){}); | ||
24 | + break; | ||
25 | + default: // 查看顾客券账户 | ||
26 | + layout.showPanel({text:'顾客券账户',url:'./coupon/custCouponAcount'}, true, function(){}); | ||
27 | + break; | ||
28 | + } | ||
29 | + }); | ||
30 | + } | ||
31 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 | -define(function(){ // 券型总览 | 1 | +define(['i18n!coupons/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, layout) { |
2 | + // 券型总览 | ||
2 | return { | 3 | return { |
3 | init : function(){ | 4 | init : function(){ |
4 | var couponQuery = "56bad201-f95d-4f5a-81e5-2cd5e154b7e8"; // 券型总览 | 5 | var couponQuery = "56bad201-f95d-4f5a-81e5-2cd5e154b7e8"; // 券型总览 |
5 | - var panel = getSelectedPanel(); | 6 | + var panel = layout.getSelectedPanel(); |
6 | var page = panel.children(".pl-sys-users").show().layout({fit:true}); | 7 | var page = panel.children(".pl-sys-users").show().layout({fit:true}); |
7 | var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID | 8 | var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID |
8 | 9 | ||
9 | function initCrmCouponDatagrid(){ | 10 | function initCrmCouponDatagrid(){ |
10 | return panel.find(".crm-coupon-table").datagrid({ | 11 | return panel.find(".crm-coupon-table").datagrid({ |
11 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 12 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
12 | - title:resource.coupons.summaryDatagrid.title, // 券型总览 | 13 | + title:resource.summaryDatagrid.title, // 券型总览 |
13 | buttons:[{ // 查询条件 | 14 | buttons:[{ // 查询条件 |
14 | - text:resource.btn.select, | 15 | + text:base.resource.btn.select, |
15 | iconCls:"btn-select select-condition", | 16 | iconCls:"btn-select select-condition", |
16 | handler: function(){ | 17 | handler: function(){ |
17 | - showCondObject(couponQuery,datagridReload); | 18 | + base.showCondObject(couponQuery,datagridReload); |
18 | } | 19 | } |
19 | }], | 20 | }], |
20 | tools:[{ | 21 | tools:[{ |
21 | - text:resource.btn.refresh, | 22 | + text:base.resource.btn.refresh, |
22 | iconCls:'btn-refresh', | 23 | iconCls:'btn-refresh', |
23 | - handler:panelRefreshUtils | 24 | + handler:function(){ |
25 | + | ||
26 | + } | ||
24 | }] | 27 | }] |
25 | }), | 28 | }), |
26 | url:"./query/"+couponQuery+".json", | 29 | url:"./query/"+couponQuery+".json", |
27 | fitColumns:true, | 30 | fitColumns:true, |
28 | columns:[[ | 31 | columns:[[ |
29 | {field:'ck',checkbox:true}, | 32 | {field:'ck',checkbox:true}, |
30 | - {field:'CPL_ID',title:resource.coupons.summaryDatagrid.cpl_id,width:80,align:'center'}, // 券型编号 | 33 | + {field:'CPL_ID',title:resource.summaryDatagrid.cpl_id,width:80,align:'center'}, // 券型编号 |
31 | - {field:'CPL_NAME',title:resource.coupons.summaryDatagrid.cpl_name,width:100,align:'center'}, // 券名称 | 34 | + {field:'CPL_NAME',title:resource.summaryDatagrid.cpl_name,width:100,align:'center'}, // 券名称 |
32 | - {field:'CPN_TYPE',title:resource.coupons.summaryDatagrid.cpn_type,width:60,align:'center'}, // 类型 | 35 | + {field:'CPN_TYPE',title:resource.summaryDatagrid.cpn_type,width:60,align:'center'}, // 类型 |
33 | - {field:'SHARED',title:resource.coupons.summaryDatagrid.shared,width:60,align:'center'}, // 共享性 | 36 | + {field:'SHARED',title:resource.summaryDatagrid.shared,width:60,align:'center'}, // 共享性 |
34 | - {field:'BEBNAME',title:resource.coupons.summaryDatagrid.bebname,width:100,align:'center'}, // 发行主体 | 37 | + {field:'BEBNAME',title:resource.summaryDatagrid.bebname,width:100,align:'center'}, // 发行主体 |
35 | - {field:'ORNAME',title:resource.coupons.summaryDatagrid.orname,width:100,align:'center'}, // 发行组织 | 38 | + {field:'ORNAME',title:resource.summaryDatagrid.orname,width:100,align:'center'}, // 发行组织 |
36 | - {field:'CHNAME',title:resource.coupons.summaryDatagrid.chname,width:100,align:'center'}, // 发行渠道 | 39 | + {field:'CHNAME',title:resource.summaryDatagrid.chname,width:100,align:'center'}, // 发行渠道 |
37 | - {field:'ISU_S_TIME',title:resource.coupons.summaryDatagrid.isu_s_time,width:80,align:'center'}, // 发行起始日 | 40 | + {field:'ISU_S_TIME',title:resource.summaryDatagrid.isu_s_time,width:80,align:'center'}, // 发行起始日 |
38 | - {field:'ISU_E_TIME',title:resource.coupons.summaryDatagrid.isu_e_time,width:80,align:'center'}, // 发行截止日 | 41 | + {field:'ISU_E_TIME',title:resource.summaryDatagrid.isu_e_time,width:80,align:'center'}, // 发行截止日 |
39 | - {field:'USE_S_TIME',title:resource.coupons.summaryDatagrid.use_s_time,width:80,align:'center'}, // 使用起始日 | 42 | + {field:'USE_S_TIME',title:resource.summaryDatagrid.use_s_time,width:80,align:'center'}, // 使用起始日 |
40 | - {field:'USE_E_TIME',title:resource.coupons.summaryDatagrid.use_e_time,width:80,align:'center'}, // 使用截止日 | 43 | + {field:'USE_E_TIME',title:resource.summaryDatagrid.use_e_time,width:80,align:'center'}, // 使用截止日 |
41 | - {field:'MAX_NUM',title:resource.coupons.summaryDatagrid.max_num,width:80,align:'center'}, // 发行限量 | 44 | + {field:'MAX_NUM',title:resource.summaryDatagrid.max_num,width:80,align:'center'}, // 发行限量 |
42 | - {field:'NOW_NUM',title:resource.coupons.summaryDatagrid.now_num,width:80,align:'center'}, // 发行余量 | 45 | + {field:'NOW_NUM',title:resource.summaryDatagrid.now_num,width:80,align:'center'}, // 发行余量 |
43 | - {field:'VALID_NUM',title:resource.coupons.summaryDatagrid.valid_num,width:80,align:'center'}, // 有效配出额度 | 46 | + {field:'VALID_NUM',title:resource.summaryDatagrid.valid_num,width:80,align:'center'}, // 有效配出额度 |
44 | - {field:'ISSUED_NUM',title:resource.coupons.summaryDatagrid.issued_num,width:80,align:'center'}, // 已发放量 | 47 | + {field:'ISSUED_NUM',title:resource.summaryDatagrid.issued_num,width:80,align:'center'}, // 已发放量 |
45 | - {field:'NOUSE_NUM',title:resource.coupons.summaryDatagrid.nouse_num,width:80,align:'center'}, // 未使用量 | 48 | + {field:'NOUSE_NUM',title:resource.summaryDatagrid.nouse_num,width:80,align:'center'}, // 未使用量 |
46 | - {field:'USED_NUM',title:resource.coupons.summaryDatagrid.used_num,width:80,align:'center'}, // 已使用量 | 49 | + {field:'USED_NUM',title:resource.summaryDatagrid.used_num,width:80,align:'center'}, // 已使用量 |
47 | - {field:'IS_VALID',title:resource.coupons.summaryDatagrid.is_valid,width:80,align:'center'} // 是否过期 | 50 | + {field:'IS_VALID',title:resource.summaryDatagrid.is_valid,width:80,align:'center'} // 是否过期 |
48 | ]] | 51 | ]] |
49 | }); | 52 | }); |
50 | 53 | ||
51 | function datagridReload(){ | 54 | function datagridReload(){ |
52 | - var param =getCondObjectValue(couponQuery); | 55 | + var param =base.getCondObjectValue(couponQuery); |
53 | crmCouponDatagrid.datagrid("reload",param); | 56 | crmCouponDatagrid.datagrid("reload",param); |
54 | } | 57 | } |
55 | } | 58 | } | ... | ... |
1 | -define(function(){ // 顾客券账户 | 1 | +define(['i18n!coupons/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, layout) { |
2 | + // 顾客券账户 | ||
2 | return { | 3 | return { |
3 | init : function(){ | 4 | init : function(){ |
4 | var couponQuery = "72c917f2-e51b-4227-9138-0d196975a7c3"; // 顾客券账户 | 5 | var couponQuery = "72c917f2-e51b-4227-9138-0d196975a7c3"; // 顾客券账户 |
5 | - var panel = getSelectedPanel(); | 6 | + var panel = layout.getSelectedPanel(); |
6 | var page = panel.children(".pl-sys-users").show().layout({fit:true}); | 7 | var page = panel.children(".pl-sys-users").show().layout({fit:true}); |
7 | var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID | 8 | var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID |
8 | 9 | ||
9 | function initCrmCouponDatagrid(){ | 10 | function initCrmCouponDatagrid(){ |
10 | return panel.find(".crm-coupon-table").datagrid({ | 11 | return panel.find(".crm-coupon-table").datagrid({ |
11 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 12 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
12 | - title:resource.coupons.couponAcountDatagrid.title, // 券列表 | 13 | + title:resource.couponAcountDatagrid.title, // 券列表 |
13 | buttons:[{ // 查询条件 | 14 | buttons:[{ // 查询条件 |
14 | - text:resource.btn.select, | 15 | + text:base.resource.btn.select, |
15 | iconCls:"btn-select select-condition", | 16 | iconCls:"btn-select select-condition", |
16 | handler: function(){ | 17 | handler: function(){ |
17 | - showCondObject(couponQuery,datagridReload); | 18 | + base.showCondObject(couponQuery,datagridReload); |
18 | } | 19 | } |
19 | }], | 20 | }], |
20 | tools:[{ | 21 | tools:[{ |
21 | - text:resource.btn.refresh, | 22 | + text:base.resource.btn.refresh, |
22 | iconCls:'btn-refresh', | 23 | iconCls:'btn-refresh', |
23 | - handler:panelRefreshUtils | 24 | + handler:function(){ |
25 | + | ||
26 | + } | ||
24 | }] | 27 | }] |
25 | }), | 28 | }), |
26 | url:"./query/"+couponQuery+".json", | 29 | url:"./query/"+couponQuery+".json", |
27 | fitColumns:true, | 30 | fitColumns:true, |
28 | columns:[[ | 31 | columns:[[ |
29 | {field:'ck',checkbox:true}, | 32 | {field:'ck',checkbox:true}, |
30 | - {field:'CST_ID',title:resource.coupons.couponAcountDatagrid.CST_ID,width:80,align:'center'}, // 顾客ID | 33 | + {field:'CST_ID',title:resource.couponAcountDatagrid.CST_ID,width:80,align:'center'}, // 顾客ID |
31 | - {field:'CPN_ID',title:resource.coupons.couponAcountDatagrid.CPN_ID,width:80,align:'center'}, // 券号 | 34 | + {field:'CPN_ID',title:resource.couponAcountDatagrid.CPN_ID,width:80,align:'center'}, // 券号 |
32 | - {field:'CPL_ID',title:resource.coupons.couponAcountDatagrid.CPL_ID,width:80,align:'center'}, // 券型号 | 35 | + {field:'CPL_ID',title:resource.couponAcountDatagrid.CPL_ID,width:80,align:'center'}, // 券型号 |
33 | - {field:'CPL_NAME',title:resource.coupons.couponAcountDatagrid.CPL_NAME,width:100,align:'center'}, // 券名称 | 36 | + {field:'CPL_NAME',title:resource.couponAcountDatagrid.CPL_NAME,width:100,align:'center'}, // 券名称 |
34 | - {field:'CPN_TYPE',title:resource.coupons.couponAcountDatagrid.CPN_TYPE,width:60,align:'center'}, // 类型 | 37 | + {field:'CPN_TYPE',title:resource.couponAcountDatagrid.CPN_TYPE,width:60,align:'center'}, // 类型 |
35 | - {field:'SHARED',title:resource.coupons.couponAcountDatagrid.SHARED,width:60,align:'center'}, // 共享性 | 38 | + {field:'SHARED',title:resource.couponAcountDatagrid.SHARED,width:60,align:'center'}, // 共享性 |
36 | - {field:'BEBNAME',title:resource.coupons.couponAcountDatagrid.BEBNAME,width:100,align:'center'}, // 发行主体 | 39 | + {field:'BEBNAME',title:resource.couponAcountDatagrid.BEBNAME,width:100,align:'center'}, // 发行主体 |
37 | - {field:'ORNAME',title:resource.coupons.couponAcountDatagrid.ORNAME,width:100,align:'center'}, // 发行组织 | 40 | + {field:'ORNAME',title:resource.couponAcountDatagrid.ORNAME,width:100,align:'center'}, // 发行组织 |
38 | - {field:'CHNAME',title:resource.coupons.couponAcountDatagrid.CHNAME,width:100,align:'center'}, // 发行渠道 | 41 | + {field:'CHNAME',title:resource.couponAcountDatagrid.CHNAME,width:100,align:'center'}, // 发行渠道 |
39 | - {field:'USE_S_TIME',title:resource.coupons.couponAcountDatagrid.USE_S_TIME,width:80,align:'center'}, // 使用起始日 | 42 | + {field:'USE_S_TIME',title:resource.couponAcountDatagrid.USE_S_TIME,width:80,align:'center'}, // 使用起始日 |
40 | - {field:'USE_E_TIME',title:resource.coupons.couponAcountDatagrid.USE_E_TIME,width:80,align:'center'}, // 使用截止日 | 43 | + {field:'USE_E_TIME',title:resource.couponAcountDatagrid.USE_E_TIME,width:80,align:'center'}, // 使用截止日 |
41 | - {field:'RCV_TIME',title:resource.coupons.couponAcountDatagrid.RCV_TIME,width:80,align:'center'}, // 领券日期 | 44 | + {field:'RCV_TIME',title:resource.couponAcountDatagrid.RCV_TIME,width:80,align:'center'}, // 领券日期 |
42 | - {field:'CPN_STAT',title:resource.coupons.couponAcountDatagrid.CPN_STAT,width:60,align:'center'}, // 状态 | 45 | + {field:'CPN_STAT',title:resource.couponAcountDatagrid.CPN_STAT,width:60,align:'center'}, // 状态 |
43 | - {field:'USE_TIME',title:resource.coupons.couponAcountDatagrid.USE_TIME,width:80,align:'center'} // 使用日期 | 46 | + {field:'USE_TIME',title:resource.couponAcountDatagrid.USE_TIME,width:80,align:'center'} // 使用日期 |
44 | ]] | 47 | ]] |
45 | }); | 48 | }); |
46 | 49 | ||
47 | function datagridReload(){ | 50 | function datagridReload(){ |
48 | - var param =getCondObjectValue(couponQuery); | 51 | + var param =base.getCondObjectValue(couponQuery); |
49 | crmCouponDatagrid.datagrid("reload",param); | 52 | crmCouponDatagrid.datagrid("reload",param); |
50 | } | 53 | } |
51 | } | 54 | } | ... | ... |
1 | -define(function(){ // 雇员券额度 | 1 | +define(['i18n!coupons/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, layout) { |
2 | + // 雇员券额度 | ||
2 | return { | 3 | return { |
3 | init : function(){ | 4 | init : function(){ |
4 | var couponQuery = "17ae6d75-239d-4f1c-9a8c-955a4de83531"; // 雇员券额度 | 5 | var couponQuery = "17ae6d75-239d-4f1c-9a8c-955a4de83531"; // 雇员券额度 |
5 | - var panel = getSelectedPanel(); | 6 | + var panel = layout.getSelectedPanel(); |
6 | var page = panel.children(".pl-sys-users").show().layout({fit:true}); | 7 | var page = panel.children(".pl-sys-users").show().layout({fit:true}); |
7 | var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID | 8 | var crmCouponDatagrid = initCrmCouponDatagrid(); // 初始化券列表DATAGRID |
8 | 9 | ||
9 | function initCrmCouponDatagrid(){ | 10 | function initCrmCouponDatagrid(){ |
10 | return panel.find(".crm-coupon-table").datagrid({ | 11 | return panel.find(".crm-coupon-table").datagrid({ |
11 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 12 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
12 | - title:resource.coupons.couponQuotaDatagrid.title, // 雇员券额度列表 | 13 | + title:resource.couponQuotaDatagrid.title, // 雇员券额度列表 |
13 | buttons:[{ // 查询条件 | 14 | buttons:[{ // 查询条件 |
14 | - text:resource.btn.select, | 15 | + text:base.resource.btn.select, |
15 | iconCls:"btn-select select-condition", | 16 | iconCls:"btn-select select-condition", |
16 | handler: function(){ | 17 | handler: function(){ |
17 | - showCondObject(couponQuery,datagridReload); | 18 | + base.showCondObject(couponQuery,datagridReload); |
18 | } | 19 | } |
19 | }], | 20 | }], |
20 | tools:[{ | 21 | tools:[{ |
21 | - text:resource.btn.refresh, | 22 | + text:base.resource.btn.refresh, |
22 | iconCls:'btn-refresh', | 23 | iconCls:'btn-refresh', |
23 | - handler:panelRefreshUtils | 24 | + handler:function(){ |
25 | + | ||
26 | + } | ||
24 | }] | 27 | }] |
25 | }), | 28 | }), |
26 | url:"./query/"+couponQuery+".json", | 29 | url:"./query/"+couponQuery+".json", |
27 | fitColumns:true, | 30 | fitColumns:true, |
28 | columns:[[ | 31 | columns:[[ |
29 | {field:'ck',checkbox:true}, | 32 | {field:'ck',checkbox:true}, |
30 | - {field:'EMID',title:resource.coupons.couponQuotaDatagrid.EMID,width:80,align:'center'}, // 雇员ID | 33 | + {field:'EMID',title:resource.couponQuotaDatagrid.EMID,width:80,align:'center'}, // 雇员ID |
31 | - {field:'EMCODE',title:resource.coupons.couponQuotaDatagrid.EMCODE,width:100,align:'center'}, // 工号 | 34 | + {field:'EMCODE',title:resource.couponQuotaDatagrid.EMCODE,width:100,align:'center'}, // 工号 |
32 | - {field:'EMNAME',title:resource.coupons.couponQuotaDatagrid.EMNAME,width:60,align:'center'}, // 姓名 | 35 | + {field:'EMNAME',title:resource.couponQuotaDatagrid.EMNAME,width:60,align:'center'}, // 姓名 |
33 | - {field:'CONAME',title:resource.coupons.couponQuotaDatagrid.CONAME,width:220,align:'center'}, // 公司 | 36 | + {field:'CONAME',title:resource.couponQuotaDatagrid.CONAME,width:220,align:'center'}, // 公司 |
34 | - {field:'DENAME',title:resource.coupons.couponQuotaDatagrid.DENAME,width:120,align:'center'}, // 部门 | 37 | + {field:'DENAME',title:resource.couponQuotaDatagrid.DENAME,width:120,align:'center'}, // 部门 |
35 | - {field:'PONAME',title:resource.coupons.couponQuotaDatagrid.PONAME,width:120,align:'center'}, // 岗位 | 38 | + {field:'PONAME',title:resource.couponQuotaDatagrid.PONAME,width:120,align:'center'}, // 岗位 |
36 | - {field:'CPL_ID',title:resource.coupons.couponQuotaDatagrid.CPL_ID,width:60,align:'center'}, // 券型号 | 39 | + {field:'CPL_ID',title:resource.couponQuotaDatagrid.CPL_ID,width:60,align:'center'}, // 券型号 |
37 | - {field:'CPL_NAME',title:resource.coupons.couponQuotaDatagrid.CPL_NAME,width:100,align:'center'}, // 券名称 | 40 | + {field:'CPL_NAME',title:resource.couponQuotaDatagrid.CPL_NAME,width:100,align:'center'}, // 券名称 |
38 | - {field:'NOW_NUM',title:resource.coupons.couponQuotaDatagrid.NOW_NUM,width:80,align:'center'}, // 额度余量 | 41 | + {field:'NOW_NUM',title:resource.couponQuotaDatagrid.NOW_NUM,width:80,align:'center'}, // 额度余量 |
39 | - {field:'ISU_S_TIME',title:resource.coupons.couponQuotaDatagrid.ISU_S_TIME,width:90,align:'center'}, // 有效起始日 | 42 | + {field:'ISU_S_TIME',title:resource.couponQuotaDatagrid.ISU_S_TIME,width:90,align:'center'}, // 有效起始日 |
40 | - {field:'ISU_E_TIME',title:resource.coupons.couponQuotaDatagrid.ISU_E_TIME,width:90,align:'center'}, // 有效截止日 | 43 | + {field:'ISU_E_TIME',title:resource.couponQuotaDatagrid.ISU_E_TIME,width:90,align:'center'}, // 有效截止日 |
41 | - {field:'TOTAL_NUM',title:resource.coupons.couponQuotaDatagrid.TOTAL_NUM,width:80,align:'center'}, // 获得额度 | 44 | + {field:'TOTAL_NUM',title:resource.couponQuotaDatagrid.TOTAL_NUM,width:80,align:'center'}, // 获得额度 |
42 | - {field:'ISU_NUM',title:resource.coupons.couponQuotaDatagrid.ISU_NUM,width:80,align:'center'}, // 已发放量 TODO 计算结果不正确 | 45 | + {field:'ISU_NUM',title:resource.couponQuotaDatagrid.ISU_NUM,width:80,align:'center'}, // 已发放量 TODO 计算结果不正确 |
43 | - {field:'TRANSFER_NUM',title:resource.coupons.couponQuotaDatagrid.TRANSFER_NUM,width:80,align:'center'}, // 已转让量 TODO 暂未实现 | 46 | + {field:'TRANSFER_NUM',title:resource.couponQuotaDatagrid.TRANSFER_NUM,width:80,align:'center'}, // 已转让量 TODO 暂未实现 |
44 | - {field:'CPN_TYPE',title:resource.coupons.couponQuotaDatagrid.CPN_TYPE,width:60,align:'center'}, // 类型 | 47 | + {field:'CPN_TYPE',title:resource.couponQuotaDatagrid.CPN_TYPE,width:60,align:'center'}, // 类型 |
45 | - {field:'SHARED',title:resource.coupons.couponQuotaDatagrid.SHARED,width:60,align:'center'}, // 共享性 | 48 | + {field:'SHARED',title:resource.couponQuotaDatagrid.SHARED,width:60,align:'center'}, // 共享性 |
46 | - {field:'BEBNAME',title:resource.coupons.couponQuotaDatagrid.BEBNAME,width:80,align:'center'}, // 发行主体 | 49 | + {field:'BEBNAME',title:resource.couponQuotaDatagrid.BEBNAME,width:80,align:'center'}, // 发行主体 |
47 | - {field:'ORNAME',title:resource.coupons.couponQuotaDatagrid.ORNAME,width:80,align:'center'}, // 发行组织 | 50 | + {field:'ORNAME',title:resource.couponQuotaDatagrid.ORNAME,width:80,align:'center'}, // 发行组织 |
48 | - {field:'CHNAME',title:resource.coupons.couponQuotaDatagrid.CHNAME,width:80,align:'center'} // 发行渠道 | 51 | + {field:'CHNAME',title:resource.couponQuotaDatagrid.CHNAME,width:80,align:'center'} // 发行渠道 |
49 | ]] | 52 | ]] |
50 | }); | 53 | }); |
51 | 54 | ||
52 | function datagridReload(){ | 55 | function datagridReload(){ |
53 | - var param =getCondObjectValue(couponQuery); | 56 | + var param =base.getCondObjectValue(couponQuery); |
54 | crmCouponDatagrid.datagrid("reload",param); | 57 | crmCouponDatagrid.datagrid("reload",param); |
55 | } | 58 | } |
56 | } | 59 | } | ... | ... |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 | +define({ | ||
2 | + root:{ | ||
3 | + name:'选择新建券的类型', | ||
4 | + couponsdetail:'券详情', | ||
5 | + addDialog:{ | ||
6 | + title:'选择新建券的类型' | ||
7 | + }, | ||
8 | + btnTitle:{ | ||
9 | + amountBtn:'金额券', | ||
10 | + discountBtn:'折扣券', | ||
11 | + giftBtn:'礼品券', | ||
12 | + pricingBtn:'定价券', | ||
13 | + freeShippingBtn:'包邮券' | ||
14 | + }, | ||
15 | + noLmt:'不限', | ||
16 | + approval:{ | ||
17 | + isuETimeOvertimeTip:'发行截止日已过期, 不能通过审核', | ||
18 | + issueQuotaOverFlowTip:'发放额度超出上限, 不能通过审核', | ||
19 | + issueQuotaEmptyTip:'发放额度为空, 不能通过审核', | ||
20 | + state0:'创建中', | ||
21 | + state1:'待审批', | ||
22 | + state2:'已核准', | ||
23 | + state3:'已驳回' | ||
24 | + }, | ||
25 | + couponDatagrid:{ // 券发行 | ||
26 | + title:'券型列表', | ||
27 | + cpl_id:'券型编号', | ||
28 | + cpl_name:'券名称', | ||
29 | + cpl_desc:'描述', | ||
30 | + cpn_type:'类型', | ||
31 | + shared:'共享性', | ||
32 | + bebname:'发行主体', | ||
33 | + orname:'发行组织', | ||
34 | + chname:'发行渠道', | ||
35 | + max_num:'发行限量', | ||
36 | + isu_s_time:'发行起始日', | ||
37 | + isu_e_time:'发行截止日', | ||
38 | + use_s_time:'使用起始日', | ||
39 | + use_e_time:'使用截止日', | ||
40 | + emname:'创建人', | ||
41 | + rec_time:'创建时间', | ||
42 | + is_available:'可用', | ||
43 | + cpl_stat:'审批状态', | ||
44 | + authname:'审批人', | ||
45 | + authtime:'审批时间' | ||
46 | + }, | ||
47 | + summaryDatagrid:{ // 券型总览 | ||
48 | + title:'券型总览', | ||
49 | + cpl_id:'券型编号', | ||
50 | + cpl_name:'券名称', | ||
51 | + cpl_desc:'描述', | ||
52 | + cpn_type:'类型', | ||
53 | + shared:'共享性', | ||
54 | + bebname:'发行主体', | ||
55 | + orname:'发行组织', | ||
56 | + chname:'发行渠道', | ||
57 | + max_num:'发行限量', | ||
58 | + isu_s_time:'发行起始日', | ||
59 | + isu_e_time:'发行截止日', | ||
60 | + use_s_time:'使用起始日', | ||
61 | + use_e_time:'使用截止日', | ||
62 | + max_num:'发行限量', | ||
63 | + now_num:'发行余量', | ||
64 | + valid_num:'有效配出额度', | ||
65 | + issued_num:'已发放量', | ||
66 | + nouse_num:'未使用量', | ||
67 | + used_num:'已使用量', | ||
68 | + is_valid:'是否过期' | ||
69 | + }, | ||
70 | + couponAcountDatagrid:{ // 顾客券账户 | ||
71 | + title:'券列表', | ||
72 | + CST_ID:'顾客ID', | ||
73 | + CPN_ID:'券号', | ||
74 | + CPL_ID:'券型号', | ||
75 | + CPL_NAME:'券名称', | ||
76 | + CPN_TYPE:'类型', | ||
77 | + SHARED:'共享性', | ||
78 | + BEBNAME:'发行主体', | ||
79 | + ORNAME:'发行组织', | ||
80 | + CHNAME:'发行渠道', | ||
81 | + USE_S_TIME:'使用起始日', | ||
82 | + USE_E_TIME:'使用截止日', | ||
83 | + RCV_TIME:'领券日期', | ||
84 | + CPN_STAT:'状态', | ||
85 | + USE_TIME:'使用日期' | ||
86 | + }, | ||
87 | + couponQuotaDatagrid:{ // 雇员券额度 | ||
88 | + title:'雇员券额度列表', | ||
89 | + EMID:'雇员ID', | ||
90 | + EMCODE:'工号', | ||
91 | + EMNAME:'姓名', | ||
92 | + CONAME:'公司', | ||
93 | + DENAME:'部门', | ||
94 | + PONAME:'岗位', | ||
95 | + CPL_ID:'券型号', | ||
96 | + CPL_NAME:'券名称', | ||
97 | + NOW_NUM:'额度余量', | ||
98 | + ISU_S_TIME:'有效起始日', | ||
99 | + ISU_E_TIME:'有效截止日', | ||
100 | + TOTAL_NUM:'获得额度', | ||
101 | + ISU_NUM:'已发放量', | ||
102 | + TRANSFER_NUM:'已转让量', | ||
103 | + CPN_TYPE:'类型', | ||
104 | + SHARED:'共享性', | ||
105 | + BEBNAME:'发行主体', | ||
106 | + ORNAME:'发行组织', | ||
107 | + CHNAME:'发行渠道' | ||
108 | + }, | ||
109 | + issueCouponQuotaDatagrid:{ // 发券额度 | ||
110 | + title:'发券额度列表', | ||
111 | + DOC_CODE:'单据编号', | ||
112 | + CPL_ID:'券型编号', | ||
113 | + CPL_NAME:'券名称', | ||
114 | + CPN_TYPE:'类型', | ||
115 | + CNT:'发放人数', | ||
116 | + TOTAL_NUM:'发放额度', | ||
117 | + BEBNAME:'发行主体', | ||
118 | + ORNAME:'发行组织', | ||
119 | + CHNAME:'发行渠道', | ||
120 | + EMNAME:'申请发放人', | ||
121 | + REC_TIME:'申请日期', | ||
122 | + ENABLE:'可用', | ||
123 | + GRT_STAT:'审批状态' | ||
124 | + }, | ||
125 | + grantEmployeeDatagrid:{ // 发放雇员 | ||
126 | + title:'发放雇员列表', | ||
127 | + EMID:'单据编号', | ||
128 | + EMCODE:'券型编号', | ||
129 | + EMNAME:'券名称', | ||
130 | + CONAME:'类型', | ||
131 | + DENAME:'发放人数', | ||
132 | + PONAME:'发放额度', | ||
133 | + THIS_NUM:'发行主体' | ||
134 | + }, | ||
135 | + Y:'是', | ||
136 | + N:'否', | ||
137 | + validateMsg:{ | ||
138 | + chkNumber:'请输入有效数字', | ||
139 | + chkDiscount:'请输入1到100区间的整数', | ||
140 | + chkIsuSTime:'发行起始日不能早于今天', | ||
141 | + chkUseSTime:'使用起始日不能早于发行起始日', | ||
142 | + chkIsuETime:'发行截止日不能早于发行起始日', | ||
143 | + chkUseETime:'使用截止日不能早于使用起始日', | ||
144 | + chkUseETimeVsIsuETime:'使用截止日不能早于发行截止日', | ||
145 | + chkDate:'请输入正确的日期', | ||
146 | + chkIsBlank:'请输入有效内容', | ||
147 | + chkGiftIsRepeat:'礼品不能重复', | ||
148 | + chkMaxNumber:'已超出可发放额度' | ||
149 | + }, | ||
150 | + Msg:{ | ||
151 | + cplIsExist:'券型编号已存在', | ||
152 | + msgSaveSuccess:'保存成功', | ||
153 | + msgUpdateSuccess:'修改成功', | ||
154 | + msgResult:'结果共', | ||
155 | + msgItem:'项: ', | ||
156 | + msgMaxNumVsTotalNum:'发行限量不得小于已经发放的数量', | ||
157 | + msgSaveCoupon:'请先保存优惠券', | ||
158 | + msgUseETimeExpire:'券使用截止日已过期, 不能继续执行', | ||
159 | + msgIsuETimeExpire:'券发行截止日已过期, 不能继续执行', | ||
160 | + msgTotal:'合计', | ||
161 | + msgSaveIssueCouponQuotaDetail:'请先保存发券额度单', | ||
162 | + msgAddEmployeeFail:'本次发放额度将超出可发放额度, 添加雇员失败', | ||
163 | + msgEditEmployeeIssueQuota:'编辑雇员发放额度', | ||
164 | + msgValidQuota:'本次发放额度将超出可发放额度, 请输入有效额度' | ||
165 | + }, | ||
166 | + tabText:{ | ||
167 | + couponTxt:'券发行', | ||
168 | + issueCouponQuotaDetailTxt:'发券额度单', | ||
169 | + employeeIssueCouponQuotaTxt:'雇员发券额度' | ||
170 | + } | ||
171 | + }, | ||
172 | + "en-US": true, | ||
173 | + "en-US-paris": true | ||
174 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -define(["echarts"], function(){ | 1 | +define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index','echarts'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(){ | 3 | init : function(){ |
4 | var actid = 1; | 4 | var actid = 1; |
5 | var customer_datagrid; | 5 | var customer_datagrid; |
6 | var custQuery = 'ea9fc1d8-05b6-432f-a72f-a760f351bc7d'; | 6 | var custQuery = 'ea9fc1d8-05b6-432f-a72f-a760f351bc7d'; |
7 | - var pannel = getSelectedPanel(); // 初始化面板 | 7 | + var pannel = layout.getSelectedPanel(); // 初始化面板 |
8 | var page = pannel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div | 8 | var page = pannel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div |
9 | var window = initWindow(); // 初始化添加页面 | 9 | var window = initWindow(); // 初始化添加页面 |
10 | 10 | ||
11 | function initCustomerTypeChart(){ | 11 | function initCustomerTypeChart(){ |
12 | var option = { | 12 | var option = { |
13 | title:{ | 13 | title:{ |
14 | - text:resource.customers.custTypeText, | 14 | + text:resource.custTypeText, |
15 | textStyle: { | 15 | textStyle: { |
16 | fontSize: 18, | 16 | fontSize: 18, |
17 | fontWeight: 'normal', | 17 | fontWeight: 'normal', |
... | @@ -50,7 +50,7 @@ define(["echarts"], function(){ | ... | @@ -50,7 +50,7 @@ define(["echarts"], function(){ |
50 | function initBornSegmentChart(){ | 50 | function initBornSegmentChart(){ |
51 | var option = { | 51 | var option = { |
52 | title:{ | 52 | title:{ |
53 | - text:resource.customers.bornSegmentText, | 53 | + text:resource.bornSegmentText, |
54 | textStyle: { | 54 | textStyle: { |
55 | fontSize: 18, | 55 | fontSize: 18, |
56 | fontWeight: 'normal', | 56 | fontWeight: 'normal', |
... | @@ -89,7 +89,7 @@ define(["echarts"], function(){ | ... | @@ -89,7 +89,7 @@ define(["echarts"], function(){ |
89 | function initNewCustomersChart(){ | 89 | function initNewCustomersChart(){ |
90 | var option = { | 90 | var option = { |
91 | title:{ | 91 | title:{ |
92 | - text:resource.customers.newCustText, | 92 | + text:resource.newCustText, |
93 | textStyle: { | 93 | textStyle: { |
94 | fontSize: 18, | 94 | fontSize: 18, |
95 | fontWeight: 'normal', | 95 | fontWeight: 'normal', |
... | @@ -120,7 +120,7 @@ define(["echarts"], function(){ | ... | @@ -120,7 +120,7 @@ define(["echarts"], function(){ |
120 | ], | 120 | ], |
121 | yAxis : [ | 121 | yAxis : [ |
122 | { | 122 | { |
123 | - name:resource.customers.newCust_yAxis_name, | 123 | + name:resource.newCust_yAxis_name, |
124 | nameTextStyle:{ | 124 | nameTextStyle:{ |
125 | color:'#595959' | 125 | color:'#595959' |
126 | }, | 126 | }, |
... | @@ -129,11 +129,11 @@ define(["echarts"], function(){ | ... | @@ -129,11 +129,11 @@ define(["echarts"], function(){ |
129 | ], | 129 | ], |
130 | series : [ | 130 | series : [ |
131 | { | 131 | { |
132 | - name:resource.customers.newCust_series_name_0, | 132 | + name:resource.newCust_series_name_0, |
133 | type:'bar' | 133 | type:'bar' |
134 | }, | 134 | }, |
135 | { | 135 | { |
136 | - name:resource.customers.newCust_series_name_1, | 136 | + name:resource.newCust_series_name_1, |
137 | type:'bar' | 137 | type:'bar' |
138 | } | 138 | } |
139 | ] | 139 | ] |
... | @@ -158,39 +158,39 @@ define(["echarts"], function(){ | ... | @@ -158,39 +158,39 @@ define(["echarts"], function(){ |
158 | // 初始化表格 | 158 | // 初始化表格 |
159 | function initDatagrid(){ | 159 | function initDatagrid(){ |
160 | return page.layout("panel","center").children(".crm-customers-table").datagrid({ | 160 | return page.layout("panel","center").children(".crm-customers-table").datagrid({ |
161 | - title:resource.customers.datagrid_title, | 161 | + title:resource.datagrid_title, |
162 | url:"./query/"+custQuery+".json", | 162 | url:"./query/"+custQuery+".json", |
163 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 163 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
164 | buttons:[{ | 164 | buttons:[{ |
165 | - text:resource.btn.select, | 165 | + text:base.resource.btn.select, |
166 | iconCls:'btn-select', | 166 | iconCls:'btn-select', |
167 | handler: function(){ | 167 | handler: function(){ |
168 | - showCondObject(custQuery, datagridReload); | 168 | + base.showCondObject(custQuery, datagridReload); |
169 | } | 169 | } |
170 | }] | 170 | }] |
171 | }), | 171 | }), |
172 | fitColumns:true,//使列自动展开/收缩到合适的DataGrid宽度 | 172 | fitColumns:true,//使列自动展开/收缩到合适的DataGrid宽度 |
173 | columns:[[ | 173 | columns:[[ |
174 | {field:'ck',checkbox:true }, | 174 | {field:'ck',checkbox:true }, |
175 | - {field:'CST_ID',title:resource.customers.datagrid_col_cst_id_title, width:60, align:"center"}, | 175 | + {field:'CST_ID',title:resource.datagrid_col_cst_id_title, width:60, align:"center"}, |
176 | - {field:'CST_TYPE',title:resource.customers.datagrid_col_cst_type_title, width:60, align:"center", | 176 | + {field:'CST_TYPE',title:resource.datagrid_col_cst_type_title, width:60, align:"center", |
177 | formatter: function(value,row,index){ | 177 | formatter: function(value,row,index){ |
178 | - return value>0?resource.customers.newCust_series_name_0:resource.customers.newCust_series_name_1; | 178 | + return value>0?resource.newCust_series_name_0:resource.customers.newCust_series_name_1; |
179 | } | 179 | } |
180 | }, | 180 | }, |
181 | - {field:'CST_NAME',title:resource.customers.datagrid_col_cst_name_title, width:80, align:"center"}, | 181 | + {field:'CST_NAME',title:resource.datagrid_col_cst_name_title, width:80, align:"center"}, |
182 | - {field:'NICK_NAME',title:resource.customers.datagrid_col_nick_name_title, width:80, align:"center"}, | 182 | + {field:'NICK_NAME',title:resource.datagrid_col_nick_name_title, width:80, align:"center"}, |
183 | - {field:'PHONE',title:resource.customers.datagrid_col_phone_title, width:60, align:"center"}, | 183 | + {field:'PHONE',title:resource.datagrid_col_phone_title, width:60, align:"center"}, |
184 | - {field:'OPEN_ID',title:resource.customers.datagrid_col_open_id_title, width:150, align:"center"}, | 184 | + {field:'OPEN_ID',title:resource.datagrid_col_open_id_title, width:150, align:"center"}, |
185 | - {field:'EMAIL',title:resource.customers.datagrid_col_email_title, width:100, align:"center"}, | 185 | + {field:'EMAIL',title:resource.datagrid_col_email_title, width:100, align:"center"}, |
186 | /*{field:'VERIFY',title:'身份认证', width:60, align:"center", | 186 | /*{field:'VERIFY',title:'身份认证', width:60, align:"center", |
187 | formatter: function(value,row,index){ | 187 | formatter: function(value,row,index){ |
188 | return value>0?'是':'否'; | 188 | return value>0?'是':'否'; |
189 | } | 189 | } |
190 | },*/ | 190 | },*/ |
191 | - {field:'REG_TIME',title:resource.customers.datagrid_col_reg_time_title, width:60, align:"center", | 191 | + {field:'REG_TIME',title:resource.datagrid_col_reg_time_title, width:60, align:"center", |
192 | formatter: function(value,row,index){ | 192 | formatter: function(value,row,index){ |
193 | - return value?Date.parseDate(value).format("yyyy-MM-dd"):null; | 193 | + return value?moment(value).format("YYYY-MM-DD"):null; |
194 | } | 194 | } |
195 | }/*, | 195 | }/*, |
196 | {field:'C_AUTH_DATE',title:'认证日期', width:60, align:"center"}*/ | 196 | {field:'C_AUTH_DATE',title:'认证日期', width:60, align:"center"}*/ |
... | @@ -202,7 +202,7 @@ define(["echarts"], function(){ | ... | @@ -202,7 +202,7 @@ define(["echarts"], function(){ |
202 | if(params){ | 202 | if(params){ |
203 | customer_datagrid.datagrid("reload",params); | 203 | customer_datagrid.datagrid("reload",params); |
204 | }else{ | 204 | }else{ |
205 | - customer_datagrid.datagrid("reload",getCondObjectValue(custQuery)); | 205 | + customer_datagrid.datagrid("reload",base.getCondObjectValue(custQuery)); |
206 | } | 206 | } |
207 | } | 207 | } |
208 | 208 | ||
... | @@ -233,7 +233,7 @@ define(["echarts"], function(){ | ... | @@ -233,7 +233,7 @@ define(["echarts"], function(){ |
233 | }); | 233 | }); |
234 | if(data.length == 1){ | 234 | if(data.length == 1){ |
235 | tempWin.dialog({ | 235 | tempWin.dialog({ |
236 | - title:resource.customers.select_act_dialog_title, | 236 | + title:resource.select_act_dialog_title, |
237 | width: 600, | 237 | width: 600, |
238 | height: 'auto', | 238 | height: 'auto', |
239 | closed: true, | 239 | closed: true, |
... | @@ -249,7 +249,7 @@ define(["echarts"], function(){ | ... | @@ -249,7 +249,7 @@ define(["echarts"], function(){ |
249 | return false; | 249 | return false; |
250 | }else{ | 250 | }else{ |
251 | tempWin.dialog({ | 251 | tempWin.dialog({ |
252 | - title:resource.customers.select_act_dialog_title, | 252 | + title:resource.select_act_dialog_title, |
253 | width: 600, | 253 | width: 600, |
254 | height: 'auto', | 254 | height: 'auto', |
255 | closed: false, | 255 | closed: false, | ... | ... |
This diff is collapsed. Click to expand it.
1 | -define(function(){ | 1 | +define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(actId){ | 3 | init : function(actId){ |
4 | var custQuery = 'ea9fc1d8-05b6-432f-a72f-a760f351bc7d'; | 4 | var custQuery = 'ea9fc1d8-05b6-432f-a72f-a760f351bc7d'; |
5 | var actQuery = '5aecc71f-e3a6-4b5f-a60a-b1eaaf8cc9e2'; | 5 | var actQuery = '5aecc71f-e3a6-4b5f-a60a-b1eaaf8cc9e2'; |
6 | - var panel = getSelectedPanel(); // 初始化面板 | 6 | + var panel = layout.getSelectedPanel(); // 初始化面板 |
7 | var page = panel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div | 7 | var page = panel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div |
8 | 8 | ||
9 | var datagrid=initDatagrid(); // 初始化调整datagrid | 9 | var datagrid=initDatagrid(); // 初始化调整datagrid |
... | @@ -11,7 +11,7 @@ define(function(){ | ... | @@ -11,7 +11,7 @@ define(function(){ |
11 | getCrmAccountSet(); | 11 | getCrmAccountSet(); |
12 | 12 | ||
13 | function reload(param){ | 13 | function reload(param){ |
14 | - var param =getCondObjectValue(custQuery); | 14 | + var param =base.getCondObjectValue(custQuery); |
15 | datagrid.datagrid("reload",param); | 15 | datagrid.datagrid("reload",param); |
16 | } | 16 | } |
17 | 17 | ||
... | @@ -20,16 +20,16 @@ define(function(){ | ... | @@ -20,16 +20,16 @@ define(function(){ |
20 | return panel.find(".crm-customers-table").datagrid({ | 20 | return panel.find(".crm-customers-table").datagrid({ |
21 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 21 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
22 | title:'顾客360列表', | 22 | title:'顾客360列表', |
23 | - authz:getAuthzUtils('customers'), | 23 | + authz:base.getAuthz('customers'), |
24 | buttons:[{ | 24 | buttons:[{ |
25 | - text:resource.btn.select, | 25 | + text:base.resource.btn.select, |
26 | iconCls:'btn-select', | 26 | iconCls:'btn-select', |
27 | handler: function(){ | 27 | handler: function(){ |
28 | - showCondObject(custQuery, reload); | 28 | + base.showCondObject(custQuery, reload); |
29 | } | 29 | } |
30 | },{ | 30 | },{ |
31 | code:'edit', | 31 | code:'edit', |
32 | - text:resource.btn.edit, | 32 | + text:base.resource.btn.edit, |
33 | iconCls:'btn-edit', | 33 | iconCls:'btn-edit', |
34 | handler:editCustomer | 34 | handler:editCustomer |
35 | }], | 35 | }], |
... | @@ -40,39 +40,41 @@ define(function(){ | ... | @@ -40,39 +40,41 @@ define(function(){ |
40 | // handler:saveExcel | 40 | // handler:saveExcel |
41 | // }, | 41 | // }, |
42 | { | 42 | { |
43 | - text:resource.btn.refresh, | 43 | + text:base.resource.btn.refresh, |
44 | iconCls:'btn-refresh', | 44 | iconCls:'btn-refresh', |
45 | - handler:panelRefreshUtils | 45 | + handler:function(){ |
46 | + | ||
47 | + } | ||
46 | }] | 48 | }] |
47 | }), | 49 | }), |
48 | url:"./query/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val(), | 50 | url:"./query/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val(), |
49 | fitColumns:true, // 使列自动展开/收缩到合适的DataGrid宽度 | 51 | fitColumns:true, // 使列自动展开/收缩到合适的DataGrid宽度 |
50 | columns:[[ | 52 | columns:[[ |
51 | {field:'ck',checkbox:true }, | 53 | {field:'ck',checkbox:true }, |
52 | - {field:'CST_ID',title:resource.customers.datagrid_col_cst_id_title, width:60, align:"center"}, | 54 | + {field:'CST_ID',title:resource.datagrid_col_cst_id_title, width:60, align:"center"}, |
53 | - {field:'CST_TYPE',title:resource.customers.datagrid_col_cst_type_title, width:60, align:"center", | 55 | + {field:'CST_TYPE',title:resource.datagrid_col_cst_type_title, width:60, align:"center", |
54 | formatter: function(value,row,index){ | 56 | formatter: function(value,row,index){ |
55 | return value; | 57 | return value; |
56 | } | 58 | } |
57 | }, | 59 | }, |
58 | - {field:'CST_NAME',title:resource.customers.datagrid_col_cst_name_title, width:80, align:"center"}, | 60 | + {field:'CST_NAME',title:resource.datagrid_col_cst_name_title, width:80, align:"center"}, |
59 | // {field:'NICK_NAME',title:resource.customers.datagrid_col_nick_name_title, width:80, align:"center"}, | 61 | // {field:'NICK_NAME',title:resource.customers.datagrid_col_nick_name_title, width:80, align:"center"}, |
60 | - {field:'PHONE',title:resource.customers.datagrid_col_phone_title, width:60, align:"center"}, | 62 | + {field:'PHONE',title:resource.datagrid_col_phone_title, width:60, align:"center"}, |
61 | // {field:'OPEN_ID',title:resource.customers.datagrid_col_open_id_title, width:150, align:"center"}, | 63 | // {field:'OPEN_ID',title:resource.customers.datagrid_col_open_id_title, width:150, align:"center"}, |
62 | - {field:'EMAIL',title:resource.customers.datagrid_col_email_title, width:100, align:"center"}, | 64 | + {field:'EMAIL',title:resource.datagrid_col_email_title, width:100, align:"center"}, |
63 | /*{field:'VERIFY',title:'身份认证', width:60, align:"center", | 65 | /*{field:'VERIFY',title:'身份认证', width:60, align:"center", |
64 | formatter: function(value,row,index){ | 66 | formatter: function(value,row,index){ |
65 | return value>0?'是':'否'; | 67 | return value>0?'是':'否'; |
66 | } | 68 | } |
67 | },*/ | 69 | },*/ |
68 | - {field:'REG_TIME',title:resource.customers.datagrid_col_reg_time_title, width:60, align:"center", | 70 | + {field:'REG_TIME',title:resource.datagrid_col_reg_time_title, width:60, align:"center", |
69 | formatter: function(value,row,index){ | 71 | formatter: function(value,row,index){ |
70 | - return value?Date.parseDate(value).format("yyyy-MM-dd"):null; | 72 | + return value?moment(value).format("YYYY-MM-DD"):null; |
71 | } | 73 | } |
72 | }, | 74 | }, |
73 | - {field:'REC_TIME',title:resource.customers.datagrid_col_rec_time_title, width:60, align:"center", | 75 | + {field:'REC_TIME',title:resource.datagrid_col_rec_time_title, width:60, align:"center", |
74 | formatter: function(value,row,index){ | 76 | formatter: function(value,row,index){ |
75 | - return value?Date.parseDate(value).format("yyyy-MM-dd"):null; | 77 | + return value?moment(value).format("YYYY-MM-DD"):null; |
76 | } | 78 | } |
77 | } | 79 | } |
78 | /*, | 80 | /*, |
... | @@ -89,14 +91,14 @@ define(function(){ | ... | @@ -89,14 +91,14 @@ define(function(){ |
89 | function saveExcel() { | 91 | function saveExcel() { |
90 | // 导出Excel文件 | 92 | // 导出Excel文件 |
91 | var url="./query/result/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val()+"&page=-1"; | 93 | var url="./query/result/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val()+"&page=-1"; |
92 | - var param =getCondObjectValue(custQuery); | 94 | + var param =base.getCondObjectValue(custQuery); |
93 | exportAllData(url,param,"顾客360列表"); | 95 | exportAllData(url,param,"顾客360列表"); |
94 | } | 96 | } |
95 | 97 | ||
96 | // 选择CRM账套 | 98 | // 选择CRM账套 |
97 | function getCrmAccountSet(){ | 99 | function getCrmAccountSet(){ |
98 | panel.find(".actNamePic").bind('click',function(){ | 100 | panel.find(".actNamePic").bind('click',function(){ |
99 | - showCondObject({id:"0996fdd2-ad85-4d1b-acc6-04b412496428", showGrid:true, singleSelect:true}, function(row){ | 101 | + base.showCondObject({id:"0996fdd2-ad85-4d1b-acc6-04b412496428", showGrid:true, singleSelect:true}, function(row){ |
100 | panel.find(".actId").val(row.ACT_ID); | 102 | panel.find(".actId").val(row.ACT_ID); |
101 | panel.find(".actName").val(row.ACT_NAME); | 103 | panel.find(".actName").val(row.ACT_NAME); |
102 | datagridReload(); | 104 | datagridReload(); |
... | @@ -109,10 +111,10 @@ define(function(){ | ... | @@ -109,10 +111,10 @@ define(function(){ |
109 | function editCustomer(){ | 111 | function editCustomer(){ |
110 | var row = datagrid.datagrid("getSelected"); | 112 | var row = datagrid.datagrid("getSelected"); |
111 | if(row==null){ | 113 | if(row==null){ |
112 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 114 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
113 | }else{ | 115 | }else{ |
114 | url = "./customer/detail?cstId="+row.CST_ID; | 116 | url = "./customer/detail?cstId="+row.CST_ID; |
115 | - showTabUtils({text:"顾客详情",url:url}, true, function(){}); | 117 | + layout.showPanel({text:"顾客详情",url:url}, true, function(){}); |
116 | } | 118 | } |
117 | } | 119 | } |
118 | } | 120 | } | ... | ... |
1 | +define({ | ||
2 | + root:{ | ||
3 | + custTypeText:'顾客类型', | ||
4 | + bornSegmentText:'出身年代', | ||
5 | + newCustText:'新增顾客', | ||
6 | + newCust_yAxis_name:'顾客数', | ||
7 | + newCust_series_name_0:'会员', | ||
8 | + newCust_series_name_1:'粉丝', | ||
9 | + datagrid_title:'顾客', | ||
10 | + datagrid_col_cst_id_title:'顾客ID', | ||
11 | + datagrid_col_cst_type_title:'顾客类型', | ||
12 | + datagrid_col_cst_name_title:'姓名', | ||
13 | + datagrid_col_nick_name_title:'昵称', | ||
14 | + datagrid_col_phone_title:'手机', | ||
15 | + datagrid_col_open_id_title:'OPEN ID', | ||
16 | + datagrid_col_email_title:'邮箱', | ||
17 | + datagrid_col_reg_time_title:'入会日期', | ||
18 | + datagrid_col_rec_time_title:'创建日期', | ||
19 | + select_act_dialog_title:'选择CRM账套', | ||
20 | + target:{ | ||
21 | + title:{ | ||
22 | + name:'顾客招募列表', | ||
23 | + detail:'顾客招募详情', | ||
24 | + set:'店铺招募目标设置', | ||
25 | + notNull:'计划招募人数不能为空', | ||
26 | + setSite:'设置网点', | ||
27 | + chooseCrm:'请先选择CRM账套!', | ||
28 | + chooseSite:'选择网点', | ||
29 | + siteIs:'网点编号为', | ||
30 | + targetRepeat:'的招募目标重复', | ||
31 | + targetNotnull:'的招募目标不能为空', | ||
32 | + chooseSiteFir:'请先选择网点', | ||
33 | + success:'保存成功' | ||
34 | + }, | ||
35 | + grid:{ | ||
36 | + siid:'网点id', | ||
37 | + sicode:'网点编号', | ||
38 | + siname:'网点名称', | ||
39 | + orname:'上级管理组织', | ||
40 | + actname:'CRM账套', | ||
41 | + yeah:'目标年份', | ||
42 | + month:'目标月份', | ||
43 | + targetrecruit:'计划招募会员' | ||
44 | + } | ||
45 | + } | ||
46 | + }, | ||
47 | + "en-US": true, | ||
48 | + "en-US-paris": true | ||
49 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -define(function(){ | 1 | +define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | - | ||
3 | var LABEL_HTML = '<label></label>'; | 2 | var LABEL_HTML = '<label></label>'; |
4 | var EM_HTML = '<em class="dialog-pad"></em>'; | 3 | var EM_HTML = '<em class="dialog-pad"></em>'; |
5 | var INPUT_HTML = '<input class="inp_reg">'; | 4 | var INPUT_HTML = '<input class="inp_reg">'; | ... | ... |
1 | -define(["uploadify"],function(){ | 1 | +define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index','uploadify'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(actId,sessionId){ | 3 | init : function(actId,sessionId){ |
4 | var custQuery = '90b85e3c-0b33-4cfd-96b8-ef629c5dd5d3'; | 4 | var custQuery = '90b85e3c-0b33-4cfd-96b8-ef629c5dd5d3'; |
5 | var actQuery = '5aecc71f-e3a6-4b5f-a60a-b1eaaf8cc9e2'; | 5 | var actQuery = '5aecc71f-e3a6-4b5f-a60a-b1eaaf8cc9e2'; |
6 | - var panel = getSelectedPanel(); // 初始化面板 | 6 | + var panel = layout.getSelectedPanel(); // 初始化面板 |
7 | var page = panel.children(".crm-customers-target").show().layout({fit:true}); // 定义面板内div | 7 | var page = panel.children(".crm-customers-target").show().layout({fit:true}); // 定义面板内div |
8 | var dataGrid=initDatagrid(); //初始化调整datagrid | 8 | var dataGrid=initDatagrid(); //初始化调整datagrid |
9 | 9 | ||
10 | //datagrid刷新 | 10 | //datagrid刷新 |
11 | function reload(param){ | 11 | function reload(param){ |
12 | - var param =getCondObjectValue(custQuery); | 12 | + var param =base.getCondObjectValue(custQuery); |
13 | dataGrid.datagrid("reload",param); | 13 | dataGrid.datagrid("reload",param); |
14 | } | 14 | } |
15 | //form验证: | 15 | //form验证: |
16 | - initValidateboxForm(); | 16 | + // initValidateboxForm(); |
17 | initUploadify(); | 17 | initUploadify(); |
18 | 18 | ||
19 | // 初始化表格 | 19 | // 初始化表格 |
... | @@ -21,44 +21,46 @@ define(["uploadify"],function(){ | ... | @@ -21,44 +21,46 @@ define(["uploadify"],function(){ |
21 | return page.layout("panel","center").children(".crm-customers-table").datagrid({ | 21 | return page.layout("panel","center").children(".crm-customers-table").datagrid({ |
22 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 22 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
23 | title:resource.target.title.name, | 23 | title:resource.target.title.name, |
24 | - authz:getAuthzUtils('target'), | 24 | + authz:base.getAuthz('target'), |
25 | buttons:[{ | 25 | buttons:[{ |
26 | - text:resource.btn.select, | 26 | + text:base.resource.btn.select, |
27 | iconCls:'btn-select', | 27 | iconCls:'btn-select', |
28 | handler:function(){ | 28 | handler:function(){ |
29 | - showCondObject(custQuery, reload); | 29 | + base.showCondObject(custQuery, reload); |
30 | } | 30 | } |
31 | },{ | 31 | },{ |
32 | code:'add', | 32 | code:'add', |
33 | - text:resource.btn.add, | 33 | + text:base.resource.btn.add, |
34 | iconCls:'btn-add', | 34 | iconCls:'btn-add', |
35 | handler:newlBuild | 35 | handler:newlBuild |
36 | },{ | 36 | },{ |
37 | code:'edit', | 37 | code:'edit', |
38 | - text:resource.btn.edit, | 38 | + text:base.resource.btn.edit, |
39 | iconCls:'btn-edit', | 39 | iconCls:'btn-edit', |
40 | handler:editCustomer | 40 | handler:editCustomer |
41 | },{ | 41 | },{ |
42 | code:'delete', | 42 | code:'delete', |
43 | - text:resource.btn.remove, | 43 | + text:base.resource.btn.remove, |
44 | iconCls:'btn-remove', | 44 | iconCls:'btn-remove', |
45 | handler:deleteSite | 45 | handler:deleteSite |
46 | }], | 46 | }], |
47 | tools:[{ // 导出模板 | 47 | tools:[{ // 导出模板 |
48 | code:'edit', | 48 | code:'edit', |
49 | - text:resource.btn.downloadExcel, | 49 | + text:base.resource.btn.downloadExcel, |
50 | iconCls:'btn-down', | 50 | iconCls:'btn-down', |
51 | handler:function(){ | 51 | handler:function(){ |
52 | var fileName="customerTargetTemplate.xlsx"; | 52 | var fileName="customerTargetTemplate.xlsx"; |
53 | - downloadExcel(fileName); | 53 | + base.downloadExcelTemplate(fileName); |
54 | } | 54 | } |
55 | },{ | 55 | },{ |
56 | - text:resource.btn.refresh, | 56 | + text:base.resource.btn.refresh, |
57 | iconCls:'btn-refresh', | 57 | iconCls:'btn-refresh', |
58 | - handler:panelRefreshUtils | 58 | + handler:function(){ |
59 | + | ||
60 | + } | ||
59 | },{ // 导入 | 61 | },{ // 导入 |
60 | code:'edit', | 62 | code:'edit', |
61 | - text:resource.btn.addByFile, | 63 | + text:base.resource.btn.addByFile, |
62 | id:'btn-customertarget-import', | 64 | id:'btn-customertarget-import', |
63 | iconCls:'btn-down' | 65 | iconCls:'btn-down' |
64 | }] | 66 | }] |
... | @@ -86,24 +88,24 @@ define(["uploadify"],function(){ | ... | @@ -86,24 +88,24 @@ define(["uploadify"],function(){ |
86 | function saveExcel() { | 88 | function saveExcel() { |
87 | // 导出Excel文件 | 89 | // 导出Excel文件 |
88 | var url="./query/result/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val()+"&page=-1"; | 90 | var url="./query/result/"+custQuery+".json?"+actQuery+"="+panel.find(".actId").val()+"&page=-1"; |
89 | - var param =getCondObjectValue(custQuery); | 91 | + var param =base.getCondObjectValue(custQuery); |
90 | exportAllData(url,param,resource.target.title.name); | 92 | exportAllData(url,param,resource.target.title.name); |
91 | } | 93 | } |
92 | 94 | ||
93 | // 新建 | 95 | // 新建 |
94 | function newlBuild() { | 96 | function newlBuild() { |
95 | - showTabUtils({text:resource.target.title.detail,url:"./customer/targetdetails"}, true, function(){}); | 97 | + layout.showPanel({text:resource.target.title.detail,url:"./customer/targetdetails"}, true, function(){}); |
96 | } | 98 | } |
97 | 99 | ||
98 | // 编辑 | 100 | // 编辑 |
99 | function editCustomer(){ | 101 | function editCustomer(){ |
100 | var row = dataGrid.datagrid("getSelected"); | 102 | var row = dataGrid.datagrid("getSelected"); |
101 | if(row==null){ | 103 | if(row==null){ |
102 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 104 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
103 | }else{ | 105 | }else{ |
104 | $.post("./customer/selectbyid.json",{id:row.TARGET_ID},function(result){ | 106 | $.post("./customer/selectbyid.json",{id:row.TARGET_ID},function(result){ |
105 | - console.log(result); | 107 | + // console.log(result); |
106 | - if(responseUtils(result)){ | 108 | + if($.response(result)){ |
107 | editSiteTarget(row.TARGET_ID,row.SICODE+"_"+row.SINAME,row.ACT_NAME,result.value.month,result.value.recruit); | 109 | editSiteTarget(row.TARGET_ID,row.SICODE+"_"+row.SINAME,row.ACT_NAME,result.value.month,result.value.recruit); |
108 | dataGrid.datagrid("reload"); | 110 | dataGrid.datagrid("reload"); |
109 | $('.edit_site').find('.recruit').textbox({ | 111 | $('.edit_site').find('.recruit').textbox({ |
... | @@ -120,12 +122,12 @@ define(["uploadify"],function(){ | ... | @@ -120,12 +122,12 @@ define(["uploadify"],function(){ |
120 | var row = dataGrid.datagrid("getSelected"); | 122 | var row = dataGrid.datagrid("getSelected"); |
121 | console.log(row) | 123 | console.log(row) |
122 | if(row==null){ | 124 | if(row==null){ |
123 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 125 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
124 | }else{ | 126 | }else{ |
125 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 127 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){ |
126 | if(r){ | 128 | if(r){ |
127 | $.post("./customer/deleteTarget.json",{id:row.TARGET_ID},function(result){ | 129 | $.post("./customer/deleteTarget.json",{id:row.TARGET_ID},function(result){ |
128 | - if(responseUtils(result)){ | 130 | + if($.response(result)){ |
129 | dataGrid.datagrid("reload"); | 131 | dataGrid.datagrid("reload"); |
130 | } | 132 | } |
131 | }); | 133 | }); |
... | @@ -151,13 +153,13 @@ define(["uploadify"],function(){ | ... | @@ -151,13 +153,13 @@ define(["uploadify"],function(){ |
151 | width:'500', | 153 | width:'500', |
152 | height:'300', | 154 | height:'300', |
153 | buttons:[{ | 155 | buttons:[{ |
154 | - text: resource.btn.save, | 156 | + text: base.resource.btn.save, |
155 | handler:function() { | 157 | handler:function() { |
156 | if(! edit_site.find('.setSiteTarget').form("validate")) {//检查页面必输入项 | 158 | if(! edit_site.find('.setSiteTarget').form("validate")) {//检查页面必输入项 |
157 | return false; | 159 | return false; |
158 | } | 160 | } |
159 | if(!edit_site.find('.recruit').val()){ | 161 | if(!edit_site.find('.recruit').val()){ |
160 | - $.messager.alert(resource.msg_title,resource.target.title.notNull) | 162 | + $.messager.alert(base.resource.msg_title,resource.target.title.notNull) |
161 | return false; | 163 | return false; |
162 | } | 164 | } |
163 | var params = { | 165 | var params = { |
... | @@ -167,15 +169,15 @@ define(["uploadify"],function(){ | ... | @@ -167,15 +169,15 @@ define(["uploadify"],function(){ |
167 | recruit:edit_site.find('.recruit').val() | 169 | recruit:edit_site.find('.recruit').val() |
168 | } | 170 | } |
169 | $.JSON("./customer/updateTarget.json",params,function(result){ | 171 | $.JSON("./customer/updateTarget.json",params,function(result){ |
170 | - if(responseUtils(result)){ | 172 | + if($.response(result)){ |
171 | dataGrid.datagrid("reload"); | 173 | dataGrid.datagrid("reload"); |
172 | edit_site.dialog("close"); | 174 | edit_site.dialog("close"); |
173 | - console.log(result); | 175 | + // console.log(result); |
174 | } | 176 | } |
175 | }); | 177 | }); |
176 | } | 178 | } |
177 | }, { | 179 | }, { |
178 | - text: resource.btn.cancel, | 180 | + text: base.resource.btn.cancel, |
179 | handler:function() { | 181 | handler:function() { |
180 | edit_site.dialog("close"); | 182 | edit_site.dialog("close"); |
181 | } | 183 | } |
... | @@ -215,7 +217,7 @@ define(["uploadify"],function(){ | ... | @@ -215,7 +217,7 @@ define(["uploadify"],function(){ |
215 | 217 | ||
216 | //输入长度 | 218 | //输入长度 |
217 | function maxLength(){ | 219 | function maxLength(){ |
218 | - maxlengthUtils($('.edit_site').find('.recruit'),5); | 220 | + base.maxlength($('.edit_site').find('.recruit'),5); |
219 | } | 221 | } |
220 | 222 | ||
221 | /** | 223 | /** |
... | @@ -244,7 +246,7 @@ define(["uploadify"],function(){ | ... | @@ -244,7 +246,7 @@ define(["uploadify"],function(){ |
244 | 246 | ||
245 | $("#btn-customertarget-import-button").linkbutton({ // 导入 | 247 | $("#btn-customertarget-import-button").linkbutton({ // 导入 |
246 | iconCls: 'btn-up', | 248 | iconCls: 'btn-up', |
247 | - text:resource.btn.addByFile | 249 | + text:base.resource.btn.addByFile |
248 | }); | 250 | }); |
249 | } | 251 | } |
250 | } | 252 | } | ... | ... |
1 | -define(function(){ | 1 | +define(['i18n!customer/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(actId){ | 3 | init : function(actId){ |
4 | - var panel = getSelectedPanel(); // 初始化面板 | 4 | + var panel = layout.getSelectedPanel(); // 初始化面板 |
5 | var page = panel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div | 5 | var page = panel.children(".crm-customers").show().layout({fit:true}); // 定义面板内div |
6 | var dataGrid=initDatagrid(); //初始化调整datagrid | 6 | var dataGrid=initDatagrid(); //初始化调整datagrid |
7 | 7 | ||
... | @@ -12,7 +12,7 @@ define(function(){ | ... | @@ -12,7 +12,7 @@ define(function(){ |
12 | title:resource.target.title.name, | 12 | title:resource.target.title.name, |
13 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 13 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
14 | buttons:[{ | 14 | buttons:[{ |
15 | - text:resource.btn.save, | 15 | + text:base.resource.btn.save, |
16 | iconCls:'btn-save', | 16 | iconCls:'btn-save', |
17 | handler: function(){ | 17 | handler: function(){ |
18 | saveSites(); | 18 | saveSites(); |
... | @@ -26,9 +26,11 @@ define(function(){ | ... | @@ -26,9 +26,11 @@ define(function(){ |
26 | }], | 26 | }], |
27 | tools:[ | 27 | tools:[ |
28 | { | 28 | { |
29 | - text:resource.btn.refresh, | 29 | + text:base.resource.btn.refresh, |
30 | iconCls:'btn-refresh', | 30 | iconCls:'btn-refresh', |
31 | - handler:panelRefreshUtils | 31 | + handler:function(){ |
32 | + | ||
33 | + } | ||
32 | }] | 34 | }] |
33 | }), | 35 | }), |
34 | fitColumns:true,//使列自动展开/收缩到合适的DataGrid宽度 | 36 | fitColumns:true,//使列自动展开/收缩到合适的DataGrid宽度 |
... | @@ -56,7 +58,7 @@ define(function(){ | ... | @@ -56,7 +58,7 @@ define(function(){ |
56 | //选择CRM账套 | 58 | //选择CRM账套 |
57 | (function getCrmAccountSet(){ | 59 | (function getCrmAccountSet(){ |
58 | panel.find(".chooseCrmVal").bind('click',function(){ | 60 | panel.find(".chooseCrmVal").bind('click',function(){ |
59 | - showCondObject({id:"0996fdd2-ad85-4d1b-acc6-04b412496428", showGrid:true, singleSelect:true}, function(row){ | 61 | + base.showCondObject({id:"0996fdd2-ad85-4d1b-acc6-04b412496428", showGrid:true, singleSelect:true}, function(row){ |
60 | $('.accountSiteSet').find(".actId").val(row.ACT_ID); | 62 | $('.accountSiteSet').find(".actId").val(row.ACT_ID); |
61 | $('.accountSiteSet').find(".actName").val(row.ACT_NAME); | 63 | $('.accountSiteSet').find(".actName").val(row.ACT_NAME); |
62 | 64 | ||
... | @@ -70,7 +72,7 @@ define(function(){ | ... | @@ -70,7 +72,7 @@ define(function(){ |
70 | var actId = $('.accountSiteSet').find(".actId").val(); | 72 | var actId = $('.accountSiteSet').find(".actId").val(); |
71 | var actName =$('.accountSiteSet').find(".actName").val(); | 73 | var actName =$('.accountSiteSet').find(".actName").val(); |
72 | if(!actId){ | 74 | if(!actId){ |
73 | - $.messager.alert(resource.msg_title,resource.target.title.chooseCrm); | 75 | + $.messager.alert(base.resource.msg_title,resource.target.title.chooseCrm); |
74 | return false; | 76 | return false; |
75 | } | 77 | } |
76 | var sites = $('.sites'); | 78 | var sites = $('.sites'); |
... | @@ -87,7 +89,7 @@ define(function(){ | ... | @@ -87,7 +89,7 @@ define(function(){ |
87 | width:'500', | 89 | width:'500', |
88 | height:'550',//auto | 90 | height:'550',//auto |
89 | buttons:[{ | 91 | buttons:[{ |
90 | - text: resource.btn.confirm, | 92 | + text: base.resource.btn.confirm, |
91 | handler:function() { | 93 | handler:function() { |
92 | 94 | ||
93 | var totalRow = []; | 95 | var totalRow = []; |
... | @@ -123,7 +125,7 @@ define(function(){ | ... | @@ -123,7 +125,7 @@ define(function(){ |
123 | sites.dialog("close"); | 125 | sites.dialog("close"); |
124 | } | 126 | } |
125 | }, { | 127 | }, { |
126 | - text: resource.btn.cancel, | 128 | + text: base.resource.btn.cancel, |
127 | handler:function() { | 129 | handler:function() { |
128 | sites.dialog("close"); | 130 | sites.dialog("close"); |
129 | } | 131 | } |
... | @@ -136,10 +138,10 @@ define(function(){ | ... | @@ -136,10 +138,10 @@ define(function(){ |
136 | return control.find("."+data+"").datagrid({ | 138 | return control.find("."+data+"").datagrid({ |
137 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 139 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
138 | buttons:[{ | 140 | buttons:[{ |
139 | - text:resource.btn.select, | 141 | + text:base.resource.btn.select, |
140 | iconCls:'btn-select', | 142 | iconCls:'btn-select', |
141 | handler:function(){ | 143 | handler:function(){ |
142 | - showCondObject("b7fa1a0e-099b-459d-8c77-69ebdc65ed42", function(){ | 144 | + base.showCondObject("b7fa1a0e-099b-459d-8c77-69ebdc65ed42", function(){ |
143 | reload(control,data) | 145 | reload(control,data) |
144 | }); | 146 | }); |
145 | } | 147 | } |
... | @@ -163,7 +165,7 @@ define(function(){ | ... | @@ -163,7 +165,7 @@ define(function(){ |
163 | endEditing(); | 165 | endEditing(); |
164 | var rows = dataGrid.datagrid('getRows'); | 166 | var rows = dataGrid.datagrid('getRows'); |
165 | if(rows.length<1){ | 167 | if(rows.length<1){ |
166 | - $.messager.alert(resource.msg_title,resource.target.title.chooseSiteFir); | 168 | + $.messager.alert(base.resource.msg_title,resource.target.title.chooseSiteFir); |
167 | return false; | 169 | return false; |
168 | } | 170 | } |
169 | var params =new Array(); | 171 | var params =new Array(); |
... | @@ -177,7 +179,7 @@ define(function(){ | ... | @@ -177,7 +179,7 @@ define(function(){ |
177 | }; | 179 | }; |
178 | rowsTime =rows[i].YEAH.toString() + rows[i].MONTH; | 180 | rowsTime =rows[i].YEAH.toString() + rows[i].MONTH; |
179 | if(rows[i].TARGET_RECRUIT==""){ | 181 | if(rows[i].TARGET_RECRUIT==""){ |
180 | - $.messager.alert(resource.msg_title,resource.target.title.siteIs+rows[i].SICODE+resource.target.title.targetNotnull); | 182 | + $.messager.alert(base.resource.msg_title,resource.target.title.siteIs+rows[i].SICODE+resource.target.title.targetNotnull); |
181 | return false; | 183 | return false; |
182 | } | 184 | } |
183 | param={ | 185 | param={ |
... | @@ -189,10 +191,10 @@ define(function(){ | ... | @@ -189,10 +191,10 @@ define(function(){ |
189 | params.push(param); | 191 | params.push(param); |
190 | } | 192 | } |
191 | $.JSON("./customer/insertTarget.json",params,function(result){ | 193 | $.JSON("./customer/insertTarget.json",params,function(result){ |
192 | - if(responseUtils(result)){ | 194 | + if($.response(result)){ |
193 | - $.messager.alert(resource.msg_title, resource.target.title.success); | 195 | + $.messager.alert(base.resource.msg_title, resource.target.title.success); |
194 | - closeSelectedPanel(); | 196 | + base.closeSelectedPanel(); |
195 | - panelRefreshUtils(); | 197 | + base.panelRefresh(); |
196 | } | 198 | } |
197 | }); | 199 | }); |
198 | } | 200 | } |
... | @@ -222,7 +224,7 @@ define(function(){ | ... | @@ -222,7 +224,7 @@ define(function(){ |
222 | 224 | ||
223 | //刷新 | 225 | //刷新 |
224 | function reload(control,data){ | 226 | function reload(control,data){ |
225 | - var param = getCondObjectValue("b7fa1a0e-099b-459d-8c77-69ebdc65ed42"); | 227 | + var param = base.getCondObjectValue("b7fa1a0e-099b-459d-8c77-69ebdc65ed42"); |
226 | siteDatagridval.datagrid("reload",param); | 228 | siteDatagridval.datagrid("reload",param); |
227 | } | 229 | } |
228 | 230 | ... | ... |
1 | -define(function(){ | 1 | +define(['i18n!employee/nls/resource', 'cls', 'lodash', 'moment', 'base/index', 'index/index'], function (resource, Class, _, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(emid){ | 3 | init : function(emid){ |
4 | - var panel=getSelectedPanel(); | 4 | + var panel=layout.getSelectedPanel(); |
5 | var page=panel.children('.crm-employee-detail').layout({ fit:true }); | 5 | var page=panel.children('.crm-employee-detail').layout({ fit:true }); |
6 | var north=page.layout("panel","north"); | 6 | var north=page.layout("panel","north"); |
7 | var employeeForm= north.find(".employeeForm"); | 7 | var employeeForm= north.find(".employeeForm"); |
... | @@ -44,7 +44,7 @@ define(function(){ | ... | @@ -44,7 +44,7 @@ define(function(){ |
44 | var editPhone="";//手机 | 44 | var editPhone="";//手机 |
45 | var editEmail="";//邮箱 | 45 | var editEmail="";//邮箱 |
46 | var editCtcode="";//证件号码 | 46 | var editCtcode="";//证件号码 |
47 | - initValidateboxForm()//验证 | 47 | + // initValidateboxForm()//验证 |
48 | initForm(); | 48 | initForm(); |
49 | maxLength(); | 49 | maxLength(); |
50 | editPanal();//编辑状态下填充页面数据 | 50 | editPanal();//编辑状态下填充页面数据 |
... | @@ -55,14 +55,16 @@ define(function(){ | ... | @@ -55,14 +55,16 @@ define(function(){ |
55 | north.children(".toolbar").rs_toolbar({ | 55 | north.children(".toolbar").rs_toolbar({ |
56 | content:employeeForm, | 56 | content:employeeForm, |
57 | buttons:[{ | 57 | buttons:[{ |
58 | - text:resource.btn.save, | 58 | + text:base.resource.btn.save, |
59 | iconCls:'btn-save', | 59 | iconCls:'btn-save', |
60 | handler:saveEmployeeDetail | 60 | handler:saveEmployeeDetail |
61 | }], | 61 | }], |
62 | tools:[{ | 62 | tools:[{ |
63 | - text:resource.btn.refresh, | 63 | + text:base.resource.btn.refresh, |
64 | iconCls:'btn-refresh', | 64 | iconCls:'btn-refresh', |
65 | - handler:panelRefreshUtils | 65 | + handler:function(){ |
66 | + layout.panelRefresh(); | ||
67 | + } | ||
66 | } | 68 | } |
67 | ] | 69 | ] |
68 | }); | 70 | }); |
... | @@ -74,10 +76,10 @@ define(function(){ | ... | @@ -74,10 +76,10 @@ define(function(){ |
74 | validType:'NumberLetter' | 76 | validType:'NumberLetter' |
75 | }); | 77 | }); |
76 | //公司查找框 | 78 | //公司查找框 |
77 | - readonlyUtils(coName.searchbox({ | 79 | + base.readonly(coName.searchbox({ |
78 | required:true, | 80 | required:true, |
79 | searcher:chooseCoName, | 81 | searcher:chooseCoName, |
80 | - prompt:resource.employee.select | 82 | + prompt:resource.select |
81 | }),function(){ | 83 | }),function(){ |
82 | coId=""; | 84 | coId=""; |
83 | deName.searchbox("setValue",""); | 85 | deName.searchbox("setValue",""); |
... | @@ -86,10 +88,10 @@ define(function(){ | ... | @@ -86,10 +88,10 @@ define(function(){ |
86 | poId.combobox('loadData',[]); | 88 | poId.combobox('loadData',[]); |
87 | }); | 89 | }); |
88 | //部门查找框 | 90 | //部门查找框 |
89 | - readonlyUtils(deName.searchbox({ | 91 | + base.readonly(deName.searchbox({ |
90 | required:false, | 92 | required:false, |
91 | searcher:chooseDeName, | 93 | searcher:chooseDeName, |
92 | - prompt:resource.employee.select | 94 | + prompt:resource.select |
93 | }),function(){ | 95 | }),function(){ |
94 | deId=[]; | 96 | deId=[]; |
95 | poId.combobox('clear'); | 97 | poId.combobox('clear'); |
... | @@ -106,7 +108,7 @@ define(function(){ | ... | @@ -106,7 +108,7 @@ define(function(){ |
106 | }); | 108 | }); |
107 | 109 | ||
108 | entrydate.datetimebox({ | 110 | entrydate.datetimebox({ |
109 | - value: new Date().format('yyyy-MM-dd HH:mm:ss'), | 111 | + value: moment().format('YYYY-MM-DD HH:mm:ss'), |
110 | required: true, | 112 | required: true, |
111 | editable:false | 113 | editable:false |
112 | }); | 114 | }); |
... | @@ -212,16 +214,16 @@ define(function(){ | ... | @@ -212,16 +214,16 @@ define(function(){ |
212 | } | 214 | } |
213 | 215 | ||
214 | function maxLength(){ | 216 | function maxLength(){ |
215 | - maxlengthUtils(code,30); | 217 | + base.maxlength(code,30); |
216 | - maxlengthUtils(phone,120); | 218 | + base.maxlength(phone,120); |
217 | - maxlengthUtils(email,120); | 219 | + base.maxlength(email,120); |
218 | - maxlengthUtils(ctcode,50); | 220 | + base.maxlength(ctcode,50); |
219 | - maxlengthUtils(name,120); | 221 | + base.maxlength(name,120); |
220 | - maxlengthUtils(relman,60); | 222 | + base.maxlength(relman,60); |
221 | - maxlengthUtils(reltel,30); | 223 | + base.maxlength(reltel,30); |
222 | - maxlengthUtils(post,30); | 224 | + base.maxlength(post,30); |
223 | - maxlengthUtils(addr,100); | 225 | + base.maxlength(addr,100); |
224 | - maxlengthUtils(remark1,100); | 226 | + base.maxlength(remark1,100); |
225 | } | 227 | } |
226 | 228 | ||
227 | //任职状态 | 229 | //任职状态 |
... | @@ -230,13 +232,13 @@ define(function(){ | ... | @@ -230,13 +232,13 @@ define(function(){ |
230 | if(leavedate==""){ | 232 | if(leavedate==""){ |
231 | return state; | 233 | return state; |
232 | }else{ | 234 | }else{ |
233 | - if(Date.parseDate(entrydate)>Date.parseDate(leavedate)){ | 235 | + if(moment(leavedate).isBefore(entrydate)){ |
234 | - $.messager.alert(resource.msg_title, resource.employee.dateCheck); | 236 | + $.messager.alert(base.resource.msg_title, resource.dateCheck); |
235 | return; | 237 | return; |
236 | }else{ | 238 | }else{ |
237 | - if(Date.parseDate(entrydate) > new Date() ){ | 239 | + if(moment().isBefore(entrydate)){ |
238 | state = true;//未入职 | 240 | state = true;//未入职 |
239 | - }else if(Date.parseDate(entrydate) < new Date() && new Date() < Date.parseDate(leavedate)){ | 241 | + }else if(moment(entrydate).isBefore(moment()) && moment().isBefore(leavedate)){ |
240 | state = true;//在职 | 242 | state = true;//在职 |
241 | }else{ | 243 | }else{ |
242 | state = false;//离职 | 244 | state = false;//离职 |
... | @@ -316,7 +318,7 @@ define(function(){ | ... | @@ -316,7 +318,7 @@ define(function(){ |
316 | data=getparam(); | 318 | data=getparam(); |
317 | if(res==true){//在职或未入职 | 319 | if(res==true){//在职或未入职 |
318 | $.JSON("./employeeDetail/existsAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复 | 320 | $.JSON("./employeeDetail/existsAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复 |
319 | - if(responseUtils(result)){ | 321 | + if($.response(result)){ |
320 | addSubmit(data); | 322 | addSubmit(data); |
321 | } | 323 | } |
322 | }); | 324 | }); |
... | @@ -329,11 +331,11 @@ define(function(){ | ... | @@ -329,11 +331,11 @@ define(function(){ |
329 | 331 | ||
330 | //新增提交 | 332 | //新增提交 |
331 | function addSubmit(data){ | 333 | function addSubmit(data){ |
332 | - $.messager.confirm(resource.msg_title,resource.users.saveTitle, function(r){ | 334 | + $.messager.confirm(base.resource.msg_title,base.resource.msgSaveTitle, function(r){ |
333 | if (r){ | 335 | if (r){ |
334 | $.JSON('./employeeDetail/insert.json',data,function(result){ | 336 | $.JSON('./employeeDetail/insert.json',data,function(result){ |
335 | - if(responseUtils(result)){ | 337 | + if($.response(result)){ |
336 | - closeSelectedPanel(); | 338 | + layout.closeSelectedPanel(); |
337 | } | 339 | } |
338 | }); | 340 | }); |
339 | } | 341 | } |
... | @@ -349,7 +351,7 @@ define(function(){ | ... | @@ -349,7 +351,7 @@ define(function(){ |
349 | }; | 351 | }; |
350 | if(coid!=editCoId || cd!= editCode || na!=editName){//不与原“公司+工号+姓名”冲突 | 352 | if(coid!=editCoId || cd!= editCode || na!=editName){//不与原“公司+工号+姓名”冲突 |
351 | $.JSON("./employeeDetail/existsEmps.json",param,function(result){//先检查“公司+工号+姓名”是否重值 | 353 | $.JSON("./employeeDetail/existsEmps.json",param,function(result){//先检查“公司+工号+姓名”是否重值 |
352 | - if(responseUtils(result)){//不重值 | 354 | + if($.response(result)){//不重值 |
353 | //编辑数据 | 355 | //编辑数据 |
354 | var data=[]; | 356 | var data=[]; |
355 | data=getparam(); | 357 | data=getparam(); |
... | @@ -358,7 +360,7 @@ define(function(){ | ... | @@ -358,7 +360,7 @@ define(function(){ |
358 | //判断涉及修改“工号、手机、邮箱” | 360 | //判断涉及修改“工号、手机、邮箱” |
359 | if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){ | 361 | if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){ |
360 | $.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复 | 362 | $.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复 |
361 | - if(responseUtils(result)){ | 363 | + if($.response(result)){ |
362 | //判断账户 | 364 | //判断账户 |
363 | $.post('./employeeDetail/existsUsers.json',{id:emid},function(result){ | 365 | $.post('./employeeDetail/existsUsers.json',{id:emid},function(result){ |
364 | if(result.status=="success"){//无账户 | 366 | if(result.status=="success"){//无账户 |
... | @@ -385,7 +387,7 @@ define(function(){ | ... | @@ -385,7 +387,7 @@ define(function(){ |
385 | if(res==true){//在职或未入职 | 387 | if(res==true){//在职或未入职 |
386 | if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){ | 388 | if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){ |
387 | $.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复 | 389 | $.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复 |
388 | - if(responseUtils(result)){ | 390 | + if($.response(result)){ |
389 | //判断账户 | 391 | //判断账户 |
390 | $.post('./employeeDetail/existsUsers.json',{id:emid},function(result){ | 392 | $.post('./employeeDetail/existsUsers.json',{id:emid},function(result){ |
391 | if(result.status=="success"){//无账户 | 393 | if(result.status=="success"){//无账户 |
... | @@ -413,7 +415,7 @@ define(function(){ | ... | @@ -413,7 +415,7 @@ define(function(){ |
413 | if(res==true){//在职或未入职 | 415 | if(res==true){//在职或未入职 |
414 | if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){ | 416 | if(code.textbox("getValue")!=editCode || phone.textbox("getValue")!=editPhone || email.textbox("getValue")!=editEmail || ctcode.textbox("getValue")!=editCtcode){ |
415 | $.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复 | 417 | $.JSON("./employeeDetail/existsEditAll.json",data,function(result){//判断工号,手机号,邮箱,证件号码是否重复 |
416 | - if(responseUtils(result)){ | 418 | + if($.response(result)){ |
417 | //判断账户 | 419 | //判断账户 |
418 | $.post('./employeeDetail/existsUsers.json',{id:id},function(result){ | 420 | $.post('./employeeDetail/existsUsers.json',{id:id},function(result){ |
419 | if(result.status=="success"){//无账户 | 421 | if(result.status=="success"){//无账户 |
... | @@ -434,11 +436,11 @@ define(function(){ | ... | @@ -434,11 +436,11 @@ define(function(){ |
434 | 436 | ||
435 | //编辑提交 | 437 | //编辑提交 |
436 | function editSubmit(data){ | 438 | function editSubmit(data){ |
437 | - $.messager.confirm(resource.msg_title,resource.users.saveTitle, function(r){ | 439 | + $.messager.confirm(base.resource.msg_title,base.resource.msgSaveTitle, function(r){ |
438 | if (r){ | 440 | if (r){ |
439 | $.JSON('./employeeDetail/update.json',data,function(result){ | 441 | $.JSON('./employeeDetail/update.json',data,function(result){ |
440 | - if(responseUtils(result)){ | 442 | + if($.response(result)){ |
441 | - closeSelectedPanel(); | 443 | + layout.closeSelectedPanel(); |
442 | } | 444 | } |
443 | }); | 445 | }); |
444 | } | 446 | } |
... | @@ -497,7 +499,7 @@ define(function(){ | ... | @@ -497,7 +499,7 @@ define(function(){ |
497 | 499 | ||
498 | //选择公司名称和ID | 500 | //选择公司名称和ID |
499 | function chooseCoName(){ | 501 | function chooseCoName(){ |
500 | - showCondObject({id:"5d65968a-4b04-43c8-85c0-a00d06801d74", showGrid:true, singleSelect:true,refresh:true | 502 | + base.showCondObject({id:"5d65968a-4b04-43c8-85c0-a00d06801d74", showGrid:true, singleSelect:true,refresh:true |
501 | /*,onBeforeLoad:function(params){ | 503 | /*,onBeforeLoad:function(params){ |
502 | if($.cookie("rs-platform-id")!=1){ | 504 | if($.cookie("rs-platform-id")!=1){ |
503 | return params["96c37046-9ac8-4658-8d6a-8da37f6791f4"]=$.cookie("rs-platform-id"); | 505 | return params["96c37046-9ac8-4658-8d6a-8da37f6791f4"]=$.cookie("rs-platform-id"); |
... | @@ -524,7 +526,7 @@ define(function(){ | ... | @@ -524,7 +526,7 @@ define(function(){ |
524 | //选择部门名称和ID | 526 | //选择部门名称和ID |
525 | function chooseDeName(){ | 527 | function chooseDeName(){ |
526 | if($.trim(coId)!=""){ | 528 | if($.trim(coId)!=""){ |
527 | - showCondObject({id:"7949bd86-d694-4800-8a70-29f5bca505af", showGrid:true, singleSelect:false,refresh:true,onBeforeLoad:function(params){ | 529 | + base.showCondObject({id:"7949bd86-d694-4800-8a70-29f5bca505af", showGrid:true, singleSelect:false,refresh:true,onBeforeLoad:function(params){ |
528 | return params["c2139911-0d31-4886-b6b8-fa9a84ea9b7d"]=coId; | 530 | return params["c2139911-0d31-4886-b6b8-fa9a84ea9b7d"]=coId; |
529 | }}, function(row){ | 531 | }}, function(row){ |
530 | deId=[]; | 532 | deId=[]; | ... | ... |
1 | -define(["uploadify"],function(){ | 1 | +define(['i18n!employee/nls/resource', 'cls', 'lodash', 'moment', 'base/index', 'index/index','uploadify'], function (resource, Class, _, moment, base, layout){ |
2 | return function(sessionId,rootUrl){ | 2 | return function(sessionId,rootUrl){ |
3 | - var pannel = getSelectedPanel();//初始化面板 | 3 | + var pannel = layout.getSelectedPanel();//初始化面板 |
4 | var page = pannel.children(".employee-index-page").layout({ | 4 | var page = pannel.children(".employee-index-page").layout({ |
5 | fit:true | 5 | fit:true |
6 | });//定义面板内div | 6 | });//定义面板内div |
... | @@ -11,14 +11,14 @@ define(["uploadify"],function(){ | ... | @@ -11,14 +11,14 @@ define(["uploadify"],function(){ |
11 | return $('<div></div>').appendTo(center).datagrid({ | 11 | return $('<div></div>').appendTo(center).datagrid({ |
12 | url:'./query/'+condId+'.json', | 12 | url:'./query/'+condId+'.json', |
13 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 13 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
14 | - title: resource.employee.title, | 14 | + title: resource.title, |
15 | - authz:getAuthzUtils('employee'), | 15 | + authz:base.getAuthz('employee'), |
16 | buttons:[{ | 16 | buttons:[{ |
17 | - text:resource.btn.select, | 17 | + text:base.resource.btn.select, |
18 | iconCls:'btn-select select-condition', | 18 | iconCls:'btn-select select-condition', |
19 | code:'view', | 19 | code:'view', |
20 | handler: function(){ | 20 | handler: function(){ |
21 | - showCondObject({ | 21 | + base.showCondObject({ |
22 | id:condId, | 22 | id:condId, |
23 | onCascade:{ | 23 | onCascade:{ |
24 | "81d2b9f9-1ead-48d0-9eb7-601d780c1673":{ | 24 | "81d2b9f9-1ead-48d0-9eb7-601d780c1673":{ |
... | @@ -44,54 +44,56 @@ define(["uploadify"],function(){ | ... | @@ -44,54 +44,56 @@ define(["uploadify"],function(){ |
44 | },datagridReload); | 44 | },datagridReload); |
45 | } | 45 | } |
46 | },{ | 46 | },{ |
47 | - text:resource.btn.add, | 47 | + text:base.resource.btn.add, |
48 | iconCls:'btn-add', | 48 | iconCls:'btn-add', |
49 | code:'edit', | 49 | code:'edit', |
50 | handler: addWindow | 50 | handler: addWindow |
51 | },{ | 51 | },{ |
52 | - text:resource.btn.edit, | 52 | + text:base.resource.btn.edit, |
53 | iconCls:'btn-edit', | 53 | iconCls:'btn-edit', |
54 | code:'edit', | 54 | code:'edit', |
55 | handler: editWindow | 55 | handler: editWindow |
56 | },{ | 56 | },{ |
57 | - text:resource.btn.remove, | 57 | + text:base.resource.btn.remove, |
58 | iconCls:'btn-remove', | 58 | iconCls:'btn-remove', |
59 | code:'edit', | 59 | code:'edit', |
60 | handler: deleteEmp | 60 | handler: deleteEmp |
61 | }], | 61 | }], |
62 | tools:[{ // 导出模板 | 62 | tools:[{ // 导出模板 |
63 | code:'edit', | 63 | code:'edit', |
64 | - text:resource.btn.downloadExcel, | 64 | + text:base.resource.btn.downloadExcel, |
65 | iconCls:'btn-down', | 65 | iconCls:'btn-down', |
66 | handler:function(){ | 66 | handler:function(){ |
67 | var fileName="employeeTemplate.xlsx"; | 67 | var fileName="employeeTemplate.xlsx"; |
68 | - downloadExcel(fileName); | 68 | + base.downloadExcelTemplate(fileName); |
69 | } | 69 | } |
70 | },{ | 70 | },{ |
71 | - text:resource.btn.refresh, | 71 | + text:base.resource.btn.refresh, |
72 | iconCls:'btn-refresh', | 72 | iconCls:'btn-refresh', |
73 | - handler:panelRefreshUtils | 73 | + handler:function(){ |
74 | + layout.panelRefresh(); | ||
75 | + } | ||
74 | },{ // 导入 | 76 | },{ // 导入 |
75 | code:'edit', | 77 | code:'edit', |
76 | - text:resource.btn.addByFile, | 78 | + text:base.resource.btn.addByFile, |
77 | id:'btn-employee-import', | 79 | id:'btn-employee-import', |
78 | iconCls:'btn-down' | 80 | iconCls:'btn-down' |
79 | }] | 81 | }] |
80 | }), | 82 | }), |
81 | columns:[[ | 83 | columns:[[ |
82 | {field:'ck',checkbox:true }, | 84 | {field:'ck',checkbox:true }, |
83 | - {field:'EMID',title:resource.employee.grid.cmid, width:80}, | 85 | + {field:'EMID',title:resource.grid.cmid, width:80}, |
84 | - {field:'EMCODE',title:resource.employee.grid.code, width:80}, | 86 | + {field:'EMCODE',title:resource.grid.code, width:80}, |
85 | - {field:'EMNAME',title:resource.employee.grid.name, width:120}, | 87 | + {field:'EMNAME',title:resource.grid.name, width:120}, |
86 | - {field:'CONAME',title:resource.employee.grid.corp, width:200,formatter:formatText}, | 88 | + {field:'CONAME',title:resource.grid.corp, width:200,formatter:formatText}, |
87 | - {field:'DENAME',title:resource.employee.grid.dept, width:100,formatter:formatText}, | 89 | + {field:'DENAME',title:resource.grid.dept, width:100,formatter:formatText}, |
88 | - {field:'PONAME',title:resource.employee.grid.post, width:100,formatter:formatText}, | 90 | + {field:'PONAME',title:resource.grid.post, width:100,formatter:formatText}, |
89 | - {field:'EMENTRYDATE',title:resource.employee.grid.entryDate, width:150,formatter:formatDate}, | 91 | + {field:'EMENTRYDATE',title:resource.grid.entryDate, width:150,formatter:formatDate}, |
90 | - {field:'EMLEAVEDATE',title:resource.employee.grid.leaveDate, width:150,formatter:formatDate}, | 92 | + {field:'EMLEAVEDATE',title:resource.grid.leaveDate, width:150,formatter:formatDate}, |
91 | - {field:'EMSTAUTS',title:resource.employee.grid.status, width:100}, | 93 | + {field:'EMSTAUTS',title:resource.grid.status, width:100}, |
92 | - {field:'EMPHONE',title:resource.employee.grid.phone, width:150,formatter:formatText}, | 94 | + {field:'EMPHONE',title:resource.grid.phone, width:150,formatter:formatText}, |
93 | - {field:'EMEMAIL',title:resource.employee.grid.email, width:150,formatter:formatText}, | 95 | + {field:'EMEMAIL',title:resource.grid.email, width:150,formatter:formatText}, |
94 | - {field:'EMLOSTPHONE',title:resource.employee.grid.lostPhone, width:150,formatter:formatText}, | 96 | + {field:'EMLOSTPHONE',title:resource.grid.lostPhone, width:150,formatter:formatText}, |
95 | ]], | 97 | ]], |
96 | onLoadSuccess:function(data){ | 98 | onLoadSuccess:function(data){ |
97 | for(var i=0;i<data.rows.length;i++){ | 99 | for(var i=0;i<data.rows.length;i++){ |
... | @@ -113,21 +115,21 @@ define(["uploadify"],function(){ | ... | @@ -113,21 +115,21 @@ define(["uploadify"],function(){ |
113 | if(leavedate==undefined){ | 115 | if(leavedate==undefined){ |
114 | leavedate=""; | 116 | leavedate=""; |
115 | } | 117 | } |
116 | - var state = resource.employee.state.onJob; | 118 | + var state = resource.state.onJob; |
117 | if(leavedate==""){ | 119 | if(leavedate==""){ |
118 | - if(Date.parseDate(entrydate) > new Date() ){ | 120 | + if(moment().isBefore(entrydate)){ |
119 | - state = resource.employee.state.noentry;//未入职 | 121 | + state = resource.state.noentry;//未入职 |
120 | - }else if(Date.parseDate(entrydate) < new Date()){ | 122 | + }else if(moment().isAfter(entrydate)){ |
121 | - state = resource.employee.state.onJob;//在职 | 123 | + state = resource.state.onJob;//在职 |
122 | } | 124 | } |
123 | return state; | 125 | return state; |
124 | }else{ | 126 | }else{ |
125 | - if(Date.parseDate(entrydate) > new Date() ){ | 127 | + if(moment().isBefore(entrydate)){ |
126 | - state = resource.employee.state.noentry;//未入职 | 128 | + state = resource.state.noentry;//未入职 |
127 | - }else if(Date.parseDate(entrydate) < new Date() && new Date() < Date.parseDate(leavedate)){ | 129 | + }else if(moment(entrydate).isBefore(moment()) && moment().isBefore(leavedate)){ |
128 | - state = resource.employee.state.onJob;//在职 | 130 | + state = resource.state.onJob;//在职 |
129 | }else{ | 131 | }else{ |
130 | - state = resource.employee.state.leaveJob;//离职 | 132 | + state = resource.state.leaveJob;//离职 |
131 | } | 133 | } |
132 | } | 134 | } |
133 | return state; | 135 | return state; |
... | @@ -143,13 +145,13 @@ define(["uploadify"],function(){ | ... | @@ -143,13 +145,13 @@ define(["uploadify"],function(){ |
143 | if(params){ | 145 | if(params){ |
144 | grid.datagrid("reload",params); | 146 | grid.datagrid("reload",params); |
145 | }else{ | 147 | }else{ |
146 | - grid.datagrid("reload",getCondObjectValue(condId)); | 148 | + grid.datagrid("reload",base.getCondObjectValue(condId)); |
147 | } | 149 | } |
148 | } | 150 | } |
149 | //添加到雇员详情页面 | 151 | //添加到雇员详情页面 |
150 | function addWindow(){ | 152 | function addWindow(){ |
151 | //添加雇员详情页面 | 153 | //添加雇员详情页面 |
152 | - showTabUtils({text:resource.employee.detail,url:"./employeeDetail/detailAdd"}, true, function(){ | 154 | + layout.showPanel({text:resource.detail,url:"./employeeDetail/detailAdd"}, true, function(){ |
153 | grid.datagrid("reload"); | 155 | grid.datagrid("reload"); |
154 | }); | 156 | }); |
155 | } | 157 | } |
... | @@ -157,9 +159,9 @@ define(["uploadify"],function(){ | ... | @@ -157,9 +159,9 @@ define(["uploadify"],function(){ |
157 | function editWindow(){ | 159 | function editWindow(){ |
158 | var row = grid.datagrid('getSelected'); | 160 | var row = grid.datagrid('getSelected'); |
159 | if(row == null){ | 161 | if(row == null){ |
160 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 162 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
161 | }else{ | 163 | }else{ |
162 | - showTabUtils({text:resource.employee.detail,url:"./employeeDetail/detailEdit?emId="+row.EMID}, true, function(){ | 164 | + layout.showPanel({text:resource.detail,url:"./employeeDetail/detailEdit?emId="+row.EMID}, true, function(){ |
163 | grid.datagrid("reload"); | 165 | grid.datagrid("reload"); |
164 | }); | 166 | }); |
165 | } | 167 | } |
... | @@ -169,12 +171,12 @@ define(["uploadify"],function(){ | ... | @@ -169,12 +171,12 @@ define(["uploadify"],function(){ |
169 | function deleteEmp(){ | 171 | function deleteEmp(){ |
170 | var row = grid.datagrid('getSelected'); | 172 | var row = grid.datagrid('getSelected'); |
171 | if(row == null){ | 173 | if(row == null){ |
172 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 174 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
173 | }else{ | 175 | }else{ |
174 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 176 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){ |
175 | if(r){ | 177 | if(r){ |
176 | $.post("./employeeDetail/delete.json",{id:row.EMID},function(result){ | 178 | $.post("./employeeDetail/delete.json",{id:row.EMID},function(result){ |
177 | - if(responseUtils(result)){ | 179 | + if($.response(result)){ |
178 | grid.datagrid("reload"); | 180 | grid.datagrid("reload"); |
179 | } | 181 | } |
180 | }); | 182 | }); | ... | ... |
1 | +define({ | ||
2 | + root:{ | ||
3 | + title:'雇员信息', | ||
4 | + detail:'雇员详情', | ||
5 | + grid:{ | ||
6 | + cmid:'雇员ID', | ||
7 | + code:'工号', | ||
8 | + name:'姓名', | ||
9 | + corp:'公司', | ||
10 | + dept:'部门', | ||
11 | + post:'岗位', | ||
12 | + entryDate:'入职日期', | ||
13 | + leaveDate:'离职日期', | ||
14 | + status:'入职状态', | ||
15 | + statusNon:'未入职', | ||
16 | + statusYes:'在职', | ||
17 | + statusNo:'离职', | ||
18 | + phone:'手机', | ||
19 | + email:'邮箱', | ||
20 | + lostPhone:'挂失手机' | ||
21 | + }, | ||
22 | + state:{ | ||
23 | + onJob:'在职', | ||
24 | + noentry:'未入职', | ||
25 | + leaveJob:'离职' | ||
26 | + }, | ||
27 | + chsValid:'只能输入汉字!', | ||
28 | + mobileValid:'请输入正确的手机号!', | ||
29 | + zipCodeValid:'请输入正确的邮编!', | ||
30 | + numberLetterValid:'工号只能输入数字、字母或其组合!', | ||
31 | + select:'请选择', | ||
32 | + dateCheck:'入职日期必须早于离职日期!' | ||
33 | + }, | ||
34 | + "en-US": true, | ||
35 | + "en-US-paris": true | ||
36 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -18,7 +18,7 @@ requirejs.config({ | ... | @@ -18,7 +18,7 @@ requirejs.config({ |
18 | 'easyui_zh-CN': '../third/easyui/locale/easyui-lang-zh_CN', | 18 | 'easyui_zh-CN': '../third/easyui/locale/easyui-lang-zh_CN', |
19 | moment:'../third/moment/moment.min', | 19 | moment:'../third/moment/moment.min', |
20 | lodash:'../third/lodash/lodash.min', | 20 | lodash:'../third/lodash/lodash.min', |
21 | - qrcode: '../third/easyui/jquery.qrcode', | 21 | + qrcode: '../third/jquery/jquery.qrcode', |
22 | jspdf: '../third/pdf/jspdf.min', | 22 | jspdf: '../third/pdf/jspdf.min', |
23 | echarts: '../third/echarts/echarts-all', | 23 | echarts: '../third/echarts/echarts-all', |
24 | ckeditor: '../third/ckeditor/ckeditor', | 24 | ckeditor: '../third/ckeditor/ckeditor', | ... | ... |
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
1 | +define({ | ||
2 | + root:{ | ||
3 | + detail:'营销活动详情', | ||
4 | + marketEnd:'活动已结束, 不能提交!', | ||
5 | + timeOut:'日期已超时,请驳回该活动!', | ||
6 | + timeBeforeNow:'该活动结束时间早于当前时间,无法继续执行!', | ||
7 | + moreThenOneDay:'每周至少选择一天', | ||
8 | + confirmDelet:'确认删除', | ||
9 | + pushObj:'推送对象组', | ||
10 | + select:'请选择', | ||
11 | + coupon:{ | ||
12 | + send:'立即送券', | ||
13 | + repeat:'券重复', | ||
14 | + type:'送礼券型', | ||
15 | + noLimit:'不限' | ||
16 | + }, | ||
17 | + point:{ | ||
18 | + send:'立即送积点' | ||
19 | + }, | ||
20 | + title:{ | ||
21 | + approval:'审批', | ||
22 | + stop:'中止', | ||
23 | + resume:'继续执行', | ||
24 | + eventList:'活动列表' | ||
25 | + }, | ||
26 | + grid:{ | ||
27 | + mktcode:'活动编号', | ||
28 | + mktname:'活动名称', | ||
29 | + stime:'开始时间', | ||
30 | + etime:'结束时间', | ||
31 | + mkttype:'活动类型', | ||
32 | + mktproject:'所属营销项目', | ||
33 | + refno:'相关活动编号', | ||
34 | + orname:'发起组织', | ||
35 | + chname:'发起渠道', | ||
36 | + emname:'创建人', | ||
37 | + rectime:'创建时间', | ||
38 | + spname:'审批人', | ||
39 | + sptime:'审批时间', | ||
40 | + enable:'可用', | ||
41 | + mktstat:'审批状态' | ||
42 | + }, | ||
43 | + approval:{ | ||
44 | + state0:'创建中', | ||
45 | + state1:'待审批', | ||
46 | + state2:'已核准', | ||
47 | + state3:'已驳回', | ||
48 | + state4:'已中止' | ||
49 | + }, | ||
50 | + channelContent:{ | ||
51 | + msg:'短信内容不能为空!', | ||
52 | + msgChl:'短信通道不能为空!', | ||
53 | + MMS:'彩信内容不能为空!', | ||
54 | + MMSChl:'彩信通道不能为空!', | ||
55 | + MMSTheme:'彩信主题不能为空!', | ||
56 | + email:'邮件正文不能为空!', | ||
57 | + emailChl:'邮箱通道不能为空!', | ||
58 | + emailTheme:'邮箱主题不能为空!' | ||
59 | + }, | ||
60 | + weChat:{ | ||
61 | + send:'微信服务号测试发送', | ||
62 | + pushMsgNull:'推送消息不能为空' | ||
63 | + }, | ||
64 | + phone:{ | ||
65 | + send:'手机测试发送', | ||
66 | + exist:'已存在', | ||
67 | + moreThenTen:'手机号不能超过10个', | ||
68 | + notNull:'不能为空' | ||
69 | + }, | ||
70 | + email:{ | ||
71 | + send:'邮件测试发送' | ||
72 | + }, | ||
73 | + step:{ | ||
74 | + back:'上一步', | ||
75 | + next:'下一步', | ||
76 | + save:'保存', | ||
77 | + saveAndSubmit:'保存并提交', | ||
78 | + abandon:'放弃', | ||
79 | + success:'提交成功', | ||
80 | + abandonBtn:'是否放弃此次操作' | ||
81 | + } | ||
82 | + }, | ||
83 | + "en-US": true, | ||
84 | + "en-US-paris": true | ||
85 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
1 | +define({ | ||
2 | + root:{ | ||
3 | + azonic:"不限", | ||
4 | + opt:"请选择", | ||
5 | + bizEntity:"请选择经营主体", | ||
6 | + setGZH:"设置公众号", | ||
7 | + editCheck:"该数据非本平台创建!", | ||
8 | + descLenght:"描述字段长度100!", | ||
9 | + providerlength:"服务提供商输入长度超过60!", | ||
10 | + msgType:{ | ||
11 | + note:"短信", | ||
12 | + email:"邮箱", | ||
13 | + weChat:"微信" | ||
14 | + }, | ||
15 | + verify:{ | ||
16 | + negative:"未认证", | ||
17 | + one:"新浪微博认证", | ||
18 | + two:"腾讯微博认证", | ||
19 | + three:"已资质认证通过但还未通过名", | ||
20 | + four:"已资质认证通过、还未通过名称认证,但通过了新浪微博认证", | ||
21 | + five:"代表已资质认证通过、还未通过名称认证,但通过了腾讯微博认证" | ||
22 | + }, | ||
23 | + protocol:{ | ||
24 | + one:"推送验证码", | ||
25 | + two:"推送文本" | ||
26 | + }, | ||
27 | + optTitle:{ | ||
28 | + addMsg:"短信通道", | ||
29 | + addMms:"彩信通道", | ||
30 | + addEmail:"邮箱通道", | ||
31 | + addweChat:"配置适用主体" | ||
32 | + }, | ||
33 | + tab:{ | ||
34 | + note:{ | ||
35 | + tabTitle:"短信", | ||
36 | + dataGridTitle:"短信通道", | ||
37 | + dataGrid:{ | ||
38 | + ID:'系统ID', | ||
39 | + name:'名称', | ||
40 | + type:'类型', | ||
41 | + desc:'描述', | ||
42 | + protocol:'服务类型', | ||
43 | + remain:'账户余量(条)', | ||
44 | + bizEntity:'适用经营主体', | ||
45 | + bizSetOfBook:'适用结算主体', | ||
46 | + plName:"创建平台" | ||
47 | + }, | ||
48 | + addDialog:{ | ||
49 | + msname:"名称", | ||
50 | + msdesc:"描述", | ||
51 | + mstype:"类型", | ||
52 | + type:"短信", | ||
53 | + msprovider:"服务提供商", | ||
54 | + msaccount:"账户ID", | ||
55 | + mspassword:"密码", | ||
56 | + msprotocol:"服务类型", | ||
57 | + msremain:"账户余量", | ||
58 | + msBizEntity:"适用经营主体", | ||
59 | + msSetOfBook:"适用结算主体", | ||
60 | + refresh:"刷新" | ||
61 | + } | ||
62 | + }, | ||
63 | + email:{ | ||
64 | + tabTitle:"邮箱", | ||
65 | + dataGridTitle:"短信通道", | ||
66 | + dataGrid:{ | ||
67 | + ID:'系统ID', | ||
68 | + name:'名称', | ||
69 | + type:'类型', | ||
70 | + desc:'描述', | ||
71 | + provider:'发送服务器', | ||
72 | + remain:'用户名', | ||
73 | + bizEntity:'适用经营主体', | ||
74 | + bizSetOfBook:'适用结算主体', | ||
75 | + plName:"创建平台", | ||
76 | + protocol:"邮件类型" | ||
77 | + }, | ||
78 | + mcemailtype:{ | ||
79 | + one:"SMTP", | ||
80 | + two:"Exchange" | ||
81 | + }, | ||
82 | + addDialog:{ | ||
83 | + emname:"名称", | ||
84 | + emdesc:"描述", | ||
85 | + emtype:"类型", | ||
86 | + em:"邮箱", | ||
87 | + emprovider:"发送服务器", | ||
88 | + ememailType:"邮件类型", | ||
89 | + emaccount:"用户名", | ||
90 | + empassword:"密码", | ||
91 | + emprotocol:"协议类型", | ||
92 | + emremain:"端口", | ||
93 | + emBizEntity:"适用经营主体", | ||
94 | + emSetOfBook:"适用结算主体" | ||
95 | + } | ||
96 | + }, | ||
97 | + weChat:{ | ||
98 | + tabTitle:"微信服务号", | ||
99 | + dataGridTitle:"短信通道", | ||
100 | + weChatOpt:"设置公众号", | ||
101 | + dataGrid:{ | ||
102 | + name:'名称', | ||
103 | + type:'类型', | ||
104 | + desc:'描述', | ||
105 | + originalID:'原始ID', | ||
106 | + emsCnplID:'公众号ID', | ||
107 | + acstatus:'认证状态', | ||
108 | + platform:'配置平台', | ||
109 | + brand:"经营品牌", | ||
110 | + bizEntity:"适用经营主体" | ||
111 | + } | ||
112 | + }, | ||
113 | + subscriber:{ | ||
114 | + tabTitle:"微信订阅号", | ||
115 | + setBizEntity:"配置适用主体", | ||
116 | + addDialog:{ | ||
117 | + msgChannel:"推送通道", | ||
118 | + mstype:"类型", | ||
119 | + weChatType:"微信服务号", | ||
120 | + bizEntity:'适用经营主体' | ||
121 | + } | ||
122 | + }, | ||
123 | + mms:{ | ||
124 | + tabTitle:"彩信", | ||
125 | + dataGridTitle:"彩信通道", | ||
126 | + dataGrid:{ | ||
127 | + ID:'系统ID', | ||
128 | + name:'名称', | ||
129 | + type:'类型', | ||
130 | + desc:'描述', | ||
131 | + protocol:'服务类型', | ||
132 | + remain:'账户余量(条)', | ||
133 | + bizEntity:'适用经营主体', | ||
134 | + bizSetOfBook:'适用结算主体', | ||
135 | + plName:"创建平台" | ||
136 | + }, | ||
137 | + addDialog:{ | ||
138 | + msname:"名称", | ||
139 | + msdesc:"描述", | ||
140 | + mstype:"类型", | ||
141 | + type:"彩信", | ||
142 | + msprovider:"服务提供商", | ||
143 | + msaccount:"账户ID", | ||
144 | + mspassword:"密码", | ||
145 | + msprotocol:"服务类型", | ||
146 | + msremain:"账户余量", | ||
147 | + msBizEntity:"适用经营主体", | ||
148 | + msSetOfBook:"适用结算主体", | ||
149 | + refresh:"刷新" | ||
150 | + } | ||
151 | + } | ||
152 | + } | ||
153 | + }, | ||
154 | + "en-US": true, | ||
155 | + "en-US-paris": true | ||
156 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -define(function(){ | 1 | +define(['i18n!orgChannel/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return function(){ | 2 | return function(){ |
3 | - var pannel = getSelectedPanel();//初始化面板 | 3 | + var pannel = layout.getSelectedPanel();//初始化面板 |
4 | var page = pannel.children(".orgChannel-index-page").layout({ | 4 | var page = pannel.children(".orgChannel-index-page").layout({ |
5 | fit:true | 5 | fit:true |
6 | });//定义面板内div | 6 | });//定义面板内div |
... | @@ -29,7 +29,7 @@ define(function(){ | ... | @@ -29,7 +29,7 @@ define(function(){ |
29 | */ | 29 | */ |
30 | function initbutton() { | 30 | function initbutton() { |
31 | center.find(".toolbar").rs_toolbar({ | 31 | center.find(".toolbar").rs_toolbar({ |
32 | - authz:getAuthzUtils('orgChannel'), | 32 | + authz:base.getAuthz('orgChannel'), |
33 | content : orgChannelForm, | 33 | content : orgChannelForm, |
34 | // buttons : [ { | 34 | // buttons : [ { |
35 | // text : resource.btn.save, | 35 | // text : resource.btn.save, |
... | @@ -38,11 +38,13 @@ define(function(){ | ... | @@ -38,11 +38,13 @@ define(function(){ |
38 | // handler : function(){} | 38 | // handler : function(){} |
39 | // } ], | 39 | // } ], |
40 | tools : [ { | 40 | tools : [ { |
41 | - text : resource.btn.refresh, | 41 | + text : base.resource.btn.refresh, |
42 | iconCls : 'btn-refresh', | 42 | iconCls : 'btn-refresh', |
43 | - handler : panelRefreshUtils | 43 | + handler : function () { |
44 | + layout.panelRefresh(); | ||
45 | + } | ||
44 | }, { | 46 | }, { |
45 | - text : resource.btn.more, | 47 | + text : base.resource.btn.more, |
46 | iconCls : 'btn-more', | 48 | iconCls : 'btn-more', |
47 | handler : function() { | 49 | handler : function() { |
48 | } | 50 | } |
... | @@ -60,7 +62,7 @@ define(function(){ | ... | @@ -60,7 +62,7 @@ define(function(){ |
60 | onClick : refreshData | 62 | onClick : refreshData |
61 | }); | 63 | }); |
62 | search.searchbox({ | 64 | search.searchbox({ |
63 | - prompt:resource.organization.search, | 65 | + prompt:resource.search, |
64 | width:200, | 66 | width:200, |
65 | searcher:function(value,name){ | 67 | searcher:function(value,name){ |
66 | orgChannelTree.tree({ | 68 | orgChannelTree.tree({ |
... | @@ -78,16 +80,16 @@ define(function(){ | ... | @@ -78,16 +80,16 @@ define(function(){ |
78 | function initDatagrid(){ | 80 | function initDatagrid(){ |
79 | var datagrid = $('<div></div>').appendTo(siteGrid).datagrid({ | 81 | var datagrid = $('<div></div>').appendTo(siteGrid).datagrid({ |
80 | data:{"total":0,"status":"success","list":[]}, | 82 | data:{"total":0,"status":"success","list":[]}, |
81 | - title: resource.orgChannel.site.title, | 83 | + title: resource.site.title, |
82 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 84 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
83 | - authz:getAuthzUtils('orgChannel'), | 85 | + authz:base.getAuthz('orgChannel'), |
84 | buttons:[{ | 86 | buttons:[{ |
85 | - text:resource.orgChannel.site.add, | 87 | + text:resource.site.add, |
86 | iconCls:'btn-add', | 88 | iconCls:'btn-add', |
87 | code:'edit', | 89 | code:'edit', |
88 | handler: addEvent | 90 | handler: addEvent |
89 | },{ | 91 | },{ |
90 | - text:resource.orgChannel.site.remove, | 92 | + text:resource.site.remove, |
91 | iconCls:'btn-remove', | 93 | iconCls:'btn-remove', |
92 | code:'edit', | 94 | code:'edit', |
93 | handler: deleteEvent | 95 | handler: deleteEvent |
... | @@ -97,15 +99,15 @@ define(function(){ | ... | @@ -97,15 +99,15 @@ define(function(){ |
97 | singleSelect:false, | 99 | singleSelect:false, |
98 | columns:[[ | 100 | columns:[[ |
99 | {field:'ck',checkbox:true }, | 101 | {field:'ck',checkbox:true }, |
100 | - {field:'SICODE',title:resource.orgChannel.site.grid.code, width:80}, | 102 | + {field:'SICODE',title:resource.site.grid.code, width:80}, |
101 | - {field:'SINAME',title:resource.orgChannel.site.grid.name, width:200}, | 103 | + {field:'SINAME',title:resource.site.grid.name, width:200}, |
102 | - {field:'SITYPENAME',title:resource.orgChannel.site.grid.type, width:150}, | 104 | + {field:'SITYPENAME',title:resource.site.grid.type, width:150}, |
103 | - {field:'BENAME',title:resource.orgChannel.site.grid.beName, width:150}, | 105 | + {field:'BENAME',title:resource.site.grid.beName, width:150}, |
104 | - {field:'ORNAME',title:resource.orgChannel.site.grid.orName, width:150} | 106 | + {field:'ORNAME',title:resource.site.grid.orName, width:150} |
105 | ]] | 107 | ]] |
106 | }); | 108 | }); |
107 | site_search.searchbox({ | 109 | site_search.searchbox({ |
108 | - prompt:resource.organization.search, | 110 | + prompt:resource.search, |
109 | searcher:function(value,name){ | 111 | searcher:function(value,name){ |
110 | datagrid.datagrid({ | 112 | datagrid.datagrid({ |
111 | queryParams: { | 113 | queryParams: { |
... | @@ -176,7 +178,7 @@ define(function(){ | ... | @@ -176,7 +178,7 @@ define(function(){ |
176 | function addEvent(){ | 178 | function addEvent(){ |
177 | var node = orgChannelTree.tree('getSelected'); | 179 | var node = orgChannelTree.tree('getSelected'); |
178 | if(node){ | 180 | if(node){ |
179 | - showCondObject({ | 181 | + base.showCondObject({ |
180 | id : "cae9d408-2c74-11e6-abf4-3c970e1c88a0", | 182 | id : "cae9d408-2c74-11e6-abf4-3c970e1c88a0", |
181 | showGrid : true, | 183 | showGrid : true, |
182 | singleSelect : false, | 184 | singleSelect : false, |
... | @@ -210,10 +212,10 @@ define(function(){ | ... | @@ -210,10 +212,10 @@ define(function(){ |
210 | function deleteEvent(){ | 212 | function deleteEvent(){ |
211 | var rows = grid.datagrid('getSelections'); | 213 | var rows = grid.datagrid('getSelections'); |
212 | if(rows.length == 0){ | 214 | if(rows.length == 0){ |
213 | - $.messager.alert(resource.msg_title,resource.msgRemoveTip); | 215 | + $.messager.alert(base.resource.msg_title,base.resource.msgRemoveTip); |
214 | } else { | 216 | } else { |
215 | - $.messager.confirm(resource.msg_title, | 217 | + $.messager.confirm(base.resource.msg_title, |
216 | - resource.orgChannel.site.isDelete, function(r) { | 218 | + resource.site.isDelete, function(r) { |
217 | if (r) { | 219 | if (r) { |
218 | var sirId = new Array(); | 220 | var sirId = new Array(); |
219 | for (var i = 0; i < rows.length; i++) { | 221 | for (var i = 0; i < rows.length; i++) { | ... | ... |
1 | +define({ | ||
2 | + root:{ | ||
3 | + channel:'经营渠道', | ||
4 | + ptValidYes:'是', | ||
5 | + ptValidNo:'否', | ||
6 | + search:'查找关键字', | ||
7 | + site:{ | ||
8 | + title:'网点', | ||
9 | + grid:{ | ||
10 | + code:'编号', | ||
11 | + name:'名称', | ||
12 | + type:'组织类型', | ||
13 | + beName:'经营主体', | ||
14 | + orName:'管辖组织' | ||
15 | + }, | ||
16 | + isDelete:'你确定要删除这些网点吗?', | ||
17 | + add:'添加', | ||
18 | + remove:'移除' | ||
19 | + } | ||
20 | + }, | ||
21 | + "en-US": true, | ||
22 | + "en-US-paris": true | ||
23 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
1 | +define({ | ||
2 | + root:{ | ||
3 | + HQ:'总部', | ||
4 | + Filiale:'分销商', | ||
5 | + RegI:'区域机构', | ||
6 | + Jurisdiction:'管辖组织', | ||
7 | + cannotAddNext:'根节点无法插入平级组织!', | ||
8 | + isMove:'您确定要移动此组织及其下属组织吗?', | ||
9 | + selectNode:'请选择要保存的组织节点!', | ||
10 | + search:'查找关键字', | ||
11 | + cannotDeleteRoot:'根节点无法删除!', | ||
12 | + cannotDelete:'该组织下面存在子节点,无法删除!', | ||
13 | + selectChannel:'请选择经营渠道!', | ||
14 | + channel:{ | ||
15 | + title:'经营渠道', | ||
16 | + apply:'适用', | ||
17 | + channel:'经营渠道', | ||
18 | + setOfBook:'默认结算账套', | ||
19 | + yes:"是", | ||
20 | + no:"否" | ||
21 | + } | ||
22 | + }, | ||
23 | + "en-US": true, | ||
24 | + "en-US-paris": true | ||
25 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
1 | -define(function(){ | 1 | +define(['i18n!platform/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(){ | 3 | init : function(){ |
4 | - var panel=getSelectedPanel(); | 4 | + var panel=layout.getSelectedPanel(); |
5 | - var layout=panel.children('.sys-platform').layout({ | ||
6 | - fit:true | ||
7 | - }); | ||
8 | var page = panel.children(".sys-platform").layout({ | 5 | var page = panel.children(".sys-platform").layout({ |
9 | fit:true | 6 | fit:true |
10 | }); | 7 | }); |
... | @@ -14,7 +11,7 @@ define(function(){ | ... | @@ -14,7 +11,7 @@ define(function(){ |
14 | var buttons = page.find(".rs-toolbar").find(".button");// 按钮组 | 11 | var buttons = page.find(".rs-toolbar").find(".button");// 按钮组 |
15 | 12 | ||
16 | var ptDialog = page.find(".pl-role-details-type").dialog({ | 13 | var ptDialog = page.find(".pl-role-details-type").dialog({ |
17 | - title: resource.msg_title, | 14 | + title: base.resource.msg_title, |
18 | closed : true, | 15 | closed : true, |
19 | width : '629', | 16 | width : '629', |
20 | height: 'auto', | 17 | height: 'auto', |
... | @@ -26,52 +23,54 @@ define(function(){ | ... | @@ -26,52 +23,54 @@ define(function(){ |
26 | return center.children(".sys-plat-table").datagrid({ | 23 | return center.children(".sys-plat-table").datagrid({ |
27 | url:'./query/'+condId+'.json', | 24 | url:'./query/'+condId+'.json', |
28 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 25 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
29 | - title:resource.platform.title, | 26 | + title:resource.title, |
30 | - authz:getAuthzUtils('platform'), | 27 | + authz:base.getAuthz('platform'), |
31 | buttons:[{ | 28 | buttons:[{ |
32 | - text:resource.btn.select, | 29 | + text:base.resource.btn.select, |
33 | iconCls:'btn-select select-condition', | 30 | iconCls:'btn-select select-condition', |
34 | code:'view', | 31 | code:'view', |
35 | handler: function(){ | 32 | handler: function(){ |
36 | - showCondObject(condId,datagridReload); | 33 | + base.showCondObject(condId,datagridReload); |
37 | } | 34 | } |
38 | },{ | 35 | },{ |
39 | - text:resource.btn.add, | 36 | + text:base.resource.btn.add, |
40 | iconCls:'btn-add', | 37 | iconCls:'btn-add', |
41 | code:'edit', | 38 | code:'edit', |
42 | handler: addEvent | 39 | handler: addEvent |
43 | },{ | 40 | },{ |
44 | - text:resource.btn.edit, | 41 | + text:base.resource.btn.edit, |
45 | iconCls:'btn-edit', | 42 | iconCls:'btn-edit', |
46 | code:'edit', | 43 | code:'edit', |
47 | handler: editEvent | 44 | handler: editEvent |
48 | },{ | 45 | },{ |
49 | - text:resource.btn.remove, | 46 | + text:base.resource.btn.remove, |
50 | iconCls:'btn-remove', | 47 | iconCls:'btn-remove', |
51 | code:'edit', | 48 | code:'edit', |
52 | handler: deleteEvent | 49 | handler: deleteEvent |
53 | }], | 50 | }], |
54 | tools:[{ | 51 | tools:[{ |
55 | - text:resource.btn.refresh, | 52 | + text:base.resource.btn.refresh, |
56 | iconCls:'btn-refresh', | 53 | iconCls:'btn-refresh', |
57 | - handler:panelRefreshUtils | 54 | + handler:function () { |
55 | + layout.panelRefresh(); | ||
56 | + } | ||
58 | }] | 57 | }] |
59 | }), | 58 | }), |
60 | columns:[[ | 59 | columns:[[ |
61 | {field:'ck',checkbox:true }, | 60 | {field:'ck',checkbox:true }, |
62 | - {"field":"PLCODE","title":resource.platform.grid.code,"width":100}, | 61 | + {"field":"PLCODE","title":resource.grid.code,"width":100}, |
63 | - {"field":"PLNAME","title":resource.platform.grid.name,"width":250}, | 62 | + {"field":"PLNAME","title":resource.grid.name,"width":250}, |
64 | - {"field":"PLTNAME","title":resource.platform.grid.typeName,"width":120}, | 63 | + {"field":"PLTNAME","title":resource.grid.typeName,"width":120}, |
65 | - {"field":"PLPERMNUM","title":resource.platform.grid.permNum,"width":120,formatter: function(value,row,index){ | 64 | + {"field":"PLPERMNUM","title":resource.grid.permNum,"width":120,formatter: function(value,row,index){ |
66 | if(value == null){ | 65 | if(value == null){ |
67 | - return resource.platform.unlimited; | 66 | + return resource.unlimited; |
68 | } else { | 67 | } else { |
69 | return value; | 68 | return value; |
70 | } | 69 | } |
71 | } | 70 | } |
72 | }, | 71 | }, |
73 | //{"field":"PLREG","title":resource.platform.grid.enabled,"width":100}, | 72 | //{"field":"PLREG","title":resource.platform.grid.enabled,"width":100}, |
74 | - {"field":"PLSTATUS","title":resource.platform.grid.status,"width":100} | 73 | + {"field":"PLSTATUS","title":resource.grid.status,"width":100} |
75 | ]], | 74 | ]], |
76 | onSelect:function(index,row){ | 75 | onSelect:function(index,row){ |
77 | if(row.PLTID != 3){// 不是分销商平台的话,删除按钮置灰 | 76 | if(row.PLTID != 3){// 不是分销商平台的话,删除按钮置灰 |
... | @@ -89,7 +88,7 @@ define(function(){ | ... | @@ -89,7 +88,7 @@ define(function(){ |
89 | if(params){ | 88 | if(params){ |
90 | datagrid.datagrid("reload",params); | 89 | datagrid.datagrid("reload",params); |
91 | }else{ | 90 | }else{ |
92 | - datagrid.datagrid("reload",getCondObjectValue(condId)); | 91 | + datagrid.datagrid("reload",base.getCondObjectValue(condId)); |
93 | } | 92 | } |
94 | } | 93 | } |
95 | 94 | ||
... | @@ -106,9 +105,9 @@ define(function(){ | ... | @@ -106,9 +105,9 @@ define(function(){ |
106 | function editEvent(){ | 105 | function editEvent(){ |
107 | var row = datagrid.datagrid('getSelected'); | 106 | var row = datagrid.datagrid('getSelected'); |
108 | if(row == null){ | 107 | if(row == null){ |
109 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 108 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
110 | }else{ | 109 | }else{ |
111 | - showTabUtils({text:resource.platform.detailsTitle,url:"./platform/platformEdit?plId="+row.PLID+"&tId="+row.PLTID}, true, function(){ | 110 | + layout.showPanel({text:resource.detailsTitle,url:"./platform/platformEdit?plId="+row.PLID+"&tId="+row.PLTID}, true, function(){ |
112 | datagrid.datagrid("reload"); | 111 | datagrid.datagrid("reload"); |
113 | }); | 112 | }); |
114 | } | 113 | } |
... | @@ -120,7 +119,7 @@ define(function(){ | ... | @@ -120,7 +119,7 @@ define(function(){ |
120 | function selectEvent(){ | 119 | function selectEvent(){ |
121 | var pltId = $(this).attr("data-options"); | 120 | var pltId = $(this).attr("data-options"); |
122 | ptDialog.dialog("close"); | 121 | ptDialog.dialog("close"); |
123 | - showTabUtils({text:resource.platform.detailsTitle,url:"./platform/platformAdd?tId="+pltId}, true, function(){ | 122 | + layout.showPanel({text:resource.detailsTitle,url:"./platform/platformAdd?tId="+pltId}, true, function(){ |
124 | datagrid.datagrid("reload"); | 123 | datagrid.datagrid("reload"); |
125 | }); | 124 | }); |
126 | } | 125 | } |
... | @@ -131,12 +130,12 @@ define(function(){ | ... | @@ -131,12 +130,12 @@ define(function(){ |
131 | function deleteEvent(){ | 130 | function deleteEvent(){ |
132 | var row = datagrid.datagrid('getSelected'); | 131 | var row = datagrid.datagrid('getSelected'); |
133 | if(row == null){ | 132 | if(row == null){ |
134 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 133 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
135 | }else{ | 134 | }else{ |
136 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 135 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){ |
137 | if(r){ | 136 | if(r){ |
138 | $.post("./platform/detelePlatform.json",{plId:row.PLID},function(result){ | 137 | $.post("./platform/detelePlatform.json",{plId:row.PLID},function(result){ |
139 | - if(responseUtils(result)){ | 138 | + if($.response(result)){ |
140 | datagrid.datagrid("reload"); | 139 | datagrid.datagrid("reload"); |
141 | } | 140 | } |
142 | }); | 141 | }); | ... | ... |
1 | +define({ | ||
2 | + root:{ | ||
3 | + title:'用户平台', | ||
4 | + detailsTitle:'用户平台详情', | ||
5 | + select:'请选择', | ||
6 | + auto:'自动', | ||
7 | + unlimited:'不限', | ||
8 | + title:'', | ||
9 | + numberValid:'请输入数字', | ||
10 | + distributorPlatform:'分销商平台', | ||
11 | + weChatEnterprise:'微信企业号', | ||
12 | + runsaPortal:'RUNSA PORTAL', | ||
13 | + open:'开启', | ||
14 | + insertTip:'请填写已存在的分销商编号和名称', | ||
15 | + grid:{ | ||
16 | + code:'平台编号', | ||
17 | + name:'平台名称', | ||
18 | + typeName:'平台类型', | ||
19 | + permNum:'最大许可用户数', | ||
20 | + enabled :'启用注册', | ||
21 | + status:'开启状态', | ||
22 | + enabledYes:'已注册', | ||
23 | + enabledNo:'未注册', | ||
24 | + statusYes:'是', | ||
25 | + statusNo:'否' | ||
26 | + }, | ||
27 | + span:{ | ||
28 | + code:'平台编号', | ||
29 | + name:'平台名称', | ||
30 | + typeName:'平台类型', | ||
31 | + loginType:'登录门户', | ||
32 | + openStatus:'开启状态', | ||
33 | + logo:'平台LOGO', | ||
34 | + permNum:'许可最大用户数', | ||
35 | + validityPeriod:'有效期', | ||
36 | + remainDay:'剩余有效天数', | ||
37 | + manager:'管理员', | ||
38 | + phone:'手机', | ||
39 | + email:'邮箱', | ||
40 | + emailPush:'邮件推送通道', | ||
41 | + loginAuth:'登录验证短信通道', | ||
42 | + remainSMS:'短信账户余量', | ||
43 | + textMsg:'文本推送短信通道' | ||
44 | + } | ||
45 | + }, | ||
46 | + "en-US": true, | ||
47 | + "en-US-paris": true | ||
48 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +define({ | ||
2 | + root:{ | ||
3 | + tabTxt:{ | ||
4 | + pointadjdetail:'积点调整单', | ||
5 | + pointadj:'积点调整' | ||
6 | + }, | ||
7 | + datagrid:{ | ||
8 | + title:'积点调整', | ||
9 | + ADJ_ID:'调整单编号', | ||
10 | + ACT_NAME:'积点账套', | ||
11 | + BEBNAME:'结算主体', | ||
12 | + DEF_DAYS:'积点有效期', | ||
13 | + EMNAME:'创建人', | ||
14 | + REC_TIME:'创建时间', | ||
15 | + AUTHNAME:'审批人', | ||
16 | + AUTHTIME:'审批时间', | ||
17 | + APRO_STAT:'审批状态' | ||
18 | + }, | ||
19 | + pointAdjDetailDatagrid:{ | ||
20 | + title:'积点调整列表', | ||
21 | + CST_ID:'顾客Id', | ||
22 | + CST_NAME:'顾客昵称', | ||
23 | + PHONE:'手机号', | ||
24 | + POINTS:'调整积点值', | ||
25 | + E_TIME:'有效期截止日期', | ||
26 | + ORDER_ID:'关联单据号', | ||
27 | + REMARK:'备注', | ||
28 | + STATUS:'状态', | ||
29 | + NOADJ:'未调整', | ||
30 | + ADJED:'已调整', | ||
31 | + ADJ_FAIL:'调整失败', | ||
32 | + RESULT_MEMO:'结果备注' | ||
33 | + }, | ||
34 | + msg:{ | ||
35 | + actNameForbidUpdate:'积点账套不能修改', | ||
36 | + savepointadjdetail:'请先保存积点调整单', | ||
37 | + saveSuccess:'保存成功', | ||
38 | + updateSuccess:'修改成功', | ||
39 | + adjValNotZero:'积点值不能为0', | ||
40 | + onlineOrder:'网上订单', | ||
41 | + updateAdj:'编辑的积点' | ||
42 | + }, | ||
43 | + approval:{ | ||
44 | + state0:'创建中', | ||
45 | + state1:'待审批', | ||
46 | + state2:'已核准', | ||
47 | + state3:'已驳回' | ||
48 | + } | ||
49 | + }, | ||
50 | + "en-US": true, | ||
51 | + "en-US-paris": true | ||
52 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 | +define({ | ||
2 | + root:{ | ||
3 | + name:'网点列表', | ||
4 | + preview:"预览", | ||
5 | + print:"打印", | ||
6 | + exports:"导出", | ||
7 | + choosedata:'请选择要操作的数据!', | ||
8 | + grid:{ | ||
9 | + sicode:'编号', | ||
10 | + siname:'名称', | ||
11 | + ptaddr:'地址', | ||
12 | + ptphone:'电话' | ||
13 | + } | ||
14 | + }, | ||
15 | + "en-US": true, | ||
16 | + "en-US-paris": true | ||
17 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -define(function(){ | 1 | +define(['i18n!qrcode/nls/resource', 'cls', 'moment', 'base/index', 'index/index', 'jspdf' ,'qrcode'], function (resource, Class, moment, base, layout,jsPDF){ |
2 | return { | 2 | return { |
3 | init : function(){ | 3 | init : function(){ |
4 | // 页面初始化 | 4 | // 页面初始化 |
5 | - var panel = getSelectedPanel(); | 5 | + var panel = layout.getSelectedPanel(); |
6 | var page = panel.children(".crm-qrcode-detail").show().layout({fit:true}); | 6 | var page = panel.children(".crm-qrcode-detail").show().layout({fit:true}); |
7 | var siteQuery = "45abc2ee-2404-4656-9595-0e9b67e0eddf"; //初始化网点查询 | 7 | var siteQuery = "45abc2ee-2404-4656-9595-0e9b67e0eddf"; //初始化网点查询 |
8 | var siteCondition = "52ece2ce-cfb2-4a76-875e-1c91b5922bf2"; //初始化网点查询条件 | 8 | var siteCondition = "52ece2ce-cfb2-4a76-875e-1c91b5922bf2"; //初始化网点查询条件 |
... | @@ -12,7 +12,7 @@ define(function(){ | ... | @@ -12,7 +12,7 @@ define(function(){ |
12 | // 选择微信公众号 | 12 | // 选择微信公众号 |
13 | function getWxGzh(){ | 13 | function getWxGzh(){ |
14 | panel.find(".gzhNamePic").bind('click',function(){ | 14 | panel.find(".gzhNamePic").bind('click',function(){ |
15 | - showCondObject({id:"ca615ca6-fc66-4fcc-9b5a-4dcf45fc7941", showGrid:true, singleSelect:true}, function(row){ | 15 | + base.showCondObject({id:"ca615ca6-fc66-4fcc-9b5a-4dcf45fc7941", showGrid:true, singleSelect:true}, function(row){ |
16 | panel.find(".gzhId").val(row.GZH_ID); | 16 | panel.find(".gzhId").val(row.GZH_ID); |
17 | panel.find(".gzhName").val(row.NICK_NAME); | 17 | panel.find(".gzhName").val(row.NICK_NAME); |
18 | var paraUrl="./query/"+siteQuery+".json?52ece2ce-cfb2-4a76-875e-1c91b5922bf2="+row.GZH_ID; | 18 | var paraUrl="./query/"+siteQuery+".json?52ece2ce-cfb2-4a76-875e-1c91b5922bf2="+row.GZH_ID; |
... | @@ -22,7 +22,7 @@ define(function(){ | ... | @@ -22,7 +22,7 @@ define(function(){ |
22 | } | 22 | } |
23 | 23 | ||
24 | function datagridReload(){ | 24 | function datagridReload(){ |
25 | - var params=getCondObjectValue(siteQuery); | 25 | + var params=base.getCondObjectValue(siteQuery); |
26 | params[siteCondition]=panel.find(".gzhId").val(); | 26 | params[siteCondition]=panel.find(".gzhId").val(); |
27 | initSiteDatagrid.datagrid("reload",params); | 27 | initSiteDatagrid.datagrid("reload",params); |
28 | } | 28 | } |
... | @@ -31,35 +31,37 @@ define(function(){ | ... | @@ -31,35 +31,37 @@ define(function(){ |
31 | function initSiteDatagrid(){ | 31 | function initSiteDatagrid(){ |
32 | return panel.find(".crm-qrcode-site").datagrid({ | 32 | return panel.find(".crm-qrcode-site").datagrid({ |
33 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 33 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
34 | - authz:getAuthzUtils('qrcode'), | 34 | + authz:base.getAuthz('qrcode'), |
35 | buttons:[{ | 35 | buttons:[{ |
36 | - text:resource.btn.select, | 36 | + text:base.resource.btn.select, |
37 | iconCls:"btn-select select-condition", | 37 | iconCls:"btn-select select-condition", |
38 | handler: function(){ | 38 | handler: function(){ |
39 | - showCondObject(siteQuery,datagridReload); | 39 | + base.showCondObject(siteQuery,datagridReload); |
40 | } | 40 | } |
41 | }], | 41 | }], |
42 | tools:[{ // 导出 | 42 | tools:[{ // 导出 |
43 | code:'edit', | 43 | code:'edit', |
44 | - text:resource.btn.exportPdf, | 44 | + text:base.resource.btn.exportPdf, |
45 | iconCls: 'btn-down', | 45 | iconCls: 'btn-down', |
46 | handler:exportPdf | 46 | handler:exportPdf |
47 | },{ | 47 | },{ |
48 | - text:resource.btn.refresh, | 48 | + text:base.resource.btn.refresh, |
49 | iconCls:'btn-refresh', | 49 | iconCls:'btn-refresh', |
50 | - handler:panelRefreshUtils | 50 | + handler:function () { |
51 | + layout.panelRefresh(); | ||
52 | + } | ||
51 | }] | 53 | }] |
52 | }), | 54 | }), |
53 | - title:resource.qrcode.name, | 55 | + title:resource.name, |
54 | url:"./query/"+siteQuery+".json?52ece2ce-cfb2-4a76-875e-1c91b5922bf2=999", | 56 | url:"./query/"+siteQuery+".json?52ece2ce-cfb2-4a76-875e-1c91b5922bf2=999", |
55 | fitColumns:true, | 57 | fitColumns:true, |
56 | singleSelect:false, | 58 | singleSelect:false, |
57 | columns:[[ | 59 | columns:[[ |
58 | {field:'ck',checkbox:true }, | 60 | {field:'ck',checkbox:true }, |
59 | - {field:'SICODE',title:resource.qrcode.grid.sicode, width:80, align:"center"}, | 61 | + {field:'SICODE',title:resource.grid.sicode, width:80, align:"center"}, |
60 | - {field:'SINAME',title:resource.qrcode.grid.siname, width:120, align:"center"}, | 62 | + {field:'SINAME',title:resource.grid.siname, width:120, align:"center"}, |
61 | - {field:'PTADDR',title:resource.qrcode.grid.ptaddr, width:120, align:"center"}, | 63 | + {field:'PTADDR',title:resource.grid.ptaddr, width:120, align:"center"}, |
62 | - {field:'PTPHONE',title:resource.qrcode.grid.ptphone, width:120, align:"center"}, | 64 | + {field:'PTPHONE',title:resource.grid.ptphone, width:120, align:"center"}, |
63 | ]] | 65 | ]] |
64 | }) | 66 | }) |
65 | } | 67 | } |
... | @@ -67,7 +69,7 @@ define(function(){ | ... | @@ -67,7 +69,7 @@ define(function(){ |
67 | function exportPdf(){ | 69 | function exportPdf(){ |
68 | var rows = initSiteDatagrid.datagrid("getSelections"); | 70 | var rows = initSiteDatagrid.datagrid("getSelections"); |
69 | if(rows.length == 0){ | 71 | if(rows.length == 0){ |
70 | - $.messager.alert(resource.msg_title, resource.qrcode.choosedata); | 72 | + $.messager.alert(base.resource.msg_title, resource.choosedata); |
71 | }else{ | 73 | }else{ |
72 | var doc = new jsPDF(); | 74 | var doc = new jsPDF(); |
73 | var qrcode=""; | 75 | var qrcode=""; |
... | @@ -81,7 +83,7 @@ define(function(){ | ... | @@ -81,7 +83,7 @@ define(function(){ |
81 | gzhId:page.find(".gzhId").val(), | 83 | gzhId:page.find(".gzhId").val(), |
82 | siCodes:siCode | 84 | siCodes:siCode |
83 | }, function(result) { | 85 | }, function(result) { |
84 | - if (responseUtils(result)) { | 86 | + if ($.response(result)) { |
85 | var doc = new jsPDF(); | 87 | var doc = new jsPDF(); |
86 | page.find('.qrcode').empty(); | 88 | page.find('.qrcode').empty(); |
87 | for(var i=0;i<result.list.length;i++){ | 89 | for(var i=0;i<result.list.length;i++){ | ... | ... |
This diff is collapsed. Click to expand it.
1 | +define({ | ||
2 | + root:{ | ||
3 | + submitPhone:"确认挂失?", | ||
4 | + relivePhone:"确认解挂?", | ||
5 | + reportLocale:"挂失手机", | ||
6 | + reportTypeLocale:"挂失类型", | ||
7 | + relieveLocale:"解挂手机", | ||
8 | + phoneGone:"没有找到这个手机号!", | ||
9 | + phoneRep:"这个手机号已经挂失!", | ||
10 | + phoneNotrep:"您输入的号码不是挂失手机号!", | ||
11 | + searchLabel:"查询手机号", | ||
12 | + type:{ | ||
13 | + report:"挂失", | ||
14 | + relive:"解挂" | ||
15 | + }, | ||
16 | + emtype:{ | ||
17 | + em:"雇员", | ||
18 | + cust:"顾客" | ||
19 | + }, | ||
20 | + datagrid:{ | ||
21 | + phone:"手机号", | ||
22 | + typeLocale:"挂失类型", | ||
23 | + type:{ | ||
24 | + phoneLose:"手机丢失", | ||
25 | + weChatLose:"微信号被盗", | ||
26 | + custom:"自定义" | ||
27 | + }, | ||
28 | + opt:"操作", | ||
29 | + optUser:"操作人", | ||
30 | + optTime:"操作时间", | ||
31 | + emName:"姓名/昵称", | ||
32 | + emtype:"类型", | ||
33 | + platform:"操作平台" | ||
34 | + }, | ||
35 | + submitlose:{ | ||
36 | + btnTitle:{ | ||
37 | + submitBtn:'确认挂失', | ||
38 | + reliveBtn:'确认解挂' | ||
39 | + }, | ||
40 | + recordDataGrid:{ | ||
41 | + title:'挂失/解挂记录' | ||
42 | + }, | ||
43 | + report:"挂失成功!", | ||
44 | + emphone:"输入手机号", | ||
45 | + deblocking:"解挂成功!", | ||
46 | + title:'挂失/解挂记录' | ||
47 | + } | ||
48 | + }, | ||
49 | + "en-US": true, | ||
50 | + "en-US-paris": true | ||
51 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -2,7 +2,6 @@ define(['i18n!role/nls/resource', 'cls', 'base/index', 'index/index'], function | ... | @@ -2,7 +2,6 @@ define(['i18n!role/nls/resource', 'cls', 'base/index', 'index/index'], function |
2 | return Class({ | 2 | return Class({ |
3 | resource: resource, | 3 | resource: resource, |
4 | variable: function (a,b) { | 4 | variable: function (a,b) { |
5 | - alert(a); | ||
6 | var panel = index.getSelectedPanel(); | 5 | var panel = index.getSelectedPanel(); |
7 | this.page = panel.children('.pl-role-page').layout({fit: true}); | 6 | this.page = panel.children('.pl-role-page').layout({fit: true}); |
8 | this.north = this.page.layout("panel", "north"); | 7 | this.north = this.page.layout("panel", "north"); | ... | ... |
1 | -define(function(){ | 1 | +define(['cls', 'moment', 'base/index', 'index/index'], function (Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(){ | 3 | init : function(){ |
4 | 4 | ||
5 | - var pannel = getSelectedPanel(); | 5 | + var pannel = layout.getSelectedPanel(); |
6 | var page = pannel.children(".crm-mp-setGzh").show().layout({fit:true}); | 6 | var page = pannel.children(".crm-mp-setGzh").show().layout({fit:true}); |
7 | var datagrid = initDatagrid(); | 7 | var datagrid = initDatagrid(); |
8 | 8 | ||
... | @@ -17,19 +17,28 @@ define(function(){ | ... | @@ -17,19 +17,28 @@ define(function(){ |
17 | }, | 17 | }, |
18 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 18 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
19 | title:"设置公众号", | 19 | title:"设置公众号", |
20 | - authz:getAuthzUtils('setGzh'), | 20 | + authz:base.getAuthz('setGzh'), |
21 | tools:[{ | 21 | tools:[{ |
22 | - text:resource.btn.print, | 22 | + text:base.resource.btn.print, |
23 | iconCls:'btn-print', | 23 | iconCls:'btn-print', |
24 | - handler:panelRefreshUtils | 24 | + // handler:panelRefreshUtils |
25 | + handler:function () { | ||
26 | + layout.panelRefresh(); | ||
27 | + } | ||
25 | },{ | 28 | },{ |
26 | - text:resource.btn.refresh, | 29 | + text:base.resource.btn.refresh, |
27 | iconCls:'btn-refresh', | 30 | iconCls:'btn-refresh', |
28 | - handler:panelRefreshUtils | 31 | + // handler:panelRefreshUtils |
32 | + handler:function () { | ||
33 | + layout.panelRefresh(); | ||
34 | + } | ||
29 | },{ | 35 | },{ |
30 | - text:resource.btn.more, | 36 | + text:base.resource.btn.more, |
31 | iconCls:'btn-more', | 37 | iconCls:'btn-more', |
32 | - handler:panelRefreshUtils | 38 | + // handler:panelRefreshUtils |
39 | + handler:function () { | ||
40 | + layout.panelRefresh(); | ||
41 | + } | ||
33 | }] | 42 | }] |
34 | }), | 43 | }), |
35 | columns:[[ | 44 | columns:[[ |
... | @@ -82,7 +91,7 @@ define(function(){ | ... | @@ -82,7 +91,7 @@ define(function(){ |
82 | function setGzh(){ | 91 | function setGzh(){ |
83 | var row = datagrid.datagrid('getSelected'); | 92 | var row = datagrid.datagrid('getSelected'); |
84 | if(row == null){ | 93 | if(row == null){ |
85 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 94 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
86 | }else{ | 95 | }else{ |
87 | window.open("http://weixintest.runsasoft.com/auth/authorize?crmId="+row.crmId+"&gzhId="+row.GZH_ID); | 96 | window.open("http://weixintest.runsasoft.com/auth/authorize?crmId="+row.crmId+"&gzhId="+row.GZH_ID); |
88 | } | 97 | } | ... | ... |
1 | +define({ | ||
2 | + root: { | ||
3 | + select:'请选择', | ||
4 | + title:{ | ||
5 | + name:'积点账套', | ||
6 | + add:'并且', | ||
7 | + pointrule:'事件积点规则', | ||
8 | + pointstrategy:'积点抵现策略', | ||
9 | + period:'积点有效期', | ||
10 | + success:'设置成功!', | ||
11 | + chooseEvt:'选择--元事件', | ||
12 | + chooseAddevt:'请选择要添加的元事件!', | ||
13 | + evtExist:'该事件已存在,请重新选择!', | ||
14 | + setPoint:'事件积点设置', | ||
15 | + importPoint:'请输入有效的积点有效期!(正整数:1-', | ||
16 | + setEffectPoint:'请设置有效的积点参数(非负数:0-', | ||
17 | + importDays:'请输入有效的天数!(正整数:1-', | ||
18 | + importTimes:'请输入有效的次数!(正整数:1-', | ||
19 | + consumeMoney:'消费金额段', | ||
20 | + consumeCount:'消费折数段', | ||
21 | + lastColumnNotnull:'除最后一行不能存在空消费段!', | ||
22 | + importPositiveNum:'请输入正数!', | ||
23 | + importToobig:'输入值太大![', | ||
24 | + importToosmall:'输入值太小![', | ||
25 | + nolessthan:'不小于', | ||
26 | + nomorethan:'不大于', | ||
27 | + singleConsumeMon:'单笔消费金额段', | ||
28 | + singleConsumeCount:'单笔消费折数段' | ||
29 | + | ||
30 | + }, | ||
31 | + grid:{ | ||
32 | + pntid:'积点账套ID', | ||
33 | + pntsetname:'积点账套名称', | ||
34 | + pntunit:'积点单位', | ||
35 | + pntuv:'积点价值', | ||
36 | + enable:'可用', | ||
37 | + isfans:'粉丝是否适用', | ||
38 | + actname:'所属CRM账套', | ||
39 | + pointrule:'积点规则', | ||
40 | + pointstrategy:'积点抵现策略', | ||
41 | + pointvalidity:'积点有效期', | ||
42 | + evtcode:'事件ID', | ||
43 | + evtname:'事件名称', | ||
44 | + evtdesc:'事件描述' | ||
45 | + } | ||
46 | + }, | ||
47 | + "en-US": true, | ||
48 | + "en-US-paris": true | ||
49 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-1').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-1').find('.tpl-selected-0'); |
7 | var points_0 = selected_0.find('.tpl-points-0'); | 7 | var points_0 = selected_0.find('.tpl-points-0'); |
... | @@ -16,7 +16,7 @@ define(function() { | ... | @@ -16,7 +16,7 @@ define(function() { |
16 | points_1.blur(function() { | 16 | points_1.blur(function() { |
17 | var value = points_1.val(); | 17 | var value = points_1.val(); |
18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
19 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() { | 19 | + $.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() { |
20 | points_1.val(''); | 20 | points_1.val(''); |
21 | points_1.focus(); | 21 | points_1.focus(); |
22 | }); | 22 | }); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-10').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-10').find('.tpl-selected-0'); |
7 | var points_0 = selected_0.find('.tpl-points-0'); | 7 | var points_0 = selected_0.find('.tpl-points-0'); |
... | @@ -16,7 +16,7 @@ define(function() { | ... | @@ -16,7 +16,7 @@ define(function() { |
16 | points_1.blur(function() { | 16 | points_1.blur(function() { |
17 | var value = points_1.val(); | 17 | var value = points_1.val(); |
18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
19 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() { | 19 | + $.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() { |
20 | points_1.val(''); | 20 | points_1.val(''); |
21 | points_1.focus(); | 21 | points_1.focus(); |
22 | }); | 22 | }); |
... | @@ -26,7 +26,7 @@ define(function() { | ... | @@ -26,7 +26,7 @@ define(function() { |
26 | points_2.blur(function() { | 26 | points_2.blur(function() { |
27 | var value = points_2.val(); | 27 | var value = points_2.val(); |
28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
29 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() { | 29 | + $.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() { |
30 | points_2.val(''); | 30 | points_2.val(''); |
31 | points_2.focus(); | 31 | points_2.focus(); |
32 | }); | 32 | }); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-11').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-11').find('.tpl-selected-0'); |
7 | var points_0 = selected_0.find('.tpl-points-0'); | 7 | var points_0 = selected_0.find('.tpl-points-0'); |
... | @@ -16,7 +16,7 @@ define(function() { | ... | @@ -16,7 +16,7 @@ define(function() { |
16 | points_1.blur(function() { | 16 | points_1.blur(function() { |
17 | var value = points_1.val(); | 17 | var value = points_1.val(); |
18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
19 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() { | 19 | + $.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() { |
20 | points_1.val(''); | 20 | points_1.val(''); |
21 | points_1.focus(); | 21 | points_1.focus(); |
22 | }); | 22 | }); |
... | @@ -26,7 +26,7 @@ define(function() { | ... | @@ -26,7 +26,7 @@ define(function() { |
26 | points_2.blur(function() { | 26 | points_2.blur(function() { |
27 | var value = points_2.val(); | 27 | var value = points_2.val(); |
28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
29 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() { | 29 | + $.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() { |
30 | points_2.val(''); | 30 | points_2.val(''); |
31 | points_2.focus(); | 31 | points_2.focus(); |
32 | }); | 32 | }); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-12').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-12').find('.tpl-selected-0'); |
7 | var points_0 = selected_0.find('.tpl-points-0'); | 7 | var points_0 = selected_0.find('.tpl-points-0'); |
... | @@ -16,7 +16,7 @@ define(function() { | ... | @@ -16,7 +16,7 @@ define(function() { |
16 | points_1.blur(function() { | 16 | points_1.blur(function() { |
17 | var value = points_1.val(); | 17 | var value = points_1.val(); |
18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
19 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() { | 19 | + $.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() { |
20 | points_1.val(''); | 20 | points_1.val(''); |
21 | points_1.focus(); | 21 | points_1.focus(); |
22 | }); | 22 | }); |
... | @@ -26,7 +26,7 @@ define(function() { | ... | @@ -26,7 +26,7 @@ define(function() { |
26 | points_2.blur(function() { | 26 | points_2.blur(function() { |
27 | var value = points_2.val(); | 27 | var value = points_2.val(); |
28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
29 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() { | 29 | + $.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() { |
30 | points_2.val(''); | 30 | points_2.val(''); |
31 | points_2.focus(); | 31 | points_2.focus(); |
32 | }); | 32 | }); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-13').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-13').find('.tpl-selected-0'); |
7 | var points_0 = selected_0.find('.tpl-points-0'); | 7 | var points_0 = selected_0.find('.tpl-points-0'); |
... | @@ -16,7 +16,7 @@ define(function() { | ... | @@ -16,7 +16,7 @@ define(function() { |
16 | points_1.blur(function() { | 16 | points_1.blur(function() { |
17 | var value = points_1.val(); | 17 | var value = points_1.val(); |
18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
19 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() { | 19 | + $.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() { |
20 | points_1.val(''); | 20 | points_1.val(''); |
21 | points_1.focus(); | 21 | points_1.focus(); |
22 | }); | 22 | }); |
... | @@ -26,7 +26,7 @@ define(function() { | ... | @@ -26,7 +26,7 @@ define(function() { |
26 | points_2.blur(function() { | 26 | points_2.blur(function() { |
27 | var value = points_2.val(); | 27 | var value = points_2.val(); |
28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
29 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() { | 29 | + $.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() { |
30 | points_2.val(''); | 30 | points_2.val(''); |
31 | points_2.focus(); | 31 | points_2.focus(); |
32 | }); | 32 | }); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | var pannel = getSelectedPanel(); | 4 | var pannel = getSelectedPanel(); |
... | @@ -16,7 +16,7 @@ define(function() { | ... | @@ -16,7 +16,7 @@ define(function() { |
16 | points_1.blur(function() { | 16 | points_1.blur(function() { |
17 | var value = points_1.val(); | 17 | var value = points_1.val(); |
18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
19 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() { | 19 | + $.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() { |
20 | points_1.val(''); | 20 | points_1.val(''); |
21 | points_1.focus(); | 21 | points_1.focus(); |
22 | }); | 22 | }); |
... | @@ -26,7 +26,7 @@ define(function() { | ... | @@ -26,7 +26,7 @@ define(function() { |
26 | points_2.blur(function() { | 26 | points_2.blur(function() { |
27 | var value = points_2.val(); | 27 | var value = points_2.val(); |
28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
29 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() { | 29 | + $.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() { |
30 | points_2.val(''); | 30 | points_2.val(''); |
31 | points_2.focus(); | 31 | points_2.focus(); |
32 | }); | 32 | }); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-2').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-2').find('.tpl-selected-0'); |
7 | var points_0 = selected_0.find('.tpl-points-0'); | 7 | var points_0 = selected_0.find('.tpl-points-0'); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var act_id = pnt_selected.ACTID; | 6 | var act_id = pnt_selected.ACTID; |
7 | var selected_0 = $('.crm-setpoint-template-3').find('.tpl-selected-0'); | 7 | var selected_0 = $('.crm-setpoint-template-3').find('.tpl-selected-0'); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var act_id = pnt_selected.ACTID; | 6 | var act_id = pnt_selected.ACTID; |
7 | var selected_0 = $('.crm-setpoint-template-4').find('.tpl-selected-0'); | 7 | var selected_0 = $('.crm-setpoint-template-4').find('.tpl-selected-0'); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-5').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-5').find('.tpl-selected-0'); |
7 | var table_0 = selected_0.find('.tpl-points-0'); | 7 | var table_0 = selected_0.find('.tpl-points-0'); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var act_id = pnt_selected.ACTID; | 6 | var act_id = pnt_selected.ACTID; |
7 | var selected_0 = $('.crm-setpoint-template-6').find('.tpl-selected-0'); | 7 | var selected_0 = $('.crm-setpoint-template-6').find('.tpl-selected-0'); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | //common | 4 | //common |
5 | - var pannel = getSelectedPanel(); | 5 | + var pannel = layout.getSelectedPanel(); |
6 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 6 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
7 | var act_id = pnt_selected.ACTID;//账套ID | 7 | var act_id = pnt_selected.ACTID;//账套ID |
8 | var raks = setpointutils.getCustomerRank(act_id);//顾客评级 | 8 | var raks = setpointutils.getCustomerRank(act_id);//顾客评级 |
... | @@ -36,7 +36,7 @@ define(function() { | ... | @@ -36,7 +36,7 @@ define(function() { |
36 | if(points_2) setpointutils.setPointsToTpl(JSON.parse(points_2), selected_2,2); | 36 | if(points_2) setpointutils.setPointsToTpl(JSON.parse(points_2), selected_2,2); |
37 | 37 | ||
38 | function segment_editMoney() { | 38 | function segment_editMoney() { |
39 | - title = resource.setpoint.title.consumeMoney; | 39 | + title = resource.title.consumeMoney; |
40 | if(!segment_inited) { | 40 | if(!segment_inited) { |
41 | segment_consumeDialog_f(title); | 41 | segment_consumeDialog_f(title); |
42 | segment_inited = true; | 42 | segment_inited = true; |
... | @@ -53,7 +53,7 @@ define(function() { | ... | @@ -53,7 +53,7 @@ define(function() { |
53 | } | 53 | } |
54 | 54 | ||
55 | function segment_editDiscount() { | 55 | function segment_editDiscount() { |
56 | - title = resource.setpoint.title.consumeCount; | 56 | + title = resource.title.consumeCount; |
57 | if(!segment_inited) { | 57 | if(!segment_inited) { |
58 | segment_consumeDialog_f(title); | 58 | segment_consumeDialog_f(title); |
59 | segment_inited = true; | 59 | segment_inited = true; |
... | @@ -73,10 +73,10 @@ define(function() { | ... | @@ -73,10 +73,10 @@ define(function() { |
73 | function segment_setDw(dw) { | 73 | function segment_setDw(dw) { |
74 | var tr_item = $(segment_consumeDialog.children('.segment-tr')[0]).children(); | 74 | var tr_item = $(segment_consumeDialog.children('.segment-tr')[0]).children(); |
75 | if(dw) { | 75 | if(dw) { |
76 | - $(tr_item[2]).text(dw + resource.setpoint.title.add); | 76 | + $(tr_item[2]).text(dw + resource.title.add); |
77 | $(tr_item[5]).text(dw); | 77 | $(tr_item[5]).text(dw); |
78 | } else { | 78 | } else { |
79 | - $(tr_item[2]).text(resource.setpoint.title.add); | 79 | + $(tr_item[2]).text(resource.title.add); |
80 | $(tr_item[5]).text(''); | 80 | $(tr_item[5]).text(''); |
81 | } | 81 | } |
82 | } | 82 | } |
... | @@ -87,18 +87,18 @@ define(function() { | ... | @@ -87,18 +87,18 @@ define(function() { |
87 | segment_consumeDialog.dialog({ | 87 | segment_consumeDialog.dialog({ |
88 | title:title, | 88 | title:title, |
89 | buttons:[{ | 89 | buttons:[{ |
90 | - text:resource.btn.confirm, | 90 | + text:base.resource.btn.confirm, |
91 | handler:function() { | 91 | handler:function() { |
92 | if(segment_check()) { | 92 | if(segment_check()) { |
93 | segment_confirm(tpl_selected_no); | 93 | segment_confirm(tpl_selected_no); |
94 | segment_consumeDialog.dialog('close'); | 94 | segment_consumeDialog.dialog('close'); |
95 | } else { | 95 | } else { |
96 | - alert(resource.setpoint.title.lastColumnNotnull); | 96 | + alert(resource.title.lastColumnNotnull); |
97 | } | 97 | } |
98 | } | 98 | } |
99 | }, | 99 | }, |
100 | { | 100 | { |
101 | - text:resource.btn.cancel, | 101 | + text:base.resource.btn.cancel, |
102 | handler:function() { | 102 | handler:function() { |
103 | segment_consumeDialog.dialog('close'); | 103 | segment_consumeDialog.dialog('close'); |
104 | } | 104 | } |
... | @@ -109,11 +109,11 @@ define(function() { | ... | @@ -109,11 +109,11 @@ define(function() { |
109 | toolbar:$('<div class="segment-toolbar"></div>').rs_toolbar({ | 109 | toolbar:$('<div class="segment-toolbar"></div>').rs_toolbar({ |
110 | buttons: | 110 | buttons: |
111 | [{ | 111 | [{ |
112 | - text: resource.btn.add, | 112 | + text: base.resource.btn.add, |
113 | iconCls:'btn-add', | 113 | iconCls:'btn-add', |
114 | handler: segment_add_f | 114 | handler: segment_add_f |
115 | },{ | 115 | },{ |
116 | - text: resource.btn.remove, | 116 | + text: base.resource.btn.remove, |
117 | iconCls:'btn-remove', | 117 | iconCls:'btn-remove', |
118 | handler: segment_remove_f | 118 | handler: segment_remove_f |
119 | }] | 119 | }] |
... | @@ -150,7 +150,7 @@ define(function() { | ... | @@ -150,7 +150,7 @@ define(function() { |
150 | var this_value = $(this).val(); | 150 | var this_value = $(this).val(); |
151 | if(this_value == '') return; | 151 | if(this_value == '') return; |
152 | if(!setpointutils.isPositive(this_value)) { | 152 | if(!setpointutils.isPositive(this_value)) { |
153 | - alert(resource.setpoint.title.importPositiveNum); | 153 | + alert(resource.title.importPositiveNum); |
154 | $(this).val(''); | 154 | $(this).val(''); |
155 | return; | 155 | return; |
156 | } | 156 | } |
... | @@ -160,7 +160,7 @@ define(function() { | ... | @@ -160,7 +160,7 @@ define(function() { |
160 | if(next.length == 1) { | 160 | if(next.length == 1) { |
161 | next_value = next.find('.segment-input-ed').val(); | 161 | next_value = next.find('.segment-input-ed').val(); |
162 | if(next_value && Number(next_value) <= Number(this_value)) { | 162 | if(next_value && Number(next_value) <= Number(this_value)) { |
163 | - alert(resource.setpoint.title.importToobig+this_value+resource.setpoint.title.nolessthan+next_value+']'); | 163 | + alert(resource.title.importToobig+this_value+resource.title.nolessthan+next_value+']'); |
164 | $(this).val(''); | 164 | $(this).val(''); |
165 | next_revalue_flag = false; | 165 | next_revalue_flag = false; |
166 | return; | 166 | return; |
... | @@ -169,7 +169,7 @@ define(function() { | ... | @@ -169,7 +169,7 @@ define(function() { |
169 | if(prev.length == 1) { | 169 | if(prev.length == 1) { |
170 | prev_value = prev.find('.segment-input-ed').val(); | 170 | prev_value = prev.find('.segment-input-ed').val(); |
171 | if(prev_value && Number(prev_value) >= Number(this_value)) { | 171 | if(prev_value && Number(prev_value) >= Number(this_value)) { |
172 | - alert(resource.setpoint.title.importToosmall+this_value+resource.setpoint.title.nomorethan+prev_value+']'); | 172 | + alert(resource.title.importToosmall+this_value+resource.title.nomorethan+prev_value+']'); |
173 | $(this).val(''); | 173 | $(this).val(''); |
174 | next_revalue_flag = false; | 174 | next_revalue_flag = false; |
175 | return; | 175 | return; |
... | @@ -267,9 +267,9 @@ define(function() { | ... | @@ -267,9 +267,9 @@ define(function() { |
267 | var title = ''; | 267 | var title = ''; |
268 | var dw = ''; | 268 | var dw = ''; |
269 | if('tpl-selected-1' == selected_no) { | 269 | if('tpl-selected-1' == selected_no) { |
270 | - title = resource.setpoint.title.singleConsumeMon; | 270 | + title = resource.title.singleConsumeMon; |
271 | } else { | 271 | } else { |
272 | - title = resource.setpoint.title.singleConsumeCount; | 272 | + title = resource.title.singleConsumeCount; |
273 | dw = '% '; | 273 | dw = '% '; |
274 | } | 274 | } |
275 | if(typeof(custom) == 'string') { | 275 | if(typeof(custom) == 'string') { | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-8').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-8').find('.tpl-selected-0'); |
7 | var points_0 = selected_0.find('.tpl-points-0'); | 7 | var points_0 = selected_0.find('.tpl-points-0'); |
... | @@ -16,7 +16,7 @@ define(function() { | ... | @@ -16,7 +16,7 @@ define(function() { |
16 | points_1.blur(function() { | 16 | points_1.blur(function() { |
17 | var value = points_1.val(); | 17 | var value = points_1.val(); |
18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
19 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() { | 19 | + $.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() { |
20 | points_1.val(''); | 20 | points_1.val(''); |
21 | points_1.focus(); | 21 | points_1.focus(); |
22 | }); | 22 | }); |
... | @@ -26,7 +26,7 @@ define(function() { | ... | @@ -26,7 +26,7 @@ define(function() { |
26 | points_2.blur(function() { | 26 | points_2.blur(function() { |
27 | var value = points_2.val(); | 27 | var value = points_2.val(); |
28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
29 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() { | 29 | + $.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() { |
30 | points_2.val(''); | 30 | points_2.val(''); |
31 | points_2.focus(); | 31 | points_2.focus(); |
32 | }); | 32 | }); | ... | ... |
1 | -define(function() { | 1 | +define(['i18n!setpoint/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init:function() { | 3 | init:function() { |
4 | - var pannel = getSelectedPanel(); | 4 | + var pannel = layout.getSelectedPanel(); |
5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); | 5 | var pnt_selected = pannel.find(".crm-setpoint-table").datagrid('getSelected'); |
6 | var selected_0 = $('.crm-setpoint-template-9').find('.tpl-selected-0'); | 6 | var selected_0 = $('.crm-setpoint-template-9').find('.tpl-selected-0'); |
7 | var points_0 = selected_0.find('.tpl-points-0'); | 7 | var points_0 = selected_0.find('.tpl-points-0'); |
... | @@ -16,7 +16,7 @@ define(function() { | ... | @@ -16,7 +16,7 @@ define(function() { |
16 | points_1.blur(function() { | 16 | points_1.blur(function() { |
17 | var value = points_1.val(); | 17 | var value = points_1.val(); |
18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 18 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
19 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importDays+setpointutils.points_limit+')', null, function() { | 19 | + $.messager.alert(base.resource.msg_title, resource.title.importDays+setpointutils.points_limit+')', null, function() { |
20 | points_1.val(''); | 20 | points_1.val(''); |
21 | points_1.focus(); | 21 | points_1.focus(); |
22 | }); | 22 | }); |
... | @@ -26,7 +26,7 @@ define(function() { | ... | @@ -26,7 +26,7 @@ define(function() { |
26 | points_2.blur(function() { | 26 | points_2.blur(function() { |
27 | var value = points_2.val(); | 27 | var value = points_2.val(); |
28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { | 28 | if((value && !setpointutils.isPositiveInteger(value)) || Number(value) > setpointutils.points_limit) { |
29 | - $.messager.alert(resource.msg_title, resource.setpoint.title.importTimes+setpointutils.points_limit+')', null, function() { | 29 | + $.messager.alert(base.resource.msg_title, resource.title.importTimes+setpointutils.points_limit+')', null, function() { |
30 | points_2.val(''); | 30 | points_2.val(''); |
31 | points_2.focus(); | 31 | points_2.focus(); |
32 | }); | 32 | }); | ... | ... |
This diff is collapsed. Click to expand it.
1 | -define(function() { | 1 | +define(['i18n!site/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(pltId) { | 3 | init : function(pltId) { |
4 | - var pannel = getSelectedPanel();// 初始化面板 | 4 | + var pannel = layout.getSelectedPanel();// 初始化面板 |
5 | var page = pannel.children(".site-index-page").layout({ | 5 | var page = pannel.children(".site-index-page").layout({ |
6 | fit : true | 6 | fit : true |
7 | });// 定义面板内div | 7 | });// 定义面板内div |
... | @@ -17,15 +17,15 @@ define(function() { | ... | @@ -17,15 +17,15 @@ define(function() { |
17 | toolbar : $('<div class="clearfix"></div>') | 17 | toolbar : $('<div class="clearfix"></div>') |
18 | .rs_toolbar( | 18 | .rs_toolbar( |
19 | { | 19 | { |
20 | - title : resource.site.title, | 20 | + title : resource.title, |
21 | - authz : getAuthzUtils('site'), | 21 | + authz : base.getAuthz('site'), |
22 | buttons : [ | 22 | buttons : [ |
23 | { | 23 | { |
24 | - text : resource.btn.select, | 24 | + text : base.resource.btn.select, |
25 | iconCls : 'btn-select select-condition', | 25 | iconCls : 'btn-select select-condition', |
26 | code : 'view', | 26 | code : 'view', |
27 | handler : function() { | 27 | handler : function() { |
28 | - showCondObject({ | 28 | + base.showCondObject({ |
29 | id:condId, | 29 | id:condId, |
30 | onCascade:{ | 30 | onCascade:{ |
31 | "d2c08972-00d8-4d90-a315-7c20bff323df":{ | 31 | "d2c08972-00d8-4d90-a315-7c20bff323df":{ |
... | @@ -52,27 +52,29 @@ define(function() { | ... | @@ -52,27 +52,29 @@ define(function() { |
52 | } | 52 | } |
53 | }, | 53 | }, |
54 | { | 54 | { |
55 | - text : resource.btn.add, | 55 | + text : base.resource.btn.add, |
56 | iconCls : 'btn-add', | 56 | iconCls : 'btn-add', |
57 | code : 'edit', | 57 | code : 'edit', |
58 | handler : addWindow | 58 | handler : addWindow |
59 | }, | 59 | }, |
60 | { | 60 | { |
61 | - text : resource.btn.edit, | 61 | + text : base.resource.btn.edit, |
62 | iconCls : 'btn-edit', | 62 | iconCls : 'btn-edit', |
63 | code : 'edit', | 63 | code : 'edit', |
64 | handler : editWindow | 64 | handler : editWindow |
65 | }, | 65 | }, |
66 | { | 66 | { |
67 | - text : resource.btn.remove, | 67 | + text : base.resource.btn.remove, |
68 | iconCls : 'btn-remove', | 68 | iconCls : 'btn-remove', |
69 | code : 'edit', | 69 | code : 'edit', |
70 | handler : deleteSite | 70 | handler : deleteSite |
71 | } ], | 71 | } ], |
72 | tools : [ { | 72 | tools : [ { |
73 | - text : resource.btn.refresh, | 73 | + text : base.resource.btn.refresh, |
74 | iconCls : 'btn-refresh', | 74 | iconCls : 'btn-refresh', |
75 | - handler : panelRefreshUtils | 75 | + handler : function () { |
76 | + layout.panelRefresh(); | ||
77 | + } | ||
76 | } ] | 78 | } ] |
77 | }), | 79 | }), |
78 | columns : [ [ | 80 | columns : [ [ |
... | @@ -82,52 +84,52 @@ define(function() { | ... | @@ -82,52 +84,52 @@ define(function() { |
82 | }, | 84 | }, |
83 | { | 85 | { |
84 | field : 'SIID', | 86 | field : 'SIID', |
85 | - title : resource.site.grid.siid, | 87 | + title : resource.grid.siid, |
86 | hidden : true | 88 | hidden : true |
87 | }, | 89 | }, |
88 | { | 90 | { |
89 | field : 'SICODE', | 91 | field : 'SICODE', |
90 | - title : resource.site.grid.siCode, | 92 | + title : resource.grid.siCode, |
91 | width : 100 | 93 | width : 100 |
92 | }, | 94 | }, |
93 | { | 95 | { |
94 | field : 'SINAME', | 96 | field : 'SINAME', |
95 | - title : resource.site.grid.siName, | 97 | + title : resource.grid.siName, |
96 | width : 200 | 98 | width : 200 |
97 | }, | 99 | }, |
98 | { | 100 | { |
99 | field : 'VAINAME', | 101 | field : 'VAINAME', |
100 | - title : resource.site.grid.vaiName, | 102 | + title : resource.grid.vaiName, |
101 | width : 100 | 103 | width : 100 |
102 | }, | 104 | }, |
103 | { | 105 | { |
104 | field : 'BENAME', | 106 | field : 'BENAME', |
105 | - title : resource.site.grid.beName, | 107 | + title : resource.grid.beName, |
106 | width : 150 | 108 | width : 150 |
107 | }, | 109 | }, |
108 | { | 110 | { |
109 | field : 'BEBNAME', | 111 | field : 'BEBNAME', |
110 | - title : resource.site.grid.bebName, | 112 | + title : resource.grid.bebName, |
111 | width : 150 | 113 | width : 150 |
112 | }, | 114 | }, |
113 | { | 115 | { |
114 | field : 'BRNAME', | 116 | field : 'BRNAME', |
115 | - title : resource.site.grid.brName, | 117 | + title : resource.grid.brName, |
116 | width : 500 | 118 | width : 500 |
117 | }, | 119 | }, |
118 | { | 120 | { |
119 | field : 'CHNAME', | 121 | field : 'CHNAME', |
120 | - title : resource.site.grid.chName, | 122 | + title : resource.grid.chName, |
121 | width : 150 | 123 | width : 150 |
122 | }, | 124 | }, |
123 | { | 125 | { |
124 | field : 'PTVALID', | 126 | field : 'PTVALID', |
125 | - title : resource.site.grid.ptValid, | 127 | + title : resource.grid.ptValid, |
126 | width : 100, | 128 | width : 100, |
127 | formatter : function(value, | 129 | formatter : function(value, |
128 | row, index) { | 130 | row, index) { |
129 | - return value == 0 ? resource.site.grid.ptValidNo | 131 | + return value == 0 ? resource.grid.ptValidNo |
130 | - : resource.site.grid.ptValidYes; | 132 | + : resource.grid.ptValidYes; |
131 | } | 133 | } |
132 | } ] ], | 134 | } ] ], |
133 | onLoadSuccess:function(data){ | 135 | onLoadSuccess:function(data){ |
... | @@ -146,13 +148,13 @@ define(function() { | ... | @@ -146,13 +148,13 @@ define(function() { |
146 | if (params) { | 148 | if (params) { |
147 | grid.datagrid("reload", params); | 149 | grid.datagrid("reload", params); |
148 | } else { | 150 | } else { |
149 | - grid.datagrid("reload", getCondObjectValue(condId)); | 151 | + grid.datagrid("reload", base.getCondObjectValue(condId)); |
150 | } | 152 | } |
151 | } | 153 | } |
152 | 154 | ||
153 | // 添加到网点详情页面 | 155 | // 添加到网点详情页面 |
154 | function addWindow() { | 156 | function addWindow() { |
155 | - showTabUtils({ | 157 | + layout.showPanel({ |
156 | text : "网点详情", | 158 | text : "网点详情", |
157 | url : "./siteDetail/detailAdd" | 159 | url : "./siteDetail/detailAdd" |
158 | }, true, function() { | 160 | }, true, function() { |
... | @@ -164,9 +166,9 @@ define(function() { | ... | @@ -164,9 +166,9 @@ define(function() { |
164 | function editWindow() { | 166 | function editWindow() { |
165 | var row = grid.datagrid('getSelected'); | 167 | var row = grid.datagrid('getSelected'); |
166 | if (row == null) { | 168 | if (row == null) { |
167 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 169 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
168 | } else { | 170 | } else { |
169 | - showTabUtils({ | 171 | + layout.showPanel({ |
170 | text : "网点详情", | 172 | text : "网点详情", |
171 | url : "./siteDetail/detailEdit?siid=" + row.SIID | 173 | url : "./siteDetail/detailEdit?siid=" + row.SIID |
172 | }, true, function() { | 174 | }, true, function() { |
... | @@ -179,15 +181,15 @@ define(function() { | ... | @@ -179,15 +181,15 @@ define(function() { |
179 | function deleteSite() { | 181 | function deleteSite() { |
180 | var row = grid.datagrid('getSelected'); | 182 | var row = grid.datagrid('getSelected'); |
181 | if (row == null) { | 183 | if (row == null) { |
182 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 184 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
183 | } else { | 185 | } else { |
184 | - $.messager.confirm(resource.msg_title, | 186 | + $.messager.confirm(base.resource.msg_title, |
185 | - resource.confirmDelete, function(r) { | 187 | + base.resource.confirmDelete, function(r) { |
186 | if (r) { | 188 | if (r) { |
187 | $.post("./siteDetail/deleteSite.json", { | 189 | $.post("./siteDetail/deleteSite.json", { |
188 | siid : row.SIID | 190 | siid : row.SIID |
189 | }, function(result) { | 191 | }, function(result) { |
190 | - if (responseUtils(result)) { | 192 | + if ($.response(result)) { |
191 | grid.datagrid("reload"); | 193 | grid.datagrid("reload"); |
192 | } | 194 | } |
193 | }); | 195 | }); | ... | ... |
1 | +define({ | ||
2 | + root: { | ||
3 | + title:'网点', | ||
4 | + grid:{ | ||
5 | + siid:'网点ID', | ||
6 | + siCode:'网点编号', | ||
7 | + siName:'网点名称', | ||
8 | + vaiName:'组织类型', | ||
9 | + beName:'经营主体', | ||
10 | + bebName:'结算主体', | ||
11 | + brName:'经营品牌', | ||
12 | + chName:'经营渠道', | ||
13 | + ptValid:'可用', | ||
14 | + ptValidYes:'是', | ||
15 | + ptValidNo:'否' | ||
16 | + }, | ||
17 | + paytitle:'收款方式', | ||
18 | + paygrid:{ | ||
19 | + sipId:'店铺付款方式Id', | ||
20 | + pwName:'收款方式', | ||
21 | + bepId:'收款方式ID', | ||
22 | + bepName:'收款方式', | ||
23 | + cuName:'币种单位', | ||
24 | + cuRate:'汇率', | ||
25 | + bepProceeds:'收款渠道/银行', | ||
26 | + bepPayee:'帐款人', | ||
27 | + bepAccount:'收款账号', | ||
28 | + bepPoint:'消费积分', | ||
29 | + ptValid:'可用' | ||
30 | + }, | ||
31 | + orgTypeDialogTitle:'选择新建的组织类型', | ||
32 | + check:{ | ||
33 | + channelRepeat:'您选择的经营渠道已经存在,请重新选择!', | ||
34 | + brandRepeat:'您选择的经营品牌与其它渠道上的经营品牌有冲突,请重新选择!', | ||
35 | + paywayRepeat:'您选择的收款方式与已选择的有冲突,请重新选择!', | ||
36 | + exitSiCode:'网点编号重复,请重新输入!', | ||
37 | + siCodeValid:'只能输入数字、字母和和其它字符!', | ||
38 | + empRepeat:'您选择的雇员与已选择的有冲突,请重新选择!' | ||
39 | + }, | ||
40 | + guidertitle:'导购', | ||
41 | + guiderAddBtn:'新增', | ||
42 | + orgtypeValid:'请先选择销售类型!', | ||
43 | + guiderid:{ | ||
44 | + gid:'导购ID', | ||
45 | + emname:'导购名称', | ||
46 | + state:'状态', | ||
47 | + role:'角色', | ||
48 | + stateNo:'禁用', | ||
49 | + stateYes:'可用', | ||
50 | + roleOwner:'店长', | ||
51 | + roleClerk:'店员', | ||
52 | + roleElse:'其它' | ||
53 | + } | ||
54 | + }, | ||
55 | + "en-US": true, | ||
56 | + "en-US-paris": true | ||
57 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -define(function(){ | 1 | +define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(tagKey,flag,actId){ | 3 | init : function(tagKey,flag,actId){ |
4 | - var panel = getSelectedPanel(); | 4 | + var panel = layout.getSelectedPanel(); |
5 | var page = panel.children(".crm-tag-conditional").show().layout({fit:true}); | 5 | var page = panel.children(".crm-tag-conditional").show().layout({fit:true}); |
6 | var button = initButton();// 初始化按钮 | 6 | var button = initButton();// 初始化按钮 |
7 | var tagForm = page.find(".custLevelDetail").find(".custLevelAddForm"); | 7 | var tagForm = page.find(".custLevelDetail").find(".custLevelAddForm"); |
... | @@ -58,14 +58,16 @@ define(function(){ | ... | @@ -58,14 +58,16 @@ define(function(){ |
58 | var button = panel.find(".button"); | 58 | var button = panel.find(".button"); |
59 | button.rs_toolbar({ | 59 | button.rs_toolbar({ |
60 | buttons:[{ | 60 | buttons:[{ |
61 | - text:resource.btn.submit, | 61 | + text:base.resource.btn.submit, |
62 | iconCls:'btn-submit submit-condition', | 62 | iconCls:'btn-submit submit-condition', |
63 | handler:submitBtn | 63 | handler:submitBtn |
64 | }], | 64 | }], |
65 | tools:[{ | 65 | tools:[{ |
66 | - text:resource.btn.refresh, | 66 | + text:base.resource.btn.refresh, |
67 | iconCls:'btn-refresh', | 67 | iconCls:'btn-refresh', |
68 | - handler:panelRefreshUtils | 68 | + handler:function(){ |
69 | + layout.panelRefresh(); | ||
70 | + } | ||
69 | }], | 71 | }], |
70 | content:button.children('div.custLevelDetail') | 72 | content:button.children('div.custLevelDetail') |
71 | }); | 73 | }); |
... | @@ -78,7 +80,7 @@ define(function(){ | ... | @@ -78,7 +80,7 @@ define(function(){ |
78 | tagVal:tagForm.find(".tagVal").val() | 80 | tagVal:tagForm.find(".tagVal").val() |
79 | }, function(result){ | 81 | }, function(result){ |
80 | if(result.total!="0"){ | 82 | if(result.total!="0"){ |
81 | - $.messager.alert(resource.msg_title, resource.tag.exist); | 83 | + $.messager.alert(base.resource.msg_title, resource.exist); |
82 | return false; | 84 | return false; |
83 | } | 85 | } |
84 | }) | 86 | }) |
... | @@ -101,7 +103,7 @@ define(function(){ | ... | @@ -101,7 +103,7 @@ define(function(){ |
101 | if(result.total=="0"){ | 103 | if(result.total=="0"){ |
102 | if(flag==0){ | 104 | if(flag==0){ |
103 | $.JSON("./tag/createTagVal.json",param, function(result){ | 105 | $.JSON("./tag/createTagVal.json",param, function(result){ |
104 | - if(responseUtils(result)){ | 106 | + if($.response(result)){ |
105 | tagForm.find(".valId").val(result.value.valId); | 107 | tagForm.find(".valId").val(result.value.valId); |
106 | returnJson(); | 108 | returnJson(); |
107 | $.JSON("./tag/addConditonalTag.json",{ | 109 | $.JSON("./tag/addConditonalTag.json",{ |
... | @@ -111,9 +113,9 @@ define(function(){ | ... | @@ -111,9 +113,9 @@ define(function(){ |
111 | tagVal:tagForm.find(".tagVal").val(), | 113 | tagVal:tagForm.find(".tagVal").val(), |
112 | valDesc:tagForm.find(".valDesc").val() | 114 | valDesc:tagForm.find(".valDesc").val() |
113 | }, function(result){ | 115 | }, function(result){ |
114 | - if(responseUtils(result)){ | 116 | + if($.response(result)){ |
115 | - closeSelectedPanel(); | 117 | + layout.closeSelectedPanel(); |
116 | - panelRefreshUtils(); | 118 | + layout.panelRefresh(); |
117 | } | 119 | } |
118 | }) | 120 | }) |
119 | } | 121 | } |
... | @@ -127,14 +129,14 @@ define(function(){ | ... | @@ -127,14 +129,14 @@ define(function(){ |
127 | tagVal:tagForm.find(".tagVal").val(), | 129 | tagVal:tagForm.find(".tagVal").val(), |
128 | valDesc:tagForm.find(".valDesc").val() | 130 | valDesc:tagForm.find(".valDesc").val() |
129 | }, function(result){ | 131 | }, function(result){ |
130 | - if(responseUtils(result)){ | 132 | + if($.response(result)){ |
131 | - closeSelectedPanel(); | 133 | + layout.closeSelectedPanel(); |
132 | - panelRefreshUtils(); | 134 | + layout.panelRefresh(); |
133 | } | 135 | } |
134 | }); | 136 | }); |
135 | } | 137 | } |
136 | }else{ | 138 | }else{ |
137 | - $.messager.alert(resource.msg_title, resource.tag.exist); | 139 | + $.messager.alert(base.resource.msg_title, resource.exist); |
138 | return false; | 140 | return false; |
139 | } | 141 | } |
140 | }) | 142 | }) |
... | @@ -262,7 +264,7 @@ define(function(){ | ... | @@ -262,7 +264,7 @@ define(function(){ |
262 | data:{scope:"TAG_CONSUME"}, | 264 | data:{scope:"TAG_CONSUME"}, |
263 | async:false,//同步 | 265 | async:false,//同步 |
264 | success:function(result) { | 266 | success:function(result) { |
265 | - if(responseUtils(result)){ | 267 | + if($.response(result)){ |
266 | for(var i=0;i<result.list.length;i++){ | 268 | for(var i=0;i<result.list.length;i++){ |
267 | page.find(".condit").append("<option value='"+result.list[i].fldSql+"'>"+result.list[i].fldName+"</option>") | 269 | page.find(".condit").append("<option value='"+result.list[i].fldSql+"'>"+result.list[i].fldName+"</option>") |
268 | } | 270 | } |
... | @@ -276,7 +278,7 @@ define(function(){ | ... | @@ -276,7 +278,7 @@ define(function(){ |
276 | data:{scope:"TAG_PROPERTY"}, | 278 | data:{scope:"TAG_PROPERTY"}, |
277 | async:false,//同步 | 279 | async:false,//同步 |
278 | success:function(result) { | 280 | success:function(result) { |
279 | - if(responseUtils(result)){ | 281 | + if($.response(result)){ |
280 | for(var i=0;i<result.list.length;i++){ | 282 | for(var i=0;i<result.list.length;i++){ |
281 | page.find(".startChoice").append("<option value='"+result.list[i].fldSql+"'>"+result.list[i].fldName+"</option>") | 283 | page.find(".startChoice").append("<option value='"+result.list[i].fldSql+"'>"+result.list[i].fldName+"</option>") |
282 | } | 284 | } |
... | @@ -299,7 +301,7 @@ define(function(){ | ... | @@ -299,7 +301,7 @@ define(function(){ |
299 | 301 | ||
300 | function selectSite(obj){ | 302 | function selectSite(obj){ |
301 | //根据CRM账套选择网点 | 303 | //根据CRM账套选择网点 |
302 | - showCondObject({id:'e0e0f773-34a1-450c-8868-60433a245eb8',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){ | 304 | + base.showCondObject({id:'e0e0f773-34a1-450c-8868-60433a245eb8',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){ |
303 | return params; | 305 | return params; |
304 | // if(actId!=""){ | 306 | // if(actId!=""){ |
305 | // return params["c75b9a41-0c4f-463d-a028-45d8cffe6ff9"]=actId; //CRM账套 | 307 | // return params["c75b9a41-0c4f-463d-a028-45d8cffe6ff9"]=actId; //CRM账套 |
... | @@ -326,7 +328,7 @@ define(function(){ | ... | @@ -326,7 +328,7 @@ define(function(){ |
326 | siteId:siId, | 328 | siteId:siId, |
327 | type:0 | 329 | type:0 |
328 | },function(result){ | 330 | },function(result){ |
329 | - if(responseUtils(result)){ | 331 | + if($.response(result)){ |
330 | $(obj).prev().val(result.value.rngId); | 332 | $(obj).prev().val(result.value.rngId); |
331 | $(obj).prev().prev().val(showNames); | 333 | $(obj).prev().prev().val(showNames); |
332 | } | 334 | } |
... | @@ -344,7 +346,7 @@ define(function(){ | ... | @@ -344,7 +346,7 @@ define(function(){ |
344 | //根据CRM账套选择品牌 | 346 | //根据CRM账套选择品牌 |
345 | //22726b54-5748-4926-82ed-abe076caecfa | 347 | //22726b54-5748-4926-82ed-abe076caecfa |
346 | //dff2379d-5995-40d2-8d28-6c835ecdd955 | 348 | //dff2379d-5995-40d2-8d28-6c835ecdd955 |
347 | - showCondObject({id:'22726b54-5748-4926-82ed-abe076caecfa',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){ | 349 | + base.showCondObject({id:'22726b54-5748-4926-82ed-abe076caecfa',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){ |
348 | // if(actId!=""){ | 350 | // if(actId!=""){ |
349 | // return params["c3d225ae-f99b-40ce-b09d-0e6014c2934b"]=actId; //当前账套ID | 351 | // return params["c3d225ae-f99b-40ce-b09d-0e6014c2934b"]=actId; //当前账套ID |
350 | // }else{ | 352 | // }else{ |
... | @@ -369,7 +371,7 @@ define(function(){ | ... | @@ -369,7 +371,7 @@ define(function(){ |
369 | brandId:brId, | 371 | brandId:brId, |
370 | type:1 | 372 | type:1 |
371 | },function(result){ | 373 | },function(result){ |
372 | - if(responseUtils(result)){ | 374 | + if($.response(result)){ |
373 | $(obj).prev().val(result.value.rngId); | 375 | $(obj).prev().val(result.value.rngId); |
374 | $(obj).prev().prev().val(showNames); | 376 | $(obj).prev().prev().val(showNames); |
375 | } | 377 | } | ... | ... |
1 | -define(function(){ | 1 | +define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(tagKey,tagName){ | 3 | init : function(tagKey,tagName){ |
4 | var query = "564fc1d7-d790-4aea-9fc6-1cf23c94c9ee"; | 4 | var query = "564fc1d7-d790-4aea-9fc6-1cf23c94c9ee"; |
5 | var condition = "02140c5b-5aa6-4c83-b16a-0a15335a4542"; | 5 | var condition = "02140c5b-5aa6-4c83-b16a-0a15335a4542"; |
6 | - var panel = getSelectedPanel(); | 6 | + var panel = layout.getSelectedPanel(); |
7 | var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true}); | 7 | var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true}); |
8 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); | 8 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); |
9 | 9 | ||
... | @@ -17,7 +17,7 @@ define(function(){ | ... | @@ -17,7 +17,7 @@ define(function(){ |
17 | var datagrid=initdatagrid(); //初始化调整datagrid | 17 | var datagrid=initdatagrid(); //初始化调整datagrid |
18 | 18 | ||
19 | function datagridReload(param){ | 19 | function datagridReload(param){ |
20 | - var param =getCondObjectValue(query); | 20 | + var param =base.getCondObjectValue(query); |
21 | param[condition]=tagKey; | 21 | param[condition]=tagKey; |
22 | datagrid.datagrid("reload",param); | 22 | datagrid.datagrid("reload",param); |
23 | } | 23 | } |
... | @@ -33,43 +33,45 @@ define(function(){ | ... | @@ -33,43 +33,45 @@ define(function(){ |
33 | }, | 33 | }, |
34 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 34 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
35 | title:tagName, | 35 | title:tagName, |
36 | - authz:getAuthzUtils('tag'), | 36 | + authz:base.getAuthz('tag'), |
37 | content:page.find(".btn_opt"), | 37 | content:page.find(".btn_opt"), |
38 | buttons:[{ | 38 | buttons:[{ |
39 | - text:resource.btn.select, | 39 | + text:base.resource.btn.select, |
40 | iconCls:"btn-select select-condition", | 40 | iconCls:"btn-select select-condition", |
41 | handler: function(){ | 41 | handler: function(){ |
42 | - showCondObject(query,datagridReload); | 42 | + base.showCondObject(query,datagridReload); |
43 | } | 43 | } |
44 | },{ | 44 | },{ |
45 | - text:resource.btn.add, | 45 | + text:base.resource.btn.add, |
46 | iconCls:'btn-add', | 46 | iconCls:'btn-add', |
47 | handler: addTagVal | 47 | handler: addTagVal |
48 | },{ | 48 | },{ |
49 | - text:resource.btn.edit, | 49 | + text:base.resource.btn.edit, |
50 | iconCls:'btn-edit', | 50 | iconCls:'btn-edit', |
51 | handler:editTagVal | 51 | handler:editTagVal |
52 | },{ | 52 | },{ |
53 | - text:resource.btn.remove, | 53 | + text:base.resource.btn.remove, |
54 | iconCls:'btn-remove', | 54 | iconCls:'btn-remove', |
55 | handler: removeTagVal | 55 | handler: removeTagVal |
56 | }], | 56 | }], |
57 | tools:[{ | 57 | tools:[{ |
58 | - text:resource.btn.refresh, | 58 | + text:base.resource.btn.refresh, |
59 | iconCls:'btn-refresh', | 59 | iconCls:'btn-refresh', |
60 | - handler:panelRefreshUtils | 60 | + handler:function () { |
61 | + layout.panelRefresh(); | ||
62 | + } | ||
61 | }] | 63 | }] |
62 | }), | 64 | }), |
63 | url:"./query/"+query+".json?"+condition+"="+tagKey, | 65 | url:"./query/"+query+".json?"+condition+"="+tagKey, |
64 | fitColumns:true, | 66 | fitColumns:true, |
65 | columns:[[ | 67 | columns:[[ |
66 | {field:'ck',checkbox:true}, | 68 | {field:'ck',checkbox:true}, |
67 | - {field:'VAL_ID',title:resource.tag.tagval.datagrid_col_val_id_title,width:80,align:'center'}, | 69 | + {field:'VAL_ID',title:resource.tagval.datagrid_col_val_id_title,width:80,align:'center'}, |
68 | - {field:'TAG_KEY',title:resource.tag.tagval.datagrid_col_tag_key_title,hidden:true}, | 70 | + {field:'TAG_KEY',title:resource.tagval.datagrid_col_tag_key_title,hidden:true}, |
69 | - {field:'TAG_VAL',title:resource.tag.tagval.datagrid_col_tag_val_title,width:150,align:'center'}, | 71 | + {field:'TAG_VAL',title:resource.tagval.datagrid_col_tag_val_title,width:150,align:'center'}, |
70 | - {field:'VAL_DESC',title:resource.tag.tagval.datagrid_col_val_desc_title,width:100,align:'center'}, | 72 | + {field:'VAL_DESC',title:resource.tagval.datagrid_col_val_desc_title,width:100,align:'center'}, |
71 | - {field:'ACT_NAME',title:resource.tag.tagkey.datagrid_col_act_name_title,width:150,align:'center'}, | 73 | + {field:'ACT_NAME',title:resource.tagkey.datagrid_col_act_name_title,width:150,align:'center'}, |
72 | - {field:'ENABLE',title:resource.tag.tagkey.datagrid_col_enable_title,width:60,align:'center', | 74 | + {field:'ENABLE',title:resource.tagkey.datagrid_col_enable_title,width:60,align:'center', |
73 | formatter : function(value,row,index){ | 75 | formatter : function(value,row,index){ |
74 | return value ==true ? '是':'否'; | 76 | return value ==true ? '是':'否'; |
75 | } | 77 | } |
... | @@ -80,12 +82,12 @@ define(function(){ | ... | @@ -80,12 +82,12 @@ define(function(){ |
80 | 82 | ||
81 | function openTag(){ | 83 | function openTag(){ |
82 | url = "./tag/customerTagInit?tagKey="+$(this).attr("data-option2")+"&valId="+$(this).attr("data-option1"); | 84 | url = "./tag/customerTagInit?tagKey="+$(this).attr("data-option2")+"&valId="+$(this).attr("data-option1"); |
83 | - showTabUtils({text:"打标签",url:url}, true, function(){}); | 85 | + layout.showPanel({text:"打标签",url:url}, true, function(){}); |
84 | } | 86 | } |
85 | 87 | ||
86 | function addTagVal(){ // 弹出dialog | 88 | function addTagVal(){ // 弹出dialog |
87 | url = "./tag/conditionalTag?flag=0&tagKey="+tagKey+"&valId=0"; | 89 | url = "./tag/conditionalTag?flag=0&tagKey="+tagKey+"&valId=0"; |
88 | - showTabUtils({text:"设置条件标签值",url:url}, true, function(){}); | 90 | + layout.showPanel({text:"设置条件标签值",url:url}, true, function(){}); |
89 | } | 91 | } |
90 | 92 | ||
91 | //关闭窗口 | 93 | //关闭窗口 |
... | @@ -106,19 +108,19 @@ define(function(){ | ... | @@ -106,19 +108,19 @@ define(function(){ |
106 | function editTagVal(){ // 编辑 | 108 | function editTagVal(){ // 编辑 |
107 | var row = selectRow(); | 109 | var row = selectRow(); |
108 | if(row==null){ | 110 | if(row==null){ |
109 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 111 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
110 | }else{ | 112 | }else{ |
111 | url = "./tag/conditionalTag?flag=1&tagKey="+row.tagKey+"&valId="+row.valId; | 113 | url = "./tag/conditionalTag?flag=1&tagKey="+row.tagKey+"&valId="+row.valId; |
112 | - showTabUtils({text:"设置条件标签值",url:url}, true, function(){}); | 114 | + layout.showPanel({text:"设置条件标签值",url:url}, true, function(){}); |
113 | } | 115 | } |
114 | } | 116 | } |
115 | 117 | ||
116 | function removeTagVal(){ // 删除 | 118 | function removeTagVal(){ // 删除 |
117 | var row = selectRow(); | 119 | var row = selectRow(); |
118 | if(row==null){ | 120 | if(row==null){ |
119 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 121 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
120 | }else{ | 122 | }else{ |
121 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 123 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){ |
122 | if(r){ | 124 | if(r){ |
123 | //判断是否有用户打过标签 | 125 | //判断是否有用户打过标签 |
124 | $.ajax({ | 126 | $.ajax({ |
... | @@ -127,15 +129,15 @@ define(function(){ | ... | @@ -127,15 +129,15 @@ define(function(){ |
127 | data:{tagKey:row.tagKey,tagVal:row.valId}, | 129 | data:{tagKey:row.tagKey,tagVal:row.valId}, |
128 | async:false,//同步 | 130 | async:false,//同步 |
129 | success:function(result) { | 131 | success:function(result) { |
130 | - if(responseUtils(result)){ | 132 | + if($.response(result)){ |
131 | if(result.total==0){ | 133 | if(result.total==0){ |
132 | $.post("./tag/deleteTagVal.json",row,function(result){ | 134 | $.post("./tag/deleteTagVal.json",row,function(result){ |
133 | - if(responseUtils(result)){ | 135 | + if($.response(result)){ |
134 | datagrid.datagrid("reload"); | 136 | datagrid.datagrid("reload"); |
135 | } | 137 | } |
136 | }); | 138 | }); |
137 | }else{ | 139 | }else{ |
138 | - $.messager.alert(resource.msg_title, resource.tag.repeat); | 140 | + $.messager.alert(base.resource.msg_title, resource.repeat); |
139 | } | 141 | } |
140 | } | 142 | } |
141 | } | 143 | } | ... | ... |
1 | -define(["uploadify"],function(){ | 1 | +define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index','uploadify'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(tagKey,tagVal,valId,singleFlag,isEnable,sessionId,rootUrl){ | 3 | init : function(tagKey,tagVal,valId,singleFlag,isEnable,sessionId,rootUrl){ |
4 | var query = "2879197f-c95c-4d64-a4a9-5244910b0fc8"; | 4 | var query = "2879197f-c95c-4d64-a4a9-5244910b0fc8"; |
5 | var condition1 = "0a5372b9-dbfb-4958-83ae-7547085ab677"; | 5 | var condition1 = "0a5372b9-dbfb-4958-83ae-7547085ab677"; |
6 | var condition2 = "aef17dde-2a16-48d8-946f-1dd8bd5b5842"; | 6 | var condition2 = "aef17dde-2a16-48d8-946f-1dd8bd5b5842"; |
7 | - var panel = getSelectedPanel(); | 7 | + var panel = layout.getSelectedPanel(); |
8 | var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true}); | 8 | var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true}); |
9 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); | 9 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); |
10 | var datagrid=initdatagrid(); //初始化调整datagrid | 10 | var datagrid=initdatagrid(); //初始化调整datagrid |
... | @@ -29,35 +29,37 @@ define(["uploadify"],function(){ | ... | @@ -29,35 +29,37 @@ define(["uploadify"],function(){ |
29 | return panel.find(".crm-staticTagVal-table").datagrid({ | 29 | return panel.find(".crm-staticTagVal-table").datagrid({ |
30 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 30 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
31 | title:"标签值顾客列表", | 31 | title:"标签值顾客列表", |
32 | - authz:getAuthzUtils('tag'), | 32 | + authz:base.getAuthz('tag'), |
33 | content:page.find(".btn_opt"), | 33 | content:page.find(".btn_opt"), |
34 | buttons:[{ | 34 | buttons:[{ |
35 | - text:resource.btn.select, | 35 | + text:base.resource.btn.select, |
36 | iconCls:"btn-select select-condition", | 36 | iconCls:"btn-select select-condition", |
37 | handler: function(){ | 37 | handler: function(){ |
38 | showCondObject(query,datagridReload); | 38 | showCondObject(query,datagridReload); |
39 | } | 39 | } |
40 | },{ | 40 | },{ |
41 | - text:resource.btn.selCustomer, | 41 | + text:base.resource.btn.selCustomer, |
42 | iconCls:'btn-add', | 42 | iconCls:'btn-add', |
43 | handler: selectCustomer | 43 | handler: selectCustomer |
44 | },{ | 44 | },{ |
45 | - text:resource.btn.remove, | 45 | + text:base.resource.btn.remove, |
46 | iconCls:'btn-remove', | 46 | iconCls:'btn-remove', |
47 | handler: removeTagVal | 47 | handler: removeTagVal |
48 | }], | 48 | }], |
49 | tools:[{ | 49 | tools:[{ |
50 | - text:resource.btn.refresh, | 50 | + text:base.resource.btn.refresh, |
51 | iconCls:'btn-refresh', | 51 | iconCls:'btn-refresh', |
52 | - handler:panelRefreshUtils | 52 | + handler:function(){ |
53 | + layout.panelRefresh(); | ||
54 | + } | ||
53 | }, | 55 | }, |
54 | { | 56 | { |
55 | - text:resource.btn.downloadExcel, | 57 | + text:base.resource.btn.downloadExcel, |
56 | iconCls:'btn-down', | 58 | iconCls:'btn-down', |
57 | handler:downloadExcel | 59 | handler:downloadExcel |
58 | }, | 60 | }, |
59 | { | 61 | { |
60 | - text:resource.btn.addByFile, | 62 | + text:base.resource.btn.addByFile, |
61 | id:'btn-tag-import', | 63 | id:'btn-tag-import', |
62 | iconCls:'btn-down' | 64 | iconCls:'btn-down' |
63 | }] | 65 | }] |
... | @@ -84,7 +86,7 @@ define(["uploadify"],function(){ | ... | @@ -84,7 +86,7 @@ define(["uploadify"],function(){ |
84 | {field:'EMAIL',title:'邮箱',width:100,align:'center'}, | 86 | {field:'EMAIL',title:'邮箱',width:100,align:'center'}, |
85 | {field:'REG_TIME',title:'入会时间',width:100,align:'center', | 87 | {field:'REG_TIME',title:'入会时间',width:100,align:'center', |
86 | formatter: function(value,row,index){ | 88 | formatter: function(value,row,index){ |
87 | - return value?Date.parseDate(value).format("yyyy-MM-dd"):null; | 89 | + return value?moment(value).format("YYYY-MM-DD HH:mm:ss"):null; |
88 | } | 90 | } |
89 | } | 91 | } |
90 | ]] | 92 | ]] |
... | @@ -120,7 +122,7 @@ define(["uploadify"],function(){ | ... | @@ -120,7 +122,7 @@ define(["uploadify"],function(){ |
120 | //选择顾客 | 122 | //选择顾客 |
121 | function selectCustomer(){ | 123 | function selectCustomer(){ |
122 | if(isEnable=="true"){ | 124 | if(isEnable=="true"){ |
123 | - showCondObject({id:'ea9fc1d8-05b6-432f-a72f-a760f351bc7d',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){ | 125 | + base.showCondObject({id:'ea9fc1d8-05b6-432f-a72f-a760f351bc7d',showGrid:true,refresh:true,singleSelect:false,onBeforeLoad:function(params){ |
124 | if(page.find(".thisActId").val()!=null&&page.find(".thisActId").val()!=""){ | 126 | if(page.find(".thisActId").val()!=null&&page.find(".thisActId").val()!=""){ |
125 | return params["80997a88-3910-11e6-8f1f-005056ba7dbc"]=page.find(".thisActId").val(); | 127 | return params["80997a88-3910-11e6-8f1f-005056ba7dbc"]=page.find(".thisActId").val(); |
126 | }else{ | 128 | }else{ |
... | @@ -162,11 +164,11 @@ define(["uploadify"],function(){ | ... | @@ -162,11 +164,11 @@ define(["uploadify"],function(){ |
162 | tagKey:tagKey, | 164 | tagKey:tagKey, |
163 | valId:valId | 165 | valId:valId |
164 | },function(result){ | 166 | },function(result){ |
165 | - if(responseUtils(result)){ | 167 | + if($.response(result)){ |
166 | datagridReload(); | 168 | datagridReload(); |
167 | if(failCstNum>0){ | 169 | if(failCstNum>0){ |
168 | failCstId=failCstId.substring(0, failCstId.length-1); | 170 | failCstId=failCstId.substring(0, failCstId.length-1); |
169 | - $.messager.alert(resource.msg_title, "该标签不允许多个标签值插入,故存在"+failCstNum+"个用户打标签失败顾客ID分别为"+failCstId+"."); | 171 | + $.messager.alert(base.resource.msg_title, "该标签不允许多个标签值插入,故存在"+failCstNum+"个用户打标签失败顾客ID分别为"+failCstId+"."); |
170 | } | 172 | } |
171 | } | 173 | } |
172 | }); | 174 | }); |
... | @@ -174,7 +176,7 @@ define(["uploadify"],function(){ | ... | @@ -174,7 +176,7 @@ define(["uploadify"],function(){ |
174 | datagridReload(); | 176 | datagridReload(); |
175 | if(failCstNum>0){ | 177 | if(failCstNum>0){ |
176 | failCstId=failCstId.substring(0, failCstId.length-1); | 178 | failCstId=failCstId.substring(0, failCstId.length-1); |
177 | - $.messager.alert(resource.msg_title, "该标签不允许多个标签值插入,故存在"+failCstNum+"个用户打标签失败顾客ID分别为"+failCstId+"."); | 179 | + $.messager.alert(base.resource.msg_title, "该标签不允许多个标签值插入,故存在"+failCstNum+"个用户打标签失败顾客ID分别为"+failCstId+"."); |
178 | } | 180 | } |
179 | } | 181 | } |
180 | }); | 182 | }); |
... | @@ -184,7 +186,7 @@ define(["uploadify"],function(){ | ... | @@ -184,7 +186,7 @@ define(["uploadify"],function(){ |
184 | tagKey:tagKey, | 186 | tagKey:tagKey, |
185 | valId:valId | 187 | valId:valId |
186 | },function(result){ | 188 | },function(result){ |
187 | - if(responseUtils(result)){ | 189 | + if($.response(result)){ |
188 | datagridReload(); | 190 | datagridReload(); |
189 | } | 191 | } |
190 | }); | 192 | }); |
... | @@ -193,7 +195,7 @@ define(["uploadify"],function(){ | ... | @@ -193,7 +195,7 @@ define(["uploadify"],function(){ |
193 | } | 195 | } |
194 | }); | 196 | }); |
195 | }else{ | 197 | }else{ |
196 | - $.messager.alert(resource.msg_title, "标签不可用,无法操作"); | 198 | + $.messager.alert(base.resource.msg_title, "标签不可用,无法操作"); |
197 | } | 199 | } |
198 | } | 200 | } |
199 | 201 | ||
... | @@ -207,7 +209,7 @@ define(["uploadify"],function(){ | ... | @@ -207,7 +209,7 @@ define(["uploadify"],function(){ |
207 | } | 209 | } |
208 | 210 | ||
209 | function datagridReload(){ | 211 | function datagridReload(){ |
210 | - var param =getCondObjectValue(query); | 212 | + var param =layout.getCondObjectValue(query); |
211 | param[condition1]=tagKey; | 213 | param[condition1]=tagKey; |
212 | param[condition2]=valId; | 214 | param[condition2]=valId; |
213 | datagrid.datagrid("reload",param); | 215 | datagrid.datagrid("reload",param); |
... | @@ -219,7 +221,7 @@ define(["uploadify"],function(){ | ... | @@ -219,7 +221,7 @@ define(["uploadify"],function(){ |
219 | function removeTagVal(){ | 221 | function removeTagVal(){ |
220 | var rows = datagrid.datagrid('getSelections'); | 222 | var rows = datagrid.datagrid('getSelections'); |
221 | if(rows.length>0){ | 223 | if(rows.length>0){ |
222 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 224 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){ |
223 | if(r){ | 225 | if(r){ |
224 | var cstIds=""; | 226 | var cstIds=""; |
225 | for (var i = 0; i < rows.length; i++) { | 227 | for (var i = 0; i < rows.length; i++) { |
... | @@ -234,14 +236,14 @@ define(["uploadify"],function(){ | ... | @@ -234,14 +236,14 @@ define(["uploadify"],function(){ |
234 | tagVal:valId | 236 | tagVal:valId |
235 | }; | 237 | }; |
236 | $.post("./tag/deleteCustomerTags.json",params,function(result){ | 238 | $.post("./tag/deleteCustomerTags.json",params,function(result){ |
237 | - if(responseUtils(result)){ | 239 | + if($.response(result)){ |
238 | datagrid.datagrid("reload"); | 240 | datagrid.datagrid("reload"); |
239 | } | 241 | } |
240 | }); | 242 | }); |
241 | } | 243 | } |
242 | }); | 244 | }); |
243 | }else{ | 245 | }else{ |
244 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 246 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
245 | } | 247 | } |
246 | } | 248 | } |
247 | } | 249 | } | ... | ... |
1 | -define(function(){ | 1 | +define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(searchCondition){ | 3 | init : function(searchCondition){ |
4 | var query = "f920c7e0-9086-4fa6-92a9-50a2b41dd6dd"; // 标签列表 | 4 | var query = "f920c7e0-9086-4fa6-92a9-50a2b41dd6dd"; // 标签列表 |
5 | var condition = "9ef13b9a-005b-4d41-8b46-3129c0343d11"; // 平台和共享的过滤条件 | 5 | var condition = "9ef13b9a-005b-4d41-8b46-3129c0343d11"; // 平台和共享的过滤条件 |
6 | - var panel = getSelectedPanel(); | 6 | + var panel = layout.getSelectedPanel(); |
7 | var page = panel.children(".crm-point-adjustment").show().layout({fit:true}); | 7 | var page = panel.children(".crm-point-adjustment").show().layout({fit:true}); |
8 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); | 8 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); |
9 | var window = initWindow(); // 初始化添加页面 | 9 | var window = initWindow(); // 初始化添加页面 |
... | @@ -26,7 +26,7 @@ define(function(){ | ... | @@ -26,7 +26,7 @@ define(function(){ |
26 | html += "<li><span var_code="+data[i].varCode+" class=\"tag-sel\">"+data[i].varName+"</span></li>"; | 26 | html += "<li><span var_code="+data[i].varCode+" class=\"tag-sel\">"+data[i].varName+"</span></li>"; |
27 | }); | 27 | }); |
28 | tempWin.dialog({ | 28 | tempWin.dialog({ |
29 | - title:resource.tag.tagkey.addDialog.title, | 29 | + title:resource.tagkey.addDialog.title, |
30 | width: 320, | 30 | width: 320, |
31 | height: 'auto', | 31 | height: 'auto', |
32 | closed: true, | 32 | closed: true, |
... | @@ -46,7 +46,7 @@ define(function(){ | ... | @@ -46,7 +46,7 @@ define(function(){ |
46 | window.dialog("close"); | 46 | window.dialog("close"); |
47 | var url = ""; | 47 | var url = ""; |
48 | url = "./tag/tagInfo?tagType="+tagType+"&flag=0&tagKey=0"; | 48 | url = "./tag/tagInfo?tagType="+tagType+"&flag=0&tagKey=0"; |
49 | - showTabUtils({text:resource.tag.tagkey.showTabUtils.addTitle,url:url}, true, function(){}); | 49 | + layout.showPanel({text:resource.tagkey.showTabUtils.addTitle,url:url}, true, function(){}); |
50 | } | 50 | } |
51 | 51 | ||
52 | function selectRow(){ // 行转换 | 52 | function selectRow(){ // 行转换 |
... | @@ -60,17 +60,17 @@ define(function(){ | ... | @@ -60,17 +60,17 @@ define(function(){ |
60 | function editTagVal(){ // 编辑 | 60 | function editTagVal(){ // 编辑 |
61 | var row = crmTagDatagrid.datagrid("getSelected"); | 61 | var row = crmTagDatagrid.datagrid("getSelected"); |
62 | if(row==null){ | 62 | if(row==null){ |
63 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 63 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
64 | }else{ | 64 | }else{ |
65 | url = "./tag/tagInfo?tagKey="+row.TAG_KEY+"&flag=1&tagType="+row.TAG_TYPE; | 65 | url = "./tag/tagInfo?tagKey="+row.TAG_KEY+"&flag=1&tagType="+row.TAG_TYPE; |
66 | - showTabUtils({text:resource.tag.tagkey.showTabUtils.editTitle,url:url}, true, function(){}); | 66 | + layout.showPanel({text:resource.tagkey.showTabUtils.editTitle,url:url}, true, function(){}); |
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
70 | function removeTagVal(){ // 删除 | 70 | function removeTagVal(){ // 删除 |
71 | var row = selectRow(); | 71 | var row = selectRow(); |
72 | if(row==null){ | 72 | if(row==null){ |
73 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 73 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
74 | }else{ | 74 | }else{ |
75 | /** | 75 | /** |
76 | * 判断是否有用户打过标签 | 76 | * 判断是否有用户打过标签 |
... | @@ -81,19 +81,19 @@ define(function(){ | ... | @@ -81,19 +81,19 @@ define(function(){ |
81 | data:{tagKey:row.tagKey}, | 81 | data:{tagKey:row.tagKey}, |
82 | async:false, // 同步 | 82 | async:false, // 同步 |
83 | success:function(result) { | 83 | success:function(result) { |
84 | - if(responseUtils(result)){ | 84 | + if($.response(result)){ |
85 | if(result.total==0){ | 85 | if(result.total==0){ |
86 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 86 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){ |
87 | if(r){ | 87 | if(r){ |
88 | $.post("./tag/deleteTagKey.json",row,function(result){ | 88 | $.post("./tag/deleteTagKey.json",row,function(result){ |
89 | - if(responseUtils(result)){ | 89 | + if($.response(result)){ |
90 | crmTagDatagrid.datagrid("reload"); | 90 | crmTagDatagrid.datagrid("reload"); |
91 | } | 91 | } |
92 | }); | 92 | }); |
93 | } | 93 | } |
94 | }); | 94 | }); |
95 | }else{ | 95 | }else{ |
96 | - $.messager.alert(resource.msg_title, resource.tag.repeat); | 96 | + $.messager.alert(base.resource.msg_title, base.resource.tag.repeat); |
97 | } | 97 | } |
98 | } | 98 | } |
99 | } | 99 | } |
... | @@ -107,7 +107,7 @@ define(function(){ | ... | @@ -107,7 +107,7 @@ define(function(){ |
107 | 107 | ||
108 | function datagridReload(params){ | 108 | function datagridReload(params){ |
109 | var item = page.find(".center").find(".btn_opt").find("li.tabs-selected"); | 109 | var item = page.find(".center").find(".btn_opt").find("li.tabs-selected"); |
110 | - var param =getCondObjectValue(query); | 110 | + var param =base.getCondObjectValue(query); |
111 | crmTagDatagrid.datagrid("reload",param); | 111 | crmTagDatagrid.datagrid("reload",param); |
112 | } | 112 | } |
113 | 113 | ||
... | @@ -117,7 +117,7 @@ define(function(){ | ... | @@ -117,7 +117,7 @@ define(function(){ |
117 | showName=showName.substring(0,6)+"..."; | 117 | showName=showName.substring(0,6)+"..."; |
118 | } | 118 | } |
119 | url = "./tag/tagValList?tagKey="+$(this).attr("data-option1")+"&tagType="+$(this).attr("data-option2"); | 119 | url = "./tag/tagValList?tagKey="+$(this).attr("data-option1")+"&tagType="+$(this).attr("data-option2"); |
120 | - showTabUtils({text:showName,url:url}, true, function(){}); | 120 | + layout.showPanel({text:showName,url:url}, true, function(){}); |
121 | } | 121 | } |
122 | 122 | ||
123 | function initcrmTagDatagrid(){ | 123 | function initcrmTagDatagrid(){ |
... | @@ -128,47 +128,49 @@ define(function(){ | ... | @@ -128,47 +128,49 @@ define(function(){ |
128 | buttons.unbind(".datagrid").bind("click.datagrid", openSetKeyVal); | 128 | buttons.unbind(".datagrid").bind("click.datagrid", openSetKeyVal); |
129 | }, | 129 | }, |
130 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 130 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
131 | - title:resource.tag.tagkey.datagrid_title, | 131 | + title:resource.tagkey.datagrid_title, |
132 | authz:getAuthzUtils('tag'), | 132 | authz:getAuthzUtils('tag'), |
133 | content:page.find(".btn_opt"), | 133 | content:page.find(".btn_opt"), |
134 | buttons:[{ | 134 | buttons:[{ |
135 | - text:resource.btn.select, | 135 | + text:base.resource.btn.select, |
136 | iconCls:"btn-select select-condition", | 136 | iconCls:"btn-select select-condition", |
137 | handler: function(){ | 137 | handler: function(){ |
138 | - showCondObject(query,datagridReload); | 138 | + base.showCondObject(query,datagridReload); |
139 | } | 139 | } |
140 | },{ | 140 | },{ |
141 | code:'add', | 141 | code:'add', |
142 | - text:resource.btn.add, | 142 | + text:base.resource.btn.add, |
143 | iconCls:'btn-add', | 143 | iconCls:'btn-add', |
144 | handler: newlBuild | 144 | handler: newlBuild |
145 | },{ | 145 | },{ |
146 | code:'edit', | 146 | code:'edit', |
147 | - text:resource.btn.edit, | 147 | + text:base.resource.btn.edit, |
148 | iconCls:'btn-edit', | 148 | iconCls:'btn-edit', |
149 | handler:editTagVal | 149 | handler:editTagVal |
150 | },{ | 150 | },{ |
151 | code:'delete', | 151 | code:'delete', |
152 | - text:resource.btn.remove, | 152 | + text:base.resource.btn.remove, |
153 | iconCls:'btn-remove', | 153 | iconCls:'btn-remove', |
154 | handler: removeTagVal | 154 | handler: removeTagVal |
155 | }], | 155 | }], |
156 | tools:[{ | 156 | tools:[{ |
157 | - text:resource.btn.refresh, | 157 | + text:base.resource.btn.refresh, |
158 | iconCls:'btn-refresh', | 158 | iconCls:'btn-refresh', |
159 | - handler:panelRefreshUtils | 159 | + handler:function () { |
160 | + layout.panelRefresh(); | ||
161 | + } | ||
160 | }] | 162 | }] |
161 | }), | 163 | }), |
162 | url:"./query/"+query+".json?"+condition+"="+searchCondition, | 164 | url:"./query/"+query+".json?"+condition+"="+searchCondition, |
163 | fitColumns:true, | 165 | fitColumns:true, |
164 | columns:[[ | 166 | columns:[[ |
165 | {field:'ck',checkbox:true}, | 167 | {field:'ck',checkbox:true}, |
166 | - {field:'TAG_KEY',title:resource.tag.tagkey.datagrid_col_tag_key_title,width:80,align:'center'}, | 168 | + {field:'TAG_KEY',title:resource.tagkey.datagrid_col_tag_key_title,width:80,align:'center'}, |
167 | - {field:'TAG_NAME',title:resource.tag.tagkey.datagrid_col_tag_name_title,width:150,align:'center'}, | 169 | + {field:'TAG_NAME',title:resource.tagkey.datagrid_col_tag_name_title,width:150,align:'center'}, |
168 | - {field:'TAG_DESC',title:resource.tag.tagkey.datagrid_col_tag_desc_title,width:100,align:'center'}, | 170 | + {field:'TAG_DESC',title:resource.tagkey.datagrid_col_tag_desc_title,width:100,align:'center'}, |
169 | // {field:'TAG_ACT',title:'账套ID',width:60,align:'center',hidden:true}, | 171 | // {field:'TAG_ACT',title:'账套ID',width:60,align:'center',hidden:true}, |
170 | - {field:'ACT_NAME',title:resource.tag.tagkey.datagrid_col_act_name_title,width:150,align:'center'}, | 172 | + {field:'ACT_NAME',title:resource.tagkey.datagrid_col_act_name_title,width:150,align:'center'}, |
171 | - {field:'TAG_TYPE',title:resource.tag.tagkey.datagrid_col_tag_type_title,width:60,align:'center', | 173 | + {field:'TAG_TYPE',title:resource.tagkey.datagrid_col_tag_type_title,width:60,align:'center', |
172 | formatter : function(value,row,index){ | 174 | formatter : function(value,row,index){ |
173 | switch(value){ | 175 | switch(value){ |
174 | case 0: | 176 | case 0: |
... | @@ -184,8 +186,8 @@ define(function(){ | ... | @@ -184,8 +186,8 @@ define(function(){ |
184 | return value; | 186 | return value; |
185 | } | 187 | } |
186 | }, | 188 | }, |
187 | - {field:'ENABLE',title:resource.tag.tagkey.datagrid_col_enable_title,width:60,align:'center'}, | 189 | + {field:'ENABLE',title:resource.tagkey.datagrid_col_enable_title,width:60,align:'center'}, |
188 | - {field:'OPERATION',title:resource.tag.tagkey.datagrid_col_operation_title,width:60,align:'center', | 190 | + {field:'OPERATION',title:resource.tagkey.datagrid_col_operation_title,width:60,align:'center', |
189 | formatter: function(val,row,index) { | 191 | formatter: function(val,row,index) { |
190 | if(row.TAG_TYPE==2){ | 192 | if(row.TAG_TYPE==2){ |
191 | return null; | 193 | return null; | ... | ... |
1 | +define({ | ||
2 | + root: { | ||
3 | + tagkey:{ | ||
4 | + datagrid_title:'顾客标签', | ||
5 | + datagrid_col_tag_key_title:'编号', | ||
6 | + datagrid_col_tag_name_title:'名称', | ||
7 | + datagrid_col_tag_desc_title:'描述', | ||
8 | + datagrid_col_act_name_title:'适用CRM账套', | ||
9 | + datagrid_col_tag_type_title:'类型', | ||
10 | + datagrid_col_enable_title:'可用', | ||
11 | + datagrid_col_operation_title:'操作', | ||
12 | + showTabUtils:{ | ||
13 | + addTitle:'新增标签页面', | ||
14 | + editTitle:'新增标签页面' | ||
15 | + }, | ||
16 | + addDialog:{ | ||
17 | + title:'选择新建类型' | ||
18 | + } | ||
19 | + }, | ||
20 | + tagval:{ | ||
21 | + datagrid_col_val_id_title:'编号', | ||
22 | + datagrid_col_tag_key_title:'标签ID', | ||
23 | + datagrid_col_tag_val_title:'名称', | ||
24 | + datagrid_col_val_desc_title:'描述' | ||
25 | + }, | ||
26 | + repeat:'已有用户打过标签,不允许删除', | ||
27 | + exist:'标签值已存在' | ||
28 | + }, | ||
29 | + "en-US": true, | ||
30 | + "en-US-paris": true | ||
31 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
1 | -define(function(){ | 1 | +define(['i18n!tag/nls/resource', 'cls', 'moment', 'base/index', 'index/index'], function (resource, Class, moment, base, layout){ |
2 | return { | 2 | return { |
3 | init : function(tagKey,tagName){ | 3 | init : function(tagKey,tagName){ |
4 | var query = "564fc1d7-d790-4aea-9fc6-1cf23c94c9ee"; | 4 | var query = "564fc1d7-d790-4aea-9fc6-1cf23c94c9ee"; |
5 | var condition = "02140c5b-5aa6-4c83-b16a-0a15335a4542"; | 5 | var condition = "02140c5b-5aa6-4c83-b16a-0a15335a4542"; |
6 | - var panel = getSelectedPanel(); | 6 | + var panel = layout.getSelectedPanel(); |
7 | var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true}); | 7 | var page = panel.children(".crm-tag-staticTagVal").show().layout({fit:true}); |
8 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); | 8 | page.layout("panel","center").children('.easyuiTabs').tabs({fit:true}); |
9 | var tagValDialog = initTagValDialog();//初始化添加页面 | 9 | var tagValDialog = initTagValDialog();//初始化添加页面 |
... | @@ -11,7 +11,7 @@ define(function(){ | ... | @@ -11,7 +11,7 @@ define(function(){ |
11 | var datagrid=initdatagrid(); //初始化调整datagrid | 11 | var datagrid=initdatagrid(); //初始化调整datagrid |
12 | 12 | ||
13 | function datagridReload(param){ | 13 | function datagridReload(param){ |
14 | - var param =getCondObjectValue(query); | 14 | + var param =layout.getCondObjectValue(query); |
15 | param[condition]=tagKey; | 15 | param[condition]=tagKey; |
16 | datagrid.datagrid("reload",param); | 16 | datagrid.datagrid("reload",param); |
17 | } | 17 | } |
... | @@ -25,48 +25,50 @@ define(function(){ | ... | @@ -25,48 +25,50 @@ define(function(){ |
25 | }, | 25 | }, |
26 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 26 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
27 | title:tagName, | 27 | title:tagName, |
28 | - authz:getAuthzUtils('tag'), | 28 | + authz:base.getAuthz('tag'), |
29 | content:page.find(".btn_opt"), | 29 | content:page.find(".btn_opt"), |
30 | buttons:[{ | 30 | buttons:[{ |
31 | - text:resource.btn.select, | 31 | + text:base.resource.btn.select, |
32 | iconCls:"btn-select select-condition", | 32 | iconCls:"btn-select select-condition", |
33 | handler: function(){ | 33 | handler: function(){ |
34 | - showCondObject(query,datagridReload); | 34 | + base.showCondObject(query,datagridReload); |
35 | } | 35 | } |
36 | },{ | 36 | },{ |
37 | - text:resource.btn.add, | 37 | + text:base.resource.btn.add, |
38 | iconCls:'btn-add', | 38 | iconCls:'btn-add', |
39 | handler: newlBuild | 39 | handler: newlBuild |
40 | },{ | 40 | },{ |
41 | - text:resource.btn.edit, | 41 | + text:base.resource.btn.edit, |
42 | iconCls:'btn-edit', | 42 | iconCls:'btn-edit', |
43 | handler:editTagVal | 43 | handler:editTagVal |
44 | },{ | 44 | },{ |
45 | - text:resource.btn.remove, | 45 | + text:base.resource.btn.remove, |
46 | iconCls:'btn-remove', | 46 | iconCls:'btn-remove', |
47 | handler: removeTagVal | 47 | handler: removeTagVal |
48 | }], | 48 | }], |
49 | tools:[{ | 49 | tools:[{ |
50 | - text:resource.btn.refresh, | 50 | + text:base.resource.btn.refresh, |
51 | iconCls:'btn-refresh', | 51 | iconCls:'btn-refresh', |
52 | - handler:panelRefreshUtils | 52 | + handler:function () { |
53 | + layout.panelRefresh(); | ||
54 | + } | ||
53 | }] | 55 | }] |
54 | }), | 56 | }), |
55 | url:"./query/"+query+".json?02140c5b-5aa6-4c83-b16a-0a15335a4542="+tagKey, | 57 | url:"./query/"+query+".json?02140c5b-5aa6-4c83-b16a-0a15335a4542="+tagKey, |
56 | fitColumns:true, | 58 | fitColumns:true, |
57 | columns:[[ | 59 | columns:[[ |
58 | {field:'ck',checkbox:true}, | 60 | {field:'ck',checkbox:true}, |
59 | - {field:'VAL_ID',title:resource.tag.tagval.datagrid_col_val_id_title,width:80,align:'center'}, | 61 | + {field:'VAL_ID',title:resource.tagval.datagrid_col_val_id_title,width:80,align:'center'}, |
60 | - {field:'TAG_KEY',title:resource.tag.tagval.datagrid_col_tag_key_title,hidden:true}, | 62 | + {field:'TAG_KEY',title:resource.tagval.datagrid_col_tag_key_title,hidden:true}, |
61 | - {field:'TAG_VAL',title:resource.tag.tagval.datagrid_col_tag_val_title,width:150,align:'center'}, | 63 | + {field:'TAG_VAL',title:resource.tagval.datagrid_col_tag_val_title,width:150,align:'center'}, |
62 | - {field:'VAL_DESC',title:resource.tag.tagval.datagrid_col_val_desc_title,width:100,align:'center'}, | 64 | + {field:'VAL_DESC',title:resource.tagval.datagrid_col_val_desc_title,width:100,align:'center'}, |
63 | - {field:'ACT_NAME',title:resource.tag.tagkey.datagrid_col_act_name_title,width:150,align:'center'}, | 65 | + {field:'ACT_NAME',title:resource.tagkey.datagrid_col_act_name_title,width:150,align:'center'}, |
64 | - {field:'ENABLE',title:resource.tag.tagkey.datagrid_col_enable_title,width:60,align:'center', | 66 | + {field:'ENABLE',title:resource.tagkey.datagrid_col_enable_title,width:60,align:'center', |
65 | formatter : function(value,row,index){ | 67 | formatter : function(value,row,index){ |
66 | return value ==true ? '是':'否'; | 68 | return value ==true ? '是':'否'; |
67 | } | 69 | } |
68 | }, | 70 | }, |
69 | - {field:'OPERATION',title:resource.tag.datagrid_col_operation_title,width:100,align:'center', | 71 | + {field:'OPERATION',title:resource.datagrid_col_operation_title,width:100,align:'center', |
70 | formatter: function(val,row,index) { | 72 | formatter: function(val,row,index) { |
71 | return '<a href="javascript:void(0);" class="data-setpoint-a" data-option1="'+ row.VAL_ID +'" data-option2="'+row.TAG_KEY+'" >打标签</a>'; | 73 | return '<a href="javascript:void(0);" class="data-setpoint-a" data-option1="'+ row.VAL_ID +'" data-option2="'+row.TAG_KEY+'" >打标签</a>'; |
72 | } | 74 | } |
... | @@ -77,7 +79,7 @@ define(function(){ | ... | @@ -77,7 +79,7 @@ define(function(){ |
77 | 79 | ||
78 | function openPointRule(){ | 80 | function openPointRule(){ |
79 | url = "./tag/customerTagInit?tagKey="+$(this).attr("data-option2")+"&valId="+$(this).attr("data-option1"); | 81 | url = "./tag/customerTagInit?tagKey="+$(this).attr("data-option2")+"&valId="+$(this).attr("data-option1"); |
80 | - showTabUtils({text:"打标签",url:url}, true, function(){}); | 82 | + layout.showPanel({text:"打标签",url:url}, true, function(){}); |
81 | } | 83 | } |
82 | 84 | ||
83 | function newlBuild(){ // 弹出dialog | 85 | function newlBuild(){ // 弹出dialog |
... | @@ -101,7 +103,7 @@ define(function(){ | ... | @@ -101,7 +103,7 @@ define(function(){ |
101 | editBtn(); | 103 | editBtn(); |
102 | } | 104 | } |
103 | } | 105 | } |
104 | - },{text:resource.btn.cancel,handler:hideWindow}], | 106 | + },{text:base.resource.btn.cancel,handler:hideWindow}], |
105 | closed:true, | 107 | closed:true, |
106 | width:'500', | 108 | width:'500', |
107 | height:'auto' | 109 | height:'auto' |
... | @@ -123,13 +125,13 @@ define(function(){ | ... | @@ -123,13 +125,13 @@ define(function(){ |
123 | $.JSON("./tag/existsTagValName.json",param, function(result){ | 125 | $.JSON("./tag/existsTagValName.json",param, function(result){ |
124 | if(result.total=="0"){ | 126 | if(result.total=="0"){ |
125 | $.JSON("./tag/createTagVal.json",param,function(result){ | 127 | $.JSON("./tag/createTagVal.json",param,function(result){ |
126 | - if(responseUtils(result)){ | 128 | + if($.response(result)){ |
127 | hideWindow(); | 129 | hideWindow(); |
128 | datagrid.datagrid("reload"); | 130 | datagrid.datagrid("reload"); |
129 | } | 131 | } |
130 | }); | 132 | }); |
131 | }else{ | 133 | }else{ |
132 | - $.messager.alert(resource.msg_title, resource.tag.exist); | 134 | + $.messager.alert(base.resource.msg_title, resource.exist); |
133 | return false; | 135 | return false; |
134 | } | 136 | } |
135 | }) | 137 | }) |
... | @@ -149,13 +151,13 @@ define(function(){ | ... | @@ -149,13 +151,13 @@ define(function(){ |
149 | $.JSON("./tag/existsTagValName.json",param, function(result){ | 151 | $.JSON("./tag/existsTagValName.json",param, function(result){ |
150 | if(result.total=="0"){ | 152 | if(result.total=="0"){ |
151 | $.JSON("./tag/updateTagVal.json",param,function(result){ | 153 | $.JSON("./tag/updateTagVal.json",param,function(result){ |
152 | - if(responseUtils(result)){ | 154 | + if($.response(result)){ |
153 | hideWindow(); | 155 | hideWindow(); |
154 | datagrid.datagrid("reload"); | 156 | datagrid.datagrid("reload"); |
155 | } | 157 | } |
156 | }); | 158 | }); |
157 | }else{ | 159 | }else{ |
158 | - $.messager.alert(resource.msg_title, resource.tag.exist); | 160 | + $.messager.alert(base.resource.msg_title, resource.exist); |
159 | return false; | 161 | return false; |
160 | } | 162 | } |
161 | }) | 163 | }) |
... | @@ -174,7 +176,7 @@ define(function(){ | ... | @@ -174,7 +176,7 @@ define(function(){ |
174 | function editTagVal(){ // 编辑 | 176 | function editTagVal(){ // 编辑 |
175 | var row = selectRow(); | 177 | var row = selectRow(); |
176 | if(row==null){ | 178 | if(row==null){ |
177 | - $.messager.alert(resource.msg_title, resource.msgEditTip); | 179 | + $.messager.alert(base.resource.msg_title, base.resource.msgEditTip); |
178 | }else{ | 180 | }else{ |
179 | var form = tagValDialog.find(".editTagValForm"); | 181 | var form = tagValDialog.find(".editTagValForm"); |
180 | form.find("input[name='id']").val(row.valId); | 182 | form.find("input[name='id']").val(row.valId); |
... | @@ -190,7 +192,7 @@ define(function(){ | ... | @@ -190,7 +192,7 @@ define(function(){ |
190 | function removeTagVal(){ // 删除 | 192 | function removeTagVal(){ // 删除 |
191 | var row = selectRow(); | 193 | var row = selectRow(); |
192 | if(row==null){ | 194 | if(row==null){ |
193 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 195 | + $.messager.alert(base.resource.msg_title, base.resource.msgRemoveTip); |
194 | }else{ | 196 | }else{ |
195 | /** | 197 | /** |
196 | * 判断是否有用户打过标签 | 198 | * 判断是否有用户打过标签 |
... | @@ -201,19 +203,19 @@ define(function(){ | ... | @@ -201,19 +203,19 @@ define(function(){ |
201 | data:{tagKey:row.tagKey,tagVal:row.valId}, | 203 | data:{tagKey:row.tagKey,tagVal:row.valId}, |
202 | async:false, // 同步 | 204 | async:false, // 同步 |
203 | success:function(result) { | 205 | success:function(result) { |
204 | - if(responseUtils(result)){ | 206 | + if($.response(result)){ |
205 | if(result.total==0){ | 207 | if(result.total==0){ |
206 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 208 | + $.messager.confirm(base.resource.msg_title, base.resource.confirmDelete, function(r){ |
207 | if(r){ | 209 | if(r){ |
208 | $.post("./tag/deleteTagVal.json",row,function(result){ | 210 | $.post("./tag/deleteTagVal.json",row,function(result){ |
209 | - if(responseUtils(result)){ | 211 | + if($.response(result)){ |
210 | datagrid.datagrid("reload"); | 212 | datagrid.datagrid("reload"); |
211 | } | 213 | } |
212 | }); | 214 | }); |
213 | } | 215 | } |
214 | }); | 216 | }); |
215 | }else{ | 217 | }else{ |
216 | - $.messager.alert(resource.msg_title, resource.tag.repeat); | 218 | + $.messager.alert(base.resource.msg_title, resource.repeat); |
217 | } | 219 | } |
218 | } | 220 | } |
219 | } | 221 | } | ... | ... |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment