@kmkf-fe-packages/kmkf-utils 2.10.9-beta.2 → 2.10.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.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/baseAddressData/constants/gyAddressData.js +0 -1
  3. package/dist/esm/baseAddressData/constants/jkyAddressData.js +0 -1
  4. package/dist/esm/baseAddressData/constants/jstAddressData.js +0 -1
  5. package/dist/esm/baseAddressData/constants/wdtAddressData.js +0 -1
  6. package/dist/esm/constants/constant.d.ts +0 -4
  7. package/dist/esm/constants/constant.js +1 -5
  8. package/dist/esm/global.d.ts +0 -6
  9. package/dist/esm/index.d.ts +0 -2
  10. package/dist/esm/index.js +0 -2
  11. package/dist/esm/logisticsAddressData/index.js +1 -3
  12. package/dist/esm/request/index.js +1 -3
  13. package/dist/esm/servers/KM/supplierData.js +1 -3
  14. package/dist/esm/servers/index.d.ts +0 -1
  15. package/dist/esm/servers/index.js +0 -2
  16. package/dist/esm/servers/orderSubForm/index.js +3 -4
  17. package/dist/esm/setSessionStorage/cacheOrderInfo.js +2 -8
  18. package/dist/esm/utils/SendData.js +2 -5
  19. package/dist/esm/utils/dist/gyOrderBackFormValues.js +0 -1
  20. package/dist/esm/utils/index.d.ts +1 -3
  21. package/dist/esm/utils/index.js +0 -2
  22. package/dist/esm/utils/jkyOrderBackFormValues.js +0 -2
  23. package/dist/esm/utils/kmOrderBackFormValues.js +1 -6
  24. package/dist/esm/utils/orderBackFormValues.js +1 -4
  25. package/dist/esm/utils/wdtOrderBackFormValues.js +0 -1
  26. package/package.json +2 -2
  27. package/dist/esm/dxdSuppliersData/index.d.ts +0 -22
  28. package/dist/esm/dxdSuppliersData/index.js +0 -103
  29. package/dist/esm/servers/DXD/index.d.ts +0 -3
  30. package/dist/esm/servers/DXD/index.js +0 -3
  31. package/dist/esm/servers/DXD/logisticsData.d.ts +0 -6
  32. package/dist/esm/servers/DXD/logisticsData.js +0 -45
  33. package/dist/esm/servers/DXD/shopData.d.ts +0 -7
  34. package/dist/esm/servers/DXD/shopData.js +0 -22
  35. package/dist/esm/servers/DXD/warehouseData.d.ts +0 -2
  36. package/dist/esm/servers/DXD/warehouseData.js +0 -27
  37. package/dist/esm/utils/DxdShopData.d.ts +0 -15
  38. package/dist/esm/utils/DxdShopData.js +0 -49
  39. package/dist/esm/utils/dxdOrderBackFormValues.d.ts +0 -63
  40. package/dist/esm/utils/dxdOrderBackFormValues.js +0 -384
package/README.md CHANGED
@@ -1 +1 @@
1
- 112311111
1
+ 1123111111
@@ -53,7 +53,6 @@ _defineProperty(GyAddressData, "initData", /*#__PURE__*/_asyncToGenerator( /*#__
53
53
  instance = GyAddressData.getInstance();
54
54
  if (!GyAddressData.initSingleton) {
55
55
  GyAddressData.initSingleton = queryGyAddressData().catch(function (e) {
56
- console.warn("init gy data e", e);
57
56
  GyAddressData.initSingleton = null;
58
57
  });
59
58
  }
@@ -53,7 +53,6 @@ _defineProperty(JkyAddressData, "initData", /*#__PURE__*/_asyncToGenerator( /*#_
53
53
  instance = JkyAddressData.getInstance();
54
54
  if (!JkyAddressData.initSingleton) {
55
55
  JkyAddressData.initSingleton = queryJkyAddressData().catch(function (e) {
56
- console.warn("init jst data e", e);
57
56
  JkyAddressData.initSingleton = null;
58
57
  });
59
58
  }
@@ -53,7 +53,6 @@ _defineProperty(JstAddressData, "initData", /*#__PURE__*/_asyncToGenerator( /*#_
53
53
  instance = JstAddressData.getInstance();
54
54
  if (!JstAddressData.initSingleton) {
55
55
  JstAddressData.initSingleton = queryJstAddressData().catch(function (e) {
56
- console.warn("init jst data e", e);
57
56
  JstAddressData.initSingleton = null;
58
57
  });
59
58
  }
@@ -53,7 +53,6 @@ _defineProperty(WdtAddressData, "initData", /*#__PURE__*/_asyncToGenerator( /*#_
53
53
  instance = WdtAddressData.getInstance();
54
54
  if (!WdtAddressData.initSingleton) {
55
55
  WdtAddressData.initSingleton = queryWdtAddressData().catch(function (e) {
56
- console.warn("init wdt data e", e);
57
56
  WdtAddressData.initSingleton = null;
58
57
  });
59
58
  }
@@ -105,10 +105,6 @@ export declare const DATA_SPLIT_COMPONENT_FIELDS_MAP: {
105
105
  JST_REISSUE_GOODS: string[];
106
106
  JKY_SYSTEM_ORDER: string[];
107
107
  PICTURE_PRO: string[];
108
- DXD_SYSTEM_ORDER: string[];
109
- DXD_LOGISTICS: string[];
110
- DXD_GOODS: string[];
111
- DXD_SUPPLIERS: string[];
112
108
  };
113
109
  export declare const SEARCH_OPTIONS: {
114
110
  label: string;
@@ -177,11 +177,7 @@ export var DATA_SPLIT_COMPONENT_FIELDS_MAP = {
177
177
  JST_GOODS: ["jstGoods"],
178
178
  JST_REISSUE_GOODS: ["jstReissueGoods"],
179
179
  JKY_SYSTEM_ORDER: ["jkySystemShowOrder"],
180
- PICTURE_PRO: ["pictureProList"],
181
- DXD_SYSTEM_ORDER: ["dxdSystemShowOrder"],
182
- DXD_LOGISTICS: ["dxdLogisticsList"],
183
- DXD_GOODS: ["dxdGoods"],
184
- DXD_SUPPLIERS: ["dxdSuppliers"]
180
+ PICTURE_PRO: ["pictureProList"]
185
181
  };
186
182
  export var SEARCH_OPTIONS = [{
187
183
  label: "关键字",
@@ -66,12 +66,6 @@ declare enum TComponentType {
66
66
  BS_SEND_GOOD = "BS_SEND_GOOD",
67
67
  BS_SYSTEM_ORDER = "BS_SYSTEM_ORDER",
68
68
  KM_SYSTEM_ORDER = "KM_SYSTEM_ORDER",
69
- DXD_SYSTEM_ORDER = "DXD_SYSTEM_ORDER",
70
- DXD_SEND_GOOD = "DXD_SEND_GOOD",
71
- DXD_LOGISTICS = "DXD_LOGISTICS",
72
- DXD_SHOP = "DXD_SHOP",
73
- DXD_GOODS = "DXD_GOODS",
74
- DXD_SUPPLIERS = "DXD_SUPPLIERS",
75
69
  BS_SIGNING_TIME = "BS_SIGNING_TIME",
76
70
  BS_SEND_TIME = "BS_SEND_TIME",
77
71
  BS_TRADE_PAYMENT_TIME = "BS_TRADE_PAYMENT_TIME",
@@ -1,8 +1,6 @@
1
1
  export { default as ExpressData } from "./expressData";
2
2
  export { default as ExpressInterceptData } from "./expressInterceptData";
3
3
  export { default as PlatData } from "./platData";
4
- export { default as DxdSuppliersData } from "./dxdSuppliersData";
5
- export { DxdShopDataCenter } from "./utils/DxdShopData";
6
4
  export { default as LogisticsAddressData } from "./logisticsAddressData";
7
5
  export { default as LabelData } from "./labelData";
8
6
  export { default as request } from "./request";
package/dist/esm/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  export { default as ExpressData } from "./expressData";
2
2
  export { default as ExpressInterceptData } from "./expressInterceptData";
3
3
  export { default as PlatData } from "./platData";
4
- export { default as DxdSuppliersData } from "./dxdSuppliersData";
5
- export { DxdShopDataCenter } from "./utils/DxdShopData";
6
4
  export { default as LogisticsAddressData } from "./logisticsAddressData";
7
5
  export { default as LabelData } from "./labelData";
8
6
  export { default as request } from "./request";
@@ -20,9 +20,7 @@ var logisticsAddressData = /*#__PURE__*/function () {
20
20
  }).then(function (res) {
21
21
  var data = res.data;
22
22
  _this.addressData = data;
23
- }).catch(function (e) {
24
- console.log(e);
25
- });
23
+ }).catch(function (e) {});
26
24
  });
