@kmkf-fe-packages/services-components 2.4.0-rc.0 → 2.4.1

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.
Files changed (123) hide show
  1. package/dist/esm/Hooks/index.d.ts +2 -0
  2. package/dist/esm/Hooks/index.js +2 -0
  3. package/dist/esm/Hooks/useColumnsConfig.d.ts +26 -0
  4. package/dist/esm/Hooks/useColumnsConfig.js +243 -0
  5. package/dist/esm/Hooks/useGoodsSourceFormat.d.ts +29 -0
  6. package/dist/esm/Hooks/useGoodsSourceFormat.js +441 -0
  7. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
  8. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +4 -2
  9. package/dist/esm/commonComponents/GlobalContext/index.js +10 -3
  10. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +14 -11
  11. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +14 -12
  12. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +11 -9
  13. package/dist/esm/commonComponents/OperationLog/index.d.ts +2 -1
  14. package/dist/esm/commonComponents/OperationLog/index.js +4 -2
  15. package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +5 -3
  16. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -19
  17. package/dist/esm/commonComponents/ShopList/index.js +3 -1
  18. package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -2
  19. package/dist/esm/components/BS/BsLogistics/index.js +61 -8
  20. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
  21. package/dist/esm/components/BS/BsSystemOrder/index.js +56 -9
  22. package/dist/esm/components/BS/common/BsHeaderChild.d.ts +4 -4
  23. package/dist/esm/components/BS/common/BsHeaderChild.js +8 -8
  24. package/dist/esm/components/BS/common/BsHeaderGood.js +2 -2
  25. package/dist/esm/components/BS/common/BsHeaderPic.d.ts +2 -0
  26. package/dist/esm/components/BS/common/BsHeaderPic.js +20 -10
  27. package/dist/esm/components/BS/common/BsMemo.js +4 -1
  28. package/dist/esm/components/BS/common/BsType.js +4 -1
  29. package/dist/esm/components/BS/common/SystemOrderNo.js +4 -1
  30. package/dist/esm/components/BS/common/expressCode.d.ts +4 -1
  31. package/dist/esm/components/BS/common/expressCode.js +16 -4
  32. package/dist/esm/components/BS/common/expressCompany.d.ts +5 -2
  33. package/dist/esm/components/BS/common/expressCompany.js +31 -5
  34. package/dist/esm/components/BsE3/BsReissueE3/index.js +4 -1
  35. package/dist/esm/components/Cascader/index.d.ts +8 -6
  36. package/dist/esm/components/Cascader/index.js +26 -22
  37. package/dist/esm/components/Common/constants/bs.js +2 -2
  38. package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +6 -2
  39. package/dist/esm/components/Common/constants/defaultColumns.js +2 -2
  40. package/dist/esm/components/Common/constants/wdt.js +104 -0
  41. package/dist/esm/components/Common/index.d.ts +3 -3
  42. package/dist/esm/components/Common/index.js +49 -28
  43. package/dist/esm/components/CommonDataTime/index.d.ts +2 -2
  44. package/dist/esm/components/CommonDataTime/index.js +2 -2
  45. package/dist/esm/components/CommonHeaderGood/index.js +1165 -18
  46. package/dist/esm/components/CommonInput/index.js +11 -3
  47. package/dist/esm/components/CommonMultiStatus/index.js +73 -36
  48. package/dist/esm/components/ErpTradeId/index.d.ts +2 -2
  49. package/dist/esm/components/ErpTradeId/index.js +7 -4
  50. package/dist/esm/components/File/index.d.ts +6 -6
  51. package/dist/esm/components/File/index.js +9 -10
  52. package/dist/esm/components/FlowOverallStatusSelect/index.d.ts +40 -0
  53. package/dist/esm/components/FlowOverallStatusSelect/index.js +180 -0
  54. package/dist/esm/components/GY/GyGoods/index.js +5 -1
  55. package/dist/esm/components/GY/GyReissue/index.js +5 -1
  56. package/dist/esm/components/GY/GyReturn/index.js +5 -1
  57. package/dist/esm/components/Input/index.d.ts +4 -4
  58. package/dist/esm/components/Input/index.js +35 -31
  59. package/dist/esm/components/JST/JstSendGood/index.js +17 -1
  60. package/dist/esm/components/KM/KmExchange/index.d.ts +35 -0
  61. package/dist/esm/components/KM/KmExchange/index.js +136 -0
  62. package/dist/esm/components/KmErpSendGood/index.js +1 -1
  63. package/dist/esm/components/Logistics/index.d.ts +1 -0
  64. package/dist/esm/components/Logistics/index.js +10 -0
  65. package/dist/esm/components/LogisticsInterception/columnHeader.js +1 -1
  66. package/dist/esm/components/LogisticsInterception/index.d.ts +20 -0
  67. package/dist/esm/components/LogisticsInterception/index.js +10 -5
  68. package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.d.ts +45 -0
  69. package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.js +97 -0
  70. package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +3 -2
  71. package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +4 -2
  72. package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +1 -1
  73. package/dist/esm/components/LogisticsMoreInterception/index.js +1 -0
  74. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +5 -5
  75. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +9 -9
  76. package/dist/esm/components/OrderSubForm/index.d.ts +56 -0
  77. package/dist/esm/components/OrderSubForm/index.js +285 -0
  78. package/dist/esm/components/Payment/index.d.ts +13 -12
  79. package/dist/esm/components/Payment/index.js +31 -11
  80. package/dist/esm/components/PaymentVoucherCode/Preview.js +35 -9
  81. package/dist/esm/components/Picture/index.d.ts +5 -5
  82. package/dist/esm/components/Picture/index.js +20 -20
  83. package/dist/esm/components/PicturePro/index.d.ts +15 -6
  84. package/dist/esm/components/PicturePro/index.js +42 -25
  85. package/dist/esm/components/PostIng/index.d.ts +5 -0
  86. package/dist/esm/components/PostIng/index.js +42 -8
  87. package/dist/esm/components/Public/Goods/index.d.ts +10 -8
  88. package/dist/esm/components/Public/Goods/index.js +42 -2
  89. package/dist/esm/components/Public/ReissueGoods/index.js +62 -4
  90. package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +51 -0
  91. package/dist/esm/components/Public/ReturnWarehouse/index.js +210 -0
  92. package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
  93. package/dist/esm/components/ReceiverAddress/index.js +41 -27
  94. package/dist/esm/components/Reissue/Logistics/index.js +2 -2
  95. package/dist/esm/components/Remark/index.d.ts +18 -2
  96. package/dist/esm/components/Remark/index.js +37 -2
  97. package/dist/esm/components/ReturnLogistics/index.d.ts +7 -6
  98. package/dist/esm/components/ReturnLogistics/index.js +34 -17
  99. package/dist/esm/components/SKX/SkxGoods/index.js +4 -0
  100. package/dist/esm/components/SKX/SkxIdInputSelect/index.js +4 -0
  101. package/dist/esm/components/Select/index.d.ts +1 -0
  102. package/dist/esm/components/Select/index.js +22 -11
  103. package/dist/esm/components/ShopInput/index.d.ts +5 -5
  104. package/dist/esm/components/ShopInput/index.js +12 -9
  105. package/dist/esm/components/StatusSelect/index.js +4 -0
  106. package/dist/esm/components/SubForm/children/HeaderChildFile.d.ts +30 -0
  107. package/dist/esm/components/SubForm/children/HeaderChildFile.js +117 -0
  108. package/dist/esm/components/SubForm/children/HeaderChildPic.d.ts +30 -0
  109. package/dist/esm/components/SubForm/children/HeaderChildPic.js +116 -0
  110. package/dist/esm/components/SubForm/index.js +78 -6
  111. package/dist/esm/components/TradeId/index.d.ts +5 -5
  112. package/dist/esm/components/TradeId/index.js +17 -14
  113. package/dist/esm/components/WDT/WdtRessuie/index.js +28 -8
  114. package/dist/esm/factory.d.ts +2 -2
  115. package/dist/esm/factory.js +37 -7
  116. package/dist/esm/index.d.ts +5 -0
  117. package/dist/esm/index.js +7 -1
  118. package/dist/esm/service/api.d.ts +3 -0
  119. package/dist/esm/service/api.js +34 -1
  120. package/dist/esm/type.d.ts +38 -0
  121. package/package.json +4 -4
  122. package/dist/esm/components/Common/constants/gy.d.ts +0 -3
  123. package/dist/esm/components/Common/constants/gy.js +0 -219
