@kmkf-fe-packages/kmkf-utils 1.1.2 → 1.2.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.
package/README.md CHANGED
@@ -1 +1 @@
1
- 11122311
1
+ 11122311
@@ -58,7 +58,7 @@ var ExpressInterceptData = /*#__PURE__*/function () {
58
58
  value: function getShowNewAddressMap() {
59
59
  return this.showNewAddressMap;
60
60
  }
61
- //获取展示映射
61
+ //获取退回地址展示映射
62
62
  }, {
63
63
  key: "getShowReturnAddressMap",
64
64
  value: function getShowReturnAddressMap() {
@@ -77,8 +77,6 @@ declare enum TComponentType {
77
77
  WDT_LOGISTICS = "WDT_LOGISTICS",
78
78
  WDT_SEND_GOOD = "WDR_SEND_GOOD",
79
79
  WDT_SYSTEM_ORDER = "WDT_SYSTEM_ORDER",
80
- WDT_RETURN_GOODS = "WDT_RETURN_GOODS",
81
- WDT_EXCHANGE_GOODS = "WDT_EXCHANGE_GOODS",
82
80
  }
83
81
 
84
82
  declare enum PlatForm {
@@ -5,7 +5,6 @@ export { default as BsAddressData } from "./bsAddressData";
5
5
  export { default as WdtAddressData } from "./wdtAddressData";
6
6
  export { default as PlatData } from "./platData";
7
7
  export { default as LogisticsAddressData } from "./logisticsAddressData";
8
- export { default as LabelData } from "./labelData";
9
8
  export { default as WdtSendData } from "./wdtSendData";
10
9
  export { default as request } from "./request";
11
10
  export * as WDT from "./wdt";
package/dist/esm/index.js CHANGED
@@ -5,7 +5,6 @@ export { default as BsAddressData } from "./bsAddressData";
5
5
  export { default as WdtAddressData } from "./wdtAddressData";
6
6
  export { default as PlatData } from "./platData";
7
7
  export { default as LogisticsAddressData } from "./logisticsAddressData";
8
- export { default as LabelData } from "./labelData";
9
8
  export { default as WdtSendData } from "./wdtSendData";
10
9
  export { default as request } from "./request";
11
10
  import * as _WDT from "./wdt";
@@ -8,7 +8,6 @@ export declare const queryWdtWarehouseList: (pageNo: number, pageSize: number) =
8
8
  warehouses: {
9
9
  warehouseNo: string;
10
10
  name: string;
11
- is_disabled: boolean;
12
11
  }[];
13
12
  totalCount?: number | undefined;
14
13
  }>>;
@@ -1,5 +1,5 @@
1
1
  export default (function (key) {
2
- return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "checkbox", "multSelect", "rate", "picture", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtLogisticsCompany", "wdtLogisticsList", 'wdtReturnGoods', 'wdtReturnType', 'wdtExchangeGoods', "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode", "bsSystemShowOrder", "bsSystemSelectIds", "reissueLogisticsList", "reissueLogisticsCompany", "reissueLogisticsCode", "deliveryNoList", "deliveryNoIds", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "wlnLogisticsList", "wlnLogisticsCompany", "wlnLogisticsCode", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "wlnSendId", "wlnSendName", "exchangeReason", "flowTag", "returnGoodsStatusList", "returnGoodsStatusValue", "exchangeReason", "exchangeStatusValue", "inStockStatusItemList", "inStockStatusList", "reissueStatusValue", "reissueReason", "adjustWorkOrderStatusValue", "adjustWorkOrderReason", "msgStatusValues", "msgStatus4Search", "createStatusValue", "createReason", "invoiceStatusValue", "invoiceReason", "invoicingStatusValue", "invoicingReason", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptSnapshotList", "label"].reduce(function (cur, nxt) {
2
+ return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "checkbox", "multSelect", "rate", "picture", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtLogisticsCompany", "wdtLogisticsList", "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode", "bsSystemShowOrder", "bsSystemSelectIds", "reissueLogisticsList", "reissueLogisticsCompany", "reissueLogisticsCode", "deliveryNoList", "deliveryNoIds", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "wlnLogisticsList", "wlnLogisticsCompany", "wlnLogisticsCode", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "wlnSendId", "wlnSendName", "exchangeReason", "flowTag", "returnGoodsStatusList", "returnGoodsStatusValue", "exchangeReason", "exchangeStatusValue", "inStockStatusItemList", "inStockStatusList", "reissueStatusValue", "reissueReason", "adjustWorkOrderStatusValue", "adjustWorkOrderReason", "msgStatusValues", "msgStatus4Search", "createStatusValue", "createReason", "invoiceStatusValue", "invoiceReason", "invoicingStatusValue", "invoicingReason", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptSnapshotList"].reduce(function (cur, nxt) {
3
3
  return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
4
4
  }, false);
5
5
  });
@@ -25,7 +25,6 @@ export declare const wdtOrderTransform: (detail: any, form: any) => {
25
25
  showOrderInfo: any;
26
26
  };
27
27
  wdtGoods: {
28
- shopCode: any;
29
28
  wdtGoods: any;
30
29
  };
31
30
  wdtLogistics: any;
@@ -150,35 +150,6 @@ var updateWdtItemListByConfigHandle = function updateWdtItemListByConfigHandle(l
150
150
  return prv;
151
151
  }, []);
152
152
  };
