@kmkf-fe-packages/kmkf-work-order-service-component 2.6.0 → 2.6.1-beta.1

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.
@@ -40,7 +40,7 @@ export var FLOW_STATUS_V2 = {
40
40
  RETURNING: '回退中'
41
41
  };
42
42
  //不能回填的组件type
43
- export var CANNOT_BACK_FILL = ['LOGISTICS_TRAJECTORY', 'LOGISTICS_TRAJECTORY_MORE', 'BUYER_MESSAGE_NOTICE', 'MSG_STATUS', 'NEW_PAYMENT_STATUS', 'REISSUE_STATUS', 'REISSUE_LOGISTICS', 'RETURN_GOODS_STATUS', 'RETURN_GOODS_TRADE_ID', 'ADJUST_WORK_ORDER_STATUS', 'INVOICE_STATUS', 'INVOICING_STATUS', 'EXCHANGE_STATUS', 'WAREHOUSING_STATUS', 'BS_E3_WAREHOUSING_STATUS', 'WDT_WAREHOUSING_STATUS', 'JKY_WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE', 'ORDER_TYPE', 'REFUND_TYPE', 'RETURN_EXCHANGE_GOODS_REVIEW_STATUS', 'EXECUTE_ACTION_TYPE'];
43
+ export var CANNOT_BACK_FILL = ['LOGISTICS_TRAJECTORY', 'LOGISTICS_TRAJECTORY_MORE', 'BUYER_MESSAGE_NOTICE', 'MSG_STATUS', 'NEW_PAYMENT_STATUS', 'REISSUE_STATUS', 'REISSUE_LOGISTICS', 'RETURN_GOODS_STATUS', 'RETURN_GOODS_TRADE_ID', 'ADJUST_WORK_ORDER_STATUS', 'INVOICE_STATUS', 'INVOICING_STATUS', 'EXCHANGE_STATUS', 'WAREHOUSING_STATUS', 'BS_E3_WAREHOUSING_STATUS', 'WDT_WAREHOUSING_STATUS', 'JKY_WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'SWAP_OUT_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE', 'ORDER_TYPE', 'REFUND_TYPE', 'RETURN_EXCHANGE_GOODS_REVIEW_STATUS', 'EXECUTE_ACTION_TYPE'];
44
44
  export var verifyHandle = function verifyHandle(data, componentDtoList) {
45
45
  var _componentDtoList$fin, _componentDtoList$fin2, _data$paymentUniqueKe, _data$paymentUniqueKe2;
46
46
  var res = {
@@ -14,6 +14,7 @@ declare type CurrentNodeProps = {
14
14
  queryRemarkList: () => void;
15
15
  autoSubmit?: boolean;
16
16
  isSuperAdmin?: boolean;
17
+ autoFillThirdPartyFields?: boolean;
17
18
  };
18
19
  declare const _default: React.ForwardRefExoticComponent<CurrentNodeProps & React.RefAttributes<unknown>>;
19
20
  export default _default;
@@ -69,7 +69,8 @@ var CurrentNode = function CurrentNode(props, ref) {
69
69
  flowWorkOrderId = props.flowWorkOrderId,
70
70
  queryRemarkList = props.queryRemarkList,
71
71
  autoSubmit = props.autoSubmit,
72
- onJumpPage = props.onJumpPage;
72
+ onJumpPage = props.onJumpPage,
73
+ autoFillThirdPartyFields = props.autoFillThirdPartyFields;
73
74
  var _useContext = useContext(Context),
74
75
  dispatch = _useContext.dispatch;
75
76
  // 是否是编辑状态
@@ -284,20 +285,23 @@ var CurrentNode = function CurrentNode(props, ref) {
284
285
  return _ref2.apply(this, arguments);
285
286
  };
286
287
  }();
288
+ var eventType = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : _currentNodeDetail$fl.eventType;
289
+ var eventConfig = SKIP_NODE_TYPES_CONFIG[eventType];
290
+ var shouldSkipByValidate = typeof eventConfig === 'boolean' || !(eventConfig !== null && eventConfig !== void 0 && eventConfig.validateFn) || eventConfig.validateFn(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.nodeInfo);
291
+ var showSkipButton = eventType in SKIP_NODE_TYPES_CONFIG && flowStatus && [FlowStatus.FLOWING, FlowStatus.PROCESSING].includes(flowStatus) && shouldSkipByValidate;
287
292
  var handleSkip = /*#__PURE__*/function () {
288
293
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
289
- var title, config;
294
+ var title;
290
295
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
291
296
  while (1) switch (_context4.prev = _context4.next) {
292
297
  case 0:
293
298
  title = '当前获取物流单号自动化任务正在执行中,确定要跳过吗?跳过后将无法获取物流信息';
294
- config = SKIP_NODE_TYPES_CONFIG[eventType];
295
- if (typeof config !== 'boolean') {
299
+ if (typeof eventConfig !== 'boolean') {
296
300
  title = /*#__PURE__*/React.createElement(React.Fragment, null, "\u5F53\u524D", /*#__PURE__*/React.createElement("span", {
297
301
  className: styles.highlight
298
- }, config.name), "\u81EA\u52A8\u5316\u4EFB\u52A1\u6B63\u5728\u6267\u884C\u4E2D\uFF0C\u786E\u5B9A\u8981\u8DF3\u8FC7\u5417\uFF1F\u8DF3\u8FC7\u540E\u5C06\u65E0\u6CD5\u83B7\u53D6", /*#__PURE__*/React.createElement("span", {
302
+ }, eventConfig.name), "\u81EA\u52A8\u5316\u4EFB\u52A1\u6B63\u5728\u6267\u884C\u4E2D\uFF0C\u786E\u5B9A\u8981\u8DF3\u8FC7\u5417\uFF1F\u8DF3\u8FC7\u540E\u5C06\u65E0\u6CD5\u83B7\u53D6", /*#__PURE__*/React.createElement("span", {
299
303
  className: styles.highlight
300
- }, config.tips));
304
+ }, eventConfig.tips));
301
305
  }
302
306
  Modal.confirm({
303
307
  title: title,
@@ -345,7 +349,7 @@ var CurrentNode = function CurrentNode(props, ref) {
345
349
  return onOk;
346
350
  }()
347
351
  });
348
- case 4:
352
+ case 3:
349
353
  case "end":
350
354
  return _context4.stop();
351
355
  }
@@ -357,13 +361,11 @@ var CurrentNode = function CurrentNode(props, ref) {
357
361
  }();
358
362
  var isArtificialNode = tag === 'artificial';
359
363
  var isAutoNode = tag === 'auto';
360
- var eventType = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : _currentNodeDetail$fl.eventType;
361
364
  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', 'LBDJ_ONE_PRICE_ORDER'].includes(eventType);
362
365
  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;
363
366
  // TODO: 决策节点给后端修复数据加了一个入口
364
367
  // @ts-ignore
365
368
  var showRestartAutoTask = tag === 'auto' && flowStatus === FlowStatus.PROCESSING || tag === 'judge' && ((_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('__isDEV__')) === 'true';
366
- var showSkipButton = eventType in SKIP_NODE_TYPES_CONFIG && flowStatus && [FlowStatus.FLOWING, FlowStatus.PROCESSING].includes(flowStatus);
367
369
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, {
368
370
  tag: tag,
369
371
  nodeName: nodeName,
@@ -417,7 +419,8 @@ var CurrentNode = function CurrentNode(props, ref) {
417
419
  flowAllShowHideRules: allShowHideRules,
418
420
  isStartNodeWaiting: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no25 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no25 === void 0 ? void 0 : _currentNodeDetail$no25.nodeType) && [NodeStatus.WAITING].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo23 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo23 === void 0 ? void 0 : _currentNodeDetail$wo23.flowStatus),
419
421
  firstOrderBackfill: flowStatus !== FlowStatus.COMPLETED,
420
- autoSubmit: autoSubmit
422
+ autoSubmit: autoSubmit,
423
+ autoFillThirdPartyFields: autoFillThirdPartyFields
421
424
  })), isShowAutoNodeDetail && /*#__PURE__*/React.createElement(AutoTaskDetail, {
422
425
  flowEventData: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.flowEventData,
423
426
  shopList: shopList
@@ -33,6 +33,7 @@ declare type FormRenderProps = {
33
33
  isErpUse?: boolean;
34
34
  autoSubmit?: boolean;
35
35
  isStartNodeWaiting?: boolean;
36
+ autoFillThirdPartyFields?: boolean;
36
37
  };
37
38
  declare const _default: React.ForwardRefExoticComponent<FormRenderProps & React.RefAttributes<unknown>>;
38
39
  export default _default;
@@ -29,7 +29,7 @@ import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle, grou
29
29
  import 'moment/locale/zh-cn';
30
30
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
31
31
  // 重复检验不需要展示在顶部的
32
- INNER_REPLACE_COMPONENT, reversalFormValues, wdtReturnBillNoBackValues, bsSystemOrderBackValues, kmSystemOrderBackValues, bsE3SystemOrderBackValues, wlnSystemOrderBackValues, gySystemOrderBackValues, jstSystemOrderBackValues, jySystemOrderBackValues, jkySystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, getMappingTargetValue } from "../../../common/utils/tools";
32
+ INNER_REPLACE_COMPONENT, reversalFormValues, wdtReturnBillNoBackValues, afterSaleOrderBackValues, bsSystemOrderBackValues, kmSystemOrderBackValues, bsE3SystemOrderBackValues, wlnSystemOrderBackValues, gySystemOrderBackValues, jstSystemOrderBackValues, jySystemOrderBackValues, jkySystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, getMappingTargetValue } from "../../../common/utils/tools";
33
33
  import { replaceCheck, orderDetail, queryLabelByTradeId, queryMemberLevel } from "../../../model/servers/api";
