@kmkf-fe-packages/kmkf-utils 2.0.12-beta.8 → 2.0.15

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
- 1112263331
1
+ 111226333
@@ -1,4 +1,3 @@
1
- export { default as msgTypeCh } from "./msgTypeMapping";
2
1
  export { default as columnsGoodsList } from "./columnsGoodsList";
3
2
  export declare const getMapping: (data: {
4
3
  dataIndex: string;
@@ -6,3 +5,4 @@ export declare const getMapping: (data: {
6
5
  }[]) => {
7
6
  [key: string]: string;
8
7
  };
8
+ export { default as msgTypeCh } from "./msgTypeMapping";
@@ -1,4 +1,3 @@
1
- export { default as msgTypeCh } from "./msgTypeMapping";
2
1
  export { default as columnsGoodsList } from "./columnsGoodsList";
3
2
  export var getMapping = function getMapping(data) {
4
3
  var mapping = {};
@@ -6,4 +5,5 @@ export var getMapping = function getMapping(data) {
6
5
  mapping[item.dataIndex] = item.title;
7
6
  });
8
7
  return mapping;
9
- };
8
+ };
9
+ export { default as msgTypeCh } from "./msgTypeMapping";
@@ -1,2 +1 @@
1
1
  export * from './logisticsData';
2
- export * from './warehouseData';
@@ -1,2 +1 @@
1
- export * from "./logisticsData";
2
- export * from "./warehouseData";
1
+ export * from "./logisticsData";
@@ -3,9 +3,8 @@ export declare function fetchAll<T = any, D = any>(key: string, fetchAction: (pa
3
3
  pageSize: number;
4
4
  }) => Promise<{
5
5
  data?: D;
6
- }>, getList: (data: D) => T[], { pageNo, pageSize, useCache, maxCount }?: {
6
+ }>, getList: (data: D) => T[], { pageNo, pageSize, useCache }?: {
7
7
  pageNo?: number | undefined;
8
8
  pageSize?: number | undefined;
9
9
  useCache?: boolean | undefined;
10
- maxCount?: number | undefined;
11
10
  }): Promise<T[]>;
