<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ericyin  
    $Date: 2013-3-28 下午1:26:42  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
        <script type="text/javascript"><![CDATA[
        	function hls_110_query() {
                $('hls_penalty_result_ds').query();
            }
            function hls_110_reset(){
			    $('penalty_query_ds').reset();
			}
			function editorFun_penalty_profile_Ds_grid(record, name) {
                if (record.isNew) {
                    if(name=='penalty_profile')
                    {
                        return 'hls110_text';
                    }
                    return '';
                    
                }
                return '';
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="penalty_query_ds">
                <a:fields>
                    <a:field name="enabled_flag_desc" displayField="code_value_name" options="enabled_ds" returnField="enabled_flag" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="enabled_ds" lookupCode="ENABLED_STATUS"/>
            <a:dataSet id="penalty_calc_ds" lookupCode="PENALTY_CALC_BASE"/>
            <a:dataSet id="hls_penalty_result_ds" autoQuery="true" model="hls.HLS110.hls_penalty_for_query" queryDataSet="penalty_query_ds" queryUrl="${/request/@context_path}/autocrud/hls.HLS110.hls_penalty_for_query/query" selectable="true">
                <a:fields>
                    <a:field name="enabled_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                    <a:field name="penalty_calc_base_desc" displayField="code_value_name" options="penalty_calc_ds" returnField="penalty_calc_base" valueField="code_value"/>
                    <a:field name="penalty_profile" required="true"/>
                    <a:field name="description" required="true"/>
                    <a:field name="grace_period" required="true"/>
                    <a:field name="penalty_rate" required="true"/>
                    <a:field name="penalty_total_base_ratio" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls_110_reset" text="HLS.RESET"/>
                <a:gridButton click="hls_110_query" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="3" labelWidth="120" marginWidth="30" title="SYS_PROMPT.QUERY_TITLE">
                <a:textField name="penalty_profile" bindTarget="penalty_query_ds" prompt="延迟履行金代码" typeCase="upper"/>
                <a:textField name="description" bindTarget="penalty_query_ds" prompt="描述"/>
                <a:comboBox name="enabled_flag_desc" bindTarget="penalty_query_ds" prompt="是否启用"/>
            </a:form>
            <a:grid id="hls_penalty_result_ds_grid" bindTarget="hls_penalty_result_ds" marginHeight="160" marginWidth="30" navBar="true">
                <a:toolBar>
                    <a:button type="add"/>
                    <a:button type="save"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="penalty_profile" editorFunction="editorFun_penalty_profile_Ds_grid" prompt="延迟履行金代码" width="180"/>
                    <a:column name="description" editor="hls110_text" prompt="描述" width="120"/>
                    <a:column name="grace_period" editor="hls110_num1" prompt="免息期（天）" width="140"/>
                    <a:column name="penalty_rate" editor="hls110_num2" prompt="延迟履行金利率" width="100"/>
                    <a:column name="penalty_calc_base_desc" editor="hls110_combo" prompt="利率计算方式" width="140"/>
                    <a:column name="penalty_total_base_ratio" editor="hls110_num2" prompt="最低还款比例" width="100"/>
                    <a:column name="enabled_flag" editor="hls110_check" prompt="启用" width="80"/>
                </a:columns>
                <a:editors>
                    <a:textField id="hls110_text" typeCase="upper"/>
                    <a:comboBox id="hls110_combo"/>
                    <a:checkBox id="hls110_check"/>
                    <a:numberField id="hls110_num1" allowDecimals="false" allowNegative="false"/>
                    <a:numberField id="hls110_num2" allowDecimals="true" allowNegative="false" decimalPrecision="4"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
