fnd_interest_rate_set.lview 7 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 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
<?xml version="1.0" encoding="UTF-8"?>
<!-- 
  create by xuls 2014-11-10
     用于租赁利率设置
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="fnd253_rate_set_copy_link" url="${/request/@context_path}/modules/fnd/FND253/fnd_int_rate_set_copy.lview"/>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <a:link id="pageLink_rate_detail" url="${/request/@context_path}/modules/fnd/FND253/fnd_interest_rate.lview"/>
        <script type="text/javascript"><![CDATA[
			function fnd253_forward() {
	            history.go(1);
	        }
	        
	        function fnd253_back() {
	            history.go(-1);
	        }
	        
	        function fnd253_quit() {
	            location.href = $('sys_service_welcome_link').getUrl();
	        }
        	
	        function fnd253_grid_query() {
	            $('fnd253_int_rate_set_ds').query();
	        }
	        function rateSetDs_grid_add() {
	            $('rateSetDs_grid').showEditorByRecord($('rateSetDs').create());
	        }
	        
	        function fnd253_grid_clear() {
	            $('rateSetDs_grid').clear();
	        }
	        
	        function rateSetDs_grid_save() {
	            var result_ds = $('rateSetDs');
	            if (result_ds.validate()) {
	                result_ds.submit();
	            }
	        }
	        function fnd253_set_comboxed_fun(record,name){
	            if (record.isNew){
	                return 'fnd253_set_comboxed';
	            }
	            return;
	        }
	        function fnd253_set_texted_fun(record,name){
	            if (record.isNew){
	                return 'fnd253_set_texted';
	            }
	            return;
	        }
	        function fnd253_set_texted_upper_fun(record,name){
	            if (record.isNew){
	                return 'fnd253_set_texted_upper';
	            }
	            return;
	        }
	        
	        function fnd253_set_dated_fun(record,name){
	           if (record.isNew){
	                return 'fnd253_set_dated';
	            }
	            return; 
	        }
	        
	        function winOpen_rate_detail(int_rate_set,currency)
			{
			    new Leaf.Window({
	                id: 'fnd_int_rate_set',
	                url: $('pageLink_rate_detail').getUrl(),
	                params:{
	                	int_rate_set:int_rate_set,
	                	currency:currency
	                },
	                title: '${l:FND251.LINK.RATE_DETAIL}',
	                width:800,
	                height:400
	            });
			}
			
	        function fnd253_detail_render(value,record,name){
	        	if(!record.isNew){
				    var int_rate_set=record.get('int_rate_set');
				    if(name=='rate_detail')
				    {
				        var currency=record.get('currency');
				        if(Ext.isEmpty(currency))
				        {
				            currency='';
				        }
						return '<a href="javascript:winOpen_rate_detail(\'' + int_rate_set + '\',\'' + currency + '\')">${l:FND251.LINK.RATE_DETAIL}</a>';
				    }
				}    
	        }
	        function rateSet_copy()
			{
			    var records=$('fnd253_int_rate_set_ds').getSelected();
			    if(records.length>1)
			    {
			        Leaf.showMessage('${l:HLS.PROMPT}', '只能选择一条记录');
			        return;
			    }
			    else if(records.length==0)
			    {
			        return;
			    }
			    new Leaf.Window({
	                id: 'fnd_int_rate_set_copy',
	                url: $('fnd253_rate_set_copy_link').getUrl(),
	                params:{
	                	int_rate_set:records[0].get('int_rate_set')
	                },
	                title: '复制',
	                width:730,
	                height:150
	            });
			}
		]]></script>
        <a:dataSets>
            <a:dataSet id="fnd253_currency_ds" loadData="true" model="gld.gld_currency_vl"/>
            <a:dataSet id="fnd253_rate_type_ds" lookupCode="CON500_INT_RATE_TYPE"/>
            <a:dataSet id="fnd253_int_rate_set_ds" autoQuery="true" model="fnd.FND253.fnd_interest_rate_set" selectable="true">
                <a:fields>
                    <a:field name="int_rate_set" required="true"/>
                    <a:field name="description" required="true"/>
                    <a:field name="int_rate_type_desc" displayField="code_value_name" options="fnd253_rate_type_ds" required="true" returnField="int_rate_type" valueField="code_value"/>
                    <a:field name="currency" displayField="currency_code" options="fnd253_currency_ds" returnField="currency" valueField="currency_code"/>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="valid_from" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="fnd253_forward" text="HLS.FORWARD"/>
                <a:gridButton click="fnd253_back" text="HLS.BACK"/>
                <a:gridButton click="fnd253_quit" text="HLS.EXIT"/>
                <a:gridButton click="fnd253_grid_query" text="HLS.QUERY"/>
                <a:gridButton click="fnd253_grid_clear" text="HLS.CLEAR"/>
                <a:gridButton click="rateSetDs_grid_save" text="HLS.SAVE"/>
                <a:gridButton click="rateSet_copy" text="复制"/>
            </a:screenTopToolbar>
            <a:grid id="fnd253_rateset_grid" bindTarget="fnd253_int_rate_set_ds" marginHeight="100" marginWidth="30">
                <a:columns>
                    <a:column name="int_rate_set" editorFunction="fnd253_set_texted_upper_fun" prompt="FND251.FND_BASE_RATE_SET.BASE_RATE_SET" width="150"/>
                    <a:column name="description" editor="fnd253_set_texted" prompt="HLS.DESCRIPTION" width="250"/>
                    <a:column name="int_rate_type_desc" editorFunction="fnd253_set_comboxed_fun" prompt="利率类型" width="150"/>
                    <a:column name="currency" editorFunction="fnd253_set_comboxed_fun" prompt="HLS.CURRENCY"/>
                    <a:column name="valid_from" editorFunction="fnd253_set_dated_fun" prompt="HLS.VALIDITY_FROM" renderer="Leaf.formatDate" width="120"/>
                    <a:column name="valid_to" prompt="HAP_END_DATE" renderer="Leaf.formatDate" width="120"/>
                    <a:column name="enabled_flag" align="center" editor="fnd253_set_checked" prompt="HLS.ENABLED_FLAG" width="100"/>
                    <a:column name="rate_detail" align="center" prompt="FND251.LINK.RATE_DETAIL" renderer="fnd253_detail_render"/>
                </a:columns>
                <a:editors>
                    <a:textField id="fnd253_set_texted_upper" maxLength="30" typeCase="upper"/>
                    <a:textField id="fnd253_set_texted"/>
                    <a:checkBox id="fnd253_set_checked"/>
                    <a:comboBox id="fnd253_set_comboxed"/>
                    <a:datePicker id="fnd253_set_dated"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>