@@ -12,9 +12,7 @@ export function fetchAll(key, fetchAction, getList) {
12
12
  _ref$pageSize = _ref.pageSize,
13
13
  pageSize = _ref$pageSize === void 0 ? 100 : _ref$pageSize,
14
14
  _ref$useCache = _ref.useCache,
15
- useCache = _ref$useCache === void 0 ? true : _ref$useCache,
16
- _ref$maxCount = _ref.maxCount,
17
- maxCount = _ref$maxCount === void 0 ? 0 : _ref$maxCount;
15
+ useCache = _ref$useCache === void 0 ? true : _ref$useCache;
18
16
  if (!singletonPromiseMap.has(key)) {
19
17
  singletonPromiseMap.set(key, new Promise(function (resolve, reject) {
20
18
  var list = [];
@@ -27,7 +25,7 @@ export function fetchAll(key, fetchAction, getList) {
27
25
  if (res.data) {
28
26
  var newList = getList(res.data);
29
27
  list.push.apply(list, _toConsumableArray(newList));
30
- if (pageSize === newList.length && (!maxCount || maxCount > list.length)) {
28
+ if (pageSize === newList.length) {
31
29
  pagePointer++;
32
30
  fetchList();
33
31
  } else {
@@ -1,6 +1,6 @@
1
1
  interface OptionsItem {
2
2
  label: string;
3
- value: string | number;
3
+ value: string;
4
4
  disabled: boolean;
5
5
  }
6
6
  declare type SendGoodPlatform = string;
@@ -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 } from "../servers/index";
11
+ import { BSE3, WDT, KM, GY } from "../servers/index";
12
12
  var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
13
13
  var _this = this;
14
14
  _classCallCheck(this, SendData);
@@ -56,8 +56,7 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
56
56
  bsE3: BSE3,
57
57
  wdt: WDT,
58
58
  km: KM,
59
- gy: GY,
60
- jst: JST
59
+ gy: GY
61
60
  }[this.platform];
62
61
  });
63
62
  export var SendDataCenter = /*#__PURE__*/function () {
@@ -72,7 +71,6 @@ export var SendDataCenter = /*#__PURE__*/function () {
72
71
  if (platform === "BS_E3_SEND_GOOD") platform = "bsE3";
73
72
  if (platform === "KM_SEND_GOOD") platform = "km";
74
73
  if (platform === "GY_SEND_GOOD") platform = "gy";
75
- if (platform === "JST_SEND_GOOD") platform = "gy";
76
74
  if (!this.instanceMap.has(platform)) {
77
75
  this.instanceMap.set(platform, new SendData(platform));
78
76
  }
@@ -0,0 +1,285 @@
1
+ "use strict";
2
+
3
+ var __assign = this && this.__assign || function () {
4
+ __assign = Object.assign || function (t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ exports.__esModule = true;
14
+ exports.filterGyOrders = exports.gyOrderBackFormValues = exports.gyOrderTransform = exports.updateGyGoodsHandle = exports.GY_SYSTEM_ORDER_CONFIG = void 0;
15
+ var getUUid_1 = require("./getUUid");
16
+ var deliveryStateMap = {
17
+ 0: "未发货",
18
+ 2: "全部发货"
19
+ };
20
+ exports.GY_SYSTEM_ORDER_CONFIG = {
21
+ key: "gySystemShowOrder",
22
+ name: "管易",
23
+ selectId: "gySystemSelectIds",
24
+ columns: [{
25
+ dataIndex: "billType",
26
+ title: "订单类型",
27
+ width: 150
28
+ }, {
29
+ dataIndex: "billNo",
30
+ title: "系统订单号",
31
+ width: 160
32
+ }, {
33
+ dataIndex: "tradeTagName",
34
+ title: "订单标记名称",
35
+ width: 150
36
+ }, {
37
+ dataIndex: "billTag",
38
+ title: "订单标签",
39
+ width: 150
40
+ }, {
41
+ dataIndex: "deliveryState",
42
+ title: "发货状态",
43
+ width: 150
44
+ }]
45
+ };
46
+ exports.updateGyGoodsHandle = function (orders) {
47
+ if (orders === void 0) {
48
+ orders = [];
49
+ }
50
+ return orders === null || orders === void 0 ? void 0 : orders.reduce(function (acc, cur) {
51
+ if (Array.isArray(cur.details)) {
52
+ acc.push.apply(acc, cur.details.map(function (item) {
53
+ var _a;
54
+ item.goodName = item.itemName;
55
+ item.goodShortName = item.itemSimpleName;
56
+ item.goodNo = item.itemCode;
57
+ item.specNo = item.skuCode;
58
+ item.specName = item.skuName;
59
+ item.canDelete = true;
60
+ item.uuid = (_a = item.uuid) !== null && _a !== void 0 ? _a : getUUid_1["default"]();
61
+ return item;
62
+ }));
63
+ }
64
+ return acc;
65
+ }, []);
66
+ };
67
+ var updateGyItemListHandle = function updateGyItemListHandle(list, type, comList, form) {
68
+ var _a, _b;
69
+ if (type === "logistics") {
70
+ //管易物流信息组件先不做
71
+ // const currentCom = comList?.find?.(
72
+ // (item) => item.workOrderComponentType === "GY_LOGISTICS"
73
+ // );
74
+ // const notOrderBack = currentCom?.componentConfig?.notOrderBack || false;
75
+ // if (notOrderBack) {
76
+ // let currentValue = form.getFieldValue(currentCom.uniqueKey);
77
+ // currentValue = currentValue?.length
78
+ // ? currentValue
79
+ // : [{ logisticsCode: "", logisticsCompany: "" }];
80
+ // return currentValue;
81
+ // }
82
+ } else if (type === "send") {
83
+ var currentCom = (_a = comList === null || comList === void 0 ? void 0 : comList.find) === null || _a === void 0 ? void 0 : _a.call(comList, function (item) {
84
+ return item.workOrderComponentType === "GY_SEND_GOOD";
85
+ });
86
+ var notOrderBack = ((_b = currentCom === null || currentCom === void 0 ? void 0 : currentCom.componentConfig) === null || _b === void 0 ? void 0 : _b.notOrderBack) || false;
87
+ if (notOrderBack) {
88
+ var currentValue = form.getFieldValue(currentCom.uniqueKey);
89
+ currentValue = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.length) ? currentValue : [{
90
+ sendId: "",
91
+ sendName: ""
92
+ }];
93
+ return currentValue;
94
+ }
95
+ }
96
+ var newList = list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
97
+ var items = ((next === null || next === void 0 ? void 0 : next.details) || []).map(function (t) {
98
+ return {
99
+ title: (t === null || t === void 0 ? void 0 : t.itemName) || "",
100
+ picUrl: (t === null || t === void 0 ? void 0 : t.picPath) || "",
101
+ platform: "gy",
102
+ skuId: (t === null || t === void 0 ? void 0 : t.itemCode) || ""
103
+ };
104
+ });
105
+ var params = {
106
+ items: items
107
+ };
108
+ if (type === "logistics") {
109
+ // params.logisticsCompany = next?.shippingCode;
110
+ // params.logisticsCode = next?.shippingSn;
111
+ } else if (type === "send") {
112
+ params.sendId = next === null || next === void 0 ? void 0 : next.warehouseCode;
113
+ //下拉框,取id
114
+ params.sendName = next === null || next === void 0 ? void 0 : next.warehouseCode;
115
+ params.sendSnapshotName = next === null || next === void 0 ? void 0 : next.warehouseName;
116
+ }
117
+ prv.push(params);
118
+ return prv;
119
+ }, []);
120
+ if (!(newList === null || newList === void 0 ? void 0 : newList.length)) {
121
+ switch (type) {
122
+ case "logistics":
123
+ newList = [{
124
+ logisticsCode: ""
125
+ }];
126
+ break;
127
+ case "supply":
128
+ newList = [{
129
+ supplyId: ""
130
+ }];
131
+ break;
132
+ case "send":
133
+ newList = [{
134
+ sendId: "",
135
+ sendName: ""
136
+ }];
137
+ break;
138
+ }
139
+ }
140
+ return newList;
141
+ };
142
+ //管易订单信息转换
143
+ exports.gyOrderTransform = function (detail, form) {
144
+ var _a, _b, _c, _d, _e, _f;
145
+ var orderNo = detail.orderNo,
146
+ _g = detail.trades,
147
+ currentTrades = _g === void 0 ? [] : _g,
148
+ componentList = detail.componentList;
149
+ var gyGoodsCom = (componentList || []).find(function (com) {
150
+ return com.workOrderComponentType === "GY_GOODS";
151
+ });
152
+ var isStrict = gyGoodsCom ? (_a = form.getFieldValue(gyGoodsCom.uniqueKey)) === null || _a === void 0 ? void 0 : _a.isStrict : false;
153
+ var onlyOneSystemOrder = (currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.length) === 1;
154
+ console.log("触发---getGyOrderList--4");
155
+ return {
156
+ gySystemOrder: {
157
+ orderNo: orderNo,
158
+ isTest: 4,
159
+ orders: currentTrades.map(function (item) {
160
+ return __assign(__assign({}, item), {
161
+ billNo: item.code,
162
+ billType: item.orderTypeName,
163
+ billTag: item.tagName,
164
+ tradeTagName: item.tradeTagName,
165
+ deliveryState: deliveryStateMap[item.deliveryState]
166
+ });
167
+ }),
168
+ selectIds: onlyOneSystemOrder ? currentTrades.map(function (item) {
169
+ return item.code;
170
+ }) : [],
171
+ showOrderInfo: currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.map(function (item) {
172
+ return __assign(__assign({}, item), {
173
+ billNo: item.code,
174
+ billType: item.orderTypeName,
175
+ billTag: item.tagName,
176
+ tradeTagName: item.tradeTagName,
177
+ deliveryState: deliveryStateMap[item.deliveryState]
178
+ });
179
+ })
180
+ },
181
+ gySystemOrderNo: onlyOneSystemOrder ? (_b = currentTrades[0]) === null || _b === void 0 ? void 0 : _b.code : undefined,
182
+ gyReissueGoods: onlyOneSystemOrder ? exports.updateGyGoodsHandle([currentTrades[0]]).filter(function (good) {
183
+ return !isStrict || !orderNo || good.platformCode === orderNo;
184
+ }) : [],
185
+ gyGoods: {
186
+ // 订单反填,要清空orders,存的是当前系统订单号勾选上的 订单
187
+ orders: currentTrades,
188
+ orderNo: orderNo,
189
+ shopCode: ((_d = (_c = currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.find) === null || _c === void 0 ? void 0 : _c.call(currentTrades, function (item) {
190
+ return item.shopCode;
191
+ })) === null || _d === void 0 ? void 0 : _d.shopCode) || null,
192
+ vipCode: ((_f = (_e = currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.find) === null || _e === void 0 ? void 0 : _e.call(currentTrades, function (item) {
193
+ return item.vipCode;
194
+ })) === null || _f === void 0 ? void 0 : _f.vipCode) || null,
195
+ gyGoods: exports.updateGyGoodsHandle(currentTrades).filter(function (good) {
196
+ return !isStrict || !orderNo || good.platformCode === orderNo;
197
+ })
198
+ },
199
+ // gyLogistics: updateGyItemListHandle(
200
+ // currentTrades,
201
+ // "logistics",
202
+ // componentList || [],
203
+ // form
204
+ // ),
205
+ gySendGood: updateGyItemListHandle(currentTrades, "send", componentList || [], form)
206
+ };
207
+ };
208
+ exports.gyOrderBackFormValues = function (detail, templateDetail) {
209
+ if (detail === void 0) {
210
+ detail = {};
211
+ }
212
+ if (templateDetail === void 0) {
213
+ templateDetail = {};
214
+ }
215
+ return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
216
+ var _a, _b;
217
+ var uniqueKey = next.uniqueKey;
218
+ var config = next.componentConfig;
219
+ switch (next.workOrderComponentType) {
220
+ case "GY_SYSTEM_ORDER":
221
+ prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.gySystemOrder;
222
+ break;
223
+ case "GY_GOODS":
224
+ prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.gyGoods;
225
+ break;
226
+ case "GY_REISSUE_GOODS":
227
+ prv[uniqueKey] = {
228
+ gySystemOrder: detail === null || detail === void 0 ? void 0 : detail.gySystemOrder,
229
+ gyReissueGoods: detail === null || detail === void 0 ? void 0 : detail.gyReissueGoods,
230
+ gySystemOrderNo: detail === null || detail === void 0 ? void 0 : detail.gySystemOrderNo,
231
+ gyReissueType: ["1"],
232
+ shopCode: (_a = detail === null || detail === void 0 ? void 0 : detail.gyGoods) === null || _a === void 0 ? void 0 : _a.shopCode,
233
+ vipCode: (_b = detail === null || detail === void 0 ? void 0 : detail.gyGoods) === null || _b === void 0 ? void 0 : _b.vipCode
234
+ };
235
+ break;
236
+ case "GY_LOGISTICS":
237
+ prv[uniqueKey] = updateGyItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.gyLogistics, "logistics", config);
238
+ break;
239
+ case "GY_SEND_GOOD":
240
+ prv[uniqueKey] = updateGyItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.gySendGood, "send", config);
241
+ }
242
+ return prv;
243
+ }, {});
244
+ };
245
+ var updateGyItemListByConfigHandle = function updateGyItemListByConfigHandle(list, type, config) {
246
+ if (config === void 0) {
247
+ config = {};
248
+ }
249
+ var showField = config.showField,
250
+ _a = config.notOrderBack,
251
+ notOrderBack = _a === void 0 ? false : _a;
252
+ if (notOrderBack) {
253
+ return list;
254
+ }
255
+ return list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
256
+ if (type === "logistics") {
257
+ if (!["logisticsCompany", ""].includes(showField || "")) {
258
+ next.logisticsCompany = undefined;
259
+ }
260
+ if (!["logisticsCode", ""].includes(showField || "")) {
261
+ next.logisticsCode = undefined;
262
+ }
263
+ } else if (type === "send") {
264
+ if (!["sendId", "all"].includes(showField || "")) {
265
+ next.sendId = undefined;
266
+ }
267
+ if (!["sendName", "all"].includes(showField || "")) {
268
+ next.sendName = undefined;
269
+ next.sendSnapshotName = undefined;
270
+ }
271
+ }
272
+ prv.push(next);
273
+ return prv;
274
+ }, []);
275
+ };
276
+ // 管易根据订单号请求返回的platformCode会有多个订单号组合在一起的数据 排除其他的,返回当前订单号
277
+ exports.filterGyOrders = function (trades, order_no) {
278
+ var currentTrades = (trades || []).filter(function (item) {
279
+ return (item.platformCode || "").split(",").includes(order_no);
280
+ });
281
+ if (currentTrades.length) {
282
+ return currentTrades;
283
+ }
284
+ return [];
285
+ };
@@ -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;
@@ -10,7 +10,7 @@ export { BS_SYSTEM_ORDER_CONFIG, bsOrderBackFormValues, bsOrderTransform, } from
10
10
  export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_SYSTEM_ORDER_CONFIG, } from "./bsE3OrderBackFormValues";
11
11
  export { WLN_SYSTEM_ORDER_CONFIG, wlnOrderBackFormValues, wlnOrderTransform, } from "./wlnOrderBackFormValues";
12
12
  export { WDT_SYSTEM_ORDER_CONFIG, wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle, } from "./wdtOrderBackFormValues";
13
- export { jstOrderBackFormValues, jstOrderTransform, updateJstGoodsHandle, filterJstOrders, JST_ORDER_STATUS_MAP, JST_SYSTEM_ORDER_CONFIG, } from "./jstOrderBackFormValues";
13
+ export { default as jstOrderBackFormValues } from "./jstOrderBackFormValues";
14
14
  export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders, } from "./kmOrderBackFormValues";
15
15
  export { getIsPlatformCodesIncludeOrderNos, GY_DELIVERY_STATE_MAPPING, GY_SYSTEM_ORDER_CONFIG, updateGyGoodsHandle, gyOrderTransform, gyOrderBackFormValues, filterGyOrders, } from "./gyOrderBackFormValues";
16
16
  export { default as uuid } from "./getUUid";
@@ -10,8 +10,7 @@ export { BS_SYSTEM_ORDER_CONFIG, bsOrderBackFormValues, bsOrderTransform } from
10
10
  export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_SYSTEM_ORDER_CONFIG } from "./bsE3OrderBackFormValues";
11
11
  export { WLN_SYSTEM_ORDER_CONFIG, wlnOrderBackFormValues, wlnOrderTransform } from "./wlnOrderBackFormValues";
12
12
  export { WDT_SYSTEM_ORDER_CONFIG, wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle } from "./wdtOrderBackFormValues";
13
- // export { default as jstOrderBackFormValues } from "./jstOrderBackFormValues";
14
- export { jstOrderBackFormValues, jstOrderTransform, updateJstGoodsHandle, filterJstOrders, JST_ORDER_STATUS_MAP, JST_SYSTEM_ORDER_CONFIG } from "./jstOrderBackFormValues";
13
+ export { default as jstOrderBackFormValues } from "./jstOrderBackFormValues";
15
14
  export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders } from "./kmOrderBackFormValues";
16
15
  export { getIsPlatformCodesIncludeOrderNos, GY_DELIVERY_STATE_MAPPING, GY_SYSTEM_ORDER_CONFIG, updateGyGoodsHandle, gyOrderTransform, gyOrderBackFormValues, filterGyOrders } from "./gyOrderBackFormValues";
17
16
  export { default as uuid } from "./getUUid";
@@ -1,35 +1,2 @@
1
- export declare const JST_SYSTEM_ORDER_CONFIG: {
2
- key: string;
3
- name: string;
4
- selectId: string;
5
- columns: {
6
- dataIndex: string;
7
- title: string;
8
- width: number;
9
- }[];
10
- };
11
- export declare const JST_ORDER_STATUS_MAP: Record<number, string>;
12
- export declare const updateJstGoodsHandle: (orders?: any[], canEdit?: boolean) => any;
13
- export declare const jstOrderBackFormValues: (detail?: any, templateDetail?: any) => any;
14
- export declare const jstOrderTransform: (detail: any, form: any) => {
15
- jstSystemOrder: {
16
- orderNo: any;
17
- orders: any;
18
- selectIds: any;
19
- showOrderInfo: any;
20
- };
21
- jstSystemOrderNo: any;
22
- jstReissueGoods: any;
23
- jstSystemOrderBillType: any;
24
- jstGoods: {
25
- orders: any;
26
- orderNo: any;
27
- shopCode: any;
28
- jstGoods: any;
29
- };
30
- jstLogistics: any;
31
- jstSendGood: any;
32
- jstSupply: any;
33
- jstItemSelectThird: any;
34
- };
35
- export declare const filterJstOrders: (detail: any, order_no: string) => any;
1
+ declare const _default: (detail?: any[], templateDetail?: any) => any;
2
+ export default _default;
@@ -1,287 +1,112 @@
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
1
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
2
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
4
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
6
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7
6
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
8
- 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; }
9
- 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; }
10
- 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; }
11
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
- 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); }
13
- import uuid from "./getUUid";
14
- import { SendDataCenter } from "./SendData";
15
- export var JST_SYSTEM_ORDER_CONFIG = {
16
- key: "jstSystemShowOrder",
17
- name: "聚水潭",
18
- selectId: "jstSystemSelectIds",
19
- columns: [{
20
- dataIndex: "orderType",
21
- title: "订单类型",
22
- width: 150
23
- }, {
24
- dataIndex: "oId",
25
- title: "系统订单号",
26
- width: 160
27
- }, {
28
- dataIndex: "labels",
29
- title: "订单标签",
30
- width: 150
31
- }, {
32
- dataIndex: "mergeSoId",
33
- title: "合并订单号",
34
- width: 160
35
- }]
36
- };
37
- export var JST_ORDER_STATUS_MAP = {
38
- 0: "未确认",
39
- 1: "已确认",
40
- 3: "已作废",
41
- 5: "已完成"
42
- };
43
- export var updateJstGoodsHandle = function updateJstGoodsHandle() {
44
- var orders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
45
- var canEdit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
46
- var list = orders.reduce(function (prv, next) {
47
- var _next$items;
48
- var goods = (next === null || next === void 0 ? void 0 : (_next$items = next.items) === null || _next$items === void 0 ? void 0 : _next$items.map(function (item) {
49
- var _item$uuid;
50
- item.canDelete = true;
51
- item.canEdit = canEdit;
52
- item.uuid = (_item$uuid = item.uuid) !== null && _item$uuid !== void 0 ? _item$uuid : uuid();
53
- return _objectSpread({}, item);
54
- })) || [];
55
- prv.push.apply(prv, _toConsumableArray(goods));
56
- return prv;
57
- }, []);
58
- return list;
59
- };
60
- var updateJstItemListHandle = function updateJstItemListHandle(list, type, comList, form) {
61
- var _newList;
62
- if (type === "logistics") {
63
- var _comList$find, _currentCom$component;
64
- 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) {
65
- return item.workOrderComponentType === "JST_LOGISTICS";
66
- });
67
- var notOrderBack = (currentCom === null || currentCom === void 0 ? void 0 : (_currentCom$component = currentCom.componentConfig) === null || _currentCom$component === void 0 ? void 0 : _currentCom$component.notOrderBack) || false;
68
- if (notOrderBack) {
69
- var _currentValue;
70
- var currentValue = form.getFieldValue(currentCom.uniqueKey);
71
- currentValue = (_currentValue = currentValue) !== null && _currentValue !== void 0 && _currentValue.length ? currentValue : [{
72
- logisticsCode: "",
73
- logisticsCompany: ""
74
- }];
75
- return currentValue;
76
- }
77
- } else if (type === "send") {
78
- var _comList$find2, _currentCom$component2;
79
- 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) {
80
- return item.workOrderComponentType === "JST_SEND_GOOD";
81
- });
82
- var _notOrderBack = (_currentCom === null || _currentCom === void 0 ? void 0 : (_currentCom$component2 = _currentCom.componentConfig) === null || _currentCom$component2 === void 0 ? void 0 : _currentCom$component2.notOrderBack) || false;
83
- if (_notOrderBack) {
84
- var _currentValue3;
85
- var _currentValue2 = form.getFieldValue(_currentCom.uniqueKey);
86
- _currentValue2 = (_currentValue3 = _currentValue2) !== null && _currentValue3 !== void 0 && _currentValue3.length ? _currentValue2 : [{
87
- sendId: "",
88
- sendName: ""
89
- }];
90
- return _currentValue2;
91
- }
92
- }
93
- var newList = list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
94
- var items = ((next === null || next === void 0 ? void 0 : next.items) || []).map(function (t) {
95
- return _objectSpread({
96
- title: (t === null || t === void 0 ? void 0 : t.name) || "",
97
- picUrl: (t === null || t === void 0 ? void 0 : t.pic) || "",
98
- platform: "jst"
99
- }, type === 'itemList' ? {
100
- itemId: t === null || t === void 0 ? void 0 : t.supplierId,
101
- supplierName: t === null || t === void 0 ? void 0 : t.supplierName
102
- } : {
103
- skuId: (t === null || t === void 0 ? void 0 : t.skuId) || ""
104
- });
105
- });
106
- var params = {
107
- items: items
108
- };
109
- if (type === "logistics") {
110
- params.logisticsCompany = next === null || next === void 0 ? void 0 : next.logisticsCompany;
111
- params.logisticsCode = next === null || next === void 0 ? void 0 : next.lcId;
112
- } else if (type === "send") {
113
- params.sendId = next === null || next === void 0 ? void 0 : next.wmsCoId;
114
- params.sendName = (next === null || next === void 0 ? void 0 : next.wmsCoId) && SendDataCenter.getInstance('jst').getSendNameByCode(next === null || next === void 0 ? void 0 : next.wmsCoId);
115
- params.sendSnapshotId = next === null || next === void 0 ? void 0 : next.wmsCoId;
116
- } else if (type === "supply") {
117
- params.supplyId = next === null || next === void 0 ? void 0 : next.drpCoIdTo;
118
- params.supplyName = next === null || next === void 0 ? void 0 : next.drpCoName;
119
- }
120
- if (type === "itemList") {
121
- prv.push.apply(prv, _toConsumableArray(items.map(function (itemListItem) {
122
- return _objectSpread({}, itemListItem);
123
- })));
124
- } else {
125
- prv.push(params);
126
- }
127
- return prv;
128
- }, []);
129
- if (!((_newList = newList) !== null && _newList !== void 0 && _newList.length)) {
130
- switch (type) {
131
- case "logistics":
132
- newList = [{
133
- logisticsCode: ""
134
- }];
135
- break;
136
- case "supply":
137
- newList = [{
138
- supplyName: "",
139
- supplyId: ""
140
- }];
141
- break;
142
- case "send":
143
- newList = [{
144
- sendId: "",
145
- sendName: ""
146
- }];
147
- break;
148
- }
149
- }
150
- return newList;
151
- };
152
- var updateJstItemListByConfigHandle = function updateJstItemListByConfigHandle(list, type) {
7
+ //重组聚水潭商品数据
8
+ var updateJSTItemListHandle = function updateJSTItemListHandle() {
9
+ var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
10
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "logistics";
153
11
  var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
154
12
  var showField = config.showField,
155
13
  enableItemId = config.enableItemId,
156
14
  enableSupplierName = config.enableSupplierName;
157
- return list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
158
- if (type === "logistics") {
159
- if (!["logisticsCompany", ""].includes(showField || "")) {
160
- next.logisticsCompany = undefined;
161
- }
162
- if (!["logisticsCode", ""].includes(showField || "")) {
163
- next.logisticsCode = undefined;
164
- }
165
- } else if (type === "send") {
166
- if (!["sendId", "all"].includes(showField || "")) {
167
- next.sendId = undefined;
168
- }
169
- if (!["sendName", "all"].includes(showField || "")) {
170
- next.sendName = undefined;
171
- }
172
- } else if (type === "supply") {
173
- if (!["supplyId", "all"].includes(showField || "")) {
174
- next.supplyId = undefined;
175
- }
176
- if (!["supplyName", "all"].includes(showField || "")) {
177
- next.supplyName = undefined;
178
- }
179
- } else if (type === "itemList") {
180
- if (!enableItemId) {
181
- next.itemId = undefined;
15
+ if (type !== "itemList") {
16
+ var newList = list === null || list === void 0 ? void 0 : list.map(function (item) {
17
+ var items = item.items.map(function (t) {
18
+ return {
19
+ title: t.skuName,
20
+ picUrl: t.pic,
21
+ platform: "jst",
22
+ skuId: t.skuId
23
+ };
24
+ });
25
+ var params = {
26
+ items: items
27
+ };
28
+ if (type === "logistics") {
29
+ params.logisticsCompany = item.logisticsCompany;
30
+ params.logisticsCode = item.lId;
31
+ } else if (type === "supply") {
32
+ if (["supplyId", "all"].includes(showField || "")) {
33
+ params.supplyId = item.drpCoIdTo;
34
+ }
35
+ if (["supplyName", "all"].includes(showField || "")) {
36
+ params.supplyName = item.drpCoName;
37
+ }
38
+ } else if (type === "send") {
39
+ if (["sendId", "all"].includes(showField || "")) {
40
+ params.sendId = item.wmsCoId;
41
+ }
42
+ if (["sendName", "all"].includes(showField || "")) {
43
+ params.sendName = item.wmsCoName;
44
+ }
182
45
  }
183
- if (!enableSupplierName) {
184
- next.supplierName = undefined;
46
+ return params;
47
+ });
48
+ if (!newList.length) {
49
+ switch (type) {
50
+ case "logistics":
51
+ newList = [{
52
+ logisticsCode: ""
53
+ }];
54
+ break;
55
+ case "supply":
56
+ newList = [{
57
+ supplyId: ""
58
+ }];
59
+ break;
60
+ case "send":
61
+ newList = [{
62
+ sendId: "",
63
+ sendName: ""
64
+ }];
65
+ break;
185
66
  }
186
67
  }
187
- prv.push(next);
188
- return prv;
189
- }, []);
68
+ return newList;
69
+ } else {
70
+ return list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
71
+ var items = next.items.map(function (t) {
72
+ var params = {
73
+ title: t.skuName,
74
+ picUrl: t.pic,
75
+ platform: "jst"
76
+ };
77
+ if (enableItemId) {
78
+ params.itemId = t.supplierId;
79
+ }
80
+ if (enableSupplierName) {
81
+ params.supplierName = t.supplierName;
82
+ }
83
+ return params;
84
+ });
85
+ prv.push.apply(prv, _toConsumableArray(items));
86
+ return prv;
87
+ }, []);
88
+ }
190
89
  };
