@kmkf-fe-packages/kmkf-work-order-service-component 2.0.79-beta.7 → 2.0.79-beta.71

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 (46) hide show
  1. package/dist/esm/CustomerServiceToDoList/index.d.ts +3 -0
  2. package/dist/esm/CustomerServiceToDoList/index.js +158 -0
  3. package/dist/esm/CustomerServiceToDoList/index.module.less +126 -0
  4. package/dist/esm/FlowTemplateDetailV2/common.js +2 -1
  5. package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.js +10 -9
  6. package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +3 -2
  7. package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +44 -10
  8. package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.d.ts +6 -0
  9. package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.js +68 -1
  10. package/dist/esm/FlowTemplateDetailV2/components/Item/index.d.ts +1 -0
  11. package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +14 -30
  12. package/dist/esm/FlowTemplateDetailV2/constant.js +1 -1
  13. package/dist/esm/FlowTemplateDetailV2/index.js +14 -5
  14. package/dist/esm/FlowTemplateDetailV2/store/reducers.js +2 -1
  15. package/dist/esm/FlowTemplateDetailV2/store/selector.d.ts +1 -0
  16. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentFormModal/index.js +22 -4
  17. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +1 -1
  18. package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js +6 -0
  19. package/dist/esm/WorkOrder/components/WorkOrderList/index.d.ts +2 -1
  20. package/dist/esm/WorkOrder/components/WorkOrderList/index.js +15 -8
  21. package/dist/esm/WorkOrder/components/WorkOrderList/index.less +4 -3
  22. package/dist/esm/WorkOrder/index.js +13 -3
  23. package/dist/esm/common/constant.d.ts +5 -0
  24. package/dist/esm/common/constant.js +3 -2
  25. package/dist/esm/common/imgs/ai.png +0 -0
  26. package/dist/esm/common/utils/constant.d.ts +8 -0
  27. package/dist/esm/common/utils/constant.js +43 -1
  28. package/dist/esm/common/utils/submitDataTransOldFormat.js +111 -71
  29. package/dist/esm/common/utils/tools.d.ts +1 -0
  30. package/dist/esm/common/utils/tools.js +152 -56
  31. package/dist/esm/common/utils/tools_constants.js +21 -2
  32. package/dist/esm/common/utils/transformWorkOrderData.js +99 -16
  33. package/dist/esm/common/utils/xzSDK.d.ts +2 -0
  34. package/dist/esm/common/utils/xzSDK.js +41 -1
  35. package/dist/esm/index.d.ts +1 -0
  36. package/dist/esm/index.js +1 -0
  37. package/dist/esm/model/customizeWorkOrder/index.d.ts +1 -1
  38. package/dist/esm/model/customizeWorkOrder/index.js +17 -3
  39. package/dist/esm/model/customizeWorkOrder/types.d.ts +2 -0
  40. package/dist/esm/model/flowTemplateDetail/types.d.ts +3 -0
  41. package/dist/esm/model/logicFlow/selector.d.ts +3 -0
  42. package/dist/esm/model/paymentWorkOrder/selector.d.ts +9 -0
  43. package/dist/esm/model/servers/api.d.ts +3 -0
  44. package/dist/esm/model/servers/api.js +26 -0
  45. package/dist/esm/model/singleShopWorkOrder/selector.d.ts +5 -0
  46. package/package.json +5 -5
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const CustomerServiceToDoList: React.FC;
3
+ export default CustomerServiceToDoList;
@@ -0,0 +1,158 @@
1
+ import { Button, Card, Tag, Typography, Badge, Spin, Empty } from 'antd';
2
+ import React, { useRef, useEffect } from 'react';
3
+ import { useInfiniteScroll } from 'ahooks';
4
+ import { CloseOutlined } from '@ant-design/icons';
5
+ import { useAppDispatch, useAppSelector } from "../model/hooks";
6
+ import { nodeWorkOrderPending } from "../model/servers/api";
7
+ import moment from 'moment';
8
+ import { setWorkOrderProcessStatus } from "../model/customizeWorkOrder";
9
+ import { WORK_ORDER_STATUS_AI_BUILD } from "../common/constant";
10
+ import styles from "./index.module.less";
11
+ var Title = Typography.Title;
12
+ var getTableData = function getTableData(params) {
13
+ return nodeWorkOrderPending(params).then(function (res) {
14
+ var _res$data, _res$data2;
15
+ // console.log('API response:', res?.data);
16
+ return {
17
+ list: (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [],
18
+ total: (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.total) || 0
19
+ };
20
+ }).catch(function (error) {
21
+ console.error('API error:', error);
22
+ return {
23
+ list: [],
24
+ total: 0
25
+ };
26
+ });
27
+ };
28
+ var CustomerServiceToDoList = function CustomerServiceToDoList() {
29
+ var _ref, _data$list;
30
+ var dispatch = useAppDispatch();
31
+ var workOrderProcessStatus = useAppSelector(function (state) {
32
+ var _state$customizeWorkO;
33
+ return (_state$customizeWorkO = state.customizeWorkOrder) === null || _state$customizeWorkO === void 0 ? void 0 : _state$customizeWorkO.workOrderProcessStatus;
34
+ });
35
+ var containerRef = useRef(null);
36
+ var _useInfiniteScroll = useInfiniteScroll(function (d) {
37
+ var page = d ? Math.ceil(d.list.length / 10) + 1 : 1;
38
+ return getTableData({
39
+ pageNo: page,
40
+ pageSize: 10,
41
+ onlyWaitForMe: true,
42
+ onlyCount: false,
43
+ onlyStartNode: true,
44
+ flowTags: ['AI_BUILD']
45
+ });
46
+ }, {
47
+ target: containerRef,
48
+ reloadDeps: [],
49
+ // 添加空的 reloadDeps 避免不必要的重新加载
50
+ isNoMore: function isNoMore(d) {
51
+ var _d$list;
52
+ return (d === null || d === void 0 ? void 0 : d.total) <= (d === null || d === void 0 ? void 0 : (_d$list = d.list) === null || _d$list === void 0 ? void 0 : _d$list.length);
53
+ }
54
+ }),
55
+ data = _useInfiniteScroll.data,
56
+ loading = _useInfiniteScroll.loading,
57
+ reload = _useInfiniteScroll.reload,
58
+ noMore = _useInfiniteScroll.noMore;
59
+ var handleProcess = function handleProcess(item) {
60
+ dispatch({
61
+ type: 'customizeWorkOrder/setCurrentCustomizeRecord',
62
+ payload: {
63
+ flowTemplateName: item === null || item === void 0 ? void 0 : item.flowTemplateName
64
+ }
65
+ });
66
+ dispatch({
67
+ type: 'customizeWorkOrder/setLogicFlowId',
68
+ payload: item.flowTemplateKey
69
+ });
70
+ dispatch({
71
+ type: 'customizeWorkOrder/setFlowWorkOrderId',
72
+ payload: item.flowWorkOrderId
73
+ });
74
+ dispatch({
75
+ type: 'customizeWorkOrder/setFormModalVisible',
76
+ payload: true
77
+ });
78
+ };
79
+ var onCancel = function onCancel() {
80
+ dispatch({
81
+ type: 'customizeWorkOrder/setCustomerServiceToDoListOpen',
82
+ payload: false
83
+ });
84
+ };
85
+ useEffect(function () {
86
+ reload();
87
+ }, []);
88
+ useEffect(function () {
89
+ if (['submit'].includes(workOrderProcessStatus)) {
90
+ reload();
91
+ dispatch(setWorkOrderProcessStatus(''));
92
+ }
93
+ }, [workOrderProcessStatus, dispatch]);
94
+ return /*#__PURE__*/React.createElement("div", {
95
+ className: styles.container,
96
+ onClick: onCancel
97
+ }, /*#__PURE__*/React.createElement("div", {
98
+ className: styles.todoSection,
99
+ onClick: function onClick(e) {
100
+ return e.stopPropagation();
101
+ }
102
+ }, /*#__PURE__*/React.createElement("div", {
103
+ className: styles.todoTabs
104
+ }, /*#__PURE__*/React.createElement(Badge, {
105
+ count: data === null || data === void 0 ? void 0 : data.total
106
+ }, /*#__PURE__*/React.createElement("div", {
107
+ className: styles.todoTab
108
+ }, "\u5BA2\u670D\u5F85\u529E")), /*#__PURE__*/React.createElement(CloseOutlined, {
109
+ onClick: onCancel
110
+ })), /*#__PURE__*/React.createElement("main", {
111
+ className: styles.todoList,
112
+ ref: containerRef
113
+ }, ((data === null || data === void 0 ? void 0 : data.list) || []).length > 0 ? /*#__PURE__*/React.createElement(Spin, {
114
+ spinning: loading
115
+ }, (_ref = (data === null || data === void 0 ? void 0 : data.list) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
116
+ var _item$jsonMap;
117
+ return /*#__PURE__*/React.createElement(Card, {
118
+ key: item.id,
119
+ className: "".concat(styles.todoItem),
120
+ bodyStyle: {
121
+ padding: '12px 16px'
122
+ }
123
+ }, /*#__PURE__*/React.createElement("div", {
124
+ className: styles.todoContent
125
+ }, /*#__PURE__*/React.createElement("div", {
126
+ className: styles.todoMain
127
+ }, /*#__PURE__*/React.createElement("div", {
128
+ className: styles.todoDescription
129
+ }, /*#__PURE__*/React.createElement(Title, {
130
+ level: 5
131
+ }, item.buyerNick ? "".concat(item.buyerNick, "\u6709\u4E00\u6761") : '', item === null || item === void 0 ? void 0 : (_item$jsonMap = item.jsonMap) === null || _item$jsonMap === void 0 ? void 0 : _item$jsonMap.scene, " \u5DE5\u5355\u9700\u8981\u5904\u7406\uFF0C\u8BF7\u53CA\u65F6\u5904\u7406")), /*#__PURE__*/React.createElement("div", {
132
+ className: styles.todoMeta
133
+ }, /*#__PURE__*/React.createElement("span", {
134
+ className: styles.timestamp
135
+ }, moment(item.created).format('YYYY-MM-DD HH:mm:ss')))), /*#__PURE__*/React.createElement("div", {
136
+ className: styles.todoAction
137
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
138
+ className: styles.source
139
+ }, item.platformTypeName, "\u3010", item.shopName, "\u3011"), /*#__PURE__*/React.createElement(Tag, {
140
+ color: "blue",
141
+ className: styles.aiAction
142
+ }, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[item.flowStatus]))), /*#__PURE__*/React.createElement(Button, {
143
+ type: "primary",
144
+ size: "small",
145
+ ghost: true,
146
+ onClick: function onClick() {
147
+ return handleProcess(item);
148
+ }
149
+ }, "\u53BB\u5904\u7406"))));
150
+ })) : /*#__PURE__*/React.createElement("div", {
151
+ className: styles.todoEmpty
152
+ }, /*#__PURE__*/React.createElement(Empty, {
153
+ description: "\u6682\u65E0\u6570\u636E"
154
+ })), noMore && data !== null && data !== void 0 && (_data$list = data.list) !== null && _data$list !== void 0 && _data$list.length ? /*#__PURE__*/React.createElement("p", {
155
+ className: styles.todoNoMore
156
+ }, "\u6CA1\u6709\u66F4\u591A\u6570\u636E\u4E86") : null)));
157
+ };
158
+ export default CustomerServiceToDoList;
@@ -0,0 +1,126 @@
1
+ .container {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ background: rgba(0, 0, 0, 0.5);
8
+ z-index: 90;
9
+ }
10
+ .todoTabs {
11
+ display: flex;
12
+ justify-content: space-between;
13
+ align-items: center;
14
+ padding: 0 16px;
15
+ height: 45px;
16
+ .todoTab {
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ width: 90px;
21
+ height: 45px;
22
+ font-size: 16px;
23
+ font-weight: 500;
24
+ color: #1890ff;
25
+ border-bottom: 2px solid #1890ff;
26
+ }
27
+ }
28
+ .todoSection {
29
+ position: absolute;
30
+ bottom: 0;
31
+ left: 0;
32
+ right: 0;
33
+ width: 100%;
34
+ height: 80%;
35
+ background: #fff;
36
+
37
+ .todoList {
38
+ height: calc(100% - 50px);
39
+ overflow-y: auto;
40
+ background: #f0f0f0;
41
+ padding-top: 8px;
42
+ .todoItem {
43
+ margin-bottom: 8px;
44
+ border-radius: 6px;
45
+ transition: all 0.3s;
46
+
47
+ &:hover {
48
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
49
+ }
50
+
51
+ &.highlighted {
52
+ border: 2px dashed #ff4d4f;
53
+ background: #fff2f0;
54
+ }
55
+
56
+ .todoContent {
57
+ height: 100px;
58
+
59
+ .todoMain {
60
+ flex: 1;
61
+
62
+ .todoDescription {
63
+ height: 48px;
64
+ }
65
+
66
+ .todoMeta {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 12px;
70
+ flex-wrap: wrap;
71
+
72
+ .timestamp {
73
+ font-size: 12px;
74
+ color: #999;
75
+ }
76
+
77
+ .source {
78
+ font-size: 12px;
79
+ color: #666;
80
+ background: #f5f5f5;
81
+ padding: 2px 6px;
82
+ border-radius: 3px;
83
+ }
84
+
85
+ .aiAction {
86
+ font-size: 11px;
87
+ margin: 0;
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ .todoEmpty {
94
+ display: flex;
95
+ justify-content: center;
96
+ align-items: center;
97
+ height: 100%;
98
+ }
99
+ .todoNoMore {
100
+ display: flex;
101
+ justify-content: center;
102
+ align-items: center;
103
+ height: 32px;
104
+ color: #999;
105
+ font-size: 14px;
106
+ }
107
+ }
108
+ }
109
+
110
+ // 响应式设计
111
+ @media (max-width: 768px) {
112
+ .filterOptions {
113
+ gap: 8px;
114
+ }
115
+
116
+ .todoContent {
117
+ flex-direction: column;
118
+ gap: 12px;
119
+
120
+ .todoAction {
121
+ width: 100%;
122
+ display: flex;
123
+ justify-content: space-between;
124
+ }
125
+ }
126
+ }
@@ -24,6 +24,7 @@ export var getFlowOperate = {
24
24
  MODIFY_WORK_ORDER: '修改',
25
25
  WITHDRAW: '撤回',
26
26
  REMINDER: '催单',
27
+ AI_BUILD: 'AI自动建单',
27
28
  CANCEL_REMINDER: '取消催单',
28
29
  AUTO_TASK_RETRY: '自动任务重试'
29
30
  };
@@ -37,7 +38,7 @@ export var FLOW_STATUS_V2 = {
37
38
  RETURNING: '回退中'
38
39
  };
39
40
  //不能回填的组件type
40
- export var CANNOT_BACK_FILL = ['LOGISTICS_TRAJECTORY', 'LOGISTICS_TRAJECTORY_MORE', 'BUYER_MESSAGE_NOTICE', 'MSG_STATUS', 'NEW_PAYMENT_STATUS', 'REISSUE_STATUS', 'REISSUE_LOGISTICS', 'RETURN_GOODS_STATUS', 'RETURN_GOODS_TRADE_ID', 'ADJUST_WORK_ORDER_STATUS', 'INVOICE_STATUS', 'INVOICING_STATUS', 'EXCHANGE_STATUS', 'WAREHOUSING_STATUS', 'BS_E3_WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE', 'ORDER_TYPE', 'REFUND_TYPE', 'RETURN_EXCHANGE_GOODS_REVIEW_STATUS', 'EXECUTE_ACTION_TYPE'];
41
+ export var CANNOT_BACK_FILL = ['LOGISTICS_TRAJECTORY', 'LOGISTICS_TRAJECTORY_MORE', 'BUYER_MESSAGE_NOTICE', 'MSG_STATUS', 'NEW_PAYMENT_STATUS', 'REISSUE_STATUS', 'REISSUE_LOGISTICS', 'RETURN_GOODS_STATUS', 'RETURN_GOODS_TRADE_ID', 'ADJUST_WORK_ORDER_STATUS', 'INVOICE_STATUS', 'INVOICING_STATUS', 'EXCHANGE_STATUS', 'WAREHOUSING_STATUS', 'BS_E3_WAREHOUSING_STATUS', 'WDT_WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE', 'ORDER_TYPE', 'REFUND_TYPE', 'RETURN_EXCHANGE_GOODS_REVIEW_STATUS', 'EXECUTE_ACTION_TYPE', 'ERP_ORDER_STATUS'];
41
42
  export var verifyHandle = function verifyHandle(data, componentDtoList) {
42
43
  var _componentDtoList$fin, _componentDtoList$fin2, _data$paymentUniqueKe, _data$paymentUniqueKe2;
43
44
  var res = {
@@ -7,7 +7,11 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
7
7
  0: '执行中',
8
8
  1: '部分成功',
9
9
  2: '全部成功',
10
- 4: '全部失败'
10
+ 3: '部分失败',
11
+ 4: '全部失败',
12
+ 5: '同时存在成功和失败且尚未完结',
13
+ 6: '同时存在成功和失败且已完结',
14
+ 7: '等待业务执行'
11
15
  };
12
16
  var eventStatus = flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventStatus;
13
17
  var renderRules = function renderRules() {
@@ -19,16 +23,13 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
19
23
  });
20
24
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Divider, {
21
25
  dashed: true
22
- }), result && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, result.ruleName && "\u547D\u4E2D\u89C4\u5219\u540D\u79F0: ".concat(result.ruleName)), /*#__PURE__*/React.createElement("p", null, (_result$passCondition = result.passConditionList) === null || _result$passCondition === void 0 ? void 0 : _result$passCondition.map(function (condition) {
26
+ }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, (result === null || result === void 0 ? void 0 : result.ruleName) && "\u547D\u4E2D\u89C4\u5219\u540D\u79F0: ".concat(result === null || result === void 0 ? void 0 : result.ruleName)), /*#__PURE__*/React.createElement("p", null, item.businessStatusDesc && "\u89C4\u5219\u72B6\u6001: ".concat(item.businessStatusDesc)), /*#__PURE__*/React.createElement("p", null, result === null || result === void 0 ? void 0 : (_result$passCondition = result.passConditionList) === null || _result$passCondition === void 0 ? void 0 : _result$passCondition.map(function (condition) {
23
27
  return /*#__PURE__*/React.createElement("p", null, condition);
24
28
  }))), /*#__PURE__*/React.createElement("p", null, item.remark));
25
29
  }));
