@kmkf-fe-packages/kmkf-work-order-service-component 0.8.7-alpha.0 → 0.8.7-alpha.2

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.
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ result: {
4
+ success?: number;
5
+ failed?: number;
6
+ };
7
+ };
8
+ declare const BatchSubmitProgress: ({ result }: Props) => React.JSX.Element;
9
+ export default BatchSubmitProgress;
@@ -0,0 +1,41 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useEffect, useState, useRef } from 'react';
8
+ import { Progress } from 'antd';
9
+ import { isEmpty } from 'lodash';
10
+ var BatchSubmitProgress = function BatchSubmitProgress(_ref) {
11
+ var result = _ref.result;
12
+ var _useState = useState(0),
13
+ _useState2 = _slicedToArray(_useState, 2),
14
+ percent = _useState2[0],
15
+ setPercent = _useState2[1];
16
+ var timer = useRef(null);
17
+ useEffect(function () {
18
+ timer.current = setInterval(function () {
19
+ setPercent(function (p) {
20
+ return ++p;
21
+ });
22
+ }, 2000);
23
+ return function () {
24
+ return clearInterval(timer.current);
25
+ };
26
+ }, []);
27
+ useEffect(function () {
28
+ if (!isEmpty(result)) {
29
+ clearInterval(timer.current);
30
+ setPercent(100);
31
+ }
32
+ }, [result]);
33
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, percent !== 100 && '工单提交中,请勿关闭弹框'), /*#__PURE__*/React.createElement(Progress, {
34
+ percent: percent
35
+ }), !isEmpty(result) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, "\u6210\u529F\u6570\u91CF: ".concat(result === null || result === void 0 ? void 0 : result.success)), /*#__PURE__*/React.createElement("span", {
36
+ style: {
37
+ marginLeft: '16px'
38
+ }
39
+ }, "\u5931\u8D25\u6570\u91CF: ".concat(result === null || result === void 0 ? void 0 : result.failed))));
40
+ };
41
+ export default BatchSubmitProgress;
@@ -11,6 +11,7 @@ declare type Props = {
11
11
  accountName: string;
12
12
  platform: PlatForm;
13
13
  };
14
+ callBackComplete: (list: any) => void;
14
15
  };
15
- declare const _default: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
16
- export default _default;
16
+ declare const BatchSubmitFormList: ({ workOrderList, shopList, plat, callBackComplete }: Props, ref: any) => React.JSX.Element;
17
+ export default BatchSubmitFormList;
@@ -8,7 +8,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
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
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
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import React, { useEffect, useRef, useState, useImperativeHandle, forwardRef } from 'react';
11
+ import React, { useEffect, useRef, useState } from 'react';
12
12
  import { groupBy, get, find } from 'lodash';
13
13
  import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData } from '@kmkf-fe-packages/kmkf-utils';
14
14
  import VirtualForm from "./VirtualForm";
@@ -16,15 +16,21 @@ import { verifyHandle, submitParams } from "../FlowTemplateDetail/common";
16
16
  import { submitWorkOrder } from "../model/flowTemplateDetail/api";
17
17
  import { concurrencyRequest } from "./common";
18
18
  import { batchQueryNodeDetail } from "../model/flowTemplateDetail/api";
19
+ import BatchSubmitProgress from "./BatchSubmitProgress";
19
20
  var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
20
21
  var workOrderList = _ref.workOrderList,
21
22
  shopList = _ref.shopList,
22
- plat = _ref.plat;
23
+ plat = _ref.plat,
24
+ callBackComplete = _ref.callBackComplete;
23
25
  var formInstanceList = useRef([]);
24
26
  var _useState = useState([]),
25
27
  _useState2 = _slicedToArray(_useState, 2),
26
28
  flowTemplateNodeDetailList = _useState2[0],
27
29
  setFlowTemplateNodeDetailList = _useState2[1];
30
+ var _useState3 = useState({}),
31
+ _useState4 = _slicedToArray(_useState3, 2),
32
+ result = _useState4[0],
33
+ setResult = _useState4[1];
28
34
  AddressData.getInstance();
29
35
  ExpressData.getInstance();
30
36
  ExpressInterceptData.getInstance();
@@ -33,7 +39,8 @@ var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
33
39
  // 批量查询所选择数据记录
