@kmkf-fe-packages/kmkf-work-order-service-component 2.0.54-beta.3 → 2.0.54
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/index.js +46 -67
- package/dist/esm/Login/index.d.ts +0 -1
- package/dist/esm/Login/index.js +2 -4
- package/dist/esm/common/utils/constant.js +0 -4
- package/dist/esm/common/utils/submitDataTransOldFormat.js +0 -1
- package/dist/esm/common/utils/tools.d.ts +0 -1
- package/dist/esm/common/utils/tools.js +12 -58
- package/dist/esm/common/utils/transformWorkOrderData.js +0 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/model/login.d.ts +0 -10
- package/dist/esm/model/login.js +25 -46
- 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
|
@@ -241,7 +241,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
241
241
|
// 保存
|
|
242
242
|
var handleSave = /*#__PURE__*/function () {
|
|
243
243
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
244
|
-
var _currentNodeDetail$
|
|
244
|
+
var _currentNodeDetail$wo4, update, formData, params, res, _currentNodeDetail$wo5;
|
|
245
245
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
246
246
|
while (1) switch (_context.prev = _context.next) {
|
|
247
247
|
case 0:
|
|
@@ -258,36 +258,14 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
258
258
|
payload: true
|
|
259
259
|
});
|
|
260
260
|
update = !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder); // 如果workOrder有值的情况下,表示我们是更新操作
|
|
261
|
-
formData = {};
|
|
262
|
-
if (!(flowTemplateType === 'SINGLE_PAGE')) {
|
|
263
|
-
_context.next = 18;
|
|
264
|
-
break;
|
|
265
|
-
}
|
|
266
|
-
_context.next = 10;
|
|
267
|
-
return form.validateFields();
|
|
268
|
-
case 10:
|
|
269
|
-
formData = _context.sent;
|
|
270
|
-
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.componentDtoList) || []);
|
|
271
|
-
if (result.success) {
|
|
272
|
-
_context.next = 16;
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
message.error(result.message);
|
|
276
|
-
saveRequestUnlock();
|
|
277
|
-
return _context.abrupt("return");
|
|
278
|
-
case 16:
|
|
279
|
-
_context.next = 19;
|
|
280
|
-
break;
|
|
281
|
-
case 18:
|
|
282
261
|
formData = form.getFieldsValue();
|
|
283
|
-
case 19:
|
|
284
262
|
if (formData.shopId) {
|
|
285
|
-
_context.next =
|
|
263
|
+
_context.next = 10;
|
|
286
264
|
break;
|
|
287
265
|
}
|
|
288
266
|
saveRequestUnlock();
|
|
289
267
|
return _context.abrupt("return", message.error('请选择店铺'));
|
|
290
|
-
case
|
|
268
|
+
case 10:
|
|
291
269
|
params = submitParams({
|
|
292
270
|
update: update,
|
|
293
271
|
formData: formData,
|
|
@@ -296,15 +274,16 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
296
274
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
297
275
|
flowTemplateId: flowTemplateId,
|
|
298
276
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
299
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
277
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.id
|
|
300
278
|
}),
|
|
301
279
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
302
280
|
return s.shopId === formData.shopId;
|
|
303
281
|
}), 'accessToken', '')
|
|
304
|
-
});
|
|
305
|
-
|
|
282
|
+
}); // console.log(params);
|
|
283
|
+
// return;
|
|
284
|
+
_context.next = 13;
|
|
306
285
|
return saveWorkOrder(params);
|
|
307
|
-
case
|
|
286
|
+
case 13:
|
|
308
287
|
res = _context.sent;
|
|
309
288
|
saveRequestUnlock();
|
|
310
289
|
if (res.success) {
|
|
@@ -322,7 +301,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
322
301
|
}
|
|
323
302
|
//删除缓存的订单信息
|
|
324
303
|
deleteCacheOrder({
|
|
325
|
-
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
304
|
+
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo5 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo5 === void 0 ? void 0 : _currentNodeDetail$wo5.componentDtoList,
|
|
326
305
|
values: formData,
|
|
327
306
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.nodeId,
|
|
328
307
|
flowTemplateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.flowTemplateId,
|
|
@@ -330,17 +309,17 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
330
309
|
unDeleteOrderInfo: true
|
|
331
310
|
});
|
|
332
311
|
}
|
|
333
|
-
_context.next =
|
|
312
|
+
_context.next = 21;
|
|
334
313
|
break;
|
|
335
|
-
case
|
|
336
|
-
_context.prev =
|
|
314
|
+
case 18:
|
|
315
|
+
_context.prev = 18;
|
|
337
316
|
_context.t0 = _context["catch"](0);
|
|
338
317
|
saveRequestUnlock();
|
|
339
|
-
case
|
|
318
|
+
case 21:
|
|
340
319
|
case "end":
|
|
341
320
|
return _context.stop();
|
|
342
321
|
}
|
|
343
|
-
}, _callee, null, [[0,
|
|
322
|
+
}, _callee, null, [[0, 18]]);
|
|
344
323
|
}));
|
|
345
324
|
return function handleSave() {
|
|
346
325
|
return _ref.apply(this, arguments);
|
|
@@ -350,7 +329,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
350
329
|
// 开启
|
|
351
330
|
var handleStart = /*#__PURE__*/function () {
|
|
352
331
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
353
|
-
var _currentNodeDetail$no3, _currentNodeDetail$
|
|
332
|
+
var _currentNodeDetail$no3, _currentNodeDetail$wo6, _res$data4, _res$data4$failList, res, _res$data5, _res$data5$failList, _res$data5$failList$;
|
|
354
333
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
355
334
|
while (1) switch (_context2.prev = _context2.next) {
|
|
356
335
|
case 0:
|
|
@@ -361,7 +340,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
361
340
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no3 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no3 === void 0 ? void 0 : _currentNodeDetail$no3.id,
|
|
362
341
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
363
342
|
flowTemplateId: flowTemplateId,
|
|
364
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
343
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo6 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo6 === void 0 ? void 0 : _currentNodeDetail$wo6.id
|
|
365
344
|
})
|
|
366
345
|
});
|
|
367
346
|
case 3:
|
|
@@ -435,7 +414,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
435
414
|
// 提交
|
|
436
415
|
var handleSubmit = /*#__PURE__*/function () {
|
|
437
416
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
438
|
-
var _currentNodeDetail$
|
|
417
|
+
var _currentNodeDetail$wo7, _currentNodeDetail$wo8, formData, result, params, res, _currentNodeDetail$wo9;
|
|
439
418
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
440
419
|
while (1) switch (_context4.prev = _context4.next) {
|
|
441
420
|
case 0:
|
|
@@ -455,7 +434,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
455
434
|
return form.validateFields();
|
|
456
435
|
case 7:
|
|
457
436
|
formData = _context4.sent;
|
|
458
|
-
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
437
|
+
result = verifyHandle(formData, (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo7 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : _currentNodeDetail$wo7.componentDtoList) || []);
|
|
459
438
|
if (result.success) {
|
|
460
439
|
_context4.next = 13;
|
|
461
440
|
break;
|
|
@@ -472,7 +451,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
472
451
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
473
452
|
flowTemplateId: flowTemplateId,
|
|
474
453
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
475
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
454
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.id
|
|
476
455
|
}),
|
|
477
456
|
shopUniqueKey: get(find(shopList, function (s) {
|
|
478
457
|
return s.shopId === formData.shopId;
|
|
@@ -496,7 +475,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
496
475
|
handleSuccessCallBack('submit');
|
|
497
476
|
//删除缓存的订单信息
|
|
498
477
|
deleteCacheOrder({
|
|
499
|
-
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
478
|
+
templateList: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.componentDtoList,
|
|
500
479
|
values: formData,
|
|
501
480
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.nodeId,
|
|
502
481
|
flowTemplateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo.flowTemplateConfig.flowTemplateId,
|
|
@@ -578,9 +557,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
578
557
|
}
|
|
579
558
|
};
|
|
580
559
|
var checkOnlySubmit = function checkOnlySubmit() {
|
|
581
|
-
var _currentNodeRef$curre, _currentNodeDetail$
|
|
560
|
+
var _currentNodeRef$curre, _currentNodeDetail$wo10;
|
|
582
561
|
var replaceValue = currentNodeRef === null || currentNodeRef === void 0 ? void 0 : (_currentNodeRef$curre = currentNodeRef.current) === null || _currentNodeRef$curre === void 0 ? void 0 : _currentNodeRef$curre.getReplaceValue();
|
|
583
|
-
var componentList = ((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
562
|
+
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) {
|
|
584
563
|
var _t$componentConfig;
|
|
585
564
|
return (_t$componentConfig = t.componentConfig) === null || _t$componentConfig === void 0 ? void 0 : _t$componentConfig.repeatCheck;
|
|
586
565
|
});
|
|
@@ -661,7 +640,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
661
640
|
// 暂停工单
|
|
662
641
|
var handleStop = /*#__PURE__*/function () {
|
|
663
642
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(formData) {
|
|
664
|
-
var _currentNodeDetail$no4, _currentNodeDetail$
|
|
643
|
+
var _currentNodeDetail$no4, _currentNodeDetail$wo11, _res$data6, _res$data6$failList, res, _res$data7, _res$data7$failList, _res$data7$failList$;
|
|
665
644
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
666
645
|
while (1) switch (_context6.prev = _context6.next) {
|
|
667
646
|
case 0:
|
|
@@ -672,7 +651,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
672
651
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no4 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no4 === void 0 ? void 0 : _currentNodeDetail$no4.id,
|
|
673
652
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
674
653
|
flowTemplateId: flowTemplateId,
|
|
675
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
654
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.id
|
|
676
655
|
})
|
|
677
656
|
}));
|
|
678
657
|
case 3:
|
|
@@ -713,19 +692,19 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
713
692
|
// 关闭工单
|
|
714
693
|
var handleClose = /*#__PURE__*/function () {
|
|
715
694
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(formData, form) {
|
|
716
|
-
var _currentNodeDetail$
|
|
695
|
+
var _currentNodeDetail$wo12, _currentNodeDetail$no5, _currentNodeDetail$wo13, _res$data8, _res$data8$failList, res, _res$data9, _res$data9$failList, _res$data9$failList$;
|
|
717
696
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
718
697
|
while (1) switch (_context7.prev = _context7.next) {
|
|
719
698
|
case 0:
|
|
720
699
|
_context7.prev = 0;
|
|
721
700
|
_context7.next = 3;
|
|
722
701
|
return closeWorkOrder(_objectSpread(_objectSpread({}, formData), {}, {
|
|
723
|
-
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
702
|
+
workOrderFlowStatus: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.flowStatus,
|
|
724
703
|
operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
|
|
725
704
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no5 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no5 === void 0 ? void 0 : _currentNodeDetail$no5.id,
|
|
726
705
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
727
706
|
flowTemplateId: flowTemplateId,
|
|
728
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
707
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.id
|
|
729
708
|
})
|
|
730
709
|
}));
|
|
731
710
|
case 3:
|
|
@@ -762,7 +741,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
762
741
|
// 转交处理人
|
|
763
742
|
var handleForWard = /*#__PURE__*/function () {
|
|
764
743
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(formData) {
|
|
765
|
-
var _currentNodeDetail$no6, _currentNodeDetail$
|
|
744
|
+
var _currentNodeDetail$no6, _currentNodeDetail$wo14, _res$data10, _res$data10$failList, res, _res$data11, _res$data11$failList, _res$data11$failList$;
|
|
766
745
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
767
746
|
while (1) switch (_context8.prev = _context8.next) {
|
|
768
747
|
case 0:
|
|
@@ -773,7 +752,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
773
752
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no6 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no6 === void 0 ? void 0 : _currentNodeDetail$no6.id,
|
|
774
753
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
775
754
|
flowTemplateId: flowTemplateId,
|
|
776
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
755
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.id
|
|
777
756
|
})
|
|
778
757
|
}));
|
|
779
758
|
case 3:
|
|
@@ -810,7 +789,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
810
789
|
// 驳回
|
|
811
790
|
var handleReturnWorkOrder = /*#__PURE__*/function () {
|
|
812
791
|
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(formData) {
|
|
813
|
-
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no7, _currentNodeDetail$
|
|
792
|
+
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no7, _currentNodeDetail$wo15, res, _res$data$failList$0$, _res$data12, _res$data12$failList, _res$data12$failList$;
|
|
814
793
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
815
794
|
while (1) switch (_context9.prev = _context9.next) {
|
|
816
795
|
case 0:
|
|
@@ -853,7 +832,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
853
832
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : _currentNodeDetail$no7.id,
|
|
854
833
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
855
834
|
flowTemplateId: flowTemplateId,
|
|
856
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
835
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : _currentNodeDetail$wo15.id
|
|
857
836
|
})
|
|
858
837
|
}));
|
|
859
838
|
case 7:
|
|
@@ -899,7 +878,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
899
878
|
// 撤回
|
|
900
879
|
var handleWithdraw = /*#__PURE__*/function () {
|
|
901
880
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(formData) {
|
|
902
|
-
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no8, _currentNodeDetail$
|
|
881
|
+
var handleFail, handleSuccess, handleTimeOut, _currentNodeDetail$no8, _currentNodeDetail$wo16, res, _res$data$failList$0$2, _res$data13, _res$data13$failList, _res$data13$failList$;
|
|
903
882
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
904
883
|
while (1) switch (_context10.prev = _context10.next) {
|
|
905
884
|
case 0:
|
|
@@ -943,7 +922,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
943
922
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no8 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no8 === void 0 ? void 0 : _currentNodeDetail$no8.id,
|
|
944
923
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
945
924
|
flowTemplateId: flowTemplateId,
|
|
946
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
925
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.id
|
|
947
926
|
})
|
|
948
927
|
}));
|
|
949
928
|
case 7:
|
|
@@ -989,7 +968,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
989
968
|
//催单
|
|
990
969
|
var handleReminder = /*#__PURE__*/function () {
|
|
991
970
|
var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(type) {
|
|
992
|
-
var _currentNodeDetail$
|
|
971
|
+
var _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$no9, _currentNodeDetail$wo19, _currentNodeDetail$wo20, _currentNodeDetail$wo21, _currentNodeDetail$wo22, _currentNodeDetail$no10, _currentNodeDetail$wo23, api, flowTags, newFlowTags, params, res;
|
|
993
972
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
994
973
|
while (1) switch (_context11.prev = _context11.next) {
|
|
995
974
|
case 0:
|
|
@@ -999,20 +978,20 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
999
978
|
payload: true
|
|
1000
979
|
});
|
|
1001
980
|
api = type === 'reminder' ? reminder : cancelReminder;
|
|
1002
|
-
flowTags = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
981
|
+
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) || '[]');
|
|
1003
982
|
newFlowTags = type === 'reminder' ? flowTags.concat('REMINDER') : flowTags.filter(function (t) {
|
|
1004
983
|
return t !== 'REMINDER';
|
|
1005
984
|
});
|
|
1006
985
|
params = {
|
|
1007
986
|
updateInfo: {
|
|
1008
987
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : _currentNodeDetail$no9.id,
|
|
1009
|
-
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1010
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
988
|
+
templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo19 === void 0 ? void 0 : _currentNodeDetail$wo19.templateId,
|
|
989
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo20 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo20 === void 0 ? void 0 : _currentNodeDetail$wo20.id,
|
|
1011
990
|
updateList: [{
|
|
1012
991
|
dataKey: 'flowTags',
|
|
1013
992
|
name: '标签',
|
|
1014
993
|
dataValue: newFlowTags,
|
|
1015
|
-
oldValue: JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
994
|
+
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) || '[]')
|
|
1016
995
|
}],
|
|
1017
996
|
updateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.workOrderUpdateTime,
|
|
1018
997
|
needTransForm: false
|
|
@@ -1020,7 +999,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1020
999
|
operateParams: {
|
|
1021
1000
|
nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no10 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no10 === void 0 ? void 0 : _currentNodeDetail$no10.id,
|
|
1022
1001
|
flowWorkOrderId: flowWorkOrderIdState,
|
|
1023
|
-
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1002
|
+
workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo23 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo23 === void 0 ? void 0 : _currentNodeDetail$wo23.id,
|
|
1024
1003
|
flowTemplateId: flowTemplateId,
|
|
1025
1004
|
workOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.workOrderUpdateTime,
|
|
1026
1005
|
flowWorkOrderUpdateTime: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowWorkOrderUpdateTime
|
|
@@ -1109,7 +1088,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1109
1088
|
}, [plat]);
|
|
1110
1089
|
useEffect(function () {
|
|
1111
1090
|
if (autoSubmit && !isNull(currentNodeDetail)) {
|
|
1112
|
-
var _currentNodeDetail$
|
|
1091
|
+
var _currentNodeDetail$wo24;
|
|
1113
1092
|
// TODO: 兼容后端一些时候生成的数据异常情况,防止批量提交出现卡顿不执行情况
|
|
1114
1093
|
if (isEmpty(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder) && typeof callbackAutoSubmitResult === 'function') {
|
|
1115
1094
|
return callbackAutoSubmitResult({
|
|
@@ -1117,7 +1096,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1117
1096
|
message: '当前流程工单无工单数据,请联系实施处理'
|
|
1118
1097
|
});
|
|
1119
1098
|
}
|
|
1120
|
-
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1099
|
+
if (flowWorkOrderId === (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo24 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo24 === void 0 ? void 0 : _currentNodeDetail$wo24.flowWorkOrderId)) {
|
|
1121
1100
|
setTimeout(function () {
|
|
1122
1101
|
handleSubmit();
|
|
1123
1102
|
}, 0);
|
|
@@ -1125,13 +1104,13 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1125
1104
|
}
|
|
1126
1105
|
}, [currentNodeDetail]);
|
|
1127
1106
|
var isCurrentNodeHandler = useMemo(function () {
|
|
1128
|
-
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$
|
|
1107
|
+
var _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13, _currentNodeDetail$no14, _currentNodeDetail$no15, _currentNodeDetail$no16, _currentNodeDetail$wo25, _currentNodeDetail$no17, _currentNodeDetail$no18;
|
|
1129
1108
|
return currentUserHasOperatorAuth({
|
|
1130
1109
|
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] || [],
|
|
1131
1110
|
currentUserKey: plat.userKey,
|
|
1132
1111
|
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) || [],
|
|
1133
1112
|
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,
|
|
1134
|
-
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1113
|
+
handlerList: (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo25 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo25 === void 0 ? void 0 : _currentNodeDetail$wo25.handlerList) || [],
|
|
1135
1114
|
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
|
|
1136
1115
|
});
|
|
1137
1116
|
}, [currentNodeDetail, plat, assistantMap]);
|
|
@@ -1140,9 +1119,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1140
1119
|
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);
|
|
1141
1120
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopId;
|
|
1142
1121
|
var ReportOrderRender = function ReportOrderRender(props) {
|
|
1143
|
-
var _currentNodeDetail$
|
|
1122
|
+
var _currentNodeDetail$wo26, _currentNodeDetail$wo27;
|
|
1144
1123
|
var details = props.details;
|
|
1145
|
-
var componentDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1124
|
+
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) {
|
|
1146
1125
|
return !CANNOT_BACK_FILL.includes(t.workOrderComponentType || '');
|
|
1147
1126
|
});
|
|
1148
1127
|
//获取可以返填的组件值
|
|
@@ -1150,7 +1129,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
1150
1129
|
_calcWorkOrderList2 = _slicedToArray(_calcWorkOrderList, 1),
|
|
1151
1130
|
transData = _calcWorkOrderList2[0];
|
|
1152
1131
|
//获取表单显示值
|
|
1153
|
-
var _calcWorkOrderList3 = calcWorkOrderList([details], currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$
|
|
1132
|
+
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),
|
|
1154
1133
|
_calcWorkOrderList4 = _slicedToArray(_calcWorkOrderList3, 1),
|
|
1155
1134
|
transDataall = _calcWorkOrderList4[0];
|
|
1156
1135
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -3,7 +3,6 @@ export declare const COMMON_HOST = "https://kefu.kuaimai.com";
|
|
|
3
3
|
export declare const HD_HOST = "https://kefuab.kuaimai.com";
|
|
4
4
|
interface LoginProps {
|
|
5
5
|
loginCallBack?: (val: any) => void;
|
|
6
|
-
clickImgCallBack?: () => void;
|
|
7
6
|
}
|
|
8
7
|
declare const ProviderLogin: (props: LoginProps) => React.JSX.Element;
|
|
9
8
|
export default ProviderLogin;
|
package/dist/esm/Login/index.js
CHANGED
|
@@ -21,8 +21,7 @@ import styles from "./index.module.less";
|
|
|
21
21
|
export var COMMON_HOST = 'https://kefu.kuaimai.com';
|
|
22
22
|
export var HD_HOST = 'https://kefuab.kuaimai.com';
|
|
23
23
|
var Login = function Login(props) {
|
|
24
|
-
var loginCallBack = props.loginCallBack
|
|
25
|
-
clickImgCallBack = props.clickImgCallBack;
|
|
24
|
+
var loginCallBack = props.loginCallBack;
|
|
26
25
|
var _useState = useState(''),
|
|
27
26
|
_useState2 = _slicedToArray(_useState, 2),
|
|
28
27
|
name = _useState2[0],
|
|
@@ -249,8 +248,7 @@ var Login = function Login(props) {
|
|
|
249
248
|
className: styles.logo
|
|
250
249
|
}, /*#__PURE__*/React.createElement("img", {
|
|
251
250
|
src: logo,
|
|
252
|
-
alt: "logo"
|
|
253
|
-
onClick: clickImgCallBack
|
|
251
|
+
alt: "logo"
|
|
254
252
|
})), /*#__PURE__*/React.createElement(Form, {
|
|
255
253
|
className: styles.container
|
|
256
254
|
}, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -14,8 +14,6 @@ export var updateWorkTypeKeys = {
|
|
|
14
14
|
//发货时间
|
|
15
15
|
TRADE_CLOSING_DATETIME: 'tradeClosingDateTime',
|
|
16
16
|
//成交时间
|
|
17
|
-
TRADE_SIGNING_DATETIME: 'tradeSigningDateTime',
|
|
18
|
-
// 签收时间
|
|
19
17
|
ACTUAL_PAYMENT: 'actualPayment',
|
|
20
18
|
SYSTEM_ORDER_NO: 'systemOrderNo',
|
|
21
19
|
BS_SIGNING_TIME: 'bsSigningTime',
|
|
@@ -81,8 +79,6 @@ export var DEFAULT_STRING_COMPONENT_TYPE_FIELD_MAPPING = {
|
|
|
81
79
|
//发货时间
|
|
82
80
|
TRADE_CLOSING_DATETIME: 'tradeClosingDateTime',
|
|
83
81
|
//成交时间
|
|
84
|
-
TRADE_SIGNING_DATETIME: 'tradeSigningDateTime',
|
|
85
|
-
// 签收时间
|
|
86
82
|
INPUT: 'input',
|
|
87
83
|
DATETIME: 'dateTime',
|
|
88
84
|
TEXTAREA: 'textarea',
|
|
@@ -731,7 +731,6 @@ var processComponent = function processComponent(_ref52) {
|
|
|
731
731
|
case 'TRADE_PAYMENT_DATETIME':
|
|
732
732
|
case 'TRADE_DELIVERY_DATETIME':
|
|
733
733
|
case 'TRADE_CLOSING_DATETIME':
|
|
734
|
-
case 'TRADE_SIGNING_DATETIME':
|
|
735
734
|
case 'INPUT':
|
|
736
735
|
case 'DATETIME':
|
|
737
736
|
case 'TEXTAREA':
|
|
@@ -59,7 +59,6 @@ export declare const getReplaceWarnValues: (templateDetail: {
|
|
|
59
59
|
}) => any;
|
|
60
60
|
export declare const HasFilterHandle: (templateDetail: any, filterList: string[]) => any;
|
|
61
61
|
export declare const HasErpItemSelectHandle: (templateDetail?: any) => any;
|
|
62
|
-
export declare const HasTradeSigningDatetime: (templateDetail?: any) => any;
|
|
63
62
|
export declare const platformMap: any;
|
|
64
63
|
declare type SubmitParams = {
|
|
65
64
|
update: boolean;
|
|
@@ -48,8 +48,6 @@ var workTypeKeys = {
|
|
|
48
48
|
//发货时间
|
|
49
49
|
TRADE_CLOSING_DATETIME: 'tradeClosingDateTime',
|
|
50
50
|
//成交时间
|
|
51
|
-
TRADE_SIGNING_DATETIME: 'tradeSigningDateTime',
|
|
52
|
-
// 签收时间
|
|
53
51
|
INPUT: 'input',
|
|
54
52
|
DATETIME: 'dateTime',
|
|
55
53
|
TEXTAREA: 'textarea',
|
|
@@ -135,7 +133,7 @@ var getBasicsOrderInfo = function getBasicsOrderInfo(orderInfo, xiaozhiOrder) {
|
|
|
135
133
|
//订单返填
|
|
136
134
|
export var orderBack = /*#__PURE__*/function () {
|
|
137
135
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
138
|
-
var order_no, form, propsShopid, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, callbackShopId, setLoading, callKey, shopId, _res$data, res, shopInfo, _res$data3, _res$data4, _res$data5, JOIN_SHOP, hasFlagMap, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, thirdShopMainType, _data$value, _data$value3, _jstOrder$value, _jstOrder$value2, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsE3Order$value, _kmOrder$value, _gyOrder$value, _bsOrders$orders, _bsE3Orders$orderList, _wlnOrders$orders, _wdtOrders$trades, _gyOrders$trades, _kmOrders$orderDetail, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, xiaozhiOrder, jstOrder, bsOrder, wlnOrder, wdtOrder, bsE3Order, kmOrder, gyOrder, _data$value2, orderInfo, jstOrders, bsOrders, wlnOrders, wdtOrders, bsE3Orders, kmOrders, gyOrders, bsInfo, wlnInfo, bsE3Info, wdtInfo, kmInfo, gyInfo, jstInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList,
|
|
136
|
+
var order_no, form, propsShopid, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, callbackShopId, setLoading, callKey, shopId, _res$data, res, shopInfo, _res$data3, _res$data4, _res$data5, JOIN_SHOP, hasFlagMap, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, thirdShopMainType, _data$value, _data$value3, _jstOrder$value, _jstOrder$value2, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsE3Order$value, _kmOrder$value, _gyOrder$value, _bsOrders$orders, _bsE3Orders$orderList, _wlnOrders$orders, _wdtOrders$trades, _gyOrders$trades, _kmOrders$orderDetail, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, xiaozhiOrder, jstOrder, bsOrder, wlnOrder, wdtOrder, bsE3Order, kmOrder, gyOrder, _data$value2, orderInfo, jstOrders, bsOrders, wlnOrders, wdtOrders, bsE3Orders, kmOrders, gyOrders, bsInfo, wlnInfo, bsE3Info, wdtInfo, kmInfo, gyInfo, jstInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, paymentUniqueKey;
|
|
139
137
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
140
138
|
while (1) switch (_context.prev = _context.next) {
|
|
141
139
|
case 0:
|
|
@@ -477,43 +475,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
477
475
|
_context.t1 = _context["catch"](87);
|
|
478
476
|
console.error('调用erp获取宝贝编码错误', _context.t1);
|
|
479
477
|
case 97:
|
|
480
|
-
//
|
|
481
|
-
hasSigningDatetime = HasTradeSigningDatetime(templateDetail); // 如存在签收时间组件且订单也有返回相应物流单号跟物流公司编码,则调用接口获取签收时间
|
|
482
|
-
if (!hasSigningDatetime) {
|
|
483
|
-
_context.next = 113;
|
|
484
|
-
break;
|
|
485
|
-
}
|
|
486
|
-
if (!(orderInfo !== null && orderInfo !== void 0 && orderInfo.expressLogisticsCompany && orderInfo !== null && orderInfo !== void 0 && orderInfo.expressLogisticsCode)) {
|
|
487
|
-
_context.next = 112;
|
|
488
|
-
break;
|
|
489
|
-
}
|
|
490
|
-
_context.prev = 100;
|
|
491
|
-
_context.next = 103;
|
|
492
|
-
return request({
|
|
493
|
-
url: '/qy/logistics/logisticsSignTime',
|
|
494
|
-
method: 'post',
|
|
495
|
-
data: {
|
|
496
|
-
shopId: shopId,
|
|
497
|
-
cpCode: orderInfo.expressLogisticsCompany,
|
|
498
|
-
mailNo: orderInfo.expressLogisticsCode
|
|
499
|
-
}
|
|
500
|
-
});
|
|
501
|
-
case 103:
|
|
502
|
-
signDatetime = _context.sent;
|
|
503
|
-
detail['tradeSigningDateTime'] = signDatetime === null || signDatetime === void 0 ? void 0 : (_signDatetime$data = signDatetime.data) === null || _signDatetime$data === void 0 ? void 0 : _signDatetime$data.signTime;
|
|
504
|
-
_context.next = 110;
|
|
505
|
-
break;
|
|
506
|
-
case 107:
|
|
507
|
-
_context.prev = 107;
|
|
508
|
-
_context.t2 = _context["catch"](100);
|
|
509
|
-
console.error('调用签收时间错误', _context.t2);
|
|
510
|
-
case 110:
|
|
511
|
-
_context.next = 113;
|
|
512
|
-
break;
|
|
513
|
-
case 112:
|
|
514
|
-
detail['tradeSigningDateTime'] = '';
|
|
515
|
-
case 113:
|
|
516
|
-
console.log('detail', detail);
|
|
478
|
+
// console.log('detail', detail);
|
|
517
479
|
values = orderBackFormValues({
|
|
518
480
|
detail: detail,
|
|
519
481
|
order_no: order_no,
|
|
@@ -557,21 +519,21 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
557
519
|
shopId: shopId
|
|
558
520
|
}));
|
|
559
521
|
callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
|
|
560
|
-
_context.next =
|
|
522
|
+
_context.next = 108;
|
|
561
523
|
break;
|
|
562
|
-
case
|
|
563
|
-
_context.prev =
|
|
564
|
-
_context.
|
|
565
|
-
console.error(_context.
|
|
566
|
-
case
|
|
567
|
-
_context.prev =
|
|
524
|
+
case 105:
|
|
525
|
+
_context.prev = 105;
|
|
526
|
+
_context.t2 = _context["catch"](25);
|
|
527
|
+
console.error(_context.t2);
|
|
528
|
+
case 108:
|
|
529
|
+
_context.prev = 108;
|
|
568
530
|
setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
|
|
569
|
-
return _context.finish(
|
|
570
|
-
case
|
|
531
|
+
return _context.finish(108);
|
|
532
|
+
case 111:
|
|
571
533
|
case "end":
|
|
572
534
|
return _context.stop();
|
|
573
535
|
}
|
|
574
|
-
}, _callee, null, [[5, 12, 15, 18], [25,
|
|
536
|
+
}, _callee, null, [[5, 12, 15, 18], [25, 105, 108, 111], [87, 94]]);
|
|
575
537
|
}));
|
|
576
538
|
return function orderBack(_x) {
|
|
577
539
|
return _ref2.apply(this, arguments);
|
|
@@ -699,14 +661,6 @@ export var HasErpItemSelectHandle = function HasErpItemSelectHandle() {
|
|
|
699
661
|
return ['ITEM_SELECT_THIRD'].includes(item.workOrderComponentType);
|
|
700
662
|
});
|
|
701
663
|
};
|
|
702
|
-
export var HasTradeSigningDatetime = function HasTradeSigningDatetime() {
|
|
703
|
-
var templateDetail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
704
|
-
componentDtoList: []
|
|
705
|
-
};
|
|
706
|
-
return templateDetail.componentDtoList.some(function (item) {
|
|
707
|
-
return ['TRADE_SIGNING_DATETIME'].includes(item.workOrderComponentType);
|
|
708
|
-
});
|
|
709
|
-
};
|
|
710
664
|
export var platformMap = {
|
|
711
665
|
tb: '淘宝',
|
|
712
666
|
fxg: '抖音',
|
|
@@ -1084,7 +1084,6 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
|
|
|
1084
1084
|
TRADE_PAYMENT_DATETIME: processSingleField,
|
|
1085
1085
|
TRADE_DELIVERY_DATETIME: processSingleField,
|
|
1086
1086
|
TRADE_CLOSING_DATETIME: processSingleField,
|
|
1087
|
-
TRADE_SIGNING_DATETIME: processSingleField,
|
|
1088
1087
|
ACTUAL_PAYMENT: processSingleField,
|
|
1089
1088
|
SYSTEM_ORDER_NO: processSingleField,
|
|
1090
1089
|
BS_SIGNING_TIME: processSingleField,
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as WorkOrder } from './WorkOrder';
|
|
2
2
|
export { default as Login } from './Login';
|
|
3
|
-
export { default as LoginNew } from './LoginNew';
|
|
4
3
|
export { default as SingleShopWorkOrder } from './SingleShopWorkOrder';
|
|
5
4
|
export { default as FormRender } from './FormRender';
|
|
6
5
|
export { default as FormRenderTemplateId } from './FormRenderTemplateId';
|
package/dist/esm/index.js
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export { default as WorkOrder } from "./WorkOrder";
|
|
12
12
|
export { default as Login } from "./Login";
|
|
13
|
-
export { default as LoginNew } from "./LoginNew";
|
|
14
13
|
export { default as SingleShopWorkOrder } from "./SingleShopWorkOrder";
|
|
15
14
|
export { default as FormRender } from "./FormRender";
|
|
16
15
|
export { default as FormRenderTemplateId } from "./FormRenderTemplateId";
|
|
@@ -27,16 +27,6 @@ export declare const fetchLogin: import("@reduxjs/toolkit").AsyncThunk<any, Logi
|
|
|
27
27
|
fulfilledMeta?: unknown;
|
|
28
28
|
rejectedMeta?: unknown;
|
|
29
29
|
}>;
|
|
30
|
-
export declare const fetchLoginNew: import("@reduxjs/toolkit").AsyncThunk<any, LoginParams, {
|
|
31
|
-
state?: unknown;
|
|
32
|
-
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
33
|
-
extra?: unknown;
|
|
34
|
-
rejectValue?: unknown;
|
|
35
|
-
serializedErrorType?: unknown;
|
|
36
|
-
pendingMeta?: unknown;
|
|
37
|
-
fulfilledMeta?: unknown;
|
|
38
|
-
rejectedMeta?: unknown;
|
|
39
|
-
}>;
|
|
40
30
|
export declare const fetchShopList: import("@reduxjs/toolkit").AsyncThunk<any, void, {
|
|
41
31
|
state?: unknown;
|
|
42
32
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
package/dist/esm/model/login.js
CHANGED
|
@@ -13,7 +13,7 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
|
13
13
|
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
14
14
|
*/
|
|
15
15
|
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
|
|
16
|
-
import { grayWhiteListApi, login,
|
|
16
|
+
import { grayWhiteListApi, login, queryShopList, logOut } from "./servers/api";
|
|
17
17
|
var initialState = {
|
|
18
18
|
loading: false,
|
|
19
19
|
// 登陆用户信息
|
|
@@ -77,58 +77,37 @@ export var fetchLogin = createAsyncThunk('login/login', /*#__PURE__*/function ()
|
|
|
77
77
|
return _ref2.apply(this, arguments);
|
|
78
78
|
};
|
|
79
79
|
}());
|
|
80
|
-
export var
|
|
81
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(data) {
|
|
82
|
-
var response;
|
|
83
|
-
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
84
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
85
|
-
case 0:
|
|
86
|
-
_context3.next = 2;
|
|
87
|
-
return loginNew(data);
|
|
88
|
-
case 2:
|
|
89
|
-
response = _context3.sent;
|
|
90
|
-
return _context3.abrupt("return", response);
|
|
91
|
-
case 4:
|
|
92
|
-
case "end":
|
|
93
|
-
return _context3.stop();
|
|
94
|
-
}
|
|
95
|
-
}, _callee3);
|
|
96
|
-
}));
|
|
97
|
-
return function (_x3) {
|
|
98
|
-
return _ref3.apply(this, arguments);
|
|
99
|
-
};
|
|
100
|
-
}());
|
|
101
|
-
export var fetchShopList = createAsyncThunk('login/queryShopList', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
80
|
+
export var fetchShopList = createAsyncThunk('login/queryShopList', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
102
81
|
var response;
|
|
103
|
-
return _regeneratorRuntime().wrap(function
|
|
104
|
-
while (1) switch (
|
|
82
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
83
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
105
84
|
case 0:
|
|
106
|
-
|
|
85
|
+
_context3.next = 2;
|
|
107
86
|
return queryShopList();
|
|
108
87
|
case 2:
|
|
109
|
-
response =
|
|
110
|
-
return
|
|
88
|
+
response = _context3.sent;
|
|
89
|
+
return _context3.abrupt("return", response.data);
|
|
111
90
|
case 4:
|
|
112
91
|
case "end":
|
|
113
|
-
return
|
|
92
|
+
return _context3.stop();
|
|
114
93
|
}
|
|
115
|
-
},
|
|
94
|
+
}, _callee3);
|
|
116
95
|
})));
|
|
117
|
-
export var fetchLogOut = createAsyncThunk('login/logOut', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
96
|
+
export var fetchLogOut = createAsyncThunk('login/logOut', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
118
97
|
var response;
|
|
119
|
-
return _regeneratorRuntime().wrap(function
|
|
120
|
-
while (1) switch (
|
|
98
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
99
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
121
100
|
case 0:
|
|
122
|
-
|
|
101
|
+
_context4.next = 2;
|
|
123
102
|
return logOut();
|
|
124
103
|
case 2:
|
|
125
|
-
response =
|
|
126
|
-
return
|
|
104
|
+
response = _context4.sent;
|
|
105
|
+
return _context4.abrupt("return", response.data);
|
|
127
106
|
case 4:
|
|
128
107
|
case "end":
|
|
129
|
-
return
|
|
108
|
+
return _context4.stop();
|
|
130
109
|
}
|
|
131
|
-
},
|
|
110
|
+
}, _callee4);
|
|
132
111
|
})));
|
|
133
112
|
export var globalSlice = createSlice({
|
|
134
113
|
name: 'login',
|
|
@@ -140,22 +119,22 @@ export var globalSlice = createSlice({
|
|
|
140
119
|
closeLoading: function closeLoading(state) {
|
|
141
120
|
state.loading = false;
|
|
142
121
|
},
|
|
143
|
-
setUserInfo: function setUserInfo(state,
|
|
144
|
-
var payload =
|
|
122
|
+
setUserInfo: function setUserInfo(state, _ref5) {
|
|
123
|
+
var payload = _ref5.payload;
|
|
145
124
|
state.userInfo = payload;
|
|
146
125
|
},
|
|
147
|
-
setShopList: function setShopList(state,
|
|
148
|
-
var payload =
|
|
126
|
+
setShopList: function setShopList(state, _ref6) {
|
|
127
|
+
var payload = _ref6.payload;
|
|
149
128
|
state.shopList = payload;
|
|
150
129
|
},
|
|
151
|
-
setPlatform: function setPlatform(state,
|
|
152
|
-
var payload =
|
|
130
|
+
setPlatform: function setPlatform(state, _ref7) {
|
|
131
|
+
var payload = _ref7.payload;
|
|
153
132
|
state.platform = payload;
|
|
154
133
|
}
|
|
155
134
|
},
|
|
156
135
|
extraReducers: function extraReducers(builder) {
|
|
157
|
-
builder.addCase(fetchShopList.fulfilled, function (state,
|
|
158
|
-
var payload =
|
|
136
|
+
builder.addCase(fetchShopList.fulfilled, function (state, _ref8) {
|
|
137
|
+
var payload = _ref8.payload;
|
|
159
138
|
state.shopList = payload.shopList;
|
|
160
139
|
});
|
|
161
140
|
}
|
|
@@ -36,10 +36,8 @@ export declare type LoginParams = {
|
|
|
36
36
|
name: string;
|
|
37
37
|
account: string;
|
|
38
38
|
password: string;
|
|
39
|
-
pageReturnType?: string;
|
|
40
39
|
};
|
|
41
40
|
export declare const login: (data: LoginParams) => Promise<any>;
|
|
42
|
-
export declare const loginNew: (data: LoginParams) => Promise<any>;
|
|
43
41
|
export declare const queryShopList: () => Promise<any>;
|
|
44
42
|
export declare const deleteWorkOrder: (data: any) => Promise<any>;
|
|
45
43
|
export declare const getThirdOpenUidByOrderNo: (data: any) => Promise<any>;
|
|
@@ -217,15 +217,6 @@ export var login = function login(data) {
|
|
|
217
217
|
data: data
|
|
218
218
|
});
|
|
219
219
|
};
|
|
220
|
-
|
|
221
|
-
//登陆-新
|
|
222
|
-
export var loginNew = function loginNew(data) {
|
|
223
|
-
return request({
|
|
224
|
-
url: '/qy/gdfw/company/login/new',
|
|
225
|
-
method: 'post',
|
|
226
|
-
data: data
|
|
227
|
-
});
|
|
228
|
-
};
|
|
229
220
|
//获取店铺列表
|
|
230
221
|
export var queryShopList = function queryShopList() {
|
|
231
222
|
return request({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "2.0.54
|
|
3
|
+
"version": "2.0.54",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
|
-
"@kmkf-fe-packages/basic-components": "2.0.54
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "2.0.54
|
|
37
|
-
"@kmkf-fe-packages/services-components": "2.0.54
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "2.0.54",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "2.0.54",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "2.0.54",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "67e965ffb447b6c6fc0bddb1c2ef9d78edf5f93a",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const COMMON_HOST = "https://kefu.kuaimai.com";
|
|
3
|
-
export declare const HD_HOST = "https://kefuab.kuaimai.com";
|
|
4
|
-
interface LoginProps {
|
|
5
|
-
loginCallBack?: (val: any) => void;
|
|
6
|
-
}
|
|
7
|
-
declare const ProviderLogin: (props: LoginProps) => React.JSX.Element;
|
|
8
|
-
export default ProviderLogin;
|
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import React, { useState, useMemo, useEffect } from 'react';
|
|
12
|
-
import { Input, message, Form, Button } from 'antd';
|
|
13
|
-
import md5 from 'js-md5';
|
|
14
|
-
import { Provider } from 'react-redux';
|
|
15
|
-
import store from "../model/store";
|
|
16
|
-
import cache from "../common/cache";
|
|
17
|
-
import { useAppDispatch } from "../model/hooks";
|
|
18
|
-
import { fetchLoginNew, fetchShopList, setUserInfo } from "../model/login";
|
|
19
|
-
import logo from "../assets/logo.svg";
|
|
20
|
-
import styles from "./index.module.less";
|
|
21
|
-
export var COMMON_HOST = 'https://kefu.kuaimai.com';
|
|
22
|
-
export var HD_HOST = 'https://kefuab.kuaimai.com';
|
|
23
|
-
var Login = function Login(props) {
|
|
24
|
-
var loginCallBack = props.loginCallBack;
|
|
25
|
-
var _useState = useState(''),
|
|
26
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
-
name = _useState2[0],
|
|
28
|
-
setName = _useState2[1];
|
|
29
|
-
var _useState3 = useState(''),
|
|
30
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
-
account = _useState4[0],
|
|
32
|
-
setAccount = _useState4[1];
|
|
33
|
-
var _useState5 = useState(''),
|
|
34
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
35
|
-
password = _useState6[0],
|
|
36
|
-
setPassword = _useState6[1];
|
|
37
|
-
var _useState7 = useState(false),
|
|
38
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
39
|
-
loading = _useState8[0],
|
|
40
|
-
setLoading = _useState8[1];
|
|
41
|
-
// 直接登陆模式
|
|
42
|
-
var _useState9 = useState(false),
|
|
43
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
44
|
-
isDirectProcess = _useState10[0],
|
|
45
|
-
setDirectProcess = _useState10[1];
|
|
46
|
-
// 显示历史记录
|
|
47
|
-
var _useState11 = useState(false),
|
|
48
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
49
|
-
showRecommendPwdList = _useState12[0],
|
|
50
|
-
setShowRecommendPwdList = _useState12[1];
|
|
51
|
-
var dispatch = useAppDispatch();
|
|
52
|
-
useEffect(function () {
|
|
53
|
-
localStorage.removeItem('kmkf_kmgd_cookie');
|
|
54
|
-
cache.setHost(COMMON_HOST);
|
|
55
|
-
}, []);
|
|
56
|
-
var processHistoryPwd = function processHistoryPwd(params) {
|
|
57
|
-
var historyList = cache.getHistoryList();
|
|
58
|
-
if (historyList.findIndex(function (item) {
|
|
59
|
-
return item.account === params.account;
|
|
60
|
-
}) < 0) {
|
|
61
|
-
historyList.unshift(params);
|
|
62
|
-
}
|
|
63
|
-
cache.setHistoryList(historyList);
|
|
64
|
-
};
|
|
65
|
-
var changeProcessHistoryPwd = function changeProcessHistoryPwd(params) {
|
|
66
|
-
var historyList = cache.getHistoryList();
|
|
67
|
-
historyList = historyList.filter(function (item) {
|
|
68
|
-
return item.account !== params.account;
|
|
69
|
-
});
|
|
70
|
-
historyList.unshift(params);
|
|
71
|
-
cache.setHistoryList(historyList);
|
|
72
|
-
};
|
|
73
|
-
var onCompanyChange = function onCompanyChange(val) {
|
|
74
|
-
if (isDirectProcess) {
|
|
75
|
-
setDirectProcess(false);
|
|
76
|
-
setPassword('');
|
|
77
|
-
}
|
|
78
|
-
setName(val);
|
|
79
|
-
};
|
|
80
|
-
var onAccountChange = function onAccountChange(val) {
|
|
81
|
-
if (isDirectProcess) {
|
|
82
|
-
setDirectProcess(false);
|
|
83
|
-
setPassword('');
|
|
84
|
-
}
|
|
85
|
-
setAccount(val);
|
|
86
|
-
};
|
|
87
|
-
var handleLoginClick = /*#__PURE__*/function () {
|
|
88
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
89
|
-
var isDirect,
|
|
90
|
-
_args2 = arguments;
|
|
91
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
92
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
93
|
-
case 0:
|
|
94
|
-
isDirect = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : false;
|
|
95
|
-
if (name) {
|
|
96
|
-
_context2.next = 4;
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
message.error('请输入公司名称');
|
|
100
|
-
return _context2.abrupt("return");
|
|
101
|
-
case 4:
|
|
102
|
-
if (account) {
|
|
103
|
-
_context2.next = 7;
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
message.error('请输入登录账号');
|
|
107
|
-
return _context2.abrupt("return");
|
|
108
|
-
case 7:
|
|
109
|
-
if (password) {
|
|
110
|
-
_context2.next = 10;
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
message.error('请输入密码');
|
|
114
|
-
return _context2.abrupt("return");
|
|
115
|
-
case 10:
|
|
116
|
-
try {
|
|
117
|
-
setLoading(true);
|
|
118
|
-
dispatch(fetchLoginNew({
|
|
119
|
-
name: name.trim(),
|
|
120
|
-
account: account.trim(),
|
|
121
|
-
password: isDirect ? password : md5(password),
|
|
122
|
-
pageReturnType: 'client_jump'
|
|
123
|
-
})).unwrap().then( /*#__PURE__*/function () {
|
|
124
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
125
|
-
var data, success, _data$companyUser;
|
|
126
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
127
|
-
while (1) switch (_context.prev = _context.next) {
|
|
128
|
-
case 0:
|
|
129
|
-
data = res.data, success = res.success; // console.log(data, success);
|
|
130
|
-
if (isDirect) {
|
|
131
|
-
processHistoryPwd({
|
|
132
|
-
name: name,
|
|
133
|
-
account: account,
|
|
134
|
-
password: password
|
|
135
|
-
});
|
|
136
|
-
} else {
|
|
137
|
-
changeProcessHistoryPwd({
|
|
138
|
-
name: name,
|
|
139
|
-
account: account,
|
|
140
|
-
password: md5(password)
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
if (!success) {
|
|
144
|
-
_context.next = 10;
|
|
145
|
-
break;
|
|
146
|
-
}
|
|
147
|
-
message.success('登录成功', 1.5);
|
|
148
|
-
dispatch(setUserInfo(data === null || data === void 0 ? void 0 : data.companyUser));
|
|
149
|
-
cache.setHost((data === null || data === void 0 ? void 0 : data.domain) || COMMON_HOST);
|
|
150
|
-
cache.setCookie(data === null || data === void 0 ? void 0 : (_data$companyUser = data.companyUser) === null || _data$companyUser === void 0 ? void 0 : _data$companyUser.ckValue);
|
|
151
|
-
_context.next = 9;
|
|
152
|
-
return dispatch(fetchShopList());
|
|
153
|
-
case 9:
|
|
154
|
-
loginCallBack === null || loginCallBack === void 0 ? void 0 : loginCallBack({
|
|
155
|
-
data: data
|
|
156
|
-
});
|
|
157
|
-
case 10:
|
|
158
|
-
setLoading(false);
|
|
159
|
-
case 11:
|
|
160
|
-
case "end":
|
|
161
|
-
return _context.stop();
|
|
162
|
-
}
|
|
163
|
-
}, _callee);
|
|
164
|
-
}));
|
|
165
|
-
return function (_x2) {
|
|
166
|
-
return _ref2.apply(this, arguments);
|
|
167
|
-
};
|
|
168
|
-
}()).catch(function () {
|
|
169
|
-
setLoading(false);
|
|
170
|
-
});
|
|
171
|
-
} catch (err) {
|
|
172
|
-
setLoading(false);
|
|
173
|
-
console.error(err);
|
|
174
|
-
}
|
|
175
|
-
case 11:
|
|
176
|
-
case "end":
|
|
177
|
-
return _context2.stop();
|
|
178
|
-
}
|
|
179
|
-
}, _callee2);
|
|
180
|
-
}));
|
|
181
|
-
return function handleLoginClick() {
|
|
182
|
-
return _ref.apply(this, arguments);
|
|
183
|
-
};
|
|
184
|
-
}();
|
|
185
|
-
var changeRecommendVisible = function changeRecommendVisible(flag) {
|
|
186
|
-
setTimeout(function () {
|
|
187
|
-
setShowRecommendPwdList(flag);
|
|
188
|
-
}, 500);
|
|
189
|
-
};
|
|
190
|
-
var handleSelectHistoryRecord = function handleSelectHistoryRecord(item) {
|
|
191
|
-
var itemName = item.name,
|
|
192
|
-
itemAccount = item.account,
|
|
193
|
-
itemPassword = item.password;
|
|
194
|
-
setName(itemName);
|
|
195
|
-
setAccount(itemAccount);
|
|
196
|
-
setPassword(itemPassword);
|
|
197
|
-
setDirectProcess(true);
|
|
198
|
-
};
|
|
199
|
-
var filteredHistoryList = useMemo(function () {
|
|
200
|
-
var historyList = cache.getHistoryList();
|
|
201
|
-
return historyList.filter(function (item) {
|
|
202
|
-
if (account) {
|
|
203
|
-
return item.account.includes(account);
|
|
204
|
-
}
|
|
205
|
-
return true;
|
|
206
|
-
});
|
|
207
|
-
}, [account]);
|
|
208
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
209
|
-
className: styles.wrap
|
|
210
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
211
|
-
className: styles.logo
|
|
212
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
213
|
-
src: logo,
|
|
214
|
-
alt: "logo"
|
|
215
|
-
})), /*#__PURE__*/React.createElement(Form, {
|
|
216
|
-
className: styles.container
|
|
217
|
-
}, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
218
|
-
value: name,
|
|
219
|
-
onChange: function onChange(e) {
|
|
220
|
-
return onCompanyChange(e.target.value);
|
|
221
|
-
},
|
|
222
|
-
placeholder: "\u8BF7\u8F93\u5165\u516C\u53F8\u540D\u79F0"
|
|
223
|
-
})), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement("div", {
|
|
224
|
-
className: styles.recomConWrap
|
|
225
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
226
|
-
onFocus: function onFocus() {
|
|
227
|
-
return changeRecommendVisible(true);
|
|
228
|
-
},
|
|
229
|
-
onBlur: function onBlur() {
|
|
230
|
-
return changeRecommendVisible(false);
|
|
231
|
-
},
|
|
232
|
-
value: account,
|
|
233
|
-
onChange: function onChange(e) {
|
|
234
|
-
return onAccountChange(e.target.value);
|
|
235
|
-
},
|
|
236
|
-
placeholder: "\u8BF7\u8F93\u5165\u767B\u5F55\u8D26\u53F7"
|
|
237
|
-
}), showRecommendPwdList && filteredHistoryList.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
238
|
-
className: styles.recomListCon
|
|
239
|
-
}, /*#__PURE__*/React.createElement("ul", null, filteredHistoryList.map(function (item) {
|
|
240
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
241
|
-
key: item.account,
|
|
242
|
-
className: styles.recomListItem,
|
|
243
|
-
onClick: function onClick() {
|
|
244
|
-
return handleSelectHistoryRecord(item);
|
|
245
|
-
}
|
|
246
|
-
}, /*#__PURE__*/React.createElement("div", null, "\u4F01\u4E1A\u540D\u79F0\uFF1A", item.name), /*#__PURE__*/React.createElement("div", null, "\u767B\u5F55\u8D26\u53F7:", item.account));
|
|
247
|
-
}))))), /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(Input, {
|
|
248
|
-
value: password,
|
|
249
|
-
type: "password",
|
|
250
|
-
onChange: function onChange(e) {
|
|
251
|
-
return setPassword(e.target.value);
|
|
252
|
-
},
|
|
253
|
-
placeholder: "\u8BF7\u8F93\u5165\u5BC6\u7801"
|
|
254
|
-
}))), /*#__PURE__*/React.createElement(Button, {
|
|
255
|
-
onClick: function onClick() {
|
|
256
|
-
return handleLoginClick(isDirectProcess);
|
|
257
|
-
},
|
|
258
|
-
type: "primary",
|
|
259
|
-
block: true,
|
|
260
|
-
loading: loading
|
|
261
|
-
}, "\u767B\u5F55"));
|
|
262
|
-
};
|
|
263
|
-
var ProviderLogin = function ProviderLogin(props) {
|
|
264
|
-
return /*#__PURE__*/React.createElement(Provider, {
|
|
265
|
-
store: store
|
|
266
|
-
}, /*#__PURE__*/React.createElement(Login, props));
|
|
267
|
-
};
|
|
268
|
-
export default ProviderLogin;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
.wrap {
|
|
2
|
-
width: 266px;
|
|
3
|
-
margin: auto;
|
|
4
|
-
|
|
5
|
-
.logo {
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
margin-top: 146px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.container {
|
|
12
|
-
margin-top: 48px;
|
|
13
|
-
|
|
14
|
-
ul {
|
|
15
|
-
margin: 0px;
|
|
16
|
-
padding: 0;
|
|
17
|
-
list-style-type: none;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.recomConWrap {
|
|
23
|
-
position: relative;
|
|
24
|
-
|
|
25
|
-
.recomListCon {
|
|
26
|
-
position: absolute;
|
|
27
|
-
left: 28px;
|
|
28
|
-
z-index: 2;
|
|
29
|
-
width: 300px;
|
|
30
|
-
max-height: 160px;
|
|
31
|
-
overflow: auto;
|
|
32
|
-
background-color: #fff;
|
|
33
|
-
|
|
34
|
-
ul {
|
|
35
|
-
margin: 0px;
|
|
36
|
-
padding: 0;
|
|
37
|
-
list-style-type: none;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.recomListItem {
|
|
41
|
-
padding: 8px;
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|