@kmkf-fe-packages/kmkf-utils 1.9.0 → 1.9.2-beta.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
+ 111223
@@ -15,5 +15,5 @@ export declare const queryWdtWarehouseList: (pageNo: number, pageSize: number) =
15
15
  export declare const getWdtSellerLogisticsCompanyRelation: () => Promise<{
16
16
  label: string;
17
17
  value: string;
18
- disabled: any;
18
+ disabled: boolean;
19
19
  }[]>;
@@ -86,7 +86,7 @@ export var getWdtSellerLogisticsCompanyRelation = function getWdtSellerLogistics
86
86
  return {
87
87
  label: item.logisticsName,
88
88
  value: item.logisticsNo,
89
- disabled: item.isDelete
89
+ disabled: item.isDisabled
90
90
  };
91
91
  }).filter(function (item) {
92
92
  return item.value;
@@ -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", "productList", "label", "kmSendGood", "kmSendId", "kmSendName"].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", "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", "productList", "kmSendGood", "kmSendId", "kmSendName"].reduce(function (cur, nxt) {
3
3
  return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
4
4
  }, false);
5
5
  });
@@ -1,6 +1,7 @@
1
1
  declare type WarehouseType = {
2
2
  label: string;
3
3
  value: string;
4
+ disabled: boolean;
4
5
  };
5
6
  declare const getWarehouseDataAsync: () => Promise<WarehouseType[]>;
6
7
  export default getWarehouseDataAsync;
@@ -14,19 +14,20 @@ var getWarehouseDataAsync = function getWarehouseDataAsync() {
14
14
  warehouses.map(function (_ref) {
15
15
  var warehouseNo = _ref.warehouseNo,
16
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
- }
17
+ isDisabled = _ref.isDisabled;
18
+ list.push({
19
+ label: name,
20
+ value: warehouseNo,
21
+ disabled: isDisabled
22
+ });
24
23
  });
25
24
  pageNo++;
26
25
  if (pageSize === warehouses.length) {
27
26
  fetchList();
28
27
  } else {
29
- resolve(list);
28
+ resolve((list || []).sort(function (a, b) {
29
+ return (a.disabled ? 1 : 0) - (b.disabled ? 1 : 0);
30
+ }));
30
31
  }
31
32
  }).catch(function (e) {
32
33
  singletonPromise = null;
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "1.9.0",
3
+ "version": "1.9.2-beta.0",
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",
11
10
  "build": "yarn run lint && father build",
12
11
  "jest:init": "jest --init",
13
12
  "lint": "eslint . --ext .ts",
14
13
  "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": "81761edb3ce70440e3da08c520627d332878b6a4",
44
+ "gitHead": "a75411cd082e5025c4af1c760286aeae363f94d2",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }