tplus-portaltouch 3.45.1 → 3.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/ModifyPassApi.js.map +1 -1
- package/dist/components/dutyandsettle/dutysettlebill.js.map +1 -1
- package/dist/components/dutyandsettle/dutysettlehistory.js +9 -8
- package/dist/components/dutyandsettle/dutysettlehistory.js.map +1 -1
- package/dist/components/dutyandsettle/index.js.map +1 -1
- package/dist/components/dutyandsettle/tipContent.js.map +1 -1
- package/dist/components/header/customUse.js.map +1 -1
- package/dist/components/header/headContent.js +16 -12
- package/dist/components/header/headContent.js.map +1 -1
- package/dist/components/header/index.js +13 -13
- package/dist/components/header/index.js.map +1 -1
- package/dist/components/header/offlinePointDesc.js.map +1 -1
- package/dist/components/header/style.less +457 -457
- package/dist/components/header/themeModal.js.map +1 -1
- package/dist/components/header/uploadList.js +6 -6
- package/dist/components/header/uploadList.js.map +1 -1
- package/dist/components/header/vertical-touch.js.map +1 -1
- package/dist/components/header/vertical-touch.less +228 -228
- package/dist/containers/Main/index.js +1 -1
- package/dist/containers/Main/index.js.map +1 -1
- package/dist/dutyService/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/middleWare/index.js.map +1 -1
- package/dist/modalRouter/StaticRouter.js.map +1 -1
- package/dist/modalRouter/index.js +8 -8
- package/dist/modalRouter/index.js.map +1 -1
- package/dist/pages/Modal/index.js.map +1 -1
- package/dist/pages/Modal/style.less +5 -5
- package/dist/pages/Portalbc/data.js +27 -29
- package/dist/pages/Portalbc/data.js.map +1 -1
- package/dist/pages/Portalbc/horizontalPadPortal.js.map +1 -1
- package/dist/pages/Portalbc/horizontalSunMiPortal.js.map +1 -1
- package/dist/pages/Portalbc/index.js +292 -267
- package/dist/pages/Portalbc/index.js.map +1 -1
- package/dist/pages/Portalbc/index.less +822 -822
- package/dist/pages/Portalbc/onframe.js.map +1 -1
- package/dist/pages/Portalbc/verticalPortal.js.map +1 -1
- package/dist/pages/dutyandsettle/AuthProcess.js.map +1 -1
- package/dist/pages/dutyandsettle/index.js.map +1 -1
- package/dist/pages/dutyandsettle/index.less +529 -529
- package/dist/pages/dutyandsettle/offDuty.js +7 -7
- package/dist/pages/dutyandsettle/offDuty.js.map +1 -1
- package/dist/pages/dutyandsettle/onDialy.js.map +1 -1
- package/dist/pages/dutyandsettle/onDuty.js.map +1 -1
- package/dist/pages/dutyandsettle/onUnDaily.js.map +1 -1
- package/dist/pages/dutyandsettle/settleDialy.js.map +1 -1
- package/dist/pages/index.js.map +1 -1
- package/dist/pages/modifyPass/index.js.map +1 -1
- package/dist/pages/modifyPass/style.less +71 -71
- package/dist/pages/notFound/index.js.map +1 -1
- package/dist/pages/notFound/style.less +17 -17
- package/dist/stores/IframeStore.js +17 -13
- package/dist/stores/IframeStore.js.map +1 -1
- package/dist/stores/ModalRouter.js.map +1 -1
- package/dist/stores/ModifyPassStore.js.map +1 -1
- package/dist/stores/PortalStore.js +5 -5
- package/dist/stores/PortalStore.js.map +1 -1
- package/dist/stores/PosLoginStore.js.map +1 -1
- package/dist/stores/billHistoryStore.js.map +1 -1
- package/dist/stores/dutySettleStore.js.map +1 -1
- package/dist/stores/index.js.map +1 -1
- package/dist/utils/PrintProcess.js +10 -10
- package/dist/utils/PrintProcess.js.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/networkCheck.js.map +1 -1
- package/package.json +1 -1
- 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-
|
56
|
-
* @LastEditors: chenlongad
|
57
|
-
* @modify:修改跳转到T+的查询方案方式
|
52
|
+
var _class, _class2, _temp; /*
|
53
|
+
* @Description:
|
54
|
+
* @Date: 2019-08-13 08:42:18
|
55
|
+
* @LastEditTime: 2022-03-22 14:23:09
|
56
|
+
* @LastEditors: chenlongad
|
57
|
+
* @modify:修改跳转到T+的查询方案方式
|
58
58
|
*/
|
59
59
|
|
60
60
|
|
@@ -107,10 +107,8 @@ 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
|
111
|
-
Footer = _tplusComponentsTouch.Layout.Footer;
|
110
|
+
var Content = _tplusComponentsTouch.Layout.Content;
|
112
111
|
|
113
|
-
var tplusWindow = null;
|
114
112
|
var HTTP_PROXY_URL = 'http://tfproxy.chanjet.com/?url=';
|
115
113
|
var CC_FRAME_CONF = { id: 'external-frame-cc', identOnly: '_pos_web_', initConnect: 'initConnect', HsyLoadFinish: 'HsyLoadFinish', HsyRouterClean: 'HsyRouterClean', HsyRouterJump: 'HsyRouterJump' };
|
116
114
|
|
@@ -118,19 +116,20 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
118
116
|
(0, _inherits3.default)(_default, _Component);
|
119
117
|
|
120
118
|
function _default(props) {
|
121
|
-
var
|
119
|
+
var _this3 = this;
|
122
120
|
|
123
121
|
(0, _classCallCheck3.default)(this, _default);
|
124
122
|
|
125
|
-
var
|
123
|
+
var _this2 = (0, _possibleConstructorReturn3.default)(this, (_default.__proto__ || (0, _getPrototypeOf2.default)(_default)).call(this, props));
|
126
124
|
|
127
|
-
|
125
|
+
_this2.ccFrameStore = {};
|
126
|
+
_this2.catchOfflineData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
|
128
127
|
var offlineSys, isLoginAfter, downloadCatcherDay, currentDay, downProgress, result;
|
129
128
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
130
129
|
while (1) {
|
131
130
|
switch (_context.prev = _context.next) {
|
132
131
|
case 0:
|
133
|
-
offlineSys =
|
132
|
+
offlineSys = _this2.context.stores.offlineSys;
|
134
133
|
isLoginAfter = _mutantsMicrofx.localStore.get("isLoginAfter");
|
135
134
|
downloadCatcherDay = _mutantsMicrofx.localStore.get("downloadCatcherDay");
|
136
135
|
currentDay = Math.ceil(new Date() / 1000 / 60 / 60 / 24);
|
@@ -188,17 +187,17 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
188
187
|
return _context.stop();
|
189
188
|
}
|
190
189
|
}
|
191
|
-
}, _callee,
|
190
|
+
}, _callee, _this3, [[6, 16, 20, 23]]);
|
192
191
|
}));
|
193
192
|
|
194
|
-
|
193
|
+
_this2.getOperation = function () {
|
195
194
|
return new _promise2.default(function (resolve, reject) {
|
196
195
|
var homeOperation = _ModifyPassApi.Request.homeOperation,
|
197
196
|
functionData = _ModifyPassApi.Request.functionData;
|
198
197
|
|
199
198
|
homeOperation().then(function (operations) {
|
200
199
|
_mutantsMicrofx.localStore.set('operationsAuth', (0, _stringify2.default)(operations));
|
201
|
-
|
200
|
+
_this2.setState({ operations: operations || [] });
|
202
201
|
resolve();
|
203
202
|
}).catch(function (err) {
|
204
203
|
console.log('homeOperation.error======', err);
|
@@ -211,61 +210,62 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
211
210
|
});
|
212
211
|
};
|
213
212
|
|
214
|
-
|
215
|
-
var
|
213
|
+
_this2.initPageData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
214
|
+
var _this2$context, _this2$context$stores, stores, _this2$context$headHo, addClass, hasUseOffline;
|
216
215
|
|
217
216
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
218
217
|
while (1) {
|
219
218
|
switch (_context2.prev = _context2.next) {
|
220
219
|
case 0:
|
221
|
-
|
222
|
-
|
223
|
-
addClass =
|
224
|
-
hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !
|
220
|
+
_this2$context = _this2.context, _this2$context$stores = _this2$context.stores, stores = _this2$context$stores === undefined ? {} : _this2$context$stores, _this2$context$headHo = _this2$context.headHook;
|
221
|
+
_this2$context$headHo = _this2$context$headHo === undefined ? {} : _this2$context$headHo;
|
222
|
+
addClass = _this2$context$headHo.addClass;
|
223
|
+
hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !_mutantsUtil.platform.otherOfflineStatus;
|
224
|
+
; //是否允许离线
|
225
225
|
// const hasUseOffline = true;
|
226
226
|
|
227
227
|
if (!(hasUseOffline == true)) {
|
228
|
-
_context2.next =
|
228
|
+
_context2.next = 8;
|
229
229
|
break;
|
230
230
|
}
|
231
231
|
|
232
|
-
_context2.next =
|
233
|
-
return
|
232
|
+
_context2.next = 8;
|
233
|
+
return _this2.catchOfflineData();
|
234
234
|
|
235
|
-
case
|
235
|
+
case 8:
|
236
236
|
_tplusComponentsTouch.Loading.show({
|
237
237
|
text: '权限加载中,请稍等...',
|
238
238
|
delay: 2500
|
239
239
|
});
|
240
240
|
//权限加载
|
241
|
-
_context2.prev =
|
242
|
-
_context2.next =
|
243
|
-
return
|
241
|
+
_context2.prev = 9;
|
242
|
+
_context2.next = 12;
|
243
|
+
return _this2.getOperation();
|
244
244
|
|
245
|
-
case
|
246
|
-
_context2.next =
|
245
|
+
case 12:
|
246
|
+
_context2.next = 17;
|
247
247
|
break;
|
248
248
|
|
249
|
-
case
|
250
|
-
_context2.prev =
|
251
|
-
_context2.t0 = _context2['catch'](
|
249
|
+
case 14:
|
250
|
+
_context2.prev = 14;
|
251
|
+
_context2.t0 = _context2['catch'](9);
|
252
252
|
|
253
253
|
_tplusComponentsTouch.Loading.hide();
|
254
254
|
|
255
|
-
case
|
256
|
-
_context2.prev =
|
255
|
+
case 17:
|
256
|
+
_context2.prev = 17;
|
257
257
|
|
258
258
|
_tplusComponentsTouch.Loading.hide();
|
259
|
-
return _context2.finish(
|
259
|
+
return _context2.finish(17);
|
260
260
|
|
261
|
-
case
|
262
|
-
addClass && addClass(
|
261
|
+
case 20:
|
262
|
+
addClass && addClass(_this2.state.id, 'portalHead');
|
263
263
|
// 初始化参数设置。
|
264
264
|
stores.setStore.initSetParams().then(function (ret) {
|
265
265
|
// 在客户端中,如果开启了副屏设置,尝试这打开副屏。
|
266
|
-
if (
|
267
|
-
if (
|
268
|
-
|
266
|
+
if (_this2.getScreenType() === true) {
|
267
|
+
if (_this2.isHorizontalSunMi) {
|
268
|
+
_this2.sunMiPresentationInit(ret);
|
269
269
|
return;
|
270
270
|
}
|
271
271
|
console.log('副屏页面打开之前,user信息', (0, _stringify2.default)(stores.user));
|
@@ -275,17 +275,23 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
275
275
|
}, 3000);
|
276
276
|
}
|
277
277
|
});
|
278
|
-
_this.hsyBasicInfoInit();
|
279
278
|
|
280
279
|
case 22:
|
281
280
|
case 'end':
|
282
281
|
return _context2.stop();
|
283
282
|
}
|
284
283
|
}
|
285
|
-
}, _callee2,
|
284
|
+
}, _callee2, _this3, [[9, 14, 17, 20]]);
|
286
285
|
}));
|
287
286
|
|
288
|
-
|
287
|
+
_this2.loadHsyPage = function () {
|
288
|
+
if (_this2.isHsyIframeInclude) {
|
289
|
+
_this2.initHsyBasicPageInfo();
|
290
|
+
_this2.initHsyFrameWin();
|
291
|
+
}
|
292
|
+
};
|
293
|
+
|
294
|
+
_this2.sunMiPresentationInit = function (result) {
|
289
295
|
//SunMi初始化参数设置。
|
290
296
|
//副屏幕交互。硬件改动20200428 需要在商米页面加载成功后才能发送 初始化命令
|
291
297
|
// 进行主副屏数据交互 初始化
|
@@ -309,10 +315,10 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
309
315
|
});
|
310
316
|
};
|
311
317
|
|
312
|
-
|
318
|
+
_this2.getTcBasicInfoInit = function () {
|
313
319
|
var userStore = _tplusApi.User.restore();
|
314
320
|
var sid = userStore.sid;
|
315
|
-
var tplusUrl =
|
321
|
+
var tplusUrl = _this2.tplusSiteUrl;
|
316
322
|
if (!tplusUrl) {
|
317
323
|
var msg = "请用admin登录,在服务器配置–地址配置处,设置“内部或外部网络访问T+服务器的地址”!";
|
318
324
|
_tplusComponentsTouch.ModalWraper.warning({
|
@@ -331,7 +337,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
331
337
|
ossjumpUrl = tplusUrl + 'view/ossjump.html?t=' + new Date().getTime() + '&sid=' + sid;
|
332
338
|
}
|
333
339
|
var postMsgUrl = ossjumpUrl;
|
334
|
-
var user =
|
340
|
+
var user = _this2.context.stores.user;
|
335
341
|
|
336
342
|
var loginInfo = user.options.get('loginInfo');
|
337
343
|
|
@@ -341,18 +347,18 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
341
347
|
posCode = _ref4.posCode,
|
342
348
|
TplusStoreId = _ref4.TplusStoreId;
|
343
349
|
|
344
|
-
var uid =
|
345
|
-
var pwd =
|
346
|
-
var accNum =
|
347
|
-
var code =
|
348
|
-
var store =
|
350
|
+
var uid = _this2.tplusEncode(UserCode);
|
351
|
+
var pwd = _this2.tplusEncode(user.options.get("password"));
|
352
|
+
var accNum = _this2.tplusEncode(AccountNum || '');
|
353
|
+
var code = _this2.tplusEncode(posCode);
|
354
|
+
var store = _this2.tplusEncode(TplusStoreId + '');
|
349
355
|
ossjumpUrl += '&fromApp=nretail&way=inframe&user=' + uid + '&pwd=' + pwd + '&accNum=' + accNum + '&posCode=' + code + '&storeID=' + store;
|
350
356
|
return { ossjumpUrl: ossjumpUrl, postMessageUrl: postMsgUrl };
|
351
357
|
};
|
352
358
|
|
353
|
-
|
359
|
+
_this2.getScreenType = function () {
|
354
360
|
var flag = false;
|
355
|
-
if (
|
361
|
+
if (_this2.hasElectron === true || _this2.isHorizontalSunMi) {
|
356
362
|
var data = _mutantsMicrofx.localStore.get('setting_setData') || [];
|
357
363
|
data = data.filter(function (item) {
|
358
364
|
return item.Name === 'EnableDoubleScreen';
|
@@ -365,14 +371,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
365
371
|
return flag;
|
366
372
|
};
|
367
373
|
|
368
|
-
|
374
|
+
_this2.saveLog = function (name) {
|
369
375
|
var saveLogo = _ModifyPassApi.Request.saveLogo;
|
370
376
|
|
371
377
|
name = "进入模块:" + name;
|
372
378
|
saveLogo('进入模块', undefined, name);
|
373
379
|
};
|
374
380
|
|
375
|
-
|
381
|
+
_this2.handelClick = function () {
|
376
382
|
var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
377
383
|
var type = values.key,
|
378
384
|
isModal = values.isModal,
|
@@ -383,9 +389,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
383
389
|
style = values.style,
|
384
390
|
search = values.search,
|
385
391
|
tmenuCode = values.tmenuCode;
|
386
|
-
var
|
387
|
-
operations =
|
388
|
-
isHsyLoadFinish =
|
392
|
+
var _this2$state = _this2.state,
|
393
|
+
operations = _this2$state.operations,
|
394
|
+
isHsyLoadFinish = _this2$state.isHsyLoadFinish;
|
389
395
|
|
390
396
|
var controllable = operations.find(function (vv) {
|
391
397
|
return vv.Name === Name;
|
@@ -399,17 +405,29 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
399
405
|
|
400
406
|
var errorTip = void 0;
|
401
407
|
|
408
|
+
// 离线模式
|
402
409
|
if (!_mutantsMicrofx.stores.offlineSys.shouldOpenHomeOperation(Name)) {
|
403
|
-
_tplusComponentsTouch.Message.warn("离线模式下此操作不可用");
|
410
|
+
_tplusComponentsTouch.Message.warn("离线模式下此操作不可用", { duration: 3 });
|
411
|
+
return;
|
412
|
+
}
|
413
|
+
|
414
|
+
// 会员拉新
|
415
|
+
if (type == 'memberRecruitment' && (_this2.isEnablePromotion == false || _this2.isEnableMember == false)) {
|
416
|
+
_tplusComponentsTouch.Message.warn("您还未开通会员/促销管理,请立即开通", { duration: 3 });
|
417
|
+
return;
|
418
|
+
}
|
419
|
+
|
420
|
+
// 会员消费查询
|
421
|
+
if (type == 'memberConsumDetail' && _this2.isEnableMember == false) {
|
422
|
+
_tplusComponentsTouch.Message.warn("您还未开通会员管理,请立即开通", { duration: 3 });
|
404
423
|
return;
|
405
424
|
}
|
406
425
|
|
426
|
+
// 更多
|
407
427
|
if (type == 'more') {
|
408
|
-
|
409
|
-
// return Message.warn('新功能正在研发中,敬请期待。');
|
410
|
-
// }
|
411
|
-
return _this.setState({ showMoreModal: true });
|
428
|
+
return _this2.setState({ showMoreModal: true });
|
412
429
|
}
|
430
|
+
|
413
431
|
if (!Title) {
|
414
432
|
return _tplusComponentsTouch.ModalWraper.warning({
|
415
433
|
title: '提示',
|
@@ -427,7 +445,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
427
445
|
} else if (!HoldFunctionAuth) {
|
428
446
|
errorTip = '\u60A8\u6CA1\u6709\u64CD\u4F5C ' + Title + ' \u7684\u6743\u9650';
|
429
447
|
}
|
430
|
-
var portalStore =
|
448
|
+
var portalStore = _this2.context.stores.portalStore;
|
431
449
|
|
432
450
|
if (errorTip) {
|
433
451
|
return _tplusComponentsTouch.Message.warn(errorTip);
|
@@ -436,7 +454,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
436
454
|
return _mutantsMicrofx.stores.modalRouter.show({ url: '/' + type, width: 800, title: title });
|
437
455
|
}
|
438
456
|
// 支持页面内打开,减少再次加载页面的时间。
|
439
|
-
if (iframe === true) return
|
457
|
+
if (iframe === true) return _this2.toFramePage({ type: type, app: app, title: title, style: style, search: search, MenuCode: MenuCode, tmenuCode: tmenuCode, isHsyLoadFinish: isHsyLoadFinish });
|
440
458
|
switch (type) {
|
441
459
|
case 'cashier':
|
442
460
|
portalStore.checkDuty().then(function (onDutyMessage) {
|
@@ -449,7 +467,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
449
467
|
|
450
468
|
(0, _tplusPoslogin.PosSetData)({ ShiftCode: Code, IdShiftVoucher: IdShiftVoucher, Shift: Shift, IdDailyVoucher: IdDailyVoucher, DailyCode: DailyCode });
|
451
469
|
console.log('onDutyMessage======', onDutyMessage);
|
452
|
-
|
470
|
+
_this2.saveLog(title);
|
453
471
|
_mutantsMicrofx.history.push('/RE/RE01');
|
454
472
|
}
|
455
473
|
}).catch(function (data) {
|
@@ -479,7 +497,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
479
497
|
}
|
480
498
|
};
|
481
499
|
|
482
|
-
|
500
|
+
_this2.toFramePage = function (params) {
|
483
501
|
var _ref6 = params || {},
|
484
502
|
app = _ref6.app,
|
485
503
|
title = _ref6.title,
|
@@ -492,10 +510,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
492
510
|
switch (app) {
|
493
511
|
case 'cc':
|
494
512
|
var sh = '';
|
495
|
-
|
496
|
-
// return Message.warn('新功能正在研发中,敬请期待。');
|
497
|
-
// }
|
498
|
-
if (!isHsyLoadFinish && !_this.isMobileEnvironment) {
|
513
|
+
if (!isHsyLoadFinish && !_this2.isMobileEnvironment) {
|
499
514
|
return _tplusComponentsTouch.Message.warn('正在加载资源中,请稍后。');
|
500
515
|
}
|
501
516
|
if (!search) {
|
@@ -509,22 +524,22 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
509
524
|
if (!sh) {
|
510
525
|
return _tplusComponentsTouch.Message.warn('传递参数有误,请查证。');
|
511
526
|
}
|
512
|
-
|
527
|
+
_this2.toHsyPage((0, _extends3.default)({}, style, sh));
|
513
528
|
break;
|
514
529
|
case 'tc':
|
515
530
|
if (tmenuCode || MenuCode) {
|
516
|
-
|
531
|
+
_this2.saveLog(title);
|
517
532
|
if (MenuCode) {
|
518
|
-
|
533
|
+
_this2.toTplusPage(MenuCode, search);
|
519
534
|
} else {
|
520
|
-
|
535
|
+
_this2.toTplusPage(tmenuCode, search);
|
521
536
|
}
|
522
537
|
}
|
523
538
|
break;
|
524
539
|
}
|
525
540
|
};
|
526
541
|
|
527
|
-
|
542
|
+
_this2.getTplusUrlFromCloudServer = function () {
|
528
543
|
//获取T+服务器配置地址。
|
529
544
|
var userStore = _tplusApi.User.restore();
|
530
545
|
var data = 'accesstoken=' + ('' + userStore.accessToken) + '&cloudOrgId=' + ('' + userStore.orgId);
|
@@ -548,7 +563,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
548
563
|
});
|
549
564
|
};
|
550
565
|
|
551
|
-
|
566
|
+
_this2.toTplusPage = function () {
|
552
567
|
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(tmenuCode, search) {
|
553
568
|
var ret, _ref8, ossjumpUrl, postMessageUrl, dsearchPlanID, portalStore, menu, external_frame_tc, win, loadTcURL;
|
554
569
|
|
@@ -556,7 +571,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
556
571
|
while (1) {
|
557
572
|
switch (_context3.prev = _context3.next) {
|
558
573
|
case 0:
|
559
|
-
ret =
|
574
|
+
ret = _this2.getTcBasicInfoInit();
|
560
575
|
|
561
576
|
if (!(ret === false)) {
|
562
577
|
_context3.next = 3;
|
@@ -574,7 +589,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
574
589
|
break;
|
575
590
|
}
|
576
591
|
|
577
|
-
portalStore =
|
592
|
+
portalStore = _this2.context.stores.portalStore;
|
578
593
|
_context3.next = 9;
|
579
594
|
return portalStore.getSearchPlanId(search);
|
580
595
|
|
@@ -582,14 +597,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
582
597
|
dsearchPlanID = _context3.sent;
|
583
598
|
|
584
599
|
case 10:
|
585
|
-
menu =
|
600
|
+
menu = _this2.tplusEncode(tmenuCode);
|
586
601
|
|
587
|
-
ossjumpUrl += '&menu=' + menu + '&fromUrl=' +
|
602
|
+
ossjumpUrl += '&menu=' + menu + '&fromUrl=' + _this2.tplusEncode(location.origin);
|
588
603
|
if (dsearchPlanID) {
|
589
|
-
ossjumpUrl += '&searchPlanID=' +
|
604
|
+
ossjumpUrl += '&searchPlanID=' + _this2.tplusEncode(dsearchPlanID);
|
590
605
|
}
|
591
606
|
|
592
|
-
if (!
|
607
|
+
if (!_this2.isHorizontalSunMi) {
|
593
608
|
_context3.next = 17;
|
594
609
|
break;
|
595
610
|
}
|
@@ -599,7 +614,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
599
614
|
break;
|
600
615
|
|
601
616
|
case 17:
|
602
|
-
if (!(
|
617
|
+
if (!(_this2.new_retail_app == 'tc' || _this2.new_retail_app == 'tczsy' || _this2.new_retail_app == 'tcyzj')) {
|
603
618
|
_context3.next = 20;
|
604
619
|
break;
|
605
620
|
}
|
@@ -610,18 +625,18 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
610
625
|
case 20:
|
611
626
|
external_frame_tc = document.getElementById('external-frame-tc');
|
612
627
|
win = external_frame_tc.contentWindow;
|
613
|
-
loadTcURL =
|
628
|
+
loadTcURL = _this2.state.loadTcURL;
|
614
629
|
|
615
630
|
if (loadTcURL) {
|
616
631
|
win && win.postMessage({ doType: 'openMenuFromPos', tmenuCode: tmenuCode, ossjumpUrl: ossjumpUrl, dsearchPlanID: dsearchPlanID }, postMessageUrl);
|
617
|
-
|
632
|
+
_this2.setState({ loadTcPage: true });
|
618
633
|
} else {
|
619
|
-
|
634
|
+
_this2.setState({ loadTcURL: ossjumpUrl, loadTcPage: true });
|
620
635
|
}
|
621
636
|
rx$.changeHsy.next({
|
622
637
|
back: true, fn: function fn() {
|
623
638
|
win && win.postMessage({ doType: 'closeCurrentMenuFromPos' }, postMessageUrl);
|
624
|
-
|
639
|
+
_this2.setState({ loadTcPage: false });
|
625
640
|
rx$.changeHsy.next({ back: false });
|
626
641
|
}
|
627
642
|
});
|
@@ -631,7 +646,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
631
646
|
return _context3.stop();
|
632
647
|
}
|
633
648
|
}
|
634
|
-
}, _callee3,
|
649
|
+
}, _callee3, _this3);
|
635
650
|
}));
|
636
651
|
|
637
652
|
return function (_x2, _x3) {
|
@@ -639,9 +654,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
639
654
|
};
|
640
655
|
}();
|
641
656
|
|
642
|
-
|
657
|
+
_this2.toHsyPage = function () {
|
643
658
|
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(params) {
|
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;
|
659
|
+
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, _hsyPage;
|
645
660
|
|
646
661
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
647
662
|
while (1) {
|
@@ -651,9 +666,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
651
666
|
filter = {};
|
652
667
|
//对仓库参数的处理
|
653
668
|
|
654
|
-
IdWarehouse =
|
655
|
-
WarehouseName =
|
656
|
-
IsPerformanceDistribution =
|
669
|
+
IdWarehouse = _this2.idWarehouse;
|
670
|
+
WarehouseName = _this2.warehouseName;
|
671
|
+
IsPerformanceDistribution = _this2.performanceDistribution === 'SHIPPER_STORE' || false;
|
657
672
|
_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;
|
658
673
|
_ref11 = _mutantsMicrofx.stores.user.options.get('store') || {}, _ref11$storeName = _ref11.storeName, storeName = _ref11$storeName === undefined ? '' : _ref11$storeName;
|
659
674
|
_context4.t0 = pageType;
|
@@ -754,19 +769,19 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
754
769
|
case 18:
|
755
770
|
bar_bg = encodeURIComponent(bar_bg);
|
756
771
|
bar_active_bg = encodeURIComponent(bar_active_bg);
|
757
|
-
menu = secondRouter ? menu + '/' +
|
772
|
+
menu = secondRouter ? menu + '/' + _this2.randomWord(true, 13) : menu;
|
758
773
|
pageId = menu;
|
759
774
|
pageParams = (0, _assign2.default)(pageParams, filter);
|
760
775
|
path = encodeURIComponent(path);
|
761
|
-
_k =
|
776
|
+
_k = _this2.randomWord(false, 6);
|
762
777
|
|
763
778
|
commonArgs = '?posid=' + PosId + '&content_only=' + content_only + '&bar_bg=' + bar_bg + '&bar_active_bg=' + bar_active_bg;
|
764
779
|
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;
|
765
|
-
cc_url =
|
780
|
+
cc_url = _this2.hsy_domain.replace('#/', '') + commonArgs + actionUrl;
|
766
781
|
|
767
782
|
console.log('web_hsy_url:', cc_url);
|
768
783
|
|
769
|
-
if (!
|
784
|
+
if (!_this2.isHorizontalSunMi) {
|
770
785
|
_context4.next = 37;
|
771
786
|
break;
|
772
787
|
}
|
@@ -779,33 +794,32 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
779
794
|
|
780
795
|
console.log('CC_WEB_URL:', CC_WEB_URL);
|
781
796
|
window.android_CommonFun.openWebUrlByOutBrowser(CC_WEB_URL);
|
782
|
-
_context4.next =
|
797
|
+
_context4.next = 42;
|
783
798
|
break;
|
784
799
|
|
785
800
|
case 37:
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
_this.setState({ loadHsyPage: true, showMoreModal: false });
|
790
|
-
} else {
|
791
|
-
_this.setState({ loadHsyPage: true });
|
801
|
+
_this2.ccFrameStore && _this2.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterJump, pageId: pageId, pageParams: pageParams, extStateParams: { closeable: closeable, tabLabel: tabLabel }, _ident_only_: CC_FRAME_CONF.identOnly });
|
802
|
+
if (_this2.state.showMoreModal === true) {
|
803
|
+
_this2.setState({ showMoreModal: false });
|
792
804
|
}
|
805
|
+
_hsyPage = document.getElementById(CC_FRAME_CONF.id);
|
806
|
+
|
807
|
+
if (_hsyPage) _hsyPage.style.top = '60px';
|
793
808
|
rx$.changeHsy.next({
|
794
809
|
back: true, fn: function fn() {
|
795
|
-
|
810
|
+
if (_hsyPage) _hsyPage.style.top = '-100%';
|
796
811
|
rx$.changeHsy.next({ back: false });
|
797
812
|
// 在打开页签之前,关闭之前的,返回键的回调函数
|
798
|
-
|
799
|
-
_this.ccFrameStore && _this.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterClean, _ident_only_: CC_FRAME_CONF.identOnly });
|
813
|
+
_this2.ccFrameStore && _this2.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterClean, _ident_only_: CC_FRAME_CONF.identOnly });
|
800
814
|
}
|
801
815
|
});
|
802
816
|
|
803
|
-
case
|
817
|
+
case 42:
|
804
818
|
case 'end':
|
805
819
|
return _context4.stop();
|
806
820
|
}
|
807
821
|
}
|
808
|
-
}, _callee4,
|
822
|
+
}, _callee4, _this3);
|
809
823
|
}));
|
810
824
|
|
811
825
|
return function (_x4) {
|
@@ -813,7 +827,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
813
827
|
};
|
814
828
|
}();
|
815
829
|
|
816
|
-
|
830
|
+
_this2.randomWord = function (only, digits) {
|
817
831
|
var str = "";
|
818
832
|
var number = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
|
819
833
|
var letter = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
|
@@ -825,24 +839,24 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
825
839
|
return str;
|
826
840
|
};
|
827
841
|
|
828
|
-
|
829
|
-
|
842
|
+
_this2.closeFrameModal = function () {
|
843
|
+
_this2.setState({ showModal: false });
|
830
844
|
};
|
831
845
|
|
832
|
-
|
833
|
-
|
846
|
+
_this2.closeMoreModal = function () {
|
847
|
+
_this2.setState({ showMoreModal: false });
|
834
848
|
};
|
835
849
|
|
836
|
-
|
850
|
+
_this2.tplusEncode = function (code) {
|
837
851
|
var c = String.fromCharCode(code.charCodeAt(0) + code.length);
|
838
852
|
for (var i = 1; i < code.length; i++) {
|
839
853
|
c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1));
|
840
854
|
}
|
841
|
-
var ret =
|
855
|
+
var ret = _this2.TplusBase64Encode(c);
|
842
856
|
return ret;
|
843
857
|
};
|
844
858
|
|
845
|
-
|
859
|
+
_this2.TplusBase64Encode = function (input) {
|
846
860
|
var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
847
861
|
var output = "";
|
848
862
|
var chr1 = void 0,
|
@@ -853,7 +867,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
853
867
|
enc3 = void 0,
|
854
868
|
enc4 = void 0;
|
855
869
|
var i = 0;
|
856
|
-
input =
|
870
|
+
input = _this2._utf8_encode(input);
|
857
871
|
while (i < input.length) {
|
858
872
|
chr1 = input.charCodeAt(i++);
|
859
873
|
chr2 = input.charCodeAt(i++);
|
@@ -872,7 +886,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
872
886
|
return output;
|
873
887
|
};
|
874
888
|
|
875
|
-
|
889
|
+
_this2._utf8_encode = function (string) {
|
876
890
|
string = string.replace(/\r\n/g, "\n");
|
877
891
|
var utftext = "";
|
878
892
|
for (var n = 0; n < string.length; n++) {
|
@@ -891,13 +905,13 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
891
905
|
return utftext;
|
892
906
|
};
|
893
907
|
|
894
|
-
|
908
|
+
_this2.operationControl = function () {
|
895
909
|
var menu = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
896
|
-
var operations =
|
910
|
+
var operations = _this2.state.operations;
|
897
911
|
|
898
912
|
menu.forEach(function (v) {
|
899
913
|
if (v.sub) {
|
900
|
-
return
|
914
|
+
return _this2.operationControl(v.sub);
|
901
915
|
}
|
902
916
|
var controllable = operations.find(function (vv) {
|
903
917
|
return vv.Name === v.Name;
|
@@ -919,17 +933,17 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
919
933
|
return menu;
|
920
934
|
};
|
921
935
|
|
922
|
-
|
923
|
-
var menu =
|
924
|
-
var width = menu.length == 0 ?
|
936
|
+
_this2.createLeftNode = function () {
|
937
|
+
var menu = _this2.leftMenu;
|
938
|
+
var width = menu.length == 0 ? _this2.isMobileEnvironment & !_this2.isNewRetailBCPosTC ? 5 : 4 : 7;
|
925
939
|
if (menu.length == 0) {
|
926
940
|
return _react2.default.createElement(
|
927
941
|
_antd.Col,
|
928
942
|
{ xl: width, md: width, className: 'portal-left-col', key: 'left' },
|
929
943
|
_react2.default.createElement('div', { className: 'portal-left-content' })
|
930
944
|
);
|
931
|
-
// return null;
|
932
945
|
}
|
946
|
+
|
933
947
|
var menuNode = menu.map(function (v) {
|
934
948
|
return v.container ? _react2.default.createElement(
|
935
949
|
'div',
|
@@ -937,15 +951,14 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
937
951
|
v.sub.map(function (vv) {
|
938
952
|
var item = vv;
|
939
953
|
if (vv.maybe === true) {
|
940
|
-
|
941
|
-
item = status ? vv : vv.second;
|
954
|
+
item = _this2.showStorePrice ? vv : vv.second;
|
942
955
|
}
|
943
956
|
return _react2.default.createElement(
|
944
957
|
'div',
|
945
958
|
{
|
946
959
|
className: 'member-item ' + item.className + ' ' + (item.disabled ? 'menu-item-disabled' : ''),
|
947
960
|
key: item.className,
|
948
|
-
onClick:
|
961
|
+
onClick: _this2.handelClick.bind(_this2, item)
|
949
962
|
},
|
950
963
|
!!item.title && _react2.default.createElement(
|
951
964
|
'h1',
|
@@ -965,7 +978,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
965
978
|
{
|
966
979
|
className: 'member-item ' + v.className + ' ' + (v.disabled ? 'menu-item-disabled' : ''),
|
967
980
|
key: v.className,
|
968
|
-
onClick:
|
981
|
+
onClick: _this2.handelClick.bind(_this2, v)
|
969
982
|
},
|
970
983
|
v.title && _react2.default.createElement(
|
971
984
|
'h1',
|
@@ -991,15 +1004,15 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
991
1004
|
);
|
992
1005
|
};
|
993
1006
|
|
994
|
-
|
995
|
-
var menuLeftNode =
|
1007
|
+
_this2.createCenterNode = function () {
|
1008
|
+
var menuLeftNode = _this2.centerLeftMenu.map(function (v) {
|
996
1009
|
return _react2.default.createElement(
|
997
1010
|
'div',
|
998
1011
|
{
|
999
1012
|
className: 'worktop-item ' + v.className + ' ' + (v.disabled ? 'menu-item-disabled' : ''),
|
1000
1013
|
style: v.style,
|
1001
1014
|
key: v.className,
|
1002
|
-
onClick:
|
1015
|
+
onClick: _this2.handelClick.bind(_this2, v)
|
1003
1016
|
},
|
1004
1017
|
v.title && _react2.default.createElement(
|
1005
1018
|
'h1',
|
@@ -1015,7 +1028,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1015
1028
|
v.disabled && _react2.default.createElement('div', { className: 'item-disabled-placeholder' })
|
1016
1029
|
);
|
1017
1030
|
});
|
1018
|
-
var menuRightNode =
|
1031
|
+
var menuRightNode = _this2.centerRightMenu.map(function (v) {
|
1019
1032
|
return v.container ? _react2.default.createElement(
|
1020
1033
|
'div',
|
1021
1034
|
{ style: v.container.style, className: v.container.className, key: v.container.className },
|
@@ -1025,7 +1038,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1025
1038
|
{
|
1026
1039
|
className: 'worktop-item ' + vv.className + ' ' + (vv.disabled ? 'menu-item-disabled' : ''),
|
1027
1040
|
key: vv.className,
|
1028
|
-
onClick:
|
1041
|
+
onClick: _this2.handelClick.bind(_this2, vv)
|
1029
1042
|
},
|
1030
1043
|
vv.title && _react2.default.createElement(
|
1031
1044
|
'h1',
|
@@ -1045,7 +1058,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1045
1058
|
{
|
1046
1059
|
className: 'worktop-item ' + v.className + ' ' + (v.disabled ? 'menu-item-disabled' : ''),
|
1047
1060
|
key: v.className,
|
1048
|
-
onClick:
|
1061
|
+
onClick: _this2.handelClick.bind(_this2, v)
|
1049
1062
|
},
|
1050
1063
|
v.title && _react2.default.createElement(
|
1051
1064
|
'h1',
|
@@ -1076,9 +1089,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1076
1089
|
);
|
1077
1090
|
};
|
1078
1091
|
|
1079
|
-
|
1080
|
-
var width =
|
1081
|
-
var node =
|
1092
|
+
_this2.createRightNode = function () {
|
1093
|
+
var width = _this2.leftMenu.length == 0 ? _this2.isMobileEnvironment & !_this2.isNewRetailBCPosTC ? 9 : 10 : 7;
|
1094
|
+
var node = _this2.rightMenu.map(function (v) {
|
1082
1095
|
return v.container ? _react2.default.createElement(
|
1083
1096
|
'div',
|
1084
1097
|
{ style: v.container.style, className: v.container.className, key: v.container.className },
|
@@ -1088,7 +1101,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1088
1101
|
{
|
1089
1102
|
className: 'stock-item ' + vv.className + ' ' + (vv.disabled ? 'menu-item-disabled' : ''),
|
1090
1103
|
key: vv.className,
|
1091
|
-
onClick:
|
1104
|
+
onClick: _this2.handelClick.bind(_this2, vv)
|
1092
1105
|
},
|
1093
1106
|
vv.title && _react2.default.createElement(
|
1094
1107
|
'h1',
|
@@ -1109,7 +1122,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1109
1122
|
className: 'stock-item ' + v.className + ' ' + (v.disabled ? 'menu-item-disabled' : ''),
|
1110
1123
|
style: v.style,
|
1111
1124
|
key: v.className,
|
1112
|
-
onClick:
|
1125
|
+
onClick: _this2.handelClick.bind(_this2, v)
|
1113
1126
|
},
|
1114
1127
|
!!v.title && _react2.default.createElement(
|
1115
1128
|
'h1',
|
@@ -1130,9 +1143,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1130
1143
|
);
|
1131
1144
|
};
|
1132
1145
|
|
1133
|
-
|
1134
|
-
var arrs =
|
1135
|
-
var items =
|
1146
|
+
_this2.createMoreNode = function () {
|
1147
|
+
var arrs = _this2.getMoreNodeInfo();
|
1148
|
+
var items = _this2.isNewRetailBCPosTC ? arrs.sub_tc : arrs.sub_cc || [];
|
1136
1149
|
var node = items.length > 0 && items.map(function (v) {
|
1137
1150
|
return _react2.default.createElement(
|
1138
1151
|
'div',
|
@@ -1140,7 +1153,7 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1140
1153
|
className: 'modal-quick ' + v.className,
|
1141
1154
|
style: v.style,
|
1142
1155
|
key: v.className,
|
1143
|
-
onClick:
|
1156
|
+
onClick: _this2.handelClick.bind(_this2, v)
|
1144
1157
|
},
|
1145
1158
|
!!v.icon && _react2.default.createElement(
|
1146
1159
|
'div',
|
@@ -1157,39 +1170,30 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1157
1170
|
return node;
|
1158
1171
|
};
|
1159
1172
|
|
1160
|
-
|
1161
|
-
if (
|
1162
|
-
|
1163
|
-
// return this.centerRightMenu.find(vv => vv.key == 'more') || {};
|
1164
|
-
// } else {
|
1165
|
-
return _this.centerRightMenu.find(function (v) {
|
1173
|
+
_this2.getMoreNodeInfo = function () {
|
1174
|
+
if (_this2.isNewRetailBCPosTC) {
|
1175
|
+
return _this2.centerRightMenu.find(function (v) {
|
1166
1176
|
return v.sub && v.sub.find(function (vv) {
|
1167
1177
|
return vv.key == 'more';
|
1168
1178
|
});
|
1169
1179
|
}).sub[1] || {};
|
1170
|
-
// }
|
1171
1180
|
} else {
|
1172
|
-
|
1173
|
-
// return this.centerRightMenu.find(vv => vv.key == 'more') || {};
|
1174
|
-
// } else {
|
1175
|
-
return _this.centerRightMenu.find(function (v) {
|
1181
|
+
return _this2.centerRightMenu.find(function (v) {
|
1176
1182
|
return v.sub && v.sub.find(function (vv) {
|
1177
1183
|
return vv.key == 'more';
|
1178
1184
|
});
|
1179
1185
|
}).sub[1] || {};
|
1180
|
-
// }
|
1181
1186
|
}
|
1182
1187
|
};
|
1183
1188
|
|
1184
|
-
|
1185
|
-
|
1189
|
+
_this2.hasElectron = hasElectron;
|
1190
|
+
var hsyPageLoadIsFinish = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('hsyPageLoadIsFinish');
|
1191
|
+
_this2.state = {
|
1186
1192
|
id: Date.now(),
|
1187
1193
|
operations: [],
|
1188
1194
|
showModal: false,
|
1189
1195
|
showMoreModal: false,
|
1190
|
-
|
1191
|
-
loadHsyURL: '',
|
1192
|
-
isHsyLoadFinish: false,
|
1196
|
+
isHsyLoadFinish: !!hsyPageLoadIsFinish,
|
1193
1197
|
loadTcPage: false,
|
1194
1198
|
loadTcURL: '',
|
1195
1199
|
modalURL: ''
|
@@ -1201,26 +1205,33 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1201
1205
|
isHorizontalSunMi = _ref13.isHorizontalSunMi,
|
1202
1206
|
isNewRetailBCPosTC = _ref13.isNewRetailBCPosTC;
|
1203
1207
|
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1208
|
+
_this2.isVerticalTouch = !!isVerticalTouch;
|
1209
|
+
_this2.isHorizontalPad = !!isHorizontalPad;
|
1210
|
+
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
1211
|
+
_this2.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
1212
|
+
_this2.FuPingIsLoaded = false;
|
1213
|
+
_this2.isNewRetailBCPosTC = !!isNewRetailBCPosTC;
|
1214
|
+
_this2.new_retail_app = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('newRetailAppType');
|
1215
|
+
_this2.hsy_domain = _tplusApi.User && _tplusApi.User.getWebEntry();
|
1212
1216
|
// 是否嵌套好生意的iframe
|
1213
|
-
|
1217
|
+
_this2.isHsyIframeInclude = !_this2.isVerticalTouch && !_this2.isMobileEnvironment;
|
1218
|
+
//获取初始化参数
|
1219
|
+
_this2.isEnableMember = !!(0, _tplusPoslogin.PosInitData)('isEnableMember'); //是否开启会员
|
1220
|
+
_this2.isEnablePromotion = !!(0, _tplusPoslogin.PosInitData)('isEnablePromotion'); //是否开启促销
|
1221
|
+
_this2.isOfflineCash = (0, _tplusPoslogin.PosInitData)('IsOfflineCash');
|
1222
|
+
_this2.tplusSiteUrl = (0, _tplusPoslogin.PosInitData)("TplusSite") || (0, _tplusPoslogin.PosInitData)("tplusinnersite");
|
1223
|
+
_this2.idWarehouse = (0, _tplusPoslogin.PosInitData)('IdWarehouse') || '';
|
1224
|
+
_this2.warehouseName = (0, _tplusPoslogin.PosInitData)('WarehouseName') || '';
|
1225
|
+
_this2.performanceDistribution = (0, _tplusPoslogin.PosInitData)('PerformanceDistribution');
|
1226
|
+
_this2.showStorePrice = (0, _tplusPoslogin.PosInitData)('ShowStorePrice');
|
1227
|
+
|
1214
1228
|
//首页布局
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
_this.hsyBasicInfoInit();
|
1222
|
-
});
|
1223
|
-
return _this;
|
1229
|
+
_this2.leftMenu = _this2.getMenuByPosition('left');
|
1230
|
+
_this2.centerLeftMenu = _this2.getMenuByPosition('centerLeft');
|
1231
|
+
_this2.centerRightMenu = _this2.getMenuByPosition('centerRight');
|
1232
|
+
_this2.rightMenu = _this2.getMenuByPosition('right');
|
1233
|
+
_this2.randomWord = _this2.randomWord.bind(_this2);
|
1234
|
+
return _this2;
|
1224
1235
|
}
|
1225
1236
|
|
1226
1237
|
(0, _createClass3.default)(_default, [{
|
@@ -1262,37 +1273,46 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1262
1273
|
key: 'getMenuByEnvironment',
|
1263
1274
|
value: function getMenuByEnvironment(ccMenu, tcMenu, tcMobilMenu, ccMobilMenu) {
|
1264
1275
|
if (this.isNewRetailBCPosTC) {
|
1265
|
-
// if(this.isMobileEnvironment){
|
1266
|
-
// return tcMobilMenu;
|
1267
|
-
// }else{
|
1268
|
-
// return tcMenu;
|
1269
|
-
// }
|
1270
1276
|
return tcMenu;
|
1271
1277
|
} else {
|
1272
|
-
// if(this.isMobileEnvironment){
|
1273
|
-
// return ccMobilMenu;
|
1274
|
-
// }else{
|
1275
|
-
// return ccMenu;
|
1276
|
-
// }
|
1277
1278
|
return ccMenu;
|
1278
1279
|
}
|
1279
1280
|
}
|
1280
1281
|
}, {
|
1281
1282
|
key: 'componentDidMount',
|
1282
1283
|
value: function componentDidMount() {
|
1284
|
+
var _this4 = this;
|
1285
|
+
|
1283
1286
|
this.initPageData();
|
1284
|
-
|
1287
|
+
//加载好生意界面
|
1288
|
+
var hsyPageLoadIsFinish = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('hsyPageLoadIsFinish');
|
1289
|
+
if (hsyPageLoadIsFinish == 'true') {
|
1290
|
+
this.loadHsyPage();
|
1291
|
+
} else {
|
1292
|
+
setTimeout(function () {
|
1293
|
+
_this4.loadHsyPage();
|
1294
|
+
}, 1000);
|
1295
|
+
}
|
1285
1296
|
}
|
1286
|
-
|
1297
|
+
|
1298
|
+
// 初始化加载hsy
|
1287
1299
|
|
1288
1300
|
}, {
|
1289
|
-
key: '
|
1290
|
-
|
1291
|
-
|
1301
|
+
key: 'initHsyFrameWin',
|
1302
|
+
|
1303
|
+
|
1304
|
+
// 初始化好生意iframe
|
1305
|
+
value: function initHsyFrameWin() {
|
1306
|
+
var _this = this;
|
1292
1307
|
this.ccFrameStore = new _mutantsMicrofx.stores.IframeStore(document.getElementById(CC_FRAME_CONF.id), this.hsy_domain, function (e, instance) {
|
1293
1308
|
console.log(e, instance, 'cciframe 接收消息');
|
1294
1309
|
if (e.data && e.data.type === CC_FRAME_CONF.HsyLoadFinish) {
|
1295
|
-
|
1310
|
+
//记录好生意界面是否加载完成
|
1311
|
+
var hsyPageLoadIsFinish = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('hsyPageLoadIsFinish');
|
1312
|
+
if (!(hsyPageLoadIsFinish == 'true')) {
|
1313
|
+
_mutantsMicrofx.localStore && _mutantsMicrofx.localStore.set('hsyPageLoadIsFinish', true);
|
1314
|
+
_this.setState({ isHsyLoadFinish: true });
|
1315
|
+
}
|
1296
1316
|
}
|
1297
1317
|
}, function (e, instance) {
|
1298
1318
|
console.log("ccFrameWin 加载成功========>", e, instance);
|
@@ -1302,11 +1322,15 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1302
1322
|
// 初始化商米副屏
|
1303
1323
|
|
1304
1324
|
}, {
|
1305
|
-
key: '
|
1325
|
+
key: 'initHsyBasicPageInfo',
|
1306
1326
|
|
1307
1327
|
|
1308
1328
|
// 初始化智+模块信息
|
1309
|
-
value: function
|
1329
|
+
value: function initHsyBasicPageInfo() {
|
1330
|
+
console.log('start create iframe-hsyPage');
|
1331
|
+
var hsyPageLoadIsFinish = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('hsyPageLoadIsFinish');
|
1332
|
+
var _hsyPage = document.getElementById(CC_FRAME_CONF.id);
|
1333
|
+
if (hsyPageLoadIsFinish == 'true' && _hsyPage) return;
|
1310
1334
|
var theme = _mutantsMicrofx.stores.portalStore.themeStore;
|
1311
1335
|
var color = '#FF8C25';
|
1312
1336
|
switch (theme) {
|
@@ -1323,13 +1347,23 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1323
1347
|
color = "#FF6B8C";
|
1324
1348
|
break;
|
1325
1349
|
}
|
1350
|
+
var _height = document.body.clientHeight;
|
1326
1351
|
|
1327
1352
|
var _ref14 = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('StoreKey') || {},
|
1328
1353
|
_ref14$PosId = _ref14.PosId,
|
1329
1354
|
PosId = _ref14$PosId === undefined ? '' : _ref14$PosId;
|
1330
1355
|
|
1331
1356
|
var cc_url = this.hsy_domain.replace('#/', '') + '?fromApp=nretail&posid=' + PosId + '&content_only=true&bar_bg=' + encodeURIComponent('#FFFFFF') + '&bar_active_bg=' + encodeURIComponent(color);
|
1332
|
-
|
1357
|
+
var iframe = document.createElement('iframe');
|
1358
|
+
iframe.width = '100%';
|
1359
|
+
iframe.height = _height - 60 + 'px';
|
1360
|
+
iframe.setAttribute("scrolling", "yes");
|
1361
|
+
iframe.setAttribute("frameborder", 0);
|
1362
|
+
iframe.style.position = 'absolute';
|
1363
|
+
iframe.src = cc_url;
|
1364
|
+
iframe.id = CC_FRAME_CONF.id;
|
1365
|
+
document.body.appendChild(iframe);
|
1366
|
+
console.log('finish create iframe-hsyPage succeed.');
|
1333
1367
|
}
|
1334
1368
|
|
1335
1369
|
//初始化tc、tcyzj、tczsy信息
|
@@ -1337,7 +1371,9 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1337
1371
|
}, {
|
1338
1372
|
key: 'componentWillUnmount',
|
1339
1373
|
value: function componentWillUnmount() {
|
1340
|
-
this.
|
1374
|
+
if (this.isHsyIframeInclude && typeof this.ccFrameStore.destroy == 'function') {
|
1375
|
+
this.ccFrameStore.destroy();
|
1376
|
+
}
|
1341
1377
|
var _context$headHook = this.context.headHook;
|
1342
1378
|
_context$headHook = _context$headHook === undefined ? {} : _context$headHook;
|
1343
1379
|
var removeClass = _context$headHook.removeClass;
|
@@ -1379,8 +1415,6 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1379
1415
|
showModal = _state.showModal,
|
1380
1416
|
showMoreModal = _state.showMoreModal,
|
1381
1417
|
modalURL = _state.modalURL,
|
1382
|
-
loadHsyPage = _state.loadHsyPage,
|
1383
|
-
loadHsyURL = _state.loadHsyURL,
|
1384
1418
|
loadTcPage = _state.loadTcPage,
|
1385
1419
|
loadTcURL = _state.loadTcURL;
|
1386
1420
|
|
@@ -1388,72 +1422,63 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
|
|
1388
1422
|
var htmlContent = null;
|
1389
1423
|
if (this.isVerticalTouch) {
|
1390
1424
|
htmlContent = _react2.default.createElement(_verticalPortal2.default, { handelClick: this.handelClick });
|
1391
|
-
}
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
{ style: { height: '100%' }, className: 'portal-content' },
|
1425
|
+
} else {
|
1426
|
+
htmlContent = _react2.default.createElement(
|
1427
|
+
_tplusComponentsTouch.Layout,
|
1428
|
+
{ style: { height: '100%' }, className: 'portal-content' },
|
1429
|
+
_react2.default.createElement(
|
1430
|
+
Content,
|
1431
|
+
{ style: { paddingLeft: '50px', paddingRight: '50px' }, className: 'portal-container portal-container-center' },
|
1399
1432
|
_react2.default.createElement(
|
1400
|
-
|
1401
|
-
{
|
1433
|
+
_antd.Row,
|
1434
|
+
{ className: 'portal-content-row' },
|
1435
|
+
this.createLeftNode(),
|
1402
1436
|
_react2.default.createElement(
|
1403
|
-
_antd.
|
1404
|
-
{ className: 'portal-
|
1405
|
-
this.createLeftNode(),
|
1437
|
+
_antd.Col,
|
1438
|
+
{ xl: 10, md: 10, className: 'portal-center-col', key: 'center' },
|
1406
1439
|
_react2.default.createElement(
|
1407
|
-
|
1408
|
-
{
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
)
|
1414
|
-
),
|
1415
|
-
this.createRightNode()
|
1416
|
-
)
|
1417
|
-
),
|
1418
|
-
_react2.default.createElement(
|
1419
|
-
'div',
|
1420
|
-
{ className: loadHsyPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide' },
|
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 })
|
1422
|
-
),
|
1423
|
-
_react2.default.createElement(
|
1424
|
-
'div',
|
1425
|
-
{ className: loadTcPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide' },
|
1426
|
-
_react2.default.createElement('iframe', { src: loadTcURL, width: '100%', height: '93%', frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true', id: 'external-frame-tc' })
|
1427
|
-
),
|
1428
|
-
this.isMobileEnvironment && _react2.default.createElement(
|
1429
|
-
_antd.Modal,
|
1430
|
-
{
|
1431
|
-
visible: showModal,
|
1432
|
-
onCancel: this.closeFrameModal,
|
1433
|
-
width: '99%',
|
1434
|
-
height: '99%',
|
1435
|
-
footer: null
|
1436
|
-
},
|
1437
|
-
_react2.default.createElement('iframe', { src: modalURL, width: '100%', height: screenHeight, frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true' })
|
1438
|
-
),
|
1439
|
-
_react2.default.createElement(
|
1440
|
-
_antd.Modal,
|
1441
|
-
{
|
1442
|
-
title: '更多',
|
1443
|
-
className: 'portal-container-modal-more',
|
1444
|
-
visible: showMoreModal,
|
1445
|
-
onCancel: this.closeMoreModal,
|
1446
|
-
width: 800,
|
1447
|
-
height: 375,
|
1448
|
-
footer: null,
|
1449
|
-
centered: true,
|
1450
|
-
maskClosable: false,
|
1451
|
-
keyboard: false
|
1452
|
-
},
|
1453
|
-
this.createMoreNode()
|
1440
|
+
'div',
|
1441
|
+
{ className: 'portal-center-content' },
|
1442
|
+
this.createCenterNode()
|
1443
|
+
)
|
1444
|
+
),
|
1445
|
+
this.createRightNode()
|
1454
1446
|
)
|
1455
|
-
)
|
1456
|
-
|
1447
|
+
),
|
1448
|
+
_react2.default.createElement(
|
1449
|
+
'div',
|
1450
|
+
{ className: loadTcPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide' },
|
1451
|
+
_react2.default.createElement('iframe', { src: loadTcURL, width: '100%', height: '93%', frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true', id: 'external-frame-tc' })
|
1452
|
+
),
|
1453
|
+
this.isMobileEnvironment && _react2.default.createElement(
|
1454
|
+
_antd.Modal,
|
1455
|
+
{
|
1456
|
+
visible: showModal,
|
1457
|
+
onCancel: this.closeFrameModal,
|
1458
|
+
width: '99%',
|
1459
|
+
height: '99%',
|
1460
|
+
footer: null
|
1461
|
+
},
|
1462
|
+
_react2.default.createElement('iframe', { src: modalURL, width: '100%', height: screenHeight, frameborder: 'no', border: '0', marginwidth: '0', marginheight: '0', scrolling: 'yes', allowtransparency: 'true' })
|
1463
|
+
),
|
1464
|
+
_react2.default.createElement(
|
1465
|
+
_antd.Modal,
|
1466
|
+
{
|
1467
|
+
title: '更多',
|
1468
|
+
className: 'portal-container-modal-more',
|
1469
|
+
visible: showMoreModal,
|
1470
|
+
onCancel: this.closeMoreModal,
|
1471
|
+
width: 800,
|
1472
|
+
height: 375,
|
1473
|
+
footer: null,
|
1474
|
+
centered: true,
|
1475
|
+
maskClosable: false,
|
1476
|
+
keyboard: false
|
1477
|
+
},
|
1478
|
+
this.createMoreNode()
|
1479
|
+
)
|
1480
|
+
);
|
1481
|
+
}
|
1457
1482
|
return htmlContent;
|
1458
1483
|
}
|
1459
1484
|
}]);
|