sys_role_copy.lview 3.57 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2014-4-29 下午02:06:03  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function sys_role_copy_ds_update(ds, record, name, value, old_value) {
                if (name == 'start_date' || name == 'end_date') {
                    record.validate((name == 'start_date') ? 'end_date' : 'start_date');
                }
            }
            
            function sys_role_copy_save() {
                $('sys_role_copy_ds').submit();
            }
            
            function sys_role_copy_return() {
                $('${/parameter/@winid}').close();
            }
            
            function sys_role_copy_ds_submitsuccess(ds) {
                var parent_ds = $('sys_role_result_ds');
                parent_ds.query(parent_ds.currentPage);
                sys_role_copy_return();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="sys_role_copy_ds" autoCreate="true" model="sys.SYS8110.sys_role_copy">
                <a:fields>
                    <a:field name="orign_role_id" defaultValue="${/parameter/@orign_role_id}"/>
                    <a:field name="orign_role_code" defaultValue="${/parameter/@orign_role_code}" readOnly="true"/>
                    <a:field name="orign_role_name" defaultValue="${/parameter/@orign_role_name}" readOnly="true"/>
                    <a:field name="role_code" required="true"/>
                    <a:field name="start_date" required="true" validator="dateValidator"/>
                    <a:field name="end_date" validator="dateValidator"/>
                    <a:field name="role_name" required="true"/>
                    <a:field name="role_description" required="true"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="sys_role_copy_ds_update"/>
                    <a:event name="submitsuccess" handler="sys_role_copy_ds_submitsuccess"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="sys_role_copy_return" text="HLS.RETURN"/>
                <a:gridButton click="sys_role_copy_save" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:fieldSet column="5" title="SYS870.ORIGN_ROLE" width="1060">
                <a:box column="5" labelWidth="80" width="442">
                    <a:textField name="orign_role_code" bindTarget="sys_role_copy_ds" prompt="SYS_ROLE.ROLE_CODE" width="120"/>
                    <a:textField name="orign_role_name" bindTarget="sys_role_copy_ds" prompt="SYS_ROLE.ROLE_NAME"/>
                </a:box>
            </a:fieldSet>
            <a:fieldSet column="5" labelWidth="80" title="SYS870.NEW_ROLE" width="1062">
                <a:textField name="role_code" bindTarget="sys_role_copy_ds" prompt="SYS_ROLE.ROLE_CODE" width="120"/>
                <a:textField name="role_name" bindTarget="sys_role_copy_ds" prompt="SYS_ROLE.ROLE_NAME"/>
                <a:textField name="role_description" bindTarget="sys_role_copy_ds" prompt="SYS_ROLE.ROLE_DESCRIPTION"/>
                <a:datePicker name="start_date" bindTarget="sys_role_copy_ds" prompt="HAP_START_DATE" width="100"/>
                <a:datePicker name="end_date" bindTarget="sys_role_copy_ds" prompt="HAP_END_DATE" width="100"/>
            </a:fieldSet>
        </a:screenBody>
    </a:view>
</a:screen>