<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
    <a:init-procedure>
        <a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
    </a:init-procedure>
    <a:view>
        <a:link id="con_dun_record_id" url="${/request/@context_path}/modules/cont/CON620/con_dun_record.lview"/>
        <a:link id="hls_bp_master_id"
                url="${/request/@context_path}/modules/hls/HLS306/hls_bp_master_details_check.lview"/>
        <a:link id="con_contract_update_link_id"
                url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
        <a:link id="con_contract_lawyer_letter_print_link_id"
                url="${/request/@context_path}/modules/cont/CON620/con_contract_lawyer_letter_print.lview"/>
        <a:link id="penalty_change_id"
                url="${/request/@context_path}/modules/cont/CON747/con_contract_penatly_change_req_detail.lview"/>
        <a:link id="con_contract_dun_detail_link_id"
                url="${/request/@context_path}/modules/cont/CON620/con_contract_rent_detail.lview"/>
        <a:link id="con_contract_account_detail_link_id"
                url="${/request/@context_path}/modules/cont/CON620/con_contract_account_detail.lview"/>
        <a:link id="con_contract_query_link_id"
                url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
        <script type="text/javascript"><![CDATA[
        function CON601_con_contract_query() {
            $('CON620_contract_result_ds').query();
            $('CON620_contract_repur_result_ds').query();

        }

        function CON601_con_contract_reset() {
            $('CON620_contract_query_ds').reset();
        }

        function CON620_render_contract_dun_grid(value, record, name) {
            if (name == 'contract_number') {
                if (record.get('overdue_times') > 1) {
                    return '<u><a style="color:red" href="javascript:contract_detail_link(' + record.id + ',\'' + record.ds.id + '\');">' + value + '</a></u>';
                } else {
                    return '<a href="javascript:contract_detail_link(' + record.id + ',\'' + record.ds.id + '\');">' + value + '</a>';
                }
            } else if (name == 'bp_id_tenant_desc') {
                //商业伙伴查询页面要做好，然后在此处关联。
                if (record.get('overdue_times') > 1) {
                    return '<u><a style="color:red" href="javascript:bp_id_tenant_desc_link(' + record.get('contract_id') + ');">' + value + '</a></u>';
                } else {
                    return '<a href="javascript:bp_id_tenant_desc_link(' + record.get('contract_id') + ');">' + value + '</a>';
                }
            } else if (name == 'bp_id_agent_desc') {
                if (record.get('bp_id_agent_desc') == null) {

                } else {
                    if (record.get('overdue_times') > 1) {
                        return '<u><a style="color:red" href="javascript:bp_id_agent_desc_link(' + record.get('bp_id_agent_level1') + ',\'' + record.get('bp_id_agent_class') + '\')">' + value + '</a></u>';
                    } else {
                        return '<a href="javascript:bp_id_agent_desc_link(' + record.get('bp_id_agent_level1') + ',\'' + record.get('bp_id_agent_class') + '\')">' + value + '</a>';
                    }
                }
            } else if (name == 'business_due_amount') {
                if (record.get('overdue_times') > 1) {
                    return '<u><a style="color:red" href="javascript:contract_business_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a></u>';
                } else {
                    return '<a href="javascript:contract_business_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a>';
                }
            } else if (name == 'account_due_amount') {
                if (record.get('overdue_times') > 1) {
                    return '<u><a style="color:red" href="javascript:contract_account_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a></u>';
                } else {
                    return '<a href="javascript:contract_account_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a>';
                }
            } else if (name == 'business_received_amount') {
                if (record.get('overdue_times') > 1) {
                    return '<u><a style="color:red" href="javascript:business_received_amount_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a></u>';
                } else {
                    return '<a href="javascript:business_received_amount_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a>';
                }
            } else if (name == 'ac_received_amount') {
                if (record.get('overdue_times') > 1) {
                    return '<u><a style="color:red" href="javascript:ac_received_amount_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a></u>';
                } else {
                    return '<a href="javascript:ac_received_amount_link(' + record.id + ',\'' + record.ds.id + '\');">' + Leaf.formatMoney(value) + '</a>';
                }
            }
        }

        function bp_id_tenant_desc_link(contract_id) {
            var url = $('con_dun_record_id').getUrl() + '?contract_id=' + contract_id;

            var win = new Leaf.Window({
                id: 'con_dun_record_window',
                url: url,
                title: '催收记录',
                fullScreen: true
            });
            win.on('close', function () {
                $('CON620_contract_result_ds').query();
            });
        }

        function bp_id_agent_desc_link(bp_id, bp_class) {
            var url = $('hls_bp_master_id').getUrl();
            new Leaf.Window({
                id: 'hls_bp_detail_winId',
                url: url,
                params: {
                    bp_id: bp_id,
                    bp_class: bp_class,
                    winId: 'hls_bp_detail_winId'
                },
                title: '${l:HLS212.BP_MASTER_MAINTAIN}',
                fullScreen: true
            });

        }

        function ac_received_amount_link(record_id, ds_id) {
            var current_record = $(ds_id).findById(record_id);
            var record = current_record;
            var saveData = [];
            for (var k in record.data) {
                var item = record.data[k];
                if (item && item.xtype == 'dataset') {
                    delete record.data[k];
                }
            }
            var param = record.data;
            param['document_id'] = current_record.get('contract_id');
            param['document_category'] = 'CONTRACT';
            param['function_code'] = 'CON620R';
            param['function_usage'] = 'QUERY';
            param['maintain_type'] = 'READONLY';
            param['url_title'] = '业务冲销详情';
            param['company_id'] = '${/session/@company_id}';
            //
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_account_detail_link_id', ds_id);
        }

        function business_received_amount_link(record_id, ds_id) {
            //
            var current_record = $(ds_id).findById(record_id);
            var record = current_record;
            var saveData = [];
            for (var k in record.data) {
                var item = record.data[k];
                if (item && item.xtype == 'dataset') {
                    delete record.data[k];
                }
            }
            var param = record.data;
            param['document_id'] = current_record.get('contract_id');
            // con601_param_set_value(param);
            param['document_category'] = 'CONTRACT';
            if (current_record.get('contract_status') == 'REPURING') {
                param['function_code'] = 'CON620QRP';
            } else {
                param['function_code'] = 'CON620Q';
            }
            param['function_usage'] = 'QUERY';
            param['maintain_type'] = 'READONLY';
            param['url_title'] = '业务冲销详情';
            param['company_id'] = '${/session/@company_id}';
            //
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_account_detail_link_id', ds_id);
        }


        function contract_account_link(record_id, ds_id) {

            var current_record = $(ds_id).findById(record_id);
            var record = current_record;
            var saveData = [];
            for (var k in record.data) {
                var item = record.data[k];
                if (item && item.xtype == 'dataset') {
                    delete record.data[k];
                }
            }
            var param = record.data;
            param['document_id'] = current_record.get('contract_id');
            param['document_category'] = 'CONTRACT';
            param['function_code'] = 'CON620F';
            param['function_usage'] = 'UPDATE';
            param['maintain_type'] = 'UPDATE';
            param['url_title'] = '催收详情';
            param['company_id'] = '${/session/@company_id}';
            //
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_dun_detail_link_id', ds_id);
        }

        function contract_business_link(record_id, ds_id) {
            debugger;
            var current_record = $(ds_id).findById(record_id);
            var record = current_record;
            var saveData = [];
            for (var k in record.data) {
                var item = record.data[k];
                if (item && item.xtype == 'dataset') {
                    delete record.data[k];
                }
            }
            var param = record.data;
            param['document_id'] = current_record.get('contract_id');
            // con601_param_set_value(param);
            param['document_category'] = 'CONTRACT';
            if (current_record.get('contract_status') == 'REPURING') {
                param['function_code'] = 'CON620RP';
            } else {
                param['function_code'] = 'CON620D';
            }
            param['function_usage'] = 'UPDATE';
            param['maintain_type'] = 'UPDATE';
            param['url_title'] = '催收详情';
            param['company_id'] = '${/session/@company_id}';
            //
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_dun_detail_link_id', ds_id);
        }

        function contract_detail_link(record_id, ds_id) {
            //
            var current_record = $(ds_id).findById(record_id);
            var record = current_record;
            var saveData = [];
            for (var k in record.data) {
                var item = record.data[k];
                if (item && item.xtype == 'dataset') {
                    delete record.data[k];
                }
            }
            var param = record.data;
            param['document_id'] = current_record.get('contract_id');
            param['document_category'] = 'CONTRACT';
            param['function_code'] = 'CON3200Q';
            param['function_usage'] = 'QUERY';
            param['maintain_type'] = 'QUERY';
            param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
            param['company_id'] = '${/session/@company_id}';
            //
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_query_link_id');
        }

        function summaryRenderer(datas, name) {
            var sum = 0;
            var sum2 = 0;
            var sum3 = 0;
            for (var i = 0; i < datas.length; i++) {
                record = datas[i];
                if (name == "account_due_amount") {
                    var r_1 = record.get("account_due_amount") || 0;
                    var r_2 = parseFloat(r_1);
                    if (!isNaN(r_2)) {
                        sum += r_2;
                    }
                }
                if (name == "business_due_amount") {
                    var s_1 = record.get("business_due_amount") || 0;
                    var s_2 = parseFloat(s_1);
                    if (!isNaN(s_2)) {
                        sum2 += s_2;
                    }
                }
                if (name == "over_due_amount") {
                    var t_1 = record.get("over_due_amount") || 0;
                    var t_2 = parseFloat(t_1);
                    if (!isNaN(t_2)) {
                        sum3 += t_2;
                    }
                }
            }
            if (name == "division_n") {
                //return '<div align="right">合计:</div>';
                //return '合计:<font color="red"></font>';
                return '<font color="red">' + '合计:' + '</font>';
            }
            if (name == "account_due_amount") {
                return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
            }
            if (name == "business_due_amount") {
                return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>';
            }
            if (name == "over_due_amount") {
                return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>';
            }
        }

        // function onIndexChange(ds, record, name, value, oldvalue) {
        //     $('bgt_contract_payment_detail_line_ds').setQueryParameter('contract_id', record.get('contract_id'));
        //     $('bgt_contract_payment_detail_line_ds').query();
        // }

        function ds_query(ds) {
            // var grid_id = $('CON601_con_contract_grid_ds');
            // if("${/model/role_info/record/@role_code}"=="0018"||"${/model/role_info/record/@role_code}"=="0019"){
            // grid_id.hideColumn('account_due_times');
            // grid_id.hideColumn('account_due_days');
            // grid_id.hideColumn('account_due_amount');
            //
            //
            // }
        }

        Leaf.onReady(function () {
            if ("${/model/role_info/record/@role_code}" == "0018" || "${/model/role_info/record/@role_code}" == "0019") {
                $('CON601_con_contract_grid_ds').hideColumn('account_due_times');
                $('CON601_con_contract_grid_ds').hideColumn('account_due_days');
                $('CON601_con_contract_grid_ds').hideColumn('account_due_amount');
                $('CON601_con_contract_grid_ds').hideColumn('ac_received_amount');
                $('CON601_con_contract_grid_ds').hideColumn('ac_unreceived_amount');
                document.getElementById('account_due_times_from_id').style.display = "none";
                document.getElementById('account_due_times_from_id_prompt').style.display = "none";
                document.getElementById('account_due_times_to_id').style.display = "none";
                document.getElementById('account_due_times_to_id_prompt').style.display = "none";
                document.getElementById('account_due_days_from_id').style.display = "none";
                document.getElementById('account_due_days_from_id_prompt').style.display = "none";
                document.getElementById('account_due_days_to_id').style.display = "none";
                document.getElementById('account_due_days_to_id_prompt').style.display = "none";
                document.getElementById('account_due_amount_from_id').style.display = "none";
                document.getElementById('account_due_amount_from_id_prompt').style.display = "none";
                document.getElementById('account_due_amount_to_id').style.display = "none";
                document.getElementById('account_due_amount_to_id_prompt').style.display = "none";
                var grid_id = $('CON601_con_contract_grid_ds');
                grid_id.hideColumn('account_due_times');
                grid_id.hideColumn('account_due_days');
                grid_id.hideColumn('account_due_amount');
            }
            if ("${/model/role_info/record/@role_code}" == "0020" || "${/model/role_info/record/@role_code}" == "0030") {
                $('CON601_con_contract_grid_ds').hideColumn('account_due_times');
                $('CON601_con_contract_grid_ds').hideColumn('account_due_days');
                $('CON601_con_contract_grid_ds').hideColumn('account_due_amount');
                $('CON601_con_contract_grid_ds').hideColumn('ac_received_amount');
                $('CON601_con_contract_grid_ds').hideColumn('ac_unreceived_amount');
            }
            //document.getElementById("repur_select_id").style.backgroundColor = '#657efe';
            //jQuery(".aaaa").css("color","#657efe");
           // jQuery(".aaaa").css("color","white");
           // jQuery(".aaaa").css("background-color","FF7744");
             jQuery(".repur_class").css("color","#FF7744");

        });
        function render_formatDate(value, record, name) {
            if (!Ext.isEmpty(value)) {
                return value.parseDate('yyyy-mm-dd').format('yyyy-mm-dd');
            }
            return '';

        }

        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
        <a:dataSets>
            <a:dataSet id="con501_division_name_ds" loadData="true" model="basic.sys_code_value_v_lease"/>
            <a:dataSet id="business_type_ds">
                <a:datas>
                    <a:record code_value="LEASE" code_value_name="直租"/>
                    <a:record code_value="LEASEBACK" code_value_name="售后回租"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="CON601_lease_organization_name_ds" loadData="true"
                       model="basic.hls_lease_organization_for_lov"/>
            <a:dataSet id="CON620_contract_query_ds" autoCreate="true">
                <a:fields>
                    <!--                    <a:field name="bp_id_tenant_n" autoComplete="true" lovGridHeight="350" lovHeight="500"-->
                    <!--                             lovLabelWidth="100" lovService="cont.CON541.hls_bp_master_v_for_lov?bp_category=TENANT"-->
                    <!--                             lovWidth="520" title="HLS.BP_TITLE">-->
                    <!--                        <a:mapping>-->
                    <!--                            <a:map from="bp_name" to="bp_id_tenant_n"/>-->
                    <!--                            <a:map from="bp_id" to="bp_id_tenant"/>-->
                    <!--                        </a:mapping>-->
                    <!--                    </a:field>-->
                    <a:field name="bp_id_tenant_desc"/>
                    <a:field name="bp_id_tenant"/>
                    <a:field name="bp_id_agent_desc"/>
                    <a:field name="division"/>
                    <a:field name="contract_number" typeCase="Upper"/>
                    <a:field name="overdue_times"/>
                    <a:field name="owner_user_id_desc" lovGridHeight="350" lovHeight="475"
                             lovService="cont.CON620.sys_user_for_lov" lovWidth="520" title="出单人">
                        <a:mapping>
                            <a:map from="user_id" to="owner_user_id"/>
                            <a:map from="description" to="owner_user_id_desc"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="lease_organization_name" displayField="description"
                             options="CON601_lease_organization_name_ds" returnField="lease_organization"
                             valueField="lease_organization"/>
                    <a:field name="business_type_n" displayField="code_value_name" options="business_type_ds"
                             returnField="business_type" valueField="code_value"/>
                    <a:field name="division_n" displayField="value_name" options="con501_division_name_ds"
                             returnField="division" valueField="value_code"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="CON620_contract_result_ds" autoPageSize="true" autoQuery="true"
                       model="cont.CON620.con_contract_dun_for_query" queryDataSet="CON620_contract_query_ds"
                       queryUrl="${/request/@context_path}/autocrud/cont.CON620.con_contract_dun_for_query/query"
                       selectable="true" selectionModel="single">
                <a:fields>
                    <a:field name="promised_return_date" datatype="date"/>
                </a:fields>
                <a:events>
                    <!--<a:event name="indexChange" handler="onIndexChange"/>-->
                    <a:event name="load" handler="ds_query"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="CON620_contract_repur_result_ds" autoPageSize="true" autoQuery="true"
                       model="cont.CON620.con_contract_dun_for_repur_query" queryDataSet="CON620_contract_query_ds"
                       queryUrl="${/request/@context_path}/autocrud/cont.CON620.con_contract_dun_for_repur_query/query"
                       selectable="true" selectionModel="single">
            </a:dataSet>
            <!--<a:dataSet id="bgt_contract_payment_detail_line_ds" fetchAll="true" model="cont.CON620.bgt_contract_payment_detail_line"/>-->
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="CON601_con_contract_reset" text="HLS.RESET"/>
                <a:gridButton click="CON601_con_contract_query" text="HLS.QUERY"/>
                <!--<a:gridButton id="CON601_con_contract_print_btn" click="CON601_con_contract_print" text="打印催收函"/>-->
            </a:screenTopToolbar>

            <a:queryForm title="CON301.CONTRACT_QUERY" style="background-color: white;" id="condition_queryForm"
                         bindTarget="CON620_contract_query_ds" createSearchButton="false"
                         resultTarget="CON620_contract_result_ds" labelWidth="120" marginWidth="30">
                <a:formToolBar style="background-color: white;">
                    <a:box labelWidth="140" column="4" style="width:100%">
                        <a:textField name="contract_number" bindTarget="CON620_contract_query_ds"
                                     prompt="HLS.CONTRACT_NUMBER"/>
                        <!--<a:textField name="contract_name" bindTarget="CON620_contract_query_ds" prompt="合同名称"/>-->
                        <a:textField name="bp_id_tenant_desc" bindTarget="CON620_contract_query_ds"
                                     prompt="HLS.TENANT_CODE"/>
                        <a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/>
                        <a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
                        <a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
                    </a:box>
                </a:formToolBar>
                <a:formBody style="background-color: white;">
                    <a:box labelWidth="120" column="4">
                        <a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds"
                                       prompt="逾期期数(营业)从" allowDecimals="false"/>
                        <a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds"
                                       prompt="逾期期数(营业)到" allowDecimals="false"/>
                        <a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds"
                                       prompt="逾期天数(营业)从" allowDecimals="false"/>
                        <a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds"
                                       prompt="逾期天数(营业)到" allowDecimals="false"/>
                        <a:numberField name="business_due_amount_from" bindTarget="CON620_contract_query_ds"
                                       prompt="逾期金额(营业)从"/>
                        <a:numberField name="business_due_amount_to" bindTarget="CON620_contract_query_ds"
                                       prompt="逾期金额(营业)到"/>
                        <a:numberField id="account_due_times_from_id" name="account_due_times_from"
                                       bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)从" allowDecimals="false"/>
                        <a:numberField id="account_due_times_to_id" name="account_due_times_to"
                                       bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)到" allowDecimals="false"/>
                        <a:numberField id="account_due_days_from_id" name="account_due_days_from"
                                       bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)从" allowDecimals="false"/>
                        <a:numberField id="account_due_days_to_id" name="account_due_days_to"
                                       bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)到" allowDecimals="false"/>
                        <a:numberField id="account_due_amount_from_id" name="account_due_amount_from"
                                       bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)从"/>
                        <a:numberField id="account_due_amount_to_id" name="account_due_amount_to"
                                       bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)到"/>
                    </a:box>
                </a:formBody>
            </a:queryForm>
            <!--<a:form column="4" labelWidth="120" marginWidth="30" title="CON301.CONTRACT_QUERY">
                <a:textField name="contract_number" bindTarget="CON620_contract_query_ds" prompt="HLS.CONTRACT_NUMBER"/>
                <a:textField name="contract_name" bindTarget="CON620_contract_query_ds" prompt="合同名称"/>
                <a:lov name="bp_id_tenant_n" bindTarget="CON620_contract_query_ds" prompt="HLS.TENANT_CODE"/>
                <a:textField name="bp_id_agent_desc" bindTarget="CON620_contract_query_ds" prompt="代理店"/>
                <a:comboBox name="business_type_n" bindTarget="CON620_contract_query_ds" prompt="业务类型"/>
                <a:comboBox name="division_n" bindTarget="CON620_contract_query_ds" prompt="租赁物"/>
                <a:numberField name="business_due_times_from" bindTarget="CON620_contract_query_ds" prompt="逾期期数(营业)从" allowDecimals="false"/>
                <a:numberField name="business_due_times_to" bindTarget="CON620_contract_query_ds" prompt="逾期期数(营业)到" allowDecimals="false"/>
                <a:numberField name="business_due_days_from" bindTarget="CON620_contract_query_ds" prompt="逾期天数(营业)从" allowDecimals="false"/>
                <a:numberField name="business_due_days_to" bindTarget="CON620_contract_query_ds" prompt="逾期天数(营业)到" allowDecimals="false"/>
                <a:numberField name="business_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="逾期金额(营业)从"/>
                <a:numberField name="business_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="逾期金额(营业)到"/>
                <a:numberField id="account_due_times_from_id" name="account_due_times_from" bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)从" allowDecimals="false"/>
                <a:numberField id="account_due_times_to_id" name="account_due_times_to" bindTarget="CON620_contract_query_ds" prompt="逾期期数(会计)到" allowDecimals="false"/>
                <a:numberField id="account_due_days_from_id" name="account_due_days_from" bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)从" allowDecimals="false"/>
                <a:numberField id="account_due_days_to_id" name="account_due_days_to" bindTarget="CON620_contract_query_ds" prompt="逾期天数(会计)到" allowDecimals="false"/>
                <a:numberField id="account_due_amount_from_id" name="account_due_amount_from" bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)从"/>
                <a:numberField id="account_due_amount_to_id" name="account_due_amount_to" bindTarget="CON620_contract_query_ds" prompt="逾期金额(会计)到"/>

            </a:form>-->
            <a:tabPanel marginHeight="145" marginWidth="15">
                <a:tabs>
                    <a:tab prompt="正常合同逾期租金" width="130" >
                        <a:grid id="CON601_con_contract_grid_ds" bindTarget="CON620_contract_result_ds" marginHeight="215"
                                marginWidth="50" navBar="true">
                            <a:columns>

                                <a:column name="bp_id_agent_desc" align="center" prompt="代理店" lock="true" width="100"/>
                                <a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
                                          renderer="CON620_render_contract_dun_grid" width="100"/>
                                <!--                    <a:column name="contract_name" align="center"-->
                                <!--                              prompt="合同名称" width="120"/>-->
                                <a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true"
                                          width="100"
                                          align="center"/>
                                <a:column name="min_overdue_date" align="center" prompt="预定支付日" width="100"
                                          renderer="render_formatDate"/>
                                <a:column name="min_overdue_times" align="center" prompt="预定支付期数" width="100"/>
                                <a:column prompt="营业">
                                    <a:column name="business_due_times" align="center" prompt="逾期期数"
                                              width="100"/>
                                    <a:column name="business_due_days" align="center" prompt="逾期天数"
                                              width="100"/>
                                    <a:column name="business_due_amount" align="right" prompt="逾期金额"
                                              renderer="CON620_render_contract_dun_grid"
                                              footerRenderer="summaryRenderer"
                                              width="100"/>


                                    <a:column name="over_due_amount" align="right" prompt="违约金"
                                              renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
                                              width="100"/>
                                    <a:column name="business_received_amount" align="right" prompt="已收租金"
                                              renderer="CON620_render_contract_dun_grid"
                                              footerRenderer="summaryRenderer"
                                              width="100"/>
                                    <a:column name="business_unreceived_amount" align="right" prompt="未收租金"
                                              renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
                                              width="100"/>
                                </a:column>
                                <a:column prompt="会计">
                                    <a:column name="account_due_times" align="center" prompt="逾期期数"
                                              width="100"/>
                                    <a:column name="account_due_days" align="center" prompt="逾期天数"
                                              width="100"/>
                                    <a:column name="account_due_amount" align="right" prompt="逾期金额"
                                              renderer="CON620_render_contract_dun_grid"
                                              footerRenderer="summaryRenderer"
                                              width="100"/>
                                    <a:column name="ac_received_amount" align="right" prompt="已收租金"
                                              renderer="CON620_render_contract_dun_grid"
                                              footerRenderer="summaryRenderer"
                                              width="100"/>
                                    <a:column name="ac_unreceived_amount" align="right" prompt="未收租金"
                                              renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
                                              width="100"/>
                                </a:column>
                                <a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
                                <a:column name="division_n" align="center" prompt="租赁物" width="60"
                                          />
                                <a:column name="modelcd" align="center" prompt="机型" width="100"/>
                                <a:column name="machine_number" align="center" prompt="机器号码" width="100"/>
                                <a:column name="lease_start_date" align="center" prompt="租赁开始日" width="100"/>
                                <a:column name="lease_times" align="center" prompt="期数" width="100"/>
                                <a:column name="total_due_amount" align="right" prompt="租金合计" width="100"
                                          renderer="Leaf.formatMoney"/>
                                <!--                    <a:column name="contract_status" align="center" prompt="合同状态" width="100"/>-->
                            </a:columns>
                        </a:grid>
                    </a:tab>
                    <a:tab prompt="分期回购逾期租金" width="130" id="repur_select_id" tabClassName="repur_class" >
                        <a:grid id="CON620_contract_repur_result_grid_ds" bindTarget="CON620_contract_repur_result_ds"
                                marginHeight="215"
                                marginWidth="50" navBar="true" >
                            <a:columns>

                                <a:column name="bp_id_agent_desc" align="center" prompt="代理店" lock="true" width="100"/>
                                <a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
                                          renderer="CON620_render_contract_dun_grid" width="100"/>
                                <!--                    <a:column name="contract_name" align="center"-->
                                <!--                              prompt="合同名称" width="120"/>-->
                                <a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true"
                                          width="100"
                                          align="center"/>
                                <a:column name="min_overdue_date" align="center" prompt="预定支付日" width="100"
                                          renderer="render_formatDate"/>
                                <a:column name="min_overdue_times" align="center" prompt="预定支付期数" width="100"/>
                                <a:column prompt="营业">
                                    <a:column name="business_due_times" align="center" prompt="逾期期数"
                                              width="100"/>
                                    <a:column name="business_due_days" align="center" prompt="逾期天数"
                                              width="100"/>
                                    <a:column name="business_due_amount" align="right" prompt="逾期金额"
                                              renderer="CON620_render_contract_dun_grid"
                                              footerRenderer="summaryRenderer"
                                              width="100"/>


                                    <a:column name="over_due_amount" align="right" prompt="违约金"
                                              renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
                                              width="100"/>
                                    <a:column name="business_received_amount" align="right" prompt="已收租金"
                                              renderer="CON620_render_contract_dun_grid"
                                              footerRenderer="summaryRenderer"
                                              width="100"/>
                                    <a:column name="business_unreceived_amount" align="right" prompt="未收租金"
                                              renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
                                              width="100"/>
                                </a:column>
                                <!--                            <a:column prompt="会计">-->
                                <!--                                <a:column name="account_due_times" align="center" prompt="逾期期数"-->
                                <!--                                          width="100"/>-->
                                <!--                                <a:column name="account_due_days" align="center" prompt="逾期天数"-->
                                <!--                                          width="100"/>-->
                                <!--                                <a:column name="account_due_amount" align="right" prompt="逾期金额" renderer="CON620_render_contract_dun_grid" footerRenderer="summaryRenderer"-->
                                <!--                                          width="100"/>-->
                                <!--                                <a:column name="ac_received_amount" align="right" prompt="已收租金" renderer="CON620_render_contract_dun_grid" footerRenderer="summaryRenderer"-->
                                <!--                                          width="100"/>-->
                                <!--                                <a:column name="ac_unreceived_amount" align="right" prompt="未收租金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"-->
                                <!--                                          width="100"/>-->
                                <!--                            </a:column>-->
                                <a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
                                <a:column name="division_n" align="center" prompt="租赁物" width="60"
                                         />
                                <a:column name="modelcd" align="center" prompt="机型" width="100"/>
                                <a:column name="machine_number" align="center" prompt="机器号码" width="100"/>
                                <a:column name="lease_start_date" align="center" prompt="分期回购开始日" width="100"/>
                                <a:column name="lease_times" align="center" prompt="分期期数" width="100"/>
                                <a:column name="total_due_amount" align="right" prompt="分期回购款合计" width="100"
                                          renderer="Leaf.formatMoney"/>
                                <!--                    <a:column name="contract_status" align="center" prompt="合同状态" width="100"/>-->
                            </a:columns>
                        </a:grid>
                    </a:tab>
                </a:tabs>
            </a:tabPanel>
        </a:screenBody>
    </a:view>
</a:screen>
