@kmkf-fe-packages/kmkf-work-order-service-component 2.10.26 → 2.10.29

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.
@@ -15,6 +15,7 @@ declare type CurrentNodeProps = {
15
15
  autoSubmit?: boolean;
16
16
  isSuperAdmin?: boolean;
17
17
  autoFillThirdPartyFields?: boolean;
18
+ startNodeId?: string;
18
19
  };
19
20
  declare const _default: React.ForwardRefExoticComponent<CurrentNodeProps & React.RefAttributes<unknown>>;
20
21
  export default _default;
@@ -47,7 +47,7 @@ var retryDefaultValues = {
47
47
  willSkipCheck: false
48
48
  };
49
49
  var CurrentNode = function CurrentNode(props, ref) {
50
- var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _localStorage, _currentNodeDetail$no18, _currentNodeDetail$fl, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no22, _currentNodeDetail$no23, _currentNodeDetail$no24, _currentNodeDetail$wo22, _currentNodeDetail$no25, _currentNodeDetail$wo23;
50
+ var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _localStorage, _currentNodeDetail$fl, _currentNodeDetail$wo8, _currentNodeDetail$wo9, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$wo18, _currentNodeDetail$no22, _currentNodeDetail$wo19;
51
51
  var formRenderRef = useRef(null);
52
52
  useImperativeHandle(ref, function () {
53
53
  return {
@@ -74,7 +74,8 @@ var CurrentNode = function CurrentNode(props, ref) {
74
74
  queryRemarkList = props.queryRemarkList,
75
75
  autoSubmit = props.autoSubmit,
76
76
  onJumpPage = props.onJumpPage,
77
- autoFillThirdPartyFields = props.autoFillThirdPartyFields;
77
+ autoFillThirdPartyFields = props.autoFillThirdPartyFields,
78
+ startNodeId = props.startNodeId;
78
79
  var _useContext = useContext(Context),
79
80
  dispatch = _useContext.dispatch;
80
81
  var _Form$useForm = Form.useForm(),
@@ -108,21 +109,10 @@ var CurrentNode = function CurrentNode(props, ref) {
108
109
  var assistantMap = useSelector(selectNodeAssistantMap);
109
110
  var useGroupMap = useSelector(selectNodeUserGroupMap);
110
111
  var isDeveloperMode = typeof localStorage !== 'undefined' && ((_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('__isDEV__')) === 'true';
111
- var tradeKey = useMemo(function () {
112
- var _currentNodeDetail$wo, _currentNodeDetail$wo2, _currentNodeDetail$wo3, _currentNodeDetail$wo4;
113
- var tradeConfig = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo === void 0 ? void 0 : (_currentNodeDetail$wo2 = _currentNodeDetail$wo.componentDtoList) === null || _currentNodeDetail$wo2 === void 0 ? void 0 : _currentNodeDetail$wo2.find(function (item) {
114
- return (item === null || item === void 0 ? void 0 : item.workOrderComponentType) === 'TRADE_ID_INPUT';
115
- });
116
- var paymentConfig = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo3 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo3 === void 0 ? void 0 : (_currentNodeDetail$wo4 = _currentNodeDetail$wo3.componentDtoList) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.find(function (item) {
117
- return (item === null || item === void 0 ? void 0 : item.workOrderComponentType) === 'ENTERPRISE_PAYMENT';
118
- });
119
- if (tradeConfig) return "".concat(tradeConfig === null || tradeConfig === void 0 ? void 0 : tradeConfig.uniqueKey, "_tradeId");
120
- if (paymentConfig) return "".concat(paymentConfig === null || paymentConfig === void 0 ? void 0 : paymentConfig.uniqueKey, "_enterprisePaymentTid");
121
- }, [currentNodeDetail]);
122
112
 
123
113
  // 是否是当前节点处理人
124
114
  var isCurrentNodeHandler = useMemo(function () {
125
- var _currentNodeDetail$no5, _currentNodeDetail$no6, _currentNodeDetail$no7, _currentNodeDetail$no8, _currentNodeDetail$no9, _currentNodeDetail$no10, _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$wo5, _currentNodeDetail$no13, _currentNodeDetail$no14;
115
+ var _currentNodeDetail$no5, _currentNodeDetail$no6, _currentNodeDetail$no7, _currentNodeDetail$no8, _currentNodeDetail$no9, _currentNodeDetail$no10, _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$wo, _currentNodeDetail$no13, _currentNodeDetail$no14;
126
116
  return currentUserHasOperatorAuth({
127
117
  isSuperAdmin: props === null || props === void 0 ? void 0 : props.isSuperAdmin,
128
118
  assistantList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no5 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no5 === void 0 ? void 0 : _currentNodeDetail$no5.id) && assistantMap[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no6 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no6 === void 0 ? void 0 : _currentNodeDetail$no6.id] || [],
@@ -130,18 +120,12 @@ var CurrentNode = function CurrentNode(props, ref) {
130
120
  currentUserKey: plat.userKey,
131
121
  staffIds: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : (_currentNodeDetail$no10 = _currentNodeDetail$no9.assistants) === null || _currentNodeDetail$no10 === void 0 ? void 0 : _currentNodeDetail$no10.staffIds) || [],
132
122
  operateDataPermission: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no11 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no11 === void 0 ? void 0 : (_currentNodeDetail$no12 = _currentNodeDetail$no11.assistants) === null || _currentNodeDetail$no12 === void 0 ? void 0 : _currentNodeDetail$no12.operateDataPermission,
133
- handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo5 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo5 === void 0 ? void 0 : _currentNodeDetail$wo5.handlerList) || [],
123
+ handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo === void 0 ? void 0 : _currentNodeDetail$wo.handlerList) || [],
134
124
  isAllStaff: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no13 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no13 === void 0 ? void 0 : (_currentNodeDetail$no14 = _currentNodeDetail$no13.assistants) === null || _currentNodeDetail$no14 === void 0 ? void 0 : _currentNodeDetail$no14.isAllStaff
135
125
  });
136
126
  }, [currentNodeDetail, plat.userKey, assistantMap]);
137
- var handleChangeTradeId = useMemoizedFn(function (tid) {
138
- var _currentNodeDetail$no15;
139
- // 非开始节点不进行订单重复校验逻辑
140
- if ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no15 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no15 === void 0 ? void 0 : _currentNodeDetail$no15.nodeType) !== NodeType.START_NODE) {
141
- return;
142
- }
127
+ var queryTradeIdLinkWorkOrder = useMemoizedFn(function (tid) {
143
128
  if (!tid) {
144
- // 当订单号清空时,需要将外层的订单已录入数量情况
145
129
  dispatch({
146
130
  type: 'setCurrentTradeIdWOrkOrderNumber',
147
131
  payload: {
@@ -149,50 +133,62 @@ var CurrentNode = function CurrentNode(props, ref) {
149
133
  workOrderList: []
150
134
  }
151
135
  });
152
- } else {
153
- var _currentNodeDetail$no16;
154
- // 查询当前订单号有多少的重复
155
- var params = {
156
- flowNodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no16 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no16 === void 0 ? void 0 : _currentNodeDetail$no16.id,
157
- flowTemplateKey: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey,
158
- desensitizedFlag: false,
159
- pageNo: 1,
160
- pageSize: 100,
161
- queryComponents: [{
162
- key: "".concat(tradeKey),
163
- symbol: 'in',
164
- value: [tid]
165
- }],
166
- sortFields: [{
167
- direction: 'DESC',
168
- fieldName: 'update'
169
- }]
170
- };
171
- dispatch(fetchCurrentTradeIdLinkWorkOrder(params));
136
+ return;
137
+ }
138
+ if (!startNodeId || !(operateParams !== null && operateParams !== void 0 && operateParams.flowTemplateKey)) {
139
+ return;
172
140
  }
141
+ var params = {
142
+ // 重复订单号存放在开始节点工单中,后续节点也按开始节点查询,避免同一流程的多个节点重复计数
143
+ flowNodeId: startNodeId,
144
+ flowTemplateKey: operateParams.flowTemplateKey,
145
+ desensitizedFlag: false,
146
+ pageNo: 1,
147
+ pageSize: 100,
148
+ queryComponents: [{
149
+ key: 'tid',
150
+ symbol: 'in',
151
+ value: [tid]
152
+ }].concat(_toConsumableArray(flowWorkOrderId ? [{
153
+ key: 'flowWorkOrderId',
154
+ symbol: 'nin',
155
+ value: [flowWorkOrderId]
156
+ }] : [])),
157
+ sortFields: [{
158
+ direction: 'DESC',
159
+ fieldName: 'update'
160
+ }]
161
+ };
162
+ dispatch(fetchCurrentTradeIdLinkWorkOrder(params));
173
163
  });
174
- // 当前节点是开始节点、并且携带订单号时,此时会进行订单重复提醒
175
- useEffect(function () {
176
- var _currentNodeDetail$no17;
177
- if (plat.orderNo && NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no17 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no17 === void 0 ? void 0 : _currentNodeDetail$no17.nodeType) && operateParams !== null && operateParams !== void 0 && operateParams.flowTemplateKey && tradeKey) {
178
- handleChangeTradeId(plat.orderNo);
164
+ var handleChangeTradeId = useMemoizedFn(function (tid) {
165
+ var _currentNodeDetail$no15;
166
+ // 只有开始节点编辑订单号时实时刷新;其他节点使用流程面板中的 tid 初始化查询
167
+ if ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no15 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no15 === void 0 ? void 0 : _currentNodeDetail$no15.nodeType) !== NodeType.START_NODE) {
168
+ return;
179
169
  }
180
- }, [plat.orderNo, operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey, currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no18 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no18 === void 0 ? void 0 : _currentNodeDetail$no18.nodeType, tradeKey]);
170
+ queryTradeIdLinkWorkOrder(tid);
171
+ });
172
+
173
+ // 流程进入任意节点后,都根据流程级订单号展示重复工单提醒
174
+ useEffect(function () {
175
+ queryTradeIdLinkWorkOrder(currentNodeTid || plat.orderNo || '');
176
+ }, [currentNodeTid, plat.orderNo, operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey, startNodeId, flowWorkOrderId]);
181
177
  var transData = useMemo(function () {
182
178
  if (flowStatus === FlowStatus.COMPLETED) {
183
- var _currentNodeDetail$wo6, _currentNodeDetail$wo7;
184
- var _calcWorkOrderList = calcWorkOrderList([(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder) || {}], [].concat(_toConsumableArray((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo6 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo6 === void 0 ? void 0 : _currentNodeDetail$wo6.preNodeComponentDtoList) || []), _toConsumableArray((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo7 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : _currentNodeDetail$wo7.componentDtoList) || []))),
179
+ var _currentNodeDetail$wo2, _currentNodeDetail$wo3;
180
+ var _calcWorkOrderList = calcWorkOrderList([(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder) || {}], [].concat(_toConsumableArray((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo2 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo2 === void 0 ? void 0 : _currentNodeDetail$wo2.preNodeComponentDtoList) || []), _toConsumableArray((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo3 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo3 === void 0 ? void 0 : _currentNodeDetail$wo3.componentDtoList) || []))),
185
181
  _calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
186
182
  _transData = _calcWorkOrderList2[0];
187
183
  return _transData;
188
184
  }
189
185
  }, [flowStatus, currentNodeDetail]);
190
186
  var handleWithdraw = function handleWithdraw() {
191
- var _currentNodeDetail$no19;
187
+ var _currentNodeDetail$no16;
192
188
  dispatch({
193
189
  type: 'setWithdrawWorkOrderDetail',
194
190
  payload: {
195
- nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no19 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no19 === void 0 ? void 0 : _currentNodeDetail$no19.id) || ''
191
+ nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no16 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no16 === void 0 ? void 0 : _currentNodeDetail$no16.id) || ''
196
192
  }
197
193
  });
198
194
  dispatch({
@@ -205,7 +201,7 @@ var CurrentNode = function CurrentNode(props, ref) {
205
201
  };
206
202
  var handleSave = /*#__PURE__*/function () {
207
203
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
208
- var _currentNodeDetail$wo8, _currentNodeDetail$wo9, formData, params, res, _controllerRef$curren;
204
+ var _currentNodeDetail$wo4, _currentNodeDetail$wo5, formData, params, res, _controllerRef$curren;
209
205
  return _regeneratorRuntime().wrap(function _callee$(_context) {
210
206
  while (1) switch (_context.prev = _context.next) {
211
207
  case 0:
@@ -222,8 +218,8 @@ var CurrentNode = function CurrentNode(props, ref) {
222
218
  operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
223
219
  flowTemplateId: flowTemplateId,
224
220
  flowWorkOrderId: flowWorkOrderId,
225
- workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.id,
226
- workOrderUpdateTime: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.update
221
+ workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.id,
222
+ workOrderUpdateTime: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo5 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo5 === void 0 ? void 0 : _currentNodeDetail$wo5.update
227
223
  }),
228
224
  shopUniqueKey: get(find(shopList, function (s) {
229
225
  return s.shopId === formData.shopId;
@@ -263,7 +259,7 @@ var CurrentNode = function CurrentNode(props, ref) {
263
259
  }();
264
260
  var executeRestartAutoTask = /*#__PURE__*/function () {
265
261
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values) {
266
- var _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$no20;
262
+ var _currentNodeDetail$wo6, _currentNodeDetail$wo7, _currentNodeDetail$no17;
267
263
  var _yield$restartAutoTas, success, _controllerRef$curren2;
268
264
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
269
265
  while (1) switch (_context2.prev = _context2.next) {
@@ -273,9 +269,9 @@ var CurrentNode = function CurrentNode(props, ref) {
273
269
  operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
274
270
  flowTemplateId: flowTemplateId,
275
271
  flowWorkOrderId: flowWorkOrderId,
276
- workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : _currentNodeDetail$wo10.id,
277
- workOrderUpdateTime: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.update,
278
- nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no20 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no20 === void 0 ? void 0 : _currentNodeDetail$no20.id) || ''
272
+ workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo6 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo6 === void 0 ? void 0 : _currentNodeDetail$wo6.id,
273
+ workOrderUpdateTime: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo7 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : _currentNodeDetail$wo7.update,
274
+ nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no17 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no17 === void 0 ? void 0 : _currentNodeDetail$no17.id) || ''
279
275
  }),
280
276
  willSkipBusiness: values === null || values === void 0 ? void 0 : values.willSkipBusiness
281
277
  }, isDeveloperMode ? {
@@ -372,7 +368,7 @@ var CurrentNode = function CurrentNode(props, ref) {
372
368
  cancelText: '取消',
373
369
  onOk: function () {
374
370
  var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
375
- var _currentNodeDetail$no21;
371
+ var _currentNodeDetail$no18;
376
372
  var _yield$skipNode, success, _controllerRef$curren3;
377
373
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
378
374
  while (1) switch (_context4.prev = _context4.next) {
@@ -384,7 +380,7 @@ var CurrentNode = function CurrentNode(props, ref) {
384
380
  flowWorkOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowWorkOrderUpdateTime,
385
381
  flowTemplateId: flowTemplateId,
386
382
  flowWorkOrderId: flowWorkOrderId,
387
- nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.id) || ''
383
+ nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no18 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no18 === void 0 ? void 0 : _currentNodeDetail$no18.id) || ''
388
384
  }
389
385
  });
390
386
  case 2:
@@ -425,7 +421,7 @@ var CurrentNode = function CurrentNode(props, ref) {
425
421
  var isArtificialNode = tag === 'artificial';
426
422
  var isAutoNode = tag === 'auto';
427
423
  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', 'JST_OBTAIN_REISSUE_LOGISTICS', 'JST_REISSUE_NEW', 'JST_RETURN_EXCHANGE', 'JST_INBOUND_STATUS_SYNC', 'TTX_INBOUND_STATUS_SYNC', 'WDT_STORE_STATUS_V2', 'JY_INBOUND_STATUS_SYNC', 'KM_WAREHOUSING_STATUS_EVENT', 'DAXIDI_INBOUND_STATUS_SYNC', 'MESSAGE_CHANNEL_SEND', 'CREATE_WORK_ORDER'].includes(eventType);
428
- 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;
424
+ var showEdit = isArtificialNode && isCurrentNodeHandler && !readonly && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.flowStatus) === FlowStatus.COMPLETED;
429
425
  // TODO: 决策节点给后端修复数据加了一个入口
430
426
  // @ts-ignore
431
427
  var showRestartAutoTask = tag === 'auto' && flowStatus === FlowStatus.PROCESSING || tag === 'judge' && isDeveloperMode;
@@ -436,24 +432,24 @@ var CurrentNode = function CurrentNode(props, ref) {
436
432
  showEdit: showEdit,
437
433
  showLook: false,
438
434
  showRestartAutoTask: showRestartAutoTask,
439
- handler: isArtificialNode ? (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.completedUserName) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : (_currentNodeDetail$wo15 = _currentNodeDetail$wo14.handlerList) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : (_currentNodeDetail$wo16 = _currentNodeDetail$wo15[0]) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.account) : '',
440
- showWithdraw: isArtificialNode && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo17 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : _currentNodeDetail$wo17.flowStatus) === FlowStatus.COMPLETED && isCurrentNodeHandler && !readonly,
441
- showReminder: isArtificialNode && [NodeStatus.WAITING, NodeStatus.STOPPING].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo18 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo18 === void 0 ? void 0 : _currentNodeDetail$wo18.flowStatus) &&
435
+ handler: isArtificialNode ? (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.completedUserName) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : (_currentNodeDetail$wo11 = _currentNodeDetail$wo10.handlerList) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : (_currentNodeDetail$wo12 = _currentNodeDetail$wo11[0]) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.account) : '',
436
+ showWithdraw: isArtificialNode && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.flowStatus) === FlowStatus.COMPLETED && isCurrentNodeHandler && !readonly,
437
+ showReminder: isArtificialNode && [NodeStatus.WAITING, NodeStatus.STOPPING].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.flowStatus) &&
442
438
  // isCurrentNodeHandler &&
443
439
  !readonly,
444
440
  showSkipButton: showSkipButton,
445
- isReminder: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : (_currentNodeDetail$wo20 = _currentNodeDetail$wo19.jsonMap) === null || _currentNodeDetail$wo20 === void 0 ? void 0 : _currentNodeDetail$wo20.flowTags) || '[]').includes('REMINDER'),
441
+ isReminder: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : (_currentNodeDetail$wo16 = _currentNodeDetail$wo15.jsonMap) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.flowTags) || '[]').includes('REMINDER'),
446
442
  handleWithdraw: handleWithdraw,
