<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: likun $
    $Date: 2012/03/29 07:25:18 $
    $Revision: 1.5 $
    $Purpose: “事件组定义
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
        
            function query(){
                $('fnd_request_info_result_ds').query();
            }
			function reset(){
				$('fnd_request_info_query_ds').reset();
			}
			
			
            function canedit(record, name) {
                return record.isNew ? 'request_code_tf' : '';
            }       
        ]]></script>
        <a:dataSets>
            <a:dataSet id="enable_flag_ds">
                <a:datas>
                    <a:record name="是" code="Y"/>
                    <a:record name="否" code="N"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="fnd_request_info_query_ds" model="fnd.FND5010.fnd_request_info">
                <a:fields>
                    <a:field name="enable_flag_display" displayField="name" options="enable_flag_ds" prompt="是否有效" returnField="enable_flag" valueField="code"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="fnd_request_info_result_ds" autoCount="true" autoQuery="false" fetchAll="false" model="fnd.FND5010.fnd_request_info" queryDataSet="fnd_request_info_query_ds" selectable="true">
                <a:fields>
                    <a:field name="enable_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="request_code" required="true"/>
                    <a:field name="request_name" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:form column="3" labelWidth="100" marginWidth="65" title="请求定义" width="750">
                <a:textField name="request_code" bindTarget="fnd_request_info_query_ds" prompt="编码" typeCase="upper">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:textField>
                <a:textField name="request_name" bindTarget="fnd_request_info_query_ds" prompt="名称">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:textField>
                <a:textField name="description" bindTarget="fnd_request_info_query_ds" prompt="描述">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:textField>
                <a:comboBox name="enable_flag_display" bindTarget="fnd_request_info_query_ds" prompt="是否有效">
                    <a:events>
                        <a:event name="enterdown" handler="query"/>
                    </a:events>
                </a:comboBox>
            </a:form>
            <a:hBox>
                <a:button click="query" text="HAP_QUERY"/>
                <a:button click="reset" text="HAP_RESET"/>
            </a:hBox>
            <a:grid id="grid" bindTarget="fnd_request_info_result_ds" height="450" marginWidth="65" navBar="true" width="750">
                <a:toolBar>
                    <a:button type="add"/>
                    <a:button type="clear"/>
                    <a:button type="save"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="request_code" align="center" editor="request_code_tf" editorFunction="canedit" prompt="编码" sortable="true" width="150"/>
                    <a:column name="request_name" align="left" editor="request_name_tf" prompt="名称" width="200"/>
                    <a:column name="description" align="left" editor="description_tf" prompt="描述" width="200"/>
                    <a:column name="enable_flag" editor="enable_flag_comboBox" prompt="是否有效" sortable="true" width="75"/>
                </a:columns>
                <a:editors>
                    <a:textField id="request_code_tf"/>
                    <a:textField id="request_name_tf"/>
                    <a:textField id="description_tf"/>
                    <a:checkBox id="enable_flag_comboBox"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>