hn_contract_cashflow_entrance.lview 5.03 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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangyu  
    $Date: 2017-1-12 上午09:56:24  
    $Revision: 1.0  
    $Purpose: 合同流量统计表入口
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="hn1050_contract_cashflow_lease_init_link" model="hn.HN1050.hn_contract_cashflow_lease" modelaction="execute"/>
        <a:link id="hn1050_contract_cashflow_loan_init_link" model="hn.HN1050.hn_contract_cashflow_loan" modelaction="execute"/>
        <a:link id="hn1050_contract_cashflow_lease_link" url="${/request/@context_path}/modules/hn/HN1050/hn_contract_cashflow_lease.lview"/>
        <a:link id="hn1050_contract_cashflow_loan_link" url="${/request/@context_path}/modules/hn/HN1050/hn_contract_cashflow_loan.lview"/>
        <script type="text/javascript"><![CDATA[
            function hn1050_contract_cashflow_reset() {
                $('hn1050_contract_cashflow_query_ds').reset();
            }
            
            function hn1050_contract_cashflow_init() {
                var record = $('hn1050_contract_cashflow_query_ds').getAt(0);
                if ($('hn1050_contract_cashflow_query_ds').validate()) {
                    var data_type = record.get('data_type');
                    var url, open_url, winid;
                    if (data_type == 'LEASE') {
                        url = $('hn1050_contract_cashflow_lease_init_link').getUrl();
                        open_url = $('hn1050_contract_cashflow_lease_link').getUrl();
                        winid = 'hn_contract_cashflow_lease_win';
                    } else if (data_type == 'LOAN') {
                        url = $('hn1050_contract_cashflow_loan_init_link').getUrl();
                        open_url = $('hn1050_contract_cashflow_loan_link').getUrl();
                        winid = 'hn_contract_cashflow_loan_win';
                    }
                    Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
                    Leaf.request({
                        url: url,
                        para: {
                            calc_start_date: record.get('calc_start_date'),
                            calc_end_date: record.get('calc_end_date')
                        },
                        success: function(res) {
                            Leaf.Masker.unmask(Ext.getBody());
                            parent.Leaf.SideBar.enable = true;
                            parent.Leaf.SideBar.show({
                                msg: '${l:HLS.SUBMIT_SUCCESS}',
                                duration: 2000
                            });
                            var win = new Leaf.Window({
                                id: winid,
                                url: open_url,
                                params: {
                                    winid: winid,
                                    calc_end_date: record.get('calc_end_date')
                                },
                                fullScreen: true
                            });
                        },
                        error: function(res) {
                            Leaf.Masker.unmask(Ext.getBody());
                        },
                        faliure: function() {
                            Leaf.Masker.unmask(Ext.getBody());
                        },
                        scope: this
                    });
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="data_type_ds">
                <a:datas>
                    <a:record code="租赁" value="LEASE"/>
                    <a:record code="融资" value="LOAN"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="hn1050_contract_cashflow_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="data_type" defaultValue="LEASE"/>
                    <a:field name="data_type_n" defaultValue="租赁" displayField="code" options="data_type_ds" required="true" returnField="data_type" valueField="value"/>
                    <a:field name="calc_start_date" required="true"/>
                    <a:field name="calc_end_date" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hn1050_contract_cashflow_reset" text="重置"/>
                <a:gridButton click="hn1050_contract_cashflow_init" text="查询"/>
            </a:screenTopToolbar>
            <a:form column="4" labelWidth="120" marginWidth="200" title="查询条件">
                <a:comboBox name="data_type_n" bindTarget="hn1050_contract_cashflow_query_ds" prompt="数据类型"/>
                <a:datePicker name="calc_start_date" bindTarget="hn1050_contract_cashflow_query_ds" prompt="查询日期从"/>
                <a:datePicker name="calc_end_date" bindTarget="hn1050_contract_cashflow_query_ds" prompt="查询日期到"/>
            </a:form>
        </a:screenBody>
    </a:view>
</a:screen>