@kmkf-fe-packages/kmkf-work-order-service-component 2.2.37 → 2.2.38-rc.0

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 (33) hide show
  1. package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.d.ts +3 -1
  2. package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.js +65 -3
  3. package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +5 -3
  4. package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +67 -48
  5. package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.js +37 -18
  6. package/dist/esm/FlowTemplateDetailV2/components/Header/index.d.ts +1 -0
  7. package/dist/esm/FlowTemplateDetailV2/components/Header/index.js +48 -6
  8. package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +5 -3
  9. package/dist/esm/LBOrderDetail/detail/OrderInfo.d.ts +18 -0
  10. package/dist/esm/LBOrderDetail/detail/OrderInfo.js +631 -0
  11. package/dist/esm/LBOrderDetail/detail/ServiceProgress.d.ts +11 -0
  12. package/dist/esm/LBOrderDetail/detail/ServiceProgress.js +449 -0
  13. package/dist/esm/LBOrderDetail/detail/index.d.ts +12 -0
  14. package/dist/esm/LBOrderDetail/detail/index.js +50 -0
  15. package/dist/esm/LBOrderDetail/detail/index.module.less +63 -0
  16. package/dist/esm/LBOrderDetail/detail/services.d.ts +4 -0
  17. package/dist/esm/LBOrderDetail/detail/services.js +28 -0
  18. package/dist/esm/LBOrderDetail/detail/types.d.ts +383 -0
  19. package/dist/esm/LBOrderDetail/detail/types.js +1 -0
  20. package/dist/esm/LBOrderDetail/index.d.ts +14 -0
  21. package/dist/esm/LBOrderDetail/index.js +63 -0
  22. package/dist/esm/common/utils/constant.js +8 -0
  23. package/dist/esm/common/utils/submitDataTransOldFormat.js +40 -24
  24. package/dist/esm/common/utils/tools.d.ts +4 -0
  25. package/dist/esm/common/utils/tools.js +52 -1
  26. package/dist/esm/common/utils/transformWorkOrderData.js +7 -0
  27. package/dist/esm/hooks/useDoubleClick/index.d.ts +21 -0
  28. package/dist/esm/hooks/useDoubleClick/index.js +55 -0
  29. package/dist/esm/index.d.ts +3 -0
  30. package/dist/esm/index.js +3 -0
  31. package/dist/esm/model/flowTemplateDetail/types.d.ts +2 -0
  32. package/dist/esm/model/types/login.d.ts +1 -0
  33. package/package.json +5 -5
@@ -1,4 +1,6 @@
1
1
  import React from 'react';
2
- export declare const AutoTaskDetail: ({ flowEventData }: {
2
+ import type { Shop } from '../../../model/types/login';
3
+ export declare const AutoTaskDetail: ({ flowEventData, shopList, }: {
3
4
  flowEventData: any;
5
+ shopList: Shop[];
4
6
  }) => React.JSX.Element;
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { isNumber } from 'lodash';
3
- import { Divider } from 'antd';
3
+ import { Divider, Button } from 'antd';
4
+ import { LB } from '@kmkf-fe-packages/kmkf-work-order-service-component';
4
5
  export var AutoTaskDetail = function AutoTaskDetail(_ref) {
5
- var flowEventData = _ref.flowEventData;
6
+ var flowEventData = _ref.flowEventData,
7
+ shopList = _ref.shopList;
6
8
  var mapping = {
7
9
  0: '执行中',
8
10
  1: '部分成功',
@@ -13,6 +15,30 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
13
15
  6: '同时存在成功和失败且已完结',
14
16
  7: '等待业务执行'
15
17
  };
18
+ var repairOrderMapList = [{
19
+ name: '安装/维修单订单编号',
20
+ value: 'repairOrderNumber'
21
+ }, {
22
+ name: '安装/维修单订单ID',
23
+ value: 'repairOrderId'
24
+ }, {
25
+ name: '服务类型',
26
+ value: 'serviceType'
27
+ }, {
28
+ name: '服务状态',
29
+ value: 'serviceStatus',
30
+ color: '#1b5bf3'
31
+ }, {
32
+ name: '最新服务进度',
33
+ value: 'latestServiceProgress',
34
+ color: '#1b5bf3'
35
+ }, {
36
+ name: '最新服务进度时间',
37
+ value: 'latestServiceProgressTime'
38
+ }, {
39
+ name: '下单时间',
40
+ value: 'orderTime'
41
+ }];
16
42
  var eventStatus = flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventStatus;
17
43
  var renderRules = function renderRules() {
18
44
  var _flowEventData$eventD, _flowEventData$eventD2;
@@ -28,8 +54,44 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
28
54
  }))), /*#__PURE__*/React.createElement("p", null, item.remark));
