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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ $
$Date: 2013/05/08 07:47:05 $
$Revision: 1.2 $
$Purpose: 编码规则定义 - 明细
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure><![CDATA[
]]></a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
function ruleDetailDs_grid_add() {
$('ruleDetailDs_grid').showEditorByRecord($('ruleDetailDs').create());
}
function ruleDetailDs_grid_clear() {
$('ruleDetailDs_grid').clear();
}
function ruleDetailDs_grid_remove() {
$('ruleDetailDs_grid').remove();
}
function ruleDetailDs_grid_submit() {
var result_ds = $('ruleDetailDs');
if (result_ds.validate()) {
result_ds.submit();
}
}
function onUpdate_ruleDetailDs(ds, record, name, value, oldvalue)
{
if(name=='segment_type')
{
if(value!='01')
{
record.set('segment_value', '');
}
if(value!='02')
{
record.set('data_format', '');
record.set('date_format_name', '');
}
if(value!='04')
{
record.set('display_flag', 'Y');
}
if(value!='06')
{
record.set('length', '');
record.set('incremental', '');
record.set('start_value', '');
}
}
}
function editorFunction_ruleDetailDs_grid(record, name) {
if(name=='segment_value')
{
if (record.get('segment_type') == '01')
{
return 'ruleDetailDs_grid_editor_tf_upper';
}
return '';
}
if(name=='date_format_name')
{
if (record.get('segment_type') == '02') {
return 'ruleDetailDs_grid_editor_comb';
}
return '';
}
if(name=='display_flag')
{
if (record.get('segment_type') == '04') {
return 'ruleDetailDs_grid_editor_check';
}
return '';
}
if (name == 'length' || name == 'incremental' || name == 'start_value') {
if (record.get('segment_type') == '06') {
return 'ruleDetailDs_grid_editor_nf_integer';
}
return '';
}
return '';
}
]]></script>
<a:dataSets>
<a:dataSet id="segment_type_ds" lookupCode="CODING_RULE_SEGMENT"/>
<a:dataSet id="date_format_ds" lookupCode="FND_DATE_FORMAT"/>
<a:dataSet id="ruleDetailHeadDs" loadData="true" model="fnd.FND1910.fnd_coding_rule_v">
<a:fields>
<a:field name="document_category_desc" readOnly="true"/>
<a:field name="document_type_desc" readOnly="true"/>
<a:field name="company_code" readOnly="true"/>
<a:field name="operation_unit_name" readOnly="true"/>
<a:field name="coding_rule_code" readOnly="true"/>
<a:field name="reset_frequence_name" readOnly="true"/>
</a:fields>
</a:dataSet>
<a:dataSet id="ruleDetailDs" autoQuery="true" fetchAll="false" model="fnd.FND1910.fnd_coding_rule_details" queryUrl="${/request/@context_path}/autocrud/fnd.FND1910.fnd_coding_rule_details/query?coding_rule_id=${/parameter/@coding_rule_id}" selectable="true">
<a:fields>
<!-- <a:field name="coding_rule_object_id" defaultValue="${/parameter/@coding_rule_object_id}"/> -->
<a:field name="coding_rule_id" defaultValue="${/parameter/@coding_rule_id}"/>
<a:field name="sequence" required="true"/>
<a:field name="segment_type" required="true"/>
<a:field name="segment_type_name" displayField="code_value_name" options="segment_type_ds" returnField="segment_type" valueField="code_value"/>
<a:field name="date_format_name" displayField="code_value_name" options="date_format_ds" returnField="date_format" valueField="code_value"/>
<a:field name="display_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
</a:fields>
<a:events>
<a:event name="update" handler="onUpdate_ruleDetailDs"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton click="ruleDetailDs_grid_add" text="HLS.NEW"/>
<a:gridButton click="ruleDetailDs_grid_clear" text="HLS.CLEAR"/>
<a:gridButton click="ruleDetailDs_grid_remove" text="HLS.REMOVE"/>
<a:gridButton click="ruleDetailDs_grid_submit" text="HLS.SAVE"/>
</a:screenTopToolbar>
<a:fieldSet column="2" labelWidth="90" title="FND1910.CODING_RULE_INFO">
<a:textField name="document_category_desc" bindTarget="ruleDetailHeadDs"/>
<a:textField name="document_type_desc" bindTarget="ruleDetailHeadDs"/>
<a:textField name="company_code" bindTarget="ruleDetailHeadDs"/>
<a:textField name="operation_unit_name" bindTarget="ruleDetailHeadDs"/>
<a:textField name="coding_rule_code" bindTarget="ruleDetailHeadDs"/>
<a:textField name="reset_frequence_name" bindTarget="ruleDetailHeadDs"/>
</a:fieldSet>
<a:grid id="ruleDetailDs_grid" bindTarget="ruleDetailDs" height="350" navBar="true" width="660">
<a:columns>
<a:column name="sequence" align="right" editor="ruleDetailDs_grid_editor_nf_integer" width="60"/>
<a:column name="segment_type_name" align="left" editor="ruleDetailDs_grid_editor_comb"/>
<a:column name="segment_value" editorFunction="editorFunction_ruleDetailDs_grid"/>
<a:column name="date_format_name" align="center" editorFunction="editorFunction_ruleDetailDs_grid"/>
<a:column name="length" align="right" editorFunction="editorFunction_ruleDetailDs_grid" width="60"/>
<a:column name="incremental" align="right" editorFunction="editorFunction_ruleDetailDs_grid" width="60"/>
<a:column name="start_value" align="right" editorFunction="editorFunction_ruleDetailDs_grid" width="60"/>
<a:column name="display_flag" align="center" editorFunction="editorFunction_ruleDetailDs_grid" width="60"/>
</a:columns>
<a:editors>
<a:numberField id="ruleDetailDs_grid_editor_nf_integer" allowDecimals="false" allowNegative="false"/>
<a:comboBox id="ruleDetailDs_grid_editor_comb"/>
<a:textField id="ruleDetailDs_grid_editor_tf_upper" typeCase="upper"/>
<a:checkBox id="ruleDetailDs_grid_editor_check"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>