@kmkf-fe-packages/kmkf-utils 2.0.12-beta.2 → 2.0.14

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
- 111226333111
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
  }
@@ -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;
@@ -29,7 +29,9 @@ export declare const gyOrderTransform: (detail: any, form: any) => {
29
29
  vipCode: any;
30
30
  gyGoods: any;
31
31
  };
32
+ shopCode: any;
33
+ vipCode: any;
32
34
  gySendGood: any;
33
35
  };
34
- export declare const gyOrderBackFormValues: (detail?: any, templateDetail?: any) => any;
36
+ export declare const gyOrderBackFormValues: (detail?: any, templateDetail?: any, testIndex?: number) => any;
35
37
  export declare const filterGyOrders: (trades: any, order_no: string) => any;
@@ -11,6 +11,7 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
11
11
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
12
  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; }
13
13
  import uuid from "./getUUid";
14
+ import Monitor from "kmkf-monitor";
14
15
  export var GY_DELIVERY_STATE_MAPPING = {
15
16
  0: "未发货",
16
17
  2: "全部发货"
@@ -159,7 +160,7 @@ var updateGyItemListHandle = function updateGyItemListHandle(list, type, comList
159
160
 
160
161
  //管易订单信息转换
161
162
  export var gyOrderTransform = function gyOrderTransform(detail, form) {
162
- var _form$getFieldValue, _currentTrades$, _currentTrades$find, _currentTrades$find$c, _currentTrades$find2, _currentTrades$find2$;
163
+ var _form$getFieldValue, _currentTrades$, _currentTrades$find, _currentTrades$find$c, _currentTrades$find2, _currentTrades$find2$, _currentTrades$find3, _currentTrades$find3$, _currentTrades$find4, _currentTrades$find4$;
163
164
  var orderNo = detail.orderNo,
164
165
  _detail$trades = detail.trades,
165
166
  currentTrades = _detail$trades === void 0 ? [] : _detail$trades,
@@ -174,6 +175,8 @@ export var gyOrderTransform = function gyOrderTransform(detail, form) {
174
175
  orderNo: orderNo,
175
176
  orders: currentTrades.map(function (item) {
176
177
  return _objectSpread(_objectSpread({}, item), {}, {
178
+ vipCode: item.vipCode,
179
+ shopCode: item.shopCode,
177
180
  billNo: item.code,
178
181
  billType: item.orderTypeName,
179
182
  billTag: item.tagName,
@@ -187,6 +190,8 @@ export var gyOrderTransform = function gyOrderTransform(detail, form) {
187
190
  }) : [],
188
191
  showOrderInfo: currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.map(function (item) {
189
192
  return _objectSpread(_objectSpread({}, item), {}, {
193
+ vipCode: item.vipCode,
194
+ shopCode: item.shopCode,
190
195
  billNo: item.code,
191
196
  billType: item.orderTypeName,
192
197
  billTag: item.tagName,
@@ -214,6 +219,12 @@ export var gyOrderTransform = function gyOrderTransform(detail, form) {
214
219
  return !isStrict || !orderNo || getIsPlatformCodesIncludeOrderNos(good.platformCode, orderNo);
215
220
  })
216
221
  },
222
+ shopCode: (currentTrades === null || currentTrades === void 0 ? void 0 : (_currentTrades$find3 = currentTrades.find) === null || _currentTrades$find3 === void 0 ? void 0 : (_currentTrades$find3$ = _currentTrades$find3.call(currentTrades, function (item) {
223
+ return item.shopCode;
224
+ })) === null || _currentTrades$find3$ === void 0 ? void 0 : _currentTrades$find3$.shopCode) || null,
225
+ vipCode: (currentTrades === null || currentTrades === void 0 ? void 0 : (_currentTrades$find4 = currentTrades.find) === null || _currentTrades$find4 === void 0 ? void 0 : (_currentTrades$find4$ = _currentTrades$find4.call(currentTrades, function (item) {
226
+ return item.vipCode;
227
+ })) === null || _currentTrades$find4$ === void 0 ? void 0 : _currentTrades$find4$.vipCode) || null,
217
228
  // gyLogistics: updateGyItemListHandle(
218
229
  // currentTrades,
219
230
  // "logistics",
@@ -226,8 +237,9 @@ export var gyOrderTransform = function gyOrderTransform(detail, form) {
226
237
  export var gyOrderBackFormValues = function gyOrderBackFormValues() {
227
238
  var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
228
239
  var templateDetail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
240
+ var testIndex = arguments.length > 2 ? arguments[2] : undefined;
229
241
  return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
230
- var _detail$gyGoods, _detail$gyGoods2;
242
+ var _detail$gyGoods, _detail$gySystemOrder, _detail$gySystemOrder2, _detail$gySystemOrder3, _detail$gySystemOrder4, _detail$gySystemOrder5, _detail$gySystemOrder6, _detail$gyGoods2, _detail$gySystemOrder7, _detail$gySystemOrder8, _detail$gySystemOrder9, _detail$gySystemOrder10, _detail$gySystemOrder11, _detail$gySystemOrder12;
231
243
  var uniqueKey = next.uniqueKey;
232
244
  var config = next.componentConfig;
233
245
  switch (next.workOrderComponentType) {
@@ -243,9 +255,18 @@ export var gyOrderBackFormValues = function gyOrderBackFormValues() {
243
255
  gyReissueGoods: detail === null || detail === void 0 ? void 0 : detail.gyReissueGoods,
244
256
  gySystemOrderNo: detail === null || detail === void 0 ? void 0 : detail.gySystemOrderNo,
245
257
  gyReissueType: ["1"],
246
- shopCode: detail === null || detail === void 0 ? void 0 : (_detail$gyGoods = detail.gyGoods) === null || _detail$gyGoods === void 0 ? void 0 : _detail$gyGoods.shopCode,
247
- vipCode: detail === null || detail === void 0 ? void 0 : (_detail$gyGoods2 = detail.gyGoods) === null || _detail$gyGoods2 === void 0 ? void 0 : _detail$gyGoods2.vipCode
258
+ shopCode: (detail === null || detail === void 0 ? void 0 : (_detail$gyGoods = detail.gyGoods) === null || _detail$gyGoods === void 0 ? void 0 : _detail$gyGoods.shopCode) || (detail === null || detail === void 0 ? void 0 : detail.shopCode) || (detail === null || detail === void 0 ? void 0 : (_detail$gySystemOrder = detail.gySystemOrder) === null || _detail$gySystemOrder === void 0 ? void 0 : (_detail$gySystemOrder2 = _detail$gySystemOrder.orders) === null || _detail$gySystemOrder2 === void 0 ? void 0 : (_detail$gySystemOrder3 = _detail$gySystemOrder2[0]) === null || _detail$gySystemOrder3 === void 0 ? void 0 : _detail$gySystemOrder3.shopCode) || (detail === null || detail === void 0 ? void 0 : (_detail$gySystemOrder4 = detail.gySystemOrder) === null || _detail$gySystemOrder4 === void 0 ? void 0 : (_detail$gySystemOrder5 = _detail$gySystemOrder4.showOrderInfo) === null || _detail$gySystemOrder5 === void 0 ? void 0 : (_detail$gySystemOrder6 = _detail$gySystemOrder5[0]) === null || _detail$gySystemOrder6 === void 0 ? void 0 : _detail$gySystemOrder6.shopCode),
259
+ vipCode: (detail === null || detail === void 0 ? void 0 : (_detail$gyGoods2 = detail.gyGoods) === null || _detail$gyGoods2 === void 0 ? void 0 : _detail$gyGoods2.vipCode) || (detail === null || detail === void 0 ? void 0 : detail.vipCode) || (detail === null || detail === void 0 ? void 0 : (_detail$gySystemOrder7 = detail.gySystemOrder) === null || _detail$gySystemOrder7 === void 0 ? void 0 : (_detail$gySystemOrder8 = _detail$gySystemOrder7.orders) === null || _detail$gySystemOrder8 === void 0 ? void 0 : (_detail$gySystemOrder9 = _detail$gySystemOrder8[0]) === null || _detail$gySystemOrder9 === void 0 ? void 0 : _detail$gySystemOrder9.vipCode) || (detail === null || detail === void 0 ? void 0 : (_detail$gySystemOrder10 = detail.gySystemOrder) === null || _detail$gySystemOrder10 === void 0 ? void 0 : (_detail$gySystemOrder11 = _detail$gySystemOrder10.showOrderInfo) === null || _detail$gySystemOrder11 === void 0 ? void 0 : (_detail$gySystemOrder12 = _detail$gySystemOrder11[0]) === null || _detail$gySystemOrder12 === void 0 ? void 0 : _detail$gySystemOrder12.vipCode)
248
260
  };
261
+ //无vipCode上报日志
262
+ if (!prv[uniqueKey].vipCode) {
263
+ Monitor.sendClick({
264
+ spmClick: "notVipCode",
265
+ spmParam: JSON.stringify(Object.prototype.toString.call(detail) === "[object Object]" ? _objectSpread(_objectSpread({}, detail), {}, {
266
+ testIndex: testIndex
267
+ }) : {})
268
+ });
269
+ }
249
270
  break;
250
271
  case "GY_LOGISTICS":
251
272
  prv[uniqueKey] = updateGyItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.gyLogistics, "logistics", config);
@@ -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,13 +227,13 @@ 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);
234
234
  var bsE3Values = bsE3OrderBackFormValues(detail["bsE3Order"], templateDetail);
235
235
  var kmValues = kmOrderBackFormValues(detail["kmOrder"], templateDetail);
236
- var gyValues = gyOrderBackFormValues(detail["gyOrder"], templateDetail);
236
+ var gyValues = gyOrderBackFormValues(detail["gyOrder"], templateDetail, 1);
237
237
  console.log("bsE3Values", bsE3Values);
238
238
  return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues), gyValues);
239
239
  });
@@ -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.2",
3
+ "version": "2.0.14",
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": "633250aff84497bea16c4fe0ccddfbf99fe835ef",
44
+ "gitHead": "c4ee9161a08d5443c9eb7f5701e8d43ca074b280",
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;