@kmkf-fe-packages/kmkf-work-order-service-component 2.2.5-beta.6 → 2.2.5-beta.8

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.
@@ -426,7 +426,7 @@ var FormRender = function FormRender(props, ref) {
426
426
  orderBackReplace(transData, templateDetail);
427
427
  // TODO: 非开始节点录入,都会有workOrderId,这里判断是否有前置组件含有订单号;如果存在订单号,进行订单反填。
428
428
  var tradeIdUniqueKey = findComponentUniqueKeyByType(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList, 'TRADE_ID_INPUT');
429
- if (tradeIdUniqueKey && shopId && record !== null && record !== void 0 && (_record$jsonMap2 = record.jsonMap) !== null && _record$jsonMap2 !== void 0 && _record$jsonMap2["".concat(tradeIdUniqueKey, "_tradeId")] && firstOrderBackfill) {
429
+ if (tradeIdUniqueKey && shopId && record !== null && record !== void 0 && (_record$jsonMap2 = record.jsonMap) !== null && _record$jsonMap2 !== void 0 && _record$jsonMap2["".concat(tradeIdUniqueKey, "_tradeId")] && firstOrderBackfill || newRecord.notAutoFillWithFirstSubmit) {
430
430
  var _record$jsonMap3, _record$jsonMap4, _record$jsonMap5;
431
431
  orderBack({
432
432
  order_no: record === null || record === void 0 ? void 0 : (_record$jsonMap3 = record.jsonMap) === null || _record$jsonMap3 === void 0 ? void 0 : _record$jsonMap3["".concat(tradeIdUniqueKey, "_tradeId")],
@@ -5,11 +5,12 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
5
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
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState, useImperativeHandle, forwardRef } from 'react';
8
- import { Modal, Button, message, Space } from 'antd';
8
+ import { Modal, Button, message, Space, Typography } from 'antd';
9
9
  import { CopyToClipboard } from 'react-copy-to-clipboard';
10
10
  import { shortLink, createNodeLink, createLink } from "../../../model/flowTemplateDetail/api";
11
11
  import QRCode from 'qrcode.react';
12
12
  import styles from "./index.module.less";
13
+ var Text = Typography.Text;
13
14
  var ShareLinkModal = /*#__PURE__*/forwardRef(function (props, ref) {
14
15
  var _useState = useState(false),
15
16
  _useState2 = _slicedToArray(_useState, 2),
@@ -125,7 +126,7 @@ var ShareLinkModal = /*#__PURE__*/forwardRef(function (props, ref) {
125
126
  onClick: function onClick() {
126
127
  window.open(url);
127
128
  }
128
- }, "\u6253\u5F00"))), url)), ['shortUrl', 'all'].includes(showType) && !!shortUrl && /*#__PURE__*/React.createElement("li", {
129
+ }, "\u6253\u5F00"))), /*#__PURE__*/React.createElement(Text, null, url))), ['shortUrl', 'all'].includes(showType) && !!shortUrl && /*#__PURE__*/React.createElement("li", {
129
130
  className: styles.shareLi
130
131
  }, /*#__PURE__*/React.createElement("div", {
131
132
  className: styles.shareName
@@ -141,7 +142,7 @@ var ShareLinkModal = /*#__PURE__*/forwardRef(function (props, ref) {
141
142
  onClick: function onClick() {
142
143
  window.open(shortUrl);
143
144
  }
144
- }, "\u6253\u5F00"))), shortUrl)), /*#__PURE__*/React.createElement("li", {
145
+ }, "\u6253\u5F00"))), /*#__PURE__*/React.createElement(Text, null, shortUrl))), /*#__PURE__*/React.createElement("li", {
145
146
  className: styles.shareLi
146
147
  }, /*#__PURE__*/React.createElement("div", {
147
148
  className: styles.shareName
@@ -368,11 +368,10 @@ export var fetchShareNodeConfig = function fetchShareNodeConfig(params) {
368
368
  data = _yield$queryShareNode.data;
369
369
  success = _yield$queryShareNode.success;
370
370
  if (success) {
371
- console.log('data', data);
372
371
  nowNode = data.find(function (item) {
373
- return item.nodeId === params.flowNodeId;
372
+ return item.flowNodeId === params.flowNodeId;
374
373
  });
375
- showShareButton = (nowNode === null || nowNode === void 0 ? void 0 : nowNode.userId) === params.userKey;
374
+ showShareButton = (nowNode === null || nowNode === void 0 ? void 0 : nowNode.userKey) === params.userKey;
376
375
  dispatch({
377
376
  type: 'setShowShareButton',
378
377
  payload: showShareButton
@@ -849,7 +849,7 @@ export var submitParams = function submitParams(_ref4) {
849
849
  }, operateParams)
850
850
  };
851
851
  if (update) {
852
- var _currentNodeDetail$wo, _currentNodeDetail$wo2, _currentNodeDetail$wo3, _currentNodeDetail$wo4, _currentNodeDetail$wo5, _currentNodeDetail$wo6;
852
+ var _currentNodeDetail$wo, _currentNodeDetail$wo2, _currentNodeDetail$wo3, _currentNodeDetail$wo4, _currentNodeDetail$wo5, _currentNodeDetail$wo6, _currentNodeDetail$wo7;
853
853
  params.updateInfo = {
854
854
  templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo === void 0 ? void 0 : _currentNodeDetail$wo.templateId,
855
855
  workOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo2 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo2 === void 0 ? void 0 : _currentNodeDetail$wo2.id,
@@ -893,25 +893,33 @@ export var submitParams = function submitParams(_ref4) {
893
893
  dataValue: false
894
894
  });
895
895
  }
896
+ // TODO: 兼容后端导入Excel之后,订单未反填问题
897
+ if (update && currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo7 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo7 !== void 0 && _currentNodeDetail$wo7.notAutoFillWithFirstSubmit) {
898
+ updateList.push({
899
+ dataKey: 'notAutoFillWithFirstSubmit',
900
+ oldValue: true,
901
+ dataValue: false
902
+ });
903
+ }
896
904
  params.updateInfo.updateList = updateList;
897
905
  params.updateInfo.needTransForm = params.needTransForm;
898
906
  delete params.workOrderUpdateKeyVos;
899
907
  delete params.needTransForm;
900
908
  } else {
901
- var _Object$keys, _currentNodeDetail$wo7, _currentNodeDetail$wo8, _currentNodeDetail$wo9, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17;
909
+ var _Object$keys, _currentNodeDetail$wo8, _currentNodeDetail$wo9, _currentNodeDetail$wo10, _currentNodeDetail$wo11, _currentNodeDetail$wo12, _currentNodeDetail$wo13, _currentNodeDetail$wo14, _currentNodeDetail$wo15, _currentNodeDetail$wo16, _currentNodeDetail$wo17, _currentNodeDetail$wo18;
902
910
  // TODO: 新保存工单
903
911
  // 获取当前表单中非空字段
904
912
  var finalComponentList = (_Object$keys = Object.keys(formData)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.filter(function (i) {
905
913
  return !isNull(formData[i]);
906
914
  });
907
915
  // 获取非空字段对应的组件
908
- var finalDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo7 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo7 === void 0 ? void 0 : (_currentNodeDetail$wo8 = _currentNodeDetail$wo7.componentDtoList) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : _currentNodeDetail$wo8.filter(function (item) {
916
+ var finalDtoList = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo8 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo8 === void 0 ? void 0 : (_currentNodeDetail$wo9 = _currentNodeDetail$wo8.componentDtoList) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.filter(function (item) {
909
917
  return finalComponentList.includes(item.uniqueKey) || item.workOrderComponentType === 'BUYER_MESSAGE_NOTICE';
910
918
  });
911
919
  set(newTemplateDetail, 'componentDtoList', finalDtoList);
912
920
  params.workOrder = {
913
- templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo9 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo9 === void 0 ? void 0 : _currentNodeDetail$wo9.uniqueKey,
914
- handleWorkOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : _currentNodeDetail$wo10.id,
921
+ templateId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo10 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo10 === void 0 ? void 0 : _currentNodeDetail$wo10.uniqueKey,
922
+ handleWorkOrderId: currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : _currentNodeDetail$wo11.id,
915
923
  buyerNick: plat === null || plat === void 0 ? void 0 : plat.buyerNick,
916
924
  buyerOpenUid: plat === null || plat === void 0 ? void 0 : plat.buyerId,
917
925
  shopUniqueKey: shopUniqueKey,
@@ -921,13 +929,13 @@ export var submitParams = function submitParams(_ref4) {
921
929
  };
922
930
 
923
931
  // 判断是否有订单号组建,订单号数据需要特殊处理
924
- var tradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo11 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo11 === void 0 ? void 0 : (_currentNodeDetail$wo12 = _currentNodeDetail$wo11.componentDtoList) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : (_currentNodeDetail$wo13 = _currentNodeDetail$wo12.find(function (item) {
932
+ var tradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo12 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo12 === void 0 ? void 0 : (_currentNodeDetail$wo13 = _currentNodeDetail$wo12.componentDtoList) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : (_currentNodeDetail$wo14 = _currentNodeDetail$wo13.find(function (item) {
925
933
  return item.workOrderComponentType === 'TRADE_ID_INPUT';
926
- })) === null || _currentNodeDetail$wo13 === void 0 ? void 0 : _currentNodeDetail$wo13.uniqueKey;
934
+ })) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : _currentNodeDetail$wo14.uniqueKey;
927
935
  // 判断是否有订单号组建,订单号数据需要特殊处理
928
- var paymentTradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo14 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo14 === void 0 ? void 0 : (_currentNodeDetail$wo15 = _currentNodeDetail$wo14.componentDtoList) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : (_currentNodeDetail$wo16 = _currentNodeDetail$wo15.find(function (item) {
936
+ var paymentTradeIdUniqueKey = currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo15 = currentNodeDetail.workOrderTemplateInfo) === null || _currentNodeDetail$wo15 === void 0 ? void 0 : (_currentNodeDetail$wo16 = _currentNodeDetail$wo15.componentDtoList) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : (_currentNodeDetail$wo17 = _currentNodeDetail$wo16.find(function (item) {
929
937
  return item.workOrderComponentType === 'ENTERPRISE_PAYMENT';
930
- })) === null || _currentNodeDetail$wo16 === void 0 ? void 0 : _currentNodeDetail$wo16.uniqueKey;
938
+ })) === null || _currentNodeDetail$wo17 === void 0 ? void 0 : _currentNodeDetail$wo17.uniqueKey;
931
939
  if (paymentTradeIdUniqueKey) {
932
940
  var _formData;
933
941
  params.workOrder.tid = formData === null || formData === void 0 ? void 0 : (_formData = formData["".concat(paymentTradeIdUniqueKey)]) === null || _formData === void 0 ? void 0 : _formData.enterprisePaymentTid;
@@ -938,7 +946,7 @@ export var submitParams = function submitParams(_ref4) {
938
946
  if (formData !== null && formData !== void 0 && formData['fixed_field_buyerOpenUid']) {
939
947
  params.workOrder.buyerOpenUid = formData === null || formData === void 0 ? void 0 : formData['fixed_field_buyerOpenUid'];
940
948
  }
941
- params.workOrder.workOrderComponents = submitDataTransOldFormat(formData, newTemplateDetail, !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo17 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo17 !== void 0 && _currentNodeDetail$wo17.id), currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder, params.workOrder, (plat === null || plat === void 0 ? void 0 : plat.accountName) || '');
949
+ params.workOrder.workOrderComponents = submitDataTransOldFormat(formData, newTemplateDetail, !!(currentNodeDetail !== null && currentNodeDetail !== void 0 && (_currentNodeDetail$wo18 = currentNodeDetail.workOrder) !== null && _currentNodeDetail$wo18 !== void 0 && _currentNodeDetail$wo18.id), currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : currentNodeDetail.workOrder, params.workOrder, (plat === null || plat === void 0 ? void 0 : plat.accountName) || '');
942
950
  //端上有买家id 就返填当前买家 即使不是当前买家的订单
943
951
  if (plat.platform !== PlatForm.PC && plat !== null && plat !== void 0 && plat.buyerId) {
944
952
  params.workOrder.buyerOpenUid = plat === null || plat === void 0 ? void 0 : plat.buyerId;
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.5-beta.6",
3
+ "version": "2.2.5-beta.8",
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.5-beta.6",
35
+ "@kmkf-fe-packages/basic-components": "2.2.5-beta.8",
36
36
  "@kmkf-fe-packages/kmkf-utils": "2.2.5-beta.5",
37
- "@kmkf-fe-packages/services-components": "2.2.5-beta.6",
37
+ "@kmkf-fe-packages/services-components": "2.2.5-beta.8",
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": "3d4d3383179b439c41d2162767d4d25eacf98ce4",
77
+ "gitHead": "5e10d4c5cad127abc214f2616a82d623cd9b7909",
78
78
  "gitHooks": {
79
79
  "pre-commit": "lint-staged"
80
80
  }