29
55
  }));
30
56
  };
57
+ var renderRepairResult = function renderRepairResult() {
58
+ var _flowEventData$eventD6, _flowEventData$eventD7;
59
+ var repairData = (flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD6 = flowEventData.eventData) === null || _flowEventData$eventD6 === void 0 ? void 0 : (_flowEventData$eventD7 = _flowEventData$eventD6.otherBusinessData) === null || _flowEventData$eventD7 === void 0 ? void 0 : _flowEventData$eventD7.repairData) || {};
60
+ var repairOrderStatus = repairData.repairOrderStatus,
61
+ id = repairData.id;
62
+ var isSuccess = repairOrderStatus === '成功';
63
+ return /*#__PURE__*/React.createElement("div", null, id && /*#__PURE__*/React.createElement(LB.LBOrder, {
64
+ id: id,
65
+ activeKey: "orderInfo",
66
+ shopList: shopList,
67
+ btn: /*#__PURE__*/React.createElement(Button, {
68
+ style: {
69
+ padding: '4px 0'
70
+ },
71
+ type: "link"
72
+ }, "\u67E5\u770B\u8BE6\u60C5>>")
73
+ }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
74
+ style: {
75
+ marginBottom: '8px'
76
+ }
77
+ }, "\u5B89\u88C5/\u7EF4\u4FEE\u5355\u72B6\u6001:", /*#__PURE__*/React.createElement("span", {
78
+ style: {
79
+ color: isSuccess ? '#70B603' : '#D9001B'
80
+ }
81
+ }, repairOrderStatus)), isSuccess && (repairOrderMapList === null || repairOrderMapList === void 0 ? void 0 : repairOrderMapList.map(function (item) {
82
+ return /*#__PURE__*/React.createElement("p", {
83
+ style: {
84
+ marginBottom: '8px'
85
+ }
86
+ }, item.name, ":", /*#__PURE__*/React.createElement("span", {
87
+ style: {
88
+ color: (item === null || item === void 0 ? void 0 : item.color) || '#000'
89
+ }
90
+ }, repairData === null || repairData === void 0 ? void 0 : repairData[item.value]));
91
+ }))));
92
+ };
31
93
  // const renderReason = () => {
32
94
  // return <p>{ flowEventData?.eventData?.businessStatus?.map((item: any) => item?.remark)?.join(',') }</p>
33
95
  // }
34
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules());
96
+ return /*#__PURE__*/React.createElement("div", null, (flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventType) === 'LBDJ_ONE_PRICE_ORDER' ? renderRepairResult() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules()));
35
97
  };
@@ -284,7 +284,7 @@ var CurrentNode = function CurrentNode(props, ref) {
284
284
  }();
285
285
  var isArtificialNode = tag === 'artificial';
286
286
  var isAutoNode = tag === 'auto';
287
- 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);
287
+ 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(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : _currentNodeDetail$fl.eventType);
288
288
  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;
289
289
  // TODO: 决策节点给后端修复数据加了一个入口
290
290
  // @ts-ignore
@@ -310,7 +310,8 @@ var CurrentNode = function CurrentNode(props, ref) {
310
310
  handleRestartAutoTask: handleRestartAutoTask,
311
311
  flowTemplateKey: (operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey) || '',
312
312
  flowWorkOrderId: flowWorkOrderId || '',
313
- nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.id) || ''
313
+ nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.id) || '',
314
+ flowTemplateId: flowTemplateId
314
315
  }), /*#__PURE__*/React.createElement("div", {
315
316
  className: styles.formRenderContainer
316
317
  }, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no22 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no22 === void 0 ? void 0 : _currentNodeDetail$no22.nodeType) && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) && (flowStatus === FlowStatus.COMPLETED && !editing ? /*#__PURE__*/React.createElement(RenderDetail, {
@@ -341,7 +342,8 @@ var CurrentNode = function CurrentNode(props, ref) {
341
342
  firstOrderBackfill: flowStatus !== FlowStatus.COMPLETED,
342
343
  autoSubmit: autoSubmit
343
344
  })), isShowAutoNodeDetail && /*#__PURE__*/React.createElement(AutoTaskDetail, {
344
- flowEventData: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.flowEventData
345
+ flowEventData: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.flowEventData,
346
+ shopList: shopList
345
347
  })));
346
348
  };
347
349
  export default /*#__PURE__*/forwardRef(CurrentNode);
@@ -39,7 +39,7 @@ import { groupByPreNode, getCurrentNodeModifiedShowHideRule } from "./common";
39
39
  import { getCalculationComponentValue } from "../../../common/utils/arithmetic";
