@kmkf-fe-packages/kmkf-utils 1.21.11-beta.4 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1 +1 @@
1
- 111226
1
+ 111226
@@ -64,7 +64,6 @@ declare enum TComponentType {
64
64
  BS_DELIVERY_NO = "BS_DELIVERY_NO",
65
65
  BS_SEND_GOOD = "BS_SEND_GOOD",
66
66
  BS_SYSTEM_ORDER = "BS_SYSTEM_ORDER",
67
- KM_SYSTEM_ORDER = "KM_SYSTEM_ORDER",
68
67
  BS_SIGNING_TIME = "BS_SIGNING_TIME",
69
68
  BS_SEND_TIME = "BS_SEND_TIME",
70
69
  BS_TRADE_PAYMENT_TIME = "BS_TRADE_PAYMENT_TIME",
@@ -3,7 +3,6 @@ import AddressData from "../addressData";
3
3
  import BsAddressData from "../bsAddressData";
4
4
  export * as BSE3 from './BSE3';
5
5
  export * as WDT from './WDT';
6
- export * as KM from './KM';
7
6
  export declare const queryWdtAddressData: (instance?: WdtAddressData) => Promise<void>;
8
7
  export declare const queryAddressData: (instance?: AddressData) => Promise<void>;
9
8
  export declare const queryBsAddressData: (instance?: BsAddressData) => Promise<void>;
@@ -8,8 +8,6 @@ import * as _BSE from "./BSE3";
8
8
  export { _BSE as BSE3 };
9
9
  import * as _WDT from "./WDT";
10
10
  export { _WDT as WDT };
11
- import * as _KM from "./KM";
12
- export { _KM as KM };
13
11
  var transformData = function transformData(list) {
14
12
  var map = {};
15
13
  var res = {};
@@ -1,7 +1,6 @@
1
1
  interface OptionsItem {
2
2
  label: string;
3
3
  value: string;
4
- disabled: boolean;
5
4
  }
6
5
  declare type SendGoodPlatform = string;
7
6
  declare class SendData {
@@ -18,6 +17,6 @@ declare class SendData {
18
17
  export declare class SendDataCenter {
19
18
  static instanceMap: Map<SendGoodPlatform, SendData>;
20
19
  static getInstance(platform: SendGoodPlatform): SendData;
21
- static fetchData(): Promise<[void, void]>;
20
+ static fetchData(): Promise<[void]>;
22
21
  }
23
22
  export {};
@@ -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 } from "../servers/index";
11
+ import { BSE3, WDT } from "../servers/index";
12
12
  var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
13
13
  var _this = this;
14
14
  _classCallCheck(this, SendData);
@@ -53,8 +53,7 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
53
53
  this.platform = platform;
54
54
  this.service = {
55
55
  bsE3: BSE3,
56
- wdt: WDT,
57
- km: KM
56
+ wdt: WDT
58
57
  }[this.platform];
59
58
  });
60
59
  export var SendDataCenter = /*#__PURE__*/function () {
@@ -67,7 +66,6 @@ export var SendDataCenter = /*#__PURE__*/function () {
67
66
  if (!platform) throw new Error("获取实例需要传入平台类型");
68
67
  if (platform === "WDT_SEND_GOOD") platform = "wdt";
69
68
  if (platform === "BS_E3_SEND_GOOD") platform = "bsE3";
70
- if (platform === "KM_SEND_GOOD") platform = "km";
71
69
  if (!this.instanceMap.has(platform)) {
72
70
  this.instanceMap.set(platform, new SendData(platform));
73
71
  }
@@ -76,7 +74,7 @@ export var SendDataCenter = /*#__PURE__*/function () {
76
74
  }, {
77
75
  key: "fetchData",
78
76
  value: function fetchData() {
79
- return Promise.all([this.getInstance("wdt").fetchData(), this.getInstance("km").fetchData()
77
+ return Promise.all([this.getInstance("wdt").fetchData()
80
78
  // this.getInstance("bsE3").fetchData()
81
79
  ]);
82
80
  }
@@ -52,15 +52,15 @@ var getExpression = function getExpression(condition, l, r) {
52
52
  var _intersection3, _intersection4;
53
53
  return Array.isArray(l) ? ((_intersection3 = intersection(r, l)) === null || _intersection3 === void 0 ? void 0 : _intersection3.length) > 0 : ((_intersection4 = intersection(r, [l])) === null || _intersection4 === void 0 ? void 0 : _intersection4.length) > 0;
54
54
  }
55
- if (condition === 'ARRAY_OBJECT_INCLUDE') {
56
- var _intersection5;
57
- return ((_intersection5 = intersection(extractPrimitiveValues(l), r)) === null || _intersection5 === void 0 ? void 0 : _intersection5.length) > 0;
58
- }
59
55
  if (condition === 'NINCLUDE') {
60
- var _intersection6, _intersection7;
61
- var _include = Array.isArray(l) ? ((_intersection6 = intersection(r, l)) === null || _intersection6 === void 0 ? void 0 : _intersection6.length) > 0 : ((_intersection7 = intersection(r, [l])) === null || _intersection7 === void 0 ? void 0 : _intersection7.length) > 0;
56
+ var _intersection5, _intersection6;
57
+ var _include = Array.isArray(l) ? ((_intersection5 = intersection(r, l)) === null || _intersection5 === void 0 ? void 0 : _intersection5.length) > 0 : ((_intersection6 = intersection(r, [l])) === null || _intersection6 === void 0 ? void 0 : _intersection6.length) > 0;
62
58
  return !_include;
63
59
  }
60
+ if (condition === 'ARRAY_OBJECT_INCLUDE') {
61
+ var _intersection7;
62
+ return ((_intersection7 = intersection(extractPrimitiveValues(l), r)) === null || _intersection7 === void 0 ? void 0 : _intersection7.length) > 0;
63
+ }
64
64
  return false;
65
65
  };
66
66
  export default getExpression;
@@ -7,11 +7,10 @@ export { default as getExpression } from "./getExpression";
7
7
  export { default as formatDisplayConfig } from "./formatDisplayConfig";
8
8
  export { default as orderBackFormValues } from "./orderBackFormValues";
9
9
  export { bsOrderBackFormValues, bsOrderTransform, } from "./bsOrderBackFormValues";
10
- export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, } from "./bsE3OrderBackFormValues";
10
+ export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, } from './bsE3OrderBackFormValues';
11
11
  export { wlnOrderBackFormValues, wlnOrderTransform, } from "./wlnOrderBackFormValues";
12
12
  export { wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle, } from "./wdtOrderBackFormValues";
13
13
  export { default as jstOrderBackFormValues } from "./jstOrderBackFormValues";
14
- export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders, } from "./kmOrderBackFormValues";
15
14
  export { default as uuid } from "./getUUid";
16
15
  export * as filterFn from "./filterFn";
17
16
  export * as templateFn from "./template";
@@ -11,7 +11,6 @@ export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, fil
11
11
  export { wlnOrderBackFormValues, wlnOrderTransform } from "./wlnOrderBackFormValues";
12
12
  export { wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle } from "./wdtOrderBackFormValues";
13
13
  export { default as jstOrderBackFormValues } from "./jstOrderBackFormValues";
14
- export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders } from "./kmOrderBackFormValues";
15
14
  export { default as uuid } from "./getUUid";
16
15
  import * as _filterFn from "./filterFn";
17
16
  export { _filterFn as filterFn };
@@ -9,7 +9,6 @@ import ExpressData from "../expressData";
9
9
  import ExpressInterceptData from "../expressInterceptData";
10
10
  import AddressData from "../addressData";
11
11
  import isNull from "./isNull";
12
- import { kmOrderBackFormValues } from "./kmOrderBackFormValues";
13
12
  import { bsOrderBackFormValues } from "./bsOrderBackFormValues";
14
13
  import { wlnOrderBackFormValues } from "./wlnOrderBackFormValues";
15
14
  import jstOrderBackFormValues from "./jstOrderBackFormValues";
@@ -228,7 +227,6 @@ export default (function (_ref) {
228
227
  var wlnValues = wlnOrderBackFormValues(detail["wlnOrder"], templateDetail);
229
228
  var wdtValues = wdtOrderBackFormValues(detail["wdtOrder"], templateDetail);
230
229
  var bsE3Values = bsE3OrderBackFormValues(detail["bsE3Order"], templateDetail);
231
- var kmValues = kmOrderBackFormValues(detail["kmOrder"], templateDetail);
232
230
  console.log('bsE3Values', bsE3Values);
233
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues);
231
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values);
234
232
  });