34
40
  var queryRecordList = /*#__PURE__*/function () {
35
41
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
36
- var _yield$batchQueryNode, _yield$batchQueryNode2, data;
42
+ var _formInstanceList$cur, _filter;
43
+ var _yield$batchQueryNode, _yield$batchQueryNode2, data, promises, list, successTotal, failedTotal;
37
44
  return _regeneratorRuntime().wrap(function _callee$(_context) {
38
45
  while (1) switch (_context.prev = _context.next) {
39
46
  case 0:
@@ -46,7 +53,33 @@ var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
46
53
  _yield$batchQueryNode2 = _yield$batchQueryNode.data;
47
54
  data = _yield$batchQueryNode2 === void 0 ? [] : _yield$batchQueryNode2;
48
55
  setFlowTemplateNodeDetailList(data);
49
- case 6:
56
+ // TODO: 等待表单渲染时间
57
+ _context.next = 8;
58
+ return new Promise(function (resolve) {
59
+ return setTimeout(function () {
60
+ return resolve(null);
61
+ }, 1500 * ((workOrderList === null || workOrderList === void 0 ? void 0 : workOrderList.length) % 15 + 1));
62
+ });
63
+ case 8:
64
+ promises = (_formInstanceList$cur = formInstanceList.current) === null || _formInstanceList$cur === void 0 ? void 0 : _formInstanceList$cur.map(function (formInstance) {
65
+ return function () {
66
+ return submitSingleRecord(formInstance);
67
+ };
68
+ });
69
+ _context.next = 11;
70
+ return concurrencyRequest(promises, 6);
71
+ case 11:
72
+ list = _context.sent;
73
+ successTotal = list === null || list === void 0 ? void 0 : (_filter = list.filter(function (l) {
74
+ return l === null || l === void 0 ? void 0 : l.success;
75
+ })) === null || _filter === void 0 ? void 0 : _filter.length;
76
+ failedTotal = (list === null || list === void 0 ? void 0 : list.length) - successTotal;
77
+ setResult({
78
+ success: successTotal,
79
+ failed: failedTotal
80
+ });
81
+ typeof callBackComplete === 'function' && callBackComplete(list);
82
+ case 16:
50
83
  case "end":
51
84
  return _context.stop();
52
85
  }
@@ -56,7 +89,6 @@ var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
56
89
  return _ref2.apply(this, arguments);
57
90
  };
58
91
  }();
59
- console.log('flowTemplateNodeDetailList', flowTemplateNodeDetailList);
60
92
  var getNodeDetail = function getNodeDetail(_ref3) {
61
93
  var flowTemplateId = _ref3.flowTemplateId,
62
94
  nodeId = _ref3.nodeId;
@@ -82,7 +114,7 @@ var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
82
114
  }, [workOrderList]);
83
115
  var submitSingleRecord = /*#__PURE__*/function () {
84
116
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref4) {
85
- var form, workOrderId, formData, record, _ref6, nodeDetail, result, params, res;
117
+ var form, workOrderId, formData, record, _ref6, nodeDetail, _result, params, res;
86
118
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
87
119
  while (1) switch (_context2.prev = _context2.next) {
88
120
  case 0:
@@ -100,8 +132,8 @@ var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
100
132
  flowTemplateId: record === null || record === void 0 ? void 0 : record.flowTemplateId,
101
133
  nodeId: record === null || record === void 0 ? void 0 : record.nodeId
102
134
  }) || {}, nodeDetail = _ref6.workOrderTemplateInfo;
103
- result = verifyHandle(formData, (nodeDetail === null || nodeDetail === void 0 ? void 0 : nodeDetail.componentDtoList) || []);
104
- if (result.success) {
135
+ _result = verifyHandle(formData, (nodeDetail === null || nodeDetail === void 0 ? void 0 : nodeDetail.componentDtoList) || []);
136
+ if (_result.success) {
105
137
  _context2.next = 10;
106
138
  break;
107
139
  }
@@ -148,39 +180,7 @@ var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
148
180
  return _ref5.apply(this, arguments);
149
181
  };
150
182
  }();
