@bit-sun/business-component 2.0.12 → 2.0.13

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 (68) hide show
  1. package/.editorconfig +16 -16
  2. package/.fatherrc.ts +4 -4
  3. package/.gitlab-ci.yml +174 -135
  4. package/.prettierignore +7 -7
  5. package/.prettierrc +11 -11
  6. package/.umirc.ts +74 -90
  7. package/README.md +27 -27
  8. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  9. package/dist/components/Functional/SearchSelect/index.d.ts +1 -2
  10. package/dist/index.d.ts +0 -1
  11. package/dist/index.esm.js +6794 -7350
  12. package/dist/index.js +6793 -7348
  13. package/docs/index.md +21 -21
  14. package/package.json +51 -60
  15. package/src/components/Business/AddSelectBusiness/index.md +41 -41
  16. package/src/components/Business/AddSelectBusiness/index.tsx +288 -300
  17. package/src/components/Business/CommodityEntry/index.md +69 -69
  18. package/src/components/Business/CommodityEntry/index.tsx +78 -78
  19. package/src/components/Business/SearchSelect/BusinessUtils.ts +1445 -1445
  20. package/src/components/Business/SearchSelect/common.ts +53 -53
  21. package/src/components/Business/SearchSelect/index.md +1137 -1136
  22. package/src/components/Business/SearchSelect/index.tsx +44 -49
  23. package/src/components/Business/SearchSelect/utils.ts +99 -99
  24. package/src/components/Business/TreeSearchSelect/index.md +126 -126
  25. package/src/components/Business/TreeSearchSelect/index.tsx +34 -34
  26. package/src/components/Business/TreeSearchSelect/utils.ts +60 -60
  27. package/src/components/Functional/AddSelect/index.less +367 -352
  28. package/src/components/Functional/AddSelect/index.md +120 -120
  29. package/src/components/Functional/AddSelect/index.tsx +952 -896
  30. package/src/components/Functional/BillEntry/index.less +371 -371
  31. package/src/components/Functional/BillEntry/index.md +37 -37
  32. package/src/components/Functional/BillEntry/index.tsx +547 -561
  33. package/src/components/Functional/DataImport/index.less +63 -63
  34. package/src/components/Functional/DataImport/index.md +44 -44
  35. package/src/components/Functional/DataImport/index.tsx +689 -689
  36. package/src/components/Functional/DataValidation/index.less +63 -63
  37. package/src/components/Functional/DataValidation/index.md +38 -38
  38. package/src/components/Functional/DataValidation/index.tsx +680 -680
  39. package/src/components/Functional/QueryMutipleInput/index.less +37 -37
  40. package/src/components/Functional/QueryMutipleInput/index.md +33 -33
  41. package/src/components/Functional/QueryMutipleInput/index.tsx +128 -128
  42. package/src/components/Functional/SearchSelect/index.less +115 -115
  43. package/src/components/Functional/SearchSelect/index.md +141 -141
  44. package/src/components/Functional/SearchSelect/index.tsx +732 -791
  45. package/src/components/Functional/TreeSearchSelect/index.md +47 -47
  46. package/src/components/Functional/TreeSearchSelect/index.tsx +149 -149
  47. package/src/index.ts +22 -22
  48. package/src/utils/CheckOneUser/index.md +39 -39
  49. package/src/utils/CheckOneUser/index.ts +51 -51
  50. package/src/utils/requestUtils.ts +32 -32
  51. package/tsconfig.json +29 -29
  52. package/typings.d.ts +2 -2
  53. package/Dockerfile +0 -11
  54. package/dist/app.d.ts +0 -0
  55. package/dist/components/sulaQueryTable/BsSulaQueryTable.d.ts +0 -2
  56. package/dist/components/sulaQueryTable/draggableTable.d.ts +0 -22
  57. package/dist/components/sulaQueryTable/statusComponent.d.ts +0 -2
  58. package/dist/components/sulaQueryTable/utils.d.ts +0 -41
  59. package/nginx.conf +0 -43
  60. package/src/app.tsx +0 -3
  61. package/src/components/sulaQueryTable/BsSulaQueryTable.tsx +0 -368
  62. package/src/components/sulaQueryTable/draggableTable.tsx +0 -111
  63. package/src/components/sulaQueryTable/index.md +0 -271
  64. package/src/components/sulaQueryTable/status-component.less +0 -8
  65. package/src/components/sulaQueryTable/statusComponent.tsx +0 -42
  66. package/src/components/sulaQueryTable/utils.less +0 -48
  67. package/src/components/sulaQueryTable/utils.tsx +0 -336
  68. package/src/global.less +0 -97
