hn_guarantee_analysis_detail.lview 3.48 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wujun  
    $Date: 2016年12月20日09:09:40
    $Revision: 1.0  
    $Purpose: 主担保人人分析(市场化)
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function hn5040_guarantee_analysis_close() {
                $('${/parameter/@winid}').close();
            }
            
            function sum_foot(data, name) {
                if (name == 'bp_name') {
                    return '<font color=red>' + '合计' + '</font>';
                } else if (name == 'sum_amount_rent') {
                    return colum_caculateTotal(data, name);
                } else if (name == 'sum_amount_principal') {
                    return colum_caculateTotal(data, name);
                }
            
            }
            
            function colum_caculateTotal(data, name) {
                var total = 0;
                var length = data.length;
                var value = 0;
                for (var i = 0;i < length;i++) {
                    if (Ext.isEmpty(data[i].get(name))) {
                        value = 0;
                    } else {
                        value = data[i].get(name);
                    }
                    total = plus(total, value);
                }
                return '<font color=red>' + Leaf.formatMoney(total) + '</font>';
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hn5040_guarantee_analysis_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="query_date" defaultValue="${/parameter/@query_date}" readOnly="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="hn5040_guarantee_analysis_result_ds" autoPageSize="true" autoQuery="true" model="hn.HN5040.hn_report_guarantee_analysis"/>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hn5040_guarantee_analysis_close" text="退出"/>
                <a:gridButton bind="hn5040_guarantee_analysis_grid_id" type="excel"/>
            </a:screenTopToolbar>
            <a:form column="4" labelWidth="120" marginWidth="30" title="查询条件">
                <a:datePicker name="query_date" bindTarget="hn5040_guarantee_analysis_query_ds" prompt="查询日期"/>
            </a:form>
            <a:grid id="hn5040_guarantee_analysis_grid_id" bindTarget="hn5040_guarantee_analysis_result_ds" marginHeight="180" marginWidth="30" navBar="true" showRowNumber="true">
                <a:columns>
                    <a:column name="bp_name" footerRenderer="sum_foot" prompt="主担保人" width="300"/>
                    <a:column name="binary_classification_n" prompt="行业细分" width="150"/>
                    <a:column name="sum_amount_rent" align="right" footerRenderer="sum_foot" prompt="剩余租金小计" renderer="Leaf.formatMoney" width="140"/>
                    <a:column name="sum_amount_rent_percent" align="right" prompt="剩余租金占比" width="120"/>
                    <a:column name="sum_amount_principal" align="right" footerRenderer="sum_foot" prompt="剩余本金小计" renderer="Leaf.formatMoney" width="140"/>
                    <a:column name="sum_amount_principal_percent" align="right" prompt="剩余本金占比" width="120"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>