@kmkf-fe-packages/kmkf-work-order-service-component 2.0.79-beta.2 → 2.0.79-beta.20

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 (31) hide show
  1. package/dist/esm/FlowTemplateDetailV2/common.d.ts +0 -1
  2. package/dist/esm/FlowTemplateDetailV2/common.js +0 -9
  3. package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.d.ts +4 -0
  4. package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.js +35 -0
  5. package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +7 -20
  6. package/dist/esm/FlowTemplateDetailV2/components/Item/index.d.ts +1 -0
  7. package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +16 -29
  8. package/dist/esm/FlowTemplateDetailV2/index.js +9 -7
  9. package/dist/esm/FlowTemplateDetailV2/store/reducers.js +2 -1
  10. package/dist/esm/FlowTemplateDetailV2/store/selector.d.ts +2 -0
  11. package/dist/esm/FormRender/index.js +11 -19
  12. package/dist/esm/FormRenderTemplateId/index.js +11 -19
  13. package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.js +11 -18
  14. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentFormModal/index.js +17 -1
  15. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +1 -1
  16. package/dist/esm/WorkOrder/components/WorkOrderList/index.d.ts +2 -1
  17. package/dist/esm/WorkOrder/components/WorkOrderList/index.js +8 -6
  18. package/dist/esm/WorkOrder/index.js +26 -28
  19. package/dist/esm/WorkOrder/types.d.ts +1 -0
  20. package/dist/esm/WorkOrder/types.js +1 -0
  21. package/dist/esm/common/utils/constant.d.ts +1 -0
  22. package/dist/esm/common/utils/constant.js +10 -0
  23. package/dist/esm/common/utils/tools.d.ts +0 -1
  24. package/dist/esm/common/utils/tools.js +27 -21
  25. package/dist/esm/common/utils/transformWorkOrderData.js +17 -7
  26. package/dist/esm/model/flowTemplateDetail/types.d.ts +5 -0
  27. package/dist/esm/model/flowTemplateDetail/types.js +1 -0
  28. package/dist/esm/model/logicFlow/selector.d.ts +0 -3
  29. package/dist/esm/model/paymentWorkOrder/selector.d.ts +0 -9
  30. package/dist/esm/model/singleShopWorkOrder/selector.d.ts +0 -5
  31. package/package.json +5 -5
@@ -3,7 +3,6 @@ export declare const getTag: (item: {
3
3
  nodeType: string;
4
4
  nodeIsAuto: boolean;
5
5
  }) => string;
6
- export declare const platformMap: any;
7
6
  export declare const getFlowOperate: any;
