<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: Feng $Date: 2014-5-26 下午6:02:31 $Revision: 1.0 $Purpose: --> <a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true"> <a:view> <a:link id="acp_invoice_attachment_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/> <script type="text/javascript"><![CDATA[ function acp512_invoice_close() { $('acp_invoice_modify_window').close(); } function acp512_invoice_save() { $('acp512_invoice_hd_ds').submit(); } function detail_upload_window(record_id) { var url = $('acp_invoice_attachment_uploadFile_id').getUrl() + '?table_name=ACP_INVOICE_LN&header_id=' + record_id; var win = new Leaf.Window({ url: url, title: '${l:HLS.SUPPORTING_DOCUMENT}', id: 'insurance_records_uploadFile_id', width: 850, height: 400 }); win.on('close', function() { }); } function attachment_upload(val,rec,name) { return '<a href=javascript:detail_upload_window('+rec.get('cashflow_id')+')>附件上传</a>'; } ]]></script> <a:dataSets> <a:dataSet id="acp512_invoice_hd_ds" model="acp.ACP512.acp_invoice_hd_v"> <a:fields> <a:field name="invoice_date" required="true"/> <a:field name="accounting_date" required="true"/> </a:fields> </a:dataSet> <a:dataSet id="acp512_invoice_ln_ds" model="acp.ACP512.acp_invoice_ln"/> </a:dataSets> <a:screenBody> <a:screenTopToolbar> <a:screenTitle/> <a:toolbarButton click="acp512_invoice_close" text="HLS.CLOSE"/> <a:toolbarButton click="acp512_invoice_save" text="HLS.SAVE"/> </a:screenTopToolbar> <a:form column="4" marginWidth="30" title="应付发票维护"> <a:textField name="invoice_number" bindTarget="acp512_invoice_hd_ds" prompt="发票号"/> <a:textField name="document_number" bindTarget="acp512_invoice_hd_ds" prompt="单据编号" readOnly="true"/> <a:textField name="contract_number" bindTarget="acp512_invoice_hd_ds" prompt="合同编号" readOnly="true"/> <a:textField name="contract_name" bindTarget="acp512_invoice_hd_ds" prompt="合同名称" readOnly="true"/> <a:numberField name="total_amount" bindTarget="acp512_invoice_hd_ds" prompt="价税合计" readOnly="true"/> <a:numberField name="tax_amount" bindTarget="acp512_invoice_hd_ds" prompt="税额" readOnly="true"/> <a:textField name="invoice_status_desc" bindTarget="acp512_invoice_hd_ds" prompt="发票状态" readOnly="true"/> <a:datePicker name="invoice_date" bindTarget="acp512_invoice_hd_ds" prompt="发票日期"/> <a:datePicker name="accounting_date" bindTarget="acp512_invoice_hd_ds" prompt="记账日期"/> <a:textField name="invoice_title" bindTarget="acp512_invoice_hd_ds" prompt="发票抬头" readOnly="true"/> <a:textField name="created_by_name" bindTarget="acp512_invoice_hd_ds" prompt="开票人" readOnly="true"/> <!--<a:textField name="confirmed_by_name" bindTarget="acp512_invoice_hd_ds" prompt="复核人" readOnly="true"/>--> </a:form> <a:grid id="cashflowDs_grid" bindTarget="acp512_invoice_ln_ds" marginHeight="230" marginWidth="30"> <a:columns> <a:column name="times" align="right" lock="true" prompt="期数" width="60"/> <a:column name="cf_item_desc" lock="true" prompt="应付项目" width="120"/> <a:column name="due_date" prompt="到期日" renderer="Leaf.formatDate"/> <a:column name="due_amount" align="right" prompt="应付金额" renderer="Leaf.formatMoney"/> <a:column name="received_amount" align="right" prompt="已付金额" renderer="Leaf.formatMoney"/> <a:column name="billing_amount" align="right" prompt="总开票金额" renderer="Leaf.formatMoney"/> <a:column name="last_received_date" prompt="付款日期" renderer="Leaf.formatDate"/> <a:column name="total_amount" align="right" prompt="本次开票金额" renderer="Leaf.formatMoney"/> <a:column name="tax_amount" align="right" prompt="本次开票税金" renderer="Leaf.formatMoney"/> <a:column align="center" prompt="附件上传" renderer="attachment_upload" width="80"/> <!--<a:column name="currency_desc" width="60"/> <a:column name="exchange_rate" align="right" width="80"/> <a:column name="exchange_rate_type_desc" width="100"/>--> </a:columns> </a:grid> </a:screenBody> <script type="text/javascript"><![CDATA[ Leaf.onReady(init); function init() { $('acp512_invoice_hd_ds').setQueryParameter('invoice_hd_id', '${/parameter/@invoice_hd_id}'); $('acp512_invoice_hd_ds').query(); $('acp512_invoice_ln_ds').setQueryParameter('invoice_hd_id', '${/parameter/@invoice_hd_id}'); $('acp512_invoice_ln_ds').query(); } ]]></script> </a:view> </a:screen>