191
- export var jstOrderBackFormValues = function jstOrderBackFormValues() {
192
- var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
90
+ export default (function () {
91
+ var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
193
92
  var templateDetail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
194
93
  return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
195
94
  var uniqueKey = next.uniqueKey;
196
95
  var config = next.componentConfig;
197
96
  switch (next.workOrderComponentType) {
198
- case "JST_SYSTEM_ORDER":
199
- prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.jstSystemOrder;
200
- break;
201
- case "JST_GOODS":
202
- prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.jstGoods;
203
- break;
204
- case "JST_REISSUE_GOODS":
205
- prv[uniqueKey] = {
206
- jstSystemOrder: detail === null || detail === void 0 ? void 0 : detail.jstSystemOrder,
207
- jstSystemOrderNo: detail === null || detail === void 0 ? void 0 : detail.jstSystemOrderNo,
208
- jstReissueType: ["1"],
209
- jstReissueGoods: (detail === null || detail === void 0 ? void 0 : detail.jstReissueGoods) || [],
210
- jstSystemOrderBillType: (detail === null || detail === void 0 ? void 0 : detail.jstSystemOrderBillType) || ""
211
- };
212
- break;
213
97
  case "JST_ITEM_SELECT_THIRD":
214
- prv[uniqueKey] = updateJstItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.jstItemSelectThird, "itemList", config);
98
+ prv[uniqueKey] = updateJSTItemListHandle(detail, "itemList", config);
215
99
  break;
216
100
  case "JST_SUPPLY":
217
- prv[uniqueKey] = updateJstItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.jstSupply, "supply", config);
218
- break;
219
- case "JST_LOGISTICS":
220
- prv[uniqueKey] = updateJstItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.jstLogistics, "logistics", config);
101
+ prv[uniqueKey] = updateJSTItemListHandle(detail, "supply", config);
221
102
  break;
222
103
  case "JST_SEND_GOOD":
223
- prv[uniqueKey] = updateJstItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.jstSendGood, "send", config);
104
+ prv[uniqueKey] = updateJSTItemListHandle(detail, "send", config);
105
+ break;
106
+ case "JST_LOGISTICS":
107
+ prv[uniqueKey] = updateJSTItemListHandle(detail, "logistics", config);
224
108
  break;