153
-
154
- // WDT根据订单号请求返回的srcTid会有多个订单号组合在一起的数据 排除其他的,返回当前订单号
155
- var handleOrderNo = function handleOrderNo(detail, form) {
156
- var _detail$componentList, _detail$componentList2;
157
- var tradeIdComp = detail === null || detail === void 0 ? void 0 : (_detail$componentList = detail.componentList) === null || _detail$componentList === void 0 ? void 0 : (_detail$componentList2 = _detail$componentList.find) === null || _detail$componentList2 === void 0 ? void 0 : _detail$componentList2.call(_detail$componentList, function (item) {
158
- return item.workOrderComponentType === 'TRADE_ID_INPUT';
159
- });
160
- var tradeIdValue = form.getFieldValue(tradeIdComp.uniqueKey) || form.getFieldValue("".concat(tradeIdComp.uniqueKey, "_tradeId"));
161
- var currentTrades = ((detail === null || detail === void 0 ? void 0 : detail.trades) || []).filter(function (item) {
162
- return (item.srcTid || '').split(',').includes(tradeIdValue);
163
- }).map(function (item) {
164
- if (Array.isArray(item.goodDetails)) {
165
- item.goodDetails = item.goodDetails.filter(function (good) {
166
- return good.srcTid === tradeIdValue;
167
- });
168
- }
169
- return item;
170
- });
171
- if (currentTrades.length) {
172
- return {
173
- currentTrades: currentTrades,
174
- orderNo: tradeIdValue
175
- };
176
- }
177
- return {
178
- currentTrades: [],
179
- orderNo: ''
180
- };
181
- };
182
153
  export var wdtOrderBackFormValues = function wdtOrderBackFormValues() {
183
154
  var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
184
155
  var templateDetail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -241,26 +212,25 @@ export var wdtOrderBackFormValues = function wdtOrderBackFormValues() {
241
212
  };
242
213
  //wdt订单信息转换
243
214
  export var wdtOrderTransform = function wdtOrderTransform(detail, form) {
244
- var _detail$trades, _currentTrades$find, _currentTrades$find$c;
215
+ var _detail$trades, _detail$trades$find, _detail$trades2, _ref;
245
216
  // const advItem: any =
246
217
  // detail?.orders?.[0]?.advancedDistributionInfos?.[0] || {};
247
- var _handleOrderNo = handleOrderNo(detail, form),
248
- currentTrades = _handleOrderNo.currentTrades,
249
- orderNo = _handleOrderNo.orderNo;
250
218
  return {
251
219
  wdtSystemOrder: {
252
- orderNo: orderNo,
253
- orders: currentTrades.map(function (item) {
220
+ orderNo: (detail === null || detail === void 0 ? void 0 : (_detail$trades = detail.trades) === null || _detail$trades === void 0 ? void 0 : (_detail$trades$find = _detail$trades.find(function (item) {
221
+ return item.srcTid;
222
+ })) === null || _detail$trades$find === void 0 ? void 0 : _detail$trades$find.srcTid) || '',
223
+ orders: ((detail === null || detail === void 0 ? void 0 : detail.trades) || []).map(function (item) {
254
224
  return _objectSpread(_objectSpread({}, item), {}, {
255
225
  billNo: item.tradeNo,
256
226
  billType: WDT_ORDER_TYPE_MAP[item.tradeType],
257
227
  billTag: item.tagName
258
228
  });
259
229
  }),
260
- selectIds: (detail === null || detail === void 0 ? void 0 : (_detail$trades = detail.trades) === null || _detail$trades === void 0 ? void 0 : _detail$trades.length) === 1 ? currentTrades.map(function (item) {
230
+ selectIds: (detail === null || detail === void 0 ? void 0 : (_detail$trades2 = detail.trades) === null || _detail$trades2 === void 0 ? void 0 : _detail$trades2.length) === 1 ? detail === null || detail === void 0 ? void 0 : detail.trades.map(function (item) {
261
231
  return item.tradeNo;
262
232
  }) : [],
263
- showOrderInfo: currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.map(function (item) {
233
+ showOrderInfo: (_ref = (detail === null || detail === void 0 ? void 0 : detail.trades) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
264
234
  return {
265
235
  billNo: item.tradeNo,
266
236
  billType: WDT_ORDER_TYPE_MAP[item.tradeType],
@@ -269,13 +239,11 @@ export var wdtOrderTransform = function wdtOrderTransform(detail, form) {
269
239
  })
270
240
  },
271
241
  wdtGoods: {
272
- shopCode: (currentTrades === null || currentTrades === void 0 ? void 0 : (_currentTrades$find = currentTrades.find) === null || _currentTrades$find === void 0 ? void 0 : (_currentTrades$find$c = _currentTrades$find.call(currentTrades, function (item) {
273
- return item.shopNo;
274
- })) === null || _currentTrades$find$c === void 0 ? void 0 : _currentTrades$find$c.shopNo) || null,
275
- wdtGoods: updateWdtGoodsHandle(currentTrades)
242
+ // shopCode: detail?.shopCode,
243
+ wdtGoods: updateWdtGoodsHandle(detail === null || detail === void 0 ? void 0 : detail.trades)
276
244
  },
277
- wdtLogistics: updateWdtItemListHandle(currentTrades, "logistics", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form),
278
- wdtSendGood: updateWdtItemListHandle(currentTrades, "send", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form)
245
+ wdtLogistics: updateWdtItemListHandle(detail === null || detail === void 0 ? void 0 : detail.trades, "logistics", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form),
246
+ wdtSendGood: updateWdtItemListHandle(detail === null || detail === void 0 ? void 0 : detail.trades, "send", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form)
279
247
  // wdtSingingTime: detail?.receiptDate,
280
248
  // wdtSendTime:
281
249
  // detail?.orders?.[0]?.advancedDistributionInfos?.[0]?.deliveryDate,
@@ -13,14 +13,11 @@ var getWarehouseDataAsync = function getWarehouseDataAsync() {
13
13
  var warehouses = (data === null || data === void 0 ? void 0 : data.warehouses) || [];
14
14
  warehouses.map(function (_ref) {
15
15
  var warehouseNo = _ref.warehouseNo,
16
- name = _ref.name,
17
- is_disabled = _ref.is_disabled;
18
- if (!is_disabled) {
19
- list.push({
20
- label: name,
21
- value: warehouseNo
22
- });
23
- }
16
+ name = _ref.name;
17
+ list.push({
18
+ label: name,
19
+ value: warehouseNo
20
+ });
24
21
  });
25
22
  pageNo++;
26
23
  if (pageSize === warehouses.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -40,7 +40,7 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "4561254272f4a9cc7e4adc47be66e2e8c77a49c7",
43
+ "gitHead": "b14fc34f8d5d1d37484367f2a09782c4f9d065cb",
44
44
  "gitHooks": {
45
45
  "pre-commit": "lint-staged"
46
46
  }
@@ -1,12 +0,0 @@
1
- interface OptionsItem {
2
- label: string;
3
- value: string;
4
- color: string;
5
- bgColor: string;
6
- }
7
- export default class LabelData {
8
- private static instance;
9
- labelData: OptionsItem[];
10
- static getInstance(): LabelData;
11
- }
12
- export {};
@@ -1,25 +0,0 @@
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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 _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; }
6
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
- 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); }
8
- var LabelData = /*#__PURE__*/function () {
9
- function LabelData() {
10
- _classCallCheck(this, LabelData);
11
- _defineProperty(this, "labelData", []);
12
- }
13
- _createClass(LabelData, null, [{
14
- key: "getInstance",
15
- value: function getInstance() {
16
- if (!LabelData.instance) {
17
- LabelData.instance = new LabelData();
18
- }
19
- return LabelData.instance;
20
- }
21
- }]);
22
- return LabelData;
23
- }();
24
- _defineProperty(LabelData, "instance", void 0);
25
- export { LabelData as default };