@kmkf-fe-packages/kmkf-work-order-service-component 2.0.65 → 2.0.67

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.
@@ -8,6 +8,7 @@ import every from 'lodash/every';
8
8
  import maxBy from 'lodash/maxBy';
9
9
  import { jsonParseSecurity, transTextToNumber, formatPictures } from "./tools";
10
10
  import { updateWorkTypeKeys, systemOrderMap } from "./constant";
11
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
11
12
  var getItemValue = function getItemValue(item) {
12
13
  return function (key) {
13
14
  return item.jsonMap[key];
@@ -717,7 +718,7 @@ var processJstExchangeGoods = function processJstExchangeGoods(getValue) {
717
718
  });
718
719
  };
719
720
  };
720
- var processBsOrWdtReturnGoods = function processBsOrWdtReturnGoods(getValue) {
721
+ var processBsReturnGoods = function processBsReturnGoods(getValue) {
721
722
  return function (nex, config) {
722
723
  var _$concat;
723
724
  var compType = nex.workOrderComponentType;
@@ -726,22 +727,6 @@ var processBsOrWdtReturnGoods = function processBsOrWdtReturnGoods(getValue) {
726
727
  returnTypeKey: 'bsReturnType',
727
728
  returnGoodsKey: 'bsReturnGoods',
728
729
  shopCodeKey: 'shopCode'
729
- },
730
- WDT_RETURN_GOODS: {
731
- returnTypeKey: 'wdtReturnType',
732
- returnGoodsKey: 'wdtReturnGoods',
733
- shopCodeKey: 'shopCode'
734
- },
735
- GY_RETURN_GOODS: {
736
- returnTypeKey: 'gyReturnType',
737
- returnGoodsKey: 'gyReturnGoods',
738
- gySystemOrderNo: 'gySystemOrderNo',
739
- shopCodeKey: 'shopCode'
740
- },
741
- JST_RETURN_GOODS: {
742
- returnTypeKey: 'jstReturnType',
743
- returnGoodsKey: 'jstReturnGoods',
744
- shopCodeKey: 'shopCode'
745
730
  }
746
731
  };
747
732
  return _defineProperty({}, "".concat(nex.uniqueKey), (_$concat = {}, _defineProperty(_$concat, returnGoodsMap[compType].returnTypeKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnTypeKey)), [])), _defineProperty(_$concat, returnGoodsMap[compType].returnGoodsKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].returnGoodsKey)), [])), _defineProperty(_$concat, returnGoodsMap[compType].shopCodeKey, getValue("".concat(nex.uniqueKey, "_").concat(returnGoodsMap[compType].shopCodeKey))), _$concat));
@@ -861,7 +846,7 @@ var processWdtReissueGoods = function processWdtReissueGoods(templateColumns) {
861
846
  wdtSystemOrder: {
862
847
  orderNo: orderNo
863
848
  },
864
- wdtReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReissueType")), ['1']),
849
+ wdtReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReissueType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
865
850
  wdtReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReissueGoods")), []),
866
851
  shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
867
852
  wdtSystemOrderNo: getValue("".concat(nex.uniqueKey, "_wdtSystemOrderNo"))
@@ -869,6 +854,26 @@ var processWdtReissueGoods = function processWdtReissueGoods(templateColumns) {
869
854
  };
870
855
  };
871
856
  };
857
+ var processWdtReturnGoods = function processWdtReturnGoods(templateColumns) {
858
+ return function (getValue) {
859
+ return function (nex, config) {
860
+ // let orderNo = '';
861
+ // const tradeId = templateColumns?.find(
862
+ // (col: { workOrderComponentType: string }) => col.workOrderComponentType === 'TRADE_ID_INPUT',
863
+ // );
864
+ // if (tradeId) {
865
+ // orderNo = getValue(
866
+ // `${tradeId.uniqueKey}_${updateWorkTypeKeys[tradeId.workOrderComponentType]}`,
867
+ // );
868
+ // }
869
+ return _defineProperty({}, nex.uniqueKey, {
870
+ wdtReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReturnType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
871
+ wdtReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_wdtReturnGoods")), []),
872
+ shopCode: getValue("".concat(nex.uniqueKey, "_shopCode"))
873
+ });
874
+ };
875
+ };
876
+ };
872
877
  var processGyReissueGoods = function processGyReissueGoods(templateColumns) {
873
878
  return function (getValue) {
874
879
  return function (nex, config) {
@@ -883,7 +888,7 @@ var processGyReissueGoods = function processGyReissueGoods(templateColumns) {
883
888
  gySystemOrder: {
884
889
  orderNo: orderNo
885
890
  },
886
- gyReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReissueType")), ['1']),
891
+ gyReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReissueType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
887
892
  gyReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReissueGoods")), []),
888
893
  shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
889
894
  vipCode: getValue("".concat(nex.uniqueKey, "_vipCode")),
@@ -906,7 +911,7 @@ var processGyReturnGoods = function processGyReturnGoods(templateColumns) {
906
911
  gySystemOrder: {
907
912
  orderNo: orderNo
908
913
  },
909
- gyReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReturnType")), ['1']),
914
+ gyReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReturnType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
910
915
  gyReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_gyReturnGoods")), []),
911
916
  shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
912
917
  gySystemOrderNo: getValue("".concat(nex.uniqueKey, "_gySystemOrderNo"))
@@ -928,7 +933,7 @@ var processJstReissueGoods = function processJstReissueGoods(templateColumns) {
928
933
  jstSystemOrder: {
929
934
  orderNo: orderNo
930
935
  },
931
- jstReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReissueType")), ['1']),
936
+ jstReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReissueType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
932
937
  jstReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReissueGoods")), []),
933
938
  jstSystemOrderBillType: getValue("".concat(nex.uniqueKey, "_jstSystemOrderBillType")) || '',
934
939
  shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
@@ -951,7 +956,7 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
951
956
  jstSystemOrder: {
952
957
  orderNo: orderNo
953
958
  },
954
- jstReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnType")), ['1']),
959
+ jstReturnType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
955
960
  jstReturnGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jstReturnGoods")), []),
956
961
  jstSystemOrderBillType: getValue("".concat(nex.uniqueKey, "_jstSystemOrderBillType")) || '',
957
962
  shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
@@ -962,14 +967,14 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
962
967
  };
963
968
  var processLabel = function processLabel(getValue) {
964
969
  return function (nex, config) {
965
- var _ref66;
966
- return _ref66 = {}, _defineProperty(_ref66, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref66, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref66;
970
+ var _ref67;
971
+ return _ref67 = {}, _defineProperty(_ref67, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref67, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref67;
967
972
  };
968
973
  };
969
974
  var processMemberLevel = function processMemberLevel(getValue) {
970
975
  return function (nex, config) {
971
- var _ref67;
972
- return _ref67 = {}, _defineProperty(_ref67, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref67, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref67;
976
+ var _ref68;
977
+ return _ref68 = {}, _defineProperty(_ref68, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref68, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref68;
973
978
  };
974
979
  };
975
980
  var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
@@ -997,7 +1002,7 @@ var processBsE3ReissueGoods = function processBsE3ReissueGoods(templateColumns)
997
1002
  orderNo: orderNo
998
1003
  },
999
1004
  bsE3SystemOrderNo: getValue("".concat(nex.uniqueKey, "_bsE3SystemOrderNo")),
1000
- bsE3ReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsE3ReissueType")), ['1']),
1005
+ bsE3ReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsE3ReissueType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
1001
1006
  bsE3ReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_bsE3ReissueGoods")), [])
1002
1007
  });
1003
1008
  };
@@ -1087,8 +1092,8 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
1087
1092
  BS_EXCHANGE_GOODS: processBsExchangeGoods,
1088
1093
  WDT_EXCHANGE_GOODS: processWdtExchangeGoods,
1089
1094
  JST_EXCHANGE_GOODS: processJstExchangeGoods,
1090
- BS_RETURN_GOODS: processBsOrWdtReturnGoods,
1091
- WDT_RETURN_GOODS: processBsOrWdtReturnGoods,
1095
+ BS_RETURN_GOODS: processBsReturnGoods,
1096
+ WDT_RETURN_GOODS: processWdtReturnGoods(templateColumns),
1092
1097
  JST_RETURN_GOODS: processJstReturnGoods(templateColumns),
1093
1098
  BS_SYSTEM_ORDER: processErpSystemOrder,
1094
1099
  KM_SYSTEM_ORDER: processErpSystemOrder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "2.0.65",
3
+ "version": "2.0.67",
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.0.65",
36
- "@kmkf-fe-packages/kmkf-utils": "2.0.65",
37
- "@kmkf-fe-packages/services-components": "2.0.65",
35
+ "@kmkf-fe-packages/basic-components": "2.0.67",
36
+ "@kmkf-fe-packages/kmkf-utils": "2.0.67",
37
+ "@kmkf-fe-packages/services-components": "2.0.67",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -73,7 +73,7 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "15f16ebf734a616f09c15fa589a4124cdc909f95",
76
+ "gitHead": "203eed1c9890fcf5f6f26a931500bdce9e6dee86",
77
77
  "gitHooks": {
78
78
  "pre-commit": "lint-staged"
79
79
  }