<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ericyin  
    $Date: 2013-4-1 下午3:11:36  
    $Revision: 1.0  
    $Purpose: 租赁物账户组定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view template="default">
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
            function queryFunction() {
                $('hls_lease_item_type_result_ds').query();
            }
            
            function hls_015_back() {
                history.go(-1);
            }
            
            function hls_015_next() {
                history.go(1);
            }
            
            function hls_015_quit() {
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
            
            function hls_015_grid_add() {
                var grid=$('hls_lease_item_type_grid');
                $('hls_lease_item_type_grid').showEditorByRecord($('hls_lease_item_type_result_ds').create());
            }
            
            function hls_015_grid_clear() {
                $('hls_lease_item_type_grid').clear();
            }
            
            function hls_015_grid_remove() {
                $('hls_lease_item_type_grid').remove();
            }
            
            function hls_015_grid_submit() {
                $('hls_lease_item_type_result_ds').submit();
            }
            
            function leaseItemTypeDs_editorOnlyOnce(record, name){
				if(record.isNew){
				    if(name=='lease_item_type')
				    {
				        return 'leaseItemType_code_tf';
				    }
				    else
				    {
				        return '';
				    }
				}
            }
            function hls_015_submitsuccess(){
                $('hls_lease_item_type_result_ds').query();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls_lease_item_type_result_ds" autoQuery="true" model="hls.HLS015.hls_lease_item_type" selectable="true">
                <a:fields>
                    <a:field name="lease_item_type" required="true"/>
                    <a:field name="description" required="true"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                </a:fields>
            </a:dataSet>
            <a:events>
                <a:event name="submitsuccess" handler="hls_015_submitsuccess"/>
            </a:events>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls_015_quit" text="HLS.EXIT"/>
                <a:gridButton click="hls_015_grid_add" text="HLS.NEW"/>
                <a:gridButton click="hls_015_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="hls_015_grid_submit" text="HLS.SAVE"/>
                <a:gridButton click="queryFunction" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:grid id="hls_lease_item_type_grid" bindTarget="hls_lease_item_type_result_ds" marginHeight="80" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="lease_item_type" editorFunction="leaseItemTypeDs_editorOnlyOnce" width="100"/>
                    <a:column name="description" editor="leaseItemTpyeDs_tf" width="200"/>
                    <a:column name="enabled_flag" editor="leaseItemTpye_chk" width="50"/>
                </a:columns>
                <a:editors>
                    <a:textField id="leaseItemType_code_tf" maxLength="4"/>
                    <a:textField id="leaseItemTpyeDs_tf"/>
                    <a:checkBox id="leaseItemTpye_chk"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
