@kmkf-fe-packages/kmkf-work-order-service-component 0.8.13-alpha.2 → 0.8.13-alpha.3

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.
@@ -24,7 +24,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
24
24
  import React, { useState, useRef, useEffect, useMemo } from 'react';
25
25
  import { ConfigProvider, Form } from 'antd';
26
26
  import zhCN from 'antd/es/locale/zh_CN';
27
- import { get, some, set, every, cloneDeep, isEmpty } from 'lodash';
27
+ import { get, some, set, every, cloneDeep, isEmpty, intersection } from 'lodash';
28
28
  import 'moment/locale/zh-cn';
29
29
  import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, reversalFormValues } from "../../../common/utils/tools";
30
30
  import { replaceCheck } from "../../../model/servers/api";
@@ -675,6 +675,7 @@ var FormRender = function FormRender(props) {
675
675
  return getExpression((_item$compareSymbol2 = item.compareSymbol) === null || _item$compareSymbol2 === void 0 ? void 0 : _item$compareSymbol2.toUpperCase(), leftValue, item.rightValue);
676
676
  });
677
677
  }, false);
678
+ console.debug('当前组件显影关系', instance === null || instance === void 0 ? void 0 : instance.id, instance === null || instance === void 0 ? void 0 : instance.name, show, currentIdDependenceOtherFields);
678
679
  currentComponentDisplayStatus.current[instance === null || instance === void 0 ? void 0 : instance.id] = show;
679
680
  checkFillMapping(show, uniqueKey, workOrderComponentType);
680
681
  return instance.editRender({
@@ -747,6 +748,17 @@ var FormRender = function FormRender(props) {
747
748
  var preNodeItems = [];
748
749
  (_groupByPreNode = groupByPreNode(preNodeComponentDtoList)) === null || _groupByPreNode === void 0 ? void 0 : _groupByPreNode.forEach(function (item, key) {
749
750
  var displayConfig = getCurrentNodeModifiedShowHideRule(flowAllShowHideRules === null || flowAllShowHideRules === void 0 ? void 0 : flowAllShowHideRules.allShowHideRules, key);
751
+ var finalDisplayConfig = displayConfig === null || displayConfig === void 0 ? void 0 : displayConfig.filter(function (item) {
752
+ var _item$rules, _intersection;
753
+ var dependenceLeftKeys = item === null || item === void 0 ? void 0 : (_item$rules = item.rules) === null || _item$rules === void 0 ? void 0 : _item$rules.map(function (i) {
754
+ return i.leftValue;
755
+ });
756
+ var preNodeComponentUniqueKeyList = preNodeComponentDtoList === null || preNodeComponentDtoList === void 0 ? void 0 : preNodeComponentDtoList.map(function (item) {
757
+ return item === null || item === void 0 ? void 0 : item.uniqueKey;
758
+ });
759
+ return ((_intersection = intersection(dependenceLeftKeys, preNodeComponentUniqueKeyList)) === null || _intersection === void 0 ? void 0 : _intersection.length) > 0;
760
+ });
761
+ console.debug('当前前置节点生效的显影规则', finalDisplayConfig);
750
762
  preNodeItems.push(item === null || item === void 0 ? void 0 : item.map(newRenderColumnItem({
751
763
  form: form,
752
764
  shopList: shopList,
@@ -755,7 +767,7 @@ var FormRender = function FormRender(props) {
755
767
  workOrderDetail: record,
756
768
  templateDetail: templateDetail,
757
769
  disabled: true,
758
- displayConfig: displayConfig
770
+ displayConfig: finalDisplayConfig
759
771
  })));
760
772
  });
761
773
  return preNodeItems;
@@ -431,7 +431,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
431
431
  style: {
432
432
  display: tabActive === 'custom' ? 'block' : 'none'
433
433
  }
434
- }, platform !== PlatForm.TB && /*#__PURE__*/React.createElement("div", {
434
+ }, /*#__PURE__*/React.createElement("div", {
435
435
  ref: listRef
436
436
  }, /*#__PURE__*/React.createElement(LogicFlowList, {
437
437
  logicFlowList: allLogicFlowList,
@@ -565,15 +565,15 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
565
565
  contentVoList.push({
566
566
  uniqueKey: "".concat(item.uniqueKey, "_reissueLogisticsCompany"),
567
567
  content: reissueLogisticsList.map(function (item) {
568
- return item.logisticsCompany + '';
569
- }),
568
+ return item.logisticsCompany;
569
+ }).join(),
570
570
  name: item.name
571
571
  });
572
572
  contentVoList.push({
573
573
  uniqueKey: "".concat(item.uniqueKey, "_reissueLogisticsCode"),
574
574
  content: reissueLogisticsList.map(function (item) {
575
- return item.logisticsCode + '';
576
- }),
575
+ return item.logisticsCode;
576
+ }).join(),
577
577
  name: item.name
578
578
  });
579
579
  } else if (item.workOrderComponentType === 'REISSUE_TRADE_ID') {
@@ -582,10 +582,33 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
582
582
  content: get(nowData, "".concat(item.uniqueKey), ''),
583
583
  name: item.name
584
584
  });
585
- } else if (item.workOrderComponentType === 'REISSUE_STATUS') {
585
+ } else if (['REISSUE_STATUS', 'EXCHANGE_STATUS', 'CREATE_STATUS', 'RETURN_GOODS_STATUS'].includes(item.workOrderComponentType)) {
586
+ var STATUS_MAP = {
587
+ REISSUE_STATUS: {
588
+ status: 'reissueStatusValue',
589
+ reason: 'reissueReason'
590
+ },
591
+ EXCHANGE_STATUS: {
592
+ status: 'exchangeStatusValue',
593
+ reason: 'exchangeReason'
594
+ },
595
+ CREATE_STATUS: {
596
+ status: 'createStatusValue',
597
+ reason: 'createReason'
598
+ },
599
+ RETURN_GOODS_STATUS: {
600
+ status: 'returnGoodsStatusValue',
601
+ reason: 'returnGoodsReason'
602
+ }
603
+ };
586
604
  contentVoList.push({
587
- uniqueKey: "".concat(item.uniqueKey, "_resissueStatus"),
588
- content: get(nowData, "".concat(item.uniqueKey), ''),
605
+ uniqueKey: "".concat(item.uniqueKey, "_").concat(STATUS_MAP[item.workOrderComponentType].status),
606
+ content: get(nowData, "".concat(item.uniqueKey, ".status"), ''),
607
+ name: item.name
608
+ });
609
+ contentVoList.push({
610
+ uniqueKey: "".concat(item.uniqueKey, "_").concat(STATUS_MAP[item.workOrderComponentType].reason),
611
+ content: get(nowData, "".concat(item.uniqueKey, ".reason"), ''),
589
612
  name: item.name
590
613
  });
591
614
  } else if (item.workOrderComponentType === 'BS_LOGISTICS') {
@@ -753,13 +776,6 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
753
776
  content: get(nowData, "".concat(item.uniqueKey, ".postingReceiverMobile"), ''),
754
777
  name: item.name
755
778
  });