@@ -0,0 +1,210 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ import React from "react";
10
+ import some from "lodash/some";
11
+ import GetFormItem from "../../GetFormItem";
12
+ import { JstGoodImage } from "../../Common";
13
+ import { JstGoods } from "@kmkf-fe-packages/basic-components";
14
+ import ItemView from "../../../commonComponents/ItemView";
15
+ import { isNull, filterFn as _filterFn, SendDataCenter } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { SYMBOL } from "../../../constant";
17
+ var typeMap = {
18
+ KM_RETURN_WAREHOUSE: {
19
+ key: "kmReturnWarehouse",
20
+ name: "km",
21
+ returnWarehouseId: "kmReturnWarehouseId",
22
+ returnWarehouseName: "kmReturnWarehouseName",
23
+ platformType: "km",
24
+ dataType: "weakenArray",
25
+ placeholder: "请选择快麦退货仓"
26
+ }
27
+ };
28
+ var ReturnWarehouse = /*#__PURE__*/_createClass(function ReturnWarehouse(_options) {
29
+ var _this = this,
30
+ _typeMap$_options$typ,
31
+ _typeMap$_options$typ2,
32
+ _this$componentConfig3,
33
+ _typeMap$_options$typ3,
34
+ _this$componentConfig4;
35
+ _classCallCheck(this, ReturnWarehouse);
36
+ _defineProperty(this, "name", void 0);
37
+ _defineProperty(this, "id", void 0);
38
+ _defineProperty(this, "sortField", void 0);
39
+ _defineProperty(this, "sortChildField", void 0);
40
+ _defineProperty(this, "type", void 0);
41
+ _defineProperty(this, "rules", void 0);
42
+ _defineProperty(this, "componentConfig", void 0);
43
+ _defineProperty(this, "align", void 0);
44
+ _defineProperty(this, "isCombinationComponent", void 0);
45
+ _defineProperty(this, "formField", void 0);
46
+ _defineProperty(this, "canSort", void 0);
47
+ _defineProperty(this, "children", void 0);
48
+ _defineProperty(this, "dataType", void 0);
49
+ _defineProperty(this, "format", void 0);
50
+ _defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
51
+ var _typeMap$options$type, _typeMap$options$type2, _typeMap$options$type3;
52
+ var returnWarehouseName = {
53
+ name: "退货仓名称",
54
+ key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.returnWarehouseName),
55
+ dataType: (_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.dataType,
56
+ disabled: type === "returnWarehouseId"
57
+ };
58
+ var returnWarehouseId = {
59
+ name: "退货仓编码",
60
+ key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.returnWarehouseId),
61
+ dataType: "arrayObject",
62
+ disabled: type === "returnWarehouseName"
63
+ };
64
+ returnWarehouseName.options = fieldType && SendDataCenter.getInstance(fieldType).getSendData();
65
+ return [returnWarehouseName, returnWarehouseId];
66
+ });
67
+ _defineProperty(this, "renderClient", function (record) {
68
+ var _typeMap$_this$type;
69
+ var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
70
+ return !isNull(item);
71
+ }) : false;
72
+ return isShow ? /*#__PURE__*/React.createElement(ItemView, {
73
+ id: _this.id,
74
+ label: _this.name,
75
+ value: /*#__PURE__*/React.createElement(JstGoodImage, {
76
+ list: record === null || record === void 0 ? void 0 : record[_this.id],
77
+ type: 5,
78
+ platformType: (_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.platformType
79
+ })
80
+ }) : null;
81
+ });
82
+ _defineProperty(this, "renderPc", function (value, record) {
83
+ var _typeMap$_this$type2, _typeMap$_this$type3;
84
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)];
85
+ //兼容多个商品
86
+ return /*#__PURE__*/React.createElement("span", {
87
+ onClick: function onClick(e) {
88
+ return e.stopPropagation();
89
+ }
90
+ }, /*#__PURE__*/React.createElement(JstGoodImage, {
91
+ list: list,
92
+ type: 5,
93
+ platformType: (_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.platformType
94
+ }));
95
+ });
96
+ _defineProperty(this, "renderLog", function (r) {
97
+ var _typeMap$_this$type4;
98
+ var list = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
99
+ if (isNull(list)) return null;
100
+ return _this.renderPc(undefined, r);
101
+ });
102
+ _defineProperty(this, "getComponentValue", function (r) {
103
+ var _typeMap$_this$type5;
104
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)];
105
+ });
106
+ _defineProperty(this, "renderExport", function (value, record) {
107
+ var _typeMap$_this$type6;
108
+ var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)];
109
+ return (list || []).map(function (item) {
110
+ return [item === null || item === void 0 ? void 0 : item.returnWarehouseId, SendDataCenter.getInstance(_this.type).getSendNameByCode(item === null || item === void 0 ? void 0 : item.returnWarehouseName)].join("/");
111
+ }).join(",");
112
+ });
113
+ _defineProperty(this, "editRender", function (p) {
114
+ var _this$componentConfig, _this$componentConfig2, _typeMap$_this$type7;
115
+ return /*#__PURE__*/React.createElement(GetFormItem, {
116
+ title: _this.name,
117
+ name: _this.id,
118
+ rules: _this.rules,
119
+ required: false,
120
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
121
+ display: p === null || p === void 0 ? void 0 : p.display,
122
+ tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : "",
123
+ component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
124
+ type: 5,
125
+ platformType: (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.platformType,
126
+ onlyShowFieldSelect: _this.componentConfig ? _this.componentConfig.showField === "returnWarehouseName" : false
127
+ }))
128
+ });
129
+ });
130
+ _defineProperty(this, "filterConfig", function (item) {
131
+ var _typeMap$_this$type8, _typeMap$_this$type9;
132
+ return [{
133
+ searchDefaultConditions: SYMBOL.in,
134
+ type: item.type,
135
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.returnWarehouseName),
136
+ name: "".concat(_this.name, "-\u540D\u79F0"),
137
+ filterComponentType: "MultipleSelect",
138
+ props: {
139
+ options: SendDataCenter.getInstance(item.type).getSendData().map(function (item) {
140
+ return {
141
+ label: item.label,
142
+ value: item.label
143
+ };
144
+ })
145
+ },
146
+ filterFn: function filterFn(value) {
147
+ return function (i) {
148
+ var _ref;
149
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "returnWarehouseName").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
150
+ var _String;
151
+ var returnWarehouseName = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
152
+ return returnWarehouseName;
153
+ });
154
+ };
155
+ }
156
+ }, {
157
+ searchDefaultConditions: SYMBOL.like,
158
+ type: item.type,
159
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.returnWarehouseId),
160
+ name: "".concat(_this.name, "-\u7F16\u7801"),
161
+ filterComponentType: "Input",
162
+ filterFn: function filterFn(value) {
163
+ return function (i) {
164
+ var _ref2, _typeMap$_this$type10;
165
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
166
+ var _String2;
167
+ var id = item !== null && item !== void 0 && item.returnWarehouseId ? (_String2 = String(item === null || item === void 0 ? void 0 : item.returnWarehouseId)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
168
+ return id;
169
+ });
170
+ };
171
+ }
172
+ }];
173
+ });
174
+ this.name = _options.name;
175
+ this.id = _options.id;
176
+ this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
177
+ this.formField = "".concat(_options.id, "_").concat((_typeMap$_options$typ2 = typeMap[_options.type]) === null || _typeMap$_options$typ2 === void 0 ? void 0 : _typeMap$_options$typ2.key);
178
+ this.componentConfig = _options.componentConfig;
179
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || "", _options, _options.type);
180
+ this.type = _options.type;
181
+ this.dataType = (_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.dataType;
182
+ this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
183
+ required: true,
184
+ validator: function validator(_, value) {
185
+ if (!value || !value.length) {
186
+ var _typeMap$_options$typ4;
187
+ return Promise.reject(new Error((_typeMap$_options$typ4 = typeMap[_options.type]) === null || _typeMap$_options$typ4 === void 0 ? void 0 : _typeMap$_options$typ4.placeholder));
188
+ }
189
+ var hasNo = (value || []).some(function (item) {
190
+ var _this$componentConfig5, _this$componentConfig6;
191
+ if (["returnWarehouseName"].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) || "")) {
192
+ return item.returnWarehouseName;
193
+ } else if (["returnWarehouseId"].includes((_this === null || _this === void 0 ? void 0 : (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.showField) || "")) {
194
+ return item.returnWarehouseId;
195
+ } else {
196
+ return item.returnWarehouseId && item.returnWarehouseName;
197
+ }
198
+ });
199
+ if (!hasNo) {
200
+ return Promise.reject(new Error("\u81F3\u5C11\u586B\u5199\u4E00\u4E2A\u5B8C\u6574\u7684\u9000\u8D27\u4ED3\u4FE1\u606F"));
201
+ }
202
+ return Promise.resolve();
203
+ }
204
+ }] : [];
205
+ this.align = "left";
206
+ this.isCombinationComponent = false;
207
+ this.canSort = false;
208
+ this.children = [];
209
+ });
210
+ export default ReturnWarehouse;
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, Record } from "../../type";
2
- import React from "react";
3
- import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
1
+ import { ComponentInterface, PickOption, Record } from '../../type';
2
+ import React from 'react';
3
+ import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
4
4
  declare type Value = {
5
5
  address?: (string | number)[];
6
6
  detail?: string;
@@ -11,14 +11,15 @@ declare class BasicInput implements ComponentInterface {
11
11
  sortField: string;
12
12
  type: string;
13
13
  rules: any[];
14
- componentConfig: ComponentInterface["componentConfig"];
15
- effects: ComponentInterface["effects"];
14
+ componentConfig: ComponentInterface['componentConfig'];
15
+ effects: ComponentInterface['effects'];
16
16
  isCombinationComponent: boolean;
17
17
  formField: string;
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
20
  addressDateInstance: InstanceType<typeof AddressData>;
21
- dataType: ComponentInterface["dataType"];
21
+ dataType: ComponentInterface['dataType'];
22
+ compoundConfig: ComponentInterface['compoundConfig'];
22
23
  constructor(options: PickOption);
23
24
  render: (value: Value) => React.JSX.Element;
24
25
  transTextToNumber: (value?: string) => string | number | undefined;
@@ -8,17 +8,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
- import React from "react";
12
- import { Address } from "@kmkf-fe-packages/basic-components";
13
- import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
11
+ import React from 'react';
12
+ import { Address } from '@kmkf-fe-packages/basic-components';
13
+ import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
14
14
  import GetFormItem from "../GetFormItem";
15
15
  import ItemView from "../../commonComponents/ItemView";
16
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
- import every from "lodash/every";
16
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
17
+ import every from 'lodash/every';
18
18
  import { queryWorkOrderDetail } from "../../service/api";
19
- import copy from "copy-to-clipboard";
20
- import { message } from "antd";
21
- import { CopyOutlined } from "@ant-design/icons";
19
+ import copy from 'copy-to-clipboard';
20
+ import { message } from 'antd';
21
+ import { CopyOutlined } from '@ant-design/icons';
22
22
  var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
23
23
  var _this = this,
24
24
  _this$componentConfig5;
@@ -36,13 +36,14 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
36
36
  _defineProperty(this, "children", void 0);
37
37
  _defineProperty(this, "addressDateInstance", void 0);
38
38
  _defineProperty(this, "dataType", void 0);
39
+ _defineProperty(this, "compoundConfig", void 0);
39
40
  _defineProperty(this, "render", function (value) {
40
41
  var _value$address;
41
42
  return /*#__PURE__*/React.createElement("span", {
42
43
  className: "pointer"
43
44
  }, value === null || value === void 0 ? void 0 : (_value$address = value.address) === null || _value$address === void 0 ? void 0 : _value$address.map(function (suffix) {
44
45
  return _this.addressDateInstance.getNameByCode(suffix);
45
- }).join(""), value === null || value === void 0 ? void 0 : value.detail);
46
+ }).join(''), value === null || value === void 0 ? void 0 : value.detail);
46
47
  });
