<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming 
    $Date: 2015-5-22 上午10:17:20  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:dataSets>
            <a:dataSet id="bp_class_ds" lookupCode="HLS211_BP_CLASS"/>
            <a:dataSet id="contract_status_ds" lookupCode="CON500_CONTRACT_STATUS"/>
            <a:dataSet id="lease_times_ds" lookupCode="PRJ500D_LEASE_TIMES"/>
            <a:dataSet id="licence_rent_flag_ds" lookupCode="YES_NO"/>
            <a:dataSet id="yonda_report_finance_v_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="contract_number" lovGridHeight="300" lovHeight="470" lovService="cont.CON340.con_contract_for_lov" lovWidth="600" title="合同">
                        <a:mapping>
                            <a:map from="contract_id" to="contract_id"/>
                            <a:map from="contract_number" to="contract_number"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_name" lovGridHeight="330" lovHeight="470" lovLabelWidth="120" lovService="cont.CON340.hls_bp_master_v_all_lov?bp_category=TENANT" lovWidth="700" title="承租人">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id_tenant"/>
                            <a:map from="bp_name" to="bp_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_class_n" displayField="code_value_name" options="bp_class_ds" returnField="bp_class" valueField="code_value"/>
                    <a:field name="unit_name" lovGridHeight="300" lovHeight="450" lovService="cont.CON340.exp_org_unit_vl" lovWidth="600" title="4s">
                        <a:mapping>
                            <a:map from="unit_id" to="unit_id"/>
                            <a:map from="description" to="unit_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="contract_status_n" displayField="code_value_name" options="contract_status_ds" returnField="contract_status" valueField="code_value"/>
                    <a:field name="lease_times_n" displayField="code_value_name" options="lease_times_ds" returnField="lease_times" valueField="code_value"/>
                    <a:field name="spv_company_name" lovGridHeight="330" lovHeight="500" lovService="cont.CON340.fnd_companies_for_lov" lovWidth="620" title="出租方">
                        <a:mapping>
                            <a:map from="company_id" to="spv_company_id"/>
                            <a:map from="company_short_name" to="spv_company_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="licence_rent_flag_n" displayField="code_value_name" options="licence_rent_flag_ds" returnField="licence_rent_flag" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="yonda_report_finance_v_result_ds" autoPageSize="true" model="cont.CON340.yonda_report_finance_v" queryDataSet="yonda_report_finance_v_query_ds"/>
        </a:dataSets>
        <a:screenBody>
            <a:queryForm id="yonda_report_finance_v_query_form_id" bindTarget="yonda_report_finance_v_query_ds" createSearchButton="true" marginWidth="35" resultTarget="yonda_report_finance_v_result_ds">
                <a:formToolBar labelWidth="110">
                    <a:lov name="contract_number" prompt="合同编号"/>
                    <a:lov name="bp_name" prompt="承租人"/>
                    <a:textField name="invoice_title" prompt="开票抬头"/>
                    <a:textField name="car_info" prompt="租赁物信息"/>
                </a:formToolBar>
                <a:formBody column="4" labelWidth="145">
                    <a:textField name="project_number" prompt="项目编号"/>
                    <a:comboBox name="bp_class_n" prompt="承租人分类"/>
                    <a:textField name="bp_id_code" prompt="身份证/组织机构代码"/>
                    <a:lov name="unit_name" prompt="4s店"/>
                    <a:datePicker name="inception_of_lease_from" prompt="起租日从"/>
                    <a:datePicker name="inception_of_lease_to" prompt="起租日至"/>
                    <a:datePicker name="lease_end_date_from" prompt="末期租金支付日从"/>
                    <a:datePicker name="lease_end_date_to" prompt="末期租金支付日至"/>
                    <a:numberField name="lease_item_amount_from" prompt="融资额从"/>
                    <a:numberField name="lease_item_amount_to" prompt="融资额至"/>
                    <a:numberField name="finance_amount_from" prompt="风险敞口从"/>
                    <a:numberField name="finance_amount_to" prompt="风险敞口至"/>
                    <a:comboBox name="contract_status_n" prompt="合同状态"/>
                    <a:comboBox name="lease_times_n" prompt="租赁期数"/>
                    <a:numberField name="invoice_price_from" prompt="购车价从"/>
                    <a:numberField name="invoice_price_to" prompt="购车价至"/>
                    <a:lov name="spv_company_name" prompt="出租方"/>
                    <a:comboBox name="licence_rent_flag_n" prompt="是否租赁牌照"/>
                    <a:textField name="item_frame_number" prompt="车架号"/>
                    <a:textField name="item_engine_number" prompt="发动机号"/>
                </a:formBody>
            </a:queryForm>
            <a:grid id="grid_id" bindTarget="yonda_report_finance_v_result_ds" marginHeight="100" marginWidth="35" navBar="true" showRowNumber="true">
                <a:toolBar>
                    <a:button type="excel"/>
                    <a:button type="clear"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="contract_number" lock="true" prompt="合同编号" width="140"/>
                    <a:column name="bp_name" lock="true" prompt="承租人" showTitle="true" width="180"/>
                    <a:column name="bp_class_n" align="center" prompt="承租人分类" width="80"/>
                    <a:column name="bp_id_code" prompt="身份证/组织机构代码" showTitle="true" width="120"/>
                    <a:column name="spv_company_name" prompt="出租方" showTitle="true" width="180"/>
                    <a:column name="project_number" align="center" prompt="项目编号" width="120"/>
                    <a:column name="unit_name" prompt="4s店" showTitle="true" width="120"/>
                    <a:column name="contract_status_n" align="center" prompt="合同状态" width="80"/>
                    <a:column name="inception_of_lease" align="center" prompt="起租日" width="80"/>
                    <a:column name="lease_end_date" align="center" prompt="末期租金支付日" width="90"/>
                    <a:column name="lease_times" align="center" prompt="租赁期数" width="60"/>
                    <a:column name="business_type_n" align="center" prompt="业务模式" width="130"/>
                    <a:column name="division_n" align="center" prompt="产品类型" width="80"/>
                    <a:column name="lease_channel_n" align="center" prompt="租赁模式" width="80"/>
                    <a:column name="invoice_price" align="right" prompt="购车价" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="lease_item_amount" align="right" prompt="融资总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="finance_amount" align="right" prompt="风险敞口" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="int_rate_display" prompt="租赁利率" width="100"/>
                    <a:column name="irr" prompt="IRR" width="100"/>
                    <a:column name="pmt_date" align="center" prompt="租金支付日" width="80"/>
                    <a:column name="pmt" align="right" prompt="每期租金" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="purchase_tax" align="right" prompt="购置税" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="insurance_fee" align="right" prompt="保险费" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="first_payment" align="right" prompt="首付款" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="deposit" align="right" prompt="保证金" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="purchase_price" align="right" prompt="留购价" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="poundage" align="right" prompt="手续费" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_rent" align="right" prompt="租金总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_rec_rent" align="right" prompt="已收租金总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_unrec_rent" align="right" prompt="未收租金总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_principal" align="right" prompt="本金总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_rec_principal" align="right" prompt="已收本金总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_unrec_principal" align="right" prompt="未收本金总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_interest" align="right" prompt="利息总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_rec_interest" align="right" prompt="已收利息总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_unrec_interest" align="right" prompt="未收利息总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_confirm_finance_income" align="right" prompt="已确认利息总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_unconfirm_finance_income" align="right" prompt="未确认利息总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="overdue_times" prompt="逾期期数" width="100"/>
                    <a:column name="overdue_amount" align="right" prompt="逾期租金" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="overdue_principal" align="right" prompt="逾期本金" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="overdue_interest" align="right" prompt="逾期利息" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="invoice_title" prompt="开票抬头" showTitle="true" width="150"/>
                    <a:column name="taxpayer_type_n" align="center" prompt="纳税人类型" width="100"/>
                    <a:column name="invoice_type" align="center" prompt="发票类型" width="100"/>
                    <a:column name="already_billing_times" align="center" prompt="已开票期数" width="80"/>
                    <a:column name="already_billing_amount" align="right" prompt="已开票金额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="un_billing_times" prompt="未开票期数" width="100"/>
                    <a:column name="un_billing_amount" align="right" prompt="未开票金额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="overdue_billing_times" align="center" prompt="逾期已开票期数" width="100"/>
                    <a:column name="overdue_billing_amount" align="right" prompt="逾期已开票金额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="licence_rent_flag" align="center" prompt="是否租赁牌照" width="100"/>
                    <a:column name="licence_amount" align="right" prompt="每期牌照租赁费" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_licence_amount" align="right" prompt="牌照租赁费总额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_rec_licence_amount" align="right" prompt="已收牌照租赁费" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="total_unrec_licence_amount" align="right" prompt="未收牌照租赁费" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="overdue_licence_times" align="center" prompt="逾期牌照租赁费期数" width="100"/>
                    <a:column name="overdue_licence_amount" align="right" prompt="逾期牌照租赁费" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="car_info" prompt="租赁物信息" showTitle="true" width="180"/>
                    <a:column name="item_frame_number" prompt="车架号" showTitle="true" width="150"/>
                    <a:column name="item_engine_number" prompt="发动机号" showTitle="true" width="150"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
