@bit-sun/business-component 4.0.12-alpha.3 → 4.0.12-alpha.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.
- package/dist/components/Business/PropertyModal/index.d.ts +23 -0
- package/dist/components/Business/PropertyModal/mockData.d.ts +10 -0
- package/dist/components/Business/PropertyModal/propertyGroup.d.ts +4 -0
- package/dist/components/Business/columnSettingTable/components/TableSumComponent.d.ts +4 -0
- package/dist/components/Functional/QueryMutipleSelect/index.d.ts +5 -0
- package/dist/components/Functional/SearchSelect/utils.d.ts +16 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +2012 -883
- package/dist/index.js +2011 -880
- package/package.json +3 -3
- package/src/components/Business/BsSulaQueryTable/index.md +113 -20
- package/src/components/Business/BsSulaQueryTable/index.tsx +109 -7
- package/src/components/Business/PropertyModal/index.less +58 -0
- package/src/components/Business/PropertyModal/index.md +33 -0
- package/src/components/Business/PropertyModal/index.tsx +271 -0
- package/src/components/Business/PropertyModal/mockData.ts +160 -0
- package/src/components/Business/PropertyModal/propertyGroup.tsx +205 -0
- package/src/components/Business/SearchSelect/BusinessUtils.tsx +55 -3
- package/src/components/Business/SearchSelect/index.md +3 -4
- package/src/components/Business/SearchSelect/index.tsx +4 -1
- package/src/components/Business/columnSettingTable/components/TableSumComponent.tsx +25 -0
- package/src/components/Business/columnSettingTable/components/style.less +25 -0
- package/src/components/Business/columnSettingTable/index.md +5 -8
- package/src/components/Business/columnSettingTable/index.tsx +3 -28
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +116 -37
- package/src/components/Functional/QueryMutipleSelect/index.less +117 -0
- package/src/components/Functional/QueryMutipleSelect/index.md +41 -0
- package/src/components/Functional/QueryMutipleSelect/index.tsx +242 -0
- package/src/components/Functional/SearchSelect/index.less +40 -2
- package/src/components/Functional/SearchSelect/index.tsx +84 -283
- package/src/components/Functional/SearchSelect/utils.tsx +400 -0
- package/src/components/Solution/RuleComponent/ruleFiled.js +93 -93
- package/src/index.ts +2 -0
- package/src/styles/bsDefault.less +0 -1
- package/src/components/Functional/SearchSelect/utils.ts +0 -38
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
export const MockPropertyList = [
|
|
2
|
+
{
|
|
3
|
+
propertyCode: 'year',
|
|
4
|
+
propertyName: '年份',
|
|
5
|
+
isCommonUse: true,
|
|
6
|
+
detailList: [
|
|
7
|
+
{
|
|
8
|
+
name: '2022',
|
|
9
|
+
value: '2022',
|
|
10
|
+
isCommonUse: true,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: '2023',
|
|
14
|
+
value: '2023',
|
|
15
|
+
isCommonUse: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: '2024',
|
|
19
|
+
value: '2024',
|
|
20
|
+
isCommonUse: true,
|
|
21
|
+
},
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
propertyCode: 'season',
|
|
26
|
+
propertyName: '季节',
|
|
27
|
+
isCommonUse: true,
|
|
28
|
+
detailList: [
|
|
29
|
+
{
|
|
30
|
+
name: '春',
|
|
31
|
+
value: '1',
|
|
32
|
+
isCommonUse: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: '夏',
|
|
36
|
+
value: '2',
|
|
37
|
+
isCommonUse: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: '秋',
|
|
41
|
+
value: '3',
|
|
42
|
+
isCommonUse: true,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: '冬',
|
|
46
|
+
value: '4',
|
|
47
|
+
isCommonUse: true,
|
|
48
|
+
},
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
propertyCode: 'color',
|
|
53
|
+
propertyName: '色号',
|
|
54
|
+
isCommonUse: true,
|
|
55
|
+
detailList: [
|
|
56
|
+
{
|
|
57
|
+
name: '赤',
|
|
58
|
+
value: '1',
|
|
59
|
+
isCommonUse: true,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: '橙',
|
|
63
|
+
value: '2',
|
|
64
|
+
isCommonUse: true,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: '红',
|
|
68
|
+
value: '3',
|
|
69
|
+
isCommonUse: true,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: '绿',
|
|
73
|
+
value: '4',
|
|
74
|
+
isCommonUse: true,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: '青',
|
|
78
|
+
value: '5',
|
|
79
|
+
isCommonUse: true,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: '蓝',
|
|
83
|
+
value: '6',
|
|
84
|
+
isCommonUse: true,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: '紫',
|
|
88
|
+
value: '7',
|
|
89
|
+
isCommonUse: true,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: '橘红',
|
|
93
|
+
value: '8',
|
|
94
|
+
isCommonUse: false,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: '天蓝',
|
|
98
|
+
value: '9',
|
|
99
|
+
isCommonUse: false,
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: '银白',
|
|
103
|
+
value: '10',
|
|
104
|
+
isCommonUse: false,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: '紫',
|
|
108
|
+
value: '11',
|
|
109
|
+
isCommonUse: false,
|
|
110
|
+
},
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
propertyCode: 'brandCode',
|
|
115
|
+
propertyName: '品牌',
|
|
116
|
+
isCommonUse: false,
|
|
117
|
+
detailList: [
|
|
118
|
+
{
|
|
119
|
+
name: '品牌2',
|
|
120
|
+
value: '2',
|
|
121
|
+
isCommonUse: true,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: '品牌3',
|
|
125
|
+
value: '3',
|
|
126
|
+
isCommonUse: true,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: '品牌4',
|
|
130
|
+
value: '4',
|
|
131
|
+
isCommonUse: true,
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
propertyCode: 'size',
|
|
138
|
+
propertyName: '尺码',
|
|
139
|
+
isCommonUse: false,
|
|
140
|
+
detailList: [
|
|
141
|
+
{
|
|
142
|
+
name: 'M',
|
|
143
|
+
value: '2',
|
|
144
|
+
isCommonUse: true,
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'L',
|
|
148
|
+
value: '3',
|
|
149
|
+
isCommonUse: true,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'XL',
|
|
153
|
+
value: '4',
|
|
154
|
+
isCommonUse: true,
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
]
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { Checkbox } from 'antd';
|
|
3
|
+
import { CaretUpOutlined, CaretDownOutlined } from '@ant-design/icons';
|
|
4
|
+
import './index.less';
|
|
5
|
+
import { set } from "lodash";
|
|
6
|
+
|
|
7
|
+
interface PropertyItem {
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
isChecked: boolean;
|
|
11
|
+
isCommonUse: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface propertyInfoProps {
|
|
15
|
+
propertyName: string;
|
|
16
|
+
propertyCode: string;
|
|
17
|
+
detailList: Array<PropertyItem>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const PropertyGroup = (props: any) => {
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
propertyData,
|
|
24
|
+
handleProperyItemChange,
|
|
25
|
+
modalVisilbe,
|
|
26
|
+
itemValue,
|
|
27
|
+
} = props;
|
|
28
|
+
const [commonUseProperty, setCommonUseProperty] = useState<Array<PropertyItem> | any>([]); // 常用属性值
|
|
29
|
+
const [notCommonUseProperty, setNotCommonUseProperty] = useState<Array<PropertyItem> | any>([]); // 非常用属性值
|
|
30
|
+
const [indeterminate, setIndeterminate] = useState(false);
|
|
31
|
+
const [showNotCommon, setShowNotCommon] = useState(false);
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const proItemValue = (itemValue.propertyList || []).find((item: any) => item.propertyCode === propertyData.propertyCode);
|
|
35
|
+
const checkedList = proItemValue?.detailList || [];
|
|
36
|
+
|
|
37
|
+
const proDetailList = JSON.parse(JSON.stringify( propertyData?.detailList || []));
|
|
38
|
+
proDetailList.forEach((item: any) => {
|
|
39
|
+
if (checkedList.some((checkItem: any) => checkItem.value === item.value)){
|
|
40
|
+
item.isChecked = true;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const commonUseProperty = (proDetailList).filter((item: any) => item.isCommonUse);
|
|
44
|
+
|
|
45
|
+
const notCommonUseProperty = (proDetailList).filter((item: any) => !item.isCommonUse);
|
|
46
|
+
if (checkedList.some((item: any) => !item.isCommonUse)) {
|
|
47
|
+
setShowNotCommon(true)
|
|
48
|
+
}
|
|
49
|
+
setCommonUseProperty(commonUseProperty);
|
|
50
|
+
setNotCommonUseProperty(notCommonUseProperty);
|
|
51
|
+
}, [modalVisilbe])
|
|
52
|
+
|
|
53
|
+
const parseDataToParent = (comUse: any[], notComUse: any[]) => {
|
|
54
|
+
let choosedPropertyList = (comUse|| []).filter(item => item.isChecked);
|
|
55
|
+
if (showNotCommon) {
|
|
56
|
+
choosedPropertyList = [...choosedPropertyList, ...((notComUse|| []).filter(item => item.isChecked))]
|
|
57
|
+
}
|
|
58
|
+
handleProperyItemChange({
|
|
59
|
+
propertyCode: propertyData?.propertyCode,
|
|
60
|
+
propertyName: propertyData?.propertyName,
|
|
61
|
+
propertyId: propertyData?.propertyId,
|
|
62
|
+
isCommonUse: propertyData?.isCommonUse,
|
|
63
|
+
detailList: choosedPropertyList
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
const handleChangeAll = (e: any) => {
|
|
69
|
+
if (showNotCommon) {
|
|
70
|
+
notCommonUseProperty.map((item: any) => item.isChecked = e.target.checked);
|
|
71
|
+
setNotCommonUseProperty([...notCommonUseProperty])
|
|
72
|
+
}
|
|
73
|
+
commonUseProperty.map((item: any) => item.isChecked = e.target.checked);
|
|
74
|
+
parseDataToParent(commonUseProperty, notCommonUseProperty)
|
|
75
|
+
setCommonUseProperty([...commonUseProperty])
|
|
76
|
+
setIndeterminate(false)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const handleIndeterminate = (commonUseProperty: any[], notCommonUseProperty: any[]) => {
|
|
80
|
+
let checkList = [...commonUseProperty];
|
|
81
|
+
if (showNotCommon) {
|
|
82
|
+
checkList = [...checkList, ...notCommonUseProperty]
|
|
83
|
+
}
|
|
84
|
+
const indeterminate = !!checkList.filter(item => item.isChecked).length && checkList.filter(item => item.isChecked).length !== checkList.length;
|
|
85
|
+
setIndeterminate(indeterminate);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const handleItemChecked = (e: any, item: any, type: number) => {
|
|
89
|
+
if (type === 1) { // 常用属性
|
|
90
|
+
(commonUseProperty || []).forEach((info: any) => {
|
|
91
|
+
if (info.value === item.value) {
|
|
92
|
+
info.isChecked = e.target.checked;
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
handleIndeterminate(commonUseProperty, notCommonUseProperty)
|
|
96
|
+
parseDataToParent(commonUseProperty, notCommonUseProperty)
|
|
97
|
+
setCommonUseProperty([...commonUseProperty])
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (type === 2) { // 非常用属性
|
|
101
|
+
(notCommonUseProperty || []).forEach((info: any) => {
|
|
102
|
+
if (info.value === item.value) {
|
|
103
|
+
info.isChecked = e.target.checked;
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
handleIndeterminate(commonUseProperty, notCommonUseProperty)
|
|
107
|
+
parseDataToParent(commonUseProperty, notCommonUseProperty)
|
|
108
|
+
setNotCommonUseProperty([...notCommonUseProperty])
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const checkAllChecked = () => {
|
|
113
|
+
const checkData = showNotCommon ? [...commonUseProperty, ...notCommonUseProperty] : [...commonUseProperty];
|
|
114
|
+
return checkData.length && checkData.every(item => item.isChecked) ? true : false;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<div className={'propertyGroup_container'}>
|
|
120
|
+
<div className={'propertyGroup_container_left'}>
|
|
121
|
+
<Checkbox
|
|
122
|
+
checked={checkAllChecked()}
|
|
123
|
+
indeterminate={indeterminate}
|
|
124
|
+
onChange={handleChangeAll}
|
|
125
|
+
>
|
|
126
|
+
<div title={propertyData.name} className="propertyGroup_checkbox_container">{propertyData.propertyName}</div>
|
|
127
|
+
</Checkbox>
|
|
128
|
+
</div>
|
|
129
|
+
<div className={'propertyGroup_container_right'}>
|
|
130
|
+
{
|
|
131
|
+
(commonUseProperty || []).map((item: any) => (
|
|
132
|
+
<Checkbox
|
|
133
|
+
checked={item.isChecked}
|
|
134
|
+
key={item.value}
|
|
135
|
+
onChange={(e) => {
|
|
136
|
+
handleItemChecked(e, item, 1)
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
<div title={item.name} className="propertyGroup_checkbox_container">
|
|
140
|
+
{item.name}
|
|
141
|
+
</div>
|
|
142
|
+
</Checkbox>
|
|
143
|
+
))
|
|
144
|
+
|
|
145
|
+
}
|
|
146
|
+
{
|
|
147
|
+
showNotCommon && (notCommonUseProperty || []).map((item: any) => (
|
|
148
|
+
<Checkbox
|
|
149
|
+
checked={item.isChecked}
|
|
150
|
+
key={item.value}
|
|
151
|
+
onChange={(e) => {
|
|
152
|
+
handleItemChecked(e, item, 2)
|
|
153
|
+
}}
|
|
154
|
+
>
|
|
155
|
+
<div title={item.name} className="propertyGroup_checkbox_container">
|
|
156
|
+
{item.name}
|
|
157
|
+
</div>
|
|
158
|
+
</Checkbox>
|
|
159
|
+
))
|
|
160
|
+
|
|
161
|
+
}
|
|
162
|
+
{
|
|
163
|
+
!!notCommonUseProperty.length && (
|
|
164
|
+
<div
|
|
165
|
+
style={{
|
|
166
|
+
width: '50px',
|
|
167
|
+
cursor: 'pointer',
|
|
168
|
+
color: '#005cff',
|
|
169
|
+
fontSize: '10px',
|
|
170
|
+
display: 'flex',
|
|
171
|
+
alignItems: 'center',
|
|
172
|
+
}}
|
|
173
|
+
onClick={() => {
|
|
174
|
+
setShowNotCommon(!showNotCommon);
|
|
175
|
+
handleIndeterminate(commonUseProperty, notCommonUseProperty)
|
|
176
|
+
}}
|
|
177
|
+
>
|
|
178
|
+
{
|
|
179
|
+
showNotCommon && (
|
|
180
|
+
<>
|
|
181
|
+
<CaretUpOutlined />
|
|
182
|
+
收起
|
|
183
|
+
</>
|
|
184
|
+
)
|
|
185
|
+
}
|
|
186
|
+
{
|
|
187
|
+
!showNotCommon && (
|
|
188
|
+
<>
|
|
189
|
+
<CaretDownOutlined />
|
|
190
|
+
展开
|
|
191
|
+
</>
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
</div>
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export default React.memo(PropertyGroup, (props, nextProps) => {
|
|
203
|
+
if (props.modalVisilbe !== nextProps.modalVisilbe) return false;
|
|
204
|
+
return true;
|
|
205
|
+
});
|
|
@@ -15,6 +15,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
15
15
|
|
|
16
16
|
// 默认type === 'supplier' 供应商选择器
|
|
17
17
|
let requestConfig = {
|
|
18
|
+
init: true,
|
|
18
19
|
url: `${prefixUrl.selectPrefix}/supplier`,
|
|
19
20
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
20
21
|
otherParams: {
|
|
@@ -295,7 +296,8 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
295
296
|
// 商品选择器sku
|
|
296
297
|
if(type === 'skuCommodity') {
|
|
297
298
|
requestConfig = {
|
|
298
|
-
url: `${prefixUrl.selectPrefix}/sku/doPageBySelect/
|
|
299
|
+
url: `${prefixUrl.selectPrefix}/sku/doPageBySelect/v4`,
|
|
300
|
+
method: 'post',
|
|
299
301
|
filter: 'skuCodeAndSkuName', // 过滤参数
|
|
300
302
|
searchStartLength: 4,
|
|
301
303
|
mappingTextField: 'name',
|
|
@@ -324,9 +326,43 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
324
326
|
...selectConfigProps,
|
|
325
327
|
}
|
|
326
328
|
tableSearchForm = [
|
|
327
|
-
{ name: 'qp-skuCode-in', label: 'SKU编码',
|
|
329
|
+
{ name: 'qp-skuCode-in', label: 'SKU编码', field: {
|
|
330
|
+
type:'multipleQuerySearchSelect',
|
|
331
|
+
props: {
|
|
332
|
+
selectProps: {
|
|
333
|
+
mode: "multiple",
|
|
334
|
+
placeholder: '请输入SKU编码查询'
|
|
335
|
+
},
|
|
336
|
+
requestConfig: {
|
|
337
|
+
url: '/items/sku//listNoPage/Simple',
|
|
338
|
+
filter: 'qp-skuCode,name-orGroup,like',
|
|
339
|
+
mappingTextField: 'name',
|
|
340
|
+
mappingValueField: 'skuCode',
|
|
341
|
+
sourceName: 'qp-skuCode-in',
|
|
342
|
+
specialBracket: true,
|
|
343
|
+
otherParams: {
|
|
344
|
+
'ownOrgSign': getCurrentTargetBgId(),
|
|
345
|
+
}, // 默认参数
|
|
346
|
+
},
|
|
347
|
+
}
|
|
348
|
+
} },
|
|
328
349
|
{ name: 'qp-skuName-like', label: 'SKU名称' },
|
|
329
|
-
{ name: 'qp-itemCode-
|
|
350
|
+
{ name: 'qp-itemCode-in', label: 'SPU编码', field: {
|
|
351
|
+
type:'multipleQuerySearchSelect',
|
|
352
|
+
props: {
|
|
353
|
+
selectProps: {
|
|
354
|
+
placeholder: '请输入SPU编码查询'
|
|
355
|
+
},
|
|
356
|
+
requestConfig: {
|
|
357
|
+
url: '/items/item/listNoPage/Simple',
|
|
358
|
+
filter: 'qp-itemCode,name-orGroup,like',
|
|
359
|
+
mappingTextField: 'name',
|
|
360
|
+
mappingValueField: 'itemCode',
|
|
361
|
+
sourceName: 'qp-itemCode-in',
|
|
362
|
+
specialBracket: true,
|
|
363
|
+
},
|
|
364
|
+
}
|
|
365
|
+
} },
|
|
330
366
|
{ name: 'qp-eancode-in', label: '商品条码', field: {
|
|
331
367
|
type: 'multipleQueryInput',
|
|
332
368
|
props: {
|
|
@@ -365,6 +401,9 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
365
401
|
dropdownStyle: { maxHeight: 400, maxWidth: 100, overflow: 'auto' }
|
|
366
402
|
},
|
|
367
403
|
} },
|
|
404
|
+
{ name: 'UNIQUE_SPEC', label: '属性', field: {
|
|
405
|
+
type: 'proppertySelector',
|
|
406
|
+
} },
|
|
368
407
|
]
|
|
369
408
|
Promise.all([
|
|
370
409
|
loadSelectSource(`${prefixUrl.formSelectFix}/brand/queryBrandList`, {
|
|
@@ -784,6 +823,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
784
823
|
...selectConfigProps,
|
|
785
824
|
}
|
|
786
825
|
requestConfig = {
|
|
826
|
+
init: true,
|
|
787
827
|
url: `${prefixUrl.selectPrefix}/skuPropertyValue/list`,
|
|
788
828
|
filter: 'qp-value-like', // 过滤参数
|
|
789
829
|
mappingTextField: 'value',
|
|
@@ -1694,6 +1734,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1694
1734
|
...selectConfigProps,
|
|
1695
1735
|
}
|
|
1696
1736
|
requestConfig = {
|
|
1737
|
+
init: true,
|
|
1697
1738
|
url: `${prefixUrl.selectPrefix}/inventoryOrg`,
|
|
1698
1739
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
1699
1740
|
mappingTextField: 'name',
|
|
@@ -1726,6 +1767,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1726
1767
|
...selectConfigProps,
|
|
1727
1768
|
}
|
|
1728
1769
|
requestConfig = {
|
|
1770
|
+
init: true,
|
|
1729
1771
|
url: `${prefixUrl.selectPrefix}/company`,
|
|
1730
1772
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
1731
1773
|
mappingTextField: 'name',
|
|
@@ -1758,6 +1800,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1758
1800
|
...selectConfigProps,
|
|
1759
1801
|
}
|
|
1760
1802
|
requestConfig = {
|
|
1803
|
+
init: true,
|
|
1761
1804
|
url: `${prefixUrl.selectPrefix}/platCompany`,
|
|
1762
1805
|
filter: 'qp-name,socialCreditCode-orGroup,like', // 过滤参数
|
|
1763
1806
|
mappingTextField: 'name',
|
|
@@ -1790,6 +1833,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1790
1833
|
...selectConfigProps,
|
|
1791
1834
|
}
|
|
1792
1835
|
requestConfig = {
|
|
1836
|
+
init: true,
|
|
1793
1837
|
url: `${prefixUrl.selectPrefix}/employee/v2`,
|
|
1794
1838
|
filter: 'qp-employeeNumber,name-orGroup,like', // 过滤参数
|
|
1795
1839
|
mappingTextField: 'name',
|
|
@@ -1887,6 +1931,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
1887
1931
|
...selectConfigProps,
|
|
1888
1932
|
}
|
|
1889
1933
|
requestConfig = {
|
|
1934
|
+
init: true,
|
|
1890
1935
|
url: `${prefixUrl.selectPrefix}/employee/pageList/v2`,
|
|
1891
1936
|
filter: 'qp-username,name-orGroup,like', // 过滤参数
|
|
1892
1937
|
mappingTextField: 'name',
|
|
@@ -2008,6 +2053,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2008
2053
|
const isLogisCompanyCodeSingleSearch = requestConfigProp?.fixedparameter?.some((i: any) => i == 'qp-logisCompanyCode-eq');
|
|
2009
2054
|
const logisCompanyCodeSingleSearchName = isLogisCompanyCodeSingleSearch ? 'qp-logisCompanyCode-eq' : 'qp-logisCompanyCode-in';
|
|
2010
2055
|
requestConfig = {
|
|
2056
|
+
init: true,
|
|
2011
2057
|
url: `${prefixUrl.selectPrefix}/deliveryMode`,
|
|
2012
2058
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
2013
2059
|
mappingTextField: 'name',
|
|
@@ -2135,6 +2181,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2135
2181
|
...selectConfigProps,
|
|
2136
2182
|
}
|
|
2137
2183
|
requestConfig = {
|
|
2184
|
+
init: true,
|
|
2138
2185
|
url: `${prefixUrl.selectPrefix}/ruleTemplate`,
|
|
2139
2186
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
2140
2187
|
mappingTextField: 'name',
|
|
@@ -2210,6 +2257,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2210
2257
|
...selectConfigProps,
|
|
2211
2258
|
}
|
|
2212
2259
|
requestConfig = {
|
|
2260
|
+
init: true,
|
|
2213
2261
|
url: `${prefixUrl.selectPrefix}/role`,
|
|
2214
2262
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
2215
2263
|
mappingTextField: 'name',
|
|
@@ -2308,6 +2356,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2308
2356
|
...selectConfigProps,
|
|
2309
2357
|
}
|
|
2310
2358
|
requestConfig = {
|
|
2359
|
+
init: true,
|
|
2311
2360
|
url: `${prefixUrl.selectPrefix}/channelInfo`,
|
|
2312
2361
|
filter: 'qp-name,code-orGroup,like', // 过滤参数
|
|
2313
2362
|
mappingTextField: 'name',
|
|
@@ -2398,6 +2447,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2398
2447
|
...selectConfigProps,
|
|
2399
2448
|
}
|
|
2400
2449
|
requestConfig = {
|
|
2450
|
+
init: true,
|
|
2401
2451
|
url: `${prefixUrl.selectPrefix}/orgViewNode/common/pageList`,
|
|
2402
2452
|
filter: 'qp-name-like', // 过滤参数
|
|
2403
2453
|
mappingTextField: 'name',
|
|
@@ -2531,6 +2581,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2531
2581
|
...selectConfigProps,
|
|
2532
2582
|
}
|
|
2533
2583
|
requestConfig = {
|
|
2584
|
+
init: true,
|
|
2534
2585
|
url: `${prefixUrl.selectPrefix}/person`,
|
|
2535
2586
|
filter: 'qp-code,name-orGroup,like', // 过滤参数
|
|
2536
2587
|
mappingTextField: 'name',
|
|
@@ -2687,6 +2738,7 @@ export function commonFun (type?: string, prefixUrl: any, parentProps?:any) {
|
|
|
2687
2738
|
...selectConfigProps,
|
|
2688
2739
|
}
|
|
2689
2740
|
requestConfig = {
|
|
2741
|
+
init: true,
|
|
2690
2742
|
url: `${prefixUrl.selectPrefix}/priceType`,
|
|
2691
2743
|
filter: 'qp-code,name-orGroup,like', // 过滤参数
|
|
2692
2744
|
mappingTextField: 'name',
|
|
@@ -426,7 +426,7 @@ export default () => {
|
|
|
426
426
|
|
|
427
427
|
useEffect(() => {
|
|
428
428
|
if(tabKey === 'multiple') {
|
|
429
|
-
setValue([
|
|
429
|
+
setValue([])
|
|
430
430
|
}
|
|
431
431
|
},[tabKey])
|
|
432
432
|
|
|
@@ -448,7 +448,7 @@ export default () => {
|
|
|
448
448
|
// },
|
|
449
449
|
// prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
|
|
450
450
|
selectProps,
|
|
451
|
-
|
|
451
|
+
labelInValue: true,
|
|
452
452
|
selectBusinessType: 'physicalWarehouse',
|
|
453
453
|
};
|
|
454
454
|
|
|
@@ -520,7 +520,7 @@ export default () => {
|
|
|
520
520
|
// needStatusSearch: true
|
|
521
521
|
// },
|
|
522
522
|
selectProps,
|
|
523
|
-
selectBusinessType: '
|
|
523
|
+
selectBusinessType: 'brand',
|
|
524
524
|
};
|
|
525
525
|
|
|
526
526
|
const onTabChange = (key) => {
|
|
@@ -1707,7 +1707,6 @@ export default () => {
|
|
|
1707
1707
|
}
|
|
1708
1708
|
const selectPropsMultiple = {
|
|
1709
1709
|
mode: 'multiple',
|
|
1710
|
-
maxTagCount: 1,
|
|
1711
1710
|
}
|
|
1712
1711
|
|
|
1713
1712
|
const [ tabKey, setTabKey ] = useState('single')
|
|
@@ -26,7 +26,7 @@ const BusinessSearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
26
26
|
needModalTable,
|
|
27
27
|
modalTableProps
|
|
28
28
|
}
|
|
29
|
-
}, [props?.value, props.disabled, props.selectBusinessType]);
|
|
29
|
+
}, [props?.value, props.disabled, props.selectBusinessType,props.requestConfig?.noOperate]);
|
|
30
30
|
|
|
31
31
|
useImperativeHandle(ref, () => ({
|
|
32
32
|
getRef: () => innerRef,
|
|
@@ -52,5 +52,8 @@ export default React.memo(BusinessSearchSelect, (props, nextProps) => {
|
|
|
52
52
|
if (props && props.selectBusinessType !== nextProps.selectBusinessType) {
|
|
53
53
|
return false
|
|
54
54
|
}
|
|
55
|
+
if (props && props.requestConfig && typeof props.requestConfig.noOperate === 'boolean' && props.requestConfig.noOperate !== nextProps.requestConfig.noOperate) {
|
|
56
|
+
return false
|
|
57
|
+
}
|
|
55
58
|
return true
|
|
56
59
|
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { Fragment } from "react";
|
|
2
|
+
import { Typography } from 'antd';
|
|
3
|
+
import './style.less';
|
|
4
|
+
|
|
5
|
+
//表格底部 金额总计
|
|
6
|
+
export default ({
|
|
7
|
+
summary
|
|
8
|
+
}: any) => {
|
|
9
|
+
const { Text } = Typography;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Fragment>
|
|
13
|
+
<div className="table_sum_wrapper">
|
|
14
|
+
<div className='table-bssula-summary'>
|
|
15
|
+
{summary.map((item: any) => (
|
|
16
|
+
<Text type='danger'>
|
|
17
|
+
{item.label}: <span className='table-bssula-summary-count'>{item.count || 0}</span>
|
|
18
|
+
</Text>
|
|
19
|
+
))}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div className="sum_right_line"></div>
|
|
23
|
+
</Fragment>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
.table_sum_wrapper{
|
|
3
|
+
position: absolute;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
width: 80%;
|
|
6
|
+
height: 26px;
|
|
7
|
+
bottom: 0;
|
|
8
|
+
.table-bssula-summary{
|
|
9
|
+
height: 40px;
|
|
10
|
+
right: 0;
|
|
11
|
+
bottom: -20px;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
overflow-x: auto;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.sum_right_line {
|
|
17
|
+
position: absolute;
|
|
18
|
+
right: 20%;
|
|
19
|
+
bottom: 0;
|
|
20
|
+
width: 16px;
|
|
21
|
+
height: 26px;
|
|
22
|
+
opacity: 0.32;
|
|
23
|
+
transform: scaleX(-1);
|
|
24
|
+
background-image: linear-gradient(270deg, #ffffff00 0%, #A4A4A4 100%);
|
|
25
|
+
}
|
|
@@ -111,7 +111,7 @@ export default () => {
|
|
|
111
111
|
x: '100%',
|
|
112
112
|
},
|
|
113
113
|
rowKey: 'id',
|
|
114
|
-
dataSource: [{},
|
|
114
|
+
dataSource: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],
|
|
115
115
|
pagination: {
|
|
116
116
|
showTotal: (total: any) => `共 ${total} 条`,
|
|
117
117
|
showQuickJumper: true,
|
|
@@ -291,17 +291,14 @@ export default () => {
|
|
|
291
291
|
]
|
|
292
292
|
const config = {
|
|
293
293
|
modeType: 'view',
|
|
294
|
-
scroll: {
|
|
295
|
-
x: '100%',
|
|
296
|
-
},
|
|
297
294
|
rowKey: 'id',
|
|
298
295
|
// initialDataSource: [{}, {}],
|
|
299
296
|
remoteDataSource: {
|
|
300
297
|
url: 'xxxxxx',
|
|
301
298
|
converter: ({ data }: any) => {
|
|
302
299
|
return {
|
|
303
|
-
list: [{},{}],
|
|
304
|
-
total:
|
|
300
|
+
list: [{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],
|
|
301
|
+
total: 40
|
|
305
302
|
};
|
|
306
303
|
},
|
|
307
304
|
},
|
|
@@ -310,8 +307,8 @@ export default () => {
|
|
|
310
307
|
showQuickJumper: true,
|
|
311
308
|
hideOnSinglePage: true,
|
|
312
309
|
current: 1,
|
|
313
|
-
pageSize:
|
|
314
|
-
total:
|
|
310
|
+
pageSize: 30,
|
|
311
|
+
total: 40,
|
|
315
312
|
size: 'small'
|
|
316
313
|
},
|
|
317
314
|
rowSelection: {
|