tplus-portaltouch 3.23.1 → 3.23.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.
Files changed (36) hide show
  1. package/dist/api/ModifyPassApi.js +1 -1
  2. package/dist/api/ModifyPassApi.js.map +1 -1
  3. package/dist/components/dutyandsettle/dutysettlehistory.js +45 -66
  4. package/dist/components/dutyandsettle/dutysettlehistory.js.map +1 -1
  5. package/dist/components/header/headContent.js +508 -38
  6. package/dist/components/header/headContent.js.map +1 -1
  7. package/dist/components/header/offlinePointDesc.js +7 -0
  8. package/dist/components/header/offlinePointDesc.js.map +1 -0
  9. package/dist/components/header/style.less +106 -1
  10. package/dist/components/header/uploadList.js +271 -0
  11. package/dist/components/header/uploadList.js.map +1 -0
  12. package/dist/containers/Main/index.js +17 -18
  13. package/dist/containers/Main/index.js.map +1 -1
  14. package/dist/pages/Portalbc/data.js +55 -26
  15. package/dist/pages/Portalbc/data.js.map +1 -1
  16. package/dist/pages/Portalbc/index.js +462 -295
  17. package/dist/pages/Portalbc/index.js.map +1 -1
  18. package/dist/pages/Portalbc/index.less +46 -1
  19. package/dist/pages/Portalbc/verticalPortal.js +3 -1
  20. package/dist/pages/Portalbc/verticalPortal.js.map +1 -1
  21. package/dist/pages/dutyandsettle/offDuty.js +82 -97
  22. package/dist/pages/dutyandsettle/offDuty.js.map +1 -1
  23. package/dist/utils/networkCheck.js +8 -6
  24. package/dist/utils/networkCheck.js.map +1 -1
  25. package/package.json +2 -2
  26. package/dist/pages/Portal/data.js +0 -32
  27. package/dist/pages/Portal/data.js.map +0 -1
  28. package/dist/pages/Portal/horizontalPadPortal.js +0 -129
  29. package/dist/pages/Portal/horizontalPadPortal.js.map +0 -1
  30. package/dist/pages/Portal/horizontalSunMiPortal.js +0 -130
  31. package/dist/pages/Portal/horizontalSunMiPortal.js.map +0 -1
  32. package/dist/pages/Portal/index.js +0 -856
  33. package/dist/pages/Portal/index.js.map +0 -1
  34. package/dist/pages/Portal/index.less +0 -612
  35. package/dist/pages/Portal/verticalPortal.js +0 -126
  36. package/dist/pages/Portal/verticalPortal.js.map +0 -1
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = undefined;
7
7
 
8
- var _stringify = require('babel-runtime/core-js/json/stringify');
9
-
10
- var _stringify2 = _interopRequireDefault(_stringify);
11
-
12
8
  var _assign = require('babel-runtime/core-js/object/assign');
13
9
 
14
10
  var _assign2 = _interopRequireDefault(_assign);
15
11
 
16
- var _regenerator = require('babel-runtime/regenerator');
12
+ var _extends2 = require('babel-runtime/helpers/extends');
17
13
 
18
- var _regenerator2 = _interopRequireDefault(_regenerator);
14
+ var _extends3 = _interopRequireDefault(_extends2);
19
15
 
20
- var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
16
+ var _stringify = require('babel-runtime/core-js/json/stringify');
21
17
 
22
- var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
18
+ var _stringify2 = _interopRequireDefault(_stringify);
23
19
 
24
20
  var _promise = require('babel-runtime/core-js/promise');
25
21
 
26
22
  var _promise2 = _interopRequireDefault(_promise);
27
23
 
28
- var _extends2 = require('babel-runtime/helpers/extends');
24
+ var _regenerator = require('babel-runtime/regenerator');
29
25
 
30
- var _extends3 = _interopRequireDefault(_extends2);
26
+ var _regenerator2 = _interopRequireDefault(_regenerator);
27
+
28
+ var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator');
29
+
30
+ var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
31
31
 
32
32
  var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
33
33
 
@@ -52,7 +52,7 @@ var _inherits3 = _interopRequireDefault(_inherits2);
52
52
  var _class, _class2, _temp; /*
53
53
  * @Description:
54
54
  * @Date: 2019-08-13 08:42:18
55
- * @LastEditTime: 2020-10-22 14:14:18
55
+ * @LastEditTime: 2021-09-27 19:05:04
56
56
  * @LastEditors: chenlongad
57
57
  * @modify:修改跳转到T+的查询方案方式
58
58
  */
@@ -102,6 +102,8 @@ var _horizontalPadPortal2 = _interopRequireDefault(_horizontalPadPortal);
102
102
 
103
103
  require('./index.less');
104
104
 
105
+ var _rxjs = require('rxjs');
106
+
105
107
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
106
108
 
107
109
  var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
@@ -121,6 +123,141 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
121
123
 
122
124
  var _this = (0, _possibleConstructorReturn3.default)(this, (_default.__proto__ || (0, _getPrototypeOf2.default)(_default)).call(this, props));
123
125
 
126
+ _this.catchOfflineData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
127
+ var offlineSys, isLoginAfter, downloadCatcherDay, currentDay, downProgress, result;
128
+ return _regenerator2.default.wrap(function _callee$(_context) {
129
+ while (1) {
130
+ switch (_context.prev = _context.next) {
131
+ case 0:
132
+ offlineSys = _this.context.stores.offlineSys;
133
+ isLoginAfter = _mutantsMicrofx.localStore.get("isLoginAfter");
134
+ downloadCatcherDay = _mutantsMicrofx.localStore.get("downloadCatcherDay");
135
+ currentDay = Math.ceil(new Date() / 1000 / 60 / 60 / 24);
136
+
137
+ if (!(isLoginAfter == 1)) {
138
+ _context.next = 14;
139
+ break;
140
+ }
141
+
142
+ if (!(!downloadCatcherDay || currentDay > downloadCatcherDay)) {
143
+ _context.next = 13;
144
+ break;
145
+ }
146
+
147
+ downProgress = function downProgress(params) {
148
+ _tplusComponentsTouch.Loading.transfer(params);
149
+ };
150
+
151
+ _tplusComponentsTouch.Loading.show({
152
+ text: '离线数据下载中',
153
+ delay: 0,
154
+ showProgress: true
155
+ });
156
+ _context.next = 10;
157
+ return offlineSys.downloadCatcherData(downProgress);
158
+
159
+ case 10:
160
+ result = _context.sent;
161
+
162
+ _tplusComponentsTouch.Loading.hide();
163
+ if (result) {
164
+ _mutantsMicrofx.localStore.set("downloadCatcherDay", currentDay);
165
+ }
166
+
167
+ case 13:
168
+ _mutantsMicrofx.localStore.set("isLoginAfter", 0);
169
+
170
+ case 14:
171
+ case 'end':
172
+ return _context.stop();
173
+ }
174
+ }
175
+ }, _callee, _this2);
176
+ }));
177
+
178
+ _this.getOperation = function () {
179
+ return new _promise2.default(function (resolve, reject) {
180
+ var homeOperation = _ModifyPassApi.Request.homeOperation,
181
+ functionData = _ModifyPassApi.Request.functionData;
182
+
183
+ homeOperation().then(function (operations) {
184
+ _mutantsMicrofx.localStore.set('operationsAuth', (0, _stringify2.default)(operations));
185
+ _this.setState({ operations: operations || [] });
186
+ resolve();
187
+ }).catch(function (err) {
188
+ console.log('homeOperation.error======', err);
189
+ _tplusComponentsTouch.Loading.hide();
190
+ resolve();
191
+ });
192
+ functionData().then(function (data) {
193
+ (0, _tplusPoslogin.PosSetData)(data);
194
+ });
195
+ });
196
+ };
197
+
198
+ _this.initPageData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
199
+ var _this$context, _this$context$stores, stores, _this$context$headHoo, addClass, hasUseOffline;
200
+
201
+ return _regenerator2.default.wrap(function _callee2$(_context2) {
202
+ while (1) {
203
+ switch (_context2.prev = _context2.next) {
204
+ case 0:
205
+ _this$context = _this.context, _this$context$stores = _this$context.stores, stores = _this$context$stores === undefined ? {} : _this$context$stores, _this$context$headHoo = _this$context.headHook;
206
+ _this$context$headHoo = _this$context$headHoo === undefined ? {} : _this$context$headHoo;
207
+ addClass = _this$context$headHoo.addClass;
208
+ hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !(_this.isVerticalTouch || _this.isMobileEnvironment); //是否允许离线
209
+
210
+ if (!(hasUseOffline == true)) {
211
+ _context2.next = 7;
212
+ break;
213
+ }
214
+
215
+ _context2.next = 7;
216
+ return _this.catchOfflineData();
217
+
218
+ case 7:
219
+ _tplusComponentsTouch.Loading.show({
220
+ text: '权限加载中...',
221
+ delay: 2500
222
+ });
223
+ //权限加载
224
+ _context2.prev = 8;
225
+ _context2.next = 11;
226
+ return _this.getOperation();
227
+
228
+ case 11:
229
+ _context2.next = 16;
230
+ break;
231
+
232
+ case 13:
233
+ _context2.prev = 13;
234
+ _context2.t0 = _context2['catch'](8);
235
+ _tplusComponentsTouch.Loading.hide();
236
+
237
+ case 16:
238
+ _tplusComponentsTouch.Loading.hide();
239
+ addClass && addClass(_this.state.id, 'portalHead');
240
+ // 初始化参数设置。
241
+ stores.setStore.initSetParams().then(function (ret) {
242
+ // 在客户端中,如果开启了副屏设置,尝试这打开副屏。
243
+ if (_this.getScreenType() === true) {
244
+ if (_this.isHorizontalSunMi) {
245
+ _this.sunMiPresentationInit(ret);
246
+ return;
247
+ }
248
+ window.open('vicescreen?ts=' + new Date().getTime(), 'screen');
249
+ }
250
+ });
251
+ _this.hsyBasicInfoInit();
252
+
253
+ case 20:
254
+ case 'end':
255
+ return _context2.stop();
256
+ }
257
+ }
258
+ }, _callee2, _this2, [[8, 13]]);
259
+ }));
260
+
124
261
  _this.initHsyPage = function () {
125
262
  var external_frame = document.getElementById('external-frame-cc');
126
263
  var win = external_frame && external_frame.contentWindow;
@@ -137,51 +274,28 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
137
274
  _this.sunMiPresentationInit = function (result) {
138
275
  //SunMi初始化参数设置。
139
276
  //副屏幕交互。硬件改动20200428 需要在商米页面加载成功后才能发送 初始化命令
140
- // 获取是否缓存副屏地址 只在app打开的生命周期缓存 读取 关闭重新缓存
141
- var SunMi_fuping_url = sessionStorage.getItem("SunMi_fuping_url");
142
- // 如果存在缓存地址 使用缓存地址 否则使用新hash地址
143
- if (!SunMi_fuping_url) {
144
- var url = location.origin + location.pathname + '?ts=' + new Date().getTime() + '&vt=3&fuping=3';
145
- window.sunMi_PresentationManager && window.sunMi_PresentationManager.secondScreenLoadUrl(url).then(function () {
146
- _this.FuPingIsLoaded = true;
147
- // 加载副屏页面成功 缓存地址
148
- sessionStorage.setItem("SunMi_fuping_url", url);
149
- setTimeout(function () {
150
- // 进行主副屏数据交互 初始化
151
- var _ref = _mutantsMicrofx.localStore.get('user') || {},
152
- _ref$store = _ref.store;
153
-
154
- _ref$store = _ref$store === undefined ? {} : _ref$store;
155
- var _ref$store$storeName = _ref$store.storeName,
156
- storeName = _ref$store$storeName === undefined ? '' : _ref$store$storeName;
157
-
158
- console.log(result);
159
-
160
- var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
161
- RE_POSParamType = _enumController$getEn.RE_POSParamType;
162
-
163
- var DUAL_SCREEN_SETTING = RE_POSParamType.DUAL_SCREEN_SETTING;
164
-
165
- var filterResult = result && result.filter ? result.filter(function (settingItem) {
166
- return settingItem.ParamType && (settingItem.ParamType.Id === DUAL_SCREEN_SETTING || settingItem.ParamType === DUAL_SCREEN_SETTING);
167
- }) : [];
168
- window.sunMi_PresentationManager && window.sunMi_PresentationManager.sharedPreferencesSet("setting_setData", filterResult).then(function () {
169
- console.log("缓存数据成功");
170
- window.sunMi_PresentationManager && window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 0, storeName: storeName });
171
- });
172
- }, 2000);
173
- });
174
- } else {
175
- // 表示已经加载过页面只需要重置状态即可
176
- var _ref2 = _mutantsMicrofx.localStore.get('user') || {},
177
- _ref2$store = _ref2.store;
277
+ // 进行主副屏数据交互 初始化
278
+ var _ref3 = _mutantsMicrofx.localStore.get('user') || {},
279
+ _ref3$store = _ref3.store;
280
+
281
+ _ref3$store = _ref3$store === undefined ? {} : _ref3$store;
282
+ var _ref3$store$storeName = _ref3$store.storeName,
283
+ storeName = _ref3$store$storeName === undefined ? '' : _ref3$store$storeName;
284
+
285
+ console.log(result);
178
286
 
179
- _ref2$store = _ref2$store === undefined ? {} : _ref2$store;
180
- var _ref2$store$storeName = _ref2$store.storeName,
181
- storeName = _ref2$store$storeName === undefined ? '' : _ref2$store$storeName;
287
+ var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
288
+ RE_POSParamType = _enumController$getEn.RE_POSParamType;
182
289
 
290
+ var DUAL_SCREEN_SETTING = RE_POSParamType.DUAL_SCREEN_SETTING;
291
+
292
+ var filterResult = result && result.filter ? result.filter(function (settingItem) {
293
+ return settingItem.ParamType === DUAL_SCREEN_SETTING;
294
+ }) : [];
295
+ window.sunMi_PresentationManager && window.sunMi_PresentationManager.sharedPreferencesSet("setting_setData", filterResult).then(function () {
296
+ console.log("缓存数据成功");
183
297
  window.sunMi_PresentationManager && window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 0, storeName: storeName });
184
- }
298
+ });
185
299
  };
186
300
 
187
301
  _this.getTcBasicInfoInit = function () {
@@ -210,11 +324,11 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
210
324
 
211
325
  var loginInfo = user.options.get('loginInfo');
212
326
 
213
- var _ref3 = loginInfo || {},
214
- UserCode = _ref3.UserCode,
215
- AccountNum = _ref3.AccountNum,
216
- posCode = _ref3.posCode,
217
- TplusStoreId = _ref3.TplusStoreId;
327
+ var _ref4 = loginInfo || {},
328
+ UserCode = _ref4.UserCode,
329
+ AccountNum = _ref4.AccountNum,
330
+ posCode = _ref4.posCode,
331
+ TplusStoreId = _ref4.TplusStoreId;
218
332
 
219
333
  var uid = _this.tplusEncode(UserCode);
220
334
  var pwd = _this.tplusEncode(user.options.get("password"));
@@ -266,13 +380,16 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
266
380
  return vv.Name === Name;
267
381
  });
268
382
 
269
- var _ref4 = controllable || {},
270
- Visibility = _ref4.Visibility,
271
- HoldFunctionAuth = _ref4.HoldFunctionAuth,
272
- Title = _ref4.Title,
273
- MenuCode = _ref4.MenuCode;
383
+ var _ref5 = controllable || {},
384
+ Visibility = _ref5.Visibility,
385
+ HoldFunctionAuth = _ref5.HoldFunctionAuth,
386
+ Title = _ref5.Title,
387
+ MenuCode = _ref5.MenuCode;
274
388
 
275
389
  var errorTip = void 0;
390
+ if (type == 'more') {
391
+ return _this.setState({ showMoreModal: true });
392
+ }
276
393
  if (!Title) {
277
394
  return _tplusComponentsTouch.ModalWraper.warning({
278
395
  title: '提示',
@@ -284,6 +401,12 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
284
401
  okType: 'primary'
285
402
  });
286
403
  }
404
+
405
+ if (!_mutantsMicrofx.stores.offlineSys.shouldOpenHomeOperation(Name)) {
406
+ _tplusComponentsTouch.Message.warn("离线模式下此操作不可用");
407
+ return;
408
+ }
409
+
287
410
  if (!Visibility) {
288
411
  errorTip = '\u60A8\u7684 ' + Title + ' \u6A21\u5757\u6CA1\u6709\u542F\u7528';
289
412
  } else if (!HoldFunctionAuth) {
@@ -342,18 +465,22 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
342
465
  };
343
466
 
