@kmkf-fe-packages/kmkf-work-order-service-component 2.2.31-beta.5 → 2.2.32
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 +3 -8
- package/dist/esm/FlowTemplateDetailV2/index.js +53 -82
- package/dist/esm/FlowTemplateDetailV2/type.d.ts +0 -1
- package/dist/esm/GlobalContext/hook/dist/useGetHasErpData.js +52 -0
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpAddressData.js +180 -0
- package/dist/esm/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +186 -0
- package/dist/esm/Login/index.d.ts +0 -1
- package/dist/esm/Login/index.js +1 -3
- package/dist/esm/WorkOrder/components/WorkOrderList/components/CustomizeWorkOrderCard/index.js +3 -13
- package/dist/esm/WorkOrder/components/WorkOrderList/index.js +0 -1
- package/dist/esm/WorkOrder/index.js +2 -3
- package/dist/esm/common/utils/constant.js +1 -1
- package/dist/esm/common/utils/dist/submitDataTransOldFormat.js +899 -0
- package/dist/esm/common/utils/dist/tools.js +1326 -0
- package/dist/esm/common/utils/dist/transformWorkOrderData.js +965 -0
- package/dist/esm/common/utils/submitDataTransOldFormat.js +10 -10
- package/dist/esm/common/utils/tools.d.ts +0 -4
- package/dist/esm/common/utils/tools.js +0 -42
- package/dist/esm/common/utils/tools_constants.js +1 -1
- package/dist/esm/common/utils/transformWorkOrderData.js +8 -8
- package/dist/esm/common/utils/xzSDK.js +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/model/customizeWorkOrder/dist/api.js +48 -0
- package/dist/esm/model/customizeWorkOrder/dist/index.js +370 -0
- package/dist/esm/model/customizeWorkOrder/dist/selector.js +63 -0
- package/dist/esm/model/customizeWorkOrder/dist/types.js +3 -0
- package/dist/esm/model/dist/global.js +44 -0
- package/dist/esm/model/dist/hooks.js +15 -0
- package/dist/esm/model/dist/login.js +245 -0
- package/dist/esm/model/dist/store.js +30 -0
- package/dist/esm/model/dist/userData.js +41 -0
- package/dist/esm/model/dist/workOrder.js +329 -0
- package/dist/esm/model/flowTemplateDetail/dist/api.js +192 -0
- package/dist/esm/model/flowTemplateDetail/dist/types.js +48 -0
- package/dist/esm/model/logicFlow/dist/api.js +14 -0
- package/dist/esm/model/logicFlow/dist/index.js +235 -0
- package/dist/esm/model/logicFlow/dist/selector.js +18 -0
- package/dist/esm/model/logicFlow/dist/types.js +3 -0
- package/dist/esm/model/logicFlow/selector.d.ts +0 -3
- package/dist/esm/model/login.d.ts +0 -10
- package/dist/esm/model/login.js +45 -66
- package/dist/esm/model/paymentWorkOrder/dist/index.js +77 -0
- package/dist/esm/model/paymentWorkOrder/dist/selector.js +36 -0
- package/dist/esm/model/paymentWorkOrder/dist/types.js +3 -0
- package/dist/esm/model/paymentWorkOrder/selector.d.ts +0 -9
- package/dist/esm/model/servers/api.d.ts +0 -2
- package/dist/esm/model/servers/api.js +0 -9
- package/dist/esm/model/servers/dist/api.js +545 -0
- package/dist/esm/model/servers/dist/request.js +63 -0
- package/dist/esm/model/singleShopWorkOrder/dist/index.js +216 -0
- package/dist/esm/model/singleShopWorkOrder/dist/selector.js +24 -0
- package/dist/esm/model/singleShopWorkOrder/dist/types.js +3 -0
- package/dist/esm/model/singleShopWorkOrder/selector.d.ts +0 -5
- package/dist/esm/model/types/dist/login.js +3 -0
- package/dist/esm/model/types/dist/singleWorkOrder.js +3 -0
- package/dist/esm/model/types/dist/workOrder.js +3 -0
- package/package.json +5 -5
- package/dist/esm/FlowTemplateDetailV2/components/JumpBuyer/index.d.ts +0 -10
- package/dist/esm/FlowTemplateDetailV2/components/JumpBuyer/index.js +0 -44
- package/dist/esm/LoginNew/index.d.ts +0 -8
- package/dist/esm/LoginNew/index.js +0 -268
- package/dist/esm/LoginNew/index.module.less +0 -45
- package/dist/esm/common/imgs/contact.png +0 -0
|
@@ -39,7 +39,7 @@ import { groupByPreNode, getCurrentNodeModifiedShowHideRule } from "./common";
|
|
|
39
39
|
import { getCalculationComponentValue } from "../../../common/utils/arithmetic";
|
|
40
40
|
import "./index.less";
|
|
41
41
|
import { CHILD_FIELD_TYPE, CHILD_FIELD_VALUE } from "../../../common/constant";
|
|
42
|
-
import { jsonParseSecurity, findComponentUniqueKeyByType
|
|
42
|
+
import { jsonParseSecurity, findComponentUniqueKeyByType } from "../../../common/utils/tools";
|
|
43
43
|
import { NEED_CLEAR_FIELDS_WHEN_SHOP_ID_CHANGE } from "../../constant";
|
|
44
44
|
import { Context } from "../../context";
|
|
45
45
|
import { orderBackKmAddress } from "./constants";
|
|
@@ -649,7 +649,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
649
649
|
// 商品组件映射
|
|
650
650
|
var fillByShopId = function fillByShopId(shopId) {
|
|
651
651
|
// PS: 增加setTimeout 为了让后续的items渲染,然后触发对应的映射
|
|
652
|
-
|
|
652
|
+
console.log('fillByShopId', shopId);
|
|
653
653
|
setTimeout(function () {
|
|
654
654
|
var shopUniqueKey = shopId ? shopIdToUniqueKeyMap[shopId] : '';
|
|
655
655
|
shopUniqueKey && fillByMapping('SHOP_SELECT_MAPPING', shopUniqueKey);
|
|
@@ -1517,12 +1517,6 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1517
1517
|
|
|
1518
1518
|
//缓存防止bs商品组件联动返填获取不到值
|
|
1519
1519
|
setTimeout(function () {
|
|
1520
|
-
//部分组件小写改成大写
|
|
1521
|
-
updateComponentToUpperCase({
|
|
1522
|
-
componentDtoList: templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList,
|
|
1523
|
-
allValues: allValues,
|
|
1524
|
-
form: form
|
|
1525
|
-
});
|
|
1526
1520
|
changeValuesCacheOrderInfo(_objectSpread(_objectSpread({}, form.getFieldsValue()), formValue), templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList);
|
|
1527
1521
|
});
|
|
1528
1522
|
};
|
|
@@ -1617,6 +1611,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1617
1611
|
shopId: shopId
|
|
1618
1612
|
}));
|
|
1619
1613
|
var shopNameDisabled = useMemo(function () {
|
|
1614
|
+
console.log(isStartNodeWaiting, canEditShopName, look, workOrderId);
|
|
1620
1615
|
if (isStartNodeWaiting && !look) {
|
|
1621
1616
|
return false;
|
|
1622
1617
|
}
|
|
@@ -43,7 +43,6 @@ import RemarkModal from "./components/RemarkModal";
|
|
|
43
43
|
import WithdrawModal from "./components/WithdrawModal";
|
|
44
44
|
import SubmitRemindModal from "./components/SubmitRemindModal";
|
|
45
45
|
import ShareLinkModal from "./components/ShareLinkModal";
|
|
46
|
-
import JumpBuyer from "./components/JumpBuyer";
|
|
47
46
|
import { useSignal } from "../hooks/useSignal";
|
|
48
47
|
import { verifyHandle, FLOW_STATUS_V2, getTag, currentUserHasOperatorAuth, CANNOT_BACK_FILL } from "./common";
|
|
49
48
|
import { saveWorkOrder, submitWorkOrder, addRemark, stopWorkOrder, closeWorkOrder, startWorkOrder, forwardWorkOrder, returnWorkOrder, withDrawWorkOrder, reminder, cancelReminder } from "../model/flowTemplateDetail/api";
|
|
@@ -62,7 +61,7 @@ import { PlatForm } from "../WorkOrder/types";
|
|
|
62
61
|
var Text = Typography.Text,
|
|
63
62
|
Link = Typography.Link;
|
|
64
63
|
var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
65
|
-
var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _currentNodeDetail$no14, _shopList$find, _JSON$parse, _currentNodeDetail$
|
|
64
|
+
var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _currentNodeDetail$no14, _shopList$find, _JSON$parse, _currentNodeDetail$wo30, _currentNodeDetail$wo31, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$no27, _currentNodeDetail$no28, _currentNodeDetail$no29, _currentNodeDetail$no30;
|
|
66
65
|
var flowTemplateKey = props.flowTemplateKey,
|
|
67
66
|
_props$shopList = props.shopList,
|
|
68
67
|
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
@@ -78,9 +77,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
78
77
|
onTalkChange = props.onTalkChange,
|
|
79
78
|
_props$autoSubmit = props.autoSubmit,
|
|
80
79
|
autoSubmit = _props$autoSubmit === void 0 ? false : _props$autoSubmit,
|
|
81
|
-
callbackAutoSubmitResult = props.callbackAutoSubmitResult
|
|
82
|
-
_props$otherInfo = props.otherInfo,
|
|
83
|
-
otherInfo = _props$otherInfo === void 0 ? {} : _props$otherInfo;
|
|
80
|
+
callbackAutoSubmitResult = props.callbackAutoSubmitResult;
|
|
84
81
|
var _useContext = useContext(Context),
|
|
85
82
|
dispatch = _useContext.dispatch;
|
|
86
83
|
var flowRecordList = useSelector(selectFlowRecordList);
|
|
@@ -255,7 +252,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
255
252
|
// 保存
|
|
256
253
|
var handleSave = /*#__PURE__*/function () {
|
|
257
254
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
258
|
-
var _currentNodeDetail$
|
|
255
|
+
var _currentNodeDetail$wo4, update, formData, params, res, _currentNodeDetail$wo5;
|
|
259
256
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
260
257
|
while (1) switch (_context.prev = _context.next) {
|
|
261
258
|
case 0:
|
|
@@ -272,36 +269,14 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
272
269
|
payload: true
|
|
273
270
|
});
|
|
274
271
|
update = !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder); // 如果workOrder有值的情况下,表示我们是更新操作
|
|
275
|
-
formData = {};
|
|
276
|
-
if (!(flowTemplateType === 'SINGLE_PAGE')) {
|
|
277
|
-
_context.next = 18;
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
_context.next = 10;
|
|
281
|
-
return form.validateFields();
|
|
282
|
-
case 10:
|
|
283
|
-
formData = _context.sent;
|
|
284
|
-
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.componentDtoList) || []);
|
|
285
|
-
if (result.success) {
|
|
286
|
-
_context.next = 16;
|
|
287
|
-
break;
|
|
288
|
-
}
|
|
289
|
-
message.error(result.message);
|
|
290
|
-
saveRequestUnlock();
|
|
291
|
-
return _context.abrupt("return");
|
|
292
|
-
case 16:
|
|
293
|
-
_context.next = 19;
|
|
294
|
-
break;
|
|
295
|
-
case 18:
|
|
296
272
|
formData = form.getFieldsValue();
|
|
297
|
-
case 19:
|
|
298
273
|
if (formData.shopId) {
|
|
299
|
-
_context.next =
|
|
274
|
+
_context.next = 10;
|
|
300
275
|
break;
|
|
301
276
|
}
|
|
302
277
|
saveRequestUnlock();
|
|
303
278
|
return _context.abrupt("return", message.error('请选择店铺'));
|
|
304
|
-
case
|
|
279
|
+
case 10:
|
|
305
280
|
params = submitParams({
|
|
306
281
|
update: update,
|
|
307
282
|
formData: formData,
|
|
@@ -310,15 +285,16 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
310
285
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
311
286
|
flowTemplateId: flowTemplateId,
|
|
312
287
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
313
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
288
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.id
|
|
314
289
|
}),
|
|
315
290
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
316
291
|
return s.shopId === formData.shopId;
|
|
317
292
|
}), 'accessToken', '')
|
|
318
|
-
});
|
|
319
|
-
|
|
293
|
+
}); // console.log(params);
|
|
294
|
+
// return;
|
|
295
|
+
_context.next = 13;
|
|
320
296
|
return saveWorkOrder(params);
|
|
321
|
-
case
|
|
297
|
+
case 13:
|
|
322
298
|
res = _context.sent;
|
|
323
299
|
saveRequestUnlock();
|
|
324
300
|
if (res.success) {
|
|
@@ -336,7 +312,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
336
312
|
}
|
|
337
313
|
//删除缓存的订单信息
|
|
338
314
|
deleteCacheOrder({
|
|
339
|
-
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
315
|
+
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo5 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo5 === void 0 ? void 0 : _currentNodeDetail$wo5.componentDtoList,
|
|
340
316
|
values: formData,
|
|
341
317
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.nodeId,
|
|
342
318
|
flowTemplateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.flowTemplateId,
|
|
@@ -344,17 +320,17 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
344
320
|
unDeleteOrderInfo: true
|
|
345
321
|
});
|
|
346
322
|
}
|
|
347
|
-
_context.next =
|
|
323
|
+
_context.next = 21;
|
|
348
324
|
break;
|
|
349
|
-
case
|
|
350
|
-
_context.prev =
|
|
325
|
+
case 18:
|
|
326
|
+
_context.prev = 18;
|
|
351
327
|
_context.t0 = _context["catch"](0);
|
|
352
328
|
saveRequestUnlock();
|
|
353
|
-
case
|
|
329
|
+
case 21:
|
|
354
330
|
case "end":
|
|
355
331
|
return _context.stop();
|
|
356
332
|
}
|
|
357
|
-
}, _callee, null, [[0,
|
|
333
|
+
}, _callee, null, [[0, 18]]);
|
|
358
334
|
}));
|
|
359
335
|
return function handleSave() {
|
|
360
336
|
return _ref.apply(this, arguments);
|
|
@@ -364,7 +340,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
364
340
|
// 开启
|
|
365
341
|
var handleStart = /*#__PURE__*/function () {
|
|
366
342
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
367
|
-
var _currentNodeDetail$no3, _currentNodeDetail$
|
|
343
|
+
var _currentNodeDetail$no3, _currentNodeDetail$wo6, _res$data4, _res$data4$failList, res, _res$data5, _res$data5$failList, _res$data5$failList$;
|
|
368
344
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
369
345
|
while (1) switch (_context2.prev = _context2.next) {
|
|
370
346
|
case 0:
|
|
@@ -375,7 +351,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
375
351
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no3 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no3 === void 0 ? void 0 : _currentNodeDetail$no3.id,
|
|
376
352
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
377
353
|
flowTemplateId: flowTemplateId,
|
|
378
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
354
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo6 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo6 === void 0 ? void 0 : _currentNodeDetail$wo6.id
|
|
379
355
|
})
|
|
380
356
|
});
|
|
381
357
|
case 3:
|
|
@@ -449,7 +425,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
449
425
|
// 提交
|
|
450
426
|
var handleSubmit = /*#__PURE__*/function () {
|
|
451
427
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
452
|
-
var _currentNodeDetail$
|
|
428
|
+
var _currentNodeDetail$wo7, _currentNodeDetail$wo8, formData, result, params, res, _currentNodeDetail$wo9;
|
|
453
429
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
454
430
|
while (1) switch (_context4.prev = _context4.next) {
|
|
455
431
|
case 0:
|
|
@@ -469,7 +445,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
469
445
|
return form.validateFields();
|
|
470
446
|
case 7:
|
|
471
447
|
formData = _context4.sent;
|
|
472
|
-
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
448
|
+
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo7 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : _currentNodeDetail$wo7.componentDtoList) || []);
|
|
473
449
|
if (result.success) {
|
|
474
450
|
_context4.next = 13;
|
|
475
451
|
break;
|
|
@@ -486,7 +462,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
486
462
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
487
463
|
flowTemplateId: flowTemplateId,
|
|
488
464
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
489
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
465
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.id
|
|
490
466
|
}),
|
|
491
467
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
492
468
|
return s.shopId === formData.shopId;
|
|
@@ -510,7 +486,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
510
486
|
handleSuccessCallBack('submit');
|
|
511
487
|
//删除缓存的订单信息
|
|
512
488
|
deleteCacheOrder({
|
|
513
|
-
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
489
|
+
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.componentDtoList,
|
|
514
490
|
values: formData,
|
|
515
491
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.nodeId,
|
|
516
492
|
flowTemplateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.flowTemplateId,
|
|
@@ -610,9 +586,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
610
586
|
}
|
|
611
587
|
};
|
|
612
588
|
var checkOnlySubmit = function checkOnlySubmit() {
|
|
613
|
-
var _currentNodeRef$curre, _currentNodeDetail$
|
|
589
|
+
var _currentNodeRef$curre, _currentNodeDetail$wo10;
|
|
614
590
|
var replaceValue = currentNodeRef === null || currentNodeRef === void 0 ? void 0 : (_currentNodeRef$curre = currentNodeRef.current) === null || _currentNodeRef$curre === void 0 ? void 0 : _currentNodeRef$curre.getReplaceValue();
|
|
615
|
-
var componentList = ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
591
|
+
var componentList = ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : _currentNodeDetail$wo10.componentDtoList) || []).filter(function (t) {
|
|
616
592
|
var _t$componentConfig;
|
|
617
593
|
return (_t$componentConfig = t.componentConfig) === null || _t$componentConfig === void 0 ? void 0 : _t$componentConfig.repeatCheck;
|
|
618
594
|
});
|
|
@@ -693,7 +669,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
693
669
|
// 暂停工单
|
|
694
670
|
var handleStop = /*#__PURE__*/function () {
|
|
695
671
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(formData) {
|
|
696
|
-
var _currentNodeDetail$no5, _currentNodeDetail$
|
|
672
|
+
var _currentNodeDetail$no5, _currentNodeDetail$wo11, _res$data6, _res$data6$failList, res, _res$data7, _res$data7$failList, _res$data7$failList$;
|
|
697
673
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
698
674
|
while (1) switch (_context6.prev = _context6.next) {
|
|
699
675
|
case 0:
|
|
@@ -704,7 +680,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
704
680
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no5 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no5 === void 0 ? void 0 : _currentNodeDetail$no5.id,
|
|
705
681
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
706
682
|
flowTemplateId: flowTemplateId,
|
|
707
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
683
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.id
|
|
708
684
|
})
|
|
709
685
|
}));
|
|
710
686
|
case 3:
|
|
@@ -745,19 +721,19 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
745
721
|
// 关闭工单
|
|
746
722
|
var handleClose = /*#__PURE__*/function () {
|
|
747
723
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(formData, form) {
|
|
748
|
-
var _currentNodeDetail$
|
|
724
|
+
var _currentNodeDetail$wo12, _currentNodeDetail$no6, _currentNodeDetail$wo13, _res$data8, _res$data8$failList, res, _res$data9, _res$data9$failList, _res$data9$failList$;
|
|
749
725
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
750
726
|
while (1) switch (_context7.prev = _context7.next) {
|
|
751
727
|
case 0:
|
|
752
728
|
_context7.prev = 0;
|
|
753
729
|
_context7.next = 3;
|
|
754
730
|
return closeWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
755
|
-
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
731
|
+
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.flowStatus,
|
|
756
732
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
757
733
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no6 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no6 === void 0 ? void 0 : _currentNodeDetail$no6.id,
|
|
758
734
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
759
735
|
flowTemplateId: flowTemplateId,
|
|
760
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
736
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.id
|
|
761
737
|
})
|
|
762
738
|
}));
|
|
763
739
|
case 3:
|
|
@@ -794,7 +770,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
794
770
|
// 转交处理人
|
|
795
771
|
var handleForWard = /*#__PURE__*/function () {
|
|
796
772
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(formData) {
|
|
797
|
-
var _currentNodeDetail$no7, _currentNodeDetail$
|
|
773
|
+
var _currentNodeDetail$no7, _currentNodeDetail$wo14, _res$data10, _res$data10$failList, res, _res$data11, _res$data11$failList, _res$data11$failList$;
|
|
798
774
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
799
775
|
while (1) switch (_context8.prev = _context8.next) {
|
|
800
776
|
case 0:
|
|
@@ -805,7 +781,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
805
781
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : _currentNodeDetail$no7.id,
|
|
806
782
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
807
783
|
flowTemplateId: flowTemplateId,
|
|
808
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
784
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.id
|
|
809
785
|
})
|
|
810
786
|
}));
|
|
811
787
|
case 3:
|
|
@@ -842,7 +818,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
842
818
|
// 驳回
|
|
843
819
|
var handleReturnWorkOrder = /*#__PURE__*/function () {
|
|
844
820
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(formData) {
|
|
845
|
-
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no8, _currentNodeDetail$
|
|
821
|
+
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no8, _currentNodeDetail$wo15, res, _res$data$failList$0$, _res$data12, _res$data12$failList, _res$data12$failList$;
|
|
846
822
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
847
823
|
while (1) switch (_context9.prev = _context9.next) {
|
|
848
824
|
case 0:
|
|
@@ -885,7 +861,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
885
861
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no8 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no8 === void 0 ? void 0 : _currentNodeDetail$no8.id,
|
|
886
862
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
887
863
|
flowTemplateId: flowTemplateId,
|
|
888
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
864
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : _currentNodeDetail$wo15.id
|
|
889
865
|
})
|
|
890
866
|
}));
|
|
891
867
|
case 7:
|
|
@@ -931,7 +907,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
931
907
|
// 撤回
|
|
932
908
|
var handleWithdraw = /*#__PURE__*/function () {
|
|
933
909
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(formData) {
|
|
934
|
-
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no9, _currentNodeDetail$
|
|
910
|
+
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no9, _currentNodeDetail$wo16, res, _res$data$failList$0$2, _res$data13, _res$data13$failList, _res$data13$failList$;
|
|
935
911
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
936
912
|
while (1) switch (_context10.prev = _context10.next) {
|
|
937
913
|
case 0:
|
|
@@ -975,7 +951,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
975
951
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : _currentNodeDetail$no9.id,
|
|
976
952
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
977
953
|
flowTemplateId: flowTemplateId,
|
|
978
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
954
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.id
|
|
979
955
|
})
|
|
980
956
|
}));
|
|
981
957
|
case 7:
|
|
@@ -1021,7 +997,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1021
997
|
//催单
|
|
1022
998
|
var handleReminder = /*#__PURE__*/function () {
|
|
1023
999
|
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(type) {
|
|
1024
|
-
var _currentNodeDetail$
|
|
1000
|
+
var _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$no10, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$wo22, _currentNodeDetail$no11, _currentNodeDetail$wo23, _res$data14, _res$data14$failList, api, flowTags, newFlowTags, params, res, _res$data15, _res$data15$failList, _res$data15$failList$;
|
|
1025
1001
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
1026
1002
|
while (1) switch (_context11.prev = _context11.next) {
|
|
1027
1003
|
case 0:
|
|
@@ -1031,20 +1007,20 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1031
1007
|
payload: true
|
|
1032
1008
|
});
|
|
1033
1009
|
api = type === 'reminder' ? reminder : cancelReminder;
|
|
1034
|
-
flowTags = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1010
|
+
flowTags = 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) || '[]');
|
|
1035
1011
|
newFlowTags = type === 'reminder' ? flowTags.concat('REMINDER') : flowTags.filter(function (t) {
|
|
1036
1012
|
return t !== 'REMINDER';
|
|
1037
1013
|
});
|
|
1038
1014
|
params = {
|
|
1039
1015
|
updateInfo: {
|
|
1040
1016
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no10 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no10 === void 0 ? void 0 : _currentNodeDetail$no10.id,
|
|
1041
|
-
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1042
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1017
|
+
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.templateId,
|
|
1018
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo20 === void 0 ? void 0 : _currentNodeDetail$wo20.id,
|
|
1043
1019
|
updateList: [{
|
|
1044
1020
|
dataKey: 'flowTags',
|
|
1045
1021
|
name: '标签',
|
|
1046
1022
|
dataValue: newFlowTags,
|
|
1047
|
-
oldValue: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1023
|
+
oldValue: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo21 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo21 === void 0 ? void 0 : (_currentNodeDetail$wo22 = _currentNodeDetail$wo21.jsonMap) === null || _currentNodeDetail$wo22 === void 0 ? void 0 : _currentNodeDetail$wo22.flowTags) || '[]')
|
|
1048
1024
|
}],
|
|
1049
1025
|
updateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.workOrderUpdateTime,
|
|
1050
1026
|
needTransForm: false
|
|
@@ -1052,7 +1028,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1052
1028
|
operateParams: {
|
|
1053
1029
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no11 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no11 === void 0 ? void 0 : _currentNodeDetail$no11.id,
|
|
1054
1030
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
1055
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1031
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo23 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo23 === void 0 ? void 0 : _currentNodeDetail$wo23.id,
|
|
1056
1032
|
flowTemplateId: flowTemplateId,
|
|
1057
1033
|
workOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.workOrderUpdateTime,
|
|
1058
1034
|
flowWorkOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowWorkOrderUpdateTime
|
|
@@ -1160,7 +1136,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1160
1136
|
});
|
|
1161
1137
|
}, [plat, privilege]);
|
|
1162
1138
|
var autoSubmitFn = function autoSubmitFn() {
|
|
1163
|
-
var _currentNodeDetail$
|
|
1139
|
+
var _currentNodeDetail$wo24;
|
|
1164
1140
|
// TODO: 兼容后端一些时候生成的数据异常情况,防止批量提交出现卡顿不执行情况
|
|
1165
1141
|
if (isEmpty(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder) && typeof callbackAutoSubmitResult === 'function') {
|
|
1166
1142
|
return callbackAutoSubmitResult({
|
|
@@ -1168,7 +1144,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1168
1144
|
message: '当前流程工单无工单数据,请联系实施处理'
|
|
1169
1145
|
});
|
|
1170
1146
|
}
|
|
1171
|
-
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1147
|
+
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo24 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo24 === void 0 ? void 0 : _currentNodeDetail$wo24.flowWorkOrderId)) {
|
|
1172
1148
|
setTimeout(function () {
|
|
1173
1149
|
handleSubmit();
|
|
1174
1150
|
}, 0);
|
|
@@ -1176,17 +1152,17 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1176
1152
|
};
|
|
1177
1153
|
useEffect(function () {
|
|
1178
1154
|
if (autoSubmit && !isEmpty(currentNodeDetail)) {
|
|
1179
|
-
var _currentNodeDetail$
|
|
1155
|
+
var _currentNodeDetail$wo25, _currentNodeDetail$wo26;
|
|
1180
1156
|
// SKX首节点满足下列条件、此时批量提交会等订单数据反填再提交, 其余企业批量提交还是原先逻辑,不涉及订单数据反填
|
|
1181
|
-
if (currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$
|
|
1157
|
+
if (currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo25 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo25 !== void 0 && _currentNodeDetail$wo25.notAutoFillWithFirstSubmit && autoSubmitFlag) {
|
|
1182
1158
|
autoSubmitFn();
|
|
1183
|
-
} else if (!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$
|
|
1159
|
+
} else if (!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo26 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo26 !== void 0 && _currentNodeDetail$wo26.notAutoFillWithFirstSubmit) && !autoSubmitFlag) {
|
|
1184
1160
|
autoSubmitFn();
|
|
1185
1161
|
}
|
|
1186
1162
|
}
|
|
1187
1163
|
}, [currentNodeDetail, autoSubmitFlag]);
|
|
1188
1164
|
var isCurrentNodeHandler = useMemo(function () {
|
|
1189
|
-
var _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$no17, _currentNodeDetail$no18, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$
|
|
1165
|
+
var _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$no17, _currentNodeDetail$no18, _currentNodeDetail$no19, _currentNodeDetail$no20, _currentNodeDetail$no21, _currentNodeDetail$no22, _currentNodeDetail$wo27, _currentNodeDetail$no23, _currentNodeDetail$no24;
|
|
1190
1166
|
return currentUserHasOperatorAuth({
|
|
1191
1167
|
isSuperAdmin: isSuperAdmin,
|
|
1192
1168
|
assistantList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no15 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no15 === void 0 ? void 0 : _currentNodeDetail$no15.id) && assistantMap[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no16 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no16 === void 0 ? void 0 : _currentNodeDetail$no16.id] || [],
|
|
@@ -1194,7 +1170,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1194
1170
|
currentUserKey: plat.userKey,
|
|
1195
1171
|
staffIds: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no19 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no19 === void 0 ? void 0 : (_currentNodeDetail$no20 = _currentNodeDetail$no19.assistants) === null || _currentNodeDetail$no20 === void 0 ? void 0 : _currentNodeDetail$no20.staffIds) || [],
|
|
1196
1172
|
operateDataPermission: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : (_currentNodeDetail$no22 = _currentNodeDetail$no21.assistants) === null || _currentNodeDetail$no22 === void 0 ? void 0 : _currentNodeDetail$no22.operateDataPermission,
|
|
1197
|
-
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1173
|
+
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo27 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo27 === void 0 ? void 0 : _currentNodeDetail$wo27.handlerList) || [],
|
|
1198
1174
|
isAllStaff: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no23 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no23 === void 0 ? void 0 : (_currentNodeDetail$no24 = _currentNodeDetail$no23.assistants) === null || _currentNodeDetail$no24 === void 0 ? void 0 : _currentNodeDetail$no24.isAllStaff
|
|
1199
1175
|
});
|
|
1200
1176
|
}, [currentNodeDetail, plat, assistantMap, useGroupMap]);
|
|
@@ -1203,9 +1179,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1203
1179
|
return item.accessToken === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no25 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no25 === void 0 ? void 0 : (_currentNodeDetail$no26 = _currentNodeDetail$no25.relationEvent) === null || _currentNodeDetail$no26 === void 0 ? void 0 : _currentNodeDetail$no26.defaultShopUniqueKey);
|
|
1204
1180
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopId;
|
|
1205
1181
|
var ReportOrderRender = function ReportOrderRender(props) {
|
|
1206
|
-
var _currentNodeDetail$
|
|
1182
|
+
var _currentNodeDetail$wo28, _currentNodeDetail$wo29;
|
|
1207
1183
|
var details = props.details;
|
|
1208
|
-
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1184
|
+
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo28 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo28 === void 0 ? void 0 : _currentNodeDetail$wo28.componentDtoList.filter(function (t) {
|
|
1209
1185
|
return !CANNOT_BACK_FILL.includes(t.workOrderComponentType || '');
|
|
1210
1186
|
});
|
|
1211
1187
|
//获取可以返填的组件值
|
|
@@ -1213,7 +1189,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1213
1189
|
_calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
|
|
1214
1190
|
transData = _calcWorkOrderList2[0];
|
|
1215
1191
|
//获取表单显示值
|
|
1216
|
-
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1192
|
+
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo29 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo29 === void 0 ? void 0 : _currentNodeDetail$wo29.componentDtoList),
|
|
1217
1193
|
_calcWorkOrderList4 = _slicedToArray(_calcWorkOrderList3, 1),
|
|
1218
1194
|
transDataall = _calcWorkOrderList4[0];
|
|
1219
1195
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1311,14 +1287,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1311
1287
|
}), shopItem === null || shopItem === void 0 ? void 0 : shopItem.shopName, "-"), /*#__PURE__*/React.createElement("span", null, flowWorkOrderId), !['created', 'edit'].includes(privilege) && /*#__PURE__*/React.createElement(Button, {
|
|
1312
1288
|
type: "link",
|
|
1313
1289
|
onClick: handleFollow
|
|
1314
|
-
}, !follow ? '关注' : '已关注'),
|
|
1315
|
-
order_number: tid,
|
|
1316
|
-
shop: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.taobaoNick) || '',
|
|
1317
|
-
platformType: otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType,
|
|
1318
|
-
flowTemplateKey: flowTemplateKey
|
|
1319
|
-
})), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo31 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : (_currentNodeDetail$wo32 = _currentNodeDetail$wo31.jsonMap) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : _currentNodeDetail$wo32.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
|
|
1290
|
+
}, !follow ? '关注' : '已关注')), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo30 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo30 === void 0 ? void 0 : (_currentNodeDetail$wo31 = _currentNodeDetail$wo30.jsonMap) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : _currentNodeDetail$wo31.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
|
|
1320
1291
|
color: "blue"
|
|
1321
|
-
}, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1292
|
+
}, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo32 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : (_currentNodeDetail$wo33 = _currentNodeDetail$wo32.jsonMap) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : _currentNodeDetail$wo33.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
1322
1293
|
justify: 'space-between',
|
|
1323
1294
|
className: "header"
|
|
1324
1295
|
}, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
var react_1 = require("react");
|
|
5
|
+
var react_redux_1 = require("react-redux");
|
|
6
|
+
var toolkit_1 = require("@reduxjs/toolkit");
|
|
7
|
+
var getTemplate = function getTemplate(companyUserConfig) {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
9
|
+
return JSON.stringify({
|
|
10
|
+
hasWln: (_c = (_b = (_a = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _a === void 0 ? void 0 : _a.wln) === null || _b === void 0 ? void 0 : _b.show) !== null && _c !== void 0 ? _c : false,
|
|
11
|
+
hasWdt: (_f = (_e = (_d = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _d === void 0 ? void 0 : _d.wdt) === null || _e === void 0 ? void 0 : _e.show) !== null && _f !== void 0 ? _f : false,
|
|
12
|
+
hasBs: (_j = (_h = (_g = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _g === void 0 ? void 0 : _g.bs) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : false,
|
|
13
|
+
hasE3: (_m = (_l = (_k = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _k === void 0 ? void 0 : _k.bse3) === null || _l === void 0 ? void 0 : _l.show) !== null && _m !== void 0 ? _m : false,
|
|
14
|
+
hasJst: (_q = (_p = (_o = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _o === void 0 ? void 0 : _o.jst) === null || _p === void 0 ? void 0 : _p.show) !== null && _q !== void 0 ? _q : false,
|
|
15
|
+
hasGy: (_t = (_s = (_r = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _r === void 0 ? void 0 : _r.gy) === null || _s === void 0 ? void 0 : _s.show) !== null && _t !== void 0 ? _t : false
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
function useGetHasErpData() {
|
|
19
|
+
var companyUserConfig = react_redux_1.useSelector(toolkit_1.createSelector([function (state) {
|
|
20
|
+
var _a, _b, _c, _d;
|
|
21
|
+
console.log("state--useSelector", state);
|
|
22
|
+
/**
|
|
23
|
+
* pc main
|
|
24
|
+
* 端 workOrder
|
|
25
|
+
* **/
|
|
26
|
+
return (_d = (_b = (_a = state === null || state === void 0 ? void 0 : state.main) === null || _a === void 0 ? void 0 : _a.userInfo) !== null && _b !== void 0 ? _b : (_c = state === null || state === void 0 ? void 0 : state.workOrder) === null || _c === void 0 ? void 0 : _c.userInfo) !== null && _d !== void 0 ? _d : {};
|
|
27
|
+
}], function (state) {
|
|
28
|
+
var _a;
|
|
29
|
+
var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
|
|
30
|
+
if (typeof companyUserConfig === "string") {
|
|
31
|
+
try {
|
|
32
|
+
companyUserConfig = JSON.parse(companyUserConfig);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.error("companyUserConfig转换异常", companyUserConfig);
|
|
35
|
+
companyUserConfig = {};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return companyUserConfig;
|
|
39
|
+
}));
|
|
40
|
+
var _a = react_1.useState(getTemplate({})),
|
|
41
|
+
hasErpDataJson = _a[0],
|
|
42
|
+
setHasErpDataJson = _a[1];
|
|
43
|
+
react_1.useEffect(function () {
|
|
44
|
+
setHasErpDataJson(getTemplate(companyUserConfig));
|
|
45
|
+
console.log("companyUserConfig---", companyUserConfig);
|
|
46
|
+
}, [companyUserConfig]);
|
|
47
|
+
var hasErpData = react_1.useMemo(function () {
|
|
48
|
+
return JSON.parse(hasErpDataJson);
|
|
49
|
+
}, [hasErpDataJson]);
|
|
50
|
+
return hasErpData;
|
|
51
|
+
}
|
|
52
|
+
exports["default"] = useGetHasErpData;
|