8
7
  export declare const FLOW_STATUS_V2: {
9
8
  WAIT_COMMIT: string;
@@ -10,15 +10,6 @@ export var getTag = function getTag(item) {
10
10
 
11
11
  return tag;
12
12
  };
13
- export var platformMap = {
14
- tb: '淘宝',
15
- fxg: '抖音',
16
- ks: '快手',
17
- pdd: '拼多多',
18
- jd: '京东',
19
- xiaozhi: '小智',
20
- pc: '客服工作台'
21
- };
22
13
  export var getFlowOperate = {
23
14
  SAVE: '暂存',
24
15
  SUBMIT: '提交',
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const AutoTaskDetail: ({ flowEventData }: {
3
+ flowEventData: any;
4
+ }) => React.JSX.Element;
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { isNumber } from 'lodash';
3
+ import { Divider } from 'antd';
4
+ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
5
+ var flowEventData = _ref.flowEventData;
6
+ var mapping = {
7
+ 0: '执行中',
8
+ 1: '部分成功',
9
+ 2: '全部成功',
10
+ 3: '部分失败',
11
+ 4: '全部失败',
12
+ 5: '同时存在成功和失败且尚未完结',
13
+ 6: '同时存在成功和失败且已完结',
14
+ 7: '等待业务执行'
15
+ };
16
+ var eventStatus = flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventStatus;
17
+ var renderRules = function renderRules() {
18
+ var _flowEventData$eventD, _flowEventData$eventD2;
19
+ return /*#__PURE__*/React.createElement("div", null, flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD = flowEventData.eventData) === null || _flowEventData$eventD === void 0 ? void 0 : (_flowEventData$eventD2 = _flowEventData$eventD.businessStatus) === null || _flowEventData$eventD2 === void 0 ? void 0 : _flowEventData$eventD2.map(function (item) {
20
+ var _flowEventData$eventD3, _flowEventData$eventD4, _flowEventData$eventD5, _result$passCondition;
21
+ var result = flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD3 = flowEventData.eventData) === null || _flowEventData$eventD3 === void 0 ? void 0 : (_flowEventData$eventD4 = _flowEventData$eventD3.otherBusinessData) === null || _flowEventData$eventD4 === void 0 ? void 0 : (_flowEventData$eventD5 = _flowEventData$eventD4.ruleDomainList) === null || _flowEventData$eventD5 === void 0 ? void 0 : _flowEventData$eventD5.find(function (k) {
22
+ return k.businessKey === item.businessKey;
23
+ });
24
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Divider, {
25
+ dashed: true
26
+ }), 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, item.businessStatusDesc && "\u89C4\u5219\u72B6\u6001: ".concat(item.businessStatusDesc)), /*#__PURE__*/React.createElement("p", null, (_result$passCondition = result.passConditionList) === null || _result$passCondition === void 0 ? void 0 : _result$passCondition.map(function (condition) {
27
+ return /*#__PURE__*/React.createElement("p", null, condition);
28
+ }))), /*#__PURE__*/React.createElement("p", null, item.remark));
29
+ }));
30
+ };
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());
35
+ };
@@ -34,12 +34,13 @@ import { selectCurrentNodeDetail, selectTid, selectPlatInfo, selectFlowStatus, s
34
34
  import { fetchCurrentTradeIdLinkWorkOrder, fetchPanelInfo } from "../../store/reducers";
35
35
  import { useSelector } from "../../context/useSelector";
36
36
  import { Context } from "../../context";
37
+ import { AutoTaskDetail } from "../AutoTaskDetail";
37
38
  var formProps = {
38
39
  className: 'customizeFormModalClassName',
39
40
  layout: 'vertical'
40
41
  };
41
42
  var CurrentNode = function CurrentNode(props, ref) {
42
- 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;
43
44
  var formRenderRef = useRef(null);
44
45
  useImperativeHandle(ref, function () {
45
46
  return {
@@ -274,25 +275,9 @@ var CurrentNode = function CurrentNode(props, ref) {
274
275
  return _ref2.apply(this, arguments);
275
276
  };
276
277
  }();
277
- var renderFail = function renderFail() {
278
- var _currentNodeDetail$fl, _currentNodeDetail$fl2, _currentNodeDetail$fl3, _currentNodeDetail$fl4;
279
- return currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : (_currentNodeDetail$fl2 = _currentNodeDetail$fl.eventData) === null || _currentNodeDetail$fl2 === void 0 ? void 0 : (_currentNodeDetail$fl3 = _currentNodeDetail$fl2.businessStatus) === null || _currentNodeDetail$fl3 === void 0 ? void 0 : (_currentNodeDetail$fl4 = _currentNodeDetail$fl3[0]) === null || _currentNodeDetail$fl4 === void 0 ? void 0 : _currentNodeDetail$fl4.remark;
280
- };
281
- var renderSuccess = function renderSuccess() {
282
- var _currentNodeDetail$fl5, _currentNodeDetail$fl6, _currentNodeDetail$fl7, _currentNodeDetail$fl8;
283
- return /*#__PURE__*/React.createElement("div", null, currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl5 = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl5 === void 0 ? void 0 : (_currentNodeDetail$fl6 = _currentNodeDetail$fl5.eventData) === null || _currentNodeDetail$fl6 === void 0 ? void 0 : (_currentNodeDetail$fl7 = _currentNodeDetail$fl6.otherBusinessData) === null || _currentNodeDetail$fl7 === void 0 ? void 0 : (_currentNodeDetail$fl8 = _currentNodeDetail$fl7.ruleDomainList) === null || _currentNodeDetail$fl8 === void 0 ? void 0 : _currentNodeDetail$fl8.map(function (item) {
284
- var _item$passConditionLi;
285
- return /*#__PURE__*/React.createElement("div", null, item.ruleName && /*#__PURE__*/React.createElement("p", null, "\u547D\u4E2D\u89C4\u5219\u540D\u79F0: ", item.ruleName), /*#__PURE__*/React.createElement("p", null, (_item$passConditionLi = item.passConditionList) === null || _item$passConditionLi === void 0 ? void 0 : _item$passConditionLi.map(function (item) {
286
- return /*#__PURE__*/React.createElement("p", null, item);
287
- })));
288
- }));
289
- };
290
- var renderAutoNodeDetail = function renderAutoNodeDetail() {
291
- var _currentNodeDetail$fl9, _currentNodeDetail$fl10, _currentNodeDetail$fl11, _currentNodeDetail$fl12, _currentNodeDetail$fl13, _currentNodeDetail$fl14, _currentNodeDetail$fl15, _currentNodeDetail$fl16, _currentNodeDetail$fl17, _currentNodeDetail$fl18, _currentNodeDetail$fl19, _currentNodeDetail$fl20;
292
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl9 = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl9 === void 0 ? void 0 : (_currentNodeDetail$fl10 = _currentNodeDetail$fl9.eventData) === null || _currentNodeDetail$fl10 === void 0 ? void 0 : (_currentNodeDetail$fl11 = _currentNodeDetail$fl10.businessStatus) === null || _currentNodeDetail$fl11 === void 0 ? void 0 : (_currentNodeDetail$fl12 = _currentNodeDetail$fl11[0]) === null || _currentNodeDetail$fl12 === void 0 ? void 0 : _currentNodeDetail$fl12.businessStatusDesc) && "\u6267\u884C\u72B6\u6001: ".concat(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl13 = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl13 === void 0 ? void 0 : (_currentNodeDetail$fl14 = _currentNodeDetail$fl13.eventData) === null || _currentNodeDetail$fl14 === void 0 ? void 0 : (_currentNodeDetail$fl15 = _currentNodeDetail$fl14.businessStatus) === null || _currentNodeDetail$fl15 === void 0 ? void 0 : (_currentNodeDetail$fl16 = _currentNodeDetail$fl15[0]) === null || _currentNodeDetail$fl16 === void 0 ? void 0 : _currentNodeDetail$fl16.businessStatusDesc)), [1, 2].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl17 = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl17 === void 0 ? void 0 : (_currentNodeDetail$fl18 = _currentNodeDetail$fl17.eventData) === null || _currentNodeDetail$fl18 === void 0 ? void 0 : (_currentNodeDetail$fl19 = _currentNodeDetail$fl18.businessStatus) === null || _currentNodeDetail$fl19 === void 0 ? void 0 : (_currentNodeDetail$fl20 = _currentNodeDetail$fl19[0]) === null || _currentNodeDetail$fl20 === void 0 ? void 0 : _currentNodeDetail$fl20.businessStatus) ? renderSuccess() : renderFail());
293
- };
294
278
  var isArtificialNode = tag === 'artificial';
295
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);
296
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;
297
282
  // TODO: 决策节点给后端修复数据加了一个入口
298
283
  // @ts-ignore
@@ -328,7 +313,7 @@ var CurrentNode = function CurrentNode(props, ref) {
328
313
  onOpenWangWang: onOpenWangWang
329
314
  }) : /*#__PURE__*/React.createElement(FormRender, {
330
315
  ref: formRenderRef,
331
- isShowShopList: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.nodeType) && PlatForm.PC === plat.platform,
316
+ isShowShopList: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.nodeType) && [PlatForm.PC, PlatForm.WEB].includes(plat.platform),
332
317
  plat: plat,
