@kmkf-fe-packages/kmkf-utils 2.2.13-beta.1 → 2.2.13-beta.11

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,2 +1,2 @@
1
1
  1123111
2
- 3
2
+ 30
@@ -5,13 +5,14 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
5
5
  import request from "../../request";
6
6
  var queryJYLogisticsList = function queryJYLogisticsList() {
7
7
  return request({
8
- url: "/qy/gdfw/jy/erp/getLogisticsList",
8
+ url: "/qy/gdfw/jy/erp/logistics/jyList",
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.logisticsList) || [];
25
26
  logisticsList === null || logisticsList === void 0 ? void 0 : logisticsList.map(function (item) {
26
27
  list.push({
27
- label: item.logisticsName,
28
- value: item.logisticsCode
28
+ label: item.globalExpressName,
29
+ value: item.globalExpressCode
29
30
  });
30
31
  });
31
32
  return _context.abrupt("return", list);
@@ -1,5 +1,4 @@
1
1
  declare type WarehouseType = {
2
- disabled: boolean;
3
2
  label: string;
4
3
  value: string;
5
4
  };
@@ -4,7 +4,7 @@ var queryWarehouseList = function queryWarehouseList(_ref) {
4
4
  var pageNo = _ref.pageNo,
5
5
  pageSize = _ref.pageSize;
6
6
  return request({
7
- url: "/qy/gdfw/jy/erp/getWarehouseList",
7
+ url: "/qy/gdfw/jy/erp/warehouse/jyList",
8
8
  method: "post",
9
9
  data: {
10
10
  pageNo: pageNo,
@@ -16,15 +16,13 @@ var queryWarehouseList = function queryWarehouseList(_ref) {
16
16
  export var getWarehouseDataAsync = function getWarehouseDataAsync() {
17
17
  return fetchAll("JY_WAREHOUSE_DATA", queryWarehouseList, function (data) {
18
18
  var list = [];
19
- var warehouses = data || [];
19
+ var warehouses = (data === null || data === void 0 ? void 0 : data.warehouseInfoList) || [];
20
20
  warehouses.map(function (_ref2) {
21
- var code = _ref2.code,
22
- name = _ref2.name,
23
- isDeleted = _ref2.isDeleted;
21
+ var warehouseCode = _ref2.warehouseCode,
22
+ warehouseName = _ref2.warehouseName;
24
23
  list.push({
25
- label: name,
26
- value: code,
27
- disabled: isDeleted
24
+ label: warehouseName,
25
+ value: warehouseCode
28
26
  });
29
27
  });
30
28
  var valueMap = {};
@@ -33,6 +31,9 @@ export var getWarehouseDataAsync = function getWarehouseDataAsync() {
33
31
  });
34
32
 
35
33
  return Object.values(valueMap);
34
+ }, {
35
+ pageNo: 1,
36
+ pageSize: 100
36
37
  });
37
38
  };
38
39
  export default getWarehouseDataAsync;
@@ -50,8 +50,8 @@ export var getIsPlatformCodesIncludeOrderNos = function getIsPlatformCodesInclud
50
50
  export var updateJyGoodsHandle = function updateJyGoodsHandle() {
51
51
  var orders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
52
52
  return orders === null || orders === void 0 ? void 0 : orders.reduce(function (acc, cur) {
53
- if (Array.isArray(cur.details)) {
54
- acc.push.apply(acc, _toConsumableArray(cur.details.map(function (item) {
53
+ if (Array.isArray(cur.subOrderDetails)) {
54
+ acc.push.apply(acc, _toConsumableArray(cur.subOrderDetails.map(function (item) {
55
55
  var _item$uuid;
56
56
  item.canDelete = true;
57
57
  item.uuid = (_item$uuid = item.uuid) !== null && _item$uuid !== void 0 ? _item$uuid : uuid();
@@ -105,26 +105,25 @@ var updateJyItemListHandle = function updateJyItemListHandle(list, type, comList
105
105
  skuId: (t === null || t === void 0 ? void 0 : t.itemCode) || ""
106
106
  };
107
107
  });
108
+ var params = {
109
+ items: items
110
+ };
108
111
  if (type === "logistics") {
109
- // 巨益的单个系统子订单存在拆单,会包含多个物流信息
110
- var deliveryList = ((next === null || next === void 0 ? void 0 : next.deliveryList) || []).map(function (t) {
111
- return {
112
- items: items,
113
- logisticsCompanyName: t === null || t === void 0 ? void 0 : t.expressName,
114
- logisticsCompany: t === null || t === void 0 ? void 0 : t.expressCode,
115
- logisticsCode: t === null || t === void 0 ? void 0 : t.mailNo
116
- };
117
- });
118
- prv.push.apply(prv, _toConsumableArray(deliveryList));
119
- // params.logisticsCompany = next?.expressName;
120
- // params.logisticsCode = next?.mailNo;
112
+ // const deliveryList = (next?.deliveryList || []).map((t: any) => {
113
+ // return {
114
+ // items,
115
+ // logisticsCompanyName: t?.expressName,
116
+ // logisticsCompany: t?.expressCode,
117
+ // logisticsCode: t?.mailNo,
118
+ // };
119
+ // });
120
+ // prv.push(...deliveryList);
121
+ params.logisticsCompany = next === null || next === void 0 ? void 0 : next.logisticId;
122
+ params.logisticsCode = next === null || next === void 0 ? void 0 : next.logisticNo;
121
123
  } else if (type === "send") {
122
- var params = {
123
- items: items
124
- };
125
- params.sendId = next === null || next === void 0 ? void 0 : next.warehouseCode;
124
+ params.sendId = next === null || next === void 0 ? void 0 : next.warehouseId;
126
125
  //下拉框,取id
127
- params.sendName = next === null || next === void 0 ? void 0 : next.warehouseCode;
126
+ params.sendName = next === null || next === void 0 ? void 0 : next.warehouseId;
128
127
  params.sendSnapshotName = next === null || next === void 0 ? void 0 : next.warehouseName;
129
128
  prv.push(params);
130
129
  }
@@ -206,7 +205,7 @@ export var jyOrderTransform = function jyOrderTransform(detail, form) {
206
205
  return item.shopCode;
207
206
  })) === null || _currentTrades$find$c === void 0 ? void 0 : _currentTrades$find$c.shopCode) || null,
208
207
  jyGoods: updateJyGoodsHandle(currentTrades).filter(function (good) {
209
- return !isStrict || !orderNo || getIsPlatformCodesIncludeOrderNos(good.platformCode, orderNo);
208
+ return !isStrict || !orderNo;
210
209
  })
211
210
  },
212
211
  shopCode: (currentTrades === null || currentTrades === void 0 ? void 0 : (_currentTrades$find2 = currentTrades.find) === null || _currentTrades$find2 === void 0 ? void 0 : (_currentTrades$find2$ = _currentTrades$find2.call(currentTrades, function (item) {
@@ -298,7 +297,7 @@ var updateJyItemListByConfigHandle = function updateJyItemListByConfigHandle(lis
298
297
  // 巨益根据订单号请求返回的platformCode会有多个订单号组合在一起的数据 排除其他的,返回当前订单号
299
298
  export var filterJyOrders = function filterJyOrders(trades, order_no) {
300
299
  var currentTrades = (trades || []).filter(function (item) {
301
- return getIsPlatformCodesIncludeOrderNos(item.platformCode, order_no);
300
+ return getIsPlatformCodesIncludeOrderNos(item.tradeId, order_no);
302
301
  });
303
302
  if (currentTrades.length) {
304
303
  return currentTrades;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "2.2.13-beta.1",
3
+ "version": "2.2.13-beta.11",
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": "47dfe63d335ce97d8cec334125f9dc506aa63888",
44
+ "gitHead": "08f751ed4f907685178ea27d4fba6111a4b42f48",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }