@bit-sun/business-component 1.1.29 → 1.1.30

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 (33) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +4 -4
  3. package/.gitlab-ci.yml +174 -174
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +28 -28
  7. package/README.md +27 -27
  8. package/dist/index.esm.js +3637 -2078
  9. package/dist/index.js +3637 -2078
  10. package/dist/utils/CheckOneUser/index.d.ts +1 -1
  11. package/docs/index.md +21 -21
  12. package/package.json +50 -50
  13. package/src/components/Business/CommodityEntry/index.md +69 -69
  14. package/src/components/Business/CommodityEntry/index.tsx +75 -75
  15. package/src/components/Business/SearchSelect/BusinessUtils.ts +948 -948
  16. package/src/components/Business/SearchSelect/common.ts +34 -34
  17. package/src/components/Business/SearchSelect/index.md +1004 -1004
  18. package/src/components/Business/SearchSelect/index.tsx +43 -43
  19. package/src/components/Business/SearchSelect/utils.ts +74 -74
  20. package/src/components/Functional/DataValidation/index.less +63 -63
  21. package/src/components/Functional/DataValidation/index.md +38 -38
  22. package/src/components/Functional/DataValidation/index.tsx +666 -661
  23. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  24. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  25. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  26. package/src/components/Functional/SearchSelect/index.less +115 -115
  27. package/src/components/Functional/SearchSelect/index.md +141 -141
  28. package/src/components/Functional/SearchSelect/index.tsx +714 -714
  29. package/src/index.ts +21 -21
  30. package/src/utils/CheckOneUser/index.md +39 -39
  31. package/src/utils/CheckOneUser/index.ts +51 -51
  32. package/tsconfig.json +29 -29
  33. package/typings.d.ts +2 -2
