Showing
4 changed files
with
112 additions
and
23 deletions
This diff is collapsed. Click to expand it.
1 | -define(function(){ | 1 | +define(['i18n!bizEntity/nls/resource', 'cls', 'base/index', 'index/index'], function (resource, Class, base, indexlayout){ |
2 | return { | 2 | return { |
3 | + resource:resource, | ||
3 | init:function(pltId){ | 4 | init:function(pltId){ |
4 | var body=$(document.body); | 5 | var body=$(document.body); |
5 | - var pannel = getSelectedPanel();//初始化面板 | 6 | + var pannel = indexlayout.getSelectedPanel();//初始化面板 |
6 | var page = pannel.children(".bizEntity-index-page").layout({ | 7 | var page = pannel.children(".bizEntity-index-page").layout({ |
7 | fit:true | 8 | fit:true |
8 | });//定义面板内div | 9 | });//定义面板内div |
... | @@ -14,44 +15,46 @@ define(function(){ | ... | @@ -14,44 +15,46 @@ define(function(){ |
14 | return $('<div></div>').appendTo(center).datagrid({ | 15 | return $('<div></div>').appendTo(center).datagrid({ |
15 | url:'./query/'+condId+'.json', | 16 | url:'./query/'+condId+'.json', |
16 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ | 17 | toolbar:$('<div class="clearfix"></div>').rs_toolbar({ |
17 | - title: resource.bizentity.title, | 18 | + title: resource.title, |
18 | - authz:getAuthzUtils('bizEntity'), | 19 | + authz:base.getAuthz('bizEntity'), |
19 | buttons:[{ | 20 | buttons:[{ |
20 | - text:resource.btn.select, | 21 | + text:base.resource.btn.select, |
21 | iconCls:'btn-select select-condition', | 22 | iconCls:'btn-select select-condition', |
22 | code:'view', | 23 | code:'view', |
23 | handler: function(){ | 24 | handler: function(){ |
24 | - showCondObject(condId,datagridReload); | 25 | + base.showCondObject(condId,datagridReload); |
25 | } | 26 | } |
26 | },{ | 27 | },{ |
27 | - text:resource.btn.add, | 28 | + text:base.resource.btn.add, |
28 | iconCls:'btn-add', | 29 | iconCls:'btn-add', |
29 | code:'edit', | 30 | code:'edit', |
30 | handler: addBizEntity | 31 | handler: addBizEntity |
31 | },{ | 32 | },{ |
32 | - text:resource.btn.edit, | 33 | + text:base.resource.btn.edit, |
33 | iconCls:'btn-edit', | 34 | iconCls:'btn-edit', |
34 | code:'edit', | 35 | code:'edit', |
35 | handler: editBizEntity | 36 | handler: editBizEntity |
36 | },{ | 37 | },{ |
37 | - text:resource.btn.remove, | 38 | + text:base.resource.btn.remove, |
38 | iconCls:'btn-remove', | 39 | iconCls:'btn-remove', |
39 | code:'edit', | 40 | code:'edit', |
40 | handler: removeBizEntity | 41 | handler: removeBizEntity |
41 | }], | 42 | }], |
42 | tools:[{ | 43 | tools:[{ |
43 | - text:resource.btn.refresh, | 44 | + text:base.resource.btn.refresh, |
44 | iconCls:'btn-refresh', | 45 | iconCls:'btn-refresh', |
45 | - handler:panelRefreshUtils | 46 | + handler:function(){ |
47 | + indexlayout.getSelectedPanel().panel("refresh"); | ||
48 | + } | ||
46 | }] | 49 | }] |
47 | }), | 50 | }), |
48 | columns:[[ | 51 | columns:[[ |
49 | {field:'ck',checkbox:true }, | 52 | {field:'ck',checkbox:true }, |
50 | - {field:'BECODE',title:resource.bizentity.grid.code, width:150}, | 53 | + {field:'BECODE',title:resource.grid.code, width:150}, |
51 | - {field:'BENAME',title:resource.bizentity.grid.name, width:200}, | 54 | + {field:'BENAME',title:resource.grid.name, width:200}, |
52 | - {field:'ORGTYPE',title:resource.bizentity.grid.type, width:120}, | 55 | + {field:'ORGTYPE',title:resource.grid.type, width:120}, |
53 | - {field:'BEDESC',title:resource.bizentity.grid.desc, width:300,formatter:formatText}, | 56 | + {field:'BEDESC',title:resource.grid.desc, width:300,formatter:formatText}, |
54 | - {field:'VALID',title:resource.bizentity.grid.valid, width:100} | 57 | + {field:'VALID',title:resource.grid.valid, width:100} |
55 | ]], | 58 | ]], |
56 | onLoadSuccess:function(data){ | 59 | onLoadSuccess:function(data){ |
57 | if(Number(pltId)!=1){ | 60 | if(Number(pltId)!=1){ |
... | @@ -70,27 +73,29 @@ define(function(){ | ... | @@ -70,27 +73,29 @@ define(function(){ |
70 | } | 73 | } |
71 | //新建经营主体 | 74 | //新建经营主体 |
72 | function addBizEntity(){ | 75 | function addBizEntity(){ |
73 | - showTabUtils({text:resource.bizentity.detailTitle,url:'./bizEntity/details'},true,function(){grid.datagrid("reload");}); | 76 | + indexlayout.showPanel({text:resource.detailTitle,url:'./bizEntity/details'},true,function(){grid.datagrid("reload");}); |
74 | } | 77 | } |
75 | //编辑的经营主体 | 78 | //编辑的经营主体 |
76 | function editBizEntity(){ | 79 | function editBizEntity(){ |
77 | var row=grid.datagrid('getSelected'); | 80 | var row=grid.datagrid('getSelected'); |
78 | if(row){ | 81 | if(row){ |
79 | - showTabUtils({text:resource.bizentity.detailTitle,url:'./bizEntity/details',id:row.BEID},true,function(){grid.datagrid("reload");}); | 82 | + indexlayout.showPanel({text:resource.detailTitle,url:'./bizEntity/details',id:row.BEID},true,function(){grid.datagrid("reload");}); |
80 | }else{ | 83 | }else{ |
81 | - $.messager.alert(resource.msg_title,resource.msgEditTip); | 84 | + $.messager.alert(base.resource.msg_title,base.resource.msgEditTip); |
82 | } | 85 | } |
83 | } | 86 | } |
84 | //删除主体 | 87 | //删除主体 |
85 | function removeBizEntity(){ | 88 | function removeBizEntity(){ |
86 | var row=grid.datagrid('getSelected'); | 89 | var row=grid.datagrid('getSelected'); |
87 | if(row==null){ | 90 | if(row==null){ |
88 | - $.messager.alert(resource.msg_title, resource.msgRemoveTip); | 91 | + $.messager.alert(base.resource.msg_title, resource.msgRemoveTip); |
89 | }else{ | 92 | }else{ |
90 | - $.messager.confirm(resource.msg_title, resource.confirmDelete, function(r){ | 93 | + $.messager.confirm(base.resource.msg_title, resource.confirmDelete, function(r){ |
91 | if(r){ | 94 | if(r){ |
92 | $.post("./bizEntity/delete.json",{id:row.BEID},function(result){ | 95 | $.post("./bizEntity/delete.json",{id:row.BEID},function(result){ |
93 | - if(responseUtils(result)){ | 96 | + console.log(result); |
97 | + if($.response(result)){ | ||
98 | + console.log(result); | ||
94 | grid.datagrid("reload"); | 99 | grid.datagrid("reload"); |
95 | } | 100 | } |
96 | }); | 101 | }); |
... | @@ -103,7 +108,7 @@ define(function(){ | ... | @@ -103,7 +108,7 @@ define(function(){ |
103 | if(params){ | 108 | if(params){ |
104 | grid.datagrid("reload",params); | 109 | grid.datagrid("reload",params); |
105 | }else{ | 110 | }else{ |
106 | - grid.datagrid("reload",getCondObjectValue(condId)); | 111 | + grid.datagrid("reload",base.getCondObjectValue(condId)); |
107 | } | 112 | } |
108 | } | 113 | } |
109 | } | 114 | } | ... | ... |
1 | +define({ | ||
2 | + root:{ | ||
3 | + title:'经营主体', | ||
4 | + detailTitle:'经营主体详情', | ||
5 | + channelTitle:'主体经营渠道', | ||
6 | + closeAct:'结算账套', | ||
7 | + paymentmethod:'收款方式', | ||
8 | + saveTitle:'确定保存?', | ||
9 | + orgTypeDialogTitle:'选择新建的组织类型', | ||
10 | + msgRemoveTip:'请选择要删除的数据!', | ||
11 | + confirmDelete:'你确定要删除这条信息吗?', | ||
12 | + grid:{ | ||
13 | + code:'编号', | ||
14 | + name:'名称', | ||
15 | + desc:'描述 ', | ||
16 | + type:'组织类型', | ||
17 | + valid:'可用', | ||
18 | + bebcode:'编号', | ||
19 | + bebname:'名称', | ||
20 | + bename:'主体名称', | ||
21 | + bebdesc:'描述', | ||
22 | + ptvalid:'可用', | ||
23 | + beiname:'开票单位名称', | ||
24 | + beitaxnum:'税务登记号', | ||
25 | + beitaxrate:'税率', | ||
26 | + ptphone:'电话', | ||
27 | + ptaddr:'地址', | ||
28 | + cuname:'币种单位', | ||
29 | + bizinvoicelist:'开票信息', | ||
30 | + bizaccountlist:'常用账户', | ||
31 | + bizpaywaypist:'收款方式', | ||
32 | + beasource:'收支渠道/银行', | ||
33 | + beaname:'账户名', | ||
34 | + beaaccount:'BEAACCOUNT', | ||
35 | + bearate:'交易费率', | ||
36 | + pwid:'收款方式ID', | ||
37 | + pwname:'收款方式名称', | ||
38 | + curate:'汇率', | ||
39 | + bepproceeds:'收款渠道/银行', | ||
40 | + beppayee:'收款人', | ||
41 | + bepaccount:'收款账号', | ||
42 | + bepincome:'计销售收入', | ||
43 | + beppoint:'消费积分', | ||
44 | + piid:'调用支付接口' | ||
45 | + }, | ||
46 | + channel:{ | ||
47 | + title:'经营渠道', | ||
48 | + grid:{ | ||
49 | + name:'名称', | ||
50 | + desc:'描述 ', | ||
51 | + brand:'经营品牌', | ||
52 | + valid:'可用' | ||
53 | + }, | ||
54 | + check:{ | ||
55 | + valid:'只有系统管理平台才能编辑渠道信息!' | ||
56 | + } | ||
57 | + }, | ||
58 | + bizChannelgridtitle:'经营渠道', | ||
59 | + bizChannelgrid:{ | ||
60 | + beName:'上级经营主体' | ||
61 | + }, | ||
62 | + check:{ | ||
63 | + setOfBook:'每个经营主体必须创建至少一个结算账套', | ||
64 | + channel:'每个经营主体必须创建至少一个经营渠道', | ||
65 | + bookName:'该结算账套的名称已与当前主体的其它已有结算账套重复', | ||
66 | + beiName:'一个结算账套内开票名称禁止重复', | ||
67 | + numberLetterValid:'编号只能输入数字、字母或其组合', | ||
68 | + ptphone:'请输入正确的号码,格式如:0519-83360776或83360776,3~4位区号加7~8位号码,区号可以省略!', | ||
69 | + decimalValid:'只能输入1位整数并且小数位最多4位小数,例如:1.1234', | ||
70 | + integer:'税率范围0-100%', | ||
71 | + channelValid:'当前选择的经营渠道与列表中的经营渠道有重复,请重新选择!', | ||
72 | + editVaild:'只有系统管理平台才能编辑经营主体信息!', | ||
73 | + defaultBookEdit:'默认结算账套不能修改!', | ||
74 | + defaultBookDelete:'默认结算账套不能删除!', | ||
75 | + proMsgSaveTitle:'您当前未设置结算账套,新增时系统会默认帮您生成一个默认的结算账套,确定继续吗?', | ||
76 | + orgtypeValid:'请先选择销售类型!', | ||
77 | + actCntdelet:'该账户已经被已有收款方式使用,不能删除!' | ||
78 | + } | ||
79 | + }, | ||
80 | + "en-US": true, | ||
81 | + "en-US-paris": true | ||
82 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment