@kmkf-fe-packages/kmkf-work-order-service-component 2.2.38 → 2.2.39-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.d.ts +3 -1
- package/dist/esm/FlowTemplateDetailV2/components/AutoTaskDetail/index.js +65 -3
- package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +75 -8
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +67 -48
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.js +37 -18
- package/dist/esm/FlowTemplateDetailV2/components/Header/index.d.ts +2 -0
- package/dist/esm/FlowTemplateDetailV2/components/Header/index.js +11 -1
- package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +3 -2
- package/dist/esm/FlowTemplateDetailV2/index.js +75 -54
- package/dist/esm/FlowTemplateDetailV2/store/selector.d.ts +1 -0
- package/dist/esm/LBOrderDetail/detail/OrderInfo.d.ts +18 -0
- package/dist/esm/LBOrderDetail/detail/OrderInfo.js +631 -0
- package/dist/esm/LBOrderDetail/detail/ServiceProgress.d.ts +11 -0
- package/dist/esm/LBOrderDetail/detail/ServiceProgress.js +449 -0
- package/dist/esm/LBOrderDetail/detail/index.d.ts +12 -0
- package/dist/esm/LBOrderDetail/detail/index.js +50 -0
- package/dist/esm/LBOrderDetail/detail/index.module.less +63 -0
- package/dist/esm/LBOrderDetail/detail/services.d.ts +4 -0
- package/dist/esm/LBOrderDetail/detail/services.js +28 -0
- package/dist/esm/LBOrderDetail/detail/types.d.ts +383 -0
- package/dist/esm/LBOrderDetail/detail/types.js +1 -0
- package/dist/esm/LBOrderDetail/index.d.ts +14 -0
- package/dist/esm/LBOrderDetail/index.js +63 -0
- package/dist/esm/Login/index.d.ts +1 -0
- package/dist/esm/Login/index.js +3 -1
- package/dist/esm/LoginNew/index.d.ts +8 -0
- package/dist/esm/LoginNew/index.js +268 -0
- package/dist/esm/LoginNew/index.module.less +45 -0
- package/dist/esm/common/constant.d.ts +1 -0
- package/dist/esm/common/constant.js +4 -1
- package/dist/esm/common/utils/constant.js +9 -1
- package/dist/esm/common/utils/submitDataTransOldFormat.js +50 -34
- package/dist/esm/common/utils/tools.d.ts +4 -0
- package/dist/esm/common/utils/tools.js +52 -1
- package/dist/esm/common/utils/tools_constants.js +1 -1
- package/dist/esm/common/utils/transformWorkOrderData.js +15 -8
- package/dist/esm/common/utils/xzSDK.js +1 -1
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/model/flowTemplateDetail/api.d.ts +1 -0
- package/dist/esm/model/flowTemplateDetail/api.js +7 -0
- package/dist/esm/model/login.d.ts +10 -0
- package/dist/esm/model/login.js +66 -45
- package/dist/esm/model/servers/api.d.ts +2 -0
- package/dist/esm/model/servers/api.js +9 -0
- package/dist/esm/model/types/login.d.ts +1 -0
- package/package.json +4 -4
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import type { Shop } from '../../../model/types/login';
|
|
3
|
+
export declare const AutoTaskDetail: ({ flowEventData, shopList, }: {
|
|
3
4
|
flowEventData: any;
|
|
5
|
+
shopList: Shop[];
|
|
4
6
|
}) => React.JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { isNumber } from 'lodash';
|
|
3
|
-
import { Divider } from 'antd';
|
|
3
|
+
import { Divider, Button } from 'antd';
|
|
4
|
+
import { LB } from '@kmkf-fe-packages/kmkf-work-order-service-component';
|
|
4
5
|
export var AutoTaskDetail = function AutoTaskDetail(_ref) {
|
|
5
|
-
var flowEventData = _ref.flowEventData
|
|
6
|
+
var flowEventData = _ref.flowEventData,
|
|
7
|
+
shopList = _ref.shopList;
|
|
6
8
|
var mapping = {
|
|
7
9
|
0: '执行中',
|
|
8
10
|
1: '部分成功',
|
|
@@ -13,6 +15,30 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
|
|
|
13
15
|
6: '同时存在成功和失败且已完结',
|
|
14
16
|
7: '等待业务执行'
|
|
15
17
|
};
|
|
18
|
+
var repairOrderMapList = [{
|
|
19
|
+
name: '安装/维修单订单编号',
|
|
20
|
+
value: 'repairOrderNumber'
|
|
21
|
+
}, {
|
|
22
|
+
name: '安装/维修单订单ID',
|
|
23
|
+
value: 'repairOrderId'
|
|
24
|
+
}, {
|
|
25
|
+
name: '服务类型',
|
|
26
|
+
value: 'serviceType'
|
|
27
|
+
}, {
|
|
28
|
+
name: '服务状态',
|
|
29
|
+
value: 'serviceStatus',
|
|
30
|
+
color: '#1b5bf3'
|
|
31
|
+
}, {
|
|
32
|
+
name: '最新服务进度',
|
|
33
|
+
value: 'latestServiceProgress',
|
|
34
|
+
color: '#1b5bf3'
|
|
35
|
+
}, {
|
|
36
|
+
name: '最新服务进度时间',
|
|
37
|
+
value: 'latestServiceProgressTime'
|
|
38
|
+
}, {
|
|
39
|
+
name: '下单时间',
|
|
40
|
+
value: 'orderTime'
|
|
41
|
+
}];
|
|
16
42
|
var eventStatus = flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventStatus;
|
|
17
43
|
var renderRules = function renderRules() {
|
|
18
44
|
var _flowEventData$eventD, _flowEventData$eventD2;
|
|
@@ -28,8 +54,44 @@ export var AutoTaskDetail = function AutoTaskDetail(_ref) {
|
|
|
28
54
|
}))), /*#__PURE__*/React.createElement("p", null, item.remark));
|
|
29
55
|
}));
|
|
30
56
|
};
|
|
57
|
+
var renderRepairResult = function renderRepairResult() {
|
|
58
|
+
var _flowEventData$eventD6, _flowEventData$eventD7;
|
|
59
|
+
var repairData = (flowEventData === null || flowEventData === void 0 ? void 0 : (_flowEventData$eventD6 = flowEventData.eventData) === null || _flowEventData$eventD6 === void 0 ? void 0 : (_flowEventData$eventD7 = _flowEventData$eventD6.otherBusinessData) === null || _flowEventData$eventD7 === void 0 ? void 0 : _flowEventData$eventD7.repairData) || {};
|
|
60
|
+
var repairOrderStatus = repairData.repairOrderStatus,
|
|
61
|
+
id = repairData.id;
|
|
62
|
+
var isSuccess = repairOrderStatus === '成功';
|
|
63
|
+
return /*#__PURE__*/React.createElement("div", null, id && /*#__PURE__*/React.createElement(LB.LBOrder, {
|
|
64
|
+
id: id,
|
|
65
|
+
activeKey: "orderInfo",
|
|
66
|
+
shopList: shopList,
|
|
67
|
+
btn: /*#__PURE__*/React.createElement(Button, {
|
|
68
|
+
style: {
|
|
69
|
+
padding: '4px 0'
|
|
70
|
+
},
|
|
71
|
+
type: "link"
|
|
72
|
+
}, "\u67E5\u770B\u8BE6\u60C5>>")
|
|
73
|
+
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
74
|
+
style: {
|
|
75
|
+
marginBottom: '8px'
|
|
76
|
+
}
|
|
77
|
+
}, "\u5B89\u88C5/\u7EF4\u4FEE\u5355\u72B6\u6001:", /*#__PURE__*/React.createElement("span", {
|
|
78
|
+
style: {
|
|
79
|
+
color: isSuccess ? '#70B603' : '#D9001B'
|
|
80
|
+
}
|
|
81
|
+
}, repairOrderStatus)), isSuccess && (repairOrderMapList === null || repairOrderMapList === void 0 ? void 0 : repairOrderMapList.map(function (item) {
|
|
82
|
+
return /*#__PURE__*/React.createElement("p", {
|
|
83
|
+
style: {
|
|
84
|
+
marginBottom: '8px'
|
|
85
|
+
}
|
|
86
|
+
}, item.name, ":", /*#__PURE__*/React.createElement("span", {
|
|
87
|
+
style: {
|
|
88
|
+
color: (item === null || item === void 0 ? void 0 : item.color) || '#000'
|
|
89
|
+
}
|
|
90
|
+
}, repairData === null || repairData === void 0 ? void 0 : repairData[item.value]));
|
|
91
|
+
}))));
|
|
92
|
+
};
|
|
31
93
|
// const renderReason = () => {
|
|
32
94
|
// return <p>{ flowEventData?.eventData?.businessStatus?.map((item: any) => item?.remark)?.join(',') }</p>
|
|
33
95
|
// }
|
|
34
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules());
|
|
96
|
+
return /*#__PURE__*/React.createElement("div", null, (flowEventData === null || flowEventData === void 0 ? void 0 : flowEventData.eventType) === 'LBDJ_ONE_PRICE_ORDER' ? renderRepairResult() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", null, isNumber(eventStatus) && "\u6267\u884C\u72B6\u6001: ".concat(mapping[eventStatus])), renderRules()));
|
|
35
97
|
};
|
|
@@ -18,12 +18,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
18
18
|
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; } }
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
import React, { useEffect, useMemo, useState, useRef, forwardRef, useImperativeHandle, useContext } from 'react';
|
|
21
|
+
import { Modal } from 'antd';
|
|
21
22
|
import { message } from 'antd';
|
|
22
23
|
import { useMemoizedFn } from 'ahooks';
|
|
23
24
|
import { get, find } from 'lodash';
|
|
24
25
|
import { calcWorkOrderList, submitParams } from "../../../common/utils/tools";
|
|
25
26
|
import { FlowStatus, NodeType, NodeStatus } from "../../../model/flowTemplateDetail/types";
|
|
26
|
-
import { modifyWorkOrder, restartAutoTask } from "../../../model/flowTemplateDetail/api";
|
|
27
|
+
import { modifyWorkOrder, restartAutoTask, skipNode } from "../../../model/flowTemplateDetail/api";
|
|
27
28
|
import Header from "../Header";
|
|
28
29
|
import FormRender from "../FormRender";
|
|
29
30
|
import RenderDetail from "../RenderDetail";
|
|
@@ -36,12 +37,13 @@ import { fetchCurrentTradeIdLinkWorkOrder, fetchPanelInfo } from "../../store/re
|
|
|
36
37
|
import { useSelector } from "../../context/useSelector";
|
|
37
38
|
import { Context } from "../../context";
|
|
38
39
|
import { AutoTaskDetail } from "../AutoTaskDetail";
|
|
40
|
+
import { SKIP_NODE_TYPES } from "../../../common/constant";
|
|
39
41
|
var formProps = {
|
|
40
42
|
className: 'customizeFormModalClassName',
|
|
41
43
|
layout: 'vertical'
|
|
42
44
|
};
|
|
43
45
|
var CurrentNode = function CurrentNode(props, ref) {
|
|
44
|
-
var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no18, _currentNodeDetail$fl, _currentNodeDetail$wo12, _localStorage, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$
|
|
46
|
+
var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no18, _currentNodeDetail$fl, _currentNodeDetail$wo12, _localStorage, _currentNodeDetail$fl2, _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;
|
|
45
47
|
var formRenderRef = useRef(null);
|
|
46
48
|
useImperativeHandle(ref, function () {
|
|
47
49
|
return {
|
|
@@ -282,13 +284,75 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
282
284
|
return _ref2.apply(this, arguments);
|
|
283
285
|
};
|
|
284
286
|
}();
|
|
287
|
+
var handleSkip = /*#__PURE__*/function () {
|
|
288
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
289
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
290
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
291
|
+
case 0:
|
|
292
|
+
Modal.confirm({
|
|
293
|
+
title: '当前获取物流单号自动化任务正在执行中,确定要跳过吗?跳过后将无法获取物流信息',
|
|
294
|
+
okText: '确认',
|
|
295
|
+
cancelText: '取消',
|
|
296
|
+
onOk: function () {
|
|
297
|
+
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
298
|
+
var _currentNodeDetail$no21;
|
|
299
|
+
var _yield$skipNode, success, _controllerRef$curren3;
|
|
300
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
301
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
302
|
+
case 0:
|
|
303
|
+
_context3.next = 2;
|
|
304
|
+
return skipNode({
|
|
305
|
+
operateParams: {
|
|
306
|
+
flowTemplateKey: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey,
|
|
307
|
+
flowWorkOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowWorkOrderUpdateTime,
|
|
308
|
+
flowTemplateId: flowTemplateId,
|
|
309
|
+
flowWorkOrderId: flowWorkOrderId,
|
|
310
|
+
nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.id) || ''
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
case 2:
|
|
314
|
+
_yield$skipNode = _context3.sent;
|
|
315
|
+
success = _yield$skipNode.success;
|
|
316
|
+
if (success) {
|
|
317
|
+
message.success('跳过成功');
|
|
318
|
+
queryRemarkList();
|
|
319
|
+
dispatch(fetchPanelInfo({
|
|
320
|
+
flowTemplateKey: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey,
|
|
321
|
+
flowWorkOrderId: flowWorkOrderId
|
|
322
|
+
}, {
|
|
323
|
+
signal: controllerRef === null || controllerRef === void 0 ? void 0 : (_controllerRef$curren3 = controllerRef.current) === null || _controllerRef$curren3 === void 0 ? void 0 : _controllerRef$curren3.signal
|
|
324
|
+
}));
|
|
325
|
+
}
|
|
326
|
+
case 5:
|
|
327
|
+
case "end":
|
|
328
|
+
return _context3.stop();
|
|
329
|
+
}
|
|
330
|
+
}, _callee3);
|
|
331
|
+
}));
|
|
332
|
+
function onOk() {
|
|
333
|
+
return _onOk.apply(this, arguments);
|
|
334
|
+
}
|
|
335
|
+
return onOk;
|
|
336
|
+
}()
|
|
337
|
+
});
|
|
338
|
+
case 1:
|
|
339
|
+
case "end":
|
|
340
|
+
return _context4.stop();
|
|
341
|
+
}
|
|
342
|
+
}, _callee4);
|
|
343
|
+
}));
|
|
344
|
+
return function handleSkip() {
|
|
345
|
+
return _ref3.apply(this, arguments);
|
|
346
|
+
};
|
|
347
|
+
}();
|
|
285
348
|
var isArtificialNode = tag === 'artificial';
|
|
286
349
|
var isAutoNode = tag === 'auto';
|
|
287
|
-
var isShowAutoNodeDetail = isAutoNode && ['ORDER_MEMO_MANY_RULES', 'AFTER_SALE_AUTO_RETURN_GOODS_AGREE_REJECT', 'AFTER_SALE_AUTO_REFUND_REJECT', 'LOGISTICS_INTERCEPT_MULTI_RULE', 'MESSAGE_NOTIFY_EVENT', 'DING_TALK_ROBOT_NOTIFY', 'HTTP_INVOKE', 'ORDER_MEMO'].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : _currentNodeDetail$fl.eventType);
|
|
350
|
+
var isShowAutoNodeDetail = isAutoNode && ['ORDER_MEMO_MANY_RULES', 'AFTER_SALE_AUTO_RETURN_GOODS_AGREE_REJECT', 'AFTER_SALE_AUTO_REFUND_REJECT', 'LOGISTICS_INTERCEPT_MULTI_RULE', 'MESSAGE_NOTIFY_EVENT', 'DING_TALK_ROBOT_NOTIFY', 'HTTP_INVOKE', 'ORDER_MEMO', 'LBDJ_ONE_PRICE_ORDER'].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl === void 0 ? void 0 : _currentNodeDetail$fl.eventType);
|
|
288
351
|
var showEdit = isArtificialNode && isCurrentNodeHandler && !readonly && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.flowStatus) === FlowStatus.COMPLETED;
|
|
289
352
|
// TODO: 决策节点给后端修复数据加了一个入口
|
|
290
353
|
// @ts-ignore
|
|
291
354
|
var showRestartAutoTask = tag === 'auto' && flowStatus === FlowStatus.PROCESSING || tag === 'judge' && ((_localStorage = localStorage) === null || _localStorage === void 0 ? void 0 : _localStorage.getItem('__isDEV__')) === 'true';
|
|
355
|
+
var showSkipButton = SKIP_NODE_TYPES.includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$fl2 = currentNodeDetail.flowEventData) === null || _currentNodeDetail$fl2 === void 0 ? void 0 : _currentNodeDetail$fl2.eventType) && flowStatus && [FlowStatus.FLOWING, FlowStatus.PROCESSING].includes(flowStatus);
|
|
292
356
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Header, {
|
|
293
357
|
tag: tag,
|
|
294
358
|
nodeName: nodeName,
|
|
@@ -300,9 +364,11 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
300
364
|
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) &&
|
|
301
365
|
// isCurrentNodeHandler &&
|
|
302
366
|
!readonly,
|
|
367
|
+
showSkipButton: showSkipButton,
|
|
303
368
|
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'),
|
|
304
369
|
handleWithdraw: handleWithdraw,
|
|
305
370
|
handleReminder: onReminder,
|
|
371
|
+
handleSkip: handleSkip,
|
|
306
372
|
editing: editing,
|
|
307
373
|
handleEdit: handleEdit,
|
|
308
374
|
handleSave: handleSave,
|
|
@@ -310,18 +376,18 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
310
376
|
handleRestartAutoTask: handleRestartAutoTask,
|
|
311
377
|
flowTemplateKey: (operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey) || '',
|
|
312
378
|
flowWorkOrderId: flowWorkOrderId || '',
|
|
313
|
-
nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
379
|
+
nodeId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no22 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no22 === void 0 ? void 0 : _currentNodeDetail$no22.id) || '',
|
|
314
380
|
flowTemplateId: flowTemplateId
|
|
315
381
|
}), /*#__PURE__*/React.createElement("div", {
|
|
316
382
|
className: styles.formRenderContainer
|
|
317
|
-
}, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
383
|
+
}, [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, {
|
|
318
384
|
workOrderTemplateInfo: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
|
|
319
385
|
transData: transData,
|
|
320
386
|
platform: plat.platform,
|
|
321
387
|
onOpenWangWang: onOpenWangWang
|
|
322
388
|
}) : /*#__PURE__*/React.createElement(FormRender, {
|
|
323
389
|
ref: formRenderRef,
|
|
324
|
-
isShowShopList: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
390
|
+
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),
|
|
325
391
|
plat: plat,
|
|
326
392
|
templateDetail: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
|
|
327
393
|
shopList: shopList,
|
|
@@ -338,11 +404,12 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
338
404
|
handleChangeTradeId: handleChangeTradeId,
|
|
339
405
|
canModifyPayment: true,
|
|
340
406
|
flowAllShowHideRules: allShowHideRules,
|
|
341
|
-
isStartNodeWaiting: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
407
|
+
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),
|
|
342
408
|
firstOrderBackfill: flowStatus !== FlowStatus.COMPLETED,
|
|
343
409
|
autoSubmit: autoSubmit
|
|
344
410
|
})), isShowAutoNodeDetail && /*#__PURE__*/React.createElement(AutoTaskDetail, {
|
|
345
|
-
flowEventData: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.flowEventData
|
|
411
|
+
flowEventData: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.flowEventData,
|
|
412
|
+
shopList: shopList
|
|
346
413
|
})));
|
|
347
414
|
};
|
|
348
415
|
export default /*#__PURE__*/forwardRef(CurrentNode);
|
|
@@ -39,7 +39,7 @@ import { groupByPreNode, getCurrentNodeModifiedShowHideRule } from "./common";
|
|
|
39
39
|
import { getCalculationComponentValue } from "../../../common/utils/arithmetic";
|
|
40
40
|
import "./index.less";
|
|
41
41
|
import { CHILD_FIELD_TYPE, CHILD_FIELD_VALUE } from "../../../common/constant";
|
|
42
|
-
import { jsonParseSecurity, findComponentUniqueKeyByType } from "../../../common/utils/tools";
|
|
42
|
+
import { jsonParseSecurity, findComponentUniqueKeyByType, updateComponentToUpperCase } from "../../../common/utils/tools";
|
|
43
43
|
import { NEED_CLEAR_FIELDS_WHEN_SHOP_ID_CHANGE } from "../../constant";
|
|
44
44
|
import { Context } from "../../context";
|
|
45
45
|
import { orderBackKmAddress } from "./constants";
|
|
@@ -649,7 +649,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
649
649
|
// 商品组件映射
|
|
650
650
|
var fillByShopId = function fillByShopId(shopId) {
|
|
651
651
|
// PS: 增加setTimeout 为了让后续的items渲染,然后触发对应的映射
|
|
652
|
-
console.log('fillByShopId', shopId);
|
|
652
|
+
// console.log('fillByShopId', shopId);
|
|
653
653
|
setTimeout(function () {
|
|
654
654
|
var shopUniqueKey = shopId ? shopIdToUniqueKeyMap[shopId] : '';
|
|
655
655
|
shopUniqueKey && fillByMapping('SHOP_SELECT_MAPPING', shopUniqueKey);
|
|
@@ -962,31 +962,40 @@ var FormRender = function FormRender(props, ref) {
|
|
|
962
962
|
|
|
963
963
|
//组件失焦事件
|
|
964
964
|
var componentOnBlur = /*#__PURE__*/function () {
|
|
965
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value, type) {
|
|
965
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value, type, uniqueKey) {
|
|
966
966
|
var promises;
|
|
967
967
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
968
968
|
while (1) switch (_context6.prev = _context6.next) {
|
|
969
969
|
case 0:
|
|
970
|
+
setTimeout(function () {
|
|
971
|
+
var allValue = form.getFieldsValue();
|
|
972
|
+
updateComponentToUpperCase({
|
|
973
|
+
componentDtoList: templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList,
|
|
974
|
+
allValues: allValue,
|
|
975
|
+
uniqueKey: uniqueKey,
|
|
976
|
+
form: form
|
|
977
|
+
});
|
|
978
|
+
}, 0);
|
|
970
979
|
if (!(type === 'erpAfterSaleTradeId')) {
|
|
971
|
-
_context6.next =
|
|
980
|
+
_context6.next = 6;
|
|
972
981
|
break;
|
|
973
982
|
}
|
|
974
|
-
_context6.next =
|
|
983
|
+
_context6.next = 4;
|
|
975
984
|
return onBlurErpAfterSaleTradeId({
|
|
976
985
|
form: form,
|
|
977
986
|
value: value,
|
|
978
987
|
templateDetail: templateDetail,
|
|
979
988
|
setKmLoading: setKmLoading
|
|
980
989
|
});
|
|
981
|
-
case
|
|
982
|
-
_context6.next =
|
|
990
|
+
case 4:
|
|
991
|
+
_context6.next = 49;
|
|
983
992
|
break;
|
|
984
|
-
case
|
|
993
|
+
case 6:
|
|
985
994
|
if (!(type === 'expressLogisticsCode')) {
|
|
986
|
-
_context6.next =
|
|
995
|
+
_context6.next = 16;
|
|
987
996
|
break;
|
|
988
997
|
}
|
|
989
|
-
_context6.next =
|
|
998
|
+
_context6.next = 9;
|
|
990
999
|
return onBlurExpressLogisticsCode({
|
|
991
1000
|
form: form,
|
|
992
1001
|
value: value,
|
|
@@ -994,21 +1003,21 @@ var FormRender = function FormRender(props, ref) {
|
|
|
994
1003
|
setKmLoading: setKmLoading,
|
|
995
1004
|
componentOnBlur: componentOnBlur
|
|
996
1005
|
});
|
|
997
|
-
case
|
|
1006
|
+
case 9:
|
|
998
1007
|
if (!['TR3E2FYXFZCFANVG6O6AALSM' //prod 斯凯奇
|
|
999
1008
|
].includes(companyKey)) {
|
|
1000
|
-
_context6.next =
|
|
1009
|
+
_context6.next = 12;
|
|
1001
1010
|
break;
|
|
1002
1011
|
}
|
|
1003
|
-
_context6.next =
|
|
1012
|
+
_context6.next = 12;
|
|
1004
1013
|
return onBlurSkxLogisticsCode({
|
|
1005
1014
|
form: form,
|
|
1006
1015
|
value: value,
|
|
1007
1016
|
templateDetail: templateDetail,
|
|
1008
1017
|
componentOnBlur: componentOnBlur
|
|
1009
1018
|
});
|
|
1010
|
-
case
|
|
1011
|
-
_context6.next =
|
|
1019
|
+
case 12:
|
|
1020
|
+
_context6.next = 14;
|
|
1012
1021
|
return onBlurReturnLogisticsCode({
|
|
1013
1022
|
form: form,
|
|
1014
1023
|
value: value,
|
|
@@ -1016,15 +1025,15 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1016
1025
|
componentOnBlur: componentOnBlur,
|
|
1017
1026
|
orderBackRule: 'outSid'
|
|
1018
1027
|
});
|
|
1019
|
-
case
|
|
1020
|
-
_context6.next =
|
|
1028
|
+
case 14:
|
|
1029
|
+
_context6.next = 49;
|
|
1021
1030
|
break;
|
|
1022
|
-
case
|
|
1031
|
+
case 16:
|
|
1023
1032
|
if (!(type === 'returnLogisticsCode')) {
|
|
1024
|
-
_context6.next =
|
|
1033
|
+
_context6.next = 21;
|
|
1025
1034
|
break;
|
|
1026
1035
|
}
|
|
1027
|
-
_context6.next =
|
|
1036
|
+
_context6.next = 19;
|
|
1028
1037
|
return onBlurReturnLogisticsCode({
|
|
1029
1038
|
form: form,
|
|
1030
1039
|
value: value,
|
|
@@ -1032,57 +1041,57 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1032
1041
|
componentOnBlur: componentOnBlur,
|
|
1033
1042
|
orderBackRule: 'logisticsCode'
|
|
1034
1043
|
});
|
|
1035
|
-
case
|
|
1036
|
-
_context6.next =
|
|
1044
|
+
case 19:
|
|
1045
|
+
_context6.next = 49;
|
|
1037
1046
|
break;
|
|
1038
|
-
case
|
|
1047
|
+
case 21:
|
|
1039
1048
|
if (!(type === 'skxOutboundNoticeNo')) {
|
|
1040
|
-
_context6.next =
|
|
1049
|
+
_context6.next = 27;
|
|
1041
1050
|
break;
|
|
1042
1051
|
}
|
|
1043
1052
|
//[SKX]ON出库通知单号 返填
|
|
1044
1053
|
console.log('skxOutboundNoticeNo', value);
|
|
1045
|
-
_context6.next =
|
|
1054
|
+
_context6.next = 25;
|
|
1046
1055
|
return onBlurSkxOutboundNoticeNo({
|
|
1047
1056
|
form: form,
|
|
1048
1057
|
value: value,
|
|
1049
1058
|
templateDetail: templateDetail,
|
|
1050
1059
|
componentOnBlur: componentOnBlur
|
|
1051
1060
|
});
|
|
1052
|
-
case
|
|
1053
|
-
_context6.next =
|
|
1061
|
+
case 25:
|
|
1062
|
+
_context6.next = 49;
|
|
1054
1063
|
break;
|
|
1055
|
-
case
|
|
1064
|
+
case 27:
|
|
1056
1065
|
if (!(type === 'skxReturnBillNo')) {
|
|
1057
|
-
_context6.next =
|
|
1066
|
+
_context6.next = 32;
|
|
1058
1067
|
break;
|
|
1059
1068
|
}
|
|
1060
|
-
_context6.next =
|
|
1069
|
+
_context6.next = 30;
|
|
1061
1070
|
return onBlurSkxReturnBillNo({
|
|
1062
1071
|
form: form,
|
|
1063
1072
|
value: value,
|
|
1064
1073
|
templateDetail: templateDetail,
|
|
1065
1074
|
componentOnBlur: componentOnBlur
|
|
1066
1075
|
});
|
|
1067
|
-
case
|
|
1068
|
-
_context6.next =
|
|
1076
|
+
case 30:
|
|
1077
|
+
_context6.next = 49;
|
|
1069
1078
|
break;
|
|
1070
|
-
case
|
|
1079
|
+
case 32:
|
|
1071
1080
|
if (!(type === 'skxReturnTHLogisticsCode')) {
|
|
1072
|
-
_context6.next =
|
|
1081
|
+
_context6.next = 37;
|
|
1073
1082
|
break;
|
|
1074
1083
|
}
|
|
1075
|
-
_context6.next =
|
|
1084
|
+
_context6.next = 35;
|
|
1076
1085
|
return onBlurSkxReturnTHLogisticsCode({
|
|
1077
1086
|
form: form,
|
|
1078
1087
|
value: value,
|
|
1079
1088
|
templateDetail: templateDetail,
|
|
1080
1089
|
componentOnBlur: componentOnBlur
|
|
1081
1090
|
});
|
|
1082
|
-
case
|
|
1083
|
-
_context6.next =
|
|
1091
|
+
case 35:
|
|
1092
|
+
_context6.next = 49;
|
|
1084
1093
|
break;
|
|
1085
|
-
case
|
|
1094
|
+
case 37:
|
|
1086
1095
|
// 收集所有需要执行的异步操作
|
|
1087
1096
|
promises = [];
|
|
1088
1097
|
if (type === 'tradeId') {
|
|
@@ -1094,7 +1103,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1094
1103
|
promises.push(handleChangeTradeId(value));
|
|
1095
1104
|
}
|
|
1096
1105
|
if (value) {
|
|
1097
|
-
_context6.next =
|
|
1106
|
+
_context6.next = 44;
|
|
1098
1107
|
break;
|
|
1099
1108
|
}
|
|
1100
1109
|
setReplaceValue(function (prev) {
|
|
@@ -1105,24 +1114,24 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1105
1114
|
});
|
|
1106
1115
|
replaceValueRef.current = _objectSpread(_objectSpread({}, replaceValue), {}, _defineProperty({}, type, 0));
|
|
1107
1116
|
return _context6.abrupt("return");
|
|
1108
|
-
case
|
|
1117
|
+
case 44:
|
|
1109
1118
|
promises.push(queryReplaceCount(_defineProperty({}, type, value), templateDetail));
|
|
1110
1119
|
// TODO: ERP不走订单反弹逻辑
|
|
1111
1120
|
if ((type === 'tradeId' || type === 'enterprisePaymentTid') && !isErpUse) {
|
|
1112
1121
|
promises.push(changeHandle(value));
|
|
1113
1122
|
}
|
|
1114
1123
|
// 等待所有异步操作完成
|
|
1115
|
-
_context6.next =
|
|
1124
|
+
_context6.next = 48;
|
|
1116
1125
|
return Promise.all(promises);
|
|
1117
|
-
case 47:
|
|
1118
|
-
return _context6.abrupt("return", Promise.resolve());
|
|
1119
1126
|
case 48:
|
|
1127
|
+
return _context6.abrupt("return", Promise.resolve());
|
|
1128
|
+
case 49:
|
|
1120
1129
|
case "end":
|
|
1121
1130
|
return _context6.stop();
|
|
1122
1131
|
}
|
|
1123
1132
|
}, _callee6);
|
|
1124
1133
|
}));
|
|
1125
|
-
return function componentOnBlur(_x10, _x11) {
|
|
1134
|
+
return function componentOnBlur(_x10, _x11, _x12) {
|
|
1126
1135
|
return _ref7.apply(this, arguments);
|
|
1127
1136
|
};
|
|
1128
1137
|
}();
|
|
@@ -1431,7 +1440,9 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1431
1440
|
currentComponentDisplayStatus.current[instance === null || instance === void 0 ? void 0 : instance.id] = show;
|
|
1432
1441
|
checkFillMapping(show, uniqueKey, workOrderComponentType);
|
|
1433
1442
|
return instance.editRender({
|
|
1434
|
-
onBlur:
|
|
1443
|
+
onBlur: function onBlur(value, type) {
|
|
1444
|
+
return componentOnBlur(value, type, uniqueKey);
|
|
1445
|
+
},
|
|
1435
1446
|
onChange: function onChange(value, type) {
|
|
1436
1447
|
return componentOnValueChange(uniqueKey, value, workOrderComponentType, type);
|
|
1437
1448
|
},
|
|
@@ -1443,7 +1454,9 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1443
1454
|
});
|
|
1444
1455
|
}
|
|
1445
1456
|
return instance.editRender({
|
|
1446
|
-
onBlur:
|
|
1457
|
+
onBlur: function onBlur(value, type) {
|
|
1458
|
+
return componentOnBlur(value, type, uniqueKey);
|
|
1459
|
+
},
|
|
1447
1460
|
onChange: function onChange(value, type) {
|
|
1448
1461
|
return componentOnValueChange(uniqueKey, value, workOrderComponentType, type);
|
|
1449
1462
|
},
|
|
@@ -1499,7 +1512,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1499
1512
|
return item.workOrderComponentType === 'NUMERICAL_CALCULATION';
|
|
1500
1513
|
});
|
|
1501
1514
|
}, [templateDetail]);
|
|
1502
|
-
var handleWatchFormValueChange = function handleWatchFormValueChange() {
|
|
1515
|
+
var handleWatchFormValueChange = function handleWatchFormValueChange(changedValues) {
|
|
1503
1516
|
var componentShowMap = currentTemplateAllComponentsDisplay.current;
|
|
1504
1517
|
var allValues = form.getFieldsValue(true);
|
|
1505
1518
|
var formValue = {};
|
|
@@ -1517,6 +1530,13 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1517
1530
|
|
|
1518
1531
|
//缓存防止bs商品组件联动返填获取不到值
|
|
1519
1532
|
setTimeout(function () {
|
|
1533
|
+
//部分组件小写改成大写
|
|
1534
|
+
// updateComponentToUpperCase({
|
|
1535
|
+
// componentDtoList: templateDetail?.componentDtoList,
|
|
1536
|
+
// allValues,
|
|
1537
|
+
// changedValues,
|
|
1538
|
+
// form,
|
|
1539
|
+
// });
|
|
1520
1540
|
changeValuesCacheOrderInfo(_objectSpread(_objectSpread({}, form.getFieldsValue()), formValue), templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList);
|
|
1521
1541
|
});
|
|
1522
1542
|
};
|
|
@@ -1611,7 +1631,6 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1611
1631
|
shopId: shopId
|
|
1612
1632
|
}));
|
|
1613
1633
|
var shopNameDisabled = useMemo(function () {
|
|
1614
|
-
console.log(isStartNodeWaiting, canEditShopName, look, workOrderId);
|
|
1615
1634
|
if (isStartNodeWaiting && !look) {
|
|
1616
1635
|
return false;
|
|
1617
1636
|
}
|