@kmkf-fe-packages/services-components 2.6.0-rc.0 → 2.6.0
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/dist/esm/Hooks/index.d.ts +2 -0
- package/dist/esm/Hooks/index.js +2 -0
- package/dist/esm/Hooks/useColumnsConfig.d.ts +26 -0
- package/dist/esm/Hooks/useColumnsConfig.js +243 -0
- package/dist/esm/Hooks/useGoodsSourceFormat.d.ts +29 -0
- package/dist/esm/Hooks/useGoodsSourceFormat.js +441 -0
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
- package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +4 -2
- package/dist/esm/commonComponents/GlobalContext/index.js +60 -20
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +14 -11
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +14 -12
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +11 -9
- package/dist/esm/commonComponents/OperationLog/index.d.ts +2 -1
- package/dist/esm/commonComponents/OperationLog/index.js +4 -2
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +5 -3
- package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -19
- package/dist/esm/commonComponents/ShopList/index.js +3 -1
- package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -2
- package/dist/esm/components/BS/BsLogistics/index.js +61 -8
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
- package/dist/esm/components/BS/BsSystemOrder/index.js +56 -9
- package/dist/esm/components/BS/common/BsHeaderGood.js +2 -2
- package/dist/esm/components/BS/common/BsHeaderPic.d.ts +2 -0
- package/dist/esm/components/BS/common/BsHeaderPic.js +17 -2
- package/dist/esm/components/BS/common/BsMemo.js +4 -1
- package/dist/esm/components/BS/common/BsType.js +4 -1
- package/dist/esm/components/BS/common/SystemOrderNo.js +4 -1
- package/dist/esm/components/BS/common/expressCode.d.ts +4 -1
- package/dist/esm/components/BS/common/expressCode.js +16 -4
- package/dist/esm/components/BS/common/expressCompany.d.ts +5 -2
- package/dist/esm/components/BS/common/expressCompany.js +31 -5
- package/dist/esm/components/BsE3/BsReissueE3/index.js +4 -1
- package/dist/esm/components/Cascader/index.d.ts +8 -6
- package/dist/esm/components/Cascader/index.js +26 -22
- package/dist/esm/components/Common/constants/bs.js +2 -2
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +6 -2
- package/dist/esm/components/Common/constants/defaultColumns.js +2 -2
- package/dist/esm/components/Common/constants/wdt.js +104 -0
- package/dist/esm/components/Common/index.d.ts +2 -2
- package/dist/esm/components/Common/index.js +40 -24
- package/dist/esm/components/CommonDataTime/index.d.ts +2 -2
- package/dist/esm/components/CommonDataTime/index.js +2 -2
- package/dist/esm/components/CommonHeaderGood/index.js +1201 -40
- package/dist/esm/components/CommonInput/index.js +11 -3
- package/dist/esm/components/CommonMultiStatus/index.js +73 -36
- package/dist/esm/components/ErpTradeId/index.d.ts +2 -2
- package/dist/esm/components/ErpTradeId/index.js +7 -4
- package/dist/esm/components/File/index.d.ts +6 -6
- package/dist/esm/components/File/index.js +9 -10
- package/dist/esm/components/FlowOverallStatusSelect/index.d.ts +40 -0
- package/dist/esm/components/FlowOverallStatusSelect/index.js +180 -0
- package/dist/esm/components/GY/GyGoods/index.js +5 -1
- package/dist/esm/components/GY/GyReissue/index.js +5 -1
- package/dist/esm/components/GY/GyReturn/index.js +5 -1
- package/dist/esm/components/Input/index.d.ts +4 -4
- package/dist/esm/components/Input/index.js +35 -31
- package/dist/esm/components/JST/JstSendGood/index.js +17 -1
- package/dist/esm/components/KM/KmExchange/index.d.ts +35 -0
- package/dist/esm/components/KM/KmExchange/index.js +136 -0
- package/dist/esm/components/KmErpSendGood/index.js +1 -1
- package/dist/esm/components/Logistics/index.d.ts +1 -0
- package/dist/esm/components/Logistics/index.js +10 -0
- package/dist/esm/components/LogisticsInterception/columnHeader.js +1 -1
- package/dist/esm/components/LogisticsInterception/index.d.ts +20 -0
- package/dist/esm/components/LogisticsInterception/index.js +10 -5
- package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.d.ts +45 -0
- package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.js +97 -0
- package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +3 -2
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +4 -2
- package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +1 -1
- package/dist/esm/components/LogisticsMoreInterception/index.js +1 -0
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +5 -5
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +9 -9
- package/dist/esm/components/OrderSubForm/index.d.ts +7 -0
- package/dist/esm/components/OrderSubForm/index.js +19 -2
- package/dist/esm/components/Payment/index.d.ts +13 -12
- package/dist/esm/components/Payment/index.js +31 -11
- package/dist/esm/components/PaymentVoucherCode/Preview.js +35 -9
- package/dist/esm/components/Picture/index.d.ts +5 -5
- package/dist/esm/components/Picture/index.js +20 -20
- package/dist/esm/components/PicturePro/index.d.ts +15 -6
- package/dist/esm/components/PicturePro/index.js +42 -25
- package/dist/esm/components/PostIng/index.d.ts +5 -0
- package/dist/esm/components/PostIng/index.js +42 -8
- package/dist/esm/components/Public/Goods/index.d.ts +10 -8
- package/dist/esm/components/Public/Goods/index.js +42 -2
- package/dist/esm/components/Public/ReissueGoods/index.js +62 -4
- package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +51 -0
- package/dist/esm/components/Public/ReturnWarehouse/index.js +210 -0
- package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
- package/dist/esm/components/ReceiverAddress/index.js +41 -27
- package/dist/esm/components/Reissue/Logistics/index.js +2 -2
- package/dist/esm/components/Remark/index.d.ts +18 -2
- package/dist/esm/components/Remark/index.js +37 -2
- package/dist/esm/components/ReturnLogistics/index.d.ts +7 -6
- package/dist/esm/components/ReturnLogistics/index.js +34 -17
- package/dist/esm/components/SKX/SkxGoods/index.js +4 -0
- package/dist/esm/components/SKX/SkxIdInputSelect/index.js +4 -0
- package/dist/esm/components/Select/index.d.ts +1 -0
- package/dist/esm/components/Select/index.js +19 -11
- package/dist/esm/components/ShopInput/index.d.ts +5 -5
- package/dist/esm/components/ShopInput/index.js +12 -9
- package/dist/esm/components/StatusSelect/index.js +4 -0
- package/dist/esm/components/SubForm/children/HeaderChildFile.d.ts +30 -0
- package/dist/esm/components/SubForm/children/HeaderChildFile.js +117 -0
- package/dist/esm/components/SubForm/children/HeaderChildPic.d.ts +30 -0
- package/dist/esm/components/SubForm/children/HeaderChildPic.js +116 -0
- package/dist/esm/components/SubForm/index.js +78 -6
- package/dist/esm/components/TradeId/index.d.ts +5 -5
- package/dist/esm/components/TradeId/index.js +17 -14
- package/dist/esm/components/WDT/WdtRessuie/index.js +28 -8
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +34 -7
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/service/api.d.ts +3 -0
- package/dist/esm/service/api.js +34 -1
- package/dist/esm/type.d.ts +38 -0
- package/package.json +4 -4
- package/dist/esm/components/Common/constants/gy.d.ts +0 -3
- package/dist/esm/components/Common/constants/gy.js +0 -219
|
@@ -1,12 +1,12 @@
|
|
|
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 _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); }); }; }
|
|
2
5
|
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
6
|
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
7
|
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
8
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
9
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
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; }
|
|
8
|
-
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); } }
|
|
9
|
-
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); }); }; }
|
|
10
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
11
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
12
|
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); }
|
|
@@ -15,6 +15,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import React, { useEffect, useState, useMemo } from "react";
|
|
17
17
|
import { Skeleton, Button, Alert, Space, message } from "antd";
|
|
18
|
+
import { cloneDeep } from "lodash";
|
|
18
19
|
import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryKMLogisticsCompany } from "../../service/api";
|
|
19
20
|
import { servers, SendDataCenter } from "@kmkf-fe-packages/kmkf-utils";
|
|
20
21
|
import useGetErpLogisticsCompany from "./orderQuery/useGetErpLogisticsCompany";
|
|
@@ -25,6 +26,7 @@ import useGetRequest from "./orderQuery/useGetRequest";
|
|
|
25
26
|
* 尽量不要直接使用redux,飞鸽项目redux并不会读取最近的store数据,使用redux会有问题,暂时使用从外部传入redux数据的方式
|
|
26
27
|
* **/
|
|
27
28
|
var Global = function Global(_ref) {
|
|
29
|
+
var _userInfo$quotaInfo, _userInfo$quotaInfo2, _userInfo$quotaInfo3, _userInfo$quotaInfo4;
|
|
28
30
|
var children = _ref.children,
|
|
29
31
|
_ref$requestList = _ref.requestList,
|
|
30
32
|
requestList = _ref$requestList === void 0 ? [] : _ref$requestList,
|
|
@@ -41,14 +43,25 @@ var Global = function Global(_ref) {
|
|
|
41
43
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
42
44
|
loading = _useState4[0],
|
|
43
45
|
setLoading = _useState4[1];
|
|
46
|
+
var _useState5 = useState({}),
|
|
47
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
48
|
+
userInfo = _useState6[0],
|
|
49
|
+
setUserInfo = _useState6[1];
|
|
44
50
|
var reduxDataMap = useMemo(function () {
|
|
45
51
|
return reduxData;
|
|
46
52
|
}, [JSON.stringify(reduxData)]);
|
|
47
53
|
useEffect(function () {
|
|
48
54
|
try {
|
|
49
55
|
var _reduxData$main, _reduxData$workOrder, _reduxData$global;
|
|
50
|
-
var
|
|
51
|
-
|
|
56
|
+
var _userInfo = (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main = reduxData.main) === null || _reduxData$main === void 0 ? void 0 : _reduxData$main.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder = reduxData.workOrder) === null || _reduxData$workOrder === void 0 ? void 0 : _reduxData$workOrder.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global = reduxData.global) === null || _reduxData$global === void 0 ? void 0 : _reduxData$global.userInfo) || {};
|
|
57
|
+
var companyUserConfig = cloneDeep(_userInfo.companyUserConfig);
|
|
58
|
+
if (companyUserConfig && typeof companyUserConfig === "string") {
|
|
59
|
+
_userInfo = _objectSpread(_objectSpread({}, _userInfo), {}, {
|
|
60
|
+
companyUserConfig: JSON.parse(companyUserConfig)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
setUserInfo(_userInfo);
|
|
64
|
+
localStorage.setItem("reduxData_userInfo", JSON.stringify(_userInfo));
|
|
52
65
|
} catch (e) {
|
|
53
66
|
console.error(e);
|
|
54
67
|
}
|
|
@@ -204,20 +217,47 @@ var Global = function Global(_ref) {
|
|
|
204
217
|
}
|
|
205
218
|
});
|
|
206
219
|
}
|
|
207
|
-
if (allState === "failed") {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
// if (allState === "failed") {
|
|
221
|
+
// return (
|
|
222
|
+
// <>
|
|
223
|
+
// <Alert
|
|
224
|
+
// message="数据加载异常,可能影响部分组件使用"
|
|
225
|
+
// type="warning"
|
|
226
|
+
// action={
|
|
227
|
+
// <Space>
|
|
228
|
+
// <Button
|
|
229
|
+
// loading={loading}
|
|
230
|
+
// type="primary"
|
|
231
|
+
// key="console"
|
|
232
|
+
// onClick={reloadData}
|
|
233
|
+
// size="small"
|
|
234
|
+
// >
|
|
235
|
+
// 刷新重试
|
|
236
|
+
// </Button>
|
|
237
|
+
// </Space>
|
|
238
|
+
// }
|
|
239
|
+
// closable
|
|
240
|
+
// />
|
|
241
|
+
// {children}
|
|
242
|
+
// </>
|
|
243
|
+
// );
|
|
244
|
+
// }
|
|
245
|
+
|
|
246
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, allState === "failed" && /*#__PURE__*/React.createElement(Alert, {
|
|
247
|
+
message: "\u6570\u636E\u52A0\u8F7D\u5F02\u5E38,\u53EF\u80FD\u5F71\u54CD\u90E8\u5206\u7EC4\u4EF6\u4F7F\u7528",
|
|
248
|
+
type: "warning",
|
|
249
|
+
action: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
250
|
+
loading: loading,
|
|
251
|
+
type: "primary",
|
|
252
|
+
key: "console",
|
|
253
|
+
onClick: reloadData,
|
|
254
|
+
size: "small"
|
|
255
|
+
}, "\u5237\u65B0\u91CD\u8BD5")),
|
|
256
|
+
closable: true
|
|
257
|
+
}), (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo = userInfo.quotaInfo) === null || _userInfo$quotaInfo === void 0 ? void 0 : _userInfo$quotaInfo.workOrderRemainDays) > 0 && (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo2 = userInfo.quotaInfo) === null || _userInfo$quotaInfo2 === void 0 ? void 0 : _userInfo$quotaInfo2.workOrderRemainDays) < 15 && /*#__PURE__*/React.createElement(Alert, {
|
|
258
|
+
message: "\u5DE5\u5355\u6761\u6570\u5373\u5C06\u6D88\u8017\u5B8C\uFF0C\u5269\u4F59\u5DE5\u5355\u6761\u6570\uFF1A".concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo3 = userInfo.quotaInfo) === null || _userInfo$quotaInfo3 === void 0 ? void 0 : _userInfo$quotaInfo3.workOrderRemain) || 0, "\u6761\uFF0C\u9884\u8BA1\u5269\u4F59\u4F7F\u7528").concat((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$quotaInfo4 = userInfo.quotaInfo) === null || _userInfo$quotaInfo4 === void 0 ? void 0 : _userInfo$quotaInfo4.workOrderRemainDays) || 0, "\u5929\uFF0C\u6D88\u8017\u5B8C\u540E\u65E0\u6CD5\u65B0\u5EFA\u5DE5\u5355"),
|
|
259
|
+
type: "warning",
|
|
260
|
+
closable: true
|
|
261
|
+
}), children);
|
|
222
262
|
};
|
|
223
263
|
export default Global;
|
|
@@ -22,36 +22,39 @@ function useGetErpAddressData(reduxData, notJudgedErp) {
|
|
|
22
22
|
}, [hasErpData, notJudgedErp]);
|
|
23
23
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
24
24
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
25
|
-
var hasBs, hasWdt, hasGy, promises;
|
|
25
|
+
var hasBs, hasWdt, hasGy, hasJst, hasJky, promises;
|
|
26
26
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
27
27
|
while (1) switch (_context.prev = _context.next) {
|
|
28
28
|
case 0:
|
|
29
29
|
if (!isReload) {
|
|
30
30
|
setGlobalState("loading");
|
|
31
31
|
}
|
|
32
|
-
hasBs = hasErpData.hasBs, hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy;
|
|
32
|
+
hasBs = hasErpData.hasBs, hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy, hasJst = hasErpData.hasJst, hasJky = hasErpData.hasJky;
|
|
33
33
|
promises = [];
|
|
34
34
|
if (hasBs || notJudgedErp) promises.push(servers.queryBsAddressData);
|
|
35
35
|
if (hasWdt || notJudgedErp) promises.push(servers.queryWdtAddressData);
|
|
36
|
+
// JKY用的系统的地址,暂时不需要查询
|
|
37
|
+
// if (hasJky || notJudgedErp) promises.push(servers.queryJkyAddressData);
|
|
36
38
|
if (hasGy || notJudgedErp) promises.push(servers.queryGyAddressData);
|
|
37
|
-
|
|
38
|
-
_context.
|
|
39
|
+
if (hasJst || notJudgedErp) promises.push(servers.queryJstAddressData);
|
|
40
|
+
_context.prev = 7;
|
|
41
|
+
_context.next = 10;
|
|
39
42
|
return Promise.all(promises.map(function (promise) {
|
|
40
43
|
return promise();
|
|
41
44
|
}));
|
|
42
|
-
case
|
|
45
|
+
case 10:
|
|
43
46
|
setGlobalState("success");
|
|
44
|
-
_context.next =
|
|
47
|
+
_context.next = 16;
|
|
45
48
|
break;
|
|
46
|
-
case
|
|
47
|
-
_context.prev =
|
|
48
|
-
_context.t0 = _context["catch"](
|
|
49
|
+
case 13:
|
|
50
|
+
_context.prev = 13;
|
|
51
|
+
_context.t0 = _context["catch"](7);
|
|
49
52
|
setGlobalState("failed");
|
|
50
|
-
case
|
|
53
|
+
case 16:
|
|
51
54
|
case "end":
|
|
52
55
|
return _context.stop();
|
|
53
56
|
}
|
|
54
|
-
}, _callee, null, [[
|
|
57
|
+
}, _callee, null, [[7, 13]]);
|
|
55
58
|
}));
|
|
56
59
|
return function asyncQueryData(_x2, _x3, _x4) {
|
|
57
60
|
return _ref.apply(this, arguments);
|
|
@@ -10,7 +10,7 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import { useEffect, useState } from "react";
|
|
12
12
|
import useGetHasErpData from "../hook/useGetHasErpData";
|
|
13
|
-
import { queryWdtLogisticsCompany, queryBsE3LogisticsCompany, queryJSTLogisticsCompany, queryWLNLogisticsCompany, queryGYLogisticsCompany } from "../../../service/api";
|
|
13
|
+
import { queryWdtLogisticsCompany, queryBsE3LogisticsCompany, queryJSTLogisticsCompany, queryWLNLogisticsCompany, queryGYLogisticsCompany, queryJYLogisticsCompany, queryJKYLogisticsCompany } from "../../../service/api";
|
|
14
14
|
function useGetErpLogisticsCompany(reduxData, notJudgedErp) {
|
|
15
15
|
var _useState = useState("loading"),
|
|
16
16
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22,38 +22,40 @@ function useGetErpLogisticsCompany(reduxData, notJudgedErp) {
|
|
|
22
22
|
}, [hasErpData, notJudgedErp]);
|
|
23
23
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
24
24
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
25
|
-
var hasWdt, hasE3, hasJst, hasWln, hasGy, promises;
|
|
25
|
+
var hasWdt, hasE3, hasJst, hasWln, hasGy, hasJy, hasJky, promises;
|
|
26
26
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
27
27
|
while (1) switch (_context.prev = _context.next) {
|
|
28
28
|
case 0:
|
|
29
29
|
if (!isReload) {
|
|
30
30
|
setGlobalState("loading");
|
|
31
31
|
}
|
|
32
|
-
hasWdt = hasErpData.hasWdt, hasE3 = hasErpData.hasE3, hasJst = hasErpData.hasJst, hasWln = hasErpData.hasWln, hasGy = hasErpData.hasGy;
|
|
32
|
+
hasWdt = hasErpData.hasWdt, hasE3 = hasErpData.hasE3, hasJst = hasErpData.hasJst, hasWln = hasErpData.hasWln, hasGy = hasErpData.hasGy, hasJy = hasErpData.hasJy, hasJky = hasErpData.hasJky;
|
|
33
33
|
promises = [];
|
|
34
34
|
if (hasWdt || notJudgedErp) promises.push(queryWdtLogisticsCompany);
|
|
35
35
|
if (hasE3 || notJudgedErp) promises.push(queryBsE3LogisticsCompany);
|
|
36
36
|
if (hasJst || notJudgedErp) promises.push(queryJSTLogisticsCompany);
|
|
37
37
|
if (hasWln || notJudgedErp) promises.push(queryWLNLogisticsCompany);
|
|
38
38
|
if (hasGy || notJudgedErp) promises.push(queryGYLogisticsCompany);
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
if (hasJy || notJudgedErp) promises.push(queryJYLogisticsCompany);
|
|
40
|
+
if (hasJky || notJudgedErp) promises.push(queryJKYLogisticsCompany);
|
|
41
|
+
_context.prev = 10;
|
|
42
|
+
_context.next = 13;
|
|
41
43
|
return Promise.all(promises.map(function (promise) {
|
|
42
44
|
return promise();
|
|
43
45
|
}));
|
|
44
|
-
case
|
|
46
|
+
case 13:
|
|
45
47
|
setGlobalState("success");
|
|
46
|
-
_context.next =
|
|
48
|
+
_context.next = 19;
|
|
47
49
|
break;
|
|
48
|
-
case
|
|
49
|
-
_context.prev =
|
|
50
|
-
_context.t0 = _context["catch"](
|
|
50
|
+
case 16:
|
|
51
|
+
_context.prev = 16;
|
|
52
|
+
_context.t0 = _context["catch"](10);
|
|
51
53
|
setGlobalState("failed");
|
|
52
|
-
case
|
|
54
|
+
case 19:
|
|
53
55
|
case "end":
|
|
54
56
|
return _context.stop();
|
|
55
57
|
}
|
|
56
|
-
}, _callee, null, [[
|
|
58
|
+
}, _callee, null, [[10, 16]]);
|
|
57
59
|
}));
|
|
58
60
|
return function asyncQueryData(_x2, _x3, _x4) {
|
|
59
61
|
return _ref.apply(this, arguments);
|
|
@@ -23,7 +23,7 @@ function useGetErpSendData(reduxData, notJudgedErp) {
|
|
|
23
23
|
}, [hasErpData, notJudgedErp]);
|
|
24
24
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
25
25
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
26
|
-
var hasWdt, hasGy, hasJst, promises;
|
|
26
|
+
var hasWdt, hasGy, hasJst, hasJy, hasJky, promises;
|
|
27
27
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
28
28
|
while (1) switch (_context.prev = _context.next) {
|
|
29
29
|
case 0:
|
|
@@ -31,28 +31,30 @@ function useGetErpSendData(reduxData, notJudgedErp) {
|
|
|
31
31
|
setGlobalState("loading");
|
|
32
32
|
}
|
|
33
33
|
_context.prev = 1;
|
|
34
|
-
hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy, hasJst = hasErpData.hasJst;
|
|
34
|
+
hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy, hasJst = hasErpData.hasJst, hasJy = hasErpData.hasJy, hasJky = hasErpData.hasJky;
|
|
35
35
|
promises = [];
|
|
36
36
|
if (hasWdt || notJudgedErp) promises.push(SendDataCenter.getInstance("wdt").fetchData);
|
|
37
37
|
if (hasGy || notJudgedErp) promises.push(SendDataCenter.getInstance("gy").fetchData);
|
|
38
38
|
if (hasJst || notJudgedErp) promises.push(SendDataCenter.getInstance("jst").fetchData);
|
|
39
|
-
|
|
39
|
+
if (hasJy || notJudgedErp) promises.push(SendDataCenter.getInstance("jy").fetchData);
|
|
40
|
+
if (hasJky || notJudgedErp) promises.push(SendDataCenter.getInstance("jky").fetchData);
|
|
41
|
+
_context.next = 11;
|
|
40
42
|
return Promise.all(promises.map(function (promise) {
|
|
41
43
|
return promise();
|
|
42
44
|
}));
|
|
43
|
-
case
|
|
45
|
+
case 11:
|
|
44
46
|
setGlobalState("success");
|
|
45
|
-
_context.next =
|
|
47
|
+
_context.next = 17;
|
|
46
48
|
break;
|
|
47
|
-
case
|
|
48
|
-
_context.prev =
|
|
49
|
+
case 14:
|
|
50
|
+
_context.prev = 14;
|
|
49
51
|
_context.t0 = _context["catch"](1);
|
|
50
52
|
setGlobalState("failed");
|
|
51
|
-
case
|
|
53
|
+
case 17:
|
|
52
54
|
case "end":
|
|
53
55
|
return _context.stop();
|
|
54
56
|
}
|
|
55
|
-
}, _callee, null, [[1,
|
|
57
|
+
}, _callee, null, [[1, 14]]);
|
|
56
58
|
}));
|
|
57
59
|
return function asyncQueryData(_x2, _x3, _x4) {
|
|
58
60
|
return _ref.apply(this, arguments);
|
|
@@ -4,6 +4,7 @@ declare type OperationLogProps = {
|
|
|
4
4
|
operation: string;
|
|
5
5
|
componentDtoList: any[];
|
|
6
6
|
plat: any;
|
|
7
|
+
shopList: any[];
|
|
7
8
|
};
|
|
8
|
-
declare const OperationLog: ({ content, operation, componentDtoList, plat, }: OperationLogProps) => React.JSX.Element | null;
|
|
9
|
+
declare const OperationLog: ({ content, operation, componentDtoList, plat, shopList, }: OperationLogProps) => React.JSX.Element | null;
|
|
9
10
|
export default OperationLog;
|
|
@@ -11,7 +11,8 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
11
11
|
var content = _ref.content,
|
|
12
12
|
operation = _ref.operation,
|
|
13
13
|
componentDtoList = _ref.componentDtoList,
|
|
14
|
-
plat = _ref.plat
|
|
14
|
+
plat = _ref.plat,
|
|
15
|
+
shopList = _ref.shopList;
|
|
15
16
|
if (!content) return null;
|
|
16
17
|
try {
|
|
17
18
|
//todo过滤一些固定字段 展示不确定
|
|
@@ -80,7 +81,8 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
80
81
|
componentConfig: item.componentConfig,
|
|
81
82
|
type: item.workOrderComponentType,
|
|
82
83
|
effects: {
|
|
83
|
-
env: plat.platform
|
|
84
|
+
env: plat.platform,
|
|
85
|
+
shopList: shopList
|
|
84
86
|
}
|
|
85
87
|
});
|
|
86
88
|
if (operation !== null && operation !== void 0 && operation.startsWith("UPDATE")) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
declare const QueryLogisticsTrack: ({ title, modelWidth, interceptCompany, interceptCode, interceptSenderMobile, }: {
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const QueryLogisticsTrack: ({ title, modelWidth, interceptCompany, interceptCode, interceptSenderMobile, interceptCompanyName, shopUk, }: {
|
|
3
3
|
title?: string | undefined;
|
|
4
4
|
modelWidth?: string | number | undefined;
|
|
5
|
-
interceptCompany
|
|
5
|
+
interceptCompany?: string | undefined;
|
|
6
6
|
interceptCode: string;
|
|
7
7
|
interceptSenderMobile?: string | number | undefined;
|
|
8
|
+
interceptCompanyName?: string | undefined;
|
|
9
|
+
shopUk?: string | undefined;
|
|
8
10
|
}) => React.JSX.Element;
|
|
9
11
|
export default QueryLogisticsTrack;
|
|
@@ -8,19 +8,21 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
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; }
|
|
9
9
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import React, { useState } from
|
|
12
|
-
import { Modal, Timeline, message } from
|
|
13
|
-
import { request } from
|
|
11
|
+
import React, { useState } from "react";
|
|
12
|
+
import { Modal, Timeline, message } from "antd";
|
|
13
|
+
import { request } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import CopyText from "../CopyText";
|
|
15
15
|
var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
16
16
|
var _ref$title = _ref.title,
|
|
17
|
-
title = _ref$title === void 0 ?
|
|
17
|
+
title = _ref$title === void 0 ? "查轨迹" : _ref$title,
|
|
18
18
|
_ref$modelWidth = _ref.modelWidth,
|
|
19
19
|
modelWidth = _ref$modelWidth === void 0 ? 500 : _ref$modelWidth,
|
|
20
20
|
interceptCompany = _ref.interceptCompany,
|
|
21
21
|
interceptCode = _ref.interceptCode,
|
|
22
|
-
interceptSenderMobile = _ref.interceptSenderMobile
|
|
23
|
-
|
|
22
|
+
interceptSenderMobile = _ref.interceptSenderMobile,
|
|
23
|
+
interceptCompanyName = _ref.interceptCompanyName,
|
|
24
|
+
shopUk = _ref.shopUk;
|
|
25
|
+
var _useState = useState(""),
|
|
24
26
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
27
|
inputVal = _useState2[0],
|
|
26
28
|
setInputVal = _useState2[1];
|
|
@@ -36,9 +38,9 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
|
36
38
|
var list = _ref2.list;
|
|
37
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
38
40
|
style: {
|
|
39
|
-
maxHeight:
|
|
40
|
-
padding:
|
|
41
|
-
overflowY:
|
|
41
|
+
maxHeight: "500px",
|
|
42
|
+
padding: "8px 0",
|
|
43
|
+
overflowY: "auto"
|
|
42
44
|
}
|
|
43
45
|
}, /*#__PURE__*/React.createElement(Timeline, null, list.map(function (item, index) {
|
|
44
46
|
return /*#__PURE__*/React.createElement(Timeline.Item, {
|
|
@@ -51,11 +53,11 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
|
51
53
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
52
54
|
while (1) switch (_context.prev = _context.next) {
|
|
53
55
|
case 0:
|
|
54
|
-
if (!(!interceptCode || !interceptCompany)) {
|
|
56
|
+
if (!(!interceptCode || !interceptCompany && !interceptCompanyName)) {
|
|
55
57
|
_context.next = 2;
|
|
56
58
|
break;
|
|
57
59
|
}
|
|
58
|
-
return _context.abrupt("return", message.error(
|
|
60
|
+
return _context.abrupt("return", message.error("缺少物流公司或物流单号"));
|
|
59
61
|
case 2:
|
|
60
62
|
logisticsTraceSearch();
|
|
61
63
|
//如果是顺丰且没有手机号 要输入手机号
|
|
@@ -90,12 +92,14 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
|
90
92
|
var logisticsTraceSearch = function logisticsTraceSearch(mobile) {
|
|
91
93
|
try {
|
|
92
94
|
request({
|
|
93
|
-
url:
|
|
94
|
-
method:
|
|
95
|
+
url: "/qy/logistics/logisticsTraceSearch",
|
|
96
|
+
method: "post",
|
|
95
97
|
data: {
|
|
96
98
|
mailNo: interceptCode,
|
|
97
99
|
cpCode: interceptCompany,
|
|
98
|
-
mobile: interceptSenderMobile || mobile
|
|
100
|
+
mobile: interceptSenderMobile || mobile,
|
|
101
|
+
cpName: interceptCompanyName,
|
|
102
|
+
shopUk: shopUk
|
|
99
103
|
},
|
|
100
104
|
handleError: function handleError(msg) {
|
|
101
105
|
msg && message.error(msg);
|
|
@@ -118,16 +122,16 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
|
|
|
118
122
|
};
|
|
119
123
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
120
124
|
style: {
|
|
121
|
-
margin:
|
|
122
|
-
color:
|
|
123
|
-
cursor:
|
|
125
|
+
margin: "0 8px",
|
|
126
|
+
color: "#1890ff",
|
|
127
|
+
cursor: "pointer"
|
|
124
128
|
}
|
|
125
129
|
}, /*#__PURE__*/React.createElement("span", {
|
|
126
130
|
onClick: handleQueryLogistics
|
|
127
|
-
}, title ===
|
|
131
|
+
}, title === "查轨迹" ? title : /*#__PURE__*/React.createElement(CopyText, {
|
|
128
132
|
text: title,
|
|
129
133
|
style: {
|
|
130
|
-
color:
|
|
134
|
+
color: "#1890ff"
|
|
131
135
|
}
|
|
132
136
|
}))), /*#__PURE__*/React.createElement(Modal, {
|
|
133
137
|
width: modelWidth,
|
|
@@ -30,8 +30,10 @@ var ShopList = function ShopList(_ref) {
|
|
|
30
30
|
var plat = (_platDatInstance$getP = platDatInstance.getPlatData()) === null || _platDatInstance$getP === void 0 ? void 0 : _platDatInstance$getP.find(function (plat) {
|
|
31
31
|
return plat.platformType === item.shopSource;
|
|
32
32
|
});
|
|
33
|
+
var shopName = plat !== null && plat !== void 0 && plat.platformName ? "\u3010".concat(plat === null || plat === void 0 ? void 0 : plat.platformName, "\u3011").concat(item.shopName) : item.shopName;
|
|
33
34
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
34
35
|
disabled: item.disabled || disabledList.includes(item === null || item === void 0 ? void 0 : item[valueMapping]),
|
|
36
|
+
title: "".concat((plat === null || plat === void 0 ? void 0 : plat.platformName) || "").concat(item.shopName),
|
|
35
37
|
value: item === null || item === void 0 ? void 0 : item[valueMapping],
|
|
36
38
|
key: item === null || item === void 0 ? void 0 : item[valueMapping],
|
|
37
39
|
label: "".concat((plat === null || plat === void 0 ? void 0 : plat.platformName) || "").concat(item.shopName)
|
|
@@ -40,7 +42,7 @@ var ShopList = function ShopList(_ref) {
|
|
|
40
42
|
marginRight: 5
|
|
41
43
|
},
|
|
42
44
|
type: item.shopSource
|
|
43
|
-
}), /*#__PURE__*/React.createElement("span", null,
|
|
45
|
+
}), /*#__PURE__*/React.createElement("span", null, shopName));
|
|
44
46
|
}));
|
|
45
47
|
};
|
|
46
48
|
export default ShopList;
|
|
@@ -25,6 +25,8 @@ declare class BsLogistics implements ComponentInterface {
|
|
|
25
25
|
dataType: ComponentInterface["dataType"];
|
|
26
26
|
expressCompany: ExpressCompany;
|
|
27
27
|
expressCode: ExpressCode;
|
|
28
|
+
isChange: boolean;
|
|
29
|
+
effects: ComponentInterface["effects"];
|
|
28
30
|
constructor(options: PickOption);
|
|
29
31
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
30
32
|
getSortChildFields: (type: string, options: PickOption) => any;
|
|
@@ -34,18 +36,21 @@ declare class BsLogistics implements ComponentInterface {
|
|
|
34
36
|
renderExport: () => null;
|
|
35
37
|
editRender: (p: any) => React.JSX.Element;
|
|
36
38
|
filterConfig: (item: ColumnConfig) => ({
|
|
39
|
+
searchDefaultConditions: "in";
|
|
37
40
|
filterComponentType: "MultipleSelect";
|
|
38
41
|
props: {
|
|
39
42
|
options: any[];
|
|
40
43
|
filterOptions?: undefined;
|
|
41
44
|
};
|
|
42
45
|
filterFn: (value: string) => (i: Record) => any;
|
|
43
|
-
searchDefaultConditions: "in";
|
|
44
46
|
type: string;
|
|
45
47
|
id: string;
|
|
46
48
|
name: string;
|
|
47
49
|
} | {
|
|
48
|
-
searchDefaultConditions:
|
|
50
|
+
searchDefaultConditions: {
|
|
51
|
+
in: "in";
|
|
52
|
+
anylike: "anylike";
|
|
53
|
+
};
|
|
49
54
|
type: string;
|
|
50
55
|
id: string;
|
|
51
56
|
name: string;
|