40
40
  import "./index.less";
41
41
  import { CHILD_FIELD_TYPE, CHILD_FIELD_VALUE } from "../../../common/constant";
42
- import { jsonParseSecurity, findComponentUniqueKeyByType } from "../../../common/utils/tools";
42
+ import { jsonParseSecurity, findComponentUniqueKeyByType, updateComponentToUpperCase } from "../../../common/utils/tools";
43
43
  import { NEED_CLEAR_FIELDS_WHEN_SHOP_ID_CHANGE } from "../../constant";
44
44
  import { Context } from "../../context";
45
45
  import { orderBackKmAddress } from "./constants";
@@ -649,7 +649,7 @@ var FormRender = function FormRender(props, ref) {
649
649
  // 商品组件映射
650
650
  var fillByShopId = function fillByShopId(shopId) {
651
651
  // PS: 增加setTimeout 为了让后续的items渲染,然后触发对应的映射
652
- console.log('fillByShopId', shopId);
652
+ // console.log('fillByShopId', shopId);
653
653
  setTimeout(function () {
654
654
  var shopUniqueKey = shopId ? shopIdToUniqueKeyMap[shopId] : '';
655
655
  shopUniqueKey && fillByMapping('SHOP_SELECT_MAPPING', shopUniqueKey);
@@ -962,31 +962,40 @@ var FormRender = function FormRender(props, ref) {
962
962
 
963
963
  //组件失焦事件
964
964
  var componentOnBlur = /*#__PURE__*/function () {
965
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value, type) {
965
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value, type, uniqueKey) {
966
966
  var promises;
967
967
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
968
968
  while (1) switch (_context6.prev = _context6.next) {
969
969
  case 0:
970
+ setTimeout(function () {
971
+ var allValue = form.getFieldsValue();
972
+ updateComponentToUpperCase({
973
+ componentDtoList: templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList,
974
+ allValues: allValue,
975
+ uniqueKey: uniqueKey,
976
+ form: form
977
+ });
978
+ }, 0);
970
979
  if (!(type === 'erpAfterSaleTradeId')) {
971
- _context6.next = 5;
980
+ _context6.next = 6;
972
981
  break;
973
982
  }
974
- _context6.next = 3;
983
+ _context6.next = 4;
975
984
  return onBlurErpAfterSaleTradeId({
976
985
  form: form,
977
986
  value: value,
978
987
  templateDetail: templateDetail,
979
988
  setKmLoading: setKmLoading
980
989
  });
981
- case 3:
982
- _context6.next = 48;
990
+ case 4:
991
+ _context6.next = 49;
983
992
  break;
984
- case 5:
993
+ case 6:
985
994
  if (!(type === 'expressLogisticsCode')) {
986
- _context6.next = 15;
995
+ _context6.next = 16;
987
996
  break;
988
997
  }
989
- _context6.next = 8;
998
+ _context6.next = 9;
990
999
  return onBlurExpressLogisticsCode({
991
1000
  form: form,
992
1001
  value: value,
@@ -994,21 +1003,21 @@ var FormRender = function FormRender(props, ref) {
994
1003
  setKmLoading: setKmLoading,
995
1004
  componentOnBlur: componentOnBlur
996
1005
  });
997
- case 8:
1006
+ case 9:
998
1007
  if (!['TR3E2FYXFZCFANVG6O6AALSM' //prod 斯凯奇
999
1008
  ].includes(companyKey)) {
1000
- _context6.next = 11;
1009
+ _context6.next = 12;
1001
1010
  break;
1002
1011
  }
1003
- _context6.next = 11;
1012
+ _context6.next = 12;
1004
1013
  return onBlurSkxLogisticsCode({
1005
1014
  form: form,
1006
1015
  value: value,
1007
1016
  templateDetail: templateDetail,
1008
1017
  componentOnBlur: componentOnBlur
1009
1018
  });
1010
- case 11:
1011
- _context6.next = 13;
1019
+ case 12:
1020
+ _context6.next = 14;
1012
1021
  return onBlurReturnLogisticsCode({
1013
1022
  form: form,
1014
1023
  value: value,
@@ -1016,15 +1025,15 @@ var FormRender = function FormRender(props, ref) {
1016
1025
  componentOnBlur: componentOnBlur,
1017
1026
  orderBackRule: 'outSid'
1018
1027
  });
1019
- case 13:
1020
- _context6.next = 48;
1028
+ case 14:
1029
+ _context6.next = 49;
1021
1030
  break;
1022
- case 15:
1031
+ case 16:
1023
1032
  if (!(type === 'returnLogisticsCode')) {
1024
- _context6.next = 20;
1033
+ _context6.next = 21;
1025
1034
  break;
1026
1035
  }
1027
- _context6.next = 18;
1036
+ _context6.next = 19;
1028
1037
  return onBlurReturnLogisticsCode({
1029
1038
  form: form,
1030
1039
  value: value,
@@ -1032,57 +1041,57 @@ var FormRender = function FormRender(props, ref) {
1032
1041
  componentOnBlur: componentOnBlur,
1033
1042
  orderBackRule: 'logisticsCode'
1034
1043
  });
1035
- case 18:
1036
- _context6.next = 48;
1044
+ case 19:
1045
+ _context6.next = 49;
1037
1046
  break;
1038
- case 20:
1047
+ case 21:
1039
1048
  if (!(type === 'skxOutboundNoticeNo')) {
1040
- _context6.next = 26;
1049
+ _context6.next = 27;
1041
1050
  break;
1042
1051
  }
1043
1052
  //[SKX]ON出库通知单号 返填
1044
1053
  console.log('skxOutboundNoticeNo', value);
1045
- _context6.next = 24;
1054
+ _context6.next = 25;
1046
1055
  return onBlurSkxOutboundNoticeNo({
1047
1056
  form: form,
1048
1057
  value: value,
1049
1058
  templateDetail: templateDetail,
1050
1059
  componentOnBlur: componentOnBlur
1051
1060
  });
1052
- case 24:
1053
- _context6.next = 48;
1061
+ case 25:
1062
+ _context6.next = 49;
1054
1063
  break;
1055
- case 26:
1064
+ case 27:
1056
1065
  if (!(type === 'skxReturnBillNo')) {
1057
- _context6.next = 31;
1066
+ _context6.next = 32;
1058
1067
  break;
1059
1068
  }
1060
- _context6.next = 29;
1069
+ _context6.next = 30;
1061
1070
  return onBlurSkxReturnBillNo({
1062
1071
  form: form,
1063
1072
  value: value,
1064
1073
  templateDetail: templateDetail,
1065
1074
  componentOnBlur: componentOnBlur
1066
1075
  });
1067
- case 29:
1068
- _context6.next = 48;
1076
+ case 30:
1077
+ _context6.next = 49;
1069
1078
  break;
1070
- case 31:
1079
+ case 32:
1071
1080
  if (!(type === 'skxReturnTHLogisticsCode')) {
1072
- _context6.next = 36;
1081
+ _context6.next = 37;
1073
1082
  break;
1074
1083
  }
1075
- _context6.next = 34;
1084
+ _context6.next = 35;
1076
1085
  return onBlurSkxReturnTHLogisticsCode({
1077
1086
  form: form,
1078
1087
  value: value,
1079
1088
  templateDetail: templateDetail,
1080
1089
  componentOnBlur: componentOnBlur
1081
1090
  });
1082
- case 34:
1083
- _context6.next = 48;
1091
+ case 35:
1092
+ _context6.next = 49;
1084
1093
  break;
1085
- case 36:
1094
+ case 37:
1086
1095
  // 收集所有需要执行的异步操作
1087
1096
  promises = [];
1088
1097
  if (type === 'tradeId') {
@@ -1094,7 +1103,7 @@ var FormRender = function FormRender(props, ref) {
1094
1103
  promises.push(handleChangeTradeId(value));
1095
1104
  }
1096
1105
  if (value) {
1097
- _context6.next = 43;
1106
+ _context6.next = 44;
1098
1107
  break;
1099
1108
  }
1100
1109
  setReplaceValue(function (prev) {
@@ -1105,24 +1114,24 @@ var FormRender = function FormRender(props, ref) {
1105
1114
  });
1106
1115
  replaceValueRef.current = _objectSpread(_objectSpread({}, replaceValue), {}, _defineProperty({}, type, 0));
1107
1116
  return _context6.abrupt("return");
1108
- case 43:
1117
+ case 44:
1109
1118
  promises.push(queryReplaceCount(_defineProperty({}, type, value), templateDetail));
1110
1119
  // TODO: ERP不走订单反弹逻辑
1111
1120
  if ((type === 'tradeId' || type === 'enterprisePaymentTid') && !isErpUse) {
1112
1121
  promises.push(changeHandle(value));
1113
1122
  }
1114
1123
  // 等待所有异步操作完成
1115
- _context6.next = 47;
1124
+ _context6.next = 48;
1116
1125
  return Promise.all(promises);
1117
- case 47:
1118
- return _context6.abrupt("return", Promise.resolve());
1119
1126
  case 48:
1127
+ return _context6.abrupt("return", Promise.resolve());
1128
+ case 49:
1120
1129
  case "end":
1121
1130
  return _context6.stop();
1122
1131
  }
1123
1132
  }, _callee6);
1124
1133
  }));
1125
- return function componentOnBlur(_x10, _x11) {
1134
+ return function componentOnBlur(_x10, _x11, _x12) {
1126
1135
  return _ref7.apply(this, arguments);
1127
1136
  };
1128
1137
  }();
@@ -1431,7 +1440,9 @@ var FormRender = function FormRender(props, ref) {
1431
1440
  currentComponentDisplayStatus.current[instance === null || instance === void 0 ? void 0 : instance.id] = show;
1432
1441
  checkFillMapping(show, uniqueKey, workOrderComponentType);
1433
1442
  return instance.editRender({
1434
- onBlur: componentOnBlur,
1443
+ onBlur: function onBlur(value, type) {
1444
+ return componentOnBlur(value, type, uniqueKey);
1445
+ },
1435
1446
  onChange: function onChange(value, type) {
1436
1447
  return componentOnValueChange(uniqueKey, value, workOrderComponentType, type);
1437
1448
  },
@@ -1443,7 +1454,9 @@ var FormRender = function FormRender(props, ref) {
1443
1454
  });
1444
1455
  }
1445
1456
  return instance.editRender({
1446
- onBlur: componentOnBlur,
1457
+ onBlur: function onBlur(value, type) {
1458
+ return componentOnBlur(value, type, uniqueKey);
1459
+ },
1447
1460
  onChange: function onChange(value, type) {
1448
1461
  return componentOnValueChange(uniqueKey, value, workOrderComponentType, type);
1449
1462
  },
@@ -1499,7 +1512,7 @@ var FormRender = function FormRender(props, ref) {
1499
1512
  return item.workOrderComponentType === 'NUMERICAL_CALCULATION';
1500
1513
  });
1501
1514
  }, [templateDetail]);
1502
- var handleWatchFormValueChange = function handleWatchFormValueChange() {
1515
+ var handleWatchFormValueChange = function handleWatchFormValueChange(changedValues) {
1503
1516
  var componentShowMap = currentTemplateAllComponentsDisplay.current;
1504
1517
  var allValues = form.getFieldsValue(true);
1505
1518
  var formValue = {};
@@ -1517,6 +1530,13 @@ var FormRender = function FormRender(props, ref) {
1517
1530
 
1518
1531
  //缓存防止bs商品组件联动返填获取不到值
1519
1532
  setTimeout(function () {
1533
+ //部分组件小写改成大写
1534
+ // updateComponentToUpperCase({
1535
+ // componentDtoList: templateDetail?.componentDtoList,
1536
+ // allValues,
1537
+ // changedValues,
1538
+ // form,
1539
+ // });
1520
1540
  changeValuesCacheOrderInfo(_objectSpread(_objectSpread({}, form.getFieldsValue()), formValue), templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList);
1521
1541
  });
1522
1542
  };
@@ -1611,7 +1631,6 @@ var FormRender = function FormRender(props, ref) {
1611
1631
  shopId: shopId
1612
1632
  }));
1613
1633
  var shopNameDisabled = useMemo(function () {
1614
- console.log(isStartNodeWaiting, canEditShopName, look, workOrderId);
1615
1634
  if (isStartNodeWaiting && !look) {
1616
1635
  return false;
1617
1636
  }
@@ -47,7 +47,7 @@ export var onBlurErpAfterSaleTradeId = /*#__PURE__*/function () {
47
47
  export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
48
48
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref3) {
49
49
  var _kmErpVideoComponent$2;
50
- var form, value, templateDetail, setKmLoading, componentOnBlur, _ref3$onlyGetTid, onlyGetTid, _ref3$needTradeIdOrde, needTradeIdOrderBack, hasTradeIdComponent, kmErpVideoComponent, _res$data, hasKm, hasWdt, userInfo, _userInfo$companyUser, _companyUserConfig$pl, _companyUserConfig, _companyUserConfig$pl2, _companyUserConfig$pl3, _companyUserConfig$pl4, _companyUserConfig2, _companyUserConfig2$p, _companyUserConfig2$p2, companyUserConfig, oldValue, res, tradeId, blurPromise;
50
+ var form, value, templateDetail, setKmLoading, componentOnBlur, _ref3$onlyGetTid, onlyGetTid, _ref3$needTradeIdOrde, needTradeIdOrderBack, hasTradeIdComponent, kmErpVideoComponent, _res$data, _tradeIdComponent$com, hasKm, hasWdt, userInfo, _userInfo$companyUser, _companyUserConfig$pl, _companyUserConfig, _companyUserConfig$pl2, _companyUserConfig$pl3, _companyUserConfig$pl4, _companyUserConfig2, _companyUserConfig2$p, _companyUserConfig2$p2, companyUserConfig, oldValue, res, tradeId, tradeIdComponent, newTradeId, blurPromise;
51
51
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
52
52
  while (1) switch (_context2.prev = _context2.next) {
53
53
  case 0:
@@ -72,7 +72,7 @@ export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
72
72
  });
73
73
  case 6:
74
74
  if (!hasTradeIdComponent) {
75
- _context2.next = 35;
75
+ _context2.next = 37;
76
76
  break;
77
77
  }
78
78
  hasKm = false;
@@ -141,24 +141,28 @@ export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
141
141
  }
142
142
  return _context2.abrupt("return");
143
143
  case 28:
144
+ tradeIdComponent = templateDetail.componentDtoList.find(function (item) {
145
+ return item.workOrderComponentType === 'TRADE_ID_INPUT';
146
+ });
147
+ newTradeId = tradeIdComponent !== null && tradeIdComponent !== void 0 && (_tradeIdComponent$com = tradeIdComponent.componentConfig) !== null && _tradeIdComponent$com !== void 0 && _tradeIdComponent$com.toUpperCase ? tradeId.toUpperCase() : tradeId;
144
148
  form.setFieldsValue({
145
- m3ap1EvEyd: tradeId
149
+ m3ap1EvEyd: newTradeId
146
150
  });
147
151
  if (!needTradeIdOrderBack) {
148
- _context2.next = 33;
152
+ _context2.next = 35;
149
153
  break;
150
154
  }
151
155
  // 创建一个异步操作的Promise
152
156
  blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
153
- _context2.next = 33;
157
+ _context2.next = 35;
154
158
  return blurPromise;
155
- case 33:
159
+ case 35:
156
160
  // 所有异步操作完成后执行
157
161
  form.setFieldsValue({
158
162
  '0eVTfMGEyd': oldValue
159
163
  });
160
164
  return _context2.abrupt("return", res.data);
161
- case 35:
165
+ case 37:
162
166
  case "end":
163
167
  return _context2.stop();
164
168
  }
@@ -262,7 +266,8 @@ export var onBlurSkxOutboundNoticeNo = /*#__PURE__*/function () {
262
266
  onBillNo: value
263
267
  }).then( /*#__PURE__*/function () {
264
268
  var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(res) {
265
- var data, tradeId, blurPromise, values;
269
+ var _tradeIdComponent$com2;
270
+ var data, tradeId, blurPromise, values, tradeIdComponent, newTradeId;
266
271
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
267
272
  while (1) switch (_context5.prev = _context5.next) {
268
273
  case 0:
@@ -292,12 +297,16 @@ export var onBlurSkxOutboundNoticeNo = /*#__PURE__*/function () {
292
297
  form: form,
293
298
  isReverseFilling: false
294
299
  });
300
+ tradeIdComponent = templateDetail.componentDtoList.find(function (item) {
301
+ return item.workOrderComponentType === 'TRADE_ID_INPUT';
302
+ });
303
+ newTradeId = tradeIdComponent !== null && tradeIdComponent !== void 0 && (_tradeIdComponent$com2 = tradeIdComponent.componentConfig) !== null && _tradeIdComponent$com2 !== void 0 && _tradeIdComponent$com2.toUpperCase ? tradeId.toUpperCase() : tradeId;
295
304
  form.setFieldsValue(_objectSpread(_objectSpread({}, values || {}), {}, {
296
- m3ap1EvEyd: tradeId,
297
- '78CADF2951': value
305
+ m3ap1EvEyd: newTradeId,
306
+ '78CADF2951': value.toUpperCase()
298
307
  }));
299
308
  return _context5.abrupt("return", res.data);
300
- case 11:
309
+ case 13:
301
310
  case "end":
302
311
  return _context5.stop();
303
312
  }
@@ -337,7 +346,8 @@ export var onBlurSkxReturnBillNo = /*#__PURE__*/function () {
337
346
  returnBillNo: value
338
347
  }).then( /*#__PURE__*/function () {
339
348
  var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(res) {
340
- var data, tradeId, blurPromise, values;
349
+ var _tradeIdComponent$com3;
350
+ var data, tradeId, blurPromise, values, tradeIdComponent, newTradeId;
341
351
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
342
352
  while (1) switch (_context7.prev = _context7.next) {
343
353
  case 0:
@@ -367,12 +377,16 @@ export var onBlurSkxReturnBillNo = /*#__PURE__*/function () {
367
377
  form: form,
368
378
  isReverseFilling: false
369
379
  });
380
+ tradeIdComponent = templateDetail.componentDtoList.find(function (item) {
381
+ return item.workOrderComponentType === 'TRADE_ID_INPUT';
382
+ });
383
+ newTradeId = tradeIdComponent !== null && tradeIdComponent !== void 0 && (_tradeIdComponent$com3 = tradeIdComponent.componentConfig) !== null && _tradeIdComponent$com3 !== void 0 && _tradeIdComponent$com3.toUpperCase ? tradeId.toUpperCase() : tradeId;
370
384
  form.setFieldsValue(_objectSpread(_objectSpread({}, values || {}), {}, {
371
- m3ap1EvEyd: tradeId,
372
- fe10d6f36b: value
385
+ m3ap1EvEyd: newTradeId,
386
+ fe10d6f36b: value.toUpperCase()
373
387
  }));
374
388
  return _context7.abrupt("return", res.data);
375
- case 11:
389
+ case 13:
376
390
  case "end":
377
391
  return _context7.stop();
378
392
  }
@@ -421,7 +435,8 @@ export var onBlurSkxLogisticsCode = /*#__PURE__*/function () {
421
435
  expressCode: value
422
436
  }).then( /*#__PURE__*/function () {
423
437
  var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(res) {
424
- var data, tradeId, oldValue, blurPromise;
438
+ var _tradeIdComponent$com4;
439
+ var data, tradeId, oldValue, blurPromise, tradeIdComponent, newTradeId;
425
440
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
426
441
  while (1) switch (_context9.prev = _context9.next) {
427
442
  case 0:
@@ -443,11 +458,15 @@ export var onBlurSkxLogisticsCode = /*#__PURE__*/function () {
443
458
  _context9.next = 9;
444
459
  return blurPromise;
445
460
  case 9:
461
+ tradeIdComponent = templateDetail.componentDtoList.find(function (item) {
462
+ return item.workOrderComponentType === 'TRADE_ID_INPUT';
463
+ });
464
+ newTradeId = tradeIdComponent !== null && tradeIdComponent !== void 0 && (_tradeIdComponent$com4 = tradeIdComponent.componentConfig) !== null && _tradeIdComponent$com4 !== void 0 && _tradeIdComponent$com4.toUpperCase ? tradeId.toUpperCase() : tradeId;
446
465
  form.setFieldsValue({
447
- m3ap1EvEyd: tradeId,
466
+ m3ap1EvEyd: newTradeId,
448
467
  '0eVTfMGEyd': oldValue
449
468
  });
450
- case 10:
469
+ case 12:
451
470
  case "end":
452
471
  return _context9.stop();
453
472
  }
@@ -23,6 +23,7 @@ interface HeaderProps {
23
23
  flowTemplateKey: string;
24
24
  nodeId: string;
25
25
  flowWorkOrderId: string;
26
+ flowTemplateId: string;
26
27
  }
27
28
  declare const Header: (props: HeaderProps) => React.JSX.Element;
28
29
  export default Header;
@@ -7,10 +7,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState } from 'react';
8
8
  import { Button, Spin, Tooltip, Typography, Space, Modal, Table } from 'antd';
9
9
  import moment from 'moment';
10
- import { useRequest } from 'ahooks';
10
+ import { useRequest, useToggle } from 'ahooks';
11
11
  import { useSelector } from "../../context/useSelector";
12
12
  import { selectPrivilege } from "../../store/selector";
13
- import { queryFlowFail } from "../../../model/flowTemplateDetail/api";
13
+ import { queryFlowFail, queryNodeDetail } from "../../../model/flowTemplateDetail/api";
14
+ import { useDoubleClick } from "../../../hooks/useDoubleClick/index";
14
15
  import { NODE_TYPE } from "../../../common/constant";
15
16
  import styles from "./index.module.less";
16
17
  var Text = Typography.Text;
@@ -31,7 +32,7 @@ var columns = [{
31
32
  width: '550px'
32
33
  }];
33
34
  var Header = function Header(props) {
34
- var _NODE_TYPE$tag, _NODE_TYPE$tag2, _data$data;
35
+ var _NODE_TYPE$tag, _NODE_TYPE$tag2, _data$data, _nodeDetail$data, _nodeDetail$data$flow;
35
36
  var tag = props.tag,
36
37
  nodeName = props.nodeName,
37
38
  showLook = props.showLook,
@@ -61,12 +62,31 @@ var Header = function Header(props) {
61
62
  handleRestartAutoTask = props.handleRestartAutoTask,
62
63
  flowTemplateKey = props.flowTemplateKey,
63
64
  nodeId = props.nodeId,
64
- flowWorkOrderId = props.flowWorkOrderId;
65
+ flowWorkOrderId = props.flowWorkOrderId,
66
+ flowTemplateId = props.flowTemplateId;
65
67
  var _useState = useState(false),
66
68
  _useState2 = _slicedToArray(_useState, 2),
67
69
  visible = _useState2[0],
68
70
  setVisible = _useState2[1];
71
+ var _useToggle = useToggle(false),
72
+ _useToggle2 = _slicedToArray(_useToggle, 2),
73
+ nodeInfoVisible = _useToggle2[0],
74
+ toggleNodeInfoVisible = _useToggle2[1].toggle;
69
75
  var privilege = useSelector(selectPrivilege);
76
+ var handleDoubleClick = useDoubleClick({
77
+ interval: 300,
78
+ // 可选,默认 300ms
79
+ onDoubleClick: function onDoubleClick(event) {
80
+ if (tag === 'judge') return;
81
+ toggleNodeInfoVisible();
82
+ if (tag === 'auto') {
83
+ requestNodeDetail();
84
+ }
85
+ },
86
+ onClick: function onClick(event) {
87
+ console.log('单击事件', event);
88
+ }
89
+ });
70
90
  var _useRequest = useRequest(function () {
71
91
  return queryFlowFail({
72
92
  flowTemplateKeys: [flowTemplateKey],
@@ -79,6 +99,18 @@ var Header = function Header(props) {
79
99
  requestLoading = _useRequest.loading,
80
100
  run = _useRequest.run,
81
101
  data = _useRequest.data;
102
+ var _useRequest2 = useRequest(function () {
103
+ return queryNodeDetail({
104
+ nodeId: nodeId,
105
+ flowTemplateId: flowTemplateId,
106
+ flowWorkOrderId: flowWorkOrderId
107
+ });
108
+ }, {
109
+ manual: true
110
+ }),
111
+ queryNodeDetailLoading = _useRequest2.loading,
112
+ requestNodeDetail = _useRequest2.run,
113
+ nodeDetail = _useRequest2.data;
82
114
  var handleLookAbnormal = function handleLookAbnormal() {
83
115
  run();
84
116
  setVisible(true);
@@ -96,7 +128,9 @@ var Header = function Header(props) {
96
128
  }, "".concat(nodeName, " ").concat(handler ? "(".concat(handleLabel, ": ").concat(handler, ")") : ''))
97
129
  }, /*#__PURE__*/React.createElement("span", {
98
130
  className: styles.nodeName
99
- }, /*#__PURE__*/React.createElement("span", null, nodeName), handler && /*#__PURE__*/React.createElement("span", {
131
+ }, /*#__PURE__*/React.createElement("span", {
132
+ onClick: handleDoubleClick
133
+ }, nodeName), handler && /*#__PURE__*/React.createElement("span", {
100
134
  className: styles.handler
101
135
  }, "(".concat(handleLabel, ": ").concat(handler, ")")))), /*#__PURE__*/React.createElement("div", {
102
136
  className: styles.loadingWrap
@@ -170,6 +204,14 @@ var Header = function Header(props) {
170
204
  x: 850,
171
205
  y: 300
172
206
  }
173
- }))));
207
+ })), /*#__PURE__*/React.createElement(Modal, {
208
+ title: "\u8282\u70B9\u4FE1\u606F",
209
+ onOk: toggleNodeInfoVisible,
210
+ onCancel: toggleNodeInfoVisible,
211
+ visible: nodeInfoVisible,
212
+ footer: null
213
+ }, /*#__PURE__*/React.createElement(Spin, {
214
+ spinning: queryNodeDetailLoading
215
+ }, /*#__PURE__*/React.createElement("p", null, "\u6D41\u7A0B\u5DE5\u5355ID: ", flowWorkOrderId), tag === 'artificial' && /*#__PURE__*/React.createElement("p", null, "\u6D41\u7A0B\u6A21\u677FID: ", flowTemplateId), /*#__PURE__*/React.createElement("p", null, "\u6D41\u7A0B\u6A21\u677FKey: ", flowTemplateKey), /*#__PURE__*/React.createElement("p", null, "\u8282\u70B9ID: ", nodeId), tag === 'auto' && /*#__PURE__*/React.createElement("p", null, "\u81EA\u52A8\u5316\u4EFB\u52A1ID: ", nodeDetail === null || nodeDetail === void 0 ? void 0 : (_nodeDetail$data = nodeDetail.data) === null || _nodeDetail$data === void 0 ? void 0 : (_nodeDetail$data$flow = _nodeDetail$data.flowEventData) === null || _nodeDetail$data$flow === void 0 ? void 0 : _nodeDetail$data$flow.uniqueKey)))));
174
216
  };
175
217
  export default Header;