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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,9 +77,9 @@ export var submitParams = function submitParams(_ref) {
77
77
  var newTemplateDetail = cloneDeep(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) || {};
78
78
  var params = {
79
79
  isAdd: !update,
80
- operateParams: _objectSpread({
80
+ operateParams: _objectSpread(_objectSpread({}, operateParams), {}, {
81
81
  nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no === void 0 ? void 0 : _currentNodeDetail$no.id
82
- }, operateParams)
82
+ })
83
83
  };
84
84
  if (update) {
85
85
  var _currentNodeDetail$wo, _currentNodeDetail$wo2, _currentNodeDetail$wo3, _currentNodeDetail$wo4, _currentNodeDetail$wo5;
@@ -28,11 +28,43 @@ import { get, some, set, every, cloneDeep, isEmpty } from 'lodash';
28
28
  import 'moment/locale/zh-cn';
29
29
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME } from "../../../common/utils/tools";
30
30
  import { replaceCheck } from "../../../model/servers/api";
31
- import { factory } from '@kmkf-fe-packages/services-components';
31
+ import { factory, ShopList } from '@kmkf-fe-packages/services-components';
32
32
  import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData, getExpression, formatDisplayConfig } from '@kmkf-fe-packages/kmkf-utils';
33
- import ShopName from "../ShopName";
34
33
  import { PlatForm } from "../../../model/flowTemplateDetail/types";
35
34
  import "./index.less";
35
+ var ShopName = function ShopName(_ref) {
36
+ var shopList = _ref.shopList,
37
+ workOrderId = _ref.workOrderId,
38
+ look = _ref.look,
39
+ handleChangeShopId = _ref.handleChangeShopId,
40
+ hidden = _ref.hidden;
41
+ return /*#__PURE__*/React.createElement("div", {
42
+ className: "form-item--wrap",
43
+ style: {
44
+ position: 'relative'
45
+ },
46
+ key: 'shopId'
47
+ }, /*#__PURE__*/React.createElement(Form.Item, {
48
+ name: "shopId",
49
+ label: "\u5E97\u94FA\u540D\u79F0",
50
+ className: "form-item-label--index",
51
+ hidden: hidden,
52
+ rules: [{
53
+ required: true,
54
+ message: '请选择店铺名称'
55
+ }]
56
+ }, /*#__PURE__*/React.createElement(ShopList, {
57
+ shopList: shopList,
58
+ disabled: !!workOrderId || look,
59
+ setShopId: handleChangeShopId,
60
+ placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
61
+ showSearch: true,
62
+ optionFilterProp: "label",
63
+ style: {
64
+ width: '220px'
65
+ }
66
+ })));
67
+ };
36
68
  var hasComponent = function hasComponent(componentDtoList, workOrderComponentType) {
37
69
  var _componentDtoList$fin;
38
70
  return (_componentDtoList$fin = componentDtoList.find(function (item) {
@@ -105,7 +137,7 @@ var FormRender = function FormRender(props) {
105
137
  };
106
138
  //查询重复数量
107
139
  var queryReplaceCount = /*#__PURE__*/function () {
108
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(componentValue, templateDetail) {
140
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(componentValue, templateDetail) {
109
141
  var needCheckComponentList, params, _yield$replaceCheck, resultList, resultParams;
110
142
  return _regeneratorRuntime().wrap(function _callee$(_context) {
111
143
  while (1) switch (_context.prev = _context.next) {
@@ -145,7 +177,7 @@ var FormRender = function FormRender(props) {
145
177
  }, _callee);
146
178
  }));
147
179
  return function queryReplaceCount(_x2, _x3) {
148
- return _ref.apply(this, arguments);
180
+ return _ref2.apply(this, arguments);
149
181
  };
150
182
  }();
151
183
  //自动返填重复校验
@@ -164,14 +196,14 @@ var FormRender = function FormRender(props) {
164
196
  enterprisePaymentTid: orderNo
165
197
  }, templateDetail);
166
198
  };
167
- var queryDetail = function queryDetail(_ref2) {
168
- var workOrderId = _ref2.workOrderId,
169
- shopId = _ref2.shopId,
170
- shopList = _ref2.shopList,
171
- record = _ref2.record,
172
- orderNo = _ref2.orderNo,
173
- buyerId = _ref2.buyerId,
174
- buyerNick = _ref2.buyerNick;
199
+ var queryDetail = function queryDetail(_ref3) {
200
+ var workOrderId = _ref3.workOrderId,
201
+ shopId = _ref3.shopId,
202
+ shopList = _ref3.shopList,
203
+ record = _ref3.record,
204
+ orderNo = _ref3.orderNo,
205
+ buyerId = _ref3.buyerId,
206
+ buyerNick = _ref3.buyerNick;
175
207
  form.resetFields();
176
208
  //获取一些默认数据
177
209
  var jsonMap = templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList.reduce(function (prv, next) {
@@ -267,7 +299,7 @@ var FormRender = function FormRender(props) {
267
299
  };
268
300
  //组件失焦事件
269
301
  var componentOnBlur = /*#__PURE__*/function () {
270
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value, type) {
302
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value, type) {
271
303
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
272
304
  while (1) switch (_context2.prev = _context2.next) {
273
305
  case 0:
@@ -295,7 +327,7 @@ var FormRender = function FormRender(props) {
295
327
  }, _callee2);
296
328
  }));
297
329
  return function componentOnBlur(_x4, _x5) {
298
- return _ref3.apply(this, arguments);
330
+ return _ref4.apply(this, arguments);
299
331
  };
300
332
  }();
301
333
  // 切换店铺
@@ -448,8 +480,8 @@ var FormRender = function FormRender(props) {
448
480
  return cur || (prevValues === null || prevValues === void 0 ? void 0 : prevValues[nxt]) !== (currentValues === null || currentValues === void 0 ? void 0 : currentValues[nxt]);
449
481
  }, false);
450
482
  }
451
- }, function (_ref4) {
452
- var getFieldValue = _ref4.getFieldValue;
483
+ }, function (_ref5) {
484
+ var getFieldValue = _ref5.getFieldValue;
453
485
  var show = currentIdDependenceOtherFields === null || currentIdDependenceOtherFields === void 0 ? void 0 : currentIdDependenceOtherFields.reduce(function (cur, nxt) {
454
486
  // 如果有一项满足展示条件则展示
455
487
  if (cur) {
@@ -567,9 +599,10 @@ var FormRender = function FormRender(props) {
567
599
  form: form
568
600
  }, formProps), /*#__PURE__*/React.createElement(ShopName, {
569
601
  shopList: shopList,
602
+ workOrderId: workOrderId,
603
+ look: look,
570
604
  handleChangeShopId: handleChangeShopId,
571
- hidden: !isShowShopList,
572
- disabled: !!workOrderId || look
605
+ hidden: !isShowShopList
573
606
  }), finalFormItems));
574
607
  };
575
608
  export default FormRender;
@@ -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, useMemo } from 'react';
17
+ import React, { useEffect, useState, useRef } 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$no11, _currentNodeDetail$no12, _currentNodeDetail$no13;
41
+ var _currentNodeDetail$no, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$no7, _currentNodeDetail$no8, _currentNodeDetail$no9;
42
42
  var flowTemplateKey = props.flowTemplateKey,
43
43
  _props$shopList = props.shopList,
44
44
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -567,17 +567,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
567
567
  useEffect(function () {
568
568
  initHandle();
569
569
  }, []);
