<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: WangYu  
    $Date: 2014-4-25 上午09:31:11  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="prj.PRJ500D.user_agent_description" rootPath="user_agent_description"/>
    </a:init-procedure>
    <a:view>
<!--        <a:link id="con_cashflow_pre_query_id" model="cont.CON930.con_contract_cashflow_monthly" modelaction="update"/>-->
        <script><![CDATA[
        //页面加载事件
        // Leaf.onReady(function() {
        //     var bp_code='${/model/user_agent_description/record/@bp_code}';
        //
        //     if (!Ext.isEmpty(bp_code)&&bp_code!== 'C00010168'){
        //         $('con_contract_rental_result_grid').hideColumn('branch_code_n');
        //         $('con_contract_rental_result_grid').hideColumn('branch_code');
        //
        //         $('con_contract_cashflow_rental_result_grid').hideColumn('branch_code_n');
        //         $('con_contract_cashflow_rental_result_grid').hideColumn('branch_code');
        //     }
        //     if (!Ext.isEmpty(bp_code)) {
        //         if (bp_code == 'C00010168' || bp_code == 'C00010198' || bp_code == 'C00010170') {
        //             $('con_contract_rental_result_grid').showColumn('large_balance_n');
        //             $('con_contract_rental_result_grid').showColumn('large_balance');
        //
        //             $('con_contract_cashflow_rental_result_grid').showColumn('large_balance_n');
        //             $('con_contract_cashflow_rental_result_grid').showColumn('large_balance');
        //         }else {
        //             $('con_contract_rental_result_grid').hideColumn('large_balance_n');
        //             $('con_contract_rental_result_grid').hideColumn('large_balance');
        //
        //             $('con_contract_cashflow_rental_result_grid').hideColumn('large_balance_n');
        //             $('con_contract_cashflow_rental_result_grid').hideColumn('large_balance');
        //         }
        //     }



        /*
            if (!Ext.isEmpty(bp_code)&&bp_code!== 'D00010001'&&bp_code!=='D00000009') {
                $('con_contract_rental_result_grid').hideColumn('branch_code_n');
                $('con_contract_rental_result_grid').hideColumn('branch_code');

                $('con_contract_cashflow_rental_result_grid').hideColumn('branch_code_n');
                $('con_contract_cashflow_rental_result_grid').hideColumn('branch_code');
            }
            if (!Ext.isEmpty(bp_code)) {
                if (bp_code == 'D00000041' || bp_code == 'D00010001' || bp_code == 'D00000026') {
                    $('con_contract_rental_result_grid').showColumn('large_balance_n');
                    $('con_contract_rental_result_grid').showColumn('large_balance');

                    $('con_contract_cashflow_rental_result_grid').showColumn('large_balance_n');
                    $('con_contract_cashflow_rental_result_grid').showColumn('large_balance');
                }else {
                    $('con_contract_rental_result_grid').hideColumn('large_balance_n');
                    $('con_contract_rental_result_grid').hideColumn('large_balance');

                    $('con_contract_cashflow_rental_result_grid').hideColumn('large_balance_n');
                    $('con_contract_cashflow_rental_result_grid').hideColumn('large_balance');
                }
            }
        });*/
        ]]></script>
        <a:dataSets>
            <a:dataSet id="con_contract_rental_result_ds" pageSize="13"  autoQuery="true" model="rpt.RPT5012.rpt5012_result_query"  queryUrl="${/request/@context_path}/autocrud/rpt.RPT5012.rpt5012_result_query/query?month=${/parameter/@month}&amp;cur_begin=${/parameter/@cur_begin}&amp;cur_end=${/parameter/@cur_end}&amp;before_begin=${/parameter/@before_begin}&amp;before_end=${/parameter/@before_end}" autoPageSize="true"/>
            <a:dataSet id="con_contract_cashflow_rental_result_ds" pageSize="13"  autoQuery="true" model="rpt.RPT5012.rpt5012_csh_result_query" queryUrl="${/request/@context_path}/autocrud/rpt.RPT5012.rpt5012_csh_result_query/query?month=${/parameter/@month}&amp;cur_begin=${/parameter/@cur_begin}&amp;cur_end=${/parameter/@cur_end}&amp;before_begin=${/parameter/@before_begin}&amp;before_end=${/parameter/@before_end}" autoPageSize="true"/>
            <a:dataSet id="con_contract_cashflow_rental_result_after_ds" pageSize="13"  autoQuery="true" model="rpt.RPT5012.rpt5012_csh_result_after_query" queryUrl="${/request/@context_path}/autocrud/rpt.RPT5012.rpt5012_csh_result_after_query/query" autoPageSize="true"/>
        </a:dataSets>
        <a:screenBody>