344
467
  _this.toFramePage = function (params) {
345
- var _ref5 = params || {},
346
- app = _ref5.app,
347
- title = _ref5.title,
348
- style = _ref5.style,
349
- search = _ref5.search,
350
- tmenuCode = _ref5.tmenuCode,
351
- MenuCode = _ref5.MenuCode,
352
- isHsyLoadFinish = _ref5.isHsyLoadFinish;
468
+ var _ref6 = params || {},
469
+ app = _ref6.app,
470
+ title = _ref6.title,
471
+ style = _ref6.style,
472
+ search = _ref6.search,
473
+ tmenuCode = _ref6.tmenuCode,
474
+ MenuCode = _ref6.MenuCode,
475
+ isHsyLoadFinish = _ref6.isHsyLoadFinish;
353
476
 
354
477
  switch (app) {
355
478
  case 'cc':
356
479
  var sh = '';
480
+ if (_this.isMobileEnvironment) {
481
+ //暂时不支持android系统跳转
482
+ return _tplusComponentsTouch.Message.warn('新功能正在研发中,敬请期待。');
483
+ }
357
484
  if (!isHsyLoadFinish) {
358
485
  return _tplusComponentsTouch.Message.warn('正在加载资源中,请稍后。');
359
486
  }
@@ -408,37 +535,37 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
408
535
  };
409
536
 
410
537
  _this.toTplusPage = function () {
411
- var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(tmenuCode, search) {
412
- var ret, _ref7, ossjumpUrl, postMessageUrl, dsearchPlanID, portalStore, menu, external_frame_tc, win, loadTcURL;
538
+ var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(tmenuCode, search) {
539
+ var ret, _ref8, ossjumpUrl, postMessageUrl, dsearchPlanID, portalStore, menu, external_frame_tc, win, loadTcURL;
413
540
 
414
- return _regenerator2.default.wrap(function _callee$(_context) {
541
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
415
542
  while (1) {
416
- switch (_context.prev = _context.next) {
543
+ switch (_context3.prev = _context3.next) {
417
544
  case 0:
418
545
  ret = _this.getTcBasicInfoInit();
419
546
 
420
547
  if (!(ret === false)) {
421
- _context.next = 3;
548
+ _context3.next = 3;
422
549
  break;
423
550
  }
424
551
 
425
- return _context.abrupt('return');
552
+ return _context3.abrupt('return');
426
553
 
427
554
  case 3:
428
- _ref7 = ret || {}, ossjumpUrl = _ref7.ossjumpUrl, postMessageUrl = _ref7.postMessageUrl;
555
+ _ref8 = ret || {}, ossjumpUrl = _ref8.ossjumpUrl, postMessageUrl = _ref8.postMessageUrl;
429
556
  dsearchPlanID = '';
430
557
 
431
558
  if (!(search && search.id)) {
432
- _context.next = 10;
559
+ _context3.next = 10;
433
560
  break;
434
561
  }
435
562
 
436
563
  portalStore = _this.context.stores.portalStore;
437
- _context.next = 9;
564
+ _context3.next = 9;
438
565
  return portalStore.getSearchPlanId(search);
439
566
 
440
567
  case 9:
441
- dsearchPlanID = _context.sent;
568
+ dsearchPlanID = _context3.sent;
442
569
 
443
570
  case 10:
444
571
  menu = _this.tplusEncode(tmenuCode);
@@ -447,17 +574,26 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
447
574
  if (dsearchPlanID) {
448
575
  ossjumpUrl += '&searchPlanID=' + _this.tplusEncode(dsearchPlanID);
449
576
  }
450
- //对于专属云、云主机,如果配置的http,存在跨域问题,暂时解决不了,只能通过打开默认浏览器打开。
451
577
 
452
- if (!((postMessageUrl + '').indexOf('https') == -1 && (_this.new_retail_app == 'tczsy' || _this.new_retail_app == 'tcyzj'))) {
453
- _context.next = 16;
578
+ if (!_this.isHorizontalSunMi) {
579
+ _context3.next = 17;
580
+ break;
581
+ }
582
+
583
+ window.android_CommonFun.openWebUrlByOutBrowser(ossjumpUrl);
584
+ _context3.next = 25;
585
+ break;
586
+
587
+ case 17:
588
+ if (!(_this.new_retail_app == 'tc' || _this.new_retail_app == 'tczsy' || _this.new_retail_app == 'tcyzj')) {
589
+ _context3.next = 20;
454
590
  break;
455
591
  }
456
592
 
457
593
  _mutantsMicrofx.nativeMs.useDefaultBrowser(ossjumpUrl);
458
- return _context.abrupt('return');
594
+ return _context3.abrupt('return');
459
595
 
460
- case 16:
596
+ case 20:
461
597
  external_frame_tc = document.getElementById('external-frame-tc');
462
598
  win = external_frame_tc.contentWindow;
463
599
  loadTcURL = _this.state.loadTcURL;
@@ -476,169 +612,190 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
476
612
  }
477
613
  });
478
614
 
479
- case 21:
615
+ case 25:
480
616
  case 'end':
481
- return _context.stop();
617
+ return _context3.stop();
482
618
  }
483
619
  }
484
- }, _callee, _this2);
620
+ }, _callee3, _this2);
485
621
  }));
486
622
 
487
623
  return function (_x2, _x3) {
488
- return _ref6.apply(this, arguments);
624
+ return _ref7.apply(this, arguments);
489
625
  };
490
626
  }();
491
627
 
