@bit-sun/business-component 2.4.16 → 2.4.17

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 (82) hide show
  1. package/dist/common/ENUM.d.ts +40 -0
  2. package/dist/components/Business/AddSelectBusiness/index.d.ts +4 -0
  3. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +5 -0
  4. package/dist/components/Business/BsLayouts/Components/AllFunc/index.d.ts +4 -0
  5. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +4 -0
  6. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +17 -0
  7. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +30 -0
  8. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +4 -0
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +3 -0
  10. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +4 -0
  11. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +5 -0
  12. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +3 -0
  13. package/dist/components/Business/BsLayouts/Components/RightContent/index.d.ts +8 -0
  14. package/dist/components/Business/BsLayouts/Components/SearchFunc/index.d.ts +8 -0
  15. package/dist/components/Business/BsLayouts/index.d.ts +18 -0
  16. package/dist/components/Business/BsLayouts/service.d.ts +1 -0
  17. package/dist/components/Business/BsLayouts/utils.d.ts +10 -0
  18. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +60 -0
  19. package/dist/components/Business/BsSulaQueryTable/index.d.ts +3 -0
  20. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +60 -0
  21. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +99 -0
  22. package/dist/components/Business/CommodityEntry/index.d.ts +3 -0
  23. package/dist/components/Business/CommonAlert/index.d.ts +4 -0
  24. package/dist/components/Business/CommonGuideWrapper/index.d.ts +6 -0
  25. package/dist/components/Business/DetailPageWrapper/index.d.ts +10 -0
  26. package/dist/components/Business/DetailPageWrapper/utils.d.ts +8 -0
  27. package/dist/components/Business/HomePageWrapper/index.d.ts +4 -0
  28. package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +3 -0
  29. package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +3 -0
  30. package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +7 -0
  31. package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +3 -0
  32. package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +3 -0
  33. package/dist/components/Business/JsonQueryTable/function.d.ts +37 -0
  34. package/dist/components/Business/JsonQueryTable/index.d.ts +4 -0
  35. package/dist/components/Business/JsonQueryTable/static.d.ts +44 -0
  36. package/dist/components/Business/SearchSelect/BusinessUtils.d.ts +5 -0
  37. package/dist/components/Business/SearchSelect/common.d.ts +33 -0
  38. package/dist/components/Business/SearchSelect/index.d.ts +3 -0
  39. package/dist/components/Business/SearchSelect/utils.d.ts +5 -0
  40. package/dist/components/Business/StateFlow/index.d.ts +4 -0
  41. package/dist/components/Business/TreeSearchSelect/index.d.ts +3 -0
  42. package/dist/components/Business/TreeSearchSelect/utils.d.ts +4 -0
  43. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +54 -0
  44. package/dist/components/Business/columnSettingTable/index.d.ts +16 -0
  45. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +17 -0
  46. package/dist/components/Business/columnSettingTable/utils.d.ts +9 -0
  47. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +3 -0
  48. package/dist/components/Business/moreTreeTable/hooks/useSticky.d.ts +8 -0
  49. package/dist/components/Business/moreTreeTable/index.d.ts +4 -0
  50. package/dist/components/Business/moreTreeTable/utils.d.ts +9 -0
  51. package/dist/components/Functional/AddSelect/helps.d.ts +14 -0
  52. package/dist/components/Functional/AddSelect/index.d.ts +4 -0
  53. package/dist/components/Functional/BillEntry/index.d.ts +4 -0
  54. package/dist/components/Functional/BsAntdSula/BsCascader/index.d.ts +18 -0
  55. package/dist/components/Functional/BsAntdSula/index.d.ts +1 -0
  56. package/dist/components/Functional/DataImport/index.d.ts +144 -0
  57. package/dist/components/Functional/DataValidation/index.d.ts +144 -0
  58. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +13 -0
  59. package/dist/components/Functional/QueryMutipleInput/index.d.ts +6 -0
  60. package/dist/components/Functional/SearchSelect/index.d.ts +4 -0
  61. package/dist/components/Functional/SearchSelect/utils.d.ts +1 -0
  62. package/dist/components/Functional/TreeSearchSelect/index.d.ts +3 -0
  63. package/dist/components/Solution/RuleComponent/Formula.d.ts +9 -0
  64. package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +12 -0
  65. package/dist/components/Solution/RuleComponent/services.d.ts +1 -0
  66. package/dist/index.d.ts +28 -0
  67. package/dist/index.esm.js +31556 -0
  68. package/dist/index.js +523 -417
  69. package/dist/plugin/TableColumnSetting/index.d.ts +64 -0
  70. package/dist/plugin/TableColumnSetting/utils.d.ts +1 -0
  71. package/dist/utils/CheckOneUser/index.d.ts +2 -0
  72. package/dist/utils/CustomLoginInfo.d.ts +11 -0
  73. package/dist/utils/LocalstorageUtils.d.ts +17 -0
  74. package/dist/utils/TableUtils.d.ts +11 -0
  75. package/dist/utils/checkUtils.d.ts +3 -0
  76. package/dist/utils/enumConfig.d.ts +12 -0
  77. package/dist/utils/index.d.ts +4 -0
  78. package/dist/utils/requestUtils.d.ts +29 -0
  79. package/dist/utils/utils.d.ts +17 -0
  80. package/package.json +1 -1
  81. package/src/components/Business/SearchSelect/BusinessUtils.ts +113 -4
  82. package/src/components/Business/SearchSelect/common.ts +45 -1
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface TableColumnSettingProps {
4
+ /** tableCode必填,做用户存储关键key,*/
5
+ tableCode: string;
6
+ /** datasource必填,为要操作的表头(即原始表头),*/
7
+ datasource: any;
8
+ /** showColumns必填,为当前用户设置的表头,*/
9
+ showColumns: any;
10
+ /** setShowColumns必填,设置当前表头的方法,*/
11
+ setShowColumns: void;
12
+ /** settingImgAttribute非必填,设置当前设置img样式,*/
13
+ settingImgAttribute: {
14
+ [propName: string]: any;
15
+ };
16
+ [propName: string]: any;
17
+ }
18
+ declare class TableColumnSetting extends React.Component<TableColumnSettingProps> {
19
+ state: {
20
+ dataSource: never[];
21
+ columns: never[];
22
+ selectedRowKeys: never[];
23
+ sortDataSource: never[];
24
+ setVisible: boolean;
25
+ searchDataSource: boolean;
26
+ onSearchSort: boolean;
27
+ };
28
+ patchUserColumnConfig: (config: any) => void;
29
+ setInitValue: (datasource: any[]) => void;
30
+ componentWillReceiveProps(nextProps: any): void;
31
+ componentDidMount(): void;
32
+ columns: ({
33
+ title: string;
34
+ dataIndex: string;
35
+ className: string;
36
+ width: number;
37
+ render?: undefined;
38
+ } | {
39
+ title: string;
40
+ dataIndex: string;
41
+ render: (text: any, record: any) => React.JSX.Element;
42
+ className?: undefined;
43
+ width?: undefined;
44
+ } | {
45
+ title: string;
46
+ dataIndex: string;
47
+ className: string;
48
+ render: () => React.JSX.Element;
49
+ width?: undefined;
50
+ })[];
51
+ showModal: () => void;
52
+ handleOk: (e?: React.MouseEvent<HTMLElement>) => void;
53
+ handleCancel: (e: React.MouseEvent<HTMLElement>) => void;
54
+ handleTableHeadHidden: (title: string) => void;
55
+ onSortEnd: ({ oldIndex, newIndex }: any) => void;
56
+ DraggableContainer: (props: any) => React.JSX.Element;
57
+ DraggableBodyRow: ({ className, style, ...restProps }: any) => React.JSX.Element;
58
+ onChange: (e: any, title: any) => void;
59
+ handleReset: () => void;
60
+ onSearch: (e: any) => void;
61
+ onSearchSort: (e: any) => void;
62
+ render(): React.JSX.Element;
63
+ }
64
+ export default TableColumnSetting;
@@ -0,0 +1 @@
1
+ export declare const setInitialShowColumn: (tableCode: string, columns: any[], callback: any) => void;
@@ -0,0 +1,2 @@
1
+ declare const _default: (storageKeyString: string, seconds?: number, tipsCallFunction?: () => {}) => void;
2
+ export default _default;
@@ -0,0 +1,11 @@
1
+ export declare function getEekaSessionId(): any;
2
+ export declare function getEekaAccountId(): any;
3
+ export declare function getEekaEmployeeId(): any;
4
+ export declare function getEekaTenantId(): any;
5
+ export declare function getEekaToken(): any;
6
+ export declare function getLoginHeaderInfo(headerkey: string, storage?: string): string | null | undefined;
7
+ export declare function getGuoyaoshukeCompanyId(): string | null | undefined;
8
+ export declare function getGuoyaoshukeTenantCode(): string | null | undefined;
9
+ export declare function getGuoyaoshukeTenantId(): string | 1;
10
+ export declare function getGuoyaoshukeToken(): string | null | undefined;
11
+ export declare function getGuoyaoshukeUscCode(): string | null | undefined;
@@ -0,0 +1,17 @@
1
+ export declare const setConfigTableColumns: (configvalue: any, tableCode: string) => void;
2
+ export declare const getConfigTableColumns: (tableCode: string) => any;
3
+ export declare const saveTenantList: (data: any) => void;
4
+ export declare const getTenantList: () => any;
5
+ export declare const removeTenantList: () => void;
6
+ export declare const saveCurrentTenantId: (item: string) => void;
7
+ export declare const getCurrentTenantId: () => string | 1;
8
+ export declare const removeCurrentTenantId: () => void;
9
+ export declare function getEmployeeId(): any;
10
+ export declare function getEmployeeCode(): any;
11
+ export declare function getSessionId(): any;
12
+ export declare function getAccountId(): any;
13
+ export declare function getUserId(): any;
14
+ export declare function getAccountID(): any;
15
+ export declare function getUserName(): any;
16
+ export declare function handleUserPhone(): any;
17
+ export declare function getCurrentTargetBgId(): string | null;
@@ -0,0 +1,11 @@
1
+ type mediaListType = {
2
+ type: number;
3
+ url: string;
4
+ [key: string]: any;
5
+ };
6
+ type recordType = {
7
+ mediaList?: mediaListType;
8
+ [key: string]: any;
9
+ };
10
+ export declare const getSkuImg: (record: recordType) => any;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ declare const checkQuantityAccuracy: (value: any, accuracy: any, errorInfo?: any) => boolean;
2
+ declare const precisionQuantity: (num: any, accuracy: any) => number | "";
3
+ export { checkQuantityAccuracy, precisionQuantity };
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ BROWSER_CACHE: {
3
+ COLUMN_CONDITION: string;
4
+ MAIN_AUTH_CODES: string;
5
+ LIMIT_MENU_DATA: string;
6
+ USER_INFO: string;
7
+ DICT_CODES: string;
8
+ CHILD_APP_BACK: string;
9
+ SEARCH_FIELDS_CONDITION: string;
10
+ };
11
+ };
12
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import './requestUtils';
2
+ import './checkUtils';
3
+ import './LocalstorageUtils';
4
+ import './utils';
@@ -0,0 +1,29 @@
1
+ export declare function handleRequestAuthHeader(config?: any): void;
2
+ /**
3
+ * 处理请求路径前缀/请求路径等使用不一的问题
4
+ * @param {*} defaultUrl 默认请求路径
5
+ * @param {*} defaultPreFix 默认请求路径的前缀
6
+ * @param {*} config 更改请求前缀/路径集合
7
+ * 示例:
8
+ * appRequestConfig: {
9
+ * '/appConfig/saveUserOrder': ['/api/user-manage'],
10
+ * '/appConfig/saveQueryCriteria': ['/api/user-manage']
11
+ * }
12
+ */
13
+ export declare const handleRequestUrl: (defaultPreFix: string, defaultUrl: string, config: any) => string;
14
+ /**
15
+ * 处理错误请求
16
+ * @param {*} response 返回结果
17
+ * @param {*} needBackError 是否需要将错误回传到页面单独处理
18
+ */
19
+ export declare function handleError(response: object, needBackError?: boolean): boolean;
20
+ /**
21
+ * 判断为请求错误
22
+ * @param {*} res 响应体
23
+ * */
24
+ export declare const judgeIsRequestError: (res: any) => boolean;
25
+ /**
26
+ * 判断为请求成功
27
+ * @param {*} res 响应体
28
+ * */
29
+ export declare const judgeIsRequestSuccess: (res: any) => boolean;
@@ -0,0 +1,17 @@
1
+ export declare function downloadExcel(data: any, fileName?: any, isResUrl?: boolean): void;
2
+ export declare const formatter: (data: any, parentAuthority: any, parentName: any) => any;
3
+ export declare const memoizeOneFormatter: any;
4
+ export declare const go2BackAndClose: (backHistoryPath: any) => void;
5
+ /**
6
+ * 处理bssulaTable的公共回显样式
7
+ * @param col 每一具体行
8
+ */
9
+ export declare const handleBssulaColumnsSpecialParams: (col: any) => void;
10
+ /**
11
+ * 处理antdTable的公共回显样式
12
+ * @param col 每一具体行
13
+ */
14
+ export declare const handleAntdColumnsSpecialParams: (col: any) => void;
15
+ export declare const getDictionarySource: (dicCode: string, needConvertInterger?: boolean) => any;
16
+ export declare function uuid(): string;
17
+ export declare const judgeIsEmpty: (value: any) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "2.4.16",
3
+ "version": "2.4.17",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -1,6 +1,6 @@
1
1
  // 此文件用于 处理业务组件 所用到的公共方法