26
30
  };
27
- var renderReason = function renderReason() {
28
- var _flowEventData$eventD6, _flowEventData$eventD7, _flowEventData$eventD8;
29
- return /*#__PURE__*/React.createElement("p", null, flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD6 = flowEventData.eventData) === null || _flowEventData$eventD6 === void 0 ? void 0 : (_flowEventData$eventD7 = _flowEventData$eventD6.businessStatus) === null || _flowEventData$eventD7 === void 0 ? void 0 : (_flowEventData$eventD8 = _flowEventData$eventD7.map(function (item) {
30
- return item === null || item === void 0 ? void 0 : item.remark;
31
- })) === null || _flowEventData$eventD8 === void 0 ? void 0 : _flowEventData$eventD8.join(','));
32
- };
33
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), isNumber(eventStatus) && [1, 2].includes(eventStatus) && renderRules(), isNumber(eventStatus) && [4].includes(eventStatus) && renderReason());
31
+ // const renderReason = () => {
32
+ // return <p>{ flowEventData?.eventData?.businessStatus?.map((item: any) => item?.remark)?.join(',') }</p>
33
+ // }
34
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules());
34
35
  };
@@ -40,7 +40,7 @@ var formProps = {
40
40
  layout: 'vertical'
41
41
  };
42
42
  var CurrentNode = function CurrentNode(props, ref) {
43
- var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$wo12, _localStorage, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$wo22;
43
+ var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$fl, _currentNodeDetail$wo12, _localStorage, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$wo22;
44
44
  var formRenderRef = useRef(null);
45
45
  useImperativeHandle(ref, function () {
46
46
  return {
@@ -277,6 +277,7 @@ var CurrentNode = function CurrentNode(props, ref) {
277
277
  }();
278
278
  var isArtificialNode = tag === 'artificial';
279
279
  var isAutoNode = tag === 'auto';
280
+ var isShowAutoNodeDetail = isAutoNode && ['ORDER_MEMO_MANY_RULES', 'AFTER_SALE_AUTO_RETURN_GOODS_AGREE_REJECT', 'AFTER_SALE_AUTO_REFUND_REJECT', 'LOGISTICS_INTERCEPT_MULTI_RULE', 'MESSAGE_NOTIFY_EVENT', 'DING_TALK_ROBOT_NOTIFY', 'HTTP_INVOKE', 'ORDER_MEMO'].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : _currentNodeDetail$fl.eventType);
280
281
  var showEdit = isArtificialNode && isCurrentNodeHandler && !readonly && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.flowStatus) === FlowStatus.COMPLETED;
281
282
  // TODO: 决策节点给后端修复数据加了一个入口
282
283
  // @ts-ignore
@@ -331,7 +332,7 @@ var CurrentNode = function CurrentNode(props, ref) {
331
332
  flowAllShowHideRules: allShowHideRules,
332
333
  firstOrderBackfill: flowStatus !== FlowStatus.COMPLETED,
333
334
  autoSubmit: autoSubmit
334
- })), isAutoNode && /*#__PURE__*/React.createElement(AutoTaskDetail, {
335
+ })), isShowAutoNodeDetail && /*#__PURE__*/React.createElement(AutoTaskDetail, {
335
336
  flowEventData: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.flowEventData
336
337
  })));
