<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangyi2652 $
    $Date: 2010/10/21 07:30:16 $
    $Revision: 1.1 $
    $Purpose: ”员工级别定义“ 模块页面
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
        
            function queryLevel(){
                $('level_definition_result_ds').query();
            }
			function resetLevel(){
				$('level_definition_query_ds').reset();
			}
            function codeEditFunction(record,name){
                if (record.get('level_series_id')){
                    return '';
                }else{
                    return 'level_definition_grid_upper_tf';
                }
            }
        	function exp_1030_grid_add(){
                $('exp_1030_grid').showEditorByRecord($('level_definition_result_ds').create());
            }
            function exp_1030_grid_clear(){
                $('exp_1030_grid').clear();
            }
            function exp_1030_grid_submit() {
                var result_ds = $('level_definition_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            function exp_1030_next(){
                 history.go(1);
            }
            function exp_1030_back(){
                history.go(-1);
            }
            function exp_1030_quit(){
                location.href = $('sys_service_welcome_link').getUrl();
            }

        
        ]]></script>
        <a:dataSets>
            <a:dataSet id="level_definition_query_ds" autoCreate="true" model="exp.EXP1030.exp_employee_levels"/>
            <a:dataSet id="level_definition_result_ds" autoQuery="true" model="exp.EXP1030.exp_employee_levels" pageSize="15" queryDataSet="level_definition_query_ds" queryUrl="${/request/@context_path}/autocrud/exp.EXP1030.exp_employee_levels/query?ORDER_FIELD=employee_levels_code" selectable="true">
                <a:fields>
                    <a:field name="level_series_code_display" lovGridHeight="350" lovHeight="500" lovService="exp.exp_level_series_select" lovWidth="500" required="true" title="EXP_LEVEL_SERIES.LEVEL_SERIES">
                        <a:mapping>
                            <a:map from="level_series_code_display" to="level_series_code_display"/>
                            <a:map from="level_series_id" to="level_series_id"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="employee_levels_code" required="true"/>
                    <a:field name="employee_levels_description" required="true"/>
                    <a:field name="level_series_id" required="true"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" required="true" unCheckedValue="N"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="exp_1030_back" text="HLS.BACK"/>
                <a:gridButton click="exp_1030_next" text="HLS.FORWARD"/>
                <a:gridButton click="exp_1030_quit" text="HLS.EXIT"/>
                <a:gridButton click="exp_1030_grid_add" text="HLS.NEW"/>
                <a:gridButton click="exp_1030_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="exp_1030_grid_submit" text="HLS.SAVE"/>
                <a:gridButton click="queryLevel" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="2" labelWidth="85" title="HAP_QUERY_TITLE">
                <a:textField name="employee_levels_code" bindTarget="level_definition_query_ds" typeCase="upper">
                    <a:events>
                        <a:event name="enterdown" handler="queryLevel"/>
                    </a:events>
                </a:textField>
                <a:textField name="employee_levels_description" bindTarget="level_definition_query_ds">
                    <a:events>
                        <a:event name="enterdown" handler="queryLevel"/>
                    </a:events>
                </a:textField>
            </a:form>
            <a:grid id="exp_1030_grid" bindTarget="level_definition_result_ds" marginHeight="180" marginWidth="30" navBar="true">
                <!-- -->
                <a:columns>
                    <a:column name="employee_levels_code" align="left" editorFunction="codeEditFunction" sortable="true" width="150"/>
                    <a:column name="employee_levels_description" align="left" editor="level_definition_grid_tf" width="230"/>
                    <a:column name="level_series_code_display" align="left" editor="level_definition_grid_cbx" width="230"/>
                    <a:column name="enabled_flag" align="center" editor="level_definition_grid_cb" width="50"/>
                </a:columns>
                <a:editors>
                    <a:textField id="level_definition_grid_tf"/>
                    <a:textField id="level_definition_grid_upper_tf" typeCase="upper"/>
                    <a:lov id="level_definition_grid_cbx"/>
                    <a:checkBox id="level_definition_grid_cb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>