47
48
  _defineProperty(this, "transTextToNumber", function (value) {
48
49
  return value ? +value : value;
@@ -66,10 +67,10 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
66
67
  e.stopPropagation();
67
68
  _context.prev = 1;
68
69
  addressText = (_address = address) === null || _address === void 0 ? void 0 : _address.map(function () {
69
- var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
70
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
70
71
  return _this.addressDateInstance.getNameByCode(suffix);
71
- }).join("");
72
- if (!(detail.indexOf("*") > -1)) {
72
+ }).join('');
73
+ if (!(detail.indexOf('*') > -1)) {
73
74
  _context.next = 12;
74
75
  break;
75
76
  }
@@ -85,13 +86,13 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
85
86
  success = _yield$queryWorkOrder.success;
86
87
  if (success) {
87
88
  copy("".concat(addressText).concat(data === null || data === void 0 ? void 0 : (_data$jsonMap = data.jsonMap) === null || _data$jsonMap === void 0 ? void 0 : _data$jsonMap["".concat(_this.id, "_address")]));
88
- message.success("复制成功");
89
+ message.success('复制成功');
89
90
  }
90
91
  _context.next = 14;
91
92
  break;
92
93
  case 12:
93
94
  copy("".concat(addressText).concat(detail));
94
- message.success("复制成功");
95
+ message.success('复制成功');
95
96
  case 14:
96
97
  _context.next = 19;
97
98
  break;
@@ -113,15 +114,15 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
113
114
  className: "pointer",
114
115
  onClick: function onClick(e) {
115
116
  var _this$effects, _this$effects2;
116
- typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === "function" && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
117
+ typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
117
118
  e.stopPropagation();
118
119
  }
119
120
  }, (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function () {
120
- var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
121
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
121
122
  return _this.addressDateInstance.getNameByCode(suffix);
122
- }).join(""), detail, " ", /*#__PURE__*/React.createElement(CopyOutlined, {
123
+ }).join(''), detail, ' ', /*#__PURE__*/React.createElement(CopyOutlined, {
123
124
  style: {
124
- color: "#1B5BF3"
125
+ color: '#1B5BF3'
125
126
  },
126
127
  onClick: function onClick(e) {
127
128
  return copyHandler(e, record);
@@ -136,9 +137,9 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
136
137
  }) ? [] : address;
137
138
  var detail = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_address")];
138
139
  return "".concat((_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.map(function () {
139
- var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
140
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
140
141
  return _this.addressDateInstance.getNameByCode(suffix);
141
- }).join(""), " ").concat(detail || "");
142
+ }).join(''), " ").concat(detail || '');
142
143
  });
