@kmkf-fe-packages/kmkf-work-order-service-component 2.0.79-beta.4 → 2.0.79-beta.40

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 (60) 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.js +15 -14
  4. package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +4 -3
  5. package/dist/esm/FlowTemplateDetailV2/components/Item/index.d.ts +1 -0
  6. package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +14 -30
  7. package/dist/esm/FlowTemplateDetailV2/index.js +9 -7
  8. package/dist/esm/FlowTemplateDetailV2/store/reducers.js +2 -1
  9. package/dist/esm/FlowTemplateDetailV2/store/selector.d.ts +0 -17
  10. package/dist/esm/FormRender/index.js +11 -19
  11. package/dist/esm/FormRenderTemplateId/index.js +11 -19
  12. package/dist/esm/GlobalContext/hook/dist/useGetHasErpData.js +52 -0
  13. package/dist/esm/GlobalContext/orderQuery/dist/useGetErpAddressData.js +180 -0
  14. package/dist/esm/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +186 -0
  15. package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.js +11 -18
  16. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/components/PaymentFormModal/index.js +22 -4
  17. package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +1 -1
  18. package/dist/esm/WorkOrder/components/WorkOrderList/index.d.ts +2 -1
  19. package/dist/esm/WorkOrder/components/WorkOrderList/index.js +8 -6
  20. package/dist/esm/WorkOrder/index.js +26 -28
  21. package/dist/esm/WorkOrder/types.d.ts +1 -0
  22. package/dist/esm/WorkOrder/types.js +1 -0
  23. package/dist/esm/common/utils/constant.d.ts +1 -0
  24. package/dist/esm/common/utils/constant.js +10 -0
  25. package/dist/esm/common/utils/dist/submitDataTransOldFormat.js +899 -0
  26. package/dist/esm/common/utils/dist/tools.js +1326 -0
  27. package/dist/esm/common/utils/dist/transformWorkOrderData.js +965 -0
  28. package/dist/esm/common/utils/tools.d.ts +0 -1
  29. package/dist/esm/common/utils/tools.js +27 -21
  30. package/dist/esm/common/utils/transformWorkOrderData.js +17 -7
  31. package/dist/esm/model/customizeWorkOrder/dist/api.js +48 -0
  32. package/dist/esm/model/customizeWorkOrder/dist/index.js +370 -0
  33. package/dist/esm/model/customizeWorkOrder/dist/selector.js +63 -0
  34. package/dist/esm/model/customizeWorkOrder/dist/types.js +3 -0
  35. package/dist/esm/model/dist/global.js +44 -0
  36. package/dist/esm/model/dist/hooks.js +15 -0
  37. package/dist/esm/model/dist/login.js +245 -0
  38. package/dist/esm/model/dist/store.js +30 -0
  39. package/dist/esm/model/dist/userData.js +41 -0
  40. package/dist/esm/model/dist/workOrder.js +329 -0
  41. package/dist/esm/model/flowTemplateDetail/dist/api.js +192 -0
  42. package/dist/esm/model/flowTemplateDetail/dist/types.js +48 -0
  43. package/dist/esm/model/flowTemplateDetail/types.d.ts +4 -0
  44. package/dist/esm/model/flowTemplateDetail/types.js +1 -0
  45. package/dist/esm/model/logicFlow/dist/api.js +14 -0
  46. package/dist/esm/model/logicFlow/dist/index.js +235 -0
  47. package/dist/esm/model/logicFlow/dist/selector.js +18 -0
  48. package/dist/esm/model/logicFlow/dist/types.js +3 -0
  49. package/dist/esm/model/paymentWorkOrder/dist/index.js +77 -0
  50. package/dist/esm/model/paymentWorkOrder/dist/selector.js +36 -0
  51. package/dist/esm/model/paymentWorkOrder/dist/types.js +3 -0
  52. package/dist/esm/model/servers/dist/api.js +545 -0
  53. package/dist/esm/model/servers/dist/request.js +63 -0
  54. package/dist/esm/model/singleShopWorkOrder/dist/index.js +216 -0
  55. package/dist/esm/model/singleShopWorkOrder/dist/selector.js +24 -0
  56. package/dist/esm/model/singleShopWorkOrder/dist/types.js +3 -0
  57. package/dist/esm/model/types/dist/login.js +3 -0
  58. package/dist/esm/model/types/dist/singleWorkOrder.js +3 -0
  59. package/dist/esm/model/types/dist/workOrder.js +3 -0
  60. 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: '提交',
