@kmkf-fe-packages/kmkf-work-order-service-component 2.2.13-beta.101 → 2.2.13-beta.103

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.
@@ -354,15 +354,42 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
354
354
  }
355
355
  };
356
356
  }, []);
357
+ var initHandle = /*#__PURE__*/function () {
358
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(otherInfo, buyerId, orderNo) {
359
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
360
+ while (1) switch (_context.prev = _context.next) {
361
+ case 0:
362
+ if (!([6, 7].includes(otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.showFrom) && (otherInfo !== null && otherInfo !== void 0 && otherInfo.flowWorkOrderId || orderNo) || !buyerId)) {
363
+ _context.next = 6;
364
+ break;
365
+ }
366
+ form.setFieldsValue({
367
+ flowWorkOrderId: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.flowWorkOrderId) || '',
368
+ tid: orderNo
369
+ });
370
+ _context.next = 4;
371
+ return dispatch(setCurrentBuyerChecked(false));
372
+ case 4:
373
+ _context.next = 8;
374
+ break;
375
+ case 6:
376
+ _context.next = 8;
377
+ return dispatch(setCurrentBuyerChecked(true));
378
+ case 8:
379
+ searchList();
380
+ case 9:
381
+ case "end":
382
+ return _context.stop();
383
+ }
384
+ }, _callee);
385
+ }));
386
+ return function initHandle(_x2, _x3, _x4) {
387
+ return _ref5.apply(this, arguments);
388
+ };
389
+ }();
357
390
  useEffect(function () {
358
- if ([6, 7].includes(otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.showFrom) && (otherInfo !== null && otherInfo !== void 0 && otherInfo.flowWorkOrderId || orderNo) || !buyerId) {
359
- form.setFieldsValue({
360
- flowWorkOrderId: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.flowWorkOrderId) || '',
361
- tid: orderNo
362
- });
363
- }
364
- searchList();
365
- }, [otherInfo, dispatch, buyerId, orderNo]);
391
+ initHandle(otherInfo, buyerId, orderNo);
392
+ }, [otherInfo, buyerId, orderNo]);
366
393
  var searchHandle = function searchHandle() {
367
394
  var templateList = form.getFieldValue('templateIdList');
368
395
  if (templateList && templateList.length) {
@@ -396,28 +423,28 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
396
423
  className: "custom_box_search_buyer",
397
424
  checked: currentBuyerChecked,
398
425
  onChange: /*#__PURE__*/function () {
399
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
400
- return _regeneratorRuntime().wrap(function _callee$(_context) {
401
- while (1) switch (_context.prev = _context.next) {
426
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
427
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
428
+ while (1) switch (_context2.prev = _context2.next) {
402
429
  case 0:
403
430
  if (buyerId) {
404
- _context.next = 2;
431
+ _context2.next = 2;
405
432
  break;
406
433
  }
407
- return _context.abrupt("return", message.warning('请先选择买家,再查询工单!'));
434
+ return _context2.abrupt("return", message.warning('请先选择买家,再查询工单!'));
408
435
  case 2:
409
- _context.next = 4;
436
+ _context2.next = 4;
410
437
  return dispatch(setCurrentBuyerChecked(e.target.checked));
411
438
  case 4:
412
439
  searchHandle();
413
440
  case 5:
414
441
  case "end":
415
- return _context.stop();
442
+ return _context2.stop();
416
443
  }
417
- }, _callee);
444
+ }, _callee2);
418
445
  }));
419
- return function (_x2) {
420
- return _ref5.apply(this, arguments);
446
+ return function (_x5) {
447
+ return _ref6.apply(this, arguments);
421
448
  };
422
449
  }()
423
450
  }, "\u5F53\u524D\u4E70\u5BB6")), /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("span", {
@@ -534,9 +561,9 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
534
561
  dispatch(setFormModalVisible(false));
535
562
  queryPanelInfoHandle(record);
536
563
  };
537
- var handleCreateWorkOrderByFlowId = function handleCreateWorkOrderByFlowId(_ref6) {
538
- var logicFlowId = _ref6.id,
539
- name = _ref6.name;
564
+ var handleCreateWorkOrderByFlowId = function handleCreateWorkOrderByFlowId(_ref7) {
565
+ var logicFlowId = _ref7.id,
566
+ name = _ref7.name;
540
567
  setTitle(name);
541
568
  dispatch(setLogicFlowId(logicFlowId));
542
569
  dispatch(setFlowWorkOrderId(''));
@@ -20,7 +20,7 @@ import { Provider } from 'react-redux';
20
20
  import { useAppSelector, useAppDispatch } from "../model/hooks";
21
21
  import { fetchQueryCurrentCompanyUser } from "../model/workOrder";
22
22
  import { fetchLogicFlowList } from "../model/logicFlow";
23
- import { setCurrentBuyerChecked, showPayment } from "../model/customizeWorkOrder";
23
+ import { showPayment } from "../model/customizeWorkOrder";
24
24
  import store from "../model/store";
25
25
  import { fetchLogOut, fetchxzLogOut } from "../model/login";
26
26
  import { Global } from '@kmkf-fe-packages/services-components';
@@ -106,20 +106,6 @@ var WorkOrder = function WorkOrder(props) {
106
106
  _useState6 = _slicedToArray(_useState5, 2),
107
107
  visible = _useState6[0],
108
108
  setVisible = _useState6[1];
109
- // useEffect(() => {
110
- // if (buyerId) {
111
- // dispatch(setCurrentBuyerChecked(true));
112
- // } else {
113
- // dispatch(setCurrentBuyerChecked(false));
114
- // }
115
- // }, [buyerId]);
116
- useEffect(function () {
117
- if ([6, 7].includes(otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.showFrom) && (otherInfo !== null && otherInfo !== void 0 && otherInfo.flowWorkOrderId || orderNo) || !buyerId) {
118
- dispatch(setCurrentBuyerChecked(false));
119
- } else {
120
- dispatch(setCurrentBuyerChecked(true));
121
- }
122
- }, [otherInfo, dispatch, buyerId, orderNo]);
123
109
  useEffect(function () {
124
110
  //存储平台信息
125
111
  dispatch({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "2.2.13-beta.101",
3
+ "version": "2.2.13-beta.103",
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.2.13-beta.100",
35
+ "@kmkf-fe-packages/basic-components": "2.2.13-beta.103",
36
36
  "@kmkf-fe-packages/kmkf-utils": "2.2.13-beta.96",
37
- "@kmkf-fe-packages/services-components": "2.2.13-beta.100",
37
+ "@kmkf-fe-packages/services-components": "2.2.13-beta.103",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -74,7 +74,7 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "49e6cd7d4693870fa5aa3d2290f62520c65ce03f",
77
+ "gitHead": "075c24c64f23a9aac40ccb08d5604632392b0a8b",
78
78
  "gitHooks": {
79
79
  "pre-commit": "lint-staged"
80
80
  }