570
- var isCurrentNodeHandler = useMemo(function () {
571
- var _currentNodeDetail$no7, _currentNodeDetail$no8, _currentNodeDetail$no9, _currentNodeDetail$no10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15;
572
- var groupCanOperate = (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.operateDataPermission) === 'HANDLE_ALL';
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 (groupCanOperate) {
575
- return (staffs === null || staffs === void 0 ? void 0 : staffs.length) === 0 || (staffs === null || staffs === void 0 ? void 0 : staffs.includes(plat.userKey));
576
- }
577
- 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) {
578
- return item.account === plat.accountName;
579
- }));
580
- }, [currentNodeDetail, plat]);
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
+ }));
581
573
  return /*#__PURE__*/React.createElement(Spin, {
582
574
  spinning: loading
583
575
  }, /*#__PURE__*/React.createElement("div", {
@@ -617,8 +609,8 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
617
609
  handleOpenRemarkList: handleOpenRemarkList,
618
610
  handleOpenAddRemark: handleOpenAddRemark
619
611
  }))), getTag({
620
- nodeIsAuto: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no11 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no11 === void 0 ? void 0 : _currentNodeDetail$no11.isAuto,
621
- nodeType: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no12 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no12 === void 0 ? void 0 : _currentNodeDetail$no12.nodeType
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
622
614
  }) === 'artificial' && (!(currentNodeDetail !== null && currentNodeDetail !== void 0 && currentNodeDetail.workOrder) || isCurrentNodeHandler) && /*#__PURE__*/React.createElement("div", {
623
615
  className: "footer"
624
616
  }, /*#__PURE__*/React.createElement(ActionList, {
@@ -628,7 +620,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
628
620
  hasPreNode: (flowRecordList === null || flowRecordList === void 0 ? void 0 : flowRecordList.length) > 0
629
621
  })), /*#__PURE__*/React.createElement(RemarkListModal, null), /*#__PURE__*/React.createElement(ForWardModal, {
630
622
  flowWorkOrderId: flowWorkOrderId,
631
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no13 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no13 === void 0 ? void 0 : _currentNodeDetail$no13.id,
623
+ nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no9 = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no9 === void 0 ? void 0 : _currentNodeDetail$no9.id,
632
624
  handleForWard: handleForWard
633
625
  }), /*#__PURE__*/React.createElement(StopModal, {
634
626
  handleStop: handleStop
@@ -160,8 +160,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
160
160
  buyerId = platformInfo.buyerId,
161
161
  platform = platformInfo.platform,
162
162
  shopId = platformInfo.shopId,
163
- orderNo = platformInfo.orderNo,
164
- userKey = platformInfo.userKey;
163
+ orderNo = platformInfo.orderNo;
165
164
  var listRef = useRef();
166
165
  var _Form$useForm = Form.useForm(),
167
166
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
@@ -473,8 +472,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
473
472
  buyerId: buyerId,
474
473
  buyerNick: buyerNick,
475
474
  platform: platform,
476
- shopId: shopId,
477
- userKey: userKey
475
+ shopId: shopId
478
476
  },
479
477
  callbackDealWorkOrderSuccess: onDealWorkOrderSuccess,
480
478
  onOpenWangWang: onOpenWangWang
@@ -8,7 +8,6 @@ interface WorkOrderProps {
8
8
  buyerNick?: string;
9
9
  buyerId?: string;
10
10
  orderNo?: string;
11
- userKey?: string;
12
11
  onEmpowerCallback?: () => void;
13
12
  onOpenWangWang?: (nick: string, id: string) => void;
14
13
  }
@@ -35,7 +35,6 @@ var WorkOrder = function WorkOrder(props) {
35
35
  buyerNick = props.buyerNick,
36
36
  buyerId = props.buyerId,
37
37
  orderNo = props.orderNo,
38
- userKey = props.userKey,
39
38
  onEmpowerCallback = props.onEmpowerCallback,
40
39
  onOpenWangWang = props.onOpenWangWang;
41
40
  var dispatch = useAppDispatch();
@@ -71,12 +70,11 @@ var WorkOrder = function WorkOrder(props) {
71
70
  shopId: shopId,
72
71
  buyerNick: buyerNick,
73
72
  buyerId: buyerId,
74
- orderNo: orderNo,
75
- userKey: userKey
73
+ orderNo: orderNo
76
74
  }
77
75
  }
78
76
  });
79
- }, [platform, shopId, buyerNick, buyerId, orderNo, userKey]);
77
+ }, [platform, shopId, buyerNick, buyerId, orderNo]);
80
78
  useEffect(function () {
81
79
  initHandle();
82
80
  }, []);