492
- _this.toHsyPage = function (params) {
493
- var content_only = params.content_only,
494
- bar_bg = params.bar_bg,
495
- bar_active_bg = params.bar_active_bg,
496
- menu = params.menu,
497
- secondRouter = params.secondRouter,
498
- activePrompt = params.activePrompt,
499
- closePrompt = params.closePrompt,
500
- closeable = params.closeable,
501
- leavePrompt = params.leavePrompt,
502
- lock = params.lock,
503
- pageId = params.pageId,
504
- pageParams = params.pageParams,
505
- path = params.path,
506
- tabId = params.tabId,
507
- tabLabel = params.tabLabel,
508
- pageType = params.pageType,
509
- _k = params._k;
510
-
511
-
512
- var filter = {};
513
- //对仓库参数的处理
514
- var IdWarehouse = (0, _tplusPoslogin.PosInitData)('IdWarehouse') || '';
515
- var WarehouseName = (0, _tplusPoslogin.PosInitData)('WarehouseName') || '';
516
- var IsPerformanceDistribution = (0, _tplusPoslogin.PosInitData)('PerformanceDistribution') === 'SHIPPER_STORE' || false;
517
-
518
- var _ref8 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('user') || {},
519
- _ref8$loginInfo = _ref8.loginInfo,
520
- _ref8$loginInfo$IdSto = _ref8$loginInfo.IdStore,
521
- IdStore = _ref8$loginInfo$IdSto === undefined ? '' : _ref8$loginInfo$IdSto,
522
- _ref8$loginInfo$PosId = _ref8$loginInfo.PosId,
523
- PosId = _ref8$loginInfo$PosId === undefined ? '' : _ref8$loginInfo$PosId,
524
- _ref8$store = _ref8.store;
525
-
526
- _ref8$store = _ref8$store === undefined ? {} : _ref8$store;
527
- var _ref8$store$storeName = _ref8$store.storeName,
528
- storeName = _ref8$store$storeName === undefined ? '' : _ref8$store$storeName;
529
-
530
- switch (pageType) {
531
- case 'voucher':
532
- filter = {
533
- defaultValue: {
534
- storeId: {
535
- id: IdStore,
536
- storeName: storeName
537
- },
538
- warehouseId: {
539
- id: IdWarehouse,
540
- name: WarehouseName
541
- }
542
- }
543
- //要货单特殊处理
544
- };if (menu == 'require-goods-new') {
545
- filter = {
546
- defaultValue: {
547
- storeId: {
548
- id: IdStore,
549
- storeName: storeName
550
- },
551
- requireWarehouseId: {
552
- id: IdWarehouse,
553
- name: WarehouseName
554
- }
555
- }
556
- };
557
- }
558
- break;
559
- case 'report':
560
- filter = {
561
- filterValue: {
562
- storeId: {
563
- value: {
564
- id: IdStore,
565
- storeName: storeName
566
- }
567
- },
568
- warehouseId: {
569
- value: [{
570
- id: IdWarehouse,
571
- name: WarehouseName
572
- }]
573
- }
574
- }
575
- // 收银统计表
576
- };if (IsPerformanceDistribution && menu == 'retail-cash-report') {
577
- filter = {
578
- filterValue: {
579
- deliveryStoreId: {
580
- value: {
581
- id: IdStore,
582
- storeName: storeName
628
+ _this.toHsyPage = function () {
629
+ var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(params) {
630
+ var content_only, bar_bg, bar_active_bg, menu, secondRouter, activePrompt, closePrompt, closeable, leavePrompt, lock, pageId, pageParams, path, tabId, tabLabel, pageType, _k, filter, IdWarehouse, WarehouseName, IsPerformanceDistribution, _ref10, _ref10$loginInfo, _ref10$loginInfo$IdSt, IdStore, _ref10$loginInfo$PosI, PosId, _ref10$store, _ref10$store$storeNam, storeName, commonArgs, actionUrl, cc_url, CC_WEB_URL, external_frame, win;
631
+
632
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
633
+ while (1) {
634
+ switch (_context4.prev = _context4.next) {
635
+ case 0:
636
+ content_only = params.content_only, bar_bg = params.bar_bg, bar_active_bg = params.bar_active_bg, menu = params.menu, secondRouter = params.secondRouter, activePrompt = params.activePrompt, closePrompt = params.closePrompt, closeable = params.closeable, leavePrompt = params.leavePrompt, lock = params.lock, pageId = params.pageId, pageParams = params.pageParams, path = params.path, tabId = params.tabId, tabLabel = params.tabLabel, pageType = params.pageType, _k = params._k;
637
+ filter = {};
638
+ //对仓库参数的处理
639
+
640
+ IdWarehouse = (0, _tplusPoslogin.PosInitData)('IdWarehouse') || '';
641
+ WarehouseName = (0, _tplusPoslogin.PosInitData)('WarehouseName') || '';
642
+ IsPerformanceDistribution = (0, _tplusPoslogin.PosInitData)('PerformanceDistribution') === 'SHIPPER_STORE' || false;
643
+ _ref10 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('user') || {}, _ref10$loginInfo = _ref10.loginInfo, _ref10$loginInfo$IdSt = _ref10$loginInfo.IdStore, IdStore = _ref10$loginInfo$IdSt === undefined ? '' : _ref10$loginInfo$IdSt, _ref10$loginInfo$PosI = _ref10$loginInfo.PosId, PosId = _ref10$loginInfo$PosI === undefined ? '' : _ref10$loginInfo$PosI, _ref10$store = _ref10.store;
644
+ _ref10$store = _ref10$store === undefined ? {} : _ref10$store;
645
+ _ref10$store$storeNam = _ref10$store.storeName, storeName = _ref10$store$storeNam === undefined ? '' : _ref10$store$storeNam;
646
+ _context4.t0 = pageType;
647
+ _context4.next = _context4.t0 === 'voucher' ? 11 : _context4.t0 === 'report' ? 14 : 18;
648
+ break;
649
+
650
+ case 11:
651
+ filter = {
652
+ defaultValue: {
653
+ storeId: {
654
+ id: IdStore,
655
+ storeName: storeName
656
+ },
657
+ warehouseId: {
658
+ id: IdWarehouse,
659
+ name: WarehouseName
660
+ }
583
661
  }
584
- },
585
- warehouseId: {
586
- value: [{
587
- id: IdWarehouse,
588
- name: WarehouseName
589
- }]
662
+ //要货单特殊处理
663
+ };if (menu == 'require-goods-new') {
664
+ filter = {
665
+ defaultValue: {
666
+ storeId: {
667
+ id: IdStore,
668
+ storeName: storeName
669
+ },
670
+ requireWarehouseId: {
671
+ id: IdWarehouse,
672
+ name: WarehouseName
673
+ }
674
+ }
675
+ };
590
676
  }
591
- }
592
- };
593
- }
594
- // 售后、配送
595
- if (menu == 'return-order' || menu == 'order-manage') {
596
- filter = {
597
- filterValue: {
598
- storeId: {
599
- value: {
600
- id: IdStore,
601
- storeName: storeName
677
+ return _context4.abrupt('break', 18);
678
+
679
+ case 14:
680
+ filter = {
681
+ filterValue: {
682
+ storeId: {
683
+ value: {
684
+ id: IdStore,
685
+ storeName: storeName
686
+ }
687
+ },
688
+ warehouseId: {
689
+ value: [{
690
+ id: IdWarehouse,
691
+ name: WarehouseName
692
+ }]
693
+ }
602
694
  }
603
- },
604
- deliveryWarehouseId: {
605
- value: [{
606
- id: IdWarehouse,
607
- name: WarehouseName
608
- }]
695
+ // 收银统计表
696
+ };if (IsPerformanceDistribution && menu == 'retail-cash-report') {
697
+ filter = {
698
+ filterValue: {
699
+ deliveryStoreId: {
700
+ value: {
701
+ id: IdStore,
702
+ storeName: storeName
703
+ }
704
+ },
705
+ warehouseId: {
706
+ value: [{
707
+ id: IdWarehouse,
708
+ name: WarehouseName
709
+ }]
710
+ }
711
+ }
712
+ };
609
713
  }
610
- }
611
- };
714
+ // 售后、配送
715
+ if (menu == 'return-order' || menu == 'order-manage') {
716
+ filter = {
717
+ filterValue: {
718
+ storeId: {
719
+ value: {
720
+ id: IdStore,
721
+ storeName: storeName
722
+ }
723
+ },
724
+ deliveryWarehouseId: {
725
+ value: [{
726
+ id: IdWarehouse,
727
+ name: WarehouseName
728
+ }]
729
+ }
730
+ }
731
+ };
732
+ }
733
+ return _context4.abrupt('break', 18);
734
+
735
+ case 18:
736
+ bar_bg = encodeURIComponent(bar_bg);
737
+ bar_active_bg = encodeURIComponent(bar_active_bg);
738
+ menu = secondRouter ? menu + '/' + _this.randomWord(true, 13) : menu;
739
+ pageId = menu;
740
+ pageParams = (0, _assign2.default)(pageParams, filter);
741
+ path = encodeURIComponent(path);
742
+ _k = _this.randomWord(false, 6);
743
+
744
+ commonArgs = '?posid=' + PosId + '&content_only=' + content_only + '&bar_bg=' + bar_bg + '&bar_active_bg=' + bar_active_bg;
745
+ actionUrl = '#/' + menu + '?activePrompt=' + activePrompt + '&closePrompt=' + closePrompt + '&closeable=' + closeable + '&leavePrompt=' + leavePrompt + '&lock=' + lock + '&pageId=' + pageId + '&pageParams=' + encodeURIComponent((0, _stringify2.default)(pageParams)) + '&path=' + path + '&tabId=' + tabId + '&tabLabel=' + encodeURIComponent(tabLabel) + '&_k=' + _k;
746
+ cc_url = _this.hsy_domain.replace('#/', '') + commonArgs + actionUrl;
747
+
748
+ console.log('web_hsy_url:', cc_url);
749
+
750
+ if (!_this.isHorizontalSunMi) {
751
+ _context4.next = 37;
752
+ break;
753
+ }
754
+
755
+ _context4.next = 32;
756
+ return _tplusApi.User.getLoginCCMidWebUrl(cc_url);
757
+
758
+ case 32:
759
+ CC_WEB_URL = _context4.sent;
760
+
761
+ console.log('CC_WEB_URL:', CC_WEB_URL);
762
+ window.android_CommonFun.openWebUrlByOutBrowser(CC_WEB_URL);
763
+ _context4.next = 42;
764
+ break;
765
+
766
+ case 37:
767
+ external_frame = document.getElementById('external-frame-cc');
768
+ win = external_frame.contentWindow;
769
+
770
+ win && win.HsyRouterJump && win.HsyRouterJump(pageId, pageParams, { closeable: closeable, tabLabel: tabLabel });
771
+ if (_this.state.showMoreModal === true) {
772
+ _this.setState({ loadHsyPage: true, showMoreModal: false });
773
+ } else {
774
+ _this.setState({ loadHsyPage: true });
775
+ }
776
+ rx$.changeHsy.next({
777
+ back: true, fn: function fn() {
778
+ _this.setState({ loadHsyPage: false });
779
+ rx$.changeHsy.next({ back: false });
780
+ // 在打开页签之前,关闭之前的。
781
+ var external_frame_a = document.getElementById('external-frame-cc');
782
+ var wins = external_frame_a.contentWindow;
783
+ wins && wins.HsyRouterClean && win.HsyRouterClean();
784
+ }
785
+ });
786
+
787
+ case 42:
788
+ case 'end':
789
+ return _context4.stop();
790
+ }
612
791
  }
613
- break;
614
- }
615
- bar_bg = encodeURIComponent(bar_bg);
616
- bar_active_bg = encodeURIComponent(bar_active_bg);
617
- menu = secondRouter ? menu + '/' + _this.randomWord(true, 13) : menu;
618
- pageId = menu;
619
- pageParams = (0, _assign2.default)(pageParams, filter);
620
- path = encodeURIComponent(path);
621
- _k = _this.randomWord(false, 6);
622
-
623
- var commonArgs = '?posid=' + PosId + '&content_only=' + content_only + '&bar_bg=' + bar_bg + '&bar_active_bg=' + bar_active_bg;
624
- var actionUrl = '#/' + menu + '?activePrompt=' + activePrompt + '&closePrompt=' + closePrompt + '&closeable=' + closeable + '&leavePrompt=' + leavePrompt + '&lock=' + lock + '&pageId=' + pageId + '&pageParams=' + encodeURIComponent((0, _stringify2.default)(pageParams)) + '&path=' + path + '&tabId=' + tabId + '&tabLabel=' + encodeURIComponent(tabLabel) + '&_k=' + _k;
625
- var cc_url = _this.hsy_domain.replace('#/', '') + commonArgs + actionUrl;
626
- console.log('web_hsy_url:', cc_url);
627
- var external_frame = document.getElementById('external-frame-cc');
628
- var win = external_frame.contentWindow;
629
- win && win.HsyRouterJump && win.HsyRouterJump(pageId, pageParams, { closeable: closeable, tabLabel: tabLabel });
630
- _this.setState({ loadHsyPage: true });
631
- rx$.changeHsy.next({
632
- back: true, fn: function fn() {
633
- _this.setState({ loadHsyPage: false });
634
- rx$.changeHsy.next({ back: false });
635
- // 在打开页签之前,关闭之前的。
636
- var external_frame_a = document.getElementById('external-frame-cc');
637
- var wins = external_frame_a.contentWindow;
638
- wins && wins.HsyRouterClean && win.HsyRouterClean();
639
- }
640
- });
641
- };
792
+ }, _callee4, _this2);
793
+ }));
794
+
795
+ return function (_x4) {
796
+ return _ref9.apply(this, arguments);
797
+ };
798
+ }();
642
799
 
643
800
  _this.randomWord = function (only, digits) {
644
801
  var str = "";
@@ -656,6 +813,10 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
656
813
  _this.setState({ showModal: false });
657
814
  };
658
815
 
816
+ _this.closeMoreModal = function () {
817
+ _this.setState({ showMoreModal: false });
818
+ };
819
+
659
820
  _this.tplusEncode = function (code) {
660
821
  var c = String.fromCharCode(code.charCodeAt(0) + code.length);
661
822
  for (var i = 1; i < code.length; i++) {
@@ -726,10 +887,10 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
726
887
  return vv.Name === v.Name;
727
888
  });
728
889
 
729
- var _ref9 = controllable || {},
730
- Visibility = _ref9.Visibility,
731
- HoldFunctionAuth = _ref9.HoldFunctionAuth,
732
- Title = _ref9.Title;
890
+ var _ref11 = controllable || {},
891
+ Visibility = _ref11.Visibility,
892
+ HoldFunctionAuth = _ref11.HoldFunctionAuth,
893
+ Title = _ref11.Title;
733
894
 
734
895
  var errorTip = void 0;
735
896
  if (!Visibility) {
@@ -927,11 +1088,43 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
927
1088
  return node;
928
1089
  };
929
1090
 
1091
+ _this.createMoreNode = function () {
1092
+ var arrs = _this.centerRightMenu.find(function (v) {
1093
+ return v.sub && v.sub.find(function (vv) {
1094
+ return vv.key == 'more';
1095
+ });
1096
+ }).sub[1];
1097
+ var items = _this.new_retail_app == 'cc' ? arrs.sub_cc : _this.new_retail_app == 'tc' || _this.new_retail_app == 'tczsy' || _this.new_retail_app == 'tcyzj' ? arrs.sub_tc : [];
1098
+ var node = items.length > 0 && items.map(function (v) {
1099
+ return _react2.default.createElement(
1100
+ 'div',
1101
+ {
1102
+ className: 'modal-quick ' + v.className,
1103
+ style: v.style,
1104
+ key: v.className,
1105
+ onClick: _this.handelClick.bind(_this, v)
1106
+ },
1107
+ !!v.icon && _react2.default.createElement(
1108
+ 'div',
1109
+ { className: 'quick' },
1110
+ _react2.default.createElement(_tplusComponentsTouch.Ticon, { icon: v.icon })
1111
+ ),
1112
+ !!v.title && _react2.default.createElement(
1113
+ 'h1',
1114
+ null,
1115
+ v.title
1116
+ )
1117
+ );
1118
+ });
1119
+ return node;
1120
+ };
1121
+
930
1122
  _this.hasElectron = hasElectron;
931
1123
  _this.state = {
932
1124
  id: Date.now(),
933
1125
  operations: [],
934
1126
  showModal: false,
1127
+ showMoreModal: false,
935
1128
  loadHsyPage: false,
936
1129
  loadHsyURL: '',
937
1130
  isHsyLoadFinish: false,
@@ -940,12 +1133,12 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
940
1133
  modalURL: ''
941
1134
  };
942
1135
 
943
- var _ref10 = _mutantsUtil.platform || {},
944
- isVerticalTouch = _ref10.isVerticalTouch,
945
- isHorizontalPad = _ref10.isHorizontalPad,
946
- isHorizontalSunMi = _ref10.isHorizontalSunMi,
947
- isNewRetailBCPos = _ref10.isNewRetailBCPos,
948
- isNewRetailBCPosTC = _ref10.isNewRetailBCPosTC;
1136
+ var _ref12 = _mutantsUtil.platform || {},
1137
+ isVerticalTouch = _ref12.isVerticalTouch,
1138
+ isHorizontalPad = _ref12.isHorizontalPad,
1139
+ isHorizontalSunMi = _ref12.isHorizontalSunMi,
1140
+ isNewRetailBCPos = _ref12.isNewRetailBCPos,
1141
+ isNewRetailBCPosTC = _ref12.isNewRetailBCPosTC;
949
1142
 
950
1143
  _this.isVerticalTouch = !!isVerticalTouch;
951
1144
  _this.isHorizontalPad = !!isHorizontalPad;
@@ -977,54 +1170,10 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
977
1170
  }
