1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-2-26 下午2:37:49
$Revision: 1.0
$Purpose: 凭证模板头
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure>
<a:model-query model="basic.sys_session_info" rootPath="headScreen_sessionInfo"/>
</a:init-procedure>
<a:view>
<a:link id="pageLink_match_rule" url="${/request/@context_path}/modules/gld/GLD110/gld_je_template_group_mapping_condition.lview"/>
<a:link id="pageLink_template_assign" url="${/request/@context_path}/modules/gld/GLD110/gld_je_template_template_assign.lview"/>
<script type="text/javascript"><![CDATA[
function groupDs_grid_query() {
$('groupDs').query();
}
function para_groupDs_reset()
{
$('para_groupDs').reset();
}
function groupDs_grid_add() {
$('groupDs_grid').showEditorByRecord($('groupDs').create());
}
function groupDs_grid_remove() {
$('groupDs_grid').remove();
}
function groupDs_grid_clear() {
$('groupDs_grid').clear();
}
function groupDs_grid_save() {
var ds = $('groupDs');
if (ds.validate()) {
ds.submit();
}
}
function winOpen_matchRule(je_transaction_code,template_group_id)
{
new Leaf.Window({
id: 'gld_je_template_group_mapping_condition',
url: $('pageLink_match_rule').getUrl(),
params:{
template_group_id:template_group_id,
je_transaction_code:je_transaction_code
},
title: '${l:GLD107.WIN_TITLE.MATCH_RULE}',
height: 450,
width: 900
});
}
function winOpen_template_assign(je_transaction_code,template_group_id)
{
new Leaf.Window({
id: 'gld_je_template_template_assign',
url: $('pageLink_template_assign').getUrl(),
params:{
template_group_id:template_group_id,
je_transaction_code:je_transaction_code
},
title: '${l:GLD110.GLD_JE_TEMPLATE_GRP.TEMPLATE_ASSIGN}',
width: 700,
height: 450
});
}
function render_groupDs_grid(value, record, name)
{
var template_group_id=record.get('template_group_id');
var je_transaction_code = record.get('je_transaction_code');
if(!record.isNew)
{
if(name=='match_rule')
{
return '<a href="javascript:winOpen_matchRule(\'' + je_transaction_code + '\','+ template_group_id +');">' + '${l:GLD107.WIN_TITLE.MATCH_RULE}' + '</a>';
}
else if(name=='template_assign')
{
return '<a href="javascript:winOpen_template_assign(\'' + je_transaction_code + '\','+ template_group_id +');">' + '${l:GLD110.GLD_JE_TEMPLATE_GRP.TEMPLATE_ASSIGN}' + '</a>';
}
return '';
}
return '';
}
function groupDs_query()
{
$('groupDs').query();
}
function editorFunction_groupDs_grid(record,name)
{
if(record.isNew)
{
if(name=='je_template_set_desc'||name=='je_transaction_desc')
{
return 'groupDs_grid_lov';
}
if(name=='template_group_code')
{
return 'groupDs_grid_tf_upper';
}
return '';
}
return '';
}
]]></script>
<a:dataSets>
<a:dataSet id="groupPage_enableFlagDs">
<a:datas>
<a:record code_value="Y" code_value_name="是"/>
<a:record code_value="N" code_value_name="否"/>
<a:record code_value="" code_value_name="全部"/>
</a:datas>
</a:dataSet>
<a:dataSet id="para_groupDs" autoCreate="true" model="gld.GLD110.gld_je_template_grp">
<a:fields>
<a:field name="je_template_set_code"/>
<a:field name="je_template_set_desc" lovGridHeight="300" lovHeight="500" lovService="gld.GLD105.gld_je_template_set_for_lov" lovWidth="550" title="GLD105.GLD_JE_TEMPLATE_SET.JE_TEMPLATE_SET_DESC">
<a:mapping>
<a:map from="je_template_set_desc" to="je_template_set_desc"/>
<a:map from="je_template_set_code" to="je_template_set_code"/>
</a:mapping>
</a:field>
<a:field name="je_transaction_code"/>
<a:field name="je_transaction_desc" lovGridHeight="300" lovHeight="500" lovService="gld.GLD104.gld_je_transaction_for_lov" lovWidth="550" title="GLD104.GLD_JE_TRANSACTION.JE_TRANSACTION_DESC">
<a:mapping>
<a:map from="je_transaction_desc" to="je_transaction_desc"/>
<a:map from="je_transaction_code" to="je_transaction_code"/>
</a:mapping>
</a:field>
<a:field name="enabled_flag" defaultValue="Y"/>
<a:field name="enabled_flag_desc" defaultValue="是" displayField="code_value_name" options="groupPage_enableFlagDs" prompt="启用" returnField="enabled_flag" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="groupDs" autoPageSize="true" autoQuery="true" model="gld.GLD110.gld_je_template_grp" queryDataSet="para_groupDs" selectable="true">
<a:fields>
<a:field name="template_group_code" required="true"/>
<a:field name="company_short_name" defaultValue="${/model/headScreen_sessionInfo/record/@company_short_name}"/>
<a:field name="je_template_set_desc" lovGridHeight="300" lovHeight="500" lovService="gld.GLD105.gld_je_template_set_for_lov" lovWidth="550" required="true" title="GLD105.GLD_JE_TEMPLATE_SET.JE_TEMPLATE_SET_DESC">
<a:mapping>
<a:map from="je_template_set_desc" to="je_template_set_desc"/>
<a:map from="je_template_set_code" to="je_template_set_code"/>
</a:mapping>
</a:field>
<a:field name="je_transaction_desc" lovGridHeight="300" lovHeight="500" lovService="gld.GLD104.gld_je_transaction_for_lov" lovWidth="550" required="true" title="GLD104.GLD_JE_TRANSACTION.JE_TRANSACTION_DESC">
<a:mapping>
<a:map from="je_transaction_desc" to="je_transaction_desc"/>
<a:map from="je_transaction_code" to="je_transaction_code"/>
</a:mapping>
</a:field>
<a:field name="je_template_desc"/>
<a:field name="je_desc"/>
<a:field name="priority" required="true"/>
<a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="groupDs_grid_query" text="HLS.QUERY"/>
<a:gridButton click="para_groupDs_reset" text="HLS.RESET"/>
<a:gridButton click="groupDs_grid_add" text="HLS.NEW"/>
<a:gridButton click="groupDs_grid_clear" text="HLS.CLEAR"/>
<!-- <a:gridButton click="groupDs_grid_remove" text="HLS.REMOVE"/> -->
<a:gridButton click="groupDs_grid_save" text="HLS.SAVE"/>
</a:screenTopToolbar>
<a:form column="5" labelWidth="90" title="HAP_QUERY_TITLE">
<a:lov name="je_template_set_desc" bindTarget="para_groupDs"/>
<a:lov name="je_transaction_desc" bindTarget="para_groupDs"/>
<a:textField name="template_group_code" bindTarget="para_groupDs"/>
<a:textField name="template_group_desc" bindTarget="para_groupDs"/>
<a:comboBox name="enabled_flag_desc" bindTarget="para_groupDs"/>
</a:form>
<a:grid id="groupDs_grid" bindTarget="groupDs" marginHeight="180" marginWidth="30" navBar="true">
<a:columns>
<a:column name="company_short_name" width="120"/>
<a:column name="je_template_set_desc" editorFunction="editorFunction_groupDs_grid" width="120"/>
<a:column name="je_transaction_desc" editorFunction="editorFunction_groupDs_grid" width="120"/>
<a:column name="priority" align="right" editor="groupDs_grid_nf" width="80"/>
<a:column name="match_rule" align="center" prompt="GLD107.WIN_TITLE.MATCH_RULE" renderer="render_groupDs_grid" width="80"/>
<!-- <a:column name="template_group_code" editorFunction="editorFunction_groupDs_grid" width="200"/> -->
<a:column name="template_group_code" editor="groupDs_grid_tf" width="200"/>
<a:column name="template_group_desc" editor="groupDs_grid_tf" width="250"/>
<a:column name="enabled_flag" align="center" editor="groupDs_grid_checkBox" width="60"/>
<a:column name="template_assign" align="center" prompt="GLD110.GLD_JE_TEMPLATE_GRP.TEMPLATE_ASSIGN" renderer="render_groupDs_grid" width="80"/>
</a:columns>
<a:editors>
<a:textField id="groupDs_grid_tf_upper" maxLength="30"/>
<a:textField id="groupDs_grid_tf"/>
<a:lov id="groupDs_grid_lov"/>
<a:checkBox id="groupDs_grid_checkBox"/>
<a:numberField id="groupDs_grid_nf" allowDecimals="false" allowNegative="false"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>