gld_account_hierarchy.lview 6.98 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 129 130 131
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangyi2652 $
    $Date: 2010/11/01 01:45:18 $
    $Revision: 1.2 $
    $Purpose: “科目层次定义”模块的页面
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:view>
        <a:link id="gld_account_hierarchy_details_link" url="${/request/@context_path}/modules/gld/public/gld_account_hierarchy_details.lview"/>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
            
            function fnd_2150_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
            }
            
            function query_accHierarchyDs() {
                if($('para_accHierarchyDs').validate)
                {
                    $('accHierarchyDs').query();
                }
            }
            
            function reset_para_accHierarchyDs() {
                $('para_accHierarchyDs').reset();
            }
            
            function onUpdate_para_accHierarchyDs(ds, record, name, value) {
                if (name == 'account_set_id') {
                    record.set('account_code_from', null);
                    record.set('account_name_from', null);
                    record.set('account_code_to', null);
                    record.set('account_name_to', null);
            
                    record.getField('account_code_from').setLovPara('account_set_id', record.get('account_set_id'));
                    record.getField('account_code_to').setLovPara('account_set_id', record.get('account_set_id'));
                }
            }
            
            function detailRenderer(value, record, name) {
                if (!record.isNew)
                {
                    return '<a href=\"javascript:winOpen_hierarchDetail(' + record.get('account_set_id') + ',' + value + ')\">${l:GLD_ACCOUNT_HIERARCHY.SUB_ACCOUNT_CODE}</a>';
                }
                return '';
            }
            
            function winOpen_hierarchDetail(account_set_id, account_id) {
                new Leaf.Window({
                    id: 'handleWindow',
                    url: $('gld_account_hierarchy_details_link').getUrl(),
                    params:{
                    	account_set_id:account_set_id,
                    	account_id:account_id
                    },
                    title: '${l:GLD_ACCOUNT_HIERARCHY.SUB_ACCOUNT_CODE}',
                    height: 500,
                    width: 600
                });
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="para_accHierarchyDs" autoCreate="true" model="gld.FND2150.gld_account_hierarchy_query">
                <a:fields>
                    <a:field name="account_set_id"/>
                    <a:field name="account_set_name" prompt="GLD_ACCOUNT_SETS.ACCOUNT_SET_DESC" readonly="true"/>
                    <a:field name="account_set_code" lovGridHeight="300" lovHeight="450" lovService="gld.FND2150.gld_account_set_lov" lovWidth="500" prompt="GLD_ACCOUNT_SETS.ACCOUNT_CODE" required="true" title="GLD_ACCOUNT_SETS.ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="account_set_id" to="account_set_id"/>
                            <a:map from="account_set_code" to="account_set_code"/>
                            <a:map from="account_set_name" to="account_set_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="account_name_from" prompt="FND_CALENDAR.DESCRIPTION" readonly="true"/>
                    <a:field name="account_code_from" lovGridHeight="300" lovHeight="450" lovService="gld.FND2140.gld_accounts_vl_lov" lovWidth="550" prompt="GLD_ACCOUNT_SETS.ACCOUNT_CODE_FROM" title="GLD_ACCOUNT_SETS.ACCOUNT_CODE_FROM">
                        <a:mapping>
                            <a:map from="account_code" to="account_code_from"/>
                            <a:map from="description" to="account_name_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="account_name_to" prompt="FND_CALENDAR.DESCRIPTION" readonly="true"/>
                    <a:field name="account_code_to" lovGridHeight="300" lovHeight="450" lovService="gld.FND2140.gld_accounts_vl_lov" lovWidth="550" prompt="GLD_ACCOUNT_SETS.ACCOUNT_CODE_TO" title="GLD_ACCOUNT_SETS.ACCOUNT_CODE_TO">
                        <a:mapping>
                            <a:map from="account_code" to="account_code_to"/>
                            <a:map from="description" to="account_name_to"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="onUpdate_para_accHierarchyDs"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="accHierarchyDs" autoCount="true" autoPageSize="true" fetchAll="false" model="gld.FND2150.gld_account_hierarchy_query" queryDataSet="para_accHierarchyDs" queryUrl="${/request/@context_path}/autocrud/gld.FND2150.gld_account_hierarchy_query/query"/>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="fnd_2150_quit" text="HLS.EXIT"/>
                <a:gridButton click="query_accHierarchyDs" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="2" title="HAP_QUERY_TITLE">
                <a:lov name="account_set_code" bindTarget="para_accHierarchyDs">
                    <a:events>
                        <a:event name="enterdown" handler="query_accHierarchyDs"/>
                    </a:events>
                </a:lov>
                <a:textField name="account_set_name" bindTarget="para_accHierarchyDs"/>
                <a:lov name="account_code_from" bindTarget="para_accHierarchyDs">
                    <a:events>
                        <a:event name="enterdown" handler="query_accHierarchyDs"/>
                    </a:events>
                </a:lov>
                <a:textField name="account_name_from" bindTarget="para_accHierarchyDs"/>
                <a:lov name="account_code_to" bindTarget="para_accHierarchyDs">
                    <a:events>
                        <a:event name="enterdown" handler="query_accHierarchyDs"/>
                    </a:events>
                </a:lov>
                <a:textField name="account_name_to" bindTarget="para_accHierarchyDs"/>
            </a:form>
            <a:grid id="accHierarchyDs_grid" bindTarget="accHierarchyDs" marginHeight="250" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="account_code" sortable="true" width="300"/>
                    <a:column name="account_description" width="300"/>
                    <a:column name="account_id" align="center" prompt="GLD_ACCOUNTS.SUB_ACCOUNT" renderer="detailRenderer" width="100"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>