@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.
Files changed (64) hide show
  1. package/.umirc.ts +21 -10
  2. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +5 -2
  3. package/dist/components/Business/DetailPageWrapper/index.d.ts +6 -0
  4. package/dist/components/Business/ItemPropertySelector/index.d.ts +3 -0
  5. package/dist/components/Business/ModalUtils/index.d.ts +8 -0
  6. package/dist/components/Business/SearchSelect/utils.d.ts +4 -2
  7. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +3 -2
  8. package/dist/components/Business/columnSettingTable/index.d.ts +19 -2
  9. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +20 -3
  10. package/dist/components/Functional/DataValidation/index.d.ts +11 -1
  11. package/dist/components/Functional/SearchSelect/utils.d.ts +2 -1
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.esm.js +2030 -901
  14. package/dist/index.js +2030 -900
  15. package/package.json +9 -7
  16. package/src/assets/btn-cancel.svg +3 -0
  17. package/src/assets/btn-copy.svg +3 -0
  18. package/src/assets/btn-delete.svg +2 -29
  19. package/src/assets/btn-edit.svg +2 -19
  20. package/src/assets/btn-hangUp.svg +3 -0
  21. package/src/assets/btn-print.svg +3 -0
  22. package/src/assets/btn-refresh.svg +3 -0
  23. package/src/assets/btn-unhook.svg +3 -0
  24. package/src/components/Business/BsSulaQueryTable/SearchItemSetting.tsx +4 -3
  25. package/src/components/Business/BsSulaQueryTable/bssulaquerytable.less +0 -4
  26. package/src/components/Business/BsSulaQueryTable/index.less +5 -3
  27. package/src/components/Business/BsSulaQueryTable/index.md +45 -32
  28. package/src/components/Business/BsSulaQueryTable/index.tsx +153 -76
  29. package/src/components/Business/BsSulaQueryTable/setting.tsx +40 -10
  30. package/src/components/Business/BsSulaQueryTable/utils.tsx +15 -12
  31. package/src/components/Business/CommodityEntry/index.md +1 -1
  32. package/src/components/Business/CommodityEntry/index.tsx +11 -9
  33. package/src/components/Business/DetailPageWrapper/index.less +1 -1
  34. package/src/components/Business/DetailPageWrapper/index.tsx +24 -5
  35. package/src/components/Business/DetailPageWrapper/utils.tsx +7 -2
  36. package/src/components/Business/HomePageWrapper/index.less +1 -1
  37. package/src/components/Business/ItemPropertySelector/index.tsx +88 -0
  38. package/src/components/Business/JsonQueryTable/function.ts +1 -1
  39. package/src/components/Business/ModalUtils/index.tsx +45 -0
  40. package/src/components/Business/SearchSelect/BusinessUtils.tsx +284 -57
  41. package/src/components/Business/SearchSelect/index.md +4 -4
  42. package/src/components/Business/SearchSelect/utils.ts +26 -4
  43. package/src/components/Business/columnSettingTable/columnSetting.tsx +27 -11
  44. package/src/components/Business/columnSettingTable/index.less +5 -3
  45. package/src/components/Business/columnSettingTable/index.md +200 -136
  46. package/src/components/Business/columnSettingTable/index.tsx +167 -39
  47. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +178 -47
  48. package/src/components/Functional/AddSelect/index.tsx +19 -9
  49. package/src/components/Functional/BillEntry/index.less +3 -0
  50. package/src/components/Functional/DataValidation/index.md +1 -0
  51. package/src/components/Functional/DataValidation/index.tsx +138 -23
  52. package/src/components/Functional/QueryMutipleSelect/index.tsx +2 -1
  53. package/src/components/Functional/SearchSelect/index.less +4 -0
  54. package/src/components/Functional/SearchSelect/index.tsx +61 -20
  55. package/src/components/Functional/SearchSelect/utils.tsx +13 -10
  56. package/src/components/Functional/TreeSearchSelect/index.tsx +2 -1
  57. package/src/components/Solution/RuleComponent/index.js +59 -1
  58. package/src/components/Solution/RuleComponent/ruleFiled.js +1 -1
  59. package/src/index.ts +1 -0
  60. package/src/plugin/TableColumnSetting/index.less +5 -3
  61. package/src/plugin/TableColumnSetting/index.tsx +4 -3
  62. package/src/styles/bsDefault.less +9 -3
  63. package/src/utils/request.ts +8 -4
  64. package/src/utils/utils.ts +11 -15
