<?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_111_query() {
                $('et_profile_result_ds').query();
            }
            function hls_111_reset(){
			    $('et_profile_query_ds').reset();
			}
			function editorFun_penalty_profile_Ds_grid(record, name) {
                if (record.isNew) {
                    if(name=='et_profile')
                    {
                        return 'hls111_text';
                    }
                    return '';
                    
                }
                return '';
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="et_profile_query_ds">
                <a:fields>
                    <a:field name="enabled_flag_desc" displayField="code_value_name" options="enabled_ds" returnField="enable_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="et_profile_result_ds" autoQuery="true" model="hls.HLS111.con_contract_et_profile" queryDataSet="et_profile_query_ds" queryUrl="${/request/@context_path}/autocrud/hls.HLS111.con_contract_et_profile/query" selectable="true">
                <a:fields>
                    <a:field name="enable_flag" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls_111_reset" text="HLS.RESET"/>
                <a:gridButton click="hls_111_query" text="HLS.QUERY"/>
            </a:screenTopToolbar>
            <a:form column="3" labelWidth="120" marginWidth="30" title="SYS_PROMPT.QUERY_TITLE">
                <a:textField name="et_profile" bindTarget="et_profile_query_ds" prompt="提前结清规则代码" typeCase="upper"/>
                <a:textField name="description" bindTarget="et_profile_query_ds" prompt="描述"/>
                <a:comboBox name="enabled_flag_desc" bindTarget="et_profile_query_ds" prompt="是否启用"/>
            </a:form>
            <a:grid id="et_profile_result_ds_grid" bindTarget="et_profile_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="et_profile" editorFunction="editorFun_penalty_profile_Ds_grid" prompt="提前结清规则代码" width="180"/>
                    <a:column name="description" editor="hls111_text" prompt="描述" width="120"/>
                    <a:column name="discount_rate" align="right" editor="hls111_text" prompt="折扣率" width="140"/>
                    <a:column name="et_percent" align="right" editor="hls111_num2" prompt="结清手续费比例" width="100"/>
                    <a:column name="ref_n01" editor="hls111_text" prompt="月份从" width="100"/>
                    <a:column name="ref_n02" editor="hls111_text" prompt="月份到" width="100"/>
                    <a:column name="enable_flag" editor="hls111_check" prompt="启用" width="80"/>
                </a:columns>
                <a:editors>
                    <a:textField id="hls111_text" typeCase="upper"/>
                    <a:comboBox id="hls111_combo"/>
                    <a:checkBox id="hls111_check"/>
                    <a:numberField id="hls111_num1" allowDecimals="false" allowNegative="false"/>
                    <a:numberField id="hls111_num2" allowDecimals="true" allowNegative="false" decimalPrecision="4"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>