@kmkf-fe-packages/kmkf-utils 2.0.19-beta.0 → 2.0.22

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
- 1112263322
1
+ 1112263331
@@ -1,4 +1,3 @@
1
- export { default as msgTypeCh } from "./msgTypeMapping";
2
1
  export { default as columnsGoodsList } from "./columnsGoodsList";
3
2
  export declare const getMapping: (data: {
4
3
  dataIndex: string;
@@ -6,3 +5,4 @@ export declare const getMapping: (data: {
6
5
  }[]) => {
7
6
  [key: string]: string;
8
7
  };
8
+ export { default as msgTypeCh } from "./msgTypeMapping";
@@ -1,4 +1,3 @@
1
- export { default as msgTypeCh } from "./msgTypeMapping";
2
1
  export { default as columnsGoodsList } from "./columnsGoodsList";
3
2
  export var getMapping = function getMapping(data) {
4
3
  var mapping = {};
@@ -6,4 +5,5 @@ export var getMapping = function getMapping(data) {
6
5
  mapping[item.dataIndex] = item.title;
7
6
  });
8
7
  return mapping;
9
- };
8
+ };
9
+ export { default as msgTypeCh } from "./msgTypeMapping";
@@ -7,8 +7,6 @@ interface OptionsItem {
7
7
  detail: string;
8
8
  userName: string;
9
9
  mobile: string;
10
- userKCode?: string;
11
- userSecretKey?: string;
12
10
  }
13
11
  export default class logisticsAddressData {
14
12
  private static instance;
@@ -3,9 +3,8 @@ export declare function fetchAll<T = any, D = any>(key: string, fetchAction: (pa
3
3
  pageSize: number;
4
4
  }) => Promise<{
5
5
  data?: D;
6
- }>, getList: (data: D) => T[], { pageNo, pageSize, useCache, maxCount }?: {
6
+ }>, getList: (data: D) => T[], { pageNo, pageSize, useCache }?: {
7
7
  pageNo?: number | undefined;
8
8
  pageSize?: number | undefined;
9
9
  useCache?: boolean | undefined;
10
- maxCount?: number | undefined;
11
10
  }): Promise<T[]>;