151
- useImperativeHandle(ref, function () {
152
- return {
153
- submit: function () {
154
- var _submit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
155
- var _formInstanceList$cur;
156
- var promises, list;
157
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
158
- while (1) switch (_context3.prev = _context3.next) {
159
- case 0:
160
- promises = (_formInstanceList$cur = formInstanceList.current) === null || _formInstanceList$cur === void 0 ? void 0 : _formInstanceList$cur.map(function (formInstance) {
161
- return function () {
162
- return submitSingleRecord(formInstance);
163
- };
164
- });
165
- _context3.next = 3;
166
- return concurrencyRequest(promises, 6);
167
- case 3:
168
- list = _context3.sent;
169
- return _context3.abrupt("return", list);
170
- case 5:
171
- case "end":
172
- return _context3.stop();
173
- }
174
- }, _callee3);
175
- }));
176
- function submit() {
177
- return _submit.apply(this, arguments);
178
- }
179
- return submit;
180
- }()
181
- };
182
- });
183
- return /*#__PURE__*/React.createElement("div", {
183
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
184
184
  style: {
185
185
  display: 'none'
186
186
  }
@@ -200,6 +200,8 @@ var BatchSubmitFormList = function BatchSubmitFormList(_ref, ref) {
200
200
  })) === null || _getNodeDetail === void 0 ? void 0 : _getNodeDetail.workOrderTemplateInfo,
201
201
  shopList: shopList
202
202
  });
203
+ })), /*#__PURE__*/React.createElement(BatchSubmitProgress, {
204
+ result: result
203
205
  }));
204
206
  };
205
- export default /*#__PURE__*/forwardRef(BatchSubmitFormList);
207
+ export default BatchSubmitFormList;
@@ -14,7 +14,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
14
14
  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; }
15
15
  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; } }
16
16
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
- import React, { useEffect, useState, useRef } from 'react';
17
+ import React, { useEffect, useState, useRef, useMemo } from 'react';
18
18
  import { Timeline, ConfigProvider, Form, message, Alert, Button, Spin } from 'antd';
19
19
  import { get, find } from 'lodash';
20
20
  import { useDispatch, useSelector, Provider } from 'react-redux';
@@ -38,7 +38,7 @@ import { verifyHandle, submitParams, FLOW_STATUS_V2, getTag } from "./common";
38
38
  import { saveWorkOrder, submitWorkOrder, addRemark, stopWorkOrder, closeWorkOrder, startWorkOrder, forwardWorkOrder, returnWorkOrder } from "../model/flowTemplateDetail/api";
39
39
  import "./index.less";