447
443
  handleReminder: onReminder,
448
444
  handleSkip: handleSkip,
449
445
  editing: editing,
450
446
  handleEdit: handleEdit,
451
447
  handleSave: handleSave,
452
- handleLabel: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo21 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo21 === void 0 ? void 0 : _currentNodeDetail$wo21.flowStatus) === FlowStatus.COMPLETED ? '完成人' : '处理人',
448
+ handleLabel: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo17 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : _currentNodeDetail$wo17.flowStatus) === FlowStatus.COMPLETED ? '完成人' : '处理人',
453
449
  handleRestartAutoTask: handleRestartAutoTask,
454
450
  flowTemplateKey: (operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey) || '',
455
451
  flowWorkOrderId: flowWorkOrderId || '',
456
- nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no22 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no22 === void 0 ? void 0 : _currentNodeDetail$no22.id) || '',
452
+ nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no19 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no19 === void 0 ? void 0 : _currentNodeDetail$no19.id) || '',
457
453
  flowTemplateId: flowTemplateId
458
454
  }), /*#__PURE__*/React.createElement(Modal, {
459
455
  title: "\u6D41\u7A0B\u5931\u8D25\u91CD\u8BD5",
@@ -491,7 +487,7 @@ var CurrentNode = function CurrentNode(props, ref) {
491
487
  value: false
492
488
  }, "\u5426"))))), /*#__PURE__*/React.createElement("div", {
493
489
  className: styles.formRenderContainer
494
- }, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no23 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no23 === void 0 ? void 0 : _currentNodeDetail$no23.nodeType) && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) && (flowStatus === FlowStatus.COMPLETED && !editing ? /*#__PURE__*/React.createElement(RenderDetail, {
490
+ }, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no20 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no20 === void 0 ? void 0 : _currentNodeDetail$no20.nodeType) && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) && (flowStatus === FlowStatus.COMPLETED && !editing ? /*#__PURE__*/React.createElement(RenderDetail, {
495
491
  workOrderTemplateInfo: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
496
492
  transData: transData,
497
493
  platform: plat.platform,
@@ -499,12 +495,12 @@ var CurrentNode = function CurrentNode(props, ref) {
499
495
  shopList: shopList
500
496
  }) : /*#__PURE__*/React.createElement(FormRender, {
501
497
  ref: formRenderRef,
502
- isShowShopList: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no24 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no24 === void 0 ? void 0 : _currentNodeDetail$no24.nodeType) && [PlatForm.PC, PlatForm.WEB].includes(plat.platform),
498
+ 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),
503
499
  plat: plat,
504
500
  templateDetail: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
505
501
  shopList: shopList,
506
502
  record: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder,
507
- shopId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo22 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo22 === void 0 ? void 0 : _currentNodeDetail$wo22.shopId) || plat.shopId || defaultShopId,
503
+ shopId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo18 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo18 === void 0 ? void 0 : _currentNodeDetail$wo18.shopId) || plat.shopId || defaultShopId,
508
504
  accountName: plat === null || plat === void 0 ? void 0 : plat.accountName,
509
505
  onOpenWangWang: onOpenWangWang,
510
506
  onJumpPage: onJumpPage,
@@ -516,7 +512,7 @@ var CurrentNode = function CurrentNode(props, ref) {
516
512
  handleChangeTradeId: handleChangeTradeId,
517
513
  canModifyPayment: true,
518
514
  flowAllShowHideRules: allShowHideRules,
519
- 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),
515
+ isStartNodeWaiting: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no22 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no22 === void 0 ? void 0 : _currentNodeDetail$no22.nodeType) && [NodeStatus.WAITING].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.flowStatus),
520
516
  firstOrderBackfill: flowStatus !== FlowStatus.COMPLETED,
521
517
  autoSubmit: autoSubmit,
522
518
  autoFillThirdPartyFields: autoFillThirdPartyFields
@@ -43,7 +43,7 @@ import ShareLinkModal from "./components/ShareLinkModal";
43
43
  import JumpBuyer from "./components/JumpBuyer";
44
44
  import { useSignal } from "../hooks/useSignal";
45
45
  import { verifyHandle, FLOW_STATUS_V2, getTag, currentUserHasOperatorAuth, CANNOT_BACK_FILL } from "./common";
46
- import { saveWorkOrder, submitWorkOrder, addRemark, stopWorkOrder, closeWorkOrder, startWorkOrder, forwardWorkOrder, returnWorkOrder, withDrawWorkOrder, reminder, cancelReminder, createFlowNodeTicket } from "../model/flowTemplateDetail/api";
46
+ import { saveWorkOrder, submitWorkOrder, addRemark, stopWorkOrder, closeWorkOrder, startWorkOrder, forwardWorkOrder, returnWorkOrder, withDrawWorkOrder, reminder, cancelReminder, createFlowNodeTicket, batchQueryNodeDetail } from "../model/flowTemplateDetail/api";
47
47
  import { COMPONENT_MAP } from "../common/utils/tools";
48
48
  import RenderDetail from "./components/RenderDetail";
49
49
  import { orderDetail } from "../model/servers/api";
@@ -61,8 +61,14 @@ import Layout from "./components/Layout";
61
61
  import JumpCustomerIcon from "./components/XiaozhiConversation";
62
62
  var Text = Typography.Text,
63
63
  Link = Typography.Link;
