<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangyi2652 $
    $Date: 2010/11/03 08:03:20 $
    $Revision: 1.1 $
    $Purpose: “会计期查询”模块页面文件
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <a:model-query autoCount="false" fetchAll="true" model="gld.gld_period_sets" queryOrderBy="period_set_code" rootPath="combobox_list"/>
    </a:init-procedure>
    <a:view>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
                    function fnd_3010_next(){
                 history.go(1);
            }
            function fnd_3010_back(){
                history.go(-1);
            }
            function fnd_3010_quit(){
                location.href = $('sys_service_welcome_link').getUrl();
                parent.shMenu('show');
            }
            function queryCurrency(){
                $('gld_currency_result_ds').query();
            }

            function adjustmentFlagRenderer(value,record, name){
                if (value=='Y'){
                    return '${l:HAP_YES}';
                }else{
                    return '${l:HAP_NO}';
                }
            }
			function reset(){
				$('gld_period_query_ds').reset();
			}
        
        ]]></script>
        <a:dataSets>
            <a:dataSet id="cbx_ds">
                <a:datas dataSource="/model/combobox_list"/>
            </a:dataSet>
            <a:dataSet id="gld_period_query_ds">
                <a:fields>
                    <a:field name="period_code_name" displayField="period_code_name" options="cbx_ds" prompt="GLD_PERIOD_STATUS.TITLE" required="true" returnField="period_set_code" valueField="period_set_code"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="gld_currency_result_ds" autoCount="true" fetchAll="false" model="gld.FND3010.gld_period_query_query" pageSize="15" queryDataSet="gld_period_query_ds" queryUrl="${/request/@context_path}/autocrud/gld.FND3010.gld_period_query_query/query?ORDER_FIELD=gp.period_set_code,gp.period_year,gp.period_num">
                <a:fields>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar height="29">
                <a:button click="fnd_3010_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="fnd_3010_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="fnd_3010_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="queryCurrency" 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" title="SYS_PROMPT.QUERY_TITLE">
                <a:comboBox name="period_code_name" bindTarget="gld_period_query_ds">
                    <a:events>
                        <a:event name="enterdown" handler="queryCurrency"/>
                    </a:events>
                </a:comboBox>
            </a:form>
            <a:grid id="closed_grid" bindTarget="gld_currency_result_ds" height="490" marginWidth="20" navBar="true" width="1000">
                <a:toolBar>
                    <a:box/>
                </a:toolBar>
                <a:columns>
                    <a:column name="period_set_code" align="center" prompt="GLD_PERIOD_SET.PERIOD_SET_CODE" sortable="true" width="110"/>
                    <a:column name="period_set_name" align="left" prompt="GLD_PERIOD_SET.PERIOD_SET_NAME" sortable="true" width="125"/>
                    <a:column name="period_year" align="center" prompt="GLD_PERIODS.PERIOD_YEAR" sortable="true" width="70"/>
                    <a:column name="period_num" align="center" prompt="FND_DIMENSIONS.DIMENSION_SEQUENCE" sortable="true" width="70"/>
                    <a:column name="start_date" align="center" prompt="GLD_EXCHANGE_RATE.START_DATE" renderer="Leaf.formatDate" sortable="true" width="90"/>
                    <!--renderer="Leaf.formatDate" -->
                    <a:column name="end_date" align="center" prompt="GLD_EXCHANGE_RATE.END_DATE" renderer="Leaf.formatDate" sortable="true" width="90"/>
                    <!--renderer="Leaf.formatDate" -->
                    <a:column name="quarter_num" align="center" prompt="GLD_PERIOD_STATUS.QUARTER" sortable="true" width="70"/>
                    <a:column name="period_name" align="center" prompt="GLD_PERIODS.PERIOD_NAME" sortable="true" width="100"/>
                    <a:column name="adjustment_flag" align="center" prompt="GLD_PERIOD_STATUS.ADJUST" renderer="adjustmentFlagRenderer" width="70"/>
                    <!-- -->
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>