@@ -7,28 +7,29 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
7
7
  0: '执行中',
8
8
  1: '部分成功',
9
9
  2: '全部成功',
10
- 4: '全部失败'
10
+ 3: '部分失败',
11
+ 4: '全部失败',
12
+ 5: '同时存在成功和失败且尚未完结',
13
+ 6: '同时存在成功和失败且已完结',
14
+ 7: '等待业务执行'
11
15
  };
12
16
  var eventStatus = flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventStatus;
13
17
  var renderRules = function renderRules() {
14
- var _flowEventData$eventD, _flowEventData$eventD2, _flowEventData$eventD3;
15
- 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.otherBusinessData) === null || _flowEventData$eventD2 === void 0 ? void 0 : (_flowEventData$eventD3 = _flowEventData$eventD2.ruleDomainList) === null || _flowEventData$eventD3 === void 0 ? void 0 : _flowEventData$eventD3.map(function (item) {
16
- var _flowEventData$eventD4, _flowEventData$eventD5, _item$passConditionLi;
17
- var result = flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD4 = flowEventData.eventData) === null || _flowEventData$eventD4 === void 0 ? void 0 : (_flowEventData$eventD5 = _flowEventData$eventD4.businessStatus) === null || _flowEventData$eventD5 === void 0 ? void 0 : _flowEventData$eventD5.find(function (k) {
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) {
18
22
  return k.businessKey === item.businessKey;
19
23
  });
20
24
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Divider, {
21
25
  dashed: true
22
- }), 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 (condition) {
26
+ }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, (result === null || result === void 0 ? void 0 : result.ruleName) && "\u547D\u4E2D\u89C4\u5219\u540D\u79F0: ".concat(result === null || result === void 0 ? void 0 : result.ruleName)), /*#__PURE__*/React.createElement("p", null, item.businessStatusDesc && "\u89C4\u5219\u72B6\u6001: ".concat(item.businessStatusDesc)), /*#__PURE__*/React.createElement("p", null, result === null || result === void 0 ? void 0 : (_result$passCondition = result.passConditionList) === null || _result$passCondition === void 0 ? void 0 : _result$passCondition.map(function (condition) {
23
27
  return /*#__PURE__*/React.createElement("p", null, condition);
24
- })), /*#__PURE__*/React.createElement("p", null, result.remark));
28
+ }))), /*#__PURE__*/React.createElement("p", null, item.remark));
25
29
  }));
26
30
  };
27
- var renderReason = function renderReason() {
28
- var _flowEventData$eventD6, _flowEventData$eventD7, _flowEventData$eventD8;
29
- return /*#__PURE__*/React.createElement("p", null, flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD6 = flowEventData.eventData) === null || _flowEventData$eventD6 === void 0 ? void 0 : (_flowEventData$eventD7 = _flowEventData$eventD6.businessStatus) === null || _flowEventData$eventD7 === void 0 ? void 0 : (_flowEventData$eventD8 = _flowEventData$eventD7.map(function (item) {
30
- return item === null || item === void 0 ? void 0 : item.remark;
31
- })) === null || _flowEventData$eventD8 === void 0 ? void 0 : _flowEventData$eventD8.join(','));
32
- };
33
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), isNumber(eventStatus) && [1, 2].includes(eventStatus) && renderRules(), isNumber(eventStatus) && [4].includes(eventStatus) && renderReason());
31
+ // const renderReason = () => {
32
+ // return <p>{ flowEventData?.eventData?.businessStatus?.map((item: any) => item?.remark)?.join(',') }</p>
33
+ // }
34
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules());
34
35
  };
@@ -40,7 +40,7 @@ var formProps = {
40
40
  layout: 'vertical'
41
41
  };
42
42
  var CurrentNode = function CurrentNode(props, ref) {
43
- var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$wo12, _localStorage, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$wo22;
43
+ var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$fl, _currentNodeDetail$wo12, _localStorage, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$wo22;
44
44
  var formRenderRef = useRef(null);
45
45
  useImperativeHandle(ref, function () {
46
46
  return {
@@ -277,6 +277,7 @@ var CurrentNode = function CurrentNode(props, ref) {
277
277
  }();
278
278
  var isArtificialNode = tag === 'artificial';
279
279
  var isAutoNode = tag === 'auto';
280
+ var isShowAutoNodeDetail = isAutoNode && ['ORDER_MEMO_MANY_RULES', 'AFTER_SALE_AUTO_RETURN_GOODS_AGREE_REJECT', 'AFTER_SALE_AUTO_REFUND_REJECT', 'LOGISTICS_INTERCEPT_MULTI_RULE', 'MESSAGE_NOTIFY_EVENT', 'DING_TALK_ROBOT_NOTIFY', 'HTTP_INVOKE', 'ORDER_MEMO'].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : _currentNodeDetail$fl.eventType);
280
281
  var showEdit = isArtificialNode && isCurrentNodeHandler && !readonly && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.flowStatus) === FlowStatus.COMPLETED;
281
282
  // TODO: 决策节点给后端修复数据加了一个入口
282
283
  // @ts-ignore
@@ -312,7 +313,7 @@ var CurrentNode = function CurrentNode(props, ref) {
312
313
  onOpenWangWang: onOpenWangWang
313
314
  }) : /*#__PURE__*/React.createElement(FormRender, {
314
315
  ref: formRenderRef,
315
- 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),
316
317
  plat: plat,
317
318
  templateDetail: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
318
319
  shopList: shopList,
@@ -331,7 +332,7 @@ var CurrentNode = function CurrentNode(props, ref) {
331
332
  flowAllShowHideRules: allShowHideRules,
332
333
  firstOrderBackfill: flowStatus !== FlowStatus.COMPLETED,
333
334
  autoSubmit: autoSubmit
334
- })), isAutoNode && /*#__PURE__*/React.createElement(AutoTaskDetail, {
335
+ })), isShowAutoNodeDetail && /*#__PURE__*/React.createElement(AutoTaskDetail, {
335
336
  flowEventData: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.flowEventData
336
337
  })));
337
338
  };
@@ -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;
@@ -34,7 +34,7 @@ import { useSelector } from "../../context/useSelector";
34
34
  import { Context } from "../../context";
35
35
  import { AutoTaskDetail } from "../AutoTaskDetail";
36
36
  var NodeItem = function NodeItem(props) {
37
- 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, _data$data25;
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;
38
38
  var tag = props.tag,
39
39
  nodeId = props.nodeId,
40
40
  nodeName = props.nodeName,
@@ -53,7 +53,8 @@ var NodeItem = function NodeItem(props) {
53
53
  visibleType = _props$visibleType === void 0 ? '' : _props$visibleType,
54
54
  nodeIsAuto = props.nodeIsAuto,
55
55
  flowTemplateKey = props.flowTemplateKey,
56
- onJumpPage = props.onJumpPage;
56
+ onJumpPage = props.onJumpPage,
57
+ eventNodeType = props.eventNodeType;
57
58
  var _useContext = useContext(Context),
58
59
  dispatch = _useContext.dispatch;
59
60
  var plat = useSelector(selectPlatInfo);
@@ -239,7 +240,7 @@ var NodeItem = function NodeItem(props) {
239
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
240
241
  });
241
242
  }, [data, plat.userKey, assistantMap]);