@@ -1,948 +1,948 @@
1
- // 此文件用于 处理业务组件 所用到的公共方法
2
- // @ts-nocheck
3
- import { shopFileType, arrivalPaySupportList, sharingType } from './common';
4
- import { getDictionarySource, getDictionaryTextByValue, loadSelectSource } from './utils';
5
-
6
- const hasDictSharingType = getDictionarySource('UC000013')?.length;
7
- const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
8
-
9
- export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: any, modalTableBusProps?:any) {
10
- // 默认type === 'supplier' 供应商选择器
11
- let requestConfig = {
12
- url: `${prefixUrl.selectPrefix}/supplier`,
13
- filter: 'qp-name,code-orGroup,like', // 过滤参数
14
- otherParams: {
15
- sorter: 'desc-id'
16
- }, // 默认参数
17
- ...requestConfigProp
18
- }
19
-
20
- /*
21
- * 处理 格式化下拉框数据源
22
- * reData 必传 promise返回响应的数据 格式为[{},{},{},...] Promise.all第一个参数数组有多少个数组长度就是多少,其中每个对象为每次请求的结果数据
23
- * 每个结果数据格式为{ status: '0', msg: 'success', data: { items: [], total: 1, size: 1, page: 1 }, traceId: 'baba..'}
24
- * position 必传 为获取Promise.all请求结果的位置
25
- * changePosition 必传 为搜索表单Form中需要更改数据源的Item项的位置
26
- * changeSearchForm 必传 为搜索表单Form数据
27
- * */
28
- const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
29
- const data = reData && reData[position]?.data;
30
- const list = Array.isArray(data) ? data :(data?.items || data?.list || []);
31
- const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
32
- changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
33
- }
34
-
35
- // 格式化树选择器数据源
36
- const mapSearchTree = (treeDataItem: any, resKeyValue: any) => {
37
- const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
38
- return {
39
- title: treeDataItem[resKeyValue[1]],
40
- value: treeDataItem[resKeyValue[0]],
41
- parentId: treeDataItem.parent,
42
- data: { ...treeDataItem },
43
- isLeaf: !haveChildren,
44
- disabled: haveChildren,
45
- children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue)) : [],
46
- };
47
- };
48
- const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
49
- const data = reData && reData[position]?.data;
50
- const formatData = (data &&
51
- Array.isArray(data) &&
52
- data.length &&
53
- data.map((ites: any) => mapSearchTree(ites, resKeyValue))) ||
54
- []
55
- changeSearchForm[changePosition].field.props.treeData = formatData;
56
- }
57
-
58
-
59
- let tableSearchForm: any [] = [];
60
- // 供应商选择器
61
- if(type === 'supplier') {
62
- tableSearchForm = [
63
- { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
64
- { name: 'qp-code-like', label: '供应商编码' },
65
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
66
- type: 'select',
67
- props: {
68
- mode: 'multiple',
69
- notFoundContent: '暂无数据',
70
- allowClear: true,
71
- showSearch: true,
72
- showArrow: true,
73
- maxTagCount: 1,
74
- optionFilterProp: 'children',
75
- filterOption: (input: string, option: { props: { children: string } }) =>
76
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
77
- },
78
- } },
79
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
80
- type: 'select',
81
- props: {
82
- mode: 'multiple',
83
- notFoundContent: '暂无数据',
84
- allowClear: true,
85
- showSearch: true,
86
- showArrow: true,
87
- maxTagCount: 1,
88
- optionFilterProp: 'children',
89
- filterOption: (input: string, option: { props: { children: string } }) =>
90
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
91
- },
92
- } },
93
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
94
- type: 'select',
95
- props: {
96
- mode: 'multiple',
97
- notFoundContent: '暂无数据',
98
- allowClear: true,
99
- showSearch: true,
100
- showArrow: true,
101
- maxTagCount: 1,
102
- optionFilterProp: 'children',
103
- filterOption: (input: string, option: { props: { children: string } }) =>
104
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
105
- },
106
- } },
107
- { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
108
- ]
109
- Promise.all([
110
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
111
- pageSize: 5000,
112
- currentPage: 1,
113
- 'qp-companyType-eq': '30',
114
- }),
115
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
116
- pageSize: 5000,
117
- currentPage: 1,
118
- }),
119
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
120
- pageSize: 5000,
121
- currentPage: 1,
122
- 'qp-companyType-eq': '20',
123
- })
124
- ]).then((x: any)=>{
125
- formatSource(x,0, 2, tableSearchForm);
126
- formatSource(x,1, 3, tableSearchForm);
127
- formatSource(x,2, 4, tableSearchForm);
128
- })
129
- }
130
- let modalTableProps = {
131
- modalTableTitle: '选择供应商',
132
- tableSearchForm,
133
- tableColumns: [
134
- {
135
- title: '供应商编码',
136
- dataIndex: 'code',
137
- },
138
- {
139
- title: '供应商名称',
140
- dataIndex: 'name',
141
- },
142
- {
143
- title: '归属集团',
144
- dataIndex: 'conglomerateName',
145
- },
146
- {
147
- title: '归属法人公司',
148
- dataIndex: 'legalCompanyName',
149
- },
150
- {
151
- title: '归属核算主体',
152
- dataIndex: 'accountingName',
153
- },
154
- {
155
- title: '共享类型',
156
- dataIndex: 'sharingType',
157
- render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text
158
- },
159
- ],
160
- ...modalTableBusProps,
161
- }
162
- let needModalTable = true;
163
-
164
- // 商品选择器
165
- if(type === 'skuCommodity') {
166
- requestConfig = {
167
- url: `${prefixUrl.selectPrefix}/sku/pager/v2`,
168
- filter: 'skuCodeAndSkuName', // 过滤参数
169
- mappingTextField: 'name',
170
- mappingValueField: 'skuCode',
171
- mappingTextShowTextField: ['name', 'propertyNameAndValue'],
172
- otherParams: {
173
- 'qp-approveStatus-eq': 1,
174
- 'qp-type-eq': 10, // 查唯一国际条码
175
- sorter: 'desc-id'
176
- }, // 默认参数
177
- sourceName: 'skuCode',
178
- ...requestConfigProp,
179
- }
180
- tableSearchForm = [
181
- { name: 'qp-skuName-like', label: 'SKU名称' },
182
- { name: 'qp-skuCode-like', label: 'SKU编码' },
183
- { name: 'qp-code-like', label: '国际条码' },
184
- { name: 'qp-itemName-like', label: '所属SPU名称' },
185
- { name: 'qp-itemCode-like', label: '所属SPU编码' },
186
- { name: 'qp-externalCode-like', label: '外部编码' },
187
- { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
188
- type: 'businessSearchSelect',
189
- props: {
190
- selectBusinessType: 'skuPropertyValue',
191
- selectProps: {
192
- mode: 'multiple',
193
- maxTagCount: 1,
194
- }
195
- },
196
- }
197
- },
198
- { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
199
- type: 'select',
200
- props: {
201
- mode: 'multiple',
202
- notFoundContent: '暂无数据',
203
- allowClear: true,
204
- showSearch: true,
205
- showArrow: true,
206
- maxTagCount: 1,
207
- optionFilterProp: 'children',
208
- filterOption: (input: string, option: { props: { children: string } }) =>
209
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
210
- },
211
- } },
212
- { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
213
- type: 'treeSelect',
214
- props: {
215
- treeData: [],
216
- treeCheckable: true,
217
- showSearch: true,
218
- allowClear: true,
219
- showArrow: true,
220
- treeNodeFilterProp: 'title',
221
- treeDefaultExpandAll: true,
222
- maxTagCount: 1,
223
- placeholder: '请选择',
224
- style: {
225
- width: '100%',
226
- },
227
- dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
228
- },
229
- } },
230
- { name: 'qp-classId-in', type: 'select', label: '品类', field: {
231
- type: 'select',
232
- props: {
233
- mode: 'multiple',
234
- notFoundContent: '暂无数据',
235
- allowClear: true,
236
- showSearch: true,
237
- showArrow: true,
238
- maxTagCount: 1,
239
- optionFilterProp: 'children',
240
- filterOption: (input: string, option: { props: { children: string } }) =>
241
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
242
- },
243
- } },
244
- ]
245
- Promise.all([
246
- loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
247
- pageSize: 5000,
248
- currentPage: 1,
249
- }),
250
- loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
251
- pageSize: 5000,
252
- currentPage: 1,
253
- }),
254
- loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
255
- pageSize: 5000,
256
- currentPage: 1,
257
- }),
258
- ]).then((x: any)=>{
259
- formatSource(x,0, 7, tableSearchForm,['id','name']);
260
- formatTreeDataSource(x,1, 8, tableSearchForm);
261
- formatSource(x,2, 9, tableSearchForm,['id','name']);
262
- })
263
- modalTableProps = {
264
- modalTableTitle: '选择SKU',
265
- tableSearchForm,
266
- tableColumns: [
267
- {
268
- title: 'SKU编码',
269
- dataIndex: 'skuCode',
270
- },
271
- {
272
- title: 'SKU名称',
273
- dataIndex: 'name',
274
- },
275
- {
276
- title: '国际条码',
277
- dataIndex: 'barCode',
278
- },
279
- {
280
- title: '所属SPU名称',
281
- dataIndex: 'itemName',
282
- },
283
- {
284
- title: '所属SPU编码',
285
- dataIndex: 'itemCode',
286
- },
287
- {
288
- title: '外部编码',
289
- dataIndex: 'externalCode',
290
- },
291
- {
292
- title: '规格',
293
- dataIndex: 'propertyNameAndValue',
294
- },
295
- {
296
- title: '类目',
297
- dataIndex: 'categoryName',
298
- },
299
- {
300
- title: '品类',
301
- dataIndex: 'className',
302
- },
303
- {
304
- title: '品牌',
305
- dataIndex: 'brandName',
306
- },
307
- ],
308
- ...modalTableBusProps
309
- }
310
- }
311
-
312
- // 商品规格选择器(无弹窗)
313
- if(type === 'skuPropertyValue') {
314
- requestConfig = {
315
- url: `${prefixUrl.selectPrefix}/skuPropertyValue/list`,
316
- filter: 'qp-value-like', // 过滤参数
317
- mappingTextField: 'value',
318
- mappingTextShowKeyField: 'propertyValueCode',
319
- mappingValueField: 'propertyValueCode',
320
- otherParams: {
321
- sorter: 'desc-id'
322
- }, // 默认参数
323
- sourceName: 'qp-propertyValueCode-in',
324
- ...requestConfigProp,
325
- }
326
- needModalTable = false
327
- }
328
-
329
- // 仓库选择器(物理、逻辑仓)
330
- if(type === 'physicalWarehouse') {
331
- requestConfig = {
332
- url: `${prefixUrl.selectPrefix}/physicalWarehouse`,
333
- filter: 'qp-physicalWarehouseName,physicalWarehouseCode-orGroup,like', // 过滤参数
334
- mappingTextField: 'physicalWarehouseName',
335
- mappingTextShowKeyField: 'physicalWarehouseCode',
336
- mappingValueField: 'id',
337
- otherParams: {
338
- 'qp-isEnable-eq': 1,
339
- sorter: 'desc-id'
340
- }, // 默认参数
341
- sourceName: 'warehouseIds',
342
- ...requestConfigProp,
343
- }
344
- tableSearchForm = [
345
- { name: 'qp-physicalWarehouseName-like', label: '物理仓名称' },
346
- { name: 'qp-physicalWarehouseCode-like', label: '物理仓编码' },
347
- { name: 'qp-physicalWarehouseType-eq', type: 'select', label: '物理仓类型', initialSource: getDictionarySource('SC00002') },
348
- { name: 'qp-companyCode-eq', type: 'select', label: '所属公司', field: {
349
- type: 'select',
350
- props: {
351
- mode: 'multiple',
352
- notFoundContent: '暂无数据',
353
- allowClear: true,
354
- showSearch: true,
355
- showArrow: true,
356
- maxTagCount: 1,
357
- optionFilterProp: 'children',
358
- filterOption: (input: string, option: { props: { children: string } }) =>
359
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
360
- },
361
- } },
362
- ]
363
- Promise.all([
364
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
365
- pageSize: 5000,
366
- currentPage: 1,
367
- 'qp-companyType-eq': 20,
368
- }),
369
- ]).then((x: any)=>{
370
- formatSource(x,0, 3, tableSearchForm);
371
- })
372
- modalTableProps = {
373
- modalTableTitle: '选择物理仓',
374
- tableSearchForm,
375
- tableColumns: [
376
- {
377
- title: '物理仓编码',
378
- dataIndex: 'physicalWarehouseCode',
379
- },
380
- {
381
- title: '物理仓名称',
382
- dataIndex: 'physicalWarehouseName',
383
- },
384
- {
385
- title: '物理仓类型',
386
- dataIndex: 'physicalWarehouseType',
387
- render: (text: number) => getDictionaryTextByValue('SC00002', text),
388
- },
389
- {
390
- title: '所属公司',
391
- dataIndex: 'companyName',
392
- },
393
- ],
394
- ...modalTableBusProps
395
- }
396
- }
397
- if(type === 'realWarehouse') {
398
- requestConfig = {
399
- url: `${prefixUrl.selectPrefix}/realWarehouse`,
400
- filter: 'qp-realWarehouseName,realWarehouseCode-orGroup,like', // 过滤参数
401
- mappingTextField: 'realWarehouseName',
402
- mappingTextShowKeyField: 'realWarehouseCode',
403
- mappingValueField: 'id',
404
- otherParams: {
405
- 'qp-isEnable-eq': 1,
406
- sorter: 'desc-id'
407
- }, // 默认参数
408
- sourceName: 'warehouseIds',
409
- ...requestConfigProp,
410
- }
411
- tableSearchForm = [
412
- { name: 'qp-realWarehouseName-like', label: '逻辑仓名称' },
413
- { name: 'qp-realWarehouseCode-like', label: '逻辑仓编码' },
414
- { name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
415
- ]
416
- modalTableProps = {
417
- modalTableTitle: '选择逻辑仓',
418
- tableSearchForm,
419
- tableColumns: [
420
- {
421
- title: '逻辑仓编码',
422
- dataIndex: 'realWarehouseCode',
423
- },
424
- {
425
- title: '逻辑仓名称',
426
- dataIndex: 'realWarehouseName',
427
- },
428
- {
429
- title: '逻辑仓类型',
430
- dataIndex: 'realWarehouseType',
431
- render: (text: number) => getDictionaryTextByValue('SC00004', text),
432
- },
433
- ],
434
- ...modalTableBusProps,
435
- }
436
- }
437
-
438
- // 仓库选择器(虚拟、渠道仓)(无弹窗)
439
- if(type === 'virtualWarehouse') {
440
- requestConfig = {
441
- url: `${prefixUrl.selectPrefix}/virtualWarehouse`,
442
- filter: 'qp-virtualWarehouseName,virtualWarehouseCode-orGroup,like', // 过滤参数
443
- mappingTextField: 'virtualWarehouseName',
444
- mappingTextShowKeyField: 'virtualWarehouseCode',
445
- mappingValueField: 'id',
446
- otherParams: {
447
- 'qp-isEnable-eq': 1,
448
- sorter: 'desc-id'
449
- }, // 默认参数
450
- sourceName: 'warehouseIds',
451
- ...requestConfigProp,
452
- }
453
- needModalTable = false
454
- }
455
- if(type === 'channelWarehouse') {
456
- requestConfig = {
457
- url: `${prefixUrl.selectPrefix}/channelWarehouse`,
458
- filter: 'qp-channelWarehouseName,channelWarehouseCode-orGroup,like', // 过滤参数
459
- mappingTextField: 'channelWarehouseName',
460
- mappingTextShowKeyField: 'channelWarehouseCode',
461
- mappingValueField: 'id',
462
- otherParams: {
463
- 'qp-isEnable-eq': 1,
464
- sorter: 'desc-id'
465
- }, // 默认参数
466
- sourceName: 'warehouseIds',
467
- ...requestConfigProp,
468
- }
469
- needModalTable = false
470
- }
471
-
472
- // 客户选择器
473
- if(type === 'customer') {
474
- requestConfig = {
475
- url: `${prefixUrl.selectPrefix}/uc/customer/v2`,
476
- filter: 'qp-name,code-orGroup,like', // 过滤参数
477
- mappingTextField: 'name',
478
- mappingValueField: 'code',
479
- otherParams: {
480
- sorter: 'desc-id'
481
- }, // 默认参数
482
- sourceName: 'customCode',
483
- ...requestConfigProp,
484
- }
485
- tableSearchForm = [
486
- { name: 'qp-name-like', label: '客户名称' },
487
- { name: 'qp-code-like', label: '客户编码' },
488
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
489
- type: 'select',
490
- props: {
491
- mode: 'multiple',
492
- notFoundContent: '暂无数据',
493
- allowClear: true,
494
- showSearch: true,
495
- showArrow: true,
496
- maxTagCount: 1,
497
- optionFilterProp: 'children',
498
- filterOption: (input: string, option: { props: { children: string } }) =>
499
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
500
- },
501
- } },
502
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
503
- type: 'select',
504
- props: {
505
- mode: 'multiple',
506
- notFoundContent: '暂无数据',
507
- allowClear: true,
508
- showSearch: true,
509
- showArrow: true,
510
- maxTagCount: 1,
511
- optionFilterProp: 'children',
512
- filterOption: (input: string, option: { props: { children: string } }) =>
513
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
514
- },
515
- } },
516
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
517
- type: 'select',
518
- props: {
519
- mode: 'multiple',
520
- notFoundContent: '暂无数据',
521
- allowClear: true,
522
- showSearch: true,
523
- showArrow: true,
524
- maxTagCount: 1,
525
- optionFilterProp: 'children',
526
- filterOption: (input: string, option: { props: { children: string } }) =>
527
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
528
- },
529
- } },
530
- { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
531
- ]
532
- Promise.all([
533
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
534
- pageSize: 5000,
535
- currentPage: 1,
536
- 'qp-companyType-eq': '30',
537
- }),
538
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
539
- pageSize: 5000,
540
- currentPage: 1,
541
- }),
542
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
543
- pageSize: 5000,
544
- currentPage: 1,
545
- 'qp-companyType-eq': '20',
546
- })
547
- ]).then((x: any)=>{
548
- formatSource(x,0, 2, tableSearchForm);
549
- formatSource(x,1, 3, tableSearchForm);
550
- formatSource(x,2, 4, tableSearchForm);
551
- })
552
- modalTableProps = {
553
- modalTableTitle: '选择客户',
554
- tableSearchForm,
555
- tableColumns: [
556
- {
557
- title: '客户编码',
558
- dataIndex: 'code',
559
- },
560
- {
561
- title: '客户名称',
562
- dataIndex: 'name',
563
- },
564
- {
565
- title: '归属集团',
566
- dataIndex: 'conglomerateName',
567
- },
568
- {
569
- title: '归属法人公司',
570
- dataIndex: 'legalCompanyName',
571
- },
572
- {
573
- title: '归属核算主体',
574
- dataIndex: 'accountingName',
575
- },
576
- {
577
- title: '共享类型',
578
- dataIndex: 'sharingType',
579
- render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text,
580
- },
581
- ],
582
- ...modalTableBusProps
583
- }
584
- }
585
-
586
- // 店铺选择器
587
- if(type === 'shopFile') {
588
- requestConfig = {
589
- url: `${prefixUrl.selectPrefix}/store`,
590
- filter: 'qp-name,code-orGroup,like', // 过滤参数
591
- mappingTextField: 'name',
592
- mappingValueField: 'code',
593
- otherParams: {
594
- sorter: 'desc-id'
595
- }, // 默认参数
596
- sourceName: 'code',
597
- ...requestConfigProp,
598
- }
599
- tableSearchForm = [
600
- { name: 'qp-name-like', label: '店铺名称' },
601
- { name: 'qp-code-like', label: '店铺编码' },
602
- { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
603
- type: 'select',
604
- props: {
605
- mode: 'multiple',
606
- notFoundContent: '暂无数据',
607
- allowClear: true,
608
- showSearch: true,
609
- showArrow: true,
610
- maxTagCount: 1,
611
- optionFilterProp: 'children',
612
- filterOption: (input: string, option: { props: { children: string } }) =>
613
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
614
- },
615
- } },
616
- { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
617
- type: 'select',
618
- props: {
619
- mode: 'multiple',
620
- notFoundContent: '暂无数据',
621
- allowClear: true,
622
- showSearch: true,
623
- showArrow: true,
624
- maxTagCount: 1,
625
- optionFilterProp: 'children',
626
- filterOption: (input: string, option: { props: { children: string } }) =>
627
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
628
- },
629
- } },
630
- { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
631
- { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
632
- type: 'select',
633
- props: {
634
- mode: 'multiple',
635
- notFoundContent: '暂无数据',
636
- allowClear: true,
637
- showSearch: true,
638
- showArrow: true,
639
- maxTagCount: 1,
640
- optionFilterProp: 'children',
641
- filterOption: (input: string, option: { props: { children: string } }) =>
642
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
643
- },
644
- } },
645
- { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
646
- type: 'select',
647
- props: {
648
- mode: 'multiple',
649
- notFoundContent: '暂无数据',
650
- allowClear: true,
651
- showSearch: true,
652
- showArrow: true,
653
- maxTagCount: 1,
654
- optionFilterProp: 'children',
655
- filterOption: (input: string, option: { props: { children: string } }) =>
656
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
657
- },
658
- } },
659
- ]
660
- Promise.all([
661
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
662
- pageSize: 5000,
663
- currentPage: 1,
664
- 'qp-companyType-eq': '30',
665
- }),
666
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
667
- pageSize: 5000,
668
- currentPage: 1,
669
- 'qp-companyType-eq': '20',
670
- }),
671
- loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
672
- // pageSize: 5000,
673
- // currentPage: 1,
674
- 'qp-status-eq': '1',
675
- }),
676
- loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
677
- pageSize: 5000,
678
- currentPage: 1,
679
- }),
680
- ]).then((x: any)=>{
681
- formatSource(x,0, 2, tableSearchForm);
682
- formatSource(x,1, 3, tableSearchForm);
683
- formatSource(x,2, 5, tableSearchForm);
684
- formatSource(x,3, 6, tableSearchForm);
685
- })
686
- modalTableProps = {
687
- modalTableTitle: '选择店铺',
688
- tableSearchForm,
689
- tableColumns: [
690
- {
691
- title: '店铺编码',
692
- dataIndex: 'code',
693
- },
694
- {
695
- title: '店铺名称',
696
- dataIndex: 'name',
697
- },
698
- {
699
- title: '归属集团',
700
- dataIndex: 'conglomerateName',
701
- },
702
- {
703
- title: '归属法人公司',
704
- dataIndex: 'companyName',
705
- },
706
- {
707
- title: '店铺类型',
708
- dataIndex: 'type',
709
- render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
710
- },
711
- {
712
- title: '店铺来源',
713
- dataIndex: 'platformName',
714
- },
715
- {
716
- title: '归属核算主体',
717
- dataIndex: 'accountingName',
718
- },
719
- ],
720
- ...modalTableBusProps
721
- }
722
- }
723
-
724
- // 核算主体选择器(无弹窗)
725
- if(type === 'accountingSubject') {
726
- requestConfig = {
727
- url: `${prefixUrl.selectPrefix}/accountingSubject`,
728
- filter: 'qp-name,code-orGroup,like', // 过滤参数
729
- mappingTextField: 'name',
730
- mappingTextShowKeyField: 'code',
731
- mappingValueField: 'id',
732
- otherParams: {
733
- sorter: 'desc-id'
734
- }, // 默认参数
735
- sourceName: 'accountingSubjectCode',
736
- ...requestConfigProp,
737
- }
738
- needModalTable = false
739
- }
740
- // 库存组织选择器(无弹窗)
741
- if(type === 'inventoryOrg') {
742
- requestConfig = {
743
- url: `${prefixUrl.selectPrefix}/inventoryOrg`,
744
- filter: 'qp-name,code-orGroup,like', // 过滤参数
745
- mappingTextField: 'name',
746
- mappingTextShowKeyField: 'code',
747
- mappingValueField: 'id',
748
- otherParams: {
749
- sorter: 'desc-id'
750
- }, // 默认参数
751
- sourceName: 'inventoryOrgCode',
752
- ...requestConfigProp,
753
- }
754
- needModalTable = false
755
- }
756
- // 法人公司选择器(无弹窗)
757
- if(type === 'corporationCompany') {
758
- requestConfig = {
759
- url: `${prefixUrl.selectPrefix}/company`,
760
- filter: 'qp-name,code-orGroup,like', // 过滤参数
761
- mappingTextField: 'name',
762
- mappingTextShowKeyField: 'code',
763
- mappingValueField: 'id',
764
- otherParams: {
765
- sorter: 'desc-id'
766
- }, // 默认参数
767
- sourceName: 'corporationCompany',
768
- ...requestConfigProp,
769
- }
770
- needModalTable = false
771
- }
772
-
773
- // 员工选择器
774
- if(type === 'employee') {
775
- requestConfig = {
776
- url: `${prefixUrl.selectPrefix}/employee/v2`,
777
- filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
778
- mappingTextField: 'name',
779
- mappingTextShowKeyField: 'employeeNumber',
780
- mappingValueField: 'employeeNumber',
781
- otherParams: {
782
- 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
783
- sorter: 'desc-id'
784
- }, // 默认参数
785
- sourceName: 'employeeNumber',
786
- ...requestConfigProp,
787
- }
788
- tableSearchForm = [
789
- { name: 'qp-name-like', label: '员工名称' },
790
- { name: 'qp-employeeNumber-like', label: '员工编码' },
791
- { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
792
- type: 'select',
793
- props: {
794
- mode: 'multiple',
795
- notFoundContent: '暂无数据',
796
- allowClear: true,
797
- showSearch: true,
798
- showArrow: true,
799
- maxTagCount: 1,
800
- optionFilterProp: 'children',
801
- filterOption: (input: string, option: { props: { children: string } }) =>
802
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
803
- },
804
- } },
805
- { name: 'qp-email-like', label: '邮箱' },
806
- { name: 'qp-officeTelephone-like', label: '手机号' },
807
- ]
808
- Promise.all([
809
- loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
810
- pageSize: 5000,
811
- currentPage: 1,
812
- 'qp-companyType-eq': 20,
813
- }),
814
- ]).then((x: any)=>{
815
- formatSource(x,0, 2, tableSearchForm);
816
- })
817
- modalTableProps = {
818
- modalTableTitle: '选择员工',
819
- tableSearchForm,
820
- tableColumns: [
821
- {
822
- title: '员工编码',
823
- dataIndex: 'employeeNumber',
824
- },
825
- {
826
- title: '员工名称',
827
- dataIndex: 'name',
828
- },
829
- {
830
- title: '所属公司',
831
- dataIndex: 'companyName',
832
- },
833
- {
834
- title: '邮箱',
835
- dataIndex: 'email',
836
- },
837
- {
838
- title: '手机号',
839
- dataIndex: 'officeTelephone',
840
- },
841
- ],
842
- ...modalTableBusProps
843
- }
844
- }
845
-
846
- // 配送方式选择器
847
- if(type === 'deliveryMode') {
848
- requestConfig = {
849
- url: `${prefixUrl.selectPrefix}/deliveryMode`,
850
- filter: 'qp-name,code-orGroup,like', // 过滤参数
851
- mappingTextField: 'name',
852
- mappingTextShowKeyField: 'code',
853
- mappingValueField: 'code',
854
- otherParams: {
855
- sorter: 'desc-id'
856
- }, // 默认参数
857
- sourceName: 'deliveryModeCode',
858
- ...requestConfigProp
859
- }
860
- tableSearchForm = [
861
- { name: 'qp-name-like', label: '配送方式名称' },
862
- { name: 'qp-code-like', label: '配送方式编码' },
863
- { name: 'qp-logisCompanyCode-in', type: 'select', label: '所属物流商', field: {
864
- type: 'select',
865
- props: {
866
- mode: 'multiple',
867
- notFoundContent: '暂无数据',
868
- allowClear: true,
869
- showSearch: true,
870
- showArrow: true,
871
- maxTagCount: 1,
872
- optionFilterProp: 'children',
873
- filterOption: (input: string, option: { props: { children: string } }) =>
874
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
875
- },
876
- } },
877
- { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
878
- { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
879
- { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
880
- type: 'select',
881
- props: {
882
- mode: 'multiple',
883
- notFoundContent: '暂无数据',
884
- allowClear: true,
885
- showSearch: true,
886
- showArrow: true,
887
- maxTagCount: 1,
888
- optionFilterProp: 'children',
889
- filterOption: (input: string, option: { props: { children: string } }) =>
890
- option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
891
- },
892
- } },
893
- { name: 'qp-remark-like', label: '备注' },
894
- ]
895
- Promise.all([
896
- loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
897
- pageSize: 5000,
898
- currentPage: 1,
899
- }),
900
- loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
901
- pageSize: 5000,
902
- currentPage: 1,
903
- })
904
- ]).then((x: any)=>{
905
- formatSource(x,0, 2, tableSearchForm);
906
- formatSource(x,1, 5, tableSearchForm);
907
- })
908
- modalTableProps = {
909
- modalTableTitle: '选择配送方式',
910
- tableSearchForm,
911
- tableColumns: [
912
- {
913
- title: '配送方式编码',
914
- dataIndex: 'code',
915
- },
916
- {
917
- title: '配送方式名称',
918
- dataIndex: 'name',
919
- },
920
- {
921
- title: '所属物流商',
922
- dataIndex: 'logisCompanyName',
923
- },
924
- {
925
- dataIndex: 'recordChannnelCode',
926
- title: '单号获取通道',
927
- render: (text: any) => getDictionaryTextByValue('BSC00004', text),
928
- },
929
- {
930
- dataIndex: 'arrivalPaySupport',
931
- title: '是否支持到付',
932
- render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
933
- },
934
- {
935
- dataIndex: 'sheetTemplateName',
936
- title: '面单模板',
937
- },
938
- {
939
- dataIndex: 'remark',
940
- title: '备注',
941
- },
942
- ],
943
- ...modalTableBusProps
944
- }
945
- }
946
-
947
- return { modalTableProps, requestConfig, needModalTable };
948
- }
1
+ // 此文件用于 处理业务组件 所用到的公共方法
2
+ // @ts-nocheck
3
+ import { shopFileType, arrivalPaySupportList, sharingType } from './common';
4
+ import { getDictionarySource, getDictionaryTextByValue, loadSelectSource } from './utils';
5
+
6
+ const hasDictSharingType = getDictionarySource('UC000013')?.length;
7
+ const sharingTypeDataList = hasDictSharingType && getDictionarySource('UC000013') || sharingType
8
+
9
+ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: any, modalTableBusProps?:any) {
10
+ // 默认type === 'supplier' 供应商选择器
11
+ let requestConfig = {
12
+ url: `${prefixUrl.selectPrefix}/supplier`,
13
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
14
+ otherParams: {
15
+ sorter: 'desc-id'
16
+ }, // 默认参数
17
+ ...requestConfigProp
18
+ }
19
+
20
+ /*
21
+ * 处理 格式化下拉框数据源
22
+ * reData 必传 promise返回响应的数据 格式为[{},{},{},...] Promise.all第一个参数数组有多少个数组长度就是多少,其中每个对象为每次请求的结果数据
23
+ * 每个结果数据格式为{ status: '0', msg: 'success', data: { items: [], total: 1, size: 1, page: 1 }, traceId: 'baba..'}
24
+ * position 必传 为获取Promise.all请求结果的位置
25
+ * changePosition 必传 为搜索表单Form中需要更改数据源的Item项的位置
26
+ * changeSearchForm 必传 为搜索表单Form数据
27
+ * */
28
+ const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
29
+ const data = reData && reData[position]?.data;
30
+ const list = Array.isArray(data) ? data :(data?.items || data?.list || []);
31
+ const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
32
+ changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
33
+ }
34
+
35
+ // 格式化树选择器数据源
36
+ const mapSearchTree = (treeDataItem: any, resKeyValue: any) => {
37
+ const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
38
+ return {
39
+ title: treeDataItem[resKeyValue[1]],
40
+ value: treeDataItem[resKeyValue[0]],
41
+ parentId: treeDataItem.parent,
42
+ data: { ...treeDataItem },
43
+ isLeaf: !haveChildren,
44
+ disabled: haveChildren,
45
+ children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue)) : [],
46
+ };
47
+ };
48
+ const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
49
+ const data = reData && reData[position]?.data;
50
+ const formatData = (data &&
51
+ Array.isArray(data) &&
52
+ data.length &&
53
+ data.map((ites: any) => mapSearchTree(ites, resKeyValue))) ||
54
+ []
55
+ changeSearchForm[changePosition].field.props.treeData = formatData;
56
+ }
57
+
58
+
59
+ let tableSearchForm: any [] = [];
60
+ // 供应商选择器
61
+ if(type === 'supplier') {
62
+ tableSearchForm = [
63
+ { name: 'qp-name-like', label: '供应商名称' }, // field: { type: 'input', props: { placeholder: '请输入'}}
64
+ { name: 'qp-code-like', label: '供应商编码' },
65
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
66
+ type: 'select',
67
+ props: {
68
+ mode: 'multiple',
69
+ notFoundContent: '暂无数据',
70
+ allowClear: true,
71
+ showSearch: true,
72
+ showArrow: true,
73
+ maxTagCount: 1,
74
+ optionFilterProp: 'children',
75
+ filterOption: (input: string, option: { props: { children: string } }) =>
76
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
77
+ },
78
+ } },
79
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
80
+ type: 'select',
81
+ props: {
82
+ mode: 'multiple',
83
+ notFoundContent: '暂无数据',
84
+ allowClear: true,
85
+ showSearch: true,
86
+ showArrow: true,
87
+ maxTagCount: 1,
88
+ optionFilterProp: 'children',
89
+ filterOption: (input: string, option: { props: { children: string } }) =>
90
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
91
+ },
92
+ } },
93
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
94
+ type: 'select',
95
+ props: {
96
+ mode: 'multiple',
97
+ notFoundContent: '暂无数据',
98
+ allowClear: true,
99
+ showSearch: true,
100
+ showArrow: true,
101
+ maxTagCount: 1,
102
+ optionFilterProp: 'children',
103
+ filterOption: (input: string, option: { props: { children: string } }) =>
104
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
105
+ },
106
+ } },
107
+ { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
108
+ ]
109
+ Promise.all([
110
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
111
+ pageSize: 5000,
112
+ currentPage: 1,
113
+ 'qp-companyType-eq': '30',
114
+ }),
115
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
116
+ pageSize: 5000,
117
+ currentPage: 1,
118
+ }),
119
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
120
+ pageSize: 5000,
121
+ currentPage: 1,
122
+ 'qp-companyType-eq': '20',
123
+ })
124
+ ]).then((x: any)=>{
125
+ formatSource(x,0, 2, tableSearchForm);
126
+ formatSource(x,1, 3, tableSearchForm);
127
+ formatSource(x,2, 4, tableSearchForm);
128
+ })
129
+ }
130
+ let modalTableProps = {
131
+ modalTableTitle: '选择供应商',
132
+ tableSearchForm,
133
+ tableColumns: [
134
+ {
135
+ title: '供应商编码',
136
+ dataIndex: 'code',
137
+ },
138
+ {
139
+ title: '供应商名称',
140
+ dataIndex: 'name',
141
+ },
142
+ {
143
+ title: '归属集团',
144
+ dataIndex: 'conglomerateName',
145
+ },
146
+ {
147
+ title: '归属法人公司',
148
+ dataIndex: 'legalCompanyName',
149
+ },
150
+ {
151
+ title: '归属核算主体',
152
+ dataIndex: 'accountingName',
153
+ },
154
+ {
155
+ title: '共享类型',
156
+ dataIndex: 'sharingType',
157
+ render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text
158
+ },
159
+ ],
160
+ ...modalTableBusProps,
161
+ }
162
+ let needModalTable = true;
163
+
164
+ // 商品选择器
165
+ if(type === 'skuCommodity') {
166
+ requestConfig = {
167
+ url: `${prefixUrl.selectPrefix}/sku/pager/v2`,
168
+ filter: 'skuCodeAndSkuName', // 过滤参数
169
+ mappingTextField: 'name',
170
+ mappingValueField: 'skuCode',
171
+ mappingTextShowTextField: ['name', 'propertyNameAndValue'],
172
+ otherParams: {
173
+ 'qp-approveStatus-eq': 1,
174
+ 'qp-type-eq': 10, // 查唯一国际条码
175
+ sorter: 'desc-id'
176
+ }, // 默认参数
177
+ sourceName: 'skuCode',
178
+ ...requestConfigProp,
179
+ }
180
+ tableSearchForm = [
181
+ { name: 'qp-skuName-like', label: 'SKU名称' },
182
+ { name: 'qp-skuCode-like', label: 'SKU编码' },
183
+ { name: 'qp-code-like', label: '国际条码' },
184
+ { name: 'qp-itemName-like', label: '所属SPU名称' },
185
+ { name: 'qp-itemCode-like', label: '所属SPU编码' },
186
+ { name: 'qp-externalCode-like', label: '外部编码' },
187
+ { name: 'qp-propertyValueCode-in', type: 'businessSearchSelect', label: '规格', field: {
188
+ type: 'businessSearchSelect',
189
+ props: {
190
+ selectBusinessType: 'skuPropertyValue',
191
+ selectProps: {
192
+ mode: 'multiple',
193
+ maxTagCount: 1,
194
+ }
195
+ },
196
+ }
197
+ },
198
+ { name: 'qp-brandId-in', type: 'select', label: '品牌', field: {
199
+ type: 'select',
200
+ props: {
201
+ mode: 'multiple',
202
+ notFoundContent: '暂无数据',
203
+ allowClear: true,
204
+ showSearch: true,
205
+ showArrow: true,
206
+ maxTagCount: 1,
207
+ optionFilterProp: 'children',
208
+ filterOption: (input: string, option: { props: { children: string } }) =>
209
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
210
+ },
211
+ } },
212
+ { name: 'qp-categoryId-in', type: 'treeSelect', label: '类目', field: {
213
+ type: 'treeSelect',
214
+ props: {
215
+ treeData: [],
216
+ treeCheckable: true,
217
+ showSearch: true,
218
+ allowClear: true,
219
+ showArrow: true,
220
+ treeNodeFilterProp: 'title',
221
+ treeDefaultExpandAll: true,
222
+ maxTagCount: 1,
223
+ placeholder: '请选择',
224
+ style: {
225
+ width: '100%',
226
+ },
227
+ dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
228
+ },
229
+ } },
230
+ { name: 'qp-classId-in', type: 'select', label: '品类', field: {
231
+ type: 'select',
232
+ props: {
233
+ mode: 'multiple',
234
+ notFoundContent: '暂无数据',
235
+ allowClear: true,
236
+ showSearch: true,
237
+ showArrow: true,
238
+ maxTagCount: 1,
239
+ optionFilterProp: 'children',
240
+ filterOption: (input: string, option: { props: { children: string } }) =>
241
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
242
+ },
243
+ } },
244
+ ]
245
+ Promise.all([
246
+ loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
247
+ pageSize: 5000,
248
+ currentPage: 1,
249
+ }),
250
+ loadSelectSource(`${prefixUrl.formSelectFix}/category/queryCategoryTree`, {
251
+ pageSize: 5000,
252
+ currentPage: 1,
253
+ }),
254
+ loadSelectSource(`${prefixUrl.formSelectFix}/class/withProperty`, {
255
+ pageSize: 5000,
256
+ currentPage: 1,
257
+ }),
258
+ ]).then((x: any)=>{
259
+ formatSource(x,0, 7, tableSearchForm,['id','name']);
260
+ formatTreeDataSource(x,1, 8, tableSearchForm);
261
+ formatSource(x,2, 9, tableSearchForm,['id','name']);
262
+ })
263
+ modalTableProps = {
264
+ modalTableTitle: '选择SKU',
265
+ tableSearchForm,
266
+ tableColumns: [
267
+ {
268
+ title: 'SKU编码',
269
+ dataIndex: 'skuCode',
270
+ },
271
+ {
272
+ title: 'SKU名称',
273
+ dataIndex: 'name',
274
+ },
275
+ {
276
+ title: '国际条码',
277
+ dataIndex: 'barCode',
278
+ },
279
+ {
280
+ title: '所属SPU名称',
281
+ dataIndex: 'itemName',
282
+ },
283
+ {
284
+ title: '所属SPU编码',
285
+ dataIndex: 'itemCode',
286
+ },
287
+ {
288
+ title: '外部编码',
289
+ dataIndex: 'externalCode',
290
+ },
291
+ {
292
+ title: '规格',
293
+ dataIndex: 'propertyNameAndValue',
294
+ },
295
+ {
296
+ title: '类目',
297
+ dataIndex: 'categoryName',
298
+ },
299
+ {
300
+ title: '品类',
301
+ dataIndex: 'className',
302
+ },
303
+ {
304
+ title: '品牌',
305
+ dataIndex: 'brandName',
306
+ },
307
+ ],
308
+ ...modalTableBusProps
309
+ }
310
+ }
311
+
312
+ // 商品规格选择器(无弹窗)
313
+ if(type === 'skuPropertyValue') {
314
+ requestConfig = {
315
+ url: `${prefixUrl.selectPrefix}/skuPropertyValue/list`,
316
+ filter: 'qp-value-like', // 过滤参数
317
+ mappingTextField: 'value',
318
+ mappingTextShowKeyField: 'propertyValueCode',
319
+ mappingValueField: 'propertyValueCode',
320
+ otherParams: {
321
+ sorter: 'desc-id'
322
+ }, // 默认参数
323
+ sourceName: 'qp-propertyValueCode-in',
324
+ ...requestConfigProp,
325
+ }
326
+ needModalTable = false
327
+ }
328
+
329
+ // 仓库选择器(物理、逻辑仓)
330
+ if(type === 'physicalWarehouse') {
331
+ requestConfig = {
332
+ url: `${prefixUrl.selectPrefix}/physicalWarehouse`,
333
+ filter: 'qp-physicalWarehouseName,physicalWarehouseCode-orGroup,like', // 过滤参数
334
+ mappingTextField: 'physicalWarehouseName',
335
+ mappingTextShowKeyField: 'physicalWarehouseCode',
336
+ mappingValueField: 'id',
337
+ otherParams: {
338
+ 'qp-isEnable-eq': 1,
339
+ sorter: 'desc-id'
340
+ }, // 默认参数
341
+ sourceName: 'warehouseIds',
342
+ ...requestConfigProp,
343
+ }
344
+ tableSearchForm = [
345
+ { name: 'qp-physicalWarehouseName-like', label: '物理仓名称' },
346
+ { name: 'qp-physicalWarehouseCode-like', label: '物理仓编码' },
347
+ { name: 'qp-physicalWarehouseType-eq', type: 'select', label: '物理仓类型', initialSource: getDictionarySource('SC00002') },
348
+ { name: 'qp-companyCode-eq', type: 'select', label: '所属公司', field: {
349
+ type: 'select',
350
+ props: {
351
+ mode: 'multiple',
352
+ notFoundContent: '暂无数据',
353
+ allowClear: true,
354
+ showSearch: true,
355
+ showArrow: true,
356
+ maxTagCount: 1,
357
+ optionFilterProp: 'children',
358
+ filterOption: (input: string, option: { props: { children: string } }) =>
359
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
360
+ },
361
+ } },
362
+ ]
363
+ Promise.all([
364
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
365
+ pageSize: 5000,
366
+ currentPage: 1,
367
+ 'qp-companyType-eq': 20,
368
+ }),
369
+ ]).then((x: any)=>{
370
+ formatSource(x,0, 3, tableSearchForm);
371
+ })
372
+ modalTableProps = {
373
+ modalTableTitle: '选择物理仓',
374
+ tableSearchForm,
375
+ tableColumns: [
376
+ {
377
+ title: '物理仓编码',
378
+ dataIndex: 'physicalWarehouseCode',
379
+ },
380
+ {
381
+ title: '物理仓名称',
382
+ dataIndex: 'physicalWarehouseName',
383
+ },
384
+ {
385
+ title: '物理仓类型',
386
+ dataIndex: 'physicalWarehouseType',
387
+ render: (text: number) => getDictionaryTextByValue('SC00002', text),
388
+ },
389
+ {
390
+ title: '所属公司',
391
+ dataIndex: 'companyName',
392
+ },
393
+ ],
394
+ ...modalTableBusProps
395
+ }
396
+ }
397
+ if(type === 'realWarehouse') {
398
+ requestConfig = {
399
+ url: `${prefixUrl.selectPrefix}/realWarehouse`,
400
+ filter: 'qp-realWarehouseName,realWarehouseCode-orGroup,like', // 过滤参数
401
+ mappingTextField: 'realWarehouseName',
402
+ mappingTextShowKeyField: 'realWarehouseCode',
403
+ mappingValueField: 'id',
404
+ otherParams: {
405
+ 'qp-isEnable-eq': 1,
406
+ sorter: 'desc-id'
407
+ }, // 默认参数
408
+ sourceName: 'warehouseIds',
409
+ ...requestConfigProp,
410
+ }
411
+ tableSearchForm = [
412
+ { name: 'qp-realWarehouseName-like', label: '逻辑仓名称' },
413
+ { name: 'qp-realWarehouseCode-like', label: '逻辑仓编码' },
414
+ { name: 'qp-realWarehouseType-eq', type: 'select', label: '逻辑仓类型', initialSource: getDictionarySource('SC00004') },
415
+ ]
416
+ modalTableProps = {
417
+ modalTableTitle: '选择逻辑仓',
418
+ tableSearchForm,
419
+ tableColumns: [
420
+ {
421
+ title: '逻辑仓编码',
422
+ dataIndex: 'realWarehouseCode',
423
+ },
424
+ {
425
+ title: '逻辑仓名称',
426
+ dataIndex: 'realWarehouseName',
427
+ },
428
+ {
429
+ title: '逻辑仓类型',
430
+ dataIndex: 'realWarehouseType',
431
+ render: (text: number) => getDictionaryTextByValue('SC00004', text),
432
+ },
433
+ ],
434
+ ...modalTableBusProps,
435
+ }
436
+ }
437
+
438
+ // 仓库选择器(虚拟、渠道仓)(无弹窗)
439
+ if(type === 'virtualWarehouse') {
440
+ requestConfig = {
441
+ url: `${prefixUrl.selectPrefix}/virtualWarehouse`,
442
+ filter: 'qp-virtualWarehouseName,virtualWarehouseCode-orGroup,like', // 过滤参数
443
+ mappingTextField: 'virtualWarehouseName',
444
+ mappingTextShowKeyField: 'virtualWarehouseCode',
445
+ mappingValueField: 'id',
446
+ otherParams: {
447
+ 'qp-isEnable-eq': 1,
448
+ sorter: 'desc-id'
449
+ }, // 默认参数
450
+ sourceName: 'warehouseIds',
451
+ ...requestConfigProp,
452
+ }
453
+ needModalTable = false
454
+ }
455
+ if(type === 'channelWarehouse') {
456
+ requestConfig = {
457
+ url: `${prefixUrl.selectPrefix}/channelWarehouse`,
458
+ filter: 'qp-channelWarehouseName,channelWarehouseCode-orGroup,like', // 过滤参数
459
+ mappingTextField: 'channelWarehouseName',
460
+ mappingTextShowKeyField: 'channelWarehouseCode',
461
+ mappingValueField: 'id',
462
+ otherParams: {
463
+ 'qp-isEnable-eq': 1,
464
+ sorter: 'desc-id'
465
+ }, // 默认参数
466
+ sourceName: 'warehouseIds',
467
+ ...requestConfigProp,
468
+ }
469
+ needModalTable = false
470
+ }
471
+
472
+ // 客户选择器
473
+ if(type === 'customer') {
474
+ requestConfig = {
475
+ url: `${prefixUrl.selectPrefix}/uc/customer/v2`,
476
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
477
+ mappingTextField: 'name',
478
+ mappingValueField: 'code',
479
+ otherParams: {
480
+ sorter: 'desc-id'
481
+ }, // 默认参数
482
+ sourceName: 'customCode',
483
+ ...requestConfigProp,
484
+ }
485
+ tableSearchForm = [
486
+ { name: 'qp-name-like', label: '客户名称' },
487
+ { name: 'qp-code-like', label: '客户编码' },
488
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
489
+ type: 'select',
490
+ props: {
491
+ mode: 'multiple',
492
+ notFoundContent: '暂无数据',
493
+ allowClear: true,
494
+ showSearch: true,
495
+ showArrow: true,
496
+ maxTagCount: 1,
497
+ optionFilterProp: 'children',
498
+ filterOption: (input: string, option: { props: { children: string } }) =>
499
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
500
+ },
501
+ } },
502
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
503
+ type: 'select',
504
+ props: {
505
+ mode: 'multiple',
506
+ notFoundContent: '暂无数据',
507
+ allowClear: true,
508
+ showSearch: true,
509
+ showArrow: true,
510
+ maxTagCount: 1,
511
+ optionFilterProp: 'children',
512
+ filterOption: (input: string, option: { props: { children: string } }) =>
513
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
514
+ },
515
+ } },
516
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
517
+ type: 'select',
518
+ props: {
519
+ mode: 'multiple',
520
+ notFoundContent: '暂无数据',
521
+ allowClear: true,
522
+ showSearch: true,
523
+ showArrow: true,
524
+ maxTagCount: 1,
525
+ optionFilterProp: 'children',
526
+ filterOption: (input: string, option: { props: { children: string } }) =>
527
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
528
+ },
529
+ } },
530
+ { name: 'qp-sharingType-eq', type: 'select', label: '共享类型', initialSource: sharingTypeDataList },
531
+ ]
532
+ Promise.all([
533
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
534
+ pageSize: 5000,
535
+ currentPage: 1,
536
+ 'qp-companyType-eq': '30',
537
+ }),
538
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
539
+ pageSize: 5000,
540
+ currentPage: 1,
541
+ }),
542
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
543
+ pageSize: 5000,
544
+ currentPage: 1,
545
+ 'qp-companyType-eq': '20',
546
+ })
547
+ ]).then((x: any)=>{
548
+ formatSource(x,0, 2, tableSearchForm);
549
+ formatSource(x,1, 3, tableSearchForm);
550
+ formatSource(x,2, 4, tableSearchForm);
551
+ })
552
+ modalTableProps = {
553
+ modalTableTitle: '选择客户',
554
+ tableSearchForm,
555
+ tableColumns: [
556
+ {
557
+ title: '客户编码',
558
+ dataIndex: 'code',
559
+ },
560
+ {
561
+ title: '客户名称',
562
+ dataIndex: 'name',
563
+ },
564
+ {
565
+ title: '归属集团',
566
+ dataIndex: 'conglomerateName',
567
+ },
568
+ {
569
+ title: '归属法人公司',
570
+ dataIndex: 'legalCompanyName',
571
+ },
572
+ {
573
+ title: '归属核算主体',
574
+ dataIndex: 'accountingName',
575
+ },
576
+ {
577
+ title: '共享类型',
578
+ dataIndex: 'sharingType',
579
+ render: (text: number) => hasDictSharingType ? getDictionaryTextByValue('UC000013', text) : sharingType.find((i: any) => i.value === text)?.text,
580
+ },
581
+ ],
582
+ ...modalTableBusProps
583
+ }
584
+ }
585
+
586
+ // 店铺选择器
587
+ if(type === 'shopFile') {
588
+ requestConfig = {
589
+ url: `${prefixUrl.selectPrefix}/store`,
590
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
591
+ mappingTextField: 'name',
592
+ mappingValueField: 'code',
593
+ otherParams: {
594
+ sorter: 'desc-id'
595
+ }, // 默认参数
596
+ sourceName: 'code',
597
+ ...requestConfigProp,
598
+ }
599
+ tableSearchForm = [
600
+ { name: 'qp-name-like', label: '店铺名称' },
601
+ { name: 'qp-code-like', label: '店铺编码' },
602
+ { name: 'qp-conglomerateCode-in', type: 'select', label: '归属集团', field: {
603
+ type: 'select',
604
+ props: {
605
+ mode: 'multiple',
606
+ notFoundContent: '暂无数据',
607
+ allowClear: true,
608
+ showSearch: true,
609
+ showArrow: true,
610
+ maxTagCount: 1,
611
+ optionFilterProp: 'children',
612
+ filterOption: (input: string, option: { props: { children: string } }) =>
613
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
614
+ },
615
+ } },
616
+ { name: 'qp-companyCode-in', type: 'select', label: '归属法人公司', field: {
617
+ type: 'select',
618
+ props: {
619
+ mode: 'multiple',
620
+ notFoundContent: '暂无数据',
621
+ allowClear: true,
622
+ showSearch: true,
623
+ showArrow: true,
624
+ maxTagCount: 1,
625
+ optionFilterProp: 'children',
626
+ filterOption: (input: string, option: { props: { children: string } }) =>
627
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
628
+ },
629
+ } },
630
+ { name: 'qp-type-in', type: 'select', label: '店铺类型', initialSource: shopFileType },
631
+ { name: 'qp-plateformCode-in', type: 'select', label: '店铺来源', field: {
632
+ type: 'select',
633
+ props: {
634
+ mode: 'multiple',
635
+ notFoundContent: '暂无数据',
636
+ allowClear: true,
637
+ showSearch: true,
638
+ showArrow: true,
639
+ maxTagCount: 1,
640
+ optionFilterProp: 'children',
641
+ filterOption: (input: string, option: { props: { children: string } }) =>
642
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
643
+ },
644
+ } },
645
+ { name: 'qp-accountingCode-in', type: 'select', label: '归属核算主体', field: {
646
+ type: 'select',
647
+ props: {
648
+ mode: 'multiple',
649
+ notFoundContent: '暂无数据',
650
+ allowClear: true,
651
+ showSearch: true,
652
+ showArrow: true,
653
+ maxTagCount: 1,
654
+ optionFilterProp: 'children',
655
+ filterOption: (input: string, option: { props: { children: string } }) =>
656
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
657
+ },
658
+ } },
659
+ ]
660
+ Promise.all([
661
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
662
+ pageSize: 5000,
663
+ currentPage: 1,
664
+ 'qp-companyType-eq': '30',
665
+ }),
666
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
667
+ pageSize: 5000,
668
+ currentPage: 1,
669
+ 'qp-companyType-eq': '20',
670
+ }),
671
+ loadSelectSource(`${prefixUrl.formSelectFix}/platformRecord/getPlatformRecordList`, {
672
+ // pageSize: 5000,
673
+ // currentPage: 1,
674
+ 'qp-status-eq': '1',
675
+ }),
676
+ loadSelectSource(`${prefixUrl.formSelectFix}/accountingSubject`, {
677
+ pageSize: 5000,
678
+ currentPage: 1,
679
+ }),
680
+ ]).then((x: any)=>{
681
+ formatSource(x,0, 2, tableSearchForm);
682
+ formatSource(x,1, 3, tableSearchForm);
683
+ formatSource(x,2, 5, tableSearchForm);
684
+ formatSource(x,3, 6, tableSearchForm);
685
+ })
686
+ modalTableProps = {
687
+ modalTableTitle: '选择店铺',
688
+ tableSearchForm,
689
+ tableColumns: [
690
+ {
691
+ title: '店铺编码',
692
+ dataIndex: 'code',
693
+ },
694
+ {
695
+ title: '店铺名称',
696
+ dataIndex: 'name',
697
+ },
698
+ {
699
+ title: '归属集团',
700
+ dataIndex: 'conglomerateName',
701
+ },
702
+ {
703
+ title: '归属法人公司',
704
+ dataIndex: 'companyName',
705
+ },
706
+ {
707
+ title: '店铺类型',
708
+ dataIndex: 'type',
709
+ render: (text: number) => shopFileType.find((i: any) => i.value === text)?.text,
710
+ },
711
+ {
712
+ title: '店铺来源',
713
+ dataIndex: 'platformName',
714
+ },
715
+ {
716
+ title: '归属核算主体',
717
+ dataIndex: 'accountingName',
718
+ },
719
+ ],
720
+ ...modalTableBusProps
721
+ }
722
+ }
723
+
724
+ // 核算主体选择器(无弹窗)
725
+ if(type === 'accountingSubject') {
726
+ requestConfig = {
727
+ url: `${prefixUrl.selectPrefix}/accountingSubject`,
728
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
729
+ mappingTextField: 'name',
730
+ mappingTextShowKeyField: 'code',
731
+ mappingValueField: 'id',
732
+ otherParams: {
733
+ sorter: 'desc-id'
734
+ }, // 默认参数
735
+ sourceName: 'accountingSubjectCode',
736
+ ...requestConfigProp,
737
+ }
738
+ needModalTable = false
739
+ }
740
+ // 库存组织选择器(无弹窗)
741
+ if(type === 'inventoryOrg') {
742
+ requestConfig = {
743
+ url: `${prefixUrl.selectPrefix}/inventoryOrg`,
744
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
745
+ mappingTextField: 'name',
746
+ mappingTextShowKeyField: 'code',
747
+ mappingValueField: 'id',
748
+ otherParams: {
749
+ sorter: 'desc-id'
750
+ }, // 默认参数
751
+ sourceName: 'inventoryOrgCode',
752
+ ...requestConfigProp,
753
+ }
754
+ needModalTable = false
755
+ }
756
+ // 法人公司选择器(无弹窗)
757
+ if(type === 'corporationCompany') {
758
+ requestConfig = {
759
+ url: `${prefixUrl.selectPrefix}/company`,
760
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
761
+ mappingTextField: 'name',
762
+ mappingTextShowKeyField: 'code',
763
+ mappingValueField: 'id',
764
+ otherParams: {
765
+ sorter: 'desc-id'
766
+ }, // 默认参数
767
+ sourceName: 'corporationCompany',
768
+ ...requestConfigProp,
769
+ }
770
+ needModalTable = false
771
+ }
772
+
773
+ // 员工选择器
774
+ if(type === 'employee') {
775
+ requestConfig = {
776
+ url: `${prefixUrl.selectPrefix}/employee/v2`,
777
+ filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
778
+ mappingTextField: 'name',
779
+ mappingTextShowKeyField: 'employeeNumber',
780
+ mappingValueField: 'employeeNumber',
781
+ otherParams: {
782
+ 'qp-enable-eq': 10, // 启用状态 10-启用,20-禁用
783
+ sorter: 'desc-id'
784
+ }, // 默认参数
785
+ sourceName: 'employeeNumber',
786
+ ...requestConfigProp,
787
+ }
788
+ tableSearchForm = [
789
+ { name: 'qp-name-like', label: '员工名称' },
790
+ { name: 'qp-employeeNumber-like', label: '员工编码' },
791
+ { name: 'qp-companyCode-in', type: 'select', label: '所属公司', field: {
792
+ type: 'select',
793
+ props: {
794
+ mode: 'multiple',
795
+ notFoundContent: '暂无数据',
796
+ allowClear: true,
797
+ showSearch: true,
798
+ showArrow: true,
799
+ maxTagCount: 1,
800
+ optionFilterProp: 'children',
801
+ filterOption: (input: string, option: { props: { children: string } }) =>
802
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
803
+ },
804
+ } },
805
+ { name: 'qp-email-like', label: '邮箱' },
806
+ { name: 'qp-officeTelephone-like', label: '手机号' },
807
+ ]
808
+ Promise.all([
809
+ loadSelectSource(`${prefixUrl.formSelectFix}/company`, {
810
+ pageSize: 5000,
811
+ currentPage: 1,
812
+ 'qp-companyType-eq': 20,
813
+ }),
814
+ ]).then((x: any)=>{
815
+ formatSource(x,0, 2, tableSearchForm);
816
+ })
817
+ modalTableProps = {
818
+ modalTableTitle: '选择员工',
819
+ tableSearchForm,
820
+ tableColumns: [
821
+ {
822
+ title: '员工编码',
823
+ dataIndex: 'employeeNumber',
824
+ },
825
+ {
826
+ title: '员工名称',
827
+ dataIndex: 'name',
828
+ },
829
+ {
830
+ title: '所属公司',
831
+ dataIndex: 'companyName',
832
+ },
833
+ {
834
+ title: '邮箱',
835
+ dataIndex: 'email',
836
+ },
837
+ {
838
+ title: '手机号',
839
+ dataIndex: 'officeTelephone',
840
+ },
841
+ ],
842
+ ...modalTableBusProps
843
+ }
844
+ }
845
+
846
+ // 配送方式选择器
847
+ if(type === 'deliveryMode') {
848
+ requestConfig = {
849
+ url: `${prefixUrl.selectPrefix}/deliveryMode`,
850
+ filter: 'qp-name,code-orGroup,like', // 过滤参数
851
+ mappingTextField: 'name',
852
+ mappingTextShowKeyField: 'code',
853
+ mappingValueField: 'code',
854
+ otherParams: {
855
+ sorter: 'desc-id'
856
+ }, // 默认参数
857
+ sourceName: 'deliveryModeCode',
858
+ ...requestConfigProp
859
+ }
860
+ tableSearchForm = [
861
+ { name: 'qp-name-like', label: '配送方式名称' },
862
+ { name: 'qp-code-like', label: '配送方式编码' },
863
+ { name: 'qp-logisCompanyCode-in', type: 'select', label: '所属物流商', field: {
864
+ type: 'select',
865
+ props: {
866
+ mode: 'multiple',
867
+ notFoundContent: '暂无数据',
868
+ allowClear: true,
869
+ showSearch: true,
870
+ showArrow: true,
871
+ maxTagCount: 1,
872
+ optionFilterProp: 'children',
873
+ filterOption: (input: string, option: { props: { children: string } }) =>
874
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
875
+ },
876
+ } },
877
+ { name: 'qp-recordChannnelCode-in', type: 'select', label: '单号获取通道', initialSource: getDictionarySource('BSC00004') },
878
+ { name: 'qp-arrivalPaySupport-in', type: 'select', label: '是否支持到付', initialSource: arrivalPaySupportList },
879
+ { name: 'qp-sheetTemplateCode-in', type: 'select', label: '面单模板', field: {
880
+ type: 'select',
881
+ props: {
882
+ mode: 'multiple',
883
+ notFoundContent: '暂无数据',
884
+ allowClear: true,
885
+ showSearch: true,
886
+ showArrow: true,
887
+ maxTagCount: 1,
888
+ optionFilterProp: 'children',
889
+ filterOption: (input: string, option: { props: { children: string } }) =>
890
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
891
+ },
892
+ } },
893
+ { name: 'qp-remark-like', label: '备注' },
894
+ ]
895
+ Promise.all([
896
+ loadSelectSource(`${prefixUrl.formSelectFix}/logisCompany`, {
897
+ pageSize: 5000,
898
+ currentPage: 1,
899
+ }),
900
+ loadSelectSource(`${prefixUrl.formSelectFix}/printTemplate`, {
901
+ pageSize: 5000,
902
+ currentPage: 1,
903
+ })
904
+ ]).then((x: any)=>{
905
+ formatSource(x,0, 2, tableSearchForm);
906
+ formatSource(x,1, 5, tableSearchForm);
907
+ })
908
+ modalTableProps = {
909
+ modalTableTitle: '选择配送方式',
910
+ tableSearchForm,
911
+ tableColumns: [
912
+ {
913
+ title: '配送方式编码',
914
+ dataIndex: 'code',
915
+ },
916
+ {
917
+ title: '配送方式名称',
918
+ dataIndex: 'name',
919
+ },
920
+ {
921
+ title: '所属物流商',
922
+ dataIndex: 'logisCompanyName',
923
+ },
924
+ {
925
+ dataIndex: 'recordChannnelCode',
926
+ title: '单号获取通道',
927
+ render: (text: any) => getDictionaryTextByValue('BSC00004', text),
928
+ },
929
+ {
930
+ dataIndex: 'arrivalPaySupport',
931
+ title: '是否支持到付',
932
+ render: (text: number) => arrivalPaySupportList.find((i: any) => i.value === text)?.text,
933
+ },
934
+ {
935
+ dataIndex: 'sheetTemplateName',
936
+ title: '面单模板',
937
+ },
938
+ {
939
+ dataIndex: 'remark',
940
+ title: '备注',
941
+ },
942
+ ],
943
+ ...modalTableBusProps
944
+ }
945
+ }
946
+
947
+ return { modalTableProps, requestConfig, needModalTable };
948
+ }