<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Mouse Chow  
    $Date: 2011-11-17 下午04:19:35  
    $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"/>
        <script type="text/javascript"><![CDATA[
            function queryFunction() {
				$('report_result_ds').query();                
            }
            
            function resetFunction() {
				$('report_query_ds').reset();                
            }
                    	function sys_2850_grid_add(){
                $('sys_2850_sys_service_grid').showEditorByRecord($('sys_service_result_ds').create());
            }
            function sys_2850_grid_clear(){
                $('sys_2850_sys_service_grid').clear();
            }
            function sys_2850_grid_remove(){
                $('sys_2850_sys_service_grid').remove();
            }
            function sys_2850_grid_submit() {
                var result_ds = $('sys_service_result_ds');
                if (result_ds.validate()) {
                    result_ds.submit();
                }
            }
            function sys_2850_next(){
                 history.go(1);
            }
            function sys_2850_back(){
                history.go(-1);
            }
            function sys_2850_quit(){
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="report_type_ds" loadData="true" model="sys.SYS2850.sys_report_type"/>
            <a:dataSet id="report_query_ds" model="sys.SYS2850.sys_reports">
                <a:fields>
                    <a:field name="report_type_name" prompt="SYS_REPORT_TYPE.REPORT_TYPE_NAME"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="report_result_ds" autoQuery="true" model="sys.SYS2850.sys_reports" pageSize="15" queryDataSet="report_query_ds" selectable="true">
                <a:fields>
                    <a:field name="report_name" required="true"/>
                    <a:field name="report_type_name" displayField="report_type_name" options="report_type_ds" prompt="SYS_REPORT_TYPE.REPORT_TYPE_NAME" required="true" returnField="report_type_id" valueField="report_type_id"/>
                    <a:field name="report_type_id"/>
                    <a:field name="param_name" required="true"/>
                    <a:field name="is_batch" checkedValue="Y" defaultValue="N" required="true" uncheckedValue="N"/>
                    <a:field name="is_author_control" checkedValue="Y" defaultValue="Y" required="true" uncheckedValue="N"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar height="29">
                <a:button click="sys_2850_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_2850_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_2850_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_2850_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_2850_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_2850_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_2850_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="queryFunction" 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="85" title="SYS_REPORT.TITLE">
                <a:textField name="report_name" bindTarget="report_query_ds">
                    <a:events>
                        <a:event name="enterdown" handler="queryFunction"/>
                    </a:events>
                </a:textField>
                <a:textField name="report_type_name" bindTarget="report_query_ds">
                    <a:events>
                        <a:event name="enterdown" handler="queryFunction"/>
                    </a:events>
                </a:textField>
            </a:form>
            <a:grid bindTarget="report_result_ds" height="490" marginWidth="20" navBar="true" width="1000">
                <a:columns>
                    <a:column name="report_name" editor="textfield_editor" width="350"/>
                    <a:column name="report_type_name" editor="combobox_editor" width="150"/>
                    <a:column name="param_name" editor="textfield_editor" width="150"/>
                    <a:column name="is_batch" editor="checkbox_editor" width="100"/>
                    <a:column name="is_author_control" editor="checkbox_editor" width="100"/>
                </a:columns>
                <a:editors>
                    <a:comboBox id="combobox_editor"/>
                    <a:textField id="textfield_editor"/>
                    <a:checkBox id="checkbox_editor"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>