exp_employee_group_relations.lview 5.94 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ouyangzhaochang2663 $
    $Date: 2010/11/22 01:49:00 $
    $Modify: duanjian 
    $Date: 2012/2/6 $
    $Revision: 1.2 $
    $Purpose “员工组定义” 模块中,“员工分配ID”功能的页面
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
        	

            function codeEditFunction_relation(record,name){
                if (!record.isNew){
                    return '';
                }else{
                    return 'relation_grid_lov';
                }
            }

            function relationsGridDsUpdate(ds,record,name,value){
                record.set('expense_user_group_id','${/parameter/@expense_user_group_id}');
            }
            
            function closeWindow(){
                $('employee_id_edit.lview').close();
            }
            
            function exp_1060_child_grid_add(){
                $('relation_grid').showEditorByRecord($('relations_grid_ds').create());
            }
            function exp_1060_child_grid_clear(){
                $('relation_grid').clear();
            }
            function exp_1060_child_grid_remove(){
                $('relation_grid').remove();
            }
            function exp_1060_child_grid_submit() {
                var result_ds = $('relations_grid_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            function exp_1060_child_next(){
                 history.go(1);
            }
            function exp_1060_child_back(){
                history.go(-1);
            }
            function exp_1060_child_quit(){
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }

        
        ]]></script>
        <a:dataSets>
            <a:dataSet id="relations_fieldSet_ds" autoCreate="true" model="exp.EXP1060.exp_user_group_headers">
                <a:fields>
                    <a:field name="expense_user_group_code" defaultValue="${/parameter/@expense_user_group_code}" readOnly="true"/>
                    <a:field name="description" defaultValue="${/parameter/@description}" readOnly="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="relations_grid_ds" autoCount="true" autoQuery="true" fetchAll="false" model="exp.EXP1060.exp_user_group_lines" notification="有数据没有保存" pageSize="10" queryUrl="${/request/@context_path}/autocrud/exp.EXP1060.exp_user_group_lines/query?ORDER_FIELD=employee_code&amp;expense_user_group_id=${/parameter/@expense_user_group_id}" selectable="true">
                <!-- pageSize="1" -->
                <a:fields>
                    <a:field name="employee_code" autoComplete="true" lovGridHeight="300" lovHeight="460" lovService="exp.EXP1060.exp_emp_company_group_relations_lov?expense_user_group_id=${/parameter/@expense_user_group_id}" lovWidth="500" required="true" title="HAP_NEW">
                        <a:mapping>
                            <a:map from="employee_id" to="employee_id"/>
                            <a:map from="employee_code" to="employee_code"/>
                            <a:map from="name" to="name"/>
                            <a:map from="company_short_name" to="company_short_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="name" readOnly="true"/>
                    <!--<a:field name="expense_user_group_id" defaultValue="${/parameter/@expense_user_group_id}" readOnly="true"/>-->
                </a:fields>
                <a:events>
                    <a:event name="update" handler="relationsGridDsUpdate"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar height="29">
                <a:button click="exp_1060_child_grid_add" height="20" icon="${/request/@context_path}/images/add.png" iconAlign="left" text="新增" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="exp_1060_child_grid_remove" height="20" icon="${/request/@context_path}/images/remove.png" iconAlign="left" text="删除" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="exp_1060_child_grid_clear" height="20" icon="${/request/@context_path}/images/clear.png" iconAlign="left" text="移除" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="exp_1060_child_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="closeWindow" height="20" icon="${/request/@context_path}/images/quit.png" iconAlign="left" text="退出" width="50"/>
                <a:separator style="margin-left:3px;"/>
            </a:screenTopToolbar>
            <a:fieldSet column="2" title="EXP_EMPLOYEE_GROUP.INFO" width="700">
                <a:textField name="expense_user_group_code" bindTarget="relations_fieldSet_ds"/>
                <a:textField name="description" bindTarget="relations_fieldSet_ds"/>
            </a:fieldSet>
            <a:grid id="relation_grid" bindTarget="relations_grid_ds" height="430" navBar="true" width="700">
                <a:columns>
                    <a:column name="employee_code" align="left" editorFunction="codeEditFunction_relation" prompt="EXP_EMPLOYEE.EMPLOYEE_CODE" sortable="true" width="100"/>
                    <a:column name="name" prompt="EXP_EMPLOYEE.NAME" width="170"/>
                </a:columns>
                <a:editors>
                    <a:lov id="relation_grid_lov"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
        <script type="text/javascript"><![CDATA[
        	
        ]]></script>
    </a:view>
</a:screen>