tg_small_v9.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. **打印接装纸10cmx4cm
  3. **黄金叶(硬帝豪)接装纸
  4. **
  5. */
  6. var LODOP; //声明为全局变量
  7. function small_v9_print(username,goodsName,boxSzie,weight,checkNum,date,qrcode,supply,num,number ) {
  8. //console.log(888);
  9. LODOP=getLodop();
  10. for(var i=0; i<num ; i++) {
  11. LODOP.PRINT_INIT("");
  12. LODOP.SET_LICENSES("","152A06E8F6CBD6AC1F213ABFCB0D8604","C94CEE276DB2187AE6B65D56B3FC2848","");
  13. LODOP.SET_PRINT_PAGESIZE(1, 1000, 400, "CreateCustomPage");
  14. NewAddPrintContent(username, goodsName, boxSzie, weight, checkNum, date, qrcode, supply,number);
  15. if(window.location.host=="dm-test.7in6.com"){
  16. //为测试服务器,预览
  17. LODOP.PREVIEW();
  18. }else if(window.location.host=="dm.7in6.com"){
  19. //为正式服务器,打印
  20. LODOP.PRINT();
  21. }else{
  22. LODOP.PREVIEW();
  23. }
  24. }
  25. /* LODOP.PRINT_INIT("");
  26. LODOP.SET_PRINT_PAGESIZE(1,400,800,"CreateCustomPage");
  27. AddPrintContent(username,goodsName,boxSzie,weight,checkNum,date,qrcode);
  28. LODOP.PRINT();
  29. LODOP.PRINT_INIT("");
  30. LODOP.SET_PRINT_PAGESIZE(1,400,800,"CreateCustomPage");
  31. AddPrintContent(username,goodsName,boxSzie,weight,checkNum,date,qrcode);
  32. LODOP.PRINT();*/
  33. };
  34. function NewAddPrintContent(username,goodsName,boxSzie,weight,checkNum,date,qrcode,supply,number ) {
  35. LODOP.ADD_PRINT_TEXT(15,5,400,100,"客户:"+username);
  36. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  37. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  38. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  39. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  40. LODOP.ADD_PRINT_TEXT(35,5,431,20,"品名:"+goodsName);
  41. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  42. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  43. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  44. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  45. LODOP.ADD_PRINT_TEXT(55,5,431,20,"规格:"+boxSzie);
  46. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  47. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  48. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  49. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  50. LODOP.ADD_PRINT_TEXT(75,5,431,20,"流程号:");
  51. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  52. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  53. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  54. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  55. LODOP.ADD_PRINT_TEXT(95,5,431,20,"重量:"+weight);
  56. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  57. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  58. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  59. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  60. LODOP.ADD_PRINT_TEXT(95,120,431,20,"检验号:"+checkNum);
  61. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  62. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  63. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  64. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  65. LODOP.ADD_PRINT_TEXT(115,5,431,20,"生产日期:"+date);
  66. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  67. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  68. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  69. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  70. LODOP.ADD_PRINT_TEXT(115,170,431,20,"透气度:150cu");
  71. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  72. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  73. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  74. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  75. LODOP.ADD_PRINT_TEXT(135,5,431,20,"供应商:"+supply );
  76. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  77. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  78. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  79. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  80. LODOP.ADD_PRINT_TEXT(130,305,431,20,number);
  81. LODOP.SET_PRINT_STYLEA(0,"FontName","宋体");
  82. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  83. LODOP.SET_PRINT_STYLEA(0,"FontColor","#000000");
  84. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  85. LODOP.SET_PRINT_STYLEA(0,"QRCodeErrorLevel","M");
  86. LODOP.ADD_PRINT_BARCODE(5,265,'40mm','40mm',"QRCode",qrcode);
  87. };