@kmkf-fe-packages/kmkf-work-order-service-component 2.0.19-beta.4 → 2.0.19-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +30 -13
- package/dist/esm/FlowTemplateDetailV2/index.js +67 -46
- package/dist/esm/common/utils/submitDataTransOldFormat.js +1 -5
- package/dist/esm/common/utils/tools.d.ts +1 -0
- package/dist/esm/common/utils/tools.js +47 -34
- package/dist/esm/common/utils/tools_constants.js +4 -40
- package/dist/esm/common/utils/transformWorkOrderData.js +21 -9
- package/package.json +5 -5
- package/dist/esm/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/common/utils/dist/submitDataTransOldFormat.js +0 -899
- package/dist/esm/common/utils/dist/tools.js +0 -1326
- package/dist/esm/common/utils/dist/transformWorkOrderData.js +0 -965
|
@@ -688,7 +688,8 @@ var FormRender = function FormRender(props, ref) {
|
|
|
688
688
|
//订单返填
|
|
689
689
|
var changeHandle = function changeHandle(order_no) {
|
|
690
690
|
if (!order_no) return;
|
|
691
|
-
console.log('[订单返填 changeHandle order_no ] >', order_no);
|
|
691
|
+
// console.log('[订单返填 changeHandle order_no ] >', order_no);
|
|
692
|
+
|
|
692
693
|
sessionStorage.setItem('order_no_test', order_no);
|
|
693
694
|
orderBack({
|
|
694
695
|
order_no: order_no,
|
|
@@ -816,6 +817,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
816
817
|
// 切换店铺
|
|
817
818
|
var handleChangeShopId = function handleChangeShopId(val) {
|
|
818
819
|
setShopId(val);
|
|
820
|
+
setIsOrderBackShopId(true);
|
|
819
821
|
// 清空表单字段
|
|
820
822
|
var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
|
|
821
823
|
if (NEED_CLEAR_FIELDS_WHEN_SHOP_ID_CHANGE.includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
@@ -909,7 +911,13 @@ var FormRender = function FormRender(props, ref) {
|
|
|
909
911
|
templateDetail: templateDetail,
|
|
910
912
|
callback: orderBackReplace,
|
|
911
913
|
fromQNCreateWorkOrderByOrderNo: false,
|
|
912
|
-
plat: plat
|
|
914
|
+
plat: plat,
|
|
915
|
+
callbackShopId: function callbackShopId(id) {
|
|
916
|
+
setIsOrderBackShopId(true);
|
|
917
|
+
setTimeout(function () {
|
|
918
|
+
setShopId(id);
|
|
919
|
+
}, 0);
|
|
920
|
+
}
|
|
913
921
|
});
|
|
914
922
|
}
|
|
915
923
|
}
|
|
@@ -930,7 +938,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
930
938
|
});
|
|
931
939
|
};
|
|
932
940
|
var conditionItemResult = function conditionItemResult(item, getFieldValue) {
|
|
933
|
-
var _item$leftValue$split, _item$leftValue$split2,
|
|
941
|
+
var _item$leftValue$split, _item$leftValue$split2, _item$compareSymbol;
|
|
934
942
|
//现支持子组件控制显隐,格式为${uniqueKey}_${type}与普通组件做区分
|
|
935
943
|
var isChildField = item.leftValue.includes('_');
|
|
936
944
|
var prefixId = isChildField ? (_item$leftValue$split = item.leftValue.split('_')) === null || _item$leftValue$split === void 0 ? void 0 : _item$leftValue$split[0] : item.leftValue;
|
|
@@ -963,8 +971,14 @@ var FormRender = function FormRender(props, ref) {
|
|
|
963
971
|
if (Reflect.has(currentComponentDisplayStatus.current, prefixId) && !currentComponentDisplayStatus.current[prefixId]) {
|
|
964
972
|
return false;
|
|
965
973
|
}
|
|
966
|
-
console.debug(
|
|
967
|
-
|
|
974
|
+
// console.debug(
|
|
975
|
+
// '显影计算',
|
|
976
|
+
// dependenceDetail?.type,
|
|
977
|
+
// leftValue,
|
|
978
|
+
// item.compareSymbol?.toUpperCase(),
|
|
979
|
+
// item.rightValue,
|
|
980
|
+
// );
|
|
981
|
+
return getExpression((_item$compareSymbol = item.compareSymbol) === null || _item$compareSymbol === void 0 ? void 0 : _item$compareSymbol.toUpperCase(), leftValue, item.rightValue);
|
|
968
982
|
};
|
|
969
983
|
var getDisplayAndDisabledConfig = function getDisplayAndDisabledConfig(config) {
|
|
970
984
|
if (isNull(config)) {
|
|
@@ -1019,14 +1033,17 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1019
1033
|
newComponentConfig['disabled'] = disabled || !canModifyPayment;
|
|
1020
1034
|
}
|
|
1021
1035
|
if (['RADIO', 'SELECT', 'MULT_SELECT'].includes(workOrderComponentType)) {
|
|
1022
|
-
var _mappingConfig$readon
|
|
1023
|
-
if (((_mappingConfig$readon = mappingConfig.readonlyComponents[uniqueKey])
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
if (
|
|
1028
|
-
|
|
1029
|
-
|
|
1036
|
+
var _mappingConfig$readon;
|
|
1037
|
+
if (!((_mappingConfig$readon = mappingConfig.readonlyComponents[uniqueKey]) !== null && _mappingConfig$readon !== void 0 && _mappingConfig$readon.canEdit)) {
|
|
1038
|
+
var _mappingConfig$readon2, _mappingConfig$readon3;
|
|
1039
|
+
if (((_mappingConfig$readon2 = mappingConfig.readonlyComponents[uniqueKey]) === null || _mappingConfig$readon2 === void 0 ? void 0 : _mappingConfig$readon2.auth) === 'all') {
|
|
1040
|
+
newComponentConfig[workOrderComponentType === 'SELECT' ? 'readonly' : 'disabled'] = true;
|
|
1041
|
+
} else if (((_mappingConfig$readon3 = mappingConfig.readonlyComponents[uniqueKey]) === null || _mappingConfig$readon3 === void 0 ? void 0 : _mappingConfig$readon3.auth) === 'single') {
|
|
1042
|
+
newComponentConfig.disabled = true;
|
|
1043
|
+
if (workOrderComponentType === 'RADIO') {
|
|
1044
|
+
// 隐藏未选中组件
|
|
1045
|
+
newComponentConfig.hideUnselectedItem = true;
|
|
1046
|
+
}
|
|
1030
1047
|
}
|
|
1031
1048
|
}
|
|
1032
1049
|
}
|
|
@@ -237,7 +237,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
237
237
|
// 保存
|
|
238
238
|
var handleSave = /*#__PURE__*/function () {
|
|
239
239
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
240
|
-
var _currentNodeDetail$
|
|
240
|
+
var _currentNodeDetail$wo5, update, formData, _currentNodeDetail$wo4, result, params, res, _currentNodeDetail$wo6;
|
|
241
241
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
242
242
|
while (1) switch (_context.prev = _context.next) {
|
|
243
243
|
case 0:
|
|
@@ -254,14 +254,36 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
254
254
|
payload: true
|
|
255
255
|
});
|
|
256
256
|
update = !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder); // 如果workOrder有值的情况下,表示我们是更新操作
|
|
257
|
+
formData = {};
|
|
258
|
+
if (!(flowTemplateType === 'SINGLE_PAGE')) {
|
|
259
|
+
_context.next = 18;
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
_context.next = 10;
|
|
263
|
+
return form.validateFields();
|
|
264
|
+
case 10:
|
|
265
|
+
formData = _context.sent;
|
|
266
|
+
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.componentDtoList) || []);
|
|
267
|
+
if (result.success) {
|
|
268
|
+
_context.next = 16;
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
message.error(result.message);
|
|
272
|
+
saveRequestUnlock();
|
|
273
|
+
return _context.abrupt("return");
|
|
274
|
+
case 16:
|
|
275
|
+
_context.next = 19;
|
|
276
|
+
break;
|
|
277
|
+
case 18:
|
|
257
278
|
formData = form.getFieldsValue();
|
|
279
|
+
case 19:
|
|
258
280
|
if (formData.shopId) {
|
|
259
|
-
_context.next =
|
|
281
|
+
_context.next = 22;
|
|
260
282
|
break;
|
|
261
283
|
}
|
|
262
284
|
saveRequestUnlock();
|
|
263
285
|
return _context.abrupt("return", message.error('请选择店铺'));
|
|
264
|
-
case
|
|
286
|
+
case 22:
|
|
265
287
|
params = submitParams({
|
|
266
288
|
update: update,
|
|
267
289
|
formData: formData,
|
|
@@ -270,16 +292,15 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
270
292
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
271
293
|
flowTemplateId: flowTemplateId,
|
|
272
294
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
273
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
295
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo5 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo5 === void 0 ? void 0 : _currentNodeDetail$wo5.id
|
|
274
296
|
}),
|
|
275
297
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
276
298
|
return s.shopId === formData.shopId;
|
|
277
299
|
}), 'accessToken', '')
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
_context.next = 13;
|
|
300
|
+
});
|
|
301
|
+
_context.next = 25;
|
|
281
302
|
return saveWorkOrder(params);
|
|
282
|
-
case
|
|
303
|
+
case 25:
|
|
283
304
|
res = _context.sent;
|
|
284
305
|
saveRequestUnlock();
|
|
285
306
|
if (res.success) {
|
|
@@ -297,7 +318,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
297
318
|
}
|
|
298
319
|
//删除缓存的订单信息
|
|
299
320
|
deleteCacheOrder({
|
|
300
|
-
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
321
|
+
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo6 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo6 === void 0 ? void 0 : _currentNodeDetail$wo6.componentDtoList,
|
|
301
322
|
values: formData,
|
|
302
323
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.nodeId,
|
|
303
324
|
flowTemplateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.flowTemplateId,
|
|
@@ -305,17 +326,17 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
305
326
|
unDeleteOrderInfo: true
|
|
306
327
|
});
|
|
307
328
|
}
|
|
308
|
-
_context.next =
|
|
329
|
+
_context.next = 33;
|
|
309
330
|
break;
|
|
310
|
-
case
|
|
311
|
-
_context.prev =
|
|
331
|
+
case 30:
|
|
332
|
+
_context.prev = 30;
|
|
312
333
|
_context.t0 = _context["catch"](0);
|
|
313
334
|
saveRequestUnlock();
|
|
314
|
-
case
|
|
335
|
+
case 33:
|
|
315
336
|
case "end":
|
|
316
337
|
return _context.stop();
|
|
317
338
|
}
|
|
318
|
-
}, _callee, null, [[0,
|
|
339
|
+
}, _callee, null, [[0, 30]]);
|
|
319
340
|
}));
|
|
320
341
|
return function handleSave() {
|
|
321
342
|
return _ref.apply(this, arguments);
|
|
@@ -325,7 +346,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
325
346
|
// 开启
|
|
326
347
|
var handleStart = /*#__PURE__*/function () {
|
|
327
348
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
328
|
-
var _currentNodeDetail$no3, _currentNodeDetail$
|
|
349
|
+
var _currentNodeDetail$no3, _currentNodeDetail$wo7, _res$data4, _res$data4$failList, res, _res$data5, _res$data5$failList, _res$data5$failList$;
|
|
329
350
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
330
351
|
while (1) switch (_context2.prev = _context2.next) {
|
|
331
352
|
case 0:
|
|
@@ -336,7 +357,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
336
357
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no3 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no3 === void 0 ? void 0 : _currentNodeDetail$no3.id,
|
|
337
358
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
338
359
|
flowTemplateId: flowTemplateId,
|
|
339
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
360
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo7 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : _currentNodeDetail$wo7.id
|
|
340
361
|
})
|
|
341
362
|
});
|
|
342
363
|
case 3:
|
|
@@ -410,7 +431,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
410
431
|
// 提交
|
|
411
432
|
var handleSubmit = /*#__PURE__*/function () {
|
|
412
433
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
413
|
-
var _currentNodeDetail$
|
|
434
|
+
var _currentNodeDetail$wo8, _currentNodeDetail$wo9, formData, result, params, res, _currentNodeDetail$wo10;
|
|
414
435
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
415
436
|
while (1) switch (_context4.prev = _context4.next) {
|
|
416
437
|
case 0:
|
|
@@ -430,7 +451,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
430
451
|
return form.validateFields();
|
|
431
452
|
case 7:
|
|
432
453
|
formData = _context4.sent;
|
|
433
|
-
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
454
|
+
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.componentDtoList) || []);
|
|
434
455
|
if (result.success) {
|
|
435
456
|
_context4.next = 13;
|
|
436
457
|
break;
|
|
@@ -447,7 +468,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
447
468
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
448
469
|
flowTemplateId: flowTemplateId,
|
|
449
470
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
450
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
471
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.id
|
|
451
472
|
}),
|
|
452
473
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
453
474
|
return s.shopId === formData.shopId;
|
|
@@ -471,7 +492,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
471
492
|
handleSuccessCallBack('submit');
|
|
472
493
|
//删除缓存的订单信息
|
|
473
494
|
deleteCacheOrder({
|
|
474
|
-
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
495
|
+
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : _currentNodeDetail$wo10.componentDtoList,
|
|
475
496
|
values: formData,
|
|
476
497
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.nodeId,
|
|
477
498
|
flowTemplateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.flowTemplateId,
|
|
@@ -553,9 +574,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
553
574
|
}
|
|
554
575
|
};
|
|
555
576
|
var checkOnlySubmit = function checkOnlySubmit() {
|
|
556
|
-
var _currentNodeRef$curre, _currentNodeDetail$
|
|
577
|
+
var _currentNodeRef$curre, _currentNodeDetail$wo11;
|
|
557
578
|
var replaceValue = currentNodeRef === null || currentNodeRef === void 0 ? void 0 : (_currentNodeRef$curre = currentNodeRef.current) === null || _currentNodeRef$curre === void 0 ? void 0 : _currentNodeRef$curre.getReplaceValue();
|
|
558
|
-
var componentList = ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
579
|
+
var componentList = ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.componentDtoList) || []).filter(function (t) {
|
|
559
580
|
var _t$componentConfig;
|
|
560
581
|
return (_t$componentConfig = t.componentConfig) === null || _t$componentConfig === void 0 ? void 0 : _t$componentConfig.repeatCheck;
|
|
561
582
|
});
|
|
@@ -636,7 +657,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
636
657
|
// 暂停工单
|
|
637
658
|
var handleStop = /*#__PURE__*/function () {
|
|
638
659
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(formData) {
|
|
639
|
-
var _currentNodeDetail$no4, _currentNodeDetail$
|
|
660
|
+
var _currentNodeDetail$no4, _currentNodeDetail$wo12, _res$data6, _res$data6$failList, res, _res$data7, _res$data7$failList, _res$data7$failList$;
|
|
640
661
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
641
662
|
while (1) switch (_context6.prev = _context6.next) {
|
|
642
663
|
case 0:
|
|
@@ -647,7 +668,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
647
668
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no4 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no4 === void 0 ? void 0 : _currentNodeDetail$no4.id,
|
|
648
669
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
649
670
|
flowTemplateId: flowTemplateId,
|
|
650
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
671
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.id
|
|
651
672
|
})
|
|
652
673
|
}));
|
|
653
674
|
case 3:
|
|
@@ -688,19 +709,19 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
688
709
|
// 关闭工单
|
|
689
710
|
var handleClose = /*#__PURE__*/function () {
|
|
690
711
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(formData, form) {
|
|
691
|
-
var _currentNodeDetail$
|
|
712
|
+
var _currentNodeDetail$wo13, _currentNodeDetail$no5, _currentNodeDetail$wo14, _res$data8, _res$data8$failList, res, _res$data9, _res$data9$failList, _res$data9$failList$;
|
|
692
713
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
693
714
|
while (1) switch (_context7.prev = _context7.next) {
|
|
694
715
|
case 0:
|
|
695
716
|
_context7.prev = 0;
|
|
696
717
|
_context7.next = 3;
|
|
697
718
|
return closeWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
698
|
-
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
719
|
+
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.flowStatus,
|
|
699
720
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
700
721
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no5 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no5 === void 0 ? void 0 : _currentNodeDetail$no5.id,
|
|
701
722
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
702
723
|
flowTemplateId: flowTemplateId,
|
|
703
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
724
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.id
|
|
704
725
|
})
|
|
705
726
|
}));
|
|
706
727
|
case 3:
|
|
@@ -737,7 +758,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
737
758
|
// 转交处理人
|
|
738
759
|
var handleForWard = /*#__PURE__*/function () {
|
|
739
760
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(formData) {
|
|
740
|
-
var _currentNodeDetail$no6, _currentNodeDetail$
|
|
761
|
+
var _currentNodeDetail$no6, _currentNodeDetail$wo15, _res$data10, _res$data10$failList, res, _res$data11, _res$data11$failList, _res$data11$failList$;
|
|
741
762
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
742
763
|
while (1) switch (_context8.prev = _context8.next) {
|
|
743
764
|
case 0:
|
|
@@ -748,7 +769,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
748
769
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no6 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no6 === void 0 ? void 0 : _currentNodeDetail$no6.id,
|
|
749
770
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
750
771
|
flowTemplateId: flowTemplateId,
|
|
751
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
772
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : _currentNodeDetail$wo15.id
|
|
752
773
|
})
|
|
753
774
|
}));
|
|
754
775
|
case 3:
|
|
@@ -785,7 +806,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
785
806
|
// 驳回
|
|
786
807
|
var handleReturnWorkOrder = /*#__PURE__*/function () {
|
|
787
808
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(formData) {
|
|
788
|
-
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no7, _currentNodeDetail$
|
|
809
|
+
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no7, _currentNodeDetail$wo16, res, _res$data$failList$0$, _res$data12, _res$data12$failList, _res$data12$failList$;
|
|
789
810
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
790
811
|
while (1) switch (_context9.prev = _context9.next) {
|
|
791
812
|
case 0:
|
|
@@ -828,7 +849,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
828
849
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : _currentNodeDetail$no7.id,
|
|
829
850
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
830
851
|
flowTemplateId: flowTemplateId,
|
|
831
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
852
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.id
|
|
832
853
|
})
|
|
833
854
|
}));
|
|
834
855
|
case 7:
|
|
@@ -874,7 +895,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
874
895
|
// 撤回
|
|
875
896
|
var handleWithdraw = /*#__PURE__*/function () {
|
|
876
897
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(formData) {
|
|
877
|
-
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no8, _currentNodeDetail$
|
|
898
|
+
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no8, _currentNodeDetail$wo17, res, _res$data$failList$0$2, _res$data13, _res$data13$failList, _res$data13$failList$;
|
|
878
899
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
879
900
|
while (1) switch (_context10.prev = _context10.next) {
|
|
880
901
|
case 0:
|
|
@@ -918,7 +939,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
918
939
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no8 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no8 === void 0 ? void 0 : _currentNodeDetail$no8.id,
|
|
919
940
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
920
941
|
flowTemplateId: flowTemplateId,
|
|
921
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
942
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo17 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : _currentNodeDetail$wo17.id
|
|
922
943
|
})
|
|
923
944
|
}));
|
|
924
945
|
case 7:
|
|
@@ -964,7 +985,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
964
985
|
//催单
|
|
965
986
|
var handleReminder = /*#__PURE__*/function () {
|
|
966
987
|
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(type) {
|
|
967
|
-
var _currentNodeDetail$
|
|
988
|
+
var _currentNodeDetail$wo18, _currentNodeDetail$wo19, _currentNodeDetail$no9, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$wo22, _currentNodeDetail$wo23, _currentNodeDetail$no10, _currentNodeDetail$wo24, api, flowTags, newFlowTags, params, res;
|
|
968
989
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
969
990
|
while (1) switch (_context11.prev = _context11.next) {
|
|
970
991
|
case 0:
|
|
@@ -974,20 +995,20 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
974
995
|
payload: true
|
|
975
996
|
});
|
|
976
997
|
api = type === 'reminder' ? reminder : cancelReminder;
|
|
977
|
-
flowTags = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
998
|
+
flowTags = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo18 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo18 === void 0 ? void 0 : (_currentNodeDetail$wo19 = _currentNodeDetail$wo18.jsonMap) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.flowTags) || '[]');
|
|
978
999
|
newFlowTags = type === 'reminder' ? flowTags.concat('REMINDER') : flowTags.filter(function (t) {
|
|
979
1000
|
return t !== 'REMINDER';
|
|
980
1001
|
});
|
|
981
1002
|
params = {
|
|
982
1003
|
updateInfo: {
|
|
983
1004
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : _currentNodeDetail$no9.id,
|
|
984
|
-
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
985
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1005
|
+
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo20 === void 0 ? void 0 : _currentNodeDetail$wo20.templateId,
|
|
1006
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo21 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo21 === void 0 ? void 0 : _currentNodeDetail$wo21.id,
|
|
986
1007
|
updateList: [{
|
|
987
1008
|
dataKey: 'flowTags',
|
|
988
1009
|
name: '标签',
|
|
989
1010
|
dataValue: newFlowTags,
|
|
990
|
-
oldValue: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1011
|
+
oldValue: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo22 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo22 === void 0 ? void 0 : (_currentNodeDetail$wo23 = _currentNodeDetail$wo22.jsonMap) === null || _currentNodeDetail$wo23 === void 0 ? void 0 : _currentNodeDetail$wo23.flowTags) || '[]')
|
|
991
1012
|
}],
|
|
992
1013
|
updateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.workOrderUpdateTime,
|
|
993
1014
|
needTransForm: false
|
|
@@ -995,7 +1016,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
995
1016
|
operateParams: {
|
|
996
1017
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no10 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no10 === void 0 ? void 0 : _currentNodeDetail$no10.id,
|
|
997
1018
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
998
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1019
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo24 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo24 === void 0 ? void 0 : _currentNodeDetail$wo24.id,
|
|
999
1020
|
flowTemplateId: flowTemplateId,
|
|
1000
1021
|
workOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.workOrderUpdateTime,
|
|
1001
1022
|
flowWorkOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowWorkOrderUpdateTime
|
|
@@ -1084,7 +1105,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1084
1105
|
}, [plat]);
|
|
1085
1106
|
useEffect(function () {
|
|
1086
1107
|
if (autoSubmit && !isNull(currentNodeDetail)) {
|
|
1087
|
-
var _currentNodeDetail$
|
|
1108
|
+
var _currentNodeDetail$wo25;
|
|
1088
1109
|
// TODO: 兼容后端一些时候生成的数据异常情况,防止批量提交出现卡顿不执行情况
|
|
1089
1110
|
if (isEmpty(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder) && typeof callbackAutoSubmitResult === 'function') {
|
|
1090
1111
|
return callbackAutoSubmitResult({
|
|
@@ -1092,7 +1113,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1092
1113
|
message: '当前流程工单无工单数据,请联系实施处理'
|
|
1093
1114
|
});
|
|
1094
1115
|
}
|
|
1095
|
-
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1116
|
+
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo25 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo25 === void 0 ? void 0 : _currentNodeDetail$wo25.flowWorkOrderId)) {
|
|
1096
1117
|
setTimeout(function () {
|
|
1097
1118
|
handleSubmit();
|
|
1098
1119
|
}, 0);
|
|
@@ -1100,13 +1121,13 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1100
1121
|
}
|
|
1101
1122
|
}, [currentNodeDetail]);
|
|
1102
1123
|
var isCurrentNodeHandler = useMemo(function () {
|
|
1103
|
-
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$
|
|
1124
|
+
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$wo26, _currentNodeDetail$no17, _currentNodeDetail$no18;
|
|
1104
1125
|
return currentUserHasOperatorAuth({
|
|
1105
1126
|
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] || [],
|
|
1106
1127
|
currentUserKey: plat.userKey,
|
|
1107
1128
|
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) || [],
|
|
1108
1129
|
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,
|
|
1109
|
-
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1130
|
+
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo26 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo26 === void 0 ? void 0 : _currentNodeDetail$wo26.handlerList) || [],
|
|
1110
1131
|
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
|
|
1111
1132
|
});
|
|
1112
1133
|
}, [currentNodeDetail, plat, assistantMap]);
|
|
@@ -1115,9 +1136,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1115
1136
|
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);
|
|
1116
1137
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopId;
|
|
1117
1138
|
var ReportOrderRender = function ReportOrderRender(props) {
|
|
1118
|
-
var _currentNodeDetail$
|
|
1139
|
+
var _currentNodeDetail$wo27, _currentNodeDetail$wo28;
|
|
1119
1140
|
var details = props.details;
|
|
1120
|
-
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1141
|
+
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo27 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo27 === void 0 ? void 0 : _currentNodeDetail$wo27.componentDtoList.filter(function (t) {
|
|
1121
1142
|
return !CANNOT_BACK_FILL.includes(t.workOrderComponentType || '');
|
|
1122
1143
|
});
|
|
1123
1144
|
//获取可以返填的组件值
|
|
@@ -1125,7 +1146,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1125
1146
|
_calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
|
|
1126
1147
|
transData = _calcWorkOrderList2[0];
|
|
1127
1148
|
//获取表单显示值
|
|
1128
|
-
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1149
|
+
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo28 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo28 === void 0 ? void 0 : _currentNodeDetail$wo28.componentDtoList),
|
|
1129
1150
|
_calcWorkOrderList4 = _slicedToArray(_calcWorkOrderList3, 1),
|
|
1130
1151
|
transDataall = _calcWorkOrderList4[0];
|
|
1131
1152
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -562,13 +562,9 @@ var handleGYReturnGoods = function handleGYReturnGoods(_ref39) {
|
|
|
562
562
|
addContent(SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].returnTypeKey, currentReturn === null || currentReturn === void 0 ? void 0 : currentReturn[SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].returnTypeKey]);
|
|
563
563
|
addContent(SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].returnGoodsKey, currentReturn === null || currentReturn === void 0 ? void 0 : currentReturn[SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].returnGoodsKey]);
|
|
564
564
|
addContent(SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].gySystemOrderNoKey, (currentReturn === null || currentReturn === void 0 ? void 0 : currentReturn[SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].gySystemOrderNoKey]) || '');
|
|
565
|
-
|
|
566
|
-
// SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].shopCodeKey,
|
|
567
|
-
// currentReturn?.[SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].shopCodeKey] || '',
|
|
568
|
-
// );
|
|
565
|
+
addContent(SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].shopCodeKey, (currentReturn === null || currentReturn === void 0 ? void 0 : currentReturn[SUBMIT_COMPONENT_RETURN_GOODS_MAP[compType].shopCodeKey]) || '');
|
|
569
566
|
};
|
|
570
567
|
};
|
|
571
|
-
|
|
572
568
|
var handleBsPosting = function handleBsPosting(_ref40) {
|
|
573
569
|
var addContent = _ref40.addContent,
|
|
574
570
|
getNowData = _ref40.getNowData;
|