tplus-portaltouch 3.43.2 → 3.44.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.
Files changed (68) hide show
  1. package/dist/api/ModifyPassApi.js.map +1 -1
  2. package/dist/components/dutyandsettle/dutysettlebill.js +55 -81
  3. package/dist/components/dutyandsettle/dutysettlebill.js.map +1 -1
  4. package/dist/components/dutyandsettle/dutysettlehistory.js +9 -8
  5. package/dist/components/dutyandsettle/dutysettlehistory.js.map +1 -1
  6. package/dist/components/dutyandsettle/index.js.map +1 -1
  7. package/dist/components/dutyandsettle/tipContent.js.map +1 -1
  8. package/dist/components/header/customUse.js.map +1 -1
  9. package/dist/components/header/headContent.js.map +1 -1
  10. package/dist/components/header/index.js +13 -13
  11. package/dist/components/header/index.js.map +1 -1
  12. package/dist/components/header/offlinePointDesc.js.map +1 -1
  13. package/dist/components/header/style.less +457 -456
  14. package/dist/components/header/themeModal.js.map +1 -1
  15. package/dist/components/header/uploadList.js +6 -6
  16. package/dist/components/header/uploadList.js.map +1 -1
  17. package/dist/components/header/vertical-touch.js.map +1 -1
  18. package/dist/components/header/vertical-touch.less +228 -228
  19. package/dist/containers/Main/index.js +7 -4
  20. package/dist/containers/Main/index.js.map +1 -1
  21. package/dist/dutyService/index.js.map +1 -1
  22. package/dist/index.js.map +1 -1
  23. package/dist/middleWare/index.js.map +1 -1
  24. package/dist/modalRouter/StaticRouter.js.map +1 -1
  25. package/dist/modalRouter/index.js +8 -8
  26. package/dist/modalRouter/index.js.map +1 -1
  27. package/dist/pages/Modal/index.js.map +1 -1
  28. package/dist/pages/Modal/style.less +5 -5
  29. package/dist/pages/Portalbc/data.js +5 -5
  30. package/dist/pages/Portalbc/data.js.map +1 -1
  31. package/dist/pages/Portalbc/horizontalPadPortal.js.map +1 -1
  32. package/dist/pages/Portalbc/horizontalSunMiPortal.js.map +1 -1
  33. package/dist/pages/Portalbc/index.js +51 -75
  34. package/dist/pages/Portalbc/index.js.map +1 -1
  35. package/dist/pages/Portalbc/index.less +822 -821
  36. package/dist/pages/Portalbc/onframe.js.map +1 -1
  37. package/dist/pages/Portalbc/verticalPortal.js.map +1 -1
  38. package/dist/pages/dutyandsettle/AuthProcess.js.map +1 -1
  39. package/dist/pages/dutyandsettle/index.js.map +1 -1
  40. package/dist/pages/dutyandsettle/index.less +529 -529
  41. package/dist/pages/dutyandsettle/offDuty.js +7 -7
  42. package/dist/pages/dutyandsettle/offDuty.js.map +1 -1
  43. package/dist/pages/dutyandsettle/onDialy.js.map +1 -1
  44. package/dist/pages/dutyandsettle/onDuty.js.map +1 -1
  45. package/dist/pages/dutyandsettle/onUnDaily.js.map +1 -1
  46. package/dist/pages/dutyandsettle/settleDialy.js.map +1 -1
  47. package/dist/pages/index.js.map +1 -1
  48. package/dist/pages/modifyPass/index.js.map +1 -1
  49. package/dist/pages/modifyPass/style.less +71 -71
  50. package/dist/pages/notFound/index.js.map +1 -1
  51. package/dist/pages/notFound/style.less +17 -17
  52. package/dist/stores/IframeStore.js +140 -0
  53. package/dist/stores/IframeStore.js.map +1 -0
  54. package/dist/stores/ModalRouter.js.map +1 -1
  55. package/dist/stores/ModifyPassStore.js.map +1 -1
  56. package/dist/stores/PortalStore.js +5 -5
  57. package/dist/stores/PortalStore.js.map +1 -1
  58. package/dist/stores/PosLoginStore.js.map +1 -1
  59. package/dist/stores/billHistoryStore.js.map +1 -1
  60. package/dist/stores/dutySettleStore.js.map +1 -1
  61. package/dist/stores/index.js +6 -1
  62. package/dist/stores/index.js.map +1 -1
  63. package/dist/utils/PrintProcess.js +10 -10
  64. package/dist/utils/PrintProcess.js.map +1 -1
  65. package/dist/utils/index.js.map +1 -1
  66. package/dist/utils/networkCheck.js.map +1 -1
  67. package/package.json +36 -36
  68. package/tsconfig.json +14 -14
@@ -49,12 +49,12 @@ var _inherits2 = require('babel-runtime/helpers/inherits');
49
49
 
50
50
  var _inherits3 = _interopRequireDefault(_inherits2);
51
51
 
52
- var _class, _class2, _temp; /*
53
- * @Description:
54
- * @Date: 2019-08-13 08:42:18
55
- * @LastEditTime: 2022-02-25 14:49:22
56
- * @LastEditors: chenlongad
57
- * @modify:修改跳转到T+的查询方案方式
52
+ var _class, _class2, _temp; /*
53
+ * @Description:
54
+ * @Date: 2019-08-13 08:42:18
55
+ * @LastEditTime: 2022-02-25 14:49:22
56
+ * @LastEditors: chenlongad
57
+ * @modify:修改跳转到T+的查询方案方式
58
58
  */
59
59
 
60
60
 
@@ -107,9 +107,12 @@ var _rxjs = require('rxjs');
107
107
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
108
108
 
109
109
  var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
110
- var Content = _tplusComponentsTouch.Layout.Content;
110
+ var Content = _tplusComponentsTouch.Layout.Content,
111
+ Footer = _tplusComponentsTouch.Layout.Footer;
111
112
 
113
+ var tplusWindow = null;
112
114
  var HTTP_PROXY_URL = 'http://tfproxy.chanjet.com/?url=';
115
+ var CC_FRAME_CONF = { id: 'external-frame-cc', identOnly: '_pos_web_', initConnect: 'initConnect', HsyLoadFinish: 'HsyLoadFinish', HsyRouterClean: 'HsyRouterClean', HsyRouterJump: 'HsyRouterJump' };
113
116
 
114
117
  var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_Component) {
115
118
  (0, _inherits3.default)(_default, _Component);
@@ -218,7 +221,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
218
221
  _this$context = _this.context, _this$context$stores = _this$context.stores, stores = _this$context$stores === undefined ? {} : _this$context$stores, _this$context$headHoo = _this$context.headHook;
219
222
  _this$context$headHoo = _this$context$headHoo === undefined ? {} : _this$context$headHoo;
220
223
  addClass = _this$context$headHoo.addClass;
221
- hasUseOffline = _this.isOfflineCash === "1" && !(_this.isVerticalTouch || _this.isMobileEnvironment); //是否允许离线
224
+ hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !(_this.isVerticalTouch || _this.isMobileEnvironment); //是否允许离线
222
225
  // const hasUseOffline = true;
223
226
 
224
227
  if (!(hasUseOffline == true)) {
@@ -282,19 +285,6 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
282
285
  }, _callee2, _this2, [[8, 13, 16, 19]]);
283
286
  }));
284
287
 