2
2
  // @ts-nocheck
3
- import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status, employeeType } from './common';
3
+ import { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status, employeeType, orgType, nodeType } from './common';
4
4
  import { getDictionarySource, getDictionaryTextByValue, loadSelectSource } from './utils';
5
5
  import { handleTextOverflow, tableColumnsImage } from '@/components/Business/BsSulaQueryTable/utils';
6
6
  import { getSkuImg } from '@/utils/TableUtils';
@@ -1861,9 +1861,9 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1861
1861
  showSearch: true,
1862
1862
  showArrow: true,
1863
1863
  maxTagCount: 1,
1864
- // optionFilterProp: 'children',
1865
- filterOption: (input: any, option: any) =>
1866
- option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1864
+ optionFilterProp: 'children',
1865
+ filterOption: (input: string, option: { props: { children: string } }) =>
1866
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1867
1867
  },
1868
1868
  } },
1869
1869
  ]
@@ -1899,5 +1899,114 @@ export function commonFun (type?: string, prefixUrl: any, requestConfigProp?: an
1899
1899
  }
1900
1900
  }
1901
1901
 
1902
+ //业务组织选择器(可筛选业务职能/组织类型/组织形态)
1903
+ if (type === 'business-organization') {
1904
+ requestConfig = {
1905
+ url: `${prefixUrl.selectPrefix}/orgViewNode/common/pageList`,
1906
+ filter: 'qp-name-like', // 过滤参数
1907
+ mappingTextField: 'name',
1908
+ mappingTextShowKeyField: 'code',
1909
+ mappingValueField: 'code',
1910
+ otherParams: {
1911
+ sorter: 'desc-createTime',
1912
+ }, // 默认参数
1913
+ sourceName: 'organizationCode',
1914
+ ...requestConfigProp
1915
+ },
1916
+ tableSearchForm = [
1917
+ { name: 'qp-name-like', label: '组织名称' },
1918
+ { name: 'qp-code-like', label: '组织编码' },
1919
+ { name: 'qp-orgViewCode-in', type: 'select', label: '业务职能', field: {
1920
+ type: 'select',
1921
+ props: {
1922
+ mode: 'multiple',
1923
+ notFoundContent: '暂无数据',
1924
+ allowClear: true,
1925
+ showSearch: true,
1926
+ showArrow: true,
1927
+ maxTagCount: 1,
1928
+ optionFilterProp: 'children',
1929
+ filterOption: (input: string, option: { props: { children: string } }) =>
1930
+ option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0,
1931
+ },
1932
+ }
1933
+ },
1934
+ {
1935
+ name: 'qp-orgType-in',
1936
+ type: 'select',
1937
+ label: '组织类型',
1938
+ field: {
1939
+ type: 'select',
1940
+ props: {
1941
+ mode: 'multiple',
1942
+ allowClear: true,
1943
+ maxTagCount: 1,
1944
+ },
1945
+ },
1946
+ initialSource: orgType
1947
+ },
1948
+ {
1949
+ name: 'qp-nodeType-in',
1950
+ type: 'select',
1951
+ label: '组织形态',
1952
+ field: {
1953
+ type: 'select',
1954
+ props: {
1955
+ mode: 'multiple',
1956
+ allowClear: true,
1957
+ maxTagCount: 1,
1958
+ },
1959
+ },
1960
+ initialSource: nodeType
1961
+ }]
1962
+ Promise.all([
1963
+ loadSelectSource(`${prefixUrl.formSelectFix}/orgView/getOrgViewListNoPage`, {
1964
+ 'qp-status-eq': 10
1965
+ }),
1966
+ ]).then((x: any)=>{
1967
+ formatSource(x, 0, 2, tableSearchForm);
1968
+ })
1969
+ modalTableProps = {
1970
+ modalTableTitle: '选择组织',
1971
+ tableSearchForm,
1972
+ tableColumns: [
1973
+ {
1974
+ title: '组织编码',
1975
+ dataIndex: 'code',
1976
+ },
1977
+ {
1978
+ title: '组织名称',
1979
+ dataIndex: 'name',
1980
+ render: (text: any) => handleTextOverflow(text),
1981
+ },
1982
+ {
1983
+ title: '业务职能',
1984
+ dataIndex: 'orgViewNameList',
1985
+ render: (text: any, record: any) => {
1986
+ const { orgViewNameList = [] } = record;
1987
+ return orgViewNameList.length ? orgViewNameList.join('/') : '--';
1988
+ },
1989
+ },
1990
+ {
1991
+ title: '组织类型',
1992
+ dataIndex: 'orgType',
1993
+ render: (text: any) => {
1994
+ const obj = orgType.find((i: any) => i.value == text);
1995
+ return obj ? obj.text : '--';
1996
+ }
1997
+ },
1998
+ {
1999
+ title: '组织形态',
2000
+ dataIndex: 'nodeType',
2001
+ render: (text: any) => {
2002
+ const obj = nodeType.find((i: any) => i.value == text);
2003
+ return obj ? obj.text : '--';
2004
+ }
2005
+ },
2006
+ ],
2007
+ ...modalTableBusProps
2008
+ }
2009
+ }
2010
+
1902
2011
  return { modalTableProps, requestConfig, needModalTable };
1903
2012
  }
@@ -72,4 +72,48 @@ const employeeType = [
72
72
  }
73
73
  ]
74
74
 
75
- export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status, employeeType }
75
+ //组织类型
76
+ const orgType = [
77
+ {
78
+ text: '内部自营',
79
+ value: '0'
80
+ },
81
+ {
82
+ text: '外部代理',
83
+ value: '1'
84
+ }
85
+ ]
86
+
87
+ //组织形态
88
+ const nodeType = [
89
+ {
90
+ text: '公司',
91
+ value: 10,
92
+ },
93
+ {
94
+ text: '部门',
95
+ value: 20,
96
+ },
97
+ {
98
+ text: '事业部',
99
+ value: 30,
100
+ },
101
+ {
102
+ text: '分公司',
103
+ value: 40,
104
+ },
105
+ {
106
+ text: '工厂',
107
+ value: 50,
108
+ },
109
+ {
110
+ text: '办事处',
111
+ value: 60,
112
+ },
113
+ {
114
+ text: '商店',
115
+ value: 100,
116
+ },
117
+ ]
118
+
119
+ export { shopFileType, arrivalPaySupportList, sharingType, shopFile2Type, shopFile2Status, employeeType, orgType, nodeType }