@kmkf-fe-packages/kmkf-utils 1.22.1-beta.4 → 1.22.1-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/esm/addressData/index.d.ts +1 -0
- package/dist/esm/addressData/index.js +30 -0
- package/dist/esm/bsAddressData/index.d.ts +1 -0
- package/dist/esm/bsAddressData/index.js +30 -0
- package/dist/esm/constants/columnsGoodsList/index.d.ts +5 -0
- package/dist/esm/constants/columnsGoodsList/index.js +26 -0
- package/dist/esm/constants/index.d.ts +7 -0
- package/dist/esm/constants/index.js +8 -0
- package/dist/esm/expressData/index.d.ts +1 -1
- package/dist/esm/expressData/index.js +4 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/servers/JST/index.d.ts +1 -0
- package/dist/esm/servers/JST/index.js +1 -0
- package/dist/esm/servers/JST/logisticsData.d.ts +6 -0
- package/dist/esm/servers/JST/logisticsData.js +42 -0
- package/dist/esm/servers/KM/warehouseData.js +2 -2
- package/dist/esm/servers/WLN/index.d.ts +1 -0
- package/dist/esm/servers/WLN/index.js +1 -0
- package/dist/esm/servers/WLN/logisticsData.d.ts +6 -0
- package/dist/esm/servers/WLN/logisticsData.js +42 -0
- package/dist/esm/servers/index.d.ts +2 -0
- package/dist/esm/servers/index.js +4 -0
- package/dist/esm/utils/bsE3OrderBackFormValues.d.ts +1 -0
- package/dist/esm/utils/bsE3OrderBackFormValues.js +18 -13
- package/dist/esm/utils/bsOrderBackFormValues.js +6 -2
- package/dist/esm/utils/jstOrderBackFormValues.js +2 -1
- package/dist/esm/utils/kmOrderBackFormValues.js +6 -7
- package/dist/esm/utils/orderBackFormValues.js +4 -2
- package/dist/esm/utils/unTransField.js +1 -1
- package/dist/esm/utils/wdtOrderBackFormValues.d.ts +2 -0
- package/dist/esm/utils/wdtOrderBackFormValues.js +13 -4
- package/dist/esm/utils/wlnOrderBackFormValues.js +1 -1
- package/dist/esm/wdtAddressData/index.d.ts +1 -0
- package/dist/esm/wdtAddressData/index.js +30 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
111223
|
|
@@ -25,6 +25,7 @@ export default class AddressData {
|
|
|
25
25
|
value: string;
|
|
26
26
|
}[];
|
|
27
27
|
getProCodeByName: (proName: string) => number | undefined;
|
|
28
|
+
getCodesByNames: (names: Array<string>) => (string | undefined)[];
|
|
28
29
|
getNameByCode: (code: string | number) => string;
|
|
29
30
|
static getInstance(): AddressData;
|
|
30
31
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
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); }
|
|
4
|
+
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; }
|
|
2
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
6
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
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; }
|
|
6
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
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 { isEmpty } from 'lodash';
|
|
8
12
|
var AddressData = /*#__PURE__*/function () {
|
|
9
13
|
function AddressData() {
|
|
10
14
|
var _this = this;
|
|
@@ -45,6 +49,32 @@ var AddressData = /*#__PURE__*/function () {
|
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
});
|
|
52
|
+
_defineProperty(this, "getCodesByNames", function (names) {
|
|
53
|
+
var codes = [];
|
|
54
|
+
var currentData = _this.addressOptions;
|
|
55
|
+
var _iterator = _createForOfIteratorHelper(names),
|
|
56
|
+
_step;
|
|
57
|
+
try {
|
|
58
|
+
var _loop = function _loop() {
|
|
59
|
+
var name = _step.value;
|
|
60
|
+
var foundChild = currentData.find(function (item) {
|
|
61
|
+
return item.label === name;
|
|
62
|
+
});
|
|
63
|
+
codes.push(foundChild === null || foundChild === void 0 ? void 0 : foundChild.value); // 添加找到的 code
|
|
64
|
+
if (!isEmpty(foundChild === null || foundChild === void 0 ? void 0 : foundChild.children)) {
|
|
65
|
+
currentData = (foundChild === null || foundChild === void 0 ? void 0 : foundChild.children) || []; // 更新当前数据为找到的子节点
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
69
|
+
_loop();
|
|
70
|
+
}
|
|
71
|
+
} catch (err) {
|
|
72
|
+
_iterator.e(err);
|
|
73
|
+
} finally {
|
|
74
|
+
_iterator.f();
|
|
75
|
+
}
|
|
76
|
+
return codes; // 返回所有找到的 codes
|
|
77
|
+
});
|
|
48
78
|
_defineProperty(this, "getNameByCode", function (code) {
|
|
49
79
|
var _ref;
|
|
50
80
|
return (_ref = (_this.addrData || {})[code] || []) === null || _ref === void 0 ? void 0 : _ref[0];
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
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); }
|
|
4
|
+
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; }
|
|
2
5
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
6
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
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; }
|
|
6
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
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 { isEmpty } from 'lodash';
|
|
8
12
|
var BsAddressData = /*#__PURE__*/function () {
|
|
9
13
|
function BsAddressData() {
|
|
10
14
|
var _this = this;
|
|
@@ -29,6 +33,32 @@ var BsAddressData = /*#__PURE__*/function () {
|
|
|
29
33
|
}
|
|
30
34
|
return arr;
|
|
31
35
|
});
|
|
36
|
+
_defineProperty(this, "getCodesByNames", function (names) {
|
|
37
|
+
var codes = [];
|
|
38
|
+
var currentData = _this.addressOptions;
|
|
39
|
+
var _iterator = _createForOfIteratorHelper(names),
|
|
40
|
+
_step;
|
|
41
|
+
try {
|
|
42
|
+
var _loop = function _loop() {
|
|
43
|
+
var name = _step.value;
|
|
44
|
+
var foundChild = currentData.find(function (item) {
|
|
45
|
+
return item.label === name;
|
|
46
|
+
});
|
|
47
|
+
codes.push(foundChild === null || foundChild === void 0 ? void 0 : foundChild.value); // 添加找到的 code
|
|
48
|
+
if (!isEmpty(foundChild === null || foundChild === void 0 ? void 0 : foundChild.children)) {
|
|
49
|
+
currentData = (foundChild === null || foundChild === void 0 ? void 0 : foundChild.children) || []; // 更新当前数据为找到的子节点
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
53
|
+
_loop();
|
|
54
|
+
}
|
|
55
|
+
} catch (err) {
|
|
56
|
+
_iterator.e(err);
|
|
57
|
+
} finally {
|
|
58
|
+
_iterator.f();
|
|
59
|
+
}
|
|
60
|
+
return codes; // 返回所有找到的 codes
|
|
61
|
+
});
|
|
32
62
|
_defineProperty(this, "getProvinceByCode", function (countryIndex) {
|
|
33
63
|
return _this.parseData(countryIndex);
|
|
34
64
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var columnsGoodsList = [{
|
|
2
|
+
dataIndex: "title",
|
|
3
|
+
title: "商品名称"
|
|
4
|
+
}, {
|
|
5
|
+
dataIndex: "outerId",
|
|
6
|
+
title: "商品编码"
|
|
7
|
+
}, {
|
|
8
|
+
dataIndex: "picUrl",
|
|
9
|
+
title: "图片"
|
|
10
|
+
}, {
|
|
11
|
+
dataIndex: "numIid",
|
|
12
|
+
title: "商品id"
|
|
13
|
+
}, {
|
|
14
|
+
dataIndex: "num",
|
|
15
|
+
title: "商品数量"
|
|
16
|
+
}, {
|
|
17
|
+
dataIndex: "skuId",
|
|
18
|
+
title: "SKU ID"
|
|
19
|
+
}, {
|
|
20
|
+
dataIndex: "outerSkuId",
|
|
21
|
+
title: "SKU 编码"
|
|
22
|
+
}, {
|
|
23
|
+
dataIndex: "propertiesName",
|
|
24
|
+
title: "SKU 信息"
|
|
25
|
+
}];
|
|
26
|
+
export default columnsGoodsList;
|
|
@@ -17,7 +17,7 @@ export default class ExpressData {
|
|
|
17
17
|
getExpressData: () => OptionsItem[];
|
|
18
18
|
setExpressData: (val: OptionsItem[], type: string) => OptionsItem[];
|
|
19
19
|
getExpressNameByCode: (code: string | number, returnCurrentValue?: boolean) => string | number;
|
|
20
|
-
getExpressCodeByName: (name: string | number, returnCurrentValue?: boolean) => string | number;
|
|
20
|
+
getExpressCodeByName: (name: string | number, returnCurrentValue?: boolean, type?: string) => string | number;
|
|
21
21
|
static getInstance(type?: string): ExpressData;
|
|
22
22
|
}
|
|
23
23
|
export {};
|
|
@@ -29,8 +29,11 @@ var ExpressData = /*#__PURE__*/function () {
|
|
|
29
29
|
return item.length ? item[0].label : returnCurrentValue ? code : "";
|
|
30
30
|
});
|
|
31
31
|
_defineProperty(this, "getExpressCodeByName", function (name) {
|
|
32
|
+
var _ExpressData$instance;
|
|
32
33
|
var returnCurrentValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
33
|
-
var
|
|
34
|
+
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "default";
|
|
35
|
+
var expressData = (_ExpressData$instance = ExpressData.instanceMap[type]) === null || _ExpressData$instance === void 0 ? void 0 : _ExpressData$instance.getExpressData();
|
|
36
|
+
var item = (expressData || []).filter(function (item) {
|
|
34
37
|
return item.label === name;
|
|
35
38
|
});
|
|
36
39
|
return item.length ? item[0].value : returnCurrentValue ? name : "";
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -10,4 +10,5 @@ export { default as request } from "./request";
|
|
|
10
10
|
import * as _servers from "./servers";
|
|
11
11
|
export { _servers as servers };
|
|
12
12
|
export * from "./utils";
|
|
13
|
-
export { SendDataCenter } from "./utils/SendData";
|
|
13
|
+
export { SendDataCenter } from "./utils/SendData";
|
|
14
|
+
export { getMapping, columnsGoodsList } from "./constants";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './logisticsData';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./logisticsData";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
import request from "../../request";
|
|
6
|
+
var queryJSTLogisticsList = function queryJSTLogisticsList() {
|
|
7
|
+
return request({
|
|
8
|
+
url: "/qy/gdfw/jst/erp/logistics/list",
|
|
9
|
+
method: "post",
|
|
10
|
+
data: {}
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export var getLogisticsDataAsync = /*#__PURE__*/function () {
|
|
14
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
15
|
+
var result, list, logisticsList;
|
|
16
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17
|
+
while (1) switch (_context.prev = _context.next) {
|
|
18
|
+
case 0:
|
|
19
|
+
_context.next = 2;
|
|
20
|
+
return queryJSTLogisticsList();
|
|
21
|
+
case 2:
|
|
22
|
+
result = _context.sent;
|
|
23
|
+
list = [];
|
|
24
|
+
logisticsList = (result === null || result === void 0 ? void 0 : result.data) || [];
|
|
25
|
+
logisticsList === null || logisticsList === void 0 ? void 0 : logisticsList.map(function (item) {
|
|
26
|
+
list.push({
|
|
27
|
+
label: item.lcName,
|
|
28
|
+
value: item.lcId
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
return _context.abrupt("return", list);
|
|
32
|
+
case 7:
|
|
33
|
+
case "end":
|
|
34
|
+
return _context.stop();
|
|
35
|
+
}
|
|
36
|
+
}, _callee);
|
|
37
|
+
}));
|
|
38
|
+
return function getLogisticsDataAsync() {
|
|
39
|
+
return _ref.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
}();
|
|
42
|
+
export default getLogisticsDataAsync;
|
|
@@ -12,12 +12,12 @@ export var getWarehouseDataAsync = function getWarehouseDataAsync() {
|
|
|
12
12
|
var warehouses = (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.warehouses) || [];
|
|
13
13
|
var list = [];
|
|
14
14
|
warehouses.map(function (_ref) {
|
|
15
|
-
var
|
|
15
|
+
var id = _ref.id,
|
|
16
16
|
name = _ref.name,
|
|
17
17
|
status = _ref.status;
|
|
18
18
|
list.push({
|
|
19
19
|
label: name,
|
|
20
|
-
value:
|
|
20
|
+
value: id,
|
|
21
21
|
disabled: status === 0
|
|
22
22
|
});
|
|
23
23
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './logisticsData';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./logisticsData";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
import request from "../../request";
|
|
6
|
+
var queryWLNLogisticsList = function queryWLNLogisticsList() {
|
|
7
|
+
return request({
|
|
8
|
+
url: "/qy/gdfw/wln/erp/logistics/list",
|
|
9
|
+
method: "post",
|
|
10
|
+
data: {}
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
export var getLogisticsDataAsync = /*#__PURE__*/function () {
|
|
14
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
15
|
+
var result, list, logisticsList;
|
|
16
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17
|
+
while (1) switch (_context.prev = _context.next) {
|
|
18
|
+
case 0:
|
|
19
|
+
_context.next = 2;
|
|
20
|
+
return queryWLNLogisticsList();
|
|
21
|
+
case 2:
|
|
22
|
+
result = _context.sent;
|
|
23
|
+
list = [];
|
|
24
|
+
logisticsList = (result === null || result === void 0 ? void 0 : result.data) || [];
|
|
25
|
+
logisticsList === null || logisticsList === void 0 ? void 0 : logisticsList.map(function (item) {
|
|
26
|
+
list.push({
|
|
27
|
+
label: item.logisticsName,
|
|
28
|
+
value: item.logisticsCode
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
return _context.abrupt("return", list);
|
|
32
|
+
case 7:
|
|
33
|
+
case "end":
|
|
34
|
+
return _context.stop();
|
|
35
|
+
}
|
|
36
|
+
}, _callee);
|
|
37
|
+
}));
|
|
38
|
+
return function getLogisticsDataAsync() {
|
|
39
|
+
return _ref.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
}();
|
|
42
|
+
export default getLogisticsDataAsync;
|
|
@@ -4,6 +4,8 @@ import BsAddressData from "../bsAddressData";
|
|
|
4
4
|
export * as BSE3 from './BSE3';
|
|
5
5
|
export * as WDT from './WDT';
|
|
6
6
|
export * as KM from './KM';
|
|
7
|
+
export * as JST from './JST';
|
|
8
|
+
export * as WLN from './WLN';
|
|
7
9
|
export declare const queryWdtAddressData: (instance?: WdtAddressData) => Promise<void>;
|
|
8
10
|
export declare const queryAddressData: (instance?: AddressData) => Promise<void>;
|
|
9
11
|
export declare const queryBsAddressData: (instance?: BsAddressData) => Promise<void>;
|
|
@@ -10,6 +10,10 @@ import * as _WDT from "./WDT";
|
|
|
10
10
|
export { _WDT as WDT };
|
|
11
11
|
import * as _KM from "./KM";
|
|
12
12
|
export { _KM as KM };
|
|
13
|
+
import * as _JST from "./JST";
|
|
14
|
+
export { _JST as JST };
|
|
15
|
+
import * as _WLN from "./WLN";
|
|
16
|
+
export { _WLN as WLN };
|
|
13
17
|
var transformData = function transformData(list) {
|
|
14
18
|
var map = {};
|
|
15
19
|
var res = {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
2
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
8
|
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
9
|
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
10
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
11
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
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; }
|
|
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
13
|
import uuid from "./getUUid";
|
|
14
14
|
export var BS_E3_BOOLEAN_STATUS_MAP = {
|
|
15
15
|
0: "否",
|
|
@@ -26,11 +26,11 @@ export var updateBsE3GoodsHandle = function updateBsE3GoodsHandle() {
|
|
|
26
26
|
var list = orders.reduce(function (prv, next) {
|
|
27
27
|
var _next$orderDetailGets;
|
|
28
28
|
var goods = next === null || next === void 0 ? void 0 : (_next$orderDetailGets = next.orderDetailGets) === null || _next$orderDetailGets === void 0 ? void 0 : _next$orderDetailGets.map(function (item) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
var _item$uuid;
|
|
30
|
+
item.mark = "是";
|
|
31
|
+
item.canDelete = true;
|
|
32
|
+
item.uuid = (_item$uuid = item.uuid) !== null && _item$uuid !== void 0 ? _item$uuid : uuid();
|
|
33
|
+
return item;
|
|
34
34
|
});
|
|
35
35
|
prv.push.apply(prv, _toConsumableArray(goods));
|
|
36
36
|
return prv;
|
|
@@ -203,7 +203,8 @@ export var bsE3OrderBackFormValues = function bsE3OrderBackFormValues() {
|
|
|
203
203
|
prv[uniqueKey] = {
|
|
204
204
|
bsE3SystemOrder: detail === null || detail === void 0 ? void 0 : detail.bsE3SystemOrder,
|
|
205
205
|
bsE3SystemOrderNo: detail === null || detail === void 0 ? void 0 : detail.bsE3SystemOrderNo,
|
|
206
|
-
|
|
206
|
+
bsE3ReissueType: ['1'],
|
|
207
|
+
bsE3ReissueGoods: (detail === null || detail === void 0 ? void 0 : detail.bsE3ReissueGoods) || []
|
|
207
208
|
};
|
|
208
209
|
break;
|
|
209
210
|
// case "BS_RETURN_GOODS":
|
|
@@ -289,17 +290,21 @@ export var bsE3OrderTransform = function bsE3OrderTransform(detail, form) {
|
|
|
289
290
|
billNo: item.orderSn
|
|
290
291
|
});
|
|
291
292
|
});
|
|
293
|
+
var onlyOneSystemOrder = (newOrderList === null || newOrderList === void 0 ? void 0 : newOrderList.length) === 1;
|
|
292
294
|
return {
|
|
293
295
|
bsE3SystemOrder: {
|
|
294
296
|
orderNo: orderNo,
|
|
295
297
|
orders: newOrderList,
|
|
296
|
-
selectIds:
|
|
298
|
+
selectIds: onlyOneSystemOrder ? orderList.map(function (item) {
|
|
297
299
|
return item.orderSn;
|
|
298
300
|
}) : [],
|
|
299
301
|
showOrderInfo: newOrderList
|
|
300
302
|
},
|
|
301
303
|
// TODO: 当只有一条系统单时默认选中该系统单
|
|
302
|
-
bsE3SystemOrderNo:
|
|
304
|
+
bsE3SystemOrderNo: onlyOneSystemOrder ? (_newOrderList$ = newOrderList[0]) === null || _newOrderList$ === void 0 ? void 0 : _newOrderList$.billNo : undefined,
|
|
305
|
+
bsE3ReissueGoods: onlyOneSystemOrder ? updateBsE3GoodsHandle([newOrderList[0]]).filter(function (good) {
|
|
306
|
+
return !isStrict || !orderNo || good.originalDealCode === orderNo;
|
|
307
|
+
}) : [],
|
|
303
308
|
bsE3Goods: {
|
|
304
309
|
// 订单反填,要清空orders,存的是当前系统订单号勾选上的 订单
|
|
305
310
|
orders: orderList || [],
|
|
@@ -20,7 +20,9 @@ var updateBsGoodsHandle = function updateBsGoodsHandle() {
|
|
|
20
20
|
giftType = item.giftType,
|
|
21
21
|
qty = item.qty,
|
|
22
22
|
amountShareSettle = item.amountShareSettle,
|
|
23
|
-
sharePrice = item.sharePrice
|
|
23
|
+
sharePrice = item.sharePrice,
|
|
24
|
+
batch = item.batch,
|
|
25
|
+
expireDate = item.expireDate;
|
|
24
26
|
return {
|
|
25
27
|
itemId: id,
|
|
26
28
|
mark: "是",
|
|
@@ -36,7 +38,9 @@ var updateBsGoodsHandle = function updateBsGoodsHandle() {
|
|
|
36
38
|
canDelete: true,
|
|
37
39
|
uuid: uuid(),
|
|
38
40
|
billNo: next === null || next === void 0 ? void 0 : next.billNo,
|
|
39
|
-
billId: next === null || next === void 0 ? void 0 : next.billId
|
|
41
|
+
billId: next === null || next === void 0 ? void 0 : next.billId,
|
|
42
|
+
batch: batch,
|
|
43
|
+
expireDate: expireDate
|
|
40
44
|
};
|
|
41
45
|
});
|
|
42
46
|
prv.push.apply(prv, _toConsumableArray(goods));
|
|
@@ -4,6 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
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; }
|
|
7
|
+
import ExpressData from "../expressData";
|
|
7
8
|
//重组聚水潭商品数据
|
|
8
9
|
var updateJSTItemListHandle = function updateJSTItemListHandle() {
|
|
9
10
|
var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -26,7 +27,7 @@ var updateJSTItemListHandle = function updateJSTItemListHandle() {
|
|
|
26
27
|
items: items
|
|
27
28
|
};
|
|
28
29
|
if (type === "logistics") {
|
|
29
|
-
params.logisticsCompany = item.logisticsCompany;
|
|
30
|
+
params.logisticsCompany = ExpressData.getInstance().getExpressCodeByName(item.logisticsCompany, true, "jst");
|
|
30
31
|
params.logisticsCode = item.lId;
|
|
31
32
|
} else if (type === "supply") {
|
|
32
33
|
if (["supplyId", "all"].includes(showField || "")) {
|
|
@@ -83,7 +83,7 @@ var KM_ORDER_STATUS = {
|
|
|
83
83
|
};
|
|
84
84
|
export var KM_SYSTEM_ORDER_CONFIG = {
|
|
85
85
|
key: 'kmSystemShowOrder',
|
|
86
|
-
name: '
|
|
86
|
+
name: '快麦',
|
|
87
87
|
selectId: 'kmSystemSelectIds',
|
|
88
88
|
columns: [{
|
|
89
89
|
dataIndex: 'billType',
|
|
@@ -115,10 +115,6 @@ export var KM_SYSTEM_ORDER_CONFIG = {
|
|
|
115
115
|
};
|
|
116
116
|
var updateKmItemListHandle = function updateKmItemListHandle(list, type, comList, form) {
|
|
117
117
|
var _newList;
|
|
118
|
-
console.log(" 发货仓数据转换", {
|
|
119
|
-
list: list,
|
|
120
|
-
type: type
|
|
121
|
-
});
|
|
122
118
|
if (type === "logistics") {
|
|
123
119
|
var _comList$find, _currentCom$component;
|
|
124
120
|
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) {
|
|
@@ -153,10 +149,10 @@ var updateKmItemListHandle = function updateKmItemListHandle(list, type, comList
|
|
|
153
149
|
var newList = list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
|
|
154
150
|
var items = (next.subOrders || []).map(function (t) {
|
|
155
151
|
return {
|
|
156
|
-
title: (t === null || t === void 0 ? void 0 : t.
|
|
152
|
+
title: (t === null || t === void 0 ? void 0 : t.sysTitle) || (t === null || t === void 0 ? void 0 : t.sysSkuPropertiesName) || "",
|
|
157
153
|
picUrl: (t === null || t === void 0 ? void 0 : t.imageUrl) || "",
|
|
158
154
|
platform: "km",
|
|
159
|
-
skuId: (t === null || t === void 0 ? void 0 : t.
|
|
155
|
+
skuId: (t === null || t === void 0 ? void 0 : t.sysOuterId) || ""
|
|
160
156
|
};
|
|
161
157
|
});
|
|
162
158
|
var params = {
|
|
@@ -170,6 +166,8 @@ var updateKmItemListHandle = function updateKmItemListHandle(list, type, comList
|
|
|
170
166
|
params.sendId = next.warehouseId;
|
|
171
167
|
// 名字是一个下拉框,最终存的是id,所以这个地方要用warehouseNo反填
|
|
172
168
|
params.sendName = next.warehouseId;
|
|
169
|
+
params.sendSnapshotName = next.warehouseName;
|
|
170
|
+
params.sid = next.sid;
|
|
173
171
|
}
|
|
174
172
|
prv.push(params);
|
|
175
173
|
return prv;
|
|
@@ -213,6 +211,7 @@ var updateKmItemListByConfigHandle = function updateKmItemListByConfigHandle(lis
|
|
|
213
211
|
}
|
|
214
212
|
if (!["sendName", "all"].includes(showField || "")) {
|
|
215
213
|
next.sendName = undefined;
|
|
214
|
+
next.sendSnapshotName = undefined;
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
217
|
prv.push(next);
|
|
@@ -32,7 +32,8 @@ var taobaoGoodHandle = function taobaoGoodHandle() {
|
|
|
32
32
|
price = item.price,
|
|
33
33
|
outerId = item.outerId,
|
|
34
34
|
platform = item.platform,
|
|
35
|
-
skuInfoDTO = item.skuInfoDTO
|
|
35
|
+
skuInfoDTO = item.skuInfoDTO,
|
|
36
|
+
num = item.num;
|
|
36
37
|
var params = {
|
|
37
38
|
numIid: numIid,
|
|
38
39
|
title: title,
|
|
@@ -52,6 +53,7 @@ var taobaoGoodHandle = function taobaoGoodHandle() {
|
|
|
52
53
|
}
|
|
53
54
|
if (type === "ITEM_ENCODE") {
|
|
54
55
|
params.outerId = outerId;
|
|
56
|
+
params.num = num;
|
|
55
57
|
if (skuInfoDTO !== null && skuInfoDTO !== void 0 && skuInfoDTO.outerSkuId) {
|
|
56
58
|
params.outerSkuId = skuInfoDTO === null || skuInfoDTO === void 0 ? void 0 : skuInfoDTO.outerSkuId;
|
|
57
59
|
}
|
|
@@ -229,6 +231,6 @@ export default (function (_ref) {
|
|
|
229
231
|
var wdtValues = wdtOrderBackFormValues(detail["wdtOrder"], templateDetail);
|
|
230
232
|
var bsE3Values = bsE3OrderBackFormValues(detail["bsE3Order"], templateDetail);
|
|
231
233
|
var kmValues = kmOrderBackFormValues(detail["kmOrder"], templateDetail);
|
|
232
|
-
console.log(
|
|
234
|
+
console.log("bsE3Values", bsE3Values);
|
|
233
235
|
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues);
|
|
234
236
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default (function (key) {
|
|
2
|
-
return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "checkbox", "multSelect", "rate", "picture", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtLogisticsCompany", "wdtLogisticsList", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode",
|
|
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"].reduce(function (cur, nxt) {
|
|
3
3
|
return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
|
|
4
4
|
}, false);
|
|
5
5
|
});
|
|
@@ -34,11 +34,12 @@ export var updateWdtGoodsHandle = function updateWdtGoodsHandle() {
|
|
|
34
34
|
return orders === null || orders === void 0 ? void 0 : orders.reduce(function (acc, cur) {
|
|
35
35
|
if (Array.isArray(cur.goodDetails)) {
|
|
36
36
|
acc.push.apply(acc, _toConsumableArray(cur.goodDetails.map(function (item) {
|
|
37
|
+
var _item$uuid;
|
|
37
38
|
item.goodId = item.goodsId;
|
|
38
39
|
item.goodName = item.goodsName;
|
|
39
40
|
item.goodNo = item.goodsNo;
|
|
40
41
|
item.canDelete = true;
|
|
41
|
-
item.uuid = uuid();
|
|
42
|
+
item.uuid = (_item$uuid = item.uuid) !== null && _item$uuid !== void 0 ? _item$uuid : uuid();
|
|
42
43
|
return item;
|
|
43
44
|
})));
|
|
44
45
|
}
|
|
@@ -97,6 +98,7 @@ var updateWdtItemListHandle = function updateWdtItemListHandle(list, type, comLi
|
|
|
97
98
|
params.sendId = next.warehouseNo;
|
|
98
99
|
// 旺店通名字是一个下拉框,最终存的是id,所以这个地方要用warehouseNo反填
|
|
99
100
|
params.sendName = next.warehouseNo;
|
|
101
|
+
params.sendSnapshotName = next.warehouseName;
|
|
100
102
|
}
|
|
101
103
|
prv.push(params);
|
|
102
104
|
return prv;
|
|
@@ -145,6 +147,7 @@ var updateWdtItemListByConfigHandle = function updateWdtItemListByConfigHandle(l
|
|
|
145
147
|
}
|
|
146
148
|
if (!["sendName", "all"].includes(showField || "")) {
|
|
147
149
|
next.sendName = undefined;
|
|
150
|
+
next.sendSnapshotName = undefined;
|
|
148
151
|
}
|
|
149
152
|
}
|
|
150
153
|
prv.push(next);
|
|
@@ -185,7 +188,8 @@ export var wdtOrderBackFormValues = function wdtOrderBackFormValues() {
|
|
|
185
188
|
prv[uniqueKey] = {
|
|
186
189
|
wdtSystemOrder: detail === null || detail === void 0 ? void 0 : detail.wdtSystemOrder,
|
|
187
190
|
wdtReissueGoods: detail === null || detail === void 0 ? void 0 : detail.wdtReissueGoods,
|
|
188
|
-
wdtSystemOrderNo: null
|
|
191
|
+
wdtSystemOrderNo: detail === null || detail === void 0 ? void 0 : detail.wdtSystemOrderNo,
|
|
192
|
+
wdtReissueType: ['1']
|
|
189
193
|
};
|
|
190
194
|
break;
|
|
191
195
|
case "WDT_LOGISTICS":
|
|
@@ -231,7 +235,7 @@ export var wdtOrderBackFormValues = function wdtOrderBackFormValues() {
|
|
|
231
235
|
};
|
|
232
236
|
//wdt订单信息转换
|
|
233
237
|
export var wdtOrderTransform = function wdtOrderTransform(detail, form) {
|
|
234
|
-
var _form$getFieldValue, _detail$trades2, _currentTrades$find, _currentTrades$find$c;
|
|
238
|
+
var _form$getFieldValue, _detail$trades2, _currentTrades$, _currentTrades$find, _currentTrades$find$c;
|
|
235
239
|
var orderNo = detail.orderNo,
|
|
236
240
|
_detail$trades = detail.trades,
|
|
237
241
|
currentTrades = _detail$trades === void 0 ? [] : _detail$trades,
|
|
@@ -240,6 +244,7 @@ export var wdtOrderTransform = function wdtOrderTransform(detail, form) {
|
|
|
240
244
|
return com.workOrderComponentType === 'WDT_GOODS';
|
|
241
245
|
});
|
|
242
246
|
var isStrict = wdtGoodsCom ? (_form$getFieldValue = form.getFieldValue(wdtGoodsCom.uniqueKey)) === null || _form$getFieldValue === void 0 ? void 0 : _form$getFieldValue.isStrict : false;
|
|
247
|
+
var onlyOneSystemOrder = (detail === null || detail === void 0 ? void 0 : (_detail$trades2 = detail.trades) === null || _detail$trades2 === void 0 ? void 0 : _detail$trades2.length) === 1;
|
|
243
248
|
return {
|
|
244
249
|
wdtSystemOrder: {
|
|
245
250
|
orderNo: orderNo,
|
|
@@ -250,7 +255,7 @@ export var wdtOrderTransform = function wdtOrderTransform(detail, form) {
|
|
|
250
255
|
billTag: item.tagName
|
|
251
256
|
});
|
|
252
257
|
}),
|
|
253
|
-
selectIds:
|
|
258
|
+
selectIds: onlyOneSystemOrder ? currentTrades.map(function (item) {
|
|
254
259
|
return item.tradeNo;
|
|
255
260
|
}) : [],
|
|
256
261
|
showOrderInfo: currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.map(function (item) {
|
|
@@ -261,6 +266,10 @@ export var wdtOrderTransform = function wdtOrderTransform(detail, form) {
|
|
|
261
266
|
};
|
|
262
267
|
})
|
|
263
268
|
},
|
|
269
|
+
wdtSystemOrderNo: onlyOneSystemOrder ? (_currentTrades$ = currentTrades[0]) === null || _currentTrades$ === void 0 ? void 0 : _currentTrades$.tradeNo : undefined,
|
|
270
|
+
wdtReissueGoods: onlyOneSystemOrder ? updateWdtGoodsHandle([currentTrades[0]]).filter(function (good) {
|
|
271
|
+
return !isStrict || !orderNo || good.srcTid === orderNo;
|
|
272
|
+
}) : [],
|
|
264
273
|
wdtGoods: {
|
|
265
274
|
// 订单反填,要清空orders,存的是当前系统订单号勾选上的 订单
|
|
266
275
|
orders: currentTrades,
|
|
@@ -59,7 +59,7 @@ var updateWlnItemListHandle = function updateWlnItemListHandle(list, type) {
|
|
|
59
59
|
items: items
|
|
60
60
|
};
|
|
61
61
|
if (type === "logistics") {
|
|
62
|
-
params.logisticsCompany = ExpressData.getInstance().getExpressCodeByName(next.logisticName);
|
|
62
|
+
params.logisticsCompany = ExpressData.getInstance().getExpressCodeByName(next.logisticName, true, "wln");
|
|
63
63
|
params.logisticsCode = next === null || next === void 0 ? void 0 : next.expressCode;
|
|
64
64
|
} else if (type === "send") {
|
|
65
65
|
params.sendId = next.storageCode;
|
|
@@ -26,6 +26,7 @@ export default class WdtAddressData {
|
|
|
26
26
|
value: string;
|
|
27
27
|
}[];
|
|
28
28
|
getProCodeByName: (proName: string) => number | undefined;
|
|
29
|
+
getCodesByNames: (names: Array<string>) => (string | undefined)[];
|
|
29
30
|
getNameByCode: (code: string | number) => string;
|
|
30
31
|
static initData: () => Promise<WdtAddressData>;
|
|
31
32
|
static getAddressOptions: () => Promise<TreeOption[]>;
|
|
@@ -2,12 +2,16 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
|
|
|
2
2
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
3
3
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
4
4
|
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); }
|
|
5
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
|
+
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); }
|
|
7
|
+
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; }
|
|
5
8
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
9
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
10
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
11
|
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
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
13
|
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); }
|
|
14
|
+
import { isEmpty } from 'lodash';
|
|
11
15
|
import { queryWdtAddressData } from "../servers";
|
|
12
16
|
var WdtAddressData = /*#__PURE__*/function () {
|
|
13
17
|
function WdtAddressData() {
|
|
@@ -49,6 +53,32 @@ var WdtAddressData = /*#__PURE__*/function () {
|
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
});
|
|
56
|
+
_defineProperty(this, "getCodesByNames", function (names) {
|
|
57
|
+
var codes = [];
|
|
58
|
+
var currentData = _this.addressOptions;
|
|
59
|
+
var _iterator = _createForOfIteratorHelper(names),
|
|
60
|
+
_step;
|
|
61
|
+
try {
|
|
62
|
+
var _loop = function _loop() {
|
|
63
|
+
var name = _step.value;
|
|
64
|
+
var foundChild = currentData.find(function (item) {
|
|
65
|
+
return item.label === name;
|
|
66
|
+
});
|
|
67
|
+
codes.push(foundChild === null || foundChild === void 0 ? void 0 : foundChild.value); // 添加找到的 code
|
|
68
|
+
if (!isEmpty(foundChild === null || foundChild === void 0 ? void 0 : foundChild.children)) {
|
|
69
|
+
currentData = (foundChild === null || foundChild === void 0 ? void 0 : foundChild.children) || []; // 更新当前数据为找到的子节点
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
73
|
+
_loop();
|
|
74
|
+
}
|
|
75
|
+
} catch (err) {
|
|
76
|
+
_iterator.e(err);
|
|
77
|
+
} finally {
|
|
78
|
+
_iterator.f();
|
|
79
|
+
}
|
|
80
|
+
return codes; // 返回所有找到的 codes
|
|
81
|
+
});
|
|
52
82
|
_defineProperty(this, "getNameByCode", function (code) {
|
|
53
83
|
var _ref;
|
|
54
84
|
return (_ref = (_this.addrData || {})[code] || []) === null || _ref === void 0 ? void 0 : _ref[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-utils",
|
|
3
|
-
"version": "1.22.1-beta.
|
|
3
|
+
"version": "1.22.1-beta.41",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "15ea423b86ffa1f6e7394bca1ee5b9220ba4c283",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|