143
144
  _defineProperty(this, "getComponentValue", function (r) {
144
145
  return {
@@ -149,7 +150,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
149
150
  _defineProperty(this, "renderExport", function (value, record) {
150
151
  var _address4;
151
152
  if (record["".concat(_this.id, "_province")] === undefined) {
152
- return "--";
153
+ return '--';
153
154
  }
154
155
  var address = [_this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_province")]), _this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_city")]), _this.transTextToNumber(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_district")])];
155
156
  address = every(address, function (item) {
@@ -157,9 +158,9 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
157
158
  }) ? [] : address;
158
159
  var detail = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_address")];
159
160
  return "".concat((_address4 = address) === null || _address4 === void 0 ? void 0 : _address4.map(function () {
160
- var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
161
+ var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
161
162
  return _this.addressDateInstance.getNameByCode(suffix);
162
- }).join(""), " ").concat(detail || "");
163
+ }).join(''), " ").concat(detail || '');
163
164
  });
164
165
  _defineProperty(this, "renderClient", function (record) {
165
166
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -177,7 +178,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
177
178
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
178
179
  display: p === null || p === void 0 ? void 0 : p.display,
179
180
  required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
180
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
181
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
181
182
  component: /*#__PURE__*/React.createElement(Address, _this.componentConfig)
182
183
  });