40
40
  var FlowTemplateDetail = function FlowTemplateDetail(props) {
41
- var _currentNodeDetail$no, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$no7, _currentNodeDetail$no8, _currentNodeDetail$no9;
41
+ var _currentNodeDetail$no, _currentNodeDetail$no11, _currentNodeDetail$no12, _currentNodeDetail$no13;
42
42
  var flowTemplateKey = props.flowTemplateKey,
43
43
  _props$shopList = props.shopList,
44
44
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -567,9 +567,18 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
567
567
  useEffect(function () {
568
568
  initHandle();
569
569
  }, []);
570
- var isCurrentNodeHandler = Array.isArray(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.handlerList) && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : (_currentNodeDetail$wo13 = _currentNodeDetail$wo12.handlerList) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.length) === 0 || !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo14 !== void 0 && (_currentNodeDetail$wo15 = _currentNodeDetail$wo14.handlerList) !== null && _currentNodeDetail$wo15 !== void 0 && _currentNodeDetail$wo15.find(function (item) {
571
- return item.account === plat.accountName;
572
- }));
570
+ var isCurrentNodeHandler = useMemo(function () {
571
+ var _currentNodeDetail$no7, _currentNodeDetail$no8, _currentNodeDetail$no9, _currentNodeDetail$no10;
572
+ var isAllStaff = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : (_currentNodeDetail$no8 = _currentNodeDetail$no7.assistants) === null || _currentNodeDetail$no8 === void 0 ? void 0 : _currentNodeDetail$no8.isAllStaff;
573
+ var staffs = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : (_currentNodeDetail$no10 = _currentNodeDetail$no9.assistants) === null || _currentNodeDetail$no10 === void 0 ? void 0 : _currentNodeDetail$no10.staffIds;
574
+ if (!isAllStaff) {
575
+ var _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15;
576
+ return Array.isArray(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.handlerList) && (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : (_currentNodeDetail$wo13 = _currentNodeDetail$wo12.handlerList) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.length) === 0 || !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo14 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo14 !== void 0 && (_currentNodeDetail$wo15 = _currentNodeDetail$wo14.handlerList) !== null && _currentNodeDetail$wo15 !== void 0 && _currentNodeDetail$wo15.find(function (item) {
577
+ return item.account === plat.accountName;
578
+ }));
579
+ }
580
+ return (staffs === null || staffs === void 0 ? void 0 : staffs.length) === 0 || (staffs === null || staffs === void 0 ? void 0 : staffs.includes(plat.userKey));
581
+ }, [currentNodeDetail, plat]);
573
582
  return /*#__PURE__*/React.createElement(Spin, {
574
583
  spinning: loading
575
584
  }, /*#__PURE__*/React.createElement("div", {
@@ -609,8 +618,8 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
609
618
  handleOpenRemarkList: handleOpenRemarkList,
610
619
  handleOpenAddRemark: handleOpenAddRemark
611
620
  }))), getTag({
612
- nodeIsAuto: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no7 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no7 === void 0 ? void 0 : _currentNodeDetail$no7.isAuto,
613
- nodeType: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no8 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no8 === void 0 ? void 0 : _currentNodeDetail$no8.nodeType
621
+ nodeIsAuto: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no11 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no11 === void 0 ? void 0 : _currentNodeDetail$no11.isAuto,
622
+ nodeType: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no12 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no12 === void 0 ? void 0 : _currentNodeDetail$no12.nodeType
614
623
  }) === 'artificial' && (!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder) || isCurrentNodeHandler) && /*#__PURE__*/React.createElement("div", {
615
624
  className: "footer"
616
625
  }, /*#__PURE__*/React.createElement(ActionList, {
@@ -620,7 +629,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
620
629
  hasPreNode: (flowRecordList === null || flowRecordList === void 0 ? void 0 : flowRecordList.length) > 0
621
630
  })), /*#__PURE__*/React.createElement(RemarkListModal, null), /*#__PURE__*/React.createElement(ForWardModal, {
622
631
  flowWorkOrderId: flowWorkOrderId,
623
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : _currentNodeDetail$no9.id,
632
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no13 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no13 === void 0 ? void 0 : _currentNodeDetail$no13.id,
624
633
  handleForWard: handleForWard
625
634
  }), /*#__PURE__*/React.createElement(StopModal, {
626
635
  handleStop: handleStop
@@ -1,5 +1,5 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  declare const DeleteCustomizeOrderModal: ({ submit }: {
3
3
  submit: () => void;
4
- }) => React.JSX.Element;
4
+ }) => JSX.Element;
5
5
  export default DeleteCustomizeOrderModal;
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  declare type OrderListProps = {
3
3
  list: any[];
4
4
  };
5
- declare const OrderList: ({ list }: OrderListProps) => React.JSX.Element;
5
+ declare const OrderList: ({ list }: OrderListProps) => JSX.Element;
6
6
  export default OrderList;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import './index.less';
3
3
  declare type PropsType = {
4
4
  templateList: {
@@ -7,5 +7,5 @@ declare type PropsType = {
7
7
  }[];
8
8
  handleCreateWorkOrder: (p: string) => void;
9
9
  };
10
- declare const TemplateList: ({ templateList, handleCreateWorkOrder }: PropsType) => React.JSX.Element;
10
+ declare const TemplateList: ({ templateList, handleCreateWorkOrder }: PropsType) => JSX.Element;
11
11
  export default TemplateList;
@@ -3,6 +3,6 @@ import './index.less';
3
3
  declare type RecordModal = {
4
4
  width?: string;
5
5
  };
6
- declare function RecordModal(props: RecordModal): React.JSX.Element;
6
+ declare function RecordModal(props: RecordModal): JSX.Element;
7
7
  declare const _default: React.MemoExoticComponent<typeof RecordModal>;
8
8
  export default _default;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import './index.less';
3
- declare const RepeatWorkOrderListModal: () => React.JSX.Element;
3
+ declare const RepeatWorkOrderListModal: () => JSX.Element;
4
4
  export default RepeatWorkOrderListModal;
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  interface ReminderProps {
3
3
  callback?: () => void;
4
4
  }
5
- declare function Reminder(props: ReminderProps): React.JSX.Element;
5
+ declare function Reminder(props: ReminderProps): JSX.Element;
6
6
  export default Reminder;
@@ -160,7 +160,8 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
160
160
  buyerId = platformInfo.buyerId,
161
161
  platform = platformInfo.platform,
162
162
  shopId = platformInfo.shopId,
163
- orderNo = platformInfo.orderNo;
163
+ orderNo = platformInfo.orderNo,
164
+ userKey = platformInfo.userKey;
164
165
  var listRef = useRef();
165
166
  var _Form$useForm = Form.useForm(),
166
167
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
@@ -406,7 +407,8 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
406
407
  dispatch(setFormModalVisible(true));
407
408
  };
