@kmkf-fe-packages/kmkf-work-order-service-component 1.3.0 → 1.4.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/esm/FlowTemplateDetail/common.d.ts +1 -0
- package/dist/esm/FlowTemplateDetail/common.js +2 -0
- package/dist/esm/FlowTemplateDetail/components/CurrentNode/index.js +10 -9
- package/dist/esm/FlowTemplateDetail/components/FormRender/index.js +55 -39
- package/dist/esm/FlowTemplateDetail/components/Header/index.d.ts +1 -0
- package/dist/esm/FlowTemplateDetail/components/Header/index.js +5 -3
- package/dist/esm/FlowTemplateDetail/components/Item/index.js +2 -1
- package/dist/esm/FlowTemplateDetail/index.js +59 -16
- package/dist/esm/common/utils/tools.js +86 -53
- package/dist/esm/model/flowTemplateDetail/index.d.ts +1 -1
- package/dist/esm/model/flowTemplateDetail/index.js +10 -7
- package/dist/esm/model/flowTemplateDetail/selector.d.ts +2 -2
- package/dist/esm/model/flowTemplateDetail/types.d.ts +2 -1
- package/dist/esm/model/logicFlow/index.js +6 -7
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -38,7 +38,6 @@ Build library via `father`,
|
|
|
38
38
|
```bash
|
|
39
39
|
$ npm run build
|
|
40
40
|
```
|
|
41
|
-
|
|
42
41
|
11122
|
|
43
42
|
|
|
44
43
|
## 企业工单工单项目抽离模块
|
|
@@ -64,5 +63,5 @@ const Text = ()=>{
|
|
|
64
63
|
|
|
65
64
|
```
|
|
66
65
|
|
|
67
|
-
| 字段 | 说明 | 数据类型 | | ----------------- | ---------------- | ------------------------------------ | | platform | 平台 | TAOBAO =淘宝\|FXG=抖音\|PDD=拼多多\| | | shopId | 店铺 ID | number | | buyerNick | 买家昵称 | string | | buyerId | 买家 id | string | | orderNo | 订单 id | string | | onEmpowerCallback | 授权弹框点击回调 | function |
|
|
66
|
+
| 字段 | 说明 | 数据类型 | | ----------------- | ---------------- | ------------------------------------ | | platform | 平台 | TAOBAO =淘宝\|FXG=抖音\|PDD=拼多多\| | | shopId | 店铺 ID | number | | buyerNick | 买家昵称 | string | | buyerId | 买家 id | string | | orderNo | 订单 id | string | | onEmpowerCallback | 授权弹框点击回调 | function |
|
|
68
67
|
|
|
@@ -13,6 +13,7 @@ export declare const FLOW_STATUS_V2: {
|
|
|
13
13
|
COMPLETED: string;
|
|
14
14
|
CLOSED: string;
|
|
15
15
|
};
|
|
16
|
+
export declare const CANNOT_BACK_FILL: string[];
|
|
16
17
|
export declare const verifyHandle: (data: any, componentDtoList: Array<any>) => {
|
|
17
18
|
success: boolean;
|
|
18
19
|
message: string;
|
|
@@ -51,6 +51,8 @@ export var FLOW_STATUS_V2 = {
|
|
|
51
51
|
COMPLETED: '已完成',
|
|
52
52
|
CLOSED: '已关闭'
|
|
53
53
|
};
|
|
54
|
+
//不能回填的组件type
|
|
55
|
+
export var CANNOT_BACK_FILL = ['LOGISTICS_TRAJECTORY', 'LOGISTICS_TRAJECTORY_MORE', 'BUYER_MESSAGE_NOTICE', 'MSG_STATUS', 'NEW_PAYMENT_STATUS', 'REISSUE_STATUS', 'REISSUE_LOGISTICS', 'RETURN_GOODS_STATUS', 'RETURN_GOODS_TRADE_ID', 'ADJUST_WORK_ORDER_STATUS', 'INVOICE_STATUS', 'INVOICING_STATUS', 'EXCHANGE_STATUS', 'WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE'];
|
|
54
56
|
export var verifyHandle = function verifyHandle(data, componentDtoList) {
|
|
55
57
|
var _componentDtoList$fin, _componentDtoList$fin2, _data$paymentUniqueKe, _data$paymentUniqueKe2;
|
|
56
58
|
var res = {
|
|
@@ -33,7 +33,7 @@ import styles from "./index.module.less";
|
|
|
33
33
|
import { PlatForm } from "../../../WorkOrder/types";
|
|
34
34
|
import { useSignal } from "../../../hooks/useSignal";
|
|
35
35
|
var CurrentNode = function CurrentNode(props, ref) {
|
|
36
|
-
var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$no18, _currentNodeDetail$no19, _currentNodeDetail$
|
|
36
|
+
var _currentNodeDetail$no, _currentNodeDetail$no2, _currentNodeDetail$no3, _currentNodeDetail$no4, _currentNodeDetail$no16, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$no18, _currentNodeDetail$no19, _currentNodeDetail$wo20;
|
|
37
37
|
var formRenderRef = useRef(null);
|
|
38
38
|
useImperativeHandle(ref, function () {
|
|
39
39
|
return {
|
|
@@ -108,7 +108,7 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
108
108
|
// 当订单号清空时,需要将外层的订单已录入数量情况
|
|
109
109
|
dispatch(setCurrentTradeIdWOrkOrderNumber({
|
|
110
110
|
total: 0,
|
|
111
|
-
|
|
111
|
+
workOrderList: []
|
|
112
112
|
}));
|
|
113
113
|
} else {
|
|
114
114
|
var _currentNodeDetail$no14;
|
|
@@ -118,7 +118,7 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
118
118
|
flowTemplateKey: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey,
|
|
119
119
|
desensitizedFlag: false,
|
|
120
120
|
pageNo: 1,
|
|
121
|
-
pageSize:
|
|
121
|
+
pageSize: 100,
|
|
122
122
|
queryComponents: [{
|
|
123
123
|
key: "".concat(tradeKey),
|
|
124
124
|
symbol: 'in',
|
|
@@ -220,15 +220,16 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
220
220
|
nodeName: nodeName,
|
|
221
221
|
showEdit: showEdit,
|
|
222
222
|
showLook: false,
|
|
223
|
-
handler: isArtificialNode ? currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : (_currentNodeDetail$wo12 = _currentNodeDetail$
|
|
224
|
-
showWithdraw: isArtificialNode && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
225
|
-
showReminder: isArtificialNode && [NodeStatus.WAITING, NodeStatus.STOPPING].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
226
|
-
isReminder: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
223
|
+
handler: isArtificialNode ? (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.completedUserName) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : (_currentNodeDetail$wo13 = _currentNodeDetail$wo12.handlerList) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : (_currentNodeDetail$wo14 = _currentNodeDetail$wo13[0]) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.account) : '',
|
|
224
|
+
showWithdraw: isArtificialNode && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : _currentNodeDetail$wo15.flowStatus) === FlowStatus.COMPLETED && isCurrentNodeHandler && !readonly,
|
|
225
|
+
showReminder: isArtificialNode && [NodeStatus.WAITING, NodeStatus.STOPPING].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.flowStatus) && isCurrentNodeHandler && !readonly,
|
|
226
|
+
isReminder: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo17 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : (_currentNodeDetail$wo18 = _currentNodeDetail$wo17.jsonMap) === null || _currentNodeDetail$wo18 === void 0 ? void 0 : _currentNodeDetail$wo18.flowTags) || '[]').includes('REMINDER'),
|
|
227
227
|
handleWithdraw: handleWithdraw,
|
|
228
228
|
handleReminder: onReminder,
|
|
229
229
|
editing: editing,
|
|
230
230
|
handleEdit: handleEdit,
|
|
231
|
-
handleSave: handleSave
|
|
231
|
+
handleSave: handleSave,
|
|
232
|
+
handleLabel: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.flowStatus) === FlowStatus.COMPLETED ? '完成人' : '处理人'
|
|
232
233
|
}), /*#__PURE__*/React.createElement("div", {
|
|
233
234
|
className: styles.formRenderContainer
|
|
234
235
|
}, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no18 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no18 === void 0 ? void 0 : _currentNodeDetail$no18.nodeType) && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) && (flowStatus === FlowStatus.COMPLETED && !editing ? /*#__PURE__*/React.createElement(RenderDetail, {
|
|
@@ -243,7 +244,7 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
243
244
|
templateDetail: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
|
|
244
245
|
shopList: shopList,
|
|
245
246
|
record: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder,
|
|
246
|
-
shopId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
247
|
+
shopId: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo20 === void 0 ? void 0 : _currentNodeDetail$wo20.shopId) || plat.shopId || defaultShopId,
|
|
247
248
|
accountName: plat === null || plat === void 0 ? void 0 : plat.accountName,
|
|
248
249
|
onOpenWangWang: onOpenWangWang,
|
|
249
250
|
onUpdateRemark: onUpdateRemark,
|
|
@@ -24,7 +24,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
24
24
|
import React, { useState, useRef, useEffect, useMemo, forwardRef, useImperativeHandle } from 'react';
|
|
25
25
|
import { ConfigProvider, Form, Space, Tag } from 'antd';
|
|
26
26
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
27
|
-
import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle } from 'lodash';
|
|
27
|
+
import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle, groupBy } from 'lodash';
|
|
28
28
|
import 'moment/locale/zh-cn';
|
|
29
29
|
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
|
|
30
30
|
// 重复检验不需要展示在顶部的
|
|
@@ -50,6 +50,7 @@ var hasComponent = function hasComponent(componentDtoList, workOrderComponentTyp
|
|
|
50
50
|
// TODO: 用useState会有bug, 不确定是哪里导致的
|
|
51
51
|
var hideByXYComponentsMap = {};
|
|
52
52
|
var FormRender = function FormRender(props, ref) {
|
|
53
|
+
var _Object$keys2;
|
|
53
54
|
useImperativeHandle(ref, function () {
|
|
54
55
|
return {
|
|
55
56
|
batchFillByMapping: batchFillByMapping
|
|
@@ -366,11 +367,11 @@ var FormRender = function FormRender(props, ref) {
|
|
|
366
367
|
batchFillByMapping(initialValues);
|
|
367
368
|
orderBackReplace(transData, templateDetail);
|
|
368
369
|
// TODO: 非开始节点录入,都会有workOrderId,这里判断是否有前置组件含有订单号;如果存在订单号,进行订单反填。
|
|
369
|
-
var
|
|
370
|
-
if (
|
|
370
|
+
var tradeIdUniqueKey = hasComponent(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList, 'TRADE_ID_INPUT');
|
|
371
|
+
if (tradeIdUniqueKey && shopId && record !== null && record !== void 0 && (_record$jsonMap2 = record.jsonMap) !== null && _record$jsonMap2 !== void 0 && _record$jsonMap2["".concat(tradeIdUniqueKey, "_tradeId")] && firstOrderBackfill) {
|
|
371
372
|
var _record$jsonMap3;
|
|
372
373
|
orderBack({
|
|
373
|
-
order_no: record === null || record === void 0 ? void 0 : (_record$jsonMap3 = record.jsonMap) === null || _record$jsonMap3 === void 0 ? void 0 : _record$jsonMap3["".concat(
|
|
374
|
+
order_no: record === null || record === void 0 ? void 0 : (_record$jsonMap3 = record.jsonMap) === null || _record$jsonMap3 === void 0 ? void 0 : _record$jsonMap3["".concat(tradeIdUniqueKey, "_tradeId")],
|
|
374
375
|
form: form,
|
|
375
376
|
shopId: shopId,
|
|
376
377
|
shopList: shopList,
|
|
@@ -542,20 +543,6 @@ var FormRender = function FormRender(props, ref) {
|
|
|
542
543
|
fillByShopId(shopId);
|
|
543
544
|
}, [shopId]);
|
|
544
545
|
|
|
545
|
-
// TODO: 标签查询逻辑
|
|
546
|
-
var formShopId = Form.useWatch("shopId", form) || shopId;
|
|
547
|
-
var tradeIdUniqueKey = hasComponent(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'TRADE_ID_INPUT');
|
|
548
|
-
var labelUniqueKey = hasComponent(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'LABEL');
|
|
549
|
-
useEffect(function () {
|
|
550
|
-
var tid = form.getFieldValue("".concat(tradeIdUniqueKey, "_tradeId"));
|
|
551
|
-
if (!tid) {
|
|
552
|
-
setLabelList([]);
|
|
553
|
-
}
|
|
554
|
-
if (formShopId && tid && labelUniqueKey) {
|
|
555
|
-
queryLabels(tid, formShopId);
|
|
556
|
-
}
|
|
557
|
-
}, [formShopId, tradeIdUniqueKey, labelUniqueKey]);
|
|
558
|
-
|
|
559
546
|
// 查询标签
|
|
560
547
|
var queryLabels = /*#__PURE__*/function () {
|
|
561
548
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(tid, shopId) {
|
|
@@ -575,18 +562,26 @@ var FormRender = function FormRender(props, ref) {
|
|
|
575
562
|
}
|
|
576
563
|
return _context2.abrupt("return", console.debug('查询标签缺少必要参数-shopId'));
|
|
577
564
|
case 4:
|
|
578
|
-
|
|
565
|
+
if (tid) {
|
|
566
|
+
_context2.next = 8;
|
|
567
|
+
break;
|
|
568
|
+
}
|
|
569
|
+
setLabelList([]);
|
|
570
|
+
form.setFieldsValue(_defineProperty({}, "".concat(labelComponent.uniqueKey), []));
|
|
571
|
+
return _context2.abrupt("return", console.debug('查询标签缺少必要参数-tradeId'));
|
|
572
|
+
case 8:
|
|
573
|
+
_context2.next = 10;
|
|
579
574
|
return queryLabelByTradeId({
|
|
580
575
|
tid: tid,
|
|
581
576
|
shopId: shopId
|
|
582
577
|
});
|
|
583
|
-
case
|
|
578
|
+
case 10:
|
|
584
579
|
_yield$queryLabelByTr = _context2.sent;
|
|
585
580
|
_yield$queryLabelByTr2 = _yield$queryLabelByTr.data;
|
|
586
581
|
data = _yield$queryLabelByTr2 === void 0 ? [] : _yield$queryLabelByTr2;
|
|
587
582
|
setLabelList(data);
|
|
588
583
|
form.setFieldsValue(_defineProperty({}, "".concat(labelComponent.uniqueKey), data));
|
|
589
|
-
case
|
|
584
|
+
case 15:
|
|
590
585
|
case "end":
|
|
591
586
|
return _context2.stop();
|
|
592
587
|
}
|
|
@@ -601,7 +596,6 @@ var FormRender = function FormRender(props, ref) {
|
|
|
601
596
|
var changeHandle = function changeHandle(order_no) {
|
|
602
597
|
if (!order_no) return;
|
|
603
598
|
console.log('[订单返填 changeHandle order_no ] >', order_no);
|
|
604
|
-
queryLabels(order_no, formShopId);
|
|
605
599
|
orderBack({
|
|
606
600
|
order_no: order_no,
|
|
607
601
|
form: form,
|
|
@@ -658,25 +652,28 @@ var FormRender = function FormRender(props, ref) {
|
|
|
658
652
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
659
653
|
while (1) switch (_context3.prev = _context3.next) {
|
|
660
654
|
case 0:
|
|
655
|
+
if (type === 'tradeId') {
|
|
656
|
+
queryLabels(value, form.getFieldValue('shopId'));
|
|
657
|
+
}
|
|
661
658
|
// 针对订单号组件进行当前订单查重校验
|
|
662
659
|
if ((type === 'tradeId' || type === 'enterprisePaymentTid') && typeof handleChangeTradeId === 'function') {
|
|
663
660
|
handleChangeTradeId(value);
|
|
664
661
|
}
|
|
665
662
|
if (value) {
|
|
666
|
-
_context3.next =
|
|
663
|
+
_context3.next = 5;
|
|
667
664
|
break;
|
|
668
665
|
}
|
|
669
666
|
setReplaceValue(function (prev) {
|
|
670
667
|
return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, type, 0));
|
|
671
668
|
});
|
|
672
669
|
return _context3.abrupt("return");
|
|
673
|
-
case
|
|
670
|
+
case 5:
|
|
674
671
|
queryReplaceCount(_defineProperty({}, type, value), templateDetail);
|
|
675
672
|
// TODO: ERP不走订单反弹逻辑
|
|
676
673
|
if ((type === 'tradeId' || type === 'enterprisePaymentTid') && !isErpUse) {
|
|
677
674
|
changeHandle(value);
|
|
678
675
|
}
|
|
679
|
-
case
|
|
676
|
+
case 7:
|
|
680
677
|
case "end":
|
|
681
678
|
return _context3.stop();
|
|
682
679
|
}
|
|
@@ -691,7 +688,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
691
688
|
setShopId(val);
|
|
692
689
|
// 清空表单字段
|
|
693
690
|
var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
|
|
694
|
-
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_SYSTEM_ORDER', 'WDT_REISSUE_GOODS'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
691
|
+
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_SYSTEM_ORDER', 'WDT_REISSUE_GOODS', 'WDT_RETURN_GOODS', 'WDT_EXCHANGE_GOODS'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
695
692
|
cur.push(nxt === null || nxt === void 0 ? void 0 : nxt.uniqueKey);
|
|
696
693
|
}
|
|
697
694
|
return cur;
|
|
@@ -759,13 +756,17 @@ var FormRender = function FormRender(props, ref) {
|
|
|
759
756
|
var allValue = form.getFieldsValue();
|
|
760
757
|
var tradeIdUniqueKey = hasComponent(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'TRADE_ID_INPUT');
|
|
761
758
|
var paymentUniqueKey = hasComponent(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'ENTERPRISE_PAYMENT');
|
|
759
|
+
if (tradeIdUniqueKey) {
|
|
760
|
+
var tradeValue = allValue[tradeIdUniqueKey];
|
|
761
|
+
queryLabels(tradeValue, val);
|
|
762
|
+
}
|
|
762
763
|
if (tradeIdUniqueKey || paymentUniqueKey) {
|
|
763
764
|
var _allValue;
|
|
764
|
-
var
|
|
765
|
+
var _tradeValue = allValue[tradeIdUniqueKey];
|
|
765
766
|
var paymentValue = (_allValue = allValue[paymentUniqueKey]) === null || _allValue === void 0 ? void 0 : _allValue.enterprisePaymentTid;
|
|
766
|
-
if (
|
|
767
|
+
if (_tradeValue || paymentValue) {
|
|
767
768
|
orderBack({
|
|
768
|
-
order_no:
|
|
769
|
+
order_no: _tradeValue || paymentValue,
|
|
769
770
|
form: form,
|
|
770
771
|
shopId: val,
|
|
771
772
|
shopList: shopList,
|
|
@@ -793,7 +794,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
793
794
|
});
|
|
794
795
|
};
|
|
795
796
|
var conditionItemResult = function conditionItemResult(item, getFieldValue) {
|
|
796
|
-
var _item$leftValue$split, _item$leftValue$split2, _item$compareSymbol;
|
|
797
|
+
var _item$leftValue$split, _item$leftValue$split2, _dependenceDetail2, _item$compareSymbol, _item$compareSymbol2;
|
|
797
798
|
//现支持子组件控制显隐,格式为${uniqueKey}_${type}与普通组件做区分
|
|
798
799
|
var isChildField = item.leftValue.includes('_');
|
|
799
800
|
var prefixId = isChildField ? (_item$leftValue$split = item.leftValue.split('_')) === null || _item$leftValue$split === void 0 ? void 0 : _item$leftValue$split[0] : item.leftValue;
|
|
@@ -816,7 +817,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
816
817
|
if (Reflect.has(currentComponentDisplayStatus.current, prefixId) && !currentComponentDisplayStatus.current[prefixId]) {
|
|
817
818
|
return false;
|
|
818
819
|
}
|
|
819
|
-
|
|
820
|
+
console.debug('显影计算', (_dependenceDetail2 = dependenceDetail) === null || _dependenceDetail2 === void 0 ? void 0 : _dependenceDetail2.type, leftValue, (_item$compareSymbol = item.compareSymbol) === null || _item$compareSymbol === void 0 ? void 0 : _item$compareSymbol.toUpperCase(), item.rightValue);
|
|
821
|
+
return getExpression((_item$compareSymbol2 = item.compareSymbol) === null || _item$compareSymbol2 === void 0 ? void 0 : _item$compareSymbol2.toUpperCase(), leftValue, item.rightValue);
|
|
820
822
|
};
|
|
821
823
|
var getDisplayAndDisabledConfig = function getDisplayAndDisabledConfig(config) {
|
|
822
824
|
if (isNull(config)) {
|
|
@@ -834,7 +836,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
834
836
|
};
|
|
835
837
|
var newRenderColumnItem = function newRenderColumnItem(effects) {
|
|
836
838
|
return function (item) {
|
|
837
|
-
var
|
|
839
|
+
var _templateDetail$flowT2;
|
|
838
840
|
var _item$componentConfig2 = item.componentConfig,
|
|
839
841
|
componentConfig = _item$componentConfig2 === void 0 ? {} : _item$componentConfig2,
|
|
840
842
|
workOrderComponentType = item.workOrderComponentType,
|
|
@@ -848,7 +850,19 @@ var FormRender = function FormRender(props, ref) {
|
|
|
848
850
|
var newComponentConfig = _objectSpread(_objectSpread({}, componentConfig), {}, {
|
|
849
851
|
disabled: disabled
|
|
850
852
|
});
|
|
851
|
-
var
|
|
853
|
+
var _ref5 = (componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.status) || {},
|
|
854
|
+
upgrade = _ref5.upgrade,
|
|
855
|
+
created = _ref5.created;
|
|
856
|
+
if (['REISSUE_TRADE_ID', 'EXCHANGE_TRADE_ID'].includes(workOrderComponentType)) {
|
|
857
|
+
// 补发单id和换货单id默认值是可见不可编辑(2)
|
|
858
|
+
if (typeof upgrade !== 'number') {
|
|
859
|
+
upgrade = 2;
|
|
860
|
+
}
|
|
861
|
+
if (typeof created !== 'number') {
|
|
862
|
+
created = 2;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
var _getDisplayAndDisable = getDisplayAndDisabledConfig(workOrderId ? upgrade : created),
|
|
852
866
|
componentCanEdit = _getDisplayAndDisable.disabled,
|
|
853
867
|
componentCanShow = _getDisplayAndDisable.display;
|
|
854
868
|
// TODO: 非前置节点组件渲染消费是否可以编辑配置
|
|
@@ -902,8 +916,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
902
916
|
shouldUpdate: function shouldUpdate() {
|
|
903
917
|
return true; // TODO: 修复重复依赖的问题 https://tb.raycloud.com/task/64e4491e0b8b5c001e1099b9
|
|
904
918
|
}
|
|
905
|
-
}, function (
|
|
906
|
-
var getFieldValue =
|
|
919
|
+
}, function (_ref6) {
|
|
920
|
+
var getFieldValue = _ref6.getFieldValue;
|
|
907
921
|
var show = currentIdDependenceOtherFields === null || currentIdDependenceOtherFields === void 0 ? void 0 : currentIdDependenceOtherFields.reduce(function (cur, nxt) {
|
|
908
922
|
// 如果有一项满足展示条件则展示
|
|
909
923
|
if (cur) {
|
|
@@ -1020,10 +1034,10 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1020
1034
|
//如果是初始化创建工单 缓存信息
|
|
1021
1035
|
if (!workOrderId && ['fxg', 'tb', 'ks', 'xiaozhi'].includes(plat.platform)) {
|
|
1022
1036
|
var _tempLateList$find;
|
|
1023
|
-
var
|
|
1037
|
+
var tradeIdUniqueKey = (_tempLateList$find = tempLateList.find(function (item) {
|
|
1024
1038
|
return item.workOrderComponentType === 'TRADE_ID_INPUT';
|
|
1025
1039
|
})) === null || _tempLateList$find === void 0 ? void 0 : _tempLateList$find.uniqueKey;
|
|
1026
|
-
var tradeId = value[
|
|
1040
|
+
var tradeId = value[tradeIdUniqueKey];
|
|
1027
1041
|
if (plat !== null && plat !== void 0 && plat.subOrderNo) {
|
|
1028
1042
|
var cacheOmsOrderInfo = JSON.parse(sessionStorage.getItem('cacheOmsOrderInfo') || '{}');
|
|
1029
1043
|
sessionStorage.setItem('cacheOmsOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, cacheOmsOrderInfo), {}, _defineProperty({}, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, plat === null || plat === void 0 ? void 0 : plat.subOrderNo, value)))));
|
|
@@ -1099,10 +1113,12 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1099
1113
|
style: {
|
|
1100
1114
|
marginBottom: '8px'
|
|
1101
1115
|
}
|
|
1102
|
-
},
|
|
1116
|
+
}, (_Object$keys2 = Object.keys(groupBy(labelList, function (item) {
|
|
1117
|
+
return item.labelShowName;
|
|
1118
|
+
}))) === null || _Object$keys2 === void 0 ? void 0 : _Object$keys2.map(function (labelShowName) {
|
|
1103
1119
|
var _LabelData$getInstanc;
|
|
1104
1120
|
var label = ((_LabelData$getInstanc = LabelData.getInstance().labelData) === null || _LabelData$getInstanc === void 0 ? void 0 : _LabelData$getInstanc.find(function (item) {
|
|
1105
|
-
return item.value ===
|
|
1121
|
+
return item.value === labelShowName;
|
|
1106
1122
|
})) || {};
|
|
1107
1123
|
if (!isNull(label)) return /*#__PURE__*/React.createElement(Tag, {
|
|
1108
1124
|
color: label === null || label === void 0 ? void 0 : label.color
|
|
@@ -26,7 +26,9 @@ var Header = function Header(props) {
|
|
|
26
26
|
_props$showReminder = props.showReminder,
|
|
27
27
|
showReminder = _props$showReminder === void 0 ? false : _props$showReminder,
|
|
28
28
|
handler = props.handler,
|
|
29
|
-
isReminder = props.isReminder
|
|
29
|
+
isReminder = props.isReminder,
|
|
30
|
+
_props$handleLabel = props.handleLabel,
|
|
31
|
+
handleLabel = _props$handleLabel === void 0 ? '处理人' : _props$handleLabel;
|
|
30
32
|
return /*#__PURE__*/React.createElement("div", {
|
|
31
33
|
className: styles.wrap
|
|
32
34
|
}, (NODE_TYPE === null || NODE_TYPE === void 0 ? void 0 : NODE_TYPE[tag]) && /*#__PURE__*/React.createElement("div", {
|
|
@@ -34,12 +36,12 @@ var Header = function Header(props) {
|
|
|
34
36
|
}, NODE_TYPE === null || NODE_TYPE === void 0 ? void 0 : (_NODE_TYPE$tag2 = NODE_TYPE[tag]) === null || _NODE_TYPE$tag2 === void 0 ? void 0 : _NODE_TYPE$tag2.label), /*#__PURE__*/React.createElement(Tooltip, {
|
|
35
37
|
title: /*#__PURE__*/React.createElement("span", {
|
|
36
38
|
className: "spanWrap"
|
|
37
|
-
}, "".concat(nodeName, " ").concat(handler ? "(
|
|
39
|
+
}, "".concat(nodeName, " ").concat(handler ? "(".concat(handleLabel, ": ").concat(handler, ")") : ''))
|
|
38
40
|
}, /*#__PURE__*/React.createElement("span", {
|
|
39
41
|
className: styles.nodeName
|
|
40
42
|
}, /*#__PURE__*/React.createElement("span", null, nodeName), handler && /*#__PURE__*/React.createElement("span", {
|
|
41
43
|
className: styles.handler
|
|
42
|
-
}, "(
|
|
44
|
+
}, "(".concat(handleLabel, ": ").concat(handler, ")")))), /*#__PURE__*/React.createElement("div", {
|
|
43
45
|
className: styles.loadingWrap
|
|
44
46
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
45
47
|
spinning: loading,
|
|
@@ -266,7 +266,8 @@ var NodeItem = function NodeItem(props) {
|
|
|
266
266
|
loading: loading,
|
|
267
267
|
handler: isArtificialNode ? handler : '',
|
|
268
268
|
showWithdraw: showWithdraw,
|
|
269
|
-
showReminder: false
|
|
269
|
+
showReminder: false,
|
|
270
|
+
handleLabel: '完成人'
|
|
270
271
|
}), /*#__PURE__*/React.createElement("div", {
|
|
271
272
|
style: {
|
|
272
273
|
display: open ? 'block' : 'none',
|
|
@@ -1,5 +1,8 @@
|
|
|
1
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
|
+
var _excluded = ["shopId"];
|
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
3
6
|
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; }
|
|
4
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -15,7 +18,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
15
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; } }
|
|
16
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
20
|
import React, { useEffect, useState, useRef, useMemo } from 'react';
|
|
18
|
-
import { Timeline, ConfigProvider, Form, message, Alert, Button, Spin, Row, Col } from 'antd';
|
|
21
|
+
import { Timeline, ConfigProvider, Form, message, Alert, Button, Spin, Row, Col, Popover } from 'antd';
|
|
19
22
|
import { get, find, isEmpty } from 'lodash';
|
|
20
23
|
import { useDispatch, useSelector, Provider, batch } from 'react-redux';
|
|
21
24
|
import store from "../model/store";
|
|
@@ -40,8 +43,9 @@ import RemarkModal from "./components/RemarkModal";
|
|
|
40
43
|
import WithdrawModal from "./components/WithdrawModal";
|
|
41
44
|
import SubmitRemindModal from "./components/SubmitRemindModal";
|
|
42
45
|
import { useSignal } from "../hooks/useSignal";
|
|
43
|
-
import { verifyHandle, submitParams, FLOW_STATUS_V2, getTag, currentUserHasOperatorAuth } from "./common";
|
|
46
|
+
import { verifyHandle, submitParams, FLOW_STATUS_V2, getTag, currentUserHasOperatorAuth, CANNOT_BACK_FILL } from "./common";
|
|
44
47
|
import { saveWorkOrder, submitWorkOrder, addRemark, stopWorkOrder, closeWorkOrder, startWorkOrder, forwardWorkOrder, returnWorkOrder, withDrawWorkOrder, reminder, cancelReminder } from "../model/flowTemplateDetail/api";
|
|
48
|
+
import RenderDetail from "./components/RenderDetail";
|
|
45
49
|
import { orderDetail } from "../model/servers/api";
|
|
46
50
|
import cache from "../common/cache";
|
|
47
51
|
import "./index.less";
|
|
@@ -920,11 +924,14 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
920
924
|
}();
|
|
921
925
|
|
|
922
926
|
// 填充表单
|
|
923
|
-
var handleFillWorkOrder = function handleFillWorkOrder() {
|
|
924
|
-
var
|
|
925
|
-
|
|
927
|
+
var handleFillWorkOrder = function handleFillWorkOrder(details) {
|
|
928
|
+
var _currentNodeRef$curre, _currentNodeRef$curre2;
|
|
929
|
+
//返填去掉店铺返填,防止端上覆盖店铺信息
|
|
930
|
+
var shopId = details.shopId,
|
|
931
|
+
ohter = _objectWithoutProperties(details, _excluded);
|
|
926
932
|
var formData = form.getFieldsValue();
|
|
927
|
-
form.setFieldsValue(_objectSpread(_objectSpread({}, formData),
|
|
933
|
+
form.setFieldsValue(_objectSpread(_objectSpread({}, formData), ohter));
|
|
934
|
+
message.success('填充成功');
|
|
928
935
|
// 填充表单后触发映射
|
|
929
936
|
(_currentNodeRef$curre = currentNodeRef.current) === null || _currentNodeRef$curre === void 0 ? void 0 : (_currentNodeRef$curre2 = _currentNodeRef$curre.batchFillByMapping) === null || _currentNodeRef$curre2 === void 0 ? void 0 : _currentNodeRef$curre2.call(_currentNodeRef$curre, form.getFieldsValue());
|
|
930
937
|
};
|
|
@@ -958,21 +965,21 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
958
965
|
dispatch(setPlat(plat));
|
|
959
966
|
}, [plat]);
|
|
960
967
|
useEffect(function () {
|
|
961
|
-
var _currentNodeDetail$
|
|
962
|
-
if (autoSubmit && !isNull(currentNodeDetail) && flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
968
|
+
var _currentNodeDetail$wo23;
|
|
969
|
+
if (autoSubmit && !isNull(currentNodeDetail) && flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo23 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo23 === void 0 ? void 0 : _currentNodeDetail$wo23.flowWorkOrderId)) {
|
|
963
970
|
setTimeout(function () {
|
|
964
971
|
handleSubmit();
|
|
965
972
|
}, 0);
|
|
966
973
|
}
|
|
967
974
|
}, [currentNodeDetail]);
|
|
968
975
|
var isCurrentNodeHandler = useMemo(function () {
|
|
969
|
-
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$
|
|
976
|
+
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$wo24, _currentNodeDetail$no17, _currentNodeDetail$no18;
|
|
970
977
|
return currentUserHasOperatorAuth({
|
|
971
978
|
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] || [],
|
|
972
979
|
currentUserKey: plat.userKey,
|
|
973
980
|
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) || [],
|
|
974
981
|
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,
|
|
975
|
-
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
982
|
+
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo24 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo24 === void 0 ? void 0 : _currentNodeDetail$wo24.handlerList) || [],
|
|
976
983
|
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
|
|
977
984
|
});
|
|
978
985
|
}, [currentNodeDetail, plat, assistantMap]);
|
|
@@ -980,6 +987,38 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
980
987
|
var _currentNodeDetail$no19, _currentNodeDetail$no20;
|
|
981
988
|
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);
|
|
982
989
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopId;
|
|
990
|
+
var ReportOrderRender = function ReportOrderRender(props) {
|
|
991
|
+
var _currentNodeDetail$wo25, _currentNodeDetail$wo26;
|
|
992
|
+
var details = props.details;
|
|
993
|
+
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo25 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo25 === void 0 ? void 0 : _currentNodeDetail$wo25.componentDtoList.filter(function (t) {
|
|
994
|
+
return !CANNOT_BACK_FILL.includes(t.workOrderComponentType || '');
|
|
995
|
+
});
|
|
996
|
+
//获取可以返填的组件值
|
|
997
|
+
var _calcWorkOrderList = calcWorkOrderList([details], componentDtoList),
|
|
998
|
+
_calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
|
|
999
|
+
transData = _calcWorkOrderList2[0];
|
|
1000
|
+
//获取表单显示值
|
|
1001
|
+
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo26 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo26 === void 0 ? void 0 : _currentNodeDetail$wo26.componentDtoList),
|
|
1002
|
+
_calcWorkOrderList4 = _slicedToArray(_calcWorkOrderList3, 1),
|
|
1003
|
+
transDataall = _calcWorkOrderList4[0];
|
|
1004
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1005
|
+
style: {
|
|
1006
|
+
height: '50vh',
|
|
1007
|
+
maxWidth: '800px',
|
|
1008
|
+
overflow: 'auto'
|
|
1009
|
+
}
|
|
1010
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
1011
|
+
type: "link",
|
|
1012
|
+
onClick: function onClick() {
|
|
1013
|
+
return handleFillWorkOrder(transData);
|
|
1014
|
+
}
|
|
1015
|
+
}, "\u7ACB\u5373\u586B\u5145"), details.flowWorkOrderId, /*#__PURE__*/React.createElement(RenderDetail, {
|
|
1016
|
+
workOrderTemplateInfo: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
|
|
1017
|
+
transData: transDataall,
|
|
1018
|
+
platform: plat.platform,
|
|
1019
|
+
onOpenWangWang: onOpenWangWang
|
|
1020
|
+
}));
|
|
1021
|
+
};
|
|
983
1022
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
984
1023
|
spinning: loading
|
|
985
1024
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1014,12 +1053,16 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1014
1053
|
}, /*#__PURE__*/React.createElement(Alert, {
|
|
1015
1054
|
type: "warning",
|
|
1016
1055
|
showIcon: true,
|
|
1017
|
-
description: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "1.\u8BE5\u7B14\u8BA2\u5355\u5DF2\u7ECF\u521B\u5EFA\u8FC7", currentTradeIdLinkWorkOrderId.total, "\u7B14\u5DE5\u5355"), /*#__PURE__*/React.createElement("
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1056
|
+
description: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "1.\u8BE5\u7B14\u8BA2\u5355\u5DF2\u7ECF\u521B\u5EFA\u8FC7", currentTradeIdLinkWorkOrderId.total, "\u7B14\u5DE5\u5355"), /*#__PURE__*/React.createElement("div", null, currentTradeIdLinkWorkOrderId.workOrderList.map(function (item) {
|
|
1057
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
1058
|
+
content: /*#__PURE__*/React.createElement(ReportOrderRender, {
|
|
1059
|
+
details: item
|
|
1060
|
+
})
|
|
1061
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
1062
|
+
type: "link"
|
|
1063
|
+
}, item.flowWorkOrderId));
|
|
1064
|
+
})))
|
|
1065
|
+
})), /*#__PURE__*/React.createElement(Timeline, null, flowRecordList.map(function (flowRecord, index) {
|
|
1023
1066
|
var canWithdraw = currentNodeCanWithdraw(index) && !readonly;
|
|
1024
1067
|
return /*#__PURE__*/React.createElement(Timeline.Item, null, /*#__PURE__*/React.createElement(NodeItem, {
|
|
1025
1068
|
flowTemplateId: flowTemplateId,
|
|
@@ -21,7 +21,7 @@ import { get, every, maxBy } from 'lodash';
|
|
|
21
21
|
import V from 'voca';
|
|
22
22
|
import { orderDetail, jstOrderDetail, bsOrderDetail, wlnOrderDetail, wdtOrderDetail } from "../../model/servers/api";
|
|
23
23
|
import moment from 'moment';
|
|
24
|
-
import { AddressData, ExpressData, ExpressInterceptData, orderBackFormValues, bsOrderBackFormValues, wlnOrderBackFormValues, wdtOrderBackFormValues, findLabelBySelectValue, request, isNull, bsOrderTransform, wlnOrderTransform, wdtOrderTransform, unTransField } from '@kmkf-fe-packages/kmkf-utils';
|
|
24
|
+
import { AddressData, ExpressData, ExpressInterceptData, orderBackFormValues, bsOrderBackFormValues, wlnOrderBackFormValues, wdtOrderBackFormValues, findLabelBySelectValue, request, isNull, bsOrderTransform, wlnOrderTransform, wdtOrderTransform, filterWdtOrders, unTransField } from '@kmkf-fe-packages/kmkf-utils';
|
|
25
25
|
import { cloneDeep, isEqual, set } from 'lodash';
|
|
26
26
|
import Monitor from 'kmkf-monitor';
|
|
27
27
|
import { PlatForm } from "../../model/flowTemplateDetail/types";
|
|
@@ -926,6 +926,18 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
926
926
|
name: item.name
|
|
927
927
|
});
|
|
928
928
|
}
|
|
929
|
+
} else if (item.workOrderComponentType === 'WDT_EXCHANGE_GOODS') {
|
|
930
|
+
var wdtExchange = get(nowData, "".concat(item.uniqueKey), {});
|
|
931
|
+
contentVoList.push({
|
|
932
|
+
uniqueKey: "".concat(item.uniqueKey, "_wdtExchangeGoods"),
|
|
933
|
+
content: wdtExchange === null || wdtExchange === void 0 ? void 0 : wdtExchange.wdtExchangeGoods,
|
|
934
|
+
name: item.name
|
|
935
|
+
});
|
|
936
|
+
contentVoList.push({
|
|
937
|
+
uniqueKey: "".concat(item.uniqueKey, "_shopCode"),
|
|
938
|
+
content: (wdtExchange === null || wdtExchange === void 0 ? void 0 : wdtExchange.shopCode) || '',
|
|
939
|
+
name: item.name
|
|
940
|
+
});
|
|
929
941
|
} else if (['BS_REISSUE_GOODS', 'WDT_REISSUE_GOODS'].includes(item.workOrderComponentType)) {
|
|
930
942
|
var reissueMap = {
|
|
931
943
|
BS_REISSUE_GOODS: {
|
|
@@ -963,21 +975,34 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
963
975
|
name: item.name
|
|
964
976
|
});
|
|
965
977
|
}
|
|
966
|
-
} else if (item.workOrderComponentType
|
|
967
|
-
var
|
|
978
|
+
} else if (['BS_RETURN_GOODS', 'WDT_RETURN_GOODS'].includes(item.workOrderComponentType)) {
|
|
979
|
+
var currentReturn = get(nowData, "".concat(item.uniqueKey), {});
|
|
980
|
+
var compType = item.workOrderComponentType;
|
|
981
|
+
var returnGoodsMap = {
|
|
982
|
+
BS_RETURN_GOODS: {
|
|
983
|
+
returnTypeKey: 'bsReturnType',
|
|
984
|
+
returnGoodsKey: 'bsReturnGoods',
|
|
985
|
+
shopCodeKey: 'shopCode'
|
|
986
|
+
},
|
|
987
|
+
WDT_RETURN_GOODS: {
|
|
988
|
+
returnTypeKey: 'wdtReturnType',
|
|
989
|
+
returnGoodsKey: 'wdtReturnGoods',
|
|
990
|
+
shopCodeKey: 'shopCode'
|
|
991
|
+
}
|
|
992
|
+
};
|
|
968
993
|
contentVoList.push({
|
|
969
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
970
|
-
content:
|
|
994
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(returnGoodsMap[compType].returnTypeKey),
|
|
995
|
+
content: currentReturn === null || currentReturn === void 0 ? void 0 : currentReturn[returnGoodsMap[compType].returnTypeKey],
|
|
971
996
|
name: item.name
|
|
972
997
|
});
|
|
973
998
|
contentVoList.push({
|
|
974
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
975
|
-
content:
|
|
999
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(returnGoodsMap[compType].returnGoodsKey),
|
|
1000
|
+
content: currentReturn === null || currentReturn === void 0 ? void 0 : currentReturn[returnGoodsMap[compType].returnGoodsKey],
|
|
976
1001
|
name: item.name
|
|
977
1002
|
});
|
|
978
1003
|
contentVoList.push({
|
|
979
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
980
|
-
content: (
|
|
1004
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(returnGoodsMap[compType].shopCodeKey),
|
|
1005
|
+
content: (currentReturn === null || currentReturn === void 0 ? void 0 : currentReturn[returnGoodsMap[compType].shopCodeKey]) || '',
|
|
981
1006
|
name: item.name
|
|
982
1007
|
});
|
|
983
1008
|
} else if (item.workOrderComponentType === 'BS_POSTING') {
|
|
@@ -1375,10 +1400,9 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1375
1400
|
flag: item.jsonMap["".concat(nex.uniqueKey, "_bsFlag")]
|
|
1376
1401
|
}));
|
|
1377
1402
|
} else if (nex.workOrderComponentType === 'REISSUE_LOGISTICS') {
|
|
1378
|
-
var _itemList6 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_reissueLogisticsList")], [
|
|
1379
|
-
logisticsCompany: null,
|
|
1380
|
-
|
|
1381
|
-
}]);
|
|
1403
|
+
var _itemList6 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_reissueLogisticsList")], [
|
|
1404
|
+
// { logisticsCompany: null, logisticsCode: null },
|
|
1405
|
+
]);
|
|
1382
1406
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList6));
|
|
1383
1407
|
} else if (['REISSUE_STATUS', 'ADJUST_WORK_ORDER_STATUS', 'CREATE_STATUS', 'INVOICE_STATUS', 'INVOICING_STATUS'].includes(nex.workOrderComponentType)) {
|
|
1384
1408
|
var STATUS_MAP = {
|
|
@@ -1414,11 +1438,7 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1414
1438
|
WAREHOUSING_STATUS: 'inStockStatusItemList',
|
|
1415
1439
|
MSG_STATUS: 'msgStatusValues'
|
|
1416
1440
|
};
|
|
1417
|
-
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(STATUS_LIST_MAP[nex.workOrderComponentType])], [
|
|
1418
|
-
status: undefined,
|
|
1419
|
-
reason: '',
|
|
1420
|
-
systemOrderId: ''
|
|
1421
|
-
}])));
|
|
1441
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(STATUS_LIST_MAP[nex.workOrderComponentType])], [])));
|
|
1422
1442
|
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS', 'WDT_LOGISTICS'].includes(nex.workOrderComponentType)) {
|
|
1423
1443
|
var LogisticsMap = {
|
|
1424
1444
|
BS_LOGISTICS: {
|
|
@@ -1534,12 +1554,27 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1534
1554
|
bsExchangeGiftGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsExchangeGiftGoods")], []),
|
|
1535
1555
|
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1536
1556
|
}));
|
|
1537
|
-
} else if (nex.workOrderComponentType === '
|
|
1557
|
+
} else if (nex.workOrderComponentType === 'WDT_EXCHANGE_GOODS') {
|
|
1538
1558
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
1539
|
-
|
|
1540
|
-
bsReturnGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsReturnGoods")], []),
|
|
1559
|
+
wdtExchangeGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wdtExchangeGoods")], []),
|
|
1541
1560
|
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1542
1561
|
}));
|
|
1562
|
+
} else if (['BS_RETURN_GOODS', 'WDT_RETURN_GOODS'].includes(nex.workOrderComponentType)) {
|
|
1563
|
+
var _$concat2;
|
|
1564
|
+
var compType = nex.workOrderComponentType;
|
|
1565
|
+
var returnGoodsMap = {
|
|
1566
|
+
BS_RETURN_GOODS: {
|
|
1567
|
+
returnTypeKey: 'bsReturnType',
|
|
1568
|
+
returnGoodsKey: 'bsReturnGoods',
|
|
1569
|
+
shopCodeKey: 'shopCode'
|
|
1570
|
+
},
|
|
1571
|
+
WDT_RETURN_GOODS: {
|
|
1572
|
+
returnTypeKey: 'wdtReturnType',
|
|
1573
|
+
returnGoodsKey: 'wdtReturnGoods',
|
|
1574
|
+
shopCodeKey: 'shopCode'
|
|
1575
|
+
}
|
|
1576
|
+
};
|
|
1577
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), (_$concat2 = {}, _defineProperty(_$concat2, returnGoodsMap[compType].returnTypeKey, jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnTypeKey)], [])), _defineProperty(_$concat2, returnGoodsMap[compType].returnGoodsKey, jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnGoodsKey)], [])), _defineProperty(_$concat2, returnGoodsMap[compType].shopCodeKey, item.jsonMap["".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].shopCodeKey)]), _$concat2)));
|
|
1543
1578
|
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER'].includes(nex.workOrderComponentType)) {
|
|
1544
1579
|
var systemOrderMap = {
|
|
1545
1580
|
BS_SYSTEM_ORDER: {
|
|
@@ -1577,24 +1612,17 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1577
1612
|
},
|
|
1578
1613
|
RETURN_GOODS_TRADE_ID: {
|
|
1579
1614
|
key: 'returnGoodsTradeItemList',
|
|
1580
|
-
defaultValue: [
|
|
1581
|
-
|
|
1582
|
-
systemOrderId: ''
|
|
1583
|
-
}]
|
|
1615
|
+
defaultValue: []
|
|
1616
|
+
// defaultValue: [{ returnGoodsTradeId: '', systemOrderId: '' }],
|
|
1584
1617
|
},
|
|
1618
|
+
|
|
1585
1619
|
REISSUE_TRADE_ID: {
|
|
1586
1620
|
key: 'tradeItemList',
|
|
1587
|
-
defaultValue: [
|
|
1588
|
-
billNo: '',
|
|
1589
|
-
tradeId: ''
|
|
1590
|
-
}]
|
|
1621
|
+
defaultValue: []
|
|
1591
1622
|
},
|
|
1592
1623
|
EXCHANGE_TRADE_ID: {
|
|
1593
1624
|
key: 'tradeItemList',
|
|
1594
|
-
defaultValue: [
|
|
1595
|
-
billNo: '',
|
|
1596
|
-
tradeId: ''
|
|
1597
|
-
}]
|
|
1625
|
+
defaultValue: []
|
|
1598
1626
|
}
|
|
1599
1627
|
};
|
|
1600
1628
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(SYSTEM_ORDER_MAP[nex.workOrderComponentType].key)], SYSTEM_ORDER_MAP[nex.workOrderComponentType].defaultValue)));
|
|
@@ -1611,8 +1639,8 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1611
1639
|
wdtSystemOrderNo: item.jsonMap["".concat(nex.uniqueKey, "_wdtSystemOrderNo")]
|
|
1612
1640
|
}));
|
|
1613
1641
|
} else if (nex.workOrderComponentType === 'LABEL') {
|
|
1614
|
-
var
|
|
1615
|
-
return _objectSpread(_objectSpread({}, cur), {}, (
|
|
1642
|
+
var _objectSpread55;
|
|
1643
|
+
return _objectSpread(_objectSpread({}, cur), {}, (_objectSpread55 = {}, _defineProperty(_objectSpread55, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_label")], [])), _defineProperty(_objectSpread55, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_label")], [])), _objectSpread55));
|
|
1616
1644
|
}
|
|
1617
1645
|
}, {});
|
|
1618
1646
|
};
|
|
@@ -1634,7 +1662,7 @@ export var calcWorkOrderList = function calcWorkOrderList(source, templateColumn
|
|
|
1634
1662
|
//订单返填
|
|
1635
1663
|
export var orderBack = /*#__PURE__*/function () {
|
|
1636
1664
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
1637
|
-
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWdt, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsOrders$orders, _wlnOrders$orders, _wdtOrders$trades, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, wdtOrder, orderInfo, jstInfo, bsOrders, wlnOrders, wdtOrders, bsInfo, wlnInfo, wdtInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo,
|
|
1665
|
+
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWdt, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsOrders$orders, _wlnOrders$orders, _wdtOrders$trades, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, wdtOrder, orderInfo, jstInfo, bsOrders, wlnOrders, wdtOrders, bsInfo, wlnInfo, wdtInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread57, _cacheOrderInfo;
|
|
1638
1666
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1639
1667
|
while (1) switch (_context.prev = _context.next) {
|
|
1640
1668
|
case 0:
|
|
@@ -1739,6 +1767,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1739
1767
|
bsOrders = (bsOrder === null || bsOrder === void 0 ? void 0 : (_bsOrder$value = bsOrder.value) === null || _bsOrder$value === void 0 ? void 0 : _bsOrder$value.data) || {};
|
|
1740
1768
|
wlnOrders = (wlnOrder === null || wlnOrder === void 0 ? void 0 : (_wlnOrder$value = wlnOrder.value) === null || _wlnOrder$value === void 0 ? void 0 : _wlnOrder$value.data) || {};
|
|
1741
1769
|
wdtOrders = (wdtOrder === null || wdtOrder === void 0 ? void 0 : (_wdtOrder$value = wdtOrder.value) === null || _wdtOrder$value === void 0 ? void 0 : _wdtOrder$value.data) || {};
|
|
1770
|
+
wdtOrders.trades = filterWdtOrders(wdtOrders, order_no);
|
|
1742
1771
|
Monitor.automaticReport({
|
|
1743
1772
|
message: "orderBack:\u8BA2\u5355\u53F7:".concat(order_no, ",\u5E97\u94FAid:").concat(shopId, ", \u8BA2\u5355\u4FE1\u606F\uFF1A").concat(JSON.stringify(orderInfo), ",jst\u4FE1\u606F:").concat(JSON.stringify(jstInfo), ",bs\u4FE1\u606F:").concat(JSON.stringify(bsOrders), ",wln\u4FE1\u606F:").concat(JSON.stringify(wlnOrders), ",wdt\u4FE1\u606F:").concat(JSON.stringify(wdtOrders))
|
|
1744
1773
|
});
|
|
@@ -1748,8 +1777,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1748
1777
|
});
|
|
1749
1778
|
}
|
|
1750
1779
|
bsInfo = bsOrderTransform(bsOrders || {});
|
|
1751
|
-
wlnInfo = wlnOrderTransform(wlnOrders || {});
|
|
1752
|
-
wdtInfo = wdtOrderTransform(wdtOrders
|
|
1780
|
+
wlnInfo = wlnOrderTransform(wlnOrders || {}); // const wdtInfo = wdtOrderTransform(wdtOrders || {});
|
|
1781
|
+
wdtInfo = wdtOrderTransform(_objectSpread(_objectSpread({}, wdtOrders), {}, {
|
|
1782
|
+
componentList: templateDetail.componentDtoList
|
|
1783
|
+
}), form, order_no);
|
|
1753
1784
|
if ((bsOrders === null || bsOrders === void 0 ? void 0 : (_bsOrders$orders = bsOrders.orders) === null || _bsOrders$orders === void 0 ? void 0 : _bsOrders$orders.length) > 1) {
|
|
1754
1785
|
bsInfo.bsGoods = _objectSpread(_objectSpread({}, bsInfo.bsGoods), {}, {
|
|
1755
1786
|
bsGoods: []
|
|
@@ -1811,7 +1842,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1811
1842
|
hasSelectItem = HasErpItemSelectHandle(templateDetail);
|
|
1812
1843
|
erpPromiseList = [];
|
|
1813
1844
|
if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
|
|
1814
|
-
_context.next =
|
|
1845
|
+
_context.next = 57;
|
|
1815
1846
|
break;
|
|
1816
1847
|
}
|
|
1817
1848
|
list = detail['itemList'];
|
|
@@ -1829,10 +1860,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1829
1860
|
resolve({});
|
|
1830
1861
|
});
|
|
1831
1862
|
});
|
|
1832
|
-
_context.prev =
|
|
1833
|
-
_context.next =
|
|
1863
|
+
_context.prev = 47;
|
|
1864
|
+
_context.next = 50;
|
|
1834
1865
|
return Promise.all(promises);
|
|
1835
|
-
case
|
|
1866
|
+
case 50:
|
|
1836
1867
|
erpPromiseList = _context.sent;
|
|
1837
1868
|
detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
|
|
1838
1869
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -1842,13 +1873,13 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1842
1873
|
})
|
|
1843
1874
|
});
|
|
1844
1875
|
});
|
|
1845
|
-
_context.next =
|
|
1876
|
+
_context.next = 57;
|
|
1846
1877
|
break;
|
|
1847
|
-
case
|
|
1848
|
-
_context.prev =
|
|
1849
|
-
_context.t0 = _context["catch"](
|
|
1878
|
+
case 54:
|
|
1879
|
+
_context.prev = 54;
|
|
1880
|
+
_context.t0 = _context["catch"](47);
|
|
1850
1881
|
console.error('调用erp获取宝贝编码错误', _context.t0);
|
|
1851
|
-
case
|
|
1882
|
+
case 57:
|
|
1852
1883
|
// console.log('detail', detail);
|
|
1853
1884
|
values = orderBackFormValues({
|
|
1854
1885
|
detail: detail,
|
|
@@ -1873,23 +1904,23 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1873
1904
|
sessionStorage.setItem('cacheOmsOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, cacheOrderInfo), {}, _defineProperty({}, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, plat === null || plat === void 0 ? void 0 : plat.subOrderNo, _objectSpread(_objectSpread({}, formValue), values))))));
|
|
1874
1905
|
} else {
|
|
1875
1906
|
_cacheOrderInfo = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
1876
|
-
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (
|
|
1907
|
+
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (_objectSpread57 = {}, _defineProperty(_objectSpread57, order_no, values), _defineProperty(_objectSpread57, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, order_no, _objectSpread(_objectSpread({}, formValue), values))), _objectSpread57))));
|
|
1877
1908
|
}
|
|
1878
1909
|
}
|
|
1879
1910
|
// console.log('orderback', values);
|
|
1880
1911
|
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), values));
|
|
1881
1912
|
callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
|
|
1882
|
-
_context.next =
|
|
1913
|
+
_context.next = 66;
|
|
1883
1914
|
break;
|
|
1884
|
-
case
|
|
1885
|
-
_context.prev =
|
|
1915
|
+
case 63:
|
|
1916
|
+
_context.prev = 63;
|
|
1886
1917
|
_context.t1 = _context["catch"](8);
|
|
1887
1918
|
console.error(_context.t1);
|
|
1888
|
-
case
|
|
1919
|
+
case 66:
|
|
1889
1920
|
case "end":
|
|
1890
1921
|
return _context.stop();
|
|
1891
1922
|
}
|
|
1892
|
-
}, _callee, null, [[8,
|
|
1923
|
+
}, _callee, null, [[8, 63], [47, 54]]);
|
|
1893
1924
|
}));
|
|
1894
1925
|
return function orderBack(_x) {
|
|
1895
1926
|
return _ref2.apply(this, arguments);
|
|
@@ -2194,6 +2225,8 @@ export var reversalFormValues = function reversalFormValues() {
|
|
|
2194
2225
|
case 'BS_EXCHANGE_GOODS':
|
|
2195
2226
|
case 'BS_RETURN_GOODS':
|
|
2196
2227
|
case 'WDT_REISSUE_GOODS':
|
|
2228
|
+
case 'WDT_RETURN_GOODS':
|
|
2229
|
+
case 'WDT_EXCHANGE_GOODS':
|
|
2197
2230
|
prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
|
|
2198
2231
|
break;
|
|
2199
2232
|
case 'BS_DELIVERY_NO':
|
|
@@ -7,7 +7,7 @@ export declare const setFlowList: import("@reduxjs/toolkit").ActionCreatorWithPa
|
|
|
7
7
|
[nodeId: string]: Assistant[];
|
|
8
8
|
}, "flowTemplateDetail/setNodeAssistantInfo">, setTid: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "flowTemplateDetail/setTid">, setShopUniqueKey: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "flowTemplateDetail/setShopUniqueKey">, setRemarkList: import("@reduxjs/toolkit").ActionCreatorWithPayload<Remark[], "flowTemplateDetail/setRemarkList">, setCurrentNode: import("@reduxjs/toolkit").ActionCreatorWithPayload<CurrentNodeDetail, "flowTemplateDetail/setCurrentNode">, setAction: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<ActionType, "flowTemplateDetail/setAction">, setVisibleRemarkList: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "flowTemplateDetail/setVisibleRemarkList">, setPlat: import("@reduxjs/toolkit").ActionCreatorWithPayload<PlatFormInfo, "flowTemplateDetail/setPlat">, setOperateParams: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "flowTemplateDetail/setOperateParams">, setAddRemarkVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "flowTemplateDetail/setAddRemarkVisible">, setFlowStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<FlowStatus, "flowTemplateDetail/setFlowStatus">, setCurrentTradeIdWOrkOrderNumber: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
9
9
|
total: number;
|
|
10
|
-
|
|
10
|
+
workOrderList: 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
13
|
}, "flowTemplateDetail/setWithdrawWorkOrderDetail">, setFlowTemplateType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "flowTemplateDetail/setFlowTemplateType">, setLabelList: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "flowTemplateDetail/setLabelList">, clearLabelList: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"flowTemplateDetail/clearLabelList">;
|
|
@@ -32,7 +32,7 @@ export var initialState = {
|
|
|
32
32
|
flowTemplateId: undefined,
|
|
33
33
|
currentTradeIdLinkWorkOrder: {
|
|
34
34
|
total: 0,
|
|
35
|
-
|
|
35
|
+
workOrderList: undefined
|
|
36
36
|
},
|
|
37
37
|
currentFlowAllShowHideRules: {},
|
|
38
38
|
withdrawWorkOrderDetail: {
|
|
@@ -46,7 +46,7 @@ export var initialState = {
|
|
|
46
46
|
export var fetchPanelInfo = function fetchPanelInfo(params, options) {
|
|
47
47
|
return /*#__PURE__*/function () {
|
|
48
48
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) {
|
|
49
|
-
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;
|
|
49
|
+
var res, _res$data, _res$data$flowRecordL, _res$data$flowRecordL2, _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;
|
|
50
50
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
51
51
|
while (1) switch (_context.prev = _context.next) {
|
|
52
52
|
case 0:
|
|
@@ -60,7 +60,9 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
|
|
|
60
60
|
_context.next = 17;
|
|
61
61
|
break;
|
|
62
62
|
}
|
|
63
|
-
recordList = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$flowRecordL = _res$data.flowRecordList) === null || _res$data$flowRecordL === void 0 ? void 0 : _res$data$flowRecordL.
|
|
63
|
+
recordList = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$flowRecordL = _res$data.flowRecordList) === null || _res$data$flowRecordL === void 0 ? void 0 : (_res$data$flowRecordL2 = _res$data$flowRecordL.filter(function (t) {
|
|
64
|
+
return t.operateType === 'PASS';
|
|
65
|
+
})) === null || _res$data$flowRecordL2 === void 0 ? void 0 : _res$data$flowRecordL2.map(function (item) {
|
|
64
66
|
var tag = 'artificial'; // 人工节点
|
|
65
67
|
// 先判断是什么节点类型 步骤/判断
|
|
66
68
|
if (item.nodeType === NodeType.SWITCH_NODE) {
|
|
@@ -74,7 +76,8 @@ export var fetchPanelInfo = function fetchPanelInfo(params, options) {
|
|
|
74
76
|
nodeName: item.nodeName || '',
|
|
75
77
|
tag: tag,
|
|
76
78
|
operator: item.operator || '',
|
|
77
|
-
nodeIsAuto: item.nodeIsAuto
|
|
79
|
+
nodeIsAuto: item.nodeIsAuto,
|
|
80
|
+
operateType: item.operateType
|
|
78
81
|
};
|
|
79
82
|
}); // TODO: 针对已完结工单 会出现多一个最后节点问题;需要当前节点id和记录列表中最后一条比对,如果相同,则移除记录中最后一条;
|
|
80
83
|
if ((res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : (_res$data2$currentNod = _res$data2.currentNodeDetail) === null || _res$data2$currentNod === void 0 ? void 0 : (_res$data2$currentNod2 = _res$data2$currentNod.nodeInfo) === null || _res$data2$currentNod2 === void 0 ? void 0 : _res$data2$currentNod2.id) === ((_last = last(recordList)) === null || _last === void 0 ? void 0 : _last.nodeId)) {
|
|
@@ -193,7 +196,7 @@ export var fetchAllFlowOperateRecord = function fetchAllFlowOperateRecord(params
|
|
|
193
196
|
export var fetchCurrentTradeIdLinkWorkOrder = function fetchCurrentTradeIdLinkWorkOrder(params) {
|
|
194
197
|
return /*#__PURE__*/function () {
|
|
195
198
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dispatch) {
|
|
196
|
-
var res, _res$data18, _res$data19,
|
|
199
|
+
var res, _res$data18, _res$data19, total, list;
|
|
197
200
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
198
201
|
while (1) switch (_context3.prev = _context3.next) {
|
|
199
202
|
case 0:
|
|
@@ -205,10 +208,10 @@ export var fetchCurrentTradeIdLinkWorkOrder = function fetchCurrentTradeIdLinkWo
|
|
|
205
208
|
res = _context3.sent;
|
|
206
209
|
if (res.success) {
|
|
207
210
|
total = (res === null || res === void 0 ? void 0 : (_res$data18 = res.data) === null || _res$data18 === void 0 ? void 0 : _res$data18.total) || 0;
|
|
208
|
-
|
|
211
|
+
list = (res === null || res === void 0 ? void 0 : (_res$data19 = res.data) === null || _res$data19 === void 0 ? void 0 : _res$data19.list) || [];
|
|
209
212
|
dispatch(setCurrentTradeIdWOrkOrderNumber({
|
|
210
213
|
total: total,
|
|
211
|
-
|
|
214
|
+
workOrderList: list
|
|
212
215
|
}));
|
|
213
216
|
}
|
|
214
217
|
_context3.next = 11;
|
|
@@ -615,10 +615,10 @@ export declare const selectCurrentTradeIdWOrkOrderNumber: ((state: {
|
|
|
615
615
|
flowWOrkOrderDetail: import("./types").FlowTemplateDetailState;
|
|
616
616
|
}) => {
|
|
617
617
|
total: number;
|
|
618
|
-
|
|
618
|
+
workOrderList: any[];
|
|
619
619
|
}) & import("reselect").OutputSelectorFields<(args_0: import("./types").FlowTemplateDetailState) => {
|
|
620
620
|
total: number;
|
|
621
|
-
|
|
621
|
+
workOrderList: any[];
|
|
622
622
|
}, {
|
|
623
623
|
clearCache: () => void;
|
|
624
624
|
}> & {
|
|
@@ -4,6 +4,7 @@ export interface Line {
|
|
|
4
4
|
tag: string;
|
|
5
5
|
operator: string;
|
|
6
6
|
nodeIsAuto: boolean;
|
|
7
|
+
operateType: string;
|
|
7
8
|
}
|
|
8
9
|
export interface Assistant {
|
|
9
10
|
id: string;
|
|
@@ -52,7 +53,7 @@ export interface FlowTemplateDetailState {
|
|
|
52
53
|
flowTemplateId: string | undefined;
|
|
53
54
|
currentTradeIdLinkWorkOrder: {
|
|
54
55
|
total: number;
|
|
55
|
-
|
|
56
|
+
workOrderList: any[];
|
|
56
57
|
};
|
|
57
58
|
currentFlowAllShowHideRules: CurrentFlowShowHideRules;
|
|
58
59
|
withdrawWorkOrderDetail: {
|
|
@@ -89,22 +89,21 @@ export var fetchLogicFlowList = /*#__PURE__*/function () {
|
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
return prv;
|
|
92
|
-
}, []);
|
|
93
|
-
console.log(list);
|
|
92
|
+
}, []); // console.log(list);
|
|
94
93
|
dispatch(setLogicFlowList(list || []));
|
|
95
94
|
dispatch(setGroupLogicFlowList(groupLogicFlowList || []));
|
|
96
95
|
dispatch(setFlowTemplateGroupWorkOrderTemplateList(flowTemplateGroupWOrkOrderTemplateList) || []);
|
|
97
|
-
_context.next =
|
|
96
|
+
_context.next = 17;
|
|
98
97
|
break;
|
|
99
|
-
case
|
|
100
|
-
_context.prev =
|
|
98
|
+
case 14:
|
|
99
|
+
_context.prev = 14;
|
|
101
100
|
_context.t0 = _context["catch"](0);
|
|
102
101
|
console.error(_context.t0);
|
|
103
|
-
case
|
|
102
|
+
case 17:
|
|
104
103
|
case "end":
|
|
105
104
|
return _context.stop();
|
|
106
105
|
}
|
|
107
|
-
}, _callee, null, [[0,
|
|
106
|
+
}, _callee, null, [[0, 14]]);
|
|
108
107
|
}));
|
|
109
108
|
return function fetchLogicFlowList(_x) {
|
|
110
109
|
return _ref.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-rc.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": "1.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "1.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "1.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "1.4.0-rc.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "1.4.0-rc.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "1.4.0-rc.0",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "6ecec78fdd7fa5eb426bf0d8092953a3ecb94b1f",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|