@kmkf-fe-packages/kmkf-work-order-service-component 1.19.3 → 2.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/esm/FlowTemplateDetailV2/common.d.ts +2 -0
  2. package/dist/esm/FlowTemplateDetailV2/common.js +19 -12
  3. package/dist/esm/FlowTemplateDetailV2/components/ActionList/index.js +1 -1
  4. package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +57 -11
  5. package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +3 -0
  6. package/dist/esm/FlowTemplateDetailV2/components/Header/index.d.ts +5 -0
  7. package/dist/esm/FlowTemplateDetailV2/components/Header/index.js +84 -6
  8. package/dist/esm/FlowTemplateDetailV2/components/Item/index.d.ts +1 -0
  9. package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +6 -2
  10. package/dist/esm/FlowTemplateDetailV2/components/RejectedModal/index.js +6 -3
  11. package/dist/esm/FlowTemplateDetailV2/components/WithdrawModal/index.js +6 -3
  12. package/dist/esm/FlowTemplateDetailV2/index.d.ts +1 -21
  13. package/dist/esm/FlowTemplateDetailV2/index.js +154 -117
  14. package/dist/esm/FlowTemplateDetailV2/index.less +6 -0
  15. package/dist/esm/FlowTemplateDetailV2/pollOperationResult.d.ts +2 -0
  16. package/dist/esm/FlowTemplateDetailV2/pollOperationResult.js +39 -0
  17. package/dist/esm/FlowTemplateDetailV2/store/reducers.d.ts +4 -0
  18. package/dist/esm/FlowTemplateDetailV2/store/reducers.js +14 -2
  19. package/dist/esm/FlowTemplateDetailV2/store/selector.d.ts +2 -0
  20. package/dist/esm/FlowTemplateDetailV2/store/selector.js +6 -0
  21. package/dist/esm/FlowTemplateDetailV2/type.d.ts +28 -0
  22. package/dist/esm/FlowTemplateDetailV2/type.js +1 -0
  23. package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js +8 -0
  24. package/dist/esm/WorkOrder/components/WorkOrderList/index.js +6 -0
  25. package/dist/esm/common/utils/tools.js +3 -1
  26. package/dist/esm/model/customizeWorkOrder/selector.d.ts +18 -0
  27. package/dist/esm/model/flowTemplateDetail/api.d.ts +3 -0
  28. package/dist/esm/model/flowTemplateDetail/api.js +25 -0
  29. package/dist/esm/model/flowTemplateDetail/types.d.ts +5 -1
  30. package/dist/esm/model/flowTemplateDetail/types.js +2 -0
  31. package/dist/esm/model/logicFlow/selector.d.ts +3 -0
  32. package/dist/esm/model/paymentWorkOrder/selector.d.ts +9 -0
  33. package/dist/esm/model/singleShopWorkOrder/selector.d.ts +5 -0
  34. package/package.json +5 -5
@@ -12,6 +12,8 @@ export declare const FLOW_STATUS_V2: {
12
12
  STOPPING: string;
13
13
  COMPLETED: string;
14
14
  CLOSED: string;
15
+ FLOWING: string;
16
+ RETURNING: string;
15
17
  };
16
18
  export declare const CANNOT_BACK_FILL: string[];