408
409
  var onDealWorkOrderSuccess = function onDealWorkOrderSuccess(type) {
409
- if (['submit', 'save'].includes(type)) {
410
+ //除了 暂停和启动外,都需要更新列表数据
411
+ if (!['stop', 'open'].includes(type)) {
410
412
  searchList();
411
413
  } else {
412
414
  queryPanelInfoHandle(record);
@@ -471,7 +473,8 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
471
473
  buyerId: buyerId,
472
474
  buyerNick: buyerNick,
473
475
  platform: platform,
474
- shopId: shopId
476
+ shopId: shopId,
477
+ userKey: userKey
475
478
  },
476
479
  callbackDealWorkOrderSuccess: onDealWorkOrderSuccess,
477
480
  onOpenWangWang: onOpenWangWang
@@ -8,6 +8,7 @@ interface WorkOrderProps {
8
8
  buyerNick?: string;
9
9
  buyerId?: string;
10
10
  orderNo?: string;
11
+ userKey?: string;
11
12
  onEmpowerCallback?: () => void;
12
13
  onOpenWangWang?: (nick: string, id: string) => void;
13
14
  }
@@ -35,6 +35,7 @@ var WorkOrder = function WorkOrder(props) {
35
35
  buyerNick = props.buyerNick,
36
36
  buyerId = props.buyerId,
37
37
  orderNo = props.orderNo,
38
+ userKey = props.userKey,
38
39
  onEmpowerCallback = props.onEmpowerCallback,
39
40
  onOpenWangWang = props.onOpenWangWang;
40
41
  var dispatch = useAppDispatch();
@@ -70,7 +71,8 @@ var WorkOrder = function WorkOrder(props) {
70
71
  shopId: shopId,
71
72
  buyerNick: buyerNick,
72
73
  buyerId: buyerId,
73
- orderNo: orderNo
74
+ orderNo: orderNo,
75
+ userKey: userKey
74
76
  }
75
77
  }
76
78
  });
@@ -15,6 +15,7 @@ export interface PlatFormInfo {
15
15
  buyerNick?: string;
16
16
  platform: PlatForm;
17
17
  accountName: string;
18
+ userKey: string;
18
19
  shopId?: string;
19
20
  }
20
21
  export declare type CurrentNodeDetail = Pick<QyFlowPanelInfoResponse, 'currentNodeDetail'>;
