定位打印
查询下拉框的值
return "凭证类型:"+com.adtec.afc.util.StringTool.replace(com.adtec.client.dataextract.MetaData4Print.getOptionRemarkByKey("IBDType29187", $HB_IBDType),":","-");
com.adtec.client.dataextract.MetaData4Print.getOptionRemarkByKey("IBDType29187", $HB_IBDType);
打印ip池数据
String[] fmt_name={"FMT_HOST_CLI_Public_D6_360323"};
com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrintInIP(fmt_name);
核心日期
return com.adtec.client.util.DateUtil.dateStrFormate(com.adtec.afc.datapool.EP.epGetValue(com.adtec.struct.ECAPTxRunInfo.getInstance().getSpID(), "HB_Head_Date",0), "ddMMyyyy", "yyyy-MM-dd");
重复开始和结束
com.adtec.afc.datapool.EP.getSuffixNo(com.adtec.struct.ECAPTxRunInfo.getInstance().getIpID(), "TS_F_entrno");
解析文件后打印
List pageList=com.adtec.client.returncode.OutPutCodeDispose.dispose("JM_F12_9140905_01","JM_F12_9140905_01","JM_F12_9140905_init");
com.adtec.client.ftp.FtpProxy.downLoadFile();
String downfile = com.adtec.client.ftp.FtpProxy.getLocalFile();
if((downfile==null)||(downfile.equals("")))
{
return;
}else{
$BkFileFmt="";
$BkFileDel="\\|";
$BkFileType="txt";
String elements = "TS_F_entrno|TS_F_insurername|BkTotAmt|TS_F_totalacount";
com.adtec.client.pubapp.ecapframe.Pagination.initialize(elements,10,"2");
}
String[] aselementName ={"TS_F_entrno","TS_F_insurername","BkTotAmt","TS_F_totalacount","TS_F_sucnum","TS_F_totalamount","TS_F_startdate","TS_F_enddate"};
String[] fmt_name={"FMT_HOST_CLI_Public_JM_F12_9140905_01"};
com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool();
com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName);
com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName);
return pageList;
格式化金额
com.adtec.afc.util.StringTool.doubleFormatMoney($BkTotAmt);
com.adtec.client.util.MoneyUtil.amountToChinese($BkTotAmt);
com.adtec.client.util.MoneyUtil.MoneyFormat($BkAmt1)
ftp取文件
com.adtec.client.ftp.FtpProxy.downLoadFile();
String downfile = com.adtec.client.ftp.FtpProxy.getLocalFile();
if((downfile==null)||(downfile.equals("")))
{
return;
}else{
$BkFileFmt="";
$BkFileDel="\\|";
$BkFileType="txt";
String elements = "TS_F_traceno|TS_F_brchno|SH_F_tellerno|TS_F_entrno|TS_F_insurername|TS_F_insurecode|TS_F_trustcomp|BkAcctNo|BkTotAmt|TS_F_vouno|TS_F_remarks";
com.adtec.client.pubapp.ecapframe.Pagination.initialize(elements,10,"2");
}
页面数据元素 输入输出
__ERR_RET returnNo
HB_PrintDataLocalFileName PrintDataLocalFileName
String[] aselementName ={"TS_F_frontaddseq","TS_F_remark"};
String[] fmt_name={"FMT_HOST_CLI_Public_TS_F2_907021_01"};
com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool();
com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName);
com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName);
<script type="text/JavaScript">
function print_selection_TS_F2_907021_01()
{
var returnNo = document.@[email protected];
var prtfilename = document.@[email protected]("|");
if(returnNo=="00000")
{
//打印凭证
FmtEngine('冲正凭证打印','FMT_HOST_CLI_Public_TS_F2_907021_01',prtfilename[0]);
}
return;
}
</script>
多个打印
List pageList=com.adtec.client.returncode.OutPutCodeDispose.dispose("TS_F2_907020_01","TS_F2_907020_01","TS_F2_907020_init");
String[] aselementName ={"TS_F_frontaddseq","TS_F_actno1","BkPlatDate","TS_F_insurer","TS_F_insuretype","TS_F_account","TS_F_cardno","TS_F_accname","TS_F_paycon","TS_F_ibdtype","TS_F_vouno","TS_F_feemode","TS_F_paynum","TS_F_amount","TS_F_name","TS_F_idtype1","TS_F_identnum","TS_F_mobile","TS_F_frontaddseq","TS_F_brchno","HB_Authorization_Teller","TS_F_tellerno","BkHostSeq"};
String[] fmt_name={"FMT_HOST_CLI_Public_TS_F2_907020_01","FMT_HOST_CLI_Public_TS_F2_907020_02"};
com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool();
com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName);
com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName);
return pageList;
<script type="text/JavaScript">
function print_selection_TS_F2_907020_01()
{
var returnNo = document.@[email protected];
var prtfilename = document.@[email protected]("|");
if(returnNo=="00000")
{
//打印凭证
FmtEngine('缴费凭证打印','FMT_HOST_CLI_Public_TS_F2_907020_01',prtfilename[0]);
FmtEngine('缴费客户回单打印','FMT_HOST_CLI_Public_TS_F2_907020_02',prtfilename[1]);
}
return;
}
</script>
从文件中读取数据每行打印一张
com.adtec.client.ftp.FtpProxy.downLoadFile();
String downfile = com.adtec.client.ftp.FtpProxy.getLocalFile();
String elements = "TS_F_accname|TS_F_account|RS_F_insurername|RS_F_payaccount|TS_F_startdate|TS_F_stopdate|TS_F_TranDate|XmName1|XmMoney1|XmName2|XmMoney2|XmName3|XmMoney3|XmName4|XmMoney4|XmName5|XmMoney5|XmName6|XmMoney6|XmName7|XmMoney7|XmName8|XmMoney8|XmName9|XmMoney9|XmName10|XmMoney10|XmName11|XmMoney11|XmName12|XmMoney12|XmName13|XmMoney13|XmName14|XmMoney14|XmName15|XmMoney15|XmName16|XmMoney16|XmName17|XmMoney17|XmName18|XmMoney18|XmName19|XmMoney19|XmName20|XmMoney20|XmName21|XmMoney21|TS_F_totalamount";
if((downfile==null)||(downfile.equals("")))
{
return;
}
else
{
$BkFileFmt="";
$BkFileDel="\\|";
$BkFileType="TXT";
com.adtec.client.pubapp.ecapframe.Pagination.initialize(elements,1,"2");
}
String[] fmt_name={"FMT_HOST_CLI_Public_TS_F1_907010_01"};
String[] aselementName ={"TS_F_accname","TS_F_account","RS_F_insurername","RS_F_payaccount","TS_F_startdate","TS_F_stopdate","TS_F_TranDate","XmName1","XmMoney1","XmName2","XmMoney2","XmName3","XmMoney3","XmName4","XmMoney4","XmName5","XmMoney5","XmName6","XmMoney6","XmName7","XmMoney7","XmName8","XmMoney8","XmName9","XmMoney9","XmName10","XmMoney10","XmName11","XmMoney11","XmName12","XmMoney12","XmName13","XmMoney13","XmName14","XmMoney14","XmName15","XmMoney15","XmName16","XmMoney16","XmName17","XmMoney17","XmName18","XmMoney18","XmName19","XmMoney19","XmName20","XmMoney20","XmName21","XmMoney21","TS_F_totalamount"};
com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool();
com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName);
com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName);
int allpage = $ECAP_ALLPAGENUM;
int nowpage = $ECAP_NOWPAGENUM;
if(allpage>1)
{
for(int i = 2;i<=allpage;i++)
{
$ECAP_NOWPAGENUM = i;
com.adtec.client.pubapp.ecapframe.Pagination.initialize(elements,1,"2");
com.adtec.client.print.LocalPrintDataElementDispose.initPrintPool();
com.adtec.client.print.LocalPrintDataElementDispose.copyIPDataPool2PrintData(aselementName);
com.adtec.client.print.LocalPrintDataElementDispose.disposeLocalPrint(fmt_name,aselementName);
}
}
<script type="text/JavaScript">
function print_selection_TS_F1_907010()
{
var returnNo = document.@[email protected];
var prtfilename = document.@[email protected]("|");
var ipgs;
if(returnNo=="00000")
{
ipgs = prtfilename.length;
FmtEngine('电信话费凭证打印','FMT_HOST_CLI_Public_F1_907102',prtfilename[0]);
if(ipgs > 1)
{
for(var i=1;i<ipgs;i++){
if(prtfilename[i]!=''){
FmtEngine('电信话费发票[第' + (i) + '页],共'+(ipgs-1)+'页','FMT_HOST_CLI_Public_TS_F1_907010_01',prtfilename[i]);
}
}
}
}
return;
}
</script>