@kmkf-fe-packages/kmkf-utils 2.10.9-beta.2 → 2.10.9
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 +1 -1
- package/dist/esm/baseAddressData/constants/gyAddressData.js +0 -1
- package/dist/esm/baseAddressData/constants/jkyAddressData.js +0 -1
- package/dist/esm/baseAddressData/constants/jstAddressData.js +0 -1
- package/dist/esm/baseAddressData/constants/wdtAddressData.js +0 -1
- package/dist/esm/constants/constant.d.ts +0 -4
- package/dist/esm/constants/constant.js +1 -5
- package/dist/esm/global.d.ts +0 -6
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.js +0 -2
- package/dist/esm/logisticsAddressData/index.js +1 -3
- package/dist/esm/request/index.js +1 -3
- package/dist/esm/servers/KM/supplierData.js +1 -3
- package/dist/esm/servers/index.d.ts +0 -1
- package/dist/esm/servers/index.js +0 -2
- package/dist/esm/servers/orderSubForm/index.js +3 -4
- package/dist/esm/setSessionStorage/cacheOrderInfo.js +2 -8
- package/dist/esm/utils/SendData.js +2 -5
- package/dist/esm/utils/index.d.ts +1 -3
- package/dist/esm/utils/index.js +0 -2
- package/dist/esm/utils/jkyOrderBackFormValues.js +0 -2
- package/dist/esm/utils/kmOrderBackFormValues.js +1 -6
- package/dist/esm/utils/orderBackFormValues.js +1 -4
- package/dist/esm/utils/unTransField.js +1 -1
- package/dist/esm/utils/wdtOrderBackFormValues.js +0 -1
- package/package.json +2 -2
- package/dist/esm/dxdSuppliersData/index.d.ts +0 -22
- package/dist/esm/dxdSuppliersData/index.js +0 -103
- package/dist/esm/servers/DXD/index.d.ts +0 -3
- package/dist/esm/servers/DXD/index.js +0 -3
- package/dist/esm/servers/DXD/logisticsData.d.ts +0 -6
- package/dist/esm/servers/DXD/logisticsData.js +0 -45
- package/dist/esm/servers/DXD/shopData.d.ts +0 -7
- package/dist/esm/servers/DXD/shopData.js +0 -22
- package/dist/esm/servers/DXD/warehouseData.d.ts +0 -2
- package/dist/esm/servers/DXD/warehouseData.js +0 -27
- package/dist/esm/utils/DxdShopData.d.ts +0 -15
- package/dist/esm/utils/DxdShopData.js +0 -49
- package/dist/esm/utils/dist/gyOrderBackFormValues.js +0 -285
- package/dist/esm/utils/dxdOrderBackFormValues.d.ts +0 -63
- package/dist/esm/utils/dxdOrderBackFormValues.js +0 -384
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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: "关键字",
|
package/dist/esm/global.d.ts
CHANGED
|
@@ -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",
|
package/dist/esm/index.d.ts
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";
|
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,
|
|
@@ -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
|
-
|
|
55
|
-
_context.next = 3;
|
|
54
|
+
_context.next = 2;
|
|
56
55
|
return queryOrderSubFormList(params);
|
|
57
|
-
case
|
|
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
|
|
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
|
|
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
|
}
|
|
@@ -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
|
|
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";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -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.
|
|
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(
|
|
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
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default (function (key) {
|
|
2
|
-
return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "memberLevel", "erpOrderType", "erpOrderStatus", "jstOutboundStatus", "orderRefundType", "executeActionType", "checkbox", "multSelect", "rate", "picture", "pictureProList", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtAftersaleGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtReturnBillNo", "wdtReturnBillSelectIds", "wdtReturnBillShowOrder", "wdtLogisticsCompany", "wdtLogisticsList", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode", "kmSystemShowOrder", "platformAfaterSalesShowOrder", "platformAfaterSalesSelectIds", "bsSystemShowOrder", "bsSystemSelectIds", "bsE3SystemOrderNo", "bsE3SystemShowOrder", "bsE3SystemSelectIds", "bsE3Goods", "bsE3ReissueGoods", "bsE3ReissueType", "reissueLogisticsList", "reissueLogisticsCompany", "reissueLogisticsCode", "deliveryNoList", "deliveryNoIds", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "wlnLogisticsList", "wlnLogisticsCompany", "wlnLogisticsCode", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "wlnSendId", "wlnSendName", "exchangeReason", "flowTag", "returnGoodsStatusList", "returnGoodsStatusValue", "exchangeReason", "exchangeStatusValue", "inStockStatusItemList", "inStockStatusList", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "wdtInStockStatusItemList", "wdtInStockStatusList", "jkyInStockStatusItemList", "jkyInStockStatusList", "jstInStockStatusList", "jstInStockStatusItemList", "wlnInStockStatusItemList", "wlnInStockStatusList", "
|
|
2
|
+
return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "memberLevel", "erpOrderType", "erpOrderStatus", "jstOutboundStatus", "orderRefundType", "executeActionType", "checkbox", "multSelect", "rate", "picture", "pictureProList", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtAftersaleGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtReturnBillNo", "wdtReturnBillSelectIds", "wdtReturnBillShowOrder", "wdtLogisticsCompany", "wdtLogisticsList", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode", "kmSystemShowOrder", "platformAfaterSalesShowOrder", "platformAfaterSalesSelectIds", "bsSystemShowOrder", "bsSystemSelectIds", "bsE3SystemOrderNo", "bsE3SystemShowOrder", "bsE3SystemSelectIds", "bsE3Goods", "bsE3ReissueGoods", "bsE3ReissueType", "reissueLogisticsList", "reissueLogisticsCompany", "reissueLogisticsCode", "deliveryNoList", "deliveryNoIds", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "wlnLogisticsList", "wlnLogisticsCompany", "wlnLogisticsCode", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "wlnSendId", "wlnSendName", "exchangeReason", "flowTag", "returnGoodsStatusList", "returnGoodsStatusValue", "exchangeReason", "exchangeStatusValue", "inStockStatusItemList", "inStockStatusList", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "wdtInStockStatusItemList", "wdtInStockStatusList", "jkyInStockStatusItemList", "jkyInStockStatusList", "jstInStockStatusList", "jstInStockStatusItemList", "wlnInStockStatusItemList", "wlnInStockStatusList", "reissueStatusValue", "reissueReason", "adjustWorkOrderStatusValue", "adjustWorkOrderReason", "msgStatusValues", "msgStatus4Search", "createStatusValue", "createReason", "invoiceStatusValue", "invoiceReason", "invoicingStatusValue", "invoicingReason", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptApiStatusList", "interceptLogisticsApiStatus", "logisticsInterceptSnapshotList", "productList", "subOrderList", "label", "kmSendGood", "kmReturnWarehouse", "kmSendId", "kmSendName", "kmGoods", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "jyGoods", "jySystemOrderNo", "jySystemShowOrder", "jySystemSelectIds", "jySendGood", "jySendId", "jySendName", "jyLogisticsList", "jyLogisticsCompany", "jyLogisticsCode", "jkyGoods", "jkySystemOrderNo", "jkySystemSelectIds", "jkySystemShowOrder", "jkySendGood", "jkySendId", "jkySendName", "jkyLogisticsList", "jkyLogisticsCompany", "jkyLogisticsCode", "kmLogisticsList", "jstGoods", "jstSendGood", "jstReissueType", "jstReissueGoods", "jstSystemOrderNo", "jstLogisticsList", "jstSystemShowOrder", "jstSystemSelectIds", "jstReturnGoods", "jstReturnType", "jstExchangeGoods", "trajectoryApiStatus", "kmReissueGoods", "kmReissueType", "kmReturnGoods", "kmReturnType", "kmExchangeGoods", "kmVideo", "wdtTags", "skxGoods", "skxReturnGoods", "skxLogisticsList", "skxReturnLogistics", "jyReissueGoods", "jyReissueType", "jstAftersaleGoods", "wlnReissueType", "wlnReissueGoods"].reduce(function (cur, nxt) {
|
|
3
3
|
return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
|
|
4
4
|
}, false);
|
|
5
5
|
});
|
|
@@ -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
|
|
3
|
+
"version": "2.10.9",
|
|
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": "
|
|
44
|
+
"gitHead": "2a86cf98f685e6784a6ee41776f4159c0463e76a",
|
|
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,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;
|