tplus-portaltouch 3.44.3 → 3.44.4

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.
@@ -185,6 +185,10 @@ var OnLineStatusToggle = (0, _mobxReact.observer)(function (props) {
185
185
  var networkState = networkCheckStore.networkState;
186
186
  var isOnLine = networkCheckStore.isOnLine;
187
187
  var hasUseOffline = isOfflineCash && !_mutantsUtil.platform.otherOfflineStatus; //是否允许离线
188
+
189
+ var _ref3 = _mutantsUtil.platform || {},
190
+ isHorizontalSunMi = _ref3.isHorizontalSunMi;
191
+
188
192
  var iconName = 'WiFi';
189
193
  if (hasUseOffline) {
190
194
  var weakConfirm = function weakConfirm() {
@@ -266,9 +270,9 @@ var OnLineStatusToggle = (0, _mobxReact.observer)(function (props) {
266
270
  function getVoucherDataStatus() {
267
271
  var data = voucherStore.getVoucherData();
268
272
 
269
- var _ref3 = data || {},
270
- Idmember = _ref3.Idmember,
271
- RetailDetails = _ref3.RetailDetails;
273
+ var _ref4 = data || {},
274
+ Idmember = _ref4.Idmember,
275
+ RetailDetails = _ref4.RetailDetails;
272
276
 
273
277
  if (!!Idmember || RetailDetails && RetailDetails.length > 0) {
274
278
  return true;
@@ -338,7 +342,7 @@ var OnLineStatusToggle = (0, _mobxReact.observer)(function (props) {
338
342
  'pre',
339
343
  null,
340
344
  _offlinePointDesc.OFFLINE_POINT_DESC
341
- ), trigger: 'hover' },
345
+ ), trigger: isHorizontalSunMi ? 'click' : 'hover' },
342
346
  _react2.default.createElement(
343
347
  'span',
344
348
  { className: 'status-tog-btn' },
@@ -365,7 +369,7 @@ function RetailUpload() {
365
369
 
366
370
  var refModal = (0, _react.useRef)(null);
367
371
  var showModal = function () {
368
- var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
372
+ var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
369
373
  return _regenerator2.default.wrap(function _callee$(_context) {
370
374
  while (1) {
371
375
  switch (_context.prev = _context.next) {
@@ -382,12 +386,12 @@ function RetailUpload() {
382
386
  }));
383
387
 
384
388
  return function showModal() {
385
- return _ref4.apply(this, arguments);
389
+ return _ref5.apply(this, arguments);
386
390
  };
387
391
  }();
388
392
 
389
393
  var handleOk = function () {
390
- var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
394
+ var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
391
395
  var isUpLoad = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
392
396
  return _regenerator2.default.wrap(function _callee2$(_context2) {
393
397
  while (1) {
@@ -449,7 +453,7 @@ function RetailUpload() {
449
453
  }));
450
454
 
451
455
  return function handleOk() {
452
- return _ref5.apply(this, arguments);
456
+ return _ref6.apply(this, arguments);
453
457
  };
454
458
  }();
455
459
 
@@ -508,7 +512,7 @@ function RetailDownload() {
508
512
  setDownStr = _useState10[1];
509
513
 
510
514
  var handleDownLoad = function () {
511
- var _ref6 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
515
+ var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
512
516
  var result;
513
517
  return _regenerator2.default.wrap(function _callee3$(_context3) {
514
518
  while (1) {
@@ -571,7 +575,7 @@ function RetailDownload() {
571
575
  }));
572
576
 
573
577
  return function handleDownLoad() {
574
- return _ref6.apply(this, arguments);
578
+ return _ref7.apply(this, arguments);
575
579
  };
576
580
  }();
577
581
  return _react2.default.createElement(
@@ -757,8 +761,8 @@ function HeadContent(props, context) {
757
761
  };
758
762
 
759
763
  var setInventoryFocus = function setInventoryFocus() {
760
- var _ref7 = _mutantsUtil.platform || {},
761
- isHorizontalPad = _ref7.isHorizontalPad;
764
+ var _ref8 = _mutantsUtil.platform || {},
765
+ isHorizontalPad = _ref8.isHorizontalPad;
762
766
 
763
767
  if (!!isHorizontalPad) return;
764
768
  var doms = document.getElementsByClassName('app hot-key-focus-container');
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-portaltouch/components/header/headContent.js"],"names":["HeadContent","Item","Menu","defaultFromat","t","i18n","getFixedT","UPLOAD_BASE_PATH","NETWORK_THEME_PATH","PLACE_ORDER_PATH","weakRemindNum","WEAK_STANDARD_NUM","HeadTime","props","time","dateFormat","unMount","timeStr","Date","now","currentTime","setCurrentTime","timeout","refreshDate","setTimeout","clearTimeout","split","date_YMD","date_HMS","platform","isVerticalTouch","OnLineStatus","networkStatus","networkCheckStore","stores","networkState","networkOn","iconName","switchNetwork","checked","event","switchOnLine","lineIcon","marginRight","getIsOffNetWork","OnLineStatusToggle","isShowUploadBtnsByRouter","isResetNetWorkTheme","isOfflineCash","isPlaceOrderPage","offlineSys","voucherStore","isOnLine","hasUseOffline","otherOfflineStatus","weakConfirm","document","querySelector","getDataIsOffline","ModalWraper","confirm","className","title","content","onOk","setOffLine","switchStatus","Message","tip","getVoucherDataStatus","data","getVoucherData","Idmember","RetailDetails","length","status","playStatus","setIsOffline","clearVoucherData","color","OFFLINE_POINT_DESC","RetailUpload","isModalVisible","setIsModalVisible","isUpLoading","setIsUpLoading","refModal","showModal","current","fetch","handleOk","isUpLoad","uploadRetail","error","handleCancel","UnLoadNum","retailNotUploadNumber","display","RetailDownload","isDownload","setIsDownload","downStr","setDownStr","handleDownLoad","downloadCatcherData","e","percent","result","success","DownloadBtn","releaseDate","releaseVersion","__RELEASESDATE__","__BUILDVERSION__","context","isElectron","env","businessName","storeName","posCode","logo","style","history","solt","isPortal","isLogin","menu","onClick","location","themeVisible","setThemeVisible","window","href","indexOf","setIsShowUploadBtnsByRouter","pathname","setIsResetNetWorkTheme","setIsPlaceOrderPage","listen","route","menuProps","menus","map","item","i","key","icon","controlConfig","type","beforeEvent","Loading","show","node","delay","actionHook","actionChange","User","logout","nativeMs","doWindow","clear","localStore","remove","splitUser","value","regEmail","RegExp","isEmail","test","setInventoryFocus","isHorizontalPad","doms","getElementsByClassName","input","getElementById","console","log","focus","clickTheme","isShow","userName","overlayClassName","moreInfoNode","headControlNode","v","width","height","replace","preventDefault","contextTypes","PropTypes","object"],"mappings":";;;;;;;;;;;;;;;;;;;;;;kBA2UwBA,W;;AA3UxB;;;;AACA;;AACA;;AACA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;AAEA;;AACA;;;;IACQC,I,GAASC,U,CAATD,I;;AACR,IAAME,gBAAgB,qBAAtB;AACA,IAAMC,IAAIC,qBAAKC,SAAL,CAAe,IAAf,EAAqB,WAArB,CAAV;AACA,IAAMC,mBAAmB,QAAzB;AACA,IAAMC,qBAAqB,GAA3B;AACA,IAAMC,mBAAmB,UAAzB;AACA,IAAIC,gBAAgB,CAApB,C,CAAsB;AACtB,IAAMC,oBAAoB,CAA1B,C,CAA6B;;AAE7B;AACA,SAASC,QAAT,CAAkBC,KAAlB,EAAyB;AAAA,MACfC,IADe,GACMD,KADN,CACfC,IADe;AAAA,MACTC,UADS,GACMF,KADN,CACTE,UADS;;AAEvB,MAAIC,UAAU,KAAd;AACA,MAAMC,UAAU,OAAOH,IAAP,KAAgB,QAAhB,GAA2B,uBAAWA,IAAX,EAAiBC,UAAjB,CAA3B,GAA0DD,IAA1E;;AAHuB,kBAIe,qBAAS,uBAAWI,KAAKC,GAAL,EAAX,EAAuBJ,UAAvB,CAAT,CAJf;AAAA;AAAA,MAIhBK,WAJgB;AAAA,MAIHC,cAJG;;AAKvB,MAAIC,gBAAJ;AACA,WAASC,WAAT,GAAuB;AACrB,QAAIT,IAAJ,EAAU;AACV,KAACE,OAAD,IAAYK,eAAe,uBAAWH,KAAKC,GAAL,EAAX,EAAuBJ,UAAvB,CAAf,CAAZ;AACAO,cAAUE,WAAWD,WAAX,EAAwB,IAAxB,CAAV;AACD;AACD,wBAAU,YAAM;AACdA;AACA,WAAO,YAAM;AACXP,gBAAU,IAAV;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QAAV;AAAP;AAA1B;AADF,WADF;AAIE,+CAAG,WAAU,sBAAb;AAJF;AAPyB,OAF7B;AAgBG,OAACvD,OAAD,IAAY;AAAA;AAAA,UAAK,WAAU,iBAAf;AAAkCF;AAAlC,OAhBf;AAiBE,oCAAC,QAAD,IAAU,MAAM7G,IAAhB,EAAsB,YAAYC,UAAlC;AAjBF,KAZM;AA+BN,kCAAC,oBAAD;AACI,eAASkH,YADb;AAEI,kBAAYpG,sBAASC,eAFzB;AAGI,gBAAU8F,QAHd;AAII,eAAS,iBAACuD,MAAD;AAAA,eAAYD,WAAWC,MAAX,CAAZ;AAAA;AAJb;AA/BM,GAAR;AAsCD;;AAEDnL,YAAY6L,YAAZ,GAA2B;AACzBnC,cAAYoC,oBAAUC;AADG,CAA3B","file":"headContent.js","sourcesContent":["import React, { useState, useEffect, useRef } from 'react';\nimport { Ticon, ModalWraper, Loading, Spin, Message } from 'tplus-components-touch';\nimport { Tooltip, Menu, Dropdown, Switch, Popover } from 'antd';\nimport PropTypes from 'prop-types';\nimport { formatDate } from '../../utils';\nimport { env, nativeMs, localStore, i18n } from 'mutants-microfx';\nimport { PosInitData } from 'tplus-poslogin';\nimport { User } from 'tplus-api';\nimport { verticalHeadTime, verticalHeadContent } from './vertical-touch';\nimport { platform } from 'mutants-util';\nimport ThemeModal from \"./themeModal\";\nimport UploadOrder from \"./uploadList\";\nimport {stores} from 'mutants-microfx';\nimport {observer} from 'mobx-react';\nimport {OFFLINE_POINT_DESC} from './offlinePointDesc';\nconst { Item } = Menu;\nconst defaultFromat = 'yyyy-MM-dd hh:mm:ss';\nconst t = i18n.getFixedT(null, 'newretail');\nconst UPLOAD_BASE_PATH = '/login';\nconst NETWORK_THEME_PATH = \"/\";\nconst PLACE_ORDER_PATH = \"/RE/RE01\";\nlet weakRemindNum = 0;// 弱网提示初始值\nconst WEAK_STANDARD_NUM = 3; // 弱网提示的次数上限\n\n//头部时间\nfunction HeadTime(props) {\n const { time, dateFormat } = props;\n let unMount = false;\n const timeStr = typeof time === 'number' ? formatDate(time, dateFormat) : time;\n const [currentTime, setCurrentTime] = useState(formatDate(Date.now(), dateFormat));\n let timeout;\n function refreshDate() {\n if (time) return;\n !unMount && setCurrentTime(formatDate(Date.now(), dateFormat));\n timeout = setTimeout(refreshDate, 1000);\n }\n useEffect(() => {\n refreshDate();\n return () => {\n unMount = true;\n clearTimeout(timeout);\n };\n }, [currentTime]);\n const [date_YMD, date_HMS] = currentTime.split(' ') || [];\n\n if (platform.isVerticalTouch) return verticalHeadTime({ date_HMS });\n return (\n <div className='time'>\n {timeStr ?\n <div>{timeStr}</div> :\n <div>\n {date_YMD}\n <span>{date_HMS}</span>\n </div>\n }\n </div>\n );\n}\n\n//头部联网状态\nconst OnLineStatus = observer((props)=>{\n const { networkStatus } = props;\n const { networkCheckStore } = stores;\n const networkState = networkCheckStore.networkState;\n let networkOn = true;\n let iconName = 'WiFi';\n switch (networkState) {\n case '联网':\n iconName = 'WiFi';\n break;\n case '弱网':\n iconName = 'ruowifi';\n break;\n case '离线':\n networkOn = false;\n iconName = 'wuwangluo';\n break;\n default:\n break;\n }\n const switchNetwork = (checked ,event)=>{\n networkCheckStore.switchOnLine(checked);\n }\n const lineIcon = <Ticon\n icon={iconName}\n className=\"network-state-icon\"\n />\n return (\n <div><span className='network-status' style={{marginRight:'10px'}}>{networkStatus || lineIcon}</span><span><Switch checkedChildren=\"开启\" unCheckedChildren=\"关闭\" defaultChecked checked={networkOn} onChange={switchNetwork}/></span></div>\n );\n});\nfunction getIsOffNetWork() {\n const { networkCheckStore } = stores;\n return networkCheckStore.networkState === '离线';\n}\n//头部联网状态\nconst OnLineStatusToggle = observer(props => {\n const { isShowUploadBtnsByRouter, isResetNetWorkTheme, isOfflineCash, isPlaceOrderPage } = props;\n const { networkCheckStore, offlineSys, voucherStore } = stores;\n const networkState = networkCheckStore.networkState;\n let isOnLine = networkCheckStore.isOnLine;\n const hasUseOffline = isOfflineCash && !platform.otherOfflineStatus; //是否允许离线\n let iconName = 'WiFi';\n if (hasUseOffline) {\n switch (networkState) {\n case '联网':\n iconName = 'WiFi';\n break;\n case '弱网':\n iconName = 'ruowifi';\n break;\n case '离线':\n iconName = 'wuwangluo';\n break;\n default:\n break;\n }\n if (networkState === '离线' && isOnLine && !document.querySelector('.tplus-off-line-modal')) {\n ModalWraper.confirm({\n className: 'tplus-off-line-modal',\n title: t('提示'),\n content: t('网络已断,是否切换到离线收银模式?'),\n onOk: () => {\n setOffLine(true);\n }\n });\n }\n function weakConfirm() {\n if (!isOnLine) { return; }// 离线不提示\n if (document.querySelector('.tplus-weak-network-modal')) { return; }// 不重复弹窗\n if (networkState !== '弱网') { return; } // 非弱网状态不提示\n if (weakRemindNum >= WEAK_STANDARD_NUM) { return; } // 提示大于三次不再提示\n if (!offlineSys.getDataIsOffline) { return; }// 数据未下载完不提示\n if (document.querySelector('.isRetailUpLoading')) { return; }// 上传中不提示\n if (document.querySelector('.isRetailDownLoading')) { return; }// 下载中不提示\n if (document.querySelector('.tplus-loading')) { return; }// 全屏loading不提示\n weakRemindNum ++;\n ModalWraper.confirm({\n className: 'tplus-weak-network-modal',\n title: t('提示'),\n content: t('当前网络不好,是否切换到离线?'),\n onOk: () => {\n setOffLine(true);\n }\n });\n }\n weakConfirm();\n }\n function switchStatus() {\n if (networkState === '离线' && !isOnLine) {\n Message.tip('当前无网络,无法切换为在线状态');\n return;\n }\n ModalWraper.confirm({\n title: t('提示'),\n content: t(`确定要切换为${isOnLine ? '离' : '在'}线环境吗?`),\n onOk: () => {\n setOffLine(isOnLine);\n }\n });\n }\n\n function getVoucherDataStatus() {\n let data = voucherStore.getVoucherData();\n const { Idmember, RetailDetails } = data || {};\n if (!!Idmember || (RetailDetails && RetailDetails.length > 0)) {\n return true;\n }\n return false;\n }\n\n function setOffLine(status) {\n if (isPlaceOrderPage && getVoucherDataStatus()) {\n ModalWraper.confirm({\n title: t('提示'),\n content: t(`当前为开单界面,切换到${status ? '离' : '在'}线会清除当前数据,确定要切换吗?`),\n onOk: () => {\n playStatus(status);\n }\n });\n } else {\n playStatus(status);\n }\n }\n\n function playStatus(status) {\n // status 为 true 是在线切离线\n if (status) {\n if (!offlineSys.getDataIsOffline() || document.querySelector('.isRetailDownLoading')) {\n Message.tip('数据还未下载完,无法切换为离线');\n return;\n }\n }\n offlineSys.setIsOffline(status);\n if (isPlaceOrderPage) {\n voucherStore.clearVoucherData();\n }\n }\n return (\n <div className='on-off-wrap'>\n <div className='status-square'>\n <span className=\"status-tog-btn\" style={{color: `${isResetNetWorkTheme ? '#fff' : ''}`}}>{<Ticon icon={iconName}/>}</span>\n </div>\n {\n hasUseOffline && isShowUploadBtnsByRouter && <div className={`status-square c-pointer online-status-bg ${isOnLine || isResetNetWorkTheme ? '' : 'off-line'}`}>\n <span className=\"status-tog-btn\" onClick={switchStatus}>\n <span>{isOnLine ? '在线' : '离线'}</span>\n <span>{<Ticon icon=\"zaixianlixian\" className=\"ts-14\" />}</span>\n </span>\n <Popover placement=\"bottom\" overlayClassName={'offline-popver'} content={<pre>{OFFLINE_POINT_DESC}</pre>} trigger=\"hover\">\n <span className=\"status-tog-btn\">{<Ticon icon=\"tanhao1\" />}</span>\n </Popover>\n </div>\n }\n </div>\n );\n});\n\n//零售单上传\nfunction RetailUpload() {\n const [isModalVisible, setIsModalVisible] = useState(false);\n const [isUpLoading, setIsUpLoading] = useState(false);\n const refModal = useRef(null);\n const showModal = async () => {\n refModal && refModal.current.fetch();\n setIsModalVisible(true);\n };\n\n const handleOk = async (isUpLoad = false) => {\n setIsModalVisible(false);\n if (getIsOffNetWork()) {\n Message.tip('已断网,不可以上传单据');\n return;\n }\n if (!isUpLoad) {\n Message.tip('暂无可以上传的单据');\n return;\n }\n if (isUpLoading) {\n Message.tip('零售单正在上传……');\n return;\n }\n setIsUpLoading(true);\n try {\n await stores.offlineSys.uploadRetail();\n // Message.success('零售单上传成功');\n } catch (err) {\n Message.error('上传失败');\n }\n setIsUpLoading(false);\n };\n\n const handleCancel = () => {\n setIsModalVisible(false);\n };\n return (\n <div className='upload-retail'>\n <div className=\"status-square online-status-bg c-pointer\" onClick={showModal}>\n <span className=\"status-tog-btn\">\n <span className={`${isUpLoading ? 'isRetailUpLoading' : ''}`}>{<Ticon icon=\"shangchuan\"/>}</span>\n <span className=\"fast-upload-btn\">上传零售单</span>\n </span>\n </div>\n <UnLoadNum/>\n <UploadOrder ref={refModal} visible={isModalVisible} handleOk={handleOk} handleCancel={handleCancel}/>\n </div>\n );\n}\n// 零售单未上传的数量\nconst UnLoadNum = observer(() => {\n const {offlineSys: {retailNotUploadNumber} } = stores;\n return <span style={{display: retailNotUploadNumber > 0 ? 'inherit' : 'none'}} className=\"up-count-btn\">{retailNotUploadNumber > 99 ? '99+' : retailNotUploadNumber}</span>\n});\n//零售单下载\nfunction RetailDownload() {\n const {offlineSys} = stores;\n const [isDownload, setIsDownload] = useState(false);\n const [downStr, setDownStr] = useState('下载数据');\n const handleDownLoad = async () => {\n if (getIsOffNetWork()) {\n Message.tip('已断网,不可以下载单据');\n return;\n }\n if (isDownload) {\n Message.tip('下载中');\n return;\n }\n setDownStr('0 %');\n setIsDownload(true);\n Message.tip('下载中');\n try {\n let result = await offlineSys.downloadCatcherData(e => {\n setDownStr(e.percent + ' %');\n });\n if (result) {\n Message.success(`数据下载成功`);\n } else {\n Message.error(`数据下载失败`);\n }\n } catch(err){\n Message.error('数据下载失败');\n }\n setDownStr('下载数据');\n setIsDownload(false);\n };\n return (\n <div className='download-retail'>\n <DownloadBtn handleDownLoad={handleDownLoad} isDownload={isDownload} downStr={downStr}/>\n </div>\n );\n};\n// 下载按钮\nconst DownloadBtn = observer((props) => {\n const { downStr, isDownload, handleDownLoad} = props;\n return (\n <div className={`status-square online-status-bg c-pointer ${getIsOffNetWork() ? 'is-grey' : ''}`} onClick={handleDownLoad}>\n <span className=\"status-tog-btn\">\n <span className={`${isDownload ? 'isRetailDownLoading' : ''}`}>{<Ticon icon=\"xiazaishuju\"/>}</span>\n <span className=\"fast-upload-btn\">{downStr}</span>\n </span>\n </div>\n )\n});\nlet releaseDate, releaseVersion;\ntry {\n releaseDate = __RELEASESDATE__;\n releaseVersion = __BUILDVERSION__;\n} catch (error) {\n releaseDate = '';\n releaseVersion = '';\n}\nexport default function HeadContent(props, context) {\n const isElectron = (env || {}).platform === 'electron';\n const {businessName = '', storeName = '', posCode, logo, networkStatus, style = {}, history,\n dateFormat = defaultFromat, solt, time, isPortal, isLogin, menu = [], onClick, location} = props;\n const [themeVisible, setThemeVisible] = useState(false);\n const [isShowUploadBtnsByRouter, setIsShowUploadBtnsByRouter] = useState(window.location.href.indexOf(UPLOAD_BASE_PATH) < 0);\n const [isResetNetWorkTheme, setIsResetNetWorkTheme] = useState(window.location.pathname === NETWORK_THEME_PATH);\n const [isPlaceOrderPage, setIsPlaceOrderPage] = useState(window.location.href.indexOf(PLACE_ORDER_PATH) > 0);\n props.history.listen(route => {\n setIsResetNetWorkTheme(route.pathname === NETWORK_THEME_PATH);\n setIsShowUploadBtnsByRouter(route.pathname.indexOf(UPLOAD_BASE_PATH) < 0);\n setIsPlaceOrderPage(route.pathname.indexOf(PLACE_ORDER_PATH) > -1)\n });\n const hasUseOffline = (PosInitData('IsOfflineCash') === \"1\") && !platform.otherOfflineStatus; //是否允许离线\n const menuProps = {onClick};\n const menus = (\n <Menu {...menuProps}>\n {menu.map((item, i) =>\n <Item key={item.key || i}>\n {item.icon && <Ticon icon={item.icon}/>}\n <span>{item.title}</span>\n </Item>)\n }\n </Menu>\n );\n\n const controlConfig = [\n {type: 'suoxiao', event: 'min'},\n {\n type: 'guanbixiao',\n event: 'close',\n beforeEvent: (item) => {\n return ModalWraper.confirm({\n className: 'tplus-confirm-modal',\n title: '关闭提示',\n content: '您确定要关闭应用吗?',\n async onOk() {\n Loading.show({\n className: 'close-app-loading',\n node: <div className='close-app-spin'>\n <Spin scale={1.2} type='shape' visible />\n <h1>应用关闭中...</h1>\n </div>,\n delay: false\n });\n context.actionHook.actionChange('close-app');\n try {\n await User.logout(() => {\n // 需要为500ms 时间短可能会不能正常注销清理\n setTimeout(() => { nativeMs.doWindow(item.event) }, 500); \n });\n } catch (err) {\n User.clear(); localStore.remove('user');\n setTimeout(() => { nativeMs.doWindow(item.event) }, 500);\n }\n }\n })\n }\n },\n ];\n\n const splitUser = (value) => {\n const regEmail = new RegExp('^[A-Za-zd0-9]+([-_.][A-Za-zd0-9]+)*@([A-Za-zd0-9]+[-.])+[A-Za-zd]{2,5}$');\n const isEmail = regEmail.test(value);\n\n if (isEmail) {\n return value.split('@')[0];\n }\n return value;\n }\n\n const setInventoryFocus = () => {\n const { isHorizontalPad } = platform || {};\n if (!!isHorizontalPad) return;\n let doms = document.getElementsByClassName('app hot-key-focus-container');\n let input = document.getElementById('productPoint');\n if (input) setTimeout(() => { if (doms && doms.length > 0) { console.log('headContent--商品焦点==Focus==');input.focus() } }, 300)\n }\n\n const clickTheme = (isShow) => {\n setThemeVisible(isShow)\n }\n\n const userName = PosInitData('UserName');\n const overlayClassName = `_portal-header-dropdown ${!isPortal ? 'inside-header' : ''}`;\n const moreInfoNode = <div className='pos-more-info-container'>\n <h1 className='business-name'>{businessName}</h1>\n <h1 className='store-code'>{posCode}</h1>\n </div>\n\n const headControlNode = <div className=\"head-content-control\">\n {controlConfig.map(v => <Ticon\n type={v.type}\n key={v.type}\n onClick={() => {\n if (nativeMs) {\n const {beforeEvent} = v;\n if (beforeEvent) {\n return beforeEvent(v);\n }\n nativeMs.doWindow(v.event)\n if (typeof setInventoryFocus == 'function') {\n setInventoryFocus()\n }\n }\n }}\n />)}\n </div>\n\n if (platform.isVerticalTouch) return verticalHeadContent({ style, releaseVersion, releaseDate,\n time, dateFormat, logo, HeadTime, headControlNode, location, history, clickTheme, themeVisible, isPortal, isLogin });\n\n return (<div style={{display: 'inline-block', width: '100%', height: '100%', ...style}} className='head-content' data-release={`${releaseVersion} ${releaseDate}`}>\n <div className=\"head-content-left\">\n {!!logo && <div className='business-logo' onClick={()=>{history.replace('/')}}>{logo}</div>}\n {!!storeName && <Tooltip trigger=\"click\" placement=\"bottomRight\" title={moreInfoNode} color={'#fff'} overlayClassName='head-business-tip'>\n <div className='store-name'>{storeName}<i className='header-triangle-down' /></div>\n </Tooltip>}\n {/* <OnLineStatus networkStatus={networkStatus}/> */}\n <OnLineStatusToggle isShowUploadBtnsByRouter={isShowUploadBtnsByRouter} isResetNetWorkTheme={isResetNetWorkTheme} isOfflineCash={hasUseOffline} isPlaceOrderPage={isPlaceOrderPage}/>\n {hasUseOffline && isShowUploadBtnsByRouter && <RetailUpload />}\n {hasUseOffline && isShowUploadBtnsByRouter && <RetailDownload />}\n </div>\n {isElectron && headControlNode}\n <div className=\"head-content-right\">\n {!isLogin && <Ticon icon=\"huanfu\" className={`theme-icon ${!isPortal ? 'pos-page' : ''}` } onClick={() => {clickTheme(true)}}/>}\n {!isLogin && !!userName && <Dropdown\n overlayClassName={overlayClassName}\n trigger={['click']}\n overlay={menus}\n placement=\"bottomRight\"\n arrow\n >\n <div className='header-info-render-content' onClick={e => e.preventDefault()}>\n <div className='store-info-item'>\n <p className='biller'>开单员:<span>{splitUser(userName)}</span></p>\n </div>\n <i className='header-triangle-down'/>\n </div>\n </Dropdown>}\n {!isLogin && <div className='store-info-item'>{solt}</div>}\n <HeadTime time={time} dateFormat={dateFormat}/>\n </div>\n <ThemeModal\n visible={themeVisible}\n isVertical={platform.isVerticalTouch}\n isPortal={isPortal}\n closeFn={(isShow) => clickTheme(isShow)}\n />\n </div>);\n}\n\nHeadContent.contextTypes = {\n actionHook: PropTypes.object,\n}\n"]}
1
+ {"version":3,"sources":["tplus-portaltouch/components/header/headContent.js"],"names":["HeadContent","Item","Menu","defaultFromat","t","i18n","getFixedT","UPLOAD_BASE_PATH","NETWORK_THEME_PATH","PLACE_ORDER_PATH","weakRemindNum","WEAK_STANDARD_NUM","HeadTime","props","time","dateFormat","unMount","timeStr","Date","now","currentTime","setCurrentTime","timeout","refreshDate","setTimeout","clearTimeout","split","date_YMD","date_HMS","platform","isVerticalTouch","OnLineStatus","networkStatus","networkCheckStore","stores","networkState","networkOn","iconName","switchNetwork","checked","event","switchOnLine","lineIcon","marginRight","getIsOffNetWork","OnLineStatusToggle","isShowUploadBtnsByRouter","isResetNetWorkTheme","isOfflineCash","isPlaceOrderPage","offlineSys","voucherStore","isOnLine","hasUseOffline","otherOfflineStatus","isHorizontalSunMi","weakConfirm","document","querySelector","getDataIsOffline","ModalWraper","confirm","className","title","content","onOk","setOffLine","switchStatus","Message","tip","getVoucherDataStatus","data","getVoucherData","Idmember","RetailDetails","length","status","playStatus","setIsOffline","clearVoucherData","color","OFFLINE_POINT_DESC","RetailUpload","isModalVisible","setIsModalVisible","isUpLoading","setIsUpLoading","refModal","showModal","current","fetch","handleOk","isUpLoad","uploadRetail","error","handleCancel","UnLoadNum","retailNotUploadNumber","display","RetailDownload","isDownload","setIsDownload","downStr","setDownStr","handleDownLoad","downloadCatcherData","e","percent","result","success","DownloadBtn","releaseDate","releaseVersion","__RELEASESDATE__","__BUILDVERSION__","context","isElectron","env","businessName","storeName","posCode","logo","style","history","solt","isPortal","isLogin","menu","onClick","location","themeVisible","setThemeVisible","window","href","indexOf","setIsShowUploadBtnsByRouter","pathname","setIsResetNetWorkTheme","setIsPlaceOrderPage","listen","route","menuProps","menus","map","item","i","key","icon","controlConfig","type","beforeEvent","Loading","show","node","delay","actionHook","actionChange","User","logout","nativeMs","doWindow","clear","localStore","remove","splitUser","value","regEmail","RegExp","isEmail","test","setInventoryFocus","isHorizontalPad","doms","getElementsByClassName","input","getElementById","console","log","focus","clickTheme","isShow","userName","overlayClassName","moreInfoNode","headControlNode","v","width","height","replace","preventDefault","contextTypes","PropTypes","object"],"mappings":";;;;;;;;;;;;;;;;;;;;;;kBA4UwBA,W;;AA5UxB;;;;AACA;;AACA;;AACA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;AAEA;;AACA;;;;IACQC,I,GAASC,U,CAATD,I;;AACR,IAAME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ZM;AA+BN,kCAAC,oBAAD;AACI,eAASmH,YADb;AAEI,kBAAYrG,sBAASC,eAFzB;AAGI,gBAAU+F,QAHd;AAII,eAAS,iBAACuD,MAAD;AAAA,eAAYD,WAAWC,MAAX,CAAZ;AAAA;AAJb;AA/BM,GAAR;AAsCD;;AAEDpL,YAAY8L,YAAZ,GAA2B;AACzBnC,cAAYoC,oBAAUC;AADG,CAA3B","file":"headContent.js","sourcesContent":["import React, { useState, useEffect, useRef } from 'react';\nimport { Ticon, ModalWraper, Loading, Spin, Message } from 'tplus-components-touch';\nimport { Tooltip, Menu, Dropdown, Switch, Popover } from 'antd';\nimport PropTypes from 'prop-types';\nimport { formatDate } from '../../utils';\nimport { env, nativeMs, localStore, i18n } from 'mutants-microfx';\nimport { PosInitData } from 'tplus-poslogin';\nimport { User } from 'tplus-api';\nimport { verticalHeadTime, verticalHeadContent } from './vertical-touch';\nimport { platform } from 'mutants-util';\nimport ThemeModal from \"./themeModal\";\nimport UploadOrder from \"./uploadList\";\nimport {stores} from 'mutants-microfx';\nimport {observer} from 'mobx-react';\nimport {OFFLINE_POINT_DESC} from './offlinePointDesc';\nconst { Item } = Menu;\nconst defaultFromat = 'yyyy-MM-dd hh:mm:ss';\nconst t = i18n.getFixedT(null, 'newretail');\nconst UPLOAD_BASE_PATH = '/login';\nconst NETWORK_THEME_PATH = \"/\";\nconst PLACE_ORDER_PATH = \"/RE/RE01\";\nlet weakRemindNum = 0;// 弱网提示初始值\nconst WEAK_STANDARD_NUM = 3; // 弱网提示的次数上限\n\n//头部时间\nfunction HeadTime(props) {\n const { time, dateFormat } = props;\n let unMount = false;\n const timeStr = typeof time === 'number' ? formatDate(time, dateFormat) : time;\n const [currentTime, setCurrentTime] = useState(formatDate(Date.now(), dateFormat));\n let timeout;\n function refreshDate() {\n if (time) return;\n !unMount && setCurrentTime(formatDate(Date.now(), dateFormat));\n timeout = setTimeout(refreshDate, 1000);\n }\n useEffect(() => {\n refreshDate();\n return () => {\n unMount = true;\n clearTimeout(timeout);\n };\n }, [currentTime]);\n const [date_YMD, date_HMS] = currentTime.split(' ') || [];\n\n if (platform.isVerticalTouch) return verticalHeadTime({ date_HMS });\n return (\n <div className='time'>\n {timeStr ?\n <div>{timeStr}</div> :\n <div>\n {date_YMD}\n <span>{date_HMS}</span>\n </div>\n }\n </div>\n );\n}\n\n//头部联网状态\nconst OnLineStatus = observer((props)=>{\n const { networkStatus } = props;\n const { networkCheckStore } = stores;\n const networkState = networkCheckStore.networkState;\n let networkOn = true;\n let iconName = 'WiFi';\n switch (networkState) {\n case '联网':\n iconName = 'WiFi';\n break;\n case '弱网':\n iconName = 'ruowifi';\n break;\n case '离线':\n networkOn = false;\n iconName = 'wuwangluo';\n break;\n default:\n break;\n }\n const switchNetwork = (checked ,event)=>{\n networkCheckStore.switchOnLine(checked);\n }\n const lineIcon = <Ticon\n icon={iconName}\n className=\"network-state-icon\"\n />\n return (\n <div><span className='network-status' style={{marginRight:'10px'}}>{networkStatus || lineIcon}</span><span><Switch checkedChildren=\"开启\" unCheckedChildren=\"关闭\" defaultChecked checked={networkOn} onChange={switchNetwork}/></span></div>\n );\n});\nfunction getIsOffNetWork() {\n const { networkCheckStore } = stores;\n return networkCheckStore.networkState === '离线';\n}\n//头部联网状态\nconst OnLineStatusToggle = observer(props => {\n const { isShowUploadBtnsByRouter, isResetNetWorkTheme, isOfflineCash, isPlaceOrderPage } = props;\n const { networkCheckStore, offlineSys, voucherStore } = stores;\n const networkState = networkCheckStore.networkState;\n let isOnLine = networkCheckStore.isOnLine;\n const hasUseOffline = isOfflineCash && !platform.otherOfflineStatus; //是否允许离线\n const { isHorizontalSunMi } = platform || {};\n let iconName = 'WiFi';\n if (hasUseOffline) {\n switch (networkState) {\n case '联网':\n iconName = 'WiFi';\n break;\n case '弱网':\n iconName = 'ruowifi';\n break;\n case '离线':\n iconName = 'wuwangluo';\n break;\n default:\n break;\n }\n if (networkState === '离线' && isOnLine && !document.querySelector('.tplus-off-line-modal')) {\n ModalWraper.confirm({\n className: 'tplus-off-line-modal',\n title: t('提示'),\n content: t('网络已断,是否切换到离线收银模式?'),\n onOk: () => {\n setOffLine(true);\n }\n });\n }\n function weakConfirm() {\n if (!isOnLine) { return; }// 离线不提示\n if (document.querySelector('.tplus-weak-network-modal')) { return; }// 不重复弹窗\n if (networkState !== '弱网') { return; } // 非弱网状态不提示\n if (weakRemindNum >= WEAK_STANDARD_NUM) { return; } // 提示大于三次不再提示\n if (!offlineSys.getDataIsOffline) { return; }// 数据未下载完不提示\n if (document.querySelector('.isRetailUpLoading')) { return; }// 上传中不提示\n if (document.querySelector('.isRetailDownLoading')) { return; }// 下载中不提示\n if (document.querySelector('.tplus-loading')) { return; }// 全屏loading不提示\n weakRemindNum ++;\n ModalWraper.confirm({\n className: 'tplus-weak-network-modal',\n title: t('提示'),\n content: t('当前网络不好,是否切换到离线?'),\n onOk: () => {\n setOffLine(true);\n }\n });\n }\n weakConfirm();\n }\n function switchStatus() {\n if (networkState === '离线' && !isOnLine) {\n Message.tip('当前无网络,无法切换为在线状态');\n return;\n }\n ModalWraper.confirm({\n title: t('提示'),\n content: t(`确定要切换为${isOnLine ? '离' : '在'}线环境吗?`),\n onOk: () => {\n setOffLine(isOnLine);\n }\n });\n }\n\n function getVoucherDataStatus() {\n let data = voucherStore.getVoucherData();\n const { Idmember, RetailDetails } = data || {};\n if (!!Idmember || (RetailDetails && RetailDetails.length > 0)) {\n return true;\n }\n return false;\n }\n\n function setOffLine(status) {\n if (isPlaceOrderPage && getVoucherDataStatus()) {\n ModalWraper.confirm({\n title: t('提示'),\n content: t(`当前为开单界面,切换到${status ? '离' : '在'}线会清除当前数据,确定要切换吗?`),\n onOk: () => {\n playStatus(status);\n }\n });\n } else {\n playStatus(status);\n }\n }\n\n function playStatus(status) {\n // status 为 true 是在线切离线\n if (status) {\n if (!offlineSys.getDataIsOffline() || document.querySelector('.isRetailDownLoading')) {\n Message.tip('数据还未下载完,无法切换为离线');\n return;\n }\n }\n offlineSys.setIsOffline(status);\n if (isPlaceOrderPage) {\n voucherStore.clearVoucherData();\n }\n }\n return (\n <div className='on-off-wrap'>\n <div className='status-square'>\n <span className=\"status-tog-btn\" style={{color: `${isResetNetWorkTheme ? '#fff' : ''}`}}>{<Ticon icon={iconName}/>}</span>\n </div>\n {\n hasUseOffline && isShowUploadBtnsByRouter && <div className={`status-square c-pointer online-status-bg ${isOnLine || isResetNetWorkTheme ? '' : 'off-line'}`}>\n <span className=\"status-tog-btn\" onClick={switchStatus}>\n <span>{isOnLine ? '在线' : '离线'}</span>\n <span>{<Ticon icon=\"zaixianlixian\" className=\"ts-14\" />}</span>\n </span>\n <Popover placement=\"bottom\" overlayClassName={'offline-popver'} content={<pre>{OFFLINE_POINT_DESC}</pre>} trigger={isHorizontalSunMi?'click':'hover'}>\n <span className=\"status-tog-btn\">{<Ticon icon=\"tanhao1\" />}</span>\n </Popover>\n </div>\n }\n </div>\n );\n});\n\n//零售单上传\nfunction RetailUpload() {\n const [isModalVisible, setIsModalVisible] = useState(false);\n const [isUpLoading, setIsUpLoading] = useState(false);\n const refModal = useRef(null);\n const showModal = async () => {\n refModal && refModal.current.fetch();\n setIsModalVisible(true);\n };\n\n const handleOk = async (isUpLoad = false) => {\n setIsModalVisible(false);\n if (getIsOffNetWork()) {\n Message.tip('已断网,不可以上传单据');\n return;\n }\n if (!isUpLoad) {\n Message.tip('暂无可以上传的单据');\n return;\n }\n if (isUpLoading) {\n Message.tip('零售单正在上传……');\n return;\n }\n setIsUpLoading(true);\n try {\n await stores.offlineSys.uploadRetail();\n // Message.success('零售单上传成功');\n } catch (err) {\n Message.error('上传失败');\n }\n setIsUpLoading(false);\n };\n\n const handleCancel = () => {\n setIsModalVisible(false);\n };\n return (\n <div className='upload-retail'>\n <div className=\"status-square online-status-bg c-pointer\" onClick={showModal}>\n <span className=\"status-tog-btn\">\n <span className={`${isUpLoading ? 'isRetailUpLoading' : ''}`}>{<Ticon icon=\"shangchuan\"/>}</span>\n <span className=\"fast-upload-btn\">上传零售单</span>\n </span>\n </div>\n <UnLoadNum/>\n <UploadOrder ref={refModal} visible={isModalVisible} handleOk={handleOk} handleCancel={handleCancel}/>\n </div>\n );\n}\n// 零售单未上传的数量\nconst UnLoadNum = observer(() => {\n const {offlineSys: {retailNotUploadNumber} } = stores;\n return <span style={{display: retailNotUploadNumber > 0 ? 'inherit' : 'none'}} className=\"up-count-btn\">{retailNotUploadNumber > 99 ? '99+' : retailNotUploadNumber}</span>\n});\n//零售单下载\nfunction RetailDownload() {\n const {offlineSys} = stores;\n const [isDownload, setIsDownload] = useState(false);\n const [downStr, setDownStr] = useState('下载数据');\n const handleDownLoad = async () => {\n if (getIsOffNetWork()) {\n Message.tip('已断网,不可以下载单据');\n return;\n }\n if (isDownload) {\n Message.tip('下载中');\n return;\n }\n setDownStr('0 %');\n setIsDownload(true);\n Message.tip('下载中');\n try {\n let result = await offlineSys.downloadCatcherData(e => {\n setDownStr(e.percent + ' %');\n });\n if (result) {\n Message.success(`数据下载成功`);\n } else {\n Message.error(`数据下载失败`);\n }\n } catch(err){\n Message.error('数据下载失败');\n }\n setDownStr('下载数据');\n setIsDownload(false);\n };\n return (\n <div className='download-retail'>\n <DownloadBtn handleDownLoad={handleDownLoad} isDownload={isDownload} downStr={downStr}/>\n </div>\n );\n};\n// 下载按钮\nconst DownloadBtn = observer((props) => {\n const { downStr, isDownload, handleDownLoad} = props;\n return (\n <div className={`status-square online-status-bg c-pointer ${getIsOffNetWork() ? 'is-grey' : ''}`} onClick={handleDownLoad}>\n <span className=\"status-tog-btn\">\n <span className={`${isDownload ? 'isRetailDownLoading' : ''}`}>{<Ticon icon=\"xiazaishuju\"/>}</span>\n <span className=\"fast-upload-btn\">{downStr}</span>\n </span>\n </div>\n )\n});\nlet releaseDate, releaseVersion;\ntry {\n releaseDate = __RELEASESDATE__;\n releaseVersion = __BUILDVERSION__;\n} catch (error) {\n releaseDate = '';\n releaseVersion = '';\n}\nexport default function HeadContent(props, context) {\n const isElectron = (env || {}).platform === 'electron';\n const {businessName = '', storeName = '', posCode, logo, networkStatus, style = {}, history,\n dateFormat = defaultFromat, solt, time, isPortal, isLogin, menu = [], onClick, location} = props;\n const [themeVisible, setThemeVisible] = useState(false);\n const [isShowUploadBtnsByRouter, setIsShowUploadBtnsByRouter] = useState(window.location.href.indexOf(UPLOAD_BASE_PATH) < 0);\n const [isResetNetWorkTheme, setIsResetNetWorkTheme] = useState(window.location.pathname === NETWORK_THEME_PATH);\n const [isPlaceOrderPage, setIsPlaceOrderPage] = useState(window.location.href.indexOf(PLACE_ORDER_PATH) > 0);\n props.history.listen(route => {\n setIsResetNetWorkTheme(route.pathname === NETWORK_THEME_PATH);\n setIsShowUploadBtnsByRouter(route.pathname.indexOf(UPLOAD_BASE_PATH) < 0);\n setIsPlaceOrderPage(route.pathname.indexOf(PLACE_ORDER_PATH) > -1)\n });\n const hasUseOffline = (PosInitData('IsOfflineCash') === \"1\") && !platform.otherOfflineStatus; //是否允许离线\n const menuProps = {onClick};\n const menus = (\n <Menu {...menuProps}>\n {menu.map((item, i) =>\n <Item key={item.key || i}>\n {item.icon && <Ticon icon={item.icon}/>}\n <span>{item.title}</span>\n </Item>)\n }\n </Menu>\n );\n\n const controlConfig = [\n {type: 'suoxiao', event: 'min'},\n {\n type: 'guanbixiao',\n event: 'close',\n beforeEvent: (item) => {\n return ModalWraper.confirm({\n className: 'tplus-confirm-modal',\n title: '关闭提示',\n content: '您确定要关闭应用吗?',\n async onOk() {\n Loading.show({\n className: 'close-app-loading',\n node: <div className='close-app-spin'>\n <Spin scale={1.2} type='shape' visible />\n <h1>应用关闭中...</h1>\n </div>,\n delay: false\n });\n context.actionHook.actionChange('close-app');\n try {\n await User.logout(() => {\n // 需要为500ms 时间短可能会不能正常注销清理\n setTimeout(() => { nativeMs.doWindow(item.event) }, 500); \n });\n } catch (err) {\n User.clear(); localStore.remove('user');\n setTimeout(() => { nativeMs.doWindow(item.event) }, 500);\n }\n }\n })\n }\n },\n ];\n\n const splitUser = (value) => {\n const regEmail = new RegExp('^[A-Za-zd0-9]+([-_.][A-Za-zd0-9]+)*@([A-Za-zd0-9]+[-.])+[A-Za-zd]{2,5}$');\n const isEmail = regEmail.test(value);\n\n if (isEmail) {\n return value.split('@')[0];\n }\n return value;\n }\n\n const setInventoryFocus = () => {\n const { isHorizontalPad } = platform || {};\n if (!!isHorizontalPad) return;\n let doms = document.getElementsByClassName('app hot-key-focus-container');\n let input = document.getElementById('productPoint');\n if (input) setTimeout(() => { if (doms && doms.length > 0) { console.log('headContent--商品焦点==Focus==');input.focus() } }, 300)\n }\n\n const clickTheme = (isShow) => {\n setThemeVisible(isShow)\n }\n\n const userName = PosInitData('UserName');\n const overlayClassName = `_portal-header-dropdown ${!isPortal ? 'inside-header' : ''}`;\n const moreInfoNode = <div className='pos-more-info-container'>\n <h1 className='business-name'>{businessName}</h1>\n <h1 className='store-code'>{posCode}</h1>\n </div>\n\n const headControlNode = <div className=\"head-content-control\">\n {controlConfig.map(v => <Ticon\n type={v.type}\n key={v.type}\n onClick={() => {\n if (nativeMs) {\n const {beforeEvent} = v;\n if (beforeEvent) {\n return beforeEvent(v);\n }\n nativeMs.doWindow(v.event)\n if (typeof setInventoryFocus == 'function') {\n setInventoryFocus()\n }\n }\n }}\n />)}\n </div>\n\n if (platform.isVerticalTouch) return verticalHeadContent({ style, releaseVersion, releaseDate,\n time, dateFormat, logo, HeadTime, headControlNode, location, history, clickTheme, themeVisible, isPortal, isLogin });\n\n return (<div style={{display: 'inline-block', width: '100%', height: '100%', ...style}} className='head-content' data-release={`${releaseVersion} ${releaseDate}`}>\n <div className=\"head-content-left\">\n {!!logo && <div className='business-logo' onClick={()=>{history.replace('/')}}>{logo}</div>}\n {!!storeName && <Tooltip trigger=\"click\" placement=\"bottomRight\" title={moreInfoNode} color={'#fff'} overlayClassName='head-business-tip'>\n <div className='store-name'>{storeName}<i className='header-triangle-down' /></div>\n </Tooltip>}\n {/* <OnLineStatus networkStatus={networkStatus}/> */}\n <OnLineStatusToggle isShowUploadBtnsByRouter={isShowUploadBtnsByRouter} isResetNetWorkTheme={isResetNetWorkTheme} isOfflineCash={hasUseOffline} isPlaceOrderPage={isPlaceOrderPage}/>\n {hasUseOffline && isShowUploadBtnsByRouter && <RetailUpload />}\n {hasUseOffline && isShowUploadBtnsByRouter && <RetailDownload />}\n </div>\n {isElectron && headControlNode}\n <div className=\"head-content-right\">\n {!isLogin && <Ticon icon=\"huanfu\" className={`theme-icon ${!isPortal ? 'pos-page' : ''}` } onClick={() => {clickTheme(true)}}/>}\n {!isLogin && !!userName && <Dropdown\n overlayClassName={overlayClassName}\n trigger={['click']}\n overlay={menus}\n placement=\"bottomRight\"\n arrow\n >\n <div className='header-info-render-content' onClick={e => e.preventDefault()}>\n <div className='store-info-item'>\n <p className='biller'>开单员:<span>{splitUser(userName)}</span></p>\n </div>\n <i className='header-triangle-down'/>\n </div>\n </Dropdown>}\n {!isLogin && <div className='store-info-item'>{solt}</div>}\n <HeadTime time={time} dateFormat={dateFormat}/>\n </div>\n <ThemeModal\n visible={themeVisible}\n isVertical={platform.isVerticalTouch}\n isPortal={isPortal}\n closeFn={(isShow) => clickTheme(isShow)}\n />\n </div>);\n}\n\nHeadContent.contextTypes = {\n actionHook: PropTypes.object,\n}\n"]}
@@ -204,7 +204,7 @@ var MainContainer = (0, _mobxReact.observer)(_class = (_temp = _class2 = functio
204
204
  isVerticalTouch = _ref6.isVerticalTouch;
205
205
 
206
206
  var theme = _mutantsMicrofx.stores.portalStore.themeStore;
207
- var defualtImage = isVerticalTouch === true ? _this.sys_parms.tinified_logo_bc : (!hsy_s && isPortal || theme === 'dark' && !isLogin ? _this.sys_parms.protal_chanjet_logo_bc : _this.sys_parms.chanjet_logo_bc) + '?v=1';
207
+ var defualtImage = isVerticalTouch === true ? _this.sys_parms.tinified_logo_bc : !hsy_s && isPortal || theme === 'dark' && !isLogin ? _this.sys_parms.protal_chanjet_logo_bc : _this.sys_parms.chanjet_logo_bc;
208
208
  if (hsy_s === true) {
209
209
  return _react2.default.createElement(
210
210
  'div',
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-portaltouch/containers/Main/index.js"],"names":["Main","hasElectron","env","platform","constant","electron","window","rx$","MainContainer","observer","props","currentFocus","sys_parms","tinified_logo_bc","ossAliyuncsFileURL","protal_chanjet_logo_bc","chanjet_logo_bc","initWebFrameZoom","webFrame","value","localStore","get","setZoomFactor","parseFloat","doDeeplinkingUrl","ipcRenderer","on","event","ret","params","console","log","stores","user","orgId","userId","param","split","reduce","accumulator","current","key","cloudUserId","User","logout","changeLogoSubject","subject","Subject","changeLogo","subscribe","next","v","setLogo","changeHsySubject","changeHsy","setHsy","addHotKeyChangeLister","document","addEventListener","registerHotKey","removeHotKeyChangeLister","removeEventListener","back","fn","setState","hsy_s","hsy_f","store","logoUrl","logo","logoNode","url","isPortal","isLogin","state","isVerticalTouch","theme","portalStore","themeStore","defualtImage","hotKeyInjectOrEject","type","hotKeyAction","registerKeys","allKeys","hotKey","hotKeyConfig","forEach","keyboard","index","nativeMs","onIpcRendererGlobalShortcut","hotKeyActionHandle","blurButton","target","nodeName","blur","isSetHotKey","hotKeyCreate","observerCallback","observerDom","pressed","clickBefore","activeElement","filter","srcElement","tagName","className","indexOf","undefined","attributes","childList","subtree","attributeFilter","register","operationKeys","esc","enter","modals","querySelectorAll","modal","style","display","drawers","modalsAndDrawers","sort","dom1","dom2","style1","getComputedStyle","style2","zIndex","visibleDom","length","$","clearFocus","setFocus","getFocusId","querySelector","find","handle","toggleKeyCode","message","bind","keys","i","unbind","Message","info","action","handleInfoRender","solt","onCollapse","collapsed","menuOnClick","selectedKeys","handleClose","Keyboard","close","handleOk","count","modifyPassStore","modifyPassWord","headMenuSelect","footer","text","closable","map","btn","loading","modalRouter","hide","offlineSys","shouldInOffline","show","title","width","modalType","onHide","destroyOnClose","history","push","portalStores","posLoginStore","savePosCode","isAutoTest","location","search","isShowFourTab","screen","isHorizontalPad","storeUtil","isHorizontalSunMi","isHorizontalSunMi_FuPing","isMobileEnvironment","infoRender","headHook","addClass","id","removeClass","currentId","actionHook","actionFrom","actionChange","body","classList","add","ModalWraper","confirm","content","cancelable","onOk","onCancel","unsubscribe","portalHead","loginHead","retailOrder","pathname","storeInfo","options","isRetailOrder","headProps","businessName","storeName","dateFormat","menu","icon","onClick","orgName","posCode","posIsLogin","hideAll","classNames","layoutClassName","join","height","match","isExact","routes","Component","childContextTypes","PropTypes","func","object","React","cloneElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmawBA,I;;AAnaxB;;;;AACA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AAEA,IAAMC,cAAeC,oBAAIC,QAAJ,KAAiBD,oBAAIE,QAAJ,CAAaD,QAAb,CAAsBE,QAA5D;AACAC,OAAOC,GAAP,GAAa,EAAb;;IAGMC,a,OADLC,mB;;;AAWC,yBAAYC,KAAZ,EAAmB;AAAA;;AAAA,oJACXA,KADW;;AAAA,UARnBC,YAQmB,GARJ,IAQI;AAAA,UANnBC,SAMmB,GANP;AACVC,wBAAqBP,OAAOQ,kBAA5B,0BADU;AAEVC,8BAA2BT,OAAOQ,kBAAlC,gCAFU;AAGVE,uBAAoBV,OAAOQ,kBAA3B;AAHU,KAMO;;AAAA,UA2BnBG,gBA3BmB,GA2BA,YAAM;AACvB,UAAIC,WAAW,MAAKb,QAAL,GAAgB,MAAKA,QAAL,CAAca,QAA9B,GAAyC,IAAxD;AACA,UAAIC,QAAQC,2BAAWC,GAAX,CAAe,mBAAf,KAAuC,KAAnD;AACA,UAAIH,QAAJ,EAAcA,SAASI,aAAT,CAAuBC,WAAWJ,KAAX,CAAvB;AACf,KA/BkB;;AAAA,UA4DnBK,gBA5DmB,GA4DA,YAAM;AACvB,UAAI,MAAKvB,WAAL,KAAqB,KAAzB,EAAgC;;AADT,iBAED,MAAKI,QAAL,IAAiB,EAACoB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AC,oCAAD;AAAA;AAAS,mBAAKnO,KAAL,CAAWoO;AAApB;AADnD;AAVF;AAJF,OADF;AAqBD;;;EA7YyBC,gB,WA+BnBC,iB,GAAoB;AACzB7C,cAAY8C,oBAAUC,IADG;AAEzB9C,YAAU6C,oBAAUE,MAFK;AAGzB1C,cAAYwC,oBAAUE;AAHG,C;;AAiXd,SAASnP,IAAT,CAAcU,KAAd,EAAqB;AAAA,MAC1BoO,MAD0B,GACFpO,KADE,CAC1BoO,MAD0B;AAAA,MAClBpE,WADkB,GACFhK,KADE,CAClBgK,WADkB;;;AAGlC,MAAIA,WAAJ,EAAiB;AACf,WAAO;AAAC,4BAAD;AAAA;AAASoE;AAAT,KAAP;AACD;;AAED,SAAOM,gBAAMC,YAAN,CAAmB,8BAAC,aAAD,OAAnB,EAAsC3O,KAAtC,CAAP;AACD","file":"index.js","sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { observer } from 'mobx-react';\nimport { Button } from 'antd';\nimport { history, Switch, stores, env, nativeMs, localStore } from 'mutants-microfx';\nimport { Ticon, Layout, Keyboard, ModalWraper, Message, hotKey } from 'tplus-components-touch';\nimport { platform, localStore as storeUtil } from 'mutants-util';\nimport { User } from 'tplus-api';\nimport { Subject } from 'rxjs';\nimport { Redirect } from 'react-router';\nimport Header from '../../components/header';\nimport PortalPageBC from '../../pages/Portalbc';\nimport portalStores from '../../stores';\nimport { closeWebPage, getQueryString, operationKeys } from '../../utils/index';\n\nconst hasElectron = (env.platform === env.constant.platform.electron);\nwindow.rx$ = {};\n\n@observer\nclass MainContainer extends Component {\n\n currentFocus = null;\n\n sys_parms = {\n tinified_logo_bc: `${window.ossAliyuncsFileURL}/tinified/logo-bc.png`,\n protal_chanjet_logo_bc: `${window.ossAliyuncsFileURL}/protal-chanjet-logo-bc.png`,\n chanjet_logo_bc: `${window.ossAliyuncsFileURL}/chanjet-logo-bc.png`,\n }\n\n constructor(props) {\n super(props);\n this.hasElectron = hasElectron;\n this.state = {\n hsy_s: false,\n hsy_f: null\n };\n portalStores.posLoginStore.savePosCode();\n this.electron = nativeMs && nativeMs.get('electron');\n this.isAutoTest = getQueryString(location.search, 'at');\n this.isShowFourTab = this.hasElectron && window.screen.width < 1024 ? true : false;\n //针对800*600分辨率下,页面显示不全的做一下处理。\n if (this.isShowFourTab == true) this.initWebFrameZoom();\n\n const isHorizontalPad = storeUtil.get('isHorizontalPad')// 是否在PAD\n const isHorizontalSunMi = storeUtil.get('isHorizontalSunMi'); //是否在商米(SunMi)\n const isHorizontalSunMi_FuPing = storeUtil.get('isHorizontalSunMi_FuPing'); //是否在商米(SunMi)\n\n this.isHorizontalSunMi_FuPing = !!isHorizontalSunMi_FuPing;\n this.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi || !!isHorizontalSunMi_FuPing;\n }\n static childContextTypes = {\n infoRender: PropTypes.func,\n headHook: PropTypes.object,\n actionHook: PropTypes.object,\n }\n\n initWebFrameZoom = () => {\n let webFrame = this.electron ? this.electron.webFrame : null;\n let value = localStore.get('webFrameZoomValue') || '0.7';\n if (webFrame) webFrame.setZoomFactor(parseFloat(value));\n }\n getChildContext() {\n return {\n infoRender: this.handleInfoRender,\n headHook: {\n addClass: (id, key) => {\n this.setState(state => ({\n [key]: [...(state[key] || []), id],\n }));\n },\n removeClass: (id, key) => {\n this.setState(state => ({\n [key]: state[key].filter(currentId => currentId !== id),\n }));\n }\n },\n actionHook: {\n actionFrom: this.actionFrom,\n actionChange: (value) => {\n this.actionFrom = value;\n }\n },\n };\n }\n\n // 内置默认\n // keys = ['esc', 'enter', 'ctrl+f1', ...Object.keys(hotKey.hotKeyConfig)];\n\n // 解决从url地址唤醒exe,不同账号的处理问题。\n doDeeplinkingUrl = () => {\n if (this.hasElectron === false) return;\n let { ipcRenderer } = this.electron || {ipcRenderer:null};\n ipcRenderer && ipcRenderer.on(\"asynchronous-deeplinkingUrl\", (event, ret, params) => {\n if (ret) {\n console.log('deeplinkingUrl:' + ret)\n const {orgId, userId} = stores.user || {};\n if (!orgId || !userId) return;\n const param = ret.split('&').reduce((accumulator, current) => {\n if (!current) return accumulator;\n const [key, value] = current.split('=') || [];\n accumulator[key] = value;\n return accumulator;\n }, {});\n console.log(orgId, userId, param)\n if (param.orgId !== orgId || param.cloudUserId !== userId) {\n User.logout();\n }\n }\n })\n }\n\n componentWillMount() {\n this.changeLogoSubject();\n this.changeHsySubject();\n const { isVerticalTouch } = platform || {};\n if (isVerticalTouch === true) {\n document.body.classList.add('vertical-touch-platform');\n }\n }\n\n changeLogoSubject = () => {\n const subject = new Subject();\n rx$.changeLogo = subject;\n\n subject\n .subscribe({\n next: (v) => this.setLogo(v)\n });\n }\n\n changeHsySubject = () => {\n const subject = new Subject();\n rx$.changeHsy = subject;\n\n subject\n .subscribe({\n next: (v) => this.setHsy(v)\n });\n }\n\n componentDidMount() {\n this.registerHotKey();\n this.addHotKeyChangeLister();\n rx$.changeLogo.next();\n document.body.addEventListener('focus', this.blurButton, true)\n this.doDeeplinkingUrl();\n\n if (this.hasElectron === true) {\n document.body.classList.add('electron-env');\n } else {\n if (this.isAutoTest || this.isMobileEnvironment) return; //自动化测试不弹窗\n ModalWraper.confirm({\n className: 'tplus-confirm-modal',\n title: \"温馨提示\",\n content: '智+新零售POS端不允许浏览器直接访问,请从智+产品中下载安装客户端程序使用!',\n cancelable:false,\n onOk() {\n closeWebPage();\n },\n onCancel(){\n closeWebPage();\n }\n });\n }\n }\n addHotKeyChangeLister = () => {\n document.addEventListener(\"RESET_USER_STORE\",this.registerHotKey);\n }\n removeHotKeyChangeLister = () => {\n document.removeEventListener(\"RESET_USER_STORE\",this.registerHotKey);\n }\n\n componentWillUnmount() {\n rx$.changeLogo.unsubscribe();\n rx$.changeHsy.unsubscribe();\n document.body.removeEventListener('focus', this.blurButton, true)\n // clearInterval(this.addObserverDomTimer);\n }\n\n setHsy = (v) => {\n const { back, fn } = v || {};\n if (back === true) {\n this.setState({ hsy_s: true, hsy_f: fn })\n } else {\n this.setState({ hsy_s: false, hsy_f: null })\n }\n }\n\n setLogo = (v) => {\n const store = localStore.get('StoreKey') || {};\n const { logo: logoUrl } = store;\n logoUrl && this.setState({ logoUrl });\n }\n\n logoNode = (url, isPortal, isLogin) => {\n const { hsy_s, hsy_f } = this.state;\n const { isVerticalTouch } = platform || {};\n const theme = stores.portalStore.themeStore;\n const defualtImage = (isVerticalTouch === true) ? this.sys_parms.tinified_logo_bc : (((!hsy_s && isPortal) || (theme === 'dark' && !isLogin) ? this.sys_parms.protal_chanjet_logo_bc : this.sys_parms.chanjet_logo_bc) + '?v=1');\n if (hsy_s === true) {\n return (<div className='business-logo-container'>\n <Ticon type='zhiPOS-fanhuishouye2' className='back_i' onClick={() => { hsy_f && hsy_f() }} />\n <img src={url || defualtImage} className=\"example-logo\" />\n </div>);\n }\n return <img src={url || defualtImage} className=\"example-logo\" />\n }\n\n //未使用?\n hotKeyInjectOrEject = (type, hotKeyAction) => {\n const registerKeys = ['esc', 'enter'];\n const allKeys = [...registerKeys, ...Object.keys(hotKey.hotKeyConfig)];\n allKeys.forEach((keyboard, index) => {\n nativeMs.onIpcRendererGlobalShortcut({ type, keyboard }, hotKeyActionHandle);\n });\n }\n\n blurButton = ({ target }) => { // 焦点为 button 时 移除焦点,防止触发 bee 组件enter快捷键\n if (target && target.nodeName === 'BUTTON') {\n target.blur();\n }\n }\n\n registerHotKey = () => {\n this.isSetHotKey = true;\n\n this.hotKeyCreate = hotKey({\n observerCallback: this.observerDom,\n log: true,\n pressed: this.hotKeyAction,\n clickBefore: () => {\n const { activeElement } = document;\n activeElement && activeElement.blur();\n },\n filter: event => {\n const { tagName, className } = event.target || event.srcElement || {};\n\n return !(event.key === 'Enter' && tagName === 'INPUT' && !~className.indexOf('hot-key-not-filter'));\n }\n });\n\n this.hotKeyCreate.observer(undefined, { attributes: true, childList: true, subtree: true ,attributeFilter: ['class', 'style'], });\n this.hotKeyCreate.register('esc')('.hot-key-focus-container')(operationKeys.esc);\n this.hotKeyCreate.register('enter')('.hot-key-focus-container')(operationKeys.enter);\n }\n\n observerDom = () => {\n\n const modals = [...document.querySelectorAll('.ant-modal-wrap')].filter((modal) => modal.style && modal.style.display !== 'none'); //ant-module\n const drawers = [...document.querySelectorAll('.ant-drawer-open')] //ant-drawer\n let modalsAndDrawers = [...modals, ...drawers].sort((dom1, dom2) => {\n let style1 = window.getComputedStyle(dom1);\n let style2 = window.getComputedStyle(dom2);\n return style2.zIndex - style1.zIndex\n });\n\n let visibleDom = modalsAndDrawers.length > 0 ? modalsAndDrawers[0] : null\n\n if (visibleDom) {\n if (this.currentFocus !== visibleDom) {\n $.clearFocus();\n this.currentFocus = visibleDom\n return $.setFocus(visibleDom);\n }\n return;\n }\n\n if ($.getFocusId() !== '1') {\n if (this.currentFocus !== 'App' || !document.querySelector(\".hot-key-focus-container\")) {\n $.clearFocus();\n this.currentFocus = 'App';\n $.find('.app', true).setFocus();\n }\n return;\n }\n }\n\n hotKeyAction = (event, handle) => {\n const { key } = handle || {};\n const toggleKeyCode = 'ctrl+f1';\n if (key === toggleKeyCode) {\n const isSetHotKey = this.isSetHotKey = !this.isSetHotKey;\n const message = isSetHotKey ? '设置' : '取消';\n if (isSetHotKey) {\n $.bind(this.keys.filter(i => i !== toggleKeyCode), this.hotKeyAction);\n } else {\n $.unbind(this.keys.filter(i => i !== toggleKeyCode));\n }\n return Message.info(`已${message}快捷键`);\n }\n\n $.action(key);\n }\n\n handleInfoRender = (solt) => {\n this.setState({solt})\n }\n onCollapse = () => {\n const {collapsed} = this.state;\n this.setState({collapsed: !collapsed});\n }\n menuOnClick = ({key}) => {\n console.log(key)\n this.setState({selectedKeys: key});\n }\n\n handleClose = () => {\n Keyboard.close();\n }\n\n handleOk = (type, count) => {\n stores.modifyPassStore.modifyPassWord();\n }\n\n headMenuSelect = ({key}) => {\n var footer = [\n {text: '取消', className: 'modifypass-cancal-button', closable: true, action: this.handleClose},\n {text: '确定', className: 'modifypass-ok-button', action: this.handleOk, type: 'primary'}\n ];\n footer = !!footer.length && <div>\n {footer.map((btn, i) =>\n <Button\n className={btn.className || ''}\n key={i}\n type={btn.type}\n loading={btn.loading}\n onClick={() => {\n const {action} = btn || {};\n if (typeof action === 'function') action();\n if (btn.closable) {\n stores.modalRouter.hide('/modifypass');\n }\n }}\n >\n {btn.text}\n </Button>)}\n </div>\n switch (key) {\n case 'logout':\n User.logout();\n break;\n case 'modifypass':\n {\n if(!stores.offlineSys.shouldInOffline()) return;\n stores.modalRouter.show({\n url: '/modifypass',\n title: '修改密码',\n className: 'modify-password',\n width: 402,\n footer,modalType:'mid',\n onHide: () => stores.modalRouter.hide('/modifypass'),\n destroyOnClose: true,\n });\n }\n break;\n default:\n history.push(`/${key}`);\n break;\n }\n }\n render() {\n const { collapsed, selectedKeys, solt, portalHead = [], loginHead = [], retailOrder = [], logoUrl, hsy_s } = this.state;\n const pathname = history.location.pathname;\n const storeInfo = stores.user.options.get('store');\n const isPortal = !!portalHead.length;\n const isLogin = !!loginHead.length;\n const isRetailOrder = !!retailOrder.length;\n const headProps = {\n logo: this.logoNode(logoUrl, isPortal, isLogin),\n businessName: '',\n storeName: '',\n dateFormat: 'yyyy年MM月dd日 hh:mm:ss',\n menu: [\n { title: '注销', key: 'logout', icon: 'zhuxiao' },\n { title: '修改密码', key: 'modifypass', icon: 'suoping' }\n ],\n onClick: this.headMenuSelect\n };\n if (storeInfo) {\n headProps.businessName = storeInfo.orgName;\n headProps.storeName = storeInfo.storeName;\n headProps.posCode = storeInfo.posCode;\n }\n\n // 如果存在商米副屏则优先加载商米副屏\n if (this.isHorizontalSunMi_FuPing) {\n return <Redirect to={'/vicescreen'} />\n }\n console.log('!stores.posLoginStore.posIsLogin=============', !stores.posLoginStore.posIsLogin);\n if (!stores.posLoginStore.posIsLogin && !~pathname.indexOf('login')) {\n stores.modalRouter.hideAll && stores.modalRouter.hideAll();\n return <Redirect to={'/login'} />\n }\n const classNames = ['isPortal-layout', 'isRetailOrder-layout'];\n const layoutClassName = [isPortal, isRetailOrder].map((v, i) => (v ? classNames[i] : '')).join(' ');\n return (\n <Layout\n style={{ height: '100%' }}\n className={layoutClassName}\n >\n <Layout>\n <Header\n {...headProps}\n solt={solt}\n isPortal={isPortal}\n className={`${(!hsy_s && isPortal) ? 'isPortal-head' : ''} ${isLogin ? 'isLogin-head' : ''}`}\n isLogin={isLogin}\n location={this.props.location}\n history={this.props.history}\n />\n <Layout.Content>\n {this.props.match.isExact ? (<PortalPageBC />) : <Switch>{this.props.routes}</Switch>}\n </Layout.Content>\n </Layout>\n </Layout>\n )\n }\n}\n\nexport default function Main(props) {\n const { routes, modalRouter } = props;\n\n if (modalRouter) {\n return <Switch>{routes}</Switch>;\n }\n\n return React.cloneElement(<MainContainer />, props);\n}\n"]}
1
+ {"version":3,"sources":["tplus-portaltouch/containers/Main/index.js"],"names":["Main","hasElectron","env","platform","constant","electron","window","rx$","MainContainer","observer","props","currentFocus","sys_parms","tinified_logo_bc","ossAliyuncsFileURL","protal_chanjet_logo_bc","chanjet_logo_bc","initWebFrameZoom","webFrame","value","localStore","get","setZoomFactor","parseFloat","doDeeplinkingUrl","ipcRenderer","on","event","ret","params","console","log","stores","user","orgId","userId","param","split","reduce","accumulator","current","key","cloudUserId","User","logout","changeLogoSubject","subject","Subject","changeLogo","subscribe","next","v","setLogo","changeHsySubject","changeHsy","setHsy","addHotKeyChangeLister","document","addEventListener","registerHotKey","removeHotKeyChangeLister","removeEventListener","back","fn","setState","hsy_s","hsy_f","store","logoUrl","logo","logoNode","url","isPortal","isLogin","state","isVerticalTouch","theme","portalStore","themeStore","defualtImage","hotKeyInjectOrEject","type","hotKeyAction","registerKeys","allKeys","hotKey","hotKeyConfig","forEach","keyboard","index","nativeMs","onIpcRendererGlobalShortcut","hotKeyActionHandle","blurButton","target","nodeName","blur","isSetHotKey","hotKeyCreate","observerCallback","observerDom","pressed","clickBefore","activeElement","filter","srcElement","tagName","className","indexOf","undefined","attributes","childList","subtree","attributeFilter","register","operationKeys","esc","enter","modals","querySelectorAll","modal","style","display","drawers","modalsAndDrawers","sort","dom1","dom2","style1","getComputedStyle","style2","zIndex","visibleDom","length","$","clearFocus","setFocus","getFocusId","querySelector","find","handle","toggleKeyCode","message","bind","keys","i","unbind","Message","info","action","handleInfoRender","solt","onCollapse","collapsed","menuOnClick","selectedKeys","handleClose","Keyboard","close","handleOk","count","modifyPassStore","modifyPassWord","headMenuSelect","footer","text","closable","map","btn","loading","modalRouter","hide","offlineSys","shouldInOffline","show","title","width","modalType","onHide","destroyOnClose","history","push","portalStores","posLoginStore","savePosCode","isAutoTest","location","search","isShowFourTab","screen","isHorizontalPad","storeUtil","isHorizontalSunMi","isHorizontalSunMi_FuPing","isMobileEnvironment","infoRender","headHook","addClass","id","removeClass","currentId","actionHook","actionFrom","actionChange","body","classList","add","ModalWraper","confirm","content","cancelable","onOk","onCancel","unsubscribe","portalHead","loginHead","retailOrder","pathname","storeInfo","options","isRetailOrder","headProps","businessName","storeName","dateFormat","menu","icon","onClick","orgName","posCode","posIsLogin","hideAll","classNames","layoutClassName","join","height","match","isExact","routes","Component","childContextTypes","PropTypes","func","object","React","cloneElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmawBA,I;;AAnaxB;;;;AACA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AAEA,IAAMC,cAAeC,oBAAIC,QAAJ,KAAiBD,oBAAIE,QAAJ,CAAaD,QAAb,CAAsBE,QAA5D;AACAC,OAAOC,GAAP,GAAa,EAAb;;IAGMC,a,OADLC,mB;;;AAWC,yBAAYC,KAAZ,EAAmB;AAAA;;AAAA,oJACXA,KADW;;AAAA,UARnBC,YAQmB,GARJ,IAQI;AAAA,UANnBC,SAMmB,GANP;AACVC,wBAAqBP,OAAOQ,kBAA5B,0BADU;AAEVC,8BAA2BT,OAAOQ,kBAAlC,gCAFU;AAGVE,uBAAoBV,O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Z,SADN;AAEE,kBAAMtE,IAFR;AAGE,sBAAU/E,QAHZ;AAIE,wBAAe,CAACP,KAAD,IAAUO,QAAX,GAAuB,eAAvB,GAAyC,EAAvD,WAA6DC,UAAU,cAAV,GAA2B,EAAxF,CAJF;AAKE,qBAASA,OALX;AAME,sBAAU,KAAK/D,KAAL,CAAWgL,QANvB;AAOE,qBAAS,KAAKhL,KAAL,CAAW0K;AAPtB,aADF;AAUE;AAAC,wCAAD,CAAQ,OAAR;AAAA;AACG,iBAAK1K,KAAL,CAAWkO,KAAX,CAAiBC,OAAjB,GAA4B,8BAAC,kBAAD,OAA5B,GAAgD;AAAC,oCAAD;AAAA;AAAS,mBAAKnO,KAAL,CAAWoO;AAApB;AADnD;AAVF;AAJF,OADF;AAqBD;;;EA7YyBC,gB,WA+BnBC,iB,GAAoB;AACzB7C,cAAY8C,oBAAUC,IADG;AAEzB9C,YAAU6C,oBAAUE,MAFK;AAGzB1C,cAAYwC,oBAAUE;AAHG,C;;AAiXd,SAASnP,IAAT,CAAcU,KAAd,EAAqB;AAAA,MAC1BoO,MAD0B,GACFpO,KADE,CAC1BoO,MAD0B;AAAA,MAClBpE,WADkB,GACFhK,KADE,CAClBgK,WADkB;;;AAGlC,MAAIA,WAAJ,EAAiB;AACf,WAAO;AAAC,4BAAD;AAAA;AAASoE;AAAT,KAAP;AACD;;AAED,SAAOM,gBAAMC,YAAN,CAAmB,8BAAC,aAAD,OAAnB,EAAsC3O,KAAtC,CAAP;AACD","file":"index.js","sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { observer } from 'mobx-react';\nimport { Button } from 'antd';\nimport { history, Switch, stores, env, nativeMs, localStore } from 'mutants-microfx';\nimport { Ticon, Layout, Keyboard, ModalWraper, Message, hotKey } from 'tplus-components-touch';\nimport { platform, localStore as storeUtil } from 'mutants-util';\nimport { User } from 'tplus-api';\nimport { Subject } from 'rxjs';\nimport { Redirect } from 'react-router';\nimport Header from '../../components/header';\nimport PortalPageBC from '../../pages/Portalbc';\nimport portalStores from '../../stores';\nimport { closeWebPage, getQueryString, operationKeys } from '../../utils/index';\n\nconst hasElectron = (env.platform === env.constant.platform.electron);\nwindow.rx$ = {};\n\n@observer\nclass MainContainer extends Component {\n\n currentFocus = null;\n\n sys_parms = {\n tinified_logo_bc: `${window.ossAliyuncsFileURL}/tinified/logo-bc.png`,\n protal_chanjet_logo_bc: `${window.ossAliyuncsFileURL}/protal-chanjet-logo-bc.png`,\n chanjet_logo_bc: `${window.ossAliyuncsFileURL}/chanjet-logo-bc.png`,\n }\n\n constructor(props) {\n super(props);\n this.hasElectron = hasElectron;\n this.state = {\n hsy_s: false,\n hsy_f: null\n };\n portalStores.posLoginStore.savePosCode();\n this.electron = nativeMs && nativeMs.get('electron');\n this.isAutoTest = getQueryString(location.search, 'at');\n this.isShowFourTab = this.hasElectron && window.screen.width < 1024 ? true : false;\n //针对800*600分辨率下,页面显示不全的做一下处理。\n if (this.isShowFourTab == true) this.initWebFrameZoom();\n\n const isHorizontalPad = storeUtil.get('isHorizontalPad')// 是否在PAD\n const isHorizontalSunMi = storeUtil.get('isHorizontalSunMi'); //是否在商米(SunMi)\n const isHorizontalSunMi_FuPing = storeUtil.get('isHorizontalSunMi_FuPing'); //是否在商米(SunMi)\n\n this.isHorizontalSunMi_FuPing = !!isHorizontalSunMi_FuPing;\n this.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi || !!isHorizontalSunMi_FuPing;\n }\n static childContextTypes = {\n infoRender: PropTypes.func,\n headHook: PropTypes.object,\n actionHook: PropTypes.object,\n }\n\n initWebFrameZoom = () => {\n let webFrame = this.electron ? this.electron.webFrame : null;\n let value = localStore.get('webFrameZoomValue') || '0.7';\n if (webFrame) webFrame.setZoomFactor(parseFloat(value));\n }\n getChildContext() {\n return {\n infoRender: this.handleInfoRender,\n headHook: {\n addClass: (id, key) => {\n this.setState(state => ({\n [key]: [...(state[key] || []), id],\n }));\n },\n removeClass: (id, key) => {\n this.setState(state => ({\n [key]: state[key].filter(currentId => currentId !== id),\n }));\n }\n },\n actionHook: {\n actionFrom: this.actionFrom,\n actionChange: (value) => {\n this.actionFrom = value;\n }\n },\n };\n }\n\n // 内置默认\n // keys = ['esc', 'enter', 'ctrl+f1', ...Object.keys(hotKey.hotKeyConfig)];\n\n // 解决从url地址唤醒exe,不同账号的处理问题。\n doDeeplinkingUrl = () => {\n if (this.hasElectron === false) return;\n let { ipcRenderer } = this.electron || {ipcRenderer:null};\n ipcRenderer && ipcRenderer.on(\"asynchronous-deeplinkingUrl\", (event, ret, params) => {\n if (ret) {\n console.log('deeplinkingUrl:' + ret)\n const {orgId, userId} = stores.user || {};\n if (!orgId || !userId) return;\n const param = ret.split('&').reduce((accumulator, current) => {\n if (!current) return accumulator;\n const [key, value] = current.split('=') || [];\n accumulator[key] = value;\n return accumulator;\n }, {});\n console.log(orgId, userId, param)\n if (param.orgId !== orgId || param.cloudUserId !== userId) {\n User.logout();\n }\n }\n })\n }\n\n componentWillMount() {\n this.changeLogoSubject();\n this.changeHsySubject();\n const { isVerticalTouch } = platform || {};\n if (isVerticalTouch === true) {\n document.body.classList.add('vertical-touch-platform');\n }\n }\n\n changeLogoSubject = () => {\n const subject = new Subject();\n rx$.changeLogo = subject;\n\n subject\n .subscribe({\n next: (v) => this.setLogo(v)\n });\n }\n\n changeHsySubject = () => {\n const subject = new Subject();\n rx$.changeHsy = subject;\n\n subject\n .subscribe({\n next: (v) => this.setHsy(v)\n });\n }\n\n componentDidMount() {\n this.registerHotKey();\n this.addHotKeyChangeLister();\n rx$.changeLogo.next();\n document.body.addEventListener('focus', this.blurButton, true)\n this.doDeeplinkingUrl();\n\n if (this.hasElectron === true) {\n document.body.classList.add('electron-env');\n } else {\n if (this.isAutoTest || this.isMobileEnvironment) return; //自动化测试不弹窗\n ModalWraper.confirm({\n className: 'tplus-confirm-modal',\n title: \"温馨提示\",\n content: '智+新零售POS端不允许浏览器直接访问,请从智+产品中下载安装客户端程序使用!',\n cancelable:false,\n onOk() {\n closeWebPage();\n },\n onCancel(){\n closeWebPage();\n }\n });\n }\n }\n addHotKeyChangeLister = () => {\n document.addEventListener(\"RESET_USER_STORE\",this.registerHotKey);\n }\n removeHotKeyChangeLister = () => {\n document.removeEventListener(\"RESET_USER_STORE\",this.registerHotKey);\n }\n\n componentWillUnmount() {\n rx$.changeLogo.unsubscribe();\n rx$.changeHsy.unsubscribe();\n document.body.removeEventListener('focus', this.blurButton, true)\n // clearInterval(this.addObserverDomTimer);\n }\n\n setHsy = (v) => {\n const { back, fn } = v || {};\n if (back === true) {\n this.setState({ hsy_s: true, hsy_f: fn })\n } else {\n this.setState({ hsy_s: false, hsy_f: null })\n }\n }\n\n setLogo = (v) => {\n const store = localStore.get('StoreKey') || {};\n const { logo: logoUrl } = store;\n logoUrl && this.setState({ logoUrl });\n }\n\n logoNode = (url, isPortal, isLogin) => {\n const { hsy_s, hsy_f } = this.state;\n const { isVerticalTouch } = platform || {};\n const theme = stores.portalStore.themeStore;\n const defualtImage = (isVerticalTouch === true) ? this.sys_parms.tinified_logo_bc : ((!hsy_s && isPortal) || (theme === 'dark' && !isLogin) ? this.sys_parms.protal_chanjet_logo_bc : this.sys_parms.chanjet_logo_bc);\n if (hsy_s === true) {\n return (<div className='business-logo-container'>\n <Ticon type='zhiPOS-fanhuishouye2' className='back_i' onClick={() => { hsy_f && hsy_f() }} />\n <img src={url || defualtImage} className=\"example-logo\" />\n </div>);\n }\n return <img src={url || defualtImage} className=\"example-logo\" />\n }\n\n //未使用?\n hotKeyInjectOrEject = (type, hotKeyAction) => {\n const registerKeys = ['esc', 'enter'];\n const allKeys = [...registerKeys, ...Object.keys(hotKey.hotKeyConfig)];\n allKeys.forEach((keyboard, index) => {\n nativeMs.onIpcRendererGlobalShortcut({ type, keyboard }, hotKeyActionHandle);\n });\n }\n\n blurButton = ({ target }) => { // 焦点为 button 时 移除焦点,防止触发 bee 组件enter快捷键\n if (target && target.nodeName === 'BUTTON') {\n target.blur();\n }\n }\n\n registerHotKey = () => {\n this.isSetHotKey = true;\n\n this.hotKeyCreate = hotKey({\n observerCallback: this.observerDom,\n log: true,\n pressed: this.hotKeyAction,\n clickBefore: () => {\n const { activeElement } = document;\n activeElement && activeElement.blur();\n },\n filter: event => {\n const { tagName, className } = event.target || event.srcElement || {};\n\n return !(event.key === 'Enter' && tagName === 'INPUT' && !~className.indexOf('hot-key-not-filter'));\n }\n });\n\n this.hotKeyCreate.observer(undefined, { attributes: true, childList: true, subtree: true ,attributeFilter: ['class', 'style'], });\n this.hotKeyCreate.register('esc')('.hot-key-focus-container')(operationKeys.esc);\n this.hotKeyCreate.register('enter')('.hot-key-focus-container')(operationKeys.enter);\n }\n\n observerDom = () => {\n\n const modals = [...document.querySelectorAll('.ant-modal-wrap')].filter((modal) => modal.style && modal.style.display !== 'none'); //ant-module\n const drawers = [...document.querySelectorAll('.ant-drawer-open')] //ant-drawer\n let modalsAndDrawers = [...modals, ...drawers].sort((dom1, dom2) => {\n let style1 = window.getComputedStyle(dom1);\n let style2 = window.getComputedStyle(dom2);\n return style2.zIndex - style1.zIndex\n });\n\n let visibleDom = modalsAndDrawers.length > 0 ? modalsAndDrawers[0] : null\n\n if (visibleDom) {\n if (this.currentFocus !== visibleDom) {\n $.clearFocus();\n this.currentFocus = visibleDom\n return $.setFocus(visibleDom);\n }\n return;\n }\n\n if ($.getFocusId() !== '1') {\n if (this.currentFocus !== 'App' || !document.querySelector(\".hot-key-focus-container\")) {\n $.clearFocus();\n this.currentFocus = 'App';\n $.find('.app', true).setFocus();\n }\n return;\n }\n }\n\n hotKeyAction = (event, handle) => {\n const { key } = handle || {};\n const toggleKeyCode = 'ctrl+f1';\n if (key === toggleKeyCode) {\n const isSetHotKey = this.isSetHotKey = !this.isSetHotKey;\n const message = isSetHotKey ? '设置' : '取消';\n if (isSetHotKey) {\n $.bind(this.keys.filter(i => i !== toggleKeyCode), this.hotKeyAction);\n } else {\n $.unbind(this.keys.filter(i => i !== toggleKeyCode));\n }\n return Message.info(`已${message}快捷键`);\n }\n\n $.action(key);\n }\n\n handleInfoRender = (solt) => {\n this.setState({solt})\n }\n onCollapse = () => {\n const {collapsed} = this.state;\n this.setState({collapsed: !collapsed});\n }\n menuOnClick = ({key}) => {\n console.log(key)\n this.setState({selectedKeys: key});\n }\n\n handleClose = () => {\n Keyboard.close();\n }\n\n handleOk = (type, count) => {\n stores.modifyPassStore.modifyPassWord();\n }\n\n headMenuSelect = ({key}) => {\n var footer = [\n {text: '取消', className: 'modifypass-cancal-button', closable: true, action: this.handleClose},\n {text: '确定', className: 'modifypass-ok-button', action: this.handleOk, type: 'primary'}\n ];\n footer = !!footer.length && <div>\n {footer.map((btn, i) =>\n <Button\n className={btn.className || ''}\n key={i}\n type={btn.type}\n loading={btn.loading}\n onClick={() => {\n const {action} = btn || {};\n if (typeof action === 'function') action();\n if (btn.closable) {\n stores.modalRouter.hide('/modifypass');\n }\n }}\n >\n {btn.text}\n </Button>)}\n </div>\n switch (key) {\n case 'logout':\n User.logout();\n break;\n case 'modifypass':\n {\n if(!stores.offlineSys.shouldInOffline()) return;\n stores.modalRouter.show({\n url: '/modifypass',\n title: '修改密码',\n className: 'modify-password',\n width: 402,\n footer,modalType:'mid',\n onHide: () => stores.modalRouter.hide('/modifypass'),\n destroyOnClose: true,\n });\n }\n break;\n default:\n history.push(`/${key}`);\n break;\n }\n }\n render() {\n const { collapsed, selectedKeys, solt, portalHead = [], loginHead = [], retailOrder = [], logoUrl, hsy_s } = this.state;\n const pathname = history.location.pathname;\n const storeInfo = stores.user.options.get('store');\n const isPortal = !!portalHead.length;\n const isLogin = !!loginHead.length;\n const isRetailOrder = !!retailOrder.length;\n const headProps = {\n logo: this.logoNode(logoUrl, isPortal, isLogin),\n businessName: '',\n storeName: '',\n dateFormat: 'yyyy年MM月dd日 hh:mm:ss',\n menu: [\n { title: '注销', key: 'logout', icon: 'zhuxiao' },\n { title: '修改密码', key: 'modifypass', icon: 'suoping' }\n ],\n onClick: this.headMenuSelect\n };\n if (storeInfo) {\n headProps.businessName = storeInfo.orgName;\n headProps.storeName = storeInfo.storeName;\n headProps.posCode = storeInfo.posCode;\n }\n\n // 如果存在商米副屏则优先加载商米副屏\n if (this.isHorizontalSunMi_FuPing) {\n return <Redirect to={'/vicescreen'} />\n }\n console.log('!stores.posLoginStore.posIsLogin=============', !stores.posLoginStore.posIsLogin);\n if (!stores.posLoginStore.posIsLogin && !~pathname.indexOf('login')) {\n stores.modalRouter.hideAll && stores.modalRouter.hideAll();\n return <Redirect to={'/login'} />\n }\n const classNames = ['isPortal-layout', 'isRetailOrder-layout'];\n const layoutClassName = [isPortal, isRetailOrder].map((v, i) => (v ? classNames[i] : '')).join(' ');\n return (\n <Layout\n style={{ height: '100%' }}\n className={layoutClassName}\n >\n <Layout>\n <Header\n {...headProps}\n solt={solt}\n isPortal={isPortal}\n className={`${(!hsy_s && isPortal) ? 'isPortal-head' : ''} ${isLogin ? 'isLogin-head' : ''}`}\n isLogin={isLogin}\n location={this.props.location}\n history={this.props.history}\n />\n <Layout.Content>\n {this.props.match.isExact ? (<PortalPageBC />) : <Switch>{this.props.routes}</Switch>}\n </Layout.Content>\n </Layout>\n </Layout>\n )\n }\n}\n\nexport default function Main(props) {\n const { routes, modalRouter } = props;\n\n if (modalRouter) {\n return <Switch>{routes}</Switch>;\n }\n\n return React.cloneElement(<MainContainer />, props);\n}\n"]}
@@ -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: 2022-02-25 14:49:22
55
+ * @LastEditTime: 2022-03-22 14:23:09
56
56
  * @LastEditors: chenlongad
57
57
  * @modify:修改跳转到T+的查询方案方式
58
58
  */
@@ -221,44 +221,45 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
221
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;
222
222
  _this$context$headHoo = _this$context$headHoo === undefined ? {} : _this$context$headHoo;
223
223
  addClass = _this$context$headHoo.addClass;
224
- hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !(_this.isVerticalTouch || _this.isMobileEnvironment); //是否允许离线
224
+ hasUseOffline = (0, _tplusPoslogin.PosInitData)('IsOfflineCash') === "1" && !_mutantsUtil.platform.otherOfflineStatus;
225
+ ; //是否允许离线
225
226
  // const hasUseOffline = true;
226
227
 
227
228
  if (!(hasUseOffline == true)) {
228
- _context2.next = 7;
229
+ _context2.next = 8;
229
230
  break;
230
231
  }
231
232
 
232
- _context2.next = 7;
233
+ _context2.next = 8;
233
234
  return _this.catchOfflineData();
234
235
 
235
- case 7:
236
+ case 8:
236
237
  _tplusComponentsTouch.Loading.show({
237
238
  text: '权限加载中,请稍等...',
238
239
  delay: 2500
239
240
  });
240
241
  //权限加载
241
- _context2.prev = 8;
242
- _context2.next = 11;
242
+ _context2.prev = 9;
243
+ _context2.next = 12;
243
244
  return _this.getOperation();
244
245
 
245
- case 11:
246
- _context2.next = 16;
246
+ case 12:
247
+ _context2.next = 17;
247
248
  break;
248
249
 
249
- case 13:
250
- _context2.prev = 13;
251
- _context2.t0 = _context2['catch'](8);
250
+ case 14:
251
+ _context2.prev = 14;
252
+ _context2.t0 = _context2['catch'](9);
252
253
 
253
254
  _tplusComponentsTouch.Loading.hide();
254
255
 
255
- case 16:
256
- _context2.prev = 16;
256
+ case 17:
257
+ _context2.prev = 17;
257
258
 
258
259
  _tplusComponentsTouch.Loading.hide();
259
- return _context2.finish(16);
260
+ return _context2.finish(17);
260
261
 
261
- case 19:
262
+ case 20:
262
263
  addClass && addClass(_this.state.id, 'portalHead');
263
264
  // 初始化参数设置。
264
265
  stores.setStore.initSetParams().then(function (ret) {
@@ -277,12 +278,12 @@ var _default = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_C
277
278
  });
278
279
  _this.hsyBasicInfoInit();
279
280
 
280
- case 22:
281
+ case 23:
281
282
  case 'end':
282
283
  return _context2.stop();
283
284
  }
284
285
  }
285
- }, _callee2, _this2, [[8, 13, 16, 19]]);
286
+ }, _callee2, _this2, [[9, 14, 17, 20]]);
286
287
  }));
287
288
 
288
289
  _this.sunMiPresentationInit = function (result) {
@@ -1 +1 @@
1
- {"version":3,"sources":["tplus-portaltouch/pages/Portalbc/index.js"],"names":["hasElectron","env","platform","constant","electron","Content","Layout","Footer","tplusWindow","HTTP_PROXY_URL","CC_FRAME_CONF","id","identOnly","initConnect","HsyLoadFinish","HsyRouterClean","HsyRouterJump","observer","props","catchOfflineData","offlineSys","context","stores","isLoginAfter","localStore","get","downloadCatcherDay","currentDay","Math","ceil","Date","downProgress","params","Loading","transfer","show","text","delay","showProgress","downloadCatcherData","result","set","hide","console","log","getOperation","resolve","reject","homeOperation","Request","functionData","then","operations","setState","catch","err","data","initPageData","headHook","addClass","hasUseOffline","isVerticalTouch","isMobileEnvironment","state","setStore","initSetParams","getScreenType","isHorizontalSunMi","sunMiPresentationInit","ret","user","window","open","getTime","setTimeout","hsyBasicInfoInit","options","storeName","enumController","getEnumOj","RE_POSParamType","DUAL_SCREEN_SETTING","filterResult","filter","settingItem","ParamType","sunMi_PresentationManager","sharedPreferencesSet","sendMessageToSecondScreen","step","getTcBasicInfoInit","userStore","User","restore","sid","tplusUrl","msg","ModalWraper","warning","title","content","okText","okType","substring","length","ossjumpUrl","postMsgUrl","loginInfo","UserCode","AccountNum","posCode","TplusStoreId","uid","tplusEncode","pwd","accNum","code","store","postMessageUrl","flag","item","Name","shift","Value","saveLog","name","saveLogo","undefined","handelClick","values","type","key","isModal","iframe","app","style","search","tmenuCode","isHsyLoadFinish","controllable","find","vv","Visibility","HoldFunctionAuth","Title","MenuCode","errorTip","shouldOpenHomeOperation","Message","warn","showMoreModal","onOk","logout","portalStore","modalRouter","url","width","toFramePage","checkDuty","onDutyMessage","Code","IdShiftVoucher","Shift","IdDailyVoucher","DailyCode","ShiftCode","history","push","onDuty","MiddleWare","execute","bPosDaily","onMakerDaily","sh","v","menu","toHsyPage","toTplusPage","getTplusUrlFromCloudServer","accessToken","orgId","encodeURIComponent","fetchHeader","headers","fetch","response","json","ex","dsearchPlanID","getSearchPlanId","location","origin","android_CommonFun","openWebUrlByOutBrowser","new_retail_app","nativeMs","useDefaultBrowser","external_frame_tc","document","getElementById","win","contentWindow","loadTcURL","postMessage","doType","loadTcPage","rx$","changeHsy","next","back","fn","content_only","bar_bg","bar_active_bg","secondRouter","activePrompt","closePrompt","closeable","leavePrompt","lock","pageId","pageParams","path","tabId","tabLabel","pageType","_k","IdWarehouse","WarehouseName","IsPerformanceDistribution","IdStore","PosId","defaultValue","storeId","warehouseId","requireWarehouseId","orderStatusEnum","filterValue","value","deliveryStoreId","deliveryWarehouseId","randomWord","commonArgs","actionUrl","cc_url","hsy_domain","replace","getLoginCCMidWebUrl","CC_WEB_URL","ccFrameStore","sendMessage","extStateParams","_ident_only_","loadHsyPage","only","digits","str","number","letter","arr","i","pos","round","random","closeFrameModal","showModal","closeMoreModal","c","String","fromCharCode","charCodeAt","TplusBase64Encode","input","_keyStr","output","chr1","chr2","chr3","enc1","enc2","enc3","enc4","_utf8_encode","isNaN","charAt","string","utftext","n","operationControl","forEach","sub","createLeftNode","leftMenu","isNewRetailBCPosTC","menuNode","map","container","className","maybe","status","second","disabled","bind","label","icon","createCenterNode","menuLeftNode","centerLeftMenu","menuRightNode","centerRightMenu","createRightNode","node","rightMenu","createMoreNode","arrs","getMoreNodeInfo","items","sub_tc","sub_cc","now","loadHsyURL","modalURL","isHorizontalPad","FuPingIsLoaded","getWebEntry","isHsyIframeInclude","getMenuByPosition","position","Menus","leftMenuTC","rightMenuTC","centerLeftMenuMobileCC","centerLeftMenuMobileTC","centerRightMenuMobileCC","centerRightMenuMobileTC","rightMenuMobileTC","rightMenuMobileCC","getMenuByEnvironment","ccMenu","tcMenu","tcMobilMenu","ccMobilMenu","initCCFrameWin","that","IframeStore","e","instance","theme","themeStore","color","destroy","removeClass","setIpcRendererMethod","screenHeight","screen","availHeight","htmlContent","height","paddingLeft","paddingRight","Component","propTypes","routes","PropTypes","array","contextTypes","object","infoRender","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAAA;;;;;;;;;AAOA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;AACA;;;;AAEA,IAAMA,cAAeC,oBAAIC,QAAJ,KAAiBD,oBAAIE,QAAJ,CAAaD,QAAb,CAAsBE,QAA5D;IACQC,O,GAAoBC,4B,CAApBD,O;IAASE,M,GAAWD,4B,CAAXC,M;;AACjB,IAAIC,cAAc,IAAlB;AACA,IAAMC,iBAAiB,kCAAvB;AACA,IAAMC,gBAAgB,EAAEC,IAAI,mBAAN,EAA2BC,WAAW,WAAtC,EAAmDC,aAAa,aAAhE,EAA+EC,eAAe,eAA9F,EAA+GC,gBAAgB,gBAA/H,EAAiJC,eAAgB,eAAjK,EAAtB;;mBACCC,mB;;;AAWC,oBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AAAA,0IACXA,KADW;;AAAA,UA0EnBC,gBA1EmB,4EA0EA;AAAA;AAAA;AAAA;AAAA;AAAA;AACTC,wBADS,GACM,MAAKC,OAAL,CAAaC,MADnB,CACTF,UADS;AAEXG,0BAFW,GAEIC,2BAAWC,GAAX,CAAe,cAAf,CAFJ;AAGXC,gCAHW,GAGUF,2BAAWC,GAAX,CAAe,oBAAf,CAHV;AAIXE,wBAJW,GAIEC,KAAKC,IAAL,CAAU,IAAIC,IAAJ,KAAa,IAAb,GAAoB,EAApB,GAAyB,EAAzB,GAA8B,EAAxC,CAJF;;AAAA,oBAKbP,gBAAgB,CALH;AAAA;AAAA;AAAA;;AAAA,oBAOX,CAACG,kBAAD,IAAuBC,aAAaD,kBAPzB;AAAA;AAA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oC,QAAQgC,YAA5C,EAA0D,aAAY,IAAtE,EAA2E,QAAO,GAAlF,EAAsF,aAAY,GAAlG,EAAsG,cAAa,GAAnH,EAAuH,WAAU,KAAjI,EAAuI,mBAAkB,MAAzJ;AAPJ,aAxBW;AAmCX;AAAC,yBAAD;AAAA;AACE,uBAAO,IADT;AAEE,2BAAW,6BAFb;AAGE,yBAAS3M,aAHX;AAIE,0BAAU,KAAKoH,cAJjB;AAKE,uBAAO,GALT;AAME,wBAAQ,GANV;AAOE,wBAAQ,IAPV;AAQE,8BARF;AASE,8BAAc,KAThB;AAUE,0BAAU;AAVZ;AAaI,mBAAK+C,cAAL;AAbJ;AAnCW,WAAf;AAqDD;AACD,aAAO2C,WAAP;AACD;;;EAr8B0BI,gB,WACpBC,S,GAAY;AACjBC,UAAQC,oBAAUC;AADD,C,UAGZC,Y,GAAe;AACpBvV,UAAQqV,oBAAUG,MADE;AAEpBC,cAAYJ,oBAAUK,IAFF;AAGpBtT,YAAUiT,oBAAUG;AAHA,C","file":"index.js","sourcesContent":["/*\n * @Description:\n * @Date: 2019-08-13 08:42:18\n * @LastEditTime: 2022-02-25 14:49:22\n * @LastEditors: chenlongad\n * @modify:修改跳转到T+的查询方案方式\n */\nimport React, { Component } from 'react';\nimport { observer } from 'mobx-react';\nimport { autorun} from 'mobx';\nimport { Row, Col, Modal } from 'antd';\nimport { history, stores, nativeMs, env, localStore } from 'mutants-microfx';\nimport { Ticon, Layout, ModalWraper, Loading, Message } from 'tplus-components-touch';\nimport { User } from 'tplus-api';\nimport { PosSetData, PosInitData } from 'tplus-poslogin';\nimport { platform, enumController } from 'mutants-util';\nimport PropTypes from 'prop-types';\nimport { Request } from '../../api/ModifyPassApi';\nimport Menus from './data';\nimport MiddleWare from '../../middleWare';\nimport VerticalPortal from './verticalPortal';\nimport HorizontalPadPortal from './horizontalPadPortal';\nimport './index.less';\nimport { async } from 'rxjs';\n\nconst hasElectron = (env.platform === env.constant.platform.electron);\nconst { Content, Footer } = Layout;\nlet tplusWindow = null;\nconst HTTP_PROXY_URL = 'http://tfproxy.chanjet.com/?url=';\nconst CC_FRAME_CONF = { id: 'external-frame-cc', identOnly: '_pos_web_', initConnect: 'initConnect', HsyLoadFinish: 'HsyLoadFinish', HsyRouterClean: 'HsyRouterClean', HsyRouterJump : 'HsyRouterJump' };\n@observer\nexport default class extends Component {\n static propTypes = {\n routes: PropTypes.array,\n };\n static contextTypes = {\n stores: PropTypes.object,\n infoRender: PropTypes.func,\n headHook: PropTypes.object\n };\n ccFrameStore\n constructor(props) {\n super(props);\n this.hasElectron = hasElectron;\n this.state = {\n id: Date.now(),\n operations: [],\n showModal: false,\n showMoreModal: false,\n loadHsyPage: false,\n loadHsyURL: '',\n isHsyLoadFinish: false,\n loadTcPage: false,\n loadTcURL: '',\n modalURL: '',\n }\n const { isVerticalTouch, isHorizontalPad, isHorizontalSunMi, isNewRetailBCPosTC } = platform || {};\n this.isVerticalTouch = !!isVerticalTouch;\n this.isHorizontalPad = !!isHorizontalPad;\n this.isHorizontalSunMi = !!isHorizontalSunMi;\n this.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;\n this.FuPingIsLoaded = false;\n this.isNewRetailBCPosTC = !!isNewRetailBCPosTC;\n this.new_retail_app = localStore && localStore.get('newRetailAppType');\n this.hsy_domain = User && User.getWebEntry();\n // 是否嵌套好生意的iframe\n this.isHsyIframeInclude = !this.isVerticalTouch && !this.isMobileEnvironment;\n //首页布局\n this.leftMenu = this.getMenuByPosition('left');\n this.centerLeftMenu = this.getMenuByPosition('centerLeft');\n this.centerRightMenu = this.getMenuByPosition('centerRight');\n this.rightMenu = this.getMenuByPosition('right');\n this.randomWord = this.randomWord.bind(this);\n autorun(() => {\n this.hsyBasicInfoInit();\n });\n }\n\n getMenuByPosition(position) {\n const { leftMenu, centerLeftMenu, centerRightMenu, rightMenu, leftMenuTC, rightMenuTC, centerLeftMenuMobileCC, centerLeftMenuMobileTC, centerRightMenuMobileCC, centerRightMenuMobileTC, rightMenuMobileTC, rightMenuMobileCC } = Menus;\n switch (position) {\n case \"left\":{\n return this.getMenuByEnvironment(leftMenu,leftMenuTC,[],[]);\n }\n case \"centerLeft\":{\n return this.getMenuByEnvironment(centerLeftMenu,centerLeftMenu, centerLeftMenuMobileTC,centerLeftMenuMobileCC)\n }\n case \"centerRight\":{\n return this.getMenuByEnvironment(centerRightMenu,centerRightMenu, centerRightMenuMobileTC,centerRightMenuMobileCC)\n }\n case \"right\":{\n return this.getMenuByEnvironment(rightMenu,rightMenuTC, rightMenuMobileTC,rightMenuMobileCC)\n }\n }\n }\n\n getMenuByEnvironment(ccMenu,tcMenu,tcMobilMenu,ccMobilMenu){\n if(this.isNewRetailBCPosTC){\n // if(this.isMobileEnvironment){\n // return tcMobilMenu;\n // }else{\n // return tcMenu;\n // }\n return tcMenu;\n }else{\n // if(this.isMobileEnvironment){\n // return ccMobilMenu;\n // }else{\n // return ccMenu;\n // }\n return ccMenu;\n }\n }\n\n\n catchOfflineData = async () => {\n const { offlineSys } = this.context.stores;\n const isLoginAfter = localStore.get(\"isLoginAfter\");\n const downloadCatcherDay = localStore.get(\"downloadCatcherDay\");\n const currentDay = Math.ceil(new Date() / 1000 / 60 / 60 / 24)\n if (isLoginAfter == 1) {\n // 增加每天第一次登陆下载数据\n if (!downloadCatcherDay || currentDay > downloadCatcherDay) {\n try {\n Loading.show({\n text: '离线数据下载中,请稍等...',\n delay: 0,\n showProgress: true\n });\n function downProgress(params) {\n Loading.transfer(params)\n }\n let result = await offlineSys.downloadCatcherData(downProgress);\n if (result) localStore.set(\"downloadCatcherDay\", currentDay);\n Loading.hide();\n } catch (ex) {\n console.log('downloadCatcherData下载离线数据', ex);\n Loading.hide();\n } finally {\n Loading.hide();\n }\n }\n localStore.set(\"isLoginAfter\", 0)\n }\n }\n\n getOperation = () => {\n return new Promise((resolve, reject) => {\n const { homeOperation, functionData } = Request;\n homeOperation().then(operations => {\n localStore.set('operationsAuth', JSON.stringify(operations));\n this.setState({ operations: operations || [] });\n resolve()\n }).catch((err) => {\n console.log('homeOperation.error======', err);\n Loading.hide();\n resolve()\n })\n functionData().then(data => {\n PosSetData(data);\n })\n })\n }\n\n initPageData = async () => {\n const { stores = {}, headHook: { addClass } = {} } = this.context;\n const hasUseOffline = (PosInitData('IsOfflineCash') === \"1\") && !(this.isVerticalTouch || this.isMobileEnvironment); //是否允许离线\n // const hasUseOffline = true;\n if (hasUseOffline == true) {\n await this.catchOfflineData(); //离线数据下发\n }\n Loading.show({\n text: '权限加载中,请稍等...',\n delay: 2500\n });\n //权限加载\n try {\n await this.getOperation()\n } catch (err) {\n Loading.hide()\n } finally {\n Loading.hide();\n }\n addClass && addClass(this.state.id, 'portalHead');\n // 初始化参数设置。\n stores.setStore.initSetParams().then(ret => {\n // 在客户端中,如果开启了副屏设置,尝试这打开副屏。\n if (this.getScreenType() === true) {\n if (this.isHorizontalSunMi) {\n this.sunMiPresentationInit(ret);\n return;\n }\n console.log('副屏页面打开之前,user信息', JSON.stringify(stores.user));\n window.open('vicescreen?ts=' + new Date().getTime(), 'screen');\n setTimeout(() => {\n console.log('副屏页面打开之后,user信息', JSON.stringify(stores.user))\n }, 3000);\n }\n })\n this.hsyBasicInfoInit();\n }\n\n componentDidMount() {\n this.initPageData();\n this.isHsyIframeInclude && this.initCCFrameWin();\n }\n // 初始化好生意iframe\n initCCFrameWin() {\n let that = this;\n this.ccFrameStore = new stores.IframeStore(document.getElementById(CC_FRAME_CONF.id), this.hsy_domain, function(e, instance) {\n console.log(e, instance, 'cciframe 接收消息');\n if (e.data && e.data.type === CC_FRAME_CONF.HsyLoadFinish) {\n !that.state.isHsyLoadFinish && that.setState({ isHsyLoadFinish: true });\n }\n }, function(e, instance) {\n console.log(\"ccFrameWin 加载成功========>\", e, instance);\n instance.sendMessage({ type: CC_FRAME_CONF.initConnect, _ident_only_: CC_FRAME_CONF.identOnly });\n }, CC_FRAME_CONF.identOnly);\n }\n // 初始化商米副屏\n sunMiPresentationInit = (result) => {\n //SunMi初始化参数设置。\n //副屏幕交互。硬件改动20200428 需要在商米页面加载成功后才能发送 初始化命令\n // 进行主副屏数据交互 初始化\n console.log(result);\n const { storeName = '' } = stores.user.options.get('store') || {};\n const { RE_POSParamType } = enumController.getEnumOj();\n const { DUAL_SCREEN_SETTING } = RE_POSParamType;\n const filterResult = result && result.filter?result.filter((settingItem)=>{return settingItem.ParamType === DUAL_SCREEN_SETTING}):[];\n window.sunMi_PresentationManager && window.sunMi_PresentationManager.sharedPreferencesSet(\"setting_setData\",filterResult).then(()=>{\n console.log(\"缓存数据成功\")\n window.sunMi_PresentationManager && window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 0,storeName});\n });\n }\n\n // 初始化智+模块信息\n hsyBasicInfoInit() {\n const theme = stores.portalStore.themeStore;\n let color = '#FF8C25';\n switch (theme) {\n case 'orange':\n color = \"#FF8C25\";\n break;\n case 'blue':\n color = \"#3491FF\";\n break;\n case 'dark':\n color = \"#26A0DE\";\n break;\n case 'pink':\n color = \"#FF6B8C\";\n break;\n }\n const { PosId = '' } = localStore && localStore.get('StoreKey') || {};\n const cc_url = `${this.hsy_domain.replace('#/', '')}?fromApp=nretail&posid=${PosId}&content_only=true&bar_bg=${encodeURIComponent('#FFFFFF')}&bar_active_bg=${encodeURIComponent(color)}`;\n this.setState({ loadHsyURL: cc_url });\n }\n\n //初始化tc、tcyzj、tczsy信息\n getTcBasicInfoInit = () => {\n let userStore = User.restore();\n let sid = userStore.sid;\n let tplusUrl = PosInitData(\"TplusSite\") || PosInitData(\"tplusinnersite\");\n if (!tplusUrl) {\n let msg = \"请用admin登录,在服务器配置–地址配置处,设置“内部或外部网络访问T+服务器的地址”!\";\n ModalWraper.warning(\n {\n title: '温馨提示',\n content: msg,\n okText: '确定',\n okType: 'primary',\n }\n )\n return false;\n }\n if (tplusUrl.substring(tplusUrl.length - 1) !== '/') {\n tplusUrl += '/';\n }\n let ossjumpUrl = `${tplusUrl}view/portal/portal.html?t=${new Date().getTime()}`\n if (sid) {\n ossjumpUrl = `${tplusUrl}view/ossjump.html?t=${new Date().getTime()}&sid=${sid}`\n }\n let postMsgUrl = ossjumpUrl;\n let { user } = this.context.stores;\n let loginInfo = user.options.get('loginInfo');\n const { UserCode, AccountNum, posCode, TplusStoreId } = loginInfo || {};\n const uid = this.tplusEncode(UserCode);\n const pwd = this.tplusEncode(user.options.get(\"password\"));\n const accNum = this.tplusEncode(AccountNum)\n const code = this.tplusEncode(posCode);\n const store = this.tplusEncode(TplusStoreId + '');\n ossjumpUrl += `&fromApp=nretail&way=inframe&user=${uid}&pwd=${pwd}&accNum=${accNum}&posCode=${code}&storeID=${store}`;\n return { ossjumpUrl, postMessageUrl: postMsgUrl };\n }\n\n componentWillUnmount() {\n this.ccFrameStore && this.ccFrameStore.destroy();\n const { headHook: { removeClass } = {} } = this.context\n removeClass && removeClass(this.state.id, 'portalHead');\n }\n\n componentWillReceiveProps() {\n if (this.getScreenType() === true) {\n if (this.isHorizontalSunMi && this.FuPingIsLoaded) {\n window.sunMi_PresentationManager && window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });\n } else {\n nativeMs && nativeMs.setIpcRendererMethod('ReplyScreen', { step: 1 })\n }\n }\n }\n\n // 获取副屏的状态\n getScreenType = () => {\n let flag = false;\n if (this.hasElectron === true || this.isHorizontalSunMi) {\n let data = localStore.get('setting_setData') || [];\n data = data.filter(item => item.Name === 'EnableDoubleScreen');\n data = data && data.length > 0 ? data.shift() : null;\n if (data && data.Value === '1') {\n flag = true;\n }\n }\n return flag;\n }\n\n menuClick(item, e) {\n history.push(item.path);\n }\n saveLog = (name) => {\n const { saveLogo } = Request;\n name = \"进入模块:\" + name;\n saveLogo('进入模块', undefined, name);\n }\n\n handelClick = (values = {}) => {\n const { key: type, isModal, iframe, app, title, Name, style, search, tmenuCode } = values;\n const { operations, isHsyLoadFinish } = this.state;\n const controllable = operations.find(vv => vv.Name === Name);\n const { Visibility, HoldFunctionAuth, Title, MenuCode } = controllable || {};\n let errorTip;\n\n if(!stores.offlineSys.shouldOpenHomeOperation(Name)) {\n Message.warn(\"离线模式下此操作不可用\")\n return;\n }\n\n if (type == 'more') {\n // if (this.isMobileEnvironment) { //暂时不支持android系统跳转\n // return Message.warn('新功能正在研发中,敬请期待。');\n // }\n return this.setState({ showMoreModal: true })\n }\n if (!Title) {\n return ModalWraper.warning({\n title: '提示',\n content: '您的权限配置请求失败,请重新登录',\n onOk() {\n User.logout();\n },\n okType: 'primary',\n })\n }\n\n\n\n if (!Visibility) {\n errorTip = `您的 ${Title} 模块没有启用`;\n } else if (!HoldFunctionAuth) {\n errorTip = `您没有操作 ${Title} 的权限`;\n }\n const { portalStore } = this.context.stores;\n if (errorTip) {\n return Message.warn(errorTip);\n }\n if (isModal) {\n return stores.modalRouter.show({ url: `/${type}`, width: 800, title });\n }\n // 支持页面内打开,减少再次加载页面的时间。\n if (iframe === true) return this.toFramePage({ type, app, title, style, search, MenuCode, tmenuCode, isHsyLoadFinish });\n switch (type) {\n case 'cashier':\n portalStore.checkDuty().then((onDutyMessage) => {\n if (!!onDutyMessage) {\n const { Code, IdShiftVoucher, Shift, IdDailyVoucher, DailyCode } = onDutyMessage;\n PosSetData({ ShiftCode: Code, IdShiftVoucher, Shift, IdDailyVoucher, DailyCode });\n console.log('onDutyMessage======', onDutyMessage);\n this.saveLog(title);\n history.push('/RE/RE01');\n }\n }).catch((data) => {\n console.log(\"进入前台收银检查是否当班返回错误\", data);\n });\n break;\n case 'onDuty':\n portalStore.onDuty().then((onDutyMessage) => {\n if (onDutyMessage && onDutyMessage.shift) {\n MiddleWare.execute('onDuty')\n }\n });\n break;\n case 'offDuty':\n history.push('/offDuty?type=offDuty');\n break;\n case 'settleDialy':\n if (portalStore.bPosDaily()) {\n history.push('/offDuty?type=settleDaily');\n } else {\n portalStore.onMakerDaily();\n }\n break;\n default:\n history.push(`/${type}`);\n break;\n }\n };\n\n //跳转其他页面,以内嵌形式打开\n toFramePage = (params) => {\n const { app, title, style, search, tmenuCode, MenuCode, isHsyLoadFinish } = params || {}\n switch (app) {\n case 'cc':\n let sh = '';\n // if (this.isMobileEnvironment) { //暂时不支持android系统跳转\n // return Message.warn('新功能正在研发中,敬请期待。');\n // }\n if (!isHsyLoadFinish && !this.isMobileEnvironment) {\n return Message.warn('正在加载资源中,请稍后。');\n }\n if (!search) {\n return Message.warn('正在紧急研发中...');\n } else if (search && search.length > 0) {\n sh = (search.length > 1 && MenuCode) ? search.find(v => v.menu === MenuCode) : search[0];\n sh = sh || search[0];\n }\n if (!sh) {\n return Message.warn('传递参数有误,请查证。');\n }\n this.toHsyPage({ ...style, ...sh });\n break;\n case 'tc':\n if (tmenuCode || MenuCode) {\n this.saveLog(title);\n if (MenuCode) {\n this.toTplusPage(MenuCode, search);\n } else {\n this.toTplusPage(tmenuCode, search);\n }\n }\n break;\n }\n }\n\n getTplusUrlFromCloudServer = () => {//获取T+服务器配置地址。\n let userStore = User.restore();\n let data = 'accesstoken=' + `${userStore.accessToken}` + '&cloudOrgId=' + `${userStore.orgId}`;\n let url = `${HTTP_PROXY_URL}` + encodeURIComponent('http://mns.chanapp.chanjet.com/web/WebServer/get?' + `${data}`);\n console.log(url);\n let fetchHeader = {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }\n };\n return new Promise((resolve, reject) => {\n fetch(url, fetchHeader)\n .then(function (response) {\n return response.json();\n }).then(json => {\n console.log(json);\n resolve(json);\n }).catch(ex => {\n console.log(ex);\n reject(err);\n })\n })\n }\n\n //跳转到T+\n toTplusPage = async (tmenuCode, search) => {\n let ret = this.getTcBasicInfoInit();\n if (ret === false) return;\n let { ossjumpUrl, postMessageUrl } = ret || {};\n let dsearchPlanID = '';\n if (search && search.id) {\n const { portalStore } = this.context.stores;\n dsearchPlanID = await portalStore.getSearchPlanId(search);\n }\n let menu = this.tplusEncode(tmenuCode);\n ossjumpUrl += `&menu=${menu}&fromUrl=${this.tplusEncode(location.origin)}`;\n if (dsearchPlanID) {\n ossjumpUrl += `&searchPlanID=${this.tplusEncode(dsearchPlanID)}`;\n }\n if (this.isHorizontalSunMi) {\n window.android_CommonFun.openWebUrlByOutBrowser(ossjumpUrl);\n } else {\n //对于专属云、云主机,如果配置的http,存在跨域问题,暂时解决不了,只能通过打开默认浏览器打开。\n //目前T+页面有很多进一步操作的界面,无法得到解决,特针对跳转T+页面的,都使用默认浏览器打开。2021-10-27\n if (this.new_retail_app == 'tc' || this.new_retail_app == 'tczsy' || this.new_retail_app == 'tcyzj') {\n nativeMs.useDefaultBrowser(ossjumpUrl);\n return;\n }\n let external_frame_tc = document.getElementById('external-frame-tc');\n let win = external_frame_tc.contentWindow;\n const { loadTcURL } = this.state;\n if (loadTcURL) {\n win && win.postMessage({ doType: 'openMenuFromPos', tmenuCode, ossjumpUrl, dsearchPlanID }, postMessageUrl);\n this.setState({ loadTcPage: true });\n } else {\n this.setState({ loadTcURL: ossjumpUrl, loadTcPage: true });\n }\n rx$.changeHsy.next({\n back: true, fn: () => {\n win && win.postMessage({ doType: 'closeCurrentMenuFromPos' }, postMessageUrl);\n this.setState({ loadTcPage: false });\n rx$.changeHsy.next({ back: false });\n }\n })\n }\n }\n\n //跳转CC\n toHsyPage = async (params) => {\n let {\n content_only, //只加载内容区域\n bar_bg, //页签栏颜色\n bar_active_bg, //激活态的标签背景颜色\n menu,\n secondRouter,\n activePrompt,\n closePrompt,\n closeable,\n leavePrompt,\n lock,\n pageId,\n pageParams,\n path,\n tabId,\n tabLabel,\n pageType,\n _k\n } = params;\n\n let filter = {};\n //对仓库参数的处理\n const IdWarehouse = PosInitData('IdWarehouse') || '';\n const WarehouseName = PosInitData('WarehouseName') || '';\n const IsPerformanceDistribution = PosInitData('PerformanceDistribution') === 'SHIPPER_STORE' || false;\n const { IdStore = '', PosId = '' } = stores.user.options.get('loginInfo') || {};\n const { storeName = '' } = stores.user.options.get('store') || {};\n\n switch (pageType) {\n case 'voucher':\n filter = {\n defaultValue: {\n storeId: {\n id: IdStore,\n storeName\n },\n warehouseId: {\n id: IdWarehouse,\n name: WarehouseName\n }\n }\n }\n //要货单特殊处理\n if (menu == 'require-goods-new') {\n filter = {\n defaultValue: {\n storeId: {\n id: IdStore,\n storeName\n },\n requireWarehouseId: {\n id: IdWarehouse,\n name: WarehouseName\n }\n }\n }\n }\n if (menu == 'pre-sell'){\n filter = {\n storeId: [{id: IdStore, storeName}],\n orderStatusEnum: 'WAIT_DELIVERY',\n }\n }\n break;\n case 'report':\n filter = {\n filterValue: {\n storeId: {\n value: {\n id: IdStore,\n storeName\n }\n },\n warehouseId: {\n value: [{\n id: IdWarehouse,\n name: WarehouseName\n }]\n }\n }\n }\n // 收银统计表\n if (IsPerformanceDistribution && menu == 'retail-cash-report') {\n filter = {\n filterValue: {\n deliveryStoreId: {\n value: {\n id: IdStore,\n storeName\n }\n },\n warehouseId: {\n value: [{\n id: IdWarehouse,\n name: WarehouseName\n }]\n }\n }\n }\n }\n // 售后、配送\n if (menu == 'return-order' || menu == 'order-manage') {\n filter = {\n filterValue: {\n storeId: {\n value: {\n id: IdStore,\n storeName\n }\n },\n deliveryWarehouseId: {\n value: [{\n id: IdWarehouse,\n name: WarehouseName\n }]\n }\n }\n }\n }\n break;\n }\n bar_bg = encodeURIComponent(bar_bg);\n bar_active_bg = encodeURIComponent(bar_active_bg);\n menu = secondRouter ? `${menu}/${this.randomWord(true, 13)}` : menu;\n pageId = menu;\n pageParams = Object.assign(pageParams, filter);\n path = encodeURIComponent(path);\n _k = this.randomWord(false, 6);\n\n const commonArgs = `?posid=${PosId}&content_only=${content_only}&bar_bg=${bar_bg}&bar_active_bg=${bar_active_bg}`;\n const actionUrl = `#/${menu}?activePrompt=${activePrompt}&closePrompt=${closePrompt}&closeable=${closeable}&leavePrompt=${leavePrompt}&lock=${lock}&pageId=${pageId}&pageParams=${encodeURIComponent(JSON.stringify(pageParams))}&path=${path}&tabId=${tabId}&tabLabel=${encodeURIComponent(tabLabel)}&_k=${_k}`;\n let cc_url = this.hsy_domain.replace('#/', '') + commonArgs + actionUrl;\n console.log('web_hsy_url:', cc_url);\n if(this.isHorizontalSunMi){\n const CC_WEB_URL = await User.getLoginCCMidWebUrl(cc_url)\n console.log('CC_WEB_URL:', CC_WEB_URL);\n window.android_CommonFun.openWebUrlByOutBrowser(CC_WEB_URL);\n }else{\n // this.ccFrameWin && this.ccFrameWin.HsyRouterJump && this.ccFrameWin.HsyRouterJump(pageId, pageParams, { closeable, tabLabel });\n this.ccFrameStore && this.ccFrameStore.sendMessage({type: CC_FRAME_CONF.HsyRouterJump, pageId, pageParams, extStateParams: { closeable, tabLabel }, _ident_only_: CC_FRAME_CONF.identOnly })\n if (this.state.showMoreModal === true) {\n this.setState({ loadHsyPage: true, showMoreModal: false });\n } else {\n this.setState({ loadHsyPage: true });\n }\n rx$.changeHsy.next({\n back: true, fn: () => {\n this.setState({ loadHsyPage: false });\n rx$.changeHsy.next({ back: false });\n // 在打开页签之前,关闭之前的,返回键的回调函数\n // this.ccFrameWin && this.ccFrameWin.HsyRouterClean && this.ccFrameWin.HsyRouterClean();\n this.ccFrameStore && this.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterClean, _ident_only_: CC_FRAME_CONF.identOnly });\n }\n })\n }\n }\n\n randomWord = (only, digits) => {\n let str = \"\";\n const number = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\n const 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']\n let arr = only ? [...number] : [...number, ...letter];\n for (let i = 0; i < digits; i++) {\n let pos = Math.round(Math.random() * (arr.length - 1));\n str += arr[pos];\n }\n return str;\n }\n\n closeFrameModal = () => {\n this.setState({ showModal: false })\n }\n\n closeMoreModal = () => {\n this.setState({ showMoreModal: false })\n }\n\n tplusEncode = (code) => {\n let c = String.fromCharCode(code.charCodeAt(0) + code.length);\n for (let i = 1; i < code.length; i++) {\n c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1));\n }\n let ret = this.TplusBase64Encode(c);\n return ret;\n }\n\n TplusBase64Encode = (input) => {\n const _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n let output = \"\";\n let chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n let i = 0;\n input = this._utf8_encode(input);\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output +\n _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +\n _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n }\n return output;\n }\n _utf8_encode = (string) => {\n string = string.replace(/\\r\\n/g, \"\\n\");\n let utftext = \"\";\n for (let n = 0; n < string.length; n++) {\n let c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n return utftext;\n }\n\n operationControl = (menu = []) => {\n const { operations } = this.state;\n menu.forEach(v => {\n if (v.sub) {\n return this.operationControl(v.sub);\n }\n const controllable = operations.find(vv => vv.Name === v.Name);\n const { Visibility, HoldFunctionAuth, Title } = controllable || {};\n let errorTip;\n if (!Visibility) {\n errorTip = `您的 ${Title} 模块没有启用`;\n } else if (!HoldFunctionAuth) {\n errorTip = `您没有操作 ${Title} 的权限`;\n }\n v.errorTip = errorTip;\n });\n return menu;\n }\n\n createLeftNode = () => {\n const menu = this.leftMenu;\n var width = menu.length == 0 ? this.isMobileEnvironment & !this.isNewRetailBCPosTC ? 5 : 4 : 7;\n if(menu.length == 0) {\n return (<Col xl={width} md={width} className='portal-left-col' key='left'>\n <div className='portal-left-content'></div>\n </Col>);\n // return null;\n }\n const menuNode = menu.map(v => {\n return (v.container ?\n <div style={v.container.style} className={v.container.className} key={v.container.className}>\n {\n v.sub.map(vv => {\n let item = vv;\n if (vv.maybe === true) {\n let status = !!PosInitData('ShowStorePrice');\n item = status ? vv : vv.second;\n }\n return (<div\n className={`member-item ${item.className} ${item.disabled ? 'menu-item-disabled' : ''}`}\n key={item.className}\n onClick={this.handelClick.bind(this, item)}\n >\n {!!item.title && <h1>{item.title}</h1>}\n {!!item.label && <p>{item.label}</p>}\n {!!item.icon && <Ticon icon={item.icon} />}\n </div>)\n })\n }\n </div>\n :\n <div\n className={`member-item ${v.className} ${v.disabled ? 'menu-item-disabled' : ''}`}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {v.title && <h1>{v.title}</h1>}\n {v.label && <p>{v.label}</p>}\n {v.icon && <Ticon icon={v.icon} />}\n </div>)\n })\n return (<Col xl={7} md={7} className='portal-left-col' key='left'>\n <div className='portal-left-content'>{menuNode}</div>\n </Col>);\n }\n createCenterNode = () => {\n const menuLeftNode = this.centerLeftMenu.map(v => {\n return (<div\n className={`worktop-item ${v.className} ${v.disabled ? 'menu-item-disabled' : ''}`}\n style={v.style}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {v.title && <h1>{v.title}</h1>}\n {v.label && <p>{v.label}</p>}\n {v.icon && <Ticon icon={v.icon} />}\n {v.disabled && <div className='item-disabled-placeholder' />}\n </div>)\n });\n const menuRightNode = this.centerRightMenu.map(v => {\n return (v.container ?\n <div style={v.container.style} className={v.container.className} key={v.container.className}>\n {\n v.sub.map(vv => {\n return (<div\n className={`worktop-item ${vv.className} ${vv.disabled ? 'menu-item-disabled' : ''}`}\n key={vv.className}\n onClick={this.handelClick.bind(this, vv)}\n >\n {vv.title && <h1>{vv.title}</h1>}\n {vv.label && <p>{vv.label}</p>}\n {vv.icon && <Ticon icon={vv.icon} />}\n </div>)\n })\n }\n </div>\n :\n <div\n className={`worktop-item ${v.className} ${v.disabled ? 'menu-item-disabled' : ''}`}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {v.title && <h1>{v.title}</h1>}\n {v.label && <p>{v.label}</p>}\n {v.icon && <Ticon icon={v.icon} />}\n </div>)\n });\n return <div><div className='worktop-container-left'>{menuLeftNode}</div><div className='worktop-container-right'>{menuRightNode}</div></div>;\n }\n createRightNode = () => {\n var width = this.leftMenu.length == 0 ? this.isMobileEnvironment & !this.isNewRetailBCPosTC ? 9 : 10 : 7;\n const node = this.rightMenu.map(v => {\n return (v.container ?\n <div style={v.container.style} className={v.container.className} key={v.container.className}>\n {\n v.sub.map(vv => {\n return (<div\n className={`stock-item ${vv.className} ${vv.disabled ? 'menu-item-disabled' : ''}`}\n key={vv.className}\n onClick={this.handelClick.bind(this, vv)}\n >\n {vv.title && <h1>{vv.title}</h1>}\n {vv.label && <p>{vv.label}</p>}\n {vv.icon && <Ticon icon={vv.icon} />}\n </div>)\n })\n }\n </div>\n :\n <div\n className={`stock-item ${v.className} ${v.disabled ? 'menu-item-disabled' : ''}`}\n style={v.style}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {!!v.title && <h1>{v.title}</h1>}\n {!!v.icon && <Ticon icon={v.icon} />}\n </div>)\n });\n return <Col xl={width} md={width} className='portal-right-col' key='right'>\n <div className='portal-right-content'>{node}</div>\n </Col>\n }\n\n createMoreNode = () => {\n const arrs = this.getMoreNodeInfo();\n const items = this.isNewRetailBCPosTC ? arrs.sub_tc : arrs.sub_cc || [];\n const node = items.length > 0 && items.map(v => {\n return (\n <div\n className={`modal-quick ${v.className}`}\n style={v.style}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {!!v.icon && <div className='quick'><Ticon icon={v.icon} /></div>}\n {!!v.title && <h1>{v.title}</h1>}\n </div>\n )\n })\n return node;\n }\n\n getMoreNodeInfo = () => {\n if (this.isNewRetailBCPosTC) {\n // if (this.isMobileEnvironment) {\n // return this.centerRightMenu.find(vv => vv.key == 'more') || {};\n // } else {\n return this.centerRightMenu.find(v => v.sub && v.sub.find(vv => vv.key == 'more')).sub[1] || {};\n // }\n } else {\n // if (this.isMobileEnvironment) {\n // return this.centerRightMenu.find(vv => vv.key == 'more') || {};\n // } else {\n return this.centerRightMenu.find(v => v.sub && v.sub.find(vv => vv.key == 'more')).sub[1] || {};\n // }\n }\n }\n\n render() {\n const { showModal,showMoreModal, modalURL, loadHsyPage, loadHsyURL, loadTcPage, loadTcURL } = this.state;\n const screenHeight = window.screen.availHeight - 100;\n let htmlContent = null;\n if (this.isVerticalTouch) {\n htmlContent = <VerticalPortal handelClick={this.handelClick} />\n }\n // else if (this.isHorizontalPad) {\n // htmlContent = <HorizontalPadPortal handelClick={this.handelClick} />\n // }\n else {\n htmlContent = (<Layout style={{ height: '100%' }} className='portal-content'>\n <Content style={{ paddingLeft: '50px', paddingRight: '50px' }} className='portal-container portal-container-center'>\n <Row className=\"portal-content-row\">\n {this.createLeftNode()}\n <Col xl={10} md={10} className='portal-center-col' key='center'>\n <div className='portal-center-content'>\n {this.createCenterNode()}\n </div>\n </Col>\n {this.createRightNode()}\n </Row>\n </Content>\n {\n <div className={loadHsyPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide'}>\n <iframe src={loadHsyURL} width='100%' height='93%' frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"yes\" allowtransparency=\"true\" id={CC_FRAME_CONF.id}></iframe>\n </div>\n }\n {\n <div className={loadTcPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide'}>\n <iframe src={loadTcURL} width='100%' height='93%' frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"yes\" allowtransparency=\"true\" id=\"external-frame-tc\"></iframe>\n </div>\n }\n {\n this.isMobileEnvironment &&\n <Modal\n visible={showModal}\n onCancel={this.closeFrameModal}\n width={'99%'}\n height={'99%'}\n footer={null}\n >\n <iframe src={modalURL} width='100%' height={screenHeight} frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"yes\" allowtransparency=\"true\"></iframe>\n </Modal>\n }\n {\n <Modal\n title={'更多'}\n className={'portal-container-modal-more'}\n visible={showMoreModal}\n onCancel={this.closeMoreModal}\n width={800}\n height={375}\n footer={null}\n centered\n maskClosable={false}\n keyboard={false}\n >\n {\n this.createMoreNode()\n }\n </Modal>\n }\n </Layout>)\n }\n return htmlContent;\n }\n}"]}
1
+ {"version":3,"sources":["tplus-portaltouch/pages/Portalbc/index.js"],"names":["hasElectron","env","platform","constant","electron","Content","Layout","Footer","tplusWindow","HTTP_PROXY_URL","CC_FRAME_CONF","id","identOnly","initConnect","HsyLoadFinish","HsyRouterClean","HsyRouterJump","observer","props","catchOfflineData","offlineSys","context","stores","isLoginAfter","localStore","get","downloadCatcherDay","currentDay","Math","ceil","Date","downProgress","params","Loading","transfer","show","text","delay","showProgress","downloadCatcherData","result","set","hide","console","log","getOperation","resolve","reject","homeOperation","Request","functionData","then","operations","setState","catch","err","data","initPageData","headHook","addClass","hasUseOffline","otherOfflineStatus","state","setStore","initSetParams","getScreenType","isHorizontalSunMi","sunMiPresentationInit","ret","user","window","open","getTime","setTimeout","hsyBasicInfoInit","options","storeName","enumController","getEnumOj","RE_POSParamType","DUAL_SCREEN_SETTING","filterResult","filter","settingItem","ParamType","sunMi_PresentationManager","sharedPreferencesSet","sendMessageToSecondScreen","step","getTcBasicInfoInit","userStore","User","restore","sid","tplusUrl","msg","ModalWraper","warning","title","content","okText","okType","substring","length","ossjumpUrl","postMsgUrl","loginInfo","UserCode","AccountNum","posCode","TplusStoreId","uid","tplusEncode","pwd","accNum","code","store","postMessageUrl","flag","item","Name","shift","Value","saveLog","name","saveLogo","undefined","handelClick","values","type","key","isModal","iframe","app","style","search","tmenuCode","isHsyLoadFinish","controllable","find","vv","Visibility","HoldFunctionAuth","Title","MenuCode","errorTip","shouldOpenHomeOperation","Message","warn","showMoreModal","onOk","logout","portalStore","modalRouter","url","width","toFramePage","checkDuty","onDutyMessage","Code","IdShiftVoucher","Shift","IdDailyVoucher","DailyCode","ShiftCode","history","push","onDuty","MiddleWare","execute","bPosDaily","onMakerDaily","sh","isMobileEnvironment","v","menu","toHsyPage","toTplusPage","getTplusUrlFromCloudServer","accessToken","orgId","encodeURIComponent","fetchHeader","headers","fetch","response","json","ex","dsearchPlanID","getSearchPlanId","location","origin","android_CommonFun","openWebUrlByOutBrowser","new_retail_app","nativeMs","useDefaultBrowser","external_frame_tc","document","getElementById","win","contentWindow","loadTcURL","postMessage","doType","loadTcPage","rx$","changeHsy","next","back","fn","content_only","bar_bg","bar_active_bg","secondRouter","activePrompt","closePrompt","closeable","leavePrompt","lock","pageId","pageParams","path","tabId","tabLabel","pageType","_k","IdWarehouse","WarehouseName","IsPerformanceDistribution","IdStore","PosId","defaultValue","storeId","warehouseId","requireWarehouseId","orderStatusEnum","filterValue","value","deliveryStoreId","deliveryWarehouseId","randomWord","commonArgs","actionUrl","cc_url","hsy_domain","replace","getLoginCCMidWebUrl","CC_WEB_URL","ccFrameStore","sendMessage","extStateParams","_ident_only_","loadHsyPage","only","digits","str","number","letter","arr","i","pos","round","random","closeFrameModal","showModal","closeMoreModal","c","String","fromCharCode","charCodeAt","TplusBase64Encode","input","_keyStr","output","chr1","chr2","chr3","enc1","enc2","enc3","enc4","_utf8_encode","isNaN","charAt","string","utftext","n","operationControl","forEach","sub","createLeftNode","leftMenu","isNewRetailBCPosTC","menuNode","map","container","className","maybe","status","second","disabled","bind","label","icon","createCenterNode","menuLeftNode","centerLeftMenu","menuRightNode","centerRightMenu","createRightNode","node","rightMenu","createMoreNode","arrs","getMoreNodeInfo","items","sub_tc","sub_cc","now","loadHsyURL","modalURL","isVerticalTouch","isHorizontalPad","FuPingIsLoaded","getWebEntry","isHsyIframeInclude","getMenuByPosition","position","Menus","leftMenuTC","rightMenuTC","centerLeftMenuMobileCC","centerLeftMenuMobileTC","centerRightMenuMobileCC","centerRightMenuMobileTC","rightMenuMobileTC","rightMenuMobileCC","getMenuByEnvironment","ccMenu","tcMenu","tcMobilMenu","ccMobilMenu","initCCFrameWin","that","IframeStore","e","instance","theme","themeStore","color","destroy","removeClass","setIpcRendererMethod","screenHeight","screen","availHeight","htmlContent","height","paddingLeft","paddingRight","Component","propTypes","routes","PropTypes","array","contextTypes","object","infoRender","func"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAAA;;;;;;;;;AAOA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;AACA;;;;AAEA,IAAMA,cAAeC,oBAAIC,QAAJ,KAAiBD,oBAAIE,QAAJ,CAAaD,QAAb,CAAsBE,QAA5D;IACQC,O,GAAoBC,4B,CAApBD,O;IAASE,M,GAAWD,4B,CAAXC,M;;AACjB,IAAIC,cAAc,IAAlB;AACA,IAAMC,iBAAiB,kCAAvB;AACA,IAAMC,gBAAgB,EAAEC,IAAI,mBAAN,EAA2BC,WAAW,WAAtC,EAAmDC,aAAa,aAAhE,EAA+EC,eAAe,eAA9F,EAA+GC,gBAAgB,gBAA/H,EAAiJC,eAAgB,eAAjK,EAAtB;;mBACCC,mB;;;AAWC,oBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AAAA,0IACXA,KADW;;AAAA,UA0EnBC,gBA1EmB,4EA0EA;AAAA;AAAA;AAAA;AAAA;AAAA;AACTC,wBADS,GACM,MAAKC,OAAL,CAAaC,MADnB,CACTF,UADS;AAEXG,0BAFW,GAEIC,2BAAWC,GA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AAU,KAAzH,EAA+H,mBAAkB,MAAjJ,EAAwJ,IAAG,mBAA3J;AADF,aAlBW;AAuBX,iBAAK7B,mBAAL,IACA;AAAC,yBAAD;AAAA;AACE,yBAAS4F,SADX;AAEE,0BAAU,KAAKD,eAFjB;AAGE,uBAAO,KAHT;AAIE,wBAAQ,KAJV;AAKE,wBAAQ;AALV;AAOI,wDAAQ,KAAKyD,QAAb,EAAuB,OAAM,MAA7B,EAAoC,QAAQiC,YAA5C,EAA0D,aAAY,IAAtE,EAA2E,QAAO,GAAlF,EAAsF,aAAY,GAAlG,EAAsG,cAAa,GAAnH,EAAuH,WAAU,KAAjI,EAAuI,mBAAkB,MAAzJ;AAPJ,aAxBW;AAmCX;AAAC,yBAAD;AAAA;AACE,uBAAO,IADT;AAEE,2BAAW,6BAFb;AAGE,yBAAS7M,aAHX;AAIE,0BAAU,KAAKqH,cAJjB;AAKE,uBAAO,GALT;AAME,wBAAQ,GANV;AAOE,wBAAQ,IAPV;AAQE,8BARF;AASE,8BAAc,KAThB;AAUE,0BAAU;AAVZ;AAaI,mBAAK+C,cAAL;AAbJ;AAnCW,WAAf;AAqDD;AACD,aAAO4C,WAAP;AACD;;;EAt8B0BI,gB,WACpBC,S,GAAY;AACjBC,UAAQC,oBAAUC;AADD,C,UAGZC,Y,GAAe;AACpBxV,UAAQsV,oBAAUG,MADE;AAEpBC,cAAYJ,oBAAUK,IAFF;AAGpBvT,YAAUkT,oBAAUG;AAHA,C","file":"index.js","sourcesContent":["/*\n * @Description:\n * @Date: 2019-08-13 08:42:18\n * @LastEditTime: 2022-03-22 14:23:09\n * @LastEditors: chenlongad\n * @modify:修改跳转到T+的查询方案方式\n */\nimport React, { Component } from 'react';\nimport { observer } from 'mobx-react';\nimport { autorun} from 'mobx';\nimport { Row, Col, Modal } from 'antd';\nimport { history, stores, nativeMs, env, localStore } from 'mutants-microfx';\nimport { Ticon, Layout, ModalWraper, Loading, Message } from 'tplus-components-touch';\nimport { User } from 'tplus-api';\nimport { PosSetData, PosInitData } from 'tplus-poslogin';\nimport { platform, enumController } from 'mutants-util';\nimport PropTypes from 'prop-types';\nimport { Request } from '../../api/ModifyPassApi';\nimport Menus from './data';\nimport MiddleWare from '../../middleWare';\nimport VerticalPortal from './verticalPortal';\nimport HorizontalPadPortal from './horizontalPadPortal';\nimport './index.less';\nimport { async } from 'rxjs';\n\nconst hasElectron = (env.platform === env.constant.platform.electron);\nconst { Content, Footer } = Layout;\nlet tplusWindow = null;\nconst HTTP_PROXY_URL = 'http://tfproxy.chanjet.com/?url=';\nconst CC_FRAME_CONF = { id: 'external-frame-cc', identOnly: '_pos_web_', initConnect: 'initConnect', HsyLoadFinish: 'HsyLoadFinish', HsyRouterClean: 'HsyRouterClean', HsyRouterJump : 'HsyRouterJump' };\n@observer\nexport default class extends Component {\n static propTypes = {\n routes: PropTypes.array,\n };\n static contextTypes = {\n stores: PropTypes.object,\n infoRender: PropTypes.func,\n headHook: PropTypes.object\n };\n ccFrameStore\n constructor(props) {\n super(props);\n this.hasElectron = hasElectron;\n this.state = {\n id: Date.now(),\n operations: [],\n showModal: false,\n showMoreModal: false,\n loadHsyPage: false,\n loadHsyURL: '',\n isHsyLoadFinish: false,\n loadTcPage: false,\n loadTcURL: '',\n modalURL: '',\n }\n const { isVerticalTouch, isHorizontalPad, isHorizontalSunMi, isNewRetailBCPosTC } = platform || {};\n this.isVerticalTouch = !!isVerticalTouch;\n this.isHorizontalPad = !!isHorizontalPad;\n this.isHorizontalSunMi = !!isHorizontalSunMi;\n this.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;\n this.FuPingIsLoaded = false;\n this.isNewRetailBCPosTC = !!isNewRetailBCPosTC;\n this.new_retail_app = localStore && localStore.get('newRetailAppType');\n this.hsy_domain = User && User.getWebEntry();\n // 是否嵌套好生意的iframe\n this.isHsyIframeInclude = !this.isVerticalTouch && !this.isMobileEnvironment;\n //首页布局\n this.leftMenu = this.getMenuByPosition('left');\n this.centerLeftMenu = this.getMenuByPosition('centerLeft');\n this.centerRightMenu = this.getMenuByPosition('centerRight');\n this.rightMenu = this.getMenuByPosition('right');\n this.randomWord = this.randomWord.bind(this);\n autorun(() => {\n this.hsyBasicInfoInit();\n });\n }\n\n getMenuByPosition(position) {\n const { leftMenu, centerLeftMenu, centerRightMenu, rightMenu, leftMenuTC, rightMenuTC, centerLeftMenuMobileCC, centerLeftMenuMobileTC, centerRightMenuMobileCC, centerRightMenuMobileTC, rightMenuMobileTC, rightMenuMobileCC } = Menus;\n switch (position) {\n case \"left\":{\n return this.getMenuByEnvironment(leftMenu,leftMenuTC,[],[]);\n }\n case \"centerLeft\":{\n return this.getMenuByEnvironment(centerLeftMenu,centerLeftMenu, centerLeftMenuMobileTC,centerLeftMenuMobileCC)\n }\n case \"centerRight\":{\n return this.getMenuByEnvironment(centerRightMenu,centerRightMenu, centerRightMenuMobileTC,centerRightMenuMobileCC)\n }\n case \"right\":{\n return this.getMenuByEnvironment(rightMenu,rightMenuTC, rightMenuMobileTC,rightMenuMobileCC)\n }\n }\n }\n\n getMenuByEnvironment(ccMenu,tcMenu,tcMobilMenu,ccMobilMenu){\n if(this.isNewRetailBCPosTC){\n // if(this.isMobileEnvironment){\n // return tcMobilMenu;\n // }else{\n // return tcMenu;\n // }\n return tcMenu;\n }else{\n // if(this.isMobileEnvironment){\n // return ccMobilMenu;\n // }else{\n // return ccMenu;\n // }\n return ccMenu;\n }\n }\n\n\n catchOfflineData = async () => {\n const { offlineSys } = this.context.stores;\n const isLoginAfter = localStore.get(\"isLoginAfter\");\n const downloadCatcherDay = localStore.get(\"downloadCatcherDay\");\n const currentDay = Math.ceil(new Date() / 1000 / 60 / 60 / 24)\n if (isLoginAfter == 1) {\n // 增加每天第一次登陆下载数据\n if (!downloadCatcherDay || currentDay > downloadCatcherDay) {\n try {\n Loading.show({\n text: '离线数据下载中,请稍等...',\n delay: 0,\n showProgress: true\n });\n function downProgress(params) {\n Loading.transfer(params)\n }\n let result = await offlineSys.downloadCatcherData(downProgress);\n if (result) localStore.set(\"downloadCatcherDay\", currentDay);\n Loading.hide();\n } catch (ex) {\n console.log('downloadCatcherData下载离线数据', ex);\n Loading.hide();\n } finally {\n Loading.hide();\n }\n }\n localStore.set(\"isLoginAfter\", 0)\n }\n }\n\n getOperation = () => {\n return new Promise((resolve, reject) => {\n const { homeOperation, functionData } = Request;\n homeOperation().then(operations => {\n localStore.set('operationsAuth', JSON.stringify(operations));\n this.setState({ operations: operations || [] });\n resolve()\n }).catch((err) => {\n console.log('homeOperation.error======', err);\n Loading.hide();\n resolve()\n })\n functionData().then(data => {\n PosSetData(data);\n })\n })\n }\n\n initPageData = async () => {\n const { stores = {}, headHook: { addClass } = {} } = this.context;\n\n const hasUseOffline = (PosInitData('IsOfflineCash') === \"1\") && !platform.otherOfflineStatus;; //是否允许离线\n // const hasUseOffline = true;\n if (hasUseOffline == true) {\n await this.catchOfflineData(); //离线数据下发\n }\n Loading.show({\n text: '权限加载中,请稍等...',\n delay: 2500\n });\n //权限加载\n try {\n await this.getOperation()\n } catch (err) {\n Loading.hide()\n } finally {\n Loading.hide();\n }\n addClass && addClass(this.state.id, 'portalHead');\n // 初始化参数设置。\n stores.setStore.initSetParams().then(ret => {\n // 在客户端中,如果开启了副屏设置,尝试这打开副屏。\n if (this.getScreenType() === true) {\n if (this.isHorizontalSunMi) {\n this.sunMiPresentationInit(ret);\n return;\n }\n console.log('副屏页面打开之前,user信息', JSON.stringify(stores.user));\n window.open('vicescreen?ts=' + new Date().getTime(), 'screen');\n setTimeout(() => {\n console.log('副屏页面打开之后,user信息', JSON.stringify(stores.user))\n }, 3000);\n }\n })\n this.hsyBasicInfoInit();\n }\n\n componentDidMount() {\n this.initPageData();\n this.isHsyIframeInclude && this.initCCFrameWin();\n }\n // 初始化好生意iframe\n initCCFrameWin() {\n let that = this;\n this.ccFrameStore = new stores.IframeStore(document.getElementById(CC_FRAME_CONF.id), this.hsy_domain, function(e, instance) {\n console.log(e, instance, 'cciframe 接收消息');\n if (e.data && e.data.type === CC_FRAME_CONF.HsyLoadFinish) {\n !that.state.isHsyLoadFinish && that.setState({ isHsyLoadFinish: true });\n }\n }, function(e, instance) {\n console.log(\"ccFrameWin 加载成功========>\", e, instance);\n instance.sendMessage({ type: CC_FRAME_CONF.initConnect, _ident_only_: CC_FRAME_CONF.identOnly });\n }, CC_FRAME_CONF.identOnly);\n }\n // 初始化商米副屏\n sunMiPresentationInit = (result) => {\n //SunMi初始化参数设置。\n //副屏幕交互。硬件改动20200428 需要在商米页面加载成功后才能发送 初始化命令\n // 进行主副屏数据交互 初始化\n console.log(result);\n const { storeName = '' } = stores.user.options.get('store') || {};\n const { RE_POSParamType } = enumController.getEnumOj();\n const { DUAL_SCREEN_SETTING } = RE_POSParamType;\n const filterResult = result && result.filter?result.filter((settingItem)=>{return settingItem.ParamType === DUAL_SCREEN_SETTING}):[];\n window.sunMi_PresentationManager && window.sunMi_PresentationManager.sharedPreferencesSet(\"setting_setData\",filterResult).then(()=>{\n console.log(\"缓存数据成功\")\n window.sunMi_PresentationManager && window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 0,storeName});\n });\n }\n\n // 初始化智+模块信息\n hsyBasicInfoInit() {\n const theme = stores.portalStore.themeStore;\n let color = '#FF8C25';\n switch (theme) {\n case 'orange':\n color = \"#FF8C25\";\n break;\n case 'blue':\n color = \"#3491FF\";\n break;\n case 'dark':\n color = \"#26A0DE\";\n break;\n case 'pink':\n color = \"#FF6B8C\";\n break;\n }\n const { PosId = '' } = localStore && localStore.get('StoreKey') || {};\n const cc_url = `${this.hsy_domain.replace('#/', '')}?fromApp=nretail&posid=${PosId}&content_only=true&bar_bg=${encodeURIComponent('#FFFFFF')}&bar_active_bg=${encodeURIComponent(color)}`;\n this.setState({ loadHsyURL: cc_url });\n }\n\n //初始化tc、tcyzj、tczsy信息\n getTcBasicInfoInit = () => {\n let userStore = User.restore();\n let sid = userStore.sid;\n let tplusUrl = PosInitData(\"TplusSite\") || PosInitData(\"tplusinnersite\");\n if (!tplusUrl) {\n let msg = \"请用admin登录,在服务器配置–地址配置处,设置“内部或外部网络访问T+服务器的地址”!\";\n ModalWraper.warning(\n {\n title: '温馨提示',\n content: msg,\n okText: '确定',\n okType: 'primary',\n }\n )\n return false;\n }\n if (tplusUrl.substring(tplusUrl.length - 1) !== '/') {\n tplusUrl += '/';\n }\n let ossjumpUrl = `${tplusUrl}view/portal/portal.html?t=${new Date().getTime()}`\n if (sid) {\n ossjumpUrl = `${tplusUrl}view/ossjump.html?t=${new Date().getTime()}&sid=${sid}`\n }\n let postMsgUrl = ossjumpUrl;\n let { user } = this.context.stores;\n let loginInfo = user.options.get('loginInfo');\n const { UserCode, AccountNum, posCode, TplusStoreId } = loginInfo || {};\n const uid = this.tplusEncode(UserCode);\n const pwd = this.tplusEncode(user.options.get(\"password\"));\n const accNum = this.tplusEncode(AccountNum)\n const code = this.tplusEncode(posCode);\n const store = this.tplusEncode(TplusStoreId + '');\n ossjumpUrl += `&fromApp=nretail&way=inframe&user=${uid}&pwd=${pwd}&accNum=${accNum}&posCode=${code}&storeID=${store}`;\n return { ossjumpUrl, postMessageUrl: postMsgUrl };\n }\n\n componentWillUnmount() {\n this.ccFrameStore && this.ccFrameStore.destroy();\n const { headHook: { removeClass } = {} } = this.context\n removeClass && removeClass(this.state.id, 'portalHead');\n }\n\n componentWillReceiveProps() {\n if (this.getScreenType() === true) {\n if (this.isHorizontalSunMi && this.FuPingIsLoaded) {\n window.sunMi_PresentationManager && window.sunMi_PresentationManager.sendMessageToSecondScreen({ step: 1 });\n } else {\n nativeMs && nativeMs.setIpcRendererMethod('ReplyScreen', { step: 1 })\n }\n }\n }\n\n // 获取副屏的状态\n getScreenType = () => {\n let flag = false;\n if (this.hasElectron === true || this.isHorizontalSunMi) {\n let data = localStore.get('setting_setData') || [];\n data = data.filter(item => item.Name === 'EnableDoubleScreen');\n data = data && data.length > 0 ? data.shift() : null;\n if (data && data.Value === '1') {\n flag = true;\n }\n }\n return flag;\n }\n\n menuClick(item, e) {\n history.push(item.path);\n }\n saveLog = (name) => {\n const { saveLogo } = Request;\n name = \"进入模块:\" + name;\n saveLogo('进入模块', undefined, name);\n }\n\n handelClick = (values = {}) => {\n const { key: type, isModal, iframe, app, title, Name, style, search, tmenuCode } = values;\n const { operations, isHsyLoadFinish } = this.state;\n const controllable = operations.find(vv => vv.Name === Name);\n const { Visibility, HoldFunctionAuth, Title, MenuCode } = controllable || {};\n let errorTip;\n\n if(!stores.offlineSys.shouldOpenHomeOperation(Name)) {\n Message.warn(\"离线模式下此操作不可用\")\n return;\n }\n\n if (type == 'more') {\n // if (this.isMobileEnvironment) { //暂时不支持android系统跳转\n // return Message.warn('新功能正在研发中,敬请期待。');\n // }\n return this.setState({ showMoreModal: true })\n }\n if (!Title) {\n return ModalWraper.warning({\n title: '提示',\n content: '您的权限配置请求失败,请重新登录',\n onOk() {\n User.logout();\n },\n okType: 'primary',\n })\n }\n\n\n\n if (!Visibility) {\n errorTip = `您的 ${Title} 模块没有启用`;\n } else if (!HoldFunctionAuth) {\n errorTip = `您没有操作 ${Title} 的权限`;\n }\n const { portalStore } = this.context.stores;\n if (errorTip) {\n return Message.warn(errorTip);\n }\n if (isModal) {\n return stores.modalRouter.show({ url: `/${type}`, width: 800, title });\n }\n // 支持页面内打开,减少再次加载页面的时间。\n if (iframe === true) return this.toFramePage({ type, app, title, style, search, MenuCode, tmenuCode, isHsyLoadFinish });\n switch (type) {\n case 'cashier':\n portalStore.checkDuty().then((onDutyMessage) => {\n if (!!onDutyMessage) {\n const { Code, IdShiftVoucher, Shift, IdDailyVoucher, DailyCode } = onDutyMessage;\n PosSetData({ ShiftCode: Code, IdShiftVoucher, Shift, IdDailyVoucher, DailyCode });\n console.log('onDutyMessage======', onDutyMessage);\n this.saveLog(title);\n history.push('/RE/RE01');\n }\n }).catch((data) => {\n console.log(\"进入前台收银检查是否当班返回错误\", data);\n });\n break;\n case 'onDuty':\n portalStore.onDuty().then((onDutyMessage) => {\n if (onDutyMessage && onDutyMessage.shift) {\n MiddleWare.execute('onDuty')\n }\n });\n break;\n case 'offDuty':\n history.push('/offDuty?type=offDuty');\n break;\n case 'settleDialy':\n if (portalStore.bPosDaily()) {\n history.push('/offDuty?type=settleDaily');\n } else {\n portalStore.onMakerDaily();\n }\n break;\n default:\n history.push(`/${type}`);\n break;\n }\n };\n\n //跳转其他页面,以内嵌形式打开\n toFramePage = (params) => {\n const { app, title, style, search, tmenuCode, MenuCode, isHsyLoadFinish } = params || {}\n switch (app) {\n case 'cc':\n let sh = '';\n // if (this.isMobileEnvironment) { //暂时不支持android系统跳转\n // return Message.warn('新功能正在研发中,敬请期待。');\n // }\n if (!isHsyLoadFinish && !this.isMobileEnvironment) {\n return Message.warn('正在加载资源中,请稍后。');\n }\n if (!search) {\n return Message.warn('正在紧急研发中...');\n } else if (search && search.length > 0) {\n sh = (search.length > 1 && MenuCode) ? search.find(v => v.menu === MenuCode) : search[0];\n sh = sh || search[0];\n }\n if (!sh) {\n return Message.warn('传递参数有误,请查证。');\n }\n this.toHsyPage({ ...style, ...sh });\n break;\n case 'tc':\n if (tmenuCode || MenuCode) {\n this.saveLog(title);\n if (MenuCode) {\n this.toTplusPage(MenuCode, search);\n } else {\n this.toTplusPage(tmenuCode, search);\n }\n }\n break;\n }\n }\n\n getTplusUrlFromCloudServer = () => {//获取T+服务器配置地址。\n let userStore = User.restore();\n let data = 'accesstoken=' + `${userStore.accessToken}` + '&cloudOrgId=' + `${userStore.orgId}`;\n let url = `${HTTP_PROXY_URL}` + encodeURIComponent('http://mns.chanapp.chanjet.com/web/WebServer/get?' + `${data}`);\n console.log(url);\n let fetchHeader = {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded'\n }\n };\n return new Promise((resolve, reject) => {\n fetch(url, fetchHeader)\n .then(function (response) {\n return response.json();\n }).then(json => {\n console.log(json);\n resolve(json);\n }).catch(ex => {\n console.log(ex);\n reject(err);\n })\n })\n }\n\n //跳转到T+\n toTplusPage = async (tmenuCode, search) => {\n let ret = this.getTcBasicInfoInit();\n if (ret === false) return;\n let { ossjumpUrl, postMessageUrl } = ret || {};\n let dsearchPlanID = '';\n if (search && search.id) {\n const { portalStore } = this.context.stores;\n dsearchPlanID = await portalStore.getSearchPlanId(search);\n }\n let menu = this.tplusEncode(tmenuCode);\n ossjumpUrl += `&menu=${menu}&fromUrl=${this.tplusEncode(location.origin)}`;\n if (dsearchPlanID) {\n ossjumpUrl += `&searchPlanID=${this.tplusEncode(dsearchPlanID)}`;\n }\n if (this.isHorizontalSunMi) {\n window.android_CommonFun.openWebUrlByOutBrowser(ossjumpUrl);\n } else {\n //对于专属云、云主机,如果配置的http,存在跨域问题,暂时解决不了,只能通过打开默认浏览器打开。\n //目前T+页面有很多进一步操作的界面,无法得到解决,特针对跳转T+页面的,都使用默认浏览器打开。2021-10-27\n if (this.new_retail_app == 'tc' || this.new_retail_app == 'tczsy' || this.new_retail_app == 'tcyzj') {\n nativeMs.useDefaultBrowser(ossjumpUrl);\n return;\n }\n let external_frame_tc = document.getElementById('external-frame-tc');\n let win = external_frame_tc.contentWindow;\n const { loadTcURL } = this.state;\n if (loadTcURL) {\n win && win.postMessage({ doType: 'openMenuFromPos', tmenuCode, ossjumpUrl, dsearchPlanID }, postMessageUrl);\n this.setState({ loadTcPage: true });\n } else {\n this.setState({ loadTcURL: ossjumpUrl, loadTcPage: true });\n }\n rx$.changeHsy.next({\n back: true, fn: () => {\n win && win.postMessage({ doType: 'closeCurrentMenuFromPos' }, postMessageUrl);\n this.setState({ loadTcPage: false });\n rx$.changeHsy.next({ back: false });\n }\n })\n }\n }\n\n //跳转CC\n toHsyPage = async (params) => {\n let {\n content_only, //只加载内容区域\n bar_bg, //页签栏颜色\n bar_active_bg, //激活态的标签背景颜色\n menu,\n secondRouter,\n activePrompt,\n closePrompt,\n closeable,\n leavePrompt,\n lock,\n pageId,\n pageParams,\n path,\n tabId,\n tabLabel,\n pageType,\n _k\n } = params;\n\n let filter = {};\n //对仓库参数的处理\n const IdWarehouse = PosInitData('IdWarehouse') || '';\n const WarehouseName = PosInitData('WarehouseName') || '';\n const IsPerformanceDistribution = PosInitData('PerformanceDistribution') === 'SHIPPER_STORE' || false;\n const { IdStore = '', PosId = '' } = stores.user.options.get('loginInfo') || {};\n const { storeName = '' } = stores.user.options.get('store') || {};\n\n switch (pageType) {\n case 'voucher':\n filter = {\n defaultValue: {\n storeId: {\n id: IdStore,\n storeName\n },\n warehouseId: {\n id: IdWarehouse,\n name: WarehouseName\n }\n }\n }\n //要货单特殊处理\n if (menu == 'require-goods-new') {\n filter = {\n defaultValue: {\n storeId: {\n id: IdStore,\n storeName\n },\n requireWarehouseId: {\n id: IdWarehouse,\n name: WarehouseName\n }\n }\n }\n }\n if (menu == 'pre-sell'){\n filter = {\n storeId: [{id: IdStore, storeName}],\n orderStatusEnum: 'WAIT_DELIVERY',\n }\n }\n break;\n case 'report':\n filter = {\n filterValue: {\n storeId: {\n value: {\n id: IdStore,\n storeName\n }\n },\n warehouseId: {\n value: [{\n id: IdWarehouse,\n name: WarehouseName\n }]\n }\n }\n }\n // 收银统计表\n if (IsPerformanceDistribution && menu == 'retail-cash-report') {\n filter = {\n filterValue: {\n deliveryStoreId: {\n value: {\n id: IdStore,\n storeName\n }\n },\n warehouseId: {\n value: [{\n id: IdWarehouse,\n name: WarehouseName\n }]\n }\n }\n }\n }\n // 售后、配送\n if (menu == 'return-order' || menu == 'order-manage') {\n filter = {\n filterValue: {\n storeId: {\n value: {\n id: IdStore,\n storeName\n }\n },\n deliveryWarehouseId: {\n value: [{\n id: IdWarehouse,\n name: WarehouseName\n }]\n }\n }\n }\n }\n break;\n }\n bar_bg = encodeURIComponent(bar_bg);\n bar_active_bg = encodeURIComponent(bar_active_bg);\n menu = secondRouter ? `${menu}/${this.randomWord(true, 13)}` : menu;\n pageId = menu;\n pageParams = Object.assign(pageParams, filter);\n path = encodeURIComponent(path);\n _k = this.randomWord(false, 6);\n\n const commonArgs = `?posid=${PosId}&content_only=${content_only}&bar_bg=${bar_bg}&bar_active_bg=${bar_active_bg}`;\n const actionUrl = `#/${menu}?activePrompt=${activePrompt}&closePrompt=${closePrompt}&closeable=${closeable}&leavePrompt=${leavePrompt}&lock=${lock}&pageId=${pageId}&pageParams=${encodeURIComponent(JSON.stringify(pageParams))}&path=${path}&tabId=${tabId}&tabLabel=${encodeURIComponent(tabLabel)}&_k=${_k}`;\n let cc_url = this.hsy_domain.replace('#/', '') + commonArgs + actionUrl;\n console.log('web_hsy_url:', cc_url);\n if(this.isHorizontalSunMi){\n const CC_WEB_URL = await User.getLoginCCMidWebUrl(cc_url)\n console.log('CC_WEB_URL:', CC_WEB_URL);\n window.android_CommonFun.openWebUrlByOutBrowser(CC_WEB_URL);\n }else{\n // this.ccFrameWin && this.ccFrameWin.HsyRouterJump && this.ccFrameWin.HsyRouterJump(pageId, pageParams, { closeable, tabLabel });\n this.ccFrameStore && this.ccFrameStore.sendMessage({type: CC_FRAME_CONF.HsyRouterJump, pageId, pageParams, extStateParams: { closeable, tabLabel }, _ident_only_: CC_FRAME_CONF.identOnly })\n if (this.state.showMoreModal === true) {\n this.setState({ loadHsyPage: true, showMoreModal: false });\n } else {\n this.setState({ loadHsyPage: true });\n }\n rx$.changeHsy.next({\n back: true, fn: () => {\n this.setState({ loadHsyPage: false });\n rx$.changeHsy.next({ back: false });\n // 在打开页签之前,关闭之前的,返回键的回调函数\n // this.ccFrameWin && this.ccFrameWin.HsyRouterClean && this.ccFrameWin.HsyRouterClean();\n this.ccFrameStore && this.ccFrameStore.sendMessage({ type: CC_FRAME_CONF.HsyRouterClean, _ident_only_: CC_FRAME_CONF.identOnly });\n }\n })\n }\n }\n\n randomWord = (only, digits) => {\n let str = \"\";\n const number = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\n const 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']\n let arr = only ? [...number] : [...number, ...letter];\n for (let i = 0; i < digits; i++) {\n let pos = Math.round(Math.random() * (arr.length - 1));\n str += arr[pos];\n }\n return str;\n }\n\n closeFrameModal = () => {\n this.setState({ showModal: false })\n }\n\n closeMoreModal = () => {\n this.setState({ showMoreModal: false })\n }\n\n tplusEncode = (code) => {\n let c = String.fromCharCode(code.charCodeAt(0) + code.length);\n for (let i = 1; i < code.length; i++) {\n c += String.fromCharCode(code.charCodeAt(i) + code.charCodeAt(i - 1));\n }\n let ret = this.TplusBase64Encode(c);\n return ret;\n }\n\n TplusBase64Encode = (input) => {\n const _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n let output = \"\";\n let chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n let i = 0;\n input = this._utf8_encode(input);\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output +\n _keyStr.charAt(enc1) + _keyStr.charAt(enc2) +\n _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\n }\n return output;\n }\n _utf8_encode = (string) => {\n string = string.replace(/\\r\\n/g, \"\\n\");\n let utftext = \"\";\n for (let n = 0; n < string.length; n++) {\n let c = string.charCodeAt(n);\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if ((c > 127) && (c < 2048)) {\n utftext += String.fromCharCode((c >> 6) | 192);\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n return utftext;\n }\n\n operationControl = (menu = []) => {\n const { operations } = this.state;\n menu.forEach(v => {\n if (v.sub) {\n return this.operationControl(v.sub);\n }\n const controllable = operations.find(vv => vv.Name === v.Name);\n const { Visibility, HoldFunctionAuth, Title } = controllable || {};\n let errorTip;\n if (!Visibility) {\n errorTip = `您的 ${Title} 模块没有启用`;\n } else if (!HoldFunctionAuth) {\n errorTip = `您没有操作 ${Title} 的权限`;\n }\n v.errorTip = errorTip;\n });\n return menu;\n }\n\n createLeftNode = () => {\n const menu = this.leftMenu;\n var width = menu.length == 0 ? this.isMobileEnvironment & !this.isNewRetailBCPosTC ? 5 : 4 : 7;\n if(menu.length == 0) {\n return (<Col xl={width} md={width} className='portal-left-col' key='left'>\n <div className='portal-left-content'></div>\n </Col>);\n // return null;\n }\n const menuNode = menu.map(v => {\n return (v.container ?\n <div style={v.container.style} className={v.container.className} key={v.container.className}>\n {\n v.sub.map(vv => {\n let item = vv;\n if (vv.maybe === true) {\n let status = !!PosInitData('ShowStorePrice');\n item = status ? vv : vv.second;\n }\n return (<div\n className={`member-item ${item.className} ${item.disabled ? 'menu-item-disabled' : ''}`}\n key={item.className}\n onClick={this.handelClick.bind(this, item)}\n >\n {!!item.title && <h1>{item.title}</h1>}\n {!!item.label && <p>{item.label}</p>}\n {!!item.icon && <Ticon icon={item.icon} />}\n </div>)\n })\n }\n </div>\n :\n <div\n className={`member-item ${v.className} ${v.disabled ? 'menu-item-disabled' : ''}`}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {v.title && <h1>{v.title}</h1>}\n {v.label && <p>{v.label}</p>}\n {v.icon && <Ticon icon={v.icon} />}\n </div>)\n })\n return (<Col xl={7} md={7} className='portal-left-col' key='left'>\n <div className='portal-left-content'>{menuNode}</div>\n </Col>);\n }\n createCenterNode = () => {\n const menuLeftNode = this.centerLeftMenu.map(v => {\n return (<div\n className={`worktop-item ${v.className} ${v.disabled ? 'menu-item-disabled' : ''}`}\n style={v.style}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {v.title && <h1>{v.title}</h1>}\n {v.label && <p>{v.label}</p>}\n {v.icon && <Ticon icon={v.icon} />}\n {v.disabled && <div className='item-disabled-placeholder' />}\n </div>)\n });\n const menuRightNode = this.centerRightMenu.map(v => {\n return (v.container ?\n <div style={v.container.style} className={v.container.className} key={v.container.className}>\n {\n v.sub.map(vv => {\n return (<div\n className={`worktop-item ${vv.className} ${vv.disabled ? 'menu-item-disabled' : ''}`}\n key={vv.className}\n onClick={this.handelClick.bind(this, vv)}\n >\n {vv.title && <h1>{vv.title}</h1>}\n {vv.label && <p>{vv.label}</p>}\n {vv.icon && <Ticon icon={vv.icon} />}\n </div>)\n })\n }\n </div>\n :\n <div\n className={`worktop-item ${v.className} ${v.disabled ? 'menu-item-disabled' : ''}`}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {v.title && <h1>{v.title}</h1>}\n {v.label && <p>{v.label}</p>}\n {v.icon && <Ticon icon={v.icon} />}\n </div>)\n });\n return <div><div className='worktop-container-left'>{menuLeftNode}</div><div className='worktop-container-right'>{menuRightNode}</div></div>;\n }\n createRightNode = () => {\n var width = this.leftMenu.length == 0 ? this.isMobileEnvironment & !this.isNewRetailBCPosTC ? 9 : 10 : 7;\n const node = this.rightMenu.map(v => {\n return (v.container ?\n <div style={v.container.style} className={v.container.className} key={v.container.className}>\n {\n v.sub.map(vv => {\n return (<div\n className={`stock-item ${vv.className} ${vv.disabled ? 'menu-item-disabled' : ''}`}\n key={vv.className}\n onClick={this.handelClick.bind(this, vv)}\n >\n {vv.title && <h1>{vv.title}</h1>}\n {vv.label && <p>{vv.label}</p>}\n {vv.icon && <Ticon icon={vv.icon} />}\n </div>)\n })\n }\n </div>\n :\n <div\n className={`stock-item ${v.className} ${v.disabled ? 'menu-item-disabled' : ''}`}\n style={v.style}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {!!v.title && <h1>{v.title}</h1>}\n {!!v.icon && <Ticon icon={v.icon} />}\n </div>)\n });\n return <Col xl={width} md={width} className='portal-right-col' key='right'>\n <div className='portal-right-content'>{node}</div>\n </Col>\n }\n\n createMoreNode = () => {\n const arrs = this.getMoreNodeInfo();\n const items = this.isNewRetailBCPosTC ? arrs.sub_tc : arrs.sub_cc || [];\n const node = items.length > 0 && items.map(v => {\n return (\n <div\n className={`modal-quick ${v.className}`}\n style={v.style}\n key={v.className}\n onClick={this.handelClick.bind(this, v)}\n >\n {!!v.icon && <div className='quick'><Ticon icon={v.icon} /></div>}\n {!!v.title && <h1>{v.title}</h1>}\n </div>\n )\n })\n return node;\n }\n\n getMoreNodeInfo = () => {\n if (this.isNewRetailBCPosTC) {\n // if (this.isMobileEnvironment) {\n // return this.centerRightMenu.find(vv => vv.key == 'more') || {};\n // } else {\n return this.centerRightMenu.find(v => v.sub && v.sub.find(vv => vv.key == 'more')).sub[1] || {};\n // }\n } else {\n // if (this.isMobileEnvironment) {\n // return this.centerRightMenu.find(vv => vv.key == 'more') || {};\n // } else {\n return this.centerRightMenu.find(v => v.sub && v.sub.find(vv => vv.key == 'more')).sub[1] || {};\n // }\n }\n }\n\n render() {\n const { showModal,showMoreModal, modalURL, loadHsyPage, loadHsyURL, loadTcPage, loadTcURL } = this.state;\n const screenHeight = window.screen.availHeight - 100;\n let htmlContent = null;\n if (this.isVerticalTouch) {\n htmlContent = <VerticalPortal handelClick={this.handelClick} />\n }\n // else if (this.isHorizontalPad) {\n // htmlContent = <HorizontalPadPortal handelClick={this.handelClick} />\n // }\n else {\n htmlContent = (<Layout style={{ height: '100%' }} className='portal-content'>\n <Content style={{ paddingLeft: '50px', paddingRight: '50px' }} className='portal-container portal-container-center'>\n <Row className=\"portal-content-row\">\n {this.createLeftNode()}\n <Col xl={10} md={10} className='portal-center-col' key='center'>\n <div className='portal-center-content'>\n {this.createCenterNode()}\n </div>\n </Col>\n {this.createRightNode()}\n </Row>\n </Content>\n {\n <div className={loadHsyPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide'}>\n <iframe src={loadHsyURL} width='100%' height='93%' frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"yes\" allowtransparency=\"true\" id={CC_FRAME_CONF.id}></iframe>\n </div>\n }\n {\n <div className={loadTcPage ? 'portal-hsy-tc-container' : 'portal-hsy-tc-container portal-hsy-tc-container-hide'}>\n <iframe src={loadTcURL} width='100%' height='93%' frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"yes\" allowtransparency=\"true\" id=\"external-frame-tc\"></iframe>\n </div>\n }\n {\n this.isMobileEnvironment &&\n <Modal\n visible={showModal}\n onCancel={this.closeFrameModal}\n width={'99%'}\n height={'99%'}\n footer={null}\n >\n <iframe src={modalURL} width='100%' height={screenHeight} frameborder=\"no\" border=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"yes\" allowtransparency=\"true\"></iframe>\n </Modal>\n }\n {\n <Modal\n title={'更多'}\n className={'portal-container-modal-more'}\n visible={showMoreModal}\n onCancel={this.closeMoreModal}\n width={800}\n height={375}\n footer={null}\n centered\n maskClosable={false}\n keyboard={false}\n >\n {\n this.createMoreNode()\n }\n </Modal>\n }\n </Layout>)\n }\n return htmlContent;\n }\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tplus-portaltouch",
3
- "version": "3.44.3",
3
+ "version": "3.44.4",
4
4
  "description": "touch protal",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -34,4 +34,4 @@
34
34
  "tplus-components-touch": "~3.44.1",
35
35
  "tplus-poslogin": "~3.44.1"
36
36
  }
37
- }
37
+ }