@kmkf-fe-packages/kmkf-work-order-service-component 2.2.9 → 2.2.11
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/CustomerServiceToDoList/index.d.ts +3 -0
- package/dist/esm/CustomerServiceToDoList/index.js +155 -0
- package/dist/esm/CustomerServiceToDoList/index.module.less +134 -0
- package/dist/esm/FlowTemplateDetailV2/common.js +1 -0
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +313 -228
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.d.ts +12 -0
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.js +130 -0
- package/dist/esm/FlowTemplateDetailV2/index.js +41 -23
- package/dist/esm/FlowTemplateDetailV2/store/reducers.d.ts +2 -0
- package/dist/esm/FlowTemplateDetailV2/store/reducers.js +9 -2
- package/dist/esm/FlowTemplateDetailV2/store/selector.d.ts +1 -0
- package/dist/esm/FlowTemplateDetailV2/store/selector.js +3 -0
- package/dist/esm/WorkOrder/components/CustomerServiceToDoCard/index.d.ts +3 -0
- package/dist/esm/WorkOrder/components/CustomerServiceToDoCard/index.js +76 -0
- package/dist/esm/WorkOrder/components/CustomerServiceToDoCard/index.module.less +20 -0
- package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js +6 -0
- package/dist/esm/WorkOrder/components/WorkOrderList/index.js +7 -2
- package/dist/esm/WorkOrder/components/WorkOrderList/index.less +4 -3
- package/dist/esm/WorkOrder/index.js +21 -1
- package/dist/esm/common/constant.d.ts +5 -0
- package/dist/esm/common/constant.js +3 -2
- package/dist/esm/common/imgs/ai.png +0 -0
- package/dist/esm/common/imgs/notification.png +0 -0
- package/dist/esm/common/utils/tools.js +20 -13
- package/dist/esm/common/utils/xzSDK.d.ts +2 -0
- package/dist/esm/common/utils/xzSDK.js +45 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/model/customizeWorkOrder/index.d.ts +1 -1
- package/dist/esm/model/customizeWorkOrder/index.js +17 -3
- package/dist/esm/model/customizeWorkOrder/types.d.ts +2 -0
- package/dist/esm/model/flowTemplateDetail/types.d.ts +1 -0
- package/dist/esm/model/servers/api.d.ts +1 -0
- package/dist/esm/model/servers/api.js +8 -0
- package/package.json +5 -5
|
@@ -24,3 +24,15 @@ export declare const onBlurSkxReturnBillNo: ({ form, value, templateDetail, comp
|
|
|
24
24
|
templateDetail: any;
|
|
25
25
|
componentOnBlur: (value: any, type: string) => Promise<void>;
|
|
26
26
|
}) => Promise<void>;
|
|
27
|
+
export declare const onBlurSkxLogisticsCode: ({ form, value, templateDetail, componentOnBlur, }: {
|
|
28
|
+
form: FormInstance;
|
|
29
|
+
value: string;
|
|
30
|
+
templateDetail: any;
|
|
31
|
+
componentOnBlur: (value: any, type: string) => Promise<void>;
|
|
32
|
+
}) => Promise<void>;
|
|
33
|
+
export declare const onBlurSkxReturnTHLogisticsCode: ({ form, value, templateDetail, componentOnBlur, }: {
|
|
34
|
+
form: FormInstance;
|
|
35
|
+
value: string;
|
|
36
|
+
templateDetail: any;
|
|
37
|
+
componentOnBlur: (value: any, type: string) => Promise<void>;
|
|
38
|
+
}) => Promise<void>;
|
|
@@ -261,4 +261,134 @@ export var onBlurSkxReturnBillNo = /*#__PURE__*/function () {
|
|
|
261
261
|
return function onBlurSkxReturnBillNo(_x5) {
|
|
262
262
|
return _ref9.apply(this, arguments);
|
|
263
263
|
};
|
|
264
|
+
}();
|
|
265
|
+
export var onBlurSkxLogisticsCode = /*#__PURE__*/function () {
|
|
266
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_ref11) {
|
|
267
|
+
var form, value, templateDetail, componentOnBlur, hasTradeIdComponent;
|
|
268
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
269
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
270
|
+
case 0:
|
|
271
|
+
form = _ref11.form, value = _ref11.value, templateDetail = _ref11.templateDetail, componentOnBlur = _ref11.componentOnBlur;
|
|
272
|
+
if (value) {
|
|
273
|
+
_context8.next = 3;
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
return _context8.abrupt("return");
|
|
277
|
+
case 3:
|
|
278
|
+
hasTradeIdComponent = templateDetail.componentDtoList.some(function (item) {
|
|
279
|
+
return item.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
280
|
+
});
|
|
281
|
+
if (hasTradeIdComponent) {
|
|
282
|
+
_context8.next = 6;
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
return _context8.abrupt("return");
|
|
286
|
+
case 6:
|
|
287
|
+
_context8.next = 8;
|
|
288
|
+
return servers.SKX.queryReturnOrderDetailSingleton({
|
|
289
|
+
expressCode: value
|
|
290
|
+
}).then( /*#__PURE__*/function () {
|
|
291
|
+
var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(res) {
|
|
292
|
+
var data, tradeId, oldValue, blurPromise;
|
|
293
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
294
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
295
|
+
case 0:
|
|
296
|
+
data = res.data;
|
|
297
|
+
tradeId = data === null || data === void 0 ? void 0 : data.tid;
|
|
298
|
+
oldValue = form.getFieldValue('0eVTfMGEyd'); // 创建一个异步操作的Promise
|
|
299
|
+
blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
|
|
300
|
+
_context7.next = 6;
|
|
301
|
+
return blurPromise;
|
|
302
|
+
case 6:
|
|
303
|
+
// // 所有异步操作完成后执行
|
|
304
|
+
|
|
305
|
+
form.setFieldsValue({
|
|
306
|
+
m3ap1EvEyd: tradeId,
|
|
307
|
+
'0eVTfMGEyd': oldValue
|
|
308
|
+
});
|
|
309
|
+
case 7:
|
|
310
|
+
case "end":
|
|
311
|
+
return _context7.stop();
|
|
312
|
+
}
|
|
313
|
+
}, _callee7);
|
|
314
|
+
}));
|
|
315
|
+
return function (_x8) {
|
|
316
|
+
return _ref13.apply(this, arguments);
|
|
317
|
+
};
|
|
318
|
+
}()).catch(console.debug);
|
|
319
|
+
case 8:
|
|
320
|
+
case "end":
|
|
321
|
+
return _context8.stop();
|
|
322
|
+
}
|
|
323
|
+
}, _callee8);
|
|
324
|
+
}));
|
|
325
|
+
return function onBlurSkxLogisticsCode(_x7) {
|
|
326
|
+
return _ref12.apply(this, arguments);
|
|
327
|
+
};
|
|
328
|
+
}();
|
|
329
|
+
export var onBlurSkxReturnTHLogisticsCode = /*#__PURE__*/function () {
|
|
330
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref14) {
|
|
331
|
+
var form, value, templateDetail, componentOnBlur, hasSkxReturnBillNoComponent;
|
|
332
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
333
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
334
|
+
case 0:
|
|
335
|
+
form = _ref14.form, value = _ref14.value, templateDetail = _ref14.templateDetail, componentOnBlur = _ref14.componentOnBlur;
|
|
336
|
+
if (value) {
|
|
337
|
+
_context10.next = 3;
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
return _context10.abrupt("return");
|
|
341
|
+
case 3:
|
|
342
|
+
hasSkxReturnBillNoComponent = templateDetail.componentDtoList.some(function (item) {
|
|
343
|
+
return item.workOrderComponentType === 'SKX_RETURN_BILL_NO';
|
|
344
|
+
});
|
|
345
|
+
if (hasSkxReturnBillNoComponent) {
|
|
346
|
+
_context10.next = 6;
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
return _context10.abrupt("return");
|
|
350
|
+
case 6:
|
|
351
|
+
_context10.next = 8;
|
|
352
|
+
return servers.SKX.queryReturnOrderDetailSingleton({
|
|
353
|
+
expressCode: value
|
|
354
|
+
}).then( /*#__PURE__*/function () {
|
|
355
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(res) {
|
|
356
|
+
var _list$;
|
|
357
|
+
var data, list, oldValue, returnBillNo, blurPromise;
|
|
358
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
359
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
360
|
+
case 0:
|
|
361
|
+
data = res.data;
|
|
362
|
+
list = (data === null || data === void 0 ? void 0 : data.skqReturnOrderDetailInfoDtos) || [];
|
|
363
|
+
oldValue = form.getFieldValue('4487c6516b');
|
|
364
|
+
returnBillNo = (list === null || list === void 0 ? void 0 : list.length) === 1 ? (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.returnBillNo : ''; // 创建一个异步操作的Promise
|
|
365
|
+
blurPromise = componentOnBlur(returnBillNo, 'skxReturnBillNo'); // 等待异步操作完成后再执行setTimeout
|
|
366
|
+
_context9.next = 7;
|
|
367
|
+
return blurPromise;
|
|
368
|
+
case 7:
|
|
369
|
+
// // 所有异步操作完成后执行
|
|
370
|
+
|
|
371
|
+
form.setFieldsValue({
|
|
372
|
+
fe10d6f36b: returnBillNo,
|
|
373
|
+
'4487c6516b': oldValue
|
|
374
|
+
});
|
|
375
|
+
case 8:
|
|
376
|
+
case "end":
|
|
377
|
+
return _context9.stop();
|
|
378
|
+
}
|
|
379
|
+
}, _callee9);
|
|
380
|
+
}));
|
|
381
|
+
return function (_x10) {
|
|
382
|
+
return _ref16.apply(this, arguments);
|
|
383
|
+
};
|
|
384
|
+
}()).catch(console.debug);
|
|
385
|
+
case 8:
|
|
386
|
+
case "end":
|
|
387
|
+
return _context10.stop();
|
|
388
|
+
}
|
|
389
|
+
}, _callee10);
|
|
390
|
+
}));
|
|
391
|
+
return function onBlurSkxReturnTHLogisticsCode(_x9) {
|
|
392
|
+
return _ref15.apply(this, arguments);
|
|
393
|
+
};
|
|
264
394
|
}();
|
|
@@ -18,7 +18,7 @@ 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, useState, useRef, useMemo, useContext } from 'react';
|
|
21
|
-
import { Timeline, ConfigProvider, Form, message, Alert, Button, Spin, Row, Col, Popover, Typography } from 'antd';
|
|
21
|
+
import { Timeline, ConfigProvider, Form, message, Alert, Button, Spin, Row, Col, Popover, Typography, Tag } from 'antd';
|
|
22
22
|
import { InfoCircleOutlined } from '@ant-design/icons';
|
|
23
23
|
import { get, find, isEmpty } from 'lodash';
|
|
24
24
|
import { batch } from 'react-redux';
|
|
@@ -27,7 +27,7 @@ import { calcWorkOrderList, deleteCacheOrder, submitParams } from "../common/uti
|
|
|
27
27
|
import { useMemoizedFn } from 'ahooks';
|
|
28
28
|
import moment from 'moment';
|
|
29
29
|
import { fetchPanelInfo, fetchAllFlowOperateRecord, fetchCollectOrder } from "./store/reducers";
|
|
30
|
-
import { selectFlowRecordList, selectRemarkRecordList, selectCurrentNodeDetail, selectTid, selectShopUniqueKey, selectOperateParams, selectFlowStatus, selectCurrentTradeIdWOrkOrderNumber, selectFlowTemplateId, selectLoading, selectOrderBackLoading, selectOrderBackKmLoading, selectWithDrawOrder, selectNodeAssistantMap, selectFlowTemplateType, selectFollow } from "./store/selector";
|
|
30
|
+
import { selectFlowRecordList, selectRemarkRecordList, selectCurrentNodeDetail, selectTid, selectShopUniqueKey, selectOperateParams, selectFlowStatus, selectCurrentTradeIdWOrkOrderNumber, selectFlowTemplateId, selectLoading, selectOrderBackLoading, selectOrderBackKmLoading, selectWithDrawOrder, selectNodeAssistantMap, selectFlowTemplateType, selectFollow, selectAutoSubmitFlag } from "./store/selector";
|
|
31
31
|
import { NodeType, FlowStatus, FlowType } from "../model/flowTemplateDetail/types";
|
|
32
32
|
import NodeItem from "./components/Item";
|
|
33
33
|
import CurrentNode from "./components/CurrentNode";
|
|
@@ -53,6 +53,7 @@ import "./index.less";
|
|
|
53
53
|
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
54
54
|
import { PlatformAvatar } from '@kmkf-fe-packages/services-components';
|
|
55
55
|
import { Provide, Context } from "./context";
|
|
56
|
+
import { WORK_ORDER_STATUS_AI_BUILD } from "../common/constant";
|
|
56
57
|
import { useSelector } from "./context/useSelector";
|
|
57
58
|
import { pollOperationResult } from "./pollOperationResult";
|
|
58
59
|
import { pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
@@ -60,7 +61,7 @@ import { PlatForm } from "../WorkOrder/types";
|
|
|
60
61
|
var Text = Typography.Text,
|
|
61
62
|
Link = Typography.Link;
|
|
62
63
|
var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
63
|
-
var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _shopList$find, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$no23, _currentNodeDetail$no24;
|
|
64
|
+
var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _shopList$find, _JSON$parse, _currentNodeDetail$wo30, _currentNodeDetail$wo31, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$no23, _currentNodeDetail$no24;
|
|
64
65
|
var flowTemplateKey = props.flowTemplateKey,
|
|
65
66
|
_props$shopList = props.shopList,
|
|
66
67
|
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
@@ -96,6 +97,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
96
97
|
var loading = useSelector(selectLoading);
|
|
97
98
|
var orderBackLoading = useSelector(selectOrderBackLoading);
|
|
98
99
|
var orderBackKmLoading = useSelector(selectOrderBackKmLoading);
|
|
100
|
+
var autoSubmitFlag = useSelector(selectAutoSubmitFlag);
|
|
99
101
|
var withdrawWorkOrderDetail = useSelector(selectWithDrawOrder);
|
|
100
102
|
var assistantMap = useSelector(selectNodeAssistantMap);
|
|
101
103
|
var flowTemplateType = useSelector(selectFlowTemplateType);
|
|
@@ -1089,31 +1091,40 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1089
1091
|
payload: plat
|
|
1090
1092
|
});
|
|
1091
1093
|
}, [plat]);
|
|
1094
|
+
var autoSubmitFn = function autoSubmitFn() {
|
|
1095
|
+
var _currentNodeDetail$wo24;
|
|
1096
|
+
// TODO: 兼容后端一些时候生成的数据异常情况,防止批量提交出现卡顿不执行情况
|
|
1097
|
+
if (isEmpty(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder) && typeof callbackAutoSubmitResult === 'function') {
|
|
1098
|
+
return callbackAutoSubmitResult({
|
|
1099
|
+
success: false,
|
|
1100
|
+
message: '当前流程工单无工单数据,请联系实施处理'
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo24 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo24 === void 0 ? void 0 : _currentNodeDetail$wo24.flowWorkOrderId)) {
|
|
1104
|
+
setTimeout(function () {
|
|
1105
|
+
handleSubmit();
|
|
1106
|
+
}, 0);
|
|
1107
|
+
}
|
|
1108
|
+
};
|
|
1092
1109
|
useEffect(function () {
|
|
1093
1110
|
if (autoSubmit && !isNull(currentNodeDetail)) {
|
|
1094
|
-
var _currentNodeDetail$
|
|
1095
|
-
//
|
|
1096
|
-
if (
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
});
|
|
1101
|
-
}
|
|
1102
|
-
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo24 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo24 === void 0 ? void 0 : _currentNodeDetail$wo24.flowWorkOrderId)) {
|
|
1103
|
-
setTimeout(function () {
|
|
1104
|
-
handleSubmit();
|
|
1105
|
-
}, 0);
|
|
1111
|
+
var _currentNodeDetail$wo25, _currentNodeDetail$wo26;
|
|
1112
|
+
// SKX首节点满足下列条件、此时批量提交会等订单数据反填再提交, 其余企业批量提交还是原先逻辑,不涉及订单数据反填
|
|
1113
|
+
if (currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo25 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo25 !== void 0 && _currentNodeDetail$wo25.notAutoFillWithFirstSubmit && autoSubmitFlag) {
|
|
1114
|
+
autoSubmitFn();
|
|
1115
|
+
} else if (!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo26 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo26 !== void 0 && _currentNodeDetail$wo26.notAutoFillWithFirstSubmit) && !autoSubmitFlag) {
|
|
1116
|
+
autoSubmitFn();
|
|
1106
1117
|
}
|
|
1107
1118
|
}
|
|
1108
|
-
}, [currentNodeDetail]);
|
|
1119
|
+
}, [currentNodeDetail, autoSubmitFlag]);
|
|
1109
1120
|
var isCurrentNodeHandler = useMemo(function () {
|
|
1110
|
-
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$
|
|
1121
|
+
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$wo27, _currentNodeDetail$no17, _currentNodeDetail$no18;
|
|
1111
1122
|
return currentUserHasOperatorAuth({
|
|
1112
1123
|
assistantList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no11 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no11 === void 0 ? void 0 : _currentNodeDetail$no11.id) && assistantMap[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no12 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no12 === void 0 ? void 0 : _currentNodeDetail$no12.id] || [],
|
|
1113
1124
|
currentUserKey: plat.userKey,
|
|
1114
1125
|
staffIds: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no13 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no13 === void 0 ? void 0 : (_currentNodeDetail$no14 = _currentNodeDetail$no13.assistants) === null || _currentNodeDetail$no14 === void 0 ? void 0 : _currentNodeDetail$no14.staffIds) || [],
|
|
1115
1126
|
operateDataPermission: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no15 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no15 === void 0 ? void 0 : (_currentNodeDetail$no16 = _currentNodeDetail$no15.assistants) === null || _currentNodeDetail$no16 === void 0 ? void 0 : _currentNodeDetail$no16.operateDataPermission,
|
|
1116
|
-
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1127
|
+
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo27 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo27 === void 0 ? void 0 : _currentNodeDetail$wo27.handlerList) || [],
|
|
1117
1128
|
isAllStaff: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no17 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no17 === void 0 ? void 0 : (_currentNodeDetail$no18 = _currentNodeDetail$no17.assistants) === null || _currentNodeDetail$no18 === void 0 ? void 0 : _currentNodeDetail$no18.isAllStaff
|
|
1118
1129
|
});
|
|
1119
1130
|
}, [currentNodeDetail, plat, assistantMap]);
|
|
@@ -1122,9 +1133,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1122
1133
|
return item.accessToken === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no19 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no19 === void 0 ? void 0 : (_currentNodeDetail$no20 = _currentNodeDetail$no19.relationEvent) === null || _currentNodeDetail$no20 === void 0 ? void 0 : _currentNodeDetail$no20.defaultShopUniqueKey);
|
|
1123
1134
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopId;
|
|
1124
1135
|
var ReportOrderRender = function ReportOrderRender(props) {
|
|
1125
|
-
var _currentNodeDetail$
|
|
1136
|
+
var _currentNodeDetail$wo28, _currentNodeDetail$wo29;
|
|
1126
1137
|
var details = props.details;
|
|
1127
|
-
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1138
|
+
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo28 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo28 === void 0 ? void 0 : _currentNodeDetail$wo28.componentDtoList.filter(function (t) {
|
|
1128
1139
|
return !CANNOT_BACK_FILL.includes(t.workOrderComponentType || '');
|
|
1129
1140
|
});
|
|
1130
1141
|
//获取可以返填的组件值
|
|
@@ -1132,7 +1143,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1132
1143
|
_calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
|
|
1133
1144
|
transData = _calcWorkOrderList2[0];
|
|
1134
1145
|
//获取表单显示值
|
|
1135
|
-
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1146
|
+
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo29 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo29 === void 0 ? void 0 : _currentNodeDetail$wo29.componentDtoList),
|
|
1136
1147
|
_calcWorkOrderList4 = _slicedToArray(_calcWorkOrderList3, 1),
|
|
1137
1148
|
transDataall = _calcWorkOrderList4[0];
|
|
1138
1149
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1217,7 +1228,12 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1217
1228
|
spinning: loading || orderBackLoading || orderBackKmLoading
|
|
1218
1229
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1219
1230
|
className: "flowWorkOrderDetail"
|
|
1220
|
-
}, flowWorkOrderId && /*#__PURE__*/React.createElement("div",
|
|
1231
|
+
}, flowWorkOrderId && /*#__PURE__*/React.createElement("div", {
|
|
1232
|
+
style: {
|
|
1233
|
+
display: 'flex',
|
|
1234
|
+
justifyContent: 'space-between'
|
|
1235
|
+
}
|
|
1236
|
+
}, /*#__PURE__*/React.createElement("div", null, [PlatForm.PC, PlatForm.WEB].includes(plat.platform) && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(PlatformAvatar, {
|
|
1221
1237
|
type: shopItem === null || shopItem === void 0 ? void 0 : shopItem.shopSource,
|
|
1222
1238
|
styles: {
|
|
1223
1239
|
marginRight: 5
|
|
@@ -1225,7 +1241,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1225
1241
|
}), shopItem === null || shopItem === void 0 ? void 0 : shopItem.shopName, "-"), /*#__PURE__*/React.createElement("span", null, flowWorkOrderId), /*#__PURE__*/React.createElement(Button, {
|
|
1226
1242
|
type: "link",
|
|
1227
1243
|
onClick: handleFollow
|
|
1228
|
-
}, !follow ? '关注' : '已关注')),
|
|
1244
|
+
}, !follow ? '关注' : '已关注')), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo30 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo30 === void 0 ? void 0 : (_currentNodeDetail$wo31 = _currentNodeDetail$wo30.jsonMap) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : _currentNodeDetail$wo31.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
|
|
1245
|
+
color: "blue"
|
|
1246
|
+
}, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo32 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : (_currentNodeDetail$wo33 = _currentNodeDetail$wo32.jsonMap) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : _currentNodeDetail$wo33.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
1229
1247
|
justify: 'space-between',
|
|
1230
1248
|
className: "header"
|
|
1231
1249
|
}, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -40,6 +40,7 @@ export declare const clearLabelList: (state: FlowTemplateDetailState) => void;
|
|
|
40
40
|
export declare const setRejectLoading: (state: FlowTemplateDetailState, { payload }: PayloadAction<boolean>) => void;
|
|
41
41
|
export declare const setWithDrawLoading: (state: FlowTemplateDetailState, { payload }: PayloadAction<boolean>) => void;
|
|
42
42
|
export declare const setFollow: (state: FlowTemplateDetailState, { payload }: PayloadAction<boolean>) => void;
|
|
43
|
+
export declare const setaAutoSubmitFlag: (state: FlowTemplateDetailState, { payload }: PayloadAction<boolean>) => void;
|
|
43
44
|
declare const reducers: (state: FlowTemplateDetailState | undefined, action: {
|
|
44
45
|
type: string;
|
|
45
46
|
payload: any;
|
|
@@ -86,5 +87,6 @@ declare const reducers: (state: FlowTemplateDetailState | undefined, action: {
|
|
|
86
87
|
rejectLoading: boolean;
|
|
87
88
|
withdrawLoading: boolean;
|
|
88
89
|
follow: boolean;
|
|
90
|
+
autoSubmitFlag: boolean;
|
|
89
91
|
};
|
|
90
92
|
export default reducers;
|
|
@@ -46,8 +46,10 @@ export var initState = {
|
|
|
46
46
|
labelList: [],
|
|
47
47
|
rejectLoading: false,
|
|
48
48
|
withdrawLoading: false,
|
|
49
|
-
follow: false
|
|
49
|
+
follow: false,
|
|
50
|
+
autoSubmitFlag: false // 批量提交可操作标识
|
|
50
51
|
};
|
|
52
|
+
|
|
51
53
|
export var fetchPanelInfo = function fetchPanelInfo(params, options) {
|
|
52
54
|
return /*#__PURE__*/function () {
|
|
53
55
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) {
|
|
@@ -454,6 +456,10 @@ export var setFollow = function setFollow(state, _ref29) {
|
|
|
454
456
|
var payload = _ref29.payload;
|
|
455
457
|
state.follow = payload;
|
|
456
458
|
};
|
|
459
|
+
export var setaAutoSubmitFlag = function setaAutoSubmitFlag(state, _ref30) {
|
|
460
|
+
var payload = _ref30.payload;
|
|
461
|
+
state.autoSubmitFlag = payload;
|
|
462
|
+
};
|
|
457
463
|
var reducerMap = {
|
|
458
464
|
setNodeAssistantInfo: setNodeAssistantInfo,
|
|
459
465
|
setLoading: setLoading,
|
|
@@ -480,7 +486,8 @@ var reducerMap = {
|
|
|
480
486
|
clearLabelList: clearLabelList,
|
|
481
487
|
setRejectLoading: setRejectLoading,
|
|
482
488
|
setWithDrawLoading: setWithDrawLoading,
|
|
483
|
-
setFollow: setFollow
|
|
489
|
+
setFollow: setFollow,
|
|
490
|
+
setaAutoSubmitFlag: setaAutoSubmitFlag
|
|
484
491
|
};
|
|
485
492
|
var reducers = function reducers() {
|
|
486
493
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initState;
|
|
@@ -262,6 +262,7 @@ export declare const selectFlowTemplateId: (state: FlowTemplateDetailState) => s
|
|
|
262
262
|
export declare const selectLoading: (state: FlowTemplateDetailState) => boolean;
|
|
263
263
|
export declare const selectOrderBackLoading: (state: FlowTemplateDetailState) => boolean;
|
|
264
264
|
export declare const selectOrderBackKmLoading: (state: FlowTemplateDetailState) => boolean;
|
|
265
|
+
export declare const selectAutoSubmitFlag: (state: FlowTemplateDetailState) => boolean;
|
|
265
266
|
export declare const selectCurrentFlowAllShowHideRules: (state: FlowTemplateDetailState) => import("../../model/flowTemplateDetail/types").CurrentFlowShowHideRules;
|
|
266
267
|
export declare const selectWithDrawOrder: (state: FlowTemplateDetailState) => {
|
|
267
268
|
nodeId: string;
|
|
@@ -50,6 +50,9 @@ export var selectOrderBackLoading = function selectOrderBackLoading(state) {
|
|
|
50
50
|
export var selectOrderBackKmLoading = function selectOrderBackKmLoading(state) {
|
|
51
51
|
return state.orderBackKmLoading;
|
|
52
52
|
};
|
|
53
|
+
export var selectAutoSubmitFlag = function selectAutoSubmitFlag(state) {
|
|
54
|
+
return state.autoSubmitFlag;
|
|
55
|
+
};
|
|
53
56
|
export var selectCurrentFlowAllShowHideRules = function selectCurrentFlowAllShowHideRules(state) {
|
|
54
57
|
return state.currentFlowAllShowHideRules;
|
|
55
58
|
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { Image } from 'antd';
|
|
13
|
+
import { useEffect, useState } from 'react';
|
|
14
|
+
import { useAppDispatch, useAppSelector } from "../../../model/hooks";
|
|
15
|
+
import notificationIcon from "../../../common/imgs/notification.png";
|
|
16
|
+
import { nodeWorkOrderPending } from "../../../model/servers/api";
|
|
17
|
+
import styles from "./index.module.less";
|
|
18
|
+
var CustomerServiceToDoCard = function CustomerServiceToDoCard(props) {
|
|
19
|
+
var shopUniqueKey = props.shopUniqueKey;
|
|
20
|
+
var dispatch = useAppDispatch();
|
|
21
|
+
var _useState = useState(0),
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
number = _useState2[0],
|
|
24
|
+
setNumber = _useState2[1];
|
|
25
|
+
var customerServiceToDoListOpen = useAppSelector(function (state) {
|
|
26
|
+
var _state$customizeWorkO;
|
|
27
|
+
return (_state$customizeWorkO = state.customizeWorkOrder) === null || _state$customizeWorkO === void 0 ? void 0 : _state$customizeWorkO.customerServiceToDoListOpen;
|
|
28
|
+
});
|
|
29
|
+
var initHandle = /*#__PURE__*/function () {
|
|
30
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
31
|
+
var _yield$nodeWorkOrderP, data;
|
|
32
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33
|
+
while (1) switch (_context.prev = _context.next) {
|
|
34
|
+
case 0:
|
|
35
|
+
_context.next = 2;
|
|
36
|
+
return nodeWorkOrderPending({
|
|
37
|
+
flowTags: ['AI_BUILD'],
|
|
38
|
+
onlyCount: true,
|
|
39
|
+
shopUniqueKeyList: [shopUniqueKey]
|
|
40
|
+
});
|
|
41
|
+
case 2:
|
|
42
|
+
_yield$nodeWorkOrderP = _context.sent;
|
|
43
|
+
data = _yield$nodeWorkOrderP.data;
|
|
44
|
+
setNumber((data === null || data === void 0 ? void 0 : data.total) || 0);
|
|
45
|
+
case 5:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context.stop();
|
|
48
|
+
}
|
|
49
|
+
}, _callee);
|
|
50
|
+
}));
|
|
51
|
+
return function initHandle() {
|
|
52
|
+
return _ref.apply(this, arguments);
|
|
53
|
+
};
|
|
54
|
+
}();
|
|
55
|
+
useEffect(function () {
|
|
56
|
+
initHandle();
|
|
57
|
+
}, [customerServiceToDoListOpen]);
|
|
58
|
+
var sendMsgToTab = function sendMsgToTab() {
|
|
59
|
+
dispatch({
|
|
60
|
+
type: 'customizeWorkOrder/setCustomerServiceToDoListOpen',
|
|
61
|
+
payload: true
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: styles.container,
|
|
66
|
+
onClick: sendMsgToTab
|
|
67
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
|
68
|
+
src: notificationIcon,
|
|
69
|
+
width: 20,
|
|
70
|
+
height: 20,
|
|
71
|
+
preview: false
|
|
72
|
+
}), "\u5BA2\u670D\u5F85\u529E", /*#__PURE__*/React.createElement("span", {
|
|
73
|
+
className: styles.number
|
|
74
|
+
}, "(", number, ")"));
|
|
75
|
+
};
|
|
76
|
+
export default CustomerServiceToDoCard;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
position: fixed;
|
|
3
|
+
right: 0px;
|
|
4
|
+
bottom: 30px;
|
|
5
|
+
z-index: 10;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: space-around;
|
|
8
|
+
align-items: center;
|
|
9
|
+
width: 120px;
|
|
10
|
+
height: 32px;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
background-color: #fffbe6;
|
|
14
|
+
border: 1px solid #ffe5ba;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
color:#333;
|
|
17
|
+
.number {
|
|
18
|
+
color: #1890ff;
|
|
19
|
+
}
|
|
20
|
+
}
|
package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { setFormModalVisible, setLogicFlowId, setFlowWorkOrderId, setCurrentCust
|
|
|
17
17
|
import { queryPanelInfo } from "../../../../../model/flowTemplateDetail/api";
|
|
18
18
|
import reject from "../../../../../common/imgs/reject.png";
|
|
19
19
|
import reminder from "../../../../../common/imgs/reminder.png";
|
|
20
|
+
import ai from "../../../../../common/imgs/ai.png";
|
|
20
21
|
import "./index.less";
|
|
21
22
|
var FlowStatus = {
|
|
22
23
|
WAIT_COMMIT: {
|
|
@@ -171,6 +172,11 @@ var CustomizeWorkOrderCard = function CustomizeWorkOrderCard(props) {
|
|
|
171
172
|
style: {
|
|
172
173
|
width: '20px'
|
|
173
174
|
}
|
|
175
|
+
}), item.flowTags.includes('AI_BUILD') && /*#__PURE__*/React.createElement("img", {
|
|
176
|
+
src: ai,
|
|
177
|
+
style: {
|
|
178
|
+
width: '20px'
|
|
179
|
+
}
|
|
174
180
|
})))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement("span", {
|
|
175
181
|
className: "order_card_header_detail",
|
|
176
182
|
onClick: function onClick() {
|
|
@@ -18,7 +18,7 @@ import { useInfiniteScroll, useRequest } from 'ahooks';
|
|
|
18
18
|
import { last } from 'lodash';
|
|
19
19
|
import moment from 'moment';
|
|
20
20
|
import { useAppSelector, useAppDispatch } from "../../../model/hooks";
|
|
21
|
-
import { fetchCompanyUserList, setFormModalVisible, setCurrentCustomizeRecord, setCurrentBuyerChecked, setLogicFlowId, setFlowWorkOrderId } from "../../../model/customizeWorkOrder";
|
|
21
|
+
import { fetchCompanyUserList, setFormModalVisible, setCurrentCustomizeRecord, setCurrentBuyerChecked, setLogicFlowId, setFlowWorkOrderId, setWorkOrderProcessStatus } from "../../../model/customizeWorkOrder";
|
|
22
22
|
import { selectorCurrentBuyerChecked, selectorFormModalVisible, selectorCurrentCustomizeRecord, selectorLogicFlowId, selectorCompanyUserList, selectorFlowWorkOrderId } from "../../../model/customizeWorkOrder/selector";
|
|
23
23
|
import { selectFlowList, selectFlowTemplateGroupWorkOrderTemplateList } from "../../../model/logicFlow/selector";
|
|
24
24
|
import CustomizeWorkOrderCard from "./components/CustomizeWorkOrderCard/index";
|
|
@@ -97,6 +97,10 @@ var getTableData = function getTableData(_ref) {
|
|
|
97
97
|
};
|
|
98
98
|
var FlowOrderList = function FlowOrderList(props) {
|
|
99
99
|
var _data$list;
|
|
100
|
+
var customerServiceToDoListOpen = useAppSelector(function (state) {
|
|
101
|
+
var _state$customizeWorkO;
|
|
102
|
+
return (_state$customizeWorkO = state.customizeWorkOrder) === null || _state$customizeWorkO === void 0 ? void 0 : _state$customizeWorkO.customerServiceToDoListOpen;
|
|
103
|
+
});
|
|
100
104
|
var refValue = props.refValue,
|
|
101
105
|
data = props.data,
|
|
102
106
|
loading = props.loading,
|
|
@@ -107,7 +111,7 @@ var FlowOrderList = function FlowOrderList(props) {
|
|
|
107
111
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
108
112
|
spinning: loading
|
|
109
113
|
}, /*#__PURE__*/React.createElement("main", {
|
|
110
|
-
className: "custom_box_main",
|
|
114
|
+
className: "custom_box_main ".concat(customerServiceToDoListOpen ? 'customer_service_to_do_list_open' : ''),
|
|
111
115
|
style: {
|
|
112
116
|
height: height
|
|
113
117
|
},
|
|
@@ -449,6 +453,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
|
449
453
|
dispatch(setFormModalVisible(true));
|
|
450
454
|
};
|
|
451
455
|
var onDealWorkOrderSuccess = function onDealWorkOrderSuccess(type) {
|
|
456
|
+
dispatch(setWorkOrderProcessStatus(type));
|
|
452
457
|
if (['submit', 'forward', 'close', 'rejected'].includes(type)) {
|
|
453
458
|
dispatch(setFormModalVisible(false));
|
|
454
459
|
}
|
|
@@ -154,11 +154,12 @@
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
.custom_box_main {
|
|
157
|
-
|
|
158
|
-
// margin-bottom: 40px;
|
|
159
|
-
height: 500px;
|
|
157
|
+
height: 500px;
|
|
160
158
|
overflow: auto;
|
|
161
159
|
background-color: #fafafa;
|
|
160
|
+
&.customer_service_to_do_list_open {
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
}
|
|
162
163
|
}
|
|
163
164
|
|
|
164
165
|
.custom_box_main_empty {
|
|
@@ -30,7 +30,10 @@ import OrderList from "./components/WorkOrderList";
|
|
|
30
30
|
import Reminder from "./components/Reminder";
|
|
31
31
|
import WdtTradeList from "../WdtTradeList";
|
|
32
32
|
import PaymentWorkOrderList from "./components/PaymentWorkOrderList";
|
|
33
|
+
import CustomerServiceToDoList from "../CustomerServiceToDoList";
|
|
34
|
+
import CustomerServiceToDoCard from "./components/CustomerServiceToDoCard";
|
|
33
35
|
import { getHashParams } from "../common/utils/tools";
|
|
36
|
+
import xzSDK from "../common/utils/xzSDK";
|
|
34
37
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
35
38
|
import 'moment/locale/zh-cn';
|
|
36
39
|
import { PlatForm } from "./types";
|
|
@@ -71,6 +74,10 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
71
74
|
var _state$customizeWorkO;
|
|
72
75
|
return (_state$customizeWorkO = state.customizeWorkOrder) === null || _state$customizeWorkO === void 0 ? void 0 : _state$customizeWorkO.showPayment;
|
|
73
76
|
});
|
|
77
|
+
var customerServiceToDoListOpen = useAppSelector(function (state) {
|
|
78
|
+
var _state$customizeWorkO2;
|
|
79
|
+
return (_state$customizeWorkO2 = state.customizeWorkOrder) === null || _state$customizeWorkO2 === void 0 ? void 0 : _state$customizeWorkO2.customerServiceToDoListOpen;
|
|
80
|
+
});
|
|
74
81
|
var companyUserConfig = useAppSelector(function (state) {
|
|
75
82
|
var _state$workOrder$user;
|
|
76
83
|
return (_state$workOrder$user = state.workOrder.userInfo) === null || _state$workOrder$user === void 0 ? void 0 : _state$workOrder$user.companyUserConfig;
|
|
@@ -147,10 +154,13 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
147
154
|
});
|
|
148
155
|
}, []);
|
|
149
156
|
var initHandle = function initHandle() {
|
|
150
|
-
// dispatch(fetchQueryGroupCustomTemplate());
|
|
151
157
|
dispatch(fetchLogicFlowList);
|
|
152
158
|
dispatch(fetchQueryCurrentCompanyUser());
|
|
153
159
|
dispatch(showPayment);
|
|
160
|
+
//工单通AI智能工单功能,监听消息
|
|
161
|
+
if (platform === PlatForm.XIAOZHI) {
|
|
162
|
+
xzSDK.receiveTabMsg(dispatch);
|
|
163
|
+
}
|
|
154
164
|
};
|
|
155
165
|
//判断是否店铺是否授权
|
|
156
166
|
useEffect(function () {
|
|
@@ -182,6 +192,12 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
182
192
|
}
|
|
183
193
|
return opt;
|
|
184
194
|
}, [isShowPayment, isShowWdt]);
|
|
195
|
+
var shopUniqueKey = useMemo(function () {
|
|
196
|
+
var _find;
|
|
197
|
+
return (_find = (shopList || []).find(function (item) {
|
|
198
|
+
return item.shopId === shopId;
|
|
199
|
+
})) === null || _find === void 0 ? void 0 : _find.uniqueKey;
|
|
200
|
+
}, [shopList, shopId]);
|
|
185
201
|
var RenderInfo = function RenderInfo() {
|
|
186
202
|
var _userInfo$featureGrou, _userInfo$featureGrou2;
|
|
187
203
|
var loginOutHandle = function loginOutHandle() {
|
|
@@ -282,6 +298,10 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
282
298
|
onOpenWangWang: onOpenWangWang
|
|
283
299
|
}), tabActive === 'wdt' && /*#__PURE__*/React.createElement(WdtTradeList, {
|
|
284
300
|
version: ((_companyUserConfig2 = companyUserConfig) === null || _companyUserConfig2 === void 0 ? void 0 : (_companyUserConfig2$p = _companyUserConfig2.plugins) === null || _companyUserConfig2$p === void 0 ? void 0 : (_companyUserConfig2$p2 = _companyUserConfig2$p.wdt) === null || _companyUserConfig2$p2 === void 0 ? void 0 : _companyUserConfig2$p2.version) || ''
|
|
301
|
+
}), customerServiceToDoListOpen && /*#__PURE__*/React.createElement(CustomerServiceToDoList, {
|
|
302
|
+
shopUniqueKey: shopUniqueKey
|
|
303
|
+
}), [PlatForm.XIAOZHI].includes(platform) && (userInfo === null || userInfo === void 0 ? void 0 : userInfo.isAICreateOrder) && /*#__PURE__*/React.createElement(CustomerServiceToDoCard, {
|
|
304
|
+
shopUniqueKey: shopUniqueKey
|
|
285
305
|
}))), !isEmpower && platform !== PlatForm.WEB && Reminder({
|
|
286
306
|
callback: onEmpowerCallback
|
|
287
307
|
}));
|