@bit-sun/business-component 4.2.1-alpha.8-aiwei → 4.2.1-alpha.8

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 (131) hide show
  1. package/.claude/settings.local.json +8 -0
  2. package/.fatherrc.ts +1 -1
  3. package/.umirc.ts +13 -9
  4. package/dist/components/Business/AddSelectBusiness/index.d.ts +3 -4
  5. package/dist/components/Business/BsLayouts/Components/AllFunc/drawContent.d.ts +1 -2
  6. package/dist/components/Business/BsLayouts/Components/ChooseStore/index.d.ts +1 -2
  7. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/index.d.ts +1 -1
  8. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/leftTree.d.ts +1 -1
  9. package/dist/components/Business/BsLayouts/Components/CustomerMenu/MenuSetting/rightTree.d.ts +2 -2
  10. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/DrawContent.d.ts +1 -2
  11. package/dist/components/Business/BsLayouts/Components/CustomerMenu/globalMenu/customMenuHeader.d.ts +1 -2
  12. package/dist/components/Business/BsLayouts/Components/CustomerMenu/index.d.ts +1 -1
  13. package/dist/components/Business/BsLayouts/Components/GlobalHeader/index.d.ts +1 -2
  14. package/dist/components/Business/BsLayouts/Components/RightContent/LoginModal.d.ts +1 -2
  15. package/dist/components/Business/BsLayouts/index.d.ts +1 -1
  16. package/dist/components/Business/BsSulaQueryTable/SearchItemSetting.d.ts +5 -5
  17. package/dist/components/Business/BsSulaQueryTable/index.d.ts +1 -2
  18. package/dist/components/Business/BsSulaQueryTable/setting.d.ts +6 -6
  19. package/dist/components/Business/BsSulaQueryTable/utils.d.ts +14 -15
  20. package/dist/components/Business/CommodityEntry/index.d.ts +1 -2
  21. package/dist/components/Business/CommonAlert/index.d.ts +1 -2
  22. package/dist/components/Business/CommonGuideWrapper/index.d.ts +3 -3
  23. package/dist/components/Business/DetailPageWrapper/index.d.ts +12 -12
  24. package/dist/components/Business/HomePageWrapper/index.d.ts +1 -2
  25. package/dist/components/Business/ImportExport/ExportButton/ModalTitle.d.ts +11 -0
  26. package/dist/components/Business/ImportExport/ExportButton/TemplatePicker.d.ts +13 -0
  27. package/dist/components/Business/ImportExport/ExportButton/index.d.ts +15 -0
  28. package/dist/components/Business/ImportExport/ImportWizard/Preview.d.ts +11 -0
  29. package/dist/components/Business/ImportExport/ImportWizard/index.d.ts +15 -0
  30. package/dist/components/Business/ImportExport/TaskDrawer/index.d.ts +15 -0
  31. package/dist/components/Business/ImportExport/TaskProgress/index.d.ts +15 -0
  32. package/dist/components/Business/ImportExport/businessFunction.d.ts +15 -0
  33. package/dist/components/Business/ImportExport/index.d.ts +14 -0
  34. package/dist/components/Business/ImportExport/sceneCapability.d.ts +20 -0
  35. package/dist/components/Business/ImportExport/services/importExport.d.ts +22 -0
  36. package/dist/components/Business/ImportExport/services/routing.d.ts +8 -0
  37. package/dist/components/Business/ImportExport/types.d.ts +134 -0
  38. package/dist/components/Business/ItemPropertySelector/index.d.ts +1 -2
  39. package/dist/components/Business/JsonQueryTable/components/FieldsModifyModal.d.ts +1 -2
  40. package/dist/components/Business/JsonQueryTable/components/FieldsSettingsTable.d.ts +1 -2
  41. package/dist/components/Business/JsonQueryTable/components/Formula.d.ts +1 -2
  42. package/dist/components/Business/JsonQueryTable/components/MaintainOptions.d.ts +1 -2
  43. package/dist/components/Business/JsonQueryTable/drawer/index.d.ts +1 -2
  44. package/dist/components/Business/PropertyModal/index.d.ts +1 -2
  45. package/dist/components/Business/PropertyModal/propertyGroup.d.ts +1 -1
  46. package/dist/components/Business/SearchSelect/index.d.ts +1 -1
  47. package/dist/components/Business/StateFlow/index.d.ts +1 -2
  48. package/dist/components/Business/TreeSearchSelect/index.d.ts +1 -1
  49. package/dist/components/Business/TrialCalculation/index.d.ts +15 -0
  50. package/dist/components/Business/columnSettingTable/columnSetting.d.ts +6 -6
  51. package/dist/components/Business/columnSettingTable/components/TableSumComponent.d.ts +1 -2
  52. package/dist/components/Business/columnSettingTable/index.d.ts +3 -3
  53. package/dist/components/Business/columnSettingTable/sulaSettingTable.d.ts +7 -3
  54. package/dist/components/Business/columnSettingTable/utils.d.ts +1 -2
  55. package/dist/components/Business/moreTreeTable/FixedScrollBar.d.ts +1 -1
  56. package/dist/components/Common/ParagraphCopier/index.d.ts +1 -1
  57. package/dist/components/Common/Section/index.d.ts +1 -1
  58. package/dist/components/Functional/AddSelect/index.d.ts +1 -2
  59. package/dist/components/Functional/AuthButton/index.d.ts +1 -2
  60. package/dist/components/Functional/DataImport/index.d.ts +3 -3
  61. package/dist/components/Functional/DataValidation/index.d.ts +4 -4
  62. package/dist/components/Functional/ExportFunctions/ExportIcon/index.d.ts +1 -2
  63. package/dist/components/Functional/QueryMutipleInput/index.d.ts +1 -2
  64. package/dist/components/Functional/QueryMutipleSelect/index.d.ts +1 -2
  65. package/dist/components/Functional/SearchSelect/index.d.ts +1 -1
  66. package/dist/components/Functional/SearchSelect/pagination.d.ts +22 -0
  67. package/dist/components/Functional/SearchSelect/utils.d.ts +2 -3
  68. package/dist/components/Functional/TreeSearchSelect/index.d.ts +1 -2
  69. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/CustomSelectorModal.d.ts +1 -1
  70. package/dist/components/Solution/RuleComponent/CustomPlugin/CustomSelector/index.d.ts +1 -2
  71. package/dist/components/Solution/RuleComponent/Formula.d.ts +1 -2
  72. package/dist/components/Solution/RuleComponent/InnerSelect.d.ts +1 -2
  73. package/dist/components/Solution/RuleComponent/RenderCompItem.d.ts +1 -2
  74. package/dist/components/Solution/RuleSetter/RuleInstance.d.ts +1 -2
  75. package/dist/components/Solution/RuleSetter/baseRule.d.ts +1 -1
  76. package/dist/components/Solution/RuleSetter/index.d.ts +1 -1
  77. package/dist/index.d.ts +4 -0
  78. package/dist/index.esm.js +4692 -1470
  79. package/dist/index.js +4710 -1463
  80. package/dist/plugin/TableColumnSetting/index.d.ts +5 -5
  81. package/dist/utils/TableUtils.d.ts +18 -19
  82. package/dist/utils/auth.d.ts +4 -0
  83. package/docs/error-record.md +52 -0
  84. package/docs/flow-control-readme.md +283 -0
  85. package/docs/task-records/2026-07-31-import-export-extraction.md +81 -0
  86. package/package.json +1 -1
  87. package/src/components/Business/AddSelectBusiness/index.tsx +3 -2
  88. package/src/components/Business/BsSulaQueryTable/index.md +57 -4
  89. package/src/components/Business/BsSulaQueryTable/index.tsx +183 -20
  90. package/src/components/Business/DetailPageWrapper/index.tsx +81 -1
  91. package/src/components/Business/DetailPageWrapper/readme.md +89 -0
  92. package/src/components/Business/ImportExport/ExportButton/ModalTitle.tsx +27 -0
  93. package/src/components/Business/ImportExport/ExportButton/TemplatePicker.tsx +424 -0
  94. package/src/components/Business/ImportExport/ExportButton/index.module.less +382 -0
  95. package/src/components/Business/ImportExport/ExportButton/index.tsx +273 -0
  96. package/src/components/Business/ImportExport/ImportWizard/Preview.tsx +129 -0
  97. package/src/components/Business/ImportExport/ImportWizard/index.module.less +360 -0
  98. package/src/components/Business/ImportExport/ImportWizard/index.tsx +679 -0
  99. package/src/components/Business/ImportExport/TaskDrawer/index.tsx +285 -0
  100. package/src/components/Business/ImportExport/TaskProgress/index.tsx +267 -0
  101. package/src/components/Business/ImportExport/businessFunction.ts +29 -0
  102. package/src/components/Business/ImportExport/index.md +104 -0
  103. package/src/components/Business/ImportExport/index.tsx +208 -0
  104. package/src/components/Business/ImportExport/sceneCapability.ts +28 -0
  105. package/src/components/Business/ImportExport/services/importExport.ts +208 -0
  106. package/src/components/Business/ImportExport/services/routing.ts +21 -0
  107. package/src/components/Business/ImportExport/types.ts +180 -0
  108. package/src/components/Business/SearchSelect/BusinessUtils.tsx +328 -280
  109. package/src/components/Business/SearchSelect/index.md +1 -1
  110. package/src/components/Business/TrialCalculation/PathDisplay.less +93 -0
  111. package/src/components/Business/TrialCalculation/PathDisplay_README.md +77 -0
  112. package/src/components/Business/TrialCalculation/index.tsx +322 -0
  113. package/src/components/Business/columnSettingTable/sulaSettingTable.tsx +17 -1
  114. package/src/components/Functional/AddSelect/index.tsx +3 -1
  115. package/src/components/Functional/DataValidation/index.tsx +9 -6
  116. package/src/components/Functional/QueryMutipleSelect/index.tsx +2 -2
  117. package/src/components/Functional/SearchSelect/index.md +111 -0
  118. package/src/components/Functional/SearchSelect/index.tsx +157 -63
  119. package/src/components/Functional/SearchSelect/pagination.ts +57 -0
  120. package/src/components/Functional/SearchSelect/utils.tsx +28 -18
  121. package/src/components/Functional/TreeSearchSelect/index.tsx +2 -1
  122. package/src/components/Solution/RuleComponent/README.md +187 -0
  123. package/src/components/Solution/RuleComponent/RenderCompItem_README.md +189 -0
  124. package/src/components/Solution/RuleComponent/RuleField.md +63 -0
  125. package/src/components/Solution/RuleComponent/index.js +236 -8
  126. package/src/components/Solution/RuleComponent/ruleFiled.js +21 -5
  127. package/src/components/Solution/RuleSetter/README.md +97 -0
  128. package/src/index.ts +8 -1
  129. package/src/typings/umi.d.ts +9 -0
  130. package/src/utils/LocalstorageUtils.ts +1 -1
  131. package/src/utils/auth.ts +39 -2