225
109
  }
226
110
  return prv;
227
111
  }, {});
228
- };
229
- //jst订单信息转换
230
- export var jstOrderTransform = function jstOrderTransform(detail, form) {
231
- var _form$getFieldValue, _newOrderList$, _newOrderList$2, _orderList$find, _orderList$find$call;
232
- var orderNo = detail.orderNo,
233
- _detail$orderList = detail.orderList,
234
- orderList = _detail$orderList === void 0 ? [] : _detail$orderList,
235
- componentList = detail.componentList;
236
- var jstGoodsCom = (componentList || []).find(function (com) {
237
- return com.workOrderComponentType === "JST_GOODS";
238
- });
239
- var isStrict = jstGoodsCom ? (_form$getFieldValue = form.getFieldValue(jstGoodsCom.uniqueKey)) === null || _form$getFieldValue === void 0 ? void 0 : _form$getFieldValue.isStrict : false;
240
- var newOrderList = orderList === null || orderList === void 0 ? void 0 : orderList.map(function (item) {
241
- return _objectSpread({}, item);
242
- });
243
- var onlyOneSystemOrder = (newOrderList === null || newOrderList === void 0 ? void 0 : newOrderList.length) === 1;
244
- return {
245
- jstSystemOrder: {
246
- orderNo: orderNo,
247
- orders: newOrderList,
248
- selectIds: onlyOneSystemOrder ? orderList.map(function (item) {
249
- return item.oId;
250
- }) : [],
251
- showOrderInfo: newOrderList
252
- },
253
- // TODO: 当只有一条系统单时默认选中该系统单
254
- jstSystemOrderNo: onlyOneSystemOrder ? (_newOrderList$ = newOrderList[0]) === null || _newOrderList$ === void 0 ? void 0 : _newOrderList$.oId : undefined,
255
- jstReissueGoods: onlyOneSystemOrder ? updateJstGoodsHandle([newOrderList[0]], true).filter(function (good) {
256
- return !isStrict || !orderNo || good.originalDealCode === orderNo;
257
- }) : [],
258
- jstSystemOrderBillType: onlyOneSystemOrder ? (_newOrderList$2 = newOrderList[0]) === null || _newOrderList$2 === void 0 ? void 0 : _newOrderList$2.orderType : "",
259
- jstGoods: {
260
- // 订单反填,要清空orders,存的是当前系统订单号勾选上的 订单
261
- orders: orderList || [],
262
- orderNo: orderNo,
263
- shopCode: (orderList === null || orderList === void 0 ? void 0 : (_orderList$find = orderList.find) === null || _orderList$find === void 0 ? void 0 : (_orderList$find$call = _orderList$find.call(orderList, function (item) {
264
- return item.sdCode;
265
- })) === null || _orderList$find$call === void 0 ? void 0 : _orderList$find$call.sdCode) || null,
266
- jstGoods: updateJstGoodsHandle(orderList).filter(function (good) {
267
- return !isStrict || !orderNo || good.originalDealCode === orderNo;
268
- })
269
- },
270
- jstLogistics: updateJstItemListHandle(detail === null || detail === void 0 ? void 0 : detail.orderList, "logistics", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form),
271
- jstSendGood: updateJstItemListHandle(detail === null || detail === void 0 ? void 0 : detail.orderList, "send", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form),
272
- jstSupply: updateJstItemListHandle(detail === null || detail === void 0 ? void 0 : detail.orderList, "logistics", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form),
273
- jstItemSelectThird: updateJstItemListHandle(detail === null || detail === void 0 ? void 0 : detail.orderList, "itemList", (detail === null || detail === void 0 ? void 0 : detail.componentList) || [], form)
274
- };
275
- };
276
-
277
- // TODO: 确定合并单,例如: WDT根据订单号请求返回的srcTid会有多个订单号组合在一起的数据 排除其他的,返回当前订单号
278
- export var filterJstOrders = function filterJstOrders(detail, order_no) {
279
- var currentTrades = (detail === null || detail === void 0 ? void 0 : detail.orderList) || [];
280
- // .filter(
281
- // (item: Record<string, any>) => item?.dealCode === order_no
282
- // );
283
- if (currentTrades.length) {
284
- return currentTrades;
285
- }
286
- return [];
287
- };
112
+ });
@@ -12,7 +12,7 @@ import isNull from "./isNull";
12
12
  import { kmOrderBackFormValues } from "./kmOrderBackFormValues";