285
- _this.initHsyPage = function () {
286
- var external_frame = document.getElementById('external-frame-cc');
287
- var win = external_frame && external_frame.contentWindow;
288
- var timer = setTimeout(function () {
289
- _this.setState({ isHsyLoadFinish: true });
290
- }, 15000);
291
- if (!win) return;
292
- win.HsyLoadFinish = function () {
293
- clearTimeout(timer);
294
- _this.setState({ isHsyLoadFinish: true });
295
- };
296
- };
297
-
298
288
  _this.sunMiPresentationInit = function (result) {
299
289
  //SunMi初始化参数设置。
300
290
  //副屏幕交互。硬件改动20200428 需要在商米页面加载成功后才能发送 初始化命令
@@ -322,7 +312,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
322
312
  _this.getTcBasicInfoInit = function () {
323
313
  var userStore = _tplusApi.User.restore();
324
314
  var sid = userStore.sid;
325
- var tplusUrl = _this.tplusSiteUrl;
315
+ var tplusUrl = (0, _tplusPoslogin.PosInitData)("TplusSite") || (0, _tplusPoslogin.PosInitData)("tplusinnersite");
326
316
  if (!tplusUrl) {
327
317
  var msg = "请用admin登录,在服务器配置–地址配置处,设置“内部或外部网络访问T+服务器的地址”!";
328
318
  _tplusComponentsTouch.ModalWraper.warning({
@@ -409,29 +399,17 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
409
399
 
410
400
  var errorTip = void 0;
411
401
 
412
- // 离线模式
413
402
  if (!_mutantsMicrofx.stores.offlineSys.shouldOpenHomeOperation(Name)) {
414
- _tplusComponentsTouch.Message.warn("离线模式下此操作不可用", { duration: 3 });
415
- return;
416
- }
417
-
418
- // 会员拉新
419
- if (type == 'memberRecruitment' && (_this.isEnablePromotion == false || _this.isEnableMember == false)) {
420
- _tplusComponentsTouch.Message.warn("您还未开通会员/促销管理,请立即开通", { duration: 3 });
403
+ _tplusComponentsTouch.Message.warn("离线模式下此操作不可用");
421
404
  return;
422
405
  }
423
406
 
424
- // 会员消费查询
425
- if (type == 'memberConsumDetail' && _this.isEnableMember == false) {
426
- _tplusComponentsTouch.Message.warn("您还未开通会员管理,请立即开通", { duration: 3 });
427
- return;
428
- }
429
-
430
- // 更多
431
407
  if (type == 'more') {
408
+ // if (this.isMobileEnvironment) { //暂时不支持android系统跳转
409
+ // return Message.warn('新功能正在研发中,敬请期待。');
410
+ // }
432
411
  return _this.setState({ showMoreModal: true });
433
412
  }
434
-
435
413
  if (!Title) {
436
414
  return _tplusComponentsTouch.ModalWraper.warning({
437
415
  title: '提示',
@@ -663,7 +641,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
663
641
 
664
642
  _this.toHsyPage = function () {
665
643
  var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(params) {
666
- 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$IdStore, IdStore, _ref10$PosId, PosId, _ref11, _ref11$storeName, storeName, commonArgs, actionUrl, cc_url, CC_WEB_URL, external_frame, win;
644
+ 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$IdStore, IdStore, _ref10$PosId, PosId, _ref11, _ref11$storeName, storeName, commonArgs, actionUrl, cc_url, CC_WEB_URL;
667
645
 
668
646
  return _regenerator2.default.wrap(function _callee4$(_context4) {
669
647
  while (1) {
@@ -673,9 +651,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
673
651
  filter = {};
674
652
  //对仓库参数的处理
675
653
 
676
- IdWarehouse = _this.idWarehouse;
677
- WarehouseName = _this.warehouseName;
678
- IsPerformanceDistribution = _this.performanceDistribution === 'SHIPPER_STORE' || false;
654
+ IdWarehouse = (0, _tplusPoslogin.PosInitData)('IdWarehouse') || '';
655
+ WarehouseName = (0, _tplusPoslogin.PosInitData)('WarehouseName') || '';
656
+ IsPerformanceDistribution = (0, _tplusPoslogin.PosInitData)('PerformanceDistribution') === 'SHIPPER_STORE' || false;
679
657
  _ref10 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {}, _ref10$IdStore = _ref10.IdStore, IdStore = _ref10$IdStore === undefined ? '' : _ref10$IdStore, _ref10$PosId = _ref10.PosId, PosId = _ref10$PosId === undefined ? '' : _ref10$PosId;
680
658
  _ref11 = _mutantsMicrofx.stores.user.options.get('store') || {}, _ref11$storeName = _ref11.storeName, storeName = _ref11$storeName === undefined ? '' : _ref11$storeName;
681
659
  _context4.t0 = pageType;
@@ -801,14 +779,12 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
801
779
 
802
780
  console.log('CC_WEB_URL:', CC_WEB_URL);
803
781
  window.android_CommonFun.openWebUrlByOutBrowser(CC_WEB_URL);
804
- _context4.next = 42;
782
+ _context4.next = 40;
805
783
  break;
806
784
 
807
785
  case 37:
808
- external_frame = document.getElementById('external-frame-cc');
809
- win = external_frame.contentWindow;
810
-
811
- win && win.HsyRouterJump && win.HsyRouterJump(pageId, pageParams, { closeable: closeable, tabLabel: tabLabel });
786
+ // this.ccFrameWin && this.ccFrameWin.HsyRouterJump && this.ccFrameWin.HsyRouterJump(pageId, pageParams, { closeable, tabLabel });
787
+ _this.ccFrameStore && _this.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterJump, pageId: pageId, pageParams: pageParams, extStateParams: { closeable: closeable, tabLabel: tabLabel }, _ident_only_: CC_FRAME_CONF.identOnly });
812
788
  if (_this.state.showMoreModal === true) {
813
789
  _this.setState({ loadHsyPage: true, showMoreModal: false });
814
790
  } else {
@@ -818,14 +794,13 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
818
794
  back: true, fn: function fn() {
819
795
  _this.setState({ loadHsyPage: false });
820
796
  rx$.changeHsy.next({ back: false });
821
- // 在打开页签之前,关闭之前的。
822
- var external_frame_a = document.getElementById('external-frame-cc');
823
- var wins = external_frame_a.contentWindow;
824
- wins && wins.HsyRouterClean && win.HsyRouterClean();
797
+ // 在打开页签之前,关闭之前的,返回键的回调函数
798
+ // this.ccFrameWin && this.ccFrameWin.HsyRouterClean && this.ccFrameWin.HsyRouterClean();
799
+ _this.ccFrameStore && _this.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterClean, _ident_only_: CC_FRAME_CONF.identOnly });
825
800
  }
826
801
  });
827
802
 
828
- case 42:
803
+ case 40:
829
804
  case 'end':
830
805
  return _context4.stop();
831
806
  }
@@ -953,8 +928,8 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
953
928
  { xl: width, md: width, className: 'portal-left-col', key: 'left' },
954
929
  _react2.default.createElement('div', { className: 'portal-left-content' })
955
930
  );
931
+ // return null;
956
932
  }
957
-
958
933
  var menuNode = menu.map(function (v) {
959
934
  return v.container ? _react2.default.createElement(
960
935
  'div',
@@ -962,7 +937,8 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
962
937
  v.sub.map(function (vv) {
963
938
  var item = vv;
964
939
  if (vv.maybe === true) {
965
- item = _this.showStorePrice ? vv : vv.second;
940
+ var status = !!(0, _tplusPoslogin.PosInitData)('ShowStorePrice');
941
+ item = status ? vv : vv.second;
966
942
  }
967
943
  return _react2.default.createElement(
968
944
  'div',
@@ -1223,7 +1199,6 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1223
1199
  isVerticalTouch = _ref13.isVerticalTouch,
1224
1200
  isHorizontalPad = _ref13.isHorizontalPad,
1225
1201
  isHorizontalSunMi = _ref13.isHorizontalSunMi,
1226
- isNewRetailBCPos = _ref13.isNewRetailBCPos,
1227
1202
  isNewRetailBCPosTC = _ref13.isNewRetailBCPosTC;
1228
1203
 
1229
1204
  _this.isVerticalTouch = !!isVerticalTouch;
@@ -1231,26 +1206,16 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1231
1206
  _this.isHorizontalSunMi = !!isHorizontalSunMi;
1232
1207
  _this.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
1233
1208
  _this.FuPingIsLoaded = false;
1234
- _this.isNewRetailBCPos = !!isNewRetailBCPos;
1235
1209
  _this.isNewRetailBCPosTC = !!isNewRetailBCPosTC;
1236
1210
  _this.new_retail_app = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('newRetailAppType');
1237
-
1238
- //获取初始化参数
1239
- _this.isEnableMember = !!(0, _tplusPoslogin.PosInitData)('isEnableMember'); //是否开启会员
1240
- _this.isEnablePromotion = !!(0, _tplusPoslogin.PosInitData)('isEnablePromotion'); //是否开启促销
1241
- _this.isOfflineCash = (0, _tplusPoslogin.PosInitData)('IsOfflineCash');
1242
- _this.tplusSiteUrl = (0, _tplusPoslogin.PosInitData)("TplusSite") || (0, _tplusPoslogin.PosInitData)("tplusinnersite");
1243
- _this.idWarehouse = (0, _tplusPoslogin.PosInitData)('IdWarehouse') || '';
1244
- _this.warehouseName = (0, _tplusPoslogin.PosInitData)('WarehouseName') || '';
1245
- _this.performanceDistribution = (0, _tplusPoslogin.PosInitData)('PerformanceDistribution');
1246
- _this.showStorePrice = (0, _tplusPoslogin.PosInitData)('ShowStorePrice');
1247
-
1211
+ _this.hsy_domain = _tplusApi.User && _tplusApi.User.getWebEntry();
1212
+ // 是否嵌套好生意的iframe
1213
+ _this.isHsyIframeInclude = !_this.isVerticalTouch && !_this.isMobileEnvironment;
1248
1214
  //首页布局
1249
1215
  _this.leftMenu = _this.getMenuByPosition('left');
1250
1216
  _this.centerLeftMenu = _this.getMenuByPosition('centerLeft');
1251
1217
  _this.centerRightMenu = _this.getMenuByPosition('centerRight');
1252
1218
  _this.rightMenu = _this.getMenuByPosition('right');
1253
- _this.hsy_domain = _tplusApi.User && _tplusApi.User.getWebEntry();
1254
1219
  _this.randomWord = _this.randomWord.bind(_this);
1255
1220
  (0, _mobx.autorun)(function () {
1256
1221
  _this.hsyBasicInfoInit();
@@ -1316,14 +1281,24 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1316
1281
  key: 'componentDidMount',
1317
1282
  value: function componentDidMount() {
1318
1283
  this.initPageData();
1319
- if (this.isNewRetailBCPos && !this.isVerticalTouch && !this.isMobileEnvironment) {
1320
- this.initHsyPage();
1321
- }
1284
+ this.isHsyIframeInclude && this.initCCFrameWin();
1322
1285
  }
1286
+ // 初始化好生意iframe
1323
1287
 
1324
- // 初始化好生意页面
1325
-
1326
-
1288
+ }, {
1289
+ key: 'initCCFrameWin',
1290
+ value: function initCCFrameWin() {
1291
+ var that = this;
1292
+ this.ccFrameStore = new _mutantsMicrofx.stores.IframeStore(document.getElementById(CC_FRAME_CONF.id), this.hsy_domain, function (e, instance) {
1293
+ console.log(e, instance, 'cciframe 接收消息');
1294
+ if (e.data && e.data.type === CC_FRAME_CONF.HsyLoadFinish) {
1295
+ !that.state.isHsyLoadFinish && that.setState({ isHsyLoadFinish: true });
1296
+ }
1297
+ }, function (e, instance) {
1298
+ console.log("ccFrameWin 加载成功========>", e, instance);
1299
+ instance.sendMessage({ type: CC_FRAME_CONF.initConnect, _ident_only_: CC_FRAME_CONF.identOnly });
1300
+ }, CC_FRAME_CONF.identOnly);
1301
+ }
1327
1302
  // 初始化商米副屏
1328
1303
 
1329
1304
  }, {
@@ -1362,6 +1337,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1362
1337
  }, {
1363
1338
  key: 'componentWillUnmount',
1364
1339
  value: function componentWillUnmount() {
1340
+ this.ccFrameStore && this.ccFrameStore.destroy();
1365
1341
  var _context$headHook = this.context.headHook;
1366
1342
  _context$headHook = _context$headHook === undefined ? {} : _context$headHook;
1367
1343
  var removeClass = _context$headHook.removeClass;
@@ -1442,7 +1418,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
1442
1418
  _react2.default.createElement(
1443
1419
  'div',
1444
1420
  { className: loadHsyPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide' },
1445
- _react2.default.createElement('iframe', { src: loadHsyURL, width: '100%', height: '93%', frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true', id: 'external-frame-cc' })
1421
+ _react2.default.createElement('iframe', { src: loadHsyURL, width: '100%', height: '93%', frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true', id: CC_FRAME_CONF.id })
1446
1422
  ),
1447
1423
  _react2.default.createElement(
1448
1424
  'div',