@kmkf-fe-packages/services-components 2.0.62 → 2.0.64
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/commonComponents/GlobalContext/index.js +26 -3
- package/dist/esm/commonComponents/GlobalContext/orderQuery/constants.d.ts +5 -0
- package/dist/esm/commonComponents/GlobalContext/orderQuery/constants.js +8 -0
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetRequest.d.ts +3 -0
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetRequest.js +80 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +4 -2
- package/dist/esm/components/CommonHeaderGood/index.js +58 -0
- package/dist/esm/components/Logistics/index.d.ts +1 -0
- package/dist/esm/components/Logistics/index.js +19 -3
- package/dist/esm/components/LogisticsInterception/index.js +16 -8
- package/dist/esm/components/LogisticsMoreInterception/index.js +26 -15
- package/dist/esm/components/LogisticsTrajectory/index.d.ts +14 -11
- package/dist/esm/components/LogisticsTrajectory/index.js +19 -11
- package/dist/esm/components/LogisticsTrajectory/trajectoryApiStatus.d.ts +41 -0
- package/dist/esm/components/LogisticsTrajectory/trajectoryApiStatus.js +112 -0
- package/dist/esm/components/Public/Goods/index.d.ts +3 -0
- package/dist/esm/components/Public/Goods/index.js +4 -1
- package/dist/esm/components/WDT/WdtShopSelect/index.d.ts +40 -0
- package/dist/esm/components/WDT/WdtShopSelect/index.js +122 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +4 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/type.d.ts +13 -13
- package/package.json +4 -4
- package/dist/esm/commonComponents/GlobalContext/hook/dist/useGetHasErpData.js +0 -52
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpAddressData.js +0 -180
- package/dist/esm/commonComponents/GlobalContext/orderQuery/dist/useGetErpLogisticsCompany.js +0 -186
- package/dist/esm/components/BS/BsGoods/dist/index.js +0 -113
- package/dist/esm/components/Common/dist/index.js +0 -1019
|
@@ -20,6 +20,7 @@ import { servers, SendDataCenter } from "@kmkf-fe-packages/kmkf-utils";
|
|
|
20
20
|
import useGetErpLogisticsCompany from "./orderQuery/useGetErpLogisticsCompany";
|
|
21
21
|
import useGetErpSendData from "./orderQuery/useGetErpSendData";
|
|
22
22
|
import useGetErpAddressData from "./orderQuery/useGetErpAddressData";
|
|
23
|
+
import useGetRequest from "./orderQuery/useGetRequest";
|
|
23
24
|
/**
|
|
24
25
|
* 尽量不要直接使用redux,飞鸽项目redux并不会读取最近的store数据,使用redux会有问题,暂时使用从外部传入redux数据的方式
|
|
25
26
|
* **/
|
|
@@ -49,6 +50,15 @@ var Global = function Global(_ref) {
|
|
|
49
50
|
}
|
|
50
51
|
return reduxData;
|
|
51
52
|
}, [JSON.stringify(reduxData)]);
|
|
53
|
+
useEffect(function () {
|
|
54
|
+
try {
|
|
55
|
+
var _reduxData$main2, _reduxData$workOrder2, _reduxData$global2;
|
|
56
|
+
var userInfo = (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main2 = reduxData.main) === null || _reduxData$main2 === void 0 ? void 0 : _reduxData$main2.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder2 = reduxData.workOrder) === null || _reduxData$workOrder2 === void 0 ? void 0 : _reduxData$workOrder2.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global2 = reduxData.global) === null || _reduxData$global2 === void 0 ? void 0 : _reduxData$global2.userInfo) || {};
|
|
57
|
+
localStorage.setItem("reduxData_userInfo", JSON.stringify(userInfo));
|
|
58
|
+
} catch (e) {
|
|
59
|
+
console.error(e);
|
|
60
|
+
}
|
|
61
|
+
}, [JSON.stringify(reduxData)]);
|
|
52
62
|
useEffect(function () {
|
|
53
63
|
initDataSource();
|
|
54
64
|
}, []);
|
|
@@ -71,12 +81,17 @@ var Global = function Global(_ref) {
|
|
|
71
81
|
_useGetErpAddressData2 = _slicedToArray(_useGetErpAddressData, 2),
|
|
72
82
|
addressDataState = _useGetErpAddressData2[0],
|
|
73
83
|
reloadGetErpAddressData = _useGetErpAddressData2[1];
|
|
84
|
+
//获取Erp地址数据
|
|
85
|
+
var _useGetRequest = useGetRequest(reduxDataMap, notJudgedErp),
|
|
86
|
+
_useGetRequest2 = _slicedToArray(_useGetRequest, 2),
|
|
87
|
+
requestState = _useGetRequest2[0],
|
|
88
|
+
reloadGetRequest = _useGetRequest2[1];
|
|
74
89
|
var allState = useMemo(function () {
|
|
75
|
-
var allStateList = [globalState, logisticsCompanyState, sendDataState, addressDataState];
|
|
90
|
+
var allStateList = [globalState, logisticsCompanyState, sendDataState, addressDataState, requestState];
|
|
76
91
|
if (allStateList.includes("loading")) return "loading";
|
|
77
92
|
if (allStateList.includes("failed")) return "failed";
|
|
78
93
|
return "success";
|
|
79
|
-
}, [globalState, logisticsCompanyState, sendDataState, addressDataState]);
|
|
94
|
+
}, [globalState, logisticsCompanyState, sendDataState, addressDataState, requestState]);
|
|
80
95
|
var reloadData = /*#__PURE__*/function () {
|
|
81
96
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
82
97
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -115,9 +130,17 @@ var Global = function Global(_ref) {
|
|
|
115
130
|
_context.next = 17;
|
|
116
131
|
return reloadGetErpAddressData();
|
|
117
132
|
case 17:
|
|
133
|
+
_context.t4 = requestState === "failed";
|
|
134
|
+
if (!_context.t4) {
|
|
135
|
+
_context.next = 21;
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
_context.next = 21;
|
|
139
|
+
return reloadGetRequest();
|
|
140
|
+
case 21:
|
|
118
141
|
setLoading(false);
|
|
119
142
|
message.success("刷新完成");
|
|
120
|
-
case
|
|
143
|
+
case 23:
|
|
121
144
|
case "end":
|
|
122
145
|
return _context.stop();
|
|
123
146
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
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
|
+
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
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import { useEffect, useState } from "react";
|
|
12
|
+
import useGetHasErpData from "../hook/useGetHasErpData";
|
|
13
|
+
import { requestList, erpMap } from "./constants";
|
|
14
|
+
function useGetRequest(reduxData, notJudgedErp) {
|
|
15
|
+
var _useState = useState("loading"),
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
globalState = _useState2[0],
|
|
18
|
+
setGlobalState = _useState2[1];
|
|
19
|
+
var hasErpData = useGetHasErpData(reduxData);
|
|
20
|
+
useEffect(function () {
|
|
21
|
+
asyncQueryData(hasErpData, notJudgedErp);
|
|
22
|
+
}, [hasErpData, notJudgedErp]);
|
|
23
|
+
var asyncQueryData = /*#__PURE__*/function () {
|
|
24
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(hasErpData, notJudgedErp, isReload) {
|
|
25
|
+
var promises;
|
|
26
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
27
|
+
while (1) switch (_context.prev = _context.next) {
|
|
28
|
+
case 0:
|
|
29
|
+
if (!isReload) {
|
|
30
|
+
setGlobalState("loading");
|
|
31
|
+
}
|
|
32
|
+
_context.prev = 1;
|
|
33
|
+
promises = [];
|
|
34
|
+
requestList.map(function (item) {
|
|
35
|
+
if (hasErpData[erpMap[item.erp]] || notJudgedErp) {
|
|
36
|
+
promises.push(item.request);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
_context.next = 6;
|
|
40
|
+
return Promise.all(promises.map(function (promise) {
|
|
41
|
+
return promise();
|
|
42
|
+
}));
|
|
43
|
+
case 6:
|
|
44
|
+
setGlobalState("success");
|
|
45
|
+
_context.next = 12;
|
|
46
|
+
break;
|
|
47
|
+
case 9:
|
|
48
|
+
_context.prev = 9;
|
|
49
|
+
_context.t0 = _context["catch"](1);
|
|
50
|
+
setGlobalState("failed");
|
|
51
|
+
case 12:
|
|
52
|
+
case "end":
|
|
53
|
+
return _context.stop();
|
|
54
|
+
}
|
|
55
|
+
}, _callee, null, [[1, 9]]);
|
|
56
|
+
}));
|
|
57
|
+
return function asyncQueryData(_x2, _x3, _x4) {
|
|
58
|
+
return _ref.apply(this, arguments);
|
|
59
|
+
};
|
|
60
|
+
}();
|
|
61
|
+
var onReload = /*#__PURE__*/function () {
|
|
62
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
63
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
64
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
65
|
+
case 0:
|
|
66
|
+
_context2.next = 2;
|
|
67
|
+
return asyncQueryData(hasErpData, notJudgedErp, true);
|
|
68
|
+
case 2:
|
|
69
|
+
case "end":
|
|
70
|
+
return _context2.stop();
|
|
71
|
+
}
|
|
72
|
+
}, _callee2);
|
|
73
|
+
}));
|
|
74
|
+
return function onReload() {
|
|
75
|
+
return _ref2.apply(this, arguments);
|
|
76
|
+
};
|
|
77
|
+
}();
|
|
78
|
+
return [globalState, onReload];
|
|
79
|
+
}
|
|
80
|
+
export default useGetRequest;
|
|
@@ -7,13 +7,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
7
7
|
import system from "./system";
|
|
8
8
|
import bs_e3 from "./bs_e3";
|
|
9
9
|
import bs from "./bs";
|
|
10
|
-
import { getJstColumns, getWlnColumns, getGyColumns, getWdtColumns } from "@kmkf-fe-packages/basic-components";
|
|
10
|
+
import { getJstColumns, getWlnColumns, getGyColumns, getWdtColumns, getKmColumns } from "@kmkf-fe-packages/basic-components";
|
|
11
11
|
import defaultColumns from "./defaultColumns";
|
|
12
12
|
export var getColumnsMap = function getColumnsMap(args) {
|
|
13
13
|
var _ref = args || {},
|
|
14
14
|
_ref$text = _ref.text,
|
|
15
15
|
text = _ref$text === void 0 ? "" : _ref$text;
|
|
16
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, system()), bs({
|
|
16
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, system()), bs({
|
|
17
17
|
text: text
|
|
18
18
|
})), bs_e3()), getWdtColumns({
|
|
19
19
|
text: text,
|
|
@@ -24,6 +24,8 @@ export var getColumnsMap = function getColumnsMap(args) {
|
|
|
24
24
|
disabled: true
|
|
25
25
|
})), getWlnColumns({
|
|
26
26
|
text: text
|
|
27
|
+
})), getKmColumns({
|
|
28
|
+
disabled: true
|
|
27
29
|
})), {}, {
|
|
28
30
|
default: defaultColumns({
|
|
29
31
|
text: text
|
|
@@ -1148,6 +1148,64 @@ var GoodHeaderMap = {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
},
|
|
1150
1150
|
moneyKey: "money"
|
|
1151
|
+
},
|
|
1152
|
+
KM_GOODS: {
|
|
1153
|
+
headerMap: {
|
|
1154
|
+
sysSkuPropertiesName: {
|
|
1155
|
+
name: "规格名称",
|
|
1156
|
+
width: 250
|
|
1157
|
+
},
|
|
1158
|
+
sysTitle: {
|
|
1159
|
+
name: "系统商品名称",
|
|
1160
|
+
width: 150
|
|
1161
|
+
},
|
|
1162
|
+
title: {
|
|
1163
|
+
name: "平台商品名称",
|
|
1164
|
+
width: 150
|
|
1165
|
+
},
|
|
1166
|
+
shortTitle: {
|
|
1167
|
+
name: "商品简称",
|
|
1168
|
+
width: 150
|
|
1169
|
+
},
|
|
1170
|
+
sysOuterId: {
|
|
1171
|
+
name: "系统商家编码",
|
|
1172
|
+
width: 150
|
|
1173
|
+
},
|
|
1174
|
+
outerId: {
|
|
1175
|
+
name: "商家编码",
|
|
1176
|
+
width: 150
|
|
1177
|
+
},
|
|
1178
|
+
skuSysId: {
|
|
1179
|
+
name: "系统规格ID",
|
|
1180
|
+
width: 150
|
|
1181
|
+
},
|
|
1182
|
+
itemSysId: {
|
|
1183
|
+
name: "系统商品ID",
|
|
1184
|
+
width: 150
|
|
1185
|
+
},
|
|
1186
|
+
sysPicPath: {
|
|
1187
|
+
name: "商品图片",
|
|
1188
|
+
width: 100,
|
|
1189
|
+
component: BsHeaderPic
|
|
1190
|
+
},
|
|
1191
|
+
num: {
|
|
1192
|
+
name: "数量",
|
|
1193
|
+
width: 150
|
|
1194
|
+
},
|
|
1195
|
+
payment: {
|
|
1196
|
+
name: "实付金额",
|
|
1197
|
+
width: 150
|
|
1198
|
+
},
|
|
1199
|
+
price: {
|
|
1200
|
+
name: "商品销售价",
|
|
1201
|
+
width: 150
|
|
1202
|
+
},
|
|
1203
|
+
type: {
|
|
1204
|
+
name: "商品类型",
|
|
1205
|
+
width: 100
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
moneyKey: "money"
|
|
1151
1209
|
}
|
|
1152
1210
|
};
|
|
1153
1211
|
GoodHeaderMap["WDT_REISSUE_GOODS"] = GoodHeaderMap["WDT_GOODS"];
|
|
@@ -18,6 +18,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
18
18
|
canSort: boolean;
|
|
19
19
|
children: ComponentInterface[];
|
|
20
20
|
dataType: ComponentInterface["dataType"];
|
|
21
|
+
isChange: boolean;
|
|
21
22
|
constructor(options: PickOption);
|
|
22
23
|
editRender: (p: any) => React.JSX.Element;
|
|
23
24
|
renderClient: (record: Record) => React.JSX.Element;
|
|
@@ -32,8 +32,23 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
32
32
|
_defineProperty(this, "canSort", void 0);
|
|
33
33
|
_defineProperty(this, "children", void 0);
|
|
34
34
|
_defineProperty(this, "dataType", void 0);
|
|
35
|
+
_defineProperty(this, "isChange", void 0);
|
|
35
36
|
_defineProperty(this, "editRender", function (p) {
|
|
36
37
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
|
|
38
|
+
var onExpressLogisticsCodeBlur = function onExpressLogisticsCodeBlur(val) {
|
|
39
|
+
if (_this.isChange) {
|
|
40
|
+
var _p$onBlur;
|
|
41
|
+
p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, val, "expressLogisticsCode");
|
|
42
|
+
_this.isChange = false;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var onExpressLogisticsCodeChange = function onExpressLogisticsCodeChange() {
|
|
46
|
+
_this.isChange = true;
|
|
47
|
+
for (var _len = arguments.length, e = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
48
|
+
e[_key] = arguments[_key];
|
|
49
|
+
}
|
|
50
|
+
p === null || p === void 0 ? void 0 : p.onChange.apply(p, e);
|
|
51
|
+
};
|
|
37
52
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
38
53
|
title: _this.name,
|
|
39
54
|
name: _this.id,
|
|
@@ -41,11 +56,11 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
41
56
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
42
57
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
43
58
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
44
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
59
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
45
60
|
component: /*#__PURE__*/React.createElement(ExpressLogistics, _extends({}, _this.componentConfig, {
|
|
46
61
|
options: _this.expressDateInstance.getExpressData(),
|
|
47
|
-
onBlur:
|
|
48
|
-
onChange:
|
|
62
|
+
onBlur: onExpressLogisticsCodeBlur,
|
|
63
|
+
onChange: onExpressLogisticsCodeChange
|
|
49
64
|
}))
|
|
50
65
|
});
|
|
51
66
|
});
|
|
@@ -114,5 +129,6 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
114
129
|
return Promise.resolve();
|
|
115
130
|
}
|
|
116
131
|
}] : [];
|
|
132
|
+
this.isChange = false;
|
|
117
133
|
});
|
|
118
134
|
export default Logistics;
|
|
@@ -159,7 +159,7 @@ function Logistics(options) {
|
|
|
159
159
|
|
|
160
160
|
this.rules = [{
|
|
161
161
|
validator: function validator(_, value) {
|
|
162
|
-
var _this$componentConfig5, _this$componentConfig6, _value$interceptAddre
|
|
162
|
+
var _this$componentConfig5, _this$componentConfig6, _value$interceptAddre;
|
|
163
163
|
if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && (!(value !== null && value !== void 0 && value.interceptCompany) || !value.interceptCode)) {
|
|
164
164
|
return Promise.reject(new Error("请填写物流信息"));
|
|
165
165
|
}
|
|
@@ -170,13 +170,21 @@ function Logistics(options) {
|
|
|
170
170
|
if (showAddress && (!(value !== null && value !== void 0 && (_value$interceptAddre = value.interceptAddress) !== null && _value$interceptAddre !== void 0 && _value$interceptAddre.length) || !(value !== null && value !== void 0 && value.interceptDetail) || !(value !== null && value !== void 0 && value.interceptReceiverName) || !(value !== null && value !== void 0 && value.interceptReceiverMobile))) {
|
|
171
171
|
return Promise.reject(new Error("请填写派送地址"));
|
|
172
172
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
173
|
+
|
|
174
|
+
// const showSender =
|
|
175
|
+
// this.expressInterceptData.getShowSenderMobileMap()[
|
|
176
|
+
// `${value?.interceptType}`
|
|
177
|
+
// ];
|
|
178
|
+
// if (showSender && !value?.interceptSenderMobile) {
|
|
179
|
+
// return Promise.reject(new Error("请填写发件人手机号"));
|
|
180
|
+
// }
|
|
181
|
+
// if (
|
|
182
|
+
// showSender &&
|
|
183
|
+
// value?.interceptSenderMobile &&
|
|
184
|
+
// !value?.interceptSenderMobile?.match(/^[1][0-9]{10}$/)
|
|
185
|
+
// ) {
|
|
186
|
+
// return Promise.reject(new Error("请填写正确的发件人手机号"));
|
|
187
|
+
// }
|
|
180
188
|
return Promise.resolve();
|
|
181
189
|
}
|
|
182
190
|
}];
|
|
@@ -188,21 +188,32 @@ function Logistics(options) {
|
|
|
188
188
|
if (hasNoAddress) {
|
|
189
189
|
return Promise.reject(new Error("\u8BF7\u586B\u5199\u6D3E\u9001\u5730\u5740"));
|
|
190
190
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
191
|
+
|
|
192
|
+
// const hasNoSender = value.some((t: any) => {
|
|
193
|
+
// const showSender =
|
|
194
|
+
// this.expressInterceptData.getShowSenderMobileMap()[
|
|
195
|
+
// `${t?.interceptType}`
|
|
196
|
+
// ];
|
|
197
|
+
// return showSender && !t?.interceptSenderMobile;
|
|
198
|
+
// });
|
|
199
|
+
// if (hasNoSender) {
|
|
200
|
+
// return Promise.reject(new Error(`请填写发件人手机号`));
|
|
201
|
+
// }
|
|
202
|
+
// const hasErrorSender = value.some((t: any) => {
|
|
203
|
+
// const showSender =
|
|
204
|
+
// this.expressInterceptData.getShowSenderMobileMap()[
|
|
205
|
+
// `${t?.interceptType}`
|
|
206
|
+
// ];
|
|
207
|
+
// return (
|
|
208
|
+
// showSender &&
|
|
209
|
+
// t?.interceptSenderMobile &&
|
|
210
|
+
// !t?.interceptSenderMobile?.match(/^[1][0-9]{10}$/)
|
|
211
|
+
// );
|
|
212
|
+
// });
|
|
213
|
+
// if (hasErrorSender) {
|
|
214
|
+
// return Promise.reject(new Error(`请填写正确的发件人手机号`));
|
|
215
|
+
// }
|
|
216
|
+
|
|
206
217
|
return Promise.resolve();
|
|
207
218
|
}
|
|
208
219
|
}] : [];
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ExpressData } from
|
|
4
|
-
import TrajectoryCompany from
|
|
5
|
-
import TrajectoryCode from
|
|
6
|
-
import TrajectorySnapshot from
|
|
7
|
-
import TrajectoryStatus from
|
|
8
|
-
import TrajectoryLastLogisticsInfo from
|
|
9
|
-
import TrajectoryLastUpdateTime from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
import TrajectoryCompany from "./trajectoryCompany";
|
|
5
|
+
import TrajectoryCode from "./trajectoryCode";
|
|
6
|
+
import TrajectorySnapshot from "./trajectorySnapshot";
|
|
7
|
+
import TrajectoryStatus from "./trajectoryStatus";
|
|
8
|
+
import TrajectoryLastLogisticsInfo from "./trajectoryLastLogisticsInfo";
|
|
9
|
+
import TrajectoryLastUpdateTime from "./trajectoryLastUpdateTime";
|
|
10
|
+
import TrajectoryApiStatus from "./trajectoryApiStatus";
|
|
10
11
|
declare class LogisticsTrajectory implements ComponentInterface {
|
|
11
12
|
name: string;
|
|
12
13
|
id: string;
|
|
13
14
|
sortField: string;
|
|
14
15
|
type: string;
|
|
15
16
|
rules: any[];
|
|
16
|
-
componentConfig: ComponentInterface[
|
|
17
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
17
18
|
expressDateInstance: InstanceType<typeof ExpressData>;
|
|
18
19
|
express: TrajectoryCompany;
|
|
19
20
|
expressCode: TrajectoryCode;
|
|
@@ -21,11 +22,12 @@ declare class LogisticsTrajectory implements ComponentInterface {
|
|
|
21
22
|
trajectoryStatus: TrajectoryStatus;
|
|
22
23
|
trajectoryLastLogisticsInfo: TrajectoryLastLogisticsInfo;
|
|
23
24
|
trajectoryLastUpdateTime: TrajectoryLastUpdateTime;
|
|
25
|
+
trajectoryApiStatus: TrajectoryApiStatus;
|
|
24
26
|
isCombinationComponent: boolean;
|
|
25
27
|
formField: string;
|
|
26
28
|
canSort: boolean;
|
|
27
29
|
children: ComponentInterface[];
|
|
28
|
-
dataType: ComponentInterface[
|
|
30
|
+
dataType: ComponentInterface["dataType"];
|
|
29
31
|
constructor(options: PickOption);
|
|
30
32
|
editRender: (p: any) => React.JSX.Element;
|
|
31
33
|
renderClient: (record: Record) => React.JSX.Element;
|
|
@@ -36,6 +38,7 @@ declare class LogisticsTrajectory implements ComponentInterface {
|
|
|
36
38
|
order: any;
|
|
37
39
|
snapshot: any;
|
|
38
40
|
trajectoryStatus: any;
|
|
41
|
+
trajectoryApiStatus: any;
|
|
39
42
|
trajectoryLastUpdateTime: any;
|
|
40
43
|
trajectoryLastLogisticsInfo: any;
|
|
41
44
|
};
|
|
@@ -8,15 +8,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
-
import React from
|
|
12
|
-
import { ExpressData } from
|
|
13
|
-
import { LogisticsTrajectory as Trajectory } from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import { LogisticsTrajectory as Trajectory } from "@kmkf-fe-packages/basic-components";
|
|
14
14
|
import TrajectoryCompany from "./trajectoryCompany";
|
|
15
15
|
import TrajectoryCode from "./trajectoryCode";
|
|
16
16
|
import TrajectorySnapshot from "./trajectorySnapshot";
|
|
17
17
|
import TrajectoryStatus from "./trajectoryStatus";
|
|
18
18
|
import TrajectoryLastLogisticsInfo from "./trajectoryLastLogisticsInfo";
|
|
19
19
|
import TrajectoryLastUpdateTime from "./trajectoryLastUpdateTime";
|
|
20
|
+
import TrajectoryApiStatus from "./trajectoryApiStatus";
|
|
20
21
|
import GetFormItem from "../GetFormItem";
|
|
21
22
|
var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory(options) {
|
|
22
23
|
var _this = this,
|
|
@@ -35,6 +36,7 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
35
36
|
_defineProperty(this, "trajectoryStatus", void 0);
|
|
36
37
|
_defineProperty(this, "trajectoryLastLogisticsInfo", void 0);
|
|
37
38
|
_defineProperty(this, "trajectoryLastUpdateTime", void 0);
|
|
39
|
+
_defineProperty(this, "trajectoryApiStatus", void 0);
|
|
38
40
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
39
41
|
_defineProperty(this, "formField", void 0);
|
|
40
42
|
_defineProperty(this, "canSort", void 0);
|
|
@@ -49,20 +51,20 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
49
51
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
50
52
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
51
53
|
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
52
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
54
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
53
55
|
component: /*#__PURE__*/React.createElement(Trajectory, _extends({}, _this.componentConfig, {
|
|
54
56
|
options: _this.expressDateInstance.getExpressData()
|
|
55
57
|
}))
|
|
56
58
|
});
|
|
57
59
|
});
|
|
58
60
|
_defineProperty(this, "renderClient", function (record) {
|
|
59
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.expressSnapshot.renderClient(record), _this.trajectoryStatus.renderClient(record), _this.trajectoryLastUpdateTime.renderClient(record), _this.trajectoryLastLogisticsInfo.renderClient(record));
|
|
61
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.expressSnapshot.renderClient(record), _this.trajectoryStatus.renderClient(record), _this.trajectoryApiStatus.renderClient(record), _this.trajectoryLastUpdateTime.renderClient(record), _this.trajectoryLastLogisticsInfo.renderClient(record));
|
|
60
62
|
});
|
|
61
63
|
_defineProperty(this, "renderPc", function () {
|
|
62
64
|
return null;
|
|
63
65
|
});
|
|
64
66
|
_defineProperty(this, "renderLog", function (r) {
|
|
65
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressSnapshot.name, ":", _this.expressSnapshot.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryStatus.name, ":", _this.trajectoryStatus.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryLastUpdateTime.name, ":", _this.trajectoryLastUpdateTime.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryLastLogisticsInfo.name, ":", _this.trajectoryLastLogisticsInfo.renderLog(r)));
|
|
67
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressSnapshot.name, ":", _this.expressSnapshot.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryStatus.name, ":", _this.trajectoryStatus.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryApiStatus.name, ":", _this.trajectoryApiStatus.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryLastUpdateTime.name, ":", _this.trajectoryLastUpdateTime.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.trajectoryLastLogisticsInfo.name, ":", _this.trajectoryLastLogisticsInfo.renderLog(r)));
|
|
66
68
|
});
|
|
67
69
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
68
70
|
return {
|
|
@@ -70,6 +72,7 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
70
72
|
order: _this.expressCode.getComponentValue(r),
|
|
71
73
|
snapshot: _this.expressSnapshot.getComponentValue(r),
|
|
72
74
|
trajectoryStatus: _this.trajectoryStatus.getComponentValue(r),
|
|
75
|
+
trajectoryApiStatus: _this.trajectoryApiStatus.getComponentValue(r),
|
|
73
76
|
trajectoryLastUpdateTime: _this.trajectoryLastUpdateTime.getComponentValue(r),
|
|
74
77
|
trajectoryLastLogisticsInfo: _this.trajectoryLastLogisticsInfo.getComponentValue(r)
|
|
75
78
|
};
|
|
@@ -79,7 +82,7 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
79
82
|
});
|
|
80
83
|
_defineProperty(this, "filterConfig", function (item) {
|
|
81
84
|
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
82
|
-
subKey:
|
|
85
|
+
subKey: "trajectoryCompany"
|
|
83
86
|
})), _this.expressCode.filterConfig(item), _this.expressSnapshot.filterConfig(item)];
|
|
84
87
|
});
|
|
85
88
|
this.name = options.name;
|
|
@@ -106,6 +109,11 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
106
109
|
id: "".concat(this.id, "_trajectoryStatus"),
|
|
107
110
|
parentId: "".concat(this.id)
|
|
108
111
|
}));
|
|
112
|
+
this.trajectoryApiStatus = new TrajectoryApiStatus(_objectSpread(_objectSpread({}, options), {}, {
|
|
113
|
+
name: "".concat(this.name, "-\u63A5\u53E3\u72B6\u6001"),
|
|
114
|
+
id: "".concat(this.id, "_trajectoryApiStatus"),
|
|
115
|
+
parentId: "".concat(this.id)
|
|
116
|
+
}));
|
|
109
117
|
this.trajectoryLastLogisticsInfo = new TrajectoryLastLogisticsInfo(_objectSpread(_objectSpread({}, options), {}, {
|
|
110
118
|
name: "".concat(this.name, "-\u6700\u540E\u7269\u6D41\u4FE1\u606F"),
|
|
111
119
|
id: "".concat(this.id, "_trajectoryLastLogisticsInfo")
|
|
@@ -116,15 +124,15 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
116
124
|
}));
|
|
117
125
|
this.isCombinationComponent = true;
|
|
118
126
|
this.canSort = false;
|
|
119
|
-
this.dataType =
|
|
120
|
-
this.children = [this.express, this.expressCode, this.expressSnapshot, this.trajectoryStatus, this.trajectoryLastUpdateTime, this.trajectoryLastLogisticsInfo];
|
|
127
|
+
this.dataType = "object";
|
|
128
|
+
this.children = [this.express, this.expressCode, this.expressSnapshot, this.trajectoryStatus, this.trajectoryApiStatus, this.trajectoryLastUpdateTime, this.trajectoryLastLogisticsInfo];
|
|
121
129
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
122
130
|
validator: function validator(_, value) {
|
|
123
131
|
if (!value.trajectoryCompany) {
|
|
124
|
-
return Promise.reject(new Error(
|
|
132
|
+
return Promise.reject(new Error("请选择物流公司"));
|
|
125
133
|
}
|
|
126
134
|
if (!value.trajectoryCode) {
|
|
127
|
-
return Promise.reject(new Error(
|
|
135
|
+
return Promise.reject(new Error("请输入物流单号"));
|
|
128
136
|
}
|
|
129
137
|
return Promise.resolve();
|
|
130
138
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class TrajectoryApiStatus implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
parentId: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
align: ALignType;
|
|
13
|
+
width: number;
|
|
14
|
+
isCombinationComponent: boolean;
|
|
15
|
+
formField: string;
|
|
16
|
+
canSort: boolean;
|
|
17
|
+
children: ComponentInterface[];
|
|
18
|
+
dataType: ComponentInterface["dataType"];
|
|
19
|
+
options: ComponentInterface["options"];
|
|
20
|
+
constructor(options: PickOption & {
|
|
21
|
+
parentId: string;
|
|
22
|
+
});
|
|
23
|
+
getComponentValue: (r: Record) => any;
|
|
24
|
+
renderClient: (r: any) => React.JSX.Element | null;
|
|
25
|
+
renderPc: (value: any, r: Record) => React.JSX.Element | "--";
|
|
26
|
+
renderLog: (r: Record) => React.JSX.Element | "--" | null;
|
|
27
|
+
renderExport: (value: any, r: Record) => string;
|
|
28
|
+
editRender: () => null;
|
|
29
|
+
filterConfig: (item: ColumnConfig) => {
|
|
30
|
+
searchDefaultConditions: "in";
|
|
31
|
+
type: string;
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
filterComponentType: "MultipleSelect";
|
|
35
|
+
props: {
|
|
36
|
+
options: any[];
|
|
37
|
+
};
|
|
38
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export default TrajectoryApiStatus;
|