@@ -12,9 +12,7 @@ export function fetchAll(key, fetchAction, getList) {
12
12
  _ref$pageSize = _ref.pageSize,
13
13
  pageSize = _ref$pageSize === void 0 ? 100 : _ref$pageSize,
14
14
  _ref$useCache = _ref.useCache,
15
- useCache = _ref$useCache === void 0 ? true : _ref$useCache,
16
- _ref$maxCount = _ref.maxCount,
17
- maxCount = _ref$maxCount === void 0 ? 0 : _ref$maxCount;
15
+ useCache = _ref$useCache === void 0 ? true : _ref$useCache;
18
16
  if (!singletonPromiseMap.has(key)) {
19
17
  singletonPromiseMap.set(key, new Promise(function (resolve, reject) {
20
18
  var list = [];
@@ -27,7 +25,7 @@ export function fetchAll(key, fetchAction, getList) {
27
25
  if (res.data) {
28
26
  var newList = getList(res.data);
29
27
  list.push.apply(list, _toConsumableArray(newList));
30
- if (pageSize === newList.length && (!maxCount || maxCount > list.length)) {
28
+ if (pageSize === newList.length) {
31
29
  pagePointer++;
32
30
  fetchList();
33
31
  } else {
@@ -52,15 +52,15 @@ var getExpression = function getExpression(condition, l, r) {
52
52
  var _intersection3, _intersection4;
53
53
  return Array.isArray(l) ? ((_intersection3 = intersection(r, l)) === null || _intersection3 === void 0 ? void 0 : _intersection3.length) > 0 : ((_intersection4 = intersection(r, [l])) === null || _intersection4 === void 0 ? void 0 : _intersection4.length) > 0;
54
54
  }
55
- if (condition === 'ARRAY_OBJECT_INCLUDE') {
56
- var _intersection5;
57
- return ((_intersection5 = intersection(extractPrimitiveValues(l), r)) === null || _intersection5 === void 0 ? void 0 : _intersection5.length) > 0;
58
- }
59
55
  if (condition === 'NINCLUDE') {
60
- var _intersection6, _intersection7;
61
- var _include = Array.isArray(l) ? ((_intersection6 = intersection(r, l)) === null || _intersection6 === void 0 ? void 0 : _intersection6.length) > 0 : ((_intersection7 = intersection(r, [l])) === null || _intersection7 === void 0 ? void 0 : _intersection7.length) > 0;
56
+ var _intersection5, _intersection6;
57
+ var _include = Array.isArray(l) ? ((_intersection5 = intersection(r, l)) === null || _intersection5 === void 0 ? void 0 : _intersection5.length) > 0 : ((_intersection6 = intersection(r, [l])) === null || _intersection6 === void 0 ? void 0 : _intersection6.length) > 0;
62
58
  return !_include;
63
59
  }
60
+ if (condition === 'ARRAY_OBJECT_INCLUDE') {
61
+ var _intersection7;
62
+ return ((_intersection7 = intersection(extractPrimitiveValues(l), r)) === null || _intersection7 === void 0 ? void 0 : _intersection7.length) > 0;
63
+ }
64
64
  return false;
65
65
  };
66
66
  export default getExpression;
@@ -22,7 +22,6 @@ export declare const gyOrderTransform: (detail: any, form: any) => {
22
22
  };
23
23
  gySystemOrderNo: any;
24
24
  gyReissueGoods: any;
25
- gyReturnGoods: any;
26
25
  gyGoods: {
27
26
  orders: any;
28
27
  orderNo: any;
@@ -205,9 +205,6 @@ export var gyOrderTransform = function gyOrderTransform(detail, form) {
205
205
  gyReissueGoods: onlyOneSystemOrder ? updateGyGoodsHandle([currentTrades[0]]).filter(function (good) {
206
206
  return !isStrict || !orderNo || getIsPlatformCodesIncludeOrderNos(good.platformCode, orderNo);
207
207
  }) : [],
208
- gyReturnGoods: onlyOneSystemOrder ? updateGyGoodsHandle([currentTrades[0]]).filter(function (good) {
209
- return !isStrict || !orderNo || getIsPlatformCodesIncludeOrderNos(good.platformCode, orderNo);
210
- }) : [],
211
208
  gyGoods: {
212
209
  // 订单反填,要清空orders,存的是当前系统订单号勾选上的 订单
213
210
  orders: currentTrades,
@@ -276,16 +273,6 @@ export var gyOrderBackFormValues = function gyOrderBackFormValues() {
276
273
  break;
277
274
  case "GY_SEND_GOOD":
278
275
  prv[uniqueKey] = updateGyItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.gySendGood, "send", config);
279
- break;
280
- case "GY_RETURN_GOODS":
281
- // prv[uniqueKey] = detail?.gyReturnGoods;
282
- prv[uniqueKey] = {
283
- gySystemOrder: detail === null || detail === void 0 ? void 0 : detail.gySystemOrder,
284
- gyReturnGoods: detail === null || detail === void 0 ? void 0 : detail.gyReturnGoods,
285
- gySystemOrderNo: detail === null || detail === void 0 ? void 0 : detail.gySystemOrderNo,
286
- gyReturnType: ["1"]
287
- };
288
- break;
289
276
  }
290
277
  return prv;
291
278
  }, {});
@@ -110,9 +110,10 @@ var updateJstItemListHandle = function updateJstItemListHandle(list, type, comLi
110
110
  params.logisticsCompany = next === null || next === void 0 ? void 0 : next.logisticsCompany;
111
111
  params.logisticsCode = next === null || next === void 0 ? void 0 : next.lId;
112
112
  } else if (type === "send") {
113
- params.sendId = next === null || next === void 0 ? void 0 : next.wmsCoId;
114
- params.sendName = (next === null || next === void 0 ? void 0 : next.wmsCoId) && SendDataCenter.getInstance("jst").getSendNameByCode(next === null || next === void 0 ? void 0 : next.wmsCoId);
115
- params.sendSnapshotId = next === null || next === void 0 ? void 0 : next.wmsCoId;
113
+ var wmsCoId = (next === null || next === void 0 ? void 0 : next.wmsCoId) === "0" ? "" : next === null || next === void 0 ? void 0 : next.wmsCoId;
114
+ params.sendId = wmsCoId;
115
+ params.sendName = wmsCoId && SendDataCenter.getInstance("jst").getSendNameByCode(wmsCoId);
116
+ params.sendSnapshotId = wmsCoId;
116
117
  } else if (type === "supply") {
117
118
  params.supplyId = next === null || next === void 0 ? void 0 : next.drpCoIdTo;
118
119
  params.supplyName = next === null || next === void 0 ? void 0 : next.drpCoName;
@@ -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", "memberLevel", "erpOrderType", "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", "kmSystemShowOrder", "bsSystemShowOrder", "bsSystemSelectIds", "bsE3SystemOrderNo", "bsE3SystemShowOrder", "bsE3SystemSelectIds", "bsE3Goods", "bsE3ReissueGoods", "bsE3ReissueType", "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", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "reissueStatusValue", "reissueReason", "adjustWorkOrderStatusValue", "adjustWorkOrderReason", "msgStatusValues", "msgStatus4Search", "createStatusValue", "createReason", "invoiceStatusValue", "invoiceReason", "invoicingStatusValue", "invoicingReason", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptApiStatusList", "interceptLogisticsApiStatus", "logisticsInterceptSnapshotList", "productList", "label", "kmSendGood", "kmSendId", "kmSendName", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "kmLogisticsList", 'jstGoods', 'jstSendGood', 'jstReissueType', 'jstReissueGoods', 'jstSystemOrderNo', 'jstLogisticsList', 'jstSystemShowOrder', 'jstSystemSelectIds', 'jstReturnGoods', 'jstReturnType', 'jstExchangeGoods'].reduce(function (cur, nxt) {
2
+ return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "memberLevel", "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", "kmSystemShowOrder", "bsSystemShowOrder", "bsSystemSelectIds", "bsE3SystemOrderNo", "bsE3SystemShowOrder", "bsE3SystemSelectIds", "bsE3Goods", "bsE3ReissueGoods", "bsE3ReissueType", "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", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "reissueStatusValue", "reissueReason", "adjustWorkOrderStatusValue", "adjustWorkOrderReason", "msgStatusValues", "msgStatus4Search", "createStatusValue", "createReason", "invoiceStatusValue", "invoiceReason", "invoicingStatusValue", "invoicingReason", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptApiStatusList", "interceptLogisticsApiStatus", "logisticsInterceptSnapshotList", "productList", "label", "kmSendGood", "kmSendId", "kmSendName", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "kmLogisticsList", 'jstGoods', 'jstSendGood', 'jstReissueType', 'jstReissueGoods', 'jstSystemOrderNo', 'jstLogisticsList', 'jstSystemShowOrder', 'jstSystemSelectIds', 'jstReturnGoods', 'jstReturnType', 'jstExchangeGoods'].reduce(function (cur, nxt) {
3
3
  return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
4
4
  }, false);
5
5
  });
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "2.0.19-beta.0",
3
+ "version": "2.0.22",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
+ "sync": "yarn build && yalc push",
10
11
  "build": "yarn run lint && father build",
11
12
  "jest:init": "jest --init",
12
13
  "lint": "eslint . --ext .ts",
13
14
  "lint:fix": "npx eslint . --ext .ts --fix",
14
- "sync": "yarn build && yalc push",
15
15
  "test": "jest"
16
16
  },
17
17
  "lint-staged": {
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "336ada02cb6f2c70056928879798475bf880d389",
44
+ "gitHead": "1720968e22503076facc6b8f1c525b2409cf293c",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }