概述
codebase="http://www.4fang.net/4ff/sc_setup.exe"
id="pazu"
name="pazu" >
function getNowDateTime()
{
var d = new Date();
var vYear = d.getFullYear();
var vMon = d.getMonth() + 1;
var vDay = d.getDate()
var h = d.getHours();
var m = d.getMinutes();
var se = d.getSeconds();
s=vYear+"/"+(vMon<10 ? "0" + vMon : vMon)+"/"+(vDay<10 ? "0"+ vDay : vDay)+" "+(h<10 ? "0"+ h : h)+":"+(m<10 ? "0" + m : m)+":"+(se<10 ? "0" +se : se);
return s;
}
//$("#Txt_Mfarm_Sn").val()
var LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));
function myPreview() {
//必须打印初始化一下
LODOP.PRINT_INIT("");
//设置页面 ,10mm 页面底部边距 ,3和CreateCustomPage高度为自适应
LODOP.SET_PRINT_PAGESIZE(3, "79mm","10mm","CreateCustomPage");
LODOP.ADD_PRINT_TEXT("3.2mm","18.5mm","26.5mm","5.3mm","西堡红酒欢迎您");
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.ADD_PRINT_TEXT("9.8mm","2.4mm","31.5mm","5.3mm","编号:"+$("#Txt_Mfarm_Sn").val());
LODOP.ADD_PRINT_TEXT("9.8mm","43.9mm","24.9mm","5.3mm","销售员:"+$("#DDL_Xiaoshou").val());
LODOP.ADD_PRINT_LINE("21.2mm","-63.8mm","20.9mm","68.5mm",2,0);
LODOP.ADD_PRINT_LINE("22.2mm","-63.8mm","22mm","68.5mm",2,0);
LODOP.ADD_PRINT_LINE("59mm","-63.8mm","58.7mm","68.5mm",2,0);
LODOP.ADD_PRINT_LINE("60.3mm","-63.8mm","60.1mm","68.5mm",2,0);
LODOP.ADD_PRINT_TEXT("15.6mm","2.4mm","21.4mm","5.3mm","品名规格");
LODOP.ADD_PRINT_TEXT("15.6mm","40mm","11.4mm","5.3mm","数量");
LODOP.ADD_PRINT_TEXT("15.6mm","54mm","14.8mm","5.3mm","金额");
var listName=document.getElementsByName("Txt_Farm_Name");
var listCount=document.getElementsByName("Txt_Farm_Count");
var listMoney=document.getElementsByName("Txt_Mfarm_TotalMoney");
var listSize=document.getElementsByName("Txt_Farm_Size");
if(listName.length>0)
{
var lineHeight=23.5;
for(var i=0;i
{
LODOP.ADD_PRINT_TEXT(""+lineHeight+"mm","2.4mm","36.8mm","5.3mm",""+listName[i].value+"/"+listSize[i].value);
LODOP.ADD_PRINT_TEXT(""+lineHeight+"mm","40.5mm","11.4mm","5.3mm",""+listCount[i].value);
LODOP.ADD_PRINT_TEXT(""+lineHeight+"mm","54mm","15.1mm","5.3mm",""+listMoney[i].value);
lineHeight+=5;
}
}
LODOP.ADD_PRINT_TEXT("61.9mm","2.6mm","26.5mm","5.3mm","总数量:"+$("#Txt_Mfarm_Cout").val()); LODOP.ADD_PRINT_TEXT("62.4mm","38.6mm","31.8mm","5.3mm","总金额:"+$("#Txt_TotalMoney").val()); LODOP.ADD_PRINT_TEXT("66.9mm","2.6mm","26.5mm","5.3mm","折扣率:"+$('#Txt_Money_Rate').numberbox('getValue'))+"%";// LODOP.ADD_PRINT_TEXT("67.5mm","38.6mm","31.8mm","5.3mm","折后金额:"+$('#Txt_Mfarm_DiscountMoney').numberbox('getValue'));// LODOP.ADD_PRINT_TEXT("73.6mm","2.9mm","33.3mm","5.3mm","付款金额:"+$('#Txt_Mfarm_BalanceMonye').numberbox('getValue'));// LODOP.ADD_PRINT_TEXT("78.6mm","2.9mm","59.3mm","5.3mm","打印日期:"+getNowDateTime()); LODOP.ADD_PRINT_TEXT(585,10,100,20,"."); // LODOP.SET_PREVIEW_WINDOW(0, 0, 0,1024 , 700, "预览查看.开始打印"); LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED",1);//横向时的正向显示 // LODOP.SET_SHOW_MODE("SETUP_ENABLESS", 11111111000001); // LODOP.PRINT_DESIGN(); //设置打印样式 // LODOP.PREVIEW(); LODOP.PRINT(); };
最后
以上就是平常草莓为你收集整理的lodop 小票排版_Web打印--Lodop 打印小票购物单的全部内容,希望文章能够帮你解决lodop 小票排版_Web打印--Lodop 打印小票购物单所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复