hn_abs_contract_detail.lview 4.53 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 72 73 74 75 76 77 78 79 80 81 82 83
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangyu  
    $Date: 2017-3-6 下午19:24:22  
    $Revision: 1.0  
    $Purpose: ABS项目统计表支付表明细
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
        	function rpt6090_project_list_query(){
        	    $('rpt6090_abs_contract_ds').query();
        	}
        	
        	function sum_foot(data, name) {
                if (name == 'contract_number') {
                    return '<font color=red>' + '合计' + '</font>';
                } else if (name == 'con_due_amount') {
                    return colum_caculateTotal(data, name);
                } else if (name == 'con_receive_amount') {
                    return colum_caculateTotal(data, name);
                } else if (name == 'remain_amount') {
                    return colum_caculateTotal(data, name);
                } else if (name == 'partial_receive_amount') {
                    return colum_caculateTotal(data, name);
                } else if (name == 'ninety_remain_amount') {
                    return colum_caculateTotal(data, name);
                } else if (name == 'over_short_amount') {
                    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="rpt6090_abs_contract_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="repayment_plan_id" defaultValue="${/parameter/@repayment_plan_id}"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="rpt6090_abs_contract_ds" autoQuery="true" fetchAll="true" model="rpt.rpt6090.rpt6090_abs_contract" queryDataSet="rpt6090_abs_contract_query_ds" selectable="true" selectionModel="single"/>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
            </a:screenTopToolbar>
            <a:form/>
            <a:grid id="rpt6090_abs_contract_grid_id" bindTarget="rpt6090_abs_contract_ds" marginHeight="180" marginWidth="50" navBar="true">
                <a:columns>
                    <a:column name="contract_number" align="center" prompt="支付表编号" width="120"/>
                    <a:column name="project_name" prompt="项目名称" width="240"/>
                    <a:column name="bp_name" align="center" prompt="主承租人" width="240"/>
                    <a:column name="hn_industry_classification_n" align="center" prompt="行业分类" width="120"/>
                    <a:column name="binary_classification_n" align="center" prompt="二级分类" width="120"/>
                    <a:column name="con_due_amount" align="right" footerRenderer="sum_foot" prompt="应收租金" renderer="Leaf.formatMoney" width="140"/>
                    <a:column name="con_receive_amount" align="right" footerRenderer="sum_foot" prompt="到期已偿付租金" renderer="Leaf.formatMoney" width="140"/>
                    <a:column name="over_short_amount" align="right" footerRenderer="sum_foot" prompt="差额" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="remain_amount" align="right" footerRenderer="sum_foot" prompt="到期未支付租金" renderer="Leaf.formatMoney" width="140"/>
                    <a:column name="partial_receive_amount" align="right" footerRenderer="sum_foot" prompt="违约时相应回收款" renderer="Leaf.formatMoney" width="140"/>
                    <a:column name="ninety_remain_amount" align="right" footerRenderer="sum_foot" prompt="逾期超90天未支付租金" renderer="Leaf.formatMoney" width="140"/>
                    <a:column name="employee_name" align="center" prompt="业务部门" width="100"/>
                    <a:column name="lease_organization_n" align="center" prompt="业务经理" width="100"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>