27
25
  _defineProperty(this, "getAddressData", function () {
28
26
  var _this$addressData;
@@ -17,9 +17,7 @@ var showErrorMessage = function showErrorMessage(res, options) {
17
17
  message.warning(msg);
18
18
  } else if (infoLevel === "error") {
19
19
  message.error(msg);
20
- } else {
21
- console.error(msg, res, options);
22
- }
20
+ } else {}
23
21
  };
24
22
  var requestApi = function requestApi(_ref) {
25
23
  var url = _ref.url,
@@ -70,9 +70,7 @@ export var getSupplierSingleton = /*#__PURE__*/function () {
70
70
  });
71
71
  });
72
72
  }
73
- }).catch(function (err) {
74
- console.error(err);
75
- });
73
+ }).catch(function (err) {});
76
74
  }));
77
75
  case 8:
78
76
  return _context.abrupt("return", supplierMap);
@@ -10,7 +10,6 @@ export * as WLN from "./WLN";
10
10
  export * as orderSubForm from "./orderSubForm";
11
11
  export * as SKX from "./SKX";
12
12
  export * as JKY from "./JKY";
13
- export * as DXD from "./DXD";
14
13
  export * from "./workOrder";
15
14
  export * from "./constants";
16
15
  export declare const queryWdtAddressData: (instance?: WdtAddressData) => Promise<void>;
@@ -23,8 +23,6 @@ import * as _SKX from "./SKX";
23
23
  export { _SKX as SKX };
24
24
  import * as _JKY from "./JKY";
25
25
  export { _JKY as JKY };
26
- import * as _DXD from "./DXD";
27
- export { _DXD as DXD };
28
26
  export * from "./workOrder";
29
27
  export * from "./constants";
30
28
  var transformData = function transformData(list) {
@@ -51,14 +51,13 @@ export var getOrderSubFormDataAsync = /*#__PURE__*/function () {
51
51
  return _regeneratorRuntime().wrap(function _callee$(_context) {
52
52
  while (1) switch (_context.prev = _context.next) {
53
53
  case 0:
54
- console.log("params", params);
55
- _context.next = 3;
54
+ _context.next = 2;
56
55
  return queryOrderSubFormList(params);
57
- case 3:
56
+ case 2:
58
57
  result = _context.sent;
59
58
  orderSubFormList = (result === null || result === void 0 ? void 0 : result.data) || [];
60
59
  return _context.abrupt("return", orderSubFormList);
61
- case 6:
60
+ case 5:
62
61
  case "end":
63
62
  return _context.stop();
64
63
  }
@@ -14,10 +14,7 @@ export var setCacheOmsOrderInfo = function setCacheOmsOrderInfo(_ref) {
14
14
  var cacheOmsOrderInfo = JSON.parse(sessionStorage.getItem("cacheOmsOrderInfo") || "{}");
15
15
  try {
16
16
  sessionStorage.setItem("cacheOmsOrderInfo", JSON.stringify(_objectSpread(_objectSpread({}, cacheOmsOrderInfo), {}, _defineProperty({}, itemKey, itemValue))));
17
- } catch (e) {
18
- // 数据量过大(超过5MB)时不保存,避免 QuotaExceededError
19
- console.warn("setCacheOmsOrderInfo: 存储空间不足,跳过缓存", e);
20
- }
17
+ } catch (e) {}
21
18
  };
22
19
  export var setCacheOrderInfo = function setCacheOrderInfo(_ref2) {
23
20
  var itemKey = _ref2.itemKey,
@@ -31,8 +28,5 @@ export var setCacheOrderInfo = function setCacheOrderInfo(_ref2) {
31
28
  var cacheOrderInfo = JSON.parse(sessionStorage.getItem("cacheOrderInfo") || "{}");
32
29
  try {
33
30
  sessionStorage.setItem("cacheOrderInfo", JSON.stringify(_objectSpread(_objectSpread(_objectSpread({}, cacheOrderInfo), ext !== null && ext !== void 0 ? ext : {}), {}, _defineProperty({}, itemKey, itemValue))));
34
- } catch (e) {
35
- // 数据量过大(超过5MB)时不保存,避免 QuotaExceededError
36
- console.warn("setCacheOrderInfo: 存储空间不足,跳过缓存", e);
37
- }
31
+ } catch (e) {}
38
32
  };
@@ -8,7 +8,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  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; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  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); }
11
- import { BSE3, WDT, KM, GY, JST, JY, JKY, WLN, DXD } from "../servers/index";
11
+ import { BSE3, WDT, KM, GY, JST, JY, JKY, WLN } from "../servers/index";
12
12
  var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
13
13
  var _this = this;
14
14
  _classCallCheck(this, SendData);
@@ -22,7 +22,6 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
22
22
  case 0:
23
23
  _context.next = 2;
24
24
  return (_this$service = _this.service) === null || _this$service === void 0 ? void 0 : _this$service.getWarehouseDataAsync().then(function (list) {
25
- console.log("发货仓数据---", _this.platform, list);
26
25
  _this.sendData = list;
27
26
  });
28
27
  case 2:
@@ -72,8 +71,7 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
72
71
  jst: JST,
73
72
  jy: JY,
74
73
  jky: JKY,
75
- wln: WLN,
76
- dxd: DXD
74
+ wln: WLN
77
75
  }[this.platform];
78
76
  });