978
1171
 
979
1172
  (0, _createClass3.default)(_default, [{
980
- key: 'componentWillMount',
981
- value: function componentWillMount() {
982
- var _this3 = this;
983
-
984
- var _context2 = this.context,
985
- _context2$stores = _context2.stores;
986
- _context2$stores = _context2$stores === undefined ? {} : _context2$stores;
987
- var portalStore = _context2$stores.portalStore,
988
- _context2$headHook = _context2.headHook;
989
- _context2$headHook = _context2$headHook === undefined ? {} : _context2$headHook;
990
- var addClass = _context2$headHook.addClass;
991
- var homeOperation = _ModifyPassApi.Request.homeOperation,
992
- functionData = _ModifyPassApi.Request.functionData;
993
-
994
- _tplusComponentsTouch.Loading.show({
995
- text: '首页权限加载中...',
996
- delay: 2500
997
- });
998
- homeOperation().then(function (operations) {
999
- _mutantsMicrofx.localStore.set('operationsAuth', operations ? (0, _stringify2.default)(operations) : []);
1000
- _this3.setState({ operations: operations || [] });
1001
- _tplusComponentsTouch.Loading.hide();
1002
- }).catch(function (err) {
1003
- console.log('homeOperation.error======', err);
1004
- _tplusComponentsTouch.Loading.hide();
1005
- });
1006
- functionData().then(function (data) {
1007
- // 加载权限数据 DR-29735 by majian
1008
- (0, _tplusPoslogin.PosSetData)(data);
1009
- });
1010
- addClass && addClass(this.state.id, 'portalHead');
1011
- // 初始化参数设置。
1012
- _mutantsMicrofx.stores.setStore.initSetParams().then(function (ret) {
1013
- // 在客户端中,如果开启了副屏设置,尝试这打开副屏。
1014
- if (_this3.getScreenType() === true) {
1015
- if (_this3.isHorizontalSunMi) {
1016
- _this3.sunMiPresentationInit(ret);
1017
- return;
1018
- }
1019
- window.open('vicescreen?ts=' + new Date().getTime(), 'screen');
1020
- }
1021
- });
1022
- this.hsyBasicInfoInit();
1023
- }
1024
- }, {
1025
1173
  key: 'componentDidMount',
1026
1174
  value: function componentDidMount() {
1027
- if (this.isNewRetailBCPos && !this.isVerticalTouch && !this.isHorizontalPad) {
1175
+ this.initPageData();
1176
+ if (this.isNewRetailBCPos && !this.isVerticalTouch && !this.isMobileEnvironment) {
1028
1177
  this.initHsyPage();
1029
1178
  }
1030
1179
  }
@@ -1057,9 +1206,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1057
1206
  break;
1058
1207
  }
1059
1208
 
1060
- var _ref11 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('StoreKey') || {},
1061
- _ref11$PosId = _ref11.PosId,
1062
- PosId = _ref11$PosId === undefined ? '' : _ref11$PosId;
1209
+ var _ref13 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('StoreKey') || {},
1210
+ _ref13$PosId = _ref13.PosId,
1211
+ PosId = _ref13$PosId === undefined ? '' : _ref13$PosId;
1063
1212
 
1064
1213
  var cc_url = this.hsy_domain.replace('#/', '') + '?fromApp=nretail&posid=' + PosId + '&content_only=true&bar_bg=' + encodeURIComponent('#FFFFFF') + '&bar_active_bg=' + encodeURIComponent(color);
1065
1214
  this.setState({ loadHsyURL: cc_url });
@@ -1109,6 +1258,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1109
1258
  value: function render() {
1110
1259
  var _state = this.state,
1111
1260
  showModal = _state.showModal,
1261
+ showMoreModal = _state.showMoreModal,
1112
1262
  modalURL = _state.modalURL,
1113
1263
  loadHsyPage = _state.loadHsyPage,
1114
1264
  loadHsyURL = _state.loadHsyURL,
@@ -1172,13 +1322,30 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1172
1322
  ),
1173
1323
  this.isMobileEnvironment && _react2.default.createElement(
1174
1324
  _antd.Modal,
1175
- { visible: showModal,
1325
+ {
1326
+ visible: showModal,
1176
1327
  onCancel: this.closeFrameModal,
1177
1328
  width: '99%',
1178
1329
  height: '99%',
1179
1330
  footer: null
1180
1331
  },
1181
1332
  _react2.default.createElement('iframe', { src: modalURL, width: '100%', height: screenHeight, frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true' })
1333
+ ),
1334
+ _react2.default.createElement(
1335
+ _antd.Modal,
1336
+ {
1337
+ title: '更多',
1338
+ className: 'portal-container-modal-more',
1339
+ visible: showMoreModal,
1340
+ onCancel: this.closeMoreModal,
1341
+ width: 800,
1342
+ height: 375,
1343
+ footer: null,
1344
+ centered: true,
1345
+ maskClosable: false,
1346
+ keyboard: false
1347
+ },
1348
+ this.createMoreNode()
1182
1349
  )
1183
1350
  );
1184
1351
  }