183
184
  });
@@ -197,16 +198,29 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
197
198
  validator: function validator(_, value) {
198
199
  var _value$address2;
199
200
  if (!(value !== null && value !== void 0 && (_value$address2 = value.address) !== null && _value$address2 !== void 0 && _value$address2.length)) {
200
- return Promise.reject(new Error("请选择地址"));
201
+ return Promise.reject(new Error('请选择地址'));
201
202
  }
202
203
  if (!(value !== null && value !== void 0 && value.detail)) {
203
- return Promise.reject(new Error("请填写详细地址"));
204
+ return Promise.reject(new Error('请填写详细地址'));
204
205
  }
205
206
  return Promise.resolve();
206
207
  }
207
208
  }] : [];
208
209
  this.effects = options.effects;
209
210
  this.addressDateInstance = AddressData.getInstance();
210
- this.dataType = "object";
211
+ this.dataType = 'object';
212
+ this.compoundConfig = [{
213
+ name: "\u7701",
214
+ id: "".concat(options.id, "_province")
215
+ }, {
216
+ name: "\u5E02",
217
+ id: "".concat(options.id, "_city")
218
+ }, {
219
+ name: "\u533A",
220
+ id: "".concat(options.id, "_district")
221
+ }, {
222
+ name: "\u8BE6\u7EC6\u5730\u5740",
223
+ id: "".concat(options.id, "_address")
224
+ }];
211
225
  });
