tplus-components-touch 3.44.2 → 3.45.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.
Files changed (66) hide show
  1. package/dist/components/message/index.js +3 -4
  2. package/dist/components/message/index.js.map +1 -1
  3. package/dist/components/modalWraper/index.js +16 -1
  4. package/dist/components/modalWraper/index.js.map +1 -1
  5. package/dist/components/modalWraper/style.less +6 -0
  6. package/dist/components/settlement/asyncModal.js +4 -1
  7. package/dist/components/settlement/asyncModal.js.map +1 -1
  8. package/dist/components/settlement/settlement.js +274 -216
  9. package/dist/components/settlement/settlement.js.map +1 -1
  10. package/dist/components/settlement/settlement.less +3 -0
  11. package/dist/components/settlement/settlementApi.js +512 -0
  12. package/dist/components/settlement/settlementApi.js.map +1 -0
  13. package/dist/components/ticon/iconfont/demo.css +539 -539
  14. package/dist/index.js +8 -3
  15. package/dist/index.js.map +1 -1
  16. package/package.json +35 -35
  17. package/dist/components/commonForm/addressPicker/index.js +0 -241
  18. package/dist/components/commonForm/addressPicker/index.js.map +0 -1
  19. package/dist/components/commonForm/autoComplete/index.js +0 -260
  20. package/dist/components/commonForm/autoComplete/index.js.map +0 -1
  21. package/dist/components/commonForm/datePicker/index.js +0 -92
  22. package/dist/components/commonForm/datePicker/index.js.map +0 -1
  23. package/dist/components/commonForm/formControl/index.js +0 -144
  24. package/dist/components/commonForm/formControl/index.js.map +0 -1
  25. package/dist/components/commonForm/inputNumber/index.js +0 -272
  26. package/dist/components/commonForm/inputNumber/index.js.map +0 -1
  27. package/dist/components/commonForm/radio/index.js +0 -132
  28. package/dist/components/commonForm/radio/index.js.map +0 -1
  29. package/dist/components/input/tplusInput/index.js +0 -81
  30. package/dist/components/input/tplusInput/index.js.map +0 -1
  31. package/dist/components/input/tplusInput/inputContent.js +0 -128
  32. package/dist/components/input/tplusInput/inputContent.js.map +0 -1
  33. package/dist/components/input/tplusInput/inputs.js +0 -151
  34. package/dist/components/input/tplusInput/inputs.js.map +0 -1
  35. package/dist/components/input/utils/index.js +0 -26
  36. package/dist/components/input/utils/index.js.map +0 -1
  37. package/dist/components/settlement/moreCzkTable/index.js +0 -156
  38. package/dist/components/settlement/moreCzkTable/index.js.map +0 -1
  39. package/dist/components/settlement/prototypeTable/index.js +0 -353
  40. package/dist/components/settlement/prototypeTable/index.js.map +0 -1
  41. package/dist/components/settlement/prototypeTable/utils.js +0 -14
  42. package/dist/components/settlement/prototypeTable/utils.js.map +0 -1
  43. package/dist/components/settlement/settlementStore.js +0 -2816
  44. package/dist/components/settlement/settlementStore.js.map +0 -1
  45. package/dist/components/settlement/utils.js +0 -249
  46. package/dist/components/settlement/utils.js.map +0 -1
  47. package/dist/components/socket/index.js +0 -221
  48. package/dist/components/socket/index.js.map +0 -1
  49. package/dist/components/spin/index.js +0 -95
  50. package/dist/components/spin/index.js.map +0 -1
  51. package/dist/components/test/index.js +0 -330
  52. package/dist/components/test/index.js.map +0 -1
  53. package/dist/components/ticon/iconfont/iconfont.js +0 -35
  54. package/dist/components/ticon/iconfont/iconfont.js.map +0 -1
  55. package/dist/components/ticon/index.js +0 -60
  56. package/dist/components/ticon/index.js.map +0 -1
  57. package/dist/components/touchScroll/index.js +0 -186
  58. package/dist/components/touchScroll/index.js.map +0 -1
  59. package/dist/components/touchTable/AuthProcess.js +0 -42
  60. package/dist/components/touchTable/AuthProcess.js.map +0 -1
  61. package/dist/components/touchTable/generateWater.js +0 -59
  62. package/dist/components/touchTable/generateWater.js.map +0 -1
  63. package/dist/components/touchTable/index.js +0 -1135
  64. package/dist/components/touchTable/index.js.map +0 -1
  65. package/dist/components/touchTable/utils.js +0 -14
  66. package/dist/components/touchTable/utils.js.map +0 -1
