hls_lease_areas.lview 7.34 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 132 133
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ericyin  
    $Date: 2012-12-12 下午2:04:41  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls_104_queryDivision() {
                $('hls104_areas_result_ds').query();
            }
            
            function hls_104_resetDivision() {
                $('hls104_areas_query_ds').reset();
            }
            
            function hls_104_grid_submit() {
                var result_ds = $('hls104_areas_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            
            function hls_104_grid_add() {
                $('hls_area_grid').showEditorByRecord($('hls104_areas_result_ds').create());
            }
            
            function hls_104_next() {
                history.go(1);
            }
            
            function hls_104_back() {
                history.go(-1);
            }
            
            function hls_104_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
            
            function hls_104_grid_clear() {
                $('hls_area_grid').clear();
            }
            
            function hls104ListFunction(record, name) {
                if (record.isNew) {
                    return 'hls104_hls_area_grid_comboBox';
                } else {
                    return '';
                }
            }
            
            function hls104_onUpdate(ds, record, name, value) {
                if (name == 'lease_organizations_display') {
	                record.set('org_description', '');
	                record.set('channel_description', '');
	                record.set('division_description', '');
	                record.set('lease_channel_display', '');
	                record.set('division_display', '');
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls_lease_organizations_ds" loadData="true" model="hls.HLS104.hls_lease_organizations_vl"/>
            <a:dataSet id="hls_lease_channels_ds" loadData="true" model="hls.HLS104.hls_lease_channels_vl"/>
            <a:dataSet id="hls_divisions_ds" loadData="true" model="hls.HLS104.hls_divisions_vl"/>
            <a:dataSet id="hls104_areas_query_ds" model="hls.HLS104.hls_lease_areas"/>
            <a:dataSet id="hls104_areas_result_ds" autoCount="true" autoQuery="true" fetchAll="false" model="hls.HLS104.hls_lease_areas" pageSize="15" queryDataSet="hls104_areas_query_ds" selectable="true">
                <a:fields>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="org_description"/>
                    <a:field name="channel_description"/>
                    <a:field name="division_description"/>
                    <a:field name="lease_organizations_display" displayField="lease_organizations_code" options="hls_lease_organizations_ds" required="true" returnField="lease_organizations_id" valueField="lease_organizations_id">
                        <a:mapping>
                            <a:map from="description" to="org_description"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="lease_channel_display" displayField="lease_channel_code" options="hls_lease_channels_ds" required="true" returnField="lease_channel_id" valueField="lease_channel_id">
                        <a:mapping>
                            <a:map from="description" to="channel_description"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="division_display" displayField="division_code" options="hls_divisions_ds" required="true" returnField="division_id" valueField="division_id">
                        <a:mapping>
                            <a:map from="description" to="division_description"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="hls104_onUpdate"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenTopToolbar height="29">
            <a:button click="hls_104_back" height="20" icon="${/request/@context_path}/images/back.png" iconAlign="left" text="后退" width="50"/>
            <a:separator style="margin-left:3px;"/>
            <a:button click="hls_104_next" height="20" icon="${/request/@context_path}/images/forward.png" iconAlign="left" text="前进" width="50"/>
            <a:separator style="margin-left:3px;"/>
            <a:button click="hls_104_quit" height="20" icon="${/request/@context_path}/images/quit.png" iconAlign="left" text="退出" width="50"/>
            <a:separator style="margin-left:3px;"/>
            <a:button click="hls_104_grid_add" height="20" icon="${/request/@context_path}/images/add.png" iconAlign="left" text="HLS.NEW" width="50"/>
            <a:separator style="margin-left:3px;"/>
            <a:button click="hls_104_grid_clear" height="20" icon="${/request/@context_path}/images/clear.png" iconAlign="left" text="HLS.CLEAR" width="50"/>
            <a:separator style="margin-left:3px;"/>
            <a:button click="hls_104_grid_submit" height="20" icon="${/request/@context_path}/images/save.png" iconAlign="left" text="保存" width="50"/>
            <a:separator style="margin-left:3px;"/>
            <a:button click="hls_104_queryDivision" height="20" icon="${/request/@context_path}/images/search.png" iconAlign="left" text="HAP_QUERY" width="50"/>
            <a:separator style="margin-left:3px;"/>
        </a:screenTopToolbar>
        <a:screenBody>
            <a:grid id="hls_area_grid" bindTarget="hls104_areas_result_ds" height="490" marginWidth="20" navBar="true" width="1000">
                <a:columns>
                    <a:column name="lease_organizations_display" align="left" editorFunction="hls104ListFunction" prompt="HLS_LEASE_AREAS.ORG_DISPLAY" sortable="true" width="100"/>
                    <a:column name="org_description" align="left" prompt="HLS_LEASE_AREAS.ORG_DESCRIPTION" width="200"/>
                    <a:column name="lease_channel_display" align="left" editorFunction="hls104ListFunction" prompt="HLS_LEASE_AREAS.CHANNEL_DISPLAY" width="100"/>
                    <a:column name="channel_description" align="left" prompt="HLS_LEASE_AREAS.CHANNEL_DESCRIPTION" width="200"/>
                    <a:column name="division_display" align="left" editorFunction="hls104ListFunction" prompt="HLS_LEASE_AREAS.DIVISION_DISPLAY" width="100"/>
                    <a:column name="division_description" align="left" prompt="HLS_LEASE_AREAS.DIVISION_DESCRIPTION" width="200"/>
                    <a:column name="enabled_flag" align="center" editor="hls104_hls_area_grid_cb" width="50"/>
                </a:columns>
                <a:editors>
                    <a:comboBox id="hls104_hls_area_grid_comboBox"/>
                    <a:checkBox id="hls104_hls_area_grid_cb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>