tplus-components-touch 3.28.1 → 3.28.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/README.md +16 -16
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +1 -1
- package/tsconfig.json +26 -26
- package/dist/components/acCitySelect/CitySelect.js +0 -541
- package/dist/components/acCitySelect/CitySelect.js.map +0 -1
- package/dist/components/acCitySelect/CitySelect.less +0 -10
- package/dist/components/acCitySelect/citys.js +0 -1270
- package/dist/components/acCitySelect/citys.js.map +0 -1
- package/dist/components/acCitySelect/index.js +0 -18
- package/dist/components/acCitySelect/index.js.map +0 -1
- package/dist/components/acCitySelect/provinceData.js +0 -40
- package/dist/components/acCitySelect/provinceData.js.map +0 -1
- package/dist/components/addLog/AddLogProcessor.js +0 -49
- package/dist/components/addLog/AddLogProcessor.js.map +0 -1
- package/dist/components/addLog/OperationLogApi.js +0 -125
- package/dist/components/addLog/OperationLogApi.js.map +0 -1
- package/dist/components/autoComplete/index.js +0 -245
- package/dist/components/autoComplete/index.js.map +0 -1
- package/dist/components/autoComplete/index.less +0 -89
- package/dist/components/autoComplete/option.js +0 -75
- package/dist/components/autoComplete/option.js.map +0 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +0 -231
- package/dist/components/autoCompleteWithKeyboard/index.js.map +0 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +0 -8
- package/dist/components/billSearch/api.js +0 -465
- package/dist/components/billSearch/api.js.map +0 -1
- package/dist/components/billSearch/index.js +0 -2201
- package/dist/components/billSearch/index.js.map +0 -1
- package/dist/components/billSearch/index.less +0 -376
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +0 -568
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +0 -1
- package/dist/components/cloudPrint/api.js +0 -391
- package/dist/components/cloudPrint/api.js.map +0 -1
- package/dist/components/cloudPrint/index.js +0 -674
- package/dist/components/cloudPrint/index.js.map +0 -1
- package/dist/components/cloudPrint/printDispatch.js +0 -324
- package/dist/components/cloudPrint/printDispatch.js.map +0 -1
- package/dist/components/commonForm/addressPicker/index.js +0 -232
- package/dist/components/commonForm/addressPicker/index.js.map +0 -1
- package/dist/components/commonForm/addressPicker/style.less +0 -11
- package/dist/components/commonForm/autoComplete/index.js +0 -241
- package/dist/components/commonForm/autoComplete/index.js.map +0 -1
- package/dist/components/commonForm/autoComplete/style.less +0 -3
- package/dist/components/commonForm/datePicker/index.js +0 -89
- package/dist/components/commonForm/datePicker/index.js.map +0 -1
- package/dist/components/commonForm/datePicker/style.less +0 -5
- package/dist/components/commonForm/formControl/index.js +0 -143
- package/dist/components/commonForm/formControl/index.js.map +0 -1
- package/dist/components/commonForm/formControl/style.less +0 -0
- package/dist/components/commonForm/index.js +0 -225
- package/dist/components/commonForm/index.js.map +0 -1
- package/dist/components/commonForm/inputNumber/index.js +0 -272
- package/dist/components/commonForm/inputNumber/index.js.map +0 -1
- package/dist/components/commonForm/inputNumber/style.less +0 -11
- package/dist/components/commonForm/radio/index.js +0 -132
- package/dist/components/commonForm/radio/index.js.map +0 -1
- package/dist/components/commonForm/radio/style.less +0 -0
- package/dist/components/commonForm/style.less +0 -2
- package/dist/components/deliverySearch/api.js +0 -355
- package/dist/components/deliverySearch/api.js.map +0 -1
- package/dist/components/deliverySearch/index.js +0 -1214
- package/dist/components/deliverySearch/index.js.map +0 -1
- package/dist/components/deliverySearch/index.less +0 -554
- package/dist/components/form/index.js +0 -310
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/hardwareAPI/index.js +0 -181
- package/dist/components/hardwareAPI/index.js.map +0 -1
- package/dist/components/hotKey/config.js +0 -306
- package/dist/components/hotKey/config.js.map +0 -1
- package/dist/components/hotKey/hotKeyModal.js +0 -479
- package/dist/components/hotKey/hotKeyModal.js.map +0 -1
- package/dist/components/hotKey/index.js +0 -785
- package/dist/components/hotKey/index.js.map +0 -1
- package/dist/components/hotKey/localConfig.js +0 -1021
- package/dist/components/hotKey/localConfig.js.map +0 -1
- package/dist/components/hotKey/style.less +0 -96
- package/dist/components/hotKey/utils.js +0 -135
- package/dist/components/hotKey/utils.js.map +0 -1
- package/dist/components/input/index.js +0 -251
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/input/style.less +0 -99
- package/dist/components/input/tplusInput/index.js +0 -81
- package/dist/components/input/tplusInput/index.js.map +0 -1
- package/dist/components/input/tplusInput/inputContent.js +0 -128
- package/dist/components/input/tplusInput/inputContent.js.map +0 -1
- package/dist/components/input/tplusInput/inputs.js +0 -151
- package/dist/components/input/tplusInput/inputs.js.map +0 -1
- package/dist/components/input/tplusInput/style.less +0 -132
- package/dist/components/input/utils/index.js +0 -26
- package/dist/components/input/utils/index.js.map +0 -1
- package/dist/components/inventorySearch/api.js +0 -214
- package/dist/components/inventorySearch/api.js.map +0 -1
- package/dist/components/inventorySearch/index.js +0 -303
- package/dist/components/inventorySearch/index.js.map +0 -1
- package/dist/components/inventorySearch/index.less +0 -120
- package/dist/components/inventorySearch/store.js +0 -344
- package/dist/components/inventorySearch/store.js.map +0 -1
- package/dist/components/inventorySearch/tab.js +0 -275
- package/dist/components/inventorySearch/tab.js.map +0 -1
- package/dist/components/keyboard/index.js +0 -255
- package/dist/components/keyboard/index.js.map +0 -1
- package/dist/components/keyboard/index.less +0 -470
- package/dist/components/keyboard/letterKeyboard.js +0 -210
- package/dist/components/keyboard/letterKeyboard.js.map +0 -1
- package/dist/components/keyboard/numKeyboard.js +0 -459
- package/dist/components/keyboard/numKeyboard.js.map +0 -1
- package/dist/components/keyboard/numKeyboardScan.js +0 -195
- package/dist/components/keyboard/numKeyboardScan.js.map +0 -1
- package/dist/components/keyboard/numberButton_input.js +0 -303
- package/dist/components/keyboard/numberButton_input.js.map +0 -1
- package/dist/components/keyboard/numkeyboardPassword.js +0 -460
- package/dist/components/keyboard/numkeyboardPassword.js.map +0 -1
- package/dist/components/keyboard/onlyKeyboard.js +0 -90
- package/dist/components/keyboard/onlyKeyboard.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton.js +0 -187
- package/dist/components/keyboard/onlyLetterButton.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton2.js +0 -235
- package/dist/components/keyboard/onlyLetterButton2.js.map +0 -1
- package/dist/components/keyboard/onlyLetterButton2.less +0 -162
- package/dist/components/keyboard/onlyNumberButton.js +0 -128
- package/dist/components/keyboard/onlyNumberButton.js.map +0 -1
- package/dist/components/keyboard/onlyNumberButton2.js +0 -115
- package/dist/components/keyboard/onlyNumberButton2.js.map +0 -1
- package/dist/components/keyboard/textKeyboard.js +0 -50
- package/dist/components/keyboard/textKeyboard.js.map +0 -1
- package/dist/components/layout/hamburger.js +0 -29
- package/dist/components/layout/hamburger.js.map +0 -1
- package/dist/components/layout/index.js +0 -31
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/layout/layout.js +0 -182
- package/dist/components/layout/layout.js.map +0 -1
- package/dist/components/layout/sider.js +0 -165
- package/dist/components/layout/sider.js.map +0 -1
- package/dist/components/layout/style.less +0 -82
- package/dist/components/loading/index.js +0 -198
- package/dist/components/loading/index.js.map +0 -1
- package/dist/components/loading/loadingContent.js +0 -176
- package/dist/components/loading/loadingContent.js.map +0 -1
- package/dist/components/loading/style.less +0 -61
- package/dist/components/loading/utils.js +0 -29
- package/dist/components/loading/utils.js.map +0 -1
- package/dist/components/message/index.js +0 -308
- package/dist/components/message/index.js.map +0 -1
- package/dist/components/message/index.less +0 -101
- package/dist/components/modal/index.js +0 -93
- package/dist/components/modal/index.js.map +0 -1
- package/dist/components/modal/index.less +0 -19
- package/dist/components/modalVertical/index.js +0 -325
- package/dist/components/modalVertical/index.js.map +0 -1
- package/dist/components/modalVertical/style.less +0 -60
- package/dist/components/modalWraper/index.js +0 -470
- package/dist/components/modalWraper/index.js.map +0 -1
- package/dist/components/modalWraper/style.less +0 -257
- package/dist/components/modalWraper/utils.js +0 -48
- package/dist/components/modalWraper/utils.js.map +0 -1
- package/dist/components/notification/index.js +0 -119
- package/dist/components/notification/index.js.map +0 -1
- package/dist/components/notification/index.less +0 -52
- package/dist/components/overflowTip/index.js +0 -269
- package/dist/components/overflowTip/index.js.map +0 -1
- package/dist/components/overflowTip/style.less +0 -66
- package/dist/components/page/index.js +0 -49
- package/dist/components/page/index.js.map +0 -1
- package/dist/components/page/index.less +0 -22
- package/dist/components/product/detail.js +0 -148
- package/dist/components/product/detail.js.map +0 -1
- package/dist/components/product/getCard.js +0 -145
- package/dist/components/product/getCard.js.map +0 -1
- package/dist/components/product/index.less +0 -128
- package/dist/components/progressState/EmptyAndErrorView.js +0 -143
- package/dist/components/progressState/EmptyAndErrorView.js.map +0 -1
- package/dist/components/progressState/ProgressState.js +0 -157
- package/dist/components/progressState/ProgressState.js.map +0 -1
- package/dist/components/progressState/index.js +0 -14
- package/dist/components/progressState/index.js.map +0 -1
- package/dist/components/progressState/style.less +0 -65
- package/dist/components/scan/index.js +0 -219
- package/dist/components/scan/index.js.map +0 -1
- package/dist/components/scan/index.less +0 -34
- package/dist/components/select/index.js +0 -28
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/select/index.less +0 -12
- package/dist/components/settlement/asyncModal.js +0 -204
- package/dist/components/settlement/asyncModal.js.map +0 -1
- package/dist/components/settlement/index.js +0 -16
- package/dist/components/settlement/index.js.map +0 -1
- package/dist/components/settlement/prototypeTable/index.js +0 -349
- package/dist/components/settlement/prototypeTable/index.js.map +0 -1
- package/dist/components/settlement/prototypeTable/style.less +0 -59
- package/dist/components/settlement/prototypeTable/utils.js +0 -14
- package/dist/components/settlement/prototypeTable/utils.js.map +0 -1
- package/dist/components/settlement/settlement.js +0 -5477
- package/dist/components/settlement/settlement.js.map +0 -1
- package/dist/components/settlement/settlement.less +0 -1595
- package/dist/components/settlement/settlementStore.js +0 -2121
- package/dist/components/settlement/settlementStore.js.map +0 -1
- package/dist/components/settlement/utils.js +0 -249
- package/dist/components/settlement/utils.js.map +0 -1
- package/dist/components/socket/index.js +0 -220
- package/dist/components/socket/index.js.map +0 -1
- package/dist/components/spin/index.js +0 -95
- package/dist/components/spin/index.js.map +0 -1
- package/dist/components/spin/spin-style.less +0 -436
- package/dist/components/test/index.js +0 -330
- package/dist/components/test/index.js.map +0 -1
- package/dist/components/ticon/iconfont/demo.css +0 -539
- package/dist/components/ticon/iconfont/demo_index.html +0 -5202
- package/dist/components/ticon/iconfont/iconfont.css +0 -887
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +0 -35
- package/dist/components/ticon/iconfont/iconfont.js.map +0 -1
- package/dist/components/ticon/iconfont/iconfont.json +0 -1535
- package/dist/components/ticon/iconfont/iconfont.svg +0 -593
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/ticon/index.js +0 -60
- package/dist/components/ticon/index.js.map +0 -1
- package/dist/components/touchScroll/index.js +0 -182
- package/dist/components/touchScroll/index.js.map +0 -1
- package/dist/components/touchTable/AuthProcess.js +0 -42
- package/dist/components/touchTable/AuthProcess.js.map +0 -1
- package/dist/components/touchTable/generateWater.js +0 -59
- package/dist/components/touchTable/generateWater.js.map +0 -1
- package/dist/components/touchTable/index.js +0 -1110
- package/dist/components/touchTable/index.js.map +0 -1
- package/dist/components/touchTable/index.less +0 -370
- package/dist/components/touchTable/utils.js +0 -14
- package/dist/components/touchTable/utils.js.map +0 -1
- package/dist/demo/PopOverDemo.js +0 -126
- package/dist/demo/PopOverDemo.js.map +0 -1
- package/dist/index.js +0 -261
- package/dist/index.js.map +0 -1
- package/dist/util/tools.js +0 -202
- package/dist/util/tools.js.map +0 -1
|
@@ -1,391 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _stringify = require('babel-runtime/core-js/json/stringify');
|
|
8
|
-
|
|
9
|
-
var _stringify2 = _interopRequireDefault(_stringify);
|
|
10
|
-
|
|
11
|
-
var _regenerator = require('babel-runtime/regenerator');
|
|
12
|
-
|
|
13
|
-
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
14
|
-
|
|
15
|
-
var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
|
|
16
|
-
|
|
17
|
-
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
|
18
|
-
|
|
19
|
-
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
20
|
-
|
|
21
|
-
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
22
|
-
|
|
23
|
-
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
24
|
-
|
|
25
|
-
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
26
|
-
|
|
27
|
-
var _tplusApi = require('tplus-api');
|
|
28
|
-
|
|
29
|
-
var _mutantsMicrofx = require('mutants-microfx');
|
|
30
|
-
|
|
31
|
-
var _crypto = require('crypto');
|
|
32
|
-
|
|
33
|
-
var _crypto2 = _interopRequireDefault(_crypto);
|
|
34
|
-
|
|
35
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
36
|
-
|
|
37
|
-
var HTTP_PROXY_URL = "http://tfproxy.chanjet.com";
|
|
38
|
-
var FEI_E_YUN_HOST = "http://api.feieyun.cn/Api/Open/";
|
|
39
|
-
var FEI_E_YUN_USER = "tplus@chanjet.com";
|
|
40
|
-
var FEI_E_YUN_KEYS = "nyktjQ9nVyY6BfIs";
|
|
41
|
-
|
|
42
|
-
var API = function () {
|
|
43
|
-
function API(props) {
|
|
44
|
-
(0, _classCallCheck3.default)(this, API);
|
|
45
|
-
|
|
46
|
-
this.shaEncrypt = function (originalText) {
|
|
47
|
-
var password = "";
|
|
48
|
-
var md5 = _crypto2.default.createHash('sha1');
|
|
49
|
-
md5.update(originalText);
|
|
50
|
-
var data = md5.digest();
|
|
51
|
-
for (var i = 0; i < data.length; i++) {
|
|
52
|
-
|
|
53
|
-
var v = data[i] & 0xFF;
|
|
54
|
-
var hv = v.toString(16);
|
|
55
|
-
if (hv.length < 2) {
|
|
56
|
-
password = password + 0;
|
|
57
|
-
}
|
|
58
|
-
password = password + hv;
|
|
59
|
-
}
|
|
60
|
-
return password;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
//飞蛾参数加密
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
(0, _createClass3.default)(API, [{
|
|
68
|
-
key: 'getDataSource',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
//获取枚举列表信息
|
|
72
|
-
value: function () {
|
|
73
|
-
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(params) {
|
|
74
|
-
var dataSource, data;
|
|
75
|
-
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
76
|
-
while (1) {
|
|
77
|
-
switch (_context.prev = _context.next) {
|
|
78
|
-
case 0:
|
|
79
|
-
dataSource = params.dataSource;
|
|
80
|
-
_context.next = 3;
|
|
81
|
-
return (0, _tplusApi.tApi)({ BizCode: params.bizCode }, dataSource, false, false);
|
|
82
|
-
|
|
83
|
-
case 3:
|
|
84
|
-
data = _context.sent;
|
|
85
|
-
return _context.abrupt('return', data);
|
|
86
|
-
|
|
87
|
-
case 5:
|
|
88
|
-
case 'end':
|
|
89
|
-
return _context.stop();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}, _callee, this);
|
|
93
|
-
}));
|
|
94
|
-
|
|
95
|
-
function getDataSource(_x) {
|
|
96
|
-
return _ref.apply(this, arguments);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return getDataSource;
|
|
100
|
-
}()
|
|
101
|
-
|
|
102
|
-
//获取打印数据
|
|
103
|
-
|
|
104
|
-
}, {
|
|
105
|
-
key: 'getPrintDataInfo',
|
|
106
|
-
value: function () {
|
|
107
|
-
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(Id) {
|
|
108
|
-
var data;
|
|
109
|
-
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
110
|
-
while (1) {
|
|
111
|
-
switch (_context2.prev = _context2.next) {
|
|
112
|
-
case 0:
|
|
113
|
-
_context2.next = 2;
|
|
114
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'chanjet.RE.INewRetail.FindById', false, false);
|
|
115
|
-
|
|
116
|
-
case 2:
|
|
117
|
-
data = _context2.sent;
|
|
118
|
-
return _context2.abrupt('return', data);
|
|
119
|
-
|
|
120
|
-
case 4:
|
|
121
|
-
case 'end':
|
|
122
|
-
return _context2.stop();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}, _callee2, this);
|
|
126
|
-
}));
|
|
127
|
-
|
|
128
|
-
function getPrintDataInfo(_x2) {
|
|
129
|
-
return _ref2.apply(this, arguments);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return getPrintDataInfo;
|
|
133
|
-
}()
|
|
134
|
-
|
|
135
|
-
//获取当前门店硬件配置信息
|
|
136
|
-
|
|
137
|
-
}, {
|
|
138
|
-
key: 'GetPrintInfomation',
|
|
139
|
-
value: function () {
|
|
140
|
-
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(dto) {
|
|
141
|
-
var param, data;
|
|
142
|
-
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
143
|
-
while (1) {
|
|
144
|
-
switch (_context3.prev = _context3.next) {
|
|
145
|
-
case 0:
|
|
146
|
-
param = {};
|
|
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);
|
|
153
|
-
|
|
154
|
-
case 5:
|
|
155
|
-
data = _context3.sent;
|
|
156
|
-
return _context3.abrupt('return', data);
|
|
157
|
-
|
|
158
|
-
case 7:
|
|
159
|
-
case 'end':
|
|
160
|
-
return _context3.stop();
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}, _callee3, this);
|
|
164
|
-
}));
|
|
165
|
-
|
|
166
|
-
function GetPrintInfomation(_x3) {
|
|
167
|
-
return _ref3.apply(this, arguments);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return GetPrintInfomation;
|
|
171
|
-
}()
|
|
172
|
-
|
|
173
|
-
//获取日结打印数据
|
|
174
|
-
|
|
175
|
-
}, {
|
|
176
|
-
key: 'getDialyPrintDataInfo',
|
|
177
|
-
value: function () {
|
|
178
|
-
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(Id) {
|
|
179
|
-
var data;
|
|
180
|
-
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
181
|
-
while (1) {
|
|
182
|
-
switch (_context4.prev = _context4.next) {
|
|
183
|
-
case 0:
|
|
184
|
-
_context4.next = 2;
|
|
185
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.Interface.IDailyDetail.FindById', false, false);
|
|
186
|
-
|
|
187
|
-
case 2:
|
|
188
|
-
data = _context4.sent;
|
|
189
|
-
return _context4.abrupt('return', data);
|
|
190
|
-
|
|
191
|
-
case 4:
|
|
192
|
-
case 'end':
|
|
193
|
-
return _context4.stop();
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}, _callee4, this);
|
|
197
|
-
}));
|
|
198
|
-
|
|
199
|
-
function getDialyPrintDataInfo(_x4) {
|
|
200
|
-
return _ref4.apply(this, arguments);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return getDialyPrintDataInfo;
|
|
204
|
-
}()
|
|
205
|
-
|
|
206
|
-
//获取交班打印数据
|
|
207
|
-
|
|
208
|
-
}, {
|
|
209
|
-
key: 'getDutyPrintDataInfo',
|
|
210
|
-
value: function () {
|
|
211
|
-
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(Id) {
|
|
212
|
-
var data;
|
|
213
|
-
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
214
|
-
while (1) {
|
|
215
|
-
switch (_context5.prev = _context5.next) {
|
|
216
|
-
case 0:
|
|
217
|
-
_context5.next = 2;
|
|
218
|
-
return (0, _tplusApi.tApi)({ id: Id }, 'Ufida.T.RE.IShiftVoucher.FindById', false, false);
|
|
219
|
-
|
|
220
|
-
case 2:
|
|
221
|
-
data = _context5.sent;
|
|
222
|
-
return _context5.abrupt('return', data);
|
|
223
|
-
|
|
224
|
-
case 4:
|
|
225
|
-
case 'end':
|
|
226
|
-
return _context5.stop();
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}, _callee5, this);
|
|
230
|
-
}));
|
|
231
|
-
|
|
232
|
-
function getDutyPrintDataInfo(_x5) {
|
|
233
|
-
return _ref5.apply(this, arguments);
|
|
234
|
-
}
|
|
235
|
-
|
|
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
|
-
return getStoragePrintDataInfo;
|
|
270
|
-
}()
|
|
271
|
-
|
|
272
|
-
// 小票打印-获取状态信息。类似{"msg":"ok","ret":0,"data":"\u79bb\u7ebf\u3002","serverExecutedTime":5}
|
|
273
|
-
|
|
274
|
-
}, {
|
|
275
|
-
key: 'openQueryPrinterStatus',
|
|
276
|
-
value: function () {
|
|
277
|
-
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(params) {
|
|
278
|
-
var ts, dt, options;
|
|
279
|
-
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
280
|
-
while (1) {
|
|
281
|
-
switch (_context7.prev = _context7.next) {
|
|
282
|
-
case 0:
|
|
283
|
-
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
284
|
-
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];
|
|
285
|
-
|
|
286
|
-
dt = dt.join('&');
|
|
287
|
-
options = {
|
|
288
|
-
method: 'POST',
|
|
289
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
290
|
-
data: dt,
|
|
291
|
-
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
292
|
-
};
|
|
293
|
-
return _context7.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
294
|
-
|
|
295
|
-
case 5:
|
|
296
|
-
case 'end':
|
|
297
|
-
return _context7.stop();
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}, _callee7, this);
|
|
301
|
-
}));
|
|
302
|
-
|
|
303
|
-
function openQueryPrinterStatus(_x7) {
|
|
304
|
-
return _ref7.apply(this, arguments);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
return openQueryPrinterStatus;
|
|
308
|
-
}()
|
|
309
|
-
|
|
310
|
-
// 小票打印-云打印
|
|
311
|
-
|
|
312
|
-
}, {
|
|
313
|
-
key: 'openPrinterAddlist',
|
|
314
|
-
value: function () {
|
|
315
|
-
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(params) {
|
|
316
|
-
var ts, dt, options;
|
|
317
|
-
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
318
|
-
while (1) {
|
|
319
|
-
switch (_context8.prev = _context8.next) {
|
|
320
|
-
case 0:
|
|
321
|
-
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
322
|
-
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'];
|
|
323
|
-
|
|
324
|
-
dt = dt.join('&');
|
|
325
|
-
options = {
|
|
326
|
-
method: 'POST',
|
|
327
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
328
|
-
data: dt,
|
|
329
|
-
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
330
|
-
};
|
|
331
|
-
return _context8.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
332
|
-
|
|
333
|
-
case 5:
|
|
334
|
-
case 'end':
|
|
335
|
-
return _context8.stop();
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}, _callee8, this);
|
|
339
|
-
}));
|
|
340
|
-
|
|
341
|
-
function openPrinterAddlist(_x8) {
|
|
342
|
-
return _ref8.apply(this, arguments);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
return openPrinterAddlist;
|
|
346
|
-
}()
|
|
347
|
-
|
|
348
|
-
// 小票打印-发出打印指令
|
|
349
|
-
|
|
350
|
-
}, {
|
|
351
|
-
key: 'openPrintMsg',
|
|
352
|
-
value: function () {
|
|
353
|
-
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(params) {
|
|
354
|
-
var ts, dt, options;
|
|
355
|
-
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
356
|
-
while (1) {
|
|
357
|
-
switch (_context9.prev = _context9.next) {
|
|
358
|
-
case 0:
|
|
359
|
-
ts = Math.round(new Date().getTime() / 1000).toString();
|
|
360
|
-
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 //打印次数
|
|
361
|
-
];
|
|
362
|
-
|
|
363
|
-
dt = dt.join('&');
|
|
364
|
-
options = {
|
|
365
|
-
method: 'POST',
|
|
366
|
-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
367
|
-
data: dt,
|
|
368
|
-
url: HTTP_PROXY_URL + '?url=' + FEI_E_YUN_HOST
|
|
369
|
-
};
|
|
370
|
-
return _context9.abrupt('return', (0, _mutantsMicrofx.api)(options));
|
|
371
|
-
|
|
372
|
-
case 5:
|
|
373
|
-
case 'end':
|
|
374
|
-
return _context9.stop();
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}, _callee9, this);
|
|
378
|
-
}));
|
|
379
|
-
|
|
380
|
-
function openPrintMsg(_x9) {
|
|
381
|
-
return _ref9.apply(this, arguments);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
return openPrintMsg;
|
|
385
|
-
}()
|
|
386
|
-
}]);
|
|
387
|
-
return API;
|
|
388
|
-
}();
|
|
389
|
-
|
|
390
|
-
exports.default = new API();
|
|
391
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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","dto","param","Idstore","POSCode","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,SAl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CALF,eAMMV,OAAOgB,OANb,qBAQChB,OAAOiB,UARR,aASIjB,OAAOyB,KATX,CASmB;AATnB,iC;;AAWTV,qCAAKA,GAAGG,IAAH,CAAQ,GAAR,CAAL;AACMC,uC,GAAU;AACZC,4CAAQ,MADI;AAEZC,6CAAS,EAAE,gBAAgB,mCAAlB,EAFG;AAGZ5B,0CAAMsB,EAHM;AAIZO,yCAAQ1C,cAAR,aAA8BC;AAJlB,iC;kEAMT,yBAAIsC,OAAJ,C;;;;;;;;;;;;;;;;;;;;kBAGA,IAAInC,GAAJ,E","file":"api.js","sourcesContent":["import { tApi } from 'tplus-api';\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 GetPrintInfomation(dto) {\r\n let param={};\r\n param.Idstore=dto.Idstore;\r\n param.POSCode=dto.POSCode;\r\n \r\n const data = await tApi({ param: JSON.stringify(param) }, 'chanjet.RE.NewPos.GetPrintInfomation', 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"]}
|