@kmkf-fe-packages/kmkf-utils 2.2.26 → 2.2.28

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
- 1123111
1
+ 112311133
@@ -5,9 +5,18 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  import request from "../../request";
8
+
9
+ // const jstOrderDetail: (data: any) => Promise<any> = (data: any) => {
10
+ // return request({
11
+ // url: "/qy/gdfw/order/jstOrderDetail",
12
+ // method: "post",
13
+ // data,
14
+ // infoLevel: "warning",
15
+ // });
16
+ // };
8
17
  var jstOrderDetail = function jstOrderDetail(data) {
9
18
  return request({
10
- url: "/qy/gdfw/order/jstOrderDetail",
19
+ url: "/qy/gdfw/jst/erp/jstShopCode",
11
20
  method: "post",
12
21
  data: data,
13
22
  infoLevel: "warning"
@@ -2,6 +2,7 @@ declare type WarehouseType = {
2
2
  disabled: boolean;
3
3
  label: string;
4
4
  value: string;
5
+ isMain: boolean;
5
6
  };
6
7
  export declare const getWarehouseDataAsync: () => Promise<WarehouseType[]>;
7
8
  export default getWarehouseDataAsync;
@@ -20,7 +20,8 @@ export var getWarehouseDataAsync = function getWarehouseDataAsync() {
20
20
  list.push({
21
21
  label: item.name,
22
22
  value: "".concat(item.wmsCoId),
23
- disabled: false
23
+ disabled: false,
24
+ isMain: item.isMain
24
25
  });
25
26
  });
26
27
  return list;
@@ -2,6 +2,7 @@ interface OptionsItem {
2
2
  label: string;
3
3
  value: string | number;
4
4
  disabled: boolean;
5
+ isMain?: boolean;
5
6
  }
6
7
  declare type SendGoodPlatform = string;
7
8
  declare class SendData {
@@ -14,6 +15,7 @@ declare class SendData {
14
15
  setSendData: (val: OptionsItem[]) => OptionsItem[];
15
16
  getSendNameByCode: (code: string | number, returnCurrentValue?: boolean) => string | number;
16
17
  getSendCodeByName: (name: string | number, returnCurrentValue?: boolean) => string | number;
18
+ getMainWmsCoId: () => string | number;
17
19
  }
18
20
  export declare class SendDataCenter {
19
21
  static instanceMap: Map<SendGoodPlatform, SendData>;
@@ -52,6 +52,12 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
52
52
  });
53
53
  return item.length ? item[0].value : returnCurrentValue ? name : "";
54
54
  });
55
+ _defineProperty(this, "getMainWmsCoId", function () {
56
+ var _this$sendData$find;
57
+ return ((_this$sendData$find = _this.sendData.find(function (item) {
58
+ return item === null || item === void 0 ? void 0 : item.isMain;
59
+ })) === null || _this$sendData$find === void 0 ? void 0 : _this$sendData$find.value) || "";
60
+ });
55
61
  this.platform = platform;
56
62
  this.service = {
57
63
  bsE3: BSE3,
@@ -112,7 +112,7 @@ var updateJstItemListHandle = function updateJstItemListHandle(list, type, comLi
112
112
  params.logisticsCompany = next === null || next === void 0 ? void 0 : next.logisticsCompany;
113
113
  params.logisticsCode = next === null || next === void 0 ? void 0 : next.lId;
114
114
  } else if (type === "send") {
115
- var wmsCoId = (next === null || next === void 0 ? void 0 : next.wmsCoId) === "0" ? "" : "".concat(next === null || next === void 0 ? void 0 : next.wmsCoId);
115
+ var wmsCoId = (next === null || next === void 0 ? void 0 : next.wmsCoId) === "0" ? SendDataCenter.getInstance("jst").getMainWmsCoId() : "".concat(next === null || next === void 0 ? void 0 : next.wmsCoId);
116
116
  params.sendId = wmsCoId;
117
117
  params.sendName = wmsCoId && SendDataCenter.getInstance("jst").getSendNameByCode(wmsCoId);
118
118
  params.sendSnapshotId = wmsCoId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "2.2.26",
3
+ "version": "2.2.28",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "786169beb384512f2dd49ceb5ecee234058f4434",
44
+ "gitHead": "2e9500bbcbdd5a1ac6f32998d9ec75566c1782c2",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }