@bit-sun/business-component 2.1.17 → 2.1.18

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 (150) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -179
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -74
  7. package/README.md +27 -27
  8. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +1 -1
  9. package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +1 -1
  10. package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +2 -2
  11. package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +2 -2
  12. package/dist/components/Business/BsLayouts/index.d.ts +2 -2
  13. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +1 -0
  14. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +2 -2
  15. package/dist/index.esm.js +2706 -1213
  16. package/dist/index.js +2706 -1213
  17. package/dist/utils/TableUtils.d.ts +2 -2
  18. package/dist/utils/utils.d.ts +1 -1
  19. package/docs/index.md +21 -21
  20. package/lib/assets/drag.svg +17 -17
  21. package/lib/assets/exportFail.svg +37 -37
  22. package/lib/assets/exportProcessing.svg +28 -28
  23. package/lib/assets/exportSuccess.svg +34 -34
  24. package/lib/assets/label_icon_bottom.svg +25 -25
  25. package/lib/assets/upExport.svg +22 -22
  26. package/package.json +71 -71
  27. package/src/assets/32.svg +27 -27
  28. package/src/assets/addIcon.svg +17 -17
  29. package/src/assets/allfunc.svg +27 -27
  30. package/src/assets/arrowRight.svg +24 -24
  31. package/src/assets/btn-delete.svg +29 -29
  32. package/src/assets/btn-edit.svg +19 -19
  33. package/src/assets/btn-more.svg +17 -17
  34. package/src/assets/btn-submit.svg +19 -19
  35. package/src/assets/caidan.svg +11 -11
  36. package/src/assets/close.svg +26 -26
  37. package/src/assets/drag.svg +17 -17
  38. package/src/assets/exportFail.svg +37 -37
  39. package/src/assets/exportProcessing.svg +28 -28
  40. package/src/assets/exportSuccess.svg +34 -34
  41. package/src/assets/fixed-left-active.svg +11 -11
  42. package/src/assets/fixed-left.svg +15 -15
  43. package/src/assets/fixed-right-active.svg +11 -11
  44. package/src/assets/fixed-right.svg +15 -15
  45. package/src/assets/guanbi.svg +15 -15
  46. package/src/assets/icon-quanping.svg +15 -15
  47. package/src/assets/icon-shezhi.svg +17 -17
  48. package/src/assets/label_icon_bottom.svg +25 -25
  49. package/src/assets/list-no-img.svg +21 -21
  50. package/src/assets/morentouxiang-32.svg +23 -23
  51. package/src/assets/scanning.svg +24 -24
  52. package/src/assets/upExport.svg +22 -22
  53. package/src/components/Business/AddSelectBusiness/index.md +41 -41
  54. package/src/components/Business/AddSelectBusiness/index.tsx +319 -319
  55. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  56. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  57. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  58. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  59. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  60. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  61. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  62. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  63. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  64. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  65. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  66. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  67. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  68. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  69. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  70. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  71. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -156
  72. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  73. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  74. package/src/components/Business/BsLayouts/index.less +79 -79
  75. package/src/components/Business/BsLayouts/index.tsx +1479 -1479
  76. package/src/components/Business/BsLayouts/service.ts +10 -10
  77. package/src/components/Business/BsLayouts/utils.tsx +230 -230
  78. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  79. package/src/components/Business/BsSulaQueryTable/index.tsx +507 -505
  80. package/src/components/Business/BsSulaQueryTable/setting.tsx +802 -799
  81. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  82. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  83. package/src/components/Business/CommodityEntry/index.md +70 -70
  84. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  85. package/src/components/Business/CommonAlert/index.tsx +23 -23
  86. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  87. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  88. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  89. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  90. package/src/components/Business/DetailPageWrapper/index.tsx +335 -335
  91. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  92. package/src/components/Business/HomePageWrapper/index.less +33 -33
  93. package/src/components/Business/HomePageWrapper/index.md +45 -45
  94. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  95. package/src/components/Business/SearchSelect/BusinessUtils.ts +1478 -1478
  96. package/src/components/Business/SearchSelect/common.ts +53 -53
  97. package/src/components/Business/SearchSelect/index.md +1137 -1137
  98. package/src/components/Business/SearchSelect/index.tsx +51 -51
  99. package/src/components/Business/SearchSelect/utils.ts +100 -100
  100. package/src/components/Business/StateFlow/index.less +130 -130
  101. package/src/components/Business/StateFlow/index.md +60 -60
  102. package/src/components/Business/StateFlow/index.tsx +29 -29
  103. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  104. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  105. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  106. package/src/components/Business/columnSettingTable/columnSetting.tsx +764 -764
  107. package/src/components/Business/columnSettingTable/index.less +247 -247
  108. package/src/components/Business/columnSettingTable/index.md +357 -357
  109. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  110. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  111. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  112. package/src/components/Business/moreTreeTable/index.less +99 -99
  113. package/src/components/Business/moreTreeTable/index.md +508 -508
  114. package/src/components/Business/moreTreeTable/index.tsx +315 -315
  115. package/src/components/Business/moreTreeTable/utils.ts +126 -126
  116. package/src/components/Functional/AddSelect/index.less +367 -367
  117. package/src/components/Functional/AddSelect/index.md +122 -122
  118. package/src/components/Functional/AddSelect/index.tsx +992 -992
  119. package/src/components/Functional/BillEntry/index.less +371 -371
  120. package/src/components/Functional/BillEntry/index.md +39 -39
  121. package/src/components/Functional/BillEntry/index.tsx +671 -671
  122. package/src/components/Functional/DataImport/index.less +63 -63
  123. package/src/components/Functional/DataImport/index.md +44 -44
  124. package/src/components/Functional/DataImport/index.tsx +695 -695
  125. package/src/components/Functional/DataValidation/index.less +63 -63
  126. package/src/components/Functional/DataValidation/index.md +39 -39
  127. package/src/components/Functional/DataValidation/index.tsx +687 -687
  128. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  129. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  130. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  131. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  132. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  133. package/src/components/Functional/SearchSelect/index.less +115 -115
  134. package/src/components/Functional/SearchSelect/index.md +141 -141
  135. package/src/components/Functional/SearchSelect/index.tsx +813 -813
  136. package/src/components/Functional/SearchSelect/utils.ts +6 -6
  137. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  138. package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
  139. package/src/index.ts +32 -32
  140. package/src/styles/bsDefault.less +1906 -1906
  141. package/src/utils/CheckOneUser/index.md +39 -39
  142. package/src/utils/CheckOneUser/index.ts +51 -51
  143. package/src/utils/TableUtils.tsx +18 -18
  144. package/src/utils/checkUtils.ts +39 -39
  145. package/src/utils/enumConfig.ts +10 -10
  146. package/src/utils/index.ts +2 -2
  147. package/src/utils/requestUtils.ts +33 -33
  148. package/src/utils/utils.ts +57 -57
  149. package/tsconfig.json +29 -29
  150. package/typings.d.ts +4 -4