@@ -5,7 +5,7 @@ export declare const selectPaymentWorkOrderExamineModalVisible: ((state: {
5
5
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
6
6
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
7
7
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
8
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
8
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean & {
9
9
  clearCache: () => void;
10
10
  }> & {
11
11
  clearCache: () => void;
@@ -17,9 +17,7 @@ export declare const selectCurrentPaymentRecord: ((state: {
17
17
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
18
18
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
19
19
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
20
- }) => any) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => any, {
21
- clearCache: () => void;
22
- }> & {
20
+ }) => any) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => any> & {
23
21
  clearCache: () => void;
24
22
  };
25
23
  export declare const selectPaymentWorkOrderUnExamineModalVisible: ((state: {
@@ -29,7 +27,7 @@ export declare const selectPaymentWorkOrderUnExamineModalVisible: ((state: {
29
27
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
30
28
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
31
29
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
32
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
30
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean & {
33
31
  clearCache: () => void;
34
32
  }> & {
35
33
  clearCache: () => void;
@@ -41,7 +39,7 @@ export declare const selectDeletePaymentWorkOrderVisible: ((state: {
41
39
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
42
40
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
43
41
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
44
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
42
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean & {
45
43
  clearCache: () => void;
46
44
  }> & {
47
45
  clearCache: () => void;
@@ -53,7 +51,7 @@ export declare const selectFlagPayModalVisible: ((state: {
53
51
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
54
52
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
55
53
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
56
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
54
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean & {
57
55
  clearCache: () => void;
58
56
  }> & {
59
57
  clearCache: () => void;
@@ -65,7 +63,7 @@ export declare const selectLogModalVisible: ((state: {
65
63
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
66
64
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
67
65
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
68
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
66
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean & {
69
67
  clearCache: () => void;
70
68
  }> & {
71
69
  clearCache: () => void;
@@ -77,7 +75,7 @@ export declare const selectPaymentFormModalVisible: ((state: {
77
75
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
78
76
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
79
77
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
80
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
78
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean & {
81
79
  clearCache: () => void;
82
80
  }> & {
83
81
  clearCache: () => void;
@@ -89,7 +87,7 @@ export declare const selectRepeatVisible: ((state: {
89
87
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
90
88
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
91
89
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
92
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean, {
90
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => boolean & {
93
91
  clearCache: () => void;
94
92
  }> & {
95
93
  clearCache: () => void;
@@ -101,7 +99,7 @@ export declare const selectRepeatWorkOrderList: ((state: {
101
99
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
102
100
  paymentWorkOrder: import("./types").PaymentWorkOrderState;
103
101
  singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
104
- }) => string[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => string[], {
102
+ }) => string[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").PaymentWorkOrderState) => string[] & {
105
103
  clearCache: () => void;
106
104
  }> & {
107
105
  clearCache: () => void;
@@ -5,7 +5,7 @@ export declare const selectorSingleTemplateList: ((state: {
5
5
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
6
6
  paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
7
7
  singleWorkOrder: import("./types").SingleWorkOrderState;
8
- }) => import("./types").SelectI[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => import("./types").SelectI[], {
8
+ }) => import("./types").SelectI[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => import("./types").SelectI[] & {
9
9
  clearCache: () => void;
10
10
  }> & {
11
11
  clearCache: () => void;
@@ -17,7 +17,7 @@ export declare const selectDeleteCustomizeWorkOrderModalVisible: ((state: {
17
17
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
18
18
  paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
19
19
  singleWorkOrder: import("./types").SingleWorkOrderState;
20
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => boolean, {
20
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => boolean & {
21
21
  clearCache: () => void;
22
22
  }> & {
23
23
  clearCache: () => void;
@@ -29,9 +29,7 @@ export declare const selectorCurrentCustomizeRecord: ((state: {
29
29
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
30
30
  paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
31
31
  singleWorkOrder: import("./types").SingleWorkOrderState;
32
- }) => any) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => any, {
33
- clearCache: () => void;
34
- }> & {
32
+ }) => any) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => any> & {
35
33
  clearCache: () => void;
36
34
  };
37
35
  export declare const selectorTemplateId: ((state: {
@@ -41,7 +39,7 @@ export declare const selectorTemplateId: ((state: {
41
39
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
42
40
  paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
43
41
  singleWorkOrder: import("./types").SingleWorkOrderState;
44
- }) => string) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => string, {
42
+ }) => string) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => string & {
45
43
  clearCache: () => void;
46
44
  }> & {
47
45
  clearCache: () => void;
@@ -53,7 +51,7 @@ export declare const selectorFormModalVisible: ((state: {
53
51
  customizeWorkOrder: import("../customizeWorkOrder/types").CustomizeWorkOrderState;
54
52
  paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
55
53
  singleWorkOrder: import("./types").SingleWorkOrderState;
56
- }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => boolean, {
54
+ }) => boolean) & import("reselect").OutputSelectorFields<(args_0: import("./types").SingleWorkOrderState) => boolean & {
57
55
  clearCache: () => void;
58
56
  }> & {
59
57
  clearCache: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "0.8.7-alpha.0",
3
+ "version": "0.8.7-alpha.2",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -34,7 +34,7 @@
34
34
  "@ant-design/icons": "^4.7.0",
35
35
  "@kmkf-fe-packages/basic-components": "^0.8.7-alpha.0",
36
36
  "@kmkf-fe-packages/kmkf-utils": "^0.8.7-alpha.0",
37
- "@kmkf-fe-packages/services-components": "^0.8.7-alpha.0",
37
+ "@kmkf-fe-packages/services-components": "^0.8.7-alpha.2",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -75,5 +75,5 @@
75
75
  "gitHooks": {
76
76
  "pre-commit": "lint-staged"
77
77
  },
78
- "gitHead": "9158e2dbe552cdeb64e38bea7b604f3c3b37c8df"
78
+ "gitHead": "840a884c4e9574bea4474ae705bd3adc7851b6eb"
79
79
  }