<?xml version="1.0" encoding="UTF-8"?> <!-- $Author: qianming $Date: 2015-9-4 下午3:52:21 $Revision: 1.0 $Purpose: 进项票导入 --> <a:screen xmlns:a="http://www.leaf-framework.org/application"> <a:init-procedure> <a:model-query defaultWhereClause="t1.function_code = 'ACP516'" model="fnd.FND6000.bgfl_common_template_query" rootPath="template_path"/> </a:init-procedure> <a:view> <a:link id="bgfl_acp_invoice_ipt_upload_link_id" url="${/request/@context_path}/modules/acp/ACP516/acp_excel_import.lview"/> <a:link id="bgfl_acp_invoice_ipt_create_link_id" model="acp.ACP516.bgfl_acp_invoice_ipt" modelaction="execute"/> <a:link id="bgfl_template_download" url="${/request/@context_path}/downloadFile.lview"/> <script type="text/javascript"><![CDATA[ function bgfl_acp_invoice_ipt_upload(){ new Leaf.Window({ id: 'bgfl_acp_invoice_ipt_upload_id', url: $('bgfl_acp_invoice_ipt_upload_link_id').getUrl(), title: '${l:HLS.IMPORT}', width: 420, height: 275 }); } function bgfl_acp_invoice_ipt_import(){ Leaf.showConfirm('提示','您确定导入?',function(){ Leaf.request({ url: $('bgfl_acp_invoice_ipt_create_link_id').getUrl(), para: { batch_id :'${/parameter/@batch_id}' }, success: function(res) { $('bgfl_acp_invoice_ipt_result_ds').query(); Leaf.showMessage('提示','数据导入结束,如若界面仍有数据显示,说明该数据未成功导入,请查看错误信息!'); }, failure:function(){ Leaf.SideBar.show({ msg:'数据导入失败', duration:2000 }); $('bgfl_acp_invoice_ipt_result_ds').query(); }, error:function(){ Leaf.SideBar.show({ msg:'数据导入错误', duration:2000 }); $('bgfl_acp_invoice_ipt_result_ds').query(); }, scope: this }); }); } function bgfl_acp_invoice_ipt_excle_download(){ new Leaf.Window({ url: $('bgfl_template_download').getUrl(), title: '${l:HLS.SUPPORTING_DOCUMENT}', params: { 'table_name': 'BGFL_COMMON_TEMPLATE', 'header_id': '${/model/template_path/record/@template_id}' }, width: 850, height: 400 }); } Leaf.onReady(function(){ if('${/parameter/@batch_id}'){ $('bgfl_acp_invoice_ipt_import_btn_id').enable(); }else{ $('bgfl_acp_invoice_ipt_import_btn_id').disable(); } }); ]]></script> <a:dataSets> <a:dataSet id="bgfl_acp_invoice_ipt_result_ds" autoQuery="true" fetchAll="true" model="acp.ACP516.bgfl_acp_invoice_ipt" queryUrl="${/request/@context_path}/autocrud/acp.ACP516.bgfl_acp_invoice_ipt/query?batch_id=${/parameter/@batch_id}"> <a:fields> <a:field name="import_message" readOnly="true"/> </a:fields> </a:dataSet> </a:dataSets> <a:screenBody> <a:screenTopToolbar> <a:screenTitle/> <a:gridButton click="bgfl_acp_invoice_ipt_excle_download" text="模版下载"/> <a:gridButton click="bgfl_acp_invoice_ipt_upload" text="上传excle"/> <a:gridButton id="bgfl_acp_invoice_ipt_import_btn_id" click="bgfl_acp_invoice_ipt_import" text="HLS.IMPORT"/> </a:screenTopToolbar> <a:grid id="grid_id" bindTarget="bgfl_acp_invoice_ipt_result_ds" marginHeight="100" marginWidth="35" navBar="true"> <a:toolBar> <a:button type="excel"/> <a:button type="clear"/> </a:toolBar> <a:columns> <a:column name="line_number" align="center" lock="true" prompt="序号" width="60"/> <a:column name="invoice_code" lock="true" prompt="发票代码" width="140"/> <a:column name="invoice_number" lock="true" prompt="发票号码" width="140"/> <a:column name="contract_number" lock="true" prompt="合同号" width="140"/> <a:column name="contract_name" lock="true" prompt="合同名称" width="160"/> <a:column name="cf_item_desc" align="center" prompt="应付项目" width="80"/> <a:column name="times" align="center" prompt="期数" width="60"/> <a:column name="product_name_desc" prompt="发票内容" showTitle="true" width="100"/> <a:column name="invoice_kind_desc" align="center" prompt="发票种类" width="100"/> <a:column name="invoice_date_desc" align="center" prompt="发票日期" width="80"/> <a:column name="accounting_date_desc" align="center" prompt="记账日期" width="80"/> <a:column name="bp_name" prompt="销方对象" showTitle="true" width="160"/> <a:column name="billing_amount" align="right" prompt="开票金额" width="120"/> <a:column name="note" prompt="备注" showTitle="true" width="120"/> <a:column name="import_flag" align="center" prompt="导入标志" width="60"/> <a:column name="import_message" editor="textArea" prompt="错误消息" showTitle="true" width="140"/> <a:column name="match_flag" align="center" prompt="匹配标志" width="60"/> </a:columns> <a:editors> <a:textArea id="textArea_id"/> </a:editors> </a:grid> </a:screenBody> </a:view> </a:screen>