<!--            <a:screenTopToolbar>-->
<!--&lt;!&ndash;                <a:gridButton click="CON321_con_contract_query" text="HLS.QUERY"/>&ndash;&gt;-->
<!--&lt;!&ndash;                <a:gridButton click="CON321_con_contract_reset" text="HLS.RESET"/>&ndash;&gt;-->
<!--            </a:screenTopToolbar>-->
            <a:tabPanel marginHeight="25" marginWidth="20">
            <a:tabs>
            <a:tab prompt="租金余额表(保证金前)" width="150">
            <a:grid id="con_contract_rental_result_grid" bindTarget="con_contract_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
                <a:columns>
                    <a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
                    <a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
                    <a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
                    <a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
                    <a:column name="branch_code_n" align="center" prompt="分公司"  width="100"/>
                    <a:column name="large_balance_n" align="center" prompt="大额尾款"  width="100"/>
                    <a:column name="is_buyout_n" align="center" prompt="是否买断机"  width="100"/>
                    <a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
                    <a:column name="machine_number" align="center" prompt="机器号码"  width="80"/>
                    <a:column name="int_rate_display" exportDataFormat="" align="center" prompt="利率"  width="80"/>
                    <a:column name="int_rate_display" align="center" prompt="基准利率"  width="80"/>
                    <a:column name="lease_times" align="center" prompt="租赁期间"  width="80"/>
                    <a:column name="down_payment_ratio" align="center" prompt="首付款比率" width="80"/>
                    <a:column name="lease_item_amount" align="center" prompt="代理店销售金额" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="residual_amount" align="center" prompt="留购价格" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="contract_amount" align="center" prompt="合同总金额" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="down_payment" align="center" prompt="首付款" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="month_due_amount" align="center" prompt="当月末应收款余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="month_due_principal" align="center" prompt="当月末本金余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="month_interest" align="center" prompt="当月末利息余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="month_residual" align="center" prompt="当月末留购金余额" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="business_due_times" align="center" prompt="逾期期数"  width="80"/>
                    <a:column name="business_due_amount" align="center" prompt="当月末逾期金额(合计)" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
                    <a:column name="contract_status_n" align="center" prompt="合同状态"  width="80"/>
                    <a:column name="residual_date" align="center" prompt="合同终了"  width="80"/>
                    <a:column name="terminate_date" align="center" prompt="结清年月"  width="80"/>
                </a:columns>
            </a:grid>
            </a:tab>
                <a:tab prompt="租金余额表(保证金后)" width="150">
                    <a:grid id="con_contract_rental_result_after_grid" bindTarget="con_contract_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
                        <a:columns>
                            <a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
                            <a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
                            <a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
                            <a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
                            <a:column name="branch_code_n" align="center" prompt="分公司"  width="100"/>
                            <a:column name="large_balance_n" align="center" prompt="大额尾款"  width="100"/>
                            <a:column name="is_buyout_n" align="center" prompt="是否买断机"  width="100"/>
                            <a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
                            <a:column name="machine_number" align="center" prompt="机器号码"  width="80"/>
                            <a:column name="int_rate_display" exportDataFormat="" align="center" prompt="利率"  width="80"/>
                            <a:column name="int_rate_display" align="center" prompt="基准利率"  width="80"/>
                            <a:column name="lease_times" align="center" prompt="租赁期间"  width="80"/>
                            <a:column name="down_payment_ratio" align="center" prompt="首付款比率" width="80"/>
                            <a:column name="lease_item_amount" align="center" prompt="代理店销售金额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="residual_amount" align="center" prompt="留购价格" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="contract_amount" align="center" prompt="合同总金额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="down_payment" align="center" prompt="首付款" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="month_due_amount_after" align="center" prompt="当月末应收款余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="month_due_principal_after" align="center" prompt="当月末本金余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="month_interest_after" align="center" prompt="当月末利息余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="month_residual" align="center" prompt="当月末留购金余额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="business_due_times_after" align="center" prompt="逾期期数"  width="80"/>
                            <a:column name="business_due_amount_after" align="center" prompt="当月末逾期金额(合计)" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="contract_status_n" align="center" prompt="合同状态"  width="80"/>
                            <a:column name="residual_date" align="center" prompt="合同终了"  width="80"/>
                            <a:column name="terminate_date" align="center" prompt="结清年月"  width="80"/>
                        </a:columns>
                    </a:grid>
                </a:tab>
            <a:tab prompt="回收逾期明细表(保证金前)" width="180">
                <a:grid id="con_contract_cashflow_rental_result_grid" bindTarget="con_contract_cashflow_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
                    <a:columns>
                        <a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
                        <a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
                        <a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
                        <a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
                        <a:column name="branch_code_n" align="center" prompt="分公司"  width="100"/>
                        <a:column name="large_balance_n" align="center" prompt="大额尾款"  width="100"/>
                        <a:column name="is_buyout_n" align="center" prompt="是否买断机"  width="100"/>
                        <a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
                        <a:column name="machine_number" align="center" prompt="机器号码"  width="80"/>
                        <!--<a:column name="int_rate_display" align="center" prompt="利率"  width="80"/>-->
                        <a:column name="times" align="center" prompt="回数"  width="80"/>
                        <a:column name="due_date" align="center" prompt="支付预定日" width="80"/>
                        <a:column name="due_amount" align="center" prompt="应收款金额" renderer="Leaf.formatMoney" width="80"/>
                        <a:column name="received_amount" align="center" prompt="已收款金额" renderer="Leaf.formatMoney" width="80"/>
                        <a:column name="unreceived_amount" align="center" prompt="未收金额" renderer="Leaf.formatMoney" width="80"/>
                        <a:column name="overdue_days" align="center" prompt="逾期天数"  width="80"/>
                        <a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
                        <a:column name="rent_type" align="center" prompt="租金类型"  width="100"/>
                    </a:columns>
                </a:grid>
            </a:tab>
                <a:tab prompt="回收逾期明细表(保证金后)" width="180">
                    <a:grid id="con_contract_cashflow_rental_result_after_grid" bindTarget="con_contract_cashflow_rental_result_after_ds" marginHeight="115" navBar="true" marginWidth="30">
                        <a:columns>
                            <a:column name="agent_extra_name_af" align="center" prompt="代理店" width="120"/>
                            <a:column name="bp_tenant_name_af" align="center" prompt="客户名称" width="120"/>
                            <a:column name="contract_number_af" align="center" prompt="合同编号" width="100"/>
                            <a:column name="lease_start_date_af" align="center" prompt="租赁期开始日" width="80"/>
                            <a:column name="branch_code_af" align="center" prompt="分公司"  width="100"/>
                            <a:column name="large_balance_af" align="center" prompt="大额尾款"  width="100"/>
                            <a:column name="is_buyout_af" align="center" prompt="是否买断机"  width="100"/>
                            <a:column name="modelcd_af" align="center" prompt=" 机型" width="180"/>
                            <a:column name="machine_number_af" align="center" prompt="机器号码"  width="80"/>
                            <a:column name="times_af" align="center" prompt="回数"  width="80"/>
                            <a:column name="due_date_af" align="center" prompt="支付预定日" width="80"/>
                            <a:column name="due_amount_af" align="center" prompt="应收款金额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="received_amount_af" align="center" prompt="已收款金额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="unreceived_amount_af" align="center" prompt="未收金额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="overdue_days_af" align="center" prompt="逾期天数"  width="80"/>
                            <a:column name="deposit_amount_af" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="rent_type" align="center" prompt="租金类型"  width="100"/>
                        </a:columns>
                    </a:grid>
                </a:tab>

                <a:tab prompt="租金余额表(日立为优质客户付租金筛选用)" width="280">
                    <a:grid id="con_contract_rental_result_add_grid" bindTarget="con_contract_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
                        <a:columns>
                            <a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
                            <a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
                            <a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
                            <a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
                            <a:column name="branch_code_n" align="center" prompt="分公司"  width="100"/>
                            <a:column name="large_balance_n" align="center" prompt="大额尾款"  width="100"/>
                            <a:column name="is_buyout_n" align="center" prompt="是否买断机"  width="100"/>
                            <a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
                            <a:column name="machine_number" align="center" prompt="机器号码"  width="80"/>
                            <a:column name="int_rate_display" exportDataFormat="" align="center" prompt="利率"  width="80"/>
                            <a:column name="int_rate_display" align="center" prompt="基准利率"  width="80"/>
                            <a:column name="lease_times" align="center" prompt="租赁期间"  width="80"/>
                            <a:column name="down_payment_ratio" align="center" prompt="首付款比率" width="80"/>
                            <a:column name="lease_item_amount" align="center" prompt="代理店销售金额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="residual_amount" align="center" prompt="留购价格" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="contract_amount" align="center" prompt="合同总金额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="down_payment" align="center" prompt="首付款" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="month_due_amount_after" align="center" prompt="当月末应收款余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="month_due_principal_after" align="center" prompt="当月末本金余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="month_interest_after" align="center" prompt="当月末利息余额(合计)" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="month_residual" align="center" prompt="当月末留购金余额" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="business_due_times_after" align="center" prompt="逾期期数"  width="80"/>
                            <a:column name="business_due_amount_after" align="center" prompt="当月末逾期金额(合计)" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
                            <a:column name="contract_status_n" align="center" prompt="合同状态"  width="80"/>
                            <a:column name="residual_date" align="center" prompt="合同终了"  width="80"/>
                            <a:column name="terminate_date" align="center" prompt="结清年月"  width="80"/>
                            <a:column name="bp_class_n" align="center" prompt="商业伙伴分类"  width="80"/>
                            <a:column name="business_type_n" align="center" prompt="业务类型"  width="80"/>
                            <a:column name="division_n" align="center" prompt="租赁物"  width="80"/>
                            <a:column name="secondary_lease_n" align="center" prompt="二次租赁"  width="80"/>
                            <a:column name="tenant_change_flag_n" align="center" prompt="承租人变更"  width="80"/>
                            <a:column name="rental_12_pay_flag" align="center" prompt="是否已履约12期及以上"  width="160"/>
                            <a:column name="cf_9_exists_flag" align="center" prompt="是否有违约金记录产生"  width="160"/>
                            <a:column name="cf_9_notfirsttime_exists_flag" align="center" prompt="除第1期外是否有违约金记录产生"  width="160"/>
                            <a:column name="rl_flag_n" align="center" prompt="是否日立为优质客户付租金"  width="100"/>
                        </a:columns>
                    </a:grid>
                </a:tab>
            </a:tabs>
            </a:tabPanel>
        </a:screenBody>
    </a:view>
</a:screen>