tplus-components-touch 3.28.1 → 3.28.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/index.js +14 -14
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/cloudPrint/index.js +57 -4
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/deliverySearch/index.js +12 -8
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/input/scanInput.js +98 -0
- package/dist/components/input/scanInput.js.map +1 -0
- package/dist/components/input/scanInput.less +28 -0
- package/dist/components/inventorySearch/store.js +31 -12
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +7 -9
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +4 -2
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +35 -40
- package/dist/components/loading/loadingContent.js +13 -4
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +17 -6
- package/dist/components/message/index.js +8 -5
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +3 -6
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +46 -50
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/socket/index.js +6 -5
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/touchTable/index.js +4 -3
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +20 -13
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js +5 -7
- package/dist/util/tools.js.map +1 -1
- package/package.json +35 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/inventorySearch/tab.js"],"names":["loadingIcon","Tab","observer","props","onRowClick","record","index","type","setState","selectedRowIndex","resetPageNo","activePage","previous","state","store","searchMore","searchValue","next","getRowClassName","getNewColumnsList","searchDesigns","columns","push","title","width","dataIndex","key","fixed","render","text","map","item","OriginalTitle","FieldName","Precision","IsFormat","newItem","ellipsis","renderText","InventorySearchApi","formatNumber","tools","dateFormat","getLoadingIcon","height","emptyHeight","setTableHeight","windowEvent","bind","window","addEventListener","removeEventListener","_this","setTimeout","Number","tabDom","clientHeight","tableHeight","dataSource","TotalPage","loading","dom","length","y","spinning","indicator","onClick","info","buttonVisible","fontSize","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAEA;;AACA;;AACA;;;;AACA;;;;;;AAEA,IAAMA,cAAc,kDAApB;;IAGqBC,G,OADpBC,wB;;;AAEC,eAAYC,KAAZ,EAAmB;AAAA;;AAAA,iIACXA,KADW;;AAAA,WA0BnBC,UA1BmB,GA0BN,UAACC,MAAD,EAASC,KAAT,EAAmB;AAC9B,aAAKH,KAAL,CAAWC,UAAX,IAAyB,OAAKD,KAAL,CAAWC,UAAX,CAAsBC,MAAtB,EAA8B,OAAKF,KAAL,CAAWI,IAAzC,CAAzB;AACA,aAAKC,QAAL,CAAc,EAAEC,kBAAkBH,KAApB,EAAd;AACD,KA7BkB;;AAAA,WA+BnBI,WA/BmB,GA+BL,YAAM;AAClB,aAAKF,QAAL,CAAc;AACZG,oBAAY;AADA,OAAd;AAGD,KAnCkB;;AAAA,WAqCnBC,QArCmB,GAqCR,YAAM;AACf,aAAKJ,QAAL,CAAc;AACZG,oBAAY,OAAKE,KAAL,CAAWF,UAAX,GAAwB;AADxB,OAAd,EAEG,YAAM;AACP,eAAKR,KAAL,CAAWW,KAAX,CAAiBC,UAAjB,CAA4B,OAAKZ,KAAL,CAAWa,WAAvC,EAAoD,OAAKH,KAAL,CAAWF,UAA/D,EAA2E,EAA3E,EAA+E,OAAKR,KAAL,CAAWI,IAA1F;AACD,OAJD;AAKD,KA3CkB;;AAAA,WA6CnBU,IA7CmB,GA6CZ,YAAM;AACX,aAAKT,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;AAIE,mBAAS;AACPC,sBAAUJ,OADH;AAEPK,uBAAW,KAAKtB,cAAL;AAFJ,WAJX;AAQE,sBAAY,KARd;AASE,wBAAc,KAAKzB,eATrB;AAUE,iBAAO,eAACb,MAAD,EAASC,KAAT,EAAmB;AACxB,mBAAO;AACL4D,uBAAS;AAAA,uBAAM,OAAK9D,UAAL,CAAgBC,MAAhB,EAAwBC,KAAxB,CAAN;AAAA;AADJ,aAAP;AAGD,WAdH,GADF,GAiBE,8BAAC,oBAAD;AACE,iBAAOsD,UAAS,MAAT,GAAiB,OAD1B;AAEE,4BAAkB,EAAEhB,QAAQ,MAAV,EAFpB;AAGE,iBAAO,EAAEuB,MAAM,QAAR,EAAkBC,eAAe,KAAjC,EAHT,GApBN;AAyBG,UAAET,aAAa,CAAb,IAAkB,CAACA,SAArB,KAAmC;AAAA;AAAA,YAAK,WAAU,eAAf,EAA+B,OAAO,EAAEU,UAAU,MAAZ,EAAtC;AAAA;AAAA,SAzBtC;AA0BE,sCAAC,WAAD;AACE,iBAAOV,SADT;AAEE,wBAAchD,UAFhB;AAGE,oBAAU,KAAKC,QAHjB;AAIE,gBAAM,KAAKK,IAJb;AAKE,qBAAU;AALZ;AA1BF,OADF;AAoCD;;;EAjK8BqD,gBAAMC,S;;kBAAlBtE,G","file":"tab.js","sourcesContent":["import React from 'react';\r\nimport { Table } from 'antd';\r\nimport { observer } from 'mutants-microfx';\r\nimport { Page, ProgressState } from '../../index';\r\nimport InventorySearchApi from './api';\r\nimport tools from '../../util/tools';\r\n\r\nconst loadingIcon = 'https://newretail.static.chanjet.com/loading.gif';\r\n\r\n@observer\r\nexport default class Tab extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n activePage: 1,\r\n emptyHeight: 200,\r\n selectedRowIndex: -1\r\n };\r\n }\r\n componentDidMount() {\r\n this.setTableHeight();\r\n this.windowEvent = this.setTableHeight.bind(this);\r\n window.addEventListener('resize', this.windowEvent);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('resize', this.windowEvent);\r\n }\r\n\r\n setTableHeight() {\r\n let _this = this;\r\n setTimeout(() => {\r\n let height = Number(_this.tabDom.clientHeight - 200);\r\n _this.setState({ tableHeight: height })\r\n }, 0)\r\n }\r\n\r\n onRowClick = (record, index) => {\r\n this.props.onRowClick && this.props.onRowClick(record, this.props.type)\r\n this.setState({ selectedRowIndex: index })\r\n }\r\n\r\n resetPageNo = () => {\r\n this.setState({\r\n activePage: 1\r\n })\r\n }\r\n\r\n previous = () => {\r\n this.setState({\r\n activePage: this.state.activePage - 1\r\n }, () => {\r\n this.props.store.searchMore(this.props.searchValue, this.state.activePage, 15, this.props.type)\r\n })\r\n }\r\n\r\n next = () => {\r\n this.setState({\r\n activePage: this.state.activePage + 1\r\n }, () => {\r\n this.props.store.searchMore(this.props.searchValue, this.state.activePage, 15, this.props.type)\r\n })\r\n }\r\n getRowClassName = (record, index) => {\r\n const { selectedRowIndex } = this.state;\r\n if (selectedRowIndex == index) {\r\n return 'row-selected'\r\n } else {\r\n return '';\r\n }\r\n }\r\n\r\n // 获取列字段集合\r\n getNewColumnsList = (type, searchDesigns) => {\r\n let columns = [];\r\n //周边门店要显示门店名称\r\n if (type == '2') {\r\n columns.push({\r\n title: '门店名称',\r\n width: 120,\r\n dataIndex: 'WarehouseName',\r\n key: 'WarehouseName',\r\n fixed: 'left',\r\n render: (text, record, index) => {\r\n return <div className='text-2line-overflow'>{text}</div>\r\n }\r\n })\r\n }\r\n searchDesigns.map(item => {\r\n let { OriginalTitle, FieldName, Precision, IsFormat } = item || {};\r\n let newItem = {\r\n title: OriginalTitle,\r\n width: 100,\r\n dataIndex: FieldName,\r\n key: FieldName,\r\n Precision: Precision,\r\n IsFormat: IsFormat,\r\n ellipsis: true,\r\n }\r\n switch (FieldName) {\r\n case 'InventoryName':\r\n newItem.width = 160;\r\n newItem.render = (text, record, index) => {\r\n return <div className='text-2line-overflow'>{text}</div>\r\n }\r\n break;\r\n case 'InventoryCode': newItem.width = 160; break;\r\n case 'ExistingBaseQuantity': newItem.width = 80; break;\r\n }\r\n if ((Precision || Precision == 0) && IsFormat) {\r\n newItem.render = (text, record, index) => {\r\n let renderText = InventorySearchApi.formatNumber(text, Precision);\r\n return <span>{renderText}</span>\r\n }\r\n }\r\n if (FieldName == 'ProductionDate' || FieldName == 'ExpiryDate') {\r\n newItem.render = (text, record, index) => {\r\n let renderText = tools.dateFormat(text);\r\n return <span>{renderText}</span>\r\n }\r\n }\r\n columns.push(newItem);\r\n })\r\n return columns;\r\n }\r\n\r\n // loading图标\r\n getLoadingIcon = () => {\r\n return <img src={loadingIcon} style={{ width: '200px', height: '189px' }} />\r\n }\r\n\r\n render() {\r\n let { activePage } = this.state;\r\n let { dataSource, TotalPage, loading, type, searchDesigns } = this.props;\r\n let columns = this.getNewColumnsList(type, searchDesigns);\r\n return (\r\n <div ref={(dom) => { this.tabDom = dom }}\r\n className={`${dataSource && dataSource.length > 0 ? 'inventoryTable' : ''} inventory-tab ${type == '2' ? 'table2' : 'table1'}`}>\r\n {\r\n dataSource && dataSource.length > 0 ?\r\n <Table\r\n columns={columns}\r\n dataSource={dataSource}\r\n scroll={{ y: \"calc(~'100% - 43px')\" }}\r\n loading={{\r\n spinning: loading,\r\n indicator: this.getLoadingIcon()\r\n }}\r\n pagination={false}\r\n rowClassName={this.getRowClassName}\r\n onRow={(record, index) => {\r\n return {\r\n onClick: () => this.onRowClick(record, index)\r\n }\r\n }} />\r\n :\r\n <ProgressState\r\n state={loading? 'load': \"empty\"}\r\n stateCommonStyle={{ height: \"100%\" }}\r\n empty={{ info: '暂无数据~~', buttonVisible: false }} />\r\n }\r\n {!(TotalPage == 0 || !TotalPage) && <div className=\"primary-color\" style={{ fontSize: '13px'}}>温馨提示:点击选中该行商品可直接带入至开单页</div>}\r\n <Page\r\n total={TotalPage}\r\n currentIndex={activePage}\r\n previous={this.previous}\r\n next={this.next}\r\n className='inventory-page'\r\n />\r\n </div>\r\n )\r\n }\r\n}"]}
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/inventorySearch/tab.js"],"names":["Tab","observer","props","onRowClick","record","index","type","setState","selectedRowIndex","resetPageNo","activePage","previous","state","store","searchMore","searchValue","next","getRowClassName","getNewColumnsList","searchDesigns","columns","push","title","width","dataIndex","key","fixed","render","text","map","item","OriginalTitle","FieldName","Precision","IsFormat","newItem","ellipsis","renderText","InventorySearchApi","formatNumber","tools","dateFormat","loadingIcon","theme","localStore","get","img","height","emptyHeight","setTableHeight","windowEvent","bind","window","addEventListener","removeEventListener","_this","setTimeout","Number","tabDom","clientHeight","tableHeight","dataSource","TotalPage","loading","dom","length","y","spinning","indicator","onClick","info","buttonVisible","fontSize","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAEA;;AACA;;AACA;;AACA;;;;AACA;;;;;;IAEqBA,G,OADpBC,wB;;;AAEC,eAAYC,KAAZ,EAAmB;AAAA;;AAAA,iIACXA,KADW;;AAAA,WA0BnBC,UA1BmB,GA0BN,UAACC,MAAD,EAASC,KAAT,EAAmB;AAC9B,aAAKH,KAAL,CAAWC,UAAX,IAAyB,OAAKD,KAAL,CAAWC,UAAX,CAAsBC,MAAtB,EAA8B,OAAKF,KAAL,CAAWI,IAAzC,CAAzB;AACA,aAAKC,QAAL,CAAc,EAAEC,kBAAkBH,KAApB,EAAd;AACD,KA7BkB;;AAAA,WA+BnBI,WA/BmB,GA+BL,YAAM;AAClB,aAAKF,QAAL,CAAc;AACZG,oBAAY;AADA,OAAd;AAGD,KAnCkB;;AAAA,WAqCnBC,QArCmB,GAqCR,YAAM;AACf,aAAKJ,QAAL,CAAc;AACZG,oBAAY,OAAKE,KAAL,CAAWF,UAAX,GAAwB;AADxB,OAAd,EAEG,YAAM;AACP,eAAKR,KAAL,CAAWW,KAAX,CAAiBC,UAAjB,CAA4B,OAAKZ,KAAL,CAAWa,WAAvC,EAAoD,OAAKH,KAAL,CAAWF,UAA/D,EAA2E,EA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X,GAAoB,CAAlC,GAAsC,gBAAtC,GAAyD,EAAvE,yBAA2F3D,QAAQ,GAAR,GAAc,QAAd,GAAyB,QAApH,CADF;AAGIuD,sBAAcA,WAAWI,MAAX,GAAoB,CAAlC,GACE;AACE,mBAAS7C,OADX;AAEE,sBAAYyC,UAFd;AAGE,kBAAQ,EAAEK,GAAG,sBAAL,EAHV;AAIE,mBAAS;AACPC,sBAAUJ,OADH;AAEPK,uBAAW,KAAK1B,WAAL;AAFJ,WAJX;AAQE,sBAAY,KARd;AASE,wBAAc,KAAKzB,eATrB;AAUE,iBAAO,eAACb,MAAD,EAASC,KAAT,EAAmB;AACxB,mBAAO;AACLgE,uBAAS;AAAA,uBAAM,OAAKlE,UAAL,CAAgBC,MAAhB,EAAwBC,KAAxB,CAAN;AAAA;AADJ,aAAP;AAGD,WAdH,GADF,GAiBE,8BAAC,oBAAD;AACE,iBAAO0D,UAAS,MAAT,GAAiB,OAD1B;AAEE,4BAAkB,EAAEhB,QAAQ,MAAV,EAFpB;AAGE,iBAAO,EAAEuB,MAAM,QAAR,EAAkBC,eAAe,KAAjC,EAHT,GApBN;AAyBG,UAAET,aAAa,CAAb,IAAkB,CAACA,SAArB,KAAmC;AAAA;AAAA,YAAK,WAAU,eAAf,EAA+B,OAAO,EAAEU,UAAU,MAAZ,EAAtC;AAAA;AAAA,SAzBtC;AA0BE,sCAAC,WAAD;AACE,iBAAOV,SADT;AAEE,wBAAcpD,UAFhB;AAGE,oBAAU,KAAKC,QAHjB;AAIE,gBAAM,KAAKK,IAJb;AAKE,qBAAU;AALZ;AA1BF,OADF;AAoCD;;;EAlK8ByD,gBAAMC,S;;kBAAlB1E,G","file":"tab.js","sourcesContent":["import React from 'react';\r\nimport { Table } from 'antd';\r\nimport { observer } from 'mutants-microfx';\r\nimport { localStore } from 'mutants-util';\r\nimport { Page, ProgressState } from '../../index';\r\nimport InventorySearchApi from './api';\r\nimport tools from '../../util/tools';\r\n@observer\r\nexport default class Tab extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n activePage: 1,\r\n emptyHeight: 200,\r\n selectedRowIndex: -1\r\n };\r\n }\r\n componentDidMount() {\r\n this.setTableHeight();\r\n this.windowEvent = this.setTableHeight.bind(this);\r\n window.addEventListener('resize', this.windowEvent);\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('resize', this.windowEvent);\r\n }\r\n\r\n setTableHeight() {\r\n let _this = this;\r\n setTimeout(() => {\r\n let height = Number(_this.tabDom.clientHeight - 200);\r\n _this.setState({ tableHeight: height })\r\n }, 0)\r\n }\r\n\r\n onRowClick = (record, index) => {\r\n this.props.onRowClick && this.props.onRowClick(record, this.props.type)\r\n this.setState({ selectedRowIndex: index })\r\n }\r\n\r\n resetPageNo = () => {\r\n this.setState({\r\n activePage: 1\r\n })\r\n }\r\n\r\n previous = () => {\r\n this.setState({\r\n activePage: this.state.activePage - 1\r\n }, () => {\r\n this.props.store.searchMore(this.props.searchValue, this.state.activePage, 15, this.props.type)\r\n })\r\n }\r\n\r\n next = () => {\r\n this.setState({\r\n activePage: this.state.activePage + 1\r\n }, () => {\r\n this.props.store.searchMore(this.props.searchValue, this.state.activePage, 15, this.props.type)\r\n })\r\n }\r\n getRowClassName = (record, index) => {\r\n const { selectedRowIndex } = this.state;\r\n if (selectedRowIndex == index) {\r\n return 'row-selected'\r\n } else {\r\n return '';\r\n }\r\n }\r\n\r\n // 获取列字段集合\r\n getNewColumnsList = (type, searchDesigns) => {\r\n let columns = [];\r\n //周边门店要显示门店名称\r\n if (type == '2') {\r\n columns.push({\r\n title: '门店名称',\r\n width: 120,\r\n dataIndex: 'WarehouseName',\r\n key: 'WarehouseName',\r\n fixed: 'left',\r\n render: (text, record, index) => {\r\n return <div className='text-2line-overflow'>{text}</div>\r\n }\r\n })\r\n }\r\n searchDesigns.map(item => {\r\n let { OriginalTitle, FieldName, Precision, IsFormat } = item || {};\r\n let newItem = {\r\n title: OriginalTitle,\r\n width: 100,\r\n dataIndex: FieldName,\r\n key: FieldName,\r\n Precision: Precision,\r\n IsFormat: IsFormat,\r\n ellipsis: true,\r\n }\r\n switch (FieldName) {\r\n case 'InventoryName':\r\n newItem.width = 160;\r\n newItem.render = (text, record, index) => {\r\n return <div className='text-2line-overflow'>{text}</div>\r\n }\r\n break;\r\n case 'InventoryCode': newItem.width = 160; break;\r\n case 'ExistingBaseQuantity': newItem.width = 80; break;\r\n }\r\n if ((Precision || Precision == 0) && IsFormat) {\r\n newItem.render = (text, record, index) => {\r\n let renderText = InventorySearchApi.formatNumber(text, Precision);\r\n return <span>{renderText}</span>\r\n }\r\n }\r\n if (FieldName == 'ProductionDate' || FieldName == 'ExpiryDate') {\r\n newItem.render = (text, record, index) => {\r\n let renderText = tools.dateFormat(text);\r\n return <span>{renderText}</span>\r\n }\r\n }\r\n columns.push(newItem);\r\n })\r\n }\r\n loadingIcon = () => {\r\n const theme = localStore.get('theme');\r\n const img = `https://newretail.static.chanjet.com/bc_pos/loading${(theme == 'blue' || theme == 'dark') ? '2' : ''}.gif`;\r\n return (\r\n <img src={img} style={{ width: '90px', height: '90px' }} />\r\n )\r\n }\r\n\r\n render() {\r\n let { activePage } = this.state;\r\n let { dataSource, TotalPage, loading, type, searchDesigns } = this.props;\r\n let columns = this.getNewColumnsList(type, searchDesigns);\r\n return (\r\n <div ref={(dom) => { this.tabDom = dom }}\r\n className={`${dataSource && dataSource.length > 0 ? 'inventoryTable' : ''} inventory-tab ${type == '2' ? 'table2' : 'table1'}`}>\r\n {\r\n dataSource && dataSource.length > 0 ?\r\n <Table\r\n columns={columns}\r\n dataSource={dataSource}\r\n scroll={{ y: \"calc(~'100% - 43px')\" }}\r\n loading={{\r\n spinning: loading,\r\n indicator: this.loadingIcon()\r\n }}\r\n pagination={false}\r\n rowClassName={this.getRowClassName}\r\n onRow={(record, index) => {\r\n return {\r\n onClick: () => this.onRowClick(record, index)\r\n }\r\n }} />\r\n :\r\n <ProgressState\r\n state={loading? 'load': \"empty\"}\r\n stateCommonStyle={{ height: \"100%\" }}\r\n empty={{ info: '暂无数据~~', buttonVisible: false }} />\r\n }\r\n {!(TotalPage == 0 || !TotalPage) && <div className=\"primary-color\" style={{ fontSize: '13px'}}>温馨提示:点击选中该行商品可直接带入至开单页</div>}\r\n <Page\r\n total={TotalPage}\r\n currentIndex={activePage}\r\n previous={this.previous}\r\n next={this.next}\r\n className='inventory-page'\r\n />\r\n </div>\r\n )\r\n }\r\n}"]}
|
|
@@ -281,11 +281,13 @@ var KeyboardInput = (_temp = _class = function (_Component) {
|
|
|
281
281
|
onSelect: this.handleMobileKeyboard,
|
|
282
282
|
ref: function ref(input) {
|
|
283
283
|
return _this2.input = input;
|
|
284
|
-
}
|
|
284
|
+
}
|
|
285
|
+
}),
|
|
285
286
|
_react2.default.createElement(_index.Keyboard, {
|
|
286
287
|
type: 'number2',
|
|
287
288
|
positive: this.props.type,
|
|
288
|
-
onChange: this.onChange
|
|
289
|
+
onChange: this.onChange
|
|
290
|
+
})
|
|
289
291
|
);
|
|
290
292
|
}
|
|
291
293
|
}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/keyboard/numberButton_input.js"],"names":["KeyboardInput","props","inputChange","v","handleMobileKeyboard","newValue","max","min","type","maxLength","precisionLength","tools","isNull","value","tip","Message","info","match","length","length1","parseInt","length2","v1","v2","indexOf","slice","split","setState","onChange","state","key","handleOk","Keyboard","getNewValue","input","getValue","el","isMobileEnvironment","env","os","constant","ios","console","log","setAttribute","removeAttribute","setTimer","window","clearTimeout","setTimeout","onFocus","e","onRef","visible","platform","isHorizontalPad","props_old","b","hotKey","hotKeyNotFilter","marginBottom","placeholder","target","Component","propTypes","PropTypes","func","isRequired","string","number"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;;;;;;;AAOA;;;;AAEA;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;;;IAEqBA,a;;;AAYnB,yBAAYC,KAAZ,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HzC;AAIE,iBAAOhD,KAJT;AAKE,oBAAU,kBAACsC,CAAD;AAAA,mBAAO,OAAKjD,WAAL,CAAiBiD,EAAEW,MAAF,CAASjD,KAA1B,CAAP;AAAA,WALZ;AAME,mBAAS,KAAKqC,OANhB;AAOE,mBAAS,KAAK9C,oBAPhB;AAQE,oBAAU,KAAKA,oBARjB;AASE,eAAK;AAAA,mBAAS,OAAK8B,KAAL,GAAaA,KAAtB;AAAA,WATP,GADF;AAYE,sCAAC,eAAD;AACE,gBAAK,SADP;AAEE,oBAAU,KAAKjC,KAAL,CAAWO,IAFvB;AAGE,oBAAU,KAAKoB,QAHjB;AAZF,OADF;AAmBD;;;EAvLwCmC,gB,UAElCC,S,GAAY;AACjBpC,YAAUqC,oBAAUC,IAAV,CAAeC,UADR;AAEjBN,eAAaI,oBAAUG,MAFN;AAGjB5D,QAAMyD,oBAAUG,MAHC;AAIjB3D,aAAWwD,oBAAUI,MAJJ,EAIY;AAC7B3D,mBAAiBuD,oBAAUI,MALV,EAKkB;AACnC/D,OAAK2D,oBAAUI,MANE;AAOjB9D,OAAK0D,oBAAUI;AAPE,C;kBAFArE,a","file":"numberButton_input.js","sourcesContent":["/**\r\n * input + 数字键盘\r\n * @props {boolean} type \"positive\" 只支持正数,不传正负都可以\r\n * @props {number} max 最大值\r\n * @props {number} min 最小值\r\n */\r\n\r\nimport React, { Component } from 'react';\r\nimport { Input } from 'antd';\r\nimport { platform } from 'mutants-util';\r\nimport { env } from 'mutants-microfx';\r\nimport { Keyboard } from '../../index';\r\nimport PropTypes from 'prop-types';\r\nimport tools from '../../util/tools'\r\nimport Message from '../message/index'\r\nimport hotKey from '../hotKey'\r\n\r\nexport default class KeyboardInput extends Component {\r\n\r\n static propTypes = {\r\n onChange: PropTypes.func.isRequired,\r\n placeholder: PropTypes.string,\r\n type: PropTypes.string,\r\n maxLength: PropTypes.number, // 总长度\r\n precisionLength: PropTypes.number, // 小数总长\r\n max: PropTypes.number,\r\n min: PropTypes.number,\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n this.props.onRef && this.props.onRef(this);\r\n this.state = {\r\n value: props.value || '',\r\n visible: false\r\n }\r\n const { isHorizontalPad } = platform || {};\r\n this.isMobileEnvironment = !!isHorizontalPad;\r\n this.setTimer = null;\r\n }\r\n\r\n componentDidMount() {\r\n this.setState({ value: this.props.value || '' })\r\n }\r\n\r\n componentDidUpdate(props_old, b) {\r\n if (props_old.visible != this.props.visible && this.props.visible == true) {\r\n this.setState({ value: this.props.value || '' })\r\n }\r\n }\r\n\r\n inputChange = (v) => {\r\n //对移动端键盘处理。\r\n this.handleMobileKeyboard();\r\n let newValue;\r\n if (v === '') {\r\n newValue = '';\r\n } else {\r\n //键盘大小控制\r\n const { max = {}, min = {}, type, maxLength, precisionLength } = this.props;\r\n if (!tools.isNull(max.value)) {\r\n if (v > max.value) {\r\n if (!tools.isNull(max.tip)) Message.info(max.tip);\r\n return;\r\n }\r\n }\r\n if (!tools.isNull(min.value)) {\r\n if (v < min.value) {\r\n if (!tools.isNull(min.tip)) Message.info(min.tip);\r\n return\r\n };\r\n }\r\n \r\n if (v.match(/\\./g) && v.match(/\\./g).length > 1) {\r\n return;\r\n }\r\n if (type == \"positive\") { // 只允许输入正数\r\n newValue = (v + '').match(/\\d+\\.?\\d*/);\r\n } else {\r\n newValue = (v + '').match(/^(\\-)?[(\\d*)|(\\d+\\.?\\d*)]*$/);\r\n }\r\n let length1 = maxLength ? parseInt(maxLength) : -1;\r\n let length2 = parseInt(precisionLength);\r\n if (length1 >= 0 && length2 >= 0) {\r\n let v = newValue[0] + '', v1, v2;\r\n if (v.indexOf('-') != -1) {\r\n v = v.slice(1, v.length);\r\n }\r\n v1 = v.split('.')[0];\r\n v2 = v.split('.')[1];\r\n if ((v1 && v1.length > (length1 - length2)) || (v2 && v2.length > length2) || (v1 && v1.length > (length1 - length2))) {\r\n return;\r\n }\r\n if (length2 == 0 && v.indexOf('.') > 0) { // 不允许小数的时候,也不允许小数点\r\n return;\r\n }\r\n }\r\n }\r\n this.setState({\r\n value: newValue && newValue[0] || ''\r\n }, () => {\r\n this.props.onChange && this.props.onChange(this.state.value);\r\n })\r\n }\r\n\r\n onChange = (key) => {\r\n //对移动端键盘处理。\r\n this.handleMobileKeyboard();\r\n const { max = {}, min = {}, handleOk, onChange, maxLength, precisionLength } = this.props;\r\n if (key == 'sure') {\r\n handleOk && handleOk(this.state.value);\r\n return;\r\n }\r\n let length1 = maxLength ? parseInt(maxLength) : -1;\r\n let length2 = parseInt(precisionLength);\r\n if (length2 == 0 && key == '.') {\r\n return;\r\n }\r\n let value = this.state.value + '';\r\n if (value == '' && key == '.') { // 不允许小数的时候,也不允许小数点\r\n return;\r\n }\r\n\r\n if ((value + '').indexOf('.') > 0 && key == '.') {\r\n return;\r\n }\r\n let newValue = Keyboard.getNewValue(this.input.input, value, key, true);\r\n //键盘大小控制\r\n if (!tools.isNull(max.value)) {\r\n if (newValue > max.value) {\r\n if (!tools.isNull(max.tip)) Message.info(max.tip);\r\n return;\r\n }\r\n }\r\n if (!tools.isNull(min.value)) {\r\n if (newValue < min.value) {\r\n if (!tools.isNull(min.tip)) Message.info(min.tip);\r\n return\r\n };\r\n }\r\n\r\n if (length1 && length2) {\r\n let v = newValue, v1, v2;\r\n if (newValue.indexOf('-') != -1) {\r\n v = newValue.slice(1, newValue.length);\r\n }\r\n v1 = v.split('.')[0];\r\n v2 = v.split('.')[1];\r\n if ((v1 && v1.length > (length1 - length2)) || (v2 && v2.length > length2) || (v1 && v1.length > (length1 - length2))) {\r\n return;\r\n }\r\n }\r\n this.setState({\r\n value: newValue\r\n }, () => {\r\n onChange && onChange(this.state.value);\r\n })\r\n }\r\n\r\n getValue = () => {\r\n return this.state.value;\r\n }\r\n\r\n //针对在移动端环境下,不需要系统键盘时的处理。\r\n handleMobileKeyboard = () => {\r\n let el = this.input && this.input.input;\r\n if (el && this.isMobileEnvironment && env.os !== env.constant.os.ios) {\r\n console.log('执行方法handleMobileKeyboard', el);\r\n if (!el.setAttribute || !el.removeAttribute) return;\r\n el.setAttribute('readonly', 'readonly');\r\n if (this.setTimer) window.clearTimeout(this.setTimer);\r\n this.setTimer = setTimeout(() => { el.removeAttribute('readonly') }, 200);\r\n }\r\n }\r\n\r\n onFocus = (e) => {\r\n this.handleMobileKeyboard()\r\n }\r\n\r\n render() {\r\n let { visible, value } = this.state;\r\n return (\r\n <div className='number-keyboard-input'>\r\n <Input\r\n className={hotKey.hotKeyNotFilter('keyboard-input')}\r\n style={{ marginBottom: '24px' }}\r\n placeholder={this.props.placeholder || ''}\r\n value={value}\r\n onChange={(e) => this.inputChange(e.target.value)}\r\n onFocus={this.onFocus}\r\n onClick={this.handleMobileKeyboard}\r\n onSelect={this.handleMobileKeyboard}\r\n ref={input => this.input = input} />\r\n\r\n <Keyboard\r\n type='number2'\r\n positive={this.props.type}\r\n onChange={this.onChange} />\r\n </div>\r\n )\r\n }\r\n}"]}
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/keyboard/numberButton_input.js"],"names":["KeyboardInput","props","inputChange","v","handleMobileKeyboard","newValue","max","min","type","maxLength","precisionLength","tools","isNull","value","tip","Message","info","match","length","length1","parseInt","length2","v1","v2","indexOf","slice","split","setState","onChange","state","key","handleOk","Keyboard","getNewValue","input","getValue","el","isMobileEnvironment","env","os","constant","ios","console","log","setAttribute","removeAttribute","setTimer","window","clearTimeout","setTimeout","onFocus","e","onRef","visible","platform","isHorizontalPad","props_old","b","hotKey","hotKeyNotFilter","marginBottom","placeholder","target","Component","propTypes","PropTypes","func","isRequired","string","number"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;;;;;;;AAOA;;;;AAEA;;AACA;;AACA;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;;;IAEqBA,a;;;AAYnB,yBAAYC,KAAZ,EAAmB;AAAA;;AAAA,oJACXA,KADW;;AAAA,UAsBnBC,WAtBmB,GAsBL,UAACC,CAAD,EAAO;AACnB;AACA,YAAKC,o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F,CAASjD,KAA1B,CAAP;AAAA,WALZ;AAME,mBAAS,KAAKqC,OANhB;AAOE,mBAAS,KAAK9C,oBAPhB;AAQE,oBAAU,KAAKA,oBARjB;AASE,eAAK;AAAA,mBAAS,OAAK8B,KAAL,GAAaA,KAAtB;AAAA;AATP,UADF;AAYE,sCAAC,eAAD;AACE,gBAAK,SADP;AAEE,oBAAU,KAAKjC,KAAL,CAAWO,IAFvB;AAGE,oBAAU,KAAKoB;AAHjB;AAZF,OADF;AAoBD;;;EAxLwCmC,gB,UAElCC,S,GAAY;AACjBpC,YAAUqC,oBAAUC,IAAV,CAAeC,UADR;AAEjBN,eAAaI,oBAAUG,MAFN;AAGjB5D,QAAMyD,oBAAUG,MAHC;AAIjB3D,aAAWwD,oBAAUI,MAJJ,EAIY;AAC7B3D,mBAAiBuD,oBAAUI,MALV,EAKkB;AACnC/D,OAAK2D,oBAAUI,MANE;AAOjB9D,OAAK0D,oBAAUI;AAPE,C;kBAFArE,a","file":"numberButton_input.js","sourcesContent":["/**\r\n * input + 数字键盘\r\n * @props {boolean} type \"positive\" 只支持正数,不传正负都可以\r\n * @props {number} max 最大值\r\n * @props {number} min 最小值\r\n */\r\n\r\nimport React, { Component } from 'react';\r\nimport { Input } from 'antd';\r\nimport { platform } from 'mutants-util';\r\nimport { env } from 'mutants-microfx';\r\nimport { Keyboard } from '../../index';\r\nimport PropTypes from 'prop-types';\r\nimport tools from '../../util/tools'\r\nimport Message from '../message/index'\r\nimport hotKey from '../hotKey'\r\n\r\nexport default class KeyboardInput extends Component {\r\n\r\n static propTypes = {\r\n onChange: PropTypes.func.isRequired,\r\n placeholder: PropTypes.string,\r\n type: PropTypes.string,\r\n maxLength: PropTypes.number, // 总长度\r\n precisionLength: PropTypes.number, // 小数总长\r\n max: PropTypes.number,\r\n min: PropTypes.number,\r\n }\r\n\r\n constructor(props) {\r\n super(props);\r\n this.props.onRef && this.props.onRef(this);\r\n this.state = {\r\n value: props.value || '',\r\n visible: false\r\n }\r\n const { isHorizontalPad } = platform || {};\r\n this.isMobileEnvironment = !!isHorizontalPad;\r\n this.setTimer = null;\r\n }\r\n\r\n componentDidMount() {\r\n this.setState({ value: this.props.value || '' })\r\n }\r\n\r\n componentDidUpdate(props_old, b) {\r\n if (props_old.visible != this.props.visible && this.props.visible == true) {\r\n this.setState({ value: this.props.value || '' })\r\n }\r\n }\r\n\r\n inputChange = (v) => {\r\n //对移动端键盘处理。\r\n this.handleMobileKeyboard();\r\n let newValue;\r\n if (v === '') {\r\n newValue = '';\r\n } else {\r\n //键盘大小控制\r\n const { max = {}, min = {}, type, maxLength, precisionLength } = this.props;\r\n if (!tools.isNull(max.value)) {\r\n if (v > max.value) {\r\n if (!tools.isNull(max.tip)) Message.info(max.tip);\r\n return;\r\n }\r\n }\r\n if (!tools.isNull(min.value)) {\r\n if (v < min.value) {\r\n if (!tools.isNull(min.tip)) Message.info(min.tip);\r\n return\r\n };\r\n }\r\n \r\n if (v.match(/\\./g) && v.match(/\\./g).length > 1) {\r\n return;\r\n }\r\n if (type == \"positive\") { // 只允许输入正数\r\n newValue = (v + '').match(/\\d+\\.?\\d*/);\r\n } else {\r\n newValue = (v + '').match(/^(\\-)?[(\\d*)|(\\d+\\.?\\d*)]*$/);\r\n }\r\n let length1 = maxLength ? parseInt(maxLength) : -1;\r\n let length2 = parseInt(precisionLength);\r\n if (length1 >= 0 && length2 >= 0) {\r\n let v = newValue[0] + '', v1, v2;\r\n if (v.indexOf('-') != -1) {\r\n v = v.slice(1, v.length);\r\n }\r\n v1 = v.split('.')[0];\r\n v2 = v.split('.')[1];\r\n if ((v1 && v1.length > (length1 - length2)) || (v2 && v2.length > length2) || (v1 && v1.length > (length1 - length2))) {\r\n return;\r\n }\r\n if (length2 == 0 && v.indexOf('.') > 0) { // 不允许小数的时候,也不允许小数点\r\n return;\r\n }\r\n }\r\n }\r\n this.setState({\r\n value: newValue && newValue[0] || ''\r\n }, () => {\r\n this.props.onChange && this.props.onChange(this.state.value);\r\n })\r\n }\r\n\r\n onChange = (key) => {\r\n //对移动端键盘处理。\r\n this.handleMobileKeyboard();\r\n const { max = {}, min = {}, handleOk, onChange, maxLength, precisionLength } = this.props;\r\n if (key == 'sure') {\r\n handleOk && handleOk(this.state.value);\r\n return;\r\n }\r\n let length1 = maxLength ? parseInt(maxLength) : -1;\r\n let length2 = parseInt(precisionLength);\r\n if (length2 == 0 && key == '.') {\r\n return;\r\n }\r\n let value = this.state.value + '';\r\n if (value == '' && key == '.') { // 不允许小数的时候,也不允许小数点\r\n return;\r\n }\r\n\r\n if ((value + '').indexOf('.') > 0 && key == '.') {\r\n return;\r\n }\r\n let newValue = Keyboard.getNewValue(this.input.input, value, key, true);\r\n //键盘大小控制\r\n if (!tools.isNull(max.value)) {\r\n if (newValue > max.value) {\r\n if (!tools.isNull(max.tip)) Message.info(max.tip);\r\n return;\r\n }\r\n }\r\n if (!tools.isNull(min.value)) {\r\n if (newValue < min.value) {\r\n if (!tools.isNull(min.tip)) Message.info(min.tip);\r\n return\r\n };\r\n }\r\n\r\n if (length1 && length2) {\r\n let v = newValue, v1, v2;\r\n if (newValue.indexOf('-') != -1) {\r\n v = newValue.slice(1, newValue.length);\r\n }\r\n v1 = v.split('.')[0];\r\n v2 = v.split('.')[1];\r\n if ((v1 && v1.length > (length1 - length2)) || (v2 && v2.length > length2) || (v1 && v1.length > (length1 - length2))) {\r\n return;\r\n }\r\n }\r\n this.setState({\r\n value: newValue\r\n }, () => {\r\n onChange && onChange(this.state.value);\r\n })\r\n }\r\n\r\n getValue = () => {\r\n return this.state.value;\r\n }\r\n\r\n //针对在移动端环境下,不需要系统键盘时的处理。\r\n handleMobileKeyboard = () => {\r\n let el = this.input && this.input.input;\r\n if (el && this.isMobileEnvironment && env.os !== env.constant.os.ios) {\r\n console.log('执行方法handleMobileKeyboard', el);\r\n if (!el.setAttribute || !el.removeAttribute) return;\r\n el.setAttribute('readonly', 'readonly');\r\n if (this.setTimer) window.clearTimeout(this.setTimer);\r\n this.setTimer = setTimeout(() => { el.removeAttribute('readonly') }, 200);\r\n }\r\n }\r\n\r\n onFocus = (e) => {\r\n this.handleMobileKeyboard()\r\n }\r\n\r\n render() {\r\n let { visible, value } = this.state;\r\n return (\r\n <div className='number-keyboard-input'>\r\n <Input\r\n className={hotKey.hotKeyNotFilter('keyboard-input')}\r\n style={{ marginBottom: '24px' }}\r\n placeholder={this.props.placeholder || ''}\r\n value={value}\r\n onChange={(e) => this.inputChange(e.target.value)}\r\n onFocus={this.onFocus}\r\n onClick={this.handleMobileKeyboard}\r\n onSelect={this.handleMobileKeyboard}\r\n ref={input => this.input = input} \r\n />\r\n <Keyboard\r\n type='number2'\r\n positive={this.props.type}\r\n onChange={this.onChange}\r\n />\r\n </div>\r\n )\r\n }\r\n}"]}
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
@keyboard-font-color: #333;
|
|
3
3
|
@themeColor: #FF8C25;
|
|
4
4
|
.product-keyboarde-botton.letters-box {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
height: 100%;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: space-around;
|
|
8
|
+
min-width: 766px;
|
|
9
|
+
position: relative;
|
|
10
|
+
padding-top: 19px;
|
|
11
|
+
background: rgba(0, 0, 0, .6);
|
|
12
12
|
.letters {
|
|
13
13
|
max-width: 680px;
|
|
14
14
|
width:81%;
|
|
15
15
|
|
|
16
16
|
.letters-line {
|
|
17
|
-
height: 70px;
|
|
18
|
-
width: 100%;
|
|
19
17
|
overflow: hidden;
|
|
20
|
-
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 90px;
|
|
20
|
+
|
|
21
21
|
.disabled {
|
|
22
22
|
background: #999;
|
|
23
23
|
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
span {
|
|
37
37
|
display: flex;
|
|
38
38
|
height: 100%;
|
|
39
|
-
font-size:
|
|
39
|
+
font-size: 20px !important;
|
|
40
40
|
border-radius: 6px;
|
|
41
41
|
flex-direction: column;
|
|
42
42
|
justify-content: center;
|
|
@@ -57,12 +57,16 @@
|
|
|
57
57
|
width: 100%;
|
|
58
58
|
|
|
59
59
|
.num {
|
|
60
|
-
height:
|
|
61
|
-
|
|
60
|
+
height: 58px;
|
|
61
|
+
line-height: 58px;
|
|
62
62
|
max-width: 164px;
|
|
63
|
-
padding: 0 12px;
|
|
64
|
-
line-height: 40px;
|
|
65
63
|
min-width: 33%;
|
|
64
|
+
margin: 0 0px 8px 0;
|
|
65
|
+
padding: 0 12px;
|
|
66
|
+
|
|
67
|
+
span{
|
|
68
|
+
font-size: 25px;
|
|
69
|
+
}
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
|
|
@@ -73,7 +77,6 @@
|
|
|
73
77
|
.del {
|
|
74
78
|
height: 35px;
|
|
75
79
|
margin: 0 8px 8px 0;
|
|
76
|
-
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
.sure {
|
|
@@ -83,41 +86,37 @@
|
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
.key {
|
|
86
|
-
max-width: 62px;
|
|
87
89
|
width: 9%;
|
|
88
|
-
|
|
90
|
+
max-width: 62px;
|
|
91
|
+
height: 72px;
|
|
89
92
|
box-sizing: border-box;
|
|
90
93
|
float: left;
|
|
91
|
-
padding: 0 4px;
|
|
92
94
|
text-align: center;
|
|
93
95
|
cursor: pointer;
|
|
94
96
|
user-select: none;
|
|
95
|
-
// border: 1px solid #FF8C25;
|
|
96
|
-
// box-shadow: 0 2px 4px 0 rgba(242, 157, 14, 0.30);
|
|
97
|
-
;
|
|
98
97
|
border-radius: 6px;
|
|
98
|
+
padding: 0 4px;
|
|
99
99
|
span {
|
|
100
|
-
display: flex;
|
|
101
100
|
height: 100%;
|
|
102
|
-
|
|
103
|
-
border-radius: 6px;
|
|
104
|
-
flex-direction: column;
|
|
101
|
+
display: flex;
|
|
105
102
|
justify-content: center;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
border-radius: 6px;
|
|
105
|
+
font-size: 25px;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
.handle {
|
|
110
110
|
width: 54px;
|
|
111
|
+
font-size: 20px;
|
|
111
112
|
.del {
|
|
112
|
-
float: none;
|
|
113
113
|
width: 54px;
|
|
114
|
-
height:
|
|
114
|
+
height: 72px;
|
|
115
|
+
line-height: 72px;
|
|
115
116
|
box-sizing: border-box;
|
|
116
117
|
float: left;
|
|
117
118
|
margin: 0 8px 18px 0;
|
|
118
119
|
text-align: center;
|
|
119
|
-
line-height: 52px;
|
|
120
|
-
font-size: 18px;
|
|
121
120
|
border-radius: 6px;
|
|
122
121
|
cursor: pointer;
|
|
123
122
|
user-select: none;
|
|
@@ -126,26 +125,22 @@
|
|
|
126
125
|
justify-content: center;
|
|
127
126
|
border-radius: 6px;
|
|
128
127
|
}
|
|
129
|
-
.clear {
|
|
130
|
-
font-size: 16px;
|
|
131
|
-
}
|
|
132
128
|
}
|
|
133
129
|
.is-number {
|
|
134
130
|
.delete {
|
|
135
|
-
height:
|
|
136
|
-
line-height:
|
|
131
|
+
height: 62px;
|
|
132
|
+
line-height: 62px;
|
|
137
133
|
margin: 0 8px 8px 0;
|
|
138
134
|
}
|
|
139
135
|
.clear {
|
|
140
|
-
height:
|
|
141
|
-
line-height:
|
|
136
|
+
height: 62px;
|
|
137
|
+
line-height: 62px;
|
|
142
138
|
margin: 0 8px 8px 0;
|
|
143
139
|
}
|
|
144
140
|
.sure {
|
|
145
|
-
height:
|
|
146
|
-
line-height:
|
|
141
|
+
height: 116px;
|
|
142
|
+
line-height: 116px;
|
|
147
143
|
}
|
|
148
|
-
|
|
149
144
|
}
|
|
150
145
|
.bold {
|
|
151
146
|
font-weight: 700;
|
|
@@ -40,6 +40,8 @@ var _react = require('react');
|
|
|
40
40
|
|
|
41
41
|
var _react2 = _interopRequireDefault(_react);
|
|
42
42
|
|
|
43
|
+
var _mutantsUtil = require('mutants-util');
|
|
44
|
+
|
|
43
45
|
var _propTypes = require('prop-types');
|
|
44
46
|
|
|
45
47
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
@@ -48,8 +50,6 @@ require('./style.less');
|
|
|
48
50
|
|
|
49
51
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
50
52
|
|
|
51
|
-
var defaultSpinner = 'https://newretail.static.chanjet.com/loading.gif';
|
|
52
|
-
|
|
53
53
|
var LoaingContent = (_temp2 = _class = function (_Component) {
|
|
54
54
|
(0, _inherits3.default)(LoaingContent, _Component);
|
|
55
55
|
|
|
@@ -94,6 +94,10 @@ var LoaingContent = (_temp2 = _class = function (_Component) {
|
|
|
94
94
|
title = params.title;
|
|
95
95
|
|
|
96
96
|
_this.setState({ percent: percent, title: title });
|
|
97
|
+
}, _this.getLoadingIcon = function () {
|
|
98
|
+
var theme = _mutantsUtil.localStore.get('theme');
|
|
99
|
+
var img = 'https://newretail.static.chanjet.com/bc_pos/loading' + (theme == 'blue' || theme == 'dark' ? '2' : '') + '.gif';
|
|
100
|
+
return img;
|
|
97
101
|
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
|
|
98
102
|
}
|
|
99
103
|
|
|
@@ -127,17 +131,22 @@ var LoaingContent = (_temp2 = _class = function (_Component) {
|
|
|
127
131
|
title = _state.title;
|
|
128
132
|
|
|
129
133
|
var showTip = text !== false;
|
|
134
|
+
var tip = opacity ? 'tplus-loading-tip-color' : '';
|
|
130
135
|
var loadingNode = _react2.default.createElement(
|
|
131
136
|
_react.Fragment,
|
|
132
137
|
null,
|
|
133
138
|
_react2.default.createElement(
|
|
134
139
|
'div',
|
|
135
140
|
{ className: 'tplus-loading-spinner' },
|
|
136
|
-
showProgress === true ? _react2.default.createElement(_progress2.default, { strokeLinecap: 'square', percent: percent }) : _react2.default.createElement(
|
|
141
|
+
showProgress === true ? _react2.default.createElement(_progress2.default, { strokeLinecap: 'square', percent: percent }) : _react2.default.createElement(
|
|
142
|
+
'div',
|
|
143
|
+
{ className: 'shadows' },
|
|
144
|
+
_react2.default.createElement('img', { src: this.getLoadingIcon(), className: 'default-spinner-gif' })
|
|
145
|
+
)
|
|
137
146
|
),
|
|
138
147
|
showTip && _react2.default.createElement(
|
|
139
148
|
'p',
|
|
140
|
-
{ className: 'tplus-loading-tip' },
|
|
149
|
+
{ className: 'tplus-loading-tip ' + tip },
|
|
141
150
|
showProgress === true ? '\u6863\u6848\u6570\u636E\u3010' + title + '\u3011\u4E0B\u8F7D\u4E2D' : text
|
|
142
151
|
)
|
|
143
152
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/loading/loadingContent.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/loading/loadingContent.js"],"names":["LoaingContent","state","closeAnimate","percent","title","readyClose","e","setState","setTimeout","close","stopPropagation","clearCloseTimer","props","onClose","startLoadingTimer","closeTimer","duration","clearTimeout","setPercent","params","getLoadingIcon","theme","localStore","get","img","style","text","node","className","target","delay","opacity","showProgress","showTip","tip","loadingNode","containerClass","trim","targetStyle","position","delayDuration","animation","WebkitAnimation","style2","Component","propTypes","PropTypes","string","object","element","func","number","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAEA;;AACA;;;;AACA;;;;IAEMA,a;;;;;;;;;;;;;;0NAkBJC,K,GAAQ;AACNC,oBAAc,KADR;AAENC,eAAS,CAFH;AAGNC,aAAO;AAHD,K,QAgBRC,U,GAAa,UAACC,CAAD,EAAO;AAClB,YAAKC,QAAL,CAAc,EAACL,cAAc,IAAf,EAAd,EAAoC,YAAM;AACxCM,mBAAW,YAAM;AACf,gBAAKC,KAAL;AACD,SAFD,EAEG,GAFH;AAGD,OAJD;AAKD,K,QAEDA,K,GAAQ,UAACH,CAAD,EAAO;AACb,UAAIA,CAAJ,EAAO;AACLA,UAAEI,eA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AAUC,MAFJ;AAGjBtB,SAAOqB,oBAAUE,MAHA;AAIjBrB,QAAMmB,oBAAUG,OAJC;AAKjBpC,WAASiC,oBAAUI,IALF;AAMjBlC,YAAU8B,oBAAUK,MANH;AAOjBtB,UAAQiB,oBAAUC;AAPD,C,SAUZK,Y,GAAe;AACpBvC,SADoB,qBACV,CAAE,CADQ;;AAEpBe,aAAW,EAFS;AAGpBH,SAAO,EAHa;AAIpBC,QAAM;AAJc,C;kBAmGT1B,a","file":"loadingContent.js","sourcesContent":["import React, {Component, Fragment, isValidElement} from 'react';\r\nimport { Progress } from 'antd';\r\nimport { localStore } from 'mutants-util';\r\nimport PropTypes from 'prop-types';\r\nimport './style.less';\r\n\r\nclass LoaingContent extends Component {\r\n static propTypes = {\r\n text: PropTypes.string,\r\n className: PropTypes.string,\r\n style: PropTypes.object,\r\n node: PropTypes.element,\r\n onClose: PropTypes.func,\r\n duration: PropTypes.number,\r\n target: PropTypes.string\r\n };\r\n\r\n static defaultProps = {\r\n onClose() {},\r\n className: '',\r\n style: {},\r\n text: '加载中,请稍后...',\r\n };\r\n\r\n state = {\r\n closeAnimate: false,\r\n percent: 0,\r\n title: ''\r\n };\r\n\r\n componentDidMount() {\r\n if (typeof this.props.duration === 'number') {\r\n this.startLoadingTimer();\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.clearCloseTimer();\r\n }\r\n\r\n readyClose = (e) => {\r\n this.setState({closeAnimate: true}, () => {\r\n setTimeout(() => {\r\n this.close();\r\n }, 250)\r\n })\r\n }\r\n\r\n close = (e) => {\r\n if (e) {\r\n e.stopPropagation();\r\n }\r\n this.clearCloseTimer();\r\n this.props.onClose();\r\n }\r\n\r\n startLoadingTimer = () => {\r\n this.closeTimer = setTimeout(() => {\r\n this.readyClose();\r\n }, this.props.duration);\r\n }\r\n\r\n clearCloseTimer = () => {\r\n if (this.closeTimer) {\r\n clearTimeout(this.closeTimer);\r\n this.closeTimer = null;\r\n }\r\n }\r\n\r\n setPercent = (params) => {\r\n const { percent, title } = params\r\n this.setState({ percent, title })\r\n }\r\n\r\n getLoadingIcon = () => {\r\n const theme = localStore.get('theme');\r\n const img = `https://newretail.static.chanjet.com/bc_pos/loading${(theme == 'blue' || theme == 'dark') ? '2' : ''}.gif`;\r\n return img;\r\n }\r\n\r\n render() {\r\n const { style, text, node, className, target, delay, opacity, showProgress } = this.props;\r\n const { closeAnimate, percent, title } = this.state;\r\n const showTip = text !== false;\r\n const tip = opacity ? 'tplus-loading-tip-color' : '';\r\n const loadingNode = (\r\n <Fragment>\r\n <div className='tplus-loading-spinner'>\r\n {\r\n showProgress === true ?\r\n <Progress strokeLinecap=\"square\" percent={percent} />\r\n :\r\n <div className='shadows'>\r\n <img src={this.getLoadingIcon()} className='default-spinner-gif' />\r\n </div>\r\n }\r\n </div>\r\n {\r\n showTip && <p className={`tplus-loading-tip ${tip}`}>{showProgress === true ? `档案数据【${title}】下载中` : text}</p>\r\n }\r\n </Fragment>\r\n );\r\n const containerClass = `tplus-loading ${closeAnimate ? 'loading-close-animate' : ''} ${className}`.trim();\r\n const targetStyle = target ? {position: 'absolute'} : {};\r\n const delayDuration = delay ? {animation: `loading-delay-animation ${delay}ms`, WebkitAnimation: `loading-delay-animation ${delay}ms`} : {};\r\n const style2 = opacity ? { 'background-color': `rgba(2555, 255, 255, ${opacity})` } : {};\r\n return (\r\n <div className={containerClass} style={Object.assign(targetStyle, delayDuration, style, style2)}>\r\n <div className={`tplus-loading-content${showProgress === true ? ' tplus-loading-progress' : ''}`}>\r\n {isValidElement(node) ? node : loadingNode}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default LoaingContent;\r\n"]}
|
|
@@ -17,14 +17,22 @@
|
|
|
17
17
|
transform-origin: 50% 50%;
|
|
18
18
|
position: absolute;
|
|
19
19
|
.tplus-loading-spinner{
|
|
20
|
-
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
21
23
|
margin-bottom: 20px;
|
|
22
24
|
.default-spinner-gif{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
width: 90px;
|
|
26
|
+
height: 90px;
|
|
27
|
+
}
|
|
28
|
+
.shadows{
|
|
29
|
+
width: 90px;
|
|
30
|
+
height: 90px;
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
box-shadow: 0px 0px 15px 5px rgba(51, 51, 51, 0.08);
|
|
28
36
|
}
|
|
29
37
|
}
|
|
30
38
|
.tplus-loading-tip{
|
|
@@ -32,6 +40,9 @@
|
|
|
32
40
|
font-size: 13px;
|
|
33
41
|
text-align: center;
|
|
34
42
|
}
|
|
43
|
+
.tplus-loading-tip-color{
|
|
44
|
+
color: #333;
|
|
45
|
+
}
|
|
35
46
|
.closeAnimate{
|
|
36
47
|
._tplus-animation-ease_;
|
|
37
48
|
background-color: #01AAED !important;
|
|
@@ -98,7 +98,10 @@ var Message = (_temp = _class = function () {
|
|
|
98
98
|
isHorizontalPad = _ref.isHorizontalPad;
|
|
99
99
|
|
|
100
100
|
if (!!isHorizontalPad) return;
|
|
101
|
-
|
|
101
|
+
|
|
102
|
+
var _ref2 = config || {},
|
|
103
|
+
memberCursor = _ref2.memberCursor;
|
|
104
|
+
|
|
102
105
|
var doms = document.getElementsByClassName('app hot-key-focus-container');
|
|
103
106
|
var input = document.getElementById('productPoint');
|
|
104
107
|
if (memberCursor) {
|
|
@@ -118,10 +121,10 @@ var Message = (_temp = _class = function () {
|
|
|
118
121
|
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
119
122
|
var messageType = arguments[2];
|
|
120
123
|
|
|
121
|
-
var
|
|
122
|
-
isVerticalTouch =
|
|
123
|
-
isHorizontalPad =
|
|
124
|
-
isHorizontalSunMi =
|
|
124
|
+
var _ref3 = _mutantsUtil.platform || {},
|
|
125
|
+
isVerticalTouch = _ref3.isVerticalTouch,
|
|
126
|
+
isHorizontalPad = _ref3.isHorizontalPad,
|
|
127
|
+
isHorizontalSunMi = _ref3.isHorizontalSunMi;
|
|
125
128
|
|
|
126
129
|
var isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
|
127
130
|
if (!!isVerticalTouch && ['error', 'success', 'info', 'warn'].includes(messageType)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tplus-components-touch/components/message/index.js"],"names":["defualt","top","duration","voice","warn","fateurClassName","Message","config","width","height","style","cStyle","platform","isHorizontalPad","memberCursor","doms","document","getElementsByClassName","input","getElementById","setTimeout","length","console","log","focus","msg","messageType","isVerticalTouch","isHorizontalSunMi","isMobileEnvironment","includes","toast","isUseFateur","body","classList","remove","destroy","setConfig","resetConfig","error","content","setStyle","defualtFocus","success","warning","status","info","doMusic","add","mask","createElement","className","messageContainer","querySelector","parentNode","childNodes","node","appendChild","clearMusic","m","audio","controls","src","hidden","autoplay","sys_audio","removeChild"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;;;;;;;;;;;AAUA;;;;AACA;;AACA;;AACA;;;;AAEA,IAAIA,UAAU;AACZC,OAAK,GADO;AAEZC,YAAU;AAFE,CAAd;;AAKA,IAAMC,QAAQ;AACZC,QAAM,wDADM,CACmD;AADnD,CAAd;;AAIA,IAAMC,kBAAkB,CAAC,eAAD,EAAkB,iBAAlB,CAAxB;;IAEMC,O;;;;;;;+BAMyB;AAAA,UAAbC,MAAa,uEAAJ,EAAI;AAAA,UACpBC,KADoB,GACSD,MADT,CACpBC,KADoB;AAAA,UACbC,MADa,GACSF,MADT,CACbE,MADa;AAAA,0BACSF,MADT,CACLG,KADK;AAAA,UACLA,KADK,iCACG,EADH;;AAE3B,UAAIC,oCACCD,KADD,CAAJ;AAGA,UAAGF,KAAH,EAAS;AACPG,eAAOH,KAAP,GAAeA,KAAf;AACD;AACD,UAAGC,MAAH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5B,CAAwCR,IAAxC;AACD;AACF,OAVD;AAYD;;;4BAEcJ,M,EAAQ;AACrBvC,cAAQoD,UAAR;AACA,UAAIC,IAAIxD,MAAM0C,MAAN,CAAR;AACA,UAAIe,QAAQ5C,SAASkC,aAAT,CAAuB,OAAvB,CAAZ;AACAU,YAAMC,QAAN,GAAiB,IAAjB;AACAD,YAAME,GAAN,GAAYH,CAAZ;AACAC,YAAMG,MAAN,GAAe,IAAf;AACAH,YAAMI,QAAN,GAAiB,UAAjB;AACAhD,eAASiB,IAAT,CAAcwB,WAAd,CAA0BG,KAA1B;AACAtD,cAAQ2D,SAAR,GAAoBL,KAApB;AACAxC,iBAAW,YAAM;AAAEd,gBAAQoD,UAAR;AAAsB,OAAzC,EAA2C,IAA3C;AACD;;;iCAEmB;AAClB,UAAIpD,QAAQ2D,SAAZ,EAAuB;AAAEjD,iBAASiB,IAAT,CAAciC,WAAd,CAA0B5D,QAAQ2D,SAAlC,EAA8C3D,QAAQ2D,SAAR,GAAoB,IAApB;AAA2B;AACnG;;;YA/JMjC,W,GAAc,K,SAEdiC,S,GAAY,I;;;AAgKrB3D,QAAQC,MAAR,CAAeP,OAAf;;kBAEeM,O","file":"index.js","sourcesContent":["/**\r\n * Message调用的简写法: Message.success('数据加载成功')\r\n * 需要自定义配置的Message调用的写法: Message.success('数据加载成功', {top: 50, width: 500})\r\n * 当传入第二个配置option参数时,使用当前自定义的配置,不传则使用默认config\r\n * option可传入参数: top 距离顶部位置 | duration 持续时间单位秒 | width | height | style\r\n * Message的四种状态为: success | error | warn | info | toast | loading (loading的不会自动消失需要调用销毁方法)\r\n *\r\n * Message.destroy() 方法销毁Message组件\r\n */\r\nimport { message as tMessage } from 'antd';\r\nimport React from 'react';\r\nimport { platform } from 'mutants-util';\r\nimport { Spin } from '../../index';\r\nimport './index.less';\r\n\r\nlet defualt = {\r\n top: 300,\r\n duration: 1.5\r\n};\r\n\r\nconst voice = {\r\n warn: 'https://newretail.static.chanjet.com/muisc/syswarn.mp3' //警告\r\n}\r\n\r\nconst fateurClassName = ['message-toast', 'message-loading'];\r\n\r\nclass Message {\r\n\r\n static isUseFateur = false;\r\n\r\n static sys_audio = null;\r\n\r\n static setStyle(config = {}) {\r\n const {width, height, style = {}} = config;\r\n let cStyle = {\r\n ...style\r\n };\r\n if(width){\r\n cStyle.width = width;\r\n }\r\n if(height){\r\n cStyle.height = height;\r\n }\r\n return {style: {...cStyle}};\r\n }\r\n\r\n static defualtFocus(config) {\r\n const { isHorizontalPad } = platform || {};\r\n if (!!isHorizontalPad) return;\r\n const memberCursor = config ||{};\r\n let doms = document.getElementsByClassName('app hot-key-focus-container');\r\n let input = document.getElementById('productPoint');\r\n if(memberCursor){\r\n input = document.getElementById('memberPoint');\r\n }\r\n if (input) setTimeout(() => { if(doms && doms.length > 0){console.log('message-defualt==Focus=='); input.focus()} }, 300);\r\n }\r\n\r\n static resetConfig(msg, config = {}, messageType) {\r\n const { isVerticalTouch, isHorizontalPad, isHorizontalSunMi } = platform || {};\r\n const isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;\r\n if (!!isVerticalTouch && ['error', 'success', 'info', 'warn'].includes(messageType)) {\r\n // 竖屏中强制转换为 toast 提示\r\n Message.toast(msg, config);\r\n return true;\r\n }\r\n\r\n if (isMobileEnvironment) {\r\n defualt = { top: 100, duration: 1.5 }\r\n }\r\n\r\n Message.isUseFateur && document.body.classList.remove(...fateurClassName);\r\n Message.isUseFateur = false;\r\n if (config && config.duration === 4) {\r\n return;\r\n }\r\n // 解决连续输入商品时toast不消失的问题\r\n tMessage.destroy();\r\n // 解决toast第二次之后输入商品toast不消失问题\r\n setTimeout(() => {\r\n tMessage.destroy();\r\n }, 1500)\r\n\r\n const setConfig = Object.keys(config).length ? config : defualt;\r\n\r\n tMessage.config(setConfig);\r\n }\r\n\r\n static config(config) {\r\n tMessage.config(config);\r\n }\r\n\r\n static destroy() {\r\n tMessage.destroy();\r\n }\r\n\r\n static error(msg, config) {\r\n if (Message.resetConfig(msg, config, 'error')) return;\r\n if (config && config.duration === 4) {\r\n tMessage.error({content: msg, ...Message.setStyle(config), duration: 4});\r\n } else {\r\n tMessage.error({content: msg, ...Message.setStyle(config)});\r\n }\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static success(msg, config) {\r\n if (Message.resetConfig(msg, config, 'success')) return;\r\n tMessage.success({content: msg, ...Message.setStyle(config)});\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static warn(msg, config) {\r\n if (Message.resetConfig(msg, config, 'warn')) return;\r\n tMessage.warning({content: msg, ...Message.setStyle(config)});\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static info(msg, config, status) {\r\n if (Message.resetConfig(msg, config, 'info')) return;\r\n tMessage.info({ content: msg, ...Message.setStyle(config) });\r\n if (status) Message.doMusic(status)\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static tip(msg, config, status) {\r\n if (Message.resetConfig(msg, config, 'info')) return;\r\n document.body.classList.remove('message-toast');\r\n document.body.classList.add('message-tip');\r\n tMessage.info({ content: msg, ...Message.setStyle(config) });\r\n if (status) Message.doMusic(status)\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static toast(msg, config = {}, status) {\r\n Message.resetConfig(msg, { top: '40%', ...config, duration: 18000});\r\n Message.isUseFateur = true;\r\n document.body.classList.remove('message-tip');\r\n document.body.classList.add('message-toast');\r\n tMessage.info({ content: msg, ...Message.setStyle(config) });\r\n if (status) Message.doMusic(status)\r\n }\r\n\r\n static loading(msg, config = {}) {\r\n Message.resetConfig(msg, {top: '40%', ...config, duration: 18000});\r\n Message.isUseFateur = true;\r\n document.body.classList.add('message-loading');\r\n tMessage.info({\r\n content: <div className='message-loading-content'>\r\n <Spin\r\n type='rotating'\r\n scale={2}\r\n />\r\n <h1>{msg}</h1>\r\n </div>,\r\n ...Message.setStyle(config)\r\n });\r\n\r\n setTimeout(() => {\r\n const mask = document.createElement('div');\r\n mask.className = 'message-loading-mask';\r\n const messageContainer = document.querySelector('.ant-message');\r\n if (messageContainer) {\r\n for (const node of messageContainer.parentNode.childNodes) {\r\n if (Array.from(node.classList).includes('message-loading-mask')) return;\r\n }\r\n messageContainer.parentNode.appendChild(mask);\r\n }\r\n });\r\n\r\n }\r\n\r\n static doMusic(status) {\r\n Message.clearMusic();\r\n let m = voice[status];\r\n let audio = document.createElement('audio')\r\n audio.controls = true;\r\n audio.src = m;\r\n audio.hidden = true;\r\n audio.autoplay = 'autoplay';\r\n document.body.appendChild(audio);\r\n Message.sys_audio = audio;\r\n setTimeout(() => { Message.clearMusic() }, 3000)\r\n }\r\n\r\n static clearMusic() {\r\n if (Message.sys_audio) { document.body.removeChild(Message.sys_audio); Message.sys_audio = null; };\r\n }\r\n}\r\n\r\nMessage.config(defualt);\r\n\r\nexport default Message;\r\n"]}
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/message/index.js"],"names":["defualt","top","duration","voice","warn","fateurClassName","Message","config","width","height","style","cStyle","platform","isHorizontalPad","memberCursor","doms","document","getElementsByClassName","input","getElementById","setTimeout","length","console","log","focus","msg","messageType","isVerticalTouch","isHorizontalSunMi","isMobileEnvironment","includes","toast","isUseFateur","body","classList","remove","destroy","setConfig","resetConfig","error","content","setStyle","defualtFocus","success","warning","status","info","doMusic","add","mask","createElement","className","messageContainer","querySelector","parentNode","childNodes","node","appendChild","clearMusic","m","audio","controls","src","hidden","autoplay","sys_audio","removeChild"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAA;;;;;;;;;;;;;AAUA;;;;AACA;;AACA;;AACA;;;;AAEA,IAAIA,UAAU;AACZC,OAAK,GADO;AAEZC,YAAU;AAFE,CAAd;;AAKA,IAAMC,QAAQ;AACZC,QAAM,wDADM,CACmD;AADnD,CAAd;;AAIA,IAAMC,kBAAkB,CAAC,eAAD,EAAkB,iBAAlB,CAAxB;;IAEMC,O;;;;;;;+BAMyB;AAAA,UAAbC,MAAa,uEAAJ,EAAI;AAAA,UACpBC,KADoB,GACSD,MADT,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C,UAA/C,4GAA2D;AAAA,kBAAhDC,IAAgD;;AACzD,kBAAI,oBAAWA,KAAKtB,SAAhB,EAA2BJ,QAA3B,CAAoC,sBAApC,CAAJ,EAAiE;AAClE;AAHmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAIpBsB,2BAAiBE,UAAjB,CAA4BG,WAA5B,CAAwCR,IAAxC;AACD;AACF,OAVD;AAYD;;;4BAEcJ,M,EAAQ;AACrBvC,cAAQoD,UAAR;AACA,UAAIC,IAAIxD,MAAM0C,MAAN,CAAR;AACA,UAAIe,QAAQ5C,SAASkC,aAAT,CAAuB,OAAvB,CAAZ;AACAU,YAAMC,QAAN,GAAiB,IAAjB;AACAD,YAAME,GAAN,GAAYH,CAAZ;AACAC,YAAMG,MAAN,GAAe,IAAf;AACAH,YAAMI,QAAN,GAAiB,UAAjB;AACAhD,eAASiB,IAAT,CAAcwB,WAAd,CAA0BG,KAA1B;AACAtD,cAAQ2D,SAAR,GAAoBL,KAApB;AACAxC,iBAAW,YAAM;AAAEd,gBAAQoD,UAAR;AAAsB,OAAzC,EAA2C,IAA3C;AACD;;;iCAEmB;AAClB,UAAIpD,QAAQ2D,SAAZ,EAAuB;AAAEjD,iBAASiB,IAAT,CAAciC,WAAd,CAA0B5D,QAAQ2D,SAAlC,EAA8C3D,QAAQ2D,SAAR,GAAoB,IAApB;AAA2B;AACnG;;;YA/JMjC,W,GAAc,K,SAEdiC,S,GAAY,I;;;AAgKrB3D,QAAQC,MAAR,CAAeP,OAAf;;kBAEeM,O","file":"index.js","sourcesContent":["/**\r\n * Message调用的简写法: Message.success('数据加载成功')\r\n * 需要自定义配置的Message调用的写法: Message.success('数据加载成功', {top: 50, width: 500})\r\n * 当传入第二个配置option参数时,使用当前自定义的配置,不传则使用默认config\r\n * option可传入参数: top 距离顶部位置 | duration 持续时间单位秒 | width | height | style\r\n * Message的四种状态为: success | error | warn | info | toast | loading (loading的不会自动消失需要调用销毁方法)\r\n *\r\n * Message.destroy() 方法销毁Message组件\r\n */\r\nimport { message as tMessage } from 'antd';\r\nimport React from 'react';\r\nimport { platform } from 'mutants-util';\r\nimport { Spin } from '../../index';\r\nimport './index.less';\r\n\r\nlet defualt = {\r\n top: 300,\r\n duration: 1.5\r\n};\r\n\r\nconst voice = {\r\n warn: 'https://newretail.static.chanjet.com/muisc/syswarn.mp3' //警告\r\n}\r\n\r\nconst fateurClassName = ['message-toast', 'message-loading'];\r\n\r\nclass Message {\r\n\r\n static isUseFateur = false;\r\n\r\n static sys_audio = null;\r\n\r\n static setStyle(config = {}) {\r\n const {width, height, style = {}} = config;\r\n let cStyle = {\r\n ...style\r\n };\r\n if(width){\r\n cStyle.width = width;\r\n }\r\n if(height){\r\n cStyle.height = height;\r\n }\r\n return {style: {...cStyle}};\r\n }\r\n\r\n static defualtFocus(config) {\r\n const { isHorizontalPad } = platform || {};\r\n if (!!isHorizontalPad) return;\r\n const { memberCursor } = config ||{};\r\n let doms = document.getElementsByClassName('app hot-key-focus-container');\r\n let input = document.getElementById('productPoint');\r\n if(memberCursor){\r\n input = document.getElementById('memberPoint');\r\n }\r\n if (input) setTimeout(() => { if(doms && doms.length > 0){console.log('message-defualt==Focus=='); input.focus()} }, 300);\r\n }\r\n\r\n static resetConfig(msg, config = {}, messageType) {\r\n const { isVerticalTouch, isHorizontalPad, isHorizontalSunMi } = platform || {};\r\n const isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;\r\n if (!!isVerticalTouch && ['error', 'success', 'info', 'warn'].includes(messageType)) {\r\n // 竖屏中强制转换为 toast 提示\r\n Message.toast(msg, config);\r\n return true;\r\n }\r\n\r\n if (isMobileEnvironment) {\r\n defualt = { top: 100, duration: 1.5 }\r\n }\r\n\r\n Message.isUseFateur && document.body.classList.remove(...fateurClassName);\r\n Message.isUseFateur = false;\r\n if (config && config.duration === 4) {\r\n return;\r\n }\r\n // 解决连续输入商品时toast不消失的问题\r\n tMessage.destroy();\r\n // 解决toast第二次之后输入商品toast不消失问题\r\n setTimeout(() => {\r\n tMessage.destroy();\r\n }, 1500)\r\n\r\n const setConfig = Object.keys(config).length ? config : defualt;\r\n\r\n tMessage.config(setConfig);\r\n }\r\n\r\n static config(config) {\r\n tMessage.config(config);\r\n }\r\n\r\n static destroy() {\r\n tMessage.destroy();\r\n }\r\n\r\n static error(msg, config) {\r\n if (Message.resetConfig(msg, config, 'error')) return;\r\n if (config && config.duration === 4) {\r\n tMessage.error({content: msg, ...Message.setStyle(config), duration: 4});\r\n } else {\r\n tMessage.error({content: msg, ...Message.setStyle(config)});\r\n }\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static success(msg, config) {\r\n if (Message.resetConfig(msg, config, 'success')) return;\r\n tMessage.success({content: msg, ...Message.setStyle(config)});\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static warn(msg, config) {\r\n if (Message.resetConfig(msg, config, 'warn')) return;\r\n tMessage.warning({content: msg, ...Message.setStyle(config)});\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static info(msg, config, status) {\r\n if (Message.resetConfig(msg, config, 'info')) return;\r\n tMessage.info({ content: msg, ...Message.setStyle(config) });\r\n if (status) Message.doMusic(status)\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static tip(msg, config, status) {\r\n if (Message.resetConfig(msg, config, 'info')) return;\r\n document.body.classList.remove('message-toast');\r\n document.body.classList.add('message-tip');\r\n tMessage.info({ content: msg, ...Message.setStyle(config) });\r\n if (status) Message.doMusic(status)\r\n Message.defualtFocus(config);\r\n }\r\n\r\n static toast(msg, config = {}, status) {\r\n Message.resetConfig(msg, { top: '40%', ...config, duration: 18000});\r\n Message.isUseFateur = true;\r\n document.body.classList.remove('message-tip');\r\n document.body.classList.add('message-toast');\r\n tMessage.info({ content: msg, ...Message.setStyle(config) });\r\n if (status) Message.doMusic(status)\r\n }\r\n\r\n static loading(msg, config = {}) {\r\n Message.resetConfig(msg, {top: '40%', ...config, duration: 18000});\r\n Message.isUseFateur = true;\r\n document.body.classList.add('message-loading');\r\n tMessage.info({\r\n content: <div className='message-loading-content'>\r\n <Spin\r\n type='rotating'\r\n scale={2}\r\n />\r\n <h1>{msg}</h1>\r\n </div>,\r\n ...Message.setStyle(config)\r\n });\r\n\r\n setTimeout(() => {\r\n const mask = document.createElement('div');\r\n mask.className = 'message-loading-mask';\r\n const messageContainer = document.querySelector('.ant-message');\r\n if (messageContainer) {\r\n for (const node of messageContainer.parentNode.childNodes) {\r\n if (Array.from(node.classList).includes('message-loading-mask')) return;\r\n }\r\n messageContainer.parentNode.appendChild(mask);\r\n }\r\n });\r\n\r\n }\r\n\r\n static doMusic(status) {\r\n Message.clearMusic();\r\n let m = voice[status];\r\n let audio = document.createElement('audio')\r\n audio.controls = true;\r\n audio.src = m;\r\n audio.hidden = true;\r\n audio.autoplay = 'autoplay';\r\n document.body.appendChild(audio);\r\n Message.sys_audio = audio;\r\n setTimeout(() => { Message.clearMusic() }, 3000)\r\n }\r\n\r\n static clearMusic() {\r\n if (Message.sys_audio) { document.body.removeChild(Message.sys_audio); Message.sys_audio = null; };\r\n }\r\n}\r\n\r\nMessage.config(defualt);\r\n\r\nexport default Message;\r\n"]}
|
|
@@ -3124,12 +3124,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3124
3124
|
|
|
3125
3125
|
_this2.hasElectron = hasElectron;
|
|
3126
3126
|
|
|
3127
|
-
var _ref25 = _mutantsMicrofx.
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
_ref25$loginInfo = _ref25$loginInfo === undefined ? {} : _ref25$loginInfo;
|
|
3131
|
-
var ICCardServer = _ref25$loginInfo.ICCardServer,
|
|
3132
|
-
ICCardPassword = _ref25$loginInfo.ICCardPassword;
|
|
3127
|
+
var _ref25 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
|
3128
|
+
ICCardServer = _ref25.ICCardServer,
|
|
3129
|
+
ICCardPassword = _ref25.ICCardPassword;
|
|
3133
3130
|
|
|
3134
3131
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3135
3132
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|