@@ -317,7 +317,7 @@ export default () => {
317
317
  },
318
318
  // prefixUrl: { selectPrefix: '/bop/api', formSelectFix: '/bop/api' },
319
319
  selectProps,
320
- selectBusinessType: 'skuCommodity',
320
+ selectBusinessType: 'spuCommodity',
321
321
  };
322
322
 
323
323
  const onTabChange = (key) => {
@@ -0,0 +1,93 @@
1
+ .wrap_pathContentBox {
2
+ padding: 30px;
3
+ border: 1px solid #eee;
4
+ overflow: auto;
5
+ }
6
+
7
+ .wrap_pathContentBoxTitle {
8
+ height: 20px;
9
+ margin-bottom: 20px
10
+ }
11
+
12
+ .wrap_pathContentBox::-webkit-scrollbar {
13
+ display: none;
14
+ }
15
+
16
+ .pathItem_content {
17
+ display: flex;
18
+ align-items: center;
19
+ }
20
+
21
+ .pathItem_block {
22
+ width: 210px;
23
+ height: 104px;
24
+ padding: 10px 20px;
25
+ background: rgba(24, 144, 255);
26
+ color: #fff;
27
+ font-weight: bolder;
28
+ text-align: center;
29
+ border-radius: 12px;
30
+ box-shadow: 1px 1px 10px rgba(200,201,204,.4);
31
+ cursor: pointer;
32
+ display: flex;
33
+ flex-direction: column;
34
+ justify-content: center;
35
+ align-items: center;
36
+ line-height: 1.4;
37
+ }
38
+
39
+ .record_info {
40
+ text-align: center;
41
+ }
42
+
43
+ .pathItem_line {
44
+ margin: 0px 16px;
45
+ }
46
+
47
+ .pathItem_line_withRightArrow, .pathItem_line_withLeftArrow {
48
+ position: relative;
49
+ height: 10px; /* 根据需要调整高度 */
50
+ display: flex;
51
+ width: 130px;
52
+ align-items: center;
53
+ }
54
+
55
+ .pathItem_line_withRightArrow {
56
+ margin-top: 10px;
57
+ }
58
+
59
+ .pathItem_line_withLeftArrow {
60
+ margin-bottom: 10px;
61
+ }
62
+
63
+ .pathItem_line_withRightArrow::before, .pathItem_line_withLeftArrow::before {
64
+ content: '';
65
+ position: absolute;
66
+ left: 0;
67
+ top: 50%;
68
+ transform: translateY(-50%);
69
+ width: 100%;
70
+ height: 4px; /* 直线的粗细 */
71
+ background-color: rgba(24, 144, 255);
72
+ z-index: 1;
73
+ }
74
+
75
+ .pathItem_line_rightArrow, .pathItem_line_leftArrow {
76
+ position: relative;
77
+ width: 0;
78
+ height: 0;
79
+ border-top: 10px solid transparent;
80
+ border-bottom: 10px solid transparent;
81
+ border-left: 10px solid rgba(24, 144, 255); /* 向右的蓝色箭头 */
82
+ margin-left: 94%; /* 根据需要调整间距 */
83
+ z-index: 2;
84
+ }
85
+
86
+ .pathItem_line_withLeftArrow {
87
+ margin-top: 6px;
88
+ }
89
+
90
+ .pathItem_line_leftArrow {
91
+ margin-left: -2px;
92
+ transform: rotate(180deg);
93
+ }
@@ -0,0 +1,77 @@
1
+ # PathDisplay 组件说明文档
2
+
3
+ `PathDisplay` 是一个用于展示跨组织结算链路的图形化组件。它主要用于“试算”场景,根据输入的单据信息,调用后端接口获取预测的结算路径,并以“节点(组织)+ 连线(单据/业务流)”的形式直观展示。
4
+
5
+ ## 1. 组件引入
6
+
7
+ ```typescript
8
+ import PathDisplay from '@/components/Business/TrialCalculation/PathDisplay';
9
+ ```
10
+
11
+ ## 2. Props 参数说明
12
+
13
+ | 参数名 | 类型 | 必填 | 默认值 | 说明 |
14
+ | --- | --- | --- | --- | --- |
15
+ | `recordType` | `string` | 否 | - | 单据类型(如:1007-跨组织调拨) |
16
+ | `businessType` | `string` | 否 | - | 业务类型 |
17
+ | `sendOrgCode` | `string` | 否 | - | 发货组织/调出组织编码 |
18
+ | `receiverOrgCode` | `string` | 否 | - | 收货组织/调入组织编码 |
19
+ | `orderNo` | `string` | 否 | - | 业务单号 |
20
+ | `autoCallApi` | `boolean` | 否 | `true` | 是否在参数变化时自动调用接口 |
21
+
22
+ ## 3. Ref 方法暴露
23
+
24
+ 组件通过 `forwardRef` 暴露了以下方法,可通过 `ref` 调用:
25
+
26
+ | 方法名 | 类型 | 说明 |
27
+ | --- | --- | --- |
28
+ | `fetchData` | `() => Promise<void>` | 手动触发接口调用,重新获取链路数据 |
29
+
30
+ ## 4. 使用示例
31
+
32
+ ### 4.1 基本使用(自动触发)
33
+
34
+ 只要传入必要的 props,组件会自动调用接口并展示结果。
35
+
36
+ ```tsx
37
+ import React from 'react';
38
+ import PathDisplay from '@/components/Business/TrialCalculation';
39
+
40
+ const Demo = () => {
41
+ return (
42
+ <PathDisplay
43
+ recordType="1007"
44
+ businessType="1"
45
+ sendOrgCode="KDX0001"
46
+ receiverOrgCode="KD0002"
47
+ orderNo="DBCK25121700000014"
48
+ />
49
+ );
50
+ };
51
+
52
+ export default Demo;
53
+ ```
54
+
55
+ ### 4.2 手动触发(配合表单查询)
56
+
57
+ 如果需要点击“查询”按钮后再触发试算,可以将 `autoCallApi` 设置为 `false`,并通过 `ref` 调用 `fetchData`。
58
+
59
+
60
+ ```
61
+
62
+ ## 5. 业务逻辑说明
63
+
64
+ ### 5.1 接口请求
65
+ 组件内部调用 `/settle/crossOrgSettlementRoute/trialCalculation` 接口。
66
+ * **Method**: POST
67
+ * **请求参数**: 取自 Props 中的 `recordType`, `businessType`, `sendOrgCode`, `receiverOrgCode`, `orderNo`。
68
+
69
+ ### 5.2 页面跳转
70
+ 组件中包含物资凭证号和结算取价单号的跳转逻辑,依赖微前端环境:
71
+ * **物资凭证跳转**: `/settle/end-term-management/material_asset_voucher/view/:id/:no`
72
+ * **取价单跳转**: `/pay/pay-management/credit-management/credit-settle/view/:id`
73
+
74
+ > 注意:跳转功能依赖 `window.$wujie.props.jump` 方法。如果在非微前端环境(无 wujie 注入)下使用,跳转点击将无效(但不会报错,有空值判断)。
75
+
76
+ ### 5.3 字典依赖
77
+ 组件展示业务类型名称时,依赖全局工具函数 `getDictionaryTextByValue` 和内置的 `getRecordBusinessType` 映射逻辑。确保项目中已加载相关数据字典(如 `BUSINESS_ORG_CLASSIFICATION` 等)。
@@ -0,0 +1,322 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import { Tooltip, message, Spin } from 'antd';
3
+ import request from '@/utils/request';
4
+ import { getDictionaryTextByValue, handleError } from '@/utils';
5
+ import './PathDisplay.less';
6
+
7
+ const formatPaths = (list: any) => {
8
+ const result = list.map((l: any, index: number) => {
9
+ const Item = l;
10
+ if (l?.nodes?.length) {
11
+ Item.nodes = l?.nodes.map((s: any) => ({
12
+ ...s,
13
+ kCode: `${index}_${s.code}`,
14
+ }));
15
+ }
16
+ return Item;
17
+ });
18
+ return result;
19
+ };
20
+
21
+ const getRecordBusinessType = (recordType: any) => {
22
+ let businessTypeDictCode = "";
23
+ const list = [
24
+ { recordType: "502", businessTypeDictCode: "SRM00001" }, // 采购单
25
+ { recordType: "503", businessTypeDictCode: "SRM00002" }, // 采购退单
26
+ { recordType: "504", businessTypeDictCode: "TCbusinessType" }, // 销售单
27
+ { recordType: "505", businessTypeDictCode: "TCRbusinessType" }, // 销售退单
28
+ { recordType: "1001", businessTypeDictCode: "ALLOCATE00002" }, // 调拨出
29
+ { recordType: "1002", businessTypeDictCode: "ALLOCATE00002" }, // 调拨入
30
+ { recordType: "50", businessTypeDictCode: "SC00022" }, // 其他出入库单
31
+ { recordType: "30", businessTypeDictCode: "BUSINESS_Stock_Adjus" }, // 库存调整
32
+ { recordType: "130", businessTypeDictCode: "" }, // 逻辑移位单
33
+ {
34
+ recordType: "516",
35
+ businessTypeDictCode: "BUSINESS_ticket_sale_type",
36
+ }, // pos订单
37
+ { recordType: "1003", businessTypeDictCode: "BUSINESS_DBCK001" }, // 跨组织调拨出库单
38
+ { recordType: "1004", businessTypeDictCode: "BUSINESS_DBCK001" }, // 跨组织调拨入库单
39
+ { recordType: "1007", businessTypeDictCode: "BUSINESS_DBCK" }, // 跨组织调拨
40
+ { recordType: "517", businessTypeDictCode: "BUSINESS_AssReceiptType" }, // 拆装箱出
41
+ { recordType: "518", businessTypeDictCode: "BUSINESS_AssReceiptType" }, // 拆装箱入
42
+ ];
43
+ const match = list.find((item) => item.recordType == recordType);
44
+ businessTypeDictCode = match?.businessTypeDictCode || '';
45
+ return businessTypeDictCode;
46
+ };
47
+
48
+ interface NodeItem {
49
+ name: string;
50
+ code?: string;
51
+ orgClassification?: string;
52
+ targetOrgCode?: string;
53
+ targetRecordName?: string;
54
+ targetRecordType?: string;
55
+ targetBusinessType?: string;
56
+ targetOtherLineInfo?: string;
57
+ targetRecordNo?: string;
58
+ targetOccupyType?: number;
59
+ targetCreditSettleNo?: string;
60
+ targetRecordId?: string;
61
+ targetCreditSettleId?: string;
62
+ sourceOrgCode?: string;
63
+ sourceRecordName?: string;
64
+ sourceRecordType?: string;
65
+ sourceBusinessType?: string;
66
+ sourceOtherLineInfo?: string;
67
+ sourceRecordNo?: string;
68
+ sourceOccupyType?: number;
69
+ sourceCreditSettleNo?: string;
70
+ sourceRecordId?: string;
71
+ sourceCreditSettleId?: string;
72
+ }
73
+
74
+ interface PathDisplayProps {
75
+ recordType?: string;
76
+ businessType?: string;
77
+ sendOrgCode?: string;
78
+ receiverOrgCode?: string;
79
+ orderNo?: string;
80
+ autoCallApi?: boolean;
81
+ }
82
+
83
+ interface PathDisplayRef {
84
+ fetchData: () => Promise<void>;
85
+ }
86
+
87
+ const PathDisplay = React.forwardRef<PathDisplayRef, PathDisplayProps>(({
88
+ recordType,
89
+ businessType,
90
+ sendOrgCode,
91
+ receiverOrgCode,
92
+ orderNo,
93
+ autoCallApi = true
94
+ }, ref) => {
95
+ // 组件内部状态管理
96
+ const [pathList, setPathList] = useState<NodeItem[]>([]);
97
+ const [routeCode, setRouteCode] = useState<string>('');
98
+ const [routeCodeName, setRouteCodeName] = useState<string>('');
99
+ const [loading, setLoading] = useState<boolean>(false);
100
+
101
+ // 暴露方法给父组件
102
+ React.useImperativeHandle(ref, () => ({
103
+ fetchData
104
+ }));
105
+
106
+ const boock = (nodeItem: NodeItem) => (
107
+ <div className="pathItem_block">
108
+ <div>【{nodeItem.code}】{nodeItem.name}</div>
109
+ <div>组织分类:{getDictionaryTextByValue('BUSINESS_ORG_CLASSIFICATION', nodeItem.orgClassification || '')}</div>
110
+ </div>
111
+ );
112
+
113
+ // 调用接口获取数据
114
+ const fetchData = async () => {
115
+ // 检查必要参数
116
+ if (!recordType || !sendOrgCode || !receiverOrgCode) {
117
+ return;
118
+ }
119
+
120
+ setLoading(true);
121
+ try {
122
+ const params = {
123
+ recordType,
124
+ businessType,
125
+ sendOrgCode,
126
+ receiverOrgCode,
127
+ orderNo,
128
+ };
129
+ console.log('params', params);
130
+ let res = await request({
131
+ url: `/settle/crossOrgSettlementRoute/trialCalculation`,
132
+ method: 'POST',
133
+ data: params,
134
+ });
135
+ debugger
136
+ if (handleError(res.data)) {
137
+ res = res.data;
138
+ if (res.data?.match) {
139
+ setRouteCodeName(res?.data?.routeCodeName || '');
140
+ setRouteCode(res?.data?.routeCode || '');
141
+
142
+ const pList = res?.data?.fontDetails || [];
143
+ const formattedPaths = formatPaths(pList);
144
+ setPathList(formattedPaths);
145
+ } else {
146
+ // 清空历史结果
147
+ setRouteCodeName('');
148
+ setRouteCode('');
149
+ setPathList([]);
150
+ message.warning('匹配不到跨组织链路');
151
+ }
152
+ } else {
153
+ // 清空历史结果
154
+ setRouteCodeName('');
155
+ setRouteCode('');
156
+ setPathList([]);
157
+ message.error('获取数据失败');
158
+ }
159
+ } catch (error) {
160
+ console.error('调用接口失败:', error);
161
+ setRouteCodeName('');
162
+ setRouteCode('');
163
+ setPathList([]);
164
+ message.error('调用接口失败');
165
+ } finally {
166
+ setLoading(false);
167
+ }
168
+ };
169
+
170
+ // 监听props变化,自动调用接口
171
+ useEffect(() => {
172
+ if (autoCallApi) {
173
+ fetchData();
174
+ }
175
+ }, [recordType, businessType, sendOrgCode, receiverOrgCode, orderNo, autoCallApi]);
176
+
177
+ const line = (nodeItem: NodeItem) => {
178
+ // 物资凭证跳转处理
179
+ const handleMaterialAssetVoucherJump = (recordId: string, recordNo: string) => {
180
+ if ((window as any).$wujie?.props.jump) {
181
+ (window as any).$wujie.props.jump({
182
+ pathname: `/settle/end-term-management/material_asset_voucher/view/${recordId}/${recordNo}`,
183
+ });
184
+ }
185
+ };
186
+
187
+ // 取价单跳转处理
188
+ const handleCreditSettleJump = (creditSettleId: string) => {
189
+ if ((window as any).$wujie?.props.jump) {
190
+ (window as any).$wujie.props.jump({
191
+ pathname: `/pay/pay-management/credit-management/credit-settle/view/${creditSettleId}`,
192
+ });
193
+ }
194
+ };
195
+
196
+ return (
197
+ <div className="pathItem_line">
198
+ {nodeItem.targetOrgCode && (
199
+ <>
200
+ <Tooltip
201
+ title={
202
+ <div style={{ fontSize: '12px', lineHeight: '1.5' }}>
203
+ <div>结算单据:{nodeItem.targetRecordName}</div>
204
+ <div>业务类型:{getDictionaryTextByValue(getRecordBusinessType(nodeItem.targetRecordType || ''), nodeItem.targetBusinessType || '')}</div>
205
+ <div>价格来源:{nodeItem.targetOtherLineInfo}</div>
206
+ <div>物资凭证:{nodeItem.targetRecordNo || ' '}</div>
207
+ <div>{nodeItem.targetOccupyType === 1 ? '信贷占用单' : '结算取价单' }:{nodeItem.targetCreditSettleNo || ' '}</div>
208
+ </div>
209
+ }
210
+ placement="top"
211
+ >
212
+ <div className="record_info">
213
+ <div style={{ fontSize: '12px', lineHeight: '1.5' }}>
214
+ <div>{nodeItem.targetRecordName}</div>
215
+ <div>{getDictionaryTextByValue(getRecordBusinessType(nodeItem.targetRecordType || ''), nodeItem.targetBusinessType || '')}</div>
216
+ <div>{nodeItem.targetOtherLineInfo}</div>
217
+ <div>
218
+ {nodeItem.targetRecordId && nodeItem.targetRecordNo ? (
219
+ <span
220
+ style={{ cursor: 'pointer', color: '#1890ff', textDecoration: 'underline' }}
221
+ onClick={() => handleMaterialAssetVoucherJump(nodeItem.targetRecordId || '', nodeItem.targetRecordNo || '')}
222
+ >
223
+ {nodeItem.targetRecordNo}
224
+ </span>
225
+ ) : (
226
+ nodeItem.targetRecordNo
227
+ )}
228
+ </div>
229
+ <div>
230
+ {nodeItem.targetCreditSettleId ? (
231
+ <span
232
+ style={{ cursor: 'pointer', color: '#1890ff', textDecoration: 'underline' }}
233
+ onClick={() => handleCreditSettleJump(nodeItem.targetCreditSettleId || '')}
234
+ >
235
+ {nodeItem.targetCreditSettleNo}
236
+ </span>
237
+ ) : (
238
+ nodeItem.targetCreditSettleNo
239
+ )}
240
+ </div>
241
+ </div>
242
+ </div>
243
+ </Tooltip>
244
+ <div className="pathItem_line_withRightArrow">
245
+ <div className="pathItem_line_rightArrow"></div>
246
+ </div>
247
+ </>
248
+ ) || null}
249
+ {nodeItem.sourceOrgCode && (
250
+ <>
251
+ <div className="pathItem_line_withLeftArrow">
252
+ <div className="pathItem_line_leftArrow"></div>
253
+ </div>
254
+ <Tooltip
255
+ title={
256
+ <div style={{ fontSize: '12px', lineHeight: '1.5' }}>
257
+ <div>结算单据:{nodeItem.sourceRecordName}</div>
258
+ <div>业务类型:{getDictionaryTextByValue(getRecordBusinessType(nodeItem.sourceRecordType || ''), nodeItem.sourceBusinessType || '')}</div>
259
+ <div>价格来源:{nodeItem.sourceOtherLineInfo}</div>
260
+ <div>物资凭证:{nodeItem.sourceRecordNo || ' '}</div>
261
+ <div>{nodeItem.sourceOccupyType === 1 ? '信贷占用单' : '结算取价单' }:{nodeItem.sourceCreditSettleNo || ' '}</div>
262
+ </div>
263
+ }
264
+ placement="top"
265
+ >
266
+ <div className="record_info">
267
+ <div style={{ fontSize: '12px', lineHeight: '1.5' }}>
268
+ <div>{nodeItem.sourceRecordName}</div>
269
+ <div>{getDictionaryTextByValue(getRecordBusinessType(nodeItem.sourceRecordType || ''), nodeItem.sourceBusinessType || '')}</div>
270
+ <div>{nodeItem.sourceOtherLineInfo}</div>
271
+ <div>
272
+ {nodeItem.sourceRecordId && nodeItem.sourceRecordNo ? (
273
+ <span
274
+ style={{ cursor: 'pointer', color: '#1890ff', textDecoration: 'underline' }}
275
+ onClick={() => handleMaterialAssetVoucherJump(nodeItem.sourceRecordId || '', nodeItem.sourceRecordNo || '')}
276
+ >
277
+ {nodeItem.sourceRecordNo || ' '}
278
+ </span>
279
+ ) : (
280
+ nodeItem.sourceRecordNo || ' '
281
+ )}
282
+ </div>
283
+ <div>
284
+ {nodeItem.sourceCreditSettleId ? (
285
+ <span
286
+ style={{ cursor: 'pointer', color: '#1890ff', textDecoration: 'underline' }}
287
+ onClick={() => handleCreditSettleJump(nodeItem.sourceCreditSettleId || '')}
288
+ >
289
+ {nodeItem.sourceCreditSettleNo || ' '}
290
+ </span>
291
+ ) : (
292
+ nodeItem.sourceCreditSettleNo || ' '
293
+ )}
294
+ </div>
295
+ </div>
296
+ </div>
297
+ </Tooltip>
298
+ </>
299
+ ) || null}
300
+ </div>
301
+ );
302
+ };
303
+
304
+ return (
305
+ <div className="wrap_pathContentBox">
306
+ <Spin spinning={loading} tip="加载中...">
307
+ {routeCode && <div className="wrap_pathContentBoxTitle">跨组织链路名称:【{routeCode}】{routeCodeName}</div> }
308
+
309
+ <div className="pathItem_content">
310
+ {pathList.map((nodeItem, index) => (
311
+ <React.Fragment key={`node_${index}`}>
312
+ {boock(nodeItem)}
313
+ {line(nodeItem)}
314
+ </React.Fragment>
315
+ ))}
316
+ </div>
317
+ </Spin>
318
+ </div>
319
+ );
320
+ });
321
+
322
+ export default PathDisplay;
@@ -57,6 +57,21 @@ export default class ColumnSettingSulaTable extends React.Component {
57
57
  }, callback);
58
58
  }
59
59
 
60
+ /**
61
+ * 清除自定义列设置后,恢复全部原始列及其定义顺序。
62
+ */
63
+ reSetInitialShowColumn = () => {
64
+ const { columns = [] }: any = this.props;
65
+ const showColumns = columns.map((item: any) => ({
66
+ ...item,
67
+ hidden: false,
68
+ }));
69
+
70
+ this.setState({
71
+ showColumns,
72
+ });
73
+ }
74
+
60
75
  setShowColumns = (newColumns: Array<any>) => {
61
76
  this.setState({
62
77
  showColumns: [...newColumns]
@@ -445,6 +460,7 @@ export default class ColumnSettingSulaTable extends React.Component {
445
460
  setShowColumns={this.setShowColumns}
446
461
  showColumns={this.state.showColumns}
447
462
  datasource={columns || []}
463
+ reSetInitialShowColumn={this.reSetInitialShowColumn}
448
464
  tableCode={tableCode}
449
465
  appRequestConfig={appRequestConfig}
450
466
  />
@@ -469,4 +485,4 @@ export default class ColumnSettingSulaTable extends React.Component {
469
485
  )
470
486
  }
471
487
 
472
- }
488
+ }
@@ -669,7 +669,7 @@ const AddSelect = (props: any) => {
669
669
  }
670
670
  // 数据源 不可以有重复key
671
671
  source = Array.isArray(source) ? _.uniqBy(source, 'value') : [];
672
-
672
+
673
673
  setTableData(source)
674
674
  setTablePagination({ ...tablePagination, total: Number(res?.total || res?.totalCount || source.length), pageSize: Number(res?.size || res?.pageSize || (params?.pageSize || pageSize)), current: Number(res?.page || res?.currentPage || (params?.currentPage || currentPage)) })
675
675
  })
@@ -807,6 +807,8 @@ const AddSelect = (props: any) => {
807
807
  }
808
808
 
809
809
  const handleTableChange = (pagination) => {
810
+ // 设置分页tablePagination
811
+ setTablePagination({ ...tablePagination, ...pagination })
810
812
  getData({ ...tableFormParams, pageSize: pagination.pageSize, currentPage: pagination.current }, 2)
811
813
  }
812
814
 
@@ -242,11 +242,9 @@ class DataValidation extends React.Component {
242
242
  cell.v = cell.m
243
243
  }
244
244
  }
245
- // console.log(postion);
246
245
  },
247
246
  cellAllRenderBefore: function (data, sheetFile, ctx) {
248
247
  sheetFile.config.borderInfo = [];
249
- // console.info(data,sheetFile,ctx)
250
248
  },
251
249
  },
252
250
  showtoolbarConfig: {
@@ -411,7 +409,8 @@ class DataValidation extends React.Component {
411
409
  };
412
410
 
413
411
  getData = () => {
414
- console.time();
412
+ // 是否使用字符串值 默认为false
413
+ const useStringValue = this.props.useStringValue || false;
415
414
  let sheetData = luckysheet.getSheetData();
416
415
  let data = JSON.parse(JSON.stringify(sheetData))
417
416
  .filter((item) => item[0])
@@ -419,7 +418,13 @@ class DataValidation extends React.Component {
419
418
  let obj = {};
420
419
 
421
420
  item.slice(0, itemsTemp.length).map((innerItem, index) => {
422
- obj[this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
421
+ // 如果使用字符串值,直接赋值字符串
422
+ if (useStringValue) {
423
+ obj[this.state.items[index].code] = innerItem && innerItem.m;
424
+ } else {
425
+ // 否则根据值是否相等来判断是否使用字符串值
426
+ obj[this.state.items[index].code] = innerItem && (innerItem.v === innerItem.m ? innerItem.m : innerItem.v);
427
+ }
423
428
  });
424
429
 
425
430
  return obj;
@@ -570,7 +575,6 @@ customSort = (a, b) => {
570
575
  resultData: res,
571
576
  });
572
577
 
573
- console.log(setExportData);
574
578
  setExportData([123123]);
575
579
  })
576
580
  .catch((err:any) => { });
@@ -820,7 +824,6 @@ customSort = (a, b) => {
820
824
  top: '0px',
821
825
  };
822
826
 
823
- console.log('itemsTemp', itemsTemp)
824
827
  return (
825
828
  <>
826
829
  <div className="sheet_table_top">
@@ -13,7 +13,7 @@ export const getValue = (value: any, selectMode?: any) => {
13
13
  }
14
14
 
15
15
  const QueryMutipleSearchSelect = ({ onValueChange, requestConfig={}, selectProps={}, ctx }: any) => {
16
- const { filter, method = 'get', url, extralHeaders = {}, otherParams = {}, specialBracket = false, noNeedSplit = false, } = requestConfig;
16
+ const { filter, method = 'get', url, extralHeaders = {}, otherParams = {}, specialBracket = false, noNeedSplit = false, requestType = 'get' } = requestConfig;
17
17
  const selectParamsKey = filter || 'qp-codeAndName-like';
18
18
  const resultSourceKey = handleSourceName(requestConfig?.sourceName || ctx?.name || 'skuCode')
19
19
  const currentSelectProps = {
@@ -106,7 +106,7 @@ const QueryMutipleSearchSelect = ({ onValueChange, requestConfig={}, selectProps
106
106
  let getRequest;
107
107
  const methodName = method?.toLocaleLowerCase();
108
108
  if(['post','patch','put'].includes(methodName)) {
109
- getRequest = request[methodName](`${url}${convertUrlQueryParams(queryParams)}`,convertBodyParams(queryParams),{headers: { ...extralHeaders }})
109
+ getRequest = request[methodName](`${url}${convertUrlQueryParams(queryParams)}`,convertBodyParams({...queryParams, requestType}),{headers: { ...extralHeaders }})
110
110
  } else {
111
111
  getRequest = request.get( `${url}${convertUrlQueryParams(queryParams)}`,{headers: { ...extralHeaders }})
112
112
  }