@bit-sun/business-component 2.2.49 → 2.3.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/common/ENUM.d.ts +40 -0
  2. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +2 -2
  3. package/dist/components/Business/SearchSelect/common.d.ts +9 -1
  4. package/dist/components/Business/TreeSearchSelect/utils.d.ts +3 -1
  5. package/dist/components/Functional/AddSelect/helps.d.ts +13 -0
  6. package/dist/components/Functional/BsAntdSula/BsCascader/index.d.ts +18 -0
  7. package/dist/components/Functional/BsAntdSula/index.d.ts +1 -0
  8. package/dist/components/Solution/RuleComponent/Formula.d.ts +8 -0
  9. package/dist/components/Solution/RuleComponent/services.d.ts +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.esm.js +10845 -11311
  12. package/dist/index.js +10806 -11268
  13. package/dist/utils/LocalstorageUtils.d.ts +1 -0
  14. package/dist/utils/index.d.ts +1 -0
  15. package/dist/utils/utils.d.ts +7 -0
  16. package/package.json +2 -1
  17. package/src/common/ENUM.ts +41 -0
  18. package/src/components/Business/AddSelectBusiness/index.md +1 -0
  19. package/src/components/Business/AddSelectBusiness/index.tsx +375 -176
  20. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +1 -1
  21. package/src/components/Business/BsSulaQueryTable/index.tsx +20 -12
  22. package/src/components/Business/BsSulaQueryTable/setting.tsx +36 -16
  23. package/src/components/Business/BsSulaQueryTable/utils.tsx +31 -29
  24. package/src/components/Business/JsonQueryTable/components/FieldsSettingsTable.tsx +4 -0
  25. package/src/components/Business/JsonQueryTable/index.tsx +248 -33
  26. package/src/components/Business/JsonQueryTable/static.ts +5 -5
  27. package/src/components/Business/SearchSelect/BusinessUtils.ts +37 -7
  28. package/src/components/Business/SearchSelect/common.ts +23 -1
  29. package/src/components/Business/SearchSelect/index.md +12 -2
  30. package/src/components/Business/SearchSelect/index.tsx +5 -2
  31. package/src/components/Business/TreeSearchSelect/index.md +2 -0
  32. package/src/components/Business/TreeSearchSelect/index.tsx +1 -2
  33. package/src/components/Business/TreeSearchSelect/utils.ts +7 -1
  34. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +1 -1
  35. package/src/components/Business/columnSettingTable/utils.tsx +30 -28
  36. package/src/components/Business/moreTreeTable/FixedScrollBar.tsx +1 -0
  37. package/src/components/Business/moreTreeTable/index.md +2 -2
  38. package/src/components/Business/moreTreeTable/index.tsx +24 -17
  39. package/src/components/Functional/AddSelect/helps.ts +65 -0
  40. package/src/components/Functional/AddSelect/index.tsx +13 -122
  41. package/src/components/Functional/BsAntdSula/BsCascader/index.md +62 -0
  42. package/src/components/Functional/BsAntdSula/BsCascader/index.tsx +178 -0
  43. package/src/components/Functional/BsAntdSula/index.ts +2 -0
  44. package/src/components/Functional/EllipsisTooltip/index.d.ts +5 -0
  45. package/src/components/Functional/EllipsisTooltip/index.js +36 -0
  46. package/src/components/Functional/EllipsisTooltip/index.md +30 -0
  47. package/src/components/Functional/SearchSelect/index.tsx +97 -60
  48. package/src/components/Functional/TreeSearchSelect/index.tsx +44 -7
  49. package/src/components/Solution/RuleComponent/Formula.tsx +335 -0
  50. package/src/components/Solution/RuleComponent/index.d.ts +29 -0
  51. package/src/components/Solution/RuleComponent/index.js +2032 -0
  52. package/src/components/Solution/RuleComponent/index.less +230 -0
  53. package/src/components/Solution/RuleComponent/renderSpecificAction.js +99 -0
  54. package/src/components/Solution/RuleComponent/ruleFiled.js +2107 -0
  55. package/src/components/Solution/RuleComponent/services.ts +13 -0
  56. package/src/components/Solution/RuleComponent/util.js +139 -0
  57. package/src/index.ts +4 -0
  58. package/src/utils/LocalstorageUtils.ts +5 -0
  59. package/src/utils/index.ts +1 -0
  60. package/src/utils/utils.ts +29 -0