@@ -1,32 +1,32 @@
1
- import axios from 'axios';
2
-
3
- const resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
4
-
5
- export function handleRequestAuthHeader(config?: any) {
6
- // https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
7
- // 例:x-biz-code=STORE_CODE
8
- // 物理仓选择组件
9
- if (config?.url?.indexOf('/stock/physicalWarehouse?') > -1) {
10
- config.headers['x-biz-code'] = 'PW_STOCK_CODE';
11
- }
12
- // 逻辑仓选择组件
13
- if (config?.url?.indexOf('/stock/realWarehouse?') > -1) {
14
- config.headers['x-biz-code'] = 'RW_STOCK_CODE';
15
- }
16
- }
17
-
18
- // 处理请求头
19
- const handleRequestHeader = (config: any) => {
20
- config.headers['sso-sessionid'] = resposne?.sessionId || ''
21
- config.headers['x-tenant-id'] = resposne?.tenantId || '1'
22
- if (localStorage.getItem('x-user-auth-context')) {
23
- config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
24
- }
25
- handleRequestAuthHeader(config)
26
- }
27
-
28
- // 拦截器
29
- axios.interceptors.request.use((config: any) => {
30
- handleRequestHeader(config)
31
- return config
32
- })
1
+ import axios from 'axios';
2
+
3
+ const resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
4
+
5
+ export function handleRequestAuthHeader(config?: any) {
6
+ // https://www.kdocs.cn/l/coNbPpjamr5v这个表格里面涉及的接口,接口请求头里需要添加参数:x-biz-code 值就是列表里的code
7
+ // 例:x-biz-code=STORE_CODE
8
+ // 物理仓选择组件
9
+ if(config?.url?.indexOf( '/stock/physicalWarehouse?') > -1) {
10
+ config.headers['x-biz-code'] = 'PW_STOCK_CODE';
11
+ }
12
+ // 逻辑仓选择组件
13
+ if(config?.url?.indexOf( '/stock/realWarehouse?') > -1) {
14
+ config.headers['x-biz-code'] = 'RW_STOCK_CODE';
15
+ }
16
+ }
17
+
18
+ // 处理请求头
19
+ const handleRequestHeader = (config: any) => {
20
+ config.headers['sso-sessionid'] = resposne?.sessionId || ''
21
+ config.headers['x-tenant-id'] = resposne?.tenantId || '1'
22
+ if (localStorage.getItem('x-user-auth-context')) {
23
+ config.headers['x-user-auth-context'] = localStorage.getItem('x-user-auth-context');
24
+ }
25
+ handleRequestAuthHeader(config)
26
+ }
27
+
28
+ // 拦截器
29
+ axios.interceptors.request.use((config: any) => {
30
+ handleRequestHeader(config)
31
+ return config
32
+ })
package/tsconfig.json CHANGED
@@ -1,29 +1,29 @@
1
- {
2
- "compilerOptions": {
3
- "target": "esnext",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "importHelpers": true,
7
- "jsx": "react",
8
- "esModuleInterop": true,
9
- "sourceMap": true,
10
- "baseUrl": "./",
11
- "strict": true,
12
- "paths": {
13
- "@/*": ["src/*"],
14
- "@@/*": ["src/.umi/*"]
15
- },
16
- "allowSyntheticDefaultImports": true
17
- },
18
- "exclude": [
19
- "node_modules",
20
- "lib",
21
- "es",
22
- "dist",
23
- "typings",
24
- "**/__test__",
25
- "test",
26
- "docs",
27
- "tests"
28
- ]
29
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "esnext",
4
+ "module": "esnext",
5
+ "moduleResolution": "node",
6
+ "importHelpers": true,
7
+ "jsx": "react",
8
+ "esModuleInterop": true,
9
+ "sourceMap": true,
10
+ "baseUrl": "./",
11
+ "strict": true,
12
+ "paths": {
13
+ "@/*": ["src/*"],
14
+ "@@/*": ["src/.umi/*"]
15
+ },
16
+ "allowSyntheticDefaultImports": true
17
+ },
18
+ "exclude": [
19
+ "node_modules",
20
+ "lib",
21
+ "es",
22
+ "dist",
23
+ "typings",
24
+ "**/__test__",
25
+ "test",
26
+ "docs",
27
+ "tests"
28
+ ]
29
+ }
package/typings.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare module '*.css';
2
- declare module '*.less';
1
+ declare module '*.css';
2
+ declare module '*.less';
package/Dockerfile DELETED
@@ -1,11 +0,0 @@
1
- FROM nginx
2
- RUN rm -f /etc/localtime \
3
- && ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
4
- && echo "Asia/Shanghai" > /etc/timezone
5
- #tar
6
- ADD *.tar.gz /root/
7
-
8
- # 授权
9
- RUN chmod -R 777 /root
10
- #conf文件
11
- COPY nginx.conf /etc/nginx/nginx.conf
package/dist/app.d.ts DELETED
File without changes
@@ -1,2 +0,0 @@
1
- declare const BaseQueryTable: (props: any) => JSX.Element;
2
- export default BaseQueryTable;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- declare class SortableTable extends React.Component {
3
- state: {
4
- dataSource: never[];
5
- columns: never[];
6
- selectedRowKeys: never[];
7
- };
8
- componentDidMount(): void;
9
- onSortEnd: ({ oldIndex, newIndex }: {
10
- oldIndex: any;
11
- newIndex: any;
12
- }) => void;
13
- DraggableContainer: (props: any) => JSX.Element;
14
- DraggableBodyRow: ({ className, style, ...restProps }: {
15
- [x: string]: any;
16
- className: any;
17
- style: any;
18
- }) => JSX.Element;
19
- onSelectChange: (selectedRowKeys: any) => void;
20
- render(): JSX.Element;
21
- }
22
- export default SortableTable;
@@ -1,2 +0,0 @@
1
- declare const StatusComponent: ({ color, text }: any) => JSX.Element;
2
- export default StatusComponent;
@@ -1,41 +0,0 @@
1
- export declare const handleTextDouble: (textOne: string | undefined, textTwo: string | undefined) => JSX.Element;
2
- export declare const handleTextLineFeed: (text: string | undefined, width?: number) => JSX.Element;
3
- export declare const handleTextOverflow: (text: string | undefined, width?: number) => JSX.Element;
4
- export declare const handleTooltip: (text: any, timeTrue?: boolean) => JSX.Element;
5
- export declare const handleTooltipHours: (text: any, timeTrue?: boolean) => JSX.Element;
6
- declare type tableColumnsImageType = {
7
- width?: number | string;
8
- height?: number | string;
9
- [key: string]: any;
10
- };
11
- export declare const tableColumnsImage: (url?: string, paramsObj?: tableColumnsImageType) => JSX.Element;
12
- declare type UserColumnsType = {
13
- name: string;
14
- department?: string;
15
- position?: string;
16
- company?: string;
17
- avatar?: string;
18
- };
19
- export declare const userColumns: (props: UserColumnsType) => JSX.Element;
20
- export declare function handleCommonTimeRenderHours(text: any, format?: any): any;
21
- export declare function handleCommonTimeRender(text: any, format?: any): any;
22
- export declare const userInfoCard: (props: any) => JSX.Element;
23
- interface ColumnsEditInterfave {
24
- text?: string;
25
- record?: any;
26
- type?: string;
27
- reqName: string;
28
- successMessage?: string;
29
- urlPathId?: boolean;
30
- disabled: boolean;
31
- requestProps: {
32
- url: string;
33
- converter?: Function;
34
- method?: string;
35
- };
36
- [key: string]: any;
37
- }
38
- export declare const ColumnsEdit: (props: ColumnsEditInterfave) => JSX.Element;
39
- export declare const handleTextDoubleOrId: (textOne: string | undefined, textTwo: string | undefined) => JSX.Element;
40
- export declare const textIcon: (type: string | number, text?: string) => JSX.Element | undefined;
41
- export {};
package/nginx.conf DELETED
@@ -1,43 +0,0 @@
1
- user root;
2
- worker_processes 1;
3
-
4
- error_log /var/log/nginx/error.log warn;
5
- pid /var/run/nginx.pid;
6
-
7
-
8
- events {
9
- worker_connections 1024;
10
- }
11
-
12
-
13
- http {
14
- include /etc/nginx/mime.types;
15
- default_type application/octet-stream;
16
-
17
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
18
- '$status $body_bytes_sent "$http_referer" '
19
- '"$http_user_agent" "$http_x_forwarded_for"';
20
-
21
- access_log /var/log/nginx/access.log main;
22
-
23
- sendfile on;
24
- #tcp_nopush on;
25
-
26
- keepalive_timeout 65;
27
-
28
- #gzip on;
29
-
30
- #include /etc/nginx/conf.d/*.conf;
31
- server {
32
- listen 8486;
33
- location / {
34
- autoindex on;
35
- index index.html index.htm ;
36
- root /root/docs-dist/;
37
- proxy_set_header Host $host;
38
- proxy_set_header X-Real-IP $remote_addr;
39
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
40
- try_files $uri $uri/ /index.html;
41
- }
42
- }
43
- }