79
77
  export var SendDataCenter = /*#__PURE__*/function () {
@@ -92,7 +90,6 @@ export var SendDataCenter = /*#__PURE__*/function () {
92
90
  if (platform === "JY_SEND_GOOD") platform = "jy";
93
91
  if (platform === "JKY_SEND_GOOD") platform = "jky";
94
92
  if (platform === "WLN_SEND_GOOD") platform = "wln";
95
- if (platform === "DXD_SEND_GOOD") platform = "dxd";
96
93
  if (!this.instanceMap.has(platform)) {
97
94
  this.instanceMap.set(platform, new SendData(platform));
98
95
  }
@@ -151,7 +151,6 @@ exports.gyOrderTransform = function (detail, form) {
151
151
  });
152
152
  var isStrict = gyGoodsCom ? (_a = form.getFieldValue(gyGoodsCom.uniqueKey)) === null || _a === void 0 ? void 0 : _a.isStrict : false;
153
153
  var onlyOneSystemOrder = (currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.length) === 1;
154
- console.log("触发---getGyOrderList--4");
155
154
  return {
156
155
  gySystemOrder: {
157
156
  orderNo: orderNo,
@@ -13,10 +13,8 @@ export { BS_SYSTEM_ORDER_CONFIG, bsOrderBackFormValues, bsOrderTransform, } from
13
13
  export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_SYSTEM_ORDER_CONFIG, } from "./bsE3OrderBackFormValues";
14
14
  export { WLN_SYSTEM_ORDER_CONFIG, wlnOrderBackFormValues, wlnOrderTransform, updateWlnGoodsHandle, } from "./wlnOrderBackFormValues";
15
15
  export { WDT_RETURN_BILL_NO_CONFIG, WDT_SYSTEM_ORDER_CONFIG, wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle, updateWdtAftersaleGoodsHandle, tradeStatusMap, } from "./wdtOrderBackFormValues";
16
- export { DXD_SYSTEM_ORDER_CONFIG } from "./dxdOrderBackFormValues";
17
- export { dxdOrderBackFormValues, dxdOrderTransform, updateDxdGoodsHandle, } from "./dxdOrderBackFormValues";
18
16
  export * from "./jstOrderBackFormValues";
19
- export * from "./platformAfterSalesOrderBackFormValues";
17
+ export * from './platformAfterSalesOrderBackFormValues';
20
18
  export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders, updateKmGoodsHandle, handleKmAddressIdentify, kmSkuTypeMap, KM_ORDER_TYPE_MAP, KM_ORDER_STATUS, } from "./kmOrderBackFormValues";
21
19
  export { getIsPlatformCodesIncludeOrderNos, GY_DELIVERY_STATE_MAPPING, GY_SYSTEM_ORDER_CONFIG, updateGyGoodsHandle, gyOrderTransform, gyOrderBackFormValues, filterGyOrders, } from "./gyOrderBackFormValues";
22
20
  export { filterJyOrders, jyOrderBackFormValues, jyOrderTransform, updateJyGoodsHandle, JY_SYSTEM_ORDER_CONFIG, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, } from "./jyOrderBackFormValues";
@@ -13,8 +13,6 @@ export { BS_SYSTEM_ORDER_CONFIG, bsOrderBackFormValues, bsOrderTransform } from
13
13
  export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_SYSTEM_ORDER_CONFIG } from "./bsE3OrderBackFormValues";
14
14
  export { WLN_SYSTEM_ORDER_CONFIG, wlnOrderBackFormValues, wlnOrderTransform, updateWlnGoodsHandle } from "./wlnOrderBackFormValues";
15
15
  export { WDT_RETURN_BILL_NO_CONFIG, WDT_SYSTEM_ORDER_CONFIG, wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle, updateWdtAftersaleGoodsHandle, tradeStatusMap } from "./wdtOrderBackFormValues";
16
- export { DXD_SYSTEM_ORDER_CONFIG } from "./dxdOrderBackFormValues";
17
- export { dxdOrderBackFormValues, dxdOrderTransform, updateDxdGoodsHandle } from "./dxdOrderBackFormValues";
18
16
  // export { default as jstOrderBackFormValues } from "./jstOrderBackFormValues";
19
17
  export * from "./jstOrderBackFormValues";
20
18
  export * from "./platformAfterSalesOrderBackFormValues";
@@ -286,7 +286,6 @@ var updateJkyItemListHandle = function updateJkyItemListHandle(list, type, comLi
286
286
  logisticCode: next === null || next === void 0 ? void 0 : next.logisticCode,
287
287
  logisticNo: next === null || next === void 0 ? void 0 : next.mainPostid
288
288
  }];
289
- console.log("packageDetailList", next, next.logisticCode, packageDetailList);
290
289
  var packageDetails = (packageDetailList || []).map(function (t) {
291
290
  return {
292
291
  items: items,
@@ -295,7 +294,6 @@ var updateJkyItemListHandle = function updateJkyItemListHandle(list, type, comLi
295
294
  logisticsCode: t === null || t === void 0 ? void 0 : t.logisticNo
296
295
  };
297
296
  });
298
- console.log("packageDetails", packageDetails);
299
297
  prv.push.apply(prv, _toConsumableArray(packageDetails));
300
298
  } else if (type === "send") {
301
299
  var params = {
@@ -327,7 +327,7 @@ var updateKmItemListHandle = function updateKmItemListHandle(list, type, comList
327
327
  title: (t === null || t === void 0 ? void 0 : t.sysTitle) || (t === null || t === void 0 ? void 0 : t.sysSkuPropertiesName) || "",
328
328
  picUrl: (t === null || t === void 0 ? void 0 : t.imageUrl) || "",
329
329
  platform: "km",
330
- skuId: (t === null || t === void 0 ? void 0 : t.sysItemOuterId) || ""
330
+ skuId: (t === null || t === void 0 ? void 0 : t.sysOuterId) || ""
331
331
  };
332
332
  });
333
333
  var params = {
@@ -415,10 +415,6 @@ export var kmOrderTransform = function kmOrderTransform(detail, form) {
415
415
  var isStrict = kmGoodsCom ? (_form$getFieldValue = form.getFieldValue(kmGoodsCom.uniqueKey)) === null || _form$getFieldValue === void 0 ? void 0 : _form$getFieldValue.isStrict : false;
416
416
  var onlyOneSystemOrder = (trades === null || trades === void 0 ? void 0 : trades.length) === 1;
417
417
  var isReissueDefaultSelect = !!(kmReissueCom !== null && kmReissueCom !== void 0 && (_kmReissueCom$compone = kmReissueCom.componentConfig) !== null && _kmReissueCom$compone !== void 0 && _kmReissueCom$compone.showDefaultSelect);
418
- console.log("kmOrderTransform---", {
419
- detail: detail,
420
- componentList: componentList
421
- });
422
418
  var kmGoodsOrderBackGoodsLevel = (_componentList$find = componentList.find(function (item) {
423
419
  return item.workOrderComponentType === "KM_GOODS";
424
420
  })) === null || _componentList$find === void 0 ? void 0 : (_componentList$find$c = _componentList$find.componentConfig) === null || _componentList$find$c === void 0 ? void 0 : _componentList$find$c.orderBackGoodsLevel;
@@ -448,7 +444,6 @@ export var kmOrderTransform = function kmOrderTransform(detail, form) {
448
444
  var shouldOrderBackSelectedGoods = !!matchedSystemOrders.length || onlyOneSystemOrder;
449
445
  if (shouldOrderBackSelectedGoods && selectedSystemOrders.length && kmReissueGoodsComponent && kmReissueGoodsComponentInitReason === "1" && (postingComponent === null || postingComponent === void 0 ? void 0 : (_postingComponent$com = postingComponent.componentConfig) === null || _postingComponent$com === void 0 ? void 0 : _postingComponent$com.showField) === "km") {
450
446
  kmPosting = handleKmAddressIdentify(selectedSystemOrders[0]);
451
- console.log("kmPosting", kmPosting);
452
447
  }
453
448
  return {
454
449
  kmSystemOrderNo: selectedSystemOrderNo,
@@ -21,7 +21,6 @@ import { jyOrderBackFormValues } from "./jyOrderBackFormValues";
21
21
  import { skxOrderBackFormValues } from "./skxOrderBackFormValues";
22
22
  import { skxReturnOrderBackFormValues } from "./skxReturnOrderBackFormValues";
23
23
  import { jkyOrderBackFormValues } from "./jkyOrderBackFormValues";
24
- import { dxdOrderBackFormValues } from "./dxdOrderBackFormValues";
25
24
  import { pushGyLog } from "../utils";
26
25
 
27
26
  // 淘宝商品组件信息处理
@@ -291,13 +290,11 @@ export default (function (_ref) {
291
290
  var jyValues = detail["jyOrder"] ? jyOrderBackFormValues(detail["jyOrder"], templateDetail) : {};
292
291
  var gyValues = detail["gyOrder"] ? gyOrderBackFormValues(detail["gyOrder"], templateDetail) : {};
293
292
  var jkyValues = detail["jkyOrder"] ? jkyOrderBackFormValues(detail["jkyOrder"], templateDetail) : {};
294
- var dxdValues = detail["dxdOrder"] ? dxdOrderBackFormValues(detail["dxdOrder"], templateDetail) : {};
295
- console.log("jkyValues", detail, jkyValues);
296
293
  //不判断是否存在detail["skxOrder"],不存在直接清空所有skx相关组件值
297
294
  var skxValues = detail["skxOrder"] ? skxOrderBackFormValues(detail["skxOrder"], templateDetail) : {};
298
295
  var skxReturnValues = detail["skxReturnOrder"] ? skxReturnOrderBackFormValues(detail["skxReturnOrder"], templateDetail) : {};
299
296
  pushGyLog("gyValues", gyValues);
300
297
  // console.log("bsE3Values", bsE3Values);
301
298
 
302
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), afterSalesValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues), gyValues), jyValues), skxValues), skxReturnValues), jkyValues), dxdValues);
299
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), afterSalesValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues), gyValues), jyValues), skxValues), skxReturnValues), jkyValues);
303
300
  });
