<?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>