@bit-sun/business-component 1.2.4-alpha.1 → 1.2.4
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/.fatherrc.ts +0 -1
- package/.umirc.ts +16 -31
- package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +1 -1
- package/dist/components/Business/SearchSelect/common.d.ts +1 -5
- package/dist/components/Business/SearchSelect/index.d.ts +1 -1
- package/dist/components/Business/SearchSelect/utils.d.ts +1 -2
- package/dist/components/Functional/SearchSelect/index.d.ts +1 -2
- package/dist/index.d.ts +0 -15
- package/dist/index.esm.js +4456 -19407
- package/dist/index.js +4443 -19411
- package/package.json +5 -26
- package/src/components/Business/CommodityEntry/index.md +3 -4
- package/src/components/Business/CommodityEntry/index.tsx +2 -7
- package/src/components/Business/SearchSelect/BusinessUtils.ts +14 -107
- package/src/components/Business/SearchSelect/common.ts +1 -20
- package/src/components/Business/SearchSelect/index.md +30 -60
- package/src/components/Business/SearchSelect/index.tsx +12 -21
- package/src/components/Business/SearchSelect/utils.ts +4 -30
- package/src/components/Functional/DataImport/index.tsx +2 -1
- package/src/components/Functional/DataValidation/index.tsx +1 -1
- package/src/components/Functional/SearchSelect/index.tsx +121 -218
- package/src/index.ts +6 -15
- package/typings.d.ts +0 -3
- package/dist/components/Business/AddSelectBusiness/index.d.ts +0 -1
- package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +0 -17
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +0 -30
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +0 -3
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +0 -2
- package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +0 -4
- package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +0 -2
- package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +0 -8
- package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +0 -8
- package/dist/components/Business/BsLayouts/index.d.ts +0 -18
- package/dist/components/Business/BsLayouts/service.d.ts +0 -1
- package/dist/components/Business/BsLayouts/utils.d.ts +0 -13
- package/dist/components/Business/BsSulaQueryTable/index.d.ts +0 -2
- package/dist/components/Business/BsSulaQueryTable/setting.d.ts +0 -58
- package/dist/components/Business/BsSulaQueryTable/utils.d.ts +0 -98
- package/dist/components/Business/CommonAlert/index.d.ts +0 -3
- package/dist/components/Business/CommonGuideWrapper/index.d.ts +0 -6
- package/dist/components/Business/DetailPageWrapper/index.d.ts +0 -9
- package/dist/components/Business/DetailPageWrapper/utils.d.ts +0 -8
- package/dist/components/Business/HomePageWrapper/index.d.ts +0 -3
- package/dist/components/Business/StateFlow/index.d.ts +0 -3
- package/dist/components/Business/TreeSearchSelect/index.d.ts +0 -3
- package/dist/components/Business/TreeSearchSelect/utils.d.ts +0 -2
- package/dist/components/Business/columnSettingTable/columnSetting.d.ts +0 -54
- package/dist/components/Business/columnSettingTable/index.d.ts +0 -16
- package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +0 -17
- package/dist/components/Business/columnSettingTable/utils.d.ts +0 -8
- package/dist/components/Functional/AddSelect/index.d.ts +0 -3
- package/dist/components/Functional/BillEntry/index.d.ts +0 -4
- package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +0 -12
- package/dist/components/Functional/TreeSearchSelect/index.d.ts +0 -2
- package/dist/utils/enumConfig.d.ts +0 -10
- package/dist/utils/requestUtils.d.ts +0 -1
- package/dist/utils/utils.d.ts +0 -3
- package/lib/assets/arrow_top.png +0 -0
- package/lib/assets/drag.svg +0 -17
- package/lib/assets/exportFail.svg +0 -38
- package/lib/assets/exportProcessing.svg +0 -29
- package/lib/assets/exportSuccess.svg +0 -35
- package/lib/assets/exportlogo.png +0 -0
- package/lib/assets/label_icon_bottom.svg +0 -26
- package/lib/assets/upExport.svg +0 -23
- package/src/assets/32.svg +0 -28
- package/src/assets/addIcon.svg +0 -18
- package/src/assets/allfunc.svg +0 -28
- package/src/assets/arrowRight.svg +0 -25
- package/src/assets/arrow_top.png +0 -0
- package/src/assets/btn-delete.svg +0 -30
- package/src/assets/btn-edit.svg +0 -20
- package/src/assets/btn-more.svg +0 -18
- package/src/assets/btn-submit.svg +0 -20
- package/src/assets/caidan.svg +0 -12
- package/src/assets/close.svg +0 -26
- package/src/assets/closeicon.png +0 -0
- package/src/assets/drag.svg +0 -17
- package/src/assets/exportFail.svg +0 -38
- package/src/assets/exportProcessing.svg +0 -29
- package/src/assets/exportSuccess.svg +0 -35
- package/src/assets/exportlogo.png +0 -0
- package/src/assets/fixed-left-active.svg +0 -12
- package/src/assets/fixed-left.svg +0 -16
- package/src/assets/fixed-right-active.svg +0 -12
- package/src/assets/fixed-right.svg +0 -16
- package/src/assets/guanbi.svg +0 -16
- package/src/assets/icon-quanping.svg +0 -16
- package/src/assets/icon-shezhi.svg +0 -18
- package/src/assets/label_icon_bottom.svg +0 -26
- package/src/assets/list-no-img.svg +0 -22
- package/src/assets/morentouxiang-32.svg +0 -24
- package/src/assets/right.png +0 -0
- package/src/assets/scanning.svg +0 -25
- package/src/assets/upExport.svg +0 -23
- package/src/assets/xinglan-icon-out.png +0 -0
- package/src/components/Business/AddSelectBusiness/index.md +0 -41
- package/src/components/Business/AddSelectBusiness/index.tsx +0 -290
- package/src/components/Business/BsLayouts/Components/AllFunc/drawContent.tsx +0 -112
- package/src/components/Business/BsLayouts/Components/AllFunc/index.less +0 -153
- package/src/components/Business/BsLayouts/Components/AllFunc/index.tsx +0 -70
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.less +0 -90
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.tsx +0 -38
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.tsx +0 -243
- package/src/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.tsx +0 -385
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.tsx +0 -286
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.tsx +0 -75
- package/src/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/drawContent.less +0 -171
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.less +0 -65
- package/src/components/Business/BsLayouts/Components/CustomerMenu/index.tsx +0 -154
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.less +0 -73
- package/src/components/Business/BsLayouts/Components/GlobalHeader/index.tsx +0 -158
- package/src/components/Business/BsLayouts/Components/RightContent/LoginModal.tsx +0 -85
- package/src/components/Business/BsLayouts/Components/RightContent/home.less +0 -218
- package/src/components/Business/BsLayouts/Components/RightContent/index.tsx +0 -156
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.less +0 -161
- package/src/components/Business/BsLayouts/Components/SearchFunc/index.tsx +0 -76
- package/src/components/Business/BsLayouts/index.less +0 -80
- package/src/components/Business/BsLayouts/index.tsx +0 -1465
- package/src/components/Business/BsLayouts/service.ts +0 -11
- package/src/components/Business/BsLayouts/utils.tsx +0 -211
- package/src/components/Business/BsSulaQueryTable/index.less +0 -220
- package/src/components/Business/BsSulaQueryTable/index.tsx +0 -505
- package/src/components/Business/BsSulaQueryTable/setting.tsx +0 -799
- package/src/components/Business/BsSulaQueryTable/utils.less +0 -65
- package/src/components/Business/BsSulaQueryTable/utils.tsx +0 -688
- package/src/components/Business/CommonAlert/index.less +0 -0
- package/src/components/Business/CommonAlert/index.tsx +0 -23
- package/src/components/Business/CommonGuideWrapper/index.less +0 -112
- package/src/components/Business/CommonGuideWrapper/index.md +0 -39
- package/src/components/Business/CommonGuideWrapper/index.tsx +0 -84
- package/src/components/Business/DetailPageWrapper/index.less +0 -80
- package/src/components/Business/DetailPageWrapper/index.tsx +0 -335
- package/src/components/Business/DetailPageWrapper/utils.tsx +0 -101
- package/src/components/Business/HomePageWrapper/index.less +0 -33
- package/src/components/Business/HomePageWrapper/index.md +0 -45
- package/src/components/Business/HomePageWrapper/index.tsx +0 -162
- package/src/components/Business/StateFlow/index.less +0 -131
- package/src/components/Business/StateFlow/index.md +0 -60
- package/src/components/Business/StateFlow/index.tsx +0 -30
- package/src/components/Business/TreeSearchSelect/index.md +0 -126
- package/src/components/Business/TreeSearchSelect/index.tsx +0 -34
- package/src/components/Business/TreeSearchSelect/utils.ts +0 -60
- package/src/components/Business/columnSettingTable/columnSetting.tsx +0 -764
- package/src/components/Business/columnSettingTable/index.less +0 -247
- package/src/components/Business/columnSettingTable/index.md +0 -358
- package/src/components/Business/columnSettingTable/index.tsx +0 -233
- package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +0 -241
- package/src/components/Business/columnSettingTable/utils.tsx +0 -69
- package/src/components/Functional/AddSelect/index.less +0 -367
- package/src/components/Functional/AddSelect/index.md +0 -122
- package/src/components/Functional/AddSelect/index.tsx +0 -962
- package/src/components/Functional/BillEntry/index.less +0 -371
- package/src/components/Functional/BillEntry/index.md +0 -39
- package/src/components/Functional/BillEntry/index.tsx +0 -613
- package/src/components/Functional/ExportFunctions/ExportIcon/index.md +0 -37
- package/src/components/Functional/ExportFunctions/ExportIcon/index.tsx +0 -59
- package/src/components/Functional/TreeSearchSelect/index.md +0 -47
- package/src/components/Functional/TreeSearchSelect/index.tsx +0 -149
- package/src/styles/bsDefault.less +0 -1907
- package/src/utils/enumConfig.ts +0 -10
- package/src/utils/requestUtils.ts +0 -33
- package/src/utils/utils.ts +0 -52
|
@@ -2,22 +2,20 @@
|
|
|
2
2
|
* @Description:
|
|
3
3
|
* @Author: rodchen
|
|
4
4
|
* @Date: 2022-05-07 15:17:28
|
|
5
|
-
* @LastEditTime: 2022-
|
|
6
|
-
* @LastEditors:
|
|
5
|
+
* @LastEditTime: 2022-05-08 21:01:21
|
|
6
|
+
* @LastEditors: rodchen
|
|
7
7
|
*/
|
|
8
|
-
import React, { useMemo
|
|
8
|
+
import React, { useMemo } from 'react';
|
|
9
9
|
import { commonFun } from './BusinessUtils';
|
|
10
|
-
import { handleDefaultPrefixUrl } from './utils';
|
|
11
10
|
import SearchSelect from '@/components/Functional/SearchSelect';
|
|
12
11
|
|
|
13
12
|
const MemoSearchSelect = React.memo(SearchSelect)
|
|
14
13
|
|
|
15
|
-
const
|
|
14
|
+
const BusinessSearchSelect = (props: any) => {
|
|
16
15
|
const businessType = props?.selectBusinessType || 'supplier';
|
|
17
|
-
const prefixUrl = props?.prefixUrl || { selectPrefix:
|
|
18
|
-
const innerRef = useRef();
|
|
16
|
+
const prefixUrl = props?.prefixUrl || { selectPrefix: '/bop/api', formSelectFix: '/bop/api' };
|
|
19
17
|
|
|
20
|
-
const { requestConfig, modalTableProps, needModalTable } = commonFun(businessType, prefixUrl,
|
|
18
|
+
const { requestConfig, modalTableProps, needModalTable } = commonFun(businessType, prefixUrl,props?.requestConfig || {}, props?.modalTableProps || {});
|
|
21
19
|
const currentProps = useMemo(() => {
|
|
22
20
|
return {
|
|
23
21
|
...props,
|
|
@@ -25,28 +23,21 @@ const BusinessSearchSelect = forwardRef((props: any, ref: any) => {
|
|
|
25
23
|
needModalTable,
|
|
26
24
|
modalTableProps
|
|
27
25
|
}
|
|
28
|
-
}, [props?.value
|
|
29
|
-
|
|
30
|
-
useImperativeHandle(ref, () => ({
|
|
31
|
-
getRef: () => innerRef,
|
|
32
|
-
}))
|
|
26
|
+
}, [props?.value])
|
|
33
27
|
|
|
34
28
|
return (
|
|
35
29
|
<div>
|
|
36
|
-
<MemoSearchSelect {...currentProps}
|
|
30
|
+
<MemoSearchSelect {...currentProps} />
|
|
37
31
|
</div>
|
|
38
32
|
);
|
|
39
|
-
}
|
|
33
|
+
};
|
|
40
34
|
|
|
41
35
|
export default React.memo(BusinessSearchSelect, (props, nextProps) => {
|
|
42
|
-
if
|
|
36
|
+
if(props && props.labelInValue && props.value && JSON.stringify(props.value) !== JSON.stringify(nextProps.value)) {
|
|
43
37
|
return false
|
|
44
38
|
}
|
|
45
|
-
if
|
|
46
|
-
return false
|
|
47
|
-
}
|
|
48
|
-
if (props && props.disabled !== nextProps.disabled) {
|
|
39
|
+
if(props && props.value !== nextProps.value) {
|
|
49
40
|
return false
|
|
50
41
|
}
|
|
51
42
|
return true
|
|
52
|
-
});
|
|
43
|
+
});
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { message } from 'antd';
|
|
3
3
|
import { stringify } from 'querystring';
|
|
4
|
-
import ENUM from '@/utils/enumConfig';
|
|
5
4
|
|
|
6
5
|
const getDicData = (dicCode: string) => {
|
|
7
6
|
let dicData = {};
|
|
8
7
|
let dictionaryData;
|
|
9
8
|
if (!dictionaryData) {
|
|
10
|
-
let storageDic = localStorage.getItem(
|
|
11
|
-
? JSON.parse(localStorage.getItem(
|
|
9
|
+
let storageDic = localStorage.getItem('dicData')
|
|
10
|
+
? JSON.parse(localStorage.getItem('dicData') || '{}')
|
|
12
11
|
: {};
|
|
13
12
|
dicData = storageDic[dicCode];
|
|
14
13
|
} else {
|
|
@@ -60,7 +59,7 @@ const loadSelectSource = (url: string, params?: any) => {
|
|
|
60
59
|
.get(`${url}?${stringify(params)}`)
|
|
61
60
|
.then((result: any) => {
|
|
62
61
|
result = result.data;
|
|
63
|
-
if ((result
|
|
62
|
+
if ((result.status && result.status !== '0') || (result?.code && result.code !== '000000')) {
|
|
64
63
|
message.error(result.msg);
|
|
65
64
|
return;
|
|
66
65
|
}
|
|
@@ -72,29 +71,4 @@ const loadSelectSource = (url: string, params?: any) => {
|
|
|
72
71
|
})
|
|
73
72
|
};
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
let result;
|
|
77
|
-
switch (type){
|
|
78
|
-
case 'supplier2': case 'customer2': case 'shopFile2':
|
|
79
|
-
result = '/channel-manage';
|
|
80
|
-
break;
|
|
81
|
-
case 'skuCommodity': case 'skuPropertyValue': case 'spuCommodity':
|
|
82
|
-
result = '/items';
|
|
83
|
-
break;
|
|
84
|
-
case 'physicalWarehouse': case 'realWarehouse': case 'virtualWarehouse': case 'channelWarehouse':
|
|
85
|
-
result = '/stock';
|
|
86
|
-
break;
|
|
87
|
-
case 'inventoryOrg2': case 'purchaseOrg': case 'salesOrg': case 'employee2':
|
|
88
|
-
result = '/user';
|
|
89
|
-
break;
|
|
90
|
-
case 'deliveryMode':
|
|
91
|
-
result = '/basic';
|
|
92
|
-
break;
|
|
93
|
-
default:
|
|
94
|
-
result = '/bop/api';
|
|
95
|
-
break
|
|
96
|
-
}
|
|
97
|
-
return result;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl }
|
|
74
|
+
export { getDictionarySource, getDictionaryTextByValue, loadSelectSource }
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from '@ant-design/icons';
|
|
28
28
|
import axios from 'axios';
|
|
29
29
|
import './index.less';
|
|
30
|
-
import _ from "
|
|
30
|
+
import _ from "loadsh"
|
|
31
31
|
|
|
32
32
|
// const luckysheet = window.luckysheet;
|
|
33
33
|
|
|
@@ -407,6 +407,7 @@ class DataImport extends React.Component {
|
|
|
407
407
|
let sheetData = luckysheet.getSheetData();
|
|
408
408
|
let data = JSON.parse(JSON.stringify(sheetData))
|
|
409
409
|
.filter((item) => {
|
|
410
|
+
debugger
|
|
410
411
|
return item[0]
|
|
411
412
|
})
|
|
412
413
|
.map((item) => {
|