@@ -11,17 +11,24 @@ import axios from 'axios';
11
11
  import { AddSelect } from '../../../index';
12
12
  import { tableColumnsImage } from '@/components/Business/BsSulaQueryTable/utils';
13
13
  import { getSkuImg } from '@/utils/TableUtils';
14
+ import { getEmployeeId } from '@/utils/LocalstorageUtils';
15
+ // import { getCurrentTargetBgId } from '@/utils/LocalstorageUtils';
14
16
 
15
17
  function handleSelectColumn(c: any, parentProps: any) {
16
18
  let result = c;
19
+ const showColumns = parentProps?.showColumns || [];
17
20
  const exceptColumns = parentProps?.exceptColumns || [];
18
21
  const coverColumns = parentProps?.coverColumns || [];
19
22
  const additionColumns = parentProps?.additionColumns || [];
23
+ // 仅展示内容
24
+ if(showColumns?.length) {
25
+ result = result.filter((i: any) => showColumns.includes(i.dataIndex))
26
+ }
20
27
  // 过滤不需要展示内容
21
28
  if(exceptColumns?.length) {
22
29
  result = result.filter((i: any) => !exceptColumns.includes(i.dataIndex))
23
30
  }
24
- // 追加
31
+ // 追加(最好不用这个,当组件不固定时候会有影响)
25
32
  if(additionColumns?.length) {
26
33
  additionColumns.forEach((i: any) => {
27
34
  result.splice(i.position,0,i.column)
@@ -33,12 +40,56 @@ function handleSelectColumn(c: any, parentProps: any) {
33
40
  }
34
41
  return result
35
42
  }
43
+ function handleSearchForm(c: any, parentProps: any) {
44
+ let result = c;
45
+ const showTableSearchForm = parentProps?.showTableSearchForm || [];
46
+ const exceptTableSearchForm= parentProps?.exceptTableSearchForm|| [];
47
+ const coverTableSearchForm = parentProps?.coverTableSearchForm || [];
48
+ // 仅展示内容
49
+ if(showTableSearchForm?.length) {
50
+ result = result.filter((i: any) => showTableSearchForm.includes(i.name))
51
+ }
52
+ // 过滤不需要展示内容
53
+ if(exceptTableSearchForm?.length) {
54
+ result = result.filter((i: any) => !exceptTableSearchForm.includes(i.name))
55
+ }
56
+ // 覆盖内容
57
+ if(coverTableSearchForm?.length) {
58
+ result = coverTableSearchForm;
59
+ }
60
+ return result;
61
+ }
62
+ function handleFormSearchSourceLoad(c: any, parentProps: any) {
63
+ let result = c;
64
+ const showTableFormSearchSourceLoad = parentProps?.showTableFormSearchSourceLoad || [];
65
+ const exceptTableFormSearchSourceLoad= parentProps?.exceptTableFormSearchSourceLoad|| [];
66
+ const coverTableFormSearchSourceLoad = parentProps?.coverTableFormSearchSourceLoad || [];
67
+ const noNeedTableFormSearchSourceLoad = parentProps?.noNeedTableFormSearchSourceLoad
68
+ // 仅展示内容
69
+ if(showTableFormSearchSourceLoad?.length) {
70
+ result = result.filter((i: any) => showTableFormSearchSourceLoad.includes(i.url))
71
+ }
72
+ // 过滤不需要展示内容
73
+ if(exceptTableFormSearchSourceLoad?.length) {
74
+ result = result.filter((i: any) => !exceptTableFormSearchSourceLoad.includes(i.url))
75
+ }
76
+ // 覆盖内容
77
+ if(coverTableFormSearchSourceLoad?.length) {
78
+ result = coverTableFormSearchSourceLoad;
79
+ }
80
+ // 不需要默认请求
81
+ if(noNeedTableFormSearchSourceLoad) {
82
+ result = [];
83
+ }
84
+ return result;
85
+ }
36
86
 
37
87
  export const AddSkuSelect = (parProps: any) => {
38
88
  const selectProps = {
39
89
  mode: 'multiple',
40
90
  }
41
91
  const [value, setValue] = useState(selectProps?.mode ? [] : null);
92
+ const isNoUseItemBarcode = parProps?.noUseItemEancode !== undefined ? parProps?.noUseItemEancode : true; // 默认不加商品条码,兼容老项目
42
93
  //注⚠️:自定义过表头的请记得传tableCodeList参数
43
94
  const initialSelectColumn = [
44
95
  {
@@ -46,6 +97,21 @@ export const AddSkuSelect = (parProps: any) => {
46
97
  width: 150,
47
98
  dataIndex: 'skuCode',
48
99
  },
100
+ ...(isNoUseItemBarcode ? [] : [
101
+ {
102
+ title: '商品条码',
103
+ width: 100,
104
+ ellipsis: {
105
+ showTitle: false,
106
+ },
107
+ dataIndex: 'itemEancode',
108
+ render: (text: any) => (
109
+ <Tooltip placement="topLeft" title={text}>
110
+ {text}
111
+ </Tooltip>
112
+ ),
113
+ }
114
+ ]),
49
115
  {
50
116
  title: 'SKU名称',
51
117
  width: 200,
@@ -123,43 +189,161 @@ export const AddSkuSelect = (parProps: any) => {
123
189
  dataIndex: 'propertyNameAndValue',
124
190
  }
125
191
  ]
126
- const mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps)
127
- const props = {
128
- buttonText: parProps.buttonText || '新增',
129
- buttonProps: parProps.buttonProps || {},
130
- tableCodeList: parProps.tableCodeList || [],
131
- value,
132
- // labelInValue: true, // 非必填 默认为false
133
- requestConfig: {
134
- url: `/items/sku/pager/v2`,
135
- filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
136
- otherParams: {
137
- 'qp-combination-eq': false,
138
- 'qp-approveStatus-eq': 1,
139
- 'qp-status-eq': 1,
140
- }, // 默认参数
141
- mappingTextField: 'name',
142
- mappingValueField: 'skuCode',
143
- ...parProps.requestConfig
192
+ const mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps);
193
+ const initialTableColumn = [
194
+ {
195
+ title: 'SKU编码',
196
+ width: 150,
197
+ dataIndex: 'skuCode',
144
198
  },
145
- selectProps,
146
- onChange: (value: any) => {
147
- console.log(value)
148
- setValue(value)
199
+ {
200
+ title: 'SKU名称',
201
+ width: 200,
202
+ ellipsis: {
203
+ showTitle: false,
204
+ },
205
+ render: (text: any) => (
206
+ <Tooltip placement="topLeft" title={text}>
207
+ {text}
208
+ </Tooltip>
209
+ ),
210
+ dataIndex: 'name',
149
211
  },
150
- beforeShowModal: parProps?.beforeShowModal,
151
- onSaveCallback: parProps.onSaveCallback,
152
- businessType: 'sku',
153
- isAllowRepeatedSelect: !!parProps?.isAllowRepeatedSelect,
154
- };
155
- const modalTableProps = {
156
- modalTableTitle: '选择商品',
157
- tableSearchForm: [
212
+ {
213
+ title: '图片',
214
+ dataIndex: 'itemUrl',
215
+ width: 200,
216
+ ellipsis: {
217
+ showTitle: false,
218
+ },
219
+ render: (text: any,record: any) => (
220
+ <Tooltip placement="topLeft" title={text}>
221
+ {tableColumnsImage(getSkuImg(record),{ width: 20, height: 20 })}
222
+ </Tooltip>
223
+ ),
224
+ },
225
+ ...(isNoUseItemBarcode ? []: [
158
226
  {
159
- name: 'qp-skuCode-like', label: 'SKU编码'
227
+ title: '商品条码',
228
+ width: 100,
229
+ ellipsis: {
230
+ showTitle: false,
231
+ },
232
+ dataIndex: 'itemEancode',
233
+ render: (text: any) => (
234
+ <Tooltip placement="topLeft" title={text}>
235
+ {text}
236
+ </Tooltip>
237
+ ),
238
+ }
239
+ ]),
240
+ {
241
+ title: '所属SPU名称',
242
+ width: 100,
243
+ ellipsis: {
244
+ showTitle: false,
160
245
  },
161
- { name: 'qp-skuName-like', label: 'SKU名称' },
162
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
246
+ dataIndex: 'itemName',
247
+ render: (text: any) => (
248
+ <Tooltip placement="topLeft" title={text}>
249
+ {text}
250
+ </Tooltip>
251
+ ),
252
+ },
253
+ {
254
+ title: '所属SPU编码',
255
+ width: 100,
256
+ ellipsis: {
257
+ showTitle: false,
258
+ },
259
+ dataIndex: 'itemCode',
260
+ render: (text: any) => (
261
+ <Tooltip placement="topLeft" title={text}>
262
+ {text}
263
+ </Tooltip>
264
+ ),
265
+ },
266
+ {
267
+ title: '外部编码',
268
+ width: 100,
269
+ ellipsis: {
270
+ showTitle: false,
271
+ },
272
+ render: (text: any) => (
273
+ <Tooltip placement="topLeft" title={text}>
274
+ {text}
275
+ </Tooltip>
276
+ ),
277
+ dataIndex: 'externalCode',
278
+ },
279
+ {
280
+ title: '规格',
281
+ width: 100,
282
+ ellipsis: {
283
+ showTitle: false,
284
+ },
285
+ render: (text: any) => (
286
+ <Tooltip placement="topLeft" title={text}>
287
+ {text}
288
+ </Tooltip>
289
+ ),
290
+ dataIndex: 'propertyNameAndValue',
291
+ },
292
+ {
293
+ title: '类目',
294
+ width: 100,
295
+ ellipsis: {
296
+ showTitle: false,
297
+ },
298
+ render: (text: any) => (
299
+ <Tooltip placement="topLeft" title={text}>
300
+ {text}
301
+ </Tooltip>
302
+ ),
303
+ dataIndex: 'categoryName',
304
+ },
305
+ {
306
+ title: '品类',
307
+ width: 100,
308
+ ellipsis: {
309
+ showTitle: false,
310
+ },
311
+ render: (text: any) => (
312
+ <Tooltip placement="topLeft" title={text}>
313
+ {text}
314
+ </Tooltip>
315
+ ),
316
+ dataIndex: 'className',
317
+ },
318
+ {
319
+ title: '品牌',
320
+ width: 100,
321
+ ellipsis: {
322
+ showTitle: false,
323
+ },
324
+ render: (text: any) => (
325
+ <Tooltip placement="topLeft" title={text}>
326
+ {text}
327
+ </Tooltip>
328
+ ),
329
+ dataIndex: 'brandName',
330
+ },
331
+ ]
332
+ const mTpTableColumn = handleSelectColumn(initialTableColumn, parProps);
333
+ const initialTableSearchForm = [
334
+ {
335
+ name: 'qp-skuCode-like', label: 'SKU编码'
336
+ },
337
+ { name: 'qp-skuName-like', label: 'SKU名称' },
338
+ ...(isNoUseItemBarcode ? []: [
339
+ { name: 'qp-code-in', label: '商品条码', field: {
340
+ type: 'multipleQueryInput',
341
+ props: {
342
+ ...(parProps.requestConfig?.itemEancodeValueRequestConfig || {}),
343
+ },
344
+ }}
345
+ ]),
346
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
163
347
  type: 'select',
164
348
  props: {
165
349
  mode: 'multiple',
@@ -173,7 +357,7 @@ export const AddSkuSelect = (parProps: any) => {
173
357
  option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
174
358
  },
175
359
  } },
176
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
360
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
177
361
  type: 'treeSelect',
178
362
  props: {
179
363
  treeData: [],
@@ -190,146 +374,69 @@ export const AddSkuSelect = (parProps: any) => {
190
374
  },
191
375
  dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
192
376
  },
193
- } }
194
- ],
195
- tableColumns: [
196
- {
197
- title: 'SKU编码',
198
- width: 150,
199
- dataIndex: 'skuCode',
200
- },
201
- {
202
- title: 'SKU名称',
203
- width: 200,
204
- ellipsis: {
205
- showTitle: false,
206
- },
207
- render: (text: any) => (
208
- <Tooltip placement="topLeft" title={text}>
209
- {text}
210
- </Tooltip>
211
- ),
212
- dataIndex: 'name',
213
- },
214
- {
215
- title: '图片',
216
- dataIndex: 'itemUrl',
217
- width: 200,
218
- ellipsis: {
219
- showTitle: false,
220
- },
221
- render: (text: any,record: any) => (
222
- <Tooltip placement="topLeft" title={text}>
223
- {tableColumnsImage(getSkuImg(record),{ width: 20, height: 20 })}
224
- </Tooltip>
225
- ),
226
- },
227
- {
228
- title: '国际条码',
229
- width: 100,
230
- ellipsis: {
231
- showTitle: false,
232
- },
233
- dataIndex: 'barCode',
234
- render: (text: any) => (
235
- <Tooltip placement="topLeft" title={text}>
236
- {text}
237
- </Tooltip>
238
- ),
239
- },
240
- {
241
- title: '所属SPU名称',
242
- width: 100,
243
- ellipsis: {
244
- showTitle: false,
245
- },
246
- dataIndex: 'itemName',
247
- render: (text: any) => (
248
- <Tooltip placement="topLeft" title={text}>
249
- {text}
250
- </Tooltip>
251
- ),
252
- },
253
- {
254
- title: '所属SPU编码',
255
- width: 100,
256
- ellipsis: {
257
- showTitle: false,
258
- },
259
- dataIndex: 'itemCode',
260
- render: (text: any) => (
261
- <Tooltip placement="topLeft" title={text}>
262
- {text}
263
- </Tooltip>
264
- ),
265
- },
266
- {
267
- title: '外部编码',
268
- width: 100,
269
- ellipsis: {
270
- showTitle: false,
271
- },
272
- render: (text: any) => (
273
- <Tooltip placement="topLeft" title={text}>
274
- {text}
275
- </Tooltip>
276
- ),
277
- dataIndex: 'externalCode',
278
- },
279
- {
280
- title: '规格',
281
- width: 100,
282
- ellipsis: {
283
- showTitle: false,
284
- },
285
- render: (text: any) => (
286
- <Tooltip placement="topLeft" title={text}>
287
- {text}
288
- </Tooltip>
289
- ),
290
- dataIndex: 'propertyNameAndValue',
291
- },
292
- {
293
- title: '类目',
294
- width: 100,
295
- ellipsis: {
296
- showTitle: false,
297
- },
298
- render: (text: any) => (
299
- <Tooltip placement="topLeft" title={text}>
300
- {text}
301
- </Tooltip>
302
- ),
303
- dataIndex: 'categoryName',
304
- },
305
- {
306
- title: '品类',
307
- width: 100,
308
- ellipsis: {
309
- showTitle: false,
310
- },
311
- render: (text: any) => (
312
- <Tooltip placement="topLeft" title={text}>
313
- {text}
314
- </Tooltip>
315
- ),
316
- dataIndex: 'className',
377
+ } },
378
+ ...(parProps?.addTableSearchForm||[])
379
+ ]
380
+ const mTpTableSearchForm = handleSearchForm(initialTableSearchForm, parProps);
381
+ const initialPromiseLoadList = [
382
+ {
383
+ url: `/items/brand/queryBrandList`,
384
+ params: {
385
+ pageSize: 5000,
386
+ currentPage: 1,
387
+ 'ctl-withAuth': true
317
388
  },
318
- {
319
- title: '品牌',
320
- width: 100,
321
- ellipsis: {
322
- showTitle: false,
323
- },
324
- render: (text: any) => (
325
- <Tooltip placement="topLeft" title={text}>
326
- {text}
327
- </Tooltip>
328
- ),
329
- dataIndex: 'brandName',
389
+ resType: 'list',
390
+ resPosition: isNoUseItemBarcode ? 2 : 3,
391
+ resKeyValue: ['id','name']
392
+ },
393
+ {
394
+ url: `/items/category/queryCategoryTree`,
395
+ params: {
396
+ pageSize: 5000,
397
+ currentPage: 1,
330
398
  },
331
- ],
332
- selectColumn: mTpSelectColumn
399
+ resType: 'treeList',
400
+ resPosition: isNoUseItemBarcode ? 3 : 4
401
+ },
402
+ ]
403
+ const mTpPromiseLoadList = handleFormSearchSourceLoad(initialPromiseLoadList, parProps);
404
+ const props = {
405
+ buttonText: parProps.buttonText || '新增',
406
+ buttonProps: parProps.buttonProps || {},
407
+ tableCodeList: parProps.tableCodeList || [],
408
+ value,
409
+ // labelInValue: true, // 非必填 默认为false
410
+ requestConfig: {
411
+ url: `/items/sku/pager/v2`,
412
+ filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
413
+ otherParams: {
414
+ 'qp-combination-eq': false,
415
+ 'qp-approveStatus-eq': 1,
416
+ 'qp-status-eq': 1,
417
+ // 'useOrgSign': getCurrentTargetBgId(), // 根据品牌、账号授权的组织+商品授权使用组织做权限过滤 这个交给业务使用的地方去做,传addOtherParams:{useOrgSign:单据中所选组织}
418
+ ...(parProps?.requestConfig?.addOtherParams || {}), // 允许在默认参数基础上,追加/覆盖已有 参数
419
+ }, // 默认参数
420
+ mappingTextField: 'name',
421
+ mappingValueField: 'skuCode',
422
+ ...parProps.requestConfig
423
+ },
424
+ selectProps,
425
+ onChange: (value: any) => {
426
+ console.log(value)
427
+ setValue(value)
428
+ },
429
+ beforeShowModal: parProps?.beforeShowModal,
430
+ onSaveCallback: parProps.onSaveCallback,
431
+ businessType: 'sku',
432
+ isAllowRepeatedSelect: !!parProps?.isAllowRepeatedSelect,
433
+ };
434
+ const modalTableProps = {
435
+ modalTableTitle: '选择商品',
436
+ tableSearchForm: mTpTableSearchForm,
437
+ tableColumns: mTpTableColumn,
438
+ selectColumn: mTpSelectColumn,
439
+ promiseLoadList: mTpPromiseLoadList,
333
440
  }
334
441
 
335
442
  return (
@@ -410,6 +517,49 @@ export const AddSkcSelect = (parProps: any) => {
410
517
  },
411
518
  ]
412
519
  const mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps)
520
+ const initialPromiseLoadList = [
521
+ {
522
+ url: `/items/item/propertyValue/sizeBySkcConfig`,
523
+ params: {
524
+ pageSize: 10000,
525
+ currentPage: 1,
526
+ type: 2, // 类型:1尺码;2颜色
527
+ },
528
+ resType: 'list',
529
+ resPosition: 3,
530
+ resKeyValue: ['value','value']
531
+ },
532
+ {
533
+ url: `/items/category/queryCategoryTree`,
534
+ params: {
535
+ pageSize: 5000,
536
+ currentPage: 1,
537
+ },
538
+ resType: 'treeList',
539
+ resPosition: 4,
540
+ },
541
+ {
542
+ url: `/items/class/withProperty`,
543
+ params: {
544
+ pageSize: 5000,
545
+ currentPage: 1,
546
+ },
547
+ resType: 'list',
548
+ resPosition: 5,
549
+ resKeyValue: ['id','name']
550
+ },
551
+ {
552
+ url: `/items/brand/queryBrandList`,
553
+ params: {
554
+ pageSize: 5000,
555
+ currentPage: 1,
556
+ 'ctl-withAuth': true
557
+ },
558
+ resType: 'list',
559
+ resPosition: 6,
560
+ resKeyValue: ['id','name']
561
+ },
562
+ ]
413
563
  const props = {
414
564
  buttonText: parProps.buttonText || '新增',
415
565
  buttonProps: parProps.buttonProps || {},
@@ -419,7 +569,10 @@ export const AddSkcSelect = (parProps: any) => {
419
569
  requestConfig: {
420
570
  url: `/items/skc/skcSelect`,
421
571
  filter: 'qp-name-like', // 过滤参数 支持'qp-name-like'和['qp-name-like', 'qp-code-like']两种结构
422
- otherParams: { 'qp-skcStatus-eq': 1, }, // 默认参数
572
+ otherParams: {
573
+ 'qp-skcStatus-eq': 1,
574
+ ...(parProps?.requestConfig?.addOtherParams || {}), // 允许在默认参数基础上,追加/覆盖已有 参数
575
+ }, // 默认参数
423
576
  mappingTextField: 'name',
424
577
  mappingValueField: 'code',
425
578
  ...parProps.requestConfig
@@ -587,6 +740,7 @@ export const AddSkcSelect = (parProps: any) => {
587
740
  },
588
741
  ],
589
742
  selectColumn: mTpSelectColumn,
743
+ promiseLoadList: initialPromiseLoadList
590
744
  }
591
745
 
592
746
  return (
@@ -681,6 +835,49 @@ export const AddSpuSelect = (parProps: any) => {
681
835
  },
682
836
  ]
683
837
  const mTpSelectColumn = handleSelectColumn(initialSelectColumn, parProps)
838
+ const initialPromiseLoadList = [
839
+ {
840
+ url: `/user/orgViewNode/listNoPage`,
841
+ params: {
842
+ 'qp-employeeId-eq': getEmployeeId(),
843
+ 'qp-orgViewCode-eq': 'business-organizational-view',
844
+ 'ctl-withDefaultOrg': true,
845
+ },
846
+ resType: 'list',
847
+ resPosition: 2,
848
+ resKeyValue: ['targetId','name']
849
+ },
850
+ {
851
+ url: `/items/brand/queryBrandList`,
852
+ params: {
853
+ pageSize: 5000,
854
+ currentPage: 1,
855
+ 'ctl-withAuth': true
856
+ },
857
+ resType: 'list',
858
+ resPosition: 3,
859
+ resKeyValue: ['id','name']
860
+ },
861
+ {
862
+ url: `/items/category/queryCategoryTree`,
863
+ params: {
864
+ pageSize: 5000,
865
+ currentPage: 1,
866
+ },
867
+ resType: 'treeList',
868
+ resPosition: 4,
869
+ },
870
+ {
871
+ url: `/items/class/withProperty`,
872
+ params: {
873
+ pageSize: 5000,
874
+ currentPage: 1,
875
+ },
876
+ resType: 'list',
877
+ resPosition: 5,
878
+ resKeyValue: ['id','name']
879
+ },
880
+ ]
684
881
  const props = {
685
882
  buttonText: parProps.buttonText || '新增',
686
883
  buttonProps: parProps.buttonProps || {},
@@ -693,7 +890,8 @@ export const AddSpuSelect = (parProps: any) => {
693
890
  otherParams: {
694
891
  'qp-approveStatus-eq': 1, // 审核状态(0.待审批;1.审批通过;2.驳回;3.审批未通过)
695
892
  'qp-status-eq': 1,
696
- sorter: 'desc-id'
893
+ sorter: 'desc-id',
894
+ ...(parProps?.requestConfig?.addOtherParams || {}), // 允许在默认参数基础上,追加/覆盖已有 参数
697
895
  }, // 默认参数
698
896
  mappingTextField: 'name',
699
897
  mappingValueField: 'itemCode',
@@ -847,7 +1045,8 @@ export const AddSpuSelect = (parProps: any) => {
847
1045
  dataIndex: 'className',
848
1046
  },
849
1047
  ],
850
- selectColumn: mTpSelectColumn
1048
+ selectColumn: mTpSelectColumn,
1049
+ promiseLoadList: initialPromiseLoadList
851
1050
  }
852
1051
 
853
1052
  return (
@@ -555,7 +555,7 @@ class SearchItemTable extends React.Component {
555
555
  </div>
556
556
  </Modal>
557
557
  )}
558
- <div onClick={this.showModal} style={{fontSize:14}}>搜索项设置</div>
558
+ <div onClick={this.showModal} style={{fontSize:14, textAlign: 'center'}}>搜索项设置</div>
559
559
  </div>
560
560
  );
561
561
  }