package/.umirc.ts CHANGED
@@ -15,7 +15,7 @@ export default defineConfig({
15
15
  '@form-item-margin-bottom':'4px',
16
16
  '@table-padding-vertical': '4px',
17
17
  '@table-padding-horizontal': '4px'
18
- },
18
+ },
19
19
  bssula: {},
20
20
  favicon:
21
21
  'https://user-images.githubusercontent.com/9554297/83762004-a0761b00-a6a9-11ea-83b4-9c8ff721d4b8.png',
@@ -35,7 +35,7 @@ export default defineConfig({
35
35
  proxy: {
36
36
  '/bop/api/': {
37
37
  // target: 'http://bitsun.product.app.business-operation-platform.v1-dev:8050', // 开发环境
38
- target: 'https://test.i-baby.net/', // 测试环境
38
+ target: 'https://occp-dev.xtepchina.com/', // 测试环境
39
39
  // target: 'http://yxzttest.yangzijiang.com/', // 扬子江测试环境
40
40
  // target: 'http://yxzt.yangzijiang.com/', // 扬子江测试环境
41
41
  changeOrigin: true,
@@ -48,39 +48,50 @@ export default defineConfig({
48
48
  // target: 'http://bitsun.product.app.business-operation-platform.v1-dev:8050', // 开发环境
49
49
  // 英伦
50
50
  // target: 'http://47.100.87.54:9102/', // 开发环境
51
- target: 'http://test.i-baby.net/', // 测试环境
51
+ target: 'https://occp-dev.xtepchina.com/', // 测试环境
52
52
  // target: 'http://www.i-baby.net/', // 生产
53
53
  changeOrigin: true,
54
54
  // pathRewrite: { '^/wms-ops/': '/wms-ops/' }, // 开发环境
55
55
  },
56
56
  '/user/': {
57
- target: 'http://bitsun.cc0b9108c833e4298b9db565441546718.cn-shanghai.alicontainer.com/', // 开发环境
57
+ target: 'https://occp-dev.xtepchina.com/', // 开发环境
58
58
  changeOrigin: true,
59
59
  },
60
60
  '/drp-ops/': {
61
- target: 'http://bitsun.cc0b9108c833e4298b9db565441546718.cn-shanghai.alicontainer.com/', // 开发环境
61
+ target: 'https://occp-dev.xtepchina.com/', // 开发环境
62
62
  changeOrigin: true,
63
63
  },
64
64
  '/channel-manage/': {
65
- target: 'http://bitsun.cc0b9108c833e4298b9db565441546718.cn-shanghai.alicontainer.com/', // 开发环境
65
+ target: 'https://occp-dev.xtepchina.com/', // 开发环境
66
66
  changeOrigin: true,
67
67
  },
68
68
  '/items/': {
69
- target: 'http://bitsun.cc0b9108c833e4298b9db565441546718.cn-shanghai.alicontainer.com/', // 开发环境
69
+ target: 'https://occp-dev.xtepchina.com/', // 开发环境
70
70
  changeOrigin: true,
71
71
  },
72
72
  '/stock/': {
73
- target: 'http://bitsun.cc0b9108c833e4298b9db565441546718.cn-shanghai.alicontainer.com/', // 开发环境
73
+ target: 'https://occp-dev.xtepchina.com/', // 开发环境
74
74
  changeOrigin: true,
75
75
  },
76
76
  '/basic/': {
77
- target: 'http://bitsun.cc0b9108c833e4298b9db565441546718.cn-shanghai.alicontainer.com/', // 开发环境
77
+ target: 'https://occp-dev.xtepchina.com/', // 开发环境
78
78
  changeOrigin: true,
79
79
  },
80
80
  '/srm-ops/': {
81
- target: 'http://bitsun.cc0b9108c833e4298b9db565441546718.cn-shanghai.alicontainer.com/', // 开发环境
81
+ target: 'https://occp-dev.xtepchina.com/', // 开发环境
82
82
  changeOrigin: true,
83
83
  },
84
84
  },
85
85
  // more config: https://d.umijs.org/config
86
+
87
+ // 添加 webpack 配置
88
+ chainWebpack: (config) => {
89
+ // 处理 SWR 模块的导入问题
90
+ config.module
91
+ .rule('mjs-rule')
92
+ .test(/\.mjs$/)
93
+ .include.add(/node_modules/)
94
+ .end()
95
+ .type('javascript/auto');
96
+ },
86
97
  });
@@ -12,9 +12,12 @@ declare class SortableTable extends React.Component {
12
12
  defaultValue: never[];
13
13
  bsTableCode: string;
14
14
  };
15
- patchUserColumnConfig: (config: any) => Promise<unknown>;
15
+ patchUserColumnConfig: (config: any, tableCode: any) => Promise<unknown>;
16
16
  getConfigFromlocalstorage: () => any;
17
- patchConfigToLocalstorage: (configvalue: any) => void;
17
+ patchConfigToLocalstorage: (configvalue: any, tableCode: any, newDataSource: any) => void;
18
+ isColumnsChange: (pre?: never[], next?: never[]) => boolean;
19
+ validateLocalStorageConfig: (datasource: any, tableCode: string) => void;
20
+ componentWillReceiveProps(nextProps: any): void;
18
21
  setInitValue: (isClick?: boolean) => void;
19
22
  componentDidMount(): void;
20
23
  columns: ({
@@ -5,6 +5,12 @@ export declare const iconMap: {
5
5
  delete: React.JSX.Element;
6
6
  submit: React.JSX.Element;
7
7
  more: React.JSX.Element;
8
+ hangUp: React.JSX.Element;
9
+ unhook: React.JSX.Element;
10
+ refresh: React.JSX.Element;
11
+ print: React.JSX.Element;
12
+ copy: React.JSX.Element;
13
+ cancel: React.JSX.Element;
8
14
  };
9
15
  declare const _default: (props: any) => React.JSX.Element;
10
16
  export default _default;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const ItemPropertySelector: ({ onChange, value, propertyCode, name, ...restProps }: any) => React.JSX.Element;
3
+ export default ItemPropertySelector;
@@ -0,0 +1,8 @@
1
+ declare const ModalUtils: {
2
+ success: (content: any) => void;
3
+ error: (content: any) => void;
4
+ warning: (content: any) => void;
5
+ confirm: (title: any, content: any, width: any, onOk: any, onCancel: any) => void;
6
+ custom: (config: any) => void;
7
+ };
8
+ export default ModalUtils;
@@ -1,8 +1,10 @@
1
1
  declare const getDictionarySource: (dicCode: string, needConvertInterger?: boolean) => {};
2
2
  declare const getDictionaryTextByValue: (dicCode: string, value: string | number) => any;
3
- declare const loadSelectSource: (url: string, params?: any) => Promise<unknown>;
3
+ declare const loadSelectSource: (url: string, params?: any, options?: any) => Promise<unknown>;
4
4
  declare const handleDefaultPrefixUrl: (type: string) => string;
5
5
  declare const handleHiddenFields: (fieldsList: any, hiddenFieldsList: any) => any;
6
6
  declare const handleHiddenFieldsRequest: (fieldsRequestList: any, fieldsList: any, hiddenRequestFieldList: any) => any;
7
7
  declare const getFieldIndex: (tableSearchForm: any, name: string) => any;
8
- export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl, handleHiddenFields, handleHiddenFieldsRequest, getFieldIndex };
8
+ declare const getQueryHeadersList: (params: any) => any;
9
+ declare const getQueryHeadersItem: (queryHeaders: any, queryKey: any) => any;
10
+ export { getDictionarySource, getDictionaryTextByValue, loadSelectSource, handleDefaultPrefixUrl, handleHiddenFields, handleHiddenFieldsRequest, getFieldIndex, getQueryHeadersList, getQueryHeadersItem };
@@ -13,10 +13,11 @@ declare class SortableTable extends React.Component<SortTableProps> {
13
13
  searchDataSource: boolean;
14
14
  onSearchSort: boolean;
15
15
  };
16
- patchUserColumnConfig: (config: any) => void;
17
- patchConfigToLocalstorage: (configvalue: any, tableCode: string) => void;
16
+ patchUserColumnConfig: (config: any, tableCodes: any) => void;
17
+ patchConfigToLocalstorage: (configvalue: any, tableCode: string, newDataSource: any) => void;
18
18
  setInitValue: (datasource: any[]) => void;
19
19
  isColumnsChange: (pre?: never[], next?: never[]) => boolean;
20
+ validateLocalStorageConfig: (datasource: any, tableCode: string) => void;
20
21
  componentWillReceiveProps(nextProps: any): void;
21
22
  componentDidMount(): void;
22
23
  columns: ({
@@ -4,14 +4,31 @@ export default class ColumnSettingTable extends React.Component {
4
4
  constructor(props: any);
5
5
  componentDidMount(): void;
6
6
  componentWillReceiveProps(nextProps: any): void;
7
- setInitialShowColumn: (columns: any[]) => void;
7
+ setInitialShowColumn: (columns: any[], callback?: () => void) => void;
8
8
  reSetInitialShowColumn: () => void;
9
9
  setShowColumns: (newColumns: Array<any>) => void;
10
10
  getConfigFromlocalstorage: () => any;
11
- getTableSummaryInfo: () => () => any;
11
+ /**
12
+ * 新增函数,用于根据传入的小数位数进行四舍五入
13
+ * @param number
14
+ * @param decimalPlaces
15
+ * @returns
16
+ */
17
+ roundToDecimalPlaces: (number: any, decimalPlaces: number) => number;
18
+ /**
19
+ * 合计行逻辑
20
+ * @returns
21
+ */
22
+ getTableSummaryInfo: () => () => React.JSX.Element;
12
23
  handledynamicColumns: (col: any[]) => any[];
13
24
  handleResize: (index: any) => (_: any, { size }: any) => void;
14
25
  ResizeableTitle: (props: any) => React.JSX.Element;
15
26
  getTableScrollXWidth: (cols: any[]) => any;
27
+ /**
28
+ * 处理行点击事件
29
+ * @param record
30
+ */
31
+ handleRowClick: (record: any) => void;
32
+ recalculateSummary: (nextProps: any) => void;
16
33
  render(): React.JSX.Element;
17
34
  }
@@ -1,17 +1,34 @@
1
1
  import React from 'react';
2
2
  export default class ColumnSettingSulaTable extends React.Component {
3
- sulaTableRef: React.RefObject<unknown>;
3
+ sulaTableRef: React.RefObject<any>;
4
4
  state: any;
5
5
  constructor(props: any);
6
6
  componentDidMount(): void;
7
7
  componentWillReceiveProps(nextProps: any): void;
8
- setInitialShowColumn: (columns: any[]) => void;
8
+ setInitialShowColumn: (columns: any[], callback?: () => void) => void;
9
9
  setShowColumns: (newColumns: Array<any>) => void;
10
10
  getConfigFromlocalstorage: () => any;
11
- getTableSummaryInfo: () => () => any;
11
+ /**
12
+ * 新增函数,用于根据传入的小数位数进行四舍五入
13
+ * @param number
14
+ * @param decimalPlaces
15
+ * @returns
16
+ */
17
+ roundToDecimalPlaces: (number: any, decimalPlaces: number) => number;
18
+ /**
19
+ * 合计行逻辑
20
+ * @returns
21
+ */
22
+ getTableSummaryInfo: () => () => React.JSX.Element;
12
23
  handledynamicColumns: (col: any[]) => any[];
13
24
  handleResize: (index: any) => (_: any, { size }: any) => void;
14
25
  ResizeableTitle: (props: any) => React.JSX.Element;
15
26
  getTableScrollXWidth: (cols: any[]) => any;
27
+ /**
28
+ * 处理行点击事件
29
+ * @param record
30
+ */
31
+ handleRowClick: (record: any) => void;
32
+ recalculateSummary: (nextProps: any) => void;
16
33
  render(): React.JSX.Element;
17
34
  }
@@ -5,16 +5,22 @@ declare class DataValidation extends React.Component {
5
5
  onDragEnd(result: any): void;
6
6
  getCount: () => {
7
7
  total: any;
8
+ totalQuantity: any;
9
+ totalSuccessQuantity: any;
10
+ totalErrorQuantity: any;
8
11
  error: any;
12
+ success: any;
9
13
  };
10
14
  setConfig: (data: any) => {
11
15
  container: string;
12
- showtoolbar: boolean;
13
16
  hook: {
14
17
  columnTitleCellRenderBefore: (columnAbc: any, postion: any, ctx: any) => void;
15
18
  cellRenderBefore: (cell: any, postion: any, sheetFile: any, ctx: any) => void;
16
19
  cellAllRenderBefore: (data: any, sheetFile: any, ctx: any) => void;
17
20
  };
21
+ showtoolbarConfig: {
22
+ sortAndFilter: boolean;
23
+ };
18
24
  data: {
19
25
  name: string;
20
26
  color: string;
@@ -132,6 +138,9 @@ declare class DataValidation extends React.Component {
132
138
  failData: any;
133
139
  };
134
140
  getData: () => any;
141
+ naturalCompare: (a: any, b: any) => any;
142
+ customSort: (a: any, b: any) => any;
143
+ sortData: (sorterKey: string) => void;
135
144
  resetData: () => void;
136
145
  filterData: (type: string) => void;
137
146
  toggleData: () => void;
@@ -139,6 +148,7 @@ declare class DataValidation extends React.Component {
139
148
  errorChange: (e: any) => void;
140
149
  menuList: React.JSX.Element;
141
150
  leftMenu: React.JSX.Element;
151
+ getSortList: () => React.JSX.Element;
142
152
  getSheetMap: () => {};
143
153
  importExcelToLuckySheet: (resultData: any) => void;
144
154
  render(): React.JSX.Element;
@@ -4,9 +4,10 @@ export declare const columnsPerRow = 4;
4
4
  export declare const ColSpan = 6;
5
5
  export declare const handleSourceName: (sName: any) => any;
6
6
  export declare const makeUniqueValue: () => string;
7
- export declare const getFormRowInfo: (list: any) => {
7
+ export declare const getFormRowInfo: (list: any, tableSearchColSpan: number) => {
8
8
  totalRows: number;
9
9
  emptyArray: any[];
10
+ ColSpan: number;
10
11
  };
11
12
  export declare const defaultVisibleFieldsCount = 7;
12
13
  export declare const getVisibleFieldsCount: (modalTableProps: any) => any;
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ export { default as TableColumnSetting } from './plugin/TableColumnSetting';
28
28
  export { default as AuthButton } from './components/Functional/AuthButton';
29
29
  export { default as CustomSelector } from './components/Solution/RuleComponent/CustomPlugin/CustomSelector';
30
30
  export { default as PropertySelector } from './components/Business/PropertyModal';
31
+ export { default as ModalUtils } from './components/Business/ModalUtils';
31
32
  export { default as EllipsisTooltip } from './components/Functional/EllipsisTooltip';
32
33
  export * from './components/Functional/BsAntdSula/index';
33
34
  export { default as RuleComponent } from './components/Solution/RuleComponent';