34
34
  import { factory } from '@kmkf-fe-packages/services-components';
35
35
  import { getExpression, formatDisplayConfig, isNull, LabelData, setSessionStorage } from '@kmkf-fe-packages/kmkf-utils';
@@ -95,7 +95,10 @@ var FormRender = function FormRender(props, ref) {
95
95
  autoSubmit = _props$autoSubmit === void 0 ? false : _props$autoSubmit,
96
96
  _props$isStartNodeWai = props.isStartNodeWaiting,
97
97
  isStartNodeWaiting = _props$isStartNodeWai === void 0 ? false : _props$isStartNodeWai,
98
- onJumpPage = props.onJumpPage;
98
+ onJumpPage = props.onJumpPage,
99
+ autoFillThirdPartyFields = props.autoFillThirdPartyFields;
100
+ // 优先使用外部传入的 autoFillThirdPartyFields,未传时降级使用 record 中的 notAutoFillWithFirstSubmit
101
+ var notAutoFillFlag = autoFillThirdPartyFields !== undefined ? autoFillThirdPartyFields : record === null || record === void 0 ? void 0 : record.notAutoFillWithFirstSubmit;
99
102
  var shopIdToUniqueKeyMap = useMemo(function () {
100
103
  var json = {};
101
104
  shopList.forEach(function (shop) {
@@ -198,6 +201,7 @@ var FormRender = function FormRender(props, ref) {
198
201
  }
199
202
  });
200
203
  var transData = calcWorkOrderList([record], preNodeComponentDtoList);
204
+ console.log("*** transData:", transData);
201
205
  preNodeForm.setFieldsValue(_objectSpread({}, get(transData, '0', {})));
202
206
  if (record.preCreateAndNotModified && !record.notAutoFillWithFirstSubmit) {
203
207
  fillByShopId(get(transData, '0', {}).shopId);
@@ -399,7 +403,7 @@ var FormRender = function FormRender(props, ref) {
399
403
  }, [labelComponent, record]);
400
404
  var queryDetail = /*#__PURE__*/function () {
401
405
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
402
- var workOrderId, shopId, shopList, record, orderNo, buyerId, buyerNick, jsonMap, _record$jsonMap3, newRecord, jsonMapOrderId, getCacheInfo, newFormValues, transData, initialValues, tradeIdUniqueKey, _record$jsonMap2, currentNodeTradeIdUniqueKey, _currentNodeTid, _record$jsonMap4, _record$jsonMap5, _record$jsonMap6, initFormValues, _getCacheInfo, _getCacheInfo2, _getCacheInfo3, _getCacheInfo4, _orderNo, _shopId, orderNoField, _transData, _initialValues, antFormEl;
406
+ var workOrderId, shopId, shopList, record, orderNo, buyerId, buyerNick, jsonMap, _record$jsonMap4, newRecord, jsonMapOrderId, getCacheInfo, newFormValues, transData, initialValues, tradeIdUniqueKey, _record$jsonMap2, _record$jsonMap3, _userInfo$companyUser3, _companyUserConfig$pl, _companyUserConfig$pl2, _companyUserConfig$pl3, currentNodeTradeIdUniqueKey, _currentNodeTid, currentNodeExpressLogisticsCodeKey, currentNodeLogisticsCode, isSkx, _userInfo, companyUserConfig, hasWdt, _record$jsonMap5, _record$jsonMap6, _record$jsonMap7, initFormValues, _getCacheInfo, _getCacheInfo2, _getCacheInfo3, _getCacheInfo4, _orderNo, _shopId, orderNoField, _transData, _initialValues, antFormEl;
403
407
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
404
408
  while (1) switch (_context2.prev = _context2.next) {
405
409
  case 0:
@@ -429,7 +433,7 @@ var FormRender = function FormRender(props, ref) {
429
433
  return prv;
430
434
  }, {});
431
435
  if (!workOrderId) {
432
- _context2.next = 45;
436
+ _context2.next = 57;
433
437
  break;
434
438
  }
435
439
  // 先初始化端上内容
@@ -457,23 +461,29 @@ var FormRender = function FormRender(props, ref) {
457
461
  }));
458
462
  console.log('transData', get(transData, '0', {}));
459
463
  initialValues = get(transData, '0', {});
460
- newRecord.preCreateAndNotModified && !newRecord.notAutoFillWithFirstSubmit && batchFillByMapping(initialValues);
464
+ newRecord.preCreateAndNotModified && !notAutoFillFlag && batchFillByMapping(initialValues);
461
465
  orderBackReplace(transData, templateDetail);
462
466
  // TODO: 非开始节点录入,都会有workOrderId,这里判断是否有前置组件含有订单号;如果存在订单号,进行订单反填。
463
467
  tradeIdUniqueKey = findComponentUniqueKeyByType(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList, 'TRADE_ID_INPUT');
464
- if (!newRecord.notAutoFillWithFirstSubmit) {
465
- _context2.next = 35;
468
+ if (!notAutoFillFlag) {
469
+ _context2.next = 47;
466
470
  break;
467
471
  }
468
472
  currentNodeTradeIdUniqueKey = findComponentUniqueKeyByType(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'TRADE_ID_INPUT');
469
473
  _currentNodeTid = record === null || record === void 0 ? void 0 : (_record$jsonMap2 = record.jsonMap) === null || _record$jsonMap2 === void 0 ? void 0 : _record$jsonMap2["".concat(currentNodeTradeIdUniqueKey, "_tradeId")];
474
+ currentNodeExpressLogisticsCodeKey = findComponentUniqueKeyByType(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'EXPRESS_LOGISTICS_SELECT');
475
+ currentNodeLogisticsCode = record === null || record === void 0 ? void 0 : (_record$jsonMap3 = record.jsonMap) === null || _record$jsonMap3 === void 0 ? void 0 : _record$jsonMap3["".concat(currentNodeExpressLogisticsCodeKey, "_expressLogisticsCode")];
476
+ isSkx = ['TR3E2FYXFZCFANVG6O6AALSM'].includes(companyKey); // SKX 特殊处理逻辑
477
+ _userInfo = JSON.parse(localStorage.getItem('reduxData_userInfo') || '{}');
478
+ companyUserConfig = (_userInfo$companyUser3 = _userInfo === null || _userInfo === void 0 ? void 0 : _userInfo.companyUserConfig) !== null && _userInfo$companyUser3 !== void 0 ? _userInfo$companyUser3 : {};
479
+ hasWdt = (_companyUserConfig$pl = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl2 = companyUserConfig.plugins) === null || _companyUserConfig$pl2 === void 0 ? void 0 : (_companyUserConfig$pl3 = _companyUserConfig$pl2.wdt) === null || _companyUserConfig$pl3 === void 0 ? void 0 : _companyUserConfig$pl3.show) !== null && _companyUserConfig$pl !== void 0 ? _companyUserConfig$pl : false;
470
480
  if (!_currentNodeTid) {
471
- _context2.next = 30;
481
+ _context2.next = 36;
472
482
  break;
473
483
  }
474
484
  queryLabels(_currentNodeTid, shopId);
475
485
  queryMemberLevels(_currentNodeTid, shopId);
476
- _context2.next = 28;
486
+ _context2.next = 34;
477
487
  return orderBack({
478
488
  companyKey: companyKey,
479
489
  order_no: _currentNodeTid,
@@ -487,11 +497,15 @@ var FormRender = function FormRender(props, ref) {
487
497
  callKey: 1,
488
498
  setLoading: setLoading
489
499
  });
490
- case 28:
491
- _context2.next = 32;
500
+ case 34:
501
+ _context2.next = 44;
492
502
  break;
493
- case 30:
494
- _context2.next = 32;
503
+ case 36:
504
+ if (!isSkx) {
505
+ _context2.next = 41;
506
+ break;
507
+ }
508
+ _context2.next = 39;
495
509
  return skxOrderBack({
496
510
  form: form,
497
511
  companyKey: companyKey,
@@ -499,22 +513,32 @@ var FormRender = function FormRender(props, ref) {
499
513
  componentOnBlur: componentOnBlur,
500
514
  jsonMap: record === null || record === void 0 ? void 0 : record.jsonMap
501
515
  });
502
- case 32:
516
+ case 39:
517
+ _context2.next = 44;
518
+ break;
519
+ case 41:
520
+ if (!(hasWdt && currentNodeLogisticsCode)) {
521
+ _context2.next = 44;
522
+ break;
523
+ }
524
+ _context2.next = 44;
525
+ return componentOnBlur(currentNodeLogisticsCode, 'expressLogisticsCode');
526
+ case 44:
503
527
  // 仅在依赖值有值且映射值为空时触发一次映射
504
528
  batchFillByMappingWhenTargetEmpty(initialValues);
505
- _context2.next = 43;
529
+ _context2.next = 55;
506
530
  break;
507
- case 35:
508
- if (!(tradeIdUniqueKey && shopId && record !== null && record !== void 0 && (_record$jsonMap3 = record.jsonMap) !== null && _record$jsonMap3 !== void 0 && _record$jsonMap3["".concat(tradeIdUniqueKey, "_tradeId")] && firstOrderBackfill)) {
509
- _context2.next = 42;
531
+ case 47:
532
+ if (!(tradeIdUniqueKey && shopId && record !== null && record !== void 0 && (_record$jsonMap4 = record.jsonMap) !== null && _record$jsonMap4 !== void 0 && _record$jsonMap4["".concat(tradeIdUniqueKey, "_tradeId")] && firstOrderBackfill)) {
533
+ _context2.next = 54;
510
534
  break;
511
535
  }
512
- queryLabels(record === null || record === void 0 ? void 0 : (_record$jsonMap4 = record.jsonMap) === null || _record$jsonMap4 === void 0 ? void 0 : _record$jsonMap4["".concat(tradeIdUniqueKey, "_tradeId")], shopId);
513
- queryMemberLevels(record === null || record === void 0 ? void 0 : (_record$jsonMap5 = record.jsonMap) === null || _record$jsonMap5 === void 0 ? void 0 : _record$jsonMap5["".concat(tradeIdUniqueKey, "_tradeId")], shopId);
514
- _context2.next = 40;
536
+ queryLabels(record === null || record === void 0 ? void 0 : (_record$jsonMap5 = record.jsonMap) === null || _record$jsonMap5 === void 0 ? void 0 : _record$jsonMap5["".concat(tradeIdUniqueKey, "_tradeId")], shopId);
537
+ queryMemberLevels(record === null || record === void 0 ? void 0 : (_record$jsonMap6 = record.jsonMap) === null || _record$jsonMap6 === void 0 ? void 0 : _record$jsonMap6["".concat(tradeIdUniqueKey, "_tradeId")], shopId);
538
+ _context2.next = 52;
515
539
  return orderBack({
516
540
  companyKey: companyKey,
517
- order_no: record === null || record === void 0 ? void 0 : (_record$jsonMap6 = record.jsonMap) === null || _record$jsonMap6 === void 0 ? void 0 : _record$jsonMap6["".concat(tradeIdUniqueKey, "_tradeId")],
541
+ order_no: record === null || record === void 0 ? void 0 : (_record$jsonMap7 = record.jsonMap) === null || _record$jsonMap7 === void 0 ? void 0 : _record$jsonMap7["".concat(tradeIdUniqueKey, "_tradeId")],
518
542
  form: form,
519
543
  shopId: shopId,
520
544
  shopList: shopList,
@@ -525,16 +549,16 @@ var FormRender = function FormRender(props, ref) {
525
549
  callKey: 1,
526
550
  setLoading: setLoading
527
551
  });
528
- case 40:
529
- _context2.next = 43;
552
+ case 52:
553
+ _context2.next = 55;
530
554
  break;
531
- case 42:
555
+ case 54:
532
556
  // 如果没有订单反填,则单独更新remark
533
557
  fetchRemark(shopId, currentNodeTid);
534
- case 43:
535
- _context2.next = 68;
558
+ case 55:
559
+ _context2.next = 80;
536
560
  break;
537
- case 45:
561
+ case 57:
538
562
  fillByShopId(shopId);
539
563
  initFormValues = null;
540
564
  if (plat !== null && plat !== void 0 && plat.subOrderNo) {
@@ -553,7 +577,7 @@ var FormRender = function FormRender(props, ref) {
553
577
 
554
578
  // console.log(orderNo, initFormValues);
555
579
  if (!initFormValues) {
556
- _context2.next = 56;
580
+ _context2.next = 68;
557
581
  break;
558
582
  }
559
583
  form.setFieldsValue(_objectSpread(_objectSpread({}, initFormValues), {}, {
@@ -570,9 +594,9 @@ var FormRender = function FormRender(props, ref) {
570
594
  _orderNo = orderNoField !== null && orderNoField !== void 0 && orderNoField.uniqueKey ? initFormValues[orderNoField === null || orderNoField === void 0 ? void 0 : orderNoField.uniqueKey] || _orderNo : _orderNo;
571
595
  }
572
596
  fetchRemark(_shopId, _orderNo);
573
- _context2.next = 68;
597
+ _context2.next = 80;
574
598
  break;
575
- case 56:
599
+ case 68:
576
600
  _transData = calcWorkOrderList([{
577
601
  jsonMap: jsonMap
578
602
  }], [].concat(_toConsumableArray((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList) || []), _toConsumableArray((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || [])), 'init');
@@ -584,12 +608,12 @@ var FormRender = function FormRender(props, ref) {
584
608
  batchFillByMapping(_initialValues);
585
609
  //如果有订单号 订单返填 通过订单号入口进行工单录入,需要将订单数据反填到工单
586
610
  if (!(orderNo && shopId)) {
587
- _context2.next = 67;
611
+ _context2.next = 79;
588
612
  break;
589
613
  }
590
614
  queryLabels(orderNo, shopId);
591
615
  queryMemberLevels(orderNo, shopId);
592
- _context2.next = 65;
616
+ _context2.next = 77;
593
617
  return orderBack({
594
618
  companyKey: companyKey,
595
619
  order_no: orderNo,
@@ -604,13 +628,13 @@ var FormRender = function FormRender(props, ref) {
604
628
  callKey: 2,
605
629
  setLoading: setLoading
606
630
  });
607
- case 65:
608
- _context2.next = 68;
631
+ case 77:
632
+ _context2.next = 80;
609
633
  break;
610
- case 67:
634
+ case 79:
611
635
  // 如果没有订单反填,则单独更新remark
612
636
  fetchRemark(shopId, currentNodeTid);
613
- case 68:
637
+ case 80:
614
638
  antFormEl = document.getElementsByClassName('ant-form');
615
639
  (antFormEl === null || antFormEl === void 0 ? void 0 : antFormEl.length) > 0 && set(antFormEl, '0.scrollTop', 0);
616
640
  resetMappingHideComponents();
@@ -619,7 +643,7 @@ var FormRender = function FormRender(props, ref) {
619
643
  type: 'setaAutoSubmitFlag',
620
644
  payload: true
621
645
  });
622
- case 72:
646
+ case 84:
623
647
  case "end":
624
648
  return _context2.stop();
625
649
  }
@@ -640,7 +664,7 @@ var FormRender = function FormRender(props, ref) {
640
664
  buyerId: buyerId,
641
665
  buyerNick: buyerNick
642
666
  });
643
- }, [workOrderId, record, shopId, isErpUse]);
667
+ }, [workOrderId, record, shopId, isErpUse, autoFillThirdPartyFields]);
644
668
 
645
669
  // 重置映射隐藏的组件, 目前只有单选、下拉组件可能会因为映射关系隐藏
646
670
  var resetMappingHideComponents = function resetMappingHideComponents() {
@@ -1002,6 +1026,18 @@ var FormRender = function FormRender(props, ref) {
1002
1026
  form: form
1003
1027
  });
1004
1028
  }
1029
+ if (workOrderComponentType === 'PLATFORM_AFTER_SALES_ORDER') {
1030
+ console.log('**** ', {
1031
+ templateList: templateDetail,
1032
+ value: value,
1033
+ form: form
1034
+ });
1035
+ afterSaleOrderBackValues({
1036
+ templateList: templateDetail,
1037
+ value: value,
1038
+ form: form
1039
+ });
1040
+ }
1005
1041
  if (activeLogisticsComponents && ['INPUT', 'EXPRESS_LOGISTICS_SELECT', 'BS_LOGISTICS'].includes(workOrderComponentType)) {
1006
1042
  setLogisticsInfo({
1007
1043
  logisticsMappingConfig: activeLogisticsComponents,
@@ -1403,7 +1439,7 @@ var FormRender = function FormRender(props, ref) {
1403
1439
  var _ref8 = (componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.status) || {},
1404
1440
  upgrade = _ref8.upgrade,
1405
1441
  created = _ref8.created;
1406
- if (['REISSUE_TRADE_ID', 'EXCHANGE_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID'].includes(workOrderComponentType)) {
1442
+ if (['REISSUE_TRADE_ID', 'EXCHANGE_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'SWAP_OUT_TRADE_ID'].includes(workOrderComponentType)) {
1407
1443
  // 售后单id、补发单id和换货单id默认值是可见不可编辑(2)
1408
1444
  if (typeof upgrade !== 'number') {
1409
1445
  upgrade = 2;
@@ -61,7 +61,7 @@ import Layout from "./components/Layout";
61
61
  var Text = Typography.Text,
62
62
  Link = Typography.Link;
63
63
  var FlowTemplateDetail = function FlowTemplateDetail(props) {
64
- var _currentNodeDetail$wo, _currentNodeDetail$no, _document, _document$cookie, _currentNodeDetail$wo2, _currentNodeDetail$no16, _shopList$find, _currentNodeDetail$no29, _currentNodeDetail$no30, _currentNodeDetail$wo30, _currentNodeDetail$wo31, _JSON$parse, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$wo34, _currentNodeDetail$wo35, _currentNodeDetail$wo36, _currentNodeDetail$no31, _currentNodeDetail$no32;
64
+ var _currentNodeDetail$wo, _currentNodeDetail$no, _document, _document$cookie, _currentNodeDetail$wo2, _currentNodeDetail$no16, _shopList$find, _currentNodeDetail$no29, _currentNodeDetail$no30, _currentNodeDetail$wo29, _currentNodeDetail$wo30, _JSON$parse, _currentNodeDetail$wo31, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$wo34, _currentNodeDetail$wo35, _currentNodeDetail$no31, _currentNodeDetail$no32;
65
65
  var flowTemplateKey = props.flowTemplateKey,
66
66
  _props$shopList = props.shopList,
67
67
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -80,6 +80,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
80
80
  callbackAutoSubmitResult = props.callbackAutoSubmitResult,
81
81
  _props$otherInfo = props.otherInfo,
82
82
  otherInfo = _props$otherInfo === void 0 ? {} : _props$otherInfo;
83
+ var autoFillThirdPartyFields = otherInfo.autoFillThirdPartyFields;
83
84
  var _useContext = useContext(Context),
84
85
  dispatch = _useContext.dispatch;
85
86
  var flowRecordList = useSelector(selectFlowRecordList);
@@ -1174,17 +1175,19 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1174
1175
  };
1175
1176
  useEffect(function () {
1176
1177
  if (autoSubmit && !isEmpty(currentNodeDetail)) {
1177
- var _currentNodeDetail$wo25, _currentNodeDetail$wo26;
1178
+ var _currentNodeDetail$wo25;
1178
1179
  // SKX首节点满足下列条件、此时批量提交会等订单数据反填再提交, 其余企业批量提交还是原先逻辑,不涉及订单数据反填
1179
- if (currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo25 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo25 !== void 0 && _currentNodeDetail$wo25.notAutoFillWithFirstSubmit && autoSubmitFlag) {
1180
+ // 优先使用外部传入的 autoFillThirdPartyFields,未传时降级使用 record 中的 notAutoFillWithFirstSubmit
1181
+ var effectiveAutoFill = autoFillThirdPartyFields !== undefined ? autoFillThirdPartyFields : currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo25 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo25 === void 0 ? void 0 : _currentNodeDetail$wo25.notAutoFillWithFirstSubmit;
1182
+ if (effectiveAutoFill && autoSubmitFlag) {
1180
1183
  autoSubmitFn();
1181
- } else if (!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo26 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo26 !== void 0 && _currentNodeDetail$wo26.notAutoFillWithFirstSubmit) && !autoSubmitFlag) {
1184
+ } else if (!effectiveAutoFill && !autoSubmitFlag) {
1182
1185
  autoSubmitFn();
1183
1186
  }
1184
1187
  }
1185
- }, [currentNodeDetail, autoSubmitFlag]);
1188
+ }, [currentNodeDetail, autoSubmitFlag, autoFillThirdPartyFields]);
1186
1189
  var isCurrentNodeHandler = useMemo(function () {
1187
- var _currentNodeDetail$no17, _currentNodeDetail$no18, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$no23, _currentNodeDetail$no24, _currentNodeDetail$wo27, _currentNodeDetail$no25, _currentNodeDetail$no26;
1190
+ var _currentNodeDetail$no17, _currentNodeDetail$no18, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$no23, _currentNodeDetail$no24, _currentNodeDetail$wo26, _currentNodeDetail$no25, _currentNodeDetail$no26;
1188
1191
  return currentUserHasOperatorAuth({
1189
1192
  isSuperAdmin: isSuperAdmin,
1190
1193
  assistantList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no17 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no17 === void 0 ? void 0 : _currentNodeDetail$no17.id) && assistantMap[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no18 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no18 === void 0 ? void 0 : _currentNodeDetail$no18.id] || [],
@@ -1192,7 +1195,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1192
1195
  currentUserKey: plat.userKey,
1193
1196
  staffIds: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : (_currentNodeDetail$no22 = _currentNodeDetail$no21.assistants) === null || _currentNodeDetail$no22 === void 0 ? void 0 : _currentNodeDetail$no22.staffIds) || [],
1194
1197
  operateDataPermission: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no23 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no23 === void 0 ? void 0 : (_currentNodeDetail$no24 = _currentNodeDetail$no23.assistants) === null || _currentNodeDetail$no24 === void 0 ? void 0 : _currentNodeDetail$no24.operateDataPermission,
1195
- handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo27 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo27 === void 0 ? void 0 : _currentNodeDetail$wo27.handlerList) || [],
1198
+ handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo26 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo26 === void 0 ? void 0 : _currentNodeDetail$wo26.handlerList) || [],
1196
1199
  isAllStaff: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no25 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no25 === void 0 ? void 0 : (_currentNodeDetail$no26 = _currentNodeDetail$no25.assistants) === null || _currentNodeDetail$no26 === void 0 ? void 0 : _currentNodeDetail$no26.isAllStaff
1197
1200
  });
1198
1201
  }, [currentNodeDetail, plat, assistantMap, useGroupMap]);
@@ -1201,9 +1204,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1201
1204
  return item.accessToken === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no27 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no27 === void 0 ? void 0 : (_currentNodeDetail$no28 = _currentNodeDetail$no27.relationEvent) === null || _currentNodeDetail$no28 === void 0 ? void 0 : _currentNodeDetail$no28.defaultShopUniqueKey);
1202
1205
  })) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopId;
1203
1206
  var ReportOrderRender = function ReportOrderRender(props) {
1204
- var _currentNodeDetail$wo28, _currentNodeDetail$wo29;
1207
+ var _currentNodeDetail$wo27, _currentNodeDetail$wo28;
1205
1208
  var details = props.details;
1206
- var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo28 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo28 === void 0 ? void 0 : _currentNodeDetail$wo28.componentDtoList.filter(function (t) {
1209
+ var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo27 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo27 === void 0 ? void 0 : _currentNodeDetail$wo27.componentDtoList.filter(function (t) {
1207
1210
  return !CANNOT_BACK_FILL.includes(t.workOrderComponentType || '');
1208
1211
  });
1209
1212
  //获取可以返填的组件值
@@ -1211,7 +1214,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1211
1214
  _calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
1212
1215
  transData = _calcWorkOrderList2[0];
1213
1216
  //获取表单显示值
1214
- var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo29 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo29 === void 0 ? void 0 : _currentNodeDetail$wo29.componentDtoList),
1217
+ var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo28 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo28 === void 0 ? void 0 : _currentNodeDetail$wo28.componentDtoList),
1215
1218
  _calcWorkOrderList4 = _slicedToArray(_calcWorkOrderList3, 1),
1216
1219
  transDataall = _calcWorkOrderList4[0];
1217
1220
  return /*#__PURE__*/React.createElement("div", {
@@ -1392,14 +1395,14 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1392
1395
  }, !follow ? '关注' : '已关注'), showImplementationEnter && /*#__PURE__*/React.createElement(Button, {
1393
1396
  onClick: openFeedbackModal,
1394
1397
  type: "link"
1395
- }, "\u5FEB\u901F\u521B\u5EFA\u5B9E\u65BD\u5DE5\u5355"), plat.platform === PlatForm.XIAOZHI && ['2'].includes(String(otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType)) && ((otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.buyerOpenUid) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo30 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo30 === void 0 ? void 0 : _currentNodeDetail$wo30.buyerOpenUid)) && /*#__PURE__*/React.createElement(JumpBuyer, {
1398
+ }, "\u5FEB\u901F\u521B\u5EFA\u5B9E\u65BD\u5DE5\u5355"), plat.platform === PlatForm.XIAOZHI && ['2'].includes(String(otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType)) && ((otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.buyerOpenUid) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo29 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo29 === void 0 ? void 0 : _currentNodeDetail$wo29.buyerOpenUid)) && /*#__PURE__*/React.createElement(JumpBuyer, {
1396
1399
  order_number: tid,
1397
1400
  shop: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.taobaoNick) || '',
1398
- buyer: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.buyerOpenUid) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo31 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : _currentNodeDetail$wo31.buyerOpenUid),
1401
+ buyer: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.buyerOpenUid) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo30 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo30 === void 0 ? void 0 : _currentNodeDetail$wo30.buyerOpenUid),
1399
1402
  platformType: otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType
1400
- })), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo32 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : (_currentNodeDetail$wo33 = _currentNodeDetail$wo32.jsonMap) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : _currentNodeDetail$wo33.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
1403
+ })), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo31 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : (_currentNodeDetail$wo32 = _currentNodeDetail$wo31.jsonMap) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : _currentNodeDetail$wo32.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
1401
1404
  color: "blue"
1402
- }, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo34 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo34 === void 0 ? void 0 : (_currentNodeDetail$wo35 = _currentNodeDetail$wo34.jsonMap) === null || _currentNodeDetail$wo35 === void 0 ? void 0 : _currentNodeDetail$wo35.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1405
+ }, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo33 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : (_currentNodeDetail$wo34 = _currentNodeDetail$wo33.jsonMap) === null || _currentNodeDetail$wo34 === void 0 ? void 0 : _currentNodeDetail$wo34.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1403
1406
  justify: 'space-between',
1404
1407
  className: "header"
1405
1408
  }, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("div", {
@@ -1468,7 +1471,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1468
1471
  isSuperAdmin: isSuperAdmin
1469
1472
  }));
1470
1473
  }), currentNodeDetail && /*#__PURE__*/React.createElement(Timeline.Item, {
1471
- key: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo36 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo36 === void 0 ? void 0 : _currentNodeDetail$wo36.id) || 'current-node'
1474
+ key: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo35 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo35 === void 0 ? void 0 : _currentNodeDetail$wo35.id) || 'current-node'
1472
1475
  }, /*#__PURE__*/React.createElement(CurrentNode, {
1473
1476
  ref: currentNodeRef,
1474
1477
  flowTemplateId: flowTemplateId,
@@ -67,32 +67,8 @@ export declare const WORK_ORDER_STATUS_AI_BUILD: {
67
67
  STOPPING: string;
68
68
  COMPLETED: string;
69
69
  };
70
- export declare const SKIP_NODE_TYPES_CONFIG: {
71
- GY_OBTAIN_REISSUE_OR_EXCHANGE_ORDER: {
72
- name: string;
73
- tips: string;
74
- };
75
- JST_REISSUE_WORK_ORDER: {
76
- name: string;
77
- tips: string;
78
- };
79
- KM_ERP_REISSUE_WORK_ORDER: {
80
- name: string;
81
- tips: string;
82
- };
83
- KM_ERP_EXCHANGE_WORK_ORDER: {
84
- name: string;
85
- tips: string;
86
- };
87
- JKY_REISSUE_WORK_ORDER: {
88
- name: string;
89
- tips: string;
90
- };
91
- REISSUE_LOGISTICS_SYNC: boolean;
92
- BS_E3_REISSUE_LOGISTICS_SYNC: boolean;
93
- WDT_LOGISTICS_SYNC: boolean;
94
- GY_REISSUE_LOGISTICS_SYNC: boolean;
95
- KUAI_MAI_REISSUE_LOGISTICS_SYNC: boolean;
96
- JST_REISSUE_LOGISTICS_SYNC: boolean;
97
- JY_REISSUE_LOGISTICS_SYNC: boolean;
98
- };
70
+ export declare const SKIP_NODE_TYPES_CONFIG: Record<string, boolean | {
71
+ name: string;
72
+ tips: string;
73
+ validateFn?: (params: any) => boolean;
74
+ }>;
@@ -90,32 +90,41 @@ export var WORK_ORDER_STATUS_AI_BUILD = (_WORK_ORDER_STATUS_AI = {}, _defineProp
90
90
 
91
91
  //支持跳过的节点类型
92
92
  export var SKIP_NODE_TYPES_CONFIG = {
93
- 'GY_OBTAIN_REISSUE_OR_EXCHANGE_ORDER': {
93
+ GY_OBTAIN_REISSUE_OR_EXCHANGE_ORDER: {
94
94
  name: '获取补发/换货单id(管易退货单接口补发/换货)',
95
95
  tips: '补发单id/换货单id'
96
96
  },
97
- 'JST_REISSUE_WORK_ORDER': {
97
+ JST_REISSUE_WORK_ORDER: {
98
98
  name: '补发(聚水潭)',
99
99
  tips: '补发单id'
100
100
  },
101
- 'KM_ERP_REISSUE_WORK_ORDER': {
101
+ KM_ERP_REISSUE_WORK_ORDER: {
102
102
  name: '补发(快麦ERP)',
103
103
  tips: '补发单id'
104
104
  },
105
- 'KM_ERP_EXCHANGE_WORK_ORDER': {
105
+ KM_ERP_EXCHANGE_WORK_ORDER: {
106
106
  name: '换货(快麦ERP)',
107
107
  tips: '换货单id'
108
108
  },
109
- 'JKY_REISSUE_WORK_ORDER': {
109
+ JKY_REISSUE_WORK_ORDER: {
110
110
  name: '补发(聚客云)',
111
111
  tips: '补发单id'
112
112
  },
113
113
  // 旺店通 系统订单号
114
- 'REISSUE_LOGISTICS_SYNC': true,
115
- 'BS_E3_REISSUE_LOGISTICS_SYNC': true,
116
- 'WDT_LOGISTICS_SYNC': true,
117
- 'GY_REISSUE_LOGISTICS_SYNC': true,
118
- 'KUAI_MAI_REISSUE_LOGISTICS_SYNC': true,
119
- 'JST_REISSUE_LOGISTICS_SYNC': true,
120
- 'JY_REISSUE_LOGISTICS_SYNC': true
114
+ REISSUE_LOGISTICS_SYNC: true,
115
+ BS_E3_REISSUE_LOGISTICS_SYNC: true,
116
+ WDT_LOGISTICS_SYNC: true,
117
+ GY_REISSUE_LOGISTICS_SYNC: true,
118
+ KUAI_MAI_REISSUE_LOGISTICS_SYNC: true,
119
+ JST_REISSUE_LOGISTICS_SYNC: true,
120
+ JY_REISSUE_LOGISTICS_SYNC: true,
121
+ WDT_RETURN_EXCHANGE_WORK_ORDER: {
122
+ name: '退换货(旺店通)',
123
+ tips: '系统订单号',
124
+ validateFn: function validateFn(nodeInfo) {
125
+ var _nodeInfo$relationEve;
126
+ //只有换货的时候支持跳过
127
+ return ((_nodeInfo$relationEve = nodeInfo.relationEvent) === null || _nodeInfo$relationEve === void 0 ? void 0 : _nodeInfo$relationEve.type) === 3;
128
+ }
129
+ }
121
130
  };
@@ -478,6 +478,13 @@ export var SUBMIT_COMPONENT_SYSTEM_ORDER_MAP = {
478
478
  ids: 'jkySystemSelectIds',
479
479
  order: 'jkySystemShowOrder',
480
480
  select: 'tradeNo'
481
+ },
482
+ PLATFORM_AFTER_SALES_ORDER: {
483
+ no: 'platformAfaterSalesOrderNo',
484
+ ids: 'platformAfaterSalesSelectIds',
485
+ order: 'platformAfaterSalesShowOrder',
486
+ select: 'platformAfaterSalesTradeNo',
487
+ shopId: 'platformAfaterSalesShopId'
481
488
  }
482
489
  };
483
490
  export var platformMap = {
@@ -734,6 +734,9 @@ var handleSystemOrder = function handleSystemOrder(_ref51) {
734
734
  select: (selectIds || []).includes(item === null || item === void 0 ? void 0 : item[SUBMIT_COMPONENT_SYSTEM_ORDER_MAP[type].select])
735
735
  });
736
736
  }));
737
+ if (SUBMIT_COMPONENT_SYSTEM_ORDER_MAP[type].shopId) {
738
+ addContent(SUBMIT_COMPONENT_SYSTEM_ORDER_MAP[type].shopId, getNowData("".concat(item.uniqueKey, ".shopId"), ''));
739
+ }
737
740
  };
738
741
  };
739
742
  var handleBuyerMessageNotice = function handleBuyerMessageNotice(_ref52) {
@@ -1114,6 +1117,7 @@ var processComponent = function processComponent(_ref63) {
1114
1117
  case 'JY_SYSTEM_ORDER':
1115
1118
  case 'JKY_SYSTEM_ORDER':
1116
1119
  case 'WDT_RETURN_BILL_NO':
1120
+ case 'PLATFORM_AFTER_SALES_ORDER':
1117
1121
  wrapFn(handleSystemOrder);
1118
1122
  break;
1119
1123
  case 'BUYER_MESSAGE_NOTICE':
@@ -1127,6 +1131,7 @@ var processComponent = function processComponent(_ref63) {
1127
1131
  break;
1128
1132
  case 'REISSUE_TRADE_ID':
1129
1133
  case 'EXCHANGE_TRADE_ID':
1134
+ case 'SWAP_OUT_TRADE_ID':
1130
1135
  wrapFn(handleErpTradeId);
1131
1136
  break;
1132
1137
  case 'ERP_AFTER_SALE_TRADE_ID':
@@ -86,6 +86,7 @@ export declare const deleteCacheOrder: ({ templateList, values, nodeId, flowTemp
86
86
  plat: any;
87
87
  unDeleteOrderInfo: boolean;
88
88
  }) => void;
89
+ export declare const afterSaleOrderBackValues: ({ templateList, value, form }: any) => void;
89
90
  export declare const wdtReturnBillNoBackValues: ({ templateList, value, form }: any) => void;
90
91
  export declare const bsSystemOrderBackValues: ({ templateList, value, form }: any) => void;
91
92
  export declare const bsE3SystemOrderBackValues: ({ templateList, value, form }: any) => void;