13
13
  import { bsOrderBackFormValues } from "./bsOrderBackFormValues";
14
14
  import { wlnOrderBackFormValues } from "./wlnOrderBackFormValues";
15
- import { jstOrderBackFormValues } from "./jstOrderBackFormValues";
15
+ import jstOrderBackFormValues from "./jstOrderBackFormValues";
16
16
  import { wdtOrderBackFormValues } from "./wdtOrderBackFormValues";
17
17
  import { bsE3OrderBackFormValues } from "./bsE3OrderBackFormValues";
18
18
  import { gyOrderBackFormValues } from "./gyOrderBackFormValues";
@@ -227,7 +227,7 @@ export default (function (_ref) {
227
227
  }
228
228
  return prv;
229
229
  }, {});
230
- var jstValues = jstOrderBackFormValues(detail["jstOrder"], templateDetail);
230
+ var jstValues = jstOrderBackFormValues(detail["jstItemList"], templateDetail);
231
231
  var bsValues = bsOrderBackFormValues(detail["bsOrder"], templateDetail);
232
232
  var wlnValues = wlnOrderBackFormValues(detail["wlnOrder"], templateDetail);
233
233
  var wdtValues = wdtOrderBackFormValues(detail["wdtOrder"], templateDetail);
@@ -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", "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", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "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", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "kmLogisticsList", 'jstGoods', 'jstSendGood', 'jstReissueType', 'jstReissueGoods', 'jstSystemOrderNo', 'jstLogisticsList', 'jstSystemShowOrder', 'jstSystemSelectIds', 'jstReturnGoods', 'jstReturnType', 'jstExchangeGoods'].reduce(function (cur, nxt) {
2
+ return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "memberLevel", "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", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "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", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "kmLogisticsList"].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,17 +1,17 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "2.0.12-beta.8",
3
+ "version": "2.0.15",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "scripts": {
10
+ "sync": "yarn build && yalc push",
10
11
  "build": "yarn run lint && father build",
11
12
  "jest:init": "jest --init",
12
13
  "lint": "eslint . --ext .ts",
13
14
  "lint:fix": "npx eslint . --ext .ts --fix",
14
- "sync": "yarn build && yalc push",
15
15
  "test": "jest"
16
16
  },
