@kmkf-fe-packages/kmkf-work-order-service-component 0.28.2-beta.1 → 0.28.2-beta.2
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.
|
@@ -195,7 +195,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
195
195
|
});
|
|
196
196
|
}, [tid, formShopId]);
|
|
197
197
|
useEffect(function () {
|
|
198
|
+
console.debug('FlowTemplateDetail-didMount', flowTemplateKey, flowWorkOrderId);
|
|
198
199
|
return function () {
|
|
200
|
+
console.debug('FlowTemplateDetail-unMount', flowTemplateKey, flowWorkOrderId);
|
|
199
201
|
form.resetFields();
|
|
200
202
|
dispatch(setClearStore());
|
|
201
203
|
};
|
|
@@ -422,10 +424,12 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
422
424
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
423
425
|
return s.shopId === formData.shopId;
|
|
424
426
|
}), 'accessToken', '')
|
|
425
|
-
});
|
|
426
|
-
|
|
427
|
+
});
|
|
428
|
+
console.debug('提交参数: ', currentNodeDetail, formData);
|
|
429
|
+
// TODO: 自动提交时开启接口静默模式
|
|
430
|
+
_context4.next = 17;
|
|
427
431
|
return submitWorkOrder(params, autoSubmit ? 'quiet' : 'error');
|
|
428
|
-
case
|
|
432
|
+
case 17:
|
|
429
433
|
res = _context4.sent;
|
|
430
434
|
submitRequestUnlock();
|
|
431
435
|
// TODO: 兼容批量提交逻辑
|
|
@@ -456,30 +460,30 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
456
460
|
message.success('提交成功');
|
|
457
461
|
}
|
|
458
462
|
}
|
|
459
|
-
_context4.next =
|
|
463
|
+
_context4.next = 31;
|
|
460
464
|
break;
|
|
461
|
-
case
|
|
462
|
-
_context4.prev =
|
|
465
|
+
case 23:
|
|
466
|
+
_context4.prev = 23;
|
|
463
467
|
_context4.t0 = _context4["catch"](0);
|
|
464
468
|
submitRequestUnlock();
|
|
465
469
|
if (!(autoSubmit && typeof callbackAutoSubmitResult === 'function')) {
|
|
466
|
-
_context4.next =
|
|
470
|
+
_context4.next = 30;
|
|
467
471
|
break;
|
|
468
472
|
}
|
|
469
473
|
if (!(get(_context4.t0, 'errorFields.length') > 0)) {
|
|
470
|
-
_context4.next =
|
|
474
|
+
_context4.next = 29;
|
|
471
475
|
break;
|
|
472
476
|
}
|
|
473
477
|
return _context4.abrupt("return", callbackAutoSubmitResult({
|
|
474
478
|
success: false,
|
|
475
479
|
message: get(_context4.t0, 'errorFields.0.errors.0', '组件校验失败')
|
|
476
480
|
}));
|
|
477
|
-
case
|
|
481
|
+
case 29:
|
|
478
482
|
return _context4.abrupt("return", callbackAutoSubmitResult({
|
|
479
483
|
success: false,
|
|
480
484
|
message: (_context4.t0 === null || _context4.t0 === void 0 ? void 0 : _context4.t0.message) || "接口请求异常"
|
|
481
485
|
}));
|
|
482
|
-
case
|
|
486
|
+
case 30:
|
|
483
487
|
if (get(_context4.t0, 'errorFields.length') > 0) {
|
|
484
488
|
setTimeout(function () {
|
|
485
489
|
var _get;
|
|
@@ -492,11 +496,11 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
492
496
|
// TODO: 解决显影导致的组件校验失败未提示问题
|
|
493
497
|
message.error(get(_context4.t0, 'errorFields.0.errors.0', '组件校验失败'));
|
|
494
498
|
}
|
|
495
|
-
case
|
|
499
|
+
case 31:
|
|
496
500
|
case "end":
|
|
497
501
|
return _context4.stop();
|
|
498
502
|
}
|
|
499
|
-
}, _callee4, null, [[0,
|
|
503
|
+
}, _callee4, null, [[0, 23]]);
|
|
500
504
|
}));
|
|
501
505
|
return function handleSubmit() {
|
|
502
506
|
return _ref4.apply(this, arguments);
|
|
@@ -950,20 +954,22 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
950
954
|
dispatch(setPlat(plat));
|
|
951
955
|
}, [plat]);
|
|
952
956
|
useEffect(function () {
|
|
953
|
-
|
|
957
|
+
var _currentNodeDetail$wo24;
|
|
958
|
+
if (autoSubmit && !isNull(currentNodeDetail) && flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo24 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo24 === void 0 ? void 0 : _currentNodeDetail$wo24.flowWorkOrderId)) {
|
|
959
|
+
console.debug('currentNodeDetail', currentNodeDetail);
|
|
954
960
|
setTimeout(function () {
|
|
955
961
|
handleSubmit();
|
|
956
962
|
}, 0);
|
|
957
963
|
}
|
|
958
964
|
}, [currentNodeDetail]);
|
|
959
965
|
var isCurrentNodeHandler = useMemo(function () {
|
|
960
|
-
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$
|
|
966
|
+
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$wo25, _currentNodeDetail$no17, _currentNodeDetail$no18;
|
|
961
967
|
return currentUserHasOperatorAuth({
|
|
962
968
|
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] || [],
|
|
963
969
|
currentUserKey: plat.userKey,
|
|
964
970
|
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) || [],
|
|
965
971
|
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,
|
|
966
|
-
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
972
|
+
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo25 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo25 === void 0 ? void 0 : _currentNodeDetail$wo25.handlerList) || [],
|
|
967
973
|
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
|
|
968
974
|
});
|
|
969
975
|
}, [currentNodeDetail, plat, assistantMap]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "0.28.2-beta.
|
|
3
|
+
"version": "0.28.2-beta.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "bd5b027c20a77e006d58cb771d5502b8912047ab",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|