<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: liyangyang
    $Date: 2016-01-18 10:10:00
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure><![CDATA[
    
    ]]></a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
    		
        	
        	function fnd_profit_gird_query() {
        	       $('fnd_profit_ds').query();
        	   }
        	
        	
    	  	]]></script>
        <a:dataSets>
            <a:dataSet id="fnd_profit_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov?period_status_code=O" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
                        <a:mapping>
                            <a:map from="internal_period_num" to="internal_period_num"/>
                            <a:map from="period_name" to="period_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="internal_period_num"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="fnd_profit_ds" autoQuery="true" fetchAll="true" model="fnd.FND2020.sdic_company_period_profits" queryDataSet="fnd_profit_query_ds" selectable="true">
                <a:fields>
                    <a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov?period_status_code=O" lovWidth="500" required="true" title="GLD_PERIODS.PERIOD_NAME">
                        <a:mapping>
                            <a:map from="internal_period_num" to="internal_period_num"/>
                            <a:map from="period_name" to="period_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="internal_period_num"/>
                    <a:field name="compnay_id" defaultValue="${/parameter/@company_id}"/>
                    <a:field name="year_profits" required="true"/>
                    <a:field name="month_profits" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
            </a:screenTopToolbar>
            <a:hBox>
                <a:box column="2" labelWidth="150" style="margin-left:-80px">
                    <a:lov name="period_name" bindTarget="fnd_profit_query_ds" prompt="HLS801.YEAR"/>
                    <a:button click="fnd_profit_gird_query" text="查询"/>
                </a:box>
            </a:hBox>
            <a:hBox>
                <a:grid id="fnd_profit_gird" bindTarget="fnd_profit_ds" marginHeight="300" navBar="true" style="margin-left:3px" width="500">
                    <a:toolBar>
                        <a:button type="add"/>
                        <a:button type="delete"/>
                        <a:button type="save"/>
                    </a:toolBar>
                    <a:columns>
                        <a:column name="period_name" align="center" editor="lovEditor" prompt="期间" width="120"/>
                        <a:column name="year_profits" align="right" editor="numEditor" prompt="年利润" renderer="Leaf.formatNumber" width="120"/>
                        <a:column name="month_profits" align="right" editor="numEditor" prompt="月利润" renderer="Leaf.formatNumber" width="120"/>
                    </a:columns>
                    <a:editors>
                        <a:textField id="numEditor"/>
                        <a:lov id="lovEditor"/>
                    </a:editors>
                </a:grid>
            </a:hBox>
        </a:screenBody>
    </a:view>
</a:screen>