17
19
  export declare const verifyHandle: (data: any, componentDtoList: Array<any>) => {
@@ -42,14 +42,17 @@ export var getFlowOperate = {
42
42
  MODIFY_WORK_ORDER: '修改',
43
43
  WITHDRAW: '撤回',
44
44
  REMINDER: '催单',
45
- CANCEL_REMINDER: '取消催单'
45
+ CANCEL_REMINDER: '取消催单',
46
+ AUTO_TASK_RETRY: '自动任务重试'
46
47
  };
47
48
  export var FLOW_STATUS_V2 = {
48
49
  WAIT_COMMIT: '待提交',
49
50
  PROCESSING: '处理中',
50
51
  STOPPING: '暂停中',
51
52
  COMPLETED: '已完成',
52
- CLOSED: '已关闭'
53
+ CLOSED: '已关闭',
54
+ FLOWING: '流转中',
55
+ RETURNING: '回退中'
53
56
  };
54
57
  //不能回填的组件type
55
58
  export var CANNOT_BACK_FILL = ['LOGISTICS_TRAJECTORY', 'LOGISTICS_TRAJECTORY_MORE', 'BUYER_MESSAGE_NOTICE', 'MSG_STATUS', 'NEW_PAYMENT_STATUS', 'REISSUE_STATUS', 'REISSUE_LOGISTICS', 'RETURN_GOODS_STATUS', 'RETURN_GOODS_TRADE_ID', 'ADJUST_WORK_ORDER_STATUS', 'INVOICE_STATUS', 'INVOICING_STATUS', 'EXCHANGE_STATUS', 'WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE'];
@@ -136,7 +139,7 @@ export var submitParams = function submitParams(_ref) {
136
139
  delete params.workOrderUpdateKeyVos;
137
140
  delete params.needTransForm;
138
141
  } else {
139
- var _Object$keys, _currentNodeDetail$wo7, _currentNodeDetail$wo8, _currentNodeDetail$wo9, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20;
142
+ var _Object$keys, _currentNodeDetail$wo7, _currentNodeDetail$wo8, _currentNodeDetail$wo9, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17;
140
143
  // TODO: 新保存工单
141
144
  // 获取当前表单中非空字段
142
145
  var finalComponentList = (_Object$keys = Object.keys(formData)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.filter(function (i) {
@@ -168,22 +171,26 @@ export var submitParams = function submitParams(_ref) {
168
171
  })) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.uniqueKey;
169
172
 
170
173
  // 判断是否有买家昵称或者
171
- var buyerNickUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo17 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : (_currentNodeDetail$wo18 = _currentNodeDetail$wo17.componentDtoList) === null || _currentNodeDetail$wo18 === void 0 ? void 0 : (_currentNodeDetail$wo19 = _currentNodeDetail$wo18.find(function (item) {
172
- return item.workOrderComponentType === 'BUYER_NICK_INPUT';
173
- })) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.uniqueKey;
174
+ // const buyerNickUniqueKey = currentNodeDetail?.workOrderTemplateInfo?.componentDtoList?.find(
175
+ // (item: any) => item.workOrderComponentType === 'BUYER_NICK_INPUT',
176
+ // )?.uniqueKey;
174
177
  if (paymentTradeIdUniqueKey) {
175
- var _formData, _formData2;
178
+ var _formData;
176
179
  params.workOrder.tid = formData === null || formData === void 0 ? void 0 : (_formData = formData["".concat(paymentTradeIdUniqueKey)]) === null || _formData === void 0 ? void 0 : _formData.enterprisePaymentTid;
177
- params.workOrder.buyerOpenUid = formData === null || formData === void 0 ? void 0 : (_formData2 = formData["".concat(paymentTradeIdUniqueKey)]) === null || _formData2 === void 0 ? void 0 : _formData2.enterprisePaymentBuyerOpenUid;
180
+ // params.workOrder.buyerOpenUid =
181
+ // formData?.[`${paymentTradeIdUniqueKey}`]?.enterprisePaymentBuyerOpenUid;
178
182
  }
183
+
179
184
  if (tradeIdUniqueKey) {
180
185
  params.workOrder.tid = formData === null || formData === void 0 ? void 0 : formData[tradeIdUniqueKey];
181
186
  }
182
- if (buyerNickUniqueKey) {
183
- var _formData$buyerNickUn;
184
- params.workOrder.buyerOpenUid = formData === null || formData === void 0 ? void 0 : (_formData$buyerNickUn = formData[buyerNickUniqueKey]) === null || _formData$buyerNickUn === void 0 ? void 0 : _formData$buyerNickUn.buyerOpenUid;
187
+ // if (buyerNickUniqueKey) {
188
+ // params.workOrder.buyerOpenUid = formData?.[buyerNickUniqueKey]?.buyerOpenUid;
189
+ // }
190
+ if (formData !== null && formData !== void 0 && formData['fixed_field_buyerOpenUid']) {
191
+ params.workOrder.buyerOpenUid = formData === null || formData === void 0 ? void 0 : formData['fixed_field_buyerOpenUid'];
185
192
  }
186
- params.workOrder.workOrderComponents = submitDataTransOldFormat(formData, newTemplateDetail, !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo20 !== void 0 && _currentNodeDetail$wo20.id), currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder, params.workOrder, (plat === null || plat === void 0 ? void 0 : plat.accountName) || '');
193
+ params.workOrder.workOrderComponents = submitDataTransOldFormat(formData, newTemplateDetail, !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo17 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo17 !== void 0 && _currentNodeDetail$wo17.id), currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder, params.workOrder, (plat === null || plat === void 0 ? void 0 : plat.accountName) || '');
187
194
  //端上有买家id 就返填当前买家 即使不是当前买家的订单
188
195
  if (plat.platform !== PlatForm.PC && plat !== null && plat !== void 0 && plat.buyerId) {
189
196
  params.workOrder.buyerOpenUid = plat === null || plat === void 0 ? void 0 : plat.buyerId;
@@ -10,7 +10,7 @@ var getActionMap = function getActionMap(nodeStatus, hasPreNode, flowType) {
10
10
  return flowType === FlowType.SINGLE_PAGE ? ['save', 'forward', 'close', 'stop', 'submit'] : ['forward', 'save', 'submit', 'close', 'stop'];
11
11
  } else if (nodeStatus === FlowStatus.STOPPING) {
12
12
  return ['open', 'close'];
13
- } else if (nodeStatus === FlowStatus.CLOSE || nodeStatus === FlowStatus.COMPLETED) {
13
+ } else if ([FlowStatus.CLOSE, FlowStatus.COMPLETED, FlowStatus.RETURNING, FlowStatus.FLOWING].includes(nodeStatus)) {
14
14
  return [];
15
15
  } else {
16
16
  return ['save', 'submit'];
@@ -22,7 +22,7 @@ import { message } from 'antd';
22
22
  import { useMemoizedFn } from 'ahooks';
23
23
  import { calcWorkOrderList } from "../../../common/utils/tools";
24
24
  import { FlowStatus, NodeType, NodeStatus } from "../../../model/flowTemplateDetail/types";
25
- import { modifyWorkOrder } from "../../../model/flowTemplateDetail/api";
25
+ import { modifyWorkOrder, restartAutoTask } from "../../../model/flowTemplateDetail/api";
26
26
  import Header from "../Header";
27
27
  import FormRender from "../FormRender";
28
28
  import RenderDetail from "../RenderDetail";
@@ -39,7 +39,7 @@ var formProps = {
39
39
  layout: 'vertical'
40
40
  };
41
41
  var CurrentNode = function CurrentNode(props, ref) {
42
- var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$no18, _currentNodeDetail$no19, _currentNodeDetail$wo20;
42
+ var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$wo22;
43
43
  var formRenderRef = useRef(null);
44
44
  useImperativeHandle(ref, function () {
45
45
  return {
@@ -233,38 +233,84 @@ var CurrentNode = function CurrentNode(props, ref) {
233
233
  return _ref.apply(this, arguments);
234
234
  };
235
235
  }();
236
+ var handleRestartAutoTask = /*#__PURE__*/function () {
237
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
238
+ var _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$no18;
239
+ var _yield$restartAutoTas, success, _controllerRef$curren2;
240
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
241
+ while (1) switch (_context2.prev = _context2.next) {
242
+ case 0:
243
+ _context2.next = 2;
244
+ return restartAutoTask({
245
+ operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
246
+ flowTemplateId: flowTemplateId,
247
+ flowWorkOrderId: flowWorkOrderId,
248
+ workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : _currentNodeDetail$wo10.id,
249
+ workOrderUpdateTime: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.update,
250
+ nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no18 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no18 === void 0 ? void 0 : _currentNodeDetail$no18.id) || ''
251
+ })
252
+ });
253
+ case 2:
254
+ _yield$restartAutoTas = _context2.sent;
255
+ success = _yield$restartAutoTas.success;
256
+ if (success) {
257
+ message.success('重试成功');
258
+ queryRemarkList();
259
+ dispatch(fetchPanelInfo({
260
+ flowTemplateKey: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey,
261
+ flowWorkOrderId: flowWorkOrderId
262
+ }, {
263
+ signal: controllerRef === null || controllerRef === void 0 ? void 0 : (_controllerRef$curren2 = controllerRef.current) === null || _controllerRef$curren2 === void 0 ? void 0 : _controllerRef$curren2.signal
264
+ }));
265
+ }
266
+ case 5:
267
+ case "end":
268
+ return _context2.stop();
269
+ }
270
+ }, _callee2);
271
+ }));
272
+ return function handleRestartAutoTask() {
273
+ return _ref2.apply(this, arguments);
274
+ };
275
+ }();
236
276
  var isArtificialNode = tag === 'artificial';