333
318
  templateDetail: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
334
319
  shopList: shopList,
@@ -347,6 +332,8 @@ var CurrentNode = function CurrentNode(props, ref) {
347
332
  flowAllShowHideRules: allShowHideRules,
348
333
  firstOrderBackfill: flowStatus !== FlowStatus.COMPLETED,
349
334
  autoSubmit: autoSubmit
350
- })), isAutoNode && renderAutoNodeDetail()));
335
+ })), isShowAutoNodeDetail && /*#__PURE__*/React.createElement(AutoTaskDetail, {
336
+ flowEventData: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.flowEventData
337
+ })));
351
338
  };
352
339
  export default /*#__PURE__*/forwardRef(CurrentNode);
@@ -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;
@@ -32,8 +32,9 @@ import { PlatForm } from "../../../WorkOrder/types";
32
32
  import { currentUserHasOperatorAuth } from "../../common";
33
33
  import { useSelector } from "../../context/useSelector";
34
34
  import { Context } from "../../context";
35
+ import { AutoTaskDetail } from "../AutoTaskDetail";
35
36
  var NodeItem = function NodeItem(props) {
36
- var _data$data15, _data$data16, _data$data16$workOrde, _data$data17, _data$data17$workOrde, _data$data18, _data$data18$nodeInfo, _data$data19, _data$data20, _data$data20$nodeInfo, _data$data21, _data$data22, _data$data23, _data$data23$workOrde, _data$data24;
37
+ var _data$data10, _data$data11, _data$data11$workOrde, _data$data12, _data$data12$workOrde, _data$data13, _data$data13$nodeInfo, _data$data14, _data$data15, _data$data15$nodeInfo, _data$data16, _data$data17, _data$data18, _data$data18$workOrde, _data$data19, _data$data20;
37
38
  var tag = props.tag,
38
39
  nodeId = props.nodeId,
39
40
  nodeName = props.nodeName,
@@ -52,7 +53,8 @@ var NodeItem = function NodeItem(props) {
52
53
  visibleType = _props$visibleType === void 0 ? '' : _props$visibleType,
53
54
  nodeIsAuto = props.nodeIsAuto,
54
55
  flowTemplateKey = props.flowTemplateKey,
55
- onJumpPage = props.onJumpPage;
56
+ onJumpPage = props.onJumpPage,
57
+ eventNodeType = props.eventNodeType;
56
58
  var _useContext = useContext(Context),
57
59
  dispatch = _useContext.dispatch;
58
60
  var plat = useSelector(selectPlatInfo);
@@ -238,7 +240,7 @@ var NodeItem = function NodeItem(props) {
238
240
  isAllStaff: data === null || data === void 0 ? void 0 : (_data$data9 = data.data) === null || _data$data9 === void 0 ? void 0 : (_data$data9$nodeInfo = _data$data9.nodeInfo) === null || _data$data9$nodeInfo === void 0 ? void 0 : (_data$data9$nodeInfo$ = _data$data9$nodeInfo.assistants) === null || _data$data9$nodeInfo$ === void 0 ? void 0 : _data$data9$nodeInfo$.isAllStaff
239
241
  });
240
242
  }, [data, plat.userKey, assistantMap]);
241
-
243
+ 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(eventNodeType);
242
244
  // 人工节点+打开状态+当前工单提交人是当前完成人+状态是待处理
243
245
  var showEdit = isArtificialNode && open && isCurrentNodeHandler && !readonly && [FlowStatus.PROCESSING, FlowStatus.COMPLETED].includes(flowStatus);
244
246
 
@@ -256,31 +258,14 @@ var NodeItem = function NodeItem(props) {
256
258
  // }
257
259
  // };
258
260
 
259
- var renderFail = function renderFail() {
260
- var _data$data10, _data$data10$flowEven, _data$data10$flowEven2, _data$data10$flowEven3, _data$data10$flowEven4;
261
- return data === null || data === void 0 ? void 0 : (_data$data10 = data.data) === null || _data$data10 === void 0 ? void 0 : (_data$data10$flowEven = _data$data10.flowEventData) === null || _data$data10$flowEven === void 0 ? void 0 : (_data$data10$flowEven2 = _data$data10$flowEven.eventData) === null || _data$data10$flowEven2 === void 0 ? void 0 : (_data$data10$flowEven3 = _data$data10$flowEven2.businessStatus) === null || _data$data10$flowEven3 === void 0 ? void 0 : (_data$data10$flowEven4 = _data$data10$flowEven3[0]) === null || _data$data10$flowEven4 === void 0 ? void 0 : _data$data10$flowEven4.remark;
262
- };
263
- var renderSuccess = function renderSuccess() {
264
- var _data$data11, _data$data11$flowEven, _data$data11$flowEven2, _data$data11$flowEven3, _data$data11$flowEven4;
265
- return /*#__PURE__*/React.createElement("div", null, data === null || data === void 0 ? void 0 : (_data$data11 = data.data) === null || _data$data11 === void 0 ? void 0 : (_data$data11$flowEven = _data$data11.flowEventData) === null || _data$data11$flowEven === void 0 ? void 0 : (_data$data11$flowEven2 = _data$data11$flowEven.eventData) === null || _data$data11$flowEven2 === void 0 ? void 0 : (_data$data11$flowEven3 = _data$data11$flowEven2.otherBusinessData) === null || _data$data11$flowEven3 === void 0 ? void 0 : (_data$data11$flowEven4 = _data$data11$flowEven3.ruleDomainList) === null || _data$data11$flowEven4 === void 0 ? void 0 : _data$data11$flowEven4.map(function (item) {
266
- var _item$passConditionLi;
267
- return /*#__PURE__*/React.createElement("div", null, item.ruleName && /*#__PURE__*/React.createElement("p", null, "\u547D\u4E2D\u89C4\u5219\u540D\u79F0: ", item.ruleName), /*#__PURE__*/React.createElement("p", null, (_item$passConditionLi = item.passConditionList) === null || _item$passConditionLi === void 0 ? void 0 : _item$passConditionLi.map(function (item) {
268
- return /*#__PURE__*/React.createElement("p", null, item);
269
- })));
270
- }));
271
- };
272
- var renderAutoNodeDetail = function renderAutoNodeDetail() {
273
- var _data$data12, _data$data12$flowEven, _data$data12$flowEven2, _data$data12$flowEven3, _data$data12$flowEven4, _data$data13, _data$data13$flowEven, _data$data13$flowEven2, _data$data13$flowEven3, _data$data13$flowEven4, _data$data14, _data$data14$flowEven, _data$data14$flowEven2, _data$data14$flowEven3, _data$data14$flowEven4;
274
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, (data === null || data === void 0 ? void 0 : (_data$data12 = data.data) === null || _data$data12 === void 0 ? void 0 : (_data$data12$flowEven = _data$data12.flowEventData) === null || _data$data12$flowEven === void 0 ? void 0 : (_data$data12$flowEven2 = _data$data12$flowEven.eventData) === null || _data$data12$flowEven2 === void 0 ? void 0 : (_data$data12$flowEven3 = _data$data12$flowEven2.businessStatus) === null || _data$data12$flowEven3 === void 0 ? void 0 : (_data$data12$flowEven4 = _data$data12$flowEven3[0]) === null || _data$data12$flowEven4 === void 0 ? void 0 : _data$data12$flowEven4.businessStatusDesc) && "\u6267\u884C\u72B6\u6001: ".concat(data === null || data === void 0 ? void 0 : (_data$data13 = data.data) === null || _data$data13 === void 0 ? void 0 : (_data$data13$flowEven = _data$data13.flowEventData) === null || _data$data13$flowEven === void 0 ? void 0 : (_data$data13$flowEven2 = _data$data13$flowEven.eventData) === null || _data$data13$flowEven2 === void 0 ? void 0 : (_data$data13$flowEven3 = _data$data13$flowEven2.businessStatus) === null || _data$data13$flowEven3 === void 0 ? void 0 : (_data$data13$flowEven4 = _data$data13$flowEven3[0]) === null || _data$data13$flowEven4 === void 0 ? void 0 : _data$data13$flowEven4.businessStatusDesc)), [1, 2].includes(data === null || data === void 0 ? void 0 : (_data$data14 = data.data) === null || _data$data14 === void 0 ? void 0 : (_data$data14$flowEven = _data$data14.flowEventData) === null || _data$data14$flowEven === void 0 ? void 0 : (_data$data14$flowEven2 = _data$data14$flowEven.eventData) === null || _data$data14$flowEven2 === void 0 ? void 0 : (_data$data14$flowEven3 = _data$data14$flowEven2.businessStatus) === null || _data$data14$flowEven3 === void 0 ? void 0 : (_data$data14$flowEven4 = _data$data14$flowEven3[0]) === null || _data$data14$flowEven4 === void 0 ? void 0 : _data$data14$flowEven4.businessStatus) ? renderSuccess() : renderFail());
275
- };
276
- var _calcWorkOrderList = calcWorkOrderList([(data === null || data === void 0 ? void 0 : (_data$data15 = data.data) === null || _data$data15 === void 0 ? void 0 : _data$data15.workOrder) || {}], [].concat(_toConsumableArray((data === null || data === void 0 ? void 0 : (_data$data16 = data.data) === null || _data$data16 === void 0 ? void 0 : (_data$data16$workOrde = _data$data16.workOrderTemplateInfo) === null || _data$data16$workOrde === void 0 ? void 0 : _data$data16$workOrde.preNodeComponentDtoList) || []), _toConsumableArray((data === null || data === void 0 ? void 0 : (_data$data17 = data.data) === null || _data$data17 === void 0 ? void 0 : (_data$data17$workOrde = _data$data17.workOrderTemplateInfo) === null || _data$data17$workOrde === void 0 ? void 0 : _data$data17$workOrde.componentDtoList) || []))),
261
+ var _calcWorkOrderList = calcWorkOrderList([(data === null || data === void 0 ? void 0 : (_data$data10 = data.data) === null || _data$data10 === void 0 ? void 0 : _data$data10.workOrder) || {}], [].concat(_toConsumableArray((data === null || data === void 0 ? void 0 : (_data$data11 = data.data) === null || _data$data11 === void 0 ? void 0 : (_data$data11$workOrde = _data$data11.workOrderTemplateInfo) === null || _data$data11$workOrde === void 0 ? void 0 : _data$data11$workOrde.preNodeComponentDtoList) || []), _toConsumableArray((data === null || data === void 0 ? void 0 : (_data$data12 = data.data) === null || _data$data12 === void 0 ? void 0 : (_data$data12$workOrde = _data$data12.workOrderTemplateInfo) === null || _data$data12$workOrde === void 0 ? void 0 : _data$data12$workOrde.componentDtoList) || []))),
277
262
  _calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
278
263
  transData = _calcWorkOrderList2[0];
279
264
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, {
280
265
  tag: tag,
281
266
  nodeName: nodeName,
282
267
  editing: editing,
283
- showLook: isArtificialNode || isAutoNode,
268
+ showLook: isArtificialNode || isShowAutoNodeDetail,
284
269
  showEdit: showEdit,
285
270
  opening: open,
286
271
  handleLook: handleOpen,
@@ -301,18 +286,18 @@ var NodeItem = function NodeItem(props) {
301
286
  display: open ? 'block' : 'none',
302
287
  marginTop: '16px'
303
288
  }
304
- }, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(data === null || data === void 0 ? void 0 : (_data$data18 = data.data) === null || _data$data18 === void 0 ? void 0 : (_data$data18$nodeInfo = _data$data18.nodeInfo) === null || _data$data18$nodeInfo === void 0 ? void 0 : _data$data18$nodeInfo.nodeType) && (data === null || data === void 0 ? void 0 : (_data$data19 = data.data) === null || _data$data19 === void 0 ? void 0 : _data$data19.workOrderTemplateInfo) && /*#__PURE__*/React.createElement("div", null, editing ? /*#__PURE__*/React.createElement(FormRender, {
305
- isShowShopList: NodeType.START_NODE === (data === null || data === void 0 ? void 0 : (_data$data20 = data.data) === null || _data$data20 === void 0 ? void 0 : (_data$data20$nodeInfo = _data$data20.nodeInfo) === null || _data$data20$nodeInfo === void 0 ? void 0 : _data$data20$nodeInfo.nodeType) && PlatForm.PC === plat.platform,
289
+ }, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(data === null || data === void 0 ? void 0 : (_data$data13 = data.data) === null || _data$data13 === void 0 ? void 0 : (_data$data13$nodeInfo = _data$data13.nodeInfo) === null || _data$data13$nodeInfo === void 0 ? void 0 : _data$data13$nodeInfo.nodeType) && (data === null || data === void 0 ? void 0 : (_data$data14 = data.data) === null || _data$data14 === void 0 ? void 0 : _data$data14.workOrderTemplateInfo) && /*#__PURE__*/React.createElement("div", null, editing ? /*#__PURE__*/React.createElement(FormRender, {
290
+ isShowShopList: NodeType.START_NODE === (data === null || data === void 0 ? void 0 : (_data$data15 = data.data) === null || _data$data15 === void 0 ? void 0 : (_data$data15$nodeInfo = _data$data15.nodeInfo) === null || _data$data15$nodeInfo === void 0 ? void 0 : _data$data15$nodeInfo.nodeType) && [PlatForm.PC, PlatForm.WEB].includes(plat.platform),
306
291
  plat: plat,
307
- templateDetail: data === null || data === void 0 ? void 0 : (_data$data21 = data.data) === null || _data$data21 === void 0 ? void 0 : _data$data21.workOrderTemplateInfo,
292
+ templateDetail: data === null || data === void 0 ? void 0 : (_data$data16 = data.data) === null || _data$data16 === void 0 ? void 0 : _data$data16.workOrderTemplateInfo,
308
293
  shopList: shopList,
309
- record: data === null || data === void 0 ? void 0 : (_data$data22 = data.data) === null || _data$data22 === void 0 ? void 0 : _data$data22.workOrder,
294
+ record: data === null || data === void 0 ? void 0 : (_data$data17 = data.data) === null || _data$data17 === void 0 ? void 0 : _data$data17.workOrder,
310
295
  accountName: plat.accountName,
311
296
  form: form,
312
297
  onOpenWangWang: onOpenWangWang,
313
298
  onJumpPage: onJumpPage,
314
299
  look: !editing || flowStatus === FlowStatus.STOPPING,
315
- shopId: data === null || data === void 0 ? void 0 : (_data$data23 = data.data) === null || _data$data23 === void 0 ? void 0 : (_data$data23$workOrde = _data$data23.workOrder) === null || _data$data23$workOrde === void 0 ? void 0 : _data$data23$workOrde.shopId,
300
+ shopId: data === null || data === void 0 ? void 0 : (_data$data18 = data.data) === null || _data$data18 === void 0 ? void 0 : (_data$data18$workOrde = _data$data18.workOrder) === null || _data$data18$workOrde === void 0 ? void 0 : _data$data18$workOrde.shopId,
316
301
  formProps: {
317
302
  className: 'customizeFormModalClassName',
318
303
  layout: 'vertical'
@@ -322,10 +307,12 @@ var NodeItem = function NodeItem(props) {
322
307
  firstOrderBackfill: false // TODO: 前面节点必然是已完成状态,已完成状态不再调用订单反填
323
308
  // handleChangeTradeId={handleChangeTradeId}
324
309
  }) : /*#__PURE__*/React.createElement(RenderDetail, {
325
- workOrderTemplateInfo: data === null || data === void 0 ? void 0 : (_data$data24 = data.data) === null || _data$data24 === void 0 ? void 0 : _data$data24.workOrderTemplateInfo,
310
+ workOrderTemplateInfo: data === null || data === void 0 ? void 0 : (_data$data19 = data.data) === null || _data$data19 === void 0 ? void 0 : _data$data19.workOrderTemplateInfo,
326
311
  transData: transData,
327
312
  platform: plat.platform,
328
313
  onOpenWangWang: onOpenWangWang
329
- })), isAutoNode && renderAutoNodeDetail()));
314
+ })), isShowAutoNodeDetail && /*#__PURE__*/React.createElement(AutoTaskDetail, {
315
+ flowEventData: data === null || data === void 0 ? void 0 : (_data$data20 = data.data) === null || _data$data20 === void 0 ? void 0 : _data$data20.flowEventData
316
+ })));
330
317
  };
331
318
  export default NodeItem;
@@ -56,6 +56,7 @@ import { Provide, Context } from "./context";
56
56
  import { useSelector } from "./context/useSelector";
57
57
  import { pollOperationResult } from "./pollOperationResult";
