@kmkf-fe-packages/kmkf-work-order-service-component 0.20.1 → 0.20.2-alpha.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.
- package/dist/esm/FlowTemplateDetail/components/ActionList/index.d.ts +2 -1
- package/dist/esm/FlowTemplateDetail/components/ActionList/index.js +47 -38
- package/dist/esm/FlowTemplateDetail/components/SubmitRemindModal/index.d.ts +7 -0
- package/dist/esm/FlowTemplateDetail/components/SubmitRemindModal/index.js +33 -0
- package/dist/esm/FlowTemplateDetail/index.js +163 -119
- package/dist/esm/common/cache/index.d.ts +2 -0
- package/dist/esm/common/cache/index.js +11 -1
- package/dist/esm/model/flowTemplateDetail/index.d.ts +1 -1
- package/dist/esm/model/flowTemplateDetail/index.js +23 -16
- package/dist/esm/model/flowTemplateDetail/selector.d.ts +14 -0
- package/dist/esm/model/flowTemplateDetail/selector.js +3 -0
- package/dist/esm/model/flowTemplateDetail/types.d.ts +9 -0
- package/dist/esm/model/flowTemplateDetail/types.js +8 -1
- package/package.json +5 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { NodeType, FlowStatus } from '../../../model/flowTemplateDetail/types';
|
|
2
|
+
import { NodeType, FlowStatus, FlowType } from '../../../model/flowTemplateDetail/types';
|
|
3
3
|
interface ActionListProps {
|
|
4
4
|
flowStatus: FlowStatus | undefined;
|
|
5
|
+
flowType: FlowType;
|
|
5
6
|
nodeType: NodeType;
|
|
6
7
|
handleAction: (s: string) => void;
|
|
7
8
|
hasPreNode: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Menu, Button, Space, Dropdown } from 'antd';
|
|
3
3
|
import { DownOutlined } from '@ant-design/icons';
|
|
4
|
-
import { FlowStatus } from "../../../model/flowTemplateDetail/types";
|
|
4
|
+
import { FlowStatus, FlowType } from "../../../model/flowTemplateDetail/types";
|
|
5
5
|
import styles from "./index.module.less";
|
|
6
6
|
var getActionMap = function getActionMap(nodeStatus, hasPreNode) {
|
|
7
7
|
// 非开始节点看状态
|
|
@@ -16,41 +16,49 @@ var getActionMap = function getActionMap(nodeStatus, hasPreNode) {
|
|
|
16
16
|
return ['save', 'submit'];
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
var buttonMap = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
19
|
+
var buttonMap = function buttonMap(flowType) {
|
|
20
|
+
return {
|
|
21
|
+
save: {
|
|
22
|
+
label: '暂存',
|
|
23
|
+
type: 'default',
|
|
24
|
+
style: {
|
|
25
|
+
backgroundColor: flowType === FlowType.SINGLE_PAGE ? '#52c41a' : '',
|
|
26
|
+
color: flowType === FlowType.SINGLE_PAGE ? '#fff' : '#000'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
submit: {
|
|
30
|
+
label: flowType === FlowType.SINGLE_PAGE ? '完结' : '提交',
|
|
31
|
+
type: 'primary'
|
|
32
|
+
},
|
|
33
|
+
forward: {
|
|
34
|
+
label: '转交',
|
|
35
|
+
type: 'default'
|
|
36
|
+
},
|
|
37
|
+
rejected: {
|
|
38
|
+
label: '驳回',
|
|
39
|
+
type: 'default'
|
|
40
|
+
},
|
|
41
|
+
close: {
|
|
42
|
+
label: '关闭',
|
|
43
|
+
type: 'default'
|
|
44
|
+
},
|
|
45
|
+
stop: {
|
|
46
|
+
label: '暂停',
|
|
47
|
+
type: 'default'
|
|
48
|
+
},
|
|
49
|
+
open: {
|
|
50
|
+
label: '启用',
|
|
51
|
+
type: 'primary'
|
|
52
|
+
}
|
|
53
|
+
};
|
|
48
54
|
};
|
|
49
55
|
var ActionList = function ActionList(props) {
|
|
50
56
|
var _buttonList$slice;
|
|
51
57
|
var _props$flowStatus = props.flowStatus,
|
|
52
58
|
flowStatus = _props$flowStatus === void 0 ? FlowStatus.NON_START : _props$flowStatus,
|
|
53
59
|
hasPreNode = props.hasPreNode,
|
|
60
|
+
_props$flowType = props.flowType,
|
|
61
|
+
flowType = _props$flowType === void 0 ? FlowType.SINGLE_PAGE : _props$flowType,
|
|
54
62
|
handleAction = props.handleAction;
|
|
55
63
|
var buttonList = getActionMap(flowStatus, hasPreNode);
|
|
56
64
|
var menu = function menu(list) {
|
|
@@ -59,12 +67,12 @@ var ActionList = function ActionList(props) {
|
|
|
59
67
|
key: index,
|
|
60
68
|
label: /*#__PURE__*/React.createElement(Button, {
|
|
61
69
|
type: "link",
|
|
62
|
-
"data-spm-click": buttonMap[item].label,
|
|
63
|
-
"data-spm-param": buttonMap[item].label,
|
|
70
|
+
"data-spm-click": buttonMap(flowType)[item].label,
|
|
71
|
+
"data-spm-param": buttonMap(flowType)[item].label,
|
|
64
72
|
onClick: function onClick() {
|
|
65
73
|
return handleAction(item);
|
|
66
74
|
}
|
|
67
|
-
}, buttonMap[item].label)
|
|
75
|
+
}, buttonMap(flowType)[item].label)
|
|
68
76
|
};
|
|
69
77
|
});
|
|
70
78
|
return /*#__PURE__*/React.createElement(Menu, {
|
|
@@ -80,16 +88,17 @@ var ActionList = function ActionList(props) {
|
|
|
80
88
|
return e.preventDefault();
|
|
81
89
|
}
|
|
82
90
|
}, /*#__PURE__*/React.createElement(Space, null, "\u66F4\u591A", /*#__PURE__*/React.createElement(DownOutlined, null)))), (_buttonList$slice = buttonList.slice(0, 3)) === null || _buttonList$slice === void 0 ? void 0 : _buttonList$slice.map(function (button, index) {
|
|
83
|
-
var _buttonMap$button, _buttonMap$button2, _buttonMap$button3;
|
|
91
|
+
var _buttonMap$button, _buttonMap$button2, _buttonMap$button3, _buttonMap$button4;
|
|
84
92
|
return /*#__PURE__*/React.createElement(Button, {
|
|
85
93
|
key: "button".concat(index),
|
|
86
|
-
type: buttonMap[button].type,
|
|
94
|
+
type: buttonMap(flowType)[button].type,
|
|
87
95
|
onClick: function onClick() {
|
|
88
96
|
return handleAction(button);
|
|
89
97
|
},
|
|
90
|
-
"data-spm-click": (_buttonMap$button = buttonMap[button]) === null || _buttonMap$button === void 0 ? void 0 : _buttonMap$button.label,
|
|
91
|
-
"data-spm-param": (_buttonMap$button2 = buttonMap[button]) === null || _buttonMap$button2 === void 0 ? void 0 : _buttonMap$button2.label
|
|
92
|
-
|
|
98
|
+
"data-spm-click": (_buttonMap$button = buttonMap(flowType)[button]) === null || _buttonMap$button === void 0 ? void 0 : _buttonMap$button.label,
|
|
99
|
+
"data-spm-param": (_buttonMap$button2 = buttonMap(flowType)[button]) === null || _buttonMap$button2 === void 0 ? void 0 : _buttonMap$button2.label,
|
|
100
|
+
style: (_buttonMap$button3 = buttonMap(flowType)[button]) === null || _buttonMap$button3 === void 0 ? void 0 : _buttonMap$button3.style
|
|
101
|
+
}, (_buttonMap$button4 = buttonMap(flowType)[button]) === null || _buttonMap$button4 === void 0 ? void 0 : _buttonMap$button4.label);
|
|
93
102
|
})));
|
|
94
103
|
};
|
|
95
104
|
export default ActionList;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { Modal, Checkbox } from 'antd';
|
|
9
|
+
import cache from "../../../common/cache";
|
|
10
|
+
export default (function (props) {
|
|
11
|
+
var onCallback = props.onCallback,
|
|
12
|
+
onClose = props.onClose;
|
|
13
|
+
var _useState = useState(false),
|
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
+
remind = _useState2[0],
|
|
16
|
+
setRemind = _useState2[1];
|
|
17
|
+
var onOk = function onOk() {
|
|
18
|
+
remind && cache.setRemind();
|
|
19
|
+
onCallback();
|
|
20
|
+
};
|
|
21
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
22
|
+
visible: true,
|
|
23
|
+
title: "\u63D0\u9192",
|
|
24
|
+
okText: "\u786E\u5B9A",
|
|
25
|
+
cancelText: "\u53D6\u6D88",
|
|
26
|
+
onOk: onOk,
|
|
27
|
+
onCancel: onClose
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, "\u786E\u8BA4\u5B8C\u7ED3\u5DE5\u5355\u5417?\u5B8C\u7ED3\u540E\u5DE5\u5355\u5185\u5BB9\u4E0D\u53EF\u53D8\u66F4"), /*#__PURE__*/React.createElement(Checkbox, {
|
|
29
|
+
onChange: function onChange(e) {
|
|
30
|
+
return setRemind(e.target.checked);
|
|
31
|
+
}
|
|
32
|
+
}, "\u77E5\u9053\u4E86\uFF0C\u4E0D\u7528\u518D\u63D0\u9192\u6211\u4E86")));
|
|
33
|
+
});
|
|
@@ -23,8 +23,8 @@ import zhCN from 'antd/es/locale/zh_CN';
|
|
|
23
23
|
import { AddressData, ExpressData, ExpressInterceptData, PlatData, BsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
24
24
|
import { calcWorkOrderList, deleteCacheOrder } from "../common/utils/tools";
|
|
25
25
|
import { setPlat, fetchPanelInfo, fetchAllFlowOperateRecord, setAction, setVisibleRemarkList, setAddRemarkVisible, setLoading, setClearStore } from "../model/flowTemplateDetail";
|
|
26
|
-
import { selectFlowRecordList, selectRemarkRecordList, selectCurrentNodeDetail, selectTid, selectShopUniqueKey, selectOperateParams, selectFlowStatus, selectCurrentTradeIdWOrkOrderNumber, selectFlowTemplateId, selectLoading, selectWithDrawOrder, selectNodeAssistantMap } from "../model/flowTemplateDetail/selector";
|
|
27
|
-
import { NodeType, FlowStatus } from "../model/flowTemplateDetail/types";
|
|
26
|
+
import { selectFlowRecordList, selectRemarkRecordList, selectCurrentNodeDetail, selectTid, selectShopUniqueKey, selectOperateParams, selectFlowStatus, selectCurrentTradeIdWOrkOrderNumber, selectFlowTemplateId, selectLoading, selectWithDrawOrder, selectNodeAssistantMap, selectFlowTemplateType } from "../model/flowTemplateDetail/selector";
|
|
27
|
+
import { NodeType, FlowStatus, FlowType } from "../model/flowTemplateDetail/types";
|
|
28
28
|
import NodeItem from "./components/Item";
|
|
29
29
|
import CurrentNode from "./components/CurrentNode";
|
|
30
30
|
import RemarkShow from "./components/RemarkShow";
|
|
@@ -37,10 +37,12 @@ import RejectedModal from "./components/RejectedModal";
|
|
|
37
37
|
import RemarkListModal from "./components/RemarkListModal";
|
|
38
38
|
import RemarkModal from "./components/RemarkModal";
|
|
39
39
|
import WithdrawModal from "./components/WithdrawModal";
|
|
40
|
+
import SubmitRemindModal from "./components/SubmitRemindModal";
|
|
40
41
|
import { useSignal } from "../hooks/useSignal";
|
|
41
42
|
import { verifyHandle, submitParams, FLOW_STATUS_V2, getTag, currentUserHasOperatorAuth } from "./common";
|
|
42
43
|
import { saveWorkOrder, submitWorkOrder, addRemark, stopWorkOrder, closeWorkOrder, startWorkOrder, forwardWorkOrder, returnWorkOrder, withDrawWorkOrder, reminder, cancelReminder } from "../model/flowTemplateDetail/api";
|
|
43
44
|
import { orderDetail } from "../model/servers/api";
|
|
45
|
+
import cache from "../common/cache";
|
|
44
46
|
import "./index.less";
|
|
45
47
|
var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
46
48
|
var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _shopList$find, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$no23;
|
|
@@ -74,6 +76,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
74
76
|
var loading = useSelector(selectLoading);
|
|
75
77
|
var withdrawWorkOrderDetail = useSelector(selectWithDrawOrder);
|
|
76
78
|
var assistantMap = useSelector(selectNodeAssistantMap);
|
|
79
|
+
var flowTemplateType = useSelector(selectFlowTemplateType);
|
|
77
80
|
var _Form$useForm = Form.useForm(),
|
|
78
81
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
79
82
|
form = _Form$useForm2[0];
|
|
@@ -90,6 +93,10 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
90
93
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
91
94
|
orderRemarkObj = _useState6[0],
|
|
92
95
|
setOrderRemarkObj = _useState6[1];
|
|
96
|
+
var _useState7 = useState(false),
|
|
97
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
98
|
+
remindVisible = _useState8[0],
|
|
99
|
+
setRemindVisible = _useState8[1];
|
|
93
100
|
var componentDtoList = (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo2 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo2 === void 0 ? void 0 : _currentNodeDetail$wo2.componentDtoList) || [];
|
|
94
101
|
var tradeIdComponentDto = componentDtoList.find(function (item) {
|
|
95
102
|
return item.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
@@ -337,33 +344,60 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
337
344
|
return _ref2.apply(this, arguments);
|
|
338
345
|
};
|
|
339
346
|
}();
|
|
340
|
-
|
|
341
|
-
var handleSubmit = /*#__PURE__*/function () {
|
|
347
|
+
var handleSubmitBefore = /*#__PURE__*/function () {
|
|
342
348
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
343
|
-
var
|
|
349
|
+
var kmkf_kmgd_remind;
|
|
344
350
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
345
351
|
while (1) switch (_context3.prev = _context3.next) {
|
|
346
352
|
case 0:
|
|
347
|
-
|
|
353
|
+
try {
|
|
354
|
+
kmkf_kmgd_remind = cache.getRemind();
|
|
355
|
+
console.log(kmkf_kmgd_remind, flowTemplateType);
|
|
356
|
+
if (flowTemplateType === FlowType.SINGLE_PAGE && !kmkf_kmgd_remind) {
|
|
357
|
+
setRemindVisible(true);
|
|
358
|
+
} else {
|
|
359
|
+
handleSubmit();
|
|
360
|
+
}
|
|
361
|
+
} catch (e) {
|
|
362
|
+
handleSubmit();
|
|
363
|
+
}
|
|
364
|
+
case 1:
|
|
365
|
+
case "end":
|
|
366
|
+
return _context3.stop();
|
|
367
|
+
}
|
|
368
|
+
}, _callee3);
|
|
369
|
+
}));
|
|
370
|
+
return function handleSubmitBefore() {
|
|
371
|
+
return _ref3.apply(this, arguments);
|
|
372
|
+
};
|
|
373
|
+
}();
|
|
374
|
+
// 提交
|
|
375
|
+
var handleSubmit = /*#__PURE__*/function () {
|
|
376
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
377
|
+
var _currentNodeDetail$wo7, _currentNodeDetail$wo8, formData, result, params, res, _controllerRef$curren2, _currentNodeDetail$wo9;
|
|
378
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
379
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
380
|
+
case 0:
|
|
381
|
+
_context4.prev = 0;
|
|
348
382
|
if (!submitRequestLock.current) {
|
|
349
|
-
|
|
383
|
+
_context4.next = 3;
|
|
350
384
|
break;
|
|
351
385
|
}
|
|
352
|
-
return
|
|
386
|
+
return _context4.abrupt("return");
|
|
353
387
|
case 3:
|
|
354
388
|
submitRequestLock.current = true;
|
|
355
389
|
dispatch(setLoading(true));
|
|
356
|
-
|
|
390
|
+
_context4.next = 7;
|
|
357
391
|
return form.validateFields();
|
|
358
392
|
case 7:
|
|
359
|
-
formData =
|
|
393
|
+
formData = _context4.sent;
|
|
360
394
|
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo7 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : _currentNodeDetail$wo7.componentDtoList) || []);
|
|
361
395
|
if (result.success) {
|
|
362
|
-
|
|
396
|
+
_context4.next = 12;
|
|
363
397
|
break;
|
|
364
398
|
}
|
|
365
399
|
message.error(result.message);
|
|
366
|
-
return
|
|
400
|
+
return _context4.abrupt("return");
|
|
367
401
|
case 12:
|
|
368
402
|
params = submitParams({
|
|
369
403
|
update: !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder),
|
|
@@ -379,10 +413,10 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
379
413
|
return s.shopId === formData.shopId;
|
|
380
414
|
}), 'accessToken', '')
|
|
381
415
|
});
|
|
382
|
-
|
|
416
|
+
_context4.next = 15;
|
|
383
417
|
return submitWorkOrder(params);
|
|
384
418
|
case 15:
|
|
385
|
-
res =
|
|
419
|
+
res = _context4.sent;
|
|
386
420
|
if (res.success) {
|
|
387
421
|
handleSuccessCallBack('submit');
|
|
388
422
|
dispatch(fetchPanelInfo({
|
|
@@ -402,13 +436,13 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
402
436
|
unDeleteOrderInfo: false
|
|
403
437
|
});
|
|
404
438
|
}
|
|
405
|
-
|
|
439
|
+
_context4.next = 23;
|
|
406
440
|
break;
|
|
407
441
|
case 19:
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
console.log('e',
|
|
411
|
-
if (get(
|
|
442
|
+
_context4.prev = 19;
|
|
443
|
+
_context4.t0 = _context4["catch"](0);
|
|
444
|
+
console.log('e', _context4.t0);
|
|
445
|
+
if (get(_context4.t0, 'errorFields.length') > 0) {
|
|
412
446
|
setTimeout(function () {
|
|
413
447
|
var _get;
|
|
414
448
|
var errorList = document.querySelectorAll('.ant-form-item-has-error');
|
|
@@ -418,21 +452,21 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
418
452
|
});
|
|
419
453
|
}, 0);
|
|
420
454
|
// TODO: 解决显影导致的组件校验失败未提示问题
|
|
421
|
-
message.error(get(
|
|
455
|
+
message.error(get(_context4.t0, 'errorFields.0.errors.0', '组件校验失败'));
|
|
422
456
|
}
|
|
423
457
|
case 23:
|
|
424
|
-
|
|
458
|
+
_context4.prev = 23;
|
|
425
459
|
submitRequestLock.current = false;
|
|
426
460
|
dispatch(setLoading(false));
|
|
427
|
-
return
|
|
461
|
+
return _context4.finish(23);
|
|
428
462
|
case 27:
|
|
429
463
|
case "end":
|
|
430
|
-
return
|
|
464
|
+
return _context4.stop();
|
|
431
465
|
}
|
|
432
|
-
},
|
|
466
|
+
}, _callee4, null, [[0, 19, 23, 27]]);
|
|
433
467
|
}));
|
|
434
468
|
return function handleSubmit() {
|
|
435
|
-
return
|
|
469
|
+
return _ref4.apply(this, arguments);
|
|
436
470
|
};
|
|
437
471
|
}();
|
|
438
472
|
// 行动点操作
|
|
@@ -441,7 +475,8 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
441
475
|
if (status === 'save') {
|
|
442
476
|
handleSave();
|
|
443
477
|
} else if (status === 'submit') {
|
|
444
|
-
|
|
478
|
+
handleSubmitBefore();
|
|
479
|
+
// handleSubmit();
|
|
445
480
|
} else if (status === 'open') {
|
|
446
481
|
handleStart();
|
|
447
482
|
}
|
|
@@ -455,20 +490,20 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
455
490
|
};
|
|
456
491
|
// 添加备注
|
|
457
492
|
var handleSubmitRemark = /*#__PURE__*/function () {
|
|
458
|
-
var
|
|
493
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(formData) {
|
|
459
494
|
var res;
|
|
460
|
-
return _regeneratorRuntime().wrap(function
|
|
461
|
-
while (1) switch (
|
|
495
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
496
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
462
497
|
case 0:
|
|
463
|
-
|
|
464
|
-
|
|
498
|
+
_context5.prev = 0;
|
|
499
|
+
_context5.next = 3;
|
|
465
500
|
return addRemark(_objectSpread(_objectSpread({}, formData), {}, {
|
|
466
501
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
467
502
|
flowWorkOrderId: flowWorkOrderIdState
|
|
468
503
|
})
|
|
469
504
|
}));
|
|
470
505
|
case 3:
|
|
471
|
-
res =
|
|
506
|
+
res = _context5.sent;
|
|
472
507
|
if (res.success) {
|
|
473
508
|
message.success('添加备注成功');
|
|
474
509
|
dispatch(setAddRemarkVisible(false));
|
|
@@ -479,31 +514,31 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
479
514
|
}));
|
|
480
515
|
}
|
|
481
516
|
}
|
|
482
|
-
|
|
517
|
+
_context5.next = 10;
|
|
483
518
|
break;
|
|
484
519
|
case 7:
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
console.log('提交备注失败',
|
|
520
|
+
_context5.prev = 7;
|
|
521
|
+
_context5.t0 = _context5["catch"](0);
|
|
522
|
+
console.log('提交备注失败', _context5.t0);
|
|
488
523
|
case 10:
|
|
489
524
|
case "end":
|
|
490
|
-
return
|
|
525
|
+
return _context5.stop();
|
|
491
526
|
}
|
|
492
|
-
},
|
|
527
|
+
}, _callee5, null, [[0, 7]]);
|
|
493
528
|
}));
|
|
494
529
|
return function handleSubmitRemark(_x2) {
|
|
495
|
-
return
|
|
530
|
+
return _ref5.apply(this, arguments);
|
|
496
531
|
};
|
|
497
532
|
}();
|
|
498
533
|
// 暂停工单
|
|
499
534
|
var handleStop = /*#__PURE__*/function () {
|
|
500
|
-
var
|
|
535
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(formData) {
|
|
501
536
|
var _currentNodeDetail$no4, _currentNodeDetail$wo10, _res$data6, _res$data6$failList, res, _res$data7, _res$data7$failList, _res$data7$failList$;
|
|
502
|
-
return _regeneratorRuntime().wrap(function
|
|
503
|
-
while (1) switch (
|
|
537
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
538
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
504
539
|
case 0:
|
|
505
|
-
|
|
506
|
-
|
|
540
|
+
_context6.prev = 0;
|
|
541
|
+
_context6.next = 3;
|
|
507
542
|
return stopWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
508
543
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
509
544
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no4 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no4 === void 0 ? void 0 : _currentNodeDetail$no4.id,
|
|
@@ -513,7 +548,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
513
548
|
})
|
|
514
549
|
}));
|
|
515
550
|
case 3:
|
|
516
|
-
res =
|
|
551
|
+
res = _context6.sent;
|
|
517
552
|
if (((_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : (_res$data6$failList = _res$data6.failList) === null || _res$data6$failList === void 0 ? void 0 : _res$data6$failList.length) === 0) {
|
|
518
553
|
message.success('暂停工单成功');
|
|
519
554
|
handleSuccessCallBack('stop');
|
|
@@ -535,31 +570,31 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
535
570
|
} else {
|
|
536
571
|
message.error((_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : (_res$data7$failList = _res$data7.failList) === null || _res$data7$failList === void 0 ? void 0 : (_res$data7$failList$ = _res$data7$failList[0]) === null || _res$data7$failList$ === void 0 ? void 0 : _res$data7$failList$.failReason);
|
|
537
572
|
}
|
|
538
|
-
|
|
573
|
+
_context6.next = 10;
|
|
539
574
|
break;
|
|
540
575
|
case 7:
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
console.log('暂停工单失败',
|
|
576
|
+
_context6.prev = 7;
|
|
577
|
+
_context6.t0 = _context6["catch"](0);
|
|
578
|
+
console.log('暂停工单失败', _context6.t0);
|
|
544
579
|
case 10:
|
|
545
580
|
case "end":
|
|
546
|
-
return
|
|
581
|
+
return _context6.stop();
|
|
547
582
|
}
|
|
548
|
-
},
|
|
583
|
+
}, _callee6, null, [[0, 7]]);
|
|
549
584
|
}));
|
|
550
585
|
return function handleStop(_x3) {
|
|
551
|
-
return
|
|
586
|
+
return _ref6.apply(this, arguments);
|
|
552
587
|
};
|
|
553
588
|
}();
|
|
554
589
|
// 关闭工单
|
|
555
590
|
var handleClose = /*#__PURE__*/function () {
|
|
556
|
-
var
|
|
591
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(formData) {
|
|
557
592
|
var _currentNodeDetail$wo11, _currentNodeDetail$no5, _currentNodeDetail$wo12, _res$data8, _res$data8$failList, res, _res$data9, _res$data9$failList, _res$data9$failList$;
|
|
558
|
-
return _regeneratorRuntime().wrap(function
|
|
559
|
-
while (1) switch (
|
|
593
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
594
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
560
595
|
case 0:
|
|
561
|
-
|
|
562
|
-
|
|
596
|
+
_context7.prev = 0;
|
|
597
|
+
_context7.next = 3;
|
|
563
598
|
return closeWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
564
599
|
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.flowStatus,
|
|
565
600
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
@@ -570,7 +605,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
570
605
|
})
|
|
571
606
|
}));
|
|
572
607
|
case 3:
|
|
573
|
-
res =
|
|
608
|
+
res = _context7.sent;
|
|
574
609
|
if (((_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : (_res$data8$failList = _res$data8.failList) === null || _res$data8$failList === void 0 ? void 0 : _res$data8$failList.length) === 0) {
|
|
575
610
|
handleSuccessCallBack('close');
|
|
576
611
|
message.success('关闭工单成功');
|
|
@@ -587,31 +622,31 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
587
622
|
} else {
|
|
588
623
|
message.error((_res$data9 = res.data) === null || _res$data9 === void 0 ? void 0 : (_res$data9$failList = _res$data9.failList) === null || _res$data9$failList === void 0 ? void 0 : (_res$data9$failList$ = _res$data9$failList[0]) === null || _res$data9$failList$ === void 0 ? void 0 : _res$data9$failList$.failReason);
|
|
589
624
|
}
|
|
590
|
-
|
|
625
|
+
_context7.next = 10;
|
|
591
626
|
break;
|
|
592
627
|
case 7:
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
console.log('关闭工单失败',
|
|
628
|
+
_context7.prev = 7;
|
|
629
|
+
_context7.t0 = _context7["catch"](0);
|
|
630
|
+
console.log('关闭工单失败', _context7.t0);
|
|
596
631
|
case 10:
|
|
597
632
|
case "end":
|
|
598
|
-
return
|
|
633
|
+
return _context7.stop();
|
|
599
634
|
}
|
|
600
|
-
},
|
|
635
|
+
}, _callee7, null, [[0, 7]]);
|
|
601
636
|
}));
|
|
602
637
|
return function handleClose(_x4) {
|
|
603
|
-
return
|
|
638
|
+
return _ref7.apply(this, arguments);
|
|
604
639
|
};
|
|
605
640
|
}();
|
|
606
641
|
// 转交处理人
|
|
607
642
|
var handleForWard = /*#__PURE__*/function () {
|
|
608
|
-
var
|
|
643
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(formData) {
|
|
609
644
|
var _currentNodeDetail$no6, _currentNodeDetail$wo13, _res$data10, _res$data10$failList, res, _res$data11, _res$data11$failList, _res$data11$failList$;
|
|
610
|
-
return _regeneratorRuntime().wrap(function
|
|
611
|
-
while (1) switch (
|
|
645
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
646
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
612
647
|
case 0:
|
|
613
|
-
|
|
614
|
-
|
|
648
|
+
_context8.prev = 0;
|
|
649
|
+
_context8.next = 3;
|
|
615
650
|
return forwardWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
616
651
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
617
652
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no6 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no6 === void 0 ? void 0 : _currentNodeDetail$no6.id,
|
|
@@ -621,7 +656,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
621
656
|
})
|
|
622
657
|
}));
|
|
623
658
|
case 3:
|
|
624
|
-
res =
|
|
659
|
+
res = _context8.sent;
|
|
625
660
|
if (((_res$data10 = res.data) === null || _res$data10 === void 0 ? void 0 : (_res$data10$failList = _res$data10.failList) === null || _res$data10$failList === void 0 ? void 0 : _res$data10$failList.length) === 0) {
|
|
626
661
|
handleSuccessCallBack('forward');
|
|
627
662
|
message.success('转交成功');
|
|
@@ -638,31 +673,31 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
638
673
|
} else {
|
|
639
674
|
message.error((_res$data11 = res.data) === null || _res$data11 === void 0 ? void 0 : (_res$data11$failList = _res$data11.failList) === null || _res$data11$failList === void 0 ? void 0 : (_res$data11$failList$ = _res$data11$failList[0]) === null || _res$data11$failList$ === void 0 ? void 0 : _res$data11$failList$.failReason);
|
|
640
675
|
}
|
|
641
|
-
|
|
676
|
+
_context8.next = 10;
|
|
642
677
|
break;
|
|
643
678
|
case 7:
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
console.log('转交失败',
|
|
679
|
+
_context8.prev = 7;
|
|
680
|
+
_context8.t0 = _context8["catch"](0);
|
|
681
|
+
console.log('转交失败', _context8.t0);
|
|
647
682
|
case 10:
|
|
648
683
|
case "end":
|
|
649
|
-
return
|
|
684
|
+
return _context8.stop();
|
|
650
685
|
}
|
|
651
|
-
},
|
|
686
|
+
}, _callee8, null, [[0, 7]]);
|
|
652
687
|
}));
|
|
653
688
|
return function handleForWard(_x5) {
|
|
654
|
-
return
|
|
689
|
+
return _ref8.apply(this, arguments);
|
|
655
690
|
};
|
|
656
691
|
}();
|
|
657
692
|
// 驳回
|
|
658
693
|
var handleReturnWorkOrder = /*#__PURE__*/function () {
|
|
659
|
-
var
|
|
694
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(formData) {
|
|
660
695
|
var _currentNodeDetail$no7, _currentNodeDetail$wo14, _res$data12, _res$data12$failList, res, _res$data13, _res$data13$failList, _res$data13$failList$;
|
|
661
|
-
return _regeneratorRuntime().wrap(function
|
|
662
|
-
while (1) switch (
|
|
696
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
697
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
663
698
|
case 0:
|
|
664
|
-
|
|
665
|
-
|
|
699
|
+
_context9.prev = 0;
|
|
700
|
+
_context9.next = 3;
|
|
666
701
|
return returnWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
667
702
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
668
703
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : _currentNodeDetail$no7.id,
|
|
@@ -672,7 +707,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
672
707
|
})
|
|
673
708
|
}));
|
|
674
709
|
case 3:
|
|
675
|
-
res =
|
|
710
|
+
res = _context9.sent;
|
|
676
711
|
if (((_res$data12 = res.data) === null || _res$data12 === void 0 ? void 0 : (_res$data12$failList = _res$data12.failList) === null || _res$data12$failList === void 0 ? void 0 : _res$data12$failList.length) === 0) {
|
|
677
712
|
handleSuccessCallBack('rejected');
|
|
678
713
|
message.success('驳回成功');
|
|
@@ -689,31 +724,31 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
689
724
|
} else {
|
|
690
725
|
message.error((_res$data13 = res.data) === null || _res$data13 === void 0 ? void 0 : (_res$data13$failList = _res$data13.failList) === null || _res$data13$failList === void 0 ? void 0 : (_res$data13$failList$ = _res$data13$failList[0]) === null || _res$data13$failList$ === void 0 ? void 0 : _res$data13$failList$.failReason);
|
|
691
726
|
}
|
|
692
|
-
|
|
727
|
+
_context9.next = 10;
|
|
693
728
|
break;
|
|
694
729
|
case 7:
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
console.log('驳回失败',
|
|
730
|
+
_context9.prev = 7;
|
|
731
|
+
_context9.t0 = _context9["catch"](0);
|
|
732
|
+
console.log('驳回失败', _context9.t0);
|
|
698
733
|
case 10:
|
|
699
734
|
case "end":
|
|
700
|
-
return
|
|
735
|
+
return _context9.stop();
|
|
701
736
|
}
|
|
702
|
-
},
|
|
737
|
+
}, _callee9, null, [[0, 7]]);
|
|
703
738
|
}));
|
|
704
739
|
return function handleReturnWorkOrder(_x6) {
|
|
705
|
-
return
|
|
740
|
+
return _ref9.apply(this, arguments);
|
|
706
741
|
};
|
|
707
742
|
}();
|
|
708
743
|
// 撤回
|
|
709
744
|
var handleWithdraw = /*#__PURE__*/function () {
|
|
710
|
-
var
|
|
745
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(formData) {
|
|
711
746
|
var _currentNodeDetail$no8, _currentNodeDetail$wo15, _res$data14, _res$data14$failList, res, _res$data15, _res$data15$failList, _res$data15$failList$;
|
|
712
|
-
return _regeneratorRuntime().wrap(function
|
|
713
|
-
while (1) switch (
|
|
747
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
748
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
714
749
|
case 0:
|
|
715
|
-
|
|
716
|
-
|
|
750
|
+
_context10.prev = 0;
|
|
751
|
+
_context10.next = 3;
|
|
717
752
|
return withDrawWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
718
753
|
backToNodeId: withdrawWorkOrderDetail === null || withdrawWorkOrderDetail === void 0 ? void 0 : withdrawWorkOrderDetail.nodeId,
|
|
719
754
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
@@ -724,7 +759,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
724
759
|
})
|
|
725
760
|
}));
|
|
726
761
|
case 3:
|
|
727
|
-
res =
|
|
762
|
+
res = _context10.sent;
|
|
728
763
|
if (((_res$data14 = res.data) === null || _res$data14 === void 0 ? void 0 : (_res$data14$failList = _res$data14.failList) === null || _res$data14$failList === void 0 ? void 0 : _res$data14$failList.length) === 0) {
|
|
729
764
|
handleSuccessCallBack('withdraw');
|
|
730
765
|
message.success('撤回成功');
|
|
@@ -745,30 +780,30 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
745
780
|
} else {
|
|
746
781
|
message.error((_res$data15 = res.data) === null || _res$data15 === void 0 ? void 0 : (_res$data15$failList = _res$data15.failList) === null || _res$data15$failList === void 0 ? void 0 : (_res$data15$failList$ = _res$data15$failList[0]) === null || _res$data15$failList$ === void 0 ? void 0 : _res$data15$failList$.failReason);
|
|
747
782
|
}
|
|
748
|
-
|
|
783
|
+
_context10.next = 10;
|
|
749
784
|
break;
|
|
750
785
|
case 7:
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
console.log('撤回成功',
|
|
786
|
+
_context10.prev = 7;
|
|
787
|
+
_context10.t0 = _context10["catch"](0);
|
|
788
|
+
console.log('撤回成功', _context10.t0);
|
|
754
789
|
case 10:
|
|
755
790
|
case "end":
|
|
756
|
-
return
|
|
791
|
+
return _context10.stop();
|
|
757
792
|
}
|
|
758
|
-
},
|
|
793
|
+
}, _callee10, null, [[0, 7]]);
|
|
759
794
|
}));
|
|
760
795
|
return function handleWithdraw(_x7) {
|
|
761
|
-
return
|
|
796
|
+
return _ref10.apply(this, arguments);
|
|
762
797
|
};
|
|
763
798
|
}();
|
|
764
799
|
//催单
|
|
765
800
|
var handleReminder = /*#__PURE__*/function () {
|
|
766
|
-
var
|
|
801
|
+
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(type) {
|
|
767
802
|
var _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$no9, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$no10, _currentNodeDetail$wo22, api, flowTags, newFlowTags, params, res;
|
|
768
|
-
return _regeneratorRuntime().wrap(function
|
|
769
|
-
while (1) switch (
|
|
803
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
804
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
770
805
|
case 0:
|
|
771
|
-
|
|
806
|
+
_context11.prev = 0;
|
|
772
807
|
dispatch(setLoading(true));
|
|
773
808
|
api = type === 'reminder' ? reminder : cancelReminder;
|
|
774
809
|
flowTags = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : (_currentNodeDetail$wo17 = _currentNodeDetail$wo16.jsonMap) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : _currentNodeDetail$wo17.flowTags) || '[]');
|
|
@@ -799,10 +834,10 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
799
834
|
}
|
|
800
835
|
}; // console.log(params);
|
|
801
836
|
// return;
|
|
802
|
-
|
|
837
|
+
_context11.next = 8;
|
|
803
838
|
return api(params);
|
|
804
839
|
case 8:
|
|
805
|
-
res =
|
|
840
|
+
res = _context11.sent;
|
|
806
841
|
if (res.success) {
|
|
807
842
|
handleSuccessCallBack(type);
|
|
808
843
|
message.success(type === 'reminder' ? '催单成功' : '取消催单成功');
|
|
@@ -822,24 +857,24 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
822
857
|
} else {
|
|
823
858
|
message.error(res.message);
|
|
824
859
|
}
|
|
825
|
-
|
|
860
|
+
_context11.next = 15;
|
|
826
861
|
break;
|
|
827
862
|
case 12:
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
console.log(type === 'reminder' ? '催单成功' : '取消催单成功',
|
|
863
|
+
_context11.prev = 12;
|
|
864
|
+
_context11.t0 = _context11["catch"](0);
|
|
865
|
+
console.log(type === 'reminder' ? '催单成功' : '取消催单成功', _context11.t0);
|
|
831
866
|
case 15:
|
|
832
|
-
|
|
867
|
+
_context11.prev = 15;
|
|
833
868
|
dispatch(setLoading(false));
|
|
834
|
-
return
|
|
869
|
+
return _context11.finish(15);
|
|
835
870
|
case 18:
|
|
836
871
|
case "end":
|
|
837
|
-
return
|
|
872
|
+
return _context11.stop();
|
|
838
873
|
}
|
|
839
|
-
},
|
|
874
|
+
}, _callee11, null, [[0, 12, 15, 18]]);
|
|
840
875
|
}));
|
|
841
876
|
return function handleReminder(_x8) {
|
|
842
|
-
return
|
|
877
|
+
return _ref11.apply(this, arguments);
|
|
843
878
|
};
|
|
844
879
|
}();
|
|
845
880
|
|
|
@@ -955,6 +990,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
955
990
|
}) === 'artificial' && (!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder) || isCurrentNodeHandler) && !readonly && /*#__PURE__*/React.createElement("div", {
|
|
956
991
|
className: "footer"
|
|
957
992
|
}, /*#__PURE__*/React.createElement(ActionList, {
|
|
993
|
+
flowType: flowTemplateType,
|
|
958
994
|
flowStatus: flowStatus,
|
|
959
995
|
nodeType: nodeType,
|
|
960
996
|
handleAction: handleAction,
|
|
@@ -982,6 +1018,14 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
982
1018
|
handleSubmitRemark: handleSubmitRemark
|
|
983
1019
|
}), /*#__PURE__*/React.createElement(WithdrawModal, {
|
|
984
1020
|
handleWithdraw: handleWithdraw
|
|
1021
|
+
}), remindVisible && /*#__PURE__*/React.createElement(SubmitRemindModal, {
|
|
1022
|
+
onCallback: function onCallback() {
|
|
1023
|
+
handleSubmit();
|
|
1024
|
+
setRemindVisible(false);
|
|
1025
|
+
},
|
|
1026
|
+
onClose: function onClose() {
|
|
1027
|
+
return setRemindVisible(false);
|
|
1028
|
+
}
|
|
985
1029
|
})));
|
|
986
1030
|
};
|
|
987
1031
|
var ProviderWrap = function ProviderWrap(props) {
|
|
@@ -76,6 +76,14 @@ var getCookie = function getCookie() {
|
|
|
76
76
|
var removeCookie = function removeCookie() {
|
|
77
77
|
localStorage.removeItem('kmkf_kmgd_cookie');
|
|
78
78
|
};
|
|
79
|
+
//设置工单提交提醒状态
|
|
80
|
+
var setRemind = function setRemind() {
|
|
81
|
+
localStorage.setItem('kmkf_kmgd_remind', 'true');
|
|
82
|
+
};
|
|
83
|
+
//获取工单提交提醒状态
|
|
84
|
+
var getRemind = function getRemind() {
|
|
85
|
+
return localStorage.getItem('kmkf_kmgd_remind');
|
|
86
|
+
};
|
|
79
87
|
export default {
|
|
80
88
|
setAddressData: setAddressData,
|
|
81
89
|
getAddressData: getAddressData,
|
|
@@ -94,5 +102,7 @@ export default {
|
|
|
94
102
|
removeHost: removeHost,
|
|
95
103
|
setCookie: setCookie,
|
|
96
104
|
getCookie: getCookie,
|
|
97
|
-
removeCookie: removeCookie
|
|
105
|
+
removeCookie: removeCookie,
|
|
106
|
+
setRemind: setRemind,
|
|
107
|
+
getRemind: getRemind
|
|
98
108
|
};
|
|
@@ -10,6 +10,6 @@ export declare const setFlowList: import("@reduxjs/toolkit").ActionCreatorWithPa
|
|
|
10
10
|
lastWorkOrderDetail: any;
|
|
11
11
|
}, "flowTemplateDetail/setCurrentTradeIdWOrkOrderNumber">, setFlowTemplateId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "flowTemplateDetail/setFlowTemplateId">, setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "flowTemplateDetail/setLoading">, setCurrentFlowAllShowHideRules: import("@reduxjs/toolkit").ActionCreatorWithPayload<CurrentFlowShowHideRules, "flowTemplateDetail/setCurrentFlowAllShowHideRules">, setClearStore: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<undefined, "flowTemplateDetail/setClearStore">, setWithdrawWorkOrderDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
12
12
|
nodeId: string;
|
|
13
|
-
}, "flowTemplateDetail/setWithdrawWorkOrderDetail">;
|
|
13
|
+
}, "flowTemplateDetail/setWithdrawWorkOrderDetail">, setFlowTemplateType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "flowTemplateDetail/setFlowTemplateType">;
|
|
14
14
|
declare const _default: import("redux").Reducer<FlowTemplateDetailState, import("redux").AnyAction>;
|
|
15
15
|
export default _default;
|
|
@@ -39,12 +39,13 @@ export var initialState = {
|
|
|
39
39
|
nodeId: ''
|
|
40
40
|
},
|
|
41
41
|
tid: '',
|
|
42
|
-
shopUniqueKey: ''
|
|
42
|
+
shopUniqueKey: '',
|
|
43
|
+
flowTemplateType: ''
|
|
43
44
|
};
|
|
44
45
|
export var fetchPanelInfo = function fetchPanelInfo(params, options) {
|
|
45
46
|
return /*#__PURE__*/function () {
|
|
46
47
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) {
|
|
47
|
-
var res, _res$data, _res$data$flowRecordL, _res$data2, _res$data2$currentNod, _res$data2$currentNod2, _last, _res$
|
|
48
|
+
var res, _res$data, _res$data$flowRecordL, _res$data2, _res$data2$currentNod, _res$data2$currentNod2, _last, _res$data14, _currentNodeDetail$wo, _currentNodeDetail$no, _res$data15, _currentNodeDetail$no2, recordList, _recordList, currentNodeDetail, handlerList, assistants, _res$data16, _currentNodeDetail$no3, assistantRes, _assistantRes$data;
|
|
48
49
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
49
50
|
while (1) switch (_context.prev = _context.next) {
|
|
50
51
|
case 0:
|
|
@@ -78,7 +79,7 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
|
|
|
78
79
|
recordList = (_recordList = recordList) === null || _recordList === void 0 ? void 0 : _recordList.slice(0, -1);
|
|
79
80
|
}
|
|
80
81
|
batch(function () {
|
|
81
|
-
var _res$data3, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data9, _res$data10, _res$data11, _res$data12;
|
|
82
|
+
var _res$data3, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data9, _res$data10, _res$data11, _res$data12, _res$data13;
|
|
82
83
|
dispatch(setFlowList(recordList || []));
|
|
83
84
|
dispatch(setTid((res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.tid) || ''));
|
|
84
85
|
dispatch(setShopUniqueKey((res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.shopUniqueKey) || ''));
|
|
@@ -91,26 +92,27 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
|
|
|
91
92
|
flowWorkOrderUpdateTime: res === null || res === void 0 ? void 0 : (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.flowWorkOrderUpdateTime,
|
|
92
93
|
workOrderUpdateTime: res === null || res === void 0 ? void 0 : (_res$data9 = res.data) === null || _res$data9 === void 0 ? void 0 : _res$data9.workOrderUpdateTime
|
|
93
94
|
}));
|
|
94
|
-
dispatch(
|
|
95
|
-
dispatch(
|
|
95
|
+
dispatch(setFlowTemplateType(res === null || res === void 0 ? void 0 : (_res$data10 = res.data) === null || _res$data10 === void 0 ? void 0 : _res$data10.flowTemplateType));
|
|
96
|
+
dispatch(setFlowStatus(res === null || res === void 0 ? void 0 : (_res$data11 = res.data) === null || _res$data11 === void 0 ? void 0 : _res$data11.flowStatus));
|
|
97
|
+
dispatch(setFlowTemplateId((res === null || res === void 0 ? void 0 : (_res$data12 = res.data) === null || _res$data12 === void 0 ? void 0 : _res$data12.flowTemplateId) || ''));
|
|
96
98
|
dispatch(setCurrentFlowAllShowHideRules({
|
|
97
|
-
allShowHideRules: res === null || res === void 0 ? void 0 : (_res$
|
|
99
|
+
allShowHideRules: res === null || res === void 0 ? void 0 : (_res$data13 = res.data) === null || _res$data13 === void 0 ? void 0 : _res$data13.allShowHideRules
|
|
98
100
|
}));
|
|
99
101
|
});
|
|
100
102
|
// 如果
|
|
101
|
-
currentNodeDetail = res === null || res === void 0 ? void 0 : (_res$
|
|
103
|
+
currentNodeDetail = res === null || res === void 0 ? void 0 : (_res$data14 = res.data) === null || _res$data14 === void 0 ? void 0 : _res$data14.currentNodeDetail;
|
|
102
104
|
handlerList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo === void 0 ? void 0 : _currentNodeDetail$wo.handlerList;
|
|
103
105
|
assistants = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no === void 0 ? void 0 : _currentNodeDetail$no.assistants;
|
|
104
106
|
if (!(Array.isArray(handlerList) && handlerList.length &&
|
|
105
107
|
// 有处理人
|
|
106
108
|
!(assistants !== null && assistants !== void 0 && assistants.isAllStaff) && // 不是所有人都能处理,查询能够处理的人
|
|
107
|
-
res !== null && res !== void 0 && (_res$
|
|
109
|
+
res !== null && res !== void 0 && (_res$data15 = res.data) !== null && _res$data15 !== void 0 && _res$data15.flowTemplateId && currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$no2 = currentNodeDetail.nodeInfo) !== null && _currentNodeDetail$no2 !== void 0 && _currentNodeDetail$no2.id)) {
|
|
108
110
|
_context.next = 17;
|
|
109
111
|
break;
|
|
110
112
|
}
|
|
111
113
|
_context.next = 15;
|
|
112
114
|
return queryMultiNodeAssistantInfo([{
|
|
113
|
-
flowTemplateId: res === null || res === void 0 ? void 0 : (_res$
|
|
115
|
+
flowTemplateId: res === null || res === void 0 ? void 0 : (_res$data16 = res.data) === null || _res$data16 === void 0 ? void 0 : _res$data16.flowTemplateId,
|
|
114
116
|
currentNodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no3 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no3 === void 0 ? void 0 : _currentNodeDetail$no3.id
|
|
115
117
|
}]);
|
|
116
118
|
case 15:
|
|
@@ -143,7 +145,7 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
|
|
|
143
145
|
export var fetchAllFlowOperateRecord = function fetchAllFlowOperateRecord(params) {
|
|
144
146
|
return /*#__PURE__*/function () {
|
|
145
147
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dispatch) {
|
|
146
|
-
var res, _res$
|
|
148
|
+
var res, _res$data17, list;
|
|
147
149
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
148
150
|
while (1) switch (_context2.prev = _context2.next) {
|
|
149
151
|
case 0:
|
|
@@ -154,7 +156,7 @@ export var fetchAllFlowOperateRecord = function fetchAllFlowOperateRecord(params
|
|
|
154
156
|
case 4:
|
|
155
157
|
res = _context2.sent;
|
|
156
158
|
if (res.success) {
|
|
157
|
-
list = res === null || res === void 0 ? void 0 : (_res$
|
|
159
|
+
list = res === null || res === void 0 ? void 0 : (_res$data17 = res.data) === null || _res$data17 === void 0 ? void 0 : _res$data17.map(function (item) {
|
|
158
160
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
159
161
|
time: (item === null || item === void 0 ? void 0 : item.created) || '',
|
|
160
162
|
operator: (item === null || item === void 0 ? void 0 : item.operator) || '',
|
|
@@ -189,7 +191,7 @@ export var fetchAllFlowOperateRecord = function fetchAllFlowOperateRecord(params
|
|
|
189
191
|
export var fetchCurrentTradeIdLinkWorkOrder = function fetchCurrentTradeIdLinkWorkOrder(params) {
|
|
190
192
|
return /*#__PURE__*/function () {
|
|
191
193
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dispatch) {
|
|
192
|
-
var res, _res$
|
|
194
|
+
var res, _res$data18, _res$data19, _res$data19$list, total, detail;
|
|
193
195
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
194
196
|
while (1) switch (_context3.prev = _context3.next) {
|
|
195
197
|
case 0:
|
|
@@ -200,8 +202,8 @@ export var fetchCurrentTradeIdLinkWorkOrder = function fetchCurrentTradeIdLinkWo
|
|
|
200
202
|
case 4:
|
|
201
203
|
res = _context3.sent;
|
|
202
204
|
if (res.success) {
|
|
203
|
-
total = (res === null || res === void 0 ? void 0 : (_res$
|
|
204
|
-
detail = res === null || res === void 0 ? void 0 : (_res$
|
|
205
|
+
total = (res === null || res === void 0 ? void 0 : (_res$data18 = res.data) === null || _res$data18 === void 0 ? void 0 : _res$data18.total) || 0;
|
|
206
|
+
detail = res === null || res === void 0 ? void 0 : (_res$data19 = res.data) === null || _res$data19 === void 0 ? void 0 : (_res$data19$list = _res$data19.list) === null || _res$data19$list === void 0 ? void 0 : _res$data19$list[0];
|
|
205
207
|
dispatch(setCurrentTradeIdWOrkOrderNumber({
|
|
206
208
|
total: total,
|
|
207
209
|
lastWorkOrderDetail: detail
|
|
@@ -307,6 +309,10 @@ var slice = createSlice({
|
|
|
307
309
|
// @ts-ignore
|
|
308
310
|
state[key] = initialState[key];
|
|
309
311
|
});
|
|
312
|
+
},
|
|
313
|
+
setFlowTemplateType: function setFlowTemplateType(state, _ref22) {
|
|
314
|
+
var payload = _ref22.payload;
|
|
315
|
+
state.flowTemplateType = payload;
|
|
310
316
|
}
|
|
311
317
|
}
|
|
312
318
|
});
|
|
@@ -328,6 +334,7 @@ var _slice$actions = slice.actions,
|
|
|
328
334
|
setLoading = _slice$actions.setLoading,
|
|
329
335
|
setCurrentFlowAllShowHideRules = _slice$actions.setCurrentFlowAllShowHideRules,
|
|
330
336
|
setClearStore = _slice$actions.setClearStore,
|
|
331
|
-
setWithdrawWorkOrderDetail = _slice$actions.setWithdrawWorkOrderDetail
|
|
332
|
-
|
|
337
|
+
setWithdrawWorkOrderDetail = _slice$actions.setWithdrawWorkOrderDetail,
|
|
338
|
+
setFlowTemplateType = _slice$actions.setFlowTemplateType;
|
|
339
|
+
export { setFlowList, setNodeAssistantInfo, setTid, setShopUniqueKey, setRemarkList, setCurrentNode, setAction, setVisibleRemarkList, setPlat, setOperateParams, setAddRemarkVisible, setFlowStatus, setCurrentTradeIdWOrkOrderNumber, setFlowTemplateId, setLoading, setCurrentFlowAllShowHideRules, setClearStore, setWithdrawWorkOrderDetail, setFlowTemplateType };
|
|
333
340
|
export default slice.reducer;
|
|
@@ -684,3 +684,17 @@ export declare const selectWithDrawOrder: ((state: {
|
|
|
684
684
|
}> & {
|
|
685
685
|
clearCache: () => void;
|
|
686
686
|
};
|
|
687
|
+
export declare const selectFlowTemplateType: ((state: {
|
|
688
|
+
login: import("../login").GlobalState;
|
|
689
|
+
global: import("../global").GlobalState;
|
|
690
|
+
workOrder: import("../workOrder").WorkOrderState;
|
|
691
|
+
customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
|
|
692
|
+
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
693
|
+
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
694
|
+
logicFlow: import("../logicFlow/types").LogicFlowState;
|
|
695
|
+
flowWOrkOrderDetail: import("./types").FlowTemplateDetailState;
|
|
696
|
+
}) => import("./types").FlowType) & import("reselect").OutputSelectorFields<(args_0: import("./types").FlowTemplateDetailState) => import("./types").FlowType, {
|
|
697
|
+
clearCache: () => void;
|
|
698
|
+
}> & {
|
|
699
|
+
clearCache: () => void;
|
|
700
|
+
};
|
|
@@ -54,4 +54,7 @@ export var selectCurrentFlowAllShowHideRules = createSelector([selectSlice], fun
|
|
|
54
54
|
});
|
|
55
55
|
export var selectWithDrawOrder = createSelector([selectSlice], function (state) {
|
|
56
56
|
return state.withdrawWorkOrderDetail;
|
|
57
|
+
});
|
|
58
|
+
export var selectFlowTemplateType = createSelector([selectSlice], function (state) {
|
|
59
|
+
return state.flowTemplateType;
|
|
57
60
|
});
|
|
@@ -59,6 +59,7 @@ export interface FlowTemplateDetailState {
|
|
|
59
59
|
};
|
|
60
60
|
tid: string;
|
|
61
61
|
shopUniqueKey: string;
|
|
62
|
+
flowTemplateType: FlowType;
|
|
62
63
|
}
|
|
63
64
|
export interface QyFlowPanelInfoRequest {
|
|
64
65
|
/**
|
|
@@ -90,6 +91,10 @@ export interface QyFlowPanelInfoResponse {
|
|
|
90
91
|
* 流程模版版本 - 前端帮忙传一下,在某些操作场景下就不用再查数据库了
|
|
91
92
|
*/
|
|
92
93
|
flowVersion?: number;
|
|
94
|
+
/**
|
|
95
|
+
* 流程模版类型 - 前端帮忙传一下,在某些操作场景下就不用再查数据库了
|
|
96
|
+
*/
|
|
97
|
+
flowTemplateType?: FlowType;
|
|
93
98
|
/**
|
|
94
99
|
* 流程工单更新时间 - 即流程工单的 modified 字段传回来即可,必传
|
|
95
100
|
*/
|
|
@@ -869,6 +874,10 @@ export declare enum FlowStatus {
|
|
|
869
874
|
COMPLETED = "COMPLETED",
|
|
870
875
|
CLOSE = "CLOSED"
|
|
871
876
|
}
|
|
877
|
+
export declare enum FlowType {
|
|
878
|
+
SINGLE_PAGE = "SINGLE_PAGE",
|
|
879
|
+
MULTI_NODE = "MULTI_NODE"
|
|
880
|
+
}
|
|
872
881
|
export interface QueryAllFlowOperateRecordRequest {
|
|
873
882
|
flowWorkOrderId: string;
|
|
874
883
|
flowTemplateId: string;
|
|
@@ -36,10 +36,17 @@ export var NodeStatus;
|
|
|
36
36
|
NodeStatus["CLOSE"] = "CLOSE";
|
|
37
37
|
})(NodeStatus || (NodeStatus = {}));
|
|
38
38
|
export var FlowStatus;
|
|
39
|
+
|
|
40
|
+
// 工单类型
|
|
39
41
|
(function (FlowStatus) {
|
|
40
42
|
FlowStatus["NON_START"] = "NON_START";
|
|
41
43
|
FlowStatus["PROCESSING"] = "PROCESSING";
|
|
42
44
|
FlowStatus["STOPPING"] = "STOPPING";
|
|
43
45
|
FlowStatus["COMPLETED"] = "COMPLETED";
|
|
44
46
|
FlowStatus["CLOSE"] = "CLOSED";
|
|
45
|
-
})(FlowStatus || (FlowStatus = {}));
|
|
47
|
+
})(FlowStatus || (FlowStatus = {}));
|
|
48
|
+
export var FlowType;
|
|
49
|
+
(function (FlowType) {
|
|
50
|
+
FlowType["SINGLE_PAGE"] = "SINGLE_PAGE";
|
|
51
|
+
FlowType["MULTI_NODE"] = "MULTI_NODE";
|
|
52
|
+
})(FlowType || (FlowType = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2-alpha.0",
|
|
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": "^0.20.0",
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.20.0",
|
|
37
|
-
"@kmkf-fe-packages/services-components": "^0.20.0",
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "^0.20.2-alpha.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.20.2-alpha.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^0.20.2-alpha.0",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "e087c899bcc315ef1f30cf821fa5a75607d6493a",
|
|
78
78
|
"gitHooks": {
|
|
79
79
|
"pre-commit": "lint-staged"
|
|
80
80
|
}
|