64
+ var EMPTY_REPEAT_WORK_ORDER_LIST = [];
65
+ var getNodeTemplateMapKey = function getNodeTemplateMapKey() {
66
+ var flowTemplateId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
67
+ var nodeId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
68
+ return "".concat(flowTemplateId, "::").concat(nodeId);
69
+ };
64
70
  var FlowTemplateDetail = function FlowTemplateDetail(props) {
65
- var _currentNodeDetail$wo, _currentNodeDetail$no, _document, _document$cookie, _currentNodeDetail$wo2, _currentNodeDetail$no16, _shopList$find, _currentNodeDetail$no29, _currentNodeDetail$no30, _currentNodeDetail$wo29, _currentNodeDetail$wo30, _currentNodeDetail$wo31, _JSON$parse, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$wo34, _currentNodeDetail$wo35, _currentNodeDetail$wo36, _currentNodeDetail$no31, _currentNodeDetail$no32;
71
+ var _currentNodeDetail$wo, _currentNodeDetail$no, _document, _document$cookie, _currentNodeDetail$wo2, _currentNodeDetail$no18, _shopList$find, _currentNodeDetail$no32, _currentNodeDetail$no33, _currentNodeDetail$wo27, _currentNodeDetail$wo28, _currentNodeDetail$wo29, _JSON$parse, _currentNodeDetail$wo30, _currentNodeDetail$wo31, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$wo34, _currentNodeDetail$no34, _currentNodeDetail$no35;
66
72
  var flowTemplateKey = props.flowTemplateKey,
67
73
  _props$shopList = props.shopList,
68
74
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -99,6 +105,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
99
105
  var flowStatus = useSelector(selectFlowStatus);
100
106
  var flowTemplateId = useSelector(selectFlowTemplateId) || '';
101
107
  var currentTradeIdLinkWorkOrderId = useSelector(selectCurrentTradeIdWOrkOrderNumber);
108
+ var repeatWorkOrderList = currentTradeIdLinkWorkOrderId.workOrderList || EMPTY_REPEAT_WORK_ORDER_LIST;
102
109
  var loading = useSelector(selectLoading);
103
110
  var orderBackLoading = useSelector(selectOrderBackLoading);
104
111
  var orderBackKmLoading = useSelector(selectOrderBackKmLoading);
@@ -145,10 +152,78 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
145
152
  _useState14 = _slicedToArray(_useState13, 2),
146
153
  openCloseVisible = _useState14[0],
147
154
  setOpenCloseVisible = _useState14[1];
155
+ var _useState15 = useState({}),
156
+ _useState16 = _slicedToArray(_useState15, 2),
157
+ repeatNodeTemplateMap = _useState16[0],
158
+ setRepeatNodeTemplateMap = _useState16[1];
159
+ var _useState17 = useState(false),
160
+ _useState18 = _slicedToArray(_useState17, 2),
161
+ repeatNodeTemplateLoading = _useState18[0],
162
+ setRepeatNodeTemplateLoading = _useState18[1];
148
163
  var ShareLinkModalRef = useRef(null);
149
164
  var feedbackImageRef = useRef();
150
165
  var showImplementationEnter = [PlatForm.PC, PlatForm.WEB].includes(plat.platform) && ((_document = document) === null || _document === void 0 ? void 0 : (_document$cookie = _document.cookie) === null || _document$cookie === void 0 ? void 0 : _document$cookie.includes('user-from'));
151
166
  var componentDtoList = (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo2 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo2 === void 0 ? void 0 : _currentNodeDetail$wo2.componentDtoList) || [];
167
+ var startNodeId = useMemo(function () {
168
+ var _currentNodeDetail$no2, _flowRecordList$find, _flowRecordList$;
169
+ if ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no2 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no2 === void 0 ? void 0 : _currentNodeDetail$no2.nodeType) === NodeType.START_NODE) {
170
+ var _currentNodeDetail$no3;
171
+ return (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no3 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no3 === void 0 ? void 0 : _currentNodeDetail$no3.id) || '';
172
+ }
173
+ return (flowRecordList === null || flowRecordList === void 0 ? void 0 : (_flowRecordList$find = flowRecordList.find(function (flowRecord) {
174
+ return flowRecord.nodeType === NodeType.START_NODE;
175
+ })) === null || _flowRecordList$find === void 0 ? void 0 : _flowRecordList$find.nodeId) || (flowRecordList === null || flowRecordList === void 0 ? void 0 : (_flowRecordList$ = flowRecordList[0]) === null || _flowRecordList$ === void 0 ? void 0 : _flowRecordList$.nodeId) || '';
176
+ }, [currentNodeDetail, flowRecordList]);
177
+ useEffect(function () {
178
+ var cancelled = false;
179
+ var nodeIdsByFlowTemplate = repeatWorkOrderList.reduce(function (result, item) {
180
+ var itemFlowTemplateId = (item === null || item === void 0 ? void 0 : item.flowTemplateId) || flowTemplateId;
181
+ var itemNodeId = (item === null || item === void 0 ? void 0 : item.nodeId) || startNodeId;
182
+ if (!itemFlowTemplateId || !itemNodeId) {
183
+ return result;
184
+ }
185
+ if (!result[itemFlowTemplateId]) {
186
+ result[itemFlowTemplateId] = new Set();
187
+ }
188
+ result[itemFlowTemplateId].add(itemNodeId);
189
+ return result;
190
+ }, {});
191
+ var paramList = Object.keys(nodeIdsByFlowTemplate).map(function (itemFlowTemplateId) {
192
+ return {
193
+ flowTemplateId: itemFlowTemplateId,
194
+ nodeIdList: Array.from(nodeIdsByFlowTemplate[itemFlowTemplateId])
195
+ };
196
+ });
197
+ if (!paramList.length) {
198
+ setRepeatNodeTemplateMap({});
199
+ setRepeatNodeTemplateLoading(false);
200
+ return;
201
+ }
202
+ setRepeatNodeTemplateLoading(true);
203
+ batchQueryNodeDetail({
204
+ paramList: paramList
205
+ }).then(function (res) {
206
+ if (cancelled) {
207
+ return;
208
+ }
209
+ var templateMap = ((res === null || res === void 0 ? void 0 : res.data) || []).reduce(function (result, item) {
210
+ result[getNodeTemplateMapKey(item === null || item === void 0 ? void 0 : item.flowTemplateId, item === null || item === void 0 ? void 0 : item.nodeId)] = (item === null || item === void 0 ? void 0 : item.workOrderTemplateInfo) || {};
211
+ return result;
212
+ }, {});
213
+ setRepeatNodeTemplateMap(templateMap);
214
+ }).catch(function () {
215
+ if (!cancelled) {
216
+ setRepeatNodeTemplateMap({});
217
+ }
218
+ }).finally(function () {
219
+ if (!cancelled) {
220
+ setRepeatNodeTemplateLoading(false);
221
+ }
222
+ });
223
+ return function () {
224
+ cancelled = true;
225
+ };
226
+ }, [repeatWorkOrderList, flowTemplateId, startNodeId]);
152
227
  var isSuperAdmin = !!(plat !== null && plat !== void 0 && plat.hasSuperAdminRole) || (plat === null || plat === void 0 ? void 0 : plat.userKey) === (plat === null || plat === void 0 ? void 0 : plat.companyKey);
