@bit-sun/business-component 2.3.24 → 2.3.25
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.
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +1 -1
- package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +2 -2
- package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +2 -2
- package/dist/components/Business/BsLayouts/index.d.ts +2 -2
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +2 -2
- package/dist/components/Functional/AddSelect/helps.d.ts +13 -0
- package/dist/components/Functional/BsAntdSula/BsCascader/index.d.ts +1 -1
- package/dist/index.esm.js +607 -455
- package/dist/index.js +613 -461
- package/dist/utils/TableUtils.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/Business/AddSelectBusiness/index.tsx +352 -187
- package/src/components/Business/BsSulaQueryTable/utils.tsx +31 -29
- package/src/components/Business/DetailPageWrapper/index.tsx +0 -1
- package/src/components/Business/JsonQueryTable/static.ts +5 -5
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +1 -1
- package/src/components/Business/columnSettingTable/utils.tsx +28 -26
- package/src/components/Functional/AddSelect/helps.ts +65 -0
- package/src/components/Functional/AddSelect/index.tsx +12 -124
- package/src/components/Functional/SearchSelect/index.tsx +3 -0
|
@@ -572,33 +572,35 @@ export const renderFixed2 = (text: any) => text;
|
|
|
572
572
|
//设置queryTable默认列宽
|
|
573
573
|
export const getItemDefaultWidth = (item: any) => {
|
|
574
574
|
let defaultWidth = 200;
|
|
575
|
-
let lowerCaseKey = (item.key || item.dataIndex)
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
575
|
+
let lowerCaseKey = (item.key || item.dataIndex)?.toLowerCase();
|
|
576
|
+
if (lowerCaseKey) {
|
|
577
|
+
switch (true) {
|
|
578
|
+
case item?.title === '操作' || lowerCaseKey === 'operate':
|
|
579
|
+
defaultWidth = 60;
|
|
580
|
+
break;
|
|
581
|
+
case lowerCaseKey.indexOf('number') > -1:
|
|
582
|
+
case lowerCaseKey.indexOf('quantity') > -1:
|
|
583
|
+
case lowerCaseKey.indexOf('amount') > -1:
|
|
584
|
+
defaultWidth = 90;
|
|
585
|
+
break;
|
|
586
|
+
case (lowerCaseKey.indexOf('no') > -1):
|
|
587
|
+
defaultWidth = 200;
|
|
588
|
+
break;
|
|
589
|
+
case lowerCaseKey.indexOf('code') > -1:
|
|
590
|
+
defaultWidth = 170;
|
|
591
|
+
break;
|
|
592
|
+
case lowerCaseKey.indexOf('time') > -1:
|
|
593
|
+
defaultWidth = 130;
|
|
594
|
+
break;
|
|
595
|
+
case lowerCaseKey.indexOf('status') > -1:
|
|
596
|
+
defaultWidth = 100;
|
|
597
|
+
break;
|
|
598
|
+
case lowerCaseKey.indexOf('user') > -1:
|
|
599
|
+
defaultWidth = 130;
|
|
600
|
+
break;
|
|
601
|
+
default:
|
|
602
|
+
break;
|
|
603
|
+
}
|
|
602
604
|
}
|
|
603
605
|
return defaultWidth;
|
|
604
606
|
};
|
|
@@ -608,7 +610,7 @@ export const getItemDefaultWidth = (item: any) => {
|
|
|
608
610
|
* @param params 要应用于查询的参数
|
|
609
611
|
* @returns 返回处理后的查询参数
|
|
610
612
|
*/
|
|
611
|
-
|
|
613
|
+
export function queryParams(params: any, flag?: any) {
|
|
612
614
|
for (const key in params) {
|
|
613
615
|
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
614
616
|
const element = params[key];
|
|
@@ -678,7 +680,7 @@ export const getItemDefaultWidth = (item: any) => {
|
|
|
678
680
|
* @param code 对应权限值
|
|
679
681
|
* @returns boolean
|
|
680
682
|
*/
|
|
681
|
-
|
|
683
|
+
export const authFn = (code?: any) => {
|
|
682
684
|
const authButton = localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES)
|
|
683
685
|
? JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES) as string)
|
|
684
686
|
: [];
|
|
@@ -13,7 +13,7 @@ const normalMultipleSelectProps = {
|
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
// inputType显示类型 10输入框 20单选 30多选 40公式 ||||| valueType字段类型
|
|
16
|
-
export const inputTypes:any = {
|
|
16
|
+
export const inputTypes: any = {
|
|
17
17
|
20: {
|
|
18
18
|
10: {
|
|
19
19
|
type: 'select',
|
|
@@ -128,7 +128,7 @@ export const inputTypes:any = {
|
|
|
128
128
|
type: 'bs-employeeSearchSelect',
|
|
129
129
|
props: {
|
|
130
130
|
...normalSingleSelectProps,
|
|
131
|
-
requestConfig: { mappingValueField: 'employeeNumber' },
|
|
131
|
+
requestConfig: { mappingValueField: 'employeeNumber', filterInit: 'qp-employeeNumber-like', },
|
|
132
132
|
},
|
|
133
133
|
},
|
|
134
134
|
280: {
|
|
@@ -291,7 +291,7 @@ export const inputTypes:any = {
|
|
|
291
291
|
type: 'bs-employeeSearchSelect',
|
|
292
292
|
props: {
|
|
293
293
|
...normalMultipleSelectProps,
|
|
294
|
-
requestConfig: { mappingValueField: 'employeeNumber' },
|
|
294
|
+
requestConfig: { mappingValueField: 'employeeNumber', filterInit: 'qp-employeeNumber-like', },
|
|
295
295
|
},
|
|
296
296
|
},
|
|
297
297
|
280: {
|
|
@@ -368,13 +368,13 @@ export const choiceType = Object.freeze({
|
|
|
368
368
|
340: '规则模板选择器',
|
|
369
369
|
350: '营销区域选择器',
|
|
370
370
|
});
|
|
371
|
-
export const inputType:any ={
|
|
371
|
+
export const inputType: any = {
|
|
372
372
|
10: '输入',
|
|
373
373
|
20: '单选',
|
|
374
374
|
30: '多选',
|
|
375
375
|
40: '公式',
|
|
376
376
|
};
|
|
377
|
-
export const valueType:any = {
|
|
377
|
+
export const valueType: any = {
|
|
378
378
|
10: '文本',
|
|
379
379
|
20: '短整数',
|
|
380
380
|
21: '长整数',
|
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { Table as SulaTable, request } from 'bssula';
|
|
3
3
|
import { Resizable } from 'react-resizable';
|
|
4
4
|
import ColumnSetting from './columnSetting';
|
|
5
|
-
import { getItemDefaultWidth
|
|
5
|
+
import { getItemDefaultWidth } from './utils';
|
|
6
6
|
import { noEmptyArray } from './utils';
|
|
7
7
|
import {
|
|
8
8
|
Table,
|
|
@@ -14,32 +14,34 @@ import {
|
|
|
14
14
|
export const getItemDefaultWidth = (item: any) => {
|
|
15
15
|
let defaultWidth = 200;
|
|
16
16
|
let lowerCaseKey = (item.key || item.dataIndex)?.toLowerCase();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
17
|
+
if (lowerCaseKey) {
|
|
18
|
+
switch (true) {
|
|
19
|
+
case item?.title === '操作' || lowerCaseKey === 'operate':
|
|
20
|
+
defaultWidth = 60;
|
|
21
|
+
break;
|
|
22
|
+
case lowerCaseKey.indexOf('number') > -1:
|
|
23
|
+
case lowerCaseKey.indexOf('quantity') > -1:
|
|
24
|
+
case lowerCaseKey.indexOf('amount') > -1:
|
|
25
|
+
defaultWidth = 90;
|
|
26
|
+
break;
|
|
27
|
+
case (lowerCaseKey.indexOf('no') > -1):
|
|
28
|
+
defaultWidth = 200;
|
|
29
|
+
break;
|
|
30
|
+
case lowerCaseKey.indexOf('code') > -1:
|
|
31
|
+
defaultWidth = 170;
|
|
32
|
+
break;
|
|
33
|
+
case lowerCaseKey.indexOf('time') > -1:
|
|
34
|
+
defaultWidth = 130;
|
|
35
|
+
break;
|
|
36
|
+
case lowerCaseKey.indexOf('status') > -1:
|
|
37
|
+
defaultWidth = 100;
|
|
38
|
+
break;
|
|
39
|
+
case lowerCaseKey.indexOf('user') > -1:
|
|
40
|
+
defaultWidth = 130;
|
|
41
|
+
break;
|
|
42
|
+
default:
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
return defaultWidth;
|
|
45
47
|
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { stringify } from 'querystring';
|
|
3
|
+
import { message } from 'antd';
|
|
4
|
+
|
|
1
5
|
// 下拉框数据源
|
|
2
6
|
// 情况①:每条记录下拉框数据不同----查询接口每条记录返回字段,前后端约定好,用dataSourceCode记录
|
|
3
7
|
// 情况②:所有查询记录共有一个数据源---选择器加载查询记录渲染给到dataSource
|
|
@@ -12,3 +16,64 @@ export const getSelectDataList = (record: any,item: any, selectKey: string) => {
|
|
|
12
16
|
}
|
|
13
17
|
return result;
|
|
14
18
|
}
|
|
19
|
+
|
|
20
|
+
export const loadSelectSource = (url: string, params?: any) => {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
axios
|
|
23
|
+
.get(`${url}?${stringify(params)}`)
|
|
24
|
+
.then((result: any) => {
|
|
25
|
+
result = result.data;
|
|
26
|
+
if ((result?.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
|
|
27
|
+
message.error(result.msg);
|
|
28
|
+
resolve(result);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
resolve(result);
|
|
32
|
+
})
|
|
33
|
+
.catch((err) => {
|
|
34
|
+
reject(err);
|
|
35
|
+
});
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
|
|
40
|
+
const data = reData && reData[position]?.data;
|
|
41
|
+
const list = Array.isArray(data) ? data :(data?.items || data?.list || data?.children || []);
|
|
42
|
+
const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
|
|
43
|
+
changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
|
|
44
|
+
}
|
|
45
|
+
// 格式化树选择器数据源
|
|
46
|
+
export const mapSearchTree = (treeDataItem: any, resKeyValue: any) => {
|
|
47
|
+
const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
|
|
48
|
+
return {
|
|
49
|
+
title: treeDataItem[resKeyValue[1]],
|
|
50
|
+
value: treeDataItem[resKeyValue[0]],
|
|
51
|
+
parentId: treeDataItem.parent,
|
|
52
|
+
data: { ...treeDataItem },
|
|
53
|
+
isLeaf: !haveChildren,
|
|
54
|
+
disabled: haveChildren,
|
|
55
|
+
children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue)) : [],
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
|
|
59
|
+
const data = reData && reData[position]?.data;
|
|
60
|
+
const formatData = (data &&
|
|
61
|
+
Array.isArray(data) &&
|
|
62
|
+
data.length &&
|
|
63
|
+
data.map((ites: any) => mapSearchTree(ites, resKeyValue))) ||
|
|
64
|
+
[]
|
|
65
|
+
changeSearchForm[changePosition].field.props.treeData = formatData;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const formatFormSourceList = (x: any,loadList: any, tableSearchForm: any)=> {
|
|
69
|
+
loadList.forEach((i: any,index: any) => {
|
|
70
|
+
if(i.resType == 'list') {
|
|
71
|
+
const resKeyValue = i.resKeyValue || ['code', 'name']
|
|
72
|
+
formatSource(x,index, i.resPosition, tableSearchForm,resKeyValue)
|
|
73
|
+
}
|
|
74
|
+
if(i.resType == 'treeList') {
|
|
75
|
+
const resKeyValue = i.resKeyValue || ['id', 'name']
|
|
76
|
+
formatTreeDataSource(x,index, i.resPosition, tableSearchForm,resKeyValue)
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
}
|
|
@@ -15,25 +15,7 @@ import { setInitialShowColumn } from '@/plugin/TableColumnSetting/utils';
|
|
|
15
15
|
import { handleAntdColumnsSpecialParams, uuid } from '@/utils/utils';
|
|
16
16
|
import { getItemDefaultWidth, noEmptyArray } from '@/components/Business/columnSettingTable/utils';
|
|
17
17
|
import { getEmployeeId } from '@/utils/LocalstorageUtils';
|
|
18
|
-
import { getSelectDataList } from './helps';
|
|
19
|
-
|
|
20
|
-
const loadSelectSource = (url: string, params?: any) => {
|
|
21
|
-
return new Promise((resolve, reject) => {
|
|
22
|
-
axios
|
|
23
|
-
.get(`${url}?${stringify(params)}`)
|
|
24
|
-
.then((result: any) => {
|
|
25
|
-
result = result.data;
|
|
26
|
-
if ((result?.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
|
|
27
|
-
message.error(result.msg);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
resolve(result);
|
|
31
|
-
})
|
|
32
|
-
.catch((err) => {
|
|
33
|
-
reject(err);
|
|
34
|
-
});
|
|
35
|
-
})
|
|
36
|
-
};
|
|
18
|
+
import { getSelectDataList, loadSelectSource, formatFormSourceList } from './helps';
|
|
37
19
|
|
|
38
20
|
const checkSpuMatchCode = (data: any) => {
|
|
39
21
|
return new Promise((resolve, reject) => {
|
|
@@ -71,36 +53,6 @@ const ResizeableTitle = (props) => {
|
|
|
71
53
|
);
|
|
72
54
|
};
|
|
73
55
|
|
|
74
|
-
const formatSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['code', 'name']) => {
|
|
75
|
-
const data = reData && reData[position]?.data;
|
|
76
|
-
const list = Array.isArray(data) ? data :(data?.items || data?.list || data?.children || []);
|
|
77
|
-
const formatData = list?.length ? list.map((v: any) => ({ text: v[resKeyValue[1]], value: v[resKeyValue[0]] })) : [];
|
|
78
|
-
changeSearchForm[changePosition] = {...changeSearchForm[changePosition], initialSource: formatData}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// 格式化树选择器数据源
|
|
82
|
-
const mapSearchTree = (treeDataItem: any, resKeyValue: any) => {
|
|
83
|
-
const haveChildren = Array.isArray(treeDataItem.children) && treeDataItem.children.length > 0;
|
|
84
|
-
return {
|
|
85
|
-
title: treeDataItem[resKeyValue[1]],
|
|
86
|
-
value: treeDataItem[resKeyValue[0]],
|
|
87
|
-
parentId: treeDataItem.parent,
|
|
88
|
-
data: { ...treeDataItem },
|
|
89
|
-
isLeaf: !haveChildren,
|
|
90
|
-
disabled: haveChildren,
|
|
91
|
-
children: haveChildren ? treeDataItem.children.map((i: any) => mapSearchTree(i, resKeyValue)) : [],
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
const formatTreeDataSource = (reData: any, position: number, changePosition: number,changeSearchForm: any,resKeyValue=['id', 'name']) => {
|
|
95
|
-
const data = reData && reData[position]?.data;
|
|
96
|
-
const formatData = (data &&
|
|
97
|
-
Array.isArray(data) &&
|
|
98
|
-
data.length &&
|
|
99
|
-
data.map((ites: any) => mapSearchTree(ites, resKeyValue))) ||
|
|
100
|
-
[]
|
|
101
|
-
changeSearchForm[changePosition].field.props.treeData = formatData;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
56
|
const initTableCode = {
|
|
105
57
|
'sku': ['skuSelect-tableOptionsToChoosePartCode','skuSelect-tableSelectedItemPartCode'],
|
|
106
58
|
'skc': ['skcSelect-tableOptionsToChoosePartCode','skcSelect-tableSelectedItemPartCode'],
|
|
@@ -128,7 +80,7 @@ const AddSelect = (props: any) => {
|
|
|
128
80
|
tableCodeList = [], // 非必填 默认取组件定义code,如需自定义----数组第一位为供选择商品的table的code,第二位为已选择商品的table的code
|
|
129
81
|
businessType = 'sku',
|
|
130
82
|
isAllowRepeatedSelect = false,
|
|
131
|
-
|
|
83
|
+
|
|
132
84
|
} = props;
|
|
133
85
|
const { url, otherParams, isMap, fixedparameter, fieldValToParam, mappingTextField = 'name', mappingTextShowKeyField, mappingValueField = 'code', mappingTextShowTextField } = requestConfig || {};
|
|
134
86
|
const resultSourceKey = sourceName || requestConfig?.sourceName || 'supplierCode'
|
|
@@ -666,78 +618,14 @@ const AddSelect = (props: any) => {
|
|
|
666
618
|
}
|
|
667
619
|
|
|
668
620
|
useEffect(() => {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
pageSize: 5000,
|
|
678
|
-
currentPage: 1,
|
|
679
|
-
}),
|
|
680
|
-
]).then((x: any)=>{
|
|
681
|
-
const searchPosition1 = noUseItemEancode ? 3 : 2;
|
|
682
|
-
const searchPosition2 = noUseItemEancode ? 4 : 3;
|
|
683
|
-
formatSource(x,0, searchPosition1, tableSearchForm,['id','name'])
|
|
684
|
-
formatTreeDataSource(x,1, searchPosition2, tableSearchForm)
|
|
685
|
-
})
|
|
686
|
-
}
|
|
687
|
-
if(businessType == 'skc') {
|
|
688
|
-
Promise.all([
|
|
689
|
-
loadSelectSource(`/items/item/propertyValue/sizeBySkcConfig`, {
|
|
690
|
-
pageSize: 10000,
|
|
691
|
-
currentPage: 1,
|
|
692
|
-
type: 2, // 类型:1尺码;2颜色
|
|
693
|
-
}),
|
|
694
|
-
loadSelectSource(`/items/category/queryCategoryTree`, {
|
|
695
|
-
pageSize: 5000,
|
|
696
|
-
currentPage: 1,
|
|
697
|
-
}),
|
|
698
|
-
loadSelectSource(`/items/class/withProperty`, {
|
|
699
|
-
pageSize: 5000,
|
|
700
|
-
currentPage: 1,
|
|
701
|
-
}),
|
|
702
|
-
loadSelectSource(`/items/brand/queryBrandList`, {
|
|
703
|
-
pageSize: 5000,
|
|
704
|
-
currentPage: 1,
|
|
705
|
-
'ctl-withAuth': true
|
|
706
|
-
}),
|
|
707
|
-
]).then((x: any)=>{
|
|
708
|
-
formatSource(x,0, 3, tableSearchForm,['value','value'])
|
|
709
|
-
formatTreeDataSource(x,1, 4, tableSearchForm)
|
|
710
|
-
formatSource(x,2, 5, tableSearchForm,['id','name'])
|
|
711
|
-
formatSource(x,3, 6, tableSearchForm,['id','name'])
|
|
712
|
-
})
|
|
713
|
-
}
|
|
714
|
-
if(businessType == 'spu') {
|
|
715
|
-
Promise.all([
|
|
716
|
-
loadSelectSource(`/user/orgViewNode/listNoPage`, {
|
|
717
|
-
'qp-employeeId-eq': getEmployeeId(),
|
|
718
|
-
'qp-orgViewCode-eq': 'business-organizational-view',
|
|
719
|
-
'ctl-withDefaultOrg': true,
|
|
720
|
-
}),
|
|
721
|
-
loadSelectSource(`/items/brand/queryBrandList`, {
|
|
722
|
-
pageSize: 5000,
|
|
723
|
-
currentPage: 1,
|
|
724
|
-
'ctl-withAuth': true
|
|
725
|
-
}),
|
|
726
|
-
loadSelectSource(`/items/category/queryCategoryTree`, {
|
|
727
|
-
pageSize: 5000,
|
|
728
|
-
currentPage: 1,
|
|
729
|
-
}),
|
|
730
|
-
loadSelectSource(`/items/class/withProperty`, {
|
|
731
|
-
pageSize: 5000,
|
|
732
|
-
currentPage: 1,
|
|
733
|
-
}),
|
|
734
|
-
]).then((x: any)=>{
|
|
735
|
-
formatSource(x,0, 2, tableSearchForm,['targetId','name'])
|
|
736
|
-
formatSource(x,1, 3, tableSearchForm,['id','name'])
|
|
737
|
-
formatTreeDataSource(x,2, 4, tableSearchForm)
|
|
738
|
-
formatSource(x,3, 5, tableSearchForm,['id','name'])
|
|
739
|
-
})
|
|
740
|
-
}
|
|
621
|
+
const pList = modalTableProps?.promiseLoadList || []
|
|
622
|
+
if(!pList?.length) return;
|
|
623
|
+
const list = pList.map((i: any) => {
|
|
624
|
+
return loadSelectSource(i.url, i.params)
|
|
625
|
+
});
|
|
626
|
+
Promise.all(list).then((x: any)=>{
|
|
627
|
+
formatFormSourceList(x,pList,tableSearchForm)
|
|
628
|
+
})
|
|
741
629
|
}, [businessType])
|
|
742
630
|
|
|
743
631
|
useEffect(() => {
|
|
@@ -1051,8 +939,8 @@ const AddSelect = (props: any) => {
|
|
|
1051
939
|
setPopValue(popvalue.filter(item => item.uuid !== record.uuid))
|
|
1052
940
|
setSelectedRowKeys([])
|
|
1053
941
|
} else {
|
|
1054
|
-
setPopValue(popvalue.filter(item => item
|
|
1055
|
-
setSelectedRowKeys([...selectedRowKeys.filter(item => item !== record
|
|
942
|
+
setPopValue(popvalue.filter(item => item[selectRowKey] !== record[selectRowKey]))
|
|
943
|
+
setSelectedRowKeys([...selectedRowKeys.filter(item => item !== record[selectRowKey])])
|
|
1056
944
|
}
|
|
1057
945
|
}
|
|
1058
946
|
|
|
@@ -789,6 +789,9 @@ const SearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
789
789
|
maxTagPlaceholder={maxTagPlaceholder}
|
|
790
790
|
{...currentSelectProps}
|
|
791
791
|
getPopupContainer={(triggerNode) => (getPopupContainer && getPopupContainer(triggerNode)) || triggerNode.parentElement}
|
|
792
|
+
onClear={() => {
|
|
793
|
+
run();
|
|
794
|
+
}}
|
|
792
795
|
>
|
|
793
796
|
{items.map(item => (
|
|
794
797
|
<Option key={item.value} label={item.text}>
|