@@ -1,5 +1,5 @@
1
1
  export default (function (key) {
2
- return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "checkbox", "multSelect", "rate", "picture", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtLogisticsCompany", "wdtLogisticsList", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode", 'kmSystemShowOrder', "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", "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", "label", "kmSendGood", "kmSendId", "kmSendName"].reduce(function (cur, nxt) {
2
+ return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "checkbox", "multSelect", "rate", "picture", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtLogisticsCompany", "wdtLogisticsList", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode", "bsSystemShowOrder", "bsSystemSelectIds", "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", "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", "label", "kmSendGood", "kmSendId", "kmSendName"].reduce(function (cur, nxt) {
3
3
  return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
4
4
  }, false);
5
5
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "1.21.11-beta.4",
3
+ "version": "1.22.0",
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": "77b80fc40a3c4ab6673b5a4d68cd91e5d6e9f9d8",
44
+ "gitHead": "71df1a3bb82c29f2f459f69c5a61c14f1671ccff",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }
@@ -1 +0,0 @@
1
- export * from './warehouseData';
@@ -1 +0,0 @@
1
- export * from "./warehouseData";
@@ -1,7 +0,0 @@
1
- declare type WarehouseType = {
2
- disabled: boolean;
3
- label: string;
4
- value: string;
5
- };
6
- export declare const getWarehouseDataAsync: () => Promise<WarehouseType[]>;
7
- export default getWarehouseDataAsync;
@@ -1,27 +0,0 @@
1
- import request from "../../request";
2
- var queryWarehouseList = function queryWarehouseList() {
3
- return request({
4
- url: "/qy/gdfw/kmErp/erp/warehouseList",
5
- method: "post",
6
- data: {}
7
- });
8
- };
9
- export var getWarehouseDataAsync = function getWarehouseDataAsync() {
10
- return queryWarehouseList().then(function (data) {
11
- var _data$data;
12
- var warehouses = (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.warehouses) || [];
13
- var list = [];
14
- warehouses.map(function (_ref) {
15
- var code = _ref.code,
16
- name = _ref.name,
17
- status = _ref.status;
18
- list.push({
19
- label: name,
20
- value: code,
21
- disabled: status === 0
22
- });
23
- });
24
- return list;
25
- });
26
- };
27
- export default getWarehouseDataAsync;
@@ -1,92 +0,0 @@
1
- export declare const kmOrderBackFormValues: (detail?: any, templateDetail?: any) => any;
2
- declare const KM_ORDER_TYPE_MAP: {
3
- "0": string;
4
- "1": string;
5
- "3": string;
6
- "4": string;
7
- "6": string;
8
- "7": string;
9
- "8": string;
10
- "9": string;
11
- "10": string;
12
- "11": string;
13
- "12": string;
14
- "13": string;
15
- "14": string;
16
- "16": string;
17
- "17": string;
18
- "18": string;
19
- "19": string;
20
- "20": string;
21
- "21": string;
22
- "22": string;
23
- "23": string;
24
- "24": string;
25
- "25": string;
26
- "33": string;
27
- "34": string;
28
- "35": string;
29
- "36": string;
30
- "50": string;
31
- "51": string;
32
- "53": string;
33
- "54": string;
34
- "55": string;
35
- "56": string;
36
- "57": string;
37
- "58": string;
38
- "60": string;
39
- "61": string;
40
- "62": string;
41
- "66": string;
42
- "99": string;
43
- };
44
- export declare const getKmOrderTypeValue: (key: keyof typeof KM_ORDER_TYPE_MAP) => string;
45
- declare const KM_ORDER_STATUS: {
46
- WAIT_AUDIT: string;
47
- WAIT_FINANCE_AUDIT: string;
48
- WAIT_MANUAL_AUDIT: string;
49
- FINISHED_AUDIT: string;
50
- WAIT_EXPRESS_PRINT: string;
51
- SYS_STATUS_WAIT_DELIVERY_PRINT: string;
52
- WAIT_PACKAGE: string;
53
- WAIT_WEIGHT: string;
54
- WAIT_SEND_GOODS: string;
55
- WAIT_DEST_SEND_GOODS: string;
56
- SELLER_SEND_GOODS: string;
57
- FINISHED: string;
58
- CLOSED: string;
59
- CANCEL: string;
60
- };
61
- export declare const KM_SYSTEM_ORDER_CONFIG: {
62
- key: string;
63
- name: string;
64
- selectId: string;
65
- columns: ({
66
- dataIndex: string;
67
- title: string;
68
- width: number;
69
- render?: undefined;
70
- } | {
71
- dataIndex: string;
72
- title: string;
73
- width: number;
74
- render: (val: keyof typeof KM_ORDER_STATUS) => string;
75
- } | {
76
- dataIndex: string;
77
- title: string;
78
- width: number;
79
- render: (val: string[]) => string;
80
- })[];
81
- };
82
- export declare const filterKmOrders: (detail: any, order_no: string) => any;
83
- export declare const kmOrderTransform: (detail: any, form: any) => {
84
- kmSystemOrder: {
85
- orderNo: any;
86
- orders: any;
87
- selectIds: any;
88
- showOrderInfo: any;
89
- };
90
- kmSendGood: any;
91
- };
92
- export {};
@@ -1,256 +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
- export var kmOrderBackFormValues = function kmOrderBackFormValues() {
8
- var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
9
- var templateDetail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10
- return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
11
- var uniqueKey = next.uniqueKey;
12
- var config = next.componentConfig;
13
- switch (next.workOrderComponentType) {
14
- case "KM_SYSTEM_ORDER":
15
- prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.kmSystemOrder;
16
- break;
17
- case "KM_SEND_GOOD":
18
- prv[uniqueKey] = updateKmItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.wdtSendGood, "send", config);
19
- }
20
- return prv;
21
- }, {});
22
- };
23
- var KM_ORDER_TYPE_MAP = {
24
- "0": "普通订单",
25
- "1": "货到付款",
26
- "3": "平台订单",
27
- "4": "线下订单",
28
- "6": "预售订单",
29
- "7": "合并订单",
30
- "8": "拆分订单",
31
- "9": "加急订单",
32
- "10": "空包订单",
33
- "11": "合单提示",
34
- "12": "门店订单",
35
- "13": "换货订单",
36
- "14": "补发订单",
37
- "16": "海外仓订单",
38
- "17": "Lazada",
39
- "18": "报损单",
40
- "19": "领用单",
41
- "20": "调整单",
42
- "21": "客户订单",
43
- "22": "天猫直送",
44
- "23": "平台预售",
45
- "24": "京东直发",
46
- "25": "京东供销",
47
- "33": "分销订单",
48
- "34": "供销订单",
49
- "35": "京配订单",
50
- "36": "平台分销",
51
- "50": "天猫淘宝店铺预售",
52
- "51": "抖音厂商代发",
53
- "53": "亚马逊FBA",
54
- "54": "亚马逊FBM",
55
- "55": "亚马逊多渠道",
56
- "56": "奇门订单",
57
- "57": "得物普通现货",
58
- "58": "得物极速现货",
59
- "60": "全款预售",
60
- "61": "得物直发订单",
61
- "62": "Lazada-FBL",
62
- "66": "平台拆单",
63
- "99": "出库单"
64
- };
65
- export var getKmOrderTypeValue = function getKmOrderTypeValue(key) {
66
- return KM_ORDER_TYPE_MAP[key] || key;
67
- };
68
- var KM_ORDER_STATUS = {
69
- WAIT_AUDIT: "待审核",
70
- WAIT_FINANCE_AUDIT: "等待财审",
71
- WAIT_MANUAL_AUDIT: "等待人工审核",
72
- FINISHED_AUDIT: "审核完成",
73
- WAIT_EXPRESS_PRINT: "待打印快递单",
74
- SYS_STATUS_WAIT_DELIVERY_PRINT: "待打印发货单",
75
- WAIT_PACKAGE: "待打包",
76
- WAIT_WEIGHT: "待称重",
77
- WAIT_SEND_GOODS: "待发货",
78
- WAIT_DEST_SEND_GOODS: "待供销商发货",
79
- SELLER_SEND_GOODS: "卖家已发货",
80
- FINISHED: "交易完成",
81
- CLOSED: "交易关闭",
82
- CANCEL: "交易作废"
83
- };
84
- export var KM_SYSTEM_ORDER_CONFIG = {
85
- key: 'kmSystemShowOrder',
86
- name: 'km',
87
- selectId: 'kmSystemSelectIds',
88
- columns: [{
89
- dataIndex: 'billType',
90
- title: '订单类型',
91
- width: 150,
92
- render: function render(val) {
93
- var types = typeof val === 'string' ? val.split(',') : Array.isArray(val) ? val : [val];
94
- return types.map(getKmOrderTypeValue).join(',');
95
- }
96
- }, {
97
- dataIndex: 'billNo',
98
- title: '系统订单号',
99
- width: 160
100
- }, {
101
- dataIndex: 'sysStatus',
102
- title: '订单系统状态',
103
- width: 150,
104
- render: function render(val) {
105
- return KM_ORDER_STATUS[val] || val;
106
- }
107
- }, {
108
- dataIndex: 'billTag',
109
- title: '订单标签',
110
- width: 150,
111
- render: function render(val) {
112
- return Array.isArray(val) ? val.join(',') : val;
113
- }
114
- }]
115
- };
116
- var updateKmItemListHandle = function updateKmItemListHandle(list, type, comList, form) {
117
- var _newList;
118
- console.log(" 发货仓数据转换", {
119
- list: list,
120
- type: type
121
- });
122
- if (type === "logistics") {
123
- var _comList$find, _currentCom$component;
124
- 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) {
125
- return item.workOrderComponentType === 'KM_LOGISTICS';
126
- });
127
- var notOrderBack = (currentCom === null || currentCom === void 0 ? void 0 : (_currentCom$component = currentCom.componentConfig) === null || _currentCom$component === void 0 ? void 0 : _currentCom$component.notOrderBack) || false;
128
- if (notOrderBack) {
129
- var _currentValue;
130
- var currentValue = form.getFieldValue(currentCom.uniqueKey);
131
- currentValue = (_currentValue = currentValue) !== null && _currentValue !== void 0 && _currentValue.length ? currentValue : [{
132
- logisticsCode: "",
133
- logisticsCompany: ""
134
- }];
135
- return currentValue;
136
- }
137
- } else if (type === "send") {
138
- var _comList$find2, _currentCom$component2;
139
- 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) {
140
- return item.workOrderComponentType === 'KM_SEND_GOOD';
141
- });
142
- var _notOrderBack = (_currentCom === null || _currentCom === void 0 ? void 0 : (_currentCom$component2 = _currentCom.componentConfig) === null || _currentCom$component2 === void 0 ? void 0 : _currentCom$component2.notOrderBack) || false;
143
- if (_notOrderBack) {
144
- var _currentValue3;
145
- var _currentValue2 = form.getFieldValue(_currentCom.uniqueKey);
146
- _currentValue2 = (_currentValue3 = _currentValue2) !== null && _currentValue3 !== void 0 && _currentValue3.length ? _currentValue2 : [{
147
- sendId: "",
148
- sendName: ""
149
- }];
150
- return _currentValue2;
151
- }
152
- }
153
- var newList = list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
154
- var items = (next.subOrders || []).map(function (t) {
155
- return {
156
- title: (t === null || t === void 0 ? void 0 : t.title) || "",
157
- picUrl: (t === null || t === void 0 ? void 0 : t.imageUrl) || "",
158
- platform: "km",
159
- skuId: (t === null || t === void 0 ? void 0 : t.skuId) || ""
160
- };
161
- });
162
- var params = {
163
- items: items
164
- };
165
- if (type === "logistics") {
166
- // PS: 还没有这个组件,key还不确定
167
- // params.logisticsCompany = next?.logisticsCode
168
- // params.logisticsCode = next?.logisticsNo;
169
- } else if (type === "send") {
170
- params.sendId = next.warehouseId;
171
- // 名字是一个下拉框,最终存的是id,所以这个地方要用warehouseNo反填
172
- params.sendName = next.warehouseId;
173
- }
174
- prv.push(params);
175
- return prv;
176
- }, []);
177
- if (!((_newList = newList) !== null && _newList !== void 0 && _newList.length)) {
178
- switch (type) {
179
- case "logistics":
180
- newList = [{
181
- logisticsCode: ""
182
- }];
183
- break;
184
- case "supply":
185
- newList = [{
186
- supplyId: ""
187
- }];
188
- break;
189
- case "send":
190
- newList = [{
191
- sendId: "",
192
- sendName: ""
193
- }];
194
- break;
195
- }
196
- }
197
- return newList;
198
- };
199
- var updateKmItemListByConfigHandle = function updateKmItemListByConfigHandle(list, type) {
200
- var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
201
- var showField = config.showField;
202
- return list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
203
- if (type === "logistics") {
204
- if (!["logisticsCompany", ""].includes(showField || "")) {
205
- next.logisticsCompany = undefined;
206
- }
207
- if (!["logisticsCode", ""].includes(showField || "")) {
208
- next.logisticsCode = undefined;
209
- }
210
- } else if (type === "send") {
211
- if (!["sendId", "all"].includes(showField || "")) {
212
- next.sendId = undefined;
213
- }
214
- if (!["sendName", "all"].includes(showField || "")) {
215
- next.sendName = undefined;
216
- }
217
- }
218
- prv.push(next);
219
- return prv;
220
- }, []);
221
- };
222
-
223
- // KM 看起来合单也只会返回查询的系统订单号
224
- export var filterKmOrders = function filterKmOrders(detail, order_no) {
225
- return (detail === null || detail === void 0 ? void 0 : detail.orderDetailDtoList) || [];
226
- };
227
-
228
- //km订单信息转换
229
- export var kmOrderTransform = function kmOrderTransform(detail, form) {
230
- var _ref, _detail$orderDetailDt, _ref2;
231
- return {
232
- kmSystemOrder: {
233
- orderNo: detail === null || detail === void 0 ? void 0 : detail.order_no,
234
- orders: (_ref = (detail === null || detail === void 0 ? void 0 : detail.orderDetailDtoList) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
235
- return _objectSpread(_objectSpread({}, item), {}, {
236
- billNo: item.sid,
237
- sysStatus: item.sysStatus,
238
- billType: item.type,
239
- billTag: item.tags
240
- });
241
- }),
242
- selectIds: (detail === null || detail === void 0 ? void 0 : (_detail$orderDetailDt = detail.orderDetailDtoList) === null || _detail$orderDetailDt === void 0 ? void 0 : _detail$orderDetailDt.length) === 1 ? detail === null || detail === void 0 ? void 0 : detail.orderDetailDtoList.map(function (item) {
243
- return item.sid;
244
- }) : [],
245
- showOrderInfo: (_ref2 = (detail === null || detail === void 0 ? void 0 : detail.orderDetailDtoList) || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (item) {
246
- return {
247
- billNo: item.sid,
248
- sysStatus: item.sysStatus,
249
- billType: item.type,
250
- billTag: item.tags
251
- };
252
- })
253
- },
254
- kmSendGood: updateKmItemListHandle(detail === null || detail === void 0 ? void 0 : detail.orderDetailDtoList, "send", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form)
255
- };
256
- };