212
226
  export default BasicInput;
@@ -112,7 +112,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
112
112
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
113
113
  return (list || []).map(function (item) {
114
114
  var _this$componentConfig3, _ref;
115
- return [((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.logistics) === "gy" ? (_ref = _this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany, false) || (item === null || item === void 0 ? void 0 : item.logisticsCompanyName)) !== null && _ref !== void 0 ? _ref : "" : _this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany), item === null || item === void 0 ? void 0 : item.logisticsCode].join("/");
115
+ return [["gy", "jy"].includes(((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.logistics) || "") ? (_ref = _this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany, false) || (item === null || item === void 0 ? void 0 : item.logisticsCompanyName)) !== null && _ref !== void 0 ? _ref : "" : _this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany), item === null || item === void 0 ? void 0 : item.logisticsCode].join("/");
116
116
  }).join(",");
117
117
  });
118
118
  _defineProperty(this, "editRender", function (p) {
@@ -195,7 +195,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(_options) {
195
195
  validator: function validator(_, value) {
196
196
  var hasNo = (value || []).some(function (item) {
197
197
  var _this$componentConfig10;
198
- if (((_this$componentConfig10 = _this.componentConfig) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.logistics) === "gy") {
198
+ if (["gy", "jy"].includes(((_this$componentConfig10 = _this.componentConfig) === null || _this$componentConfig10 === void 0 ? void 0 : _this$componentConfig10.logistics) || "")) {
199
199
  return (item.logisticsCompany || item.logisticsCompanyName) && item.logisticsCode;
200
200
  }
201
201
  return item.logisticsCompany && item.logisticsCode;
@@ -29,7 +29,7 @@ declare class ERemark implements ComponentInterface {
29
29
  };
30
30
  renderExport: (value: unknown, record: Record) => any;
31
31
  editRender: (p: any) => React.JSX.Element;
32
- filterConfig: (item: ColumnConfig) => {
32
+ filterConfig: (item: ColumnConfig) => ({
33
33
  searchDefaultConditions: {
34
34
  in: "in";
35
35
  anylike: "anylike";
@@ -43,9 +43,25 @@ declare class ERemark implements ComponentInterface {
43
43
  label: string;
44
44
  value: string;
45
45
  }[];
46
+ options?: undefined;
46
47
  };
47
48
  filterFn: (value: string) => (i: Record) => boolean;
48
49
  formatFilterValue: (value: any) => any;
49
- };
50
+ } | {
51
+ searchDefaultConditions: "in";
52
+ type: string;
53
+ id: string;
54
+ name: string;
55
+ filterComponentType: "MultipleSelect";
56
+ props: {
57
+ options: {
58
+ label: string;
59
+ value: string;
60
+ }[];
61
+ filterOptions?: undefined;
62
+ };
63
+ filterFn: (value: string[]) => (i: Record) => boolean;
64
+ formatFilterValue?: undefined;
65
+ })[];
50
66
  }
51
67
  export default ERemark;
@@ -98,7 +98,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
98
98
  });
99
99
  });
100
100
  _defineProperty(this, "filterConfig", function (item) {
101
- return {
101
+ return [{
102
102
  searchDefaultConditions: {
103
103
  in: SYMBOL.in,
104
104
  anylike: SYMBOL.anylike
@@ -124,7 +124,42 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
124
124
  return value;
125
125
  }
126
126
  }
127
- };
127
+ }, {
128
+ searchDefaultConditions: SYMBOL.in,
129
+ type: item.type,
130
+ id: "".concat(item.id, "_flag"),
131
+ // 过滤组件id
132
+ name: "".concat(item.name, "\u65D7\u5E1C"),
133
+ // 过滤组件名称
134
+ filterComponentType: 'MultipleSelect',
135
+ props: {
136
+ //不使用workOrderMark的数据,筛选会深拷贝
137
+ options: [{
138
+ label: '灰色',
139
+ value: '0'
140
+ }, {
141
+ label: '红色',
142
+ value: '1'
143
+ }, {
144
+ label: '黄色',
145
+ value: '2'
146
+ }, {
147
+ label: '绿色',
148
+ value: '3'
149
+ }, {
150
+ label: '蓝色',
151
+ value: '4'
152
+ }, {
153
+ label: '紫色',
154
+ value: '5'
155
+ }]
156
+ },
157
+ filterFn: function filterFn(value) {
158
+ return function (i) {
159
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
160
+ };
161
+ }
162
+ }];
128
163
  });
129
164
  this.name = options.name;
130
165
  this.id = options.id;
@@ -1,8 +1,8 @@
1
- import { ComponentInterface, PickOption, Record, ColumnConfig } from '../../type';
2
- import React from 'react';
3
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
4
- import Express from '../Express';
5
- import ExpressCode from '../ExpressCode';
1
+ import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
2
+ import React from "react";
3
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
+ import Express from "../Express";
5
+ import ExpressCode from "../ExpressCode";
6
6
  declare class ReturnLogistics implements ComponentInterface {
7
7
  name: string;
8
8
  id: string;
@@ -18,7 +18,8 @@ declare class ReturnLogistics implements ComponentInterface {
18
18
  formField: string;
19
19
  canSort: boolean;
20
20
  children: ComponentInterface[];
21
- dataType: ComponentInterface['dataType'];
21
+ dataType: ComponentInterface["dataType"];
22
+ isChange: boolean;
22
23
  constructor(options: PickOption);
23
24
  renderClient: (record: any) => React.JSX.Element;
24
25
  renderPc: () => null;