@bit-sun/business-component 2.1.8 → 2.1.9

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 (138) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +5 -5
  3. package/.gitlab-ci.yml +179 -174
  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/index.esm.js +12807 -10907
  9. package/dist/index.js +12804 -10904
  10. package/docs/index.md +21 -21
  11. package/lib/assets/drag.svg +17 -17
  12. package/lib/assets/exportFail.svg +37 -37
  13. package/lib/assets/exportProcessing.svg +28 -28
  14. package/lib/assets/exportSuccess.svg +34 -34
  15. package/lib/assets/label_icon_bottom.svg +25 -25
  16. package/lib/assets/upExport.svg +22 -22
  17. package/package.json +71 -71
  18. package/src/assets/32.svg +27 -27
  19. package/src/assets/addIcon.svg +17 -17
  20. package/src/assets/allfunc.svg +27 -27
  21. package/src/assets/arrowRight.svg +24 -24
  22. package/src/assets/btn-delete.svg +29 -29
  23. package/src/assets/btn-edit.svg +19 -19
  24. package/src/assets/btn-more.svg +17 -17
  25. package/src/assets/btn-submit.svg +19 -19
  26. package/src/assets/caidan.svg +11 -11
  27. package/src/assets/close.svg +26 -26
  28. package/src/assets/drag.svg +17 -17
  29. package/src/assets/exportFail.svg +37 -37
  30. package/src/assets/exportProcessing.svg +28 -28
  31. package/src/assets/exportSuccess.svg +34 -34
  32. package/src/assets/fixed-left-active.svg +11 -11
  33. package/src/assets/fixed-left.svg +15 -15
  34. package/src/assets/fixed-right-active.svg +11 -11
  35. package/src/assets/fixed-right.svg +15 -15
  36. package/src/assets/guanbi.svg +15 -15
  37. package/src/assets/icon-quanping.svg +15 -15
  38. package/src/assets/icon-shezhi.svg +17 -17
  39. package/src/assets/label_icon_bottom.svg +25 -25
  40. package/src/assets/list-no-img.svg +21 -21
  41. package/src/assets/morentouxiang-32.svg +23 -23
  42. package/src/assets/scanning.svg +24 -24
  43. package/src/assets/upExport.svg +22 -22
  44. package/src/components/Business/AddSelectBusiness/index.md +41 -41
  45. package/src/components/Business/AddSelectBusiness/index.tsx +318 -318
  46. package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +111 -111
  47. package/src/components/Business/BsLayouts/Components/AllFunc/index.less +153 -153
  48. package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +70 -70
  49. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +90 -90
  50. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +37 -37
  51. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +242 -242
  52. package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +384 -384
  53. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +285 -285
  54. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +74 -74
  55. package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +170 -170
  56. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +64 -64
  57. package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +153 -153
  58. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +72 -72
  59. package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +157 -157
  60. package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +85 -85
  61. package/src/components/Business/BsLayouts/Components/RightContent/home.less +218 -218
  62. package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +156 -156
  63. package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +160 -160
  64. package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +75 -75
  65. package/src/components/Business/BsLayouts/index.less +79 -79
  66. package/src/components/Business/BsLayouts/index.tsx +1469 -1469
  67. package/src/components/Business/BsLayouts/service.ts +10 -10
  68. package/src/components/Business/BsLayouts/utils.tsx +210 -210
  69. package/src/components/Business/BsSulaQueryTable/index.less +219 -219
  70. package/src/components/Business/BsSulaQueryTable/index.tsx +505 -505
  71. package/src/components/Business/BsSulaQueryTable/setting.tsx +799 -799
  72. package/src/components/Business/BsSulaQueryTable/utils.less +65 -65
  73. package/src/components/Business/BsSulaQueryTable/utils.tsx +688 -688
  74. package/src/components/Business/CommodityEntry/index.md +70 -70
  75. package/src/components/Business/CommodityEntry/index.tsx +80 -80
  76. package/src/components/Business/CommonAlert/index.tsx +23 -23
  77. package/src/components/Business/CommonGuideWrapper/index.less +111 -111
  78. package/src/components/Business/CommonGuideWrapper/index.md +39 -39
  79. package/src/components/Business/CommonGuideWrapper/index.tsx +83 -83
  80. package/src/components/Business/DetailPageWrapper/index.less +79 -79
  81. package/src/components/Business/DetailPageWrapper/index.tsx +335 -335
  82. package/src/components/Business/DetailPageWrapper/utils.tsx +100 -100
  83. package/src/components/Business/HomePageWrapper/index.less +33 -33
  84. package/src/components/Business/HomePageWrapper/index.md +45 -45
  85. package/src/components/Business/HomePageWrapper/index.tsx +162 -162
  86. package/src/components/Business/SearchSelect/BusinessUtils.ts +1478 -1478
  87. package/src/components/Business/SearchSelect/common.ts +53 -53
  88. package/src/components/Business/SearchSelect/index.md +1137 -1137
  89. package/src/components/Business/SearchSelect/index.tsx +51 -51
  90. package/src/components/Business/SearchSelect/utils.ts +100 -100
  91. package/src/components/Business/StateFlow/index.less +130 -130
  92. package/src/components/Business/StateFlow/index.md +60 -60
  93. package/src/components/Business/StateFlow/index.tsx +29 -29
  94. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  95. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  96. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  97. package/src/components/Business/columnSettingTable/columnSetting.tsx +763 -763
  98. package/src/components/Business/columnSettingTable/index.less +247 -247
  99. package/src/components/Business/columnSettingTable/index.md +357 -357
  100. package/src/components/Business/columnSettingTable/index.tsx +232 -232
  101. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +240 -240
  102. package/src/components/Business/columnSettingTable/utils.tsx +68 -68
  103. package/src/components/Functional/AddSelect/index.less +367 -367
  104. package/src/components/Functional/AddSelect/index.md +122 -122
  105. package/src/components/Functional/AddSelect/index.tsx +992 -992
  106. package/src/components/Functional/BillEntry/index.less +371 -371
  107. package/src/components/Functional/BillEntry/index.md +39 -39
  108. package/src/components/Functional/BillEntry/index.tsx +671 -671
  109. package/src/components/Functional/DataImport/index.less +63 -63
  110. package/src/components/Functional/DataImport/index.md +44 -44
  111. package/src/components/Functional/DataImport/index.tsx +695 -695
  112. package/src/components/Functional/DataValidation/index.less +63 -63
  113. package/src/components/Functional/DataValidation/index.md +39 -39
  114. package/src/components/Functional/DataValidation/index.tsx +687 -687
  115. package/src/components/Functional/ExportFunctions/ExportIcon/index.md +37 -37
  116. package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +59 -59
  117. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  118. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  119. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  120. package/src/components/Functional/SearchSelect/index.less +115 -115
  121. package/src/components/Functional/SearchSelect/index.md +141 -141
  122. package/src/components/Functional/SearchSelect/index.tsx +813 -813
  123. package/src/components/Functional/SearchSelect/utils.ts +6 -6
  124. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  125. package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
  126. package/src/index.ts +31 -31
  127. package/src/styles/bsDefault.less +1906 -1906
  128. package/src/utils/CheckOneUser/index.md +39 -39
  129. package/src/utils/CheckOneUser/index.ts +51 -51
  130. package/src/utils/TableUtils.tsx +18 -18
  131. package/src/utils/checkUtils.ts +39 -39
  132. package/src/utils/enumConfig.ts +10 -10
  133. package/src/utils/index.ts +2 -2
  134. package/src/utils/requestUtils.ts +33 -33
  135. package/src/utils/utils.ts +57 -57
  136. package/tsconfig.json +29 -29
  137. package/typings.d.ts +4 -4
  138. package/dist/utils/TableUtils.d.ts +0 -11
@@ -1,318 +1,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
- 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
+ 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
+ };