sys_service_usage.lview 6.14 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Mouse Chow  
    $Date: 2012-6-14 下午01:50:14  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <a:link id="SYS8050_sys_service_usage_detail_link" url="${/request/@context_path}/modules/sys/SYS8050/sys_service_usage_detail.lview"/>
        <a:link id="rental_agent_link2" url="${/request/@context_path}/autocrud/sys.sys_service_usage"/>
        <script type="text/javascript"><![CDATA[
				function usage_queryFunction(){
				    $('sys_service_usage_result_ds').query();
				}
				
				function usage_resetFunction(){
					$('sys_service_usage_query_ds').reset();
				}
				
				function usageCodeEditFun(record,name){
				    if(record.isNew){
				        return 'usage_textField';
				    }
				    return '';
				}
				
				function usageDetailRenderer(value,record,name){
				    if(record.isNew){
				        return '';
				    }
				    return '<a href=\'javascript:jumpUsageDetail(' + record.get('usage_id') + ',' + $('sys_service_usage_result_ds').indexOf(record) + ');\'>' + '${l:DETAIL}' + '</a>';
				}
				
				function jumpUsageDetail(usageId,recordIndex){
				    new Leaf.Window({
				        id:'sys_service_usage_detail_screen',
				    	url:$('SYS8050_sys_service_usage_detail_link').getUrl() + '?usage_id=' + usageId + '&record_index=' + recordIndex,				    
				    	title:'${l:SYS_SERVICE_USAGE_DETAIL}',
				    	width:800,
				    	height:600
				    });
				}
				
		   function queryService(){
                $('sys_service_usage_result_ds').query();
            }		
				
		  function sys_8050_grid_add(){
                $('sys_service_usage_grid').showEditorByRecord($('sys_service_usage_result_ds').create());
            }
            function sys_8050_grid_clear(){
                $('sys_service_usage_grid').clear();
            }
           function sys_8050_grid_remove(){
                $('sys_service_usage_grid').remove();
            }
            
            
            
            function sys_8050_grid_submit() {
                var result_ds = $('sys_service_usage_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }	
				
			function sys_8050_next(){
                 history.go(1);
            }
            function sys_8050_back(){
                history.go(-1);
            }
            function sys_8050_quit(){
                location.href = $('sys_service_welcome_link').getUrl();
            }
				
			
		]]></script>
        <a:dataSets>
            <a:dataSet id="sys_service_usage_query_ds" model="sys.sys_service_usage">
                <a:fields>
                    <a:field name="usage_code"/>
                    <a:field name="usage_description"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="sys_service_usage_result_ds" autoQuery="true" model="sys.sys_service_usage" notification="有数据没有保存" pageSize="15" queryDataSet="sys_service_usage_query_ds" selectable="true">
                <a:fields>
                    <a:field name="usage_code" required="true"/>
                    <a:field name="usage_description" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar height="29">
                <a:button click="sys_8050_back" height="20" icon="${/request/@context_path}/images/back.png" iconAlign="left" text="HLS.BACK" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="sys_8050_next" height="20" icon="${/request/@context_path}/images/forward.png" iconAlign="left" text="HLS.FORWARD" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="sys_8050_grid_add" height="20" icon="${/request/@context_path}/images/add.png" iconAlign="left" text="HLS.NEW" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="sys_8050_grid_remove" height="20" icon="${/request/@context_path}/images/remove.png" iconAlign="left" text="HLS_REMOVE" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="sys_8050_grid_clear" height="20" icon="${/request/@context_path}/images/clear.png" iconAlign="left" text="HLS.CLEAR" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="sys_8050_grid_submit" height="20" icon="${/request/@context_path}/images/save.png" iconAlign="left" text="HLS.SAVE" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="sys_8050_quit" height="20" icon="${/request/@context_path}/images/quit.png" iconAlign="left" text="HLS.EXIT" width="50"/>
                <a:separator style="margin-left:3px;"/>
                <a:button click="queryService" height="20" icon="${/request/@context_path}/images/search.png" iconAlign="left" text="HLS.QUERY" width="50"/>
                <a:separator style="margin-left:3px;"/>
            </a:screenTopToolbar>
            <a:form column="2" labelWidth="100" title="SYS_SERVICE_USAGE.TITIEL">
                <a:textField name="usage_code" bindTarget="sys_service_usage_query_ds"/>
                <a:textField name="usage_description" bindTarget="sys_service_usage_query_ds"/>
            </a:form>
            <a:grid id="sys_service_usage_grid" bindTarget="sys_service_usage_result_ds" height="490" marginWidth="20" navBar="true" width="1000">
                <a:columns>
                    <a:column name="usage_code" align="left" editorFunction="usageCodeEditFun" width="200"/>
                    <a:column name="usage_description" editor="usage_textField" width="350"/>
                    <a:column name="usage_detail" align="center" prompt="DETAIL" renderer="usageDetailRenderer" width="150"/>
                </a:columns>
                <a:editors>
                    <a:textField id="usage_textField"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>