242
-
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', 'ORDER_MEMO'].includes(eventNodeType);
243
244
  // 人工节点+打开状态+当前工单提交人是当前完成人+状态是待处理
244
245
  var showEdit = isArtificialNode && open && isCurrentNodeHandler && !readonly && [FlowStatus.PROCESSING, FlowStatus.COMPLETED].includes(flowStatus);
245
246
 
@@ -257,31 +258,14 @@ var NodeItem = function NodeItem(props) {
257
258
  // }
258
259
  // };
259
260
 
260
- var renderFail = function renderFail() {
261
- var _data$data10, _data$data10$flowEven, _data$data10$flowEven2, _data$data10$flowEven3, _data$data10$flowEven4;
262
- 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;
263
- };
264
- var renderSuccess = function renderSuccess() {
265
- var _data$data11, _data$data11$flowEven, _data$data11$flowEven2, _data$data11$flowEven3, _data$data11$flowEven4;
266
- 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) {
267
- var _item$passConditionLi;
268
- 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) {
269
- return /*#__PURE__*/React.createElement("p", null, item);
270
- })));
271
- }));
272
- };
273
- var renderAutoNodeDetail = function renderAutoNodeDetail() {
274
- 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;
275
- 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());
276
- };
277
- 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) || []))),
278
262
  _calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
279
263
  transData = _calcWorkOrderList2[0];
280
264
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, {
281
265
  tag: tag,
282
266
  nodeName: nodeName,
283
267
  editing: editing,
284
- showLook: isArtificialNode || isAutoNode,
268
+ showLook: isArtificialNode || isShowAutoNodeDetail,
285
269
  showEdit: showEdit,
286
270
  opening: open,
287
271
  handleLook: handleOpen,
@@ -302,18 +286,18 @@ var NodeItem = function NodeItem(props) {
302
286
  display: open ? 'block' : 'none',
303
287
  marginTop: '16px'
304
288
  }
305
- }, [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, {
306
- 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),
307
291
  plat: plat,
308
- 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,
309
293
  shopList: shopList,
310
- 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,
311
295
  accountName: plat.accountName,
312
296
  form: form,
313
297
  onOpenWangWang: onOpenWangWang,
314
298
  onJumpPage: onJumpPage,
315
299
  look: !editing || flowStatus === FlowStatus.STOPPING,
316
- 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,
317
301
  formProps: {
318
302
  className: 'customizeFormModalClassName',
319
303
  layout: 'vertical'
@@ -323,12 +307,12 @@ var NodeItem = function NodeItem(props) {
323
307
  firstOrderBackfill: false // TODO: 前面节点必然是已完成状态,已完成状态不再调用订单反填
324
308
  // handleChangeTradeId={handleChangeTradeId}
325
309
  }) : /*#__PURE__*/React.createElement(RenderDetail, {
326
- 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,
327
311
  transData: transData,
328
312
  platform: plat.platform,
329
313
  onOpenWangWang: onOpenWangWang
330
- })), isAutoNode && /*#__PURE__*/React.createElement(AutoTaskDetail, {
331
- flowEventData: data === null || data === void 0 ? void 0 : (_data$data25 = data.data) === null || _data$data25 === void 0 ? void 0 : _data$data25.flowEventData
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
332
316
  })));
333
317
  };
334
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)) {
@@ -216,23 +216,6 @@ export declare const selectCurrentNodeDetail: (state: FlowTemplateDetailState) =
216
216
  deleted?: boolean | undefined;
217
217
  }[] | undefined;
218
218
  };