237
- var showEdit = isArtificialNode && isCurrentNodeHandler && !readonly && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : _currentNodeDetail$wo10.flowStatus) === FlowStatus.COMPLETED;
277
+ 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;
278
+ var showRestartAutoTask = tag === 'auto' && flowStatus === FlowStatus.PROCESSING;
238
279
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, {
239
280
  tag: tag,
240
281
  nodeName: nodeName,
241
282
  showEdit: showEdit,
242
283
  showLook: false,
243
- handler: isArtificialNode ? (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.completedUserName) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : (_currentNodeDetail$wo13 = _currentNodeDetail$wo12.handlerList) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : (_currentNodeDetail$wo14 = _currentNodeDetail$wo13[0]) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.account) : '',
244
- showWithdraw: isArtificialNode && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : _currentNodeDetail$wo15.flowStatus) === FlowStatus.COMPLETED && isCurrentNodeHandler && !readonly,
245
- showReminder: isArtificialNode && [NodeStatus.WAITING, NodeStatus.STOPPING].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.flowStatus) && isCurrentNodeHandler && !readonly,
246
- isReminder: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo17 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : (_currentNodeDetail$wo18 = _currentNodeDetail$wo17.jsonMap) === null || _currentNodeDetail$wo18 === void 0 ? void 0 : _currentNodeDetail$wo18.flowTags) || '[]').includes('REMINDER'),
284
+ showRestartAutoTask: showRestartAutoTask,
285
+ 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) : '',
286
+ 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,
287
+ 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) && isCurrentNodeHandler && !readonly,
288
+ 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'),
247
289
  handleWithdraw: handleWithdraw,
