@kmkf-fe-packages/kmkf-utils 2.2.44-beta.4 → 2.2.44-beta.40
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/baseAddressData/constants/jkyAddressData.d.ts +12 -0
- package/dist/esm/baseAddressData/constants/jkyAddressData.js +83 -0
- package/dist/esm/baseAddressData/index.d.ts +1 -0
- package/dist/esm/baseAddressData/index.js +2 -1
- package/dist/esm/constants/constant.d.ts +1 -0
- package/dist/esm/constants/constant.js +1 -0
- package/dist/esm/servers/JKY/logisticsData.js +33 -37
- package/dist/esm/servers/JKY/warehouseData.d.ts +1 -0
- package/dist/esm/servers/JKY/warehouseData.js +6 -4
- package/dist/esm/servers/index.d.ts +2 -1
- package/dist/esm/servers/index.js +17 -1
- package/dist/esm/utils/SendData.d.ts +2 -0
- package/dist/esm/utils/SendData.js +6 -0
- package/dist/esm/utils/index.d.ts +2 -2
- package/dist/esm/utils/index.js +2 -2
- package/dist/esm/utils/jkyOrderBackFormValues.d.ts +92 -18
- package/dist/esm/utils/jkyOrderBackFormValues.js +178 -59
- package/dist/esm/utils/kmOrderBackFormValues.d.ts +6 -0
- package/dist/esm/utils/kmOrderBackFormValues.js +7 -0
- package/dist/esm/utils/orderBackFormValues.js +3 -1
- package/dist/esm/utils/unTransField.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
112311111
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import BaseAddressData from "../baseAddressData";
|
|
2
|
+
import type { TreeOption } from "../type";
|
|
3
|
+
export default class JkyAddressData extends BaseAddressData {
|
|
4
|
+
private static instance;
|
|
5
|
+
private static initSingleton;
|
|
6
|
+
addrData: Record<string, [string, string | number]>;
|
|
7
|
+
addrNameMap: Record<string, string>;
|
|
8
|
+
addressOptions: TreeOption[];
|
|
9
|
+
static initData: () => Promise<JkyAddressData>;
|
|
10
|
+
static getAddressOptions: () => Promise<TreeOption[]>;
|
|
11
|
+
static getInstance(): JkyAddressData;
|
|
12
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
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; }
|
|
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
|
+
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
|
+
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
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); } }
|
|
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; }
|
|
8
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
12
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
13
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
15
|
+
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; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
17
|
+
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); }
|
|
18
|
+
import BaseAddressData from "../baseAddressData";
|
|
19
|
+
import { queryJkyAddressData } from "../../servers";
|
|
20
|
+
var JkyAddressData = /*#__PURE__*/function (_BaseAddressData) {
|
|
21
|
+
_inherits(JkyAddressData, _BaseAddressData);
|
|
22
|
+
var _super = _createSuper(JkyAddressData);
|
|
23
|
+
function JkyAddressData() {
|
|
24
|
+
var _this;
|
|
25
|
+
_classCallCheck(this, JkyAddressData);
|
|
26
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27
|
+
args[_key] = arguments[_key];
|
|
28
|
+
}
|
|
29
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
30
|
+
_defineProperty(_assertThisInitialized(_this), "addrData", {});
|
|
31
|
+
_defineProperty(_assertThisInitialized(_this), "addrNameMap", {});
|
|
32
|
+
_defineProperty(_assertThisInitialized(_this), "addressOptions", []);
|
|
33
|
+
return _this;
|
|
34
|
+
}
|
|
35
|
+
_createClass(JkyAddressData, null, [{
|
|
36
|
+
key: "getInstance",
|
|
37
|
+
value: function getInstance() {
|
|
38
|
+
if (!JkyAddressData.instance) {
|
|
39
|
+
JkyAddressData.instance = new JkyAddressData();
|
|
40
|
+
}
|
|
41
|
+
return JkyAddressData.instance;
|
|
42
|
+
}
|
|
43
|
+
}]);
|
|
44
|
+
return JkyAddressData;
|
|
45
|
+
}(BaseAddressData);
|
|
46
|
+
_defineProperty(JkyAddressData, "instance", void 0);
|
|
47
|
+
_defineProperty(JkyAddressData, "initSingleton", void 0);
|
|
48
|
+
_defineProperty(JkyAddressData, "initData", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
49
|
+
var instance;
|
|
50
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
51
|
+
while (1) switch (_context.prev = _context.next) {
|
|
52
|
+
case 0:
|
|
53
|
+
instance = JkyAddressData.getInstance();
|
|
54
|
+
if (!JkyAddressData.initSingleton) {
|
|
55
|
+
JkyAddressData.initSingleton = queryJkyAddressData().catch(function (e) {
|
|
56
|
+
console.warn("init jst data e", e);
|
|
57
|
+
JkyAddressData.initSingleton = null;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
_context.next = 4;
|
|
61
|
+
return JkyAddressData.initSingleton;
|
|
62
|
+
case 4:
|
|
63
|
+
return _context.abrupt("return", instance);
|
|
64
|
+
case 5:
|
|
65
|
+
case "end":
|
|
66
|
+
return _context.stop();
|
|
67
|
+
}
|
|
68
|
+
}, _callee);
|
|
69
|
+
})));
|
|
70
|
+
_defineProperty(JkyAddressData, "getAddressOptions", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
71
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
72
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
73
|
+
case 0:
|
|
74
|
+
return _context2.abrupt("return", JkyAddressData.initData().then(function () {
|
|
75
|
+
return JkyAddressData.instance.addressOptions || [];
|
|
76
|
+
}));
|
|
77
|
+
case 1:
|
|
78
|
+
case "end":
|
|
79
|
+
return _context2.stop();
|
|
80
|
+
}
|
|
81
|
+
}, _callee2);
|
|
82
|
+
})));
|
|
83
|
+
export { JkyAddressData as default };
|
|
@@ -3,3 +3,4 @@ export { default as BsAddressData } from "./constants/bsAddressData";
|
|
|
3
3
|
export { default as WdtAddressData } from "./constants/wdtAddressData";
|
|
4
4
|
export { default as GyAddressData } from "./constants/gyAddressData";
|
|
5
5
|
export { default as JstAddressData } from "./constants/jstAddressData";
|
|
6
|
+
export { default as JkyAddressData } from "./constants/jkyAddressData";
|
|
@@ -2,4 +2,5 @@ export { default as AddressData } from "./constants/addressData";
|
|
|
2
2
|
export { default as BsAddressData } from "./constants/bsAddressData";
|
|
3
3
|
export { default as WdtAddressData } from "./constants/wdtAddressData";
|
|
4
4
|
export { default as GyAddressData } from "./constants/gyAddressData";
|
|
5
|
-
export { default as JstAddressData } from "./constants/jstAddressData";
|
|
5
|
+
export { default as JstAddressData } from "./constants/jstAddressData";
|
|
6
|
+
export { default as JkyAddressData } from "./constants/jkyAddressData";
|
|
@@ -100,6 +100,7 @@ export declare const DATA_SPLIT_COMPONENT_FIELDS_MAP: {
|
|
|
100
100
|
JST_SYSTEM_ORDER: string[];
|
|
101
101
|
JST_GOODS: string[];
|
|
102
102
|
JST_REISSUE_GOODS: string[];
|
|
103
|
+
JKY_SYSTEM_ORDER: string[];
|
|
103
104
|
PICTURE_PRO: string[];
|
|
104
105
|
};
|
|
105
106
|
export declare const SEARCH_OPTIONS: {
|
|
@@ -173,6 +173,7 @@ export var DATA_SPLIT_COMPONENT_FIELDS_MAP = {
|
|
|
173
173
|
JST_SYSTEM_ORDER: ["jstSystemShowOrder"],
|
|
174
174
|
JST_GOODS: ["jstGoods"],
|
|
175
175
|
JST_REISSUE_GOODS: ["jstReissueGoods"],
|
|
176
|
+
JKY_SYSTEM_ORDER: ["jkySystemShowOrder"],
|
|
176
177
|
PICTURE_PRO: ["pictureProList"]
|
|
177
178
|
};
|
|
178
179
|
export var SEARCH_OPTIONS = [{
|
|
@@ -1,43 +1,39 @@
|
|
|
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
1
|
import request from "../../request";
|
|
6
|
-
|
|
2
|
+
import { fetchAll } from "../../utils";
|
|
3
|
+
var queryJKYLogisticsList = function queryJKYLogisticsList(_ref) {
|
|
4
|
+
var pageNo = _ref.pageNo,
|
|
5
|
+
pageSize = _ref.pageSize;
|
|
7
6
|
return request({
|
|
8
|
-
url: "/qy/gdfw/jky/erp/logistics/
|
|
7
|
+
url: "/qy/gdfw/jky/erp/logistics/get",
|
|
9
8
|
method: "post",
|
|
10
|
-
data: {
|
|
9
|
+
data: {
|
|
10
|
+
pageNo: pageNo,
|
|
11
|
+
pageSize: pageSize,
|
|
12
|
+
hasDeletedData: true
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
export var getLogisticsDataAsync = function getLogisticsDataAsync() {
|
|
17
|
+
return fetchAll("JKY_LOGISTICS_DATA", queryJKYLogisticsList, function (data) {
|
|
18
|
+
var list = [];
|
|
19
|
+
var logistics = data || [];
|
|
20
|
+
logistics.map(function (_ref2) {
|
|
21
|
+
var logisticCode = _ref2.logisticCode,
|
|
22
|
+
logisticName = _ref2.logisticName;
|
|
23
|
+
list.push({
|
|
24
|
+
label: logisticName,
|
|
25
|
+
value: logisticCode
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var valueMap = {};
|
|
29
|
+
list.forEach(function (item) {
|
|
30
|
+
valueMap[item.value] = item; // 每次遇到相同的 code,更新为最新的对象
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return Object.values(valueMap);
|
|
34
|
+
}, {
|
|
35
|
+
pageNo: 1,
|
|
36
|
+
pageSize: 100
|
|
11
37
|
});
|
|
12
38
|
};
|
|
13
|
-
export var getLogisticsDataAsync = /*#__PURE__*/function () {
|
|
14
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
15
|
-
var _result$data;
|
|
16
|
-
var result, list, logisticsList;
|
|
17
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
|
-
while (1) switch (_context.prev = _context.next) {
|
|
19
|
-
case 0:
|
|
20
|
-
_context.next = 2;
|
|
21
|
-
return queryJKYLogisticsList();
|
|
22
|
-
case 2:
|
|
23
|
-
result = _context.sent;
|
|
24
|
-
list = [];
|
|
25
|
-
logisticsList = (result === null || result === void 0 ? void 0 : (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.logisticsList) || [];
|
|
26
|
-
logisticsList === null || logisticsList === void 0 ? void 0 : logisticsList.map(function (item) {
|
|
27
|
-
list.push({
|
|
28
|
-
label: item.globalExpressName,
|
|
29
|
-
value: item.globalExpressCode
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
return _context.abrupt("return", list);
|
|
33
|
-
case 7:
|
|
34
|
-
case "end":
|
|
35
|
-
return _context.stop();
|
|
36
|
-
}
|
|
37
|
-
}, _callee);
|
|
38
|
-
}));
|
|
39
|
-
return function getLogisticsDataAsync() {
|
|
40
|
-
return _ref.apply(this, arguments);
|
|
41
|
-
};
|
|
42
|
-
}();
|
|
43
39
|
export default getLogisticsDataAsync;
|
|
@@ -4,7 +4,7 @@ var queryWarehouseList = function queryWarehouseList(_ref) {
|
|
|
4
4
|
var pageNo = _ref.pageNo,
|
|
5
5
|
pageSize = _ref.pageSize;
|
|
6
6
|
return request({
|
|
7
|
-
url: "/qy/gdfw/jky/erp/warehouse/
|
|
7
|
+
url: "/qy/gdfw/jky/erp/warehouse/get",
|
|
8
8
|
method: "post",
|
|
9
9
|
data: {
|
|
10
10
|
pageNo: pageNo,
|
|
@@ -16,13 +16,15 @@ var queryWarehouseList = function queryWarehouseList(_ref) {
|
|
|
16
16
|
export var getWarehouseDataAsync = function getWarehouseDataAsync() {
|
|
17
17
|
return fetchAll("JKY_WAREHOUSE_DATA", queryWarehouseList, function (data) {
|
|
18
18
|
var list = [];
|
|
19
|
-
var warehouses =
|
|
19
|
+
var warehouses = data || [];
|
|
20
20
|
warehouses.map(function (_ref2) {
|
|
21
21
|
var warehouseCode = _ref2.warehouseCode,
|
|
22
|
-
warehouseName = _ref2.warehouseName
|
|
22
|
+
warehouseName = _ref2.warehouseName,
|
|
23
|
+
warehouseId = _ref2.warehouseId;
|
|
23
24
|
list.push({
|
|
24
25
|
label: warehouseName,
|
|
25
|
-
value: warehouseCode
|
|
26
|
+
value: warehouseCode,
|
|
27
|
+
id: warehouseId
|
|
26
28
|
});
|
|
27
29
|
});
|
|
28
30
|
var valueMap = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WdtAddressData, GyAddressData, BsAddressData, AddressData, JstAddressData } from "../baseAddressData";
|
|
1
|
+
import { WdtAddressData, GyAddressData, BsAddressData, AddressData, JstAddressData, JkyAddressData } from "../baseAddressData";
|
|
2
2
|
export * from "./utils";
|
|
3
3
|
export * as BSE3 from "./BSE3";
|
|
4
4
|
export * as WDT from "./WDT";
|
|
@@ -18,6 +18,7 @@ export declare const queryGyAddressData: (instance?: GyAddressData) => Promise<v
|
|
|
18
18
|
export declare const queryAddressData: (instance?: AddressData) => Promise<void>;
|
|
19
19
|
export declare const queryBsAddressData: (instance?: BsAddressData) => Promise<void>;
|
|
20
20
|
export declare const queryJstAddressData: (instance?: JstAddressData) => Promise<void>;
|
|
21
|
+
export declare const queryJkyAddressData: (instance?: JkyAddressData) => Promise<void>;
|
|
21
22
|
export declare const queryWdtWarehouseList: (pageNo: number, pageSize: number) => Promise<import("../request/index").serverProps<{
|
|
22
23
|
warehouses: {
|
|
23
24
|
warehouseNo: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import get from "lodash/get";
|
|
2
|
-
import { WdtAddressData, GyAddressData, BsAddressData, AddressData, JstAddressData } from "../baseAddressData";
|
|
2
|
+
import { WdtAddressData, GyAddressData, BsAddressData, AddressData, JstAddressData, JkyAddressData } from "../baseAddressData";
|
|
3
3
|
import toTree from "../utils/toTree";
|
|
4
4
|
import request from "../request/index";
|
|
5
5
|
export * from "./utils";
|
|
@@ -119,6 +119,22 @@ export var queryJstAddressData = function queryJstAddressData() {
|
|
|
119
119
|
instance.addressOptions = toTree(list, 1);
|
|
120
120
|
});
|
|
121
121
|
};
|
|
122
|
+
export var queryJkyAddressData = function queryJkyAddressData() {
|
|
123
|
+
var instance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : JkyAddressData.getInstance();
|
|
124
|
+
return request({
|
|
125
|
+
url: "/qy/gdfw/template/queryJkyAreas/noLogin",
|
|
126
|
+
method: "get",
|
|
127
|
+
data: {}
|
|
128
|
+
}).then(function (resp) {
|
|
129
|
+
var list = resp.data || [];
|
|
130
|
+
var _transformData6 = transformData(list),
|
|
131
|
+
res = _transformData6.res,
|
|
132
|
+
map = _transformData6.map;
|
|
133
|
+
instance.addrData = res;
|
|
134
|
+
instance.addrNameMap = map;
|
|
135
|
+
instance.addressOptions = toTree(list, 1);
|
|
136
|
+
});
|
|
137
|
+
};
|
|
122
138
|
export var queryWdtWarehouseList = function queryWdtWarehouseList(pageNo, pageSize) {
|
|
123
139
|
return request({
|
|
124
140
|
url: "/qy/gdfw/wdt/erp/warehouse/list",
|
|
@@ -3,6 +3,7 @@ interface OptionsItem {
|
|
|
3
3
|
value: string | number;
|
|
4
4
|
disabled: boolean;
|
|
5
5
|
isMain?: boolean;
|
|
6
|
+
id?: string;
|
|
6
7
|
}
|
|
7
8
|
declare type SendGoodPlatform = string;
|
|
8
9
|
declare class SendData {
|
|
@@ -16,6 +17,7 @@ declare class SendData {
|
|
|
16
17
|
getSendNameByCode: (code: string | number, returnCurrentValue?: boolean) => string | number;
|
|
17
18
|
getSendCodeByName: (name: string | number, returnCurrentValue?: boolean) => string | number;
|
|
18
19
|
getMainWmsCoId: () => string | number;
|
|
20
|
+
getSendCodeById: (id: string) => string | number;
|
|
19
21
|
}
|
|
20
22
|
export declare class SendDataCenter {
|
|
21
23
|
static instanceMap: Map<SendGoodPlatform, SendData>;
|
|
@@ -58,6 +58,12 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
|
|
|
58
58
|
return item === null || item === void 0 ? void 0 : item.isMain;
|
|
59
59
|
})) === null || _this$sendData$find === void 0 ? void 0 : _this$sendData$find.value) || "";
|
|
60
60
|
});
|
|
61
|
+
_defineProperty(this, "getSendCodeById", function (id) {
|
|
62
|
+
var _this$sendData$find2;
|
|
63
|
+
return ((_this$sendData$find2 = _this.sendData.find(function (item) {
|
|
64
|
+
return (item === null || item === void 0 ? void 0 : item.id) === id;
|
|
65
|
+
})) === null || _this$sendData$find2 === void 0 ? void 0 : _this$sendData$find2.value) || "";
|
|
66
|
+
});
|
|
61
67
|
this.platform = platform;
|
|
62
68
|
this.service = {
|
|
63
69
|
bsE3: BSE3,
|
|
@@ -14,10 +14,10 @@ export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, fil
|
|
|
14
14
|
export { WLN_SYSTEM_ORDER_CONFIG, wlnOrderBackFormValues, wlnOrderTransform, } from "./wlnOrderBackFormValues";
|
|
15
15
|
export { WDT_RETURN_BILL_NO_CONFIG, WDT_SYSTEM_ORDER_CONFIG, wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle, updateWdtAftersaleGoodsHandle, tradeStatusMap, } from "./wdtOrderBackFormValues";
|
|
16
16
|
export * from "./jstOrderBackFormValues";
|
|
17
|
-
export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders, updateKmGoodsHandle, handleKmAddressIdentify, } from "./kmOrderBackFormValues";
|
|
17
|
+
export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders, updateKmGoodsHandle, handleKmAddressIdentify, kmSkuTypeMap, } from "./kmOrderBackFormValues";
|
|
18
18
|
export { getIsPlatformCodesIncludeOrderNos, GY_DELIVERY_STATE_MAPPING, GY_SYSTEM_ORDER_CONFIG, updateGyGoodsHandle, gyOrderTransform, gyOrderBackFormValues, filterGyOrders, } from "./gyOrderBackFormValues";
|
|
19
19
|
export { filterJyOrders, jyOrderBackFormValues, jyOrderTransform, updateJyGoodsHandle, JY_SYSTEM_ORDER_CONFIG, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, } from "./jyOrderBackFormValues";
|
|
20
|
-
export { jkyOrderBackFormValues, jkyOrderTransform, updateJkyGoodsHandle, JKY_SYSTEM_ORDER_CONFIG, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, filterJkyOrders, } from "./jkyOrderBackFormValues";
|
|
20
|
+
export { jkyOrderBackFormValues, jkyOrderTransform, updateJkyGoodsHandle, JKY_SYSTEM_ORDER_CONFIG, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, JKY_ORDER_FROM_MAP, filterJkyOrders, getJkyLogisticInfo, } from "./jkyOrderBackFormValues";
|
|
21
21
|
export { formatTrade, skxOrderBackFormValues, updateSkxGoodsHandle, skxOrderTransform, skxSystemOrderBackValues, } from "./skxOrderBackFormValues";
|
|
22
22
|
export { updateOrderSubFormGoodsHandle, orderSubFormOrderBackFormValues, orderSubFormOrderTransform, } from "./orderSubFormOrderBackFormValues";
|
|
23
23
|
export { formatReturnTrade, skxReturnOrderBackFormValues, updateSkxReturnGoodsHandle, skxReturnOrderTransform, skxReturnSystemOrderBackValues, } from "./skxReturnOrderBackFormValues";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -15,10 +15,10 @@ export { WLN_SYSTEM_ORDER_CONFIG, wlnOrderBackFormValues, wlnOrderTransform } fr
|
|
|
15
15
|
export { WDT_RETURN_BILL_NO_CONFIG, WDT_SYSTEM_ORDER_CONFIG, wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle, updateWdtAftersaleGoodsHandle, tradeStatusMap } from "./wdtOrderBackFormValues";
|
|
16
16
|
// export { default as jstOrderBackFormValues } from "./jstOrderBackFormValues";
|
|
17
17
|
export * from "./jstOrderBackFormValues";
|
|
18
|
-
export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders, updateKmGoodsHandle, handleKmAddressIdentify } from "./kmOrderBackFormValues";
|
|
18
|
+
export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders, updateKmGoodsHandle, handleKmAddressIdentify, kmSkuTypeMap } from "./kmOrderBackFormValues";
|
|
19
19
|
export { getIsPlatformCodesIncludeOrderNos, GY_DELIVERY_STATE_MAPPING, GY_SYSTEM_ORDER_CONFIG, updateGyGoodsHandle, gyOrderTransform, gyOrderBackFormValues, filterGyOrders } from "./gyOrderBackFormValues";
|
|
20
20
|
export { filterJyOrders, jyOrderBackFormValues, jyOrderTransform, updateJyGoodsHandle, JY_SYSTEM_ORDER_CONFIG, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP } from "./jyOrderBackFormValues";
|
|
21
|
-
export { jkyOrderBackFormValues, jkyOrderTransform, updateJkyGoodsHandle, JKY_SYSTEM_ORDER_CONFIG, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, filterJkyOrders } from "./jkyOrderBackFormValues";
|
|
21
|
+
export { jkyOrderBackFormValues, jkyOrderTransform, updateJkyGoodsHandle, JKY_SYSTEM_ORDER_CONFIG, JKY_ORDER_TYPE_MAP, JKY_ORDER_STATUS_MAP, JKY_ORDER_FROM_MAP, filterJkyOrders, getJkyLogisticInfo } from "./jkyOrderBackFormValues";
|
|
22
22
|
export { formatTrade, skxOrderBackFormValues, updateSkxGoodsHandle, skxOrderTransform, skxSystemOrderBackValues } from "./skxOrderBackFormValues";
|
|
23
23
|
export { updateOrderSubFormGoodsHandle, orderSubFormOrderBackFormValues, orderSubFormOrderTransform } from "./orderSubFormOrderBackFormValues";
|
|
24
24
|
export { formatReturnTrade, skxReturnOrderBackFormValues, updateSkxReturnGoodsHandle, skxReturnOrderTransform, skxReturnSystemOrderBackValues } from "./skxReturnOrderBackFormValues";
|
|
@@ -2,37 +2,111 @@ export declare const JKY_SYSTEM_ORDER_CONFIG: {
|
|
|
2
2
|
key: string;
|
|
3
3
|
name: string;
|
|
4
4
|
selectId: string;
|
|
5
|
-
columns: {
|
|
5
|
+
columns: ({
|
|
6
6
|
dataIndex: string;
|
|
7
7
|
title: string;
|
|
8
8
|
width: number;
|
|
9
|
-
|
|
9
|
+
render?: undefined;
|
|
10
|
+
renderExport?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
dataIndex: string;
|
|
13
|
+
title: string;
|
|
14
|
+
width: number;
|
|
15
|
+
render: (val: number) => "否" | "是";
|
|
16
|
+
renderExport: (val: number) => "否" | "是";
|
|
17
|
+
})[];
|
|
18
|
+
};
|
|
19
|
+
export declare const JKY_ORDER_FROM_MAP: {
|
|
20
|
+
"1": string;
|
|
21
|
+
"2": string;
|
|
22
|
+
"3": string;
|
|
23
|
+
"4": string;
|
|
24
|
+
"6": string;
|
|
25
|
+
"7": string;
|
|
26
|
+
"8": string;
|
|
27
|
+
"9": string;
|
|
28
|
+
"10": string;
|
|
29
|
+
"11": string;
|
|
30
|
+
"12": string;
|
|
31
|
+
"13": string;
|
|
32
|
+
"14": string;
|
|
33
|
+
"15": string;
|
|
34
|
+
"16": string;
|
|
35
|
+
"17": string;
|
|
36
|
+
"18": string;
|
|
37
|
+
"19": string;
|
|
38
|
+
"20": string;
|
|
39
|
+
"21": string;
|
|
40
|
+
"22": string;
|
|
41
|
+
"23": string;
|
|
42
|
+
"24": string;
|
|
43
|
+
"25": string;
|
|
44
|
+
"26": string;
|
|
45
|
+
"27": string;
|
|
46
|
+
"28": string;
|
|
47
|
+
"29": string;
|
|
10
48
|
};
|
|
11
49
|
export declare const JKY_ORDER_TYPE_MAP: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
50
|
+
1: string;
|
|
51
|
+
2: string;
|
|
52
|
+
3: string;
|
|
53
|
+
4: string;
|
|
54
|
+
5: string;
|
|
55
|
+
6: string;
|
|
56
|
+
7: string;
|
|
57
|
+
8: string;
|
|
58
|
+
9: string;
|
|
59
|
+
10: string;
|
|
60
|
+
11: string;
|
|
61
|
+
12: string;
|
|
62
|
+
13: string;
|
|
63
|
+
14: string;
|
|
64
|
+
15: string;
|
|
65
|
+
16: string;
|
|
66
|
+
91: string;
|
|
67
|
+
92: string;
|
|
68
|
+
93: string;
|
|
69
|
+
94: string;
|
|
70
|
+
95: string;
|
|
71
|
+
96: string;
|
|
72
|
+
97: string;
|
|
73
|
+
98: string;
|
|
74
|
+
99: string;
|
|
75
|
+
100: string;
|
|
20
76
|
};
|
|
21
77
|
export declare const JKY_ORDER_STATUS_MAP: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
78
|
+
1010: string;
|
|
79
|
+
1020: string;
|
|
80
|
+
1030: string;
|
|
81
|
+
1050: string;
|
|
82
|
+
2000: string;
|
|
83
|
+
2010: string;
|
|
84
|
+
2020: string;
|
|
85
|
+
2030: string;
|
|
86
|
+
2040: string;
|
|
87
|
+
3010: string;
|
|
88
|
+
4040: string;
|
|
89
|
+
4041: string;
|
|
90
|
+
4110: string;
|
|
91
|
+
4111: string;
|
|
92
|
+
4112: string;
|
|
93
|
+
4113: string;
|
|
94
|
+
4121: string;
|
|
95
|
+
4122: string;
|
|
96
|
+
4123: string;
|
|
97
|
+
4130: string;
|
|
98
|
+
5010: string;
|
|
99
|
+
5020: string;
|
|
100
|
+
5030: string;
|
|
101
|
+
6000: string;
|
|
102
|
+
9090: string;
|
|
30
103
|
};
|
|
31
104
|
export declare const getIsPlatformCodesIncludeOrderNos: (platformCodes: string, orderNos: string) => boolean;
|
|
32
105
|
export declare const updateJkyGoodsHandle: (orders?: any[], config?: {
|
|
33
106
|
orderBackGoodsLevel?: string;
|
|
34
107
|
canEdit?: boolean;
|
|
35
108
|
}) => any[];
|
|
109
|
+
export declare const getJkyLogisticInfo: (item: any, typeKey: string) => any;
|
|
36
110
|
export declare const jkyOrderTransform: (detail: any, form: any) => {
|
|
37
111
|
jkySystemOrder: {
|
|
38
112
|
orderNo: any;
|
|
@@ -12,6 +12,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
12
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
|
import isNull from "./isNull";
|
|
15
|
+
import { SendDataCenter } from "./SendData";
|
|
15
16
|
export var JKY_SYSTEM_ORDER_CONFIG = {
|
|
16
17
|
key: "jkySystemShowOrder",
|
|
17
18
|
name: "吉客云",
|
|
@@ -35,7 +36,13 @@ export var JKY_SYSTEM_ORDER_CONFIG = {
|
|
|
35
36
|
}, {
|
|
36
37
|
dataIndex: "isDelete",
|
|
37
38
|
title: "是否删除",
|
|
38
|
-
width: 150
|
|
39
|
+
width: 150,
|
|
40
|
+
render: function render(val) {
|
|
41
|
+
return val == 0 ? "否" : "是";
|
|
42
|
+
},
|
|
43
|
+
renderExport: function renderExport(val) {
|
|
44
|
+
return val == 0 ? "否" : "是";
|
|
45
|
+
}
|
|
39
46
|
}, {
|
|
40
47
|
dataIndex: "flagNames",
|
|
41
48
|
title: "标记名称",
|
|
@@ -66,25 +73,90 @@ export var JKY_SYSTEM_ORDER_CONFIG = {
|
|
|
66
73
|
width: 150
|
|
67
74
|
}]
|
|
68
75
|
};
|
|
76
|
+
export var JKY_ORDER_FROM_MAP = {
|
|
77
|
+
"1": "网店下载",
|
|
78
|
+
"2": "手工新建",
|
|
79
|
+
"3": "订单导入",
|
|
80
|
+
"4": "吉商城",
|
|
81
|
+
"6": "售后",
|
|
82
|
+
"7": "门店",
|
|
83
|
+
"8": "分销",
|
|
84
|
+
"9": "吉链采购",
|
|
85
|
+
"10": "吉链分销",
|
|
86
|
+
"11": "吉商城分销",
|
|
87
|
+
"12": "奇门分销",
|
|
88
|
+
"13": "销售返利",
|
|
89
|
+
"14": "门店补货",
|
|
90
|
+
"15": "吉秘机器人",
|
|
91
|
+
"16": "调拨",
|
|
92
|
+
"17": "吉客发",
|
|
93
|
+
"18": "开放平台",
|
|
94
|
+
"19": "生产推单",
|
|
95
|
+
"20": "吉秘助手",
|
|
96
|
+
"21": "意向单",
|
|
97
|
+
"22": "吉会员",
|
|
98
|
+
"23": "账单",
|
|
99
|
+
"24": "销售合同",
|
|
100
|
+
"25": "商机",
|
|
101
|
+
"26": "导购开单",
|
|
102
|
+
"27": "寄售结算",
|
|
103
|
+
"28": "货主收费",
|
|
104
|
+
"29": "WMS创建"
|
|
105
|
+
};
|
|
69
106
|
export var JKY_ORDER_TYPE_MAP = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
107
|
+
1: "零售业务",
|
|
108
|
+
2: "代发货(来自分销商)",
|
|
109
|
+
3: "预售订单",
|
|
110
|
+
4: "周期性订购",
|
|
111
|
+
5: "代销售(供货商发货)",
|
|
112
|
+
6: "现款现货",
|
|
113
|
+
7: "售后发货",
|
|
114
|
+
8: "售后退货",
|
|
115
|
+
9: "批发业务(B2B)",
|
|
116
|
+
10: "试销业务",
|
|
117
|
+
11: "错漏调整",
|
|
118
|
+
12: "仅退款",
|
|
119
|
+
13: "销售返利",
|
|
120
|
+
14: "大B2B业务",
|
|
121
|
+
15: "物流买赔",
|
|
122
|
+
16: "销售对账差异",
|
|
123
|
+
91: "自定义1",
|
|
124
|
+
92: "自定义2",
|
|
125
|
+
93: "自定义3",
|
|
126
|
+
94: "自定义4",
|
|
127
|
+
95: "自定义5",
|
|
128
|
+
96: "自定义6",
|
|
129
|
+
97: "自定义7",
|
|
130
|
+
98: "自定义8",
|
|
131
|
+
99: "自定义9",
|
|
132
|
+
100: "自定义10"
|
|
78
133
|
};
|
|
79
134
|
export var JKY_ORDER_STATUS_MAP = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
135
|
+
1010: "待审核",
|
|
136
|
+
1020: "审核中",
|
|
137
|
+
1030: "预售",
|
|
138
|
+
1050: "待复核",
|
|
139
|
+
2000: "备货等待",
|
|
140
|
+
2010: "备货等待等补货",
|
|
141
|
+
2020: "服务等待",
|
|
142
|
+
2030: "备货等待等生产",
|
|
143
|
+
2040: "采购等待",
|
|
144
|
+
3010: "虚拟发货",
|
|
145
|
+
4040: "代销发货待递交",
|
|
146
|
+
4041: "代销发货已递交",
|
|
147
|
+
4110: "待发货待递交",
|
|
148
|
+
4111: "待发货递交中",
|
|
149
|
+
4112: "待发货已递交",
|
|
150
|
+
4113: "待发货-递交失败",
|
|
151
|
+
4121: "待发货-取消中",
|
|
152
|
+
4122: "待发货已取消",
|
|
153
|
+
4123: "待发货取消失败",
|
|
154
|
+
4130: "待发货部分发货",
|
|
155
|
+
5010: "已取消",
|
|
156
|
+
5020: "已取消被合并",
|
|
157
|
+
5030: "已取消被拆分",
|
|
158
|
+
6000: "发货在途",
|
|
159
|
+
9090: "已完成"
|
|
88
160
|
};
|
|
89
161
|
export var getIsPlatformCodesIncludeOrderNos = function getIsPlatformCodesIncludeOrderNos(platformCodes, orderNos) {
|
|
90
162
|
var getSortedList = function getSortedList(str) {
|
|
@@ -114,27 +186,45 @@ export var updateJkyGoodsHandle = function updateJkyGoodsHandle() {
|
|
|
114
186
|
item.uuid = (_item$uuid = item.uuid) !== null && _item$uuid !== void 0 ? _item$uuid : uuid();
|
|
115
187
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
116
188
|
canDelete: true,
|
|
117
|
-
canEdit: (_config$canEdit = config === null || config === void 0 ? void 0 : config.canEdit) !== null && _config$canEdit !== void 0 ? _config$canEdit : false
|
|
118
|
-
divideOrderFee: Number(item.divideOrderFee).toFixed(2),
|
|
119
|
-
sellTotal: Number(item.sellTotal).toFixed(2),
|
|
120
|
-
sellPrice: Number(item.sellPrice).toFixed(2),
|
|
121
|
-
settlementPrice: Number(item.settlementPrice).toFixed(2),
|
|
122
|
-
mallSellingPrice: Number(item.mallSellingPrice).toFixed(2)
|
|
189
|
+
canEdit: (_config$canEdit = config === null || config === void 0 ? void 0 : config.canEdit) !== null && _config$canEdit !== void 0 ? _config$canEdit : false
|
|
123
190
|
});
|
|
124
191
|
});
|
|
125
192
|
};
|
|
126
193
|
return mappingGoodsItem((orders || []).reduce(function (prv, next) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
194
|
+
var batchNos = [];
|
|
195
|
+
var sendCounts = [];
|
|
196
|
+
var productDates = [];
|
|
197
|
+
var expireDates = [];
|
|
198
|
+
if (config.orderBackGoodsLevel !== "2" && next.tradeOrderAssemblyGoodsDtoList && next.tradeOrderAssemblyGoodsDtoList.length) {
|
|
199
|
+
next.tradeOrderAssemblyGoodsDtoList.forEach(function (subItem) {
|
|
200
|
+
var _next$assemblyGoodsDe;
|
|
201
|
+
subItem.systemOrderNo = next === null || next === void 0 ? void 0 : next.tradeNo;
|
|
202
|
+
next === null || next === void 0 ? void 0 : (_next$assemblyGoodsDe = next.assemblyGoodsDelivery) === null || _next$assemblyGoodsDe === void 0 ? void 0 : _next$assemblyGoodsDe.forEach(function (nxt) {
|
|
203
|
+
batchNos.push(nxt === null || nxt === void 0 ? void 0 : nxt.batchNo);
|
|
204
|
+
productDates.push("".concat(nxt === null || nxt === void 0 ? void 0 : nxt.batchNo, ":").concat(nxt === null || nxt === void 0 ? void 0 : nxt.productDate));
|
|
205
|
+
expireDates.push("".concat(nxt === null || nxt === void 0 ? void 0 : nxt.batchNo, ":").concat(nxt === null || nxt === void 0 ? void 0 : nxt.expireDate));
|
|
206
|
+
});
|
|
207
|
+
subItem.batchNo = batchNos.join(",");
|
|
208
|
+
subItem.productDate = productDates.join(",");
|
|
209
|
+
subItem.expireDate = expireDates.join(",");
|
|
210
|
+
prv.push(subItem);
|
|
211
|
+
});
|
|
212
|
+
} else {
|
|
213
|
+
var _next$goodsDetail;
|
|
214
|
+
next === null || next === void 0 ? void 0 : (_next$goodsDetail = next.goodsDetail) === null || _next$goodsDetail === void 0 ? void 0 : _next$goodsDetail.forEach(function (subItem) {
|
|
215
|
+
var _next$goodsDelivery;
|
|
216
|
+
subItem.systemOrderNo = next === null || next === void 0 ? void 0 : next.tradeNo;
|
|
217
|
+
next === null || next === void 0 ? void 0 : (_next$goodsDelivery = next.goodsDelivery) === null || _next$goodsDelivery === void 0 ? void 0 : _next$goodsDelivery.forEach(function (nxt) {
|
|
218
|
+
batchNos.push(nxt === null || nxt === void 0 ? void 0 : nxt.batchNo);
|
|
219
|
+
sendCounts.push("".concat(nxt === null || nxt === void 0 ? void 0 : nxt.batchNo, ":").concat(nxt === null || nxt === void 0 ? void 0 : nxt.sendCount));
|
|
220
|
+
productDates.push("".concat(nxt === null || nxt === void 0 ? void 0 : nxt.batchNo, ":").concat(nxt === null || nxt === void 0 ? void 0 : nxt.productDate));
|
|
221
|
+
expireDates.push("".concat(nxt === null || nxt === void 0 ? void 0 : nxt.batchNo, ":").concat(nxt === null || nxt === void 0 ? void 0 : nxt.expireDate));
|
|
222
|
+
});
|
|
223
|
+
subItem.batchNo = batchNos.join(",");
|
|
224
|
+
subItem.sendCount = sendCounts.join(",");
|
|
225
|
+
subItem.productDate = productDates.join(",");
|
|
226
|
+
subItem.expireDate = expireDates.join(",");
|
|
227
|
+
prv.push(subItem);
|
|
138
228
|
});
|
|
139
229
|
}
|
|
140
230
|
return prv;
|
|
@@ -144,7 +234,7 @@ var updateJkyItemListHandle = function updateJkyItemListHandle(list, type, comLi
|
|
|
144
234
|
var _newList;
|
|
145
235
|
if (type === "logistics") {
|
|
146
236
|
var _comList$find, _currentCom$component;
|
|
147
|
-
|
|
237
|
+
//吉客云物流信息组件
|
|
148
238
|
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) {
|
|
149
239
|
return item.workOrderComponentType === "JKY_LOGISTICS";
|
|
150
240
|
});
|
|
@@ -175,26 +265,41 @@ var updateJkyItemListHandle = function updateJkyItemListHandle(list, type, comLi
|
|
|
175
265
|
}
|
|
176
266
|
}
|
|
177
267
|
var newList = list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
|
|
178
|
-
var items = ((next === null || next === void 0 ? void 0 : next.
|
|
268
|
+
var items = ((next === null || next === void 0 ? void 0 : next.goodsDetail) || []).map(function (t) {
|
|
179
269
|
return {
|
|
180
|
-
title: (t === null || t === void 0 ? void 0 : t.
|
|
181
|
-
picUrl: (t === null || t === void 0 ? void 0 : t.
|
|
270
|
+
title: (t === null || t === void 0 ? void 0 : t.goodsName) || "",
|
|
271
|
+
picUrl: (t === null || t === void 0 ? void 0 : t.skuImgUrl) || "",
|
|
182
272
|
platform: "jky",
|
|
183
|
-
skuId: (t === null || t === void 0 ? void 0 : t.
|
|
273
|
+
skuId: (t === null || t === void 0 ? void 0 : t.goodsNo) || ""
|
|
184
274
|
};
|
|
185
275
|
});
|
|
186
|
-
var params = {
|
|
187
|
-
items: items
|
|
188
|
-
};
|
|
189
276
|
if (type === "logistics") {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
277
|
+
var _next$packageDetail;
|
|
278
|
+
// 吉客云单个系统子订单存在拆单,会包含多个物流信息
|
|
279
|
+
var packageDetailList = next !== null && next !== void 0 && next.packageDetail && (next === null || next === void 0 ? void 0 : (_next$packageDetail = next.packageDetail) === null || _next$packageDetail === void 0 ? void 0 : _next$packageDetail.length) > 1 ? next === null || next === void 0 ? void 0 : next.packageDetail : [{
|
|
280
|
+
logisticName: next === null || next === void 0 ? void 0 : next.logisticName,
|
|
281
|
+
logisticCode: next === null || next === void 0 ? void 0 : next.logisticCode,
|
|
282
|
+
logisticNo: next === null || next === void 0 ? void 0 : next.mainPostid
|
|
283
|
+
}];
|
|
284
|
+
console.log("packageDetailList", next, next.logisticCode, packageDetailList);
|
|
285
|
+
var packageDetails = (packageDetailList || []).map(function (t) {
|
|
286
|
+
return {
|
|
287
|
+
items: items,
|
|
288
|
+
logisticsCompanyName: t === null || t === void 0 ? void 0 : t.logisticName,
|
|
289
|
+
logisticsCompany: t === null || t === void 0 ? void 0 : t.logisticCode,
|
|
290
|
+
logisticsCode: t === null || t === void 0 ? void 0 : t.logisticNo
|
|
291
|
+
};
|
|
292
|
+
});
|
|
293
|
+
console.log("packageDetails", packageDetails);
|
|
294
|
+
prv.push.apply(prv, _toConsumableArray(packageDetails));
|
|
194
295
|
} else if (type === "send") {
|
|
195
|
-
params
|
|
296
|
+
var params = {
|
|
297
|
+
items: items
|
|
298
|
+
};
|
|
299
|
+
var warehouseCode = !(next !== null && next !== void 0 && next.warehouseCode) ? SendDataCenter.getInstance("jky").getSendCodeById(next === null || next === void 0 ? void 0 : next.warehouseId) : next === null || next === void 0 ? void 0 : next.warehouseCode;
|
|
300
|
+
params.sendId = warehouseCode;
|
|
196
301
|
//下拉框,取id
|
|
197
|
-
params.sendName =
|
|
302
|
+
params.sendName = warehouseCode;
|
|
198
303
|
params.sendSnapshotName = next === null || next === void 0 ? void 0 : next.warehouseName;
|
|
199
304
|
prv.push(params);
|
|
200
305
|
}
|
|
@@ -222,8 +327,18 @@ var updateJkyItemListHandle = function updateJkyItemListHandle(list, type, comLi
|
|
|
222
327
|
}
|
|
223
328
|
return newList;
|
|
224
329
|
};
|
|
225
|
-
|
|
226
|
-
|
|
330
|
+
export var getJkyLogisticInfo = function getJkyLogisticInfo(item, typeKey) {
|
|
331
|
+
var _item$packageDetail, _packageDetail$map, _packageDetail$;
|
|
332
|
+
var packageDetail = item !== null && item !== void 0 && item.packageDetail && (item === null || item === void 0 ? void 0 : (_item$packageDetail = item.packageDetail) === null || _item$packageDetail === void 0 ? void 0 : _item$packageDetail.length) > 1 ? item === null || item === void 0 ? void 0 : item.packageDetail : [{
|
|
333
|
+
logisticName: item === null || item === void 0 ? void 0 : item.logisticName,
|
|
334
|
+
logisticCode: item === null || item === void 0 ? void 0 : item.logisticCode,
|
|
335
|
+
logisticNo: item === null || item === void 0 ? void 0 : item.mainPostid
|
|
336
|
+
}];
|
|
337
|
+
return (packageDetail === null || packageDetail === void 0 ? void 0 : packageDetail.length) > 1 ? packageDetail === null || packageDetail === void 0 ? void 0 : (_packageDetail$map = packageDetail.map(function (logistic, index) {
|
|
338
|
+
return "\u5305\u88F9".concat(index + 1, ":").concat(logistic === null || logistic === void 0 ? void 0 : logistic[typeKey]);
|
|
339
|
+
})) === null || _packageDetail$map === void 0 ? void 0 : _packageDetail$map.join(",") : (packageDetail === null || packageDetail === void 0 ? void 0 : (_packageDetail$ = packageDetail[0]) === null || _packageDetail$ === void 0 ? void 0 : _packageDetail$[typeKey]) || "";
|
|
340
|
+
};
|
|
341
|
+
//吉客云订单信息转换
|
|
227
342
|
export var jkyOrderTransform = function jkyOrderTransform(detail, form) {
|
|
228
343
|
var _form$getFieldValue, _jkyReissueCom$compon, _jkyReturnCom$compone, _componentList$find, _componentList$find$c, _filterCurrentTrades$, _filterCurrentTrades$2, _currentTrades$find, _currentTrades$find$c, _currentTrades$find2, _currentTrades$find2$;
|
|
229
344
|
var _detail$allOrders = detail.allOrders,
|
|
@@ -254,8 +369,12 @@ export var jkyOrderTransform = function jkyOrderTransform(detail, form) {
|
|
|
254
369
|
var defaultOrder = filterCurrentTrades !== null && filterCurrentTrades !== void 0 && filterCurrentTrades[0] ? [filterCurrentTrades[0]] : [];
|
|
255
370
|
var orders = currentTrades === null || currentTrades === void 0 ? void 0 : currentTrades.map(function (item) {
|
|
256
371
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
372
|
+
tradeFrom: JKY_ORDER_FROM_MAP[item.tradeFrom],
|
|
257
373
|
tradeType: JKY_ORDER_TYPE_MAP[item.tradeType],
|
|
258
|
-
tradeStatus: JKY_ORDER_STATUS_MAP[item.tradeStatus]
|
|
374
|
+
tradeStatus: JKY_ORDER_STATUS_MAP[item.tradeStatus],
|
|
375
|
+
logisticName: getJkyLogisticInfo(item, "logisticName"),
|
|
376
|
+
logisticCode: getJkyLogisticInfo(item, "logisticCode"),
|
|
377
|
+
logisticNo: getJkyLogisticInfo(item, "logisticNo")
|
|
259
378
|
});
|
|
260
379
|
});
|
|
261
380
|
return {
|
|
@@ -380,13 +499,13 @@ var updateJkyItemListByConfigHandle = function updateJkyItemListByConfigHandle(l
|
|
|
380
499
|
}, []);
|
|
381
500
|
};
|
|
382
501
|
|
|
383
|
-
//
|
|
502
|
+
// 根据订单号请求返回的platformCode会有多个订单号组合在一起的数据 排除其他的,返回当前订单号
|
|
384
503
|
export var filterJkyOrders = function filterJkyOrders(trades, order_no) {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
if (currentTrades.length) {
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
return [];
|
|
504
|
+
// const currentTrades = (trades || []).filter((item: Record<string, any>) =>
|
|
505
|
+
// getIsPlatformCodesIncludeOrderNos(item.tradeId, order_no),
|
|
506
|
+
// );
|
|
507
|
+
// if (currentTrades.length) {
|
|
508
|
+
// return currentTrades;
|
|
509
|
+
// }
|
|
510
|
+
return trades || [];
|
|
392
511
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export declare const kmSkuTypeMap: {
|
|
2
|
+
0: string;
|
|
3
|
+
1: string;
|
|
4
|
+
2: string;
|
|
5
|
+
3: string;
|
|
6
|
+
};
|
|
1
7
|
export declare const handleKmAddressIdentify: (data: any) => any;
|
|
2
8
|
export declare const kmOrderBackFormValues: (detail?: any, templateDetail?: any) => any;
|
|
3
9
|
declare const KM_ORDER_TYPE_MAP: {
|
|
@@ -13,6 +13,12 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
13
13
|
import uuid from "./getUUid";
|
|
14
14
|
import isNull from "./isNull";
|
|
15
15
|
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
export var kmSkuTypeMap = {
|
|
17
|
+
0: "普通",
|
|
18
|
+
1: "sku套件",
|
|
19
|
+
2: "纯套件",
|
|
20
|
+
3: "包材商品"
|
|
21
|
+
};
|
|
16
22
|
export var handleKmAddressIdentify = function handleKmAddressIdentify(data) {
|
|
17
23
|
//除省市区外信息都已加密,暂不返填
|
|
18
24
|
var params = {
|
|
@@ -178,6 +184,7 @@ export var updateKmGoodsHandle = function updateKmGoodsHandle() {
|
|
|
178
184
|
num: item.itemNum || item.num,
|
|
179
185
|
realNum: item.itemNum || item.num,
|
|
180
186
|
desiredNum: item.itemNum || item.num,
|
|
187
|
+
type: item.type || (kmSkuTypeMap === null || kmSkuTypeMap === void 0 ? void 0 : kmSkuTypeMap[item === null || item === void 0 ? void 0 : item.skuType]),
|
|
181
188
|
itemSysId: item.sysItemId,
|
|
182
189
|
skuSysId: item.sysSkuId,
|
|
183
190
|
sysPicPath: item.picUrl,
|
|
@@ -19,6 +19,7 @@ import { gyOrderBackFormValues } from "./gyOrderBackFormValues";
|
|
|
19
19
|
import { jyOrderBackFormValues } from "./jyOrderBackFormValues";
|
|
20
20
|
import { skxOrderBackFormValues } from "./skxOrderBackFormValues";
|
|
21
21
|
import { skxReturnOrderBackFormValues } from "./skxReturnOrderBackFormValues";
|
|
22
|
+
import { jkyOrderBackFormValues } from "./jkyOrderBackFormValues";
|
|
22
23
|
import { pushGyLog } from "../utils";
|
|
23
24
|
|
|
24
25
|
// 淘宝商品组件信息处理
|
|
@@ -252,11 +253,12 @@ export default (function (_ref) {
|
|
|
252
253
|
var kmValues = detail["kmOrder"] ? kmOrderBackFormValues(detail["kmOrder"], templateDetail) : {};
|
|
253
254
|
var gyValues = detail["gyOrder"] ? gyOrderBackFormValues(detail["gyOrder"], templateDetail) : {};
|
|
254
255
|
var jyValues = detail["jyOrder"] ? jyOrderBackFormValues(detail["jyOrder"], templateDetail) : {};
|
|
256
|
+
var jkyValues = detail["jkyOrder"] ? jkyOrderBackFormValues(detail["jkyOrder"], templateDetail) : {};
|
|
255
257
|
//不判断是否存在detail["skxOrder"],不存在直接清空所有skx相关组件值
|
|
256
258
|
var skxValues = detail["skxOrder"] ? skxOrderBackFormValues(detail["skxOrder"], templateDetail) : {};
|
|
257
259
|
var skxReturnValues = detail["skxReturnOrder"] ? skxReturnOrderBackFormValues(detail["skxReturnOrder"], templateDetail) : {};
|
|
258
260
|
pushGyLog("gyValues", gyValues);
|
|
259
261
|
// console.log("bsE3Values", bsE3Values);
|
|
260
262
|
|
|
261
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues), gyValues), jyValues), skxValues), skxReturnValues);
|
|
263
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues), gyValues), jyValues), skxValues), skxReturnValues), jkyValues);
|
|
262
264
|
});
|
|
@@ -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", "erpOrderType", "erpOrderStatus", "jstOutboundStatus", "orderRefundType", "executeActionType", "checkbox", "multSelect", "rate", "picture", "pictureProList", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtAftersaleGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtReturnBillNo", "wdtReturnBillSelectIds", "wdtReturnBillShowOrder", "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", "wdtInStockStatusItemList", "wdtInStockStatusList", "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", "subOrderList", "label", "kmSendGood", "kmSendId", "kmSendName", "kmGoods", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "jyGoods", "jySystemOrderNo", "jySystemShowOrder", "jySystemSelectIds", "jySendGood", "jySendId", "jySendName", "jyLogisticsList", "jyLogisticsCompany", "jyLogisticsCode", "jkyGoods", "jkySystemOrderNo", "jkySystemSelectIds", "jkySystemShowOrder", "jkySendGood", "jkySendId", "jkySendName", "jkyLogisticsList", "jkyLogisticsCompany", "jkyLogisticsCode", "kmLogisticsList", "jstGoods", "jstSendGood", "jstReissueType", "jstReissueGoods", "jstSystemOrderNo", "jstLogisticsList", "jstSystemShowOrder", "jstSystemSelectIds", "jstReturnGoods", "jstReturnType", "jstExchangeGoods", "trajectoryApiStatus", "kmReissueGoods", "kmReissueType", "kmReturnGoods", "kmReturnType", "kmVideo", "wdtTags", "skxGoods", "skxReturnGoods", "skxLogisticsList", "skxReturnLogistics", "jyReissueGoods", "jyReissueType", "jstAftersaleGoods"].reduce(function (cur, nxt) {
|
|
2
|
+
return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "memberLevel", "erpOrderType", "erpOrderStatus", "jstOutboundStatus", "orderRefundType", "executeActionType", "checkbox", "multSelect", "rate", "picture", "pictureProList", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtAftersaleGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtReturnBillNo", "wdtReturnBillSelectIds", "wdtReturnBillShowOrder", "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", "wdtInStockStatusItemList", "wdtInStockStatusList", "jkyInStockStatusItemList", "jkyInStockStatusList", "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", "subOrderList", "label", "kmSendGood", "kmSendId", "kmSendName", "kmGoods", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "jyGoods", "jySystemOrderNo", "jySystemShowOrder", "jySystemSelectIds", "jySendGood", "jySendId", "jySendName", "jyLogisticsList", "jyLogisticsCompany", "jyLogisticsCode", "jkyGoods", "jkySystemOrderNo", "jkySystemSelectIds", "jkySystemShowOrder", "jkySendGood", "jkySendId", "jkySendName", "jkyLogisticsList", "jkyLogisticsCompany", "jkyLogisticsCode", "kmLogisticsList", "jstGoods", "jstSendGood", "jstReissueType", "jstReissueGoods", "jstSystemOrderNo", "jstLogisticsList", "jstSystemShowOrder", "jstSystemSelectIds", "jstReturnGoods", "jstReturnType", "jstExchangeGoods", "trajectoryApiStatus", "kmReissueGoods", "kmReissueType", "kmReturnGoods", "kmReturnType", "kmVideo", "wdtTags", "skxGoods", "skxReturnGoods", "skxLogisticsList", "skxReturnLogistics", "jyReissueGoods", "jyReissueType", "jstAftersaleGoods"].reduce(function (cur, nxt) {
|
|
3
3
|
return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
|
|
4
4
|
}, false);
|
|
5
5
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-utils",
|
|
3
|
-
"version": "2.2.44-beta.
|
|
3
|
+
"version": "2.2.44-beta.40",
|
|
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": "75ad5932e5b41f5df2a827fb77997402c8d76797",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|