@kmkf-fe-packages/kmkf-work-order-service-component 2.0.79-beta.9 → 2.1.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/dist/esm/FlowTemplateDetailV2/common.d.ts +1 -0
- package/dist/esm/FlowTemplateDetailV2/common.js +10 -1
- package/dist/esm/FlowTemplateDetailV2/components/CurrentNode/index.js +1 -1
- package/dist/esm/FlowTemplateDetailV2/components/Item/index.js +1 -1
- package/dist/esm/FlowTemplateDetailV2/index.js +52 -74
- package/dist/esm/FlowTemplateDetailV2/index.less +0 -8
- package/dist/esm/FormRender/index.js +19 -11
- package/dist/esm/FormRenderTemplateId/index.js +19 -11
- package/dist/esm/Login/index.d.ts +0 -1
- package/dist/esm/Login/index.js +1 -3
- package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.js +18 -11
- package/dist/esm/WorkOrder/components/WorkOrderList/index.js +1 -2
- package/dist/esm/WorkOrder/index.d.ts +0 -1
- package/dist/esm/WorkOrder/index.js +27 -27
- package/dist/esm/WorkOrder/types.d.ts +0 -1
- package/dist/esm/WorkOrder/types.js +0 -1
- package/dist/esm/common/utils/constant.d.ts +0 -1
- package/dist/esm/common/utils/constant.js +1 -12
- package/dist/esm/common/utils/submitDataTransOldFormat.js +0 -1
- package/dist/esm/common/utils/tools.d.ts +1 -0
- package/dist/esm/common/utils/tools.js +11 -4
- package/dist/esm/common/utils/transformWorkOrderData.js +5 -11
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/model/flowTemplateDetail/types.d.ts +0 -1
- package/dist/esm/model/flowTemplateDetail/types.js +0 -1
- package/dist/esm/model/login.d.ts +0 -10
- package/dist/esm/model/login.js +45 -66
- package/dist/esm/model/servers/api.d.ts +0 -2
- package/dist/esm/model/servers/api.js +0 -9
- package/package.json +5 -5
- 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
|
@@ -10,6 +10,15 @@ export var getTag = function getTag(item) {
|
|
|
10
10
|
|
|
11
11
|
return tag;
|
|
12
12
|
};
|
|
13
|
+
export var platformMap = {
|
|
14
|
+
tb: '淘宝',
|
|
15
|
+
fxg: '抖音',
|
|
16
|
+
ks: '快手',
|
|
17
|
+
pdd: '拼多多',
|
|
18
|
+
jd: '京东',
|
|
19
|
+
xiaozhi: '小智',
|
|
20
|
+
pc: '客服工作台'
|
|
21
|
+
};
|
|
13
22
|
export var getFlowOperate = {
|
|
14
23
|
SAVE: '暂存',
|
|
15
24
|
SUBMIT: '提交',
|
|
@@ -37,7 +46,7 @@ export var FLOW_STATUS_V2 = {
|
|
|
37
46
|
RETURNING: '回退中'
|
|
38
47
|
};
|
|
39
48
|
//不能回填的组件type
|
|
40
|
-
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', 'BS_E3_WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE', 'ORDER_TYPE', 'REFUND_TYPE', 'RETURN_EXCHANGE_GOODS_REVIEW_STATUS'
|
|
49
|
+
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', 'BS_E3_WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE', 'ORDER_TYPE', 'REFUND_TYPE', 'RETURN_EXCHANGE_GOODS_REVIEW_STATUS'];
|
|
41
50
|
export var verifyHandle = function verifyHandle(data, componentDtoList) {
|
|
42
51
|
var _componentDtoList$fin, _componentDtoList$fin2, _data$paymentUniqueKe, _data$paymentUniqueKe2;
|
|
43
52
|
var res = {
|
|
@@ -313,7 +313,7 @@ var CurrentNode = function CurrentNode(props, ref) {
|
|
|
313
313
|
onOpenWangWang: onOpenWangWang
|
|
314
314
|
}) : /*#__PURE__*/React.createElement(FormRender, {
|
|
315
315
|
ref: formRenderRef,
|
|
316
|
-
isShowShopList: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.nodeType) &&
|
|
316
|
+
isShowShopList: NodeType.START_NODE === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no21 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no21 === void 0 ? void 0 : _currentNodeDetail$no21.nodeType) && PlatForm.PC === plat.platform,
|
|
317
317
|
plat: plat,
|
|
318
318
|
templateDetail: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo,
|
|
319
319
|
shopList: shopList,
|
|
@@ -287,7 +287,7 @@ var NodeItem = function NodeItem(props) {
|
|
|
287
287
|
marginTop: '16px'
|
|
288
288
|
}
|
|
289
289
|
}, [NodeType.START_NODE, NodeType.EXECUTE_NODE].includes(data === null || data === void 0 ? void 0 : (_data$data13 = data.data) === null || _data$data13 === void 0 ? void 0 : (_data$data13$nodeInfo = _data$data13.nodeInfo) === null || _data$data13$nodeInfo === void 0 ? void 0 : _data$data13$nodeInfo.nodeType) && (data === null || data === void 0 ? void 0 : (_data$data14 = data.data) === null || _data$data14 === void 0 ? void 0 : _data$data14.workOrderTemplateInfo) && /*#__PURE__*/React.createElement("div", null, editing ? /*#__PURE__*/React.createElement(FormRender, {
|
|
290
|
-
isShowShopList: NodeType.START_NODE === (data === null || data === void 0 ? void 0 : (_data$data15 = data.data) === null || _data$data15 === void 0 ? void 0 : (_data$data15$nodeInfo = _data$data15.nodeInfo) === null || _data$data15$nodeInfo === void 0 ? void 0 : _data$data15$nodeInfo.nodeType) &&
|
|
290
|
+
isShowShopList: NodeType.START_NODE === (data === null || data === void 0 ? void 0 : (_data$data15 = data.data) === null || _data$data15 === void 0 ? void 0 : (_data$data15$nodeInfo = _data$data15.nodeInfo) === null || _data$data15$nodeInfo === void 0 ? void 0 : _data$data15$nodeInfo.nodeType) && PlatForm.PC === plat.platform,
|
|
291
291
|
plat: plat,
|
|
292
292
|
templateDetail: data === null || data === void 0 ? void 0 : (_data$data16 = data.data) === null || _data$data16 === void 0 ? void 0 : _data$data16.workOrderTemplateInfo,
|
|
293
293
|
shopList: shopList,
|
|
@@ -56,7 +56,6 @@ import { Provide, Context } from "./context";
|
|
|
56
56
|
import { useSelector } from "./context/useSelector";
|
|
57
57
|
import { pollOperationResult } from "./pollOperationResult";
|
|
58
58
|
import { pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
59
|
-
import { PlatForm } from "../WorkOrder/types";
|
|
60
59
|
var Text = Typography.Text,
|
|
61
60
|
Link = Typography.Link;
|
|
62
61
|
var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
@@ -244,7 +243,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
244
243
|
// 保存
|
|
245
244
|
var handleSave = /*#__PURE__*/function () {
|
|
246
245
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
247
|
-
var _currentNodeDetail$
|
|
246
|
+
var _currentNodeDetail$wo4, update, formData, params, res, _currentNodeDetail$wo5;
|
|
248
247
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
249
248
|
while (1) switch (_context.prev = _context.next) {
|
|
250
249
|
case 0:
|
|
@@ -261,36 +260,14 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
261
260
|
payload: true
|
|
262
261
|
});
|
|
263
262
|
update = !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder); // 如果workOrder有值的情况下,表示我们是更新操作
|
|
264
|
-
formData = {};
|
|
265
|
-
if (!(flowTemplateType === 'SINGLE_PAGE')) {
|
|
266
|
-
_context.next = 18;
|
|
267
|
-
break;
|
|
268
|
-
}
|
|
269
|
-
_context.next = 10;
|
|
270
|
-
return form.validateFields();
|
|
271
|
-
case 10:
|
|
272
|
-
formData = _context.sent;
|
|
273
|
-
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.componentDtoList) || []);
|
|
274
|
-
if (result.success) {
|
|
275
|
-
_context.next = 16;
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
message.error(result.message);
|
|
279
|
-
saveRequestUnlock();
|
|
280
|
-
return _context.abrupt("return");
|
|
281
|
-
case 16:
|
|
282
|
-
_context.next = 19;
|
|
283
|
-
break;
|
|
284
|
-
case 18:
|
|
285
263
|
formData = form.getFieldsValue();
|
|
286
|
-
case 19:
|
|
287
264
|
if (formData.shopId) {
|
|
288
|
-
_context.next =
|
|
265
|
+
_context.next = 10;
|
|
289
266
|
break;
|
|
290
267
|
}
|
|
291
268
|
saveRequestUnlock();
|
|
292
269
|
return _context.abrupt("return", message.error('请选择店铺'));
|
|
293
|
-
case
|
|
270
|
+
case 10:
|
|
294
271
|
params = submitParams({
|
|
295
272
|
update: update,
|
|
296
273
|
formData: formData,
|
|
@@ -299,15 +276,16 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
299
276
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
300
277
|
flowTemplateId: flowTemplateId,
|
|
301
278
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
302
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
279
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.id
|
|
303
280
|
}),
|
|
304
281
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
305
282
|
return s.shopId === formData.shopId;
|
|
306
283
|
}), 'accessToken', '')
|
|
307
|
-
});
|
|
308
|
-
|
|
284
|
+
}); // console.log(params);
|
|
285
|
+
// return;
|
|
286
|
+
_context.next = 13;
|
|
309
287
|
return saveWorkOrder(params);
|
|
310
|
-
case
|
|
288
|
+
case 13:
|
|
311
289
|
res = _context.sent;
|
|
312
290
|
saveRequestUnlock();
|
|
313
291
|
if (res.success) {
|
|
@@ -325,7 +303,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
325
303
|
}
|
|
326
304
|
//删除缓存的订单信息
|
|
327
305
|
deleteCacheOrder({
|
|
328
|
-
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
306
|
+
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo5 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo5 === void 0 ? void 0 : _currentNodeDetail$wo5.componentDtoList,
|
|
329
307
|
values: formData,
|
|
330
308
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.nodeId,
|
|
331
309
|
flowTemplateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.flowTemplateId,
|
|
@@ -333,17 +311,17 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
333
311
|
unDeleteOrderInfo: true
|
|
334
312
|
});
|
|
335
313
|
}
|
|
336
|
-
_context.next =
|
|
314
|
+
_context.next = 21;
|
|
337
315
|
break;
|
|
338
|
-
case
|
|
339
|
-
_context.prev =
|
|
316
|
+
case 18:
|
|
317
|
+
_context.prev = 18;
|
|
340
318
|
_context.t0 = _context["catch"](0);
|
|
341
319
|
saveRequestUnlock();
|
|
342
|
-
case
|
|
320
|
+
case 21:
|
|
343
321
|
case "end":
|
|
344
322
|
return _context.stop();
|
|
345
323
|
}
|
|
346
|
-
}, _callee, null, [[0,
|
|
324
|
+
}, _callee, null, [[0, 18]]);
|
|
347
325
|
}));
|
|
348
326
|
return function handleSave() {
|
|
349
327
|
return _ref.apply(this, arguments);
|
|
@@ -353,7 +331,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
353
331
|
// 开启
|
|
354
332
|
var handleStart = /*#__PURE__*/function () {
|
|
355
333
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
356
|
-
var _currentNodeDetail$no3, _currentNodeDetail$
|
|
334
|
+
var _currentNodeDetail$no3, _currentNodeDetail$wo6, _res$data4, _res$data4$failList, res, _res$data5, _res$data5$failList, _res$data5$failList$;
|
|
357
335
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
358
336
|
while (1) switch (_context2.prev = _context2.next) {
|
|
359
337
|
case 0:
|
|
@@ -364,7 +342,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
364
342
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no3 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no3 === void 0 ? void 0 : _currentNodeDetail$no3.id,
|
|
365
343
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
366
344
|
flowTemplateId: flowTemplateId,
|
|
367
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
345
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo6 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo6 === void 0 ? void 0 : _currentNodeDetail$wo6.id
|
|
368
346
|
})
|
|
369
347
|
});
|
|
370
348
|
case 3:
|
|
@@ -438,7 +416,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
438
416
|
// 提交
|
|
439
417
|
var handleSubmit = /*#__PURE__*/function () {
|
|
440
418
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
441
|
-
var _currentNodeDetail$
|
|
419
|
+
var _currentNodeDetail$wo7, _currentNodeDetail$wo8, formData, result, params, res, _currentNodeDetail$wo9;
|
|
442
420
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
443
421
|
while (1) switch (_context4.prev = _context4.next) {
|
|
444
422
|
case 0:
|
|
@@ -458,7 +436,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
458
436
|
return form.validateFields();
|
|
459
437
|
case 7:
|
|
460
438
|
formData = _context4.sent;
|
|
461
|
-
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
439
|
+
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo7 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : _currentNodeDetail$wo7.componentDtoList) || []);
|
|
462
440
|
if (result.success) {
|
|
463
441
|
_context4.next = 13;
|
|
464
442
|
break;
|
|
@@ -475,7 +453,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
475
453
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
476
454
|
flowTemplateId: flowTemplateId,
|
|
477
455
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
478
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
456
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.id
|
|
479
457
|
}),
|
|
480
458
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
481
459
|
return s.shopId === formData.shopId;
|
|
@@ -499,7 +477,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
499
477
|
handleSuccessCallBack('submit');
|
|
500
478
|
//删除缓存的订单信息
|
|
501
479
|
deleteCacheOrder({
|
|
502
|
-
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
480
|
+
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.componentDtoList,
|
|
503
481
|
values: formData,
|
|
504
482
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.nodeId,
|
|
505
483
|
flowTemplateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.flowTemplateId,
|
|
@@ -581,9 +559,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
581
559
|
}
|
|
582
560
|
};
|
|
583
561
|
var checkOnlySubmit = function checkOnlySubmit() {
|
|
584
|
-
var _currentNodeRef$curre, _currentNodeDetail$
|
|
562
|
+
var _currentNodeRef$curre, _currentNodeDetail$wo10;
|
|
585
563
|
var replaceValue = currentNodeRef === null || currentNodeRef === void 0 ? void 0 : (_currentNodeRef$curre = currentNodeRef.current) === null || _currentNodeRef$curre === void 0 ? void 0 : _currentNodeRef$curre.getReplaceValue();
|
|
586
|
-
var componentList = ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
564
|
+
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) {
|
|
587
565
|
var _t$componentConfig;
|
|
588
566
|
return (_t$componentConfig = t.componentConfig) === null || _t$componentConfig === void 0 ? void 0 : _t$componentConfig.repeatCheck;
|
|
589
567
|
});
|
|
@@ -664,7 +642,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
664
642
|
// 暂停工单
|
|
665
643
|
var handleStop = /*#__PURE__*/function () {
|
|
666
644
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(formData) {
|
|
667
|
-
var _currentNodeDetail$no4, _currentNodeDetail$
|
|
645
|
+
var _currentNodeDetail$no4, _currentNodeDetail$wo11, _res$data6, _res$data6$failList, res, _res$data7, _res$data7$failList, _res$data7$failList$;
|
|
668
646
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
669
647
|
while (1) switch (_context6.prev = _context6.next) {
|
|
670
648
|
case 0:
|
|
@@ -675,7 +653,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
675
653
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no4 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no4 === void 0 ? void 0 : _currentNodeDetail$no4.id,
|
|
676
654
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
677
655
|
flowTemplateId: flowTemplateId,
|
|
678
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
656
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.id
|
|
679
657
|
})
|
|
680
658
|
}));
|
|
681
659
|
case 3:
|
|
@@ -716,19 +694,19 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
716
694
|
// 关闭工单
|
|
717
695
|
var handleClose = /*#__PURE__*/function () {
|
|
718
696
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(formData, form) {
|
|
719
|
-
var _currentNodeDetail$
|
|
697
|
+
var _currentNodeDetail$wo12, _currentNodeDetail$no5, _currentNodeDetail$wo13, _res$data8, _res$data8$failList, res, _res$data9, _res$data9$failList, _res$data9$failList$;
|
|
720
698
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
721
699
|
while (1) switch (_context7.prev = _context7.next) {
|
|
722
700
|
case 0:
|
|
723
701
|
_context7.prev = 0;
|
|
724
702
|
_context7.next = 3;
|
|
725
703
|
return closeWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
726
|
-
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
704
|
+
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.flowStatus,
|
|
727
705
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
728
706
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no5 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no5 === void 0 ? void 0 : _currentNodeDetail$no5.id,
|
|
729
707
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
730
708
|
flowTemplateId: flowTemplateId,
|
|
731
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
709
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.id
|
|
732
710
|
})
|
|
733
711
|
}));
|
|
734
712
|
case 3:
|
|
@@ -765,7 +743,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
765
743
|
// 转交处理人
|
|
766
744
|
var handleForWard = /*#__PURE__*/function () {
|
|
767
745
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(formData) {
|
|
768
|
-
var _currentNodeDetail$no6, _currentNodeDetail$
|
|
746
|
+
var _currentNodeDetail$no6, _currentNodeDetail$wo14, _res$data10, _res$data10$failList, res, _res$data11, _res$data11$failList, _res$data11$failList$;
|
|
769
747
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
770
748
|
while (1) switch (_context8.prev = _context8.next) {
|
|
771
749
|
case 0:
|
|
@@ -776,7 +754,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
776
754
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no6 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no6 === void 0 ? void 0 : _currentNodeDetail$no6.id,
|
|
777
755
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
778
756
|
flowTemplateId: flowTemplateId,
|
|
779
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
757
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.id
|
|
780
758
|
})
|
|
781
759
|
}));
|
|
782
760
|
case 3:
|
|
@@ -813,7 +791,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
813
791
|
// 驳回
|
|
814
792
|
var handleReturnWorkOrder = /*#__PURE__*/function () {
|
|
815
793
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(formData) {
|
|
816
|
-
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no7, _currentNodeDetail$
|
|
794
|
+
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no7, _currentNodeDetail$wo15, res, _res$data$failList$0$, _res$data12, _res$data12$failList, _res$data12$failList$;
|
|
817
795
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
818
796
|
while (1) switch (_context9.prev = _context9.next) {
|
|
819
797
|
case 0:
|
|
@@ -856,7 +834,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
856
834
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : _currentNodeDetail$no7.id,
|
|
857
835
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
858
836
|
flowTemplateId: flowTemplateId,
|
|
859
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
837
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : _currentNodeDetail$wo15.id
|
|
860
838
|
})
|
|
861
839
|
}));
|
|
862
840
|
case 7:
|
|
@@ -902,7 +880,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
902
880
|
// 撤回
|
|
903
881
|
var handleWithdraw = /*#__PURE__*/function () {
|
|
904
882
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(formData) {
|
|
905
|
-
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no8, _currentNodeDetail$
|
|
883
|
+
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no8, _currentNodeDetail$wo16, res, _res$data$failList$0$2, _res$data13, _res$data13$failList, _res$data13$failList$;
|
|
906
884
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
907
885
|
while (1) switch (_context10.prev = _context10.next) {
|
|
908
886
|
case 0:
|
|
@@ -946,7 +924,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
946
924
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no8 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no8 === void 0 ? void 0 : _currentNodeDetail$no8.id,
|
|
947
925
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
948
926
|
flowTemplateId: flowTemplateId,
|
|
949
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
927
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.id
|
|
950
928
|
})
|
|
951
929
|
}));
|
|
952
930
|
case 7:
|
|
@@ -992,7 +970,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
992
970
|
//催单
|
|
993
971
|
var handleReminder = /*#__PURE__*/function () {
|
|
994
972
|
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(type) {
|
|
995
|
-
var _currentNodeDetail$
|
|
973
|
+
var _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$no9, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$wo22, _currentNodeDetail$no10, _currentNodeDetail$wo23, _res$data14, _res$data14$failList, api, flowTags, newFlowTags, params, res, _res$data15, _res$data15$failList, _res$data15$failList$;
|
|
996
974
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
997
975
|
while (1) switch (_context11.prev = _context11.next) {
|
|
998
976
|
case 0:
|
|
@@ -1002,20 +980,20 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1002
980
|
payload: true
|
|
1003
981
|
});
|
|
1004
982
|
api = type === 'reminder' ? reminder : cancelReminder;
|
|
1005
|
-
flowTags = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
983
|
+
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) || '[]');
|
|
1006
984
|
newFlowTags = type === 'reminder' ? flowTags.concat('REMINDER') : flowTags.filter(function (t) {
|
|
1007
985
|
return t !== 'REMINDER';
|
|
1008
986
|
});
|
|
1009
987
|
params = {
|
|
1010
988
|
updateInfo: {
|
|
1011
989
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : _currentNodeDetail$no9.id,
|
|
1012
|
-
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1013
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
990
|
+
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.templateId,
|
|
991
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo20 === void 0 ? void 0 : _currentNodeDetail$wo20.id,
|
|
1014
992
|
updateList: [{
|
|
1015
993
|
dataKey: 'flowTags',
|
|
1016
994
|
name: '标签',
|
|
1017
995
|
dataValue: newFlowTags,
|
|
1018
|
-
oldValue: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
996
|
+
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) || '[]')
|
|
1019
997
|
}],
|
|
1020
998
|
updateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.workOrderUpdateTime,
|
|
1021
999
|
needTransForm: false
|
|
@@ -1023,7 +1001,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1023
1001
|
operateParams: {
|
|
1024
1002
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no10 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no10 === void 0 ? void 0 : _currentNodeDetail$no10.id,
|
|
1025
1003
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
1026
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1004
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo23 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo23 === void 0 ? void 0 : _currentNodeDetail$wo23.id,
|
|
1027
1005
|
flowTemplateId: flowTemplateId,
|
|
1028
1006
|
workOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.workOrderUpdateTime,
|
|
1029
1007
|
flowWorkOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowWorkOrderUpdateTime
|
|
@@ -1078,7 +1056,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1078
1056
|
var shopId = details.shopId,
|
|
1079
1057
|
ohter = _objectWithoutProperties(details, _excluded);
|
|
1080
1058
|
var formData = form.getFieldsValue();
|
|
1081
|
-
var params =
|
|
1059
|
+
var params = plat.platform === 'pc' ? _objectSpread(_objectSpread({}, formData), details) : _objectSpread(_objectSpread({}, formData), ohter);
|
|
1082
1060
|
form.setFieldsValue(params);
|
|
1083
1061
|
message.success('填充成功');
|
|
1084
1062
|
// 填充表单后触发映射
|
|
@@ -1112,7 +1090,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1112
1090
|
}, [plat]);
|
|
1113
1091
|
useEffect(function () {
|
|
1114
1092
|
if (autoSubmit && !isNull(currentNodeDetail)) {
|
|
1115
|
-
var _currentNodeDetail$
|
|
1093
|
+
var _currentNodeDetail$wo24;
|
|
1116
1094
|
// TODO: 兼容后端一些时候生成的数据异常情况,防止批量提交出现卡顿不执行情况
|
|
1117
1095
|
if (isEmpty(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder) && typeof callbackAutoSubmitResult === 'function') {
|
|
1118
1096
|
return callbackAutoSubmitResult({
|
|
@@ -1120,7 +1098,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1120
1098
|
message: '当前流程工单无工单数据,请联系实施处理'
|
|
1121
1099
|
});
|
|
1122
1100
|
}
|
|
1123
|
-
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1101
|
+
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo24 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo24 === void 0 ? void 0 : _currentNodeDetail$wo24.flowWorkOrderId)) {
|
|
1124
1102
|
setTimeout(function () {
|
|
1125
1103
|
handleSubmit();
|
|
1126
1104
|
}, 0);
|
|
@@ -1128,13 +1106,13 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1128
1106
|
}
|
|
1129
1107
|
}, [currentNodeDetail]);
|
|
1130
1108
|
var isCurrentNodeHandler = useMemo(function () {
|
|
1131
|
-
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$
|
|
1109
|
+
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$wo25, _currentNodeDetail$no17, _currentNodeDetail$no18;
|
|
1132
1110
|
return currentUserHasOperatorAuth({
|
|
1133
1111
|
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] || [],
|
|
1134
1112
|
currentUserKey: plat.userKey,
|
|
1135
1113
|
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) || [],
|
|
1136
1114
|
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,
|
|
1137
|
-
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1115
|
+
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo25 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo25 === void 0 ? void 0 : _currentNodeDetail$wo25.handlerList) || [],
|
|
1138
1116
|
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
|
|
1139
1117
|
});
|
|
1140
1118
|
}, [currentNodeDetail, plat, assistantMap]);
|
|
@@ -1143,9 +1121,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1143
1121
|
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);
|
|
1144
1122
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopId;
|
|
1145
1123
|
var ReportOrderRender = function ReportOrderRender(props) {
|
|
1146
|
-
var _currentNodeDetail$
|
|
1124
|
+
var _currentNodeDetail$wo26, _currentNodeDetail$wo27;
|
|
1147
1125
|
var details = props.details;
|
|
1148
|
-
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1126
|
+
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo26 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo26 === void 0 ? void 0 : _currentNodeDetail$wo26.componentDtoList.filter(function (t) {
|
|
1149
1127
|
return !CANNOT_BACK_FILL.includes(t.workOrderComponentType || '');
|
|
1150
1128
|
});
|
|
1151
1129
|
//获取可以返填的组件值
|
|
@@ -1153,7 +1131,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1153
1131
|
_calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
|
|
1154
1132
|
transData = _calcWorkOrderList2[0];
|
|
1155
1133
|
//获取表单显示值
|
|
1156
|
-
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1134
|
+
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo27 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo27 === void 0 ? void 0 : _currentNodeDetail$wo27.componentDtoList),
|
|
1157
1135
|
_calcWorkOrderList4 = _slicedToArray(_calcWorkOrderList3, 1),
|
|
1158
1136
|
transDataall = _calcWorkOrderList4[0];
|
|
1159
1137
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1205,7 +1183,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1205
1183
|
var _operateParams$maxPub2, _operateParams$maxPub3;
|
|
1206
1184
|
return /*#__PURE__*/React.createElement(Text, {
|
|
1207
1185
|
type: "secondary"
|
|
1208
|
-
}, /*#__PURE__*/React.createElement(InfoCircleOutlined, null), "\u5F53\u524D\u5DE5\u5355\u6240\u5C5E\u6D41\u7A0B", plat.platform ===
|
|
1186
|
+
}, /*#__PURE__*/React.createElement(InfoCircleOutlined, null), "\u5F53\u524D\u5DE5\u5355\u6240\u5C5E\u6D41\u7A0B", plat.platform === 'pc' ? /*#__PURE__*/React.createElement(Link, {
|
|
1209
1187
|
style: {
|
|
1210
1188
|
cursor: 'pointer'
|
|
1211
1189
|
},
|
|
@@ -1215,7 +1193,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1215
1193
|
flowTemplateId: flowTemplateId
|
|
1216
1194
|
});
|
|
1217
1195
|
}
|
|
1218
|
-
}, "v", operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowVersion, "\u7248") : "v".concat(operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowVersion, "\u7248"), "\uFF0C\u76EE\u524D\u6700\u65B0\u6D41\u7A0B", plat.platform ===
|
|
1196
|
+
}, "v", operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowVersion, "\u7248") : "v".concat(operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowVersion, "\u7248"), "\uFF0C\u76EE\u524D\u6700\u65B0\u6D41\u7A0B", plat.platform === 'pc' ? /*#__PURE__*/React.createElement(Link, {
|
|
1219
1197
|
style: {
|
|
1220
1198
|
cursor: 'pointer'
|
|
1221
1199
|
},
|
|
@@ -1238,7 +1216,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1238
1216
|
spinning: loading || orderBackLoading || orderBackKmLoading
|
|
1239
1217
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1240
1218
|
className: "flowWorkOrderDetail"
|
|
1241
|
-
}, flowWorkOrderId && /*#__PURE__*/React.createElement("div", null,
|
|
1219
|
+
}, flowWorkOrderId && /*#__PURE__*/React.createElement("div", null, plat.platform === 'pc' && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(PlatformAvatar, {
|
|
1242
1220
|
type: shopItem === null || shopItem === void 0 ? void 0 : shopItem.shopSource,
|
|
1243
1221
|
styles: {
|
|
1244
1222
|
marginRight: 5
|
|
@@ -1256,7 +1234,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1256
1234
|
}), /*#__PURE__*/React.createElement("span", null, FLOW_STATUS_V2[flowStatus]), /*#__PURE__*/React.createElement(Button, {
|
|
1257
1235
|
onClick: reFreshPanel,
|
|
1258
1236
|
type: "link"
|
|
1259
|
-
}, "\u5237\u65B0"), plat.platform ===
|
|
1237
|
+
}, "\u5237\u65B0"), plat.platform === 'pc' ? VersionText() : '')), flowTemplateType !== 'SINGLE_PAGE' && /*#__PURE__*/React.createElement(Col, {
|
|
1260
1238
|
style: {
|
|
1261
1239
|
position: 'relative',
|
|
1262
1240
|
zIndex: 1,
|
|
@@ -1272,7 +1250,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1272
1250
|
onClick: function onClick() {
|
|
1273
1251
|
return setOpenCloseVisible('close');
|
|
1274
1252
|
}
|
|
1275
|
-
}, "\u6536\u8D77\u5168\u90E8"))), plat.platform !==
|
|
1253
|
+
}, "\u6536\u8D77\u5168\u90E8"))), plat.platform !== 'pc' ? VersionText() : ''), /*#__PURE__*/React.createElement("div", {
|
|
1276
1254
|
className: "center ".concat(readonly ? 'readonly' : '')
|
|
1277
1255
|
}, currentTradeIdLinkWorkOrderId.total > 0 && /*#__PURE__*/React.createElement("div", {
|
|
1278
1256
|
className: "alertRepeatTradeId"
|
|
@@ -27,7 +27,6 @@ import zhCN from 'antd/es/locale/zh_CN';
|
|
|
27
27
|
import { get, find, some, set, last, every, cloneDeep } from 'lodash';
|
|
28
28
|
import 'moment/locale/zh-cn';
|
|
29
29
|
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME } from "../common/utils/tools";
|
|
30
|
-
import { platformMap } from "../common/utils/constant";
|
|
31
30
|
import submitDataTransOldFormat from "../common/utils/submitDataTransOldFormat";
|
|
32
31
|
import { queryTemplateDetail, addLogicFlowWorkOrder, queryWorkOrderDetail, updateWorkOrder, replaceCheck, queryTemplateIdByFlowId } from "../model/servers/api";
|
|
33
32
|
import { factory, ShopList } from '@kmkf-fe-packages/services-components';
|
|
@@ -137,7 +136,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
137
136
|
};
|
|
138
137
|
var asyncDoSave = /*#__PURE__*/function () {
|
|
139
138
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workOrderDetail, templateDetail) {
|
|
140
|
-
var _Object$keys, _templateDetail$compo3, data, res, finalComponentList, finalDtoList, newTemplateDetail, params, submitData, _yield$updateWorkOrde, success, _templateDetail$flowT, _templateDetail$flowT2, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addLogicFlowWo, _success;
|
|
139
|
+
var _Object$keys, _templateDetail$compo3, data, res, finalComponentList, finalDtoList, newTemplateDetail, params, submitData, _yield$updateWorkOrde, success, _templateDetail$flowT, _templateDetail$flowT2, platformMap, _params, hasEnterPrisePayment, getEnterPrisePaymentData, uniqueKey, componentConfig, _yield$addLogicFlowWo, _success;
|
|
141
140
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
142
141
|
while (1) switch (_context.prev = _context.next) {
|
|
143
142
|
case 0:
|
|
@@ -211,9 +210,18 @@ var FormRender = function FormRender(props, ref) {
|
|
|
211
210
|
id: workOrderId
|
|
212
211
|
});
|
|
213
212
|
}
|
|
214
|
-
_context.next =
|
|
213
|
+
_context.next = 42;
|
|
215
214
|
break;
|
|
216
215
|
case 29:
|
|
216
|
+
platformMap = {
|
|
217
|
+
tb: '淘宝',
|
|
218
|
+
fxg: '抖音',
|
|
219
|
+
ks: '快手',
|
|
220
|
+
pdd: '拼多多',
|
|
221
|
+
jd: '京东',
|
|
222
|
+
xiaozhi: '小智',
|
|
223
|
+
pc: '客服工作台'
|
|
224
|
+
};
|
|
217
225
|
_params = {
|
|
218
226
|
apiName: 'addWorkOrder',
|
|
219
227
|
shopId: shopId,
|
|
@@ -251,13 +259,13 @@ var FormRender = function FormRender(props, ref) {
|
|
|
251
259
|
}
|
|
252
260
|
console.debug('增加数据参数', _params, templateDetail);
|
|
253
261
|
// return;
|
|
254
|
-
_context.next =
|
|
262
|
+
_context.next = 39;
|
|
255
263
|
return addLogicFlowWorkOrder({
|
|
256
264
|
workOrderVo: _params,
|
|
257
265
|
flowTemplateId: templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$flowT = templateDetail.flowTemplateConfig) === null || _templateDetail$flowT === void 0 ? void 0 : _templateDetail$flowT.flowTemplateId,
|
|
258
266
|
nodeId: templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$flowT2 = templateDetail.flowTemplateConfig) === null || _templateDetail$flowT2 === void 0 ? void 0 : _templateDetail$flowT2.nodeId
|
|
259
267
|
});
|
|
260
|
-
case
|
|
268
|
+
case 39:
|
|
261
269
|
_yield$addLogicFlowWo = _context.sent;
|
|
262
270
|
_success = _yield$addLogicFlowWo.success;
|
|
263
271
|
if (_success && typeof onFormSubmitSuccess === 'function') {
|
|
@@ -267,12 +275,12 @@ var FormRender = function FormRender(props, ref) {
|
|
|
267
275
|
result: _success
|
|
268
276
|
});
|
|
269
277
|
}
|
|
270
|
-
case
|
|
278
|
+
case 42:
|
|
271
279
|
console.groupEnd();
|
|
272
|
-
_context.next =
|
|
280
|
+
_context.next = 49;
|
|
273
281
|
break;
|
|
274
|
-
case
|
|
275
|
-
_context.prev =
|
|
282
|
+
case 45:
|
|
283
|
+
_context.prev = 45;
|
|
276
284
|
_context.t0 = _context["catch"](0);
|
|
277
285
|
onFormSubmitSuccess === null || onFormSubmitSuccess === void 0 ? void 0 : onFormSubmitSuccess({
|
|
278
286
|
type: ''
|
|
@@ -288,11 +296,11 @@ var FormRender = function FormRender(props, ref) {
|
|
|
288
296
|
});
|
|
289
297
|
}, 0);
|
|
290
298
|
}
|
|
291
|
-
case
|
|
299
|
+
case 49:
|
|
292
300
|
case "end":
|
|
293
301
|
return _context.stop();
|
|
294
302
|
}
|
|
295
|
-
}, _callee, null, [[0,
|
|
303
|
+
}, _callee, null, [[0, 45]]);
|
|
296
304
|
}));
|
|
297
305
|
return function asyncDoSave(_x2, _x3) {
|
|
298
306
|
return _ref2.apply(this, arguments);
|