248
290
  handleReminder: onReminder,
249
291
  editing: editing,
250
292
  handleEdit: handleEdit,
251
293
  handleSave: handleSave,
252
- handleLabel: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.flowStatus) === FlowStatus.COMPLETED ? '完成人' : '处理人'
294
+ handleLabel: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo21 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo21 === void 0 ? void 0 : _currentNodeDetail$wo21.flowStatus) === FlowStatus.COMPLETED ? '完成人' : '处理人',
295
+ handleRestartAutoTask: handleRestartAutoTask,
296
+ flowTemplateKey: (operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey) || '',
297
+ flowWorkOrderId: flowWorkOrderId || '',
298
+ nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no19 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no19 === void 0 ? void 0 : _currentNodeDetail$no19.id) || ''
253
299
  }), /*#__PURE__*/React.createElement("div", {
254
300
  className: styles.formRenderContainer
255
- }, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no18 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no18 === void 0 ? void 0 : _currentNodeDetail$no18.nodeType) && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) && (flowStatus === FlowStatus.COMPLETED && !editing ? /*#__PURE__*/React.createElement(RenderDetail, {
301
+ }, [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, {
256
302
  workOrderTemplateInfo: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
257
303
  transData: transData,
258
304
  platform: plat.platform,
259
305
  onOpenWangWang: onOpenWangWang
260
306
  }) : /*#__PURE__*/React.createElement(FormRender, {
261
307
  ref: formRenderRef,
262
- isShowShopList: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no19 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no19 === void 0 ? void 0 : _currentNodeDetail$no19.nodeType) && PlatForm.PC === plat.platform,
308
+ isShowShopList: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.nodeType) && PlatForm.PC === plat.platform,
263
309
  plat: plat,
264
310
  templateDetail: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
265
311
  shopList: shopList,
266
312
  record: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder,
267
- shopId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo20 === void 0 ? void 0 : _currentNodeDetail$wo20.shopId) || plat.shopId || defaultShopId,
313
+ 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,
268
314
  accountName: plat === null || plat === void 0 ? void 0 : plat.accountName,
269
315
  onOpenWangWang: onOpenWangWang,
270
316
  onUpdateRemark: onUpdateRemark,
@@ -1166,6 +1166,9 @@ var FormRender = function FormRender(props, ref) {
1166
1166
  handleChangeShopId: handleChangeShopId,
1167
1167
  hidden: !isShowShopList,
1168
1168
  disabled: !!workOrderId || look
1169
+ }), /*#__PURE__*/React.createElement(Form.Item, {
1170
+ name: "fixed_field_buyerOpenUid",
1171
+ hidden: true
1169
1172
  }), finalFormItems));
1170
1173
  };
1171
1174
  export default /*#__PURE__*/forwardRef(FormRender);
