@bit-sun/business-component 2.1.16 → 2.1.17

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