@bit-sun/business-component 4.0.13-alpha.9 → 4.2.0-alpha.0
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/.umirc.ts +21 -10
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +5 -2
- package/dist/components/Business/DetailPageWrapper/index.d.ts +6 -0
- package/dist/components/Business/ItemPropertySelector/index.d.ts +3 -0
- package/dist/components/Business/ModalUtils/index.d.ts +8 -0
- package/dist/components/Business/SearchSelect/utils.d.ts +4 -2
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +3 -2
- package/dist/components/Business/columnSettingTable/index.d.ts +19 -2
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +20 -3
- package/dist/components/Functional/DataValidation/index.d.ts +11 -1
- package/dist/components/Functional/SearchSelect/utils.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +2030 -901
- package/dist/index.js +2030 -900
- package/package.json +9 -7
- package/src/assets/btn-cancel.svg +3 -0
- package/src/assets/btn-copy.svg +3 -0
- package/src/assets/btn-delete.svg +2 -29
- package/src/assets/btn-edit.svg +2 -19
- package/src/assets/btn-hangUp.svg +3 -0
- package/src/assets/btn-print.svg +3 -0
- package/src/assets/btn-refresh.svg +3 -0
- package/src/assets/btn-unhook.svg +3 -0
- package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +4 -3
- package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +0 -4
- package/src/components/Business/BsSulaQueryTable/index.less +5 -3
- package/src/components/Business/BsSulaQueryTable/index.md +45 -32
- package/src/components/Business/BsSulaQueryTable/index.tsx +153 -76
- package/src/components/Business/BsSulaQueryTable/setting.tsx +40 -10
- package/src/components/Business/BsSulaQueryTable/utils.tsx +15 -12
- package/src/components/Business/CommodityEntry/index.md +1 -1
- package/src/components/Business/CommodityEntry/index.tsx +11 -9
- package/src/components/Business/DetailPageWrapper/index.less +1 -1
- package/src/components/Business/DetailPageWrapper/index.tsx +24 -5
- package/src/components/Business/DetailPageWrapper/utils.tsx +7 -2
- package/src/components/Business/HomePageWrapper/index.less +1 -1
- package/src/components/Business/ItemPropertySelector/index.tsx +88 -0
- package/src/components/Business/JsonQueryTable/function.ts +1 -1
- package/src/components/Business/ModalUtils/index.tsx +45 -0
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +284 -57
- package/src/components/Business/SearchSelect/index.md +4 -4
- package/src/components/Business/SearchSelect/utils.ts +26 -4
- package/src/components/Business/columnSettingTable/columnSetting.tsx +27 -11
- package/src/components/Business/columnSettingTable/index.less +5 -3
- package/src/components/Business/columnSettingTable/index.md +200 -136
- package/src/components/Business/columnSettingTable/index.tsx +167 -39
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +178 -47
- package/src/components/Functional/AddSelect/index.tsx +19 -9
- package/src/components/Functional/BillEntry/index.less +3 -0
- package/src/components/Functional/DataValidation/index.md +1 -0
- package/src/components/Functional/DataValidation/index.tsx +138 -23
- package/src/components/Functional/QueryMutipleSelect/index.tsx +2 -1
- package/src/components/Functional/SearchSelect/index.less +4 -0
- package/src/components/Functional/SearchSelect/index.tsx +61 -20
- package/src/components/Functional/SearchSelect/utils.tsx +13 -10
- package/src/components/Functional/TreeSearchSelect/index.tsx +2 -1
- package/src/components/Solution/RuleComponent/index.js +59 -1
- package/src/components/Solution/RuleComponent/ruleFiled.js +1 -1
- package/src/index.ts +1 -0
- package/src/plugin/TableColumnSetting/index.less +5 -3
- package/src/plugin/TableColumnSetting/index.tsx +4 -3
- package/src/styles/bsDefault.less +9 -3
- package/src/utils/request.ts +8 -4
- package/src/utils/utils.ts +11 -15
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
|
+
import { Input, Select } from 'antd';
|
|
5
|
+
import { request } from 'bssula';
|
|
6
|
+
|
|
7
|
+
const ItemPropertySelector = ({
|
|
8
|
+
onChange,
|
|
9
|
+
value,
|
|
10
|
+
propertyCode,
|
|
11
|
+
name,
|
|
12
|
+
...restProps
|
|
13
|
+
}: any) => {
|
|
14
|
+
|
|
15
|
+
const [source, setSource] = useState([]);
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
// FIXME: 目前只能通过固定属性编码先获取属性id,再通过属性id去查属性值 @林军
|
|
19
|
+
if (propertyCode) {
|
|
20
|
+
request({
|
|
21
|
+
url: `/items/item/propertyValue/getPropertyValueNoPagerByCode?qp-propertyCode-eq=${propertyCode}&pageSize=5000`,
|
|
22
|
+
method: 'GET',
|
|
23
|
+
converter: ({ data }: any) => {
|
|
24
|
+
const source = (data?.items || []).map(item => ({
|
|
25
|
+
text: item.value,
|
|
26
|
+
value: item.value
|
|
27
|
+
}))
|
|
28
|
+
setSource(source);
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
return;
|
|
32
|
+
request({
|
|
33
|
+
url: `/items/item/property?qp-propertyCode-eq=${propertyCode}`,
|
|
34
|
+
metod: 'GET',
|
|
35
|
+
converter: ({ data }: any) => {
|
|
36
|
+
let propInfo = data?.items?.[0] || {};
|
|
37
|
+
if (propInfo?.dictIs) {
|
|
38
|
+
request({
|
|
39
|
+
url: `/items/bscDict/detailAndFilter/${propInfo?.dictCode}`,
|
|
40
|
+
method: 'GET',
|
|
41
|
+
converter: ({ data }: any) => {
|
|
42
|
+
const source = (data?.dictItemResVoList || []).map(item => ({
|
|
43
|
+
text: item.dictItemName,
|
|
44
|
+
value: item.dictItemName
|
|
45
|
+
}))
|
|
46
|
+
setSource(source);
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (propInfo?.id) {
|
|
53
|
+
request({
|
|
54
|
+
url: `/items/item/propertyValue?qp-propertyId-eq=${propInfo?.id}`,
|
|
55
|
+
method: 'GET',
|
|
56
|
+
converter: ({ data }: any) => {
|
|
57
|
+
const source = (data?.items || []).map(item => ({
|
|
58
|
+
text: item.value,
|
|
59
|
+
value: item.value
|
|
60
|
+
}))
|
|
61
|
+
setSource(source);
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
}, [propertyCode]);
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<Select
|
|
73
|
+
{...restProps}
|
|
74
|
+
value={value}
|
|
75
|
+
allowClear
|
|
76
|
+
style={{width: '100%'}}
|
|
77
|
+
onChange={(v: any) => {
|
|
78
|
+
onChange(v);
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
81
|
+
{source.map((res) => {
|
|
82
|
+
return <Select.Option value={res.value}>{res.text}</Select.Option>;
|
|
83
|
+
})}
|
|
84
|
+
</Select>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default ItemPropertySelector;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Modal } from 'antd';
|
|
2
|
+
|
|
3
|
+
const ModalUtils = {
|
|
4
|
+
success: (content: any) => {
|
|
5
|
+
Modal.success({
|
|
6
|
+
title: '成功提示',
|
|
7
|
+
content: content,
|
|
8
|
+
width: '30%',
|
|
9
|
+
maskClosable: true,
|
|
10
|
+
okText: "确定",
|
|
11
|
+
});
|
|
12
|
+
},
|
|
13
|
+
error: (content: any) => {
|
|
14
|
+
Modal.error({
|
|
15
|
+
title: '错误提示',
|
|
16
|
+
content: content,
|
|
17
|
+
width: '30%',
|
|
18
|
+
maskClosable: true,
|
|
19
|
+
okText: "确定",
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
warning: (content: any) => {
|
|
23
|
+
Modal.warning({
|
|
24
|
+
title: '警告提示',
|
|
25
|
+
content: content,
|
|
26
|
+
width: '30%',
|
|
27
|
+
maskClosable: true,
|
|
28
|
+
okText: "确定",
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
confirm: (title: any, content: any, width: any, onOk: any, onCancel: any) => {
|
|
32
|
+
Modal.confirm({
|
|
33
|
+
title: title,
|
|
34
|
+
content: content,
|
|
35
|
+
width: width,
|
|
36
|
+
onOk: onOk,
|
|
37
|
+
onCancel: onCancel
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
custom: (config: any) => {
|
|
41
|
+
Modal.info(config);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default ModalUtils;
|