exp_employee_group_assign.lview 4.97 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ouyangzhaochang2663 $
    $Date: 2010/11/15 07:46:40 $
    $Revision: 1.2 $
    $Purpose: 员工定义 - 员工分配 - 员工组分配
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
        
            function userGroupCodeEdit(record,name){
                if(record.isNew){
                    return 'expense_user_group_code_lov';
                }
                return '';
            }
            
            function groupAssignCellClick(grid, row, name, record){
                if(name =='expense_user_group_code'){
                    record.getMeta().getField(name).setLovPara('company_id',${/parameter/@company_id});
                }
            }
            function closeGroupAssignWindow(){
                $('exp_employee_group_assign_window').close();
            }
            
          function exp_1050_child3_grid_add(){
                $('exp_1050_child3_grid').showEditorByRecord($('exp_employee_group_assigns_ds').create());
            }
            function exp_1050_child3_grid_clear(){
                $('exp_1050_child3_grid').clear();
            }
            function exp_1050_child3_grid_remove(){
                $('exp_1050_child3_grid').remove();
            }
            function exp_1050_child3_grid_submit() {
                var result_ds = $('exp_employee_group_assigns_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
        
        ]]></script>
        <a:dataSets>
            <a:dataSet id="employee_infomation_ds" loadData="true" model="exp.exp_employees">
                <a:fields>
                    <a:field name="employee_code" readOnly="true"/>
                    <a:field name="name" readOnly="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="company_info_ds" loadData="true" model="fnd.fnd_companies">
                <a:fields>
                    <a:field name="company_code" readOnly="true"/>
                    <a:field name="company_short_name" readOnly="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="exp_employee_group_assigns_ds" autoCount="true" autoQuery="true" fetchAll="false" model="exp.EXP1050.exp_employee_group_assign" notification="有数据没有保存" queryUrl="${/request/@context_path}/autocrud/exp.EXP1050.exp_employee_group_assign/query?employee_id=${/parameter/@employee_id}&amp;company_id=${/parameter/@company_id}" selectable="true">
                <a:fields>
                    <a:field name="expense_user_group_code" lovGridHeight="300" lovHeight="460" lovService="exp.EXP1050.exp_employee_group_assign_lov" lovWidth="500" required="true" title="">
                        <a:mapping>
                            <a:map from="expense_user_group_id" to="expense_user_group_id"/>
                            <a:map from="expense_user_group_code" to="expense_user_group_code"/>
                            <a:map from="description" to="description"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="employee_id" defaultValue="${/parameter/@employee_id}"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="closeGroupAssignWindow" text="HLS.CLOSE"/>
                <a:gridButton click="exp_1050_child3_grid_add" text="HLS.NEW"/>
                <a:gridButton click="exp_1050_child3_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="exp_1050_child3_grid_remove" text="HLS.REMOVE"/>
                <a:gridButton click="exp_1050_child3_grid_submit" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:fieldSet column="2" title="EXP_EMPLOYEE_ASSIGN.EMPLOYEE_INFO">
                <a:textField name="employee_code" bindTarget="employee_infomation_ds"/>
                <a:textField name="name" bindTarget="employee_infomation_ds"/>
                <a:textField name="company_code" bindTarget="company_info_ds"/>
                <a:textField name="company_short_name" bindTarget="company_info_ds"/>
            </a:fieldSet>
            <a:grid id="exp_1050_child3_grid" bindTarget="exp_employee_group_assigns_ds" height="300" navBar="true" width="600">
                <a:columns>
                    <a:column name="expense_user_group_code" editorFunction="userGroupCodeEdit" sortable="true" width="200"/>
                    <a:column name="description" prompt="EXP_EMPLOYEE_GROUP.EXPENSE_USER_GROUP_CODE" width="270"/>
                </a:columns>
                <a:editors>
                    <a:lov id="expense_user_group_code_lov"/>
                </a:editors>
                <a:events>
                    <a:event name="cellclick" handler="groupAssignCellClick"/>
                </a:events>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>