@@ -473,7 +473,6 @@ export var wdtOrderBackFormValues = function wdtOrderBackFormValues() {
473
473
  case "WDT_RETURN_BILL_NO":
474
474
  {
475
475
  if (config.orderBackRule === "platformOrderNumber") {
476
- console.log("4343434");
477
476
  prv[uniqueKey] = (detail === null || detail === void 0 ? void 0 : detail.wdtReturnSystemOrder) || [];
478
477
  }
479
478
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "2.10.9-beta.2",
3
+ "version": "2.10.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": "dac375113d0fa85fd02bf62d03604d4ffb1b486e",
44
+ "gitHead": "a914d8cc8eaff540f93b34e02fc854178bb47aaf",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }
@@ -1,22 +0,0 @@
1
- interface SupplierOption {
2
- label: string;
3
- value: string;
4
- }
5
- /**
6
- * 大希地供应商数据存储(单例):仿照 ExpressData 的单例 + 存储模式,
7
- * 自带 fetchData 拉 /qy/open/suppliers,组装成两个数据:
8
- * 1. supplierOptions —— 所有供应商下拉 options(label=supplierName, value=supplierCode)
9
- * 2. skuCodeSupplierMap —— skuCode -> 该 skuCode 对应的供应商 options(多个供应商含同一 skuCode 时合并)
10
- */
11
- declare class DxdSuppliersData {
12
- private static instance;
13
- supplierOptions: SupplierOption[];
14
- skuCodeSupplierMap: Record<string, SupplierOption[]>;
15
- codeToNameMap: Record<string, string>;
16
- static getInstance(): DxdSuppliersData;
17
- fetchData: () => Promise<void>;
18
- getSupplierOptions: () => SupplierOption[];
19
- getSuppliersBySkuCode: (skuCode: string) => SupplierOption[];
20
- getSupplierNameByCode: (code: string, returnCurrentValue?: boolean) => string;
21
- }
22
- export default DxdSuppliersData;
@@ -1,103 +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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
- 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); } }
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
- 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; }
9
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
- 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); }
11
- import request from "../request";
12
- /**
13
- * 大希地供应商数据存储(单例):仿照 ExpressData 的单例 + 存储模式,
14
- * 自带 fetchData 拉 /qy/open/suppliers,组装成两个数据:
15
- * 1. supplierOptions —— 所有供应商下拉 options(label=supplierName, value=supplierCode)
16
- * 2. skuCodeSupplierMap —— skuCode -> 该 skuCode 对应的供应商 options(多个供应商含同一 skuCode 时合并)
17
- */
18
- var DxdSuppliersData = /*#__PURE__*/function () {
19
- function DxdSuppliersData() {
20
- var _this = this;
21
- _classCallCheck(this, DxdSuppliersData);
22
- _defineProperty(this, "supplierOptions", []);
23
- _defineProperty(this, "skuCodeSupplierMap", {});
24
- _defineProperty(this, "codeToNameMap", {});
25
- _defineProperty(this, "fetchData", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
26
- var _res$data, res, suppliers, supplierOptions, skuCodeSupplierMap, codeToNameMap;
27
- return _regeneratorRuntime().wrap(function _callee$(_context) {
28
- while (1) switch (_context.prev = _context.next) {
29
- case 0:
30
- _context.prev = 0;
31
- _context.next = 3;
32
- return request({
33
- url: "/qy/gdfw/daxidi/erp/supplier/list",
34
- method: "post",
35
- data: {}
36
- });
37
- case 3:
38
- res = _context.sent;
39
- suppliers = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.suppliers) || [];
40
- supplierOptions = [];
41
- skuCodeSupplierMap = {};
42
- codeToNameMap = {};
43
- suppliers.forEach(function (s) {
44
- var option = {
45
- label: s.supplierName,
46
- value: s.supplierCode
47
- };
48
- supplierOptions.push(option);
49
- codeToNameMap[s.supplierCode] = s.supplierName;
50
- (s.skuCodeList || []).forEach(function (skuCode) {
51
- if (!skuCodeSupplierMap[skuCode]) {
52
- skuCodeSupplierMap[skuCode] = [];
53
- }
54
- // 同一供应商可能对同一 skuCode 重复出现,按 value 去重
55
- if (!skuCodeSupplierMap[skuCode].some(function (o) {
56
- return o.value === option.value;
57
- })) {
58
- skuCodeSupplierMap[skuCode].push(option);
59
- }
60
- });
61
- });
62
- _this.supplierOptions = supplierOptions;
63
- _this.skuCodeSupplierMap = skuCodeSupplierMap;
64
- _this.codeToNameMap = codeToNameMap;
65
- _context.next = 17;
66
- break;
67
- case 14:
68
- _context.prev = 14;
69
- _context.t0 = _context["catch"](0);
70
- console.error("DxdSuppliersData 拉取供应商数据失败", _context.t0);
71
- case 17:
72
- case "end":
73
- return _context.stop();
74
- }
75
- }, _callee, null, [[0, 14]]);
76
- })));
77
- _defineProperty(this, "getSupplierOptions", function () {
78
- return _this.supplierOptions;
79
- });
80
- _defineProperty(this, "getSuppliersBySkuCode", function (skuCode) {
81
- return _this.skuCodeSupplierMap[skuCode] || [];
82
- });
83
- _defineProperty(this, "getSupplierNameByCode", function (code) {
84
- var _this$codeToNameMap$c;
85
- var returnCurrentValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
86
- return (_this$codeToNameMap$c = _this.codeToNameMap[code]) !== null && _this$codeToNameMap$c !== void 0 ? _this$codeToNameMap$c : returnCurrentValue ? code : "";
87
- });
88
- }
89
- _createClass(DxdSuppliersData, null, [{
90
- key: "getInstance",
91
- value: function getInstance() {
92
- if (!DxdSuppliersData.instance) {
93
- DxdSuppliersData.instance = new DxdSuppliersData();
94
- }
95
- return DxdSuppliersData.instance;
96
- }
97
-
98
- // 拉取供应商数据并组装成 supplierOptions + skuCodeSupplierMap
99
- }]);
100
- return DxdSuppliersData;
101
- }();
102
- _defineProperty(DxdSuppliersData, "instance", null);
103
- export default DxdSuppliersData;
@@ -1,3 +0,0 @@
1
- export * from "./logisticsData";
2
- export * from "./warehouseData";
3
- export * from "./shopData";
@@ -1,3 +0,0 @@
1
- export * from "./logisticsData";
2
- export * from "./warehouseData";
3
- export * from "./shopData";
@@ -1,6 +0,0 @@
1
- declare type DxdReturnLogisticsOrderResponse = {
2
- platformOrderNo: string;
3
- };
4
- export declare const getLogisticsDataAsync: () => Promise<any[]>;
5
- export declare const queryReturnLogisticsOrder: (returnLogisticsNo: string) => Promise<import("../../request").serverProps<DxdReturnLogisticsOrderResponse>>;
6
- export default getLogisticsDataAsync;
@@ -1,45 +0,0 @@
1
- import request from "../../request";
2
- export var getLogisticsDataAsync = function getLogisticsDataAsync() {
3
- return request({
4
- url: "/qy/gdfw/daxidi/erp/logistics/list",
5
- method: "get",
6
- data: {}
7
- }).then(function (res) {
8
- var _res$data;
9
- console.log("getLogisticsDataAsync", res);
10
- var list = [];
11
- var logistics = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.logistics) || [];
12
- // DXD 物流按月卡维度返回:同一 logisticsCode 可能对应多个 monthCardNo,
13
- // 故下拉 value 用 monthCardNo(唯一),label 用 monthCardName,并保留 logisticsCode/Name。
14
- logistics.map(function (_ref) {
15
- var logisticsCode = _ref.logisticsCode,
16
- logisticsName = _ref.logisticsName,
17
- cardNo = _ref.cardNo,
18
- cardName = _ref.cardName;
19
- list.push({
20
- label: cardName,
21
- value: cardNo,
22
- expressCode: logisticsCode,
23
- expressName: logisticsName
24
- });
25
- });
26
- var valueMap = {};
27
- list.forEach(function (item) {
28
- valueMap[item.value] = item; // 每次遇到相同的 monthCardNo,更新为最新的对象
29
- });
30
-
31
- return Object.values(valueMap);
32
- });
33
- };
34
-
35
- // DXD 根据退货物流单号查询平台订单号
36
- export var queryReturnLogisticsOrder = function queryReturnLogisticsOrder(returnLogisticsNo) {
37
- return request({
38
- url: "/qy/gdfw/daxidi/erp/return/logistics/order",
39
- method: "post",
40
- data: {
41
- returnLogisticsNo: returnLogisticsNo
42
- }
43
- });
44
- };
45
- export default getLogisticsDataAsync;
@@ -1,7 +0,0 @@
1
- declare type ShopType = {
2
- label: string;
3
- value: string;
4
- disabled: boolean;
5
- };
6
- export declare const getShopDataAsync: () => Promise<ShopType[]>;
7
- export default getShopDataAsync;
@@ -1,22 +0,0 @@
1
- import request from "../../request";
2
- // 大希地店铺列表(/qy/open/shops,无分页,直接返回 shops 数组)
3
- export var getShopDataAsync = function getShopDataAsync() {
4
- return request({
5
- url: "/qy/gdfw/daxidi/erp/shop/list",
6
- method: "get",
7
- data: {}
8
- }).then(function (res) {
9
- var _res$data;
10
- var shops = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.shops) || [];
11
- return shops.map(function (_ref) {
12
- var shopCode = _ref.shopCode,
13
- shopName = _ref.shopName;
14
- return {
15
- label: shopName,
16
- value: shopCode,
17
- disabled: false
18
- };
19
- });
20
- });
21
- };
22
- export default getShopDataAsync;
@@ -1,2 +0,0 @@
1
- export declare const getWarehouseDataAsync: () => Promise<any[]>;
2
- export default getWarehouseDataAsync;
@@ -1,27 +0,0 @@
1
- import request from "../../request";
2
- export var getWarehouseDataAsync = function getWarehouseDataAsync() {
3
- return request({
4
- url: "/qy/gdfw/daxidi/erp/warehouse/list",
5
- method: "get",
6
- data: {}
7
- }).then(function (res) {
8
- var _res$data;
9
- var list = [];
10
- var warehouses = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.warehouses) || [];
11
- warehouses.map(function (_ref) {
12
- var warehouseCode = _ref.warehouseCode,
13
- warehouseName = _ref.warehouseName;
14
- list.push({
15
- label: warehouseName,
16
- value: warehouseCode
17
- });
18
- });
19
- var valueMap = {};
20
- list.forEach(function (item) {
21
- valueMap[item.value] = item; // 每次遇到相同的 code,更新为最新的对象
22
- });
23
-
24
- return Object.values(valueMap);
25
- });
26
- };
27
- export default getWarehouseDataAsync;
@@ -1,15 +0,0 @@
1
- interface OptionsItem {
2
- label: string;
3
- value: string | number;
4
- disabled: boolean;
5
- }
6
- declare class ShopData {
7
- private shopData;
8
- fetchData: () => Promise<void>;
9
- getShopData: () => OptionsItem[];
10
- setShopData: (val: OptionsItem[]) => OptionsItem[];
11
- }
12
- export declare class DxdShopDataCenter {
13
- static getInstance(): ShopData;
14
- }
15
- export {};
@@ -1,49 +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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
- 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); } }
6
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
- 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; }
9
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
- 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); }
11
- import { DXD } from "../servers/index";
12
- var ShopData = /*#__PURE__*/_createClass(function ShopData() {
13
- var _this = this;
14
- _classCallCheck(this, ShopData);
15
- _defineProperty(this, "shopData", []);
16
- _defineProperty(this, "fetchData", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
17
- return _regeneratorRuntime().wrap(function _callee$(_context) {
18
- while (1) switch (_context.prev = _context.next) {
19
- case 0:
20
- _context.next = 2;
21
- return DXD.getShopDataAsync().then(function (list) {
22
- _this.shopData = list;
23
- });
24
- case 2:
25
- case "end":
26
- return _context.stop();
27
- }
28
- }, _callee);
29
- })));
30
- _defineProperty(this, "getShopData", function () {
31
- return _this.shopData;
32
- });
33
- _defineProperty(this, "setShopData", function (val) {
34
- return _this.shopData = val;
35
- });
36
- });
37
- var instance = new ShopData();
38
- export var DxdShopDataCenter = /*#__PURE__*/function () {
39
- function DxdShopDataCenter() {
40
- _classCallCheck(this, DxdShopDataCenter);
41
- }
42
- _createClass(DxdShopDataCenter, null, [{
43
- key: "getInstance",
44
- value: function getInstance() {
45
- return instance;
46
- }
47
- }]);
48
- return DxdShopDataCenter;
49
- }();
@@ -1,63 +0,0 @@
1
- export declare const DXD_SYSTEM_ORDER_CONFIG: {
2
- key: string;
3
- name: string;
4
- selectId: string;
5
- orderNo: string;
6
- columns: ({
7
- dataIndex: string;
8
- title: string;
9
- width: number;
10
- render?: undefined;
11
- renderExport?: undefined;
12
- conditionOptionsSetting?: undefined;
13
- } | {
14
- dataIndex: string;
15
- title: string;
16
- width: number;
17
- render: (val: boolean) => "否" | "是";
18
- renderExport: (val: boolean) => "否" | "是";
19
- conditionOptionsSetting: {
20
- dataType: string;
21
- getOptions: () => {
22
- value: boolean;
23
- label: string;
24
- }[];
25
- };
26
- } | {
27
- dataIndex: string;
28
- title: string;
29
- width: number;
30
- render: (val: boolean) => "否" | "是";
31
- renderExport: (val: boolean) => "否" | "是";
32
- conditionOptionsSetting?: undefined;
33
- })[];
34
- };
35
- export declare const updateDxdGoodsHandle: (orders?: any[], config?: {
36
- canEdit?: boolean;
37
- }) => any[];
38
- export declare const dxdOrderTransform: (detail: any, form: any) => {
39
- dxdSystemOrderNo: any;
40
- dxdSystemOrder: {
41
- isRequest: boolean;
42
- orderNo: any;
43
- orders: any;
44
- selectIds: any;
45
- selectedRows: any;
46
- showOrderInfo: any;
47
- };
48
- dxdGoods: {
49
- isRequest: boolean;
50
- allOrders: any;
51
- orders: any;
52
- systemOrders: any;
53
- orderNo: any;
54
- dxdGoods: any[];
55
- shopCode: any;
56
- shopName: any;
57
- platformOrderNo: any;
58
- };
59
- dxdLogistics: any;
60
- dxdSendGood: any;
61
- shopCode: any;
62
- };
63
- export declare const dxdOrderBackFormValues: (detail?: any, templateDetail?: any) => any;
@@ -1,384 +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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- 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; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- 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); }
7
- import uuid from "./getUUid";
8
- export var DXD_SYSTEM_ORDER_CONFIG = {
9
- key: "dxdSystemShowOrder",
10
- name: "大希地",
11
- selectId: "dxdSystemSelectIds",
12
- orderNo: "dxdSystemOrderNo",
13
- columns: [{
14
- dataIndex: "orderNo",
15
- title: "出库单号",
16
- width: 150
17
- }, {
18
- dataIndex: "warehouseName",
19
- title: "发货仓名称",
20
- width: 150
21
- }, {
22
- dataIndex: "warehouseCode",
23
- title: "发货仓编码",
24
- width: 150
25
- }, {
26
- dataIndex: "monthCardName",
27
- title: "大希地物流公司名称",
28
- width: 180
29
- }, {
30
- dataIndex: "monthCardNo",
31
- title: "大希地物流公司编码",
32
- width: 180
33
- }, {
34
- dataIndex: "logsticsNo",
35
- title: "物流单号",
36
- width: 180
37
- }, {
38
- dataIndex: "logisticsName",
39
- title: "标准快递名称",
40
- width: 180
41
- }, {
42
- dataIndex: "logisticsCode",
43
- title: "标准快递编码",
44
- width: 180
45
- }, {
46
- dataIndex: "coldChain",
47
- title: "是否冷链",
48
- width: 120,
49
- render: function render(val) {
50
- return typeof val === "boolean" ? val ? "是" : "否" : val;
51
- },
52
- renderExport: function renderExport(val) {
53
- return typeof val === "boolean" ? val ? "是" : "否" : val;
54
- },
55
- conditionOptionsSetting: {
56
- dataType: "string",
57
- getOptions: function getOptions() {
58
- return [{
59
- value: true,
60
- label: "是"
61
- }, {
62
- value: false,
63
- label: "否"
64
- }];
65
- }
66
- }
67
- }, {
68
- dataIndex: "split",
69
- title: "是否拆分单",
70
- width: 120,
71
- render: function render(val) {
72
- return typeof val === "boolean" ? val ? "是" : "否" : val;
73
- },
74
- renderExport: function renderExport(val) {
75
- return typeof val === "boolean" ? val ? "是" : "否" : val;
76
- }
77
- }]
78
- };
79
-
80
- // DXD 商品标准化(按 DXD 数据格式:items.skus → 商品列表)
81
- // orders = 平台商品 items,每个 item 含 platformItemId/platformSkuId/packageCode/packageName + skus[]
82
- // 展平 doOrders.skus 为商品列表(...sku 保留所有字段,与反填 dxdOrderTransform 一致)
83
- export var updateDxdGoodsHandle = function updateDxdGoodsHandle() {
84
- var orders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
85
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
86
- return (orders || []).reduce(function (prv, order) {
87
- ((order === null || order === void 0 ? void 0 : order.skus) || []).forEach(function (sku) {
88
- var _sku$uuid;
89
- prv.push(_objectSpread(_objectSpread({}, sku), {}, {
90
- uuid: (_sku$uuid = sku === null || sku === void 0 ? void 0 : sku.uuid) !== null && _sku$uuid !== void 0 ? _sku$uuid : uuid(),
91
- canDelete: true,
92
- canEdit: !!config.canEdit
93
- }));
94
- });
95
- return prv;
96
- }, []);
97
- };
98
-
99
- // 物流/发货仓反填列表处理(参考 KM:检查 notOrderBack + 生成列表)
100
- var updateDxdItemListHandle = function updateDxdItemListHandle(list, type, comList, form) {
101
- var _newList;
102
- if (type === "logistics") {
103
- var _comList$find, _currentCom$component;
104
- var currentCom = comList === null || comList === void 0 ? void 0 : (_comList$find = comList.find) === null || _comList$find === void 0 ? void 0 : _comList$find.call(comList, function (item) {
105
- return item.workOrderComponentType === "DXD_LOGISTICS";
106
- });
107
- var notOrderBack = (currentCom === null || currentCom === void 0 ? void 0 : (_currentCom$component = currentCom.componentConfig) === null || _currentCom$component === void 0 ? void 0 : _currentCom$component.notOrderBack) || false;
108
- if (notOrderBack) {
109
- var _currentValue;
110
- var currentValue = form.getFieldValue(currentCom.uniqueKey);
111
- currentValue = (_currentValue = currentValue) !== null && _currentValue !== void 0 && _currentValue.length ? currentValue : [{
112
- logisticsCode: "",
113
- logisticsCompany: ""
114
- }];
115
- return currentValue;
116
- }
117
- } else if (type === "send") {
118
- var _comList$find2, _currentCom$component2;
119
- var _currentCom = comList === null || comList === void 0 ? void 0 : (_comList$find2 = comList.find) === null || _comList$find2 === void 0 ? void 0 : _comList$find2.call(comList, function (item) {
120
- return item.workOrderComponentType === "DXD_SEND_GOOD";
121
- });
122
- var _notOrderBack = (_currentCom === null || _currentCom === void 0 ? void 0 : (_currentCom$component2 = _currentCom.componentConfig) === null || _currentCom$component2 === void 0 ? void 0 : _currentCom$component2.notOrderBack) || false;
123
- if (_notOrderBack) {
124
- var _currentValue3;
125
- var _currentValue2 = form.getFieldValue(_currentCom.uniqueKey);
126
- _currentValue2 = (_currentValue3 = _currentValue2) !== null && _currentValue3 !== void 0 && _currentValue3.length ? _currentValue2 : [{
127
- sendId: "",
128
- sendName: ""
129
- }];
130
- return _currentValue2;
131
- }
132
- }
133
- var newList = list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
134
- var params = {};
135
- if (type === "logistics") {
136
- params.logisticsCompany = next === null || next === void 0 ? void 0 : next.monthCardNo;
137
- params.logisticsCode = next === null || next === void 0 ? void 0 : next.logsticsNo;
138
- } else if (type === "send") {
139
- params.sendId = next.warehouseCode;
140
- // sendName 是下拉框,最终存的是编码,所以用 warehouseCode 反填
141
- params.sendName = next.warehouseCode;
142
- params.sendSnapshotName = next.warehouseName;
143
- }
144
- prv.push(params);
145
- return prv;
146
- }, []);
147
- if (!((_newList = newList) !== null && _newList !== void 0 && _newList.length)) {
148
- switch (type) {
149
- case "logistics":
150
- newList = [{
151
- logisticsCode: ""
152
- }];
153
- break;
154
- case "send":
155
- newList = [{
156
- sendId: "",
157
- sendName: ""
158
- }];
159
- break;
160
- }
161
- }
162
- return newList;
163
- };
164
-
165
- // 物流/发货仓按 showField 过滤反填字段(参考 KM:只反填组件配置要显示的字段)
166
- var updateDxdItemListByConfigHandle = function updateDxdItemListByConfigHandle(list, type) {
167
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
168
- var showField = config.showField;
169
- return list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
170
- if (type === "logistics") {
171
- if (!["logisticsCompany", ""].includes(showField || "")) {
172
- next.logisticsCompany = undefined;
173
- }
174
- if (!["logisticsCode", ""].includes(showField || "")) {
175
- next.logisticsCode = undefined;
176
- }
177
- } else if (type === "send") {
178
- if (!["sendId", "all"].includes(showField || "")) {
179
- next.sendId = undefined;
180
- }
181
- if (!["sendName", "all"].includes(showField || "")) {
182
- next.sendName = undefined;
183
- next.sendSnapshotName = undefined;
184
- }
185
- }
186
- prv.push(next);
187
- return prv;
188
- }, []);
189
- };
190
-
191
- // DXD 订单数据转换
192
- export var dxdOrderTransform = function dxdOrderTransform(detail, form) {
193
- var _data$doOrders$9, _data$doOrders$10, _data$doOrders$11, _data$doOrders$12, _data$doOrders$13, _data$doOrders$14, _data$doOrders$15, _data$doOrders$16, _data$doOrders$17, _data$doOrders$18;
194
- var _ref = detail || {},
195
- orderNo = _ref.orderNo,
196
- componentList = _ref.componentList,
197
- inputSelectedRows = _ref.selectedRows,
198
- matchLogisticsNo = _ref.matchLogisticsNo;
199
- var data = (detail === null || detail === void 0 ? void 0 : detail.data) || {};
200
- console.log("dxdOrderTransform--", detail);
201
-
202
- // 参考 KM:判断是否只有一个出库订单(用于系统订单组件的默认选中逻辑)
203
- var onlyOneSystemOrder = ((data === null || data === void 0 ? void 0 : data.doOrders) || []).length === 1;
204
-
205
- // 参考 KM/WDT:根据物流单号匹配系统订单
206
- var matchedSystemOrders = matchLogisticsNo ? ((data === null || data === void 0 ? void 0 : data.doOrders) || []).filter(function (item) {
207
- return "".concat((item === null || item === void 0 ? void 0 : item.logisticsNo) || "").trim() === "".concat(matchLogisticsNo).trim();
208
- }) : [];
209
- var matchedSystemOrderIds = matchedSystemOrders.map(function (item) {
210
- return item === null || item === void 0 ? void 0 : item.orderNo;
211
- });
212
-
213
- // 参考 KM kmOrderTransform 第479-493行:
214
- // 1. 如果有匹配的订单(matchLogisticsNo 匹配),使用匹配的订单
215
- // 2. 如果传入了 selectedRows(用户勾选场景),使用传入的 selectedRows
216
- // 3. 如果只有一个订单(初始反填场景),默认选中第一个订单
217
- // 4. 如果有多个订单且未匹配且未传入 selectedRows(初始反填场景),不选中任何订单
218
-
219
- var selectedRows = [];
220
- if (matchedSystemOrders.length > 0) {
221
- // 场景1:根据物流单号匹配到订单
222
- selectedRows = matchedSystemOrders.map(function (order) {
223
- return {
224
- orderNo: order.orderNo,
225
- warehouseCode: order.warehouseCode,
226
- warehouseName: order.warehouseName,
227
- logisticsCode: order.logisticsCode,
228
- logisticsName: order.logisticsName,
229
- coldChain: order.coldChain,
230
- skus: order.skus || [],
231
- billNo: order.orderNo,
232
- billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
233
- };
234
- });
235
- } else if (inputSelectedRows) {
236
- // 场景2:用户手动勾选
237
- selectedRows = inputSelectedRows;
238
- } else if (onlyOneSystemOrder) {
239
- var _data$doOrders$, _data$doOrders$2, _data$doOrders$3, _data$doOrders$4, _data$doOrders$5, _data$doOrders$6, _data$doOrders$7, _data$doOrders$8;
240
- // 场景3:只有一个订单,默认选中
241
- selectedRows = [{
242
- orderNo: data === null || data === void 0 ? void 0 : (_data$doOrders$ = data.doOrders[0]) === null || _data$doOrders$ === void 0 ? void 0 : _data$doOrders$.orderNo,
243
- warehouseCode: data === null || data === void 0 ? void 0 : (_data$doOrders$2 = data.doOrders[0]) === null || _data$doOrders$2 === void 0 ? void 0 : _data$doOrders$2.warehouseCode,
244
- warehouseName: data === null || data === void 0 ? void 0 : (_data$doOrders$3 = data.doOrders[0]) === null || _data$doOrders$3 === void 0 ? void 0 : _data$doOrders$3.warehouseName,
245
- logisticsCode: data === null || data === void 0 ? void 0 : (_data$doOrders$4 = data.doOrders[0]) === null || _data$doOrders$4 === void 0 ? void 0 : _data$doOrders$4.logisticsCode,
246
- logisticsName: data === null || data === void 0 ? void 0 : (_data$doOrders$5 = data.doOrders[0]) === null || _data$doOrders$5 === void 0 ? void 0 : _data$doOrders$5.logisticsName,
247
- coldChain: data === null || data === void 0 ? void 0 : (_data$doOrders$6 = data.doOrders[0]) === null || _data$doOrders$6 === void 0 ? void 0 : _data$doOrders$6.coldChain,
248
- skus: (data === null || data === void 0 ? void 0 : (_data$doOrders$7 = data.doOrders[0]) === null || _data$doOrders$7 === void 0 ? void 0 : _data$doOrders$7.skus) || [],
249
- billNo: data === null || data === void 0 ? void 0 : (_data$doOrders$8 = data.doOrders[0]) === null || _data$doOrders$8 === void 0 ? void 0 : _data$doOrders$8.orderNo,
250
- billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
251
- }];
252
- }
253
- // 场景4:多个订单且未匹配且未手动勾选,selectedRows 为空数组
254
-
255
- // 参考 KM:决定用哪些订单反填商品
256
- var orderBackDoOrders = selectedRows.length > 0 ? ((data === null || data === void 0 ? void 0 : data.doOrders) || []).filter(function (o) {
257
- return selectedRows.some(function (r) {
258
- return r.orderNo === o.orderNo;
259
- });
260
- }) : [];
261
-
262
- // 转换 orderBackDoOrders.skus 为 dxdGoods 格式:展平订单的 skus
263
- var dxdGoods = [];
264
- (orderBackDoOrders || []).forEach(function (order) {
265
- (order.skus || []).forEach(function (sku) {
266
- var _sku$uuid2;
267
- dxdGoods.push(_objectSpread(_objectSpread({}, sku), {}, {
268
- uuid: (_sku$uuid2 = sku === null || sku === void 0 ? void 0 : sku.uuid) !== null && _sku$uuid2 !== void 0 ? _sku$uuid2 : uuid(),
269
- canDelete: true,
270
- canEdit: true
271
- }));
272
- });
273
- });
274
-
275
- // 转换 doOrders(出库订单)为系统订单格式
276
- var dxdSystemOrder = {
277
- isRequest: true,
278
- orderNo: (data === null || data === void 0 ? void 0 : data.platformOrderNo) || orderNo,
279
- orders: ((data === null || data === void 0 ? void 0 : data.doOrders) || []).map(function (order) {
280
- return {
281
- orderNo: order.orderNo,
282
- warehouseCode: order.warehouseCode,
283
- warehouseName: order.warehouseName,
284
- logisticsCode: order.logisticsCode,
285
- logisticsName: order.logisticsName,
286
- coldChain: order.coldChain,
287
- skus: order.skus || [],
288
- billNo: order.orderNo,
289
- billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
290
- };
291
- }),
292
- selectIds: matchedSystemOrderIds.length > 0 ? matchedSystemOrderIds : ((data === null || data === void 0 ? void 0 : data.doOrders) || []).length === 1 ? [data === null || data === void 0 ? void 0 : (_data$doOrders$9 = data.doOrders[0]) === null || _data$doOrders$9 === void 0 ? void 0 : _data$doOrders$9.orderNo] : [],
293
- selectedRows: matchedSystemOrders.length > 0 ? matchedSystemOrders.map(function (order) {
294
- return {
295
- orderNo: order.orderNo,
296
- warehouseCode: order.warehouseCode,
297
- warehouseName: order.warehouseName,
298
- logisticsCode: order.logisticsCode,
299
- logisticsName: order.logisticsName,
300
- coldChain: order.coldChain,
301
- skus: order.skus || [],
302
- billNo: order.orderNo,
303
- billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
304
- };
305
- }) : ((data === null || data === void 0 ? void 0 : data.doOrders) || []).length === 1 ? [{
306
- orderNo: data === null || data === void 0 ? void 0 : (_data$doOrders$10 = data.doOrders[0]) === null || _data$doOrders$10 === void 0 ? void 0 : _data$doOrders$10.orderNo,
307
- warehouseCode: data === null || data === void 0 ? void 0 : (_data$doOrders$11 = data.doOrders[0]) === null || _data$doOrders$11 === void 0 ? void 0 : _data$doOrders$11.warehouseCode,
308
- warehouseName: data === null || data === void 0 ? void 0 : (_data$doOrders$12 = data.doOrders[0]) === null || _data$doOrders$12 === void 0 ? void 0 : _data$doOrders$12.warehouseName,
309
- logisticsCode: data === null || data === void 0 ? void 0 : (_data$doOrders$13 = data.doOrders[0]) === null || _data$doOrders$13 === void 0 ? void 0 : _data$doOrders$13.logisticsCode,
310
- logisticsName: data === null || data === void 0 ? void 0 : (_data$doOrders$14 = data.doOrders[0]) === null || _data$doOrders$14 === void 0 ? void 0 : _data$doOrders$14.logisticsName,
311
- coldChain: data === null || data === void 0 ? void 0 : (_data$doOrders$15 = data.doOrders[0]) === null || _data$doOrders$15 === void 0 ? void 0 : _data$doOrders$15.coldChain,
312
- skus: (data === null || data === void 0 ? void 0 : (_data$doOrders$16 = data.doOrders[0]) === null || _data$doOrders$16 === void 0 ? void 0 : _data$doOrders$16.skus) || [],
313
- billNo: data === null || data === void 0 ? void 0 : (_data$doOrders$17 = data.doOrders[0]) === null || _data$doOrders$17 === void 0 ? void 0 : _data$doOrders$17.orderNo,
314
- billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
315
- }] : [],
316
- showOrderInfo: ((data === null || data === void 0 ? void 0 : data.doOrders) || []).map(function (order) {
317
- return {
318
- orderNo: order.orderNo,
319
- warehouseCode: order.warehouseCode,
320
- warehouseName: order.warehouseName,
321
- logisticsCode: order.logisticsCode,
322
- logisticsName: order.logisticsName,
323
- coldChain: order.coldChain,
324
- skus: order.skus || [],
325
- billNo: order.orderNo,
326
- billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
327
- };
328
- })
329
- };
330
-
331
- // 转换物流信息(检查 notOrderBack;用通用字段名 logisticsCompany/logisticsCode,与 KM/showField 一致)
332
- var dxdLogistics = updateDxdItemListHandle((data === null || data === void 0 ? void 0 : data.doOrders) || [], "logistics", componentList, form);
333
-
334
- // 转换发货信息(sendName 存编码,sendSnapshotName 存名称快照;检查 notOrderBack)
335
- var dxdSendGood = updateDxdItemListHandle((data === null || data === void 0 ? void 0 : data.doOrders) || [], "send", componentList, form);
336
- return {
337
- dxdSystemOrderNo: ((data === null || data === void 0 ? void 0 : data.doOrders) || []).length > 0 ? data === null || data === void 0 ? void 0 : (_data$doOrders$18 = data.doOrders[0]) === null || _data$doOrders$18 === void 0 ? void 0 : _data$doOrders$18.orderNo : null,
338
- dxdSystemOrder: dxdSystemOrder,
339
- dxdGoods: {
340
- isRequest: true,
341
- allOrders: detail === null || detail === void 0 ? void 0 : detail.allOrders,
342
- // DXD 无独立系统订单勾选逻辑,orders 取 allOrders(与 KM_GOODS 结构一致,供选品使用)
343
- orders: (detail === null || detail === void 0 ? void 0 : detail.allOrders) || [],
344
- // systemOrders 用 doOrders(出库订单),供 GoodItem 筛选系统订单商品下拉(allOrders 是 items 平台商品,不含 orderNo)
345
- systemOrders: (data === null || data === void 0 ? void 0 : data.doOrders) || [],
346
- orderNo: orderNo,
347
- dxdGoods: dxdGoods,
348
- shopCode: data === null || data === void 0 ? void 0 : data.shopCode,
349
- shopName: data === null || data === void 0 ? void 0 : data.shopName,
350
- platformOrderNo: data === null || data === void 0 ? void 0 : data.platformOrderNo
351
- },
352
- dxdLogistics: dxdLogistics,
353
- dxdSendGood: dxdSendGood,
354
- shopCode: data === null || data === void 0 ? void 0 : data.shopCode
355
- };
356
- };
357
-
358
- // DXD 订单返填逻辑
359
- export var dxdOrderBackFormValues = function dxdOrderBackFormValues() {
360
- var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
361
- var templateDetail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
362
- return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
363
- var uniqueKey = next.uniqueKey;
364
- var config = next.componentConfig;
365
- switch (next.workOrderComponentType) {
366
- case "DXD_SYSTEM_ORDER":
367
- prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.dxdSystemOrder;
368
- break;
369
- case "DXD_GOODS":
370
- prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.dxdGoods;
371
- break;
372
- case "DXD_LOGISTICS":
373
- prv[uniqueKey] = updateDxdItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.dxdLogistics, "logistics", config);
374
- break;
375
- case "DXD_SEND_GOOD":
376
- prv[uniqueKey] = updateDxdItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.dxdSendGood, "send", config);
377
- break;
378
- case "DXD_SHOP":
379
- prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.shopCode;
380
- break;
381
- }
382
- return prv;
383
- }, {});
384
- };