<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
        	function tre_close(){
        	    $('tre_loan_contract_window').close();
        	}
		]]></script>
        <a:dataSets>
            <a:dataSet id="external_debt_cir_flag_ds" lookupCode="YES_NO"/>
            <a:dataSet id="tre_loan_contract_details_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="tre_loan_contract_details_ds" autoPageSize="true" autoQuery="true" fetchAll="true" model="debt.DEBT201.debt_loan_con_repayment" queryDataSet="tre_loan_contract_details_query_ds">
                <a:fields>
                    <a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
                    <a:field name="external_debt_cir_flag"/>
                    <a:field name="external_debt_cir_flag_n" displayField="code_value_name" options="external_debt_cir_flag_ds" returnField="external_debt_cir_flag" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="tre_close" text="关闭"/>
            </a:screenTopToolbar>
            <a:form/>
            <a:grid id="tre_loan_contract_details_grid_id" bindTarget="tre_loan_contract_details_ds" height="320" navBar="true" showRowNumber="true" width="755">
                <a:columns>
                    <a:column name="loan_contract_number" lock="true" prompt="借款合同编号" width="120"/>
                    <a:column name="loan_contract_name" lock="true" prompt="借款合同名称" width="150"/>
                    <a:column name="loan_amount" align="right" prompt="借款金额" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="total_repayment_amount" align="right" prompt="已还总额度" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="external_debt_cir_flag_n" align="center" prompt="额度是否循环" width="100"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>