17
17
  "lint-staged": {
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "d01b0263e68ca83e234b8341573f9064f6aabe91",
44
+ "gitHead": "7d7f5e05f6404b38e0c6c7063a3ade5f1e4331d7",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }
@@ -1,7 +0,0 @@
1
- declare type WarehouseType = {
2
- disabled: boolean;
3
- label: string;
4
- value: number;
5
- };
6
- export declare const getWarehouseDataAsync: () => Promise<WarehouseType[]>;
7
- export default getWarehouseDataAsync;
@@ -1,32 +0,0 @@
1
- import { fetchAll } from "../../utils";
2
- import request from "../../request";
3
- var queryWarehouseList = function queryWarehouseList(_ref) {
4
- var pageNo = _ref.pageNo,
5
- pageSize = _ref.pageSize;
6
- return request({
7
- url: "/qy/gdfw/jst/erp/warehouse/list",
8
- method: "post",
9
- data: {
10
- pageNo: pageNo,
11
- pageSize: pageSize
12
- }
13
- });
14
- };
15
- export var getWarehouseDataAsync = function getWarehouseDataAsync() {
16
- return fetchAll("JST_WAREHOUSE_DATA", queryWarehouseList, function (data) {
17
- var list = [];
18
- var warehouses = data || [];
19
- warehouses.map(function (item) {
20
- list.push({
21
- label: item.name,
22
- value: item.wmsCoId,
23
- disabled: false
24
- });
25
- });
26
- return list;
27
- }, {
28
- pageNo: 1,
29
- pageSize: 100
30
- });
31
- };
32
- export default getWarehouseDataAsync;