@freedom_sky/feige-lib 4.32.0 → 4.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -151,6 +151,7 @@ declare class Const {
151
151
  speechLang?: undefined;
152
152
  fontFamily?: undefined;
153
153
  rtl?: undefined;
154
+ defaultEncodeType?: undefined;
154
155
  } | {
155
156
  name: string;
156
157
  img: string;
@@ -162,6 +163,19 @@ declare class Const {
162
163
  dateFormat: string;
163
164
  defaultAreaCode: string;
164
165
  rtl: boolean;
166
+ defaultEncodeType?: undefined;
167
+ } | {
168
+ name: string;
169
+ img: string;
170
+ code: string;
171
+ speechCode: string;
172
+ printCode: string;
173
+ defaultEncodeType: string;
174
+ dateFormat: string;
175
+ defaultAreaCode: string;
176
+ speechLang?: undefined;
177
+ fontFamily?: undefined;
178
+ rtl?: undefined;
165
179
  })[];
166
180
  DATE_FORMAT: {
167
181
  YEAR_MONTH_DAY: {
@@ -189,7 +189,8 @@ var Const = /** @class */ (function () {
189
189
  img: '',
190
190
  code: 'vi',
191
191
  speechCode: 'vi-VN',
192
- printCode: 'img',
192
+ printCode: 'cp1258',
193
+ defaultEncodeType: 'img',
193
194
  dateFormat: 'DAY_MONTH_YEAR',
194
195
  defaultAreaCode: '84',
195
196
  },
@@ -25,3 +25,8 @@ export declare enum PrintTypeEnum {
25
25
  Chef = "chef",
26
26
  Label = "label"
27
27
  }
28
+ export declare enum EncodeTypeEnum {
29
+ IMG = "img",
30
+ CODEPAGE = "codepage",
31
+ UTF_8 = "utf-8"
32
+ }
@@ -32,3 +32,9 @@ var PrintTypeEnum;
32
32
  PrintTypeEnum["Chef"] = "chef";
33
33
  PrintTypeEnum["Label"] = "label";
34
34
  })(PrintTypeEnum = exports.PrintTypeEnum || (exports.PrintTypeEnum = {}));
35
+ var EncodeTypeEnum;
36
+ (function (EncodeTypeEnum) {
37
+ EncodeTypeEnum["IMG"] = "img";
38
+ EncodeTypeEnum["CODEPAGE"] = "codepage";
39
+ EncodeTypeEnum["UTF_8"] = "utf-8";
40
+ })(EncodeTypeEnum = exports.EncodeTypeEnum || (exports.EncodeTypeEnum = {}));
@@ -4,7 +4,7 @@ import { Specification } from './specification.interface';
4
4
  import { Subscription } from './subscription.interface';
5
5
  import { MemberSavingRule } from './member.interface';
6
6
  import { TaxTypeEnum } from '../../enum/tax.enum';
7
- import { PrinterDeviceTypeEnum, PrinterWidthEnum, TagPrinterDeviceTypeEnum } from '../../enum/printer.enum';
7
+ import { PrinterDeviceTypeEnum, PrinterWidthEnum, TagPrinterDeviceTypeEnum, EncodeTypeEnum } from '../../enum/printer.enum';
8
8
  import { TimeMenuLoopMode } from '../../enum/time-menu.enum';
9
9
  import { WeekEnum } from '../../enum/common.enum';
10
10
  export interface Store {
@@ -160,6 +160,7 @@ export interface ReceptionPrinter {
160
160
  showWaiterName?: boolean;
161
161
  showSalesmanName?: boolean;
162
162
  showUnitPrice?: boolean;
163
+ encodeType?: EncodeTypeEnum;
163
164
  }
164
165
  export interface ChefPrinter {
165
166
  name: string;
@@ -183,6 +184,7 @@ export interface ChefPrinter {
183
184
  showWaiterName?: boolean;
184
185
  showSalesmanName?: boolean;
185
186
  addTableNumBeforeDishName?: boolean;
187
+ encodeType?: EncodeTypeEnum;
186
188
  }
187
189
  export interface LabelPrinter {
188
190
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freedom_sky/feige-lib",
3
- "version": "4.32.0",
3
+ "version": "4.34.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -186,7 +186,8 @@ class Const {
186
186
  img: '',
187
187
  code: 'vi',
188
188
  speechCode: 'vi-VN',
189
- printCode: 'img',
189
+ printCode: 'cp1258',
190
+ defaultEncodeType: 'img', // 如果有这个字段, 就以这个字段为准, 没有的话, 判断printCode是否为img, 是的话就img, 不是的话就是codepage, utf-8默认只能手动选
190
191
  dateFormat: 'DAY_MONTH_YEAR',
191
192
  defaultAreaCode: '84',
192
193
  },
@@ -27,3 +27,9 @@ export enum PrintTypeEnum {
27
27
  Chef = 'chef',
28
28
  Label = 'label',
29
29
  }
30
+
31
+ export enum EncodeTypeEnum {
32
+ IMG = 'img',
33
+ CODEPAGE = 'codepage',
34
+ UTF_8 = 'utf-8',
35
+ }
@@ -4,7 +4,12 @@ import { Specification } from './specification.interface';
4
4
  import { Subscription } from './subscription.interface';
5
5
  import { MemberSavingRule } from './member.interface';
6
6
  import { TaxTypeEnum } from '../../enum/tax.enum';
7
- import { PrinterDeviceTypeEnum, PrinterWidthEnum, TagPrinterDeviceTypeEnum } from '../../enum/printer.enum';
7
+ import {
8
+ PrinterDeviceTypeEnum,
9
+ PrinterWidthEnum,
10
+ TagPrinterDeviceTypeEnum,
11
+ EncodeTypeEnum,
12
+ } from '../../enum/printer.enum';
8
13
  import { TimeMenuLoopMode } from '../../enum/time-menu.enum';
9
14
  import { WeekEnum } from '../../enum/common.enum';
10
15
 
@@ -162,6 +167,7 @@ export interface ReceptionPrinter {
162
167
  showWaiterName?: boolean;
163
168
  showSalesmanName?: boolean;
164
169
  showUnitPrice?: boolean;
170
+ encodeType?: EncodeTypeEnum;
165
171
  }
166
172
 
167
173
  export interface ChefPrinter {
@@ -186,6 +192,7 @@ export interface ChefPrinter {
186
192
  showWaiterName?: boolean;
187
193
  showSalesmanName?: boolean;
188
194
  addTableNumBeforeDishName?: boolean;
195
+ encodeType?: EncodeTypeEnum;
189
196
  }
190
197
 
191
198
  export interface LabelPrinter {