tplus-components-touch 3.44.2 → 3.44.5
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 +2 -2
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +2 -2
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/index.js +893 -608
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +184 -48
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/cloudPrint/printTemplate/dialy_one.json +239 -0
- package/dist/components/cloudPrint/printTemplate/duty_one.json +239 -0
- package/dist/components/cloudPrint/printTemplate/retail_one.json +204 -0
- package/dist/components/cloudPrint/printTemplate/retail_two.json +220 -0
- package/dist/components/cloudPrint/printTemplate/storage_one.json +129 -0
- package/dist/components/cloudPrint/printTemplate/template.js +52 -0
- package/dist/components/cloudPrint/printTemplate/template.js.map +1 -0
- package/dist/components/hardwareAPI/index.js +46 -12
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +9 -18
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +1 -0
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1,220 @@
|
|
1
|
+
{
|
2
|
+
"templateName": "模板2",
|
3
|
+
"width": 58,
|
4
|
+
"body": [
|
5
|
+
{
|
6
|
+
"type": "lineFeed",
|
7
|
+
"height": 1
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"type": "leftPrintMsg",
|
11
|
+
"body": [
|
12
|
+
{
|
13
|
+
"name": "门店名称",
|
14
|
+
"attribute": "Store.Name",
|
15
|
+
"type": "string"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"name": "门店电话",
|
19
|
+
"attribute": "Store.Telephone",
|
20
|
+
"type": "string"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"name": "收银员",
|
24
|
+
"attribute": "UserName",
|
25
|
+
"type": "string"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"name": "单号",
|
29
|
+
"attribute": "Code",
|
30
|
+
"type": "string"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"name": "日期",
|
34
|
+
"attribute": "CreatedTime",
|
35
|
+
"type": "string"
|
36
|
+
}
|
37
|
+
]
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"type": "lineFeed",
|
41
|
+
"height": 1
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"type": "printMenuMSG",
|
45
|
+
"headerList": [
|
46
|
+
{
|
47
|
+
"headerText": "商品名称",
|
48
|
+
"headerWeight":1,
|
49
|
+
"isTitle": true,
|
50
|
+
"isFoot": false
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"headerText": "数量",
|
54
|
+
"headerWeight":1,
|
55
|
+
"isTitle": false,
|
56
|
+
"isFoot": false
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"headerText": "零售价",
|
60
|
+
"headerWeight":1,
|
61
|
+
"isTitle": false,
|
62
|
+
"isFoot": false
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"headerText": "折后单价",
|
66
|
+
"headerWeight":1,
|
67
|
+
"isTitle": false,
|
68
|
+
"isFoot": false
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"headerText": "金额",
|
72
|
+
"headerWeight":1,
|
73
|
+
"isTitle": false,
|
74
|
+
"isFoot": false
|
75
|
+
}
|
76
|
+
],
|
77
|
+
"bodyList":{
|
78
|
+
"name": "明细数据",
|
79
|
+
"attribute":"details",
|
80
|
+
"list":[
|
81
|
+
{
|
82
|
+
"attribute":"Inventory.NameAndCode",
|
83
|
+
"type":"string"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"attribute":"quantityAndUnit",
|
87
|
+
"type":"string"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"attribute":"RetailPrice",
|
91
|
+
"type":"price"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"attribute":"TaxPrice",
|
95
|
+
"type":"price"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"attribute":"TaxAmount",
|
99
|
+
"type":"price"
|
100
|
+
}
|
101
|
+
]
|
102
|
+
}
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"type": "leftPrintMsg",
|
106
|
+
"body": [
|
107
|
+
{
|
108
|
+
"name": "数量",
|
109
|
+
"attribute": "TotalCount",
|
110
|
+
"type": "number"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"name": "金额",
|
114
|
+
"attribute": "TotalTaxAmount",
|
115
|
+
"type": "price"
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"name": "优惠金额",
|
119
|
+
"attribute": "TotalDiscountAmount",
|
120
|
+
"type": "price"
|
121
|
+
},
|
122
|
+
{
|
123
|
+
"name": "抹零",
|
124
|
+
"attribute": "WipeChange",
|
125
|
+
"type": "price"
|
126
|
+
}
|
127
|
+
]
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"type": "separateLine",
|
131
|
+
"height":1
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"type": "lineFeed",
|
135
|
+
"height": 1
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"type": "printMenuMSG",
|
139
|
+
"headerList": [
|
140
|
+
{
|
141
|
+
"headerText": "支付方式",
|
142
|
+
"headerWeight":1,
|
143
|
+
"isTitle": false,
|
144
|
+
"isFoot": false
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"headerText": "金额",
|
148
|
+
"headerWeight":1,
|
149
|
+
"isTitle": false,
|
150
|
+
"isFoot": false
|
151
|
+
}
|
152
|
+
],
|
153
|
+
"bodyList":{
|
154
|
+
"name": "支付方式",
|
155
|
+
"attribute":"RetailPaymentDetails",
|
156
|
+
"type": "array",
|
157
|
+
"list":[
|
158
|
+
{
|
159
|
+
"attribute":"NameAndCode",
|
160
|
+
"type":"string"
|
161
|
+
},
|
162
|
+
{
|
163
|
+
"attribute":"TotalAmount",
|
164
|
+
"type":"string"
|
165
|
+
}
|
166
|
+
]
|
167
|
+
}
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"type": "leftPrintMsg",
|
171
|
+
"body": [
|
172
|
+
{
|
173
|
+
"name": "会员卡号",
|
174
|
+
"attribute": "Member.CardCode",
|
175
|
+
"type": "string"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"name": "会员手机",
|
179
|
+
"attribute": "Member.Mobilephone",
|
180
|
+
"type": "string"
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"name": "积分余额",
|
184
|
+
"attribute": "BalanceIntegral",
|
185
|
+
"type": "number"
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"name": "本次积分",
|
189
|
+
"attribute": "Integral",
|
190
|
+
"type": "number"
|
191
|
+
},
|
192
|
+
{
|
193
|
+
"name": "储值余额",
|
194
|
+
"attribute": "BalanceStorage",
|
195
|
+
"type": "price"
|
196
|
+
}
|
197
|
+
]
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"type": "lineFeed",
|
201
|
+
"height": 1
|
202
|
+
},
|
203
|
+
{
|
204
|
+
"type": "separateLine",
|
205
|
+
"height":1
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"type": "lineFeed",
|
209
|
+
"height": 1
|
210
|
+
},
|
211
|
+
{
|
212
|
+
"type": "text",
|
213
|
+
"value": "\t谢谢惠顾,欢迎再次光临"
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"type": "lineFeed",
|
217
|
+
"height": 3
|
218
|
+
}
|
219
|
+
]
|
220
|
+
}
|
@@ -0,0 +1,129 @@
|
|
1
|
+
{
|
2
|
+
"templateName": "模板1",
|
3
|
+
"width": 58,
|
4
|
+
"body": [
|
5
|
+
{
|
6
|
+
"type": "lineFeed",
|
7
|
+
"height": 1
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"type": "leftPrintMsg",
|
11
|
+
"body": [
|
12
|
+
{
|
13
|
+
"name": "门店名称",
|
14
|
+
"attribute": "Store.Name",
|
15
|
+
"type": "string"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"name": "储值业务员",
|
19
|
+
"attribute": "Person.Name",
|
20
|
+
"type": "string"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"name": "日期",
|
24
|
+
"attribute": "CreatedTime",
|
25
|
+
"type": "string"
|
26
|
+
}
|
27
|
+
]
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"type": "leftPrintMsg",
|
31
|
+
"body": [
|
32
|
+
{
|
33
|
+
"name": "本次储存金额",
|
34
|
+
"attribute": "StorageDetails.0.ThisStorageAmount",
|
35
|
+
"type": "price"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"name": "本次赠送金额",
|
39
|
+
"attribute": "StorageDetails.0.ThisPresentAmount",
|
40
|
+
"type": "price"
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"name": "本次储值后金额",
|
44
|
+
"attribute": "StorageDetails.0.AfterBalanceStorage",
|
45
|
+
"type": "price"
|
46
|
+
}
|
47
|
+
]
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"type": "separateLine",
|
51
|
+
"height":1
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"type": "printMenuMSG",
|
55
|
+
"headerList": [
|
56
|
+
{
|
57
|
+
"headerText": "支付方式",
|
58
|
+
"headerWeight":1,
|
59
|
+
"isTitle": false,
|
60
|
+
"isFoot": false
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"headerText": "金额",
|
64
|
+
"headerWeight":1,
|
65
|
+
"isTitle": false,
|
66
|
+
"isFoot": false
|
67
|
+
}
|
68
|
+
],
|
69
|
+
"bodyList":{
|
70
|
+
"name": "支付方式",
|
71
|
+
"attribute":"StorageMutiSettleDetails",
|
72
|
+
"list": [
|
73
|
+
{
|
74
|
+
"attribute":"SettleStyle.Name",
|
75
|
+
"type":"price"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"attribute":"StorageAmount",
|
79
|
+
"type":"price"
|
80
|
+
}
|
81
|
+
]
|
82
|
+
}
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"type": "leftPrintMsg",
|
86
|
+
"body": [
|
87
|
+
{
|
88
|
+
"name": "储值卡号",
|
89
|
+
"attribute": "StorageDetails.0.meStorageCard.cardNo",
|
90
|
+
"type": "string"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"name": "会员手机",
|
94
|
+
"attribute": "Member.Mobilephone",
|
95
|
+
"type": "string"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"name": "会员姓名",
|
99
|
+
"attribute": "Member.Name",
|
100
|
+
"type": "string"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"name": "顾客签名",
|
104
|
+
"type": "string"
|
105
|
+
}
|
106
|
+
]
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"type": "lineFeed",
|
110
|
+
"height": 4
|
111
|
+
},
|
112
|
+
{
|
113
|
+
"type": "separateLine",
|
114
|
+
"height":1
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"type": "lineFeed",
|
118
|
+
"height": 1
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"type": "text",
|
122
|
+
"value": "\t谢谢惠顾,欢迎再次光临"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
"type": "lineFeed",
|
126
|
+
"height": 3
|
127
|
+
}
|
128
|
+
]
|
129
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Template = undefined;
|
7
|
+
|
8
|
+
var _retail_one = require('./retail_one.json');
|
9
|
+
|
10
|
+
var _retail_one2 = _interopRequireDefault(_retail_one);
|
11
|
+
|
12
|
+
var _retail_two = require('./retail_two.json');
|
13
|
+
|
14
|
+
var _retail_two2 = _interopRequireDefault(_retail_two);
|
15
|
+
|
16
|
+
var _storage_one = require('./storage_one.json');
|
17
|
+
|
18
|
+
var _storage_one2 = _interopRequireDefault(_storage_one);
|
19
|
+
|
20
|
+
var _duty_one = require('./duty_one.json');
|
21
|
+
|
22
|
+
var _duty_one2 = _interopRequireDefault(_duty_one);
|
23
|
+
|
24
|
+
var _dialy_one = require('./dialy_one.json');
|
25
|
+
|
26
|
+
var _dialy_one2 = _interopRequireDefault(_dialy_one);
|
27
|
+
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
29
|
+
|
30
|
+
var Template = exports.Template = {
|
31
|
+
retail: {
|
32
|
+
retail_template_one: _retail_one2.default,
|
33
|
+
retail_template_two: _retail_two2.default
|
34
|
+
},
|
35
|
+
storage: {
|
36
|
+
storage_template_one: _storage_one2.default
|
37
|
+
},
|
38
|
+
duty: {
|
39
|
+
duty_template_one: _duty_one2.default
|
40
|
+
},
|
41
|
+
dialy: {
|
42
|
+
dialy_template_one: _dialy_one2.default
|
43
|
+
}
|
44
|
+
}; /*
|
45
|
+
* @Descripttion:
|
46
|
+
* @version:
|
47
|
+
* @Author: chenlongad
|
48
|
+
* @Date: 2022-03-07 19:29:29
|
49
|
+
* @LastEditors: Lixuhan
|
50
|
+
* @LastEditTime: 2022-03-10 11:15:19
|
51
|
+
*/
|
52
|
+
//# sourceMappingURL=template.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/cloudPrint/printTemplate/template.js"],"names":["Template","retail","retail_template_one","RetailOne","retail_template_two","RetailTwo","storage","storage_template_one","StorageOne","duty","duty_template_one","DutyOne","dialy","dialy_template_one","DialyOne"],"mappings":";;;;;;;AASA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;;;AAEO,IAAMA,8BAAW;AACtBC,UAAO;AACLC,yBAAoBC,oBADf;AAELC,yBAAoBC;AAFf,GADe;AAKtBC,WAAS;AACPC,0BAAsBC;AADf,GALa;AAQtBC,QAAM;AACJC,uBAAmBC;AADf,GARgB;AAWtBC,SAAO;AACLC,wBAAoBC;AADf;AAXe,CAAjB,C,CAfP","file":"template.js","sourcesContent":["/*\r\n * @Descripttion: \r\n * @version: \r\n * @Author: chenlongad\r\n * @Date: 2022-03-07 19:29:29\r\n * @LastEditors: Lixuhan\r\n * @LastEditTime: 2022-03-10 11:15:19\r\n */\r\n\r\nimport RetailOne from './retail_one.json'\r\nimport RetailTwo from './retail_two.json'\r\nimport StorageOne from './storage_one.json'\r\nimport DutyOne from './duty_one.json'\r\nimport DialyOne from './dialy_one.json'\r\n\r\nexport const Template = {\r\n retail:{\r\n retail_template_one:RetailOne,\r\n retail_template_two:RetailTwo\r\n },\r\n storage: {\r\n storage_template_one: StorageOne\r\n },\r\n duty: {\r\n duty_template_one: DutyOne\r\n },\r\n dialy: {\r\n dialy_template_one: DialyOne\r\n }\r\n}"]}
|
@@ -4,6 +4,10 @@ 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
|
+
|
7
11
|
var _regenerator = require('babel-runtime/regenerator');
|
8
12
|
|
9
13
|
var _regenerator2 = _interopRequireDefault(_regenerator);
|
@@ -22,8 +26,18 @@ var _createClass3 = _interopRequireDefault(_createClass2);
|
|
22
26
|
|
23
27
|
var _mutantsMicrofx = require('mutants-microfx');
|
24
28
|
|
29
|
+
var _mutantsUtil = require('mutants-util');
|
30
|
+
|
25
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
26
32
|
|
33
|
+
/*
|
34
|
+
* @Descripttion:
|
35
|
+
* @version:
|
36
|
+
* @Author: chenlongad
|
37
|
+
* @Date: 2021-01-11 10:07:55
|
38
|
+
* @LastEditors: chenlongad
|
39
|
+
* @LastEditTime: 2022-03-14 16:15:50
|
40
|
+
*/
|
27
41
|
var HardwareAPI = function () {
|
28
42
|
function HardwareAPI(props) {
|
29
43
|
(0, _classCallCheck3.default)(this, HardwareAPI);
|
@@ -123,15 +137,25 @@ var HardwareAPI = function () {
|
|
123
137
|
key: 'handleBalEntryTare',
|
124
138
|
value: function () {
|
125
139
|
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(params, cb) {
|
140
|
+
var _ref5, isHorizontalSunMi;
|
141
|
+
|
126
142
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
127
143
|
while (1) {
|
128
144
|
switch (_context4.prev = _context4.next) {
|
129
145
|
case 0:
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
146
|
+
_ref5 = _mutantsUtil.platform || {}, isHorizontalSunMi = _ref5.isHorizontalSunMi;
|
147
|
+
|
148
|
+
if (isHorizontalSunMi && window.sunMi_SystemProperties.systemModal == 'S2') {
|
149
|
+
window.sunMi_OperatingCashier && window.sunMi_OperatingCashier.entryTare().then(function (ret) {
|
150
|
+
return cb((0, _stringify2.default)(ret));
|
151
|
+
});
|
152
|
+
} else {
|
153
|
+
_mutantsMicrofx.nativeMs.setIpcRendererMethod('HandleBalEntryTare', params, function (ret) {
|
154
|
+
return cb(ret);
|
155
|
+
});
|
156
|
+
}
|
157
|
+
|
158
|
+
case 2:
|
135
159
|
case 'end':
|
136
160
|
return _context4.stop();
|
137
161
|
}
|
@@ -150,16 +174,26 @@ var HardwareAPI = function () {
|
|
150
174
|
}, {
|
151
175
|
key: 'handleBalEntryZero',
|
152
176
|
value: function () {
|
153
|
-
var
|
177
|
+
var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(params, cb) {
|
178
|
+
var _ref7, isHorizontalSunMi;
|
179
|
+
|
154
180
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
155
181
|
while (1) {
|
156
182
|
switch (_context5.prev = _context5.next) {
|
157
183
|
case 0:
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
184
|
+
_ref7 = _mutantsUtil.platform || {}, isHorizontalSunMi = _ref7.isHorizontalSunMi;
|
185
|
+
|
186
|
+
if (isHorizontalSunMi && window.sunMi_SystemProperties.systemModal == 'S2') {
|
187
|
+
window.sunMi_OperatingCashier && window.sunMi_OperatingCashier.returnZero().then(function (ret) {
|
188
|
+
return cb((0, _stringify2.default)(ret));
|
189
|
+
});
|
190
|
+
} else {
|
191
|
+
_mutantsMicrofx.nativeMs.setIpcRendererMethod('HandleBalEntryZero', params, function (ret) {
|
192
|
+
return cb(ret);
|
193
|
+
});
|
194
|
+
}
|
195
|
+
|
196
|
+
case 2:
|
163
197
|
case 'end':
|
164
198
|
return _context5.stop();
|
165
199
|
}
|
@@ -168,7 +202,7 @@ var HardwareAPI = function () {
|
|
168
202
|
}));
|
169
203
|
|
170
204
|
function handleBalEntryZero(_x9, _x10) {
|
171
|
-
return
|
205
|
+
return _ref6.apply(this, arguments);
|
172
206
|
}
|
173
207
|
|
174
208
|
return handleBalEntryZero;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/hardwareAPI/index.js"],"names":["HardwareAPI","props","params","cb","nativeMs","setIpcRendererMethod","ret"],"mappings":"
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/hardwareAPI/index.js"],"names":["HardwareAPI","props","params","cb","nativeMs","setIpcRendererMethod","ret","platform","isHorizontalSunMi","window","sunMi_SystemProperties","systemModal","sunMi_OperatingCashier","entryTare","then","returnZero"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;;AACA;;;;AATA;;;;;;;;IAWMA,W;AACJ,uBAAYC,KAAZ,EAAmB;AAAA;AAAG;;AAEtB;;;;;;2GACkBC,M,EAAQC,E;;;;;AACxBC,yCAASC,oBAAT,CAA8B,aAA9B,EAA6CH,MAA7C,EAAqD;AAAA,yBAAOC,GAAGG,GAAH,CAAP;AAAA,iBAArD;;;;;;;;;;;;;;;;;AAGF;;;;;6GACsBJ,M,EAAQC,E;;;;;AAC5BC,yCAASC,oBAAT,CAA8B,iBAA9B,EAAiDH,MAAjD,EAAyD;AAAA,yBAAOC,GAAGG,GAAH,CAAP;AAAA,iBAAzD;;;;;;;;;;;;;;;;;AAGF;;;;;6GACmBJ,M,EAAQC,E;;;;;AACzBC,yCAASC,oBAAT,CAA8B,cAA9B,EAA8CH,MAA9C,EAAsD;AAAA,yBAAOC,GAAGG,GAAH,CAAP;AAAA,iBAAtD;;;;;;;;;;;;;;;;;AAGF;;;;;6GACyBJ,M,EAAQC,E;;;;;;;wBACDI,yBAAY,E,EAAlCC,iB,SAAAA,iB;;AACR,oBAAGA,qBAAqBC,OAAOC,sBAAP,CAA8BC,WAA9B,IAA6C,IAArE,EAA0E;AACxEF,yBAAOG,sBAAP,IAAiCH,OAAOG,sBAAP,CAA8BC,SAA9B,GAA0CC,IAA1C,CAA+C;AAAA,2BAAOX,GAAG,yBAAeG,GAAf,CAAH,CAAP;AAAA,mBAA/C,CAAjC;AACD,iBAFD,MAEK;AACHF,2CAASC,oBAAT,CAA8B,oBAA9B,EAAoDH,MAApD,EAA4D;AAAA,2BAAOC,GAAGG,GAAH,CAAP;AAAA,mBAA5D;AACD;;;;;;;;;;;;;;;;AAGH;;;;;6GACyBJ,M,EAAQC,E;;;;;;;wBACDI,yBAAY,E,EAAlCC,iB,SAAAA,iB;;AACR,oBAAGA,qBAAqBC,OAAOC,sBAAP,CAA8BC,WAA9B,IAA6C,IAArE,EAA0E;AACxEF,yBAAOG,sBAAP,IAAiCH,OAAOG,sBAAP,CAA8BG,UAA9B,GAA2CD,IAA3C,CAAgD;AAAA,2BAAOX,GAAG,yBAAeG,GAAf,CAAH,CAAP;AAAA,mBAAhD,CAAjC;AACD,iBAFD,MAEK;AACHF,2CAASC,oBAAT,CAA8B,oBAA9B,EAAoDH,MAApD,EAA4D;AAAA,2BAAOC,GAAGG,GAAH,CAAP;AAAA,mBAA5D;AACD;;;;;;;;;;;;;;;;;;;;kBAGU,IAAIN,WAAJ,E","file":"index.js","sourcesContent":["/*\r\n * @Descripttion: \r\n * @version: \r\n * @Author: chenlongad\r\n * @Date: 2021-01-11 10:07:55\r\n * @LastEditors: chenlongad\r\n * @LastEditTime: 2022-03-14 16:15:50\r\n */\r\nimport { nativeMs } from 'mutants-microfx';\r\nimport { platform } from 'mutants-util';\r\n\r\nclass HardwareAPI {\r\n constructor(props) { }\r\n\r\n //打开客显\r\n async openCusDisp(params, cb) {\r\n nativeMs.setIpcRendererMethod('OpenCusDisp', params, ret => cb(ret))\r\n }\r\n\r\n //推送客显信息\r\n async sendDataCusDisp(params, cb) {\r\n nativeMs.setIpcRendererMethod('SendDataCusDisp', params, ret => cb(ret))\r\n }\r\n\r\n //关闭客显\r\n async closeCusDisp(params, cb) {\r\n nativeMs.setIpcRendererMethod('CloseCusDisp', params, ret => cb(ret))\r\n }\r\n\r\n //电子秤-去皮\r\n async handleBalEntryTare(params, cb) {\r\n const { isHorizontalSunMi } = platform || {};\r\n if(isHorizontalSunMi && window.sunMi_SystemProperties.systemModal == 'S2'){\r\n window.sunMi_OperatingCashier && window.sunMi_OperatingCashier.entryTare().then(ret => cb(JSON.stringify(ret)));\r\n }else{\r\n nativeMs.setIpcRendererMethod('HandleBalEntryTare', params, ret => cb(ret))\r\n }\r\n \r\n }\r\n //电子秤-清零\r\n async handleBalEntryZero(params, cb) {\r\n const { isHorizontalSunMi } = platform || {};\r\n if(isHorizontalSunMi && window.sunMi_SystemProperties.systemModal == 'S2'){\r\n window.sunMi_OperatingCashier && window.sunMi_OperatingCashier.returnZero().then(ret => cb(JSON.stringify(ret)));\r\n }else{\r\n nativeMs.setIpcRendererMethod('HandleBalEntryZero', params, ret => cb(ret))\r\n }\r\n }\r\n}\r\nexport default new HardwareAPI;"]}
|
@@ -646,34 +646,33 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
646
646
|
|
647
647
|
_this2.showCzkModal = function () {
|
648
648
|
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(id, append) {
|
649
|
-
var _ref2, isInputMember, _enumController$getEn2, PayStyle,
|
649
|
+
var _ref2, isInputMember, returnType, _enumController$getEn2, PayStyle, memberId, memberdata1;
|
650
650
|
|
651
651
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
652
652
|
while (1) {
|
653
653
|
switch (_context.prev = _context.next) {
|
654
654
|
case 0:
|
655
655
|
_ref2 = _this2.state || {}, isInputMember = _ref2.isInputMember;
|
656
|
-
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
657
|
-
ctMode = _this2.store && _this2.store.paymode && _this2.store.paymode.currentMode;
|
658
|
-
memberId = ctMode && ctMode.memberId;
|
659
656
|
returnType = _this2.getNotBoriginReturn();
|
657
|
+
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
660
658
|
|
661
|
-
_this2.connectRfCard();
|
662
659
|
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
660
|
+
_this2.connectRfCard();
|
661
|
+
memberId = _this2.store && _this2.store.member && _this2.store.member.ID;
|
663
662
|
_context.t0 = isInputMember && memberId;
|
664
663
|
|
665
664
|
if (!_context.t0) {
|
666
|
-
_context.next =
|
665
|
+
_context.next = 11;
|
667
666
|
break;
|
668
667
|
}
|
669
668
|
|
670
|
-
_context.next =
|
669
|
+
_context.next = 10;
|
671
670
|
return _this2.store.updateCurrentMode(memberId, returnType);
|
672
671
|
|
673
|
-
case
|
672
|
+
case 10:
|
674
673
|
_context.t0 = _context.sent;
|
675
674
|
|
676
|
-
case
|
675
|
+
case 11:
|
677
676
|
memberdata1 = _context.t0;
|
678
677
|
|
679
678
|
_this2.setState({ czkVisible: true });
|
@@ -692,7 +691,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
692
691
|
}, 300);
|
693
692
|
}
|
694
693
|
|
695
|
-
case
|
694
|
+
case 14:
|
696
695
|
case 'end':
|
697
696
|
return _context.stop();
|
698
697
|
}
|
@@ -2766,7 +2765,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2766
2765
|
}();
|
2767
2766
|
|
2768
2767
|
_this2.onCzkChange = function (v) {
|
2769
|
-
// console.log("czk change:"+new Date().toLocaleTimeString())
|
2770
2768
|
var _ref25 = _mutantsUtil.platform || {},
|
2771
2769
|
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
2772
2770
|
|
@@ -2779,13 +2777,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2779
2777
|
_this2.setState({
|
2780
2778
|
czkValue: v
|
2781
2779
|
});
|
2782
|
-
// if(this.debounced){
|
2783
|
-
// this.debounced.cancel();
|
2784
|
-
// this.debounced=null;
|
2785
|
-
// // console.log("debounce canceled");
|
2786
|
-
// }
|
2787
|
-
// this.debounced=_debounce(()=>{this.loadCzk(v)},2000);
|
2788
|
-
// this.debounced();
|
2789
2780
|
};
|
2790
2781
|
|
2791
2782
|
_this2.czkKeyboardOnOk = function (e) {
|