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
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ouyangzhaochang2663 $
$Date: 2010/11/15 07:47:05 $
$Revision: 1.2 $
$Purpose: 公司层次定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query autoCount="true" defaultWhereClause="enabled_flag = 'Y'" fetchAll="true" model="gld.gld_set_of_books" queryOrderBy="set_of_books_code" rootPath="set_of_books_list"/>
</a:init-procedure>
<a:view>
<a:link id="fnd_company_hierarchy_tree_link" url="${/request/@context_path}/modules/fnd/FND3110/fnd_company_hierarchy_tree.lview"/>
<a:link id="fnd_company_hierarchy_assign_link" url="${/request/@context_path}/modules/fnd/FND3110/fnd_company_hierarchy_assign.lview"/>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<script type="text/javascript"><![CDATA[
function queryCompanies() {
$('fnd_companies_result_ds').query();
}
function resetCompanies() {
$('fnd_companies_query_ds').reset();
}
function subCompany(value, record, name) {
var setOfBooksId = record.get('set_of_books_id');
return '<a href="javascript:subCompanyInfo(' + value + ',' + setOfBooksId + ')">${l:FND_COMPANY_HIERARCHY_DETAIL.SUB_COMPANY}</a>';
}
function subCompanyInfo(company_id, set_of_books_id) {
new Leaf.Window({
id: 'fnd_company_hierarchy_assign_window',
url: $('fnd_company_hierarchy_assign_link').getUrl() + '?company_id=' + company_id + '&set_of_books_id=' + set_of_books_id,
title: '${l:COMPANY_HIERARCHY_DEFINATION.ASSIGN_COMPANY}',
height: 450,
width: 600
});
}
function treeView() {
new Leaf.Window({
id: 'fnd_company_hierarchy_assign_window',
url: $('fnd_company_hierarchy_tree_link').getUrl(),
title: '${l:FND_COMPANY_HIERARCHY.COMPANY_HIERARCHY_QUERY}',
height: 450,
width: 320
});
}
function fnd_3110_grid_add() {
$('fnd_3110_sys_service_grid').showEditorByRecord($('sys_service_result_ds').create());
}
function fnd_3110_grid_clear() {
$('fnd_3110_sys_service_grid').clear();
}
function fnd_3110_grid_remove() {
$('fnd_3110_sys_service_grid').remove();
}
function fnd_3110_grid_submit() {
var result_ds = $('sys_service_result_ds');
if (result_ds.validate()) {
result_ds.submit();
}
}
function fnd_3110_next() {
history.go(1);
}
function fnd_3110_back() {
history.go(-1);
}
function fnd_3110_quit() {
location.href = $('sys_service_welcome_link').getUrl();
}
]]></script>
<a:dataSets>
<a:dataSet id="gld_set_of_books_ds">
<a:datas dataSource="/model/set_of_books_list"/>
</a:dataSet>
<a:dataSet id="fnd_companies_query_ds" model="fnd.FND3110.fnd_company_hierarchy_query">
<a:fields>
<a:field name="set_of_books_name" displayField="set_of_books_name_display" options="gld_set_of_books_ds" returnField="set_of_books_id" valueField="set_of_books_id"/>
</a:fields>
</a:dataSet>
<a:dataSet id="fnd_companies_result_ds" autoQuery="true" fetchAll="false" model="fnd.FND3110.fnd_company_hierarchy_query" pageSize="15" queryDataSet="fnd_companies_query_ds"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="fnd_3110_back" text="HLS.BACK"/>
<a:gridButton click="fnd_3110_next" text="HLS.FORWARD"/>
<a:gridButton click="fnd_3110_quit" text="HLS.EXIT"/>
<a:gridButton click="queryCompanies" text="HLS.QUERY"/>
<a:gridButton click="treeView" text="FND_COMPANY_HIERARCHY.VIEW_HIERARCHY"/>
</a:screenTopToolbar>
<a:form column="3" title="HAP_QUERY_TITLE">
<a:textField name="company_code" bindTarget="fnd_companies_query_ds" typeCase="upper">
<a:events>
<a:event name="enterdown" handler="queryCompanies"/>
</a:events>
</a:textField>
<a:textField name="company_short_name" bindTarget="fnd_companies_query_ds">
<a:events>
<a:event name="enterdown" handler="queryCompanies"/>
</a:events>
</a:textField>
<a:comboBox name="set_of_books_name" bindTarget="fnd_companies_query_ds" width="150"/>
</a:form>
<a:grid bindTarget="fnd_companies_result_ds" marginHeight="180" marginWidth="30" navBar="true">
<a:columns>
<a:column name="company_code" align="center" sortable="true" width="150"/>
<a:column name="company_short_name" align="left" width="250"/>
<a:column name="set_of_books_name" align="center" width="200"/>
<a:column name="company_id" align="center" prompt="FND_COMPANY_HIERARCHY_DETAIL.SUB_COMPANY" renderer="subCompany" width="95"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>