58
58
  import { pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
59
+ import { PlatForm } from "../WorkOrder/types";
59
60
  var Text = Typography.Text,
60
61
  Link = Typography.Link;
61
62
  var FlowTemplateDetail = function FlowTemplateDetail(props) {
@@ -1077,7 +1078,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1077
1078
  var shopId = details.shopId,
1078
1079
  ohter = _objectWithoutProperties(details, _excluded);
1079
1080
  var formData = form.getFieldsValue();
1080
- var params = plat.platform === 'pc' ? _objectSpread(_objectSpread({}, formData), details) : _objectSpread(_objectSpread({}, formData), ohter);
1081
+ var params = [PlatForm.PC, PlatForm.WEB].includes(plat.platform) ? _objectSpread(_objectSpread({}, formData), details) : _objectSpread(_objectSpread({}, formData), ohter);
1081
1082
  form.setFieldsValue(params);
1082
1083
  message.success('填充成功');
1083
1084
  // 填充表单后触发映射
@@ -1204,7 +1205,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1204
1205
  var _operateParams$maxPub2, _operateParams$maxPub3;
1205
1206
  return /*#__PURE__*/React.createElement(Text, {
1206
1207
  type: "secondary"
1207
- }, /*#__PURE__*/React.createElement(InfoCircleOutlined, null), "\u5F53\u524D\u5DE5\u5355\u6240\u5C5E\u6D41\u7A0B", plat.platform === 'pc' ? /*#__PURE__*/React.createElement(Link, {
1208
+ }, /*#__PURE__*/React.createElement(InfoCircleOutlined, null), "\u5F53\u524D\u5DE5\u5355\u6240\u5C5E\u6D41\u7A0B", plat.platform === PlatForm.PC ? /*#__PURE__*/React.createElement(Link, {
1208
1209
  style: {
1209
1210
  cursor: 'pointer'
1210
1211
  },
@@ -1214,7 +1215,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1214
1215
  flowTemplateId: flowTemplateId
1215
1216
  });
1216
1217
  }
1217
- }, "v", operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowVersion, "\u7248") : "v".concat(operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowVersion, "\u7248"), "\uFF0C\u76EE\u524D\u6700\u65B0\u6D41\u7A0B", plat.platform === 'pc' ? /*#__PURE__*/React.createElement(Link, {
1218
+ }, "v", operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowVersion, "\u7248") : "v".concat(operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowVersion, "\u7248"), "\uFF0C\u76EE\u524D\u6700\u65B0\u6D41\u7A0B", plat.platform === PlatForm.PC ? /*#__PURE__*/React.createElement(Link, {
1218
1219
  style: {
1219
1220
  cursor: 'pointer'
1220
1221
  },
@@ -1237,7 +1238,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1237
1238
  spinning: loading || orderBackLoading || orderBackKmLoading
1238
1239
  }, /*#__PURE__*/React.createElement("div", {
1239
1240
  className: "flowWorkOrderDetail"
1240
- }, flowWorkOrderId && /*#__PURE__*/React.createElement("div", null, plat.platform === 'pc' && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(PlatformAvatar, {
1241
+ }, flowWorkOrderId && /*#__PURE__*/React.createElement("div", null, [PlatForm.PC, PlatForm.WEB].includes(plat.platform) && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(PlatformAvatar, {
1241
1242
  type: shopItem === null || shopItem === void 0 ? void 0 : shopItem.shopSource,
1242
1243
  styles: {
1243
1244
  marginRight: 5
@@ -1255,7 +1256,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1255
1256
  }), /*#__PURE__*/React.createElement("span", null, FLOW_STATUS_V2[flowStatus]), /*#__PURE__*/React.createElement(Button, {
1256
1257
  onClick: reFreshPanel,
1257
1258
  type: "link"
1258
- }, "\u5237\u65B0"), plat.platform === 'pc' ? VersionText() : '')), flowTemplateType !== 'SINGLE_PAGE' && /*#__PURE__*/React.createElement(Col, {
1259
+ }, "\u5237\u65B0"), plat.platform === PlatForm.PC ? VersionText() : '')), flowTemplateType !== 'SINGLE_PAGE' && /*#__PURE__*/React.createElement(Col, {
1259
1260
  style: {
1260
1261
  position: 'relative',
1261
1262
  zIndex: 1,
@@ -1271,7 +1272,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1271
1272
  onClick: function onClick() {
1272
1273
  return setOpenCloseVisible('close');
1273
1274
  }
1274
- }, "\u6536\u8D77\u5168\u90E8"))), plat.platform !== 'pc' ? VersionText() : ''), /*#__PURE__*/React.createElement("div", {
1275
+ }, "\u6536\u8D77\u5168\u90E8"))), plat.platform !== PlatForm.PC ? VersionText() : ''), /*#__PURE__*/React.createElement("div", {
1275
1276
  className: "center ".concat(readonly ? 'readonly' : '')
1276
1277
  }, currentTradeIdLinkWorkOrderId.total > 0 && /*#__PURE__*/React.createElement("div", {
1277
1278
  className: "alertRepeatTradeId"
@@ -1307,7 +1308,8 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1307
1308
  nodeIsAuto: flowRecord.nodeIsAuto,
1308
1309
  openCloseCallback: function openCloseCallback() {
1309
1310
  setOpenCloseVisible('');
1310
- }
1311
+ },
1312
+ eventNodeType: flowRecord.eventNodeType
1311
1313
  }));
1312
1314
  }), currentNodeDetail && /*#__PURE__*/React.createElement(Timeline.Item, null, /*#__PURE__*/React.createElement(CurrentNode, {
1313
1315
  ref: currentNodeRef,
@@ -85,7 +85,8 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
85
85
  tag: tag,
86
86
  operator: item.operator || '',
87
87
  nodeIsAuto: item.nodeIsAuto,
88
- operateType: item.operateType
88
+ operateType: item.operateType,
89
+ eventNodeType: item.eventNodeType
89
90
  };
90
91
  }); // TODO: 针对已完结工单 会出现多一个最后节点问题;需要当前节点id和记录列表中最后一条比对,如果相同,则移除记录中最后一条;
91
92
  if ((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : (_res$data2$currentNod = _res$data2.currentNodeDetail) === null || _res$data2$currentNod === void 0 ? void 0 : (_res$data2$currentNod2 = _res$data2$currentNod.nodeInfo) === null || _res$data2$currentNod2 === void 0 ? void 0 : _res$data2$currentNod2.id) === ((_last = last(recordList)) === null || _last === void 0 ? void 0 : _last.nodeId)) {
@@ -217,6 +217,8 @@ export declare const selectCurrentNodeDetail: (state: FlowTemplateDetailState) =
217
217
  }[] | undefined;
218
218
  };