153
228
  var tradeIdComponentDto = componentDtoList.find(function (item) {
154
229
  return item.workOrderComponentType === 'TRADE_ID_INPUT';
@@ -196,9 +271,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
196
271
  // 保存请求锁
197
272
  var saveRequestLock = useRef(false);
198
273
  var flowNodeNameList = useMemo(function () {
199
- var _nameList$concat, _currentNodeDetail$no2, _currentNodeDetail$no3;
274
+ var _nameList$concat, _currentNodeDetail$no4, _currentNodeDetail$no5;
200
275
  var nameList = [];
201
- return (_nameList$concat = nameList.concat((_currentNodeDetail$no2 = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no3 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no3 === void 0 ? void 0 : _currentNodeDetail$no3.name) !== null && _currentNodeDetail$no2 !== void 0 ? _currentNodeDetail$no2 : '')) === null || _nameList$concat === void 0 ? void 0 : _nameList$concat.concat(flowRecordList.map(function (item) {
276
+ return (_nameList$concat = nameList.concat((_currentNodeDetail$no4 = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no5 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no5 === void 0 ? void 0 : _currentNodeDetail$no5.name) !== null && _currentNodeDetail$no4 !== void 0 ? _currentNodeDetail$no4 : '')) === null || _nameList$concat === void 0 ? void 0 : _nameList$concat.concat(flowRecordList.map(function (item) {
202
277
  return item.nodeName;
203
278
  }));
204
279
  }, [flowRecordList, currentNodeDetail]);
@@ -260,9 +335,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
260
335
  }));
261
336
  };
262
337
  useEffect(function () {
263
- var _currentNodeDetail$no4;
338
+ var _currentNodeDetail$no6;
264
339
  if (!currentNodeDetail || !isShowRemark) return;
265
- if (![NodeType.START_NODE, NodeType.EXECUTE_NODE].includes((_currentNodeDetail$no4 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no4 === void 0 ? void 0 : _currentNodeDetail$no4.nodeType) || !currentNodeDetail.workOrderTemplateInfo || flowStatus === FlowStatus.COMPLETED) {
340
+ if (![NodeType.START_NODE, NodeType.EXECUTE_NODE].includes((_currentNodeDetail$no6 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no6 === void 0 ? void 0 : _currentNodeDetail$no6.nodeType) || !currentNodeDetail.workOrderTemplateInfo || flowStatus === FlowStatus.COMPLETED) {
266
341
  sShopUniqueKey && sTid && fetchRemark(shopId, sTid);
267
342
  }
268
343
  }, [sShopUniqueKey, sTid, currentNodeDetail]);
@@ -380,7 +455,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
380
455
  // 开启
381
456
  var handleStart = /*#__PURE__*/function () {
382
457
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
383
- var _currentNodeDetail$no5, _currentNodeDetail$wo6, _res$data4, _res$data4$failList, res, _res$data5, _res$data5$failList, _res$data5$failList$;
458
+ var _currentNodeDetail$no7, _currentNodeDetail$wo6, _res$data4, _res$data4$failList, res, _res$data5, _res$data5$failList, _res$data5$failList$;
384
459
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
385
460
  while (1) switch (_context2.prev = _context2.next) {
386
461
  case 0:
@@ -388,7 +463,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
388
463
  _context2.next = 3;
389
464
  return startWorkOrder({
390
465
  operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
391
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no5 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no5 === void 0 ? void 0 : _currentNodeDetail$no5.id,
466
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : _currentNodeDetail$no7.id,
392
467
  flowWorkOrderId: flowWorkOrderIdState,
393
468
  flowTemplateId: flowTemplateId,
394
469
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo6 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo6 === void 0 ? void 0 : _currentNodeDetail$wo6.id
@@ -608,7 +683,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
608
683
  } else if (status === 'open') {
609
684
  handleStart();
610
685
  } else if (status === 'share') {
611
- var _ShareLinkModalRef$cu, _currentNodeDetail$no6;
686
+ var _ShareLinkModalRef$cu, _currentNodeDetail$no8;
612
687
  if (!isSuperAdmin && !hasShareAuth) {
613
688
  Modal.warning({
614
689
  title: '没有权限',
@@ -622,7 +697,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
622
697
  companyKey: plat.companyKey,
623
698
  flowTemplateKey: flowTemplateKey,
624
699
  flowWorkOrderId: flowWorkOrderIdState,
625
- flowNodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no6 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no6 === void 0 ? void 0 : _currentNodeDetail$no6.id,
700
+ flowNodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no8 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no8 === void 0 ? void 0 : _currentNodeDetail$no8.id,
626
701
  platform: plat.platform
627
702
  });
628
703
  }
@@ -711,7 +786,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
711
786
  // 暂停工单
712
787
  var handleStop = /*#__PURE__*/function () {
713
788
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(formData) {
714
- var _currentNodeDetail$no7, _currentNodeDetail$wo11, _res$data6, _res$data6$failList, res, _res$data7, _res$data7$failList, _res$data7$failList$;
789
+ var _currentNodeDetail$no9, _currentNodeDetail$wo11, _res$data6, _res$data6$failList, res, _res$data7, _res$data7$failList, _res$data7$failList$;
715
790
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
716
791
  while (1) switch (_context6.prev = _context6.next) {
717
792
  case 0:
@@ -719,7 +794,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
719
794
  _context6.next = 3;
720
795
  return stopWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
721
796
  operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
722
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : _currentNodeDetail$no7.id,
797
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : _currentNodeDetail$no9.id,
723
798
  flowWorkOrderId: flowWorkOrderIdState,
724
799
  flowTemplateId: flowTemplateId,
725
800
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.id
@@ -763,7 +838,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
763
838
  // 关闭工单
764
839
  var handleClose = /*#__PURE__*/function () {
765
840
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(formData, form) {
766
- var _currentNodeDetail$wo12, _currentNodeDetail$no8, _currentNodeDetail$wo13, _res$data8, _res$data8$failList, res, _res$data9, _res$data9$failList, _res$data9$failList$;
841
+ var _currentNodeDetail$wo12, _currentNodeDetail$no10, _currentNodeDetail$wo13, _res$data8, _res$data8$failList, res, _res$data9, _res$data9$failList, _res$data9$failList$;
767
842
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
768
843
  while (1) switch (_context7.prev = _context7.next) {
769
844
  case 0:
@@ -772,7 +847,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
772
847
  return closeWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
773
848
  workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.flowStatus,
774
849
  operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
775
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no8 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no8 === void 0 ? void 0 : _currentNodeDetail$no8.id,
850
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no10 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no10 === void 0 ? void 0 : _currentNodeDetail$no10.id,
776
851
  flowWorkOrderId: flowWorkOrderIdState,
777
852
  flowTemplateId: flowTemplateId,
778
853
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.id
@@ -812,7 +887,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
812
887
  // 转交处理人
813
888
  var handleForWard = /*#__PURE__*/function () {
814
889
  var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(formData) {
815
- var _currentNodeDetail$no9, _currentNodeDetail$wo14, _res$data10, _res$data10$failList, res, _res$data11, _res$data11$failList, _res$data11$failList$;
890
+ var _currentNodeDetail$no11, _currentNodeDetail$wo14, _res$data10, _res$data10$failList, res, _res$data11, _res$data11$failList, _res$data11$failList$;
816
891
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
817
892
  while (1) switch (_context8.prev = _context8.next) {
818
893
  case 0:
@@ -820,7 +895,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
820
895
  _context8.next = 3;
821
896
  return forwardWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
822
897
  operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
823
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : _currentNodeDetail$no9.id,
898
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no11 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no11 === void 0 ? void 0 : _currentNodeDetail$no11.id,
824
899
  flowWorkOrderId: flowWorkOrderIdState,
825
900
  flowTemplateId: flowTemplateId,
826
901
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.id
@@ -860,7 +935,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
860
935
  // 驳回
861
936
  var handleReturnWorkOrder = /*#__PURE__*/function () {
862
937
  var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(formData) {
863
- var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no10, _currentNodeDetail$wo15, res, _res$data$failList$0$, _res$data12, _res$data12$failList, _res$data12$failList$;
938
+ var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no12, _currentNodeDetail$wo15, res, _res$data$failList$0$, _res$data12, _res$data12$failList, _res$data12$failList$;
864
939
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
865
940
  while (1) switch (_context9.prev = _context9.next) {
866
941
  case 0:
@@ -900,7 +975,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
900
975
  _context9.next = 7;
901
976
  return returnWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
902
977
  operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
903
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no10 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no10 === void 0 ? void 0 : _currentNodeDetail$no10.id,
978
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no12 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no12 === void 0 ? void 0 : _currentNodeDetail$no12.id,
904
979
  flowWorkOrderId: flowWorkOrderIdState,
905
980
  flowTemplateId: flowTemplateId,
906
981
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : _currentNodeDetail$wo15.id
@@ -949,7 +1024,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
949
1024
  // 撤回
950
1025
  var handleWithdraw = /*#__PURE__*/function () {
951
1026
  var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(formData) {
952
- var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no11, _currentNodeDetail$wo16, res, _res$data$failList$0$2, _res$data13, _res$data13$failList, _res$data13$failList$;
1027
+ var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no13, _currentNodeDetail$wo16, res, _res$data$failList$0$2, _res$data13, _res$data13$failList, _res$data13$failList$;
953
1028
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
954
1029
  while (1) switch (_context10.prev = _context10.next) {
955
1030
  case 0:
@@ -990,7 +1065,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
990
1065
  return withDrawWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
991
1066
  backToNodeId: withdrawWorkOrderDetail === null || withdrawWorkOrderDetail === void 0 ? void 0 : withdrawWorkOrderDetail.nodeId,
992
1067
  operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
993
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no11 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no11 === void 0 ? void 0 : _currentNodeDetail$no11.id,
1068
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no13 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no13 === void 0 ? void 0 : _currentNodeDetail$no13.id,
994
1069
  flowWorkOrderId: flowWorkOrderIdState,
995
1070
  flowTemplateId: flowTemplateId,
996
1071
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.id
@@ -1039,7 +1114,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1039
1114
  //催单
1040
1115
  var handleReminder = /*#__PURE__*/function () {
1041
1116
  var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(type) {
1042
- var _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$no12, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$wo22, _currentNodeDetail$no13, _currentNodeDetail$wo23, _res$data14, _res$data14$failList, api, flowTags, newFlowTags, params, res, _res$data15, _res$data15$failList, _res$data15$failList$;
1117
+ var _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$no14, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$wo22, _currentNodeDetail$no15, _currentNodeDetail$wo23, _res$data14, _res$data14$failList, api, flowTags, newFlowTags, params, res, _res$data15, _res$data15$failList, _res$data15$failList$;
1043
1118
  return _regeneratorRuntime().wrap(function _callee11$(_context11) {
1044
1119
  while (1) switch (_context11.prev = _context11.next) {
1045
1120
  case 0:
@@ -1055,7 +1130,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1055
1130
  });
1056
1131
  params = {
1057
1132
  updateInfo: {
1058
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no12 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no12 === void 0 ? void 0 : _currentNodeDetail$no12.id,
1133
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no14 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no14 === void 0 ? void 0 : _currentNodeDetail$no14.id,
1059
1134
  templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.templateId,
1060
1135
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo20 === void 0 ? void 0 : _currentNodeDetail$wo20.id,
1061
1136
  updateList: [{
@@ -1068,7 +1143,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1068
1143
  needTransForm: false
1069
1144
  },
1070
1145
  operateParams: {
1071
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no13 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no13 === void 0 ? void 0 : _currentNodeDetail$no13.id,
1146
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no15 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no15 === void 0 ? void 0 : _currentNodeDetail$no15.id,
1072
1147
  flowWorkOrderId: flowWorkOrderIdState,
1073
1148
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo23 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo23 === void 0 ? void 0 : _currentNodeDetail$wo23.id,
1074
1149
  flowTemplateId: flowTemplateId,
@@ -1148,17 +1223,17 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1148
1223
  }
1149
1224
  }, [flowTemplateKey, flowWorkOrderIdState]);
1150
1225
  useEffect(function () {
1151
- var _currentNodeDetail$no14;
1152
- if (flowTemplateKey && !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$no14 = currentNodeDetail.nodeInfo) !== null && _currentNodeDetail$no14 !== void 0 && _currentNodeDetail$no14.id) && !privilege) {
1153
- var _currentNodeDetail$no15;
1226
+ var _currentNodeDetail$no16;
1227
+ if (flowTemplateKey && !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$no16 = currentNodeDetail.nodeInfo) !== null && _currentNodeDetail$no16 !== void 0 && _currentNodeDetail$no16.id) && !privilege) {
1228
+ var _currentNodeDetail$no17;
1154
1229
  dispatch(fetchShareNodeConfig({
1155
1230
  companyKey: plat.companyKey,
1156
1231
  flowTemplateKey: flowTemplateKey,
1157
- flowNodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no15 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no15 === void 0 ? void 0 : _currentNodeDetail$no15.id
1232
+ flowNodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no17 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no17 === void 0 ? void 0 : _currentNodeDetail$no17.id
1158
1233
  }));
1159
1234
  dispatch(fetchH5SharePermission());
1160
1235
  }
1161
- }, [flowTemplateKey, currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no16 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no16 === void 0 ? void 0 : _currentNodeDetail$no16.id, privilege]);
1236
+ }, [flowTemplateKey, currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no18 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no18 === void 0 ? void 0 : _currentNodeDetail$no18.id, privilege]);
1162
1237
  useEffect(function () {
1163
1238
  if (flowTemplateId && flowWorkOrderIdState && !autoSubmit) {
1164
1239
  dispatch(fetchAllFlowOperateRecord({
@@ -1206,43 +1281,54 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1206
1281
  }
1207
1282
  }, [currentNodeDetail, autoSubmitFlag, autoFillThirdPartyFields]);
1208
1283
  var isCurrentNodeHandler = useMemo(function () {
1209
- var _currentNodeDetail$no17, _currentNodeDetail$no18, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$no23, _currentNodeDetail$no24, _currentNodeDetail$wo26, _currentNodeDetail$no25, _currentNodeDetail$no26;
1284
+ var _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$no23, _currentNodeDetail$no24, _currentNodeDetail$no25, _currentNodeDetail$no26, _currentNodeDetail$wo26, _currentNodeDetail$no27, _currentNodeDetail$no28;
1210
1285
  return currentUserHasOperatorAuth({
1211
1286
  isSuperAdmin: isSuperAdmin,
1212
- 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] || [],
1213
- userGroupList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no19 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no19 === void 0 ? void 0 : _currentNodeDetail$no19.id) && useGroupMap[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no20 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no20 === void 0 ? void 0 : _currentNodeDetail$no20.id] || [],
1287
+ assistantList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no19 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no19 === void 0 ? void 0 : _currentNodeDetail$no19.id) && assistantMap[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no20 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no20 === void 0 ? void 0 : _currentNodeDetail$no20.id] || [],
1288
+ userGroupList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.id) && useGroupMap[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no22 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no22 === void 0 ? void 0 : _currentNodeDetail$no22.id] || [],
1214
1289
  currentUserKey: plat.userKey,
1215
- 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) || [],
1216
- 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,
1290
+ staffIds: (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.staffIds) || [],
1291
+ operateDataPermission: 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.operateDataPermission,
1217
1292
  handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo26 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo26 === void 0 ? void 0 : _currentNodeDetail$wo26.handlerList) || [],
1218
- 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
1293
+ isAllStaff: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no27 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no27 === void 0 ? void 0 : (_currentNodeDetail$no28 = _currentNodeDetail$no27.assistants) === null || _currentNodeDetail$no28 === void 0 ? void 0 : _currentNodeDetail$no28.isAllStaff
1219
1294
  });
1220
1295
  }, [currentNodeDetail, plat, assistantMap, useGroupMap]);
1221
1296
  var defaultShopId = (_shopList$find = shopList.find(function (item) {
1222
- var _currentNodeDetail$no27, _currentNodeDetail$no28;
1223
- 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);
1297
+ var _currentNodeDetail$no29, _currentNodeDetail$no30;
1298
+ return item.accessToken === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no29 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no29 === void 0 ? void 0 : (_currentNodeDetail$no30 = _currentNodeDetail$no29.relationEvent) === null || _currentNodeDetail$no30 === void 0 ? void 0 : _currentNodeDetail$no30.defaultShopUniqueKey);
1224
1299
  })) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopId;
1225
1300
  var ReportOrderRender = function ReportOrderRender(props) {
1226
- var _currentNodeDetail$wo27, _currentNodeDetail$wo28;
1227
- var details = props.details;
1228
- 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) {
1301
+ var _currentNodeDetail$no31;
1302
+ var details = (props === null || props === void 0 ? void 0 : props.details) || {};
1303
+ var detailsWithJsonMap = _objectSpread(_objectSpread({}, details), {}, {
1304
+ jsonMap: (details === null || details === void 0 ? void 0 : details.jsonMap) || {}
1305
+ });
1306
+ var detailsFlowTemplateId = (details === null || details === void 0 ? void 0 : details.flowTemplateId) || flowTemplateId;
1307
+ var detailsNodeId = (details === null || details === void 0 ? void 0 : details.nodeId) || startNodeId;
1308
+ var currentStartNodeTemplateInfo = nodeType === NodeType.START_NODE && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no31 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no31 === void 0 ? void 0 : _currentNodeDetail$no31.id) === detailsNodeId ? (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) || {} : {};
1309
+ var workOrderTemplateInfo = repeatNodeTemplateMap[getNodeTemplateMapKey(detailsFlowTemplateId, detailsNodeId)] || currentStartNodeTemplateInfo;
1310
+ var currentComponentDtoList = (workOrderTemplateInfo === null || workOrderTemplateInfo === void 0 ? void 0 : workOrderTemplateInfo.componentDtoList) || [];
1311
+ var preNodeComponentDtoList = (workOrderTemplateInfo === null || workOrderTemplateInfo === void 0 ? void 0 : workOrderTemplateInfo.preNodeComponentDtoList) || [];
1312
+ var fillComponentDtoList = currentComponentDtoList.filter(function (t) {
1229
1313
  return !CANNOT_BACK_FILL.includes(t.workOrderComponentType || '');
1230
1314
  });
1231
1315
  //获取可以返填的组件值
1232
- var _calcWorkOrderList = calcWorkOrderList([details], componentDtoList),
1316
+ var _calcWorkOrderList = calcWorkOrderList([detailsWithJsonMap], fillComponentDtoList),
1233
1317
  _calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
1234
1318
  transData = _calcWorkOrderList2[0];
1235
1319
  //获取表单显示值
1236
- 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),
1320
+ var _calcWorkOrderList3 = calcWorkOrderList([detailsWithJsonMap], preNodeComponentDtoList.concat(currentComponentDtoList)),
1237
1321
  _calcWorkOrderList4 = _slicedToArray(_calcWorkOrderList3, 1),
1238
1322
  transDataall = _calcWorkOrderList4[0];
1239
- return /*#__PURE__*/React.createElement("div", {
1323
+ return /*#__PURE__*/React.createElement(Spin, {
1324
+ spinning: repeatNodeTemplateLoading
1325
+ }, /*#__PURE__*/React.createElement("div", {
1240
1326
  style: {
1241
1327
  height: '50vh',
1242
1328
  maxWidth: '800px',
1243
1329
  overflow: 'auto'
1244
1330
  }
1245
- }, /*#__PURE__*/React.createElement(Button, {
1331
+ }, !flowWorkOrderIdState && nodeType === NodeType.START_NODE && fillComponentDtoList.length > 0 && /*#__PURE__*/React.createElement(Button, {
1246
1332
  type: "link",
1247
1333
  onClick: function onClick() {
1248
1334
  return handleFillWorkOrder(transData);
@@ -1266,12 +1352,12 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1266
1352
  fontSize: '12px'
1267
1353
  }
1268
1354
  }, "\u63D0\u4EA4\u65F6\u95F4\uFF1A"), moment(details.created).format('YYYY-MM-DD HH:mm:ss')), /*#__PURE__*/React.createElement(RenderDetail, {
1269
- workOrderTemplateInfo: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
1355
+ workOrderTemplateInfo: workOrderTemplateInfo || {},
1270
1356
  transData: transDataall,
1271
1357
  platform: plat.platform,
1272
1358
  onOpenWangWang: onOpenWangWang,
1273
1359
  shopList: shopList
1274
- }));
1360
+ })));
1275
1361
  };
1276
1362
  var reFreshPanel = function reFreshPanel() {
1277
1363
  var _controllerRef$curren;
@@ -1390,8 +1476,8 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1390
1476
  };
1391
1477
  }();
1392
1478
  var showActionFooter = getTag({
1393
- nodeIsAuto: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no29 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no29 === void 0 ? void 0 : _currentNodeDetail$no29.isAuto,
1394
- nodeType: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no30 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no30 === void 0 ? void 0 : _currentNodeDetail$no30.nodeType
1479
+ nodeIsAuto: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no32 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no32 === void 0 ? void 0 : _currentNodeDetail$no32.isAuto,
1480
+ nodeType: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no33 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no33 === void 0 ? void 0 : _currentNodeDetail$no33.nodeType
1395
1481
  }) === 'artificial' && (!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder) || isCurrentNodeHandler || ['true', 'created'].includes(privilege)) && !readonly;
1396
1482
  var showOrderRemark = isShowRemark && !['created', 'edit'].includes(privilege);
1397
1483
  return /*#__PURE__*/React.createElement(Spin, {
@@ -1417,20 +1503,20 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1417
1503
  tid: tid,
1418
1504
  shopName: shopItem.shopSource == 0 ? shopItem.thirdUserNick : shopItem.shopName,
1419
1505
  platformType: shopItem.shopSource,
1420
- buyer: (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),
1506
+ buyer: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.buyerOpenUid) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo27 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo27 === void 0 ? void 0 : _currentNodeDetail$wo27.buyerOpenUid),
1421
1507
  flowWorkOrderId: flowWorkOrderIdState,
1422
1508
  onJumpPage: onJumpPage
1423
1509
  }), showImplementationEnter && /*#__PURE__*/React.createElement(Button, {
1424
1510
  onClick: openFeedbackModal,
1425
1511
  type: "link"
1426
- }, "\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, {
1512
+ }, "\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$wo28 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo28 === void 0 ? void 0 : _currentNodeDetail$wo28.buyerOpenUid)) && /*#__PURE__*/React.createElement(JumpBuyer, {
1427
1513
  order_number: tid,
1428
1514
  shop: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.taobaoNick) || '',
1429
- 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),
1515
+ buyer: (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),
1430
1516
  platformType: otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType
1431
- })), /*#__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, {
1517
+ })), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo30 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo30 === void 0 ? void 0 : (_currentNodeDetail$wo31 = _currentNodeDetail$wo30.jsonMap) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : _currentNodeDetail$wo31.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
1432
1518
  color: "blue"
1433
- }, "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, {
1519
+ }, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[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.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1434
1520
  justify: 'space-between',
1435
1521
  className: "header"
1436
1522
  }, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("div", {
@@ -1462,8 +1548,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1462
1548
  }, /*#__PURE__*/React.createElement(Alert, {
1463
1549
  type: "warning",
1464
1550
  showIcon: true,
1465
- description: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "1.\u8BE5\u7B14\u8BA2\u5355\u5DF2\u7ECF\u521B\u5EFA\u8FC7", currentTradeIdLinkWorkOrderId.total, "\u7B14\u5DE5\u5355"), /*#__PURE__*/React.createElement("div", null, currentTradeIdLinkWorkOrderId.workOrderList.map(function (item) {
1551
+ description: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "1.\u8BE5\u7B14\u8BA2\u5355\u5DF2\u7ECF\u521B\u5EFA\u8FC7", currentTradeIdLinkWorkOrderId.total, "\u7B14\u5DE5\u5355"), /*#__PURE__*/React.createElement("div", null, repeatWorkOrderList.map(function (item) {
1466
1552
  return /*#__PURE__*/React.createElement(Popover, {
1553
+ key: item.id || item.flowWorkOrderId,
1467
1554
  content: /*#__PURE__*/React.createElement(ReportOrderRender, {
1468
1555
  details: item
1469
1556
  })
@@ -1500,7 +1587,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1500
1587
  isSuperAdmin: isSuperAdmin
1501
1588
  }));
1502
1589
  }), currentNodeDetail && /*#__PURE__*/React.createElement(Timeline.Item, {
1503
- key: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo36 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo36 === void 0 ? void 0 : _currentNodeDetail$wo36.id) || 'current-node'
1590
+ key: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo34 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo34 === void 0 ? void 0 : _currentNodeDetail$wo34.id) || 'current-node'
1504
1591
  }, /*#__PURE__*/React.createElement(CurrentNode, {
1505
1592
  ref: currentNodeRef,
1506
1593
  flowTemplateId: flowTemplateId,
@@ -1516,7 +1603,8 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1516
1603
  queryRemarkList: queryRemarkList,
1517
1604
  autoSubmit: autoSubmit,
1518
1605
  isSuperAdmin: isSuperAdmin,
1519
- autoFillThirdPartyFields: autoFillThirdPartyFields
1606
+ autoFillThirdPartyFields: autoFillThirdPartyFields,
1607
+ startNodeId: startNodeId
1520
1608
  }))), (remarkList === null || remarkList === void 0 ? void 0 : remarkList.length) > 0 && !['created', 'edit'].includes(privilege) && /*#__PURE__*/React.createElement(RemarkShow, _extends({}, remarkList[0], {
1521
1609
  readonly: readonly,
1522
1610
  handleOpenRemarkList: handleOpenRemarkList,
@@ -1554,7 +1642,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1554
1642
  shopList: shopList
1555
1643
  }), /*#__PURE__*/React.createElement(ForWardModal, {
1556
1644
  flowTemplateId: flowTemplateId,
1557
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no31 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no31 === void 0 ? void 0 : _currentNodeDetail$no31.id,
1645
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no34 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no34 === void 0 ? void 0 : _currentNodeDetail$no34.id,
1558
1646
  handleForWard: handleForWard
1559
1647
  }), /*#__PURE__*/React.createElement(StopModal, {
1560
1648
  handleStop: handleStop
@@ -1562,7 +1650,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1562
1650
  handleClose: handleClose
1563
1651
  }), /*#__PURE__*/React.createElement(RejectedModal, {
1564
1652
  flowTemplateId: flowTemplateId,
1565
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no32 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no32 === void 0 ? void 0 : _currentNodeDetail$no32.id,
1653
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no35 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no35 === void 0 ? void 0 : _currentNodeDetail$no35.id,
1566
1654
  handleReturnWorkOrder: handleReturnWorkOrder
1567
1655
  }), /*#__PURE__*/React.createElement(RemarkModal, {
1568
1656
  handleSubmitRemark: handleSubmitRemark
@@ -91,6 +91,7 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
91
91
  return {
92
92
  nodeId: item.nodeId || '',
93
93
  nodeName: item.nodeName || '',
94
+ nodeType: item.nodeType || '',
94
95
  tag: tag,
95
96
  operator: item.operator || '',
96
97
  nodeIsAuto: item.nodeIsAuto,
@@ -8,6 +8,7 @@ export declare const selectNodeUserGroupMap: (state: FlowTemplateDetailState) =>
8
8
  };
9
9
  export declare const selectRemarkRecordList: (state: FlowTemplateDetailState) => import("../../model/flowTemplateDetail/types").Remark[];
10
10
  export declare const selectCurrentNodeDetail: (state: FlowTemplateDetailState) => {
11
+ nodeCompletedTime?: string | undefined;
11
12
  nodeInfo?: {
12
13
  [k: string]: any;
13
14
  id?: string | undefined;
@@ -15,7 +15,7 @@ export var selectCurrentNodeDetail = function selectCurrentNodeDetail(state) {
15
15
  return (_state$currentNode = state.currentNode) === null || _state$currentNode === void 0 ? void 0 : _state$currentNode.currentNodeDetail;
16
16
  };
17
17
  export var selectTid = function selectTid(state) {
18
- return state.tid || '';
18
+ return (state === null || state === void 0 ? void 0 : state.tid) || '';
19
19
  };
20
20
  export var selectShopUniqueKey = function selectShopUniqueKey(state) {
21
21
  return state.shopUniqueKey || '';
@@ -153,7 +153,8 @@ export var DEFAULT_ARRAY_COMPONENT_TYPE_FIELD_MAPPING = {
153
153
  ITEM_SELECT_THIRD: 'itemList',
154
154
  ITEM_ID: 'itemList',
155
155
  ITEM_ENCODE: 'itemList',
156
- ORDER_SUBFORM: 'subOrderList'
156
+ ORDER_SUBFORM: 'subOrderList',
157
+ WDT_TAGS: 'wdtTags'
157
158
  };
158
159
  export var SUBMIT_COMPONENT_STATUS_MAP = {
159
160
  REISSUE_STATUS: {
@@ -927,6 +927,7 @@ var processComponent = function processComponent(_ref63) {
927
927
  case 'ITEM_SELECT_THIRD':
928
928
  case 'ITEM_ID':
929
929
  case 'ITEM_ENCODE':
930
+ case 'WDT_TAGS':
930
931
  wrapFn(handleOnlyAddContentArrayValue);
931
932
  break;
932
933
  case 'ERP_REMARK':
@@ -126,7 +126,7 @@ export var transTextToNumber = function transTextToNumber(value) {
126
126
  return value ? +value : value;
127
127
  };
128
128
  export var calcWorkOrderList = function calcWorkOrderList(source, templateColumns, type) {
129
- var transDataSourceItem = transformWorkOrderData(templateColumns, type);
129
+ var transDataSourceItem = transformWorkOrderData(Array.isArray(templateColumns) ? templateColumns : [], type);
130
130
  var finalSource = source === null || source === void 0 ? void 0 : source.map(function (item) {
131
131
  var value = transDataSourceItem(item);
132
132
  return _objectSpread(_objectSpread(_objectSpread({}, item.jsonMap), value), {}, {
@@ -1484,14 +1484,14 @@ export var kmSystemOrderBackValues = function kmSystemOrderBackValues(_ref12) {
1484
1484
 
1485
1485
  // wdt商品信息返填
1486
1486
  export var wdtSystemOrderBackValues = function wdtSystemOrderBackValues(_ref13) {
1487
- var _templateList$compone9, _templateList$compone10;
1487
+ var _templateList$compone9, _templateList$compone10, _wdtGoodsComponent$;
1488
1488
  var templateList = _ref13.templateList,
1489
1489
  value = _ref13.value,
1490
1490
  form = _ref13.form;
1491
1491
  //如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
1492
1492
  if (!(value !== null && value !== void 0 && value.selectedRows)) return;
1493
1493
  var wdtGoodsComponent = (_templateList$compone9 = templateList.componentDtoList) === null || _templateList$compone9 === void 0 ? void 0 : _templateList$compone9.filter(function (item) {
1494
- return ['WDT_GOODS', 'WDT_DELIVERY_NO', 'WDT_SEND_GOOD', 'WDT_LOGISTICS'].includes(item.workOrderComponentType) && !item.notOrderBack;
1494
+ return ['WDT_GOODS', 'WDT_DELIVERY_NO', 'WDT_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_TAGS'].includes(item.workOrderComponentType) && !item.notOrderBack;
1495
1495
  });
1496
1496
  if (!(wdtGoodsComponent !== null && wdtGoodsComponent !== void 0 && wdtGoodsComponent.length)) return;
1497
1497
  var tIdCom = (_templateList$compone10 = templateList.componentDtoList) === null || _templateList$compone10 === void 0 ? void 0 : _templateList$compone10.find(function (item) {
@@ -1501,10 +1501,11 @@ export var wdtSystemOrderBackValues = function wdtSystemOrderBackValues(_ref13)
1501
1501
 
1502
1502
  // ??? 此处找到的第一个组件,value不一定包含shopCode,
1503
1503
  // 后面使用的时候要注意,不清楚为什么这么写
1504
- var wdtGoodsValue = form.getFieldValue(wdtGoodsComponent[0].uniqueKey);
1504
+ var wdtGoodsValue = (_wdtGoodsComponent$ = wdtGoodsComponent[0]) !== null && _wdtGoodsComponent$ !== void 0 && _wdtGoodsComponent$.uniqueKey ? form.getFieldValue(wdtGoodsComponent[0].uniqueKey) : undefined;
1505
1505
  var orderInfo = wdtOrderTransform({
1506
1506
  trades: value.selectedRows,
1507
- shopCode: wdtGoodsValue.shopCode,
1507
+ selectedRows: value.selectedRows,
1508
+ shopCode: wdtGoodsValue === null || wdtGoodsValue === void 0 ? void 0 : wdtGoodsValue.shopCode,
1508
1509
  componentList: templateList.componentDtoList,
1509
1510
  orderNo: orderNo,
1510
1511
  allOrders: (value === null || value === void 0 ? void 0 : value.orders) || []
@@ -5,7 +5,7 @@ var orderBackKeyListMap = {
5
5
  hasJst: ['JST_SYSTEM_ORDER', 'JST_GOODS', 'JST_REISSUE_GOODS', 'JST_EXCHANGE_GOODS', 'JST_RETURN_GOODS', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD'],
6
6
  hasBs: ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME', 'BS_NET_RECEIPTS', 'BS_PACKAGE_WEIGHT', 'BS_GOODS', 'BS_DEPOSIT', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_POSTING', 'BS_SYSTEM_ORDER', 'BS_DELIVERY_NO'],
7
7
  hasKm: ['KM_SYSTEM_ORDER', 'KM_LOGISTICS', 'KM_GOODS', 'KM_REISSUE_GOODS', 'KM_RETURN_GOODS'],
8
- hasWdt: ['WDT_SYSTEM_ORDER', 'WDT_GOODS', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_REISSUE_GOODS', 'WDT_SHOP', 'WDT_RETURN_BILL_NO'],
8
+ hasWdt: ['WDT_SYSTEM_ORDER', 'WDT_GOODS', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_REISSUE_GOODS', 'WDT_SHOP', 'WDT_TAGS', 'WDT_RETURN_BILL_NO'],
9
9
  hasBsE3: ['BS_E3_SYSTEM_ORDER', 'BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_LOGISTICS', 'BS_E3_SEND_GOOD'],
10
10
  hasWln: ['WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WLN_REISSUE_GOODS'],
11
11
  hasGy: ['GY_SYSTEM_ORDER', 'GY_SEND_GOOD', 'GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS', 'GY_LOGISTICS'],
@@ -1,6 +1,7 @@
1
1
  export interface Line {
2
2
  nodeId: string;
3
3
  nodeName: string;
4
+ nodeType?: string;
4
5
  tag: string;
5
6
  operator: string;
6
7
  nodeIsAuto: boolean;
@@ -1,4 +1,7 @@
1
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
1
2
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
2
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
7
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -12,7 +15,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
12
15
  * @LastEditTime: 2025-09-03 16:43:05
13
16
  */
14
17
  import request from "./request";
15
- import { tradeStatusMap, warehouseTypeMap } from '@kmkf-fe-packages/kmkf-utils';
18
+ import { servers, tradeStatusMap, warehouseTypeMap } from '@kmkf-fe-packages/kmkf-utils';
16
19
 
17
20
  //获取灰度白名
18
21
  export var grayWhiteList = function grayWhiteList() {
@@ -442,7 +445,66 @@ export var wdtOrderDetail = function wdtOrderDetail(data) {
442
445
  }
443
446
  }
444
447
  return res;
445
- });
448
+ }).then( /*#__PURE__*/function () {
449
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
450
+ var _res$data2, _res$data3, _res$data3$trades;
451
+ var options, tagMap, resolve;
452
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
453
+ while (1) switch (_context.prev = _context.next) {
454
+ case 0:
455
+ if (!(!(res !== null && res !== void 0 && res.success) || (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.version) !== 'enterprise' || !(res !== null && res !== void 0 && (_res$data3 = res.data) !== null && _res$data3 !== void 0 && (_res$data3$trades = _res$data3.trades) !== null && _res$data3$trades !== void 0 && _res$data3$trades.length) || !res.data.trades.some(function (trade) {
456
+ return (trade === null || trade === void 0 ? void 0 : trade.tags) !== undefined && (trade === null || trade === void 0 ? void 0 : trade.tags) !== null;
457
+ }))) {
458
+ _context.next = 2;
459
+ break;
460
+ }
461
+ return _context.abrupt("return", res);
462
+ case 2:
463
+ _context.prev = 2;
464
+ _context.next = 5;
465
+ return servers.WDT.getTagsDataAsync();
466
+ case 5:
467
+ options = _context.sent;
468
+ tagMap = new Map();
469
+ (options || []).forEach(function (item) {
470
+ [item.value, item.id, item.tagId, item.tagCode].forEach(function (key) {
471
+ if (key !== undefined && key !== null) tagMap.set(String(key), item.label);
472
+ });
473
+ });
474
+ resolve = function resolve(value) {
475
+ if (Array.isArray(value)) return value.flatMap(resolve);
476
+ if (value && _typeof(value) === 'object') {
477
+ var _value$id;
478
+ return value.tagName || value.name || value.label || tagMap.get(String((_value$id = value.id) !== null && _value$id !== void 0 ? _value$id : value.tagId)) || value;
479
+ }
480
+ if (value === undefined || value === null) return value;
481
+ return String(value).split(/[,,、]/).map(function (item) {
482
+ return tagMap.get(item.trim()) || item.trim();
483
+ }).filter(Boolean);
484
+ };
485
+ res.data.trades = res.data.trades.map(function (trade) {
486
+ return _objectSpread(_objectSpread({}, trade), {}, {
487
+ tags: resolve(trade.tags)
488
+ });
489
+ });
490
+ _context.next = 15;
491
+ break;
492
+ case 12:
493
+ _context.prev = 12;
494
+ _context.t0 = _context["catch"](2);
495
+ console.warn('旺店通企业版标签名称查询失败', _context.t0);
496
+ case 15:
497
+ return _context.abrupt("return", res);
498
+ case 16:
499
+ case "end":
500
+ return _context.stop();
501
+ }
502
+ }, _callee, null, [[2, 12]]);
503
+ }));
504
+ return function (_x) {
505
+ return _ref.apply(this, arguments);
506
+ };
507
+ }());
446
508
  };
447
509
  // 大希地订单详情
448
510
  export var dxdOrderDetail = function dxdOrderDetail(data) {
@@ -577,13 +639,13 @@ export var cancelDelivery = function cancelDelivery(sid) {
577
639
  };
578
640
 
579
641
  // 更新订单备注
580
- export var updatePlatformMemo = function updatePlatformMemo(_ref) {
581
- var shopUniqueKey = _ref.shopUniqueKey,
582
- tid = _ref.tid,
583
- remark = _ref.remark,
584
- flag = _ref.flag,
585
- _ref$type = _ref.type,
586
- type = _ref$type === void 0 ? 'memo_replace' : _ref$type;
642
+ export var updatePlatformMemo = function updatePlatformMemo(_ref2) {
643
+ var shopUniqueKey = _ref2.shopUniqueKey,
644
+ tid = _ref2.tid,
645
+ remark = _ref2.remark,
646
+ flag = _ref2.flag,
647
+ _ref2$type = _ref2.type,
648
+ type = _ref2$type === void 0 ? 'memo_replace' : _ref2$type;
587
649
  return request({
588
650
  url: "/qy/gdfw/workOrder/updatePlatformMemo",
589
651
  method: 'post',
@@ -697,9 +759,9 @@ export var jyOrderDetail = function jyOrderDetail(data) {
697
759
  data: data,
698
760
  infoLevel: 'warning'
699
761
  }).then(function (res) {
700
- var _res$data2;
762
+ var _res$data4;
701
763
  return {
702
- data: (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.tradeOrderDetails) || []
764
+ data: (res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.tradeOrderDetails) || []
703
765
  };
704
766
  });
705
767
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "2.10.26",
3
+ "version": "2.10.29",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@ant-design/icons": "^4.7.0",
35
- "@kmkf-fe-packages/basic-components": "2.10.26",
36
- "@kmkf-fe-packages/kmkf-utils": "2.10.26",
37
- "@kmkf-fe-packages/services-components": "2.10.26",
35
+ "@kmkf-fe-packages/basic-components": "2.10.29",
36
+ "@kmkf-fe-packages/kmkf-utils": "2.10.29",
37
+ "@kmkf-fe-packages/services-components": "2.10.29",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -75,7 +75,7 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "d0315b90561ff4faaf2ce31799c45a3167ecb367",
78
+ "gitHead": "bc7629679c5254fa413acb1b6bb74c06aae65cba",
79
79
  "gitHooks": {
80
80
  "pre-commit": "lint-staged"
81
81
  }