赫艾前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
5.7 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. /*调用js打印标签*/
  2. import getLodop from '@/utils/LodopFuncs.js'
  3. /*打印材料卷标签*/
  4. export function printSeqNoLabel(printList) {
  5. const LODOP = getLodop()
  6. if (LODOP) {
  7. //LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
  8. LODOP.SET_LICENSES("", "AF8A5800B84BCC5218BCF67B92627BEA", "", "");
  9. LODOP.SET_PRINTER_INDEXA("小标签打印机");
  10. //循环调用打印机
  11. for(let i = 0; i < printList.length; i++){
  12. let printData = printList[i];
  13. LODOP.NewPage();
  14. LODOP.SET_PRINT_PAGESIZE(0,1000,700,"");
  15. LODOP.ADD_PRINT_BARCODE(43,244,208,140,"QRCode",printData.seqNo);
  16. LODOP.ADD_PRINT_TEXT(90,8,108,25,"Part No:");
  17. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  18. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  19. LODOP.ADD_PRINT_TEXT(90,110,140,25,printData.partNo);
  20. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  21. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  22. LODOP.ADD_PRINT_TEXT(143,8,128,24,"Operator:");
  23. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  24. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  25. LODOP.ADD_PRINT_TEXT(143,110,140,20,printData.operatorName);
  26. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  27. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  28. LODOP.ADD_PRINT_TEXT(116,8,113,25,"Shift:");
  29. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  30. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  31. LODOP.ADD_PRINT_TEXT(116,110,139,25,printData.sShiftNo);
  32. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  33. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  34. LODOP.ADD_PRINT_TEXT(41,8,98,25,"Job No:");
  35. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  36. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  37. LODOP.ADD_PRINT_TEXT(41,110,136,25,printData.seqNo);
  38. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  39. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  40. LODOP.ADD_PRINT_TEXT(168,8,94,25,"Order No:");
  41. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  42. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  43. LODOP.ADD_PRINT_TEXT(168,110,141,25,printData.orderNo);
  44. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  45. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  46. LODOP.ADD_PRINT_TEXT(66,8,96,25,"Qty:");
  47. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  48. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  49. LODOP.ADD_PRINT_TEXT(66,110,138,24,printData.qtyRequired);
  50. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  51. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  52. LODOP.ADD_PRINT_TEXT(194,8,128,25,"Work Date:");
  53. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  54. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  55. LODOP.ADD_PRINT_TEXT(194,110,170,25,printData.sScheduledDate);
  56. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  57. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  58. LODOP.ADD_PRINT_TEXT(224,5,256,24,"Manufactured by A&M Polymer");
  59. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  60. LODOP.ADD_PRINT_TEXT(224,259,109,25,"vender Code:");
  61. LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  62. LODOP.ADD_PRINT_LINE(218,2,217,374,0,1);
  63. LODOP.ADD_PRINT_TEXT(12,122,135,30,"派工单标签");
  64. LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
  65. LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
  66. LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  67. }
  68. LODOP.PRINT_DESIGN();
  69. //LODOP.PREVIEW();
  70. // LODOP.PRINT();
  71. console.log("操作成功!")
  72. }
  73. }
  74. // LODOP.SET_PRINT_PAGESIZE(0,1000,700,"");
  75. // LODOP.ADD_PRINT_BARCODE(11,244,208,140,"QRCode",printData.seqNo);
  76. // LODOP.ADD_PRINT_TEXT(58,8,108,25,"PartNo:");
  77. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  78. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  79. // LODOP.ADD_PRINT_TEXT(58,110,140,25,printData.partNo);
  80. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  81. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  82. // LODOP.ADD_PRINT_TEXT(111,8,128,24,"Operator:");
  83. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  84. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  85. // LODOP.ADD_PRINT_TEXT(111,110,140,20,printData.operatorName);
  86. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  87. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  88. // LODOP.ADD_PRINT_TEXT(84,8,113,25,"Shift:");
  89. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  90. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  91. // LODOP.ADD_PRINT_TEXT(84,110,139,25,printData.sShiftNo);
  92. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  93. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  94. // LODOP.ADD_PRINT_TEXT(9,8,98,25,"SeqNo:");
  95. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  96. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  97. // LODOP.ADD_PRINT_TEXT(9,110,136,25,printData.seqNo);
  98. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  99. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  100. // LODOP.ADD_PRINT_TEXT(136,8,94,25,"OrderNo:");
  101. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  102. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  103. // LODOP.ADD_PRINT_TEXT(136,110,141,25,printData.orderNo);
  104. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  105. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  106. // LODOP.ADD_PRINT_TEXT(34,8,96,25,"Qty:");
  107. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  108. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  109. // LODOP.ADD_PRINT_TEXT(34,110,138,24,printData.qtyRequired);
  110. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  111. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  112. // LODOP.ADD_PRINT_TEXT(162,8,128,25,"ScheduledDate:");
  113. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  114. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  115. // LODOP.ADD_PRINT_TEXT(162,110,170,25,printData.sScheduledDate);
  116. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  117. // LODOP.SET_PRINT_STYLEA(0,"Bold",1);
  118. // LODOP.ADD_PRINT_TEXT(192,5,256,24,"Manufactured by A&M Polymer");
  119. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  120. // LODOP.ADD_PRINT_TEXT(192,259,109,25,"vender Code:");
  121. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  122. // LODOP.ADD_PRINT_TEXT(210,5,257,35,"No.188 Taigu Road,Lili lndustrial Park,Wujiang District,Suzhou,China");
  123. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  124. // LODOP.ADD_PRINT_TEXT(246,5,407,35,"Phone: 086-0512-63678826 Email: service@husenrubber.com");
  125. // LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
  126. // LODOP.ADD_PRINT_LINE(186,2,187,374,0,1);