219
219
  flowEventData?: {
220
+ eventStatus: 0 | 1 | 2 | 4;
221
+ eventType: string;
220
222
  eventData?: {
221
223
  businessStatus?: {
222
224
  businessKey: string;
@@ -27,6 +27,7 @@ import zhCN from 'antd/es/locale/zh_CN';
27
27
  import { get, find, some, set, last, every, cloneDeep } from 'lodash';
28
28
  import 'moment/locale/zh-cn';
29
29
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME } from "../common/utils/tools";
30
+ import { platformMap } from "../common/utils/constant";
30
31
  import submitDataTransOldFormat from "../common/utils/submitDataTransOldFormat";
31
32
  import { queryTemplateDetail, addLogicFlowWorkOrder, queryWorkOrderDetail, updateWorkOrder, replaceCheck, queryTemplateIdByFlowId } from "../model/servers/api";
32
33
  import { factory, ShopList } from '@kmkf-fe-packages/services-components';
@@ -136,7 +137,7 @@ var FormRender = function FormRender(props, ref) {
136
137
  };
137
138
  var asyncDoSave = /*#__PURE__*/function () {
138
139
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workOrderDetail, templateDetail) {
139
- var _Object$keys, _templateDetail$compo3, data, res, finalComponentList, finalDtoList, newTemplateDetail, params, submitData, _yield$updateWorkOrde, success, _templateDetail$flowT, _templateDetail$flowT2, platformMap, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addLogicFlowWo, _success;
140
+ var _Object$keys, _templateDetail$compo3, data, res, finalComponentList, finalDtoList, newTemplateDetail, params, submitData, _yield$updateWorkOrde, success, _templateDetail$flowT, _templateDetail$flowT2, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addLogicFlowWo, _success;
140
141
  return _regeneratorRuntime().wrap(function _callee$(_context) {
141
142
  while (1) switch (_context.prev = _context.next) {
142
143
  case 0:
@@ -210,18 +211,9 @@ var FormRender = function FormRender(props, ref) {
210
211
  id: workOrderId
211
212
  });
212
213
  }
213
- _context.next = 42;
214
+ _context.next = 41;
214
215
  break;
215
216
  case 29:
216
- platformMap = {
217
- tb: '淘宝',
218
- fxg: '抖音',
219
- ks: '快手',
220
- pdd: '拼多多',
221
- jd: '京东',
222
- xiaozhi: '小智',
223
- pc: '客服工作台'
224
- };
225
217
  _params = {
226
218
  apiName: 'addWorkOrder',
227
219
  shopId: shopId,
@@ -259,13 +251,13 @@ var FormRender = function FormRender(props, ref) {
259
251
  }
260
252
  console.debug('增加数据参数', _params, templateDetail);
261
253
  // return;
262
- _context.next = 39;
254
+ _context.next = 38;
263
255
  return addLogicFlowWorkOrder({
264
256
  workOrderVo: _params,
265
257
  flowTemplateId: templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$flowT = templateDetail.flowTemplateConfig) === null || _templateDetail$flowT === void 0 ? void 0 : _templateDetail$flowT.flowTemplateId,
266
258
  nodeId: templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$flowT2 = templateDetail.flowTemplateConfig) === null || _templateDetail$flowT2 === void 0 ? void 0 : _templateDetail$flowT2.nodeId
267
259
  });
268
- case 39:
260
+ case 38:
269
261
  _yield$addLogicFlowWo = _context.sent;
270
262
  _success = _yield$addLogicFlowWo.success;
271
263
  if (_success && typeof onFormSubmitSuccess === 'function') {
@@ -275,12 +267,12 @@ var FormRender = function FormRender(props, ref) {
275
267
  result: _success
276
268
  });
277
269
  }
278
- case 42:
270
+ case 41:
279
271
  console.groupEnd();
280
- _context.next = 49;
272
+ _context.next = 48;
281
273
  break;
282
- case 45:
283
- _context.prev = 45;
274
+ case 44:
275
+ _context.prev = 44;
284
276
  _context.t0 = _context["catch"](0);
285
277
  onFormSubmitSuccess === null || onFormSubmitSuccess === void 0 ? void 0 : onFormSubmitSuccess({
286
278
  type: ''
@@ -296,11 +288,11 @@ var FormRender = function FormRender(props, ref) {
296
288
  });
297
289
  }, 0);
298
290
  }
299
- case 49:
291
+ case 48:
300
292
  case "end":
301
293
  return _context.stop();
302
294
  }
303
- }, _callee, null, [[0, 45]]);
295
+ }, _callee, null, [[0, 44]]);
304
296
  }));
305
297
  return function asyncDoSave(_x2, _x3) {
306
298
  return _ref2.apply(this, arguments);
@@ -27,6 +27,7 @@ import zhCN from 'antd/es/locale/zh_CN';
27
27
  import { get, find, some, set, last, every, cloneDeep } from 'lodash';
28
28
  import 'moment/locale/zh-cn';
29
29
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME } from "../common/utils/tools";
30
+ import { platformMap } from "../common/utils/constant";
30
31
  import submitDataTransOldFormat from "../common/utils/submitDataTransOldFormat";
31
32
  import { queryTemplateDetail, addWorkOrder, queryWorkOrderDetail, updateWorkOrder, replaceCheck } from "../model/servers/api";
32
33
  import { factory, ShopList } from '@kmkf-fe-packages/services-components';
@@ -131,7 +132,7 @@ var FormRender = function FormRender(props, ref) {
131
132
  };
