tplus-components-touch 3.28.1 → 3.29.2
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.
- package/dist/components/billSearch/index.js +17 -155
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +3 -6
- package/dist/components/cloudPrint/api.js +43 -85
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js +57 -4
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +108 -209
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/deliverySearch/index.js +12 -8
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/input/scanInput.js +98 -0
- package/dist/components/input/scanInput.js.map +1 -0
- package/dist/components/input/scanInput.less +28 -0
- package/dist/components/inventorySearch/store.js +31 -12
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +70 -80
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/loading/loadingContent.js +13 -4
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +17 -6
- package/dist/components/message/index.js +8 -5
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +5 -8
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +85 -96
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/socket/index.js +6 -5
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +5202 -5202
- package/dist/components/ticon/iconfont/iconfont.css +887 -887
- package/dist/components/ticon/iconfont/iconfont.json +1535 -1535
- package/dist/index.js +7 -14
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js +5 -7
- package/dist/util/tools.js.map +1 -1
- package/package.json +2 -2
|
@@ -4,10 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var _stringify = require('babel-runtime/core-js/json/stringify');
|
|
8
|
-
|
|
9
|
-
var _stringify2 = _interopRequireDefault(_stringify);
|
|
10
|
-
|
|
11
7
|
var _regenerator = require('babel-runtime/regenerator');
|
|
12
8
|
|
|
13
9
|
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
@@ -132,30 +128,25 @@ var API = function () {
|
|
|
132
128
|
return getPrintDataInfo;
|
|
133
129
|
}()
|
|
134
130
|
|
|
135
|
-
|
|
131
|
+
//获取日结打印数据
|
|
136
132
|
|
|
137
133
|
}, {
|
|
138
|
-
key: '
|
|
134
|
+
key: 'getDialyPrintDataInfo',
|
|
139
135
|
value: function () {
|
|
140
|
-
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(
|
|
141
|
-
var
|
|
136
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(Id) {
|
|
137
|
+
var data;
|
|
142
138
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
143
139
|
while (1) {
|
|
144
140
|
switch (_context3.prev = _context3.next) {
|
|
145
141
|
case 0:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
param.Idstore = dto.Idstore;
|
|
149
|
-
param.POSCode = dto.POSCode;
|
|
150
|
-
|
|
151
|
-
_context3.next = 5;
|
|
152
|
-
return (0, _tplusApi.tApi)({ param: (0, _stringify2.default)(param) }, 'chanjet.RE.NewPos.GetPrintInfomation', false, false);
|
|
142
|
+
_context3.next = 2;
|
|
143
|
+
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.Interface.IDailyDetail.FindById', false, false);
|
|
153
144
|
|
|
154
|
-
case
|
|
145
|
+
case 2:
|
|
155
146
|
data = _context3.sent;
|
|
156
147
|
return _context3.abrupt('return', data);
|
|
157
148
|
|
|
158
|
-
case
|
|
149
|
+
case 4:
|
|
159
150
|
case 'end':
|
|
160
151
|
return _context3.stop();
|
|
161
152
|
}
|
|
@@ -163,17 +154,17 @@ var API = function () {
|
|
|
163
154
|
}, _callee3, this);
|
|
164
155
|
}));
|
|
165
156
|
|
|
166
|
-
function
|
|
157
|
+
function getDialyPrintDataInfo(_x3) {
|
|
167
158
|
return _ref3.apply(this, arguments);
|
|
168
159
|
}
|
|
169
160
|
|
|
170
|
-
return
|
|
161
|
+
return getDialyPrintDataInfo;
|
|
171
162
|
}()
|
|
172
163
|
|
|
173
|
-
|
|
164
|
+
//获取交班打印数据
|
|
174
165
|
|
|
175
166
|
}, {
|
|
176
|
-
key: '
|
|
167
|
+
key: 'getDutyPrintDataInfo',
|
|
177
168
|
value: function () {
|
|
178
169
|
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(Id) {
|
|
179
170
|
var data;
|
|
@@ -182,7 +173,7 @@ var API = function () {
|
|
|
182
173
|
switch (_context4.prev = _context4.next) {
|
|
183
174
|
case 0:
|
|
184
175
|
_context4.next = 2;
|
|
185
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.
|
|
176
|
+
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.IShiftVoucher.FindById', false, false);
|
|
186
177
|
|
|
187
178
|
case 2:
|
|
188
179
|
data = _context4.sent;
|
|
@@ -196,17 +187,17 @@ var API = function () {
|
|
|
196
187
|
}, _callee4, this);
|
|
197
188
|
}));
|
|
198
189
|
|
|
199
|
-
function
|
|
190
|
+
function getDutyPrintDataInfo(_x4) {
|
|
200
191
|
return _ref4.apply(this, arguments);
|
|
201
192
|
}
|
|
202
193
|
|
|
203
|
-
return
|
|
194
|
+
return getDutyPrintDataInfo;
|
|
204
195
|
}()
|
|
205
196
|
|
|
206
|
-
|
|
197
|
+
//获取储值打印数据
|
|
207
198
|
|
|
208
199
|
}, {
|
|
209
|
-
key: '
|
|
200
|
+
key: 'getStoragePrintDataInfo',
|
|
210
201
|
value: function () {
|
|
211
202
|
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(Id) {
|
|
212
203
|
var data;
|
|
@@ -215,7 +206,7 @@ var API = function () {
|
|
|
215
206
|
switch (_context5.prev = _context5.next) {
|
|
216
207
|
case 0:
|
|
217
208
|
_context5.next = 2;
|
|
218
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.
|
|
209
|
+
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.ME.Interface.IMemberStorage.FindById', false, false);
|
|
219
210
|
|
|
220
211
|
case 2:
|
|
221
212
|
data = _context5.sent;
|
|
@@ -229,43 +220,10 @@ var API = function () {
|
|
|
229
220
|
}, _callee5, this);
|
|
230
221
|
}));
|
|
231
222
|
|
|
232
|
-
function
|
|
223
|
+
function getStoragePrintDataInfo(_x5) {
|
|
233
224
|
return _ref5.apply(this, arguments);
|
|
234
225
|
}
|
|
235
226
|
|
|
236
|
-
return getDutyPrintDataInfo;
|
|
237
|
-
}()
|
|
238
|
-
|
|
239
|
-
//获取储值打印数据
|
|
240
|
-
|
|
241
|
-
}, {
|
|
242
|
-
key: 'getStoragePrintDataInfo',
|
|
243
|
-
value: function () {
|
|
244
|
-
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(Id) {
|
|
245
|
-
var data;
|
|
246
|
-
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
247
|
-
while (1) {
|
|
248
|
-
switch (_context6.prev = _context6.next) {
|
|
249
|
-
case 0:
|
|
250
|
-
_context6.next = 2;
|
|
251
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.ME.Interface.IMemberStorage.FindById', false, false);
|
|
252
|
-
|
|
253
|
-
case 2:
|
|
254
|
-
data = _context6.sent;
|
|
255
|
-
return _context6.abrupt('return', data);
|
|
256
|
-
|
|
257
|
-
case 4:
|
|
258
|
-
case 'end':
|
|
259
|
-
return _context6.stop();
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}, _callee6, this);
|
|
263
|
-
}));
|
|
264
|
-
|
|
265
|
-
function getStoragePrintDataInfo(_x6) {
|
|
266
|
-
return _ref6.apply(this, arguments);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
227
|
return getStoragePrintDataInfo;
|
|
270
228
|
}()
|
|
271
229
|
|
|
@@ -274,11 +232,11 @@ var API = function () {
|
|
|
274
232
|
}, {
|
|
275
233
|
key: 'openQueryPrinterStatus',
|
|
276
234
|
value: function () {
|
|
277
|
-
var
|
|
235
|
+
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(params) {
|
|
278
236
|
var ts, dt, options;
|
|
279
|
-
return _regenerator2.default.wrap(function
|
|
237
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
280
238
|
while (1) {
|
|
281
|
-
switch (
|
|
239
|
+
switch (_context6.prev = _context6.next) {
|
|
282
240
|
case 0:
|
|
283
241
|
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
284
242
|
dt = ['sig=' + this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts), 'apiname=' + params.apiname, 'debug=0', 'stime=' + ts, 'sn=' + params.deviceCode, 'user=' + FEI_E_YUN_USER];
|
|
@@ -290,18 +248,18 @@ var API = function () {
|
|
|
290
248
|
data: dt,
|
|
291
249
|
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
292
250
|
};
|
|
293
|
-
return
|
|
251
|
+
return _context6.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
294
252
|
|
|
295
253
|
case 5:
|
|
296
254
|
case 'end':
|
|
297
|
-
return
|
|
255
|
+
return _context6.stop();
|
|
298
256
|
}
|
|
299
257
|
}
|
|
300
|
-
},
|
|
258
|
+
}, _callee6, this);
|
|
301
259
|
}));
|
|
302
260
|
|
|
303
|
-
function openQueryPrinterStatus(
|
|
304
|
-
return
|
|
261
|
+
function openQueryPrinterStatus(_x6) {
|
|
262
|
+
return _ref6.apply(this, arguments);
|
|
305
263
|
}
|
|
306
264
|
|
|
307
265
|
return openQueryPrinterStatus;
|
|
@@ -312,11 +270,11 @@ var API = function () {
|
|
|
312
270
|
}, {
|
|
313
271
|
key: 'openPrinterAddlist',
|
|
314
272
|
value: function () {
|
|
315
|
-
var
|
|
273
|
+
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(params) {
|
|
316
274
|
var ts, dt, options;
|
|
317
|
-
return _regenerator2.default.wrap(function
|
|
275
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
318
276
|
while (1) {
|
|
319
|
-
switch (
|
|
277
|
+
switch (_context7.prev = _context7.next) {
|
|
320
278
|
case 0:
|
|
321
279
|
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
322
280
|
dt = ['printerContent=' + params.printerContent, 'user=' + FEI_E_YUN_USER, 'stime=' + ts, 'sig=' + this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts), 'apiname=' + params.apiname, 'debug=0'];
|
|
@@ -328,18 +286,18 @@ var API = function () {
|
|
|
328
286
|
data: dt,
|
|
329
287
|
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
330
288
|
};
|
|
331
|
-
return
|
|
289
|
+
return _context7.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
332
290
|
|
|
333
291
|
case 5:
|
|
334
292
|
case 'end':
|
|
335
|
-
return
|
|
293
|
+
return _context7.stop();
|
|
336
294
|
}
|
|
337
295
|
}
|
|
338
|
-
},
|
|
296
|
+
}, _callee7, this);
|
|
339
297
|
}));
|
|
340
298
|
|
|
341
|
-
function openPrinterAddlist(
|
|
342
|
-
return
|
|
299
|
+
function openPrinterAddlist(_x7) {
|
|
300
|
+
return _ref7.apply(this, arguments);
|
|
343
301
|
}
|
|
344
302
|
|
|
345
303
|
return openPrinterAddlist;
|
|
@@ -350,11 +308,11 @@ var API = function () {
|
|
|
350
308
|
}, {
|
|
351
309
|
key: 'openPrintMsg',
|
|
352
310
|
value: function () {
|
|
353
|
-
var
|
|
311
|
+
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(params) {
|
|
354
312
|
var ts, dt, options;
|
|
355
|
-
return _regenerator2.default.wrap(function
|
|
313
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
356
314
|
while (1) {
|
|
357
|
-
switch (
|
|
315
|
+
switch (_context8.prev = _context8.next) {
|
|
358
316
|
case 0:
|
|
359
317
|
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
360
318
|
dt = ['content=' + params.content, 'printerContent=' + params.printerContent, 'user=' + FEI_E_YUN_USER, 'stime=' + ts, 'sig=' + this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts), 'apiname=' + params.apiname, 'debug=0', 'sn=' + params.deviceCode, 'times=' + params.times //打印次数
|
|
@@ -367,18 +325,18 @@ var API = function () {
|
|
|
367
325
|
data: dt,
|
|
368
326
|
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
369
327
|
};
|
|
370
|
-
return
|
|
328
|
+
return _context8.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
371
329
|
|
|
372
330
|
case 5:
|
|
373
331
|
case 'end':
|
|
374
|
-
return
|
|
332
|
+
return _context8.stop();
|
|
375
333
|
}
|
|
376
334
|
}
|
|
377
|
-
},
|
|
335
|
+
}, _callee8, this);
|
|
378
336
|
}));
|
|
379
337
|
|
|
380
|
-
function openPrintMsg(
|
|
381
|
-
return
|
|
338
|
+
function openPrintMsg(_x8) {
|
|
339
|
+
return _ref8.apply(this, arguments);
|
|
382
340
|
}
|
|
383
341
|
|
|
384
342
|
return openPrintMsg;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/cloudPrint/api.js"],"names":["HTTP_PROXY_URL","FEI_E_YUN_HOST","FEI_E_YUN_USER","FEI_E_YUN_KEYS","API","props","shaEncrypt","originalText","password","md5","crypto","createHash","update","data","digest","i","length","v","hv","toString","params","dataSource","BizCode","bizCode","Id","id","
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/cloudPrint/api.js"],"names":["HTTP_PROXY_URL","FEI_E_YUN_HOST","FEI_E_YUN_USER","FEI_E_YUN_KEYS","API","props","shaEncrypt","originalText","password","md5","crypto","createHash","update","data","digest","i","length","v","hv","toString","params","dataSource","BizCode","bizCode","Id","id","ts","Math","round","Date","getTime","dt","apiname","deviceCode","join","options","method","headers","url","printerContent","content","times"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAEA,IAAMA,iBAAiB,4BAAvB;AACA,IAAMC,iBAAiB,iCAAvB;AACA,IAAMC,iBAAiB,mBAAvB;AACA,IAAMC,iBAAiB,kBAAvB;;IAEMC,G;AACF,iBAAYC,KAAZ,EAAmB;AAAA;;AAAA,aAGnBC,UAHmB,GAGN,UAACC,YAAD,EAAkB;AAC3B,gBAAIC,WAAW,EAAf;AACA,gBAAIC,MAAMC,iBAAOC,UAAP,CAAkB,MAAlB,CAAV;AACAF,gBAAIG,MAAJ,CAAWL,YAAX;AACA,gBAAIM,OAAOJ,IAAIK,MAAJ,EAAX;AACA,iBAAK,IAAIC,IAAI,CAAb,EAAgBA,IAAIF,KAAKG,MAAzB,EAAiCD,GAAjC,EAAsC;;AAElC,oBAAIE,IAAIJ,KAAKE,CAAL,IAAU,IAAlB;AACA,oBAAIG,KAAKD,EAAEE,QAAF,CAAW,EAAX,CAAT;AACA,oBAAID,GAAGF,MAAH,GAAY,CAAhB,EAAmB;AACfR,+BAAWA,WAAW,CAAtB;AACH;AACDA,2BAAWA,WAAWU,EAAtB;AACH;AACD,mBAAOV,QAAP;AACH,SAlBkB;AAAG;;AAEtB;;;;;;;AAkBA;;iHACoBY,M;;;;;;AACRC,0C,GAAeD,M,CAAfC,U;;uCACW,oBAA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\r\nimport { api } from 'mutants-microfx';\r\nimport crypto from 'crypto';\r\n\r\nconst HTTP_PROXY_URL = \"http://tfproxy.chanjet.com\";\r\nconst FEI_E_YUN_HOST = \"http://api.feieyun.cn/Api/Open/\";\r\nconst FEI_E_YUN_USER = \"tplus@chanjet.com\";\r\nconst FEI_E_YUN_KEYS = \"nyktjQ9nVyY6BfIs\";\r\n\r\nclass API {\r\n constructor(props) { }\r\n\r\n //飞蛾参数加密\r\n shaEncrypt = (originalText) => {\r\n let password = \"\";\r\n let md5 = crypto.createHash('sha1');\r\n md5.update(originalText);\r\n let data = md5.digest();\r\n for (let i = 0; i < data.length; i++) {\r\n\r\n let v = data[i] & 0xFF;\r\n let hv = v.toString(16);\r\n if (hv.length < 2) {\r\n password = password + 0;\r\n }\r\n password = password + hv;\r\n }\r\n return password;\r\n }\r\n\r\n //获取枚举列表信息\r\n async getDataSource(params) {\r\n const { dataSource } = params;\r\n const data = await tApi({ BizCode: params.bizCode }, dataSource, false, false);\r\n return data;\r\n }\r\n\r\n //获取打印数据\r\n async getPrintDataInfo(Id) {\r\n const data = await tApi({ id:Id }, 'chanjet.RE.INewRetail.FindById', false, false);\r\n return data;\r\n }\r\n\r\n //获取日结打印数据\r\n async getDialyPrintDataInfo(Id) {\r\n const data = await tApi({ id:Id }, 'Ufida.T.RE.Interface.IDailyDetail.FindById', false, false);\r\n return data;\r\n }\r\n\r\n //获取交班打印数据\r\n async getDutyPrintDataInfo(Id) {\r\n const data = await tApi({ id:Id }, 'Ufida.T.RE.IShiftVoucher.FindById', false, false);\r\n return data;\r\n } \r\n\r\n //获取储值打印数据\r\n async getStoragePrintDataInfo(Id) {\r\n const data = await tApi({ id:Id }, 'Ufida.T.ME.Interface.IMemberStorage.FindById', false, false);\r\n return data;\r\n }\r\n\r\n // 小票打印-获取状态信息。类似{\"msg\":\"ok\",\"ret\":0,\"data\":\"\\u79bb\\u7ebf\\u3002\",\"serverExecutedTime\":5}\r\n async openQueryPrinterStatus(params) {\r\n let ts = Math.round(new Date().getTime() / 1000).toString();\r\n let dt = [\r\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\r\n `apiname=${params.apiname}`,\r\n `debug=0`,\r\n `stime=${ts}`,\r\n `sn=${params.deviceCode}`,\r\n `user=${FEI_E_YUN_USER}`\r\n ]\r\n dt = dt.join('&');\r\n const options = {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n data: dt,\r\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\r\n };\r\n return api(options);\r\n }\r\n\r\n // 小票打印-云打印\r\n async openPrinterAddlist(params) {\r\n let ts = Math.round(new Date().getTime() / 1000).toString();\r\n let dt = [\r\n `printerContent=${params.printerContent}`,\r\n `user=${FEI_E_YUN_USER}`,\r\n `stime=${ts}`,\r\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\r\n `apiname=${params.apiname}`,\r\n `debug=0`\r\n ]\r\n dt = dt.join('&');\r\n const options = {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n data: dt,\r\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\r\n };\r\n return api(options);\r\n }\r\n\r\n // 小票打印-发出打印指令\r\n async openPrintMsg(params) {\r\n let ts = Math.round(new Date().getTime() / 1000).toString();\r\n let dt = [\r\n `content=${params.content}`,\r\n `printerContent=${params.printerContent}`,\r\n `user=${FEI_E_YUN_USER}`,\r\n `stime=${ts}`,\r\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\r\n `apiname=${params.apiname}`,\r\n `debug=0`,\r\n `sn=${params.deviceCode}`,\r\n `times=${params.times}` //打印次数\r\n ]\r\n dt = dt.join('&');\r\n const options = {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n data: dt,\r\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\r\n };\r\n return api(options);\r\n }\r\n}\r\nexport default new API;\r\n"]}
|
|
@@ -153,7 +153,8 @@ var PrintUtil = (_temp = _class = function () {
|
|
|
153
153
|
Member = _ref2.Member,
|
|
154
154
|
BalanceIntegral = _ref2.BalanceIntegral,
|
|
155
155
|
Integral = _ref2.Integral,
|
|
156
|
-
BalanceStorage = _ref2.BalanceStorage
|
|
156
|
+
BalanceStorage = _ref2.BalanceStorage,
|
|
157
|
+
RetailPaymentDetails = _ref2.RetailPaymentDetails;
|
|
157
158
|
|
|
158
159
|
var details = [];
|
|
159
160
|
|
|
@@ -186,7 +187,8 @@ var PrintUtil = (_temp = _class = function () {
|
|
|
186
187
|
Member: Member,
|
|
187
188
|
BalanceIntegral: BalanceIntegral,
|
|
188
189
|
Integral: Integral,
|
|
189
|
-
BalanceStorage: BalanceStorage
|
|
190
|
+
BalanceStorage: BalanceStorage,
|
|
191
|
+
RetailPaymentDetails: RetailPaymentDetails
|
|
190
192
|
});
|
|
191
193
|
_this.cloudPrint(constr, printParams, callback);
|
|
192
194
|
});
|
|
@@ -470,7 +472,7 @@ var PrintUtil = (_temp = _class = function () {
|
|
|
470
472
|
};
|
|
471
473
|
|
|
472
474
|
this.loadBTPrintData = function (params) {
|
|
473
|
-
var _printEntity$detailCo2;
|
|
475
|
+
var _printEntity$paymentT, _printEntity$detailCo2;
|
|
474
476
|
|
|
475
477
|
var templateContent = '';
|
|
476
478
|
var printEntity = {};
|
|
@@ -487,10 +489,13 @@ var PrintUtil = (_temp = _class = function () {
|
|
|
487
489
|
Member = _ref12.Member,
|
|
488
490
|
BalanceIntegral = _ref12.BalanceIntegral,
|
|
489
491
|
Integral = _ref12.Integral,
|
|
490
|
-
BalanceStorage = _ref12.BalanceStorage
|
|
492
|
+
BalanceStorage = _ref12.BalanceStorage,
|
|
493
|
+
RetailPaymentDetails = _ref12.RetailPaymentDetails;
|
|
491
494
|
|
|
492
495
|
printEntity.headerMap = new _map2.default();
|
|
493
496
|
printEntity.detailTopList = [];
|
|
497
|
+
printEntity.paymentTypeTopList = [];
|
|
498
|
+
printEntity.paymentTypeDetailList = [];
|
|
494
499
|
printEntity.detailContentList = [];
|
|
495
500
|
printEntity.footerMap1 = new _map2.default();
|
|
496
501
|
printEntity.footerMap2 = new _map2.default();
|
|
@@ -519,10 +524,25 @@ var PrintUtil = (_temp = _class = function () {
|
|
|
519
524
|
IsTitle: false,
|
|
520
525
|
IsFoot: false
|
|
521
526
|
});
|
|
527
|
+
|
|
528
|
+
//支付方式
|
|
529
|
+
printEntity.paymentTypeTopList.push({
|
|
530
|
+
Caption: '支付方式',
|
|
531
|
+
IsTitle: false,
|
|
532
|
+
IsFoot: false
|
|
533
|
+
});
|
|
534
|
+
printEntity.paymentTypeTopList.push({
|
|
535
|
+
Caption: '金额',
|
|
536
|
+
IsTitle: false,
|
|
537
|
+
IsFoot: false
|
|
538
|
+
});
|
|
539
|
+
(_printEntity$paymentT = printEntity.paymentTypeDetailList).push.apply(_printEntity$paymentT, (0, _toConsumableArray3.default)(RetailPaymentDetails));
|
|
540
|
+
|
|
522
541
|
(_printEntity$detailCo2 = printEntity.detailContentList).push.apply(_printEntity$detailCo2, (0, _toConsumableArray3.default)(details));
|
|
523
542
|
printEntity.footerMap1.set('数量', TotalCount);
|
|
524
543
|
printEntity.footerMap1.set('金额', TotalTaxAmount);
|
|
525
544
|
printEntity.footerMap1.set('抹零', WipeChange || '0.00');
|
|
545
|
+
|
|
526
546
|
printEntity.footerMap2.set('会员卡号', Member && Member.CardCode || '');
|
|
527
547
|
printEntity.footerMap2.set('会员手机', Member && Member.Mobilephone || '');
|
|
528
548
|
printEntity.footerMap2.set('积分余额', BalanceIntegral || '0');
|
|
@@ -536,6 +556,9 @@ var PrintUtil = (_temp = _class = function () {
|
|
|
536
556
|
if (printEntity.headerMap && printEntity.headerMap.size > 0) {
|
|
537
557
|
templateContent += _BTPrintFormatUtil2.default.leftPrintMsg(printEntity.headerMap);
|
|
538
558
|
}
|
|
559
|
+
|
|
560
|
+
templateContent += '\n';
|
|
561
|
+
|
|
539
562
|
//单据内容--头部
|
|
540
563
|
var mhList = [];
|
|
541
564
|
if (printEntity.detailTopList && printEntity.detailTopList.length > 0) {
|
|
@@ -559,12 +582,42 @@ var PrintUtil = (_temp = _class = function () {
|
|
|
559
582
|
bodyValueList.push(bodyValue);
|
|
560
583
|
});
|
|
561
584
|
templateContent += _BTPrintFormatUtil2.default.printMenuMSG(bodyValueList, mhList, true);
|
|
585
|
+
|
|
562
586
|
//单据底部1
|
|
563
587
|
if (printEntity.footerMap1 && printEntity.footerMap1.size > 0) {
|
|
564
588
|
templateContent += _BTPrintFormatUtil2.default.leftPrintMsg(printEntity.footerMap1);
|
|
565
589
|
}
|
|
566
590
|
templateContent += _BTPrintFormatUtil2.default.drawSeparateLine();
|
|
567
591
|
templateContent += '\n';
|
|
592
|
+
|
|
593
|
+
//支付方式--头部
|
|
594
|
+
var phList = [];
|
|
595
|
+
if (printEntity.paymentTypeTopList && printEntity.paymentTypeTopList.length > 0) {
|
|
596
|
+
printEntity.paymentTypeTopList.forEach(function (item, index) {
|
|
597
|
+
var mh = {
|
|
598
|
+
headerText: item.Caption,
|
|
599
|
+
headerWeight: index == 0 ? 3 : 1,
|
|
600
|
+
isTitle: item.IsTitle,
|
|
601
|
+
isFoot: item.IsFoot
|
|
602
|
+
};
|
|
603
|
+
phList.push(mh);
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
//支付方式--明细
|
|
607
|
+
var pBodyValueList = [];
|
|
608
|
+
printEntity.paymentTypeDetailList.forEach(function (items) {
|
|
609
|
+
var bodyValue = [];
|
|
610
|
+
var _items$Amount = items.Amount,
|
|
611
|
+
Amount = _items$Amount === undefined ? '0.00' : _items$Amount,
|
|
612
|
+
_items$SettleStyle$Na = items.SettleStyle.Name,
|
|
613
|
+
Name = _items$SettleStyle$Na === undefined ? "其他方式" : _items$SettleStyle$Na;
|
|
614
|
+
|
|
615
|
+
bodyValue.push(Name);
|
|
616
|
+
bodyValue.push(_mutantsUtil.tools.format(Amount));
|
|
617
|
+
pBodyValueList.push(bodyValue);
|
|
618
|
+
});
|
|
619
|
+
templateContent += _BTPrintFormatUtil2.default.printMenuMSG(pBodyValueList, phList, true);
|
|
620
|
+
|
|
568
621
|
//单据底部2
|
|
569
622
|
if (printEntity.footerMap2 && printEntity.footerMap2.size > 0) {
|
|
570
623
|
templateContent += _BTPrintFormatUtil2.default.leftPrintMsg(printEntity.footerMap2);
|