756
- } else if (item.workOrderComponentType === 'BUYER_MESSAGE_NOTICE') {
757
- var _value3 = nowData[item.uniqueKey];
758
- contentVoList.push({
759
- content: (_value3 === null || _value3 === void 0 ? void 0 : _value3.value) || '',
760
- name: item.name,
761
- uniqueKey: "".concat(item.uniqueKey, "_buyerMessageNotice")
762
- });
763
779
  } else {
764
780
  var _nowData$item$uniqueK;
765
781
  contentVoList.push({
@@ -1058,8 +1074,29 @@ var transDataSource = function transDataSource(templateColumns) {
1058
1074
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList6));
1059
1075
  } else if (nex.workOrderComponentType === 'REISSUE_TRADE_ID') {
1060
1076
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_reissueTradeId")]));
1061
- } else if (nex.workOrderComponentType === 'REISSUE_STATUS') {
1062
- return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_reissueStatus")]));
1077
+ } else if (['REISSUE_STATUS', 'EXCHANGE_STATUS', 'CREATE_STATUS', 'RETURN_GOODS_STATUS'].includes(nex.workOrderComponentType)) {
1078
+ var STATUS_MAP = {
1079
+ REISSUE_STATUS: {
1080
+ status: 'reissueStatusValue',
1081
+ reason: 'reissueReason'
1082
+ },
1083
+ EXCHANGE_STATUS: {
1084
+ status: 'exchangeStatusValue',
1085
+ reason: 'exchangeReason'
1086
+ },
1087
+ CREATE_STATUS: {
1088
+ status: 'createStatusValue',
1089
+ reason: 'createReason'
1090
+ },
1091
+ RETURN_GOODS_STATUS: {
1092
+ status: 'returnGoodsStatusValue',
1093
+ reason: 'returnGoodsReason'
1094
+ }
1095
+ };
1096
+ return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
1097
+ status: item.jsonMap["".concat(nex.uniqueKey, "_").concat(STATUS_MAP[nex.workOrderComponentType].status)],
1098
+ reason: item.jsonMap["".concat(nex.uniqueKey, "_").concat(STATUS_MAP[nex.workOrderComponentType].reason)]
1099
+ }));
1063
1100
  } else if (nex.workOrderComponentType === 'BS_LOGISTICS') {
1064
1101
  var _itemList7 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsLogisticsList")], [{
1065
1102
  logisticsCompany: null,
@@ -1142,9 +1179,7 @@ var transDataSource = function transDataSource(templateColumns) {
1142
1179
  shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
1143
1180
  }));
1144
1181
  } else if (nex.workOrderComponentType === 'BUYER_MESSAGE_NOTICE') {
1145
- return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
1146
- value: item.jsonMap["".concat(nex.uniqueKey, "_buyerMessageNotice")]
1147
- }));
1182
+ return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_buyerMessageNotice")] || (config === null || config === void 0 ? void 0 : config.select)));
1148
1183
  }
1149
1184
  return cur;
1150
1185
  }, {});
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.13-alpha.2",
3
+ "version": "0.8.13-alpha.3",
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.13-alpha.1",
36
- "@kmkf-fe-packages/kmkf-utils": "^0.8.13-alpha.1",
37
- "@kmkf-fe-packages/services-components": "^0.8.13-alpha.2",
35
+ "@kmkf-fe-packages/basic-components": "^0.8.13-alpha.3",
36
+ "@kmkf-fe-packages/kmkf-utils": "^0.8.13-alpha.3",
37
+ "@kmkf-fe-packages/services-components": "^0.8.13-alpha.3",
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": "e74ef6ea4058e5458728b9827a09c823c7df14a8"
78
+ "gitHead": "e58e0cdec5ee262d63ba5694f112b422227240cd"
79
79
  }