@@ -1,156 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = undefined;
7
-
8
- var _table = require('antd/es/table');
9
-
10
- var _table2 = _interopRequireDefault(_table);
11
-
12
- var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
13
-
14
- var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
15
-
16
- var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
17
-
18
- var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
19
-
20
- var _createClass2 = require('babel-runtime/helpers/createClass');
21
-
22
- var _createClass3 = _interopRequireDefault(_createClass2);
23
-
24
- var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
25
-
26
- var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
27
-
28
- var _inherits2 = require('babel-runtime/helpers/inherits');
29
-
30
- var _inherits3 = _interopRequireDefault(_inherits2);
31
-
32
- var _class;
33
-
34
- require('antd/es/table/style');
35
-
36
- var _react = require('react');
37
-
38
- var _react2 = _interopRequireDefault(_react);
39
-
40
- var _mutantsMicrofx = require('mutants-microfx');
41
-
42
- require('./style.less');
43
-
44
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
45
-
46
- var PrototypeTableModal = (0, _mutantsMicrofx.observer)(_class = function (_Component) {
47
- (0, _inherits3.default)(PrototypeTableModal, _Component);
48
-
49
- function PrototypeTableModal() {
50
- var _ref;
51
-
52
- var _temp, _this, _ret;
53
-
54
- (0, _classCallCheck3.default)(this, PrototypeTableModal);
55
-
56
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
57
- args[_key] = arguments[_key];
58
- }
59
-
60
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PrototypeTableModal.__proto__ || (0, _getPrototypeOf2.default)(PrototypeTableModal)).call.apply(_ref, [this].concat(args))), _this), _this.getRowClassName = function (record, index) {
61
- var selectedRowIndex = _this.props.selectedRowIndex;
62
-
63
- if (selectedRowIndex == index) {
64
- return 'row-selected';
65
- } else {
66
- return '';
67
- }
68
- }, _this.onRowClick = function (record, index) {
69
- _this.props.setMoreCzkIndex(index);
70
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
71
- }
72
-
73
- (0, _createClass3.default)(PrototypeTableModal, [{
74
- key: 'getColumns',
75
- value: function getColumns(data1) {
76
- // 卡类型
77
- var cardTypeEnumList = {
78
- BALANCE_CARD: "余额卡",
79
- ELEC_STORAGE_CARD: "电子储值卡",
80
- STORAGE_CARD: "储值卡",
81
- PHYSICAL_STORAGE_CARD: "实体储值卡"
82
- };
83
- var columns = [{
84
- title: '卡号',
85
- dataIndex: 'StorageCardNo',
86
- key: 'StorageCardNo',
87
- ellipsis: true,
88
- align: 'center',
89
- width: 200
90
- }, {
91
- title: '卡类型',
92
- dataIndex: 'CardTypeEnum',
93
- key: 'CardTypeEnum',
94
- ellipsis: true,
95
- align: 'center',
96
- width: 120,
97
- render: function render(showText) {
98
- return _react2.default.createElement(
99
- 'div',
100
- null,
101
- cardTypeEnumList[showText]
102
- );
103
- }
104
- }, {
105
- title: '会员手机号',
106
- dataIndex: 'MemberMobile',
107
- key: 'MemberMobile',
108
- ellipsis: true,
109
- align: 'center',
110
- width: 120
111
- }, {
112
- title: '会员',
113
- dataIndex: 'MemberName',
114
- key: 'MemberName',
115
- ellipsis: true,
116
- align: 'center',
117
- width: 160
118
- }, {
119
- title: '余额',
120
- dataIndex: 'BalanceStorage',
121
- key: 'BalanceStorage',
122
- ellipsis: true,
123
- align: 'center',
124
- width: 160
125
- }];
126
- return columns;
127
- }
128
- }, {
129
- key: 'render',
130
- value: function render() {
131
- var _this2 = this;
132
-
133
- var dataSource = this.props.dataSource;
134
-
135
- var columns = this.getColumns(dataSource);
136
- return _react2.default.createElement(_table2.default, {
137
- className: 'moreCzkTable',
138
- dataSource: dataSource,
139
- columns: columns,
140
- rowClassName: this.getRowClassName,
141
- scroll: { y: 257 },
142
- pagination: false,
143
- onRow: function onRow(record, index) {
144
- return {
145
- onClick: function onClick() {
146
- return _this2.onRowClick(record, index);
147
- }
148
- };
149
- } });
150
- }
151
- }]);
152
- return PrototypeTableModal;
153
- }(_react.Component)) || _class;
154
-
155
- exports.default = PrototypeTableModal;
156
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["tplus-components-touch/components/settlement/moreCzkTable/index.js"],"names":["PrototypeTableModal","observer","getRowClassName","record","index","selectedRowIndex","props","onRowClick","setMoreCzkIndex","data1","cardTypeEnumList","BALANCE_CARD","ELEC_STORAGE_CARD","STORAGE_CARD","PHYSICAL_STORAGE_CARD","columns","title","dataIndex","key","ellipsis","align","width","render","showText","dataSource","getColumns","y","onClick","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AAEA;;;;IAGqBA,mB,OADpBC,wB;;;;;;;;;;;;;;sOA4DCC,e,GAAkB,UAACC,MAAD,EAASC,KAAT,EAAmB;AAAA,UAC3BC,gBAD2B,GACN,MAAKC,KADC,CAC3BD,gBAD2B;;AAEnC,UAAIA,oBAAoBD,KAAxB,EAA+B;AAC7B,eAAO,cAAP;AACD,OAFD,MAEO;AACL,eAAO,EAAP;AACD;AACF,K,QAEDG,U,GAAa,UAACJ,MAAD,EAASC,KAAT,EAAmB;AAC9B,YAAKE,KAAL,CAAWE,eAAX,CAA2BJ,KAA3B;AACD,K;;;;;+BArEUK,K,EAAO;AACd;AACF,UAAMC,mBAAmB;AACrBC,sBAAc,KADO;AAErBC,2BAAmB,OAFE;AAGrBC,sBAAc,KAHO;AAIrBC,+BAAuB;AAJF,OAAzB;AAMA,UAAIC,UAAU,CACZ;AACEC,eAAO,IADT;AAEEC,mBAAW,eAFb;AAGEC,aAAK,eAHP;AAIEC,kBAAU,IAJZ;AAKEC,eAAO,QALT;AAMEC,eAAO;AANT,OADY,EASZ;AACEL,eAAO,KADT;AAEEC,mBAAW,cAFb;AAGEC,aAAK,cAHP;AAIEC,kBAAU,IAJZ;AAKEC,eAAO,QALT;AAMEC,eAAO,GANT;AAOEC,gBAAQ,gBAACC,QAAD,EAAc;AAClB,iBACI;AAAA;AAAA;AAAMb,6BAAiBa,QAAjB;AAAN,WADJ;AAGD;AAXL,OATY,EAsBZ;AACEP,eAAO,OADT;AAEEC,mBAAW,cAFb;AAGEC,aAAK,cAHP;AAIEC,kBAAU,IAJZ;AAKEC,eAAO,QALT;AAMEC,eAAO;AANT,OAtBY,EA8BZ;AACEL,eAAO,IADT;AAEEC,mBAAW,YAFb;AAGEC,aAAK,YAHP;AAIEC,kBAAU,IAJZ;AAKEC,eAAO,QALT;AAMEC,eAAO;AANT,OA9BY,EAsCZ;AACEL,eAAO,IADT;AAEEC,mBAAW,gBAFb;AAGEC,aAAK,gBAHP;AAIEC,kBAAU,IAJZ;AAKEC,eAAO,QALT;AAMEC,eAAO;AANT,OAtCY,CAAd;AA+CA,aAAON,OAAP;AACD;;;6BAeQ;AAAA;;AAAA,UACCS,UADD,GACe,KAAKlB,KADpB,CACCkB,UADD;;AAEP,UAAIT,UAAU,KAAKU,UAAL,CAAgBD,UAAhB,CAAd;AACA,aACI;AACA,mBAAU,cADV;AAEA,oBAAYA,UAFZ;AAGA,iBAAST,OAHT;AAIA,sBAAc,KAAKb,eAJnB;AAKA,gBAAQ,EAAEwB,GAAG,GAAL,EALR;AAMA,oBAAY,KANZ;AAOA,eAAO,eAACvB,MAAD,EAASC,KAAT,EAAmB;AACtB,iBAAO;AACHuB,qBAAS;AAAA,qBAAM,OAAKpB,UAAL,CAAgBJ,MAAhB,EAAwBC,KAAxB,CAAN;AAAA;AADN,WAAP;AAGH,SAXD,GADJ;AAcD;;;EAzF8CwB,gB;;kBAA5B5B,mB","file":"index.js","sourcesContent":["import React, { Component } from 'react';\r\nimport { observer } from \"mutants-microfx\"\r\nimport { Table } from 'antd';\r\nimport './style.less';\r\n\r\n@observer\r\nexport default class PrototypeTableModal extends Component {\r\n getColumns(data1) {\r\n // 卡类型\r\n const cardTypeEnumList = {\r\n BALANCE_CARD: \"余额卡\", \r\n ELEC_STORAGE_CARD: \"电子储值卡\",\r\n STORAGE_CARD: \"储值卡\",\r\n PHYSICAL_STORAGE_CARD: \"实体储值卡\"\r\n }\r\n let columns = [\r\n {\r\n title: '卡号',\r\n dataIndex: 'StorageCardNo',\r\n key: 'StorageCardNo',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 200,\r\n },\r\n {\r\n title: '卡类型',\r\n dataIndex: 'CardTypeEnum',\r\n key: 'CardTypeEnum',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 120,\r\n render: (showText) => {\r\n return (\r\n <div>{cardTypeEnumList[showText]}</div>\r\n )\r\n }\r\n },\r\n {\r\n title: '会员手机号',\r\n dataIndex: 'MemberMobile',\r\n key: 'MemberMobile',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 120,\r\n },\r\n {\r\n title: '会员',\r\n dataIndex: 'MemberName',\r\n key: 'MemberName',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 160,\r\n },\r\n {\r\n title: '余额',\r\n dataIndex: 'BalanceStorage',\r\n key: 'BalanceStorage',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 160,\r\n }\r\n ]\r\n return columns;\r\n }\r\n\r\n getRowClassName = (record, index) => {\r\n const { selectedRowIndex } = this.props;\r\n if (selectedRowIndex == index) {\r\n return 'row-selected'\r\n } else {\r\n return '';\r\n }\r\n }\r\n\r\n onRowClick = (record, index) => {\r\n this.props.setMoreCzkIndex(index)\r\n }\r\n\r\n render() {\r\n const {dataSource} = this.props;\r\n let columns = this.getColumns(dataSource);\r\n return (\r\n <Table\r\n className='moreCzkTable'\r\n dataSource={dataSource}\r\n columns={columns}\r\n rowClassName={this.getRowClassName}\r\n scroll={{ y: 257 }}\r\n pagination={false}\r\n onRow={(record, index) => {\r\n return {\r\n onClick: () => this.onRowClick(record, index)\r\n }\r\n }} ></Table>\r\n );\r\n }\r\n}\r\n"]}
@@ -1,353 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = undefined;
7
-
8
- var _table = require('antd/es/table');
9
-
10
- var _table2 = _interopRequireDefault(_table);
11
-
12
- var _button = require('antd/es/button');
13
-
14
- var _button2 = _interopRequireDefault(_button);
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 _class;
37
-
38
- require('antd/es/table/style');
39
-
40
- require('antd/es/button/style');
41
-
42
- var _react = require('react');
43
-
44
- var _react2 = _interopRequireDefault(_react);
45
-
46
- var _tplusComponentsTouch = require('tplus-components-touch');
47
-
48
- var _mutantsMicrofx = require('mutants-microfx');
49
-
50
- var _utils = require('./utils');
51
-
52
- var _utils2 = require('../utils');
53
-
54
- require('./style.less');
55
-
56
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
57
-
58
- var PrototypeTableModal = (0, _mutantsMicrofx.observer)(_class = function (_Component) {
59
- (0, _inherits3.default)(PrototypeTableModal, _Component);
60
-
61
- function PrototypeTableModal() {
62
- (0, _classCallCheck3.default)(this, PrototypeTableModal);
63
- return (0, _possibleConstructorReturn3.default)(this, (PrototypeTableModal.__proto__ || (0, _getPrototypeOf2.default)(PrototypeTableModal)).apply(this, arguments));
64
- }
65
-
66
- (0, _createClass3.default)(PrototypeTableModal, [{
67
- key: 'getColumns',
68
- value: function getColumns(data1) {
69
- var _this2 = this;
70
-
71
- var columns = [{
72
- title: '商品名称',
73
- dataIndex: 'InventoryName',
74
- key: 'InventoryName',
75
- align: 'center',
76
- width: 120,
77
- render: function render(showText, record, index) {
78
- // return (<span className='unitPrice'>{text}</span>)
79
- var _props = _this2.props,
80
- badge = _props.badge,
81
- _props$height = _props.height,
82
- height = _props$height === undefined ? 50 : _props$height;
83
- var _record$badge = record.badge;
84
- _record$badge = _record$badge === undefined ? {} : _record$badge;
85
- var text = _record$badge.text,
86
- _record$badge$positio = _record$badge.position,
87
- position = _record$badge$positio === undefined ? 'leftTop' : _record$badge$positio,
88
- _record$badge$classNa = _record$badge.className,
89
- className = _record$badge$classNa === undefined ? '' : _record$badge$classNa;
90
-
91
- var badgeClassName = _utils.badgeClassNames[position];
92
- var baseNum = position.includes('Bottom') ? 25 : 0;
93
- var style = {};
94
- // if (type === 'bee'){
95
- // style = {
96
- // top : baseNum + (height * index)
97
- // }
98
- // }
99
- return _react2.default.createElement(
100
- 'div',
101
- { className: 'tplus-table-badge' },
102
- _react2.default.createElement(
103
- 'div',
104
- { className: 'badge-item ' + className + ' ' + badgeClassName, style: style },
105
- _react2.default.createElement(
106
- 'span',
107
- null,
108
- text
109
- )
110
- ),
111
- _react2.default.createElement(
112
- 'div',
113
- { className: 'row-cell-div row-cell-pad', style: { width: '100%' } },
114
- showText
115
- )
116
- );
117
- }
118
- }, {
119
- title: '单位',
120
- dataIndex: 'UnitName',
121
- key: 'UnitName',
122
- ellipsis: true,
123
- align: 'center',
124
- width: 40
125
- }, {
126
- title: '数量',
127
- dataIndex: 'nQuantity',
128
- key: 'nQuantity',
129
- ellipsis: true,
130
- align: 'center',
131
- width: 70,
132
- render: function render(showText, record, index) {
133
- return _react2.default.createElement(
134
- 'div',
135
- { className: 'tplus-table-badge' },
136
- _react2.default.createElement(
137
- 'div',
138
- { className: 'row-cell-div row-cell-pad', style: { width: '100%' } },
139
- showText
140
- )
141
- );
142
- }
143
- }, {
144
- title: '零售价',
145
- dataIndex: 'nRetailPrice',
146
- key: 'nRetailPrice',
147
- ellipsis: true,
148
- align: 'center',
149
- width: 70,
150
- render: function render(showText, record, index) {
151
- return _react2.default.createElement(
152
- 'div',
153
- { className: 'tplus-table-badge' },
154
- _react2.default.createElement(
155
- 'div',
156
- { className: 'row-cell-div row-cell-pad', style: { width: '100%' } },
157
- showText
158
- )
159
- );
160
- }
161
- }, {
162
- title: '折扣额',
163
- dataIndex: 'Discount',
164
- key: 'Discount',
165
- ellipsis: true,
166
- align: 'center',
167
- width: 70,
168
- render: function render(text, record, index) {
169
- return _react2.default.createElement(
170
- 'span',
171
- { className: 'unitPrice row-cell-div' },
172
- text
173
- );
174
- }
175
- }, {
176
- title: '单价',
177
- dataIndex: 'nTaxPrice',
178
- key: 'nTaxPrice',
179
- ellipsis: true,
180
- align: 'center',
181
- width: 70,
182
- render: function render(showText, record, index) {
183
- return _react2.default.createElement(
184
- 'div',
185
- { className: 'tplus-table-badge' },
186
- _react2.default.createElement(
187
- 'div',
188
- { className: 'row-cell-div row-cell-pad', style: { width: '100%' } },
189
- showText
190
- )
191
- );
192
- }
193
- }, {
194
- title: '金额',
195
- dataIndex: 'nAmount',
196
- key: 'nAmount',
197
- ellipsis: true,
198
- align: 'center',
199
- width: 70,
200
- render: function render(showText, record, index) {
201
- return _react2.default.createElement(
202
- 'div',
203
- { className: 'tplus-table-badge' },
204
- _react2.default.createElement(
205
- 'div',
206
- { className: 'row-cell-div row-cell-pad', style: { width: '100%' } },
207
- showText
208
- )
209
- );
210
- }
211
- }, {
212
- title: '折扣额合计',
213
- dataIndex: 'TotalDiscount',
214
- key: 'TotalDiscount',
215
- ellipsis: true,
216
- align: 'center',
217
- width: 80,
218
- render: function render(showText, record, index) {
219
- return _react2.default.createElement(
220
- 'div',
221
- { className: 'tplus-table-badge' },
222
- _react2.default.createElement(
223
- 'div',
224
- { className: 'row-cell-div row-cell-pad', style: { width: '100%' } },
225
- (0, _utils2.getFixedNumber)(showText)
226
- )
227
- );
228
- }
229
- }];
230
-
231
- var data2 = data1.find(function (item) {
232
- return item.ShowFreeItem === true;
233
- });
234
- var obj = {
235
- title: '属性',
236
- dataIndex: 'FreeItem',
237
- key: 'FreeItem',
238
- ellipsis: true,
239
- align: 'center',
240
- width: 70,
241
- render: function render(showText, record, index) {
242
- return _react2.default.createElement(
243
- 'div',
244
- { className: 'tplus-table-badge' },
245
- _react2.default.createElement(
246
- 'div',
247
- { className: 'row-cell-div row-cell-pad', style: { width: '100%' } },
248
- showText
249
- )
250
- );
251
- }
252
- };
253
- if (data2) {
254
- columns.splice(1, 0, obj);
255
- }
256
- return columns;
257
- }
258
- }, {
259
- key: 'render',
260
- value: function render() {
261
- var _props2 = this.props,
262
- prototypeVisible = _props2.prototypeVisible,
263
- discount = _props2.discount,
264
- dataSource = _props2.dataSource,
265
- handleprototypeCancel = _props2.handleprototypeCancel,
266
- isHorizontalPad = _props2.isHorizontalPad,
267
- isNotAutoFocus = _props2.isNotAutoFocus;
268
-
269
- var columns = this.getColumns(dataSource);
270
- return _react2.default.createElement(
271
- _tplusComponentsTouch.ModalWraper,
272
- {
273
- wrapClassName: 'protoWraper',
274
- width: '800px',
275
- show: prototypeVisible,
276
- maskClosable: false,
277
- onCancel: function onCancel() {
278
- return handleprototypeCancel();
279
- },
280
- centered: !isHorizontalPad ? true : false,
281
- title: "优惠明细",
282
- maskStyle: { 'z-index': '1007' },
283
- destroyOnClose: true,
284
- isNotAutoFocus: isNotAutoFocus,
285
- footer: _react2.default.createElement(
286
- 'div',
287
- { className: 'action' },
288
- _react2.default.createElement(
289
- 'span',
290
- { className: 'prototypeSummary primary-color' },
291
- '\u63D0\u793A\uFF1A\u4F18\u60E0\u4E0D\u5305\u542B\u8D60\u54C1'
292
- ),
293
- _react2.default.createElement(
294
- 'span',
295
- { className: 'prototypeSummary' },
296
- '\u4F18\u60E0\u524D',
297
- _react2.default.createElement(
298
- 'span',
299
- null,
300
- '\xA5',
301
- discount.discountRetailTotalAount
302
- )
303
- ),
304
- _react2.default.createElement(
305
- 'span',
306
- { className: 'prototypeSummary' },
307
- '\u4F18\u60E0',
308
- _react2.default.createElement(
309
- 'span',
310
- { className: 'unitPrice' },
311
- '\xA5',
312
- discount.discountPrototypeTotalAmount
313
- )
314
- ),
315
- _react2.default.createElement(
316
- 'span',
317
- { className: 'prototypeSummary' },
318
- '\u4F18\u60E0\u540E',
319
- _react2.default.createElement(
320
- 'span',
321
- { className: 'unitPrice' },
322
- '\xA5',
323
- discount.discountTotalAmount
324
- )
325
- ),
326
- _react2.default.createElement(
327
- _button2.default,
328
- { onClick: function onClick() {
329
- return handleprototypeCancel();
330
- } },
331
- '\u5173\u95ED'
332
- )
333
- )
334
- },
335
- _react2.default.createElement(
336
- 'div',
337
- { className: 'tableContainer' },
338
- _react2.default.createElement(_table2.default, {
339
- scroll: { y: 376 },
340
- className: 'table',
341
- columns: columns,
342
- pagination: false,
343
- dataSource: dataSource
344
- })
345
- )
346
- );
347
- }
348
- }]);
349
- return PrototypeTableModal;
350
- }(_react.Component)) || _class;
351
-
352
- exports.default = PrototypeTableModal;
353
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["tplus-components-touch/components/settlement/prototypeTable/index.js"],"names":["PrototypeTableModal","observer","data1","columns","title","dataIndex","key","align","width","render","showText","record","index","props","badge","height","text","position","className","badgeClassName","badgeClassNames","baseNum","includes","style","ellipsis","data2","find","item","ShowFreeItem","obj","splice","prototypeVisible","discount","dataSource","handleprototypeCancel","isHorizontalPad","isNotAutoFocus","getColumns","discountRetailTotalAount","discountPrototypeTotalAmount","discountTotalAmount","y","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;AAEA;;AACA;;AAEA;;;;IAGqBA,mB,OADpBC,wB;;;;;;;;;;+BAGYC,K,EAAO;AAAA;;AAChB,UAAIC,UAAU,CACZ;AACEC,eAAO,MADT;AAEEC,mBAAW,eAFb;AAGEC,aAAK,eAHP;AAIEC,eAAO,QAJT;AAKEC,eAAO,GALT;AAMEC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,uBAAU,OAFZ;AAGE,qBAAStC,OAHX;AAIE,wBAAY,KAJd;AAKE,wBAAY8B;AALd;AADF;AAnBF,OADJ;AA+BD;;;EAxL8CS,gB;;kBAA5B1C,mB","file":"index.js","sourcesContent":["import React, { Component } from 'react';\r\nimport { ModalWraper } from 'tplus-components-touch'\r\nimport { observer } from \"mutants-microfx\"\r\nimport { Table, Button } from 'antd';\r\nimport { badgeClassNames } from './utils'\r\nimport { getFixedNumber } from '../utils'\r\n\r\nimport './style.less';\r\n\r\n@observer\r\nexport default class PrototypeTableModal extends Component {\r\n\r\n getColumns(data1) {\r\n let columns = [\r\n {\r\n title: '商品名称',\r\n dataIndex: 'InventoryName',\r\n key: 'InventoryName',\r\n align: 'center',\r\n width: 120,\r\n render: (showText, record, index) => {\r\n // return (<span className='unitPrice'>{text}</span>)\r\n const { badge, height = 50 } = this.props;\r\n const { badge: { text, position = 'leftTop', className = '' } = {} } = record;\r\n const badgeClassName = badgeClassNames[position];\r\n const baseNum = position.includes('Bottom') ? 25 : 0;\r\n let style = {}\r\n // if (type === 'bee'){\r\n // style = {\r\n // top : baseNum + (height * index)\r\n // }\r\n // }\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className={`badge-item ${className} ${badgeClassName}`} style={style}><span>{text}</span></div>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '单位',\r\n dataIndex: 'UnitName',\r\n key: 'UnitName',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 40,\r\n },\r\n {\r\n title: '数量',\r\n dataIndex: 'nQuantity',\r\n key: 'nQuantity',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '零售价',\r\n dataIndex: 'nRetailPrice',\r\n key: 'nRetailPrice',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '折扣额',\r\n dataIndex: 'Discount',\r\n key: 'Discount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (text, record, index) => {\r\n return (<span className='unitPrice row-cell-div'>{text}</span>)\r\n }\r\n },\r\n {\r\n title: '单价',\r\n dataIndex: 'nTaxPrice',\r\n key: 'nTaxPrice',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '金额',\r\n dataIndex: 'nAmount',\r\n key: 'nAmount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n {\r\n title: '折扣额合计',\r\n dataIndex: 'TotalDiscount',\r\n key: 'TotalDiscount',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 80,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{getFixedNumber(showText)}</div>\r\n </div>\r\n )\r\n }\r\n },\r\n ]\r\n\r\n let data2 = data1.find((item) => {\r\n return item.ShowFreeItem === true;\r\n })\r\n let obj = {\r\n title: '属性',\r\n dataIndex: 'FreeItem',\r\n key: 'FreeItem',\r\n ellipsis: true,\r\n align: 'center',\r\n width: 70,\r\n render: (showText, record, index) => {\r\n return (\r\n <div className='tplus-table-badge'>\r\n <div className='row-cell-div row-cell-pad' style={{ width: '100%' }}>{showText}</div>\r\n </div>\r\n )\r\n }\r\n }\r\n if (data2) {\r\n columns.splice(1, 0, obj);\r\n }\r\n return columns;\r\n }\r\n\r\n render() {\r\n const {prototypeVisible,discount, dataSource, handleprototypeCancel, isHorizontalPad, isNotAutoFocus} = this.props;\r\n let columns = this.getColumns(dataSource);\r\n return (\r\n <ModalWraper\r\n wrapClassName={`protoWraper`}\r\n width=\"800px\"\r\n show={prototypeVisible}\r\n maskClosable={false}\r\n onCancel = { () => handleprototypeCancel() }\r\n centered={ !isHorizontalPad ? true : false}\r\n title={\"优惠明细\"}\r\n maskStyle={{'z-index': '1007'}}\r\n destroyOnClose={true}\r\n isNotAutoFocus={isNotAutoFocus}\r\n footer={<div className=\"action\">\r\n <span className='prototypeSummary primary-color'>提示:优惠不包含赠品</span>\r\n <span className='prototypeSummary'>优惠前<span>¥{discount.discountRetailTotalAount}</span></span>\r\n <span className='prototypeSummary'>优惠<span className='unitPrice'>¥{discount.discountPrototypeTotalAmount}</span></span>\r\n <span className='prototypeSummary'>优惠后<span className='unitPrice'>¥{discount.discountTotalAmount}</span></span>\r\n <Button onClick={() => handleprototypeCancel()}>关闭</Button>\r\n </div>}\r\n >\r\n <div className='tableContainer'>\r\n <Table \r\n scroll={{ y: 376 }}\r\n className='table'\r\n columns={columns}\r\n pagination={false}\r\n dataSource={dataSource}\r\n />\r\n </div>\r\n </ModalWraper>\r\n );\r\n }\r\n}\r\n"]}
@@ -1,14 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var badgeClassNames = {
7
- leftTop: 'badge-left-top',
8
- rightTop: 'badge-right-top',
9
- leftBottom: 'badge-left-bottom',
10
- rightBottom: 'badge-right-bottom'
11
- };
12
-
13
- exports.badgeClassNames = badgeClassNames;
14
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["tplus-components-touch/components/settlement/prototypeTable/utils.js"],"names":["badgeClassNames","leftTop","rightTop","leftBottom","rightBottom"],"mappings":";;;;;AAAA,IAAMA,kBAAkB;AACpBC,aAAS,gBADW;AAEpBC,cAAU,iBAFU;AAGpBC,gBAAY,mBAHQ;AAIpBC,iBAAa;AAJO,CAAxB;;QAOUJ,e,GAAAA,e","file":"utils.js","sourcesContent":["const badgeClassNames = {\r\n leftTop: 'badge-left-top',\r\n rightTop: 'badge-right-top',\r\n leftBottom: 'badge-left-bottom',\r\n rightBottom: 'badge-right-bottom',\r\n };\r\n \r\n export {badgeClassNames};"]}