<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Harry 9952 
    $Date: 2017-1-12 下午01:23:56  
    $Revision: 1.0  
    $Purpose: 合同变更信息查询-经销商
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:view>
        <script type="text/javascript"><![CDATA[
            function set_color(value, record, name) {
                var history_record = $('hls_standard_history_ds').getAt(0);
                if (name == 'bp_name') {
                    if (record.get('bp_name')) {
                        if (history_record.get('bp_name') != record.get('bp_name')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'brand_id_n') {
                    if (record.get('brand_id_n')) {
                        if (history_record.get('brand_id_n') != record.get('brand_id_n')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'series_id_n') {
                    if (record.get('series_id_n')) {
                        if (history_record.get('series_id_n') != record.get('series_id_n')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'model_id_n') {
                    if (record.get('model_id_n')) {
                        if (history_record.get('model_id_n') != record.get('model_id_n')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'invoice_price') {
                    if (record.get('invoice_price')) {
                        if (history_record.get('invoice_price') != record.get('invoice_price')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'item_frame_number') {
                    if (record.get('item_frame_number')) {
                        if (history_record.get('item_frame_number') != record.get('item_frame_number')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'product_plan_id_n') {
                    if (record.get('product_plan_id_n')) {
                        if (history_record.get('product_plan_id_n') != record.get('product_plan_id_n')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'lease_times') {
                    if (record.get('lease_times')) {
                        if (history_record.get('lease_times') != record.get('lease_times')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'down_payment') {
                    if (record.get('down_payment')) {
                        if (history_record.get('down_payment') != record.get('down_payment')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'down_payment_ratio') {
                    if (record.get('down_payment_ratio')) {
                        if (history_record.get('down_payment_ratio') != record.get('down_payment_ratio')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
                if (name == 'finance_amount') {
                    if (record.get('finance_amount')) {
                        if (history_record.get('finance_amount') != record.get('finance_amount')) {
                            return '<a>' + "<font color='red'>" + value + "</font>" + '</a>';
                        } else {
                            return '<a>' + "<font color='black'>" + value + "</font>" + '</a>';
                        }
                    }
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls_standard_history_ds" loadData="true" model="cont.CON731.hls_con_change_history_query" queryUrl="${/request/@context_path}/autocrud/cont.CON731.hls_con_change_history_query/query?contract_id=${/parameter/@contract_id}"><![CDATA[
            ]]></a:dataSet>
            <a:dataSet id="hls_ccr_current_ds" autoQuery="true" model="cont.CON731.hls_con_change_current_query" queryUrl="${/request/@context_path}/autocrud/cont.CON731.hls_con_change_current_query/query?contract_id=${/parameter/@contract_id}"><![CDATA[
            ]]></a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:grid bindTarget="hls_standard_history_ds" height="70" width="1200">
                <a:columns>
                    <a:column name="history_value" align="center" prompt="变更项" width="60"/>
                    <a:column name="bp_name" prompt="客户姓名" width="180"/>
                    <a:column name="invoice_price" align="right" prompt="购置价" width="100"/>
                    <a:column name="product_plan_id_n" prompt="融资租赁产品" width="150"/>
                    <a:column name="lease_times" align="right" prompt="租赁期数" width="60"/>
                    <a:column name="down_payment" align="right" prompt="首付金额" width="100"/>
                    <a:column name="down_payment_ratio" align="right" prompt="首付比例" width="60"/>
                    <a:column name="finance_amount" align="right" prompt="融资额" width="100"/>
                </a:columns>
            </a:grid>
            <a:grid bindTarget="hls_ccr_current_ds" height="70" width="1200">
                <a:columns>
                    <a:column name="current_value" align="center" prompt="变更项" width="60"/>
                    <a:column name="bp_name" prompt="客户姓名" renderer="set_color" width="180"/>
                    <a:column name="invoice_price" align="right" prompt="购置价" renderer="set_color" width="100"/>
                    <a:column name="product_plan_id_n" prompt="融资租赁产品" renderer="set_color" width="150"/>
                    <a:column name="lease_times" align="right" prompt="租赁期数" renderer="set_color" width="60"/>
                    <a:column name="down_payment" align="right" prompt="首付金额" renderer="set_color" width="100"/>
                    <a:column name="down_payment_ratio" align="right" prompt="首付比例" renderer="set_color" width="60"/>
                    <a:column name="finance_amount" align="right" prompt="融资额" renderer="set_color" width="100"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
