tplus-components-touch 3.40.2 → 3.41.4
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/cloudPrint/BTPrintFormatUtil.js +2 -2
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/index.js +891 -608
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +151 -47
- 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 +208 -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/package.json +3 -3
@@ -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,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D,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;"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "tplus-components-touch",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.41.4",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"scripts": {
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"mutants-devtools": "^1.0.0",
|
23
23
|
"mutants-microfx": "^1.0.0",
|
24
24
|
"tplus-api": "~5.0.1",
|
25
|
-
"tplus-components": "~3.
|
25
|
+
"tplus-components": "~3.41.1"
|
26
26
|
},
|
27
27
|
"dependencies": {
|
28
28
|
"antd": "4.10.3",
|
@@ -32,4 +32,4 @@
|
|
32
32
|
"moment": "^2.24.0",
|
33
33
|
"swiper": "^4.5.0"
|
34
34
|
}
|
35
|
-
}
|
35
|
+
}
|