| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- /*
- * 2018-09-19
- * 打印小件(8mmx4mm)接装纸
- * */
- var LODOP; //声明为全局变量
- function small_v11_print(username,goodsName,boxSzie,weight,checkNum,date,qrcode,supply,num,number ) {
- LODOP=getLodop();
- for(var i=0;i<num;i++) {
- LODOP.PRINT_INIT("");
- LODOP.SET_LICENSES("","152A06E8F6CBD6AC1F213ABFCB0D8604","C94CEE276DB2187AE6B65D56B3FC2848","");
- LODOP.SET_PRINT_PAGESIZE(1, 800, 400, "CreateCustomPage");
- AddPrintContent2(username, goodsName, boxSzie, weight, checkNum, date, qrcode, supply, number);
- if(window.location.host=="dm-test.7in6.com"){
- //为测试服务器,预览
- LODOP.PREVIEW();
- }else if(window.location.host=="dm.7in6.com"){
- //为正式服务器,打印
- LODOP.PRINT();
- }else{
- LODOP.PREVIEW();
- }
- }
- /* LODOP.PRINT_INIT("");
- LODOP.SET_PRINT_PAGESIZE(1,400,800,"CreateCustomPage");
- AddPrintContent(username,goodsName,boxSzie,weight,checkNum,date,qrcode);
- LODOP.PRINT();
- LODOP.PRINT_INIT("");
- LODOP.SET_PRINT_PAGESIZE(1,400,800,"CreateCustomPage");
- AddPrintContent(username,goodsName,boxSzie,weight,checkNum,date,qrcode);
- LODOP.PRINT();*/
- };
- function AddPrintContent2(username,goodsName,boxSzie,weight,checkNum,date,qrcode,supply,number ) {
- LODOP.ADD_PRINT_TEXT(15,5,400,100,"客户:"+username);
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(35,5,431,20,"品名:"+goodsName);
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(55,5,431,20,"规格:"+boxSzie);
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(75,5,431,20,"流程号:");
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(95,5,431,20,"重量:"+weight);
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(95,120,431,20,"检验号:"+checkNum);
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(115,5,431,20,"生产日期:"+date);
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(115,160,431,20,"透气度:150cu");
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(135,5,431,20,"供应商:"+supply );
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.ADD_PRINT_TEXT(95,230,431,20,number);
- LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
- LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
- LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
- LODOP.SET_PRINT_STYLEA(0,"Bold",1);
- LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel","M");
- LODOP.ADD_PRINT_BARCODE(20,210,'30mm','30mm',"QRCode",qrcode);
- };
|