tplus-components-touch 3.25.5 → 3.25.9
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 +2 -2
- 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/tab.js +9 -2
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/loading/loadingContent.js +13 -4
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +13 -4
- package/dist/components/settlement/settlementStore.js +1 -1
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = undefined;
|
|
7
|
+
|
|
8
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
9
|
+
|
|
10
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
15
|
+
|
|
16
|
+
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
|
17
|
+
|
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
|
19
|
+
|
|
20
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
21
|
+
|
|
22
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
23
|
+
|
|
24
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
25
|
+
|
|
26
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
27
|
+
|
|
28
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
29
|
+
|
|
30
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
31
|
+
|
|
32
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
33
|
+
|
|
34
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
35
|
+
|
|
36
|
+
var _react = require('react');
|
|
37
|
+
|
|
38
|
+
var _react2 = _interopRequireDefault(_react);
|
|
39
|
+
|
|
40
|
+
var _mutantsUtil = require('mutants-util');
|
|
41
|
+
|
|
42
|
+
require('./scanInput.less');
|
|
43
|
+
|
|
44
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
|
+
|
|
46
|
+
var SInput = function (_Component) {
|
|
47
|
+
(0, _inherits3.default)(SInput, _Component);
|
|
48
|
+
|
|
49
|
+
function SInput(props, context) {
|
|
50
|
+
(0, _classCallCheck3.default)(this, SInput);
|
|
51
|
+
|
|
52
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, (SInput.__proto__ || (0, _getPrototypeOf2.default)(SInput)).call(this, props, context));
|
|
53
|
+
|
|
54
|
+
_this.getIput = function () {
|
|
55
|
+
return _this.input;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
var _ref = _mutantsUtil.platform || {},
|
|
59
|
+
isHorizontalPad = _ref.isHorizontalPad;
|
|
60
|
+
|
|
61
|
+
_this.isMobileEnvironment = !!isHorizontalPad;
|
|
62
|
+
return _this;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
(0, _createClass3.default)(SInput, [{
|
|
66
|
+
key: 'render',
|
|
67
|
+
value: function render() {
|
|
68
|
+
var _this2 = this;
|
|
69
|
+
|
|
70
|
+
var _props = this.props,
|
|
71
|
+
ref = _props.ref,
|
|
72
|
+
className = _props.className,
|
|
73
|
+
suffix = _props.suffix,
|
|
74
|
+
props = (0, _objectWithoutProperties3.default)(_props, ['ref', 'className', 'suffix']);
|
|
75
|
+
|
|
76
|
+
return _react2.default.createElement(
|
|
77
|
+
'div',
|
|
78
|
+
{ className: 'productSearchInput ' + (className || '') },
|
|
79
|
+
_react2.default.createElement(
|
|
80
|
+
'div',
|
|
81
|
+
{ className: 'input' },
|
|
82
|
+
_react2.default.createElement('input', (0, _extends3.default)({ ref: function ref(el) {
|
|
83
|
+
return _this2.input = el;
|
|
84
|
+
} }, props))
|
|
85
|
+
),
|
|
86
|
+
_react2.default.createElement(
|
|
87
|
+
'div',
|
|
88
|
+
{ className: 'icon' },
|
|
89
|
+
suffix
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
}]);
|
|
94
|
+
return SInput;
|
|
95
|
+
}(_react.Component);
|
|
96
|
+
|
|
97
|
+
exports.default = SInput;
|
|
98
|
+
//# sourceMappingURL=scanInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["tplus-components-touch/components/input/scanInput.js"],"names":["SInput","props","context","getIput","input","platform","isHorizontalPad","isMobileEnvironment","ref","className","suffix","el","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;;;IAEqBA,M;;;AAEjB,oBAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAAA,0IAClBD,KADkB,EACXC,OADW;;AAAA,cAM5BC,OAN4B,GAMlB,YAAI;AACV,mBAAO,MAAKC,KAAZ;AACH,SAR2B;;AAAA,mBAEIC,yBAAY,EAFhB;AAAA,YAEhBC,eAFgB,QAEhBA,eAFgB;;AAGxB,cAAKC,mBAAL,GAA2B,CAAC,CAACD,eAA7B;AAHwB;AAI3B;;;;iCAMQ;AAAA;;AAAA,yBACsC,KAAKL,KAD3C;AAAA,gBACCO,GADD,UACCA,GADD;AAAA,gBACMC,SADN,UACMA,SADN;AAAA,gBACiBC,MADjB,UACiBA,MADjB;AAAA,gBAC4BT,KAD5B;;AAEL,mBACI;AAAA;AAAA,kBAAK,oCAAiCQ,aAAa,EAA9C,CAAL;AACI;AAAA;AAAA,sBAAK,WAAU,OAAf;AACI,oFAAO,KAAK;AAAA,mCAAM,OAAKL,KAAL,GAAaO,EAAnB;AAAA,yBAAZ,IAAuCV,KAAvC;AADJ,iBADJ;AAII;AAAA;AAAA,sBAAK,WAAU,MAAf;AAEQS;AAFR;AAJJ,aADJ;AAYH;;;EA1B+BE,gB;;kBAAfZ,M","file":"scanInput.js","sourcesContent":["import React, { Component } from 'react';\nimport { platform } from 'mutants-util';\nimport './scanInput.less';\n\nexport default class SInput extends Component {\n\n constructor(props, context) {\n super(props, context)\n const { isHorizontalPad } = platform || {};\n this.isMobileEnvironment = !!isHorizontalPad;\n }\n\n getIput = ()=>{\n return this.input;\n }\n\n render() {\n let { ref, className, suffix, ...props } = this.props;\n return (\n <div className={`productSearchInput ${className || ''}`}>\n <div className='input'>\n <input ref={el => this.input = el} {...props} />\n </div>\n <div className='icon'>\n {\n suffix\n }\n </div>\n </div>\n )\n }\n}"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.productSearchInput{
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
border: 1px solid #a49f9f;
|
|
6
|
+
border-radius: 3px;
|
|
7
|
+
min-width: 300px;
|
|
8
|
+
|
|
9
|
+
.input{
|
|
10
|
+
width: 90%;
|
|
11
|
+
input {
|
|
12
|
+
width: 100%;
|
|
13
|
+
font-size: 15px;
|
|
14
|
+
height: 32px;
|
|
15
|
+
line-height: 32px;
|
|
16
|
+
border: 0;
|
|
17
|
+
padding: 3px 5px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.icon{
|
|
21
|
+
width: 10%;
|
|
22
|
+
text-align: right;
|
|
23
|
+
padding-right: 5px;
|
|
24
|
+
i{
|
|
25
|
+
font-size: 20px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -39,6 +39,8 @@ var _react2 = _interopRequireDefault(_react);
|
|
|
39
39
|
|
|
40
40
|
var _mutantsMicrofx = require('mutants-microfx');
|
|
41
41
|
|
|
42
|
+
var _mutantsUtil = require('mutants-util');
|
|
43
|
+
|
|
42
44
|
var _index = require('../../index');
|
|
43
45
|
|
|
44
46
|
var _api = require('./api');
|
|
@@ -96,6 +98,12 @@ var Tab = (0, _mutantsMicrofx.observer)(_class = function (_React$Component) {
|
|
|
96
98
|
}
|
|
97
99
|
};
|
|
98
100
|
|
|
101
|
+
_this2.loadingIcon = function () {
|
|
102
|
+
var theme = _mutantsUtil.localStore.get('theme');
|
|
103
|
+
var img = 'https://newretail.static.chanjet.com/bc_pos/loading' + (theme == 'blue' || theme == 'dark' ? '2' : '') + '.gif';
|
|
104
|
+
return _react2.default.createElement('img', { src: img, style: { width: '150px', height: '150px' } });
|
|
105
|
+
};
|
|
106
|
+
|
|
99
107
|
_this2.state = {
|
|
100
108
|
activePage: 1,
|
|
101
109
|
emptyHeight: 200,
|
|
@@ -209,7 +217,6 @@ var Tab = (0, _mutantsMicrofx.observer)(_class = function (_React$Component) {
|
|
|
209
217
|
}
|
|
210
218
|
});
|
|
211
219
|
}
|
|
212
|
-
var loadingIcon = _react2.default.createElement('img', { src: 'https://newretail.static.chanjet.com/loading.gif', style: { width: '200px', height: '189px' } });
|
|
213
220
|
return _react2.default.createElement(
|
|
214
221
|
'div',
|
|
215
222
|
{ ref: function ref(dom) {
|
|
@@ -222,7 +229,7 @@ var Tab = (0, _mutantsMicrofx.observer)(_class = function (_React$Component) {
|
|
|
222
229
|
scroll: { y: "calc(~'100% - 43px')" },
|
|
223
230
|
loading: {
|
|
224
231
|
spinning: loading,
|
|
225
|
-
indicator: loadingIcon
|
|
232
|
+
indicator: this.loadingIcon()
|
|
226
233
|
},
|
|
227
234
|
pagination: false,
|
|
228
235
|
rowClassName: this.getRowClassName,
|
|
@@ -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,e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,mBAAS;AACPC,sBAAU5B,OADH;AAEP6B,uBAAWL;AAFJ,WAJX;AAQE,sBAAY,KARd;AASE,wBAAc,KAAKzC,eATrB;AAUE,iBAAO,eAACb,MAAD,EAASC,KAAT,EAAmB;AACxB,mBAAO;AACL2D,uBAAS;AAAA,uBAAM,OAAK7D,UAAL,CAAgBC,MAAhB,EAAwBC,KAAxB,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';\nimport { Table } from 'antd';\nimport { observer } from 'mutants-microfx';\nimport { Page, ProgressState } from '../../index';\nimport InventorySearchApi from './api';\nimport tools from '../../util/tools';\n\n@observer\nexport default class Tab extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n activePage: 1,\n emptyHeight: 200,\n selectedRowIndex: -1\n };\n }\n componentDidMount() {\n this.setTableHeight();\n this.windowEvent = this.setTableHeight.bind(this);\n window.addEventListener('resize', this.windowEvent);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.windowEvent);\n }\n\n setTableHeight() {\n let _this = this;\n setTimeout(() => {\n let height = Number(_this.tabDom.clientHeight - 200);\n _this.setState({ tableHeight: height })\n }, 0)\n }\n\n onRowClick = (record, index) => {\n this.props.onRowClick && this.props.onRowClick(record, this.props.type)\n this.setState({ selectedRowIndex: index })\n }\n\n resetPageNo = () => {\n this.setState({\n activePage: 1\n })\n }\n\n previous = () => {\n this.setState({\n activePage: this.state.activePage - 1\n }, () => {\n this.props.store.searchMore(this.props.searchValue, this.state.activePage, 15, this.props.type)\n })\n }\n\n next = () => {\n this.setState({\n activePage: this.state.activePage + 1\n }, () => {\n this.props.store.searchMore(this.props.searchValue, this.state.activePage, 15, this.props.type)\n })\n }\n getRowClassName = (record, index) => {\n const { selectedRowIndex } = this.state;\n if (selectedRowIndex == index) {\n return 'row-selected'\n } else {\n return '';\n }\n }\n render() {\n let { activePage } = this.state;\n let { dataSource, TotalPage, loading, type,searchDesigns } = this.props;\n const columns = searchDesigns.map(item => {\n let { OriginalTitle, FieldName, Precision, IsFormat } = item || {};\n let newItem = {\n title: OriginalTitle,\n width: 100,\n dataIndex: FieldName,\n key: FieldName,\n Precision: Precision,\n IsFormat: IsFormat,\n ellipsis: true,\n }\n switch (FieldName) {\n case 'InventoryName':\n newItem.width = 160;\n newItem.render = (text, record, index) => {\n return <div className='text-2line-overflow'>{text}</div>\n }\n break;\n case 'InventoryCode': newItem.width = 160; break;\n case 'ExistingBaseQuantity': newItem.width = 80; break;\n }\n if ((Precision || Precision == 0) && IsFormat) {\n newItem.render = (text, record, index) => {\n let renderText = InventorySearchApi.formatNumber(text, Precision);\n return <span>{renderText}</span>\n }\n }\n if (FieldName == 'ProductionDate' || FieldName == 'ExpiryDate') {\n newItem.render = (text, record, index) => {\n let renderText = tools.dateFormat(text);\n return <span>{renderText}</span>\n }\n }\n return newItem;\n })\n // 周边门店 要显示门店名称\n if (type == '2') {\n columns.unshift({\n title: '门店名称',\n width: 120,\n dataIndex: 'WarehouseName',\n key: 'WarehouseName',\n fixed: 'left',\n render: (text, record, index) => {\n return <div className='text-2line-overflow'>{text}</div>\n }\n })\n }\n let loadingIcon = <img src='https://newretail.static.chanjet.com/loading.gif' style={{ width: '200px', height: '189px' }} />;\n return (\n <div ref={(dom) => { this.tabDom = dom }}\n className={`${dataSource && dataSource.length > 0 ? 'inventoryTable' : ''} inventory-tab ${type == '2' ? 'table2' : 'table1'}`}>\n {\n dataSource && dataSource.length > 0 ?\n <Table\n columns={columns}\n dataSource={dataSource}\n scroll={{ y: \"calc(~'100% - 43px')\" }}\n loading={{\n spinning: loading,\n indicator: loadingIcon\n }}\n pagination={false}\n rowClassName={this.getRowClassName}\n onRow={(record, index) => {\n return {\n onClick: () => this.onRowClick(record, index)\n }\n }} />\n :\n <ProgressState\n state={loading? 'load': \"empty\"}\n stateCommonStyle={{ height: \"100%\" }}\n empty={{ info: '暂无数据~~', buttonVisible: false }} />\n }\n {!(TotalPage == 0 || !TotalPage) && <div className=\"primary-color\" style={{ fontSize: '13px'}}>温馨提示:点击选中该行商品可直接带入至开单页</div>}\n <Page\n total={TotalPage}\n currentIndex={activePage}\n previous={this.previous}\n next={this.next}\n className='inventory-page'\n />\n </div>\n )\n }\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","loadingIcon","theme","localStore","get","img","width","height","emptyHeight","setTableHeight","windowEvent","bind","window","addEventListener","removeEventListener","_this","setTimeout","Number","tabDom","clientHeight","tableHeight","dataSource","TotalPage","loading","searchDesigns","columns","map","item","OriginalTitle","FieldName","Precision","IsFormat","newItem","title","dataIndex","key","ellipsis","render","text","renderText","InventorySearchApi","formatNumber","tools","dateFormat","unshift","fixed","dom","length","y","spinning","indicator","onClick","info","buttonVisible","fontSize","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AAEA;;AACA;;AACA;;AACA;;;;AACA;;;;;;IAGqBA,G,OADpBC,wB;;;AAEC,eAAYC,KAAZ,E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AmC;AAAA;AAAA,YAAK,WAAU,eAAf,EAA+B,OAAO,EAAEgC,UAAU,MAAZ,EAAtC;AAAA;AAAA,SAzBtC;AA0BE,sCAAC,WAAD;AACE,iBAAOhC,SADT;AAEE,wBAAc7B,UAFhB;AAGE,oBAAU,KAAKC,QAHjB;AAIE,gBAAM,KAAKK,IAJb;AAKE,qBAAU;AALZ;AA1BF,OADF;AAoCD;;;EA7J8BwD,gBAAMC,S;;kBAAlBzE,G","file":"tab.js","sourcesContent":["import React from 'react';\nimport { Table } from 'antd';\nimport { observer } from 'mutants-microfx';\nimport { localStore } from 'mutants-util';\nimport { Page, ProgressState } from '../../index';\nimport InventorySearchApi from './api';\nimport tools from '../../util/tools';\n\n@observer\nexport default class Tab extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n activePage: 1,\n emptyHeight: 200,\n selectedRowIndex: -1\n };\n }\n componentDidMount() {\n this.setTableHeight();\n this.windowEvent = this.setTableHeight.bind(this);\n window.addEventListener('resize', this.windowEvent);\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.windowEvent);\n }\n\n setTableHeight() {\n let _this = this;\n setTimeout(() => {\n let height = Number(_this.tabDom.clientHeight - 200);\n _this.setState({ tableHeight: height })\n }, 0)\n }\n\n onRowClick = (record, index) => {\n this.props.onRowClick && this.props.onRowClick(record, this.props.type)\n this.setState({ selectedRowIndex: index })\n }\n\n resetPageNo = () => {\n this.setState({\n activePage: 1\n })\n }\n\n previous = () => {\n this.setState({\n activePage: this.state.activePage - 1\n }, () => {\n this.props.store.searchMore(this.props.searchValue, this.state.activePage, 15, this.props.type)\n })\n }\n\n next = () => {\n this.setState({\n activePage: this.state.activePage + 1\n }, () => {\n this.props.store.searchMore(this.props.searchValue, this.state.activePage, 15, this.props.type)\n })\n }\n getRowClassName = (record, index) => {\n const { selectedRowIndex } = this.state;\n if (selectedRowIndex == index) {\n return 'row-selected'\n } else {\n return '';\n }\n }\n\n loadingIcon = () => {\n const theme = localStore.get('theme');\n const img = `https://newretail.static.chanjet.com/bc_pos/loading${(theme == 'blue' || theme == 'dark') ? '2' : ''}.gif`;\n return (\n <img src={img} style={{ width: '150px', height: '150px' }} />\n )\n }\n\n render() {\n let { activePage } = this.state;\n let { dataSource, TotalPage, loading, type,searchDesigns } = this.props;\n const columns = searchDesigns.map(item => {\n let { OriginalTitle, FieldName, Precision, IsFormat } = item || {};\n let newItem = {\n title: OriginalTitle,\n width: 100,\n dataIndex: FieldName,\n key: FieldName,\n Precision: Precision,\n IsFormat: IsFormat,\n ellipsis: true,\n }\n switch (FieldName) {\n case 'InventoryName':\n newItem.width = 160;\n newItem.render = (text, record, index) => {\n return <div className='text-2line-overflow'>{text}</div>\n }\n break;\n case 'InventoryCode': newItem.width = 160; break;\n case 'ExistingBaseQuantity': newItem.width = 80; break;\n }\n if ((Precision || Precision == 0) && IsFormat) {\n newItem.render = (text, record, index) => {\n let renderText = InventorySearchApi.formatNumber(text, Precision);\n return <span>{renderText}</span>\n }\n }\n if (FieldName == 'ProductionDate' || FieldName == 'ExpiryDate') {\n newItem.render = (text, record, index) => {\n let renderText = tools.dateFormat(text);\n return <span>{renderText}</span>\n }\n }\n return newItem;\n })\n // 周边门店 要显示门店名称\n if (type == '2') {\n columns.unshift({\n title: '门店名称',\n width: 120,\n dataIndex: 'WarehouseName',\n key: 'WarehouseName',\n fixed: 'left',\n render: (text, record, index) => {\n return <div className='text-2line-overflow'>{text}</div>\n }\n })\n }\n return (\n <div ref={(dom) => { this.tabDom = dom }}\n className={`${dataSource && dataSource.length > 0 ? 'inventoryTable' : ''} inventory-tab ${type == '2' ? 'table2' : 'table1'}`}>\n {\n dataSource && dataSource.length > 0 ?\n <Table\n columns={columns}\n dataSource={dataSource}\n scroll={{ y: \"calc(~'100% - 43px')\" }}\n loading={{\n spinning: loading,\n indicator: this.loadingIcon()\n }}\n pagination={false}\n rowClassName={this.getRowClassName}\n onRow={(record, index) => {\n return {\n onClick: () => this.onRowClick(record, index)\n }\n }} />\n :\n <ProgressState\n state={loading? 'load': \"empty\"}\n stateCommonStyle={{ height: \"100%\" }}\n empty={{ info: '暂无数据~~', buttonVisible: false }} />\n }\n {!(TotalPage == 0 || !TotalPage) && <div className=\"primary-color\" style={{ fontSize: '13px'}}>温馨提示:点击选中该行商品可直接带入至开单页</div>}\n <Page\n total={TotalPage}\n currentIndex={activePage}\n previous={this.previous}\n next={this.next}\n className='inventory-page'\n />\n </div>\n )\n }\n}"]}
|
|
@@ -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;;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MAAF,EAAV,GAAuE,EAAtF;AACA,aACE;AAAA;AAAA,UAAK,WAAWK,cAAhB,EAAgC,OAAO,sBAAcE,WAAd,EAA2BE,aAA3B,EAA0Cf,KAA1C,EAAiDkB,MAAjD,CAAvC;AACE;AAAA;AAAA,YAAK,sCAAmCX,iBAAiB,IAAjB,GAAwB,yBAAxB,GAAoD,EAAvF,CAAL;AACG,qCAAeL,IAAf,IAAuBA,IAAvB,GAA8BQ;AADjC;AADF,OADF;AAOD;;;EA3GyBS,gB,UACnBC,S,GAAY;AACjBnB,QAAMoB,oBAAUC,MADC;AAEjBnB,aAAWkB,oBAAUC,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';\nimport { Progress } from 'antd';\nimport { localStore } from 'mutants-util';\nimport PropTypes from 'prop-types';\nimport './style.less';\n\nclass LoaingContent extends Component {\n static propTypes = {\n text: PropTypes.string,\n className: PropTypes.string,\n style: PropTypes.object,\n node: PropTypes.element,\n onClose: PropTypes.func,\n duration: PropTypes.number,\n target: PropTypes.string\n };\n\n static defaultProps = {\n onClose() {},\n className: '',\n style: {},\n text: '加载中,请稍后...',\n };\n\n state = {\n closeAnimate: false,\n percent: 0,\n title: ''\n };\n\n componentDidMount() {\n if (typeof this.props.duration === 'number') {\n this.startLoadingTimer();\n }\n }\n\n componentWillUnmount() {\n this.clearCloseTimer();\n }\n\n readyClose = (e) => {\n this.setState({closeAnimate: true}, () => {\n setTimeout(() => {\n this.close();\n }, 250)\n })\n }\n\n close = (e) => {\n if (e) {\n e.stopPropagation();\n }\n this.clearCloseTimer();\n this.props.onClose();\n }\n\n startLoadingTimer = () => {\n this.closeTimer = setTimeout(() => {\n this.readyClose();\n }, this.props.duration);\n }\n\n clearCloseTimer = () => {\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n setPercent = (params) => {\n const { percent, title } = params\n this.setState({ percent, title })\n }\n\n getLoadingIcon = () => {\n const theme = localStore.get('theme');\n const img = `https://newretail.static.chanjet.com/bc_pos/loading${(theme == 'blue' || theme == 'dark') ? '2' : ''}.gif`;\n return img;\n }\n\n render() {\n const { style, text, node, className, target, delay, opacity, showProgress } = this.props;\n const { closeAnimate, percent, title } = this.state;\n const showTip = text !== false;\n const tip = opacity ? 'tplus-loading-tip-color' : '';\n const loadingNode = (\n <Fragment>\n <div className='tplus-loading-spinner'>\n {\n showProgress === true ?\n <Progress strokeLinecap=\"square\" percent={percent} />\n :\n <div className='shadows'>\n <img src={this.getLoadingIcon()} className='default-spinner-gif' />\n </div>\n }\n </div>\n {\n showTip && <p className={`tplus-loading-tip ${tip}`}>{showProgress === true ? `档案数据【${title}】下载中` : text}</p>\n }\n </Fragment>\n );\n const containerClass = `tplus-loading ${closeAnimate ? 'loading-close-animate' : ''} ${className}`.trim();\n const targetStyle = target ? {position: 'absolute'} : {};\n const delayDuration = delay ? {animation: `loading-delay-animation ${delay}ms`, WebkitAnimation: `loading-delay-animation ${delay}ms`} : {};\n const style2 = opacity ? { 'background-color': `rgba(2555, 255, 255, ${opacity})` } : {};\n return (\n <div className={containerClass} style={Object.assign(targetStyle, delayDuration, style, style2)}>\n <div className={`tplus-loading-content${showProgress === true ? ' tplus-loading-progress' : ''}`}>\n {isValidElement(node) ? node : loadingNode}\n </div>\n </div>\n );\n }\n}\n\nexport default LoaingContent;\n"]}
|
|
@@ -20,11 +20,17 @@
|
|
|
20
20
|
text-align: center;
|
|
21
21
|
margin-bottom: 20px;
|
|
22
22
|
.default-spinner-gif{
|
|
23
|
-
display: block;
|
|
24
23
|
width: 150px;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
height: 150px;
|
|
25
|
+
}
|
|
26
|
+
.shadows{
|
|
27
|
+
width: 150px;
|
|
28
|
+
height: 150px;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
// box-shadow: 0px 0px 15px 5px rgba(51, 51, 51, 0.08);
|
|
28
34
|
}
|
|
29
35
|
}
|
|
30
36
|
.tplus-loading-tip{
|
|
@@ -32,6 +38,9 @@
|
|
|
32
38
|
font-size: 13px;
|
|
33
39
|
text-align: center;
|
|
34
40
|
}
|
|
41
|
+
.tplus-loading-tip-color{
|
|
42
|
+
color: #333;
|
|
43
|
+
}
|
|
35
44
|
.closeAnimate{
|
|
36
45
|
._tplus-animation-ease_;
|
|
37
46
|
background-color: #01AAED !important;
|
|
@@ -1859,7 +1859,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1859
1859
|
|
|
1860
1860
|
if (this.amount > 0 && (v === '' || v === '0.00') && sum !== 0) {
|
|
1861
1861
|
this.currentMode.errinfo = "实收金额必须录入";
|
|
1862
|
-
} else if (Math.abs(parseFloat(v)) > Math.abs(sum)) {
|
|
1862
|
+
} else if (Math.abs(parseFloat(v)) > Math.abs((0, _utils.getFixedNumber)(sum))) {
|
|
1863
1863
|
this.currentMode.errinfo = "实收不应大于应收";
|
|
1864
1864
|
} else if (parseFloat(v) > 0 && parseFloat(v) > (max || 0)) {
|
|
1865
1865
|
this.currentMode.errinfo = "余额不足";
|