gld_je_test.lview 5.02 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 99 100 101 102 103 104 105 106
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-2-26 下午2:37:49  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="detailWinLink" url="${/request/@context_path}/modules/gld/GLD106/gld_je_test_detail.lview"/>
        <a:link id="doTestBM" model="gld.GLD106.gld_je_test_headers" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
        function linkRender(value, record, name)
        {
            var id = record.get('journal_header_id');
            return '<a href="javascript:detailWinOpen(' + id + ');">' + '查看详细' + '</a>';
        }
        
        function detailWinOpen(id)
        {
            new Leaf.Window({
                id: 'gld_je_test_detail_win',
                url: $('detailWinLink').getUrl() + '?journal_header_id=' + id,
                title: '行信息',
                fullScreen:true
            });
        }
        
        function doTest()
        {
            var records=$('contractDs').getSelected();
            if(records.length!=1)
            {
                Leaf.showMessage('${l:PROMPT}', '请选择一条记录');
                return;
            }
            var contract_id=records[0].get('contract_id');
            var currency_code=records[0].get('currency_code');
            var lease_begin_date=records[0].get('lease_begin_date');
            
            Leaf.request(
            {
	            url: $('doTestBM').getUrl(),
	            para: {
	                currency_code: currency_code,
	                contract_id:contract_id,
	                lease_begin_date:lease_begin_date
	            },
	            success: function()
	            {
	                $('headerDs').query();
				},
	            scope: this
	        });
        }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="contractDs" autoQuery="true" model="gld.GLD106.con_lease_contract" selectable="true" selectionModel="single"/>
            <a:dataSet id="headerDs" autoQuery="true" model="gld.GLD106.gld_je_test_headers" selectable="true"/>
        </a:dataSets>
        <a:screenBody>
            <a:grid bindTarget="contractDs" height="210" navBar="true" width="950">
                <a:columns>
                    <a:column name="contract_id" prompt="合同ID" width="50"/>
                    <a:column name="contract_number" prompt="合同编号"/>
                    <a:column name="contract_type" prompt="合同类型"/>
                    <a:column name="lease_begin_date" prompt="起租日" renderer="Leaf.formatDate"/>
                    <a:column name="amount_acr" align="right" prompt="长期应收金额" renderer="Leaf.formatMoney"/>
                    <a:column name="amount_ast" align="right" prompt="资产金额" renderer="Leaf.formatMoney"/>
                    <a:column name="amount_tax" align="right" prompt="销项税额" renderer="Leaf.formatMoney"/>
                    <a:column name="amount_rvn" align="right" prompt="利息金额" renderer="Leaf.formatMoney"/>
                    <a:column name="resp_center_name" prompt="责任中心"/>
                    <a:column name="currency_code" prompt="币种"/>
                    <a:column name="amount_tax_in" align="right" prompt="进项税额" renderer="Leaf.formatMoney"/>
                    <a:column name="tax_in_code" prompt="进项税码"/>
                    <a:column name="tax_out_code" prompt="销项税码"/>
                    <a:column name="customer_code" prompt="客户代码"/>
                    <a:column name="lease_item_code" prompt="项目/租赁物" width="150"/>
                    <a:column name="loan_contract" prompt="贷款合同号"/>
                </a:columns>
            </a:grid>
            <a:hBox>
                <a:button click="doTest" text="测试"/>
            </a:hBox>
            <a:grid bindTarget="headerDs" height="300" navBar="true" width="950">
                <a:columns>
                    <a:column name="journal_header_id" prompt="头ID"/>
                    <a:column name="description" prompt="摘要"/>
                    <a:column name="period_name" prompt="名称"/>
                    <a:column name="period_year" prompt="年"/>
                    <a:column name="period_num" prompt="周期"/>
                    <a:column name="je_template_set_code" prompt="模板"/>
                    <a:column name="je_transaction_code" prompt="事务"/>
                    <a:column name="currency_code" prompt="币种"/>
                    <a:column name="exchange_rate_type" prompt="汇率类型"/>
                    <a:column name="exchange_rate" prompt="汇率"/>
                    <a:column name="source_code" prompt="来源代码"/>
                    <a:column name="source_doc_id" prompt="来源单据ID"/>
                    <a:column name="je_category" prompt="凭证类型"/>
                    <a:column name="detail" renderer="linkRender"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>