@@ -1,319 +1,319 @@
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
- import { tableColumnsImage } from '@/components/Business/BsSulaQueryTable/utils';
12
- import { getSkuImg } from '@/utils/TableUtils';
13
-
14
- export const AddSkuSelect = (parProps: any) => {
15
- const selectProps = {
16
- mode: 'multiple',
17
- }
18
- const [value, setValue] = useState(selectProps?.mode ? [] : null);
19
- const props = {
20
- buttonText: parProps.buttonText || '新增',
21
- buttonProps: parProps.buttonProps || {},
22
- value,
23
- // labelInValue: true, // 非必填 默认为false
24
- requestConfig: {
25
- url: `/items/sku/pager/v2`,
26
- filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
27
- otherParams: {
28
- 'qp-combination-eq': false,
29
- 'qp-approveStatus-eq': 1,
30
- 'qp-status-eq': 1,
31
- }, // 默认参数
32
- mappingTextField: 'name',
33
- mappingValueField: 'skuCode',
34
- ...parProps.requestConfig
35
- },
36
- selectProps,
37
- onChange: (value: any) => {
38
- console.log(value)
39
- setValue(value)
40
- },
41
- beforeShowModal: parProps?.beforeShowModal,
42
- onSaveCallback: parProps.onSaveCallback
43
- // onSaveCallback: (rows) => {
44
- // console.log('save call', rows);
45
- // // return Promise.resolve(true);
46
- // // return Promise.reject('FAILE')
47
- // }
48
- };
49
- const modalTableProps = {
50
- modalTableTitle: '选择商品',
51
- tableSearchForm: [
52
- {
53
- name: 'qp-skuCode-like', label: 'SKU编码'
54
- },
55
- { name: 'qp-skuName-like', label: 'SKU名称' },
56
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
57
- type: 'select',
58
- props: {
59
- mode: 'multiple',
60
- notFoundContent: '暂无数据',
61
- allowClear: true,
62
- showSearch: true,
63
- showArrow: true,
64
- maxTagCount: 1,
65
- optionFilterProp: 'children',
66
- filterOption: (input: string, option: { props: { children: string } }) =>
67
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
68
- },
69
- } },
70
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
71
- type: 'treeSelect',
72
- props: {
73
- treeData: [],
74
- treeCheckable: true,
75
- showSearch: true,
76
- allowClear: true,
77
- showArrow: true,
78
- treeNodeFilterProp: 'title',
79
- treeDefaultExpandAll: true,
80
- maxTagCount: 1,
81
- placeholder: '请选择',
82
- style: {
83
- width: '100%',
84
- },
85
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
86
- },
87
- } }
88
- ],
89
- tableColumns: [
90
- {
91
- title: 'SKU编码',
92
- width: 150,
93
- dataIndex: 'skuCode',
94
- },
95
- {
96
- title: 'SKU名称',
97
- width: 200,
98
- ellipsis: {
99
- showTitle: false,
100
- },
101
- render: (text: any) => (
102
- <Tooltip placement="topLeft" title={text}>
103
- {text}
104
- </Tooltip>
105
- ),
106
- dataIndex: 'name',
107
- },
108
- {
109
- title: '图片',
110
- dataIndex: 'itemUrl',
111
- width: 200,
112
- ellipsis: {
113
- showTitle: false,
114
- },
115
- render: (text: any,record: any) => (
116
- <Tooltip placement="topLeft" title={text}>
117
- {tableColumnsImage(getSkuImg(record),{ width: 20, height: 20 })}
118
- </Tooltip>
119
- ),
120
- },
121
- {
122
- title: '国际条码',
123
- width: 100,
124
- ellipsis: {
125
- showTitle: false,
126
- },
127
- dataIndex: 'barCode',
128
- render: (text: any) => (
129
- <Tooltip placement="topLeft" title={text}>
130
- {text}
131
- </Tooltip>
132
- ),
133
- },
134
- {
135
- title: '所属SPU名称',
136
- width: 100,
137
- ellipsis: {
138
- showTitle: false,
139
- },
140
- dataIndex: 'itemName',
141
- render: (text: any) => (
142
- <Tooltip placement="topLeft" title={text}>
143
- {text}
144
- </Tooltip>
145
- ),
146
- },
147
- {
148
- title: '所属SPU编码',
149
- width: 100,
150
- ellipsis: {
151
- showTitle: false,
152
- },
153
- dataIndex: 'itemCode',
154
- render: (text: any) => (
155
- <Tooltip placement="topLeft" title={text}>
156
- {text}
157
- </Tooltip>
158
- ),
159
- },
160
- {
161
- title: '外部编码',
162
- width: 100,
163
- ellipsis: {
164
- showTitle: false,
165
- },
166
- render: (text: any) => (
167
- <Tooltip placement="topLeft" title={text}>
168
- {text}
169
- </Tooltip>
170
- ),
171
- dataIndex: 'externalCode',
172
- },
173
- {
174
- title: '规格',
175
- width: 100,
176
- ellipsis: {
177
- showTitle: false,
178
- },
179
- render: (text: any) => (
180
- <Tooltip placement="topLeft" title={text}>
181
- {text}
182
- </Tooltip>
183
- ),
184
- dataIndex: 'propertyNameAndValue',
185
- },
186
- {
187
- title: '类目',
188
- width: 100,
189
- ellipsis: {
190
- showTitle: false,
191
- },
192
- render: (text: any) => (
193
- <Tooltip placement="topLeft" title={text}>
194
- {text}
195
- </Tooltip>
196
- ),
197
- dataIndex: 'categoryName',
198
- },
199
- {
200
- title: '品类',
201
- width: 100,
202
- ellipsis: {
203
- showTitle: false,
204
- },
205
- render: (text: any) => (
206
- <Tooltip placement="topLeft" title={text}>
207
- {text}
208
- </Tooltip>
209
- ),
210
- dataIndex: 'className',
211
- },
212
- {
213
- title: '品牌',
214
- width: 100,
215
- ellipsis: {
216
- showTitle: false,
217
- },
218
- render: (text: any) => (
219
- <Tooltip placement="topLeft" title={text}>
220
- {text}
221
- </Tooltip>
222
- ),
223
- dataIndex: 'brandName',
224
- },
225
- ],
226
- selectColumn: [
227
- {
228
- title: 'SKU编码',
229
- width: 150,
230
- dataIndex: 'skuCode',
231
- },
232
- {
233
- title: 'SKU名称',
234
- width: 200,
235
- ellipsis: {
236
- showTitle: false,
237
- },
238
- render: (text: any) => (
239
- <Tooltip placement="topLeft" title={text}>
240
- {text}
241
- </Tooltip>
242
- ),
243
- dataIndex: 'name',
244
- },
245
- {
246
- title: '图片',
247
- dataIndex: 'itemUrl',
248
- width: 200,
249
- ellipsis: {
250
- showTitle: false,
251
- },
252
- render: (text: any,record: any) => (
253
- <Tooltip placement="topLeft" title={text}>
254
- {tableColumnsImage(getSkuImg(record),{ width: 28, height: 28 })}
255
- </Tooltip>
256
- ),
257
- },
258
- {
259
- title: '数量',
260
- width: 100,
261
- isInputItem: true,
262
- dataIndex: 'count',
263
- },
264
- {
265
- title: '单位',
266
- dataIndex: 'selectUnitCode',
267
- width: 80,
268
- ellipsis: {
269
- showTitle: false,
270
- },
271
- render: (text: any, record: any) => {
272
- if (record?.packingUnitList?.length) {
273
- const basePackUnit = record?.packingUnitList[0]
274
- record.selectUnitCode = basePackUnit.unitCode
275
- return basePackUnit.name || basePackUnit.unitCode
276
- }
277
-
278
-
279
- return <></>
280
- },
281
- },
282
- {
283
- title: '所属SPU编码',
284
- width: 150,
285
- ellipsis: {
286
- showTitle: false,
287
- },
288
- dataIndex: 'itemCode',
289
- render: (text: any) => (
290
- <Tooltip placement="topLeft" title={text}>
291
- {text}
292
- </Tooltip>
293
- ),
294
- },
295
- {
296
- title: '规格',
297
- width: 200,
298
- ellipsis: {
299
- showTitle: false,
300
- },
301
- render: (text: any) => (
302
- <Tooltip placement="topLeft" title={text}>
303
- {text}
304
- </Tooltip>
305
- ),
306
- dataIndex: 'propertyNameAndValue',
307
- }
308
- ]
309
- }
310
-
311
- return (
312
- <div>
313
- <AddSelect
314
- {...props}
315
- modalTableProps={modalTableProps}
316
- />
317
- </div>
318
- );
319
- };
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
+ import { tableColumnsImage } from '@/components/Business/BsSulaQueryTable/utils';
12
+ import { getSkuImg } from '@/utils/TableUtils';
13
+
14
+ export const AddSkuSelect = (parProps: any) => {
15
+ const selectProps = {
16
+ mode: 'multiple',
17
+ }
18
+ const [value, setValue] = useState(selectProps?.mode ? [] : null);
19
+ const props = {
20
+ buttonText: parProps.buttonText || '新增',
21
+ buttonProps: parProps.buttonProps || {},
22
+ value,
23
+ // labelInValue: true, // 非必填 默认为false
24
+ requestConfig: {
25
+ url: `/items/sku/pager/v2`,
26
+ filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
27
+ otherParams: {
28
+ 'qp-combination-eq': false,
29
+ 'qp-approveStatus-eq': 1,
30
+ 'qp-status-eq': 1,
31
+ }, // 默认参数
32
+ mappingTextField: 'name',
33
+ mappingValueField: 'skuCode',
34
+ ...parProps.requestConfig
35
+ },
36
+ selectProps,
37
+ onChange: (value: any) => {
38
+ console.log(value)
39
+ setValue(value)
40
+ },
41
+ beforeShowModal: parProps?.beforeShowModal,
42
+ onSaveCallback: parProps.onSaveCallback
43
+ // onSaveCallback: (rows) => {
44
+ // console.log('save call', rows);
45
+ // // return Promise.resolve(true);
46
+ // // return Promise.reject('FAILE')
47
+ // }
48
+ };
49
+ const modalTableProps = {
50
+ modalTableTitle: '选择商品',
51
+ tableSearchForm: [
52
+ {
53
+ name: 'qp-skuCode-like', label: 'SKU编码'
54
+ },
55
+ { name: 'qp-skuName-like', label: 'SKU名称' },
56
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
57
+ type: 'select',
58
+ props: {
59
+ mode: 'multiple',
60
+ notFoundContent: '暂无数据',
61
+ allowClear: true,
62
+ showSearch: true,
63
+ showArrow: true,
64
+ maxTagCount: 1,
65
+ optionFilterProp: 'children',
66
+ filterOption: (input: string, option: { props: { children: string } }) =>
67
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
68
+ },
69
+ } },
70
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
71
+ type: 'treeSelect',
72
+ props: {
73
+ treeData: [],
74
+ treeCheckable: true,
75
+ showSearch: true,
76
+ allowClear: true,
77
+ showArrow: true,
78
+ treeNodeFilterProp: 'title',
79
+ treeDefaultExpandAll: true,
80
+ maxTagCount: 1,
81
+ placeholder: '请选择',
82
+ style: {
83
+ width: '100%',
84
+ },
85
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
86
+ },
87
+ } }
88
+ ],
89
+ tableColumns: [
90
+ {
91
+ title: 'SKU编码',
92
+ width: 150,
93
+ dataIndex: 'skuCode',
94
+ },
95
+ {
96
+ title: 'SKU名称',
97
+ width: 200,
98
+ ellipsis: {
99
+ showTitle: false,
100
+ },
101
+ render: (text: any) => (
102
+ <Tooltip placement="topLeft" title={text}>
103
+ {text}
104
+ </Tooltip>
105
+ ),
106
+ dataIndex: 'name',
107
+ },
108
+ {
109
+ title: '图片',
110
+ dataIndex: 'itemUrl',
111
+ width: 200,
112
+ ellipsis: {
113
+ showTitle: false,
114
+ },
115
+ render: (text: any,record: any) => (
116
+ <Tooltip placement="topLeft" title={text}>
117
+ {tableColumnsImage(getSkuImg(record),{ width: 20, height: 20 })}
118
+ </Tooltip>
119
+ ),
120
+ },
121
+ {
122
+ title: '国际条码',
123
+ width: 100,
124
+ ellipsis: {
125
+ showTitle: false,
126
+ },
127
+ dataIndex: 'barCode',
128
+ render: (text: any) => (
129
+ <Tooltip placement="topLeft" title={text}>
130
+ {text}
131
+ </Tooltip>
132
+ ),
133
+ },
134
+ {
135
+ title: '所属SPU名称',
136
+ width: 100,
137
+ ellipsis: {
138
+ showTitle: false,
139
+ },
140
+ dataIndex: 'itemName',
141
+ render: (text: any) => (
142
+ <Tooltip placement="topLeft" title={text}>
143
+ {text}
144
+ </Tooltip>
145
+ ),
146
+ },
147
+ {
148
+ title: '所属SPU编码',
149
+ width: 100,
150
+ ellipsis: {
151
+ showTitle: false,
152
+ },
153
+ dataIndex: 'itemCode',
154
+ render: (text: any) => (
155
+ <Tooltip placement="topLeft" title={text}>
156
+ {text}
157
+ </Tooltip>
158
+ ),
159
+ },
160
+ {
161
+ title: '外部编码',
162
+ width: 100,
163
+ ellipsis: {
164
+ showTitle: false,
165
+ },
166
+ render: (text: any) => (
167
+ <Tooltip placement="topLeft" title={text}>
168
+ {text}
169
+ </Tooltip>
170
+ ),
171
+ dataIndex: 'externalCode',
172
+ },
173
+ {
174
+ title: '规格',
175
+ width: 100,
176
+ ellipsis: {
177
+ showTitle: false,
178
+ },
179
+ render: (text: any) => (
180
+ <Tooltip placement="topLeft" title={text}>
181
+ {text}
182
+ </Tooltip>
183
+ ),
184
+ dataIndex: 'propertyNameAndValue',
185
+ },
186
+ {
187
+ title: '类目',
188
+ width: 100,
189
+ ellipsis: {
190
+ showTitle: false,
191
+ },
192
+ render: (text: any) => (
193
+ <Tooltip placement="topLeft" title={text}>
194
+ {text}
195
+ </Tooltip>
196
+ ),
197
+ dataIndex: 'categoryName',
198
+ },
199
+ {
200
+ title: '品类',
201
+ width: 100,
202
+ ellipsis: {
203
+ showTitle: false,
204
+ },
205
+ render: (text: any) => (
206
+ <Tooltip placement="topLeft" title={text}>
207
+ {text}
208
+ </Tooltip>
209
+ ),
210
+ dataIndex: 'className',
211
+ },
212
+ {
213
+ title: '品牌',
214
+ width: 100,
215
+ ellipsis: {
216
+ showTitle: false,
217
+ },
218
+ render: (text: any) => (
219
+ <Tooltip placement="topLeft" title={text}>
220
+ {text}
221
+ </Tooltip>
222
+ ),
223
+ dataIndex: 'brandName',
224
+ },
225
+ ],
226
+ selectColumn: [
227
+ {
228
+ title: 'SKU编码',
229
+ width: 150,
230
+ dataIndex: 'skuCode',
231
+ },
232
+ {
233
+ title: 'SKU名称',
234
+ width: 200,
235
+ ellipsis: {
236
+ showTitle: false,
237
+ },
238
+ render: (text: any) => (
239
+ <Tooltip placement="topLeft" title={text}>
240
+ {text}
241
+ </Tooltip>
242
+ ),
243
+ dataIndex: 'name',
244
+ },
245
+ {
246
+ title: '图片',
247
+ dataIndex: 'itemUrl',
248
+ width: 200,
249
+ ellipsis: {
250
+ showTitle: false,
251
+ },
252
+ render: (text: any,record: any) => (
253
+ <Tooltip placement="topLeft" title={text}>
254
+ {tableColumnsImage(getSkuImg(record),{ width: 28, height: 28 })}
255
+ </Tooltip>
256
+ ),
257
+ },
258
+ {
259
+ title: '数量',
260
+ width: 100,
261
+ isInputItem: true,
262
+ dataIndex: 'count',
263
+ },
264
+ {
265
+ title: '单位',
266
+ dataIndex: 'selectUnitCode',
267
+ width: 80,
268
+ ellipsis: {
269
+ showTitle: false,
270
+ },
271
+ render: (text: any, record: any) => {
272
+ if (record?.packingUnitList?.length) {
273
+ const basePackUnit = record?.packingUnitList[0]
274
+ record.selectUnitCode = basePackUnit.unitCode
275
+ return basePackUnit.name || basePackUnit.unitCode
276
+ }
277
+
278
+
279
+ return <></>
280
+ },
281
+ },
282
+ {
283
+ title: '所属SPU编码',
284
+ width: 150,
285
+ ellipsis: {
286
+ showTitle: false,
287
+ },
288
+ dataIndex: 'itemCode',
289
+ render: (text: any) => (
290
+ <Tooltip placement="topLeft" title={text}>
291
+ {text}
292
+ </Tooltip>
293
+ ),
294
+ },
295
+ {
296
+ title: '规格',
297
+ width: 200,
298
+ ellipsis: {
299
+ showTitle: false,
300
+ },
301
+ render: (text: any) => (
302
+ <Tooltip placement="topLeft" title={text}>
303
+ {text}
304
+ </Tooltip>
305
+ ),
306
+ dataIndex: 'propertyNameAndValue',
307
+ }
308
+ ]
309
+ }
310
+
311
+ return (
312
+ <div>
313
+ <AddSelect
314
+ {...props}
315
+ modalTableProps={modalTableProps}
316
+ />
317
+ </div>
318
+ );
319
+ };