fnd_company.lview 6.55 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 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ouyangzhaochang2663 $
    $Date: 2010/11/15 07:47:05 $
    $Revision: 1.4 $
    $Purpose: 公司查询
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query autoCount="true" defaultWhereClause="enabled_flag = &apos;Y&apos;" 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_create_link" url="${/request/@context_path}/modules/fnd/FND2020/fnd_company_create.lview"/>
        <a:link id="fnd_company_update_link" url="${/request/@context_path}/modules/fnd/FND2020/fnd_company_update.lview"/>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
            function fnd_2020_next() {
                history.go(1);
            }
            
            function fnd_2020_back() {
                history.go(-1);
            }
            
            function fnd_2020_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
            
            function queryCompanies() {
                $('fnd_companies_result_ds').query();
            }
            
            function resetCompanies() {
                $('fnd_companies_query_ds').reset();
            }
            
            function showViewCompanyRenderer(value,record,name)
            {
                var company_id=record.get('company_id');
                return '<a href="javascript:editCompany(' +company_id+ ')">'+value+'</a>';
            }
            
            function viewCompanyRenderer(value, record, name) {
                return '<a href="javascript:editCompany(' + value + ')">${l:PROMPT.EDIT}</a>';
            }
            
            function editCompany(id) {
                new Leaf.Window({
                    id: 'company_edit_window',
                    url: $('fnd_company_update_link').getUrl() + '?company_id=' + id,
                    title: '${l:FND_COMPANIES.DEFINE}',
                    // height: 400,
                    // width: 600
                    fullScreen: true
                });
            }
            
            function openCreateCompanyWindow(grid, record, row, index) {
                new Leaf.Window({
                    id: 'company_create_window',
                    url: $('fnd_company_create_link').getUrl(),
                    title: '${l:FND_COMPANIES.DEFINE}',
                    // height: 400,
                    // width: 600
                    fullScreen: true
                });
            }
        ]]></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.fnd_companies">
                <a:fields>
                    <a:field name="include_disabled_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
                    <a:field name="set_of_books_id_display" 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" autoCount="true" autoQuery="true" fetchAll="false" model="fnd.fnd_companies" pageSize="15" queryDataSet="fnd_companies_query_ds" queryUrl="${/request/@context_path}/autocrud/fnd.fnd_companies/query?ORDER_FIELD=company_code">
                <a:fields>
                    <a:field name="start_date_active" datatype="date"/>
                    <a:field name="end_date_active" datatype="date"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="fnd_2020_back" text="HLS.BACK"/>
                <a:gridButton click="fnd_2020_next" text="HLS.FORWARD"/>
                <a:gridButton click="fnd_2020_quit" text="HLS.EXIT"/>
                <a:gridButton click="openCreateCompanyWindow" text="HLS.NEW"/>
                <a:gridButton click="queryCompanies" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="4" labelWidth="120" title="HAP_QUERY_TITLE">
                <a:textField name="company_code" bindTarget="fnd_companies_query_ds" typeCase="upper" width="150">
                    <a:events>
                        <a:event name="enterdown" handler="queryCompanies"/>
                    </a:events>
                </a:textField>
                <a:textField name="company_short_name" bindTarget="fnd_companies_query_ds" width="150">
                    <a:events>
                        <a:event name="enterdown" handler="resetCompanies"/>
                    </a:events>
                </a:textField>
                <a:comboBox name="set_of_books_id_display" bindTarget="fnd_companies_query_ds" width="150"/>
                <a:checkBox name="include_disabled_flag" bindTarget="fnd_companies_query_ds" prompt="包含失效公司"/>
            </a:form>
            <a:grid bindTarget="fnd_companies_result_ds" marginHeight="180" marginWidth="30" navBar="true" width="1000">
                <a:columns>
                    <a:column name="company_code" align="left" renderer="showViewCompanyRenderer" width="100"/>
                    <a:column name="company_type_display" align="left" width="80"/>
                    <a:column name="company_short_name" align="left" width="100"/>
                    <a:column name="company_full_name" align="left" width="200"/>
                    <a:column name="set_of_books_id_display" align="left" width="200"/>
                    <!-- <a:column name="company_level_id_display" align="left" width="150"/> -->
                    <!-- <a:column name="chief_position_id_display" align="left" width="100"/> -->
                    <a:column name="parent_biz_company_display" align="left" width="250"/>
                    <a:column name="start_date_active" align="left" renderer="Leaf.formatDate" width="90"/>
                    <a:column name="end_date_active" align="left" renderer="Leaf.formatDate" width="90"/>
                    <!-- <a:column name="address" align="left" width="150"/> -->
                    <a:column name="company_id" Renderer="viewCompanyRenderer" align="center" prompt="HAP_EDIT" width="50"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>