@bit-sun/business-component 2.0.12 → 2.0.13
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/.editorconfig +16 -16
- package/.fatherrc.ts +4 -4
- package/.gitlab-ci.yml +174 -135
- package/.prettierignore +7 -7
- package/.prettierrc +11 -11
- package/.umirc.ts +74 -90
- package/README.md +27 -27
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Functional/SearchSelect/index.d.ts +1 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +6794 -7350
- package/dist/index.js +6793 -7348
- package/docs/index.md +21 -21
- package/package.json +51 -60
- package/src/components/Business/AddSelectBusiness/index.md +41 -41
- package/src/components/Business/AddSelectBusiness/index.tsx +288 -300
- package/src/components/Business/CommodityEntry/index.md +69 -69
- package/src/components/Business/CommodityEntry/index.tsx +78 -78
- package/src/components/Business/SearchSelect/BusinessUtils.ts +1445 -1445
- package/src/components/Business/SearchSelect/common.ts +53 -53
- package/src/components/Business/SearchSelect/index.md +1137 -1136
- package/src/components/Business/SearchSelect/index.tsx +44 -49
- package/src/components/Business/SearchSelect/utils.ts +99 -99
- package/src/components/Business/TreeSearchSelect/index.md +126 -126
- package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
- package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
- package/src/components/Functional/AddSelect/index.less +367 -352
- package/src/components/Functional/AddSelect/index.md +120 -120
- package/src/components/Functional/AddSelect/index.tsx +952 -896
- package/src/components/Functional/BillEntry/index.less +371 -371
- package/src/components/Functional/BillEntry/index.md +37 -37
- package/src/components/Functional/BillEntry/index.tsx +547 -561
- package/src/components/Functional/DataImport/index.less +63 -63
- package/src/components/Functional/DataImport/index.md +44 -44
- package/src/components/Functional/DataImport/index.tsx +689 -689
- package/src/components/Functional/DataValidation/index.less +63 -63
- package/src/components/Functional/DataValidation/index.md +38 -38
- package/src/components/Functional/DataValidation/index.tsx +680 -680
- package/src/components/Functional/QueryMutipleInput/index.less +37 -37
- package/src/components/Functional/QueryMutipleInput/index.md +33 -33
- package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
- package/src/components/Functional/SearchSelect/index.less +115 -115
- package/src/components/Functional/SearchSelect/index.md +141 -141
- package/src/components/Functional/SearchSelect/index.tsx +732 -791
- package/src/components/Functional/TreeSearchSelect/index.md +47 -47
- package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
- package/src/index.ts +22 -22
- package/src/utils/CheckOneUser/index.md +39 -39
- package/src/utils/CheckOneUser/index.ts +51 -51
- package/src/utils/requestUtils.ts +32 -32
- package/tsconfig.json +29 -29
- package/typings.d.ts +2 -2
- package/Dockerfile +0 -11
- package/dist/app.d.ts +0 -0
- package/dist/components/sulaQueryTable/BsSulaQueryTable.d.ts +0 -2
- package/dist/components/sulaQueryTable/draggableTable.d.ts +0 -22
- package/dist/components/sulaQueryTable/statusComponent.d.ts +0 -2
- package/dist/components/sulaQueryTable/utils.d.ts +0 -41
- package/nginx.conf +0 -43
- package/src/app.tsx +0 -3
- package/src/components/sulaQueryTable/BsSulaQueryTable.tsx +0 -368
- package/src/components/sulaQueryTable/draggableTable.tsx +0 -111
- package/src/components/sulaQueryTable/index.md +0 -271
- package/src/components/sulaQueryTable/status-component.less +0 -8
- package/src/components/sulaQueryTable/statusComponent.tsx +0 -42
- package/src/components/sulaQueryTable/utils.less +0 -48
- package/src/components/sulaQueryTable/utils.tsx +0 -336
- package/src/global.less +0 -97
|
@@ -1,300 +1,288 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Description:
|
|
3
|
-
* @Author: rodchen
|
|
4
|
-
* @Date: 2022-05-07 15:17:28
|
|
5
|
-
* @LastEditTime: 2022-05-08 21:01:21
|
|
6
|
-
* @LastEditors: rodchen
|
|
7
|
-
*/
|
|
8
|
-
import React, { useState } from 'react';
|
|
9
|
-
import { Tooltip, Select } from 'antd';
|
|
10
|
-
import { AddSelect } from '../../../index';
|
|
11
|
-
|
|
12
|
-
export const AddSkuSelect = (parProps: any) => {
|
|
13
|
-
const selectProps = {
|
|
14
|
-
mode: 'multiple',
|
|
15
|
-
}
|
|
16
|
-
const [value, setValue] = useState(selectProps?.mode ? [] : null);
|
|
17
|
-
const props = {
|
|
18
|
-
buttonText: parProps.buttonText || '新增',
|
|
19
|
-
value,
|
|
20
|
-
// labelInValue: true, // 非必填 默认为false
|
|
21
|
-
requestConfig: {
|
|
22
|
-
url: `/items/sku/pager/v2`,
|
|
23
|
-
filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
|
|
24
|
-
otherParams: {
|
|
25
|
-
'qp-combination-eq': false,
|
|
26
|
-
}, // 默认参数
|
|
27
|
-
mappingTextField: 'name',
|
|
28
|
-
mappingValueField: 'skuCode',
|
|
29
|
-
...parProps.requestConfig
|
|
30
|
-
},
|
|
31
|
-
selectProps,
|
|
32
|
-
onChange: (value: any) => {
|
|
33
|
-
console.log(value)
|
|
34
|
-
setValue(value)
|
|
35
|
-
},
|
|
36
|
-
beforeShowModal: parProps?.beforeShowModal,
|
|
37
|
-
onSaveCallback: parProps.onSaveCallback
|
|
38
|
-
// onSaveCallback: (rows) => {
|
|
39
|
-
// console.log('save call', rows);
|
|
40
|
-
// // return Promise.resolve(true);
|
|
41
|
-
// // return Promise.reject('FAILE')
|
|
42
|
-
// }
|
|
43
|
-
};
|
|
44
|
-
const modalTableProps = {
|
|
45
|
-
modalTableTitle: '选择商品',
|
|
46
|
-
tableSearchForm: [
|
|
47
|
-
{
|
|
48
|
-
name: 'qp-skuCode-like', label: 'SKU编码'
|
|
49
|
-
},
|
|
50
|
-
{ name: 'qp-skuName-like', label: 'SKU名称' },
|
|
51
|
-
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
52
|
-
type: 'select',
|
|
53
|
-
props: {
|
|
54
|
-
mode: 'multiple',
|
|
55
|
-
notFoundContent: '暂无数据',
|
|
56
|
-
allowClear: true,
|
|
57
|
-
showSearch: true,
|
|
58
|
-
showArrow: true,
|
|
59
|
-
maxTagCount: 1,
|
|
60
|
-
optionFilterProp: 'children',
|
|
61
|
-
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
62
|
-
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
63
|
-
},
|
|
64
|
-
} },
|
|
65
|
-
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
66
|
-
type: 'treeSelect',
|
|
67
|
-
props: {
|
|
68
|
-
treeData: [],
|
|
69
|
-
treeCheckable: true,
|
|
70
|
-
showSearch: true,
|
|
71
|
-
allowClear: true,
|
|
72
|
-
showArrow: true,
|
|
73
|
-
treeNodeFilterProp: 'title',
|
|
74
|
-
treeDefaultExpandAll: true,
|
|
75
|
-
maxTagCount: 1,
|
|
76
|
-
placeholder: '请选择',
|
|
77
|
-
style: {
|
|
78
|
-
width: '100%',
|
|
79
|
-
},
|
|
80
|
-
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
81
|
-
},
|
|
82
|
-
} }
|
|
83
|
-
],
|
|
84
|
-
tableColumns: [
|
|
85
|
-
{
|
|
86
|
-
title: 'SKU编码',
|
|
87
|
-
width: 150,
|
|
88
|
-
dataIndex: 'skuCode',
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
title: 'SKU名称',
|
|
92
|
-
width: 200,
|
|
93
|
-
ellipsis: {
|
|
94
|
-
showTitle: false,
|
|
95
|
-
},
|
|
96
|
-
render: (text: any) => (
|
|
97
|
-
<Tooltip placement="topLeft" title={text}>
|
|
98
|
-
{text}
|
|
99
|
-
</Tooltip>
|
|
100
|
-
),
|
|
101
|
-
dataIndex: 'name',
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
title: '国际条码',
|
|
105
|
-
width: 100,
|
|
106
|
-
ellipsis: {
|
|
107
|
-
showTitle: false,
|
|
108
|
-
},
|
|
109
|
-
dataIndex: 'barCode',
|
|
110
|
-
render: (text: any) => (
|
|
111
|
-
<Tooltip placement="topLeft" title={text}>
|
|
112
|
-
{text}
|
|
113
|
-
</Tooltip>
|
|
114
|
-
),
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
title: '所属SPU名称',
|
|
118
|
-
width: 100,
|
|
119
|
-
ellipsis: {
|
|
120
|
-
showTitle: false,
|
|
121
|
-
},
|
|
122
|
-
dataIndex: 'itemName',
|
|
123
|
-
render: (text: any) => (
|
|
124
|
-
<Tooltip placement="topLeft" title={text}>
|
|
125
|
-
{text}
|
|
126
|
-
</Tooltip>
|
|
127
|
-
),
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
title: '所属SPU编码',
|
|
131
|
-
width: 100,
|
|
132
|
-
ellipsis: {
|
|
133
|
-
showTitle: false,
|
|
134
|
-
},
|
|
135
|
-
dataIndex: 'itemCode',
|
|
136
|
-
render: (text: any) => (
|
|
137
|
-
<Tooltip placement="topLeft" title={text}>
|
|
138
|
-
{text}
|
|
139
|
-
</Tooltip>
|
|
140
|
-
),
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
title: '外部编码',
|
|
144
|
-
width: 100,
|
|
145
|
-
ellipsis: {
|
|
146
|
-
showTitle: false,
|
|
147
|
-
},
|
|
148
|
-
render: (text: any) => (
|
|
149
|
-
<Tooltip placement="topLeft" title={text}>
|
|
150
|
-
{text}
|
|
151
|
-
</Tooltip>
|
|
152
|
-
),
|
|
153
|
-
dataIndex: 'externalCode',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
title: '规格',
|
|
157
|
-
width: 100,
|
|
158
|
-
ellipsis: {
|
|
159
|
-
showTitle: false,
|
|
160
|
-
},
|
|
161
|
-
render: (text: any) => (
|
|
162
|
-
<Tooltip placement="topLeft" title={text}>
|
|
163
|
-
{text}
|
|
164
|
-
</Tooltip>
|
|
165
|
-
),
|
|
166
|
-
dataIndex: 'propertyNameAndValue',
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
title: '类目',
|
|
170
|
-
width: 100,
|
|
171
|
-
ellipsis: {
|
|
172
|
-
showTitle: false,
|
|
173
|
-
},
|
|
174
|
-
render: (text: any) => (
|
|
175
|
-
<Tooltip placement="topLeft" title={text}>
|
|
176
|
-
{text}
|
|
177
|
-
</Tooltip>
|
|
178
|
-
),
|
|
179
|
-
dataIndex: 'categoryName',
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
title: '品类',
|
|
183
|
-
width: 100,
|
|
184
|
-
ellipsis: {
|
|
185
|
-
showTitle: false,
|
|
186
|
-
},
|
|
187
|
-
render: (text: any) => (
|
|
188
|
-
<Tooltip placement="topLeft" title={text}>
|
|
189
|
-
{text}
|
|
190
|
-
</Tooltip>
|
|
191
|
-
),
|
|
192
|
-
dataIndex: 'className',
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
title: '品牌',
|
|
196
|
-
width: 100,
|
|
197
|
-
ellipsis: {
|
|
198
|
-
showTitle: false,
|
|
199
|
-
},
|
|
200
|
-
render: (text: any) => (
|
|
201
|
-
<Tooltip placement="topLeft" title={text}>
|
|
202
|
-
{text}
|
|
203
|
-
</Tooltip>
|
|
204
|
-
),
|
|
205
|
-
dataIndex: 'brandName',
|
|
206
|
-
},
|
|
207
|
-
],
|
|
208
|
-
selectColumn: [
|
|
209
|
-
{
|
|
210
|
-
title: 'SKU编码',
|
|
211
|
-
width: 150,
|
|
212
|
-
dataIndex: 'skuCode',
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
title: 'SKU名称',
|
|
216
|
-
width: 200,
|
|
217
|
-
ellipsis: {
|
|
218
|
-
showTitle: false,
|
|
219
|
-
},
|
|
220
|
-
render: (text: any) => (
|
|
221
|
-
<Tooltip placement="topLeft" title={text}>
|
|
222
|
-
{text}
|
|
223
|
-
</Tooltip>
|
|
224
|
-
),
|
|
225
|
-
dataIndex: 'name',
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
title: '数量',
|
|
229
|
-
width: 100,
|
|
230
|
-
isInputItem: true,
|
|
231
|
-
dataIndex: 'count',
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
title: '单位',
|
|
235
|
-
dataIndex: 'selectUnitCode',
|
|
236
|
-
width: 80,
|
|
237
|
-
ellipsis: {
|
|
238
|
-
showTitle: false,
|
|
239
|
-
},
|
|
240
|
-
render: (text: any, record: any) => {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
render: (text: any) => (
|
|
271
|
-
<Tooltip placement="topLeft" title={text}>
|
|
272
|
-
{text}
|
|
273
|
-
</Tooltip>
|
|
274
|
-
),
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
]
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return (
|
|
293
|
-
<div>
|
|
294
|
-
<AddSelect
|
|
295
|
-
{...props}
|
|
296
|
-
modalTableProps={modalTableProps}
|
|
297
|
-
/>
|
|
298
|
-
</div>
|
|
299
|
-
);
|
|
300
|
-
};
|
|
1
|
+
/*
|
|
2
|
+
* @Description:
|
|
3
|
+
* @Author: rodchen
|
|
4
|
+
* @Date: 2022-05-07 15:17:28
|
|
5
|
+
* @LastEditTime: 2022-05-08 21:01:21
|
|
6
|
+
* @LastEditors: rodchen
|
|
7
|
+
*/
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import { Tooltip, Select } from 'antd';
|
|
10
|
+
import { AddSelect } from '../../../index';
|
|
11
|
+
|
|
12
|
+
export const AddSkuSelect = (parProps: any) => {
|
|
13
|
+
const selectProps = {
|
|
14
|
+
mode: 'multiple',
|
|
15
|
+
}
|
|
16
|
+
const [value, setValue] = useState(selectProps?.mode ? [] : null);
|
|
17
|
+
const props = {
|
|
18
|
+
buttonText: parProps.buttonText || '新增',
|
|
19
|
+
value,
|
|
20
|
+
// labelInValue: true, // 非必填 默认为false
|
|
21
|
+
requestConfig: {
|
|
22
|
+
url: `/items/sku/pager/v2`,
|
|
23
|
+
filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
|
|
24
|
+
otherParams: {
|
|
25
|
+
'qp-combination-eq': false,
|
|
26
|
+
}, // 默认参数
|
|
27
|
+
mappingTextField: 'name',
|
|
28
|
+
mappingValueField: 'skuCode',
|
|
29
|
+
...parProps.requestConfig
|
|
30
|
+
},
|
|
31
|
+
selectProps,
|
|
32
|
+
onChange: (value: any) => {
|
|
33
|
+
console.log(value)
|
|
34
|
+
setValue(value)
|
|
35
|
+
},
|
|
36
|
+
beforeShowModal: parProps?.beforeShowModal,
|
|
37
|
+
onSaveCallback: parProps.onSaveCallback
|
|
38
|
+
// onSaveCallback: (rows) => {
|
|
39
|
+
// console.log('save call', rows);
|
|
40
|
+
// // return Promise.resolve(true);
|
|
41
|
+
// // return Promise.reject('FAILE')
|
|
42
|
+
// }
|
|
43
|
+
};
|
|
44
|
+
const modalTableProps = {
|
|
45
|
+
modalTableTitle: '选择商品',
|
|
46
|
+
tableSearchForm: [
|
|
47
|
+
{
|
|
48
|
+
name: 'qp-skuCode-like', label: 'SKU编码'
|
|
49
|
+
},
|
|
50
|
+
{ name: 'qp-skuName-like', label: 'SKU名称' },
|
|
51
|
+
{ name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
|
|
52
|
+
type: 'select',
|
|
53
|
+
props: {
|
|
54
|
+
mode: 'multiple',
|
|
55
|
+
notFoundContent: '暂无数据',
|
|
56
|
+
allowClear: true,
|
|
57
|
+
showSearch: true,
|
|
58
|
+
showArrow: true,
|
|
59
|
+
maxTagCount: 1,
|
|
60
|
+
optionFilterProp: 'children',
|
|
61
|
+
filterOption: (input: string, option: { props: { children: string } }) =>
|
|
62
|
+
option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
|
|
63
|
+
},
|
|
64
|
+
} },
|
|
65
|
+
{ name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
|
|
66
|
+
type: 'treeSelect',
|
|
67
|
+
props: {
|
|
68
|
+
treeData: [],
|
|
69
|
+
treeCheckable: true,
|
|
70
|
+
showSearch: true,
|
|
71
|
+
allowClear: true,
|
|
72
|
+
showArrow: true,
|
|
73
|
+
treeNodeFilterProp: 'title',
|
|
74
|
+
treeDefaultExpandAll: true,
|
|
75
|
+
maxTagCount: 1,
|
|
76
|
+
placeholder: '请选择',
|
|
77
|
+
style: {
|
|
78
|
+
width: '100%',
|
|
79
|
+
},
|
|
80
|
+
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
81
|
+
},
|
|
82
|
+
} }
|
|
83
|
+
],
|
|
84
|
+
tableColumns: [
|
|
85
|
+
{
|
|
86
|
+
title: 'SKU编码',
|
|
87
|
+
width: 150,
|
|
88
|
+
dataIndex: 'skuCode',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'SKU名称',
|
|
92
|
+
width: 200,
|
|
93
|
+
ellipsis: {
|
|
94
|
+
showTitle: false,
|
|
95
|
+
},
|
|
96
|
+
render: (text: any) => (
|
|
97
|
+
<Tooltip placement="topLeft" title={text}>
|
|
98
|
+
{text}
|
|
99
|
+
</Tooltip>
|
|
100
|
+
),
|
|
101
|
+
dataIndex: 'name',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
title: '国际条码',
|
|
105
|
+
width: 100,
|
|
106
|
+
ellipsis: {
|
|
107
|
+
showTitle: false,
|
|
108
|
+
},
|
|
109
|
+
dataIndex: 'barCode',
|
|
110
|
+
render: (text: any) => (
|
|
111
|
+
<Tooltip placement="topLeft" title={text}>
|
|
112
|
+
{text}
|
|
113
|
+
</Tooltip>
|
|
114
|
+
),
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
title: '所属SPU名称',
|
|
118
|
+
width: 100,
|
|
119
|
+
ellipsis: {
|
|
120
|
+
showTitle: false,
|
|
121
|
+
},
|
|
122
|
+
dataIndex: 'itemName',
|
|
123
|
+
render: (text: any) => (
|
|
124
|
+
<Tooltip placement="topLeft" title={text}>
|
|
125
|
+
{text}
|
|
126
|
+
</Tooltip>
|
|
127
|
+
),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
title: '所属SPU编码',
|
|
131
|
+
width: 100,
|
|
132
|
+
ellipsis: {
|
|
133
|
+
showTitle: false,
|
|
134
|
+
},
|
|
135
|
+
dataIndex: 'itemCode',
|
|
136
|
+
render: (text: any) => (
|
|
137
|
+
<Tooltip placement="topLeft" title={text}>
|
|
138
|
+
{text}
|
|
139
|
+
</Tooltip>
|
|
140
|
+
),
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
title: '外部编码',
|
|
144
|
+
width: 100,
|
|
145
|
+
ellipsis: {
|
|
146
|
+
showTitle: false,
|
|
147
|
+
},
|
|
148
|
+
render: (text: any) => (
|
|
149
|
+
<Tooltip placement="topLeft" title={text}>
|
|
150
|
+
{text}
|
|
151
|
+
</Tooltip>
|
|
152
|
+
),
|
|
153
|
+
dataIndex: 'externalCode',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
title: '规格',
|
|
157
|
+
width: 100,
|
|
158
|
+
ellipsis: {
|
|
159
|
+
showTitle: false,
|
|
160
|
+
},
|
|
161
|
+
render: (text: any) => (
|
|
162
|
+
<Tooltip placement="topLeft" title={text}>
|
|
163
|
+
{text}
|
|
164
|
+
</Tooltip>
|
|
165
|
+
),
|
|
166
|
+
dataIndex: 'propertyNameAndValue',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
title: '类目',
|
|
170
|
+
width: 100,
|
|
171
|
+
ellipsis: {
|
|
172
|
+
showTitle: false,
|
|
173
|
+
},
|
|
174
|
+
render: (text: any) => (
|
|
175
|
+
<Tooltip placement="topLeft" title={text}>
|
|
176
|
+
{text}
|
|
177
|
+
</Tooltip>
|
|
178
|
+
),
|
|
179
|
+
dataIndex: 'categoryName',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
title: '品类',
|
|
183
|
+
width: 100,
|
|
184
|
+
ellipsis: {
|
|
185
|
+
showTitle: false,
|
|
186
|
+
},
|
|
187
|
+
render: (text: any) => (
|
|
188
|
+
<Tooltip placement="topLeft" title={text}>
|
|
189
|
+
{text}
|
|
190
|
+
</Tooltip>
|
|
191
|
+
),
|
|
192
|
+
dataIndex: 'className',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
title: '品牌',
|
|
196
|
+
width: 100,
|
|
197
|
+
ellipsis: {
|
|
198
|
+
showTitle: false,
|
|
199
|
+
},
|
|
200
|
+
render: (text: any) => (
|
|
201
|
+
<Tooltip placement="topLeft" title={text}>
|
|
202
|
+
{text}
|
|
203
|
+
</Tooltip>
|
|
204
|
+
),
|
|
205
|
+
dataIndex: 'brandName',
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
selectColumn: [
|
|
209
|
+
{
|
|
210
|
+
title: 'SKU编码',
|
|
211
|
+
width: 150,
|
|
212
|
+
dataIndex: 'skuCode',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
title: 'SKU名称',
|
|
216
|
+
width: 200,
|
|
217
|
+
ellipsis: {
|
|
218
|
+
showTitle: false,
|
|
219
|
+
},
|
|
220
|
+
render: (text: any) => (
|
|
221
|
+
<Tooltip placement="topLeft" title={text}>
|
|
222
|
+
{text}
|
|
223
|
+
</Tooltip>
|
|
224
|
+
),
|
|
225
|
+
dataIndex: 'name',
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
title: '数量',
|
|
229
|
+
width: 100,
|
|
230
|
+
isInputItem: true,
|
|
231
|
+
dataIndex: 'count',
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
title: '单位',
|
|
235
|
+
dataIndex: 'selectUnitCode',
|
|
236
|
+
width: 80,
|
|
237
|
+
ellipsis: {
|
|
238
|
+
showTitle: false,
|
|
239
|
+
},
|
|
240
|
+
render: (text: any, record: any) => {
|
|
241
|
+
if (record?.packingUnitList?.length) {
|
|
242
|
+
const basePackUnit = record?.packingUnitList[0]
|
|
243
|
+
record.selectUnitCode = basePackUnit.unitCode
|
|
244
|
+
return basePackUnit.name || basePackUnit.unitCode
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
return <></>
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
title: '所属SPU编码',
|
|
253
|
+
width: 150,
|
|
254
|
+
ellipsis: {
|
|
255
|
+
showTitle: false,
|
|
256
|
+
},
|
|
257
|
+
dataIndex: 'itemCode',
|
|
258
|
+
render: (text: any) => (
|
|
259
|
+
<Tooltip placement="topLeft" title={text}>
|
|
260
|
+
{text}
|
|
261
|
+
</Tooltip>
|
|
262
|
+
),
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
title: '规格',
|
|
266
|
+
width: 200,
|
|
267
|
+
ellipsis: {
|
|
268
|
+
showTitle: false,
|
|
269
|
+
},
|
|
270
|
+
render: (text: any) => (
|
|
271
|
+
<Tooltip placement="topLeft" title={text}>
|
|
272
|
+
{text}
|
|
273
|
+
</Tooltip>
|
|
274
|
+
),
|
|
275
|
+
dataIndex: 'propertyNameAndValue',
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return (
|
|
281
|
+
<div>
|
|
282
|
+
<AddSelect
|
|
283
|
+
{...props}
|
|
284
|
+
modalTableProps={modalTableProps}
|
|
285
|
+
/>
|
|
286
|
+
</div>
|
|
287
|
+
);
|
|
288
|
+
};
|