@@ -6,18 +6,23 @@ interface HeaderProps {
6
6
  showEdit: boolean;
7
7
  showWithdraw: boolean;
8
8
  showReminder?: boolean;
9
+ showRestartAutoTask?: boolean;
9
10
  handleLook?: () => void;
10
11
  handleSave?: () => void;
11
12
  handleEdit?: () => void;
12
13
  handlePackUp?: () => void;
13
14
  handleWithdraw?: () => void;
14
15
  handleReminder?: (type: string) => void;
16
+ handleRestartAutoTask?: () => void;
15
17
  loading?: boolean;
16
18
  editing?: boolean;
17
19
  opening?: boolean;
18
20
  handler?: string;
19
21
  isReminder?: string;
20
22
  handleLabel?: string;
23
+ flowTemplateKey: string;
24
+ nodeId: string;
25
+ flowWorkOrderId: string;
21
26
  }
22
27
  declare const Header: (props: HeaderProps) => React.JSX.Element;
23
28
  export default Header;
@@ -1,10 +1,35 @@
1
- import React from 'react';
2
- import { Button, Spin, Tooltip, Typography } from 'antd';
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useState } from 'react';
8
+ import { Button, Spin, Tooltip, Typography, Space, Modal, Table } from 'antd';
9
+ import moment from 'moment';
10
+ import { useRequest } from 'ahooks';
11
+ import { queryFlowFail } from "../../../model/flowTemplateDetail/api";
3
12
  import { NODE_TYPE } from "../../../common/constant";
4
13
  import styles from "./index.module.less";
5
14
  var Text = Typography.Text;
15
+ var columns = [{
16
+ title: '创建时间',
17
+ dataIndex: 'created',
18
+ width: '200px',
19
+ render: function render(val) {
20
+ return moment(val).format('YYYY-MM-DD HH:mm:ss');
21
+ }
22
+ }, {
23
+ title: '处理人',
24
+ dataIndex: 'lastManualOperatorName',
25
+ width: '100px'
26
+ }, {
27
+ title: '失败原因',
28
+ dataIndex: 'cancelReason',
29
+ width: '550px'
30
+ }];
6
31
  var Header = function Header(props) {
7
- var _NODE_TYPE$tag, _NODE_TYPE$tag2;
32
+ var _NODE_TYPE$tag, _NODE_TYPE$tag2, _data$data;
8
33
  var tag = props.tag,
9
34
  nodeName = props.nodeName,
10
35
  showLook = props.showLook,
@@ -25,10 +50,39 @@ var Header = function Header(props) {
25
50
  showWithdraw = _props$showWithdraw === void 0 ? false : _props$showWithdraw,
26
51
  _props$showReminder = props.showReminder,
27
52
  showReminder = _props$showReminder === void 0 ? false : _props$showReminder,
53
+ _props$showRestartAut = props.showRestartAutoTask,
54
+ showRestartAutoTask = _props$showRestartAut === void 0 ? false : _props$showRestartAut,
28
55
  handler = props.handler,
29
56
  isReminder = props.isReminder,
30
57
  _props$handleLabel = props.handleLabel,
31
- handleLabel = _props$handleLabel === void 0 ? '处理人' : _props$handleLabel;
58
+ handleLabel = _props$handleLabel === void 0 ? '处理人' : _props$handleLabel,
59
+ handleRestartAutoTask = props.handleRestartAutoTask,
60
+ flowTemplateKey = props.flowTemplateKey,
61
+ nodeId = props.nodeId,
62
+ flowWorkOrderId = props.flowWorkOrderId;
63
+ var _useState = useState(false),
64
+ _useState2 = _slicedToArray(_useState, 2),
65
+ visible = _useState2[0],
66
+ setVisible = _useState2[1];
67
+ var _useRequest = useRequest(function () {
68
+ return queryFlowFail({
69
+ flowTemplateKeys: [flowTemplateKey],
70
+ nodeIdList: [nodeId],
71
+ flowWorkOrderIdList: [flowWorkOrderId]
72
+ });
73
+ }, {
74
+ manual: true
75
+ }),
76
+ requestLoading = _useRequest.loading,
77
+ run = _useRequest.run,
78
+ data = _useRequest.data;
79
+ var handleLookAbnormal = function handleLookAbnormal() {
80
+ run();
81
+ setVisible(true);
82
+ };
83
+ var handleCancel = function handleCancel() {
84
+ setVisible(false);
85
+ };
32
86
  return /*#__PURE__*/React.createElement("div", {
33
87
  className: styles.wrap
34
88
  }, (NODE_TYPE === null || NODE_TYPE === void 0 ? void 0 : NODE_TYPE[tag]) && /*#__PURE__*/React.createElement("div", {
@@ -46,7 +100,17 @@ var Header = function Header(props) {
46
100
  }, /*#__PURE__*/React.createElement(Spin, {
47
101
  spinning: loading,
48
102
  size: "small"
49
- })), /*#__PURE__*/React.createElement("div", null, showWithdraw && /*#__PURE__*/React.createElement(Button, {
103
+ })), /*#__PURE__*/React.createElement("div", null, showRestartAutoTask && /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
104
+ type: "link",
105
+ onClick: handleLookAbnormal,
106
+ "data-spm-click": "\u5F02\u5E38\u65E5\u5FD7",
107
+ "data-spm-param": "\u5F02\u5E38\u65E5\u5FD7"
108
+ }, "\u5F02\u5E38\u65E5\u5FD7"), /*#__PURE__*/React.createElement(Button, {
109
+ type: "link",
110
+ onClick: handleRestartAutoTask,
111
+ "data-spm-click": "\u91CD\u8BD5",
112
+ "data-spm-param": "\u91CD\u8BD5"
113
+ }, "\u91CD\u8BD5")), showWithdraw && /*#__PURE__*/React.createElement(Button, {
50
114
  type: "link",
51
115
  onClick: handleWithdraw,
52
116
  "data-spm-click": "\u64A4\u56DE",
@@ -89,6 +153,20 @@ var Header = function Header(props) {
89
153
  },
90
154
  "data-spm-click": "\u53D6\u6D88\u50AC\u5355",
91
155
  "data-spm-param": "\u53D6\u6D88\u50AC\u5355"
92
- }, "\u53D6\u6D88")))));
156
+ }, "\u53D6\u6D88"))), /*#__PURE__*/React.createElement(Modal, {
157
+ title: "\u5F02\u5E38\u65E5\u5FD7",
158
+ onOk: handleCancel,
159
+ onCancel: handleCancel,
160
+ visible: visible
161
+ }, /*#__PURE__*/React.createElement(Table, {
162
+ columns: columns,
163
+ dataSource: (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.list) || [],
164
+ loading: requestLoading,
165
+ pagination: false,
166
+ scroll: {
167
+ x: 850,
168
+ y: 300
169
+ }
170
+ }))));
93
171
  };
