fnd_company_hierarchy_assign.lview 3.99 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ouyangzhaochang2663 $
    $Date: 2010/11/03 05:46:38 $
    $Revision: 1.1 $
    $Purpose: 公司层次定义 - 分配公司
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <a:model-query autoCount="true" defaultWhereClause="sysdate between start_date_active and nvl(end_date_active, sysdate)" fetchAll="true" model="fnd.FND3110.fnd_company_hierarchy_company_select" queryOrderBy="company_code" rootPath="companies"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function companyCodeEdit(record,name){
                if(record.isNew){
                    return 'company_code_grid_cmb';
                }else{
                    return '';
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="company_info_ds" loadData="true" model="fnd.FND3110.fnd_company_hierarchy_query">
                <a:fields>
                    <a:field name="company_code" readOnly="true"/>
                    <a:field name="company_short_name" readOnly="true"/>
                    <a:field name="set_of_books_name" readOnly="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="fnd_compaies_ds">
                <a:datas dataSource="/model/companies"/>
            </a:dataSet>
            <a:dataSet id="fnd_company_hierarchy_assign_ds" autoQuery="true" fetchAll="false" model="fnd.FND3110.fnd_company_hierarchy_detail_query" queryUrl="${/request/@context_path}/autocrud/fnd.FND3110.fnd_company_hierarchy_detail_query/query?ORDER_FIELD=account_code&amp;parent_company_id=${/parameter/@company_id}" selectable="true" submitUrl="${/request/@context_path}/autocrud/fnd.FND3110.fnd_company_hierarchy_detail_save_update/batch_update">
                <a:fields>
                    <a:field name="company_code_display" displayField="company_code_display" options="fnd_compaies_ds" returnField="company_id" valueField="company_id">
                        <a:mapping>
                            <a:map from="company_code_display" to="company_code_display"/>
                            <a:map from="company_short_name" to="company_short_name"/>
                            <a:map from="company_type_display" to="company_type_display"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="parent_company_id" defaultValue="${/parameter/@company_id}"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:fieldSet column="2" title="FND_COMPANIES.INFO" width="500">
                <a:textField name="company_code" bindTarget="company_info_ds" typeCase="upper"/>
                <a:textField name="company_short_name" bindTarget="company_info_ds"/>
                <a:textField name="set_of_books_name" bindTarget="company_info_ds"/>
            </a:fieldSet>
            <a:grid bindTarget="fnd_company_hierarchy_assign_ds" height="330" navBar="true" width="580">
                <a:toolBar>
                    <a:button type="add"/>
                    <a:button type="save"/>
                    <a:button type="clear"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="company_code_display" align="center" editorFunction="companyCodeEdit" sortable="true" width="150"/>
                    <a:column name="company_short_name" align="left" width="200"/>
                    <a:column name="company_type_display" align="center"/>
                    <a:column name="enabled_flag" editor="enabled_flag_grid_cb"/>
                </a:columns>
                <a:editors>
                    <a:comboBox id="company_code_grid_cmb"/>
                    <a:checkBox id="enabled_flag_grid_cb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>