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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ouyangzhaochang2663 $
$Date: 2010/11/15 07:47:59 $
$Revision: 1.4 $
$Purpose: 科目结构定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure><![CDATA[
]]></a:init-procedure>
<a:view>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
<script type="text/javascript"><![CDATA[
function queryStructure(){
$('gld_coa_structure_result_ds').query();
}
function fnd_2130_grid_add(){
$('gld_coa_structure_grid').showEditorByRecord($('gld_coa_structure_result_ds').create());
}
function fnd_2130_grid_clear(){
$('gld_coa_structure_grid').clear();
}
function fnd_2130_grid_submit() {
var result_ds = $('gld_coa_structure_result_ds');
if (result_ds.validate()) {
result_ds.submit();
}
}
function fnd_2130_next(){
history.go(1);
}
function fnd_2130_back(){
history.go(-1);
}
function fnd_2130_quit(){
location.href = $('sys_service_welcome_link').getUrl();
parent.shMenu('show');
}
function structureCodeEdit(record,name){
if(record.isNew){
if(name=='coa_structure_code'){
return 'coa_structure_code_grid_tf';
}
if(name=='structure_format'){
return 'structure_format_grid_tf';
}
}
return '';
}
function structureFormatValidator(record, name, value){
var valid = true;
value = String(value)
for (var i=0;i<value.length;i++){
if (value.substr(i,1)!='9'&& value.substr(i,1)!='.'){
Leaf.showMessage('${l:PROMPT}','${l:COURSE_STRUCTURE_FORMAT_ERROR}',null,420);
valid = '${l:COURSE_STRUCTURE_FORMAT_ERROR}';
break;
}
}
return valid;
}
function reset(){
$('gld_coa_structure_query_ds').reset();
}
]]></script>
<a:dataSets>
<a:dataSet id="gld_coa_structure_query_ds" model="gld.gld_coa_structure"/>
<a:dataSet id="gld_coa_structure_result_ds" autoQuery="true" fetchAll="false" model="gld.gld_coa_structure" notification="有数据没有保存" pageSize="15" queryDataSet="gld_coa_structure_query_ds" selectable="true">
<a:fields>
<a:field name="coa_structure_code" required="true" validator="hlsCommon_validateCode"/>
<a:field name="structure_format" required="true" validator="structureFormatValidator"/>
<a:field name="description" required="true"/>
<a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton click="fnd_2130_quit" text="HLS.EXIT"/>
<a:gridButton click="queryStructure" text="HLS.QUERY"/>
<a:gridButton click="fnd_2130_grid_add" text="HLS.NEW"/>
<a:gridButton click="fnd_2130_grid_clear" text="HLS.CLEAR"/>
<a:gridButton click="fnd_2130_grid_submit" text="HLS.SAVE"/>
</a:screenTopToolbar>
<a:grid id="gld_coa_structure_grid" bindTarget="gld_coa_structure_result_ds" height="490" marginWidth="20" navBar="true" width="1000">
<a:columns>
<a:column name="coa_structure_code" align="left" editorFunction="structureCodeEdit" sortable="true" width="150"/>
<a:column name="structure_format" align="left" editorFunction="structureCodeEdit" sortable="true" width="200"/>
<a:column name="description" align="left" editor="description_grid_tf" width="220"/>
<a:column name="enabled_flag" align="center" editor="description_grid_ckb"/>
</a:columns>
<a:editors>
<a:textField id="coa_structure_code_grid_tf" typeCase="upper"/>
<a:textField id="structure_format_grid_tf"/>
<a:textField id="description_grid_tf"/>
<a:checkBox id="description_grid_ckb"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>