94
172
  export default Header;
@@ -14,6 +14,7 @@ interface NodeItem {
14
14
  readonly?: boolean;
15
15
  visibleType?: string;
16
16
  nodeIsAuto: boolean;
17
+ flowTemplateKey: string;
17
18
  }
18
19
  declare const NodeItem: (props: NodeItem) => React.JSX.Element;
19
20
  export default NodeItem;
@@ -51,7 +51,8 @@ var NodeItem = function NodeItem(props) {
51
51
  readonly = _props$readonly === void 0 ? false : _props$readonly,
52
52
  _props$visibleType = props.visibleType,
53
53
  visibleType = _props$visibleType === void 0 ? '' : _props$visibleType,
54
- nodeIsAuto = props.nodeIsAuto;
54
+ nodeIsAuto = props.nodeIsAuto,
55
+ flowTemplateKey = props.flowTemplateKey;
55
56
  var _useContext = useContext(Context),
56
57
  dispatch = _useContext.dispatch;
57
58
  var plat = useSelector(selectPlatInfo);
@@ -272,7 +273,10 @@ var NodeItem = function NodeItem(props) {
272
273
  handler: isArtificialNode ? handler : '',
273
274
  showWithdraw: showWithdraw,
274
275
  showReminder: false,
275
- handleLabel: '完成人'
276
+ handleLabel: '完成人',
277
+ flowTemplateKey: flowTemplateKey,
278
+ nodeId: nodeId,
279
+ flowWorkOrderId: flowWorkOrderId
276
280
  }), /*#__PURE__*/React.createElement("div", {
277
281
  style: {
278
282
  display: open ? 'block' : 'none',
@@ -9,11 +9,11 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
9
9
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React, { useRef, useEffect, useState, useContext } from 'react';
12
- import { Modal, Form, Input, message, Select } from 'antd';
12
+ import { Modal, Form, Input, message, Select, Spin } from 'antd';
13
13
  import { ApaasUploadAsync } from '@kmkf-fe-packages/basic-components';
14
14
  import { queryIntersectionPreNodes } from "../../../model/flowTemplateDetail/api";
15
15
  import { useSelector } from "../../context/useSelector";
16
- import { selectCurrentAction } from "../../store/selector";
16
+ import { selectCurrentAction, selectRejectLoading } from "../../store/selector";
17
17
  import { Context } from "../../context";
18
18
  var TextArea = Input.TextArea;
19
19
  var RejectedModal = function RejectedModal(_ref) {
@@ -28,6 +28,7 @@ var RejectedModal = function RejectedModal(_ref) {
28
28
  preNods = _useState2[0],
29
29
  setPreNodes = _useState2[1];
30
30
  var action = useSelector(selectCurrentAction);
31
+ var rejectLoading = useSelector(selectRejectLoading);
31
32
  var _useContext = useContext(Context),
32
33
  dispatch = _useContext.dispatch;
33
34
  var imageRef = useRef();
@@ -109,7 +110,9 @@ var RejectedModal = function RejectedModal(_ref) {
109
110
  onCancel: closeModal,
110
111
  onOk: handleOk,
111
112
  destroyOnClose: true
112
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form, {
113
+ }, /*#__PURE__*/React.createElement(Spin, {
114
+ spinning: rejectLoading
115
+ }, /*#__PURE__*/React.createElement(Form, {
113
116
  form: form,
114
117
  layout: "vertical"
115
118
  }, /*#__PURE__*/React.createElement(Form.Item, {
@@ -9,9 +9,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
9
9
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React, { useRef, useContext } from 'react';
12
- import { Modal, Form, Input, message } from 'antd';
12
+ import { Modal, Form, Input, message, Spin } from 'antd';
13
13
  import { ApaasUploadAsync } from '@kmkf-fe-packages/basic-components';
14
- import { selectCurrentAction } from "../../store/selector";
14
+ import { selectCurrentAction, selectWithDrawLoading } from "../../store/selector";
15
15
  import { Context } from "../../context";
16
16
  import { useSelector } from "../../context/useSelector";
17
17
  var TextArea = Input.TextArea;
@@ -21,6 +21,7 @@ var WithdrawModal = function WithdrawModal(_ref) {
21
21
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
22
22
  form = _Form$useForm2[0];
23
23
  var action = useSelector(selectCurrentAction);
24
+ var withdrawLoading = useSelector(selectWithDrawLoading);
24
25
  var _useContext = useContext(Context),
25
26
  dispatch = _useContext.dispatch;
26
27
  var imageRef = useRef();
@@ -64,7 +65,9 @@ var WithdrawModal = function WithdrawModal(_ref) {
64
65
  visible: action === 'withdraw',
65
66
  onCancel: closeModal,
66
67
  onOk: handleOK
67
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
68
+ }, /*#__PURE__*/React.createElement(Spin, {
69
+ spinning: withdrawLoading
70
+ }, /*#__PURE__*/React.createElement("div", {
68
71
  style: {
69
72
  marginBottom: '16px'
70
73
  }
@@ -1,25 +1,5 @@
1
1
  import React from 'react';
2
- import { PlatFormInfo } from '../model/flowTemplateDetail/types';
3
2
  import './index.less';
4
- declare type FlowTemplateDetailProps = {
5
- flowTemplateKey: string;
6
- flowWorkOrderId?: string;
7
- plat: PlatFormInfo;
8
- shopList: any[];
9
- readonly?: boolean;
10
- privilege?: boolean;
11
- onOpenWangWang?: (nick: string, id: string) => void;
12
- callbackDealWorkOrderSuccess?: (type: string, workOrderId?: string) => void;
13
- onJumpMemoPage?: () => void;
14
- onTalkChange?: (data: {
15
- tid: string;
16
- shopId: string;
17
- }) => void;
18
- autoSubmit?: boolean;
19
- callbackAutoSubmitResult?: (result: {
20
- success: boolean;
21
- message?: string;
22
- }) => void;
23
- };
3
+ import { FlowTemplateDetailProps } from './type';
24
4
  declare const ProviderWrap: (props: FlowTemplateDetailProps) => React.JSX.Element;
25
5
  export default ProviderWrap;