132
133
  var asyncDoSave = /*#__PURE__*/function () {
133
134
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workOrderDetail, templateDetail) {
134
- var data, res, _Object$keys, _templateDetail$compo3, params, finalComponentList, finalDtoList, newTemplateDetail, submitData, _yield$updateWorkOrde, success, result, platformMap, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addWorkOrder, _success, _result;
135
+ var data, res, _Object$keys, _templateDetail$compo3, params, finalComponentList, finalDtoList, newTemplateDetail, submitData, _yield$updateWorkOrde, success, result, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addWorkOrder, _success, _result;
135
136
  return _regeneratorRuntime().wrap(function _callee$(_context) {
136
137
  while (1) switch (_context.prev = _context.next) {
137
138
  case 0:
@@ -205,18 +206,9 @@ var FormRender = function FormRender(props, ref) {
205
206
  id: workOrderId
206
207
  });
207
208
  }
208
- _context.next = 43;
209
+ _context.next = 42;
209
210
  break;
210
211
  case 30:
211
- platformMap = {
212
- tb: '淘宝',
213
- fxg: '抖音',
214
- ks: '快手',
215
- pdd: '拼多多',
216
- jd: '京东',
217
- xiaozhi: '小智',
218
- pc: '客服工作台'
219
- };
220
212
  _params = {
221
213
  apiName: 'addWorkOrder',
222
214
  shopId: shopId,
@@ -255,9 +247,9 @@ var FormRender = function FormRender(props, ref) {
255
247
  }
256
248
  // console.debug('增加数据参数', params);
257
249
  // return;
258
- _context.next = 39;
250
+ _context.next = 38;
259
251
  return addWorkOrder(_params);
260
- case 39:
252
+ case 38:
261
253
  _yield$addWorkOrder = _context.sent;
262
254
  _success = _yield$addWorkOrder.success;
263
255
  _result = _yield$addWorkOrder.data;
@@ -268,12 +260,12 @@ var FormRender = function FormRender(props, ref) {
268
260
  result: _result === null || _result === void 0 ? void 0 : _result.data
269
261
  });
270
262
  }
271
- case 43:
263
+ case 42:
272
264
  console.groupEnd();
273
- _context.next = 50;
265
+ _context.next = 49;
274
266
  break;
275
- case 46:
276
- _context.prev = 46;
267
+ case 45:
268
+ _context.prev = 45;
277
269
  _context.t0 = _context["catch"](0);
278
270
  onFormSubmitSuccess === null || onFormSubmitSuccess === void 0 ? void 0 : onFormSubmitSuccess({
279
271
  type: ''
@@ -289,11 +281,11 @@ var FormRender = function FormRender(props, ref) {
289
281
  });
290
282
  }, 0);
291
283
  }
292
- case 50:
284
+ case 49:
293
285
  case "end":
294
286
  return _context.stop();
295
287
  }
296
- }, _callee, null, [[0, 46]]);
288
+ }, _callee, null, [[0, 45]]);
297
289
  }));
298
290
  return function asyncDoSave(_x2, _x3) {
299
291
  return _ref2.apply(this, arguments);
@@ -26,6 +26,7 @@ import zhCN from 'antd/es/locale/zh_CN';
26
26
  import moment from 'moment';
27
27
  import 'moment/locale/zh-cn';
28
28
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME } from "../../../common/utils/tools";
29
+ import { platformMap } from "../../../common/utils/constant";
29
30
  import submitDataTransOldFormat from "../../../common/utils/submitDataTransOldFormat";
30
31
  import { factory } from '@kmkf-fe-packages/services-components';
31
32
  import { querySingleShopTemplateDetail, addSingleShopWorkOrder, querySingleShopWorkOrderDetail, updateSingleShopWorkOrder, replaceCheck } from "../../../model/servers/api";
@@ -85,7 +86,7 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
85
86
  }, [visible, templateId, workOrderId, currentShopId]);
86
87
  var asyncDoSave = /*#__PURE__*/function () {
87
88
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workOrderDetail, templateDetail) {
88
- var data, res, params, submitData, _yield$updateSingleSh, success, result, platformMap, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addSingleShopW, _success, _result;
89
+ var data, res, params, submitData, _yield$updateSingleSh, success, result, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addSingleShopW, _success, _result;
89
90
  return _regeneratorRuntime().wrap(function _callee$(_context) {
90
91
  while (1) switch (_context.prev = _context.next) {
91
92
  case 0:
@@ -136,17 +137,9 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
136
137
  id: workOrderId
137
138
  });
138
139
  }
139
- _context.next = 35;
140
+ _context.next = 34;
140
141
  break;
141
142
  case 22:
142
- platformMap = {
143
- tb: '淘宝',
144
- fxg: '抖音',
145
- ks: '快手',
146
- pdd: '拼多多',
147
- jd: '京东',
148
- xiaozhi: '小智'
149
- };
150
143
  _params = {
151
144
  apiName: 'addWorkOrder',
152
145
  shopId: currentShopId,
@@ -180,9 +173,9 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
180
173
  };
181
174
  }
182
175
  console.debug('增加数据参数', _params);
183
- _context.next = 31;
176
+ _context.next = 30;
184
177
  return addSingleShopWorkOrder(_params);
185
- case 31:
178
+ case 30:
186
179
  _yield$addSingleShopW = _context.sent;
187
180
  _success = _yield$addSingleShopW.success;
188
181
  _result = _yield$addSingleShopW.data;
@@ -195,12 +188,12 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
195
188
  result: _result === null || _result === void 0 ? void 0 : _result.data
196
189
  });
197
190
  }
198
- case 35:
191
+ case 34:
199
192
  console.groupEnd();
200
- _context.next = 41;
193
+ _context.next = 40;
201
194
  break;
202
- case 38:
203
- _context.prev = 38;
195
+ case 37:
196
+ _context.prev = 37;
204
197
  _context.t0 = _context["catch"](0);
205
198
  // 表单校验失败错误时,将错误第一项滚动到可视区域
206
199
  if (get(_context.t0, 'errorFields.length') > 0) {
@@ -213,11 +206,11 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
213
206
  });
214
207
  }, 0);
215
208
  }
216
- case 41:
209
+ case 40:
217
210
  case "end":
218
211
  return _context.stop();
219
212
  }
220
- }, _callee, null, [[0, 38]]);
213
+ }, _callee, null, [[0, 37]]);
221
214
  }));
222
215
  return function asyncDoSave(_x2, _x3) {
223
216
  return _ref.apply(this, arguments);