@kmkf-fe-packages/kmkf-utils 2.0.2-beta.0 → 2.0.2-beta.10

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
- 111226333
1
+ 1112263331
@@ -5,13 +5,14 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
5
5
  import request from "../../request";
6
6
  var queryKMLogisticsList = function queryKMLogisticsList() {
7
7
  return request({
8
- url: "/qy/gdfw/template/queryKmLogistics/noLogin",
8
+ url: "/qy/gdfw/kmErp/erp/logisticsList",
9
9
  method: "post",
10
10
  data: {}
11
11
  });
12
12
  };
13
13
  export var getLogisticsDataAsync = /*#__PURE__*/function () {
14
14
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
15
+ var _result$data;
15
16
  var result, list, logisticsList;
16
17
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17
18
  while (1) switch (_context.prev = _context.next) {
@@ -21,11 +22,11 @@ export var getLogisticsDataAsync = /*#__PURE__*/function () {
21
22
  case 2:
22
23
  result = _context.sent;
23
24
  list = [];
24
- logisticsList = (result === null || result === void 0 ? void 0 : result.data) || [];
25
+ logisticsList = (result === null || result === void 0 ? void 0 : (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.logistics) || [];
25
26
  logisticsList === null || logisticsList === void 0 ? void 0 : logisticsList.map(function (item) {
26
27
  list.push({
27
28
  label: item.name,
28
- value: item.name
29
+ value: item.id
29
30
  });
30
31
  });
31
32
  return _context.abrupt("return", list);
@@ -18,6 +18,5 @@ declare class SendData {
18
18
  export declare class SendDataCenter {
19
19
  static instanceMap: Map<SendGoodPlatform, SendData>;
20
20
  static getInstance(platform: SendGoodPlatform): SendData;
21
- static getPromises(hasErpData: Record<string, boolean>, notJudgedErp: boolean): (() => Promise<void>)[];
22
21
  }
23
22
  export {};
@@ -76,16 +76,6 @@ export var SendDataCenter = /*#__PURE__*/function () {
76
76
  }
77
77
  return this.instanceMap.get(platform);
78
78
  }
79
- }, {
80
- key: "getPromises",
81
- value: function getPromises(hasErpData, notJudgedErp) {
82
- var hasWdt = hasErpData.hasWdt,
83
- hasGy = hasErpData.hasGy;
84
- var promises = [this.getInstance("km").fetchData];
85
- if (hasWdt || notJudgedErp) promises.push(this.getInstance("wdt").fetchData);
86
- if (hasGy || notJudgedErp) promises.push(this.getInstance("gy").fetchData);
87
- return promises;
88
- }
89
79
  }]);
90
80
  return SendDataCenter;
91
81
  }();
@@ -120,15 +120,13 @@ export var updateBsE3GoodsHandle = function updateBsE3GoodsHandle() {
120
120
  var list = orders.reduce(function (prv, next) {
121
121
  var _next$orderDetailGets;
122
122
  var goods = next === null || next === void 0 ? void 0 : (_next$orderDetailGets = next.orderDetailGets) === null || _next$orderDetailGets === void 0 ? void 0 : _next$orderDetailGets.map(function (item) {
123
- var _newItem$uuid;
124
- var newItem = _objectSpread({}, item);
125
- newItem.mark = "是";
126
- newItem.canDelete = true;
127
- newItem.uuid = (_newItem$uuid = newItem.uuid) !== null && _newItem$uuid !== void 0 ? _newItem$uuid : uuid();
128
- if (goodsPriceKey) {
129
- newItem.goodsPrice = newItem[goodsPriceKey];
130
- }
131
- return newItem;
123
+ var _item$uuid;
124
+ item.mark = "是";
125
+ item.canDelete = true;
126
+ item.uuid = (_item$uuid = item.uuid) !== null && _item$uuid !== void 0 ? _item$uuid : uuid();
127
+ return _objectSpread(_objectSpread({}, item), {}, {
128
+ goodsPrice: goodsPriceKey ? item[goodsPriceKey] : item.goodsPrice
129
+ });
132
130
  });
133
131
  prv.push.apply(prv, _toConsumableArray(goods));
134
132
  return prv;
@@ -162,7 +162,7 @@ var updateKmItemListHandle = function updateKmItemListHandle(list, type, comList
162
162
  items: items
163
163
  };
164
164
  if (type === "logistics") {
165
- params.logisticsCompany = next === null || next === void 0 ? void 0 : next.expressCompanyName;
165
+ params.logisticsCompany = next === null || next === void 0 ? void 0 : next.expressCompanyId;
166
166
  params.logisticsCode = next === null || next === void 0 ? void 0 : next.outSid;
167
167
  } else if (type === "send") {
168
168
  params.sendId = next.warehouseId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "2.0.2-beta.0",
3
+ "version": "2.0.2-beta.10",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "6cdb5286c45bf44211747254faca8cf9cc8712af",
44
+ "gitHead": "021a578860827ffa33212a9d94d659d23687d98f",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }