exp_org_position.lview 7.93 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 134 135 136 137 138 139 140 141 142
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ouyangzhaochang2663 $
    $Date: 2011/01/19 08:10:39 $
    $Revision: 1.6 $
    $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 queryPosition(){
                $('exp_org_position_result_ds').query();
            }
            function codeEditFunction(record,name){
                if (record.isNew){
                    return 'position_code_tf';
                }else{
                    return '';
                }
            }

            function gridCellClick(grid, row, name, record){
                if(name == 'parent_position_name_display'){
                    var position_id = record.get('position_id');
                    if(!!position_id){
                        record.getMeta().getField(name).setLovPara('position_id',position_id);
                    }
                }
            }
            function reset(){
            	$('exp_org_position_query_ds').reset();
            }   
            function exp_1020_grid_add(){
                $('exp_1020_grid').showEditorByRecord($('exp_org_position_result_ds').create());
            }
            function exp_1020_grid_clear(){
                $('exp_1020_grid').clear();
            }
            function exp_1020_grid_submit() {
                var result_ds = $('exp_org_position_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            function exp_1020_next(){
                 history.go(1);
            }
            function exp_1020_back(){
                history.go(-1);
            }
            function exp_1020_quit(){
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }         
            
        ]]></script>
        <a:dataSets>
            <a:dataSet id="unit_ds" autoCount="false" fetchAll="true" loadData="true" model="exp.EXP1020.exp_org_position_unit_select"/>
            <a:dataSet id="job_ds" autoCount="false" fetchAll="true" loadData="true" model="exp.EXP1020.exp_org_position_job_select"/>
            <a:dataSet id="position_type_ds" lookupCode="HR_POSITION_TYPE"/>
            <a:dataSet id="exp_org_position_query_ds" model="exp.exp_org_position"/>
            <a:dataSet id="exp_org_position_result_ds" autoCount="true" fetchAll="false" model="exp.exp_org_position" notification="有数据没有保存" pageSize="15" queryDataSet="exp_org_position_query_ds" queryUrl="${/request/@context_path}/autocrud/exp.exp_org_position/query?ORDER_FIELD=position_code" selectable="true" submitUrl="${/request/@context_path}/modules/exp/EXP1020/exp_org_position.lsc">
                <a:fields>
                    <a:field name="parent_position_name_display" lovHeight="470" lovService="exp.EXP1020.exp_org_position_parent_position_select?ORDER_FIELD=parent_position_name_display" lovWidth="510" options="parent_position_ds" title="EXP_ORG_POSITION.PARENT_POSITION_ID" valueField="position_id">
                        <a:mapping>
                            <a:map from="position_id" to="parent_position_id"/>
                            <a:map from="parent_position_name_display" to="parent_position_name_display"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="org_unit_description_display" displayField="org_unit_description_display" options="unit_ds" required="true" returnField="unit_id" valueField="unit_id"/>
                    <a:field name="employee_job_desc_display" displayField="employee_job_desc_display" options="job_ds" returnField="employee_job_id" valueField="employee_job_id"/>
                    <a:field name="position_code" required="true"/>
                    <a:field name="position_name" required="true"/>
                    <a:field name="company_id" defaultValue="${/session/@company_id}"/>
                    <a:field name="position_type_display" displayField="code_value_name" options="position_type_ds" required="true" returnField="position_type" valueField="code_value"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" unCheckedValue="N"/>
                </a:fields>
            </a:dataSet>
            <!--上级岗位对应的dataSet
            <a:dataSet autoCount="false" fetchAll="true" id="parent_position_ds" loadData="true" model="exp.exp_org_position_parent_position_select"/>
            -->
            <!-- 部门对应的dataSet -->
            <!-- 职务对应的-->
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="exp_1020_back" text="HLS.BACK"/>
                <a:gridButton click="exp_1020_next" text="HLS.FORWARD"/>
                <a:gridButton click="exp_1020_quit" text="HLS.EXIT"/>
                <a:gridButton click="exp_1020_grid_add" text="HLS.NEW"/>
                <a:gridButton click="exp_1020_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="exp_1020_grid_submit" text="HLS.SAVE"/>
                <a:gridButton click="queryPosition" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="2" labelWidth="85" title="HAP_QUERY_TITLE">
                <a:textField name="position_code" bindTarget="exp_org_position_query_ds" typeCase="upper">
                    <a:events>
                        <a:event name="enterdown" handler="queryPosition"/>
                    </a:events>
                </a:textField>
                <a:textField name="position_name" bindTarget="exp_org_position_query_ds">
                    <a:events>
                        <a:event name="enterdown" handler="queryPosition"/>
                    </a:events>
                </a:textField>
            </a:form>
            <a:grid id="exp_1020_grid" bindTarget="exp_org_position_result_ds" marginHeight="180" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="position_code" align="left" editorFunction="codeEditFunction" width="100"/>
                    <a:column name="position_name" align="left" editor="position_name_tf" width="200"/>
                    <a:column name="parent_position_name_display" align="left" editor="parent_position_name_display_lov" width="200"/>
                    <a:column name="org_unit_description_display" align="left" editor="org_unit_description_display_cmb" width="200"/>
                    <a:column name="employee_job_desc_display" align="left" editor="employee_job_desc_display_cmb" width="200"/>
                    <a:column name="position_type_display" align="left" editor="position_type_desc_display_cmb" width="200"/>
                    <a:column name="enabled_flag" align="center" editor="enabled_flag_grid_checkBox" width="60"/>
                </a:columns>
                <a:editors>
                    <a:textField id="position_code_tf" typeCase="upper"/>
                    <a:textField id="position_name_tf"/>
                    <a:lov id="parent_position_name_display_lov"/>
                    <a:comboBox id="org_unit_description_display_cmb"/>
                    <a:comboBox id="employee_job_desc_display_cmb"/>
                    <a:comboBox id="position_type_desc_display_cmb"/>
                    <a:checkBox id="enabled_flag_grid_checkBox"/>
                </a:editors>
                <a:events>
                    <a:event name="cellclick" handler="gridCellClick"/>
                </a:events>
            </a:grid>
        </a:screenBody>
        <script type="text/javascript"><![CDATA[
        	        	
        		$('exp_org_position_result_ds').setQueryParameter('company_id','${/session/@company_id}');
        		$('exp_org_position_result_ds').query();        		
        	
        ]]></script>
    </a:view>
</a:screen>