337
338
  };
@@ -29,7 +29,7 @@ import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle, grou
29
29
  import 'moment/locale/zh-cn';
30
30
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
31
31
  // 重复检验不需要展示在顶部的
32
- INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, kmSystemOrderBackValues, bsE3SystemOrderBackValues, wlnSystemOrderBackValues, gySystemOrderBackValues, jstSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, getMappingTargetValue } from "../../../common/utils/tools";
32
+ INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, kmSystemOrderBackValues, bsE3SystemOrderBackValues, wlnSystemOrderBackValues, gySystemOrderBackValues, jstSystemOrderBackValues, jySystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, getMappingTargetValue } from "../../../common/utils/tools";
33
33
  import { replaceCheck, orderDetail, queryLabelByTradeId, queryMemberLevel } from "../../../model/servers/api";
34
34
  import { factory } from '@kmkf-fe-packages/services-components';
35
35
  import { getExpression, formatDisplayConfig, isNull, LabelData, setSessionStorage } from '@kmkf-fe-packages/kmkf-utils';
@@ -43,7 +43,7 @@ import { jsonParseSecurity, findComponentUniqueKeyByType } from "../../../common
43
43
  import { NEED_CLEAR_FIELDS_WHEN_SHOP_ID_CHANGE } from "../../constant";
