tplus-components-touch 3.27.1 → 3.28.1
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/api.js +13 -74
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +141 -3
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +6 -3
- package/dist/components/cloudPrint/api.js +85 -43
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +209 -108
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +0 -52
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +80 -63
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/settlement/settlement.js +69 -208
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +154 -193
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/ticon/iconfont/demo_index.html +3 -26
- package/dist/components/ticon/iconfont/iconfont.css +3 -7
- package/dist/components/ticon/iconfont/iconfont.js +1 -1
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +0 -7
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchTable/index.js +0 -4
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/presale/pickup.js +0 -419
- package/dist/components/presale/pickup.js.map +0 -1
- package/dist/components/presale/style.less +0 -48
|
@@ -1 +1 @@
|
|
|
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","emptyHeight","setTableHeight","windowEvent","bind","window","addEventListener","removeEventListener","_this","setTimeout","height","Number","tabDom","clientHeight","tableHeight","dataSource","TotalPage","loading","searchDesigns","columns","map","item","OriginalTitle","FieldName","Precision","IsFormat","newItem","title","width","dataIndex","key","ellipsis","render","text","renderText","InventorySearchApi","formatNumber","tools","dateFormat","unshift","fixed","loadingIcon","dom","length","y","spinning","indicator","onClick","info","buttonVisible","fontSize","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAEA;;AACA;;AACA;;;;AACA;;;;;;IAGqBA,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,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xB,CAAN;AAAA;AADJ,aAAP;AAGD,WAdH,GADF,GAiBE,8BAAC,oBAAD;AACE,iBAAO6B,UAAS,MAAT,GAAiB,OAD1B;AAEE,4BAAkB,EAAEP,QAAQ,MAAV,EAFpB;AAGE,iBAAO,EAAEsC,MAAM,QAAR,EAAkBC,eAAe,KAAjC,EAHT,GApBN;AAyBG,UAAEjC,aAAa,CAAb,IAAkB,CAACA,SAArB,KAAmC;AAAA;AAAA,YAAK,WAAU,eAAf,EAA+B,OAAO,EAAEkC,UAAU,MAAZ,EAAtC;AAAA;AAAA,SAzBtC;AA0BE,sCAAC,WAAD;AACE,iBAAOlC,SADT;AAEE,wBAAcvB,UAFhB;AAGE,oBAAU,KAAKC,QAHjB;AAIE,gBAAM,KAAKK,IAJb;AAKE,qBAAU;AALZ;AA1BF,OADF;AAoCD;;;EArJ8BoD,gBAAMC,S;;kBAAlBrE,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\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 render() {\r\n let { activePage } = this.state;\r\n let { dataSource, TotalPage, loading, type,searchDesigns } = this.props;\r\n const columns = 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 return newItem;\r\n })\r\n // 周边门店 要显示门店名称\r\n if (type == '2') {\r\n columns.unshift({\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 let loadingIcon = <img src='https://newretail.static.chanjet.com/loading.gif' style={{ width: '200px', height: '189px' }} />;\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: 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}"]}
|
|
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","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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}"]}
|
|
@@ -325,7 +325,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
325
325
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
326
326
|
PayStyle = _enumController$getEn.PayStyle;
|
|
327
327
|
|
|
328
|
-
_this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, true, _this2.props.amount, _this2.props.type, _this2.props.dto);
|
|
328
|
+
_this2.store.init(_this2.props.type == 1 ? null : _this2.context, _this2.props.onHandleAmount, _this2.props.dataSource.Code_02, _this2.props.storeInfo, true, _this2.props.amount, _this2.props.type, _this2.props.dto, currentKey);
|
|
329
329
|
var amount = _this2.store.paymode.amount;
|
|
330
330
|
if (amount == 0) {
|
|
331
331
|
_this2.settleZero();
|
|
@@ -591,10 +591,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
591
591
|
// czkVisible: true
|
|
592
592
|
// })
|
|
593
593
|
// }
|
|
594
|
-
// }
|
|
594
|
+
// }
|
|
595
595
|
// // else {
|
|
596
596
|
// // Message.warn('请先录入会员');
|
|
597
|
-
// // }
|
|
597
|
+
// // }
|
|
598
598
|
// // this.setState({
|
|
599
599
|
// // czkVisible: true,
|
|
600
600
|
// // });
|
|
@@ -1420,7 +1420,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1420
1420
|
if (_this2.hotkeydebouncedPayMode == mode) {
|
|
1421
1421
|
return;
|
|
1422
1422
|
}
|
|
1423
|
-
|
|
1423
|
+
// this.store.changeClickFocusOnly(mode.paymentType);
|
|
1424
1424
|
_this2.setCurrentFocusOnly(mode.paymentType);
|
|
1425
1425
|
if (_this2.hotkeydebounced) {
|
|
1426
1426
|
_this2.hotkeydebounced.cancel();
|
|
@@ -2493,178 +2493,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2493
2493
|
};
|
|
2494
2494
|
}();
|
|
2495
2495
|
|
|
2496
|
-
_this2.btnDebounced = function () {
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2501
|
-
while (1) {
|
|
2502
|
-
switch (_context14.prev = _context14.next) {
|
|
2503
|
-
case 0:
|
|
2504
|
-
_ref25 = _this2.context.viewModel.data || {}, IdbusiType = _ref25.IdbusiType, CustomerPhone = _ref25.CustomerPhone, DistributionMode = _ref25.DistributionMode;
|
|
2505
|
-
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
|
2506
|
-
|
|
2507
|
-
if (!(IdbusiType == 38)) {
|
|
2508
|
-
_context14.next = 46;
|
|
2509
|
-
break;
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2512
|
-
if (!(!CustomerPhone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
|
2513
|
-
_context14.next = 5;
|
|
2514
|
-
break;
|
|
2515
|
-
}
|
|
2516
|
-
|
|
2517
|
-
_context14.next = 5;
|
|
2518
|
-
return _this2.props.openBuyerModal();
|
|
2519
|
-
|
|
2520
|
-
case 5:
|
|
2521
|
-
if (!(DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
|
2522
|
-
_context14.next = 46;
|
|
2523
|
-
break;
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
_this2$store7 = _this2.store, getPerformanceDistributionValue = _this2$store7.getPerformanceDistributionValue, getPosFreight = _this2$store7.getPosFreight, updataFreight = _this2$store7.updataFreight;
|
|
2527
|
-
dto = _this2.context.viewModel.data.cut();
|
|
2528
|
-
|
|
2529
|
-
dto.AddressLng = '116.244057';
|
|
2530
|
-
dto.AddressLat = '40.068669';
|
|
2531
|
-
dto.Address = '北清路68号用友产业园东区19C座';
|
|
2532
|
-
dto.Province = '北京市';
|
|
2533
|
-
dto.City = '北京市';
|
|
2534
|
-
dto.District = '海淀区';
|
|
2535
|
-
// cc结算调用
|
|
2536
|
-
IPMSG = {};
|
|
2537
|
-
|
|
2538
|
-
if (!!window.localStorage.IPMSG) {
|
|
2539
|
-
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
2540
|
-
}
|
|
2541
|
-
_context14.next = 18;
|
|
2542
|
-
return getPerformanceDistributionValue({ cip: IPMSG.query || "", dto: dto });
|
|
2543
|
-
|
|
2544
|
-
case 18:
|
|
2545
|
-
_ref26 = _context14.sent;
|
|
2546
|
-
_ref26$data = _ref26.data;
|
|
2547
|
-
nonProductMap = _ref26$data.nonProductMap;
|
|
2548
|
-
freightProductDTOList = _ref26$data.freightProductDTOList;
|
|
2549
|
-
len = nonProductMap.length;
|
|
2550
|
-
|
|
2551
|
-
if (!(len > 0)) {
|
|
2552
|
-
_context14.next = 29;
|
|
2553
|
-
break;
|
|
2554
|
-
}
|
|
2555
|
-
|
|
2556
|
-
names = [];
|
|
2557
|
-
temphtml = [];
|
|
2558
|
-
|
|
2559
|
-
nonProductMap.forEach(function (obj, index) {
|
|
2560
|
-
for (var key in obj) {
|
|
2561
|
-
names.push('【' + key + '】');
|
|
2562
|
-
temphtml.push(index + 1 + '、' + obj[key]);
|
|
2563
|
-
}
|
|
2564
|
-
});
|
|
2565
|
-
|
|
2566
|
-
_modalWraper2.default.warning({
|
|
2567
|
-
title: '不可配送商品',
|
|
2568
|
-
content: '\u5546\u54C1' + names.join(',') + '\u4E0D\u53EF\u914D\u9001\uFF0C\u53EF\u80FD\u539F\u56E0\u5982\u4E0B\uFF1A' + temphtml.join(';')
|
|
2569
|
-
});
|
|
2570
|
-
return _context14.abrupt('return');
|
|
2571
|
-
|
|
2572
|
-
case 29:
|
|
2573
|
-
_context14.next = 31;
|
|
2574
|
-
return _this2.props.openWareHouseModal(freightProductDTOList);
|
|
2575
|
-
|
|
2576
|
-
case 31:
|
|
2577
|
-
|
|
2578
|
-
dto = _this2.context.viewModel.data.cut();
|
|
2579
|
-
dto.AddressLng = '116.244057';
|
|
2580
|
-
dto.AddressLat = '40.068669';
|
|
2581
|
-
dto.Address = '北清路68号用友产业园东区19C座';
|
|
2582
|
-
dto.Province = '北京市';
|
|
2583
|
-
dto.City = '北京市';
|
|
2584
|
-
dto.District = '海淀区';
|
|
2585
|
-
|
|
2586
|
-
_context14.next = 40;
|
|
2587
|
-
return getPosFreight({ cip: IPMSG.query || "", dto: dto });
|
|
2588
|
-
|
|
2589
|
-
case 40:
|
|
2590
|
-
_ref27 = _context14.sent;
|
|
2591
|
-
freight = _ref27.data.freight;
|
|
2592
|
-
|
|
2593
|
-
updataFreight(freight);
|
|
2594
|
-
_context14.next = 45;
|
|
2595
|
-
return _this2.props.updataFreight(freight);
|
|
2596
|
-
|
|
2597
|
-
case 45:
|
|
2598
|
-
console.log('zlf获取运费', freight);
|
|
2599
|
-
|
|
2600
|
-
case 46:
|
|
2601
|
-
|
|
2602
|
-
_this2.setState({
|
|
2603
|
-
bquick: bquick
|
|
2604
|
-
});
|
|
2605
|
-
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
|
2606
|
-
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
|
2607
|
-
|
|
2608
|
-
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
|
2609
|
-
_context14.next = 51;
|
|
2610
|
-
break;
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
|
-
return _context14.abrupt('return', false);
|
|
2614
|
-
|
|
2615
|
-
case 51:
|
|
2616
|
-
status = false;
|
|
2496
|
+
_this2.btnDebounced = function (type, bquick) {
|
|
2497
|
+
_this2.setState({
|
|
2498
|
+
bquick: bquick
|
|
2499
|
+
});
|
|
2617
2500
|
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
status = true;
|
|
2621
|
-
}
|
|
2622
|
-
});
|
|
2623
|
-
_this2.setState({
|
|
2624
|
-
isXianjin: status ? true : false
|
|
2625
|
-
});
|
|
2501
|
+
var _enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(),
|
|
2502
|
+
PayStyle = _enumController$getEn22.PayStyle;
|
|
2626
2503
|
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2504
|
+
var _this2$store7 = _this2.store,
|
|
2505
|
+
paymode = _this2$store7.paymode,
|
|
2506
|
+
brefund = _this2$store7.brefund,
|
|
2507
|
+
boriginReturn = _this2$store7.boriginReturn,
|
|
2508
|
+
newStyle = _this2$store7.newStyle;
|
|
2631
2509
|
|
|
2632
|
-
return _context14.abrupt('return');
|
|
2633
2510
|
|
|
2634
|
-
|
|
2635
|
-
_this2.btndebounced = (0, _debounce3.default)(function () {
|
|
2636
|
-
if (bquick) {
|
|
2637
|
-
_this2.quickSettle(type);
|
|
2638
|
-
} else {
|
|
2639
|
-
_this2.showModal();
|
|
2640
|
-
}
|
|
2641
|
-
}, 1000, {
|
|
2642
|
-
'leading': true,
|
|
2643
|
-
'trailing': false
|
|
2644
|
-
});
|
|
2645
|
-
_this2.btndebounced();
|
|
2646
|
-
setTimeout(function () {
|
|
2647
|
-
_this2.btndebounced.cancel();
|
|
2648
|
-
_this2.btndebounced = null;
|
|
2649
|
-
}, 2000);
|
|
2511
|
+
if (bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type)) return false;
|
|
2650
2512
|
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2513
|
+
var status = false;
|
|
2514
|
+
paymode.thePaymodes.forEach(function (v) {
|
|
2515
|
+
if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
|
|
2516
|
+
status = true;
|
|
2517
|
+
}
|
|
2518
|
+
});
|
|
2519
|
+
_this2.setState({
|
|
2520
|
+
isXianjin: status ? true : false
|
|
2521
|
+
});
|
|
2658
2522
|
|
|
2659
|
-
|
|
2660
|
-
return
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2523
|
+
if (_this2.btndebounced) {
|
|
2524
|
+
return;
|
|
2525
|
+
}
|
|
2526
|
+
_this2.btndebounced = (0, _debounce3.default)(function () {
|
|
2527
|
+
if (bquick) {
|
|
2528
|
+
_this2.quickSettle(type);
|
|
2529
|
+
} else {
|
|
2530
|
+
_this2.showModal();
|
|
2531
|
+
}
|
|
2532
|
+
}, 1000, {
|
|
2533
|
+
'leading': true,
|
|
2534
|
+
'trailing': false
|
|
2535
|
+
});
|
|
2536
|
+
_this2.btndebounced();
|
|
2537
|
+
setTimeout(function () {
|
|
2538
|
+
_this2.btndebounced.cancel();
|
|
2539
|
+
_this2.btndebounced = null;
|
|
2540
|
+
}, 2000);
|
|
2541
|
+
};
|
|
2663
2542
|
|
|
2664
2543
|
_this2.onCzkChange = function (v) {
|
|
2665
2544
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2666
|
-
var
|
|
2667
|
-
isNewRetailBCPos =
|
|
2545
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2546
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2668
2547
|
|
|
2669
2548
|
if (!isNewRetailBCPos) {
|
|
2670
2549
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
@@ -3070,9 +2949,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3070
2949
|
};
|
|
3071
2950
|
|
|
3072
2951
|
_this2.checkCurrentModeHaveMutex = function (type) {
|
|
3073
|
-
var _this2$
|
|
3074
|
-
paymode = _this2$
|
|
3075
|
-
newStyle = _this2$
|
|
2952
|
+
var _this2$store8 = _this2.store,
|
|
2953
|
+
paymode = _this2$store8.paymode,
|
|
2954
|
+
newStyle = _this2$store8.newStyle;
|
|
3076
2955
|
|
|
3077
2956
|
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
3078
2957
|
PayStyle = _enumController$getEn27.PayStyle;
|
|
@@ -3245,24 +3124,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3245
3124
|
|
|
3246
3125
|
_this2.hasElectron = hasElectron;
|
|
3247
3126
|
|
|
3248
|
-
var
|
|
3249
|
-
|
|
3127
|
+
var _ref25 = _mutantsMicrofx.localStore.get('user') || {},
|
|
3128
|
+
_ref25$loginInfo = _ref25.loginInfo;
|
|
3250
3129
|
|
|
3251
|
-
|
|
3252
|
-
var ICCardServer =
|
|
3253
|
-
ICCardPassword =
|
|
3254
|
-
Book = _ref29$loginInfo.Book,
|
|
3255
|
-
PercentageWhenBook = _ref29$loginInfo.PercentageWhenBook;
|
|
3130
|
+
_ref25$loginInfo = _ref25$loginInfo === undefined ? {} : _ref25$loginInfo;
|
|
3131
|
+
var ICCardServer = _ref25$loginInfo.ICCardServer,
|
|
3132
|
+
ICCardPassword = _ref25$loginInfo.ICCardPassword;
|
|
3256
3133
|
|
|
3257
3134
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3258
3135
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3259
|
-
_this2.isBook = Book;
|
|
3260
|
-
_this2.percentageWhenBook = PercentageWhenBook;
|
|
3261
3136
|
//移动端环境下,没有读取IC卡的方式。
|
|
3262
3137
|
|
|
3263
|
-
var
|
|
3264
|
-
isHorizontalPad =
|
|
3265
|
-
isHorizontalSunMi =
|
|
3138
|
+
var _ref26 = _mutantsUtil.platform || {},
|
|
3139
|
+
isHorizontalPad = _ref26.isHorizontalPad,
|
|
3140
|
+
isHorizontalSunMi = _ref26.isHorizontalSunMi;
|
|
3266
3141
|
|
|
3267
3142
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3268
3143
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
@@ -3497,8 +3372,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3497
3372
|
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3498
3373
|
storageValue = _state2.storageValue;
|
|
3499
3374
|
|
|
3500
|
-
var
|
|
3501
|
-
isNewRetailBCPos =
|
|
3375
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
3376
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
3502
3377
|
|
|
3503
3378
|
var _store2 = this.store,
|
|
3504
3379
|
paymode = _store2.paymode,
|
|
@@ -3517,20 +3392,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3517
3392
|
|
|
3518
3393
|
var boriginReturn = this.context && this.context.viewModel && this.context.viewModel.data && JSON.getCellValue(this.context.viewModel.data, "IsOriginalReturn");
|
|
3519
3394
|
var totalTaxAmount = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.TotalTaxAmount;
|
|
3520
|
-
|
|
3521
|
-
//收订金
|
|
3522
|
-
|
|
3523
|
-
var _ref32 = this.context && this.context.viewModel && this.context.viewModel.data,
|
|
3524
|
-
IdbusiType = _ref32.IdbusiType,
|
|
3525
|
-
DistributionMode = _ref32.DistributionMode;
|
|
3526
|
-
|
|
3527
|
-
if (IdbusiType == 38 && this.isBook && this.percentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
|
3528
|
-
totalTaxAmount = totalTaxAmount * this.percentageWhenBook / 100;
|
|
3529
|
-
}
|
|
3530
|
-
if (IdbusiType == 39) {
|
|
3531
|
-
totalTaxAmount = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
|
|
3532
|
-
}
|
|
3533
|
-
|
|
3534
3395
|
// 单据模式
|
|
3535
3396
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
3536
3397
|
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
@@ -3575,11 +3436,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3575
3436
|
quantity4 = 0;
|
|
3576
3437
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3577
3438
|
|
|
3578
|
-
var
|
|
3579
|
-
|
|
3580
|
-
buyQuantity =
|
|
3581
|
-
|
|
3582
|
-
returnQuantity =
|
|
3439
|
+
var _ref28 = quantityDetail || {},
|
|
3440
|
+
_ref28$buyQuantity = _ref28.buyQuantity,
|
|
3441
|
+
buyQuantity = _ref28$buyQuantity === undefined ? 0 : _ref28$buyQuantity,
|
|
3442
|
+
_ref28$returnQuantity = _ref28.returnQuantity,
|
|
3443
|
+
returnQuantity = _ref28$returnQuantity === undefined ? 0 : _ref28$returnQuantity;
|
|
3583
3444
|
|
|
3584
3445
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3585
3446
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -4180,7 +4041,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4180
4041
|
// return;
|
|
4181
4042
|
// }
|
|
4182
4043
|
// }
|
|
4183
|
-
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4044
|
+
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4184
4045
|
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4185
4046
|
},
|
|
4186
4047
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
@@ -4958,8 +4819,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4958
4819
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.member.balance));
|
|
4959
4820
|
},
|
|
4960
4821
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance)),
|
|
4961
|
-
ref: function ref(
|
|
4962
|
-
return _this8["inputCzkAmount"] =
|
|
4822
|
+
ref: function ref(_ref29) {
|
|
4823
|
+
return _this8["inputCzkAmount"] = _ref29;
|
|
4963
4824
|
},
|
|
4964
4825
|
onFocus: function onFocus(e) {
|
|
4965
4826
|
_this8.inputkey = "inputCzkAmount";
|
|
@@ -5576,8 +5437,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5576
5437
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5577
5438
|
},
|
|
5578
5439
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5579
|
-
ref: function ref(
|
|
5580
|
-
return _this8["inputJfdxAmount"] =
|
|
5440
|
+
ref: function ref(_ref30) {
|
|
5441
|
+
return _this8["inputJfdxAmount"] = _ref30;
|
|
5581
5442
|
},
|
|
5582
5443
|
onFocus: function onFocus(e) {
|
|
5583
5444
|
_this8.inputkey = "inputJfdxAmount";
|