fnd_authorization_grant.lview 4.1 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ
    $Date: 2012-5-30 下午01:20:29  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query model="basic.sys_session_info" rootPath="session_info"/>
    </a:init-procedure>
    <a:view>
        <a:link id="pageLink_grant_detail" url="${/request/@context_path}/modules/fnd/FND402/fnd_authorization_grant_detail.lview"/>
        <script type="text/javascript"><![CDATA[
			function grantDs_confirm() {
			    var ds=$('grantDs');
			    var record = ds.getAt(0);
			    if (ds.validate()) {
			        new Leaf.Window({
			            id: 'fnd_authorization_grant_detail',
			            url: $('pageLink_grant_detail').getUrl(),
			            params: {
			            	role_code_from:record.get('role_code_from'),
			            	role_code_to:record.get('role_code_to')
			            },
			            width: 850,
			            height: 600
			        });
			    }
			}
			
			function grantDs_reset() {
			    var record = $('grantDs').getAt(0);
			    var prop=['para_type','role_code_from','role_code_to'];
			    for (var i=0,j=prop.length;i<j;i++)
			    {
			        record.set(prop[i],'');
			        record.set(prop[i]+'_desc','');
			    }
			}
        ]]></script>
        <a:dataSets>
            <a:dataSet id="grantTypeDs" lookupCode="AUT_AUTHORITY_USAGE"/>
            <a:dataSet id="grantDs" autoCreate="true">
                <a:fields>
                    <a:field name="company_code" defaultValue="${/model/session_info/record/@company_code}" prompt="HLS.COMPANY_CODE" readOnly="true"/>
                    <a:field name="company_name" defaultValue="${/model/session_info/record/@company_short_name}" prompt="HLS.COMPANY_SHORT_NAME" readOnly="true"/>
                    <a:field name="para_type" prompt="类型代码" readOnly="true"/>
                    <a:field name="para_type_desc" displayField="code_value_name" options="grantTypeDs" prompt="参数类型" required="true" returnField="para_type" valueField="code_value"/>
                    <a:field name="role_code_from" prompt="角色代码从" readOnly="true"/>
                    <a:field name="role_code_from_desc" lovGridHeight="300" lovHeight="450" lovLabelWidth="120" lovService="fnd.FND402.fnd_parameter_sys_role_for_lov" lovWidth="500" prompt="角色从">
                        <a:mapping>
                            <a:map from="role_code" to="role_code_from"/>
                            <a:map from="role_name" to="role_code_from_desc"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="role_code_to" prompt="角色代码到" readOnly="true"/>
                    <a:field name="role_code_to_desc" lovGridHeight="300" lovHeight="450" lovLabelWidth="120" lovService="fnd.FND402.fnd_parameter_sys_role_for_lov" lovWidth="500" prompt="角色到">
                        <a:mapping>
                            <a:map from="role_code" to="role_code_to"/>
                            <a:map from="role_name" to="role_code_to_desc"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:form column="2" labelWidth="120" title="权限参数指定">
                <a:textField name="company_name" bindTarget="grantDs"/>
                <a:textField name="company_code" bindTarget="grantDs"/>
                <a:comboBox name="para_type_desc" bindTarget="grantDs"/>
                <a:textField name="para_type" bindTarget="grantDs"/>
                <a:lov name="role_code_from_desc" bindTarget="grantDs"/>
                <a:textField name="role_code_from" bindTarget="grantDs"/>
                <a:lov name="role_code_to_desc" bindTarget="grantDs"/>
                <a:textField name="role_code_to" bindTarget="grantDs"/>
            </a:form>
            <a:hBox>
                <a:button click="grantDs_confirm" text="确认"/>
                <a:button click="grantDs_reset" text="重置"/>
            </a:hBox>
        </a:screenBody>
    </a:view>
</a:screen>