tplus-components-touch 3.28.2 → 3.28.3
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/acCitySelect/CitySelect.js +541 -0
- package/dist/components/acCitySelect/CitySelect.js.map +1 -0
- package/dist/components/acCitySelect/CitySelect.less +10 -0
- package/dist/components/acCitySelect/citys.js +1270 -0
- package/dist/components/acCitySelect/citys.js.map +1 -0
- package/dist/components/acCitySelect/index.js +18 -0
- package/dist/components/acCitySelect/index.js.map +1 -0
- package/dist/components/acCitySelect/provinceData.js +40 -0
- package/dist/components/acCitySelect/provinceData.js.map +1 -0
- package/dist/components/addLog/AddLogProcessor.js +49 -0
- package/dist/components/addLog/AddLogProcessor.js.map +1 -0
- package/dist/components/addLog/OperationLogApi.js +125 -0
- package/dist/components/addLog/OperationLogApi.js.map +1 -0
- package/dist/components/autoComplete/index.js +245 -0
- package/dist/components/autoComplete/index.js.map +1 -0
- package/dist/components/autoComplete/index.less +89 -0
- package/dist/components/autoComplete/option.js +75 -0
- package/dist/components/autoComplete/option.js.map +1 -0
- package/dist/components/autoCompleteWithKeyboard/index.js +231 -0
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -0
- package/dist/components/autoCompleteWithKeyboard/index.less +8 -0
- package/dist/components/billSearch/api.js +465 -0
- package/dist/components/billSearch/api.js.map +1 -0
- package/dist/components/billSearch/index.js +2201 -0
- package/dist/components/billSearch/index.js.map +1 -0
- package/dist/components/billSearch/index.less +376 -0
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +568 -0
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -0
- package/dist/components/cloudPrint/api.js +391 -0
- package/dist/components/cloudPrint/api.js.map +1 -0
- package/dist/components/cloudPrint/index.js +727 -0
- package/dist/components/cloudPrint/index.js.map +1 -0
- package/dist/components/cloudPrint/printDispatch.js +324 -0
- package/dist/components/cloudPrint/printDispatch.js.map +1 -0
- package/dist/components/commonForm/addressPicker/index.js +232 -0
- package/dist/components/commonForm/addressPicker/index.js.map +1 -0
- package/dist/components/commonForm/addressPicker/style.less +11 -0
- package/dist/components/commonForm/autoComplete/index.js +241 -0
- package/dist/components/commonForm/autoComplete/index.js.map +1 -0
- package/dist/components/commonForm/autoComplete/style.less +3 -0
- package/dist/components/commonForm/datePicker/index.js +89 -0
- package/dist/components/commonForm/datePicker/index.js.map +1 -0
- package/dist/components/commonForm/datePicker/style.less +5 -0
- package/dist/components/commonForm/formControl/index.js +143 -0
- package/dist/components/commonForm/formControl/index.js.map +1 -0
- package/dist/components/commonForm/formControl/style.less +0 -0
- package/dist/components/commonForm/index.js +225 -0
- package/dist/components/commonForm/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/index.js +272 -0
- package/dist/components/commonForm/inputNumber/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/style.less +11 -0
- package/dist/components/commonForm/radio/index.js +132 -0
- package/dist/components/commonForm/radio/index.js.map +1 -0
- package/dist/components/commonForm/radio/style.less +0 -0
- package/dist/components/commonForm/style.less +2 -0
- package/dist/components/deliverySearch/api.js +355 -0
- package/dist/components/deliverySearch/api.js.map +1 -0
- package/dist/components/deliverySearch/index.js +1218 -0
- package/dist/components/deliverySearch/index.js.map +1 -0
- package/dist/components/deliverySearch/index.less +554 -0
- package/dist/components/form/index.js +310 -0
- package/dist/components/form/index.js.map +1 -0
- package/dist/components/hardwareAPI/index.js +181 -0
- package/dist/components/hardwareAPI/index.js.map +1 -0
- package/dist/components/hotKey/config.js +306 -0
- package/dist/components/hotKey/config.js.map +1 -0
- package/dist/components/hotKey/hotKeyModal.js +479 -0
- package/dist/components/hotKey/hotKeyModal.js.map +1 -0
- package/dist/components/hotKey/index.js +785 -0
- package/dist/components/hotKey/index.js.map +1 -0
- package/dist/components/hotKey/localConfig.js +1021 -0
- package/dist/components/hotKey/localConfig.js.map +1 -0
- package/dist/components/hotKey/style.less +96 -0
- package/dist/components/hotKey/utils.js +135 -0
- package/dist/components/hotKey/utils.js.map +1 -0
- package/dist/components/input/index.js +251 -0
- package/dist/components/input/index.js.map +1 -0
- 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/input/style.less +99 -0
- package/dist/components/input/tplusInput/index.js +81 -0
- package/dist/components/input/tplusInput/index.js.map +1 -0
- package/dist/components/input/tplusInput/inputContent.js +128 -0
- package/dist/components/input/tplusInput/inputContent.js.map +1 -0
- package/dist/components/input/tplusInput/inputs.js +151 -0
- package/dist/components/input/tplusInput/inputs.js.map +1 -0
- package/dist/components/input/tplusInput/style.less +132 -0
- package/dist/components/input/utils/index.js +26 -0
- package/dist/components/input/utils/index.js.map +1 -0
- package/dist/components/inventorySearch/api.js +214 -0
- package/dist/components/inventorySearch/api.js.map +1 -0
- package/dist/components/inventorySearch/index.js +303 -0
- package/dist/components/inventorySearch/index.js.map +1 -0
- package/dist/components/inventorySearch/index.less +120 -0
- package/dist/components/inventorySearch/store.js +363 -0
- package/dist/components/inventorySearch/store.js.map +1 -0
- package/dist/components/inventorySearch/tab.js +273 -0
- package/dist/components/inventorySearch/tab.js.map +1 -0
- package/dist/components/keyboard/index.js +255 -0
- package/dist/components/keyboard/index.js.map +1 -0
- package/dist/components/keyboard/index.less +470 -0
- package/dist/components/keyboard/letterKeyboard.js +210 -0
- package/dist/components/keyboard/letterKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboard.js +459 -0
- package/dist/components/keyboard/numKeyboard.js.map +1 -0
- package/dist/components/keyboard/numKeyboardScan.js +195 -0
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -0
- package/dist/components/keyboard/numberButton_input.js +303 -0
- package/dist/components/keyboard/numberButton_input.js.map +1 -0
- package/dist/components/keyboard/numkeyboardPassword.js +460 -0
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -0
- package/dist/components/keyboard/onlyKeyboard.js +90 -0
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton.js +187 -0
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.js +235 -0
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -0
- package/dist/components/keyboard/onlyLetterButton2.less +162 -0
- package/dist/components/keyboard/onlyNumberButton.js +128 -0
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -0
- package/dist/components/keyboard/onlyNumberButton2.js +115 -0
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -0
- package/dist/components/keyboard/textKeyboard.js +50 -0
- package/dist/components/keyboard/textKeyboard.js.map +1 -0
- package/dist/components/layout/hamburger.js +29 -0
- package/dist/components/layout/hamburger.js.map +1 -0
- package/dist/components/layout/index.js +31 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/layout/layout.js +182 -0
- package/dist/components/layout/layout.js.map +1 -0
- package/dist/components/layout/sider.js +165 -0
- package/dist/components/layout/sider.js.map +1 -0
- package/dist/components/layout/style.less +82 -0
- package/dist/components/loading/index.js +198 -0
- package/dist/components/loading/index.js.map +1 -0
- package/dist/components/loading/loadingContent.js +185 -0
- package/dist/components/loading/loadingContent.js.map +1 -0
- package/dist/components/loading/style.less +70 -0
- package/dist/components/loading/utils.js +29 -0
- package/dist/components/loading/utils.js.map +1 -0
- package/dist/components/message/index.js +311 -0
- package/dist/components/message/index.js.map +1 -0
- package/dist/components/message/index.less +101 -0
- package/dist/components/modal/index.js +93 -0
- package/dist/components/modal/index.js.map +1 -0
- package/dist/components/modal/index.less +19 -0
- package/dist/components/modalVertical/index.js +325 -0
- package/dist/components/modalVertical/index.js.map +1 -0
- package/dist/components/modalVertical/style.less +60 -0
- package/dist/components/modalWraper/index.js +470 -0
- package/dist/components/modalWraper/index.js.map +1 -0
- package/dist/components/modalWraper/style.less +257 -0
- package/dist/components/modalWraper/utils.js +48 -0
- package/dist/components/modalWraper/utils.js.map +1 -0
- package/dist/components/notification/index.js +119 -0
- package/dist/components/notification/index.js.map +1 -0
- package/dist/components/notification/index.less +52 -0
- package/dist/components/overflowTip/index.js +269 -0
- package/dist/components/overflowTip/index.js.map +1 -0
- package/dist/components/overflowTip/style.less +66 -0
- package/dist/components/page/index.js +49 -0
- package/dist/components/page/index.js.map +1 -0
- package/dist/components/page/index.less +22 -0
- package/dist/components/product/detail.js +148 -0
- package/dist/components/product/detail.js.map +1 -0
- package/dist/components/product/getCard.js +145 -0
- package/dist/components/product/getCard.js.map +1 -0
- package/dist/components/product/index.less +128 -0
- package/dist/components/progressState/EmptyAndErrorView.js +143 -0
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -0
- package/dist/components/progressState/ProgressState.js +157 -0
- package/dist/components/progressState/ProgressState.js.map +1 -0
- package/dist/components/progressState/index.js +14 -0
- package/dist/components/progressState/index.js.map +1 -0
- package/dist/components/progressState/style.less +65 -0
- package/dist/components/scan/index.js +219 -0
- package/dist/components/scan/index.js.map +1 -0
- package/dist/components/scan/index.less +34 -0
- package/dist/components/select/index.js +28 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/index.less +12 -0
- package/dist/components/settlement/asyncModal.js +204 -0
- package/dist/components/settlement/asyncModal.js.map +1 -0
- package/dist/components/settlement/index.js +16 -0
- package/dist/components/settlement/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/index.js +349 -0
- package/dist/components/settlement/prototypeTable/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/style.less +59 -0
- package/dist/components/settlement/prototypeTable/utils.js +14 -0
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -0
- package/dist/components/settlement/settlement.js +5474 -0
- package/dist/components/settlement/settlement.js.map +1 -0
- package/dist/components/settlement/settlement.less +1595 -0
- package/dist/components/settlement/settlementStore.js +2117 -0
- package/dist/components/settlement/settlementStore.js.map +1 -0
- package/dist/components/settlement/utils.js +249 -0
- package/dist/components/settlement/utils.js.map +1 -0
- package/dist/components/socket/index.js +221 -0
- package/dist/components/socket/index.js.map +1 -0
- package/dist/components/spin/index.js +95 -0
- package/dist/components/spin/index.js.map +1 -0
- package/dist/components/spin/spin-style.less +436 -0
- package/dist/components/test/index.js +330 -0
- package/dist/components/test/index.js.map +1 -0
- package/dist/components/ticon/iconfont/demo.css +539 -0
- package/dist/components/ticon/iconfont/demo_index.html +5202 -0
- package/dist/components/ticon/iconfont/iconfont.css +887 -0
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +35 -0
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -0
- package/dist/components/ticon/iconfont/iconfont.json +1535 -0
- package/dist/components/ticon/iconfont/iconfont.svg +593 -0
- 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 +60 -0
- package/dist/components/ticon/index.js.map +1 -0
- package/dist/components/touchScroll/index.js +182 -0
- package/dist/components/touchScroll/index.js.map +1 -0
- package/dist/components/touchTable/AuthProcess.js +42 -0
- package/dist/components/touchTable/AuthProcess.js.map +1 -0
- package/dist/components/touchTable/generateWater.js +59 -0
- package/dist/components/touchTable/generateWater.js.map +1 -0
- package/dist/components/touchTable/index.js +1110 -0
- package/dist/components/touchTable/index.js.map +1 -0
- package/dist/components/touchTable/index.less +370 -0
- package/dist/components/touchTable/utils.js +14 -0
- package/dist/components/touchTable/utils.js.map +1 -0
- package/dist/demo/PopOverDemo.js +126 -0
- package/dist/demo/PopOverDemo.js.map +1 -0
- package/dist/index.js +266 -0
- package/dist/index.js.map +1 -0
- package/dist/util/tools.js +200 -0
- package/dist/util/tools.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,391 @@
|
|
|
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
|
|
@@ -0,0 +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","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,SAlBkB;AAAG;;AAEtB;;;;;;;AAkBA;;iHACo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B,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';\nimport { api } from 'mutants-microfx';\nimport crypto from 'crypto';\n\nconst HTTP_PROXY_URL = \"http://tfproxy.chanjet.com\";\nconst FEI_E_YUN_HOST = \"http://api.feieyun.cn/Api/Open/\";\nconst FEI_E_YUN_USER = \"tplus@chanjet.com\";\nconst FEI_E_YUN_KEYS = \"nyktjQ9nVyY6BfIs\";\n\nclass API {\n constructor(props) { }\n\n //飞蛾参数加密\n shaEncrypt = (originalText) => {\n let password = \"\";\n let md5 = crypto.createHash('sha1');\n md5.update(originalText);\n let data = md5.digest();\n for (let i = 0; i < data.length; i++) {\n\n let v = data[i] & 0xFF;\n let hv = v.toString(16);\n if (hv.length < 2) {\n password = password + 0;\n }\n password = password + hv;\n }\n return password;\n }\n\n //获取枚举列表信息\n async getDataSource(params) {\n const { dataSource } = params;\n const data = await tApi({ BizCode: params.bizCode }, dataSource, false, false);\n return data;\n }\n\n //获取打印数据\n async getPrintDataInfo(Id) {\n const data = await tApi({ id:Id }, 'chanjet.RE.INewRetail.FindById', false, false);\n return data;\n }\n\n //获取当前门店硬件配置信息\n async GetPrintInfomation(dto) {\n let param={};\n param.Idstore=dto.Idstore;\n param.POSCode=dto.POSCode;\n \n const data = await tApi({ param: JSON.stringify(param) }, 'chanjet.RE.NewPos.GetPrintInfomation', false, false);\n return data;\n }\n\n //获取日结打印数据\n async getDialyPrintDataInfo(Id) {\n const data = await tApi({ id:Id }, 'Ufida.T.RE.Interface.IDailyDetail.FindById', false, false);\n return data;\n }\n\n //获取交班打印数据\n async getDutyPrintDataInfo(Id) {\n const data = await tApi({ id:Id }, 'Ufida.T.RE.IShiftVoucher.FindById', false, false);\n return data;\n } \n\n //获取储值打印数据\n async getStoragePrintDataInfo(Id) {\n const data = await tApi({ id:Id }, 'Ufida.T.ME.Interface.IMemberStorage.FindById', false, false);\n return data;\n }\n\n // 小票打印-获取状态信息。类似{\"msg\":\"ok\",\"ret\":0,\"data\":\"\\u79bb\\u7ebf\\u3002\",\"serverExecutedTime\":5}\n async openQueryPrinterStatus(params) {\n let ts = Math.round(new Date().getTime() / 1000).toString();\n let dt = [\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\n `apiname=${params.apiname}`,\n `debug=0`,\n `stime=${ts}`,\n `sn=${params.deviceCode}`,\n `user=${FEI_E_YUN_USER}`\n ]\n dt = dt.join('&');\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n data: dt,\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\n };\n return api(options);\n }\n\n // 小票打印-云打印\n async openPrinterAddlist(params) {\n let ts = Math.round(new Date().getTime() / 1000).toString();\n let dt = [\n `printerContent=${params.printerContent}`,\n `user=${FEI_E_YUN_USER}`,\n `stime=${ts}`,\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\n `apiname=${params.apiname}`,\n `debug=0`\n ]\n dt = dt.join('&');\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n data: dt,\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\n };\n return api(options);\n }\n\n // 小票打印-发出打印指令\n async openPrintMsg(params) {\n let ts = Math.round(new Date().getTime() / 1000).toString();\n let dt = [\n `content=${params.content}`,\n `printerContent=${params.printerContent}`,\n `user=${FEI_E_YUN_USER}`,\n `stime=${ts}`,\n `sig=${this.shaEncrypt(FEI_E_YUN_USER + FEI_E_YUN_KEYS + ts)}`,\n `apiname=${params.apiname}`,\n `debug=0`,\n `sn=${params.deviceCode}`,\n `times=${params.times}` //打印次数\n ]\n dt = dt.join('&');\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\n data: dt,\n url: `${HTTP_PROXY_URL}?url=${FEI_E_YUN_HOST}`,\n };\n return api(options);\n }\n}\nexport default new API;\n"]}
|