tplus-portaltouch 3.47.7 → 3.47.10
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/api/ModifyPassApi.js +165 -0
- package/dist/api/ModifyPassApi.js.map +1 -0
- package/dist/components/dutyandsettle/dutysettlebill.js +1030 -0
- package/dist/components/dutyandsettle/dutysettlebill.js.map +1 -0
- package/dist/components/dutyandsettle/dutysettlehistory.js +220 -0
- package/dist/components/dutyandsettle/dutysettlehistory.js.map +1 -0
- package/dist/components/dutyandsettle/index.js +25 -0
- package/dist/components/dutyandsettle/index.js.map +1 -0
- package/dist/components/dutyandsettle/tipContent.js +101 -0
- package/dist/components/dutyandsettle/tipContent.js.map +1 -0
- package/dist/components/header/customUse.js +79 -0
- package/dist/components/header/customUse.js.map +1 -0
- package/dist/components/header/headContent.js +947 -0
- package/dist/components/header/headContent.js.map +1 -0
- package/dist/components/header/index.js +107 -0
- package/dist/components/header/index.js.map +1 -0
- package/dist/components/header/offlinePointDesc.js +7 -0
- package/dist/components/header/offlinePointDesc.js.map +1 -0
- package/dist/components/header/style.less +458 -0
- package/dist/components/header/themeModal.js +164 -0
- package/dist/components/header/themeModal.js.map +1 -0
- package/dist/components/header/uploadList.js +271 -0
- package/dist/components/header/uploadList.js.map +1 -0
- package/dist/components/header/vertical-touch.js +285 -0
- package/dist/components/header/vertical-touch.js.map +1 -0
- package/dist/components/header/vertical-touch.less +229 -0
- package/dist/containers/Main/index.js +613 -0
- package/dist/containers/Main/index.js.map +1 -0
- package/dist/dutyService/index.js +276 -0
- package/dist/dutyService/index.js.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/middleWare/index.js +75 -0
- package/dist/middleWare/index.js.map +1 -0
- package/dist/modalRouter/StaticRouter.js +134 -0
- package/dist/modalRouter/StaticRouter.js.map +1 -0
- package/dist/modalRouter/index.js +141 -0
- package/dist/modalRouter/index.js.map +1 -0
- package/dist/pages/Modal/index.js +71 -0
- package/dist/pages/Modal/index.js.map +1 -0
- package/dist/pages/Modal/style.less +5 -0
- package/dist/pages/Portalbc/data.js +835 -0
- package/dist/pages/Portalbc/data.js.map +1 -0
- package/dist/pages/Portalbc/horizontalPadPortal.js +129 -0
- package/dist/pages/Portalbc/horizontalPadPortal.js.map +1 -0
- package/dist/pages/Portalbc/horizontalSunMiPortal.js +130 -0
- package/dist/pages/Portalbc/horizontalSunMiPortal.js.map +1 -0
- package/dist/pages/Portalbc/index.js +1515 -0
- package/dist/pages/Portalbc/index.js.map +1 -0
- package/dist/pages/Portalbc/index.less +823 -0
- package/dist/pages/Portalbc/onframe.js +256 -0
- package/dist/pages/Portalbc/onframe.js.map +1 -0
- package/dist/pages/Portalbc/verticalPortal.js +134 -0
- package/dist/pages/Portalbc/verticalPortal.js.map +1 -0
- package/dist/pages/dutyandsettle/AuthProcess.js +42 -0
- package/dist/pages/dutyandsettle/AuthProcess.js.map +1 -0
- package/dist/pages/dutyandsettle/index.js +37 -0
- package/dist/pages/dutyandsettle/index.js.map +1 -0
- package/dist/pages/dutyandsettle/index.less +529 -0
- package/dist/pages/dutyandsettle/offDuty.js +544 -0
- package/dist/pages/dutyandsettle/offDuty.js.map +1 -0
- package/dist/pages/dutyandsettle/onDialy.js +182 -0
- package/dist/pages/dutyandsettle/onDialy.js.map +1 -0
- package/dist/pages/dutyandsettle/onDuty.js +242 -0
- package/dist/pages/dutyandsettle/onDuty.js.map +1 -0
- package/dist/pages/dutyandsettle/onUnDaily.js +138 -0
- package/dist/pages/dutyandsettle/onUnDaily.js.map +1 -0
- package/dist/pages/dutyandsettle/settleDialy.js +116 -0
- package/dist/pages/dutyandsettle/settleDialy.js.map +1 -0
- package/dist/pages/index.js +54 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/modifyPass/index.js +174 -0
- package/dist/pages/modifyPass/index.js.map +1 -0
- package/dist/pages/modifyPass/style.less +71 -0
- package/dist/pages/notFound/index.js +85 -0
- package/dist/pages/notFound/index.js.map +1 -0
- package/dist/pages/notFound/style.less +17 -0
- package/dist/stores/IframeStore.js +144 -0
- package/dist/stores/IframeStore.js.map +1 -0
- package/dist/stores/ModalRouter.js +182 -0
- package/dist/stores/ModalRouter.js.map +1 -0
- package/dist/stores/ModifyPassStore.js +211 -0
- package/dist/stores/ModifyPassStore.js.map +1 -0
- package/dist/stores/PortalStore.js +285 -0
- package/dist/stores/PortalStore.js.map +1 -0
- package/dist/stores/PosLoginStore.js +108 -0
- package/dist/stores/PosLoginStore.js.map +1 -0
- package/dist/stores/billHistoryStore.js +114 -0
- package/dist/stores/billHistoryStore.js.map +1 -0
- package/dist/stores/dutySettleStore.js +115 -0
- package/dist/stores/dutySettleStore.js.map +1 -0
- package/dist/stores/index.js +41 -0
- package/dist/stores/index.js.map +1 -0
- package/dist/utils/PrintProcess.js +112 -0
- package/dist/utils/PrintProcess.js.map +1 -0
- package/dist/utils/index.js +93 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/networkCheck.js +33 -0
- package/dist/utils/networkCheck.js.map +1 -0
- package/package.json +1 -1
@@ -0,0 +1,285 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _defineProperty = require('babel-runtime/core-js/object/define-property');
|
8
|
+
|
9
|
+
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
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 _desc, _value, _class, _descriptor, _descriptor2; /*
|
28
|
+
* @Date: 2019-08-13 08:42:18
|
29
|
+
* @LastEditTime: 2019-10-17 20:24:12
|
30
|
+
* @LastEditors: wangzhhr@chanjet.com
|
31
|
+
* modify:增加查询T+中方案id接口
|
32
|
+
*/
|
33
|
+
|
34
|
+
|
35
|
+
var _mobx = require('mobx');
|
36
|
+
|
37
|
+
var _tplusApi = require('tplus-api');
|
38
|
+
|
39
|
+
var _tplusPoslogin = require('tplus-poslogin');
|
40
|
+
|
41
|
+
var _dutyService = require('../dutyService');
|
42
|
+
|
43
|
+
var _mutantsUtil = require('mutants-util');
|
44
|
+
|
45
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
46
|
+
|
47
|
+
function _initDefineProp(target, property, descriptor, context) {
|
48
|
+
if (!descriptor) return;
|
49
|
+
(0, _defineProperty2.default)(target, property, {
|
50
|
+
enumerable: descriptor.enumerable,
|
51
|
+
configurable: descriptor.configurable,
|
52
|
+
writable: descriptor.writable,
|
53
|
+
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
|
54
|
+
});
|
55
|
+
}
|
56
|
+
|
57
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
58
|
+
var desc = {};
|
59
|
+
Object['ke' + 'ys'](descriptor).forEach(function (key) {
|
60
|
+
desc[key] = descriptor[key];
|
61
|
+
});
|
62
|
+
desc.enumerable = !!desc.enumerable;
|
63
|
+
desc.configurable = !!desc.configurable;
|
64
|
+
|
65
|
+
if ('value' in desc || desc.initializer) {
|
66
|
+
desc.writable = true;
|
67
|
+
}
|
68
|
+
|
69
|
+
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
70
|
+
return decorator(target, property, desc) || desc;
|
71
|
+
}, desc);
|
72
|
+
|
73
|
+
if (context && desc.initializer !== void 0) {
|
74
|
+
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
75
|
+
desc.initializer = undefined;
|
76
|
+
}
|
77
|
+
|
78
|
+
if (desc.initializer === void 0) {
|
79
|
+
Object['define' + 'Property'](target, property, desc);
|
80
|
+
desc = null;
|
81
|
+
}
|
82
|
+
|
83
|
+
return desc;
|
84
|
+
}
|
85
|
+
|
86
|
+
function _initializerWarningHelper(descriptor, context) {
|
87
|
+
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
|
88
|
+
}
|
89
|
+
|
90
|
+
var PortalStore = (_class = function () {
|
91
|
+
function PortalStore() {
|
92
|
+
(0, _classCallCheck3.default)(this, PortalStore);
|
93
|
+
|
94
|
+
_initDefineProp(this, 'themeStore', _descriptor, this);
|
95
|
+
|
96
|
+
_initDefineProp(this, 'themeChange', _descriptor2, this);
|
97
|
+
}
|
98
|
+
|
99
|
+
(0, _createClass3.default)(PortalStore, [{
|
100
|
+
key: 'checkDuty',
|
101
|
+
|
102
|
+
|
103
|
+
// @observable portalMenus = [];
|
104
|
+
// @action async getPortalMenu(){
|
105
|
+
// // const data = await tApi({},'PortalMenu',false,false);
|
106
|
+
// // runInAction(()=>{
|
107
|
+
// // this.portalMenus = data;
|
108
|
+
// // })
|
109
|
+
// }
|
110
|
+
value: function () {
|
111
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
|
112
|
+
var duty, bduty;
|
113
|
+
return _regenerator2.default.wrap(function _callee$(_context) {
|
114
|
+
while (1) {
|
115
|
+
switch (_context.prev = _context.next) {
|
116
|
+
case 0:
|
117
|
+
console.log('posCode=======', (0, _tplusPoslogin.PosInitData)('posCode'));
|
118
|
+
_context.next = 3;
|
119
|
+
return _dutyService.DutyService.checkDuty({ userId: (0, _tplusPoslogin.PosInitData)('UserID'), posCode: (0, _tplusPoslogin.PosInitData)('posCode') });
|
120
|
+
|
121
|
+
case 3:
|
122
|
+
duty = _context.sent;
|
123
|
+
bduty = false;
|
124
|
+
_context.t0 = duty.dutyState;
|
125
|
+
_context.next = _context.t0 === _dutyService.DutyState.NotOnDuty ? 8 : _context.t0 === _dutyService.DutyState.OnDuty ? 10 : _context.t0 === _dutyService.DutyState.OtherDuty ? 12 : _context.t0 === _dutyService.DutyState.OnOtherDuty ? 14 : 16;
|
126
|
+
break;
|
127
|
+
|
128
|
+
case 8:
|
129
|
+
(0, _dutyService.showNotDutyTip)();
|
130
|
+
return _context.abrupt('break', 16);
|
131
|
+
|
132
|
+
case 10:
|
133
|
+
bduty = true;
|
134
|
+
return _context.abrupt('break', 16);
|
135
|
+
|
136
|
+
case 12:
|
137
|
+
(0, _dutyService.showOtherDutyTip)(duty.shift);
|
138
|
+
return _context.abrupt('break', 16);
|
139
|
+
|
140
|
+
case 14:
|
141
|
+
(0, _dutyService.showOnOtherDutyTip)(duty.shift);
|
142
|
+
return _context.abrupt('break', 16);
|
143
|
+
|
144
|
+
case 16:
|
145
|
+
return _context.abrupt('return', bduty ? duty.shift : null);
|
146
|
+
|
147
|
+
case 17:
|
148
|
+
case 'end':
|
149
|
+
return _context.stop();
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}, _callee, this);
|
153
|
+
}));
|
154
|
+
|
155
|
+
function checkDuty() {
|
156
|
+
return _ref.apply(this, arguments);
|
157
|
+
}
|
158
|
+
|
159
|
+
return checkDuty;
|
160
|
+
}()
|
161
|
+
}, {
|
162
|
+
key: 'onDuty',
|
163
|
+
value: function () {
|
164
|
+
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
165
|
+
var duty, result;
|
166
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
167
|
+
while (1) {
|
168
|
+
switch (_context2.prev = _context2.next) {
|
169
|
+
case 0:
|
170
|
+
_context2.next = 2;
|
171
|
+
return _dutyService.DutyService.checkDuty({ userId: (0, _tplusPoslogin.PosInitData)('UserID'), posCode: (0, _tplusPoslogin.PosInitData)('posCode') });
|
172
|
+
|
173
|
+
case 2:
|
174
|
+
duty = _context2.sent;
|
175
|
+
_context2.t0 = duty.dutyState;
|
176
|
+
_context2.next = _context2.t0 === _dutyService.DutyState.NotOnDuty ? 6 : _context2.t0 === _dutyService.DutyState.OnDuty ? 12 : _context2.t0 === _dutyService.DutyState.OtherDuty ? 14 : _context2.t0 === _dutyService.DutyState.OnOtherDuty ? 16 : 18;
|
177
|
+
break;
|
178
|
+
|
179
|
+
case 6:
|
180
|
+
_context2.next = 8;
|
181
|
+
return (0, _dutyService.showOnDuty)(duty.shift);
|
182
|
+
|
183
|
+
case 8:
|
184
|
+
result = _context2.sent;
|
185
|
+
|
186
|
+
if (!result) {
|
187
|
+
_context2.next = 11;
|
188
|
+
break;
|
189
|
+
}
|
190
|
+
|
191
|
+
return _context2.abrupt('return', {
|
192
|
+
shift: true
|
193
|
+
});
|
194
|
+
|
195
|
+
case 11:
|
196
|
+
return _context2.abrupt('break', 18);
|
197
|
+
|
198
|
+
case 12:
|
199
|
+
(0, _dutyService.showOnDutyTip)();
|
200
|
+
return _context2.abrupt('break', 18);
|
201
|
+
|
202
|
+
case 14:
|
203
|
+
(0, _dutyService.showOtherDutyTip)(duty.shift);
|
204
|
+
return _context2.abrupt('break', 18);
|
205
|
+
|
206
|
+
case 16:
|
207
|
+
(0, _dutyService.showOnOtherDutyTip)(duty.shift);
|
208
|
+
return _context2.abrupt('break', 18);
|
209
|
+
|
210
|
+
case 18:
|
211
|
+
case 'end':
|
212
|
+
return _context2.stop();
|
213
|
+
}
|
214
|
+
}
|
215
|
+
}, _callee2, this);
|
216
|
+
}));
|
217
|
+
|
218
|
+
function onDuty() {
|
219
|
+
return _ref2.apply(this, arguments);
|
220
|
+
}
|
221
|
+
|
222
|
+
return onDuty;
|
223
|
+
}()
|
224
|
+
}, {
|
225
|
+
key: 'bPosDaily',
|
226
|
+
value: function bPosDaily() {
|
227
|
+
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
228
|
+
cashierCheckAccount = _enumController$getEn.cashierCheckAccount;
|
229
|
+
|
230
|
+
return (0, _tplusPoslogin.PosInitData)('POSCheckWays') == cashierCheckAccount.BY_POS;
|
231
|
+
}
|
232
|
+
}, {
|
233
|
+
key: 'onMakerDaily',
|
234
|
+
value: function onMakerDaily() {
|
235
|
+
(0, _dutyService.showOnDaily)();
|
236
|
+
}
|
237
|
+
}, {
|
238
|
+
key: 'getSearchPlanId',
|
239
|
+
value: function () {
|
240
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(obj) {
|
241
|
+
var param;
|
242
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
243
|
+
while (1) {
|
244
|
+
switch (_context3.prev = _context3.next) {
|
245
|
+
case 0:
|
246
|
+
param = { searchName: obj.code, planName: obj.name };
|
247
|
+
_context3.next = 3;
|
248
|
+
return (0, _tplusApi.tApi)(param, 'chanjet.RE.NewPos.GetSearchPlanPlanID', false, false);
|
249
|
+
|
250
|
+
case 3:
|
251
|
+
return _context3.abrupt('return', _context3.sent);
|
252
|
+
|
253
|
+
case 4:
|
254
|
+
case 'end':
|
255
|
+
return _context3.stop();
|
256
|
+
}
|
257
|
+
}
|
258
|
+
}, _callee3, this);
|
259
|
+
}));
|
260
|
+
|
261
|
+
function getSearchPlanId(_x) {
|
262
|
+
return _ref3.apply(this, arguments);
|
263
|
+
}
|
264
|
+
|
265
|
+
return getSearchPlanId;
|
266
|
+
}()
|
267
|
+
}]);
|
268
|
+
return PortalStore;
|
269
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'themeStore', [_mobx.observable], {
|
270
|
+
enumerable: true,
|
271
|
+
initializer: function initializer() {
|
272
|
+
return localStorage.getItem("theme");
|
273
|
+
}
|
274
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'themeChange', [_mobx.action], {
|
275
|
+
enumerable: true,
|
276
|
+
initializer: function initializer() {
|
277
|
+
var _this = this;
|
278
|
+
|
279
|
+
return function (value) {
|
280
|
+
_this.themeStore = value;
|
281
|
+
};
|
282
|
+
}
|
283
|
+
})), _class);
|
284
|
+
exports.default = PortalStore;
|
285
|
+
//# sourceMappingURL=PortalStore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-portaltouch/stores/PortalStore.js"],"names":["PortalStore","console","log","DutyService","checkDuty","userId","posCode","duty","bduty","dutyState","DutyState","NotOnDuty","OnDuty","OtherDuty","OnOtherDuty","shift","result","enumController","getEnumOj","cashierCheckAccount","BY_POS","obj","param","searchName","code","planName","name","observable","localStorage","getItem","action","value","themeStore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;sDAAA;;;;;;;;AAMA;;AAKA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEMA,W;;;;;;;;;;;;;AAQF;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAEIC,wCAAQC,GAAR,CAAY,gBAAZ,EAA6B,gCAAY,SAAZ,CAA7B;;uCACmBC,yBAAYC,SAAZ,CAAsB,EAACC,QAAO,gCAAY,QAAZ,CAAR,EAA8BC,SAAQ,gCAAY,SAAZ,CAAtC,EAAtB,C;;;AAAbC,oC;AACFC,qC,GAAM,K;8CACHD,KAAKE,S;gEACHC,uBAAUC,S,uBAGVD,uBAAUE,M,wBAGVF,uBAAUG,S,wBAGVH,uBAAUI,W;;;;AARX;;;;AAGAN,wCAAM,IAAN;;;;AAGA,mEAAiBD,KAAKQ,KAAtB;;;;AAGA,qEAAmBR,KAAKQ,KAAxB;;;;iEAGDP,QAAMD,KAAKQ,KAAX,GAAiB,I;;;;;;;;;;;;;;;;;;;;;;;;;;uCAKLZ,yBAAYC,SAAZ,CAAsB,EAACC,QAAO,gCAAY,QAAZ,CAAR,EAA8BC,SAAQ,gCAAY,SAAZ,CAAtC,EAAtB,C;;;AAAbC,oC;+CAECA,KAAKE,S;kEACHC,uBAAUC,S,wBAQVD,uBAAUE,M,yBAGVF,uBAAUG,S,yBAGVH,uBAAUI,W;;;;;uCAbU,6BAAWP,KAAKQ,KAAhB,C;;;AAAfC,sC;;oCACF,CAACA,M;;;;;kEACM;AACHD,2CAAM;AADH,iC;;;;;;AAMX;;;;AAGA,mEAAiBR,KAAKQ,KAAtB;;;;AAGA,qEAAmBR,KAAKQ,KAAxB;;;;;;;;;;;;;;;;;;;oCAKD;AAAA,wCAC0BE,4BAAeC,SAAf,EAD1B;AAAA,gBACCC,mBADD,yBACCA,mBADD;;AAEP,mBAAO,gCAAY,cAAZ,KAA6BA,oBAAoBC,MAAxD;AACH;;;uCAEa;AACV;AACH;;;;mHAEqBC,G;;;;;;AACdC,qC,GAAQ,EAACC,YAAWF,IAAIG,IAAhB,EAAqBC,UAASJ,IAAIK,IAAlC,E;;uCACC,oBAAKJ,KAAL,EAAW,uCAAX,EAAmD,KAAnD,EAAyD,KAAzD,C;;;;;;;;;;;;;;;;;;;;;+EAtEhBK,gB;;;eAAwBC,aAAaC,OAAb,CAAqB,OAArB,C;;+EAExBC,Y;;;;;eAAqB,UAACC,KAAD,EAAW;AAC7B,kBAAKC,UAAL,GAAkBD,KAAlB;AACH,S;;;kBAqEU/B,W","file":"PortalStore.js","sourcesContent":["/*\n * @Date: 2019-08-13 08:42:18\n * @LastEditTime: 2019-10-17 20:24:12\n * @LastEditors: wangzhhr@chanjet.com\n * modify:增加查询T+中方案id接口\n */\nimport {\n action,\n observable,\n runInAction\n} from 'mobx';\nimport {tApi} from 'tplus-api';\nimport {PosInitData} from 'tplus-poslogin';\nimport { DutyService, DutyState, showOnDutyTip, showNotDutyTip, showOtherDutyTip, showOnOtherDutyTip, showOnDuty, showOnDaily} from '../dutyService'\nimport {enumController } from 'mutants-util'\n\nclass PortalStore {\n\n @observable themeStore = localStorage.getItem(\"theme\");\n\n @action themeChange = (value) => {\n this.themeStore = value;\n }\n\n // @observable portalMenus = [];\n // @action async getPortalMenu(){\n // // const data = await tApi({},'PortalMenu',false,false);\n // // runInAction(()=>{\n // // this.portalMenus = data;\n // // })\n // }\n async checkDuty(){\n console.log('posCode=======',PosInitData('posCode'));\n const duty = await DutyService.checkDuty({userId:PosInitData('UserID'),posCode:PosInitData('posCode')});\n let bduty=false;\n switch(duty.dutyState){\n case DutyState.NotOnDuty:\n showNotDutyTip();\n break;\n case DutyState.OnDuty:\n bduty=true;\n break;\n case DutyState.OtherDuty:\n showOtherDutyTip(duty.shift);\n break;\n case DutyState.OnOtherDuty:\n showOnOtherDutyTip(duty.shift);\n break;\n }\n return bduty?duty.shift:null;\n }\n\n async onDuty(){\n\n const duty = await DutyService.checkDuty({userId:PosInitData('UserID'),posCode:PosInitData('posCode')});//user.options.store.posCode\n //showOnDuty(duty.shift);\n switch(duty.dutyState){\n case DutyState.NotOnDuty:\n const result = await showOnDuty(duty.shift);\n if(!!result){\n return {\n shift:true\n }\n }\n break;\n case DutyState.OnDuty:\n showOnDutyTip();\n break;\n case DutyState.OtherDuty:\n showOtherDutyTip(duty.shift);\n break;\n case DutyState.OnOtherDuty:\n showOnOtherDutyTip(duty.shift);\n break;\n }\n }\n\n bPosDaily(){\n const { cashierCheckAccount } = enumController.getEnumOj();\n return PosInitData('POSCheckWays')==cashierCheckAccount.BY_POS;\n }\n\n onMakerDaily(){\n showOnDaily();\n }\n\n async getSearchPlanId(obj){\n let param = {searchName:obj.code,planName:obj.name};\n return await tApi(param,'chanjet.RE.NewPos.GetSearchPlanPlanID',false,false);\n }\n}\nexport default PortalStore;"]}
|
@@ -0,0 +1,108 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _defineProperty = require('babel-runtime/core-js/object/define-property');
|
8
|
+
|
9
|
+
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
10
|
+
|
11
|
+
var _getOwnPropertyDescriptor = require('babel-runtime/core-js/object/get-own-property-descriptor');
|
12
|
+
|
13
|
+
var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
|
14
|
+
|
15
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
16
|
+
|
17
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
18
|
+
|
19
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
20
|
+
|
21
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
22
|
+
|
23
|
+
var _desc, _value, _class, _descriptor;
|
24
|
+
|
25
|
+
var _mobx = require('mobx');
|
26
|
+
|
27
|
+
var _mutantsMicrofx = require('mutants-microfx');
|
28
|
+
|
29
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
30
|
+
|
31
|
+
function _initDefineProp(target, property, descriptor, context) {
|
32
|
+
if (!descriptor) return;
|
33
|
+
(0, _defineProperty2.default)(target, property, {
|
34
|
+
enumerable: descriptor.enumerable,
|
35
|
+
configurable: descriptor.configurable,
|
36
|
+
writable: descriptor.writable,
|
37
|
+
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
|
38
|
+
});
|
39
|
+
}
|
40
|
+
|
41
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
42
|
+
var desc = {};
|
43
|
+
Object['ke' + 'ys'](descriptor).forEach(function (key) {
|
44
|
+
desc[key] = descriptor[key];
|
45
|
+
});
|
46
|
+
desc.enumerable = !!desc.enumerable;
|
47
|
+
desc.configurable = !!desc.configurable;
|
48
|
+
|
49
|
+
if ('value' in desc || desc.initializer) {
|
50
|
+
desc.writable = true;
|
51
|
+
}
|
52
|
+
|
53
|
+
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
54
|
+
return decorator(target, property, desc) || desc;
|
55
|
+
}, desc);
|
56
|
+
|
57
|
+
if (context && desc.initializer !== void 0) {
|
58
|
+
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
59
|
+
desc.initializer = undefined;
|
60
|
+
}
|
61
|
+
|
62
|
+
if (desc.initializer === void 0) {
|
63
|
+
Object['define' + 'Property'](target, property, desc);
|
64
|
+
desc = null;
|
65
|
+
}
|
66
|
+
|
67
|
+
return desc;
|
68
|
+
}
|
69
|
+
|
70
|
+
function _initializerWarningHelper(descriptor, context) {
|
71
|
+
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
|
72
|
+
}
|
73
|
+
|
74
|
+
var LoginStore = (_class = function () {
|
75
|
+
function LoginStore() {
|
76
|
+
(0, _classCallCheck3.default)(this, LoginStore);
|
77
|
+
|
78
|
+
_initDefineProp(this, 'posCode', _descriptor, this);
|
79
|
+
}
|
80
|
+
|
81
|
+
(0, _createClass3.default)(LoginStore, [{
|
82
|
+
key: 'savePosCode',
|
83
|
+
value: function savePosCode(codeParam) {
|
84
|
+
var code = void 0;
|
85
|
+
if (typeof codeParam === 'undefined') {
|
86
|
+
var _ref = _mutantsMicrofx.stores.user.options.get('store') || {},
|
87
|
+
_ref$posCode = _ref.posCode,
|
88
|
+
localPosCode = _ref$posCode === undefined ? '' : _ref$posCode;
|
89
|
+
|
90
|
+
code = localPosCode;
|
91
|
+
} else {
|
92
|
+
code = codeParam;
|
93
|
+
}
|
94
|
+
this.posCode = code;
|
95
|
+
}
|
96
|
+
}, {
|
97
|
+
key: 'posIsLogin',
|
98
|
+
get: function get() {
|
99
|
+
return !!this.posCode;
|
100
|
+
}
|
101
|
+
}]);
|
102
|
+
return LoginStore;
|
103
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'posCode', [_mobx.observable], {
|
104
|
+
enumerable: true,
|
105
|
+
initializer: null
|
106
|
+
}), _applyDecoratedDescriptor(_class.prototype, 'posIsLogin', [_mobx.computed], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'posIsLogin'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'savePosCode', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'savePosCode'), _class.prototype)), _class);
|
107
|
+
exports.default = LoginStore;
|
108
|
+
//# sourceMappingURL=PosLoginStore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-portaltouch/stores/PosLoginStore.js"],"names":["LoginStore","codeParam","code","stores","user","options","get","posCode","localPosCode","observable","computed","action"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEMA,U;;;;;;;;;gCAQgBC,S,EAAW;AAC7B,UAAIC,aAAJ;AACA,UAAI,OAAOD,SAAP,KAAqB,WAAzB,EAAsC;AAAA,mBACGE,uBAAOC,IAAP,CAAYC,OAAZ,CAAoBC,GAApB,CAAwB,OAAxB,KAAoC,EADvC;AAAA,gCAC5BC,OAD4B;AAAA,YACnBC,YADmB,gCACJ,EADI;;AAEpCN,eAAOM,YAAP;AACD,OAHD,MAGO;AACLN,eAAOD,SAAP;AACD;AACD,WAAKM,OAAL,GAAeL,IAAf;AACD;;;wBAb0B;AACzB,aAAO,CAAC,CAAC,KAAKK,OAAd;AACD;;;4EAJAE,gB;;;+DAEAC,c,2JAIAC,Y;kBAYYX,U","file":"PosLoginStore.js","sourcesContent":["import { action, observable, computed } from 'mobx';\nimport { stores, localStore } from 'mutants-microfx';\n\nclass LoginStore {\n\n @observable posCode;\n\n @computed get posIsLogin() {\n return !!this.posCode;\n }\n\n @action savePosCode(codeParam) {\n let code;\n if (typeof codeParam === 'undefined') {\n const { posCode: localPosCode = '' } = stores.user.options.get('store') || {};\n code = localPosCode;\n } else {\n code = codeParam;\n }\n this.posCode = code;\n }\n}\n\nexport default LoginStore;\n"]}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = undefined;
|
7
|
+
|
8
|
+
var _defineProperty = require('babel-runtime/core-js/object/define-property');
|
9
|
+
|
10
|
+
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
11
|
+
|
12
|
+
var _getOwnPropertyDescriptor = require('babel-runtime/core-js/object/get-own-property-descriptor');
|
13
|
+
|
14
|
+
var _getOwnPropertyDescriptor2 = _interopRequireDefault(_getOwnPropertyDescriptor);
|
15
|
+
|
16
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
17
|
+
|
18
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
19
|
+
|
20
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
21
|
+
|
22
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
23
|
+
|
24
|
+
var _desc, _value, _class, _descriptor;
|
25
|
+
|
26
|
+
var _tplusApi = require('tplus-api');
|
27
|
+
|
28
|
+
var _mobx = require('mobx');
|
29
|
+
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
31
|
+
|
32
|
+
function _initDefineProp(target, property, descriptor, context) {
|
33
|
+
if (!descriptor) return;
|
34
|
+
(0, _defineProperty2.default)(target, property, {
|
35
|
+
enumerable: descriptor.enumerable,
|
36
|
+
configurable: descriptor.configurable,
|
37
|
+
writable: descriptor.writable,
|
38
|
+
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
|
39
|
+
});
|
40
|
+
}
|
41
|
+
|
42
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
43
|
+
var desc = {};
|
44
|
+
Object['ke' + 'ys'](descriptor).forEach(function (key) {
|
45
|
+
desc[key] = descriptor[key];
|
46
|
+
});
|
47
|
+
desc.enumerable = !!desc.enumerable;
|
48
|
+
desc.configurable = !!desc.configurable;
|
49
|
+
|
50
|
+
if ('value' in desc || desc.initializer) {
|
51
|
+
desc.writable = true;
|
52
|
+
}
|
53
|
+
|
54
|
+
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
55
|
+
return decorator(target, property, desc) || desc;
|
56
|
+
}, desc);
|
57
|
+
|
58
|
+
if (context && desc.initializer !== void 0) {
|
59
|
+
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
60
|
+
desc.initializer = undefined;
|
61
|
+
}
|
62
|
+
|
63
|
+
if (desc.initializer === void 0) {
|
64
|
+
Object['define' + 'Property'](target, property, desc);
|
65
|
+
desc = null;
|
66
|
+
}
|
67
|
+
|
68
|
+
return desc;
|
69
|
+
}
|
70
|
+
|
71
|
+
function _initializerWarningHelper(descriptor, context) {
|
72
|
+
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
|
73
|
+
}
|
74
|
+
|
75
|
+
var BillHistoryStore = (_class = function () {
|
76
|
+
function BillHistoryStore() {
|
77
|
+
(0, _classCallCheck3.default)(this, BillHistoryStore);
|
78
|
+
this.vouchers = [];
|
79
|
+
|
80
|
+
_initDefineProp(this, 'curIndex', _descriptor, this);
|
81
|
+
}
|
82
|
+
|
83
|
+
(0, _createClass3.default)(BillHistoryStore, [{
|
84
|
+
key: 'setCurIndex',
|
85
|
+
value: function setCurIndex(index) {
|
86
|
+
this.curIndex = index;
|
87
|
+
}
|
88
|
+
}, {
|
89
|
+
key: 'getVoucher',
|
90
|
+
value: function getVoucher(index) {
|
91
|
+
return index == -1 || index > this.vouchers.length - 1 ? null : this.vouchers[index];
|
92
|
+
}
|
93
|
+
}, {
|
94
|
+
key: 'getVouchers',
|
95
|
+
value: function getVouchers(dateStr, type) {
|
96
|
+
var _this = this;
|
97
|
+
|
98
|
+
this.setCurIndex(-1);
|
99
|
+
(0, _tplusApi.tApi)({ dateStr: dateStr }, type == 'offDuty' ? 'chanjet.RE.NewPos.GetShiftVoucherDTOs' : 'chanjet.RE.NewPos.GetDailyVoucherDTOs', false, false).then(function (result) {
|
100
|
+
_this.vouchers = type == 'offDuty' ? result.ShiftVoucherList == "" ? [] : JSON.parse(result.ShiftVoucherList) : result.DailyDetailList == "" ? [] : JSON.parse(result.DailyDetailList);
|
101
|
+
_this.voucherInfo = JSON.parse(result.ViewInfoList);
|
102
|
+
_this.setCurIndex(_this.vouchers.length > 0 ? 0 : -1);
|
103
|
+
});
|
104
|
+
}
|
105
|
+
}]);
|
106
|
+
return BillHistoryStore;
|
107
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'curIndex', [_mobx.observable], {
|
108
|
+
enumerable: true,
|
109
|
+
initializer: function initializer() {
|
110
|
+
return -1;
|
111
|
+
}
|
112
|
+
}), _applyDecoratedDescriptor(_class.prototype, 'setCurIndex', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setCurIndex'), _class.prototype)), _class);
|
113
|
+
exports.default = BillHistoryStore;
|
114
|
+
//# sourceMappingURL=billHistoryStore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-portaltouch/stores/billHistoryStore.js"],"names":["BillHistoryStore","vouchers","index","curIndex","length","dateStr","type","setCurIndex","then","result","ShiftVoucherList","JSON","parse","DailyDetailList","voucherInfo","ViewInfoList","observable","action"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEqBA,gB;AAIpB,6BAAc;AAAA;AAAA,OAHdC,QAGc,GAHJ,EAGI;;AAAA;AAEb;;;;8BAEmBC,K,EAAM;AACzB,QAAKC,QAAL,GAAcD,KAAd;AACA;;;6BAEUA,K,EAAM;AAChB,UAAOA,SAAO,CAAC,CAAR,IAAaA,QAAM,KAAKD,QAAL,CAAcG,MAAd,GAAqB,CAAxC,GAA4C,IAA5C,GAAmD,KAAKH,QAAL,CAAcC,KAAd,CAA1D;AACA;;;8BAEWG,O,EAAQC,I,EAAK;AAAA;;AACxB,QAAKC,WAAL,CAAiB,CAAC,CAAlB;AACA,uBAAK,EAACF,gBAAD,EAAL,EAAgBC,QAAM,SAAN,GAAgB,uCAAhB,GAAwD,uCAAxE,EAAiH,KAAjH,EAAwH,KAAxH,EAA+HE,IAA/H,CAAoI,UAACC,MAAD,EAAU;AAC7I,UAAKR,QAAL,GAAcK,QAAM,SAAN,GAAiBG,OAAOC,gBAAP,IAAyB,EAAzB,GAA4B,EAA5B,GAA+BC,KAAKC,KAAL,CAAWH,OAAOC,gBAAlB,CAAhD,GACJD,OAAOI,eAAP,IAAwB,EAAxB,GAA2B,EAA3B,GAA8BF,KAAKC,KAAL,CAAWH,OAAOI,eAAlB,CADxC;AAEA,UAAKC,WAAL,GAAiBH,KAAKC,KAAL,CAAWH,OAAOM,YAAlB,CAAjB;AACA,UAAKR,WAAL,CAAiB,MAAKN,QAAL,CAAcG,MAAd,GAAqB,CAArB,GAAuB,CAAvB,GAAyB,CAAC,CAA3C;AACA,IALD;AAMA;;;6EArBAY,gB;;;SAAoB,CAAC,C;;gEAKrBC,Y;kBARmBjB,gB","file":"billHistoryStore.js","sourcesContent":["import { tApi } from 'tplus-api';\nimport { action, observable, runInAction, computed, toJS, transaction } from 'mobx';\n\nexport default class BillHistoryStore {\n\tvouchers =[]\n\tvoucherInfo\n\t@observable curIndex=-1\n\tconstructor() {\n\t\t\n\t}\n\n\t@action setCurIndex(index){\n\t\tthis.curIndex=index;\n\t}\n\n\tgetVoucher(index){\n\t\treturn index==-1 || index>this.vouchers.length-1 ? null : this.vouchers[index];\n\t}\n\n\tgetVouchers(dateStr,type){\n\t\tthis.setCurIndex(-1);\n\t\ttApi({dateStr}, type=='offDuty'?'chanjet.RE.NewPos.GetShiftVoucherDTOs':'chanjet.RE.NewPos.GetDailyVoucherDTOs', false, false).then((result)=>{\n\t\t\tthis.vouchers=type=='offDuty'?(result.ShiftVoucherList==\"\"?[]:JSON.parse(result.ShiftVoucherList))\n\t\t\t\t\t\t\t\t\t\t :(result.DailyDetailList==\"\"?[]:JSON.parse(result.DailyDetailList));\n\t\t\tthis.voucherInfo=JSON.parse(result.ViewInfoList);\n\t\t\tthis.setCurIndex(this.vouchers.length>0?0:-1);\n\t\t})\n\t}\n}\n"]}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.default = undefined;
|
7
|
+
|
8
|
+
var _defineProperty = require('babel-runtime/core-js/object/define-property');
|
9
|
+
|
10
|
+
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
11
|
+
|
12
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
13
|
+
|
14
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
15
|
+
|
16
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
17
|
+
|
18
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
19
|
+
|
20
|
+
var _desc, _value, _class, _descriptor;
|
21
|
+
|
22
|
+
var _moment = require('moment');
|
23
|
+
|
24
|
+
var _moment2 = _interopRequireDefault(_moment);
|
25
|
+
|
26
|
+
var _tplusApi = require('tplus-api');
|
27
|
+
|
28
|
+
var _mobx = require('mobx');
|
29
|
+
|
30
|
+
var _dutyService = require('../dutyService');
|
31
|
+
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
33
|
+
|
34
|
+
function _initDefineProp(target, property, descriptor, context) {
|
35
|
+
if (!descriptor) return;
|
36
|
+
(0, _defineProperty2.default)(target, property, {
|
37
|
+
enumerable: descriptor.enumerable,
|
38
|
+
configurable: descriptor.configurable,
|
39
|
+
writable: descriptor.writable,
|
40
|
+
value: descriptor.initializer ? descriptor.initializer.call(context) : void 0
|
41
|
+
});
|
42
|
+
}
|
43
|
+
|
44
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
45
|
+
var desc = {};
|
46
|
+
Object['ke' + 'ys'](descriptor).forEach(function (key) {
|
47
|
+
desc[key] = descriptor[key];
|
48
|
+
});
|
49
|
+
desc.enumerable = !!desc.enumerable;
|
50
|
+
desc.configurable = !!desc.configurable;
|
51
|
+
|
52
|
+
if ('value' in desc || desc.initializer) {
|
53
|
+
desc.writable = true;
|
54
|
+
}
|
55
|
+
|
56
|
+
desc = decorators.slice().reverse().reduce(function (desc, decorator) {
|
57
|
+
return decorator(target, property, desc) || desc;
|
58
|
+
}, desc);
|
59
|
+
|
60
|
+
if (context && desc.initializer !== void 0) {
|
61
|
+
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
|
62
|
+
desc.initializer = undefined;
|
63
|
+
}
|
64
|
+
|
65
|
+
if (desc.initializer === void 0) {
|
66
|
+
Object['define' + 'Property'](target, property, desc);
|
67
|
+
desc = null;
|
68
|
+
}
|
69
|
+
|
70
|
+
return desc;
|
71
|
+
}
|
72
|
+
|
73
|
+
function _initializerWarningHelper(descriptor, context) {
|
74
|
+
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
|
75
|
+
}
|
76
|
+
|
77
|
+
var DutySettleStore = (_class = function () {
|
78
|
+
function DutySettleStore() {
|
79
|
+
(0, _classCallCheck3.default)(this, DutySettleStore);
|
80
|
+
this.preHandShiftOffDutyError = ['RE_POS_HasLogout', 'RE_POS_UnShift'];
|
81
|
+
this.preHandShiftDailyError = ['RE_POS_HasLogout', 'RE_POS_CashierCheck_Error', 'RE_POS_NotDaily', 'RE_POS_UnShift_Error'];
|
82
|
+
|
83
|
+
_initDefineProp(this, 'bOffDuty', _descriptor, this);
|
84
|
+
}
|
85
|
+
|
86
|
+
(0, _createClass3.default)(DutySettleStore, [{
|
87
|
+
key: 'preHandShift',
|
88
|
+
value: function preHandShift(u, type) {
|
89
|
+
var _this = this;
|
90
|
+
|
91
|
+
this.user = u;
|
92
|
+
this.type = type;
|
93
|
+
return (0, _tplusApi.tApi)(type == 'offDuty' ? {} : { dateStr: (0, _moment2.default)().format(_dutyService.DateFormat) }, type == 'offDuty' ? 'chanjet.RE.NewPos.PreHandShift' : 'chanjet.RE.NewPos.PrePosDaily', false, false).then(function (resp) {
|
94
|
+
_this.shiftVoucher = JSON.parse(resp.ShiftVoucherDTO || resp.DailyDetailDTO);
|
95
|
+
_this.voucherInfo = JSON.parse(resp.ViewInfoList);
|
96
|
+
(0, _mobx.runInAction)(function () {
|
97
|
+
_this.bOffDuty = !_this.bOffDuty;
|
98
|
+
});
|
99
|
+
});
|
100
|
+
}
|
101
|
+
}, {
|
102
|
+
key: 'handleShift',
|
103
|
+
value: function handleShift(type, ImprestAmount) {
|
104
|
+
return (0, _tplusApi.tApi)({ ImprestAmount: ImprestAmount, dateStr: (0, _moment2.default)().format(_dutyService.DateFormat) }, type == 'offDuty' ? 'chanjet.RE.NewPos.HandShift' : 'chanjet.RE.NewPos.HandPosDaily', false, false);
|
105
|
+
}
|
106
|
+
}]);
|
107
|
+
return DutySettleStore;
|
108
|
+
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'bOffDuty', [_mobx.observable], {
|
109
|
+
enumerable: true,
|
110
|
+
initializer: function initializer() {
|
111
|
+
return false;
|
112
|
+
}
|
113
|
+
})), _class);
|
114
|
+
exports.default = DutySettleStore;
|
115
|
+
//# sourceMappingURL=dutySettleStore.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["tplus-portaltouch/stores/dutySettleStore.js"],"names":["DutySettleStore","preHandShiftOffDutyError","preHandShiftDailyError","u","type","user","dateStr","format","DateFormat","then","resp","shiftVoucher","JSON","parse","ShiftVoucherDTO","DailyDetailDTO","voucherInfo","ViewInfoList","bOffDuty","ImprestAmount","observable"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEqBA,e;AASpB,4BAAc;AAAA;AAAA,OAPdC,wBAOc,GAPa,CAAC,kBAAD,EAAoB,gBAApB,CAOb;AAAA,OANdC,sBAMc,GANW,CAAC,kBAAD,EAAoB,2BAApB,EAAgD,iBAAhD,EAAkE,sBAAlE,CAMX;;AAAA;AAEb;;;;+BAEaC,C,EAAEC,I,EAAM;AAAA;;AACrB,QAAKC,IAAL,GAAUF,CAAV;AACA,QAAKC,IAAL,GAAUA,IAAV;AACA,UAAO,oBAAKA,QAAM,SAAN,GAAgB,EAAhB,GAAmB,EAACE,SAAQ,wBAASC,MAAT,CAAgBC,uBAAhB,CAAT,EAAxB,EAA+DJ,QAAM,SAAN,GAAgB,gCAAhB,GAAiD,+BAAhH,EAAiJ,KAAjJ,EAAwJ,KAAxJ,EAA+JK,IAA/J,CAAoK,UAACC,IAAD,EAAQ;AAClL,UAAKC,YAAL,GAAkBC,KAAKC,KAAL,CAAWH,KAAKI,eAAL,IAAsBJ,KAAKK,cAAtC,CAAlB;AACA,UAAKC,WAAL,GAAiBJ,KAAKC,KAAL,CAAWH,KAAKO,YAAhB,CAAjB;AACA,2BAAY,YAAI;AAAC,WAAKC,QAAL,GAAc,CAAC,MAAKA,QAApB;AAA6B,KAA9C;AACA,IAJM,CAAP;AAKA;;;8BACWd,I,EAAKe,a,EAAc;AAC9B,UAAO,oBAAK,EAACA,4BAAD,EAAeb,SAAQ,wBAASC,MAAT,CAAgBC,uBAAhB,CAAvB,EAAL,EAA0DJ,QAAM,SAAN,GAAgB,6BAAhB,GAA8C,gCAAxG,EAA0I,KAA1I,EAAiJ,KAAjJ,CAAP;AACA;;;6EAjBAgB,gB;;;SAAqB,K;;;kBAPFpB,e","file":"dutySettleStore.js","sourcesContent":["import moment from \"moment\";\nimport { tApi } from 'tplus-api';\nimport { observable, runInAction } from 'mobx';\nimport { DateFormat } from '../dutyService';\n\nexport default class DutySettleStore {\n\n\tpreHandShiftOffDutyError = ['RE_POS_HasLogout','RE_POS_UnShift'];\n\tpreHandShiftDailyError = ['RE_POS_HasLogout','RE_POS_CashierCheck_Error','RE_POS_NotDaily','RE_POS_UnShift_Error'];\n user\n\tshiftVoucher\n\tvoucherInfo\n\t@observable bOffDuty =false;\n\ttype\n\tconstructor() {\n\t\t\n\t}\n\n preHandShift(u,type) {\n\t\tthis.user=u;\n\t\tthis.type=type;\n\t\treturn tApi(type=='offDuty'?{}:{dateStr:moment().format(DateFormat)}, type=='offDuty'?'chanjet.RE.NewPos.PreHandShift':'chanjet.RE.NewPos.PrePosDaily', false, false).then((resp)=>{\n\t\t\tthis.shiftVoucher=JSON.parse(resp.ShiftVoucherDTO||resp.DailyDetailDTO);\n\t\t\tthis.voucherInfo=JSON.parse(resp.ViewInfoList);\n\t\t\trunInAction(()=>{this.bOffDuty=!this.bOffDuty})\n\t\t})\n\t}\n\thandleShift(type,ImprestAmount){\n\t\treturn tApi({ImprestAmount,dateStr:moment().format(DateFormat)}, type=='offDuty'?'chanjet.RE.NewPos.HandShift':'chanjet.RE.NewPos.HandPosDaily', false, false)\n\t}\n}\n"]}
|