219
- flowEventData?: {
220
- eventStatus: 0 | 1 | 2 | 4;
221
- eventData?: {
222
- businessStatus?: {
223
- businessKey: string;
224
- businessStatus: number;
225
- businessStatusDesc: string;
226
- remark: string;
227
- }[] | undefined;
228
- otherBusinessData?: {
229
- ruleDomainList: {
230
- ruleName?: string | undefined;
231
- passConditionList?: string[] | undefined;
232
- }[];
233
- } | undefined;
234
- } | undefined;
235
- } | undefined;
236
219
  } | undefined;
237
220
  export declare const selectTid: (state: FlowTemplateDetailState) => string;
238
221
  export declare const selectShopUniqueKey: (state: FlowTemplateDetailState) => 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);
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ var react_1 = require("react");
5
+ var react_redux_1 = require("react-redux");
6
+ var toolkit_1 = require("@reduxjs/toolkit");
7
+ var getTemplate = function getTemplate(companyUserConfig) {
8
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
9
+ return JSON.stringify({
10
+ hasWln: (_c = (_b = (_a = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _a === void 0 ? void 0 : _a.wln) === null || _b === void 0 ? void 0 : _b.show) !== null && _c !== void 0 ? _c : false,
11
+ hasWdt: (_f = (_e = (_d = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _d === void 0 ? void 0 : _d.wdt) === null || _e === void 0 ? void 0 : _e.show) !== null && _f !== void 0 ? _f : false,
12
+ hasBs: (_j = (_h = (_g = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _g === void 0 ? void 0 : _g.bs) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : false,
13
+ hasE3: (_m = (_l = (_k = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _k === void 0 ? void 0 : _k.bse3) === null || _l === void 0 ? void 0 : _l.show) !== null && _m !== void 0 ? _m : false,
14
+ hasJst: (_q = (_p = (_o = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _o === void 0 ? void 0 : _o.jst) === null || _p === void 0 ? void 0 : _p.show) !== null && _q !== void 0 ? _q : false,
15
+ hasGy: (_t = (_s = (_r = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _r === void 0 ? void 0 : _r.gy) === null || _s === void 0 ? void 0 : _s.show) !== null && _t !== void 0 ? _t : false
16
+ });
17
+ };
18
+ function useGetHasErpData() {
19
+ var companyUserConfig = react_redux_1.useSelector(toolkit_1.createSelector([function (state) {
20
+ var _a, _b, _c, _d;
21
+ console.log("state--useSelector", state);
22
+ /**
23
+ * pc main
24
+ * 端 workOrder
25
+ * **/
26
+ return (_d = (_b = (_a = state === null || state === void 0 ? void 0 : state.main) === null || _a === void 0 ? void 0 : _a.userInfo) !== null && _b !== void 0 ? _b : (_c = state === null || state === void 0 ? void 0 : state.workOrder) === null || _c === void 0 ? void 0 : _c.userInfo) !== null && _d !== void 0 ? _d : {};
27
+ }], function (state) {
28
+ var _a;
29
+ var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
30
+ if (typeof companyUserConfig === "string") {
31
+ try {
32
+ companyUserConfig = JSON.parse(companyUserConfig);
33
+ } catch (e) {
34
+ console.error("companyUserConfig转换异常", companyUserConfig);
35
+ companyUserConfig = {};
36
+ }
37
+ }
38
+ return companyUserConfig;
39
+ }));
40
+ var _a = react_1.useState(getTemplate({})),
41
+ hasErpDataJson = _a[0],
42
+ setHasErpDataJson = _a[1];
43
+ react_1.useEffect(function () {
44
+ setHasErpDataJson(getTemplate(companyUserConfig));
45
+ console.log("companyUserConfig---", companyUserConfig);
46
+ }, [companyUserConfig]);
47
+ var hasErpData = react_1.useMemo(function () {
48
+ return JSON.parse(hasErpDataJson);
49
+ }, [hasErpDataJson]);
50
+ return hasErpData;
51
+ }
52
+ exports["default"] = useGetHasErpData;