Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. import { NativeModules } from 'react-native';
  2. const {BluetoothManager,BluetoothEscposPrinter,BluetoothTscPrinter}= NativeModules;
  3. BluetoothTscPrinter.DIRECTION = {
  4. FORWARD: 0,
  5. BACKWARD: 1
  6. };
  7. BluetoothTscPrinter.DENSITY = {
  8. DNESITY0: 0,
  9. DNESITY1: 1,
  10. DNESITY2: 2,
  11. DNESITY3: 3,
  12. DNESITY4: 4,
  13. DNESITY5: 5,
  14. DNESITY6: 6,
  15. DNESITY7: 7,
  16. DNESITY8: 8,
  17. DNESITY9: 9,
  18. DNESITY10: 10,
  19. DNESITY11: 11,
  20. DNESITY12: 12,
  21. DNESITY13: 13,
  22. DNESITY14: 14,
  23. DNESITY15: 15
  24. };
  25. BluetoothTscPrinter.BARCODETYPE = {
  26. CODE128: "128",
  27. CODE128M: "128M",
  28. EAN128: "EAN128",
  29. ITF25: "25",
  30. ITF25C: "25C",
  31. CODE39: "39",
  32. CODE39C: "39C",
  33. CODE39S: "39S",
  34. CODE93: "93",
  35. EAN13: "EAN13",
  36. EAN13_2: "EAN13+2",
  37. EAN13_5: "EAN13+5",
  38. EAN8: "EAN8",
  39. EAN8_2: "EAN8+2",
  40. EAN8_5: "EAN8+5",
  41. CODABAR: "CODA",
  42. POST: "POST",
  43. UPCA: "EAN13",
  44. UPCA_2: "EAN13+2",
  45. UPCA_5: "EAN13+5",
  46. UPCE: "EAN13",
  47. UPCE_2: "EAN13+2",
  48. UPCE_5: "EAN13+5",
  49. CPOST: "CPOST",
  50. MSI: "MSI",
  51. MSIC: "MSIC",
  52. PLESSEY: "PLESSEY",
  53. ITF14: "ITF14",
  54. EAN14: "EAN14"
  55. };
  56. BluetoothTscPrinter.FONTTYPE = {
  57. FONT_1: "1",
  58. FONT_2: "2",
  59. FONT_3: "3",
  60. FONT_4: "4",
  61. FONT_5: "5",
  62. FONT_6: "6",
  63. FONT_7: "7",
  64. FONT_8: "8",
  65. SIMPLIFIED_CHINESE: "TSS24.BF2",
  66. TRADITIONAL_CHINESE: "TST24.BF2",
  67. KOREAN: "K"
  68. };
  69. BluetoothTscPrinter.EEC = {
  70. LEVEL_L: "L",
  71. LEVEL_M: "M",
  72. LEVEL_Q: "Q",
  73. LEVEL_H: "H"
  74. };
  75. BluetoothTscPrinter.ROTATION = {
  76. ROTATION_0: 0,
  77. ROTATION_90: 90,
  78. ROTATION_180: 180,
  79. ROTATION_270: 270
  80. };
  81. BluetoothTscPrinter.FONTMUL = {
  82. MUL_1: 1,
  83. MUL_2: 2,
  84. MUL_3: 3,
  85. MUL_4: 4,
  86. MUL_5: 5,
  87. MUL_6: 6,
  88. MUL_7: 7,
  89. MUL_8: 8,
  90. MUL_9: 9,
  91. MUL_10: 10
  92. };
  93. BluetoothTscPrinter.BITMAP_MODE = {
  94. OVERWRITE: 0,
  95. OR: 1,
  96. XOR: 2
  97. };
  98. BluetoothTscPrinter.PRINT_SPEED = {
  99. SPEED1DIV5:1,
  100. SPEED2:2,
  101. SPEED3:3,
  102. SPEED4:4
  103. };
  104. BluetoothTscPrinter.TEAR = {
  105. ON:'ON',
  106. OFF:'OFF'
  107. };
  108. BluetoothTscPrinter.READABLE={
  109. DISABLE:0,
  110. EANBLE:1
  111. };
  112. BluetoothEscposPrinter.ERROR_CORRECTION = {
  113. L:1,
  114. M:0,
  115. Q:3,
  116. H:2
  117. };
  118. BluetoothEscposPrinter.BARCODETYPE={
  119. UPC_A:65,//11<=n<=12
  120. UPC_E:66,//11<=n<=12
  121. JAN13:67,//12<=n<=12
  122. JAN8:68,//7<=n<=8
  123. CODE39:69,//1<=n<=255
  124. ITF:70,//1<=n<=255(even numbers)
  125. CODABAR:71,//1<=n<=255
  126. CODE93:72,//1<=n<=255
  127. CODE128:73//2<=n<=255
  128. };
  129. BluetoothEscposPrinter.ROTATION={
  130. OFF:0,
  131. ON:1
  132. };
  133. BluetoothEscposPrinter.ALIGN={
  134. LEFT:0,
  135. CENTER:1,
  136. RIGHT:2
  137. };
  138. module.exports ={
  139. BluetoothManager,BluetoothEscposPrinter,BluetoothTscPrinter};