44
44
  import { Context } from "../../context";
45
45
  import { orderBackKmAddress } from "./constants";
46
- import { onBlurExpressLogisticsCode, onBlurErpAfterSaleTradeId } from "./onBlur";
46
+ import { onBlurExpressLogisticsCode, onBlurErpAfterSaleTradeId, onBlurSkxOutboundNoticeNo } from "./onBlur";
47
47
  // 记录显隐触发隐藏的组件。显示后,重新出发一遍映射规则
48
48
  // TODO: 用useState会有bug, 不确定是哪里导致的
49
49
  var hideByXYComponentsMap = {};
@@ -815,6 +815,13 @@ var FormRender = function FormRender(props, ref) {
815
815
  form: form
816
816
  });
817
817
  }
818
+ if (workOrderComponentType === 'JY_SYSTEM_ORDER') {
819
+ jySystemOrderBackValues({
820
+ templateList: templateDetail,
821
+ value: value,
822
+ form: form
823
+ });
824
+ }
818
825
  if (workOrderComponentType === 'JST_SYSTEM_ORDER') {
819
826
  jstSystemOrderBackValues({
820
827
  templateList: templateDetail,
@@ -822,6 +829,13 @@ var FormRender = function FormRender(props, ref) {
822
829
  form: form
823
830
  });
824
831
  }
832
+ if (workOrderComponentType === 'JY_SYSTEM_ORDER') {
833
+ jySystemOrderBackValues({
834
+ templateList: templateDetail,
835
+ value: value,
836
+ form: form
837
+ });
838
+ }
825
839
  if (activeLogisticsComponents && ['INPUT', 'EXPRESS_LOGISTICS_SELECT', 'BS_LOGISTICS'].includes(workOrderComponentType)) {
826
840
  setLogisticsInfo({
827
841
  logisticsMappingConfig: activeLogisticsComponents,
@@ -852,7 +866,7 @@ var FormRender = function FormRender(props, ref) {
852
866
  setKmLoading: setKmLoading
853
867
  });
854
868
  case 3:
855
- _context5.next = 22;
869
+ _context5.next = 28;
856
870
  break;
857
871
  case 5:
858
872
  if (!(type === 'expressLogisticsCode')) {
@@ -868,9 +882,26 @@ var FormRender = function FormRender(props, ref) {
868
882
  componentOnBlur: componentOnBlur
869
883
  });
870
884
  case 8:
871
- _context5.next = 22;
885
+ _context5.next = 28;
872
886
  break;
873
887
  case 10:
888
+ if (!(type === 'skxOutboundNoticeNo')) {
889
+ _context5.next = 16;
890
+ break;
891
+ }
892
+ //[SKX]ON出库通知单号 返填
893
+ console.log('skxOutboundNoticeNo', value);
894
+ _context5.next = 14;
895
+ return onBlurSkxOutboundNoticeNo({
896
+ form: form,
897
+ value: value,
898
+ templateDetail: templateDetail,
899
+ componentOnBlur: componentOnBlur
900
+ });
901
+ case 14:
902
+ _context5.next = 28;
903
+ break;
904
+ case 16:
874
905
  // 收集所有需要执行的异步操作
875
906
  promises = [];
876
907
  if (type === 'tradeId') {
@@ -882,7 +913,7 @@ var FormRender = function FormRender(props, ref) {
882
913
  promises.push(handleChangeTradeId(value));
883
914
  }
884
915
  if (value) {
885
- _context5.next = 17;
916
+ _context5.next = 23;
886
917
  break;
887
918
  }
888
919
  setReplaceValue(function (prev) {
@@ -890,18 +921,18 @@ var FormRender = function FormRender(props, ref) {
890
921
  });
891
922
  replaceValueRef.current = _objectSpread(_objectSpread({}, replaceValue), {}, _defineProperty({}, type, 0));
892
923
  return _context5.abrupt("return");
893
- case 17:
924
+ case 23:
894
925
  promises.push(queryReplaceCount(_defineProperty({}, type, value), templateDetail));
895
926
  // TODO: ERP不走订单反弹逻辑
896
927
  if ((type === 'tradeId' || type === 'enterprisePaymentTid') && !isErpUse) {
897
928
  promises.push(changeHandle(value));
898
929
  }
899
930
  // 等待所有异步操作完成
900
- _context5.next = 21;
931
+ _context5.next = 27;
901
932
  return Promise.all(promises);
902
- case 21:
933
+ case 27:
903
934
  return _context5.abrupt("return", Promise.resolve());
904
- case 22:
935
+ case 28:
905
936
  case "end":
906
937
  return _context5.stop();
907
938
  }
@@ -956,7 +987,7 @@ var FormRender = function FormRender(props, ref) {
956
987
  }
957
988
  //如果有bs组件 设置成初始值
958
989
  var hasBs = get(templateDetail, 'componentDtoList', []).some(function (item) {
959
- return ['BS_LOGISTICS', 'BS_E3_LOGISTICS', 'BS_SEND_GOOD', 'BS_E3_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'KM_LOGISTICS', 'KM_SEND_GOOD', 'GY_SEND_GOOD', 'GY_LOGISTICS'].includes(item.workOrderComponentType);
990
+ return ['BS_LOGISTICS', 'BS_E3_LOGISTICS', 'BS_SEND_GOOD', 'BS_E3_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'KM_LOGISTICS', 'KM_SEND_GOOD', 'GY_SEND_GOOD', 'GY_LOGISTICS', 'JY_SEND_GOOD', 'JY_LOGISTICS', 'SKX_LOGISTICS'].includes(item.workOrderComponentType);
960
991
  });
961
992
  if (hasBs) {
962
993
  var bsValue = get(templateDetail, 'componentDtoList', []).reduce(function (prv, next) {
@@ -967,6 +998,8 @@ var FormRender = function FormRender(props, ref) {
967
998
  case 'KM_LOGISTICS':
968
999
  case 'BS_E3_LOGISTICS':
969
1000
  case 'GY_LOGISTICS':
1001
+ case 'JY_LOGISTICS':
1002
+ case 'SKX_LOGISTICS':
970
1003
  prv[next.uniqueKey] = [{
971
1004
  logisticsCompany: null,
972
1005
  logisticsCode: null
@@ -978,6 +1011,7 @@ var FormRender = function FormRender(props, ref) {
978
1011
  case 'WDT_SEND_GOOD':
979
1012
  case 'KM_SEND_GOOD':
980
1013
  case 'GY_SEND_GOOD':
1014
+ case 'JY_SEND_GOOD':
981
1015
  prv[next.uniqueKey] = [{
982
1016
  sendName: '',
983
1017
  sendId: ''
@@ -12,3 +12,9 @@ export declare const onBlurExpressLogisticsCode: ({ form, value, templateDetail,
12
12
  setKmLoading: (loading: boolean) => void;
13
13
  componentOnBlur: (value: any, type: string) => Promise<void>;
14
14
  }) => Promise<void>;
15
+ export declare const onBlurSkxOutboundNoticeNo: ({ form, value, templateDetail, componentOnBlur, }: {
16
+ form: FormInstance;
17
+ value: string;
18
+ templateDetail: any;
19
+ componentOnBlur: (value: any, type: string) => Promise<void>;
20
+ }) => Promise<void>;
@@ -3,8 +3,9 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
3
3
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
5
  import { orderBackKmVideoByLogisticsCode } from "../../../common/utils/orderBackKm";
6
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
6
+ import { isNull, skxSystemOrderBackValues } from '@kmkf-fe-packages/kmkf-utils';
7
7
  import { queryTidByOutSid } from "../../../model/servers/api";
8
+ import { skxUtils } from '@kmkf-fe-packages/basic-components';
8
9
  export var onBlurErpAfterSaleTradeId = /*#__PURE__*/function () {
9
10
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
10
11
  var _kmErpVideoComponent$;
@@ -134,4 +135,70 @@ export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
134
135
  return function onBlurExpressLogisticsCode(_x2) {
135
136
  return _ref4.apply(this, arguments);
136
137
  };
138
+ }();
139
+ export var onBlurSkxOutboundNoticeNo = /*#__PURE__*/function () {
140
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref5) {
141
+ var _data, _data2;
142
+ var form, value, templateDetail, componentOnBlur, data, tradeId, oldValue, blurPromise;
143
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
144
+ while (1) switch (_context3.prev = _context3.next) {
145
+ case 0:
146
+ form = _ref5.form, value = _ref5.value, templateDetail = _ref5.templateDetail, componentOnBlur = _ref5.componentOnBlur;
147
+ console.log('onBlurSkxOutboundNoticeNo', {
148
+ form: form,
149
+ value: value,
150
+ templateDetail: templateDetail
151
+ });
152
+ if (value) {
153
+ _context3.next = 4;
154
+ break;
155
+ }
156
+ return _context3.abrupt("return");
157
+ case 4:
158
+ _context3.prev = 4;
159
+ _context3.next = 7;
160
+ return skxUtils.getAllGoods({
161
+ onBillNo: value
162
+ });
163
+ case 7:
164
+ data = _context3.sent;
165
+ _context3.next = 13;
166
+ break;
167
+ case 10:
168
+ _context3.prev = 10;
169
+ _context3.t0 = _context3["catch"](4);
170
+ console.error(_context3.t0);
171
+ case 13:
172
+ console.log('skxUtils.getAllGoods', data);
173
+ tradeId = (_data = data) === null || _data === void 0 ? void 0 : _data.tid; // if (!tradeId) return;
174
+ oldValue = form.getFieldValue('78CADF2951');
175
+ form.setFieldsValue({
176
+ m3ap1EvEyd: tradeId
177
+ });
178
+ // 创建一个异步操作的Promise
179
+ blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
180
+ _context3.next = 20;
181
+ return blurPromise;
182
+ case 20:
183
+ // 所有异步操作完成后执行
184
+ console.log('[组件失焦事件]---set', oldValue);
185
+ form.setFieldsValue({
186
+ '78CADF2951': oldValue
187
+ });
188
+ skxSystemOrderBackValues({
189
+ templateList: templateDetail,
190
+ value: {
191
+ allOrders: ((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.orderDetailInfoList) || []
192
+ },
193
+ form: form
194
+ });
195
+ case 23:
196
+ case "end":
197
+ return _context3.stop();
198
+ }
199
+ }, _callee3, null, [[4, 10]]);
200
+ }));
201
+ return function onBlurSkxOutboundNoticeNo(_x3) {
202
+ return _ref6.apply(this, arguments);
203
+ };
137
204
  }();
@@ -16,6 +16,7 @@ interface NodeItem {
16
16
  visibleType?: string;
17
17
  nodeIsAuto: boolean;
18
18
  flowTemplateKey: string;
19
+ eventNodeType: string;
19
20
  }
20
21
  declare const NodeItem: (props: NodeItem) => React.JSX.Element;
21
22
  export default NodeItem;