@kmkf-fe-packages/kmkf-work-order-service-component 2.0.79-beta.8 → 2.0.79-beta.80
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.
- package/dist/esm/CustomerServiceToDoList/index.d.ts +3 -0
- package/dist/esm/CustomerServiceToDoList/index.js +156 -0
- package/dist/esm/CustomerServiceToDoList/index.module.less +134 -0
- package/dist/esm/FlowTemplateDetailV2/common.js +2 -1
- package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.js +10 -9
- package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +1 -1
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +44 -10
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.d.ts +6 -0
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.js +60 -1
- package/dist/esm/FlowTemplateDetailV2/components/Item/index.d.ts +1 -0
- package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +12 -11
- package/dist/esm/FlowTemplateDetailV2/constant.js +1 -1
- package/dist/esm/FlowTemplateDetailV2/index.js +14 -5
- package/dist/esm/FlowTemplateDetailV2/store/reducers.js +2 -1
- package/dist/esm/WorkOrder/components/CustomerServiceToDoCard/index.d.ts +3 -0
- package/dist/esm/WorkOrder/components/CustomerServiceToDoCard/index.js +74 -0
- package/dist/esm/WorkOrder/components/CustomerServiceToDoCard/index.module.less +19 -0
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentFormModal/index.js +22 -4
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +1 -1
- package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js +6 -0
- package/dist/esm/WorkOrder/components/WorkOrderList/index.d.ts +2 -1
- package/dist/esm/WorkOrder/components/WorkOrderList/index.js +15 -8
- package/dist/esm/WorkOrder/components/WorkOrderList/index.less +4 -3
- package/dist/esm/WorkOrder/index.js +14 -3
- package/dist/esm/common/constant.d.ts +5 -0
- package/dist/esm/common/constant.js +3 -2
- package/dist/esm/common/imgs/ai.png +0 -0
- package/dist/esm/common/imgs/notification.png +0 -0
- package/dist/esm/common/utils/constant.d.ts +8 -0
- package/dist/esm/common/utils/constant.js +43 -1
- package/dist/esm/common/utils/submitDataTransOldFormat.js +111 -71
- package/dist/esm/common/utils/tools.d.ts +1 -0
- package/dist/esm/common/utils/tools.js +152 -56
- package/dist/esm/common/utils/tools_constants.js +21 -2
- package/dist/esm/common/utils/transformWorkOrderData.js +99 -16
- package/dist/esm/common/utils/xzSDK.d.ts +2 -0
- package/dist/esm/common/utils/xzSDK.js +45 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/model/customizeWorkOrder/index.d.ts +1 -1
- package/dist/esm/model/customizeWorkOrder/index.js +17 -3
- package/dist/esm/model/customizeWorkOrder/types.d.ts +2 -0
- package/dist/esm/model/flowTemplateDetail/types.d.ts +1 -0
- package/dist/esm/model/logicFlow/selector.d.ts +3 -0
- package/dist/esm/model/paymentWorkOrder/selector.d.ts +9 -0
- package/dist/esm/model/servers/api.d.ts +3 -0
- package/dist/esm/model/servers/api.js +26 -0
- package/dist/esm/model/singleShopWorkOrder/selector.d.ts +5 -0
- package/package.json +5 -5
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
}, 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", {
|
|
130
|
+
className: styles.todoMeta
|
|
131
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
132
|
+
className: styles.timestamp
|
|
133
|
+
}, moment(item.created).format('YYYY-MM-DD HH:mm:ss')))), /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
className: styles.todoAction
|
|
135
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
136
|
+
className: styles.source
|
|
137
|
+
}, item.platformTypeName, "\u3010", item.shopName, "\u3011"), /*#__PURE__*/React.createElement(Tag, {
|
|
138
|
+
color: "blue",
|
|
139
|
+
className: styles.aiAction
|
|
140
|
+
}, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[item.flowStatus]))), /*#__PURE__*/React.createElement(Button, {
|
|
141
|
+
type: "primary",
|
|
142
|
+
size: "small",
|
|
143
|
+
ghost: true,
|
|
144
|
+
onClick: function onClick() {
|
|
145
|
+
return handleProcess(item);
|
|
146
|
+
}
|
|
147
|
+
}, "\u53BB\u5904\u7406"))));
|
|
148
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: styles.todoEmpty
|
|
150
|
+
}, /*#__PURE__*/React.createElement(Empty, {
|
|
151
|
+
description: "\u6682\u65E0\u6570\u636E"
|
|
152
|
+
})), noMore && data !== null && data !== void 0 && (_data$list = data.list) !== null && _data$list !== void 0 && _data$list.length ? /*#__PURE__*/React.createElement("p", {
|
|
153
|
+
className: styles.todoNoMore
|
|
154
|
+
}, "\u6CA1\u6709\u66F4\u591A\u6570\u636E\u4E86") : null)));
|
|
155
|
+
};
|
|
156
|
+
export default CustomerServiceToDoList;
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
display: -webkit-box;
|
|
64
|
+
-webkit-box-orient: vertical;
|
|
65
|
+
-webkit-line-clamp: 2;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
white-space: normal;
|
|
69
|
+
height: 48px;
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
font-weight: 500;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.todoMeta {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: 12px;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
|
|
80
|
+
.timestamp {
|
|
81
|
+
font-size: 12px;
|
|
82
|
+
color: #999;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.source {
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
color: #666;
|
|
88
|
+
background: #f5f5f5;
|
|
89
|
+
padding: 2px 6px;
|
|
90
|
+
border-radius: 3px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.aiAction {
|
|
94
|
+
font-size: 11px;
|
|
95
|
+
margin: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
.todoEmpty {
|
|
102
|
+
display: flex;
|
|
103
|
+
justify-content: center;
|
|
104
|
+
align-items: center;
|
|
105
|
+
height: 100%;
|
|
106
|
+
}
|
|
107
|
+
.todoNoMore {
|
|
108
|
+
display: flex;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
align-items: center;
|
|
111
|
+
height: 32px;
|
|
112
|
+
color: #999;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// 响应式设计
|
|
119
|
+
@media (max-width: 768px) {
|
|
120
|
+
.filterOptions {
|
|
121
|
+
gap: 8px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.todoContent {
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
gap: 12px;
|
|
127
|
+
|
|
128
|
+
.todoAction {
|
|
129
|
+
width: 100%;
|
|
130
|
+
display: flex;
|
|
131
|
+
justify-content: space-between;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -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
|
-
|
|
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
|
-
}),
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
};
|
|
@@ -277,7 +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'].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : _currentNodeDetail$fl.eventType);
|
|
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);
|
|
281
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;
|
|
282
282
|
// TODO: 决策节点给后端修复数据加了一个入口
|
|
283
283
|
// @ts-ignore
|
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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 =
|
|
931
|
+
_context5.next = 27;
|
|
901
932
|
return Promise.all(promises);
|
|
902
|
-
case
|
|
933
|
+
case 27:
|
|
903
934
|
return _context5.abrupt("return", Promise.resolve());
|
|
904
|
-
case
|
|
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>;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
2
7
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
8
|
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
9
|
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
10
|
import { orderBackKmVideoByLogisticsCode } from "../../../common/utils/orderBackKm";
|
|
6
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
|
+
import { isNull, skxSystemOrderBackValues } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
12
|
import { queryTidByOutSid } from "../../../model/servers/api";
|
|
13
|
+
import { skxUtils } from '@kmkf-fe-packages/basic-components';
|
|
8
14
|
export var onBlurErpAfterSaleTradeId = /*#__PURE__*/function () {
|
|
9
15
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
10
16
|
var _kmErpVideoComponent$;
|
|
@@ -134,4 +140,57 @@ export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
|
|
|
134
140
|
return function onBlurExpressLogisticsCode(_x2) {
|
|
135
141
|
return _ref4.apply(this, arguments);
|
|
136
142
|
};
|
|
143
|
+
}();
|
|
144
|
+
export var onBlurSkxOutboundNoticeNo = /*#__PURE__*/function () {
|
|
145
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref5) {
|
|
146
|
+
var form, value, templateDetail, componentOnBlur, data, tradeId, blurPromise, values;
|
|
147
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
148
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
149
|
+
case 0:
|
|
150
|
+
form = _ref5.form, value = _ref5.value, templateDetail = _ref5.templateDetail, componentOnBlur = _ref5.componentOnBlur;
|
|
151
|
+
console.log('onBlurSkxOutboundNoticeNo', {
|
|
152
|
+
form: form,
|
|
153
|
+
value: value,
|
|
154
|
+
templateDetail: templateDetail
|
|
155
|
+
});
|
|
156
|
+
if (value) {
|
|
157
|
+
_context3.next = 4;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
return _context3.abrupt("return");
|
|
161
|
+
case 4:
|
|
162
|
+
_context3.next = 6;
|
|
163
|
+
return skxUtils.getAllGoods({
|
|
164
|
+
onBillNo: value
|
|
165
|
+
});
|
|
166
|
+
case 6:
|
|
167
|
+
data = _context3.sent;
|
|
168
|
+
console.log('skxUtils.getAllGoods', data);
|
|
169
|
+
tradeId = data === null || data === void 0 ? void 0 : data.tid; // 创建一个异步操作的Promise
|
|
170
|
+
blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
|
|
171
|
+
_context3.next = 12;
|
|
172
|
+
return blurPromise;
|
|
173
|
+
case 12:
|
|
174
|
+
// 所有异步操作完成后执行
|
|
175
|
+
values = skxSystemOrderBackValues({
|
|
176
|
+
templateList: templateDetail,
|
|
177
|
+
value: {
|
|
178
|
+
allOrders: (data === null || data === void 0 ? void 0 : data.orderDetailInfoList) || []
|
|
179
|
+
},
|
|
180
|
+
form: form,
|
|
181
|
+
isReverseFilling: false
|
|
182
|
+
});
|
|
183
|
+
form.setFieldsValue(_objectSpread(_objectSpread({}, values || {}), {}, {
|
|
184
|
+
m3ap1EvEyd: tradeId,
|
|
185
|
+
'78CADF2951': value
|
|
186
|
+
}));
|
|
187
|
+
case 14:
|
|
188
|
+
case "end":
|
|
189
|
+
return _context3.stop();
|
|
190
|
+
}
|
|
191
|
+
}, _callee3);
|
|
192
|
+
}));
|
|
193
|
+
return function onBlurSkxOutboundNoticeNo(_x3) {
|
|
194
|
+
return _ref6.apply(this, arguments);
|
|
195
|
+
};
|
|
137
196
|
}();
|