@@ -1,4 +1,3 @@
1
- import { PlatFormInfo } from '../../model/flowTemplateDetail/types';
2
1
  /**
3
2
  * 多级下拉框数据转换成aPaas数据结构
4
3
  * @param {*} sourceOptions
@@ -72,22 +71,3 @@ export declare const getReplaceWarnValues: (templateDetail: {
72
71
  }) => any;
73
72
  export declare const HasFilterHandle: (templateDetail: any, filterList: string[]) => any;
74
73
  export declare const HasErpItemSelectHandle: (templateDetail?: any) => any;
75
- export declare const platformMap: any;
76
- declare type SubmitParams = {
77
- update: boolean;
78
- formData: Record<string, any>;
79
- currentNodeDetail?: {
80
- workOrderTemplateInfo?: any;
81
- nodeInfo?: any;
82
- workOrder?: any;
83
- };
84
- plat: PlatFormInfo;
85
- shopUniqueKey?: string;
86
- operateParams: Record<string, any>;
87
- };
88
- export declare const submitParams: ({ update, formData, currentNodeDetail, plat, operateParams, shopUniqueKey, }: SubmitParams) => any;
89
- export declare const verifyHandle: (data: any, componentDtoList: Array<any>) => {
90
- success: boolean;
91
- message: string;
92
- };
93
- export {};
@@ -22,9 +22,6 @@ import V from 'voca';
22
22
  import { orderDetail, jstOrderDetail, bsOrderDetail } from "../../model/servers/api";
23
23
  import moment from 'moment';
24
24
  import { AddressData, ExpressData, orderBackFormValues, findLabelBySelectValue, request } from '@kmkf-fe-packages/kmkf-utils';
25
- import { cloneDeep, isEqual, set } from 'lodash';
26
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
27
- import { PlatForm } from "../../model/flowTemplateDetail/types";
28
25
  import cache from "../cache";
29
26
 
30
27
  // 淘宝商品组件信息处理
@@ -1405,133 +1402,4 @@ export var HasErpItemSelectHandle = function HasErpItemSelectHandle() {
1405
1402
  return templateDetail.componentDtoList.some(function (item) {
1406
1403
  return ['ITEM_SELECT_THIRD'].includes(item.workOrderComponentType);
1407
1404
  });
1408
- };
1409
- export var platformMap = {
1410
- tb: '淘宝',
1411
- fxg: '抖音',
1412
- ks: '快手',
1413
- pdd: '拼多多',
1414
- jd: '京东',
1415
- xiaozhi: '小智',
1416
- pc: '客服工作台'
1417
- };
1418
- export var submitParams = function submitParams(_ref5) {
1419
- var _currentNodeDetail$no;
1420
- var update = _ref5.update,
1421
- formData = _ref5.formData,
1422
- currentNodeDetail = _ref5.currentNodeDetail,
1423
- plat = _ref5.plat,
1424
- operateParams = _ref5.operateParams,
1425
- shopUniqueKey = _ref5.shopUniqueKey;
1426
- var newTemplateDetail = cloneDeep(currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrderTemplateInfo) || {};
1427
- var params = {
1428
- isAdd: !update,
1429
- operateParams: _objectSpread({
1430
- nodeId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$no = currentNodeDetail.nodeInfo) === null || _currentNodeDetail$no === void 0 ? void 0 : _currentNodeDetail$no.id
1431
- }, operateParams)
1432
- };
1433
- if (update) {
1434
- var _currentNodeDetail$wo, _currentNodeDetail$wo2, _currentNodeDetail$wo3, _currentNodeDetail$wo4, _currentNodeDetail$wo5;
1435
- params.updateInfo = {
1436
- templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo === void 0 ? void 0 : _currentNodeDetail$wo.templateId,
1437
- workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo2 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo2 === void 0 ? void 0 : _currentNodeDetail$wo2.id,
1438
- updateTime: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo3 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo3 === void 0 ? void 0 : _currentNodeDetail$wo3.update
1439
- };
1440
- params.workOrderUpdateKeyVos = {
1441
- // 这个参数在submitDataTransOldFormat中使用到
1442
- workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo4 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo4 === void 0 ? void 0 : _currentNodeDetail$wo4.id,
1443
- workOrderUpdateKeySupVos: []
1444
- };
1445
- var submitData = submitDataTransOldFormat(formData, newTemplateDetail, !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo5 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo5 !== void 0 && _currentNodeDetail$wo5.id), currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder, params, plat.accountName);
1446
- var updateList = submitData === null || submitData === void 0 ? void 0 : submitData.reduce(function (cur, nxt) {
1447
- var _nxt$contentList;
1448
- nxt === null || nxt === void 0 ? void 0 : (_nxt$contentList = nxt.contentList) === null || _nxt$contentList === void 0 ? void 0 : _nxt$contentList.map(function (item) {
1449
- if (!isEqual(item.oldContent, item.content)) {
1450
- cur.push({
1451
- dataKey: item.uniqueKey,
1452
- name: item.name,
1453
- oldValue: item.oldContent,
1454
- dataValue: item.content
1455
- });
1456
- }
1457
- });
1458
- return cur;
1459
- }, []);
1460
- params.updateInfo.updateList = updateList;
1461
- params.updateInfo.needTransForm = params.needTransForm;
1462
- delete params.workOrderUpdateKeyVos;
1463
- delete params.needTransForm;
1464
- } else {
1465
- var _Object$keys, _currentNodeDetail$wo6, _currentNodeDetail$wo7, _currentNodeDetail$wo8, _currentNodeDetail$wo9, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18, _currentNodeDetail$wo19;
1466
- // TODO: 新保存工单
1467
- // 获取当前表单中非空字段
1468
- var finalComponentList = (_Object$keys = Object.keys(formData)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.filter(function (i) {
1469
- return !isNull(formData[i]);
1470
- });
1471
- // 获取非空字段对应的组件
1472
- var finalDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo6 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo6 === void 0 ? void 0 : (_currentNodeDetail$wo7 = _currentNodeDetail$wo6.componentDtoList) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : _currentNodeDetail$wo7.filter(function (item) {
1473
- return finalComponentList.includes(item.uniqueKey);
1474
- });
1475
- set(newTemplateDetail, 'componentDtoList', finalDtoList);
1476
- params.workOrder = {
1477
- templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.uniqueKey,
1478
- handleWorkOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.id,
1479
- buyerNick: plat === null || plat === void 0 ? void 0 : plat.buyerNick,
1480
- buyerOpenUid: plat === null || plat === void 0 ? void 0 : plat.buyerId,
1481
- shopUniqueKey: shopUniqueKey,
1482
- tid: plat === null || plat === void 0 ? void 0 : plat.orderNo,
1483
- workOrderComponents: [],
1484
- source: get(platformMap, "".concat(plat === null || plat === void 0 ? void 0 : plat.platform), '工单通')
1485
- };
1486
-
1487
- // 判断是否有订单号组建,订单号数据需要特殊处理
1488
- var tradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : (_currentNodeDetail$wo11 = _currentNodeDetail$wo10.componentDtoList) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : (_currentNodeDetail$wo12 = _currentNodeDetail$wo11.find(function (item) {
1489
- return item.workOrderComponentType === 'TRADE_ID_INPUT';
1490
- })) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : _currentNodeDetail$wo12.uniqueKey;
1491
- // 判断是否有订单号组建,订单号数据需要特殊处理
1492
- var paymentTradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo13 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : (_currentNodeDetail$wo14 = _currentNodeDetail$wo13.componentDtoList) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : (_currentNodeDetail$wo15 = _currentNodeDetail$wo14.find(function (item) {
1493
- return item.workOrderComponentType === 'ENTERPRISE_PAYMENT';
1494
- })) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : _currentNodeDetail$wo15.uniqueKey;
1495
-
1496
- // 判断是否有买家昵称或者
1497
- var buyerNickUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo16 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : (_currentNodeDetail$wo17 = _currentNodeDetail$wo16.componentDtoList) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : (_currentNodeDetail$wo18 = _currentNodeDetail$wo17.find(function (item) {
1498
- return item.workOrderComponentType === 'BUYER_NICK_INPUT';
1499
- })) === null || _currentNodeDetail$wo18 === void 0 ? void 0 : _currentNodeDetail$wo18.uniqueKey;
1500
- if (paymentTradeIdUniqueKey) {
1501
- var _formData, _formData2;
1502
- params.workOrder.tid = formData === null || formData === void 0 ? void 0 : (_formData = formData["".concat(paymentTradeIdUniqueKey)]) === null || _formData === void 0 ? void 0 : _formData.enterprisePaymentTid;
1503
- params.workOrder.buyerOpenUid = formData === null || formData === void 0 ? void 0 : (_formData2 = formData["".concat(paymentTradeIdUniqueKey)]) === null || _formData2 === void 0 ? void 0 : _formData2.enterprisePaymentBuyerOpenUid;
1504
- }
1505
- if (tradeIdUniqueKey) {
1506
- params.workOrder.tid = formData === null || formData === void 0 ? void 0 : formData[tradeIdUniqueKey];
1507
- }
1508
- if (buyerNickUniqueKey) {
1509
- var _formData$buyerNickUn;
1510
- params.workOrder.buyerOpenUid = formData === null || formData === void 0 ? void 0 : (_formData$buyerNickUn = formData[buyerNickUniqueKey]) === null || _formData$buyerNickUn === void 0 ? void 0 : _formData$buyerNickUn.buyerOpenUid;
1511
- }
1512
- params.workOrder.workOrderComponents = submitDataTransOldFormat(formData, newTemplateDetail, !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo19 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo19 !== void 0 && _currentNodeDetail$wo19.id), currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder, params.workOrder, (plat === null || plat === void 0 ? void 0 : plat.accountName) || '');
1513
- //端上有买家id 就返填当前买家 即使不是当前买家的订单
1514
- if (plat.platform !== PlatForm.PC && plat !== null && plat !== void 0 && plat.buyerId) {
1515
- params.workOrder.buyerOpenUid = plat === null || plat === void 0 ? void 0 : plat.buyerId;
1516
- }
1517
- }
1518
- return params;
1519
- };
1520
- export var verifyHandle = function verifyHandle(data, componentDtoList) {
1521
- var _componentDtoList$fin, _componentDtoList$fin2, _data$paymentUniqueKe, _data$paymentUniqueKe2;
1522
- var res = {
1523
- success: true,
1524
- message: ''
1525
- };
1526
- var tradeIdUniqueKey = (_componentDtoList$fin = componentDtoList.find(function (item) {
1527
- return item.workOrderComponentType === 'TRADE_ID_INPUT';
1528
- })) === null || _componentDtoList$fin === void 0 ? void 0 : _componentDtoList$fin.uniqueKey;
1529
- var paymentUniqueKey = (_componentDtoList$fin2 = componentDtoList.find(function (item) {
1530
- return item.workOrderComponentType === 'ENTERPRISE_PAYMENT';
1531
- })) === null || _componentDtoList$fin2 === void 0 ? void 0 : _componentDtoList$fin2.uniqueKey;
1532
- if (tradeIdUniqueKey && paymentUniqueKey && data[tradeIdUniqueKey] && (_data$paymentUniqueKe = data[paymentUniqueKey]) !== null && _data$paymentUniqueKe !== void 0 && _data$paymentUniqueKe.enterprisePaymentTid && data[tradeIdUniqueKey] != ((_data$paymentUniqueKe2 = data[paymentUniqueKey]) === null || _data$paymentUniqueKe2 === void 0 ? void 0 : _data$paymentUniqueKe2.enterprisePaymentTid)) {
1533
- res.success = false;
1534
- res.message = '订单组件和打款组件的订单号必须一致';
1535
- }
1536
- return res;
1537
1405
  };
@@ -45,22 +45,3 @@ export declare const currentTradeIdJoinWorkOrder: (data: any) => Promise<serverP
45
45
  total: number;
46
46
  list: Array<any>;
47
47
  }>>;
48
- export declare type FlowTemplateNodeDetailT = {
49
- id: string;
50
- name: string;
51
- componentDtoList: Array<any>;
52
- preNodeComponentDtoList: Array<any>;
53
- flowTemplateConfig?: {
54
- flowTemplateId: string;
55
- flowTemplateKey?: string;
56
- nodeId?: string;
57
- showHideRule?: {
58
- rules: Array<any>;
59
- };
60
- };
61
- };
62
- export declare const batchQueryNodeDetail: (data: any) => Promise<serverProps<Array<{
63
- flowTemplateId: string;
64
- nodeId: string;
65
- workOrderTemplateInfo: FlowTemplateNodeDetailT;
66
- }>>>;
@@ -121,12 +121,4 @@ export var currentTradeIdJoinWorkOrder = function currentTradeIdJoinWorkOrder(da
121
121
  method: 'post',
122
122
  data: data
123
123
  });
124
- };
125
- // 批量查询工单详情
126
- export var batchQueryNodeDetail = function batchQueryNodeDetail(data) {
127
- return request({
128
- url: '/qy/view/queryNodeTemplate',
129
- method: 'post',
130
- data: data
131
- });
132
124
  };
@@ -15,7 +15,6 @@ export interface PlatFormInfo {
15
15
  buyerNick?: string;
16
16
  platform: PlatForm;
17
17
  accountName: string;
18
- userKey: string;
19
18
  shopId?: string;
20
19
  }
21
20
  export declare type CurrentNodeDetail = Pick<QyFlowPanelInfoResponse, 'currentNodeDetail'>;
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.9",
3
+ "version": "0.8.8-alpha.0",
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": "^0.8.7-alpha.0",
36
- "@kmkf-fe-packages/kmkf-utils": "^0.8.7-alpha.0",
37
- "@kmkf-fe-packages/services-components": "^0.8.7-alpha.9",
35
+ "@kmkf-fe-packages/basic-components": "^0.8.1",
36
+ "@kmkf-fe-packages/kmkf-utils": "^0.8.1",
37
+ "@kmkf-fe-packages/services-components": "^0.8.8-alpha.0",
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": "b44755b3a04d2f8f387eac071180db6e5f5e4ce4"
78
+ "gitHead": "8fadfa4ef016a8a94929761990121741804c429e"
79
79
  }
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- declare type ShopNameProps = {
3
- hidden: boolean;
4
- shopList: any[];
5
- handleChangeShopId: (val: string) => void;
6
- disabled: boolean | undefined;
7
- };
8
- declare const ShopName: ({ shopList, disabled, handleChangeShopId, hidden }: ShopNameProps) => React.JSX.Element;
9
- export default ShopName;
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import { Form } from 'antd';
3
- import { ShopList } from '@kmkf-fe-packages/services-components';
4
- var ShopName = function ShopName(_ref) {
5
- var shopList = _ref.shopList,
6
- disabled = _ref.disabled,
7
- handleChangeShopId = _ref.handleChangeShopId,
8
- hidden = _ref.hidden;
9
- return /*#__PURE__*/React.createElement("div", {
10
- className: "form-item--wrap",
11
- style: {
12
- position: 'relative'
13
- },
14
- key: 'shopId'
15
- }, /*#__PURE__*/React.createElement(Form.Item, {
16
- name: "shopId",
17
- label: "\u5E97\u94FA\u540D\u79F0",
18
- className: "form-item-label--index",
19
- hidden: hidden,
20
- rules: [{
21
- required: true,
22
- message: '请选择店铺名称'
23
- }]
24
- }, /*#__PURE__*/React.createElement(ShopList, {
25
- shopList: shopList,
26
- disabled: disabled,
27
- setShopId: handleChangeShopId,
28
- placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
29
- showSearch: true,
30
- optionFilterProp: "label",
31
- style: {
32
- width: '220px'
33
- }
34
- })));
35
- };
36
- export default ShopName;