@kmkf-fe-packages/kmkf-work-order-service-component 1.0.9 → 1.0.10-beta.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 -3
- 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 +53 -12
- 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 +54 -16
- package/dist/esm/common/utils/tools.js +18 -6
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- 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/package.json +6 -6
package/README.md
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* @LastEditors: litian
|
|
6
6
|
* @LastEditTime: 2022-11-28 16:45:07
|
|
7
7
|
-->
|
|
8
|
-
|
|
9
8
|
# kmkf-work-order-service-component
|
|
10
9
|
|
|
11
10
|
## Getting Started
|
|
@@ -64,5 +63,4 @@ 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 |
|
|
68
|
-
|
|
66
|
+
| 字段 | 说明 | 数据类型 | | ----------------- | ---------------- | ------------------------------------ | | platform | 平台 | TAOBAO =淘宝\|FXG=抖音\|PDD=拼多多\| | | shopId | 店铺 ID | number | | buyerNick | 买家昵称 | string | | buyerId | 买家 id | string | | orderNo | 订单 id | string | | onEmpowerCallback | 授权弹框点击回调 | function |
|
|
@@ -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,
|
|
@@ -28,7 +28,7 @@ import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle } fro
|
|
|
28
28
|
import 'moment/locale/zh-cn';
|
|
29
29
|
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
|
|
30
30
|
// 重复检验不需要展示在顶部的
|
|
31
|
-
INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo } from "../../../common/utils/tools";
|
|
31
|
+
INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo, COMPONENT_MAP } from "../../../common/utils/tools";
|
|
32
32
|
import { replaceCheck, orderDetail, queryLabelByTradeId } from "../../../model/servers/api";
|
|
33
33
|
import { factory } from '@kmkf-fe-packages/services-components';
|
|
34
34
|
import { getExpression, formatDisplayConfig, isNull, LabelData } from '@kmkf-fe-packages/kmkf-utils';
|
|
@@ -191,7 +191,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
191
191
|
var obj = {};
|
|
192
192
|
Object.keys(params).forEach(function (key) {
|
|
193
193
|
var _params$key;
|
|
194
|
-
if (params[key] && ((_params$key = params[key]) === null || _params$key === void 0 ? void 0 : _params$key.indexOf('*')) > -1) {
|
|
194
|
+
if (params[key] && typeof params[key] === 'string' && ((_params$key = params[key]) === null || _params$key === void 0 ? void 0 : _params$key.indexOf('*')) > -1) {
|
|
195
195
|
obj[key] = 0;
|
|
196
196
|
}
|
|
197
197
|
});
|
|
@@ -450,8 +450,45 @@ var FormRender = function FormRender(props, ref) {
|
|
|
450
450
|
(antFormEl === null || antFormEl === void 0 ? void 0 : antFormEl.length) > 0 && set(antFormEl, '0.scrollTop', 0);
|
|
451
451
|
resetMappdingHideComponents();
|
|
452
452
|
};
|
|
453
|
+
var repeatWarningDataSchema = function repeatWarningDataSchema(formValue, templateDetail) {
|
|
454
|
+
var getKeyByValue = function getKeyByValue(value) {
|
|
455
|
+
return Object.keys(COMPONENT_MAP).find(function (key) {
|
|
456
|
+
return COMPONENT_MAP[key] === value;
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
var needRepeatWarnComponent = Object.values(COMPONENT_MAP);
|
|
460
|
+
return templateDetail.componentDtoList.reduce(function (cur, nxt) {
|
|
461
|
+
if (needRepeatWarnComponent !== null && needRepeatWarnComponent !== void 0 && needRepeatWarnComponent.includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
462
|
+
var instance = factory(nxt.workOrderComponentType, {
|
|
463
|
+
id: nxt.uniqueKey,
|
|
464
|
+
name: nxt.name,
|
|
465
|
+
componentConfig: nxt.componentConfig,
|
|
466
|
+
effects: {},
|
|
467
|
+
type: nxt.workOrderComponentType
|
|
468
|
+
});
|
|
469
|
+
var _id = instance === null || instance === void 0 ? void 0 : instance.id;
|
|
470
|
+
var value = formValue[_id];
|
|
471
|
+
var _key = getKeyByValue(nxt.workOrderComponentType);
|
|
472
|
+
// TODO: 如果是订单号组件, 将值设置为orderNo
|
|
473
|
+
if (nxt.workOrderComponentType === 'TRADE_ID_INPUT') {
|
|
474
|
+
_key = 'orderNo';
|
|
475
|
+
}
|
|
476
|
+
if (_key) {
|
|
477
|
+
cur[_key] = value;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
return cur;
|
|
481
|
+
}, {});
|
|
482
|
+
};
|
|
453
483
|
useEffect(function () {
|
|
454
|
-
if (isErpUse)
|
|
484
|
+
if (isErpUse && templateDetail) {
|
|
485
|
+
var formValue = form.getFieldsValue(true);
|
|
486
|
+
console.debug('表单内容值', formValue);
|
|
487
|
+
// TODO: 拼装需要重复提醒的组件数据格式
|
|
488
|
+
var value = repeatWarningDataSchema(formValue, templateDetail);
|
|
489
|
+
console.debug('重复提醒转换之后数据', value);
|
|
490
|
+
return orderBackReplace(value, templateDetail);
|
|
491
|
+
}
|
|
455
492
|
queryDetail({
|
|
456
493
|
workOrderId: workOrderId,
|
|
457
494
|
shopId: shopId,
|
|
@@ -461,7 +498,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
461
498
|
buyerId: buyerId,
|
|
462
499
|
buyerNick: buyerNick
|
|
463
500
|
});
|
|
464
|
-
}, [workOrderId, record, shopId, isErpUse]);
|
|
501
|
+
}, [workOrderId, record, shopId, isErpUse, templateDetail]);
|
|
465
502
|
|
|
466
503
|
// 重置映射隐藏的组件, 目前只有单选、下拉组件可能会因为映射关系隐藏
|
|
467
504
|
var resetMappdingHideComponents = function resetMappdingHideComponents() {
|
|
@@ -492,8 +529,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
492
529
|
|
|
493
530
|
// 批量映射
|
|
494
531
|
var batchFillByMapping = function batchFillByMapping(values) {
|
|
495
|
-
for (var
|
|
496
|
-
fillByMapping(
|
|
532
|
+
for (var _key2 in values) {
|
|
533
|
+
fillByMapping(_key2, values[_key2]);
|
|
497
534
|
}
|
|
498
535
|
};
|
|
499
536
|
// 组件映射
|
|
@@ -506,8 +543,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
506
543
|
form.setFieldsValue(mapping === null || mapping === void 0 ? void 0 : mapping[triggerValue]);
|
|
507
544
|
} else {
|
|
508
545
|
var resetSet = new Set();
|
|
509
|
-
for (var
|
|
510
|
-
for (var uniqueKey in mapping[
|
|
546
|
+
for (var _key3 in mapping) {
|
|
547
|
+
for (var uniqueKey in mapping[_key3]) {
|
|
511
548
|
resetSet.add(uniqueKey);
|
|
512
549
|
}
|
|
513
550
|
}
|
|
@@ -690,7 +727,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
690
727
|
setShopId(val);
|
|
691
728
|
// 清空表单字段
|
|
692
729
|
var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
|
|
693
|
-
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)) {
|
|
730
|
+
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', 'KM_SEND_GOOD'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
694
731
|
cur.push(nxt === null || nxt === void 0 ? void 0 : nxt.uniqueKey);
|
|
695
732
|
}
|
|
696
733
|
return cur;
|
|
@@ -728,7 +765,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
728
765
|
}
|
|
729
766
|
//如果有bs组件 设置成初始值
|
|
730
767
|
var hasBs = get(templateDetail, 'componentDtoList', []).some(function (item) {
|
|
731
|
-
return ['BS_LOGISTICS', 'BS_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WLN_LOGISTICS', 'WLN_SEND_GOOD'].includes(item.workOrderComponentType);
|
|
768
|
+
return ['BS_LOGISTICS', 'BS_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'KM_SEND_GOOD'].includes(item.workOrderComponentType);
|
|
732
769
|
});
|
|
733
770
|
if (hasBs) {
|
|
734
771
|
var bsValue = get(templateDetail, 'componentDtoList', []).reduce(function (prv, next) {
|
|
@@ -744,6 +781,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
744
781
|
case 'BS_SEND_GOOD':
|
|
745
782
|
case 'WLN_SEND_GOOD':
|
|
746
783
|
case 'WDT_SEND_GOOD':
|
|
784
|
+
case 'KM_SEND_GOOD':
|
|
747
785
|
prv[next.uniqueKey] = [{
|
|
748
786
|
sendName: '',
|
|
749
787
|
sendId: ''
|
|
@@ -792,7 +830,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
792
830
|
});
|
|
793
831
|
};
|
|
794
832
|
var conditionItemResult = function conditionItemResult(item, getFieldValue) {
|
|
795
|
-
var _item$leftValue$split, _item$leftValue$split2, _item$compareSymbol;
|
|
833
|
+
var _item$leftValue$split, _item$leftValue$split2, _dependenceDetail2, _item$compareSymbol, _item$compareSymbol2;
|
|
796
834
|
//现支持子组件控制显隐,格式为${uniqueKey}_${type}与普通组件做区分
|
|
797
835
|
var isChildField = item.leftValue.includes('_');
|
|
798
836
|
var prefixId = isChildField ? (_item$leftValue$split = item.leftValue.split('_')) === null || _item$leftValue$split === void 0 ? void 0 : _item$leftValue$split[0] : item.leftValue;
|
|
@@ -815,7 +853,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
815
853
|
if (Reflect.has(currentComponentDisplayStatus.current, prefixId) && !currentComponentDisplayStatus.current[prefixId]) {
|
|
816
854
|
return false;
|
|
817
855
|
}
|
|
818
|
-
|
|
856
|
+
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);
|
|
857
|
+
return getExpression((_item$compareSymbol2 = item.compareSymbol) === null || _item$compareSymbol2 === void 0 ? void 0 : _item$compareSymbol2.toUpperCase(), leftValue, item.rightValue);
|
|
819
858
|
};
|
|
820
859
|
var getDisplayAndDisabledConfig = function getDisplayAndDisabledConfig(config) {
|
|
821
860
|
if (isNull(config)) {
|
|
@@ -833,6 +872,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
833
872
|
};
|
|
834
873
|
var newRenderColumnItem = function newRenderColumnItem(effects) {
|
|
835
874
|
return function (item) {
|
|
875
|
+
var _templateDetail$flowT;
|
|
836
876
|
var _item$componentConfig2 = item.componentConfig,
|
|
837
877
|
componentConfig = _item$componentConfig2 === void 0 ? {} : _item$componentConfig2,
|
|
838
878
|
workOrderComponentType = item.workOrderComponentType,
|
|
@@ -899,6 +939,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
899
939
|
}),
|
|
900
940
|
type: workOrderComponentType,
|
|
901
941
|
templateId: templateDetail.uniqueKey,
|
|
942
|
+
flowTemplateKey: (_templateDetail$flowT = templateDetail.flowTemplateConfig) === null || _templateDetail$flowT === void 0 ? void 0 : _templateDetail$flowT.flowTemplateKey,
|
|
902
943
|
workOrderUniqueKey: record === null || record === void 0 ? void 0 : record.id,
|
|
903
944
|
platform: platform
|
|
904
945
|
});
|
|
@@ -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,33 @@ 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;
|
|
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
|
+
var _calcWorkOrderList = calcWorkOrderList([details], componentDtoList),
|
|
997
|
+
_calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
|
|
998
|
+
transData = _calcWorkOrderList2[0];
|
|
999
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1000
|
+
style: {
|
|
1001
|
+
height: '50vh',
|
|
1002
|
+
maxWidth: '800px',
|
|
1003
|
+
overflow: 'auto'
|
|
1004
|
+
}
|
|
1005
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
1006
|
+
type: "link",
|
|
1007
|
+
onClick: function onClick() {
|
|
1008
|
+
return handleFillWorkOrder(transData);
|
|
1009
|
+
}
|
|
1010
|
+
}, "\u7ACB\u5373\u586B\u5145"), details.flowWorkOrderId, /*#__PURE__*/React.createElement(RenderDetail, {
|
|
1011
|
+
workOrderTemplateInfo: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
|
|
1012
|
+
transData: transData,
|
|
1013
|
+
platform: plat.platform,
|
|
1014
|
+
onOpenWangWang: onOpenWangWang
|
|
1015
|
+
}));
|
|
1016
|
+
};
|
|
983
1017
|
return /*#__PURE__*/React.createElement(Spin, {
|
|
984
1018
|
spinning: loading
|
|
985
1019
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1014,12 +1048,16 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1014
1048
|
}, /*#__PURE__*/React.createElement(Alert, {
|
|
1015
1049
|
type: "warning",
|
|
1016
1050
|
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
|
-
|
|
1051
|
+
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) {
|
|
1052
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
1053
|
+
content: /*#__PURE__*/React.createElement(ReportOrderRender, {
|
|
1054
|
+
details: item
|
|
1055
|
+
})
|
|
1056
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
1057
|
+
type: "link"
|
|
1058
|
+
}, item.flowWorkOrderId));
|
|
1059
|
+
})))
|
|
1060
|
+
})), /*#__PURE__*/React.createElement(Timeline, null, flowRecordList.map(function (flowRecord, index) {
|
|
1023
1061
|
var canWithdraw = currentNodeCanWithdraw(index) && !readonly;
|
|
1024
1062
|
return /*#__PURE__*/React.createElement(Timeline.Item, null, /*#__PURE__*/React.createElement(NodeItem, {
|
|
1025
1063
|
flowTemplateId: flowTemplateId,
|
|
@@ -775,7 +775,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
775
775
|
}),
|
|
776
776
|
name: item.name
|
|
777
777
|
});
|
|
778
|
-
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD', 'WDT_SEND_GOOD'].includes(item.workOrderComponentType)) {
|
|
778
|
+
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD', 'WDT_SEND_GOOD', 'KM_SEND_GOOD'].includes(item.workOrderComponentType)) {
|
|
779
779
|
var sendGoodMap = {
|
|
780
780
|
BS_SEND_GOOD: {
|
|
781
781
|
list: 'bsSendGood',
|
|
@@ -791,6 +791,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
791
791
|
list: 'wdtSendGood',
|
|
792
792
|
id: 'wdtSendId',
|
|
793
793
|
name: 'wdtSendName'
|
|
794
|
+
},
|
|
795
|
+
KM_SEND_GOOD: {
|
|
796
|
+
list: 'kmSendGood',
|
|
797
|
+
id: 'kmSendId',
|
|
798
|
+
name: 'kmSendName'
|
|
794
799
|
}
|
|
795
800
|
};
|
|
796
801
|
var bsSendList = get(nowData, "".concat(item.uniqueKey), []);
|
|
@@ -1459,7 +1464,7 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1459
1464
|
logisticsCompany: null,
|
|
1460
1465
|
logisticsCode: null
|
|
1461
1466
|
}]));
|
|
1462
|
-
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD', 'WDT_SEND_GOOD'].includes(nex.workOrderComponentType)) {
|
|
1467
|
+
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD', 'WDT_SEND_GOOD', 'KM_SEND_GOOD'].includes(nex.workOrderComponentType)) {
|
|
1463
1468
|
var sendGoodMap = {
|
|
1464
1469
|
BS_SEND_GOOD: {
|
|
1465
1470
|
list: 'bsSendGood'
|
|
@@ -1469,6 +1474,9 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1469
1474
|
},
|
|
1470
1475
|
WDT_SEND_GOOD: {
|
|
1471
1476
|
list: 'wdtSendGood'
|
|
1477
|
+
},
|
|
1478
|
+
KM_SEND_GOOD: {
|
|
1479
|
+
list: 'kmSendGood'
|
|
1472
1480
|
}
|
|
1473
1481
|
};
|
|
1474
1482
|
var _itemList8 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(sendGoodMap[nex.workOrderComponentType].list)], [{
|
|
@@ -1641,6 +1649,8 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1641
1649
|
} else if (nex.workOrderComponentType === 'LABEL') {
|
|
1642
1650
|
var _objectSpread55;
|
|
1643
1651
|
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));
|
|
1652
|
+
} else if (nex.workOrderComponentType === 'AFTER_SALES_ORDER_ID') {
|
|
1653
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_afterSalesOrderId")]));
|
|
1644
1654
|
}
|
|
1645
1655
|
}, {});
|
|
1646
1656
|
};
|
|
@@ -1662,7 +1672,7 @@ export var calcWorkOrderList = function calcWorkOrderList(source, templateColumn
|
|
|
1662
1672
|
//订单返填
|
|
1663
1673
|
export var orderBack = /*#__PURE__*/function () {
|
|
1664
1674
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
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,
|
|
1675
|
+
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, _objectSpread58, _cacheOrderInfo;
|
|
1666
1676
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1667
1677
|
while (1) switch (_context.prev = _context.next) {
|
|
1668
1678
|
case 0:
|
|
@@ -1776,8 +1786,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1776
1786
|
});
|
|
1777
1787
|
}
|
|
1778
1788
|
bsInfo = bsOrderTransform(bsOrders || {});
|
|
1779
|
-
wlnInfo = wlnOrderTransform(wlnOrders || {});
|
|
1780
|
-
wdtInfo = wdtOrderTransform(wdtOrders
|
|
1789
|
+
wlnInfo = wlnOrderTransform(wlnOrders || {}); // const wdtInfo = wdtOrderTransform(wdtOrders || {});
|
|
1790
|
+
wdtInfo = wdtOrderTransform(_objectSpread(_objectSpread({}, wdtOrders), {}, {
|
|
1791
|
+
componentList: templateDetail.componentDtoList
|
|
1792
|
+
}), form);
|
|
1781
1793
|
if ((bsOrders === null || bsOrders === void 0 ? void 0 : (_bsOrders$orders = bsOrders.orders) === null || _bsOrders$orders === void 0 ? void 0 : _bsOrders$orders.length) > 1) {
|
|
1782
1794
|
bsInfo.bsGoods = _objectSpread(_objectSpread({}, bsInfo.bsGoods), {}, {
|
|
1783
1795
|
bsGoods: []
|
|
@@ -1901,7 +1913,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1901
1913
|
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))))));
|
|
1902
1914
|
} else {
|
|
1903
1915
|
_cacheOrderInfo = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
1904
|
-
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (
|
|
1916
|
+
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (_objectSpread58 = {}, _defineProperty(_objectSpread58, order_no, values), _defineProperty(_objectSpread58, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, order_no, _objectSpread(_objectSpread({}, formValue), values))), _objectSpread58))));
|
|
1905
1917
|
}
|
|
1906
1918
|
}
|
|
1907
1919
|
// console.log('orderback', values);
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export { default as FormRender } from './FormRender';
|
|
|
5
5
|
export { default as FormRenderTemplateId } from './FormRenderTemplateId';
|
|
6
6
|
export { default as FlowWorkOrderDetail } from './FlowTemplateDetail';
|
|
7
7
|
export { default as TradeList } from './TradeList';
|
|
8
|
-
export { default as WdtTradeList } from './WdtTradeList';
|
|
9
8
|
export { default as FlowFormRender } from './FlowTemplateDetail/components/FormRender';
|
|
9
|
+
export { default as WdtTradeList } from './WdtTradeList';
|
|
10
10
|
export * as utils from './common/utils/tools';
|
|
11
11
|
export * as arithmetic from './common/utils/arithmetic';
|
|
12
12
|
export * from './WorkOrder/types';
|
package/dist/esm/index.js
CHANGED
|
@@ -15,8 +15,8 @@ export { default as FormRender } from "./FormRender";
|
|
|
15
15
|
export { default as FormRenderTemplateId } from "./FormRenderTemplateId";
|
|
16
16
|
export { default as FlowWorkOrderDetail } from "./FlowTemplateDetail";
|
|
17
17
|
export { default as TradeList } from "./TradeList";
|
|
18
|
-
export { default as WdtTradeList } from "./WdtTradeList";
|
|
19
18
|
export { default as FlowFormRender } from "./FlowTemplateDetail/components/FormRender";
|
|
19
|
+
export { default as WdtTradeList } from "./WdtTradeList";
|
|
20
20
|
import * as _utils from "./common/utils/tools";
|
|
21
21
|
export { _utils as utils };
|
|
22
22
|
import * as _arithmetic from "./common/utils/arithmetic";
|
|
@@ -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: {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10-beta.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"scripts": {
|
|
10
|
-
"
|
|
10
|
+
"sync": "yarn build && yalc push",
|
|
11
11
|
"build": "yarn run lint && father build",
|
|
12
12
|
"deploy": "npm run docs:build && npm run docs:deploy",
|
|
13
13
|
"docs:build": "dumi build",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
|
-
"@kmkf-fe-packages/basic-components": "^1.0.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "^1.0.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "^1.0.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "^1.0.10-beta.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^1.0.10-beta.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^1.0.10-beta.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": "3aa61d4f09daa69a202cb87beabc0406eec38ba9",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|