tplus-components-touch 3.45.1 → 3.45.2
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/commonForm/addressPicker/index.js +241 -0
- package/dist/components/commonForm/addressPicker/index.js.map +1 -0
- package/dist/components/commonForm/autoComplete/index.js +260 -0
- package/dist/components/commonForm/autoComplete/index.js.map +1 -0
- package/dist/components/commonForm/datePicker/index.js +92 -0
- package/dist/components/commonForm/datePicker/index.js.map +1 -0
- package/dist/components/commonForm/formControl/index.js +144 -0
- package/dist/components/commonForm/formControl/index.js.map +1 -0
- package/dist/components/commonForm/inputNumber/index.js +272 -0
- package/dist/components/commonForm/inputNumber/index.js.map +1 -0
- package/dist/components/commonForm/radio/index.js +132 -0
- package/dist/components/commonForm/radio/index.js.map +1 -0
- package/dist/components/input/tplusInput/index.js +81 -0
- package/dist/components/input/tplusInput/index.js.map +1 -0
- package/dist/components/input/tplusInput/inputContent.js +128 -0
- package/dist/components/input/tplusInput/inputContent.js.map +1 -0
- package/dist/components/input/tplusInput/inputs.js +151 -0
- package/dist/components/input/tplusInput/inputs.js.map +1 -0
- package/dist/components/input/utils/index.js +26 -0
- package/dist/components/input/utils/index.js.map +1 -0
- package/dist/components/settlement/moreCzkTable/index.js +156 -0
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/index.js +353 -0
- package/dist/components/settlement/prototypeTable/index.js.map +1 -0
- package/dist/components/settlement/prototypeTable/utils.js +14 -0
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -0
- package/dist/components/settlement/settlementStore.js +2819 -0
- package/dist/components/settlement/settlementStore.js.map +1 -0
- package/dist/components/settlement/utils.js +249 -0
- package/dist/components/settlement/utils.js.map +1 -0
- package/dist/components/socket/index.js +221 -0
- package/dist/components/socket/index.js.map +1 -0
- package/dist/components/spin/index.js +95 -0
- package/dist/components/spin/index.js.map +1 -0
- package/dist/components/test/index.js +330 -0
- package/dist/components/test/index.js.map +1 -0
- package/dist/components/ticon/iconfont/iconfont.js +35 -0
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -0
- package/dist/components/ticon/index.js +60 -0
- package/dist/components/ticon/index.js.map +1 -0
- package/dist/components/touchScroll/index.js +186 -0
- package/dist/components/touchScroll/index.js.map +1 -0
- package/dist/components/touchTable/AuthProcess.js +42 -0
- package/dist/components/touchTable/AuthProcess.js.map +1 -0
- package/dist/components/touchTable/generateWater.js +59 -0
- package/dist/components/touchTable/generateWater.js.map +1 -0
- package/dist/components/touchTable/index.js +1140 -0
- package/dist/components/touchTable/index.js.map +1 -0
- package/dist/components/touchTable/utils.js +14 -0
- package/dist/components/touchTable/utils.js.map +1 -0
- package/package.json +1 -1
@@ -0,0 +1,353 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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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;AAAA;AAA8BP,yBAASQ;AAAvC;AAAtC,aAJM;AAKR;AAAA;AAAA,gBAAQ,SAAS;AAAA,yBAAMN,uBAAN;AAAA,iBAAjB;AAAA;AAAA;AALQ;AAXV;AAmBE;AAAA;AAAA,YAAK,WAAU,gBAAf;AACE;AACE,oBAAQ,EAAEO,GAAG,GAAL,EADV;AAEE,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"]}
|
@@ -0,0 +1,14 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
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};"]}
|