<?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('je_id'); return '<a href="javascript:detailWinOpen(' + id + ');">' + '查看详细' + '</a>'; } function detailWinOpen(id) { new Leaf.Window({ id: 'gld_je_test_detail_win', url: $('detailWinLink').getUrl() + '?je_id=' + id, title: '行信息', fullScreen:true }); } function doTest() { var records=$('contractDs').getSelected(); if(records.length!=1) { Leaf.showMessage('${l:PROMPT}', '请选择一条记录'); return; } var je_id=records[0].get('contract_id'); Leaf.request( { url: $('doTestBM').getUrl(), para: { je_id: je_id }, 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="je_id" align="right" prompt="凭证ID"/> <a:column name="je_number" prompt="凭证编号" width="150"/> <a:column name="je_date" prompt="凭证日期" renderer="Leaf.formatDate"/> <a:column name="je_desc" prompt="凭证摘要" width="400"/> <a:column name="link" prompt="链接" renderer="linkRender"/> </a:columns> </a:grid> </a:screenBody> </a:view> </a:screen>