@kmkf-fe-packages/services-components 2.0.54-beta.3 → 2.0.54-beta.31
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/useGetErpLogisticsCompany.js +13 -12
- package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +1 -1
- 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/BS/BsLogistics/index.js +8 -0
- package/dist/esm/components/BS/common/expressCode.js +3 -0
- package/dist/esm/components/BS/common/expressCompany.js +3 -0
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +4 -2
- package/dist/esm/components/Common/index.js +4 -6
- package/dist/esm/components/CommonHeaderGood/index.js +62 -4
- package/dist/esm/components/GY/GyReissue/index.js +1 -1
- package/dist/esm/components/GY/GyReturn/index.js +1 -1
- package/dist/esm/components/GetFormItem/index.js +1 -1
- 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/PicturePro/PictureUrl.d.ts +1 -0
- package/dist/esm/components/PicturePro/PictureUrl.js +4 -0
- package/dist/esm/components/Public/AsyncSelect/index.d.ts +43 -0
- package/dist/esm/components/Public/AsyncSelect/index.js +189 -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/Reissue/Logistics/index.d.ts +1 -11
- package/dist/esm/components/Reissue/Logistics/index.js +15 -35
- 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 +7 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/service/api.d.ts +1 -0
- package/dist/esm/service/api.js +6 -0
- package/dist/esm/type.d.ts +15 -15
- package/package.json +4 -4
|
@@ -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
|
}
|
|
@@ -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 } from "../../../service/api";
|
|
13
|
+
import { queryWdtLogisticsCompany, queryBsE3LogisticsCompany, queryJSTLogisticsCompany, queryWLNLogisticsCompany, queryGYLogisticsCompany } from "../../../service/api";
|
|
14
14
|
function useGetErpLogisticsCompany(reduxData, notJudgedErp) {
|
|
15
15
|
var _useState = useState("loading"),
|
|
16
16
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22,37 +22,38 @@ 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, promises;
|
|
25
|
+
var hasWdt, hasE3, hasJst, hasWln, hasGy, 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;
|
|
32
|
+
hasWdt = hasErpData.hasWdt, hasE3 = hasErpData.hasE3, hasJst = hasErpData.hasJst, hasWln = hasErpData.hasWln, hasGy = hasErpData.hasGy;
|
|
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
|
-
|
|
39
|
-
_context.
|
|
38
|
+
if (hasGy || notJudgedErp) promises.push(queryGYLogisticsCompany);
|
|
39
|
+
_context.prev = 8;
|
|
40
|
+
_context.next = 11;
|
|
40
41
|
return Promise.all(promises.map(function (promise) {
|
|
41
42
|
return promise();
|
|
42
43
|
}));
|
|
43
|
-
case
|
|
44
|
+
case 11:
|
|
44
45
|
setGlobalState("success");
|
|
45
|
-
_context.next =
|
|
46
|
+
_context.next = 17;
|
|
46
47
|
break;
|
|
47
|
-
case
|
|
48
|
-
_context.prev =
|
|
49
|
-
_context.t0 = _context["catch"](
|
|
48
|
+
case 14:
|
|
49
|
+
_context.prev = 14;
|
|
50
|
+
_context.t0 = _context["catch"](8);
|
|
50
51
|
setGlobalState("failed");
|
|
51
|
-
case
|
|
52
|
+
case 17:
|
|
52
53
|
case "end":
|
|
53
54
|
return _context.stop();
|
|
54
55
|
}
|
|
55
|
-
}, _callee, null, [[
|
|
56
|
+
}, _callee, null, [[8, 14]]);
|
|
56
57
|
}));
|
|
57
58
|
return function asyncQueryData(_x2, _x3, _x4) {
|
|
58
59
|
return _ref.apply(this, arguments);
|
|
@@ -18,7 +18,7 @@ function useGetErpSendData(reduxData, notJudgedErp) {
|
|
|
18
18
|
setGlobalState = _useState2[1];
|
|
19
19
|
var hasErpData = useGetHasErpData(reduxData);
|
|
20
20
|
useEffect(function () {
|
|
21
|
-
console.log("发货仓--", hasErpData, notJudgedErp);
|
|
21
|
+
// console.log("发货仓--", hasErpData, notJudgedErp);
|
|
22
22
|
asyncQueryData(hasErpData, notJudgedErp);
|
|
23
23
|
}, [hasErpData, notJudgedErp]);
|
|
24
24
|
var asyncQueryData = /*#__PURE__*/function () {
|
|
@@ -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;
|
|
@@ -66,6 +66,14 @@ var typeMap = {
|
|
|
66
66
|
code: "kmLogisticsCode",
|
|
67
67
|
platformType: "km",
|
|
68
68
|
companyDataType: "whetherItIncludes"
|
|
69
|
+
},
|
|
70
|
+
GY_LOGISTICS: {
|
|
71
|
+
key: "gyLogisticsList",
|
|
72
|
+
name: "管易",
|
|
73
|
+
company: "gyLogisticsCompany",
|
|
74
|
+
code: "gyLogisticsCode",
|
|
75
|
+
platformType: "gy",
|
|
76
|
+
companyDataType: "arrayObject"
|
|
69
77
|
}
|
|
70
78
|
};
|
|
71
79
|
var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
|
|
@@ -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
|
|
@@ -79,10 +79,7 @@ export var showImage = function showImage(_ref2) {
|
|
|
79
79
|
},
|
|
80
80
|
src: picUrl
|
|
81
81
|
}), /*#__PURE__*/React.createElement("div", {
|
|
82
|
-
className: styles.options
|
|
83
|
-
onClick: function onClick() {
|
|
84
|
-
console.log("show---", showHeader);
|
|
85
|
-
}
|
|
82
|
+
className: styles.options
|
|
86
83
|
}, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
|
|
87
84
|
title: "商品id",
|
|
88
85
|
text: item.numIid
|
|
@@ -270,7 +267,8 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
270
267
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
271
268
|
var logisticsCompany = item.logisticsCompany,
|
|
272
269
|
logisticsCompanyName = item.logisticsCompanyName;
|
|
273
|
-
|
|
270
|
+
// 管易为了兼容之前的补发物流信息,若不存在logisticsCompanyName值则去匹配物流映射列表展示物流公司名称
|
|
271
|
+
var company = platformType === "gy" ? ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany, false) || logisticsCompanyName : ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
|
|
274
272
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
|
275
273
|
content: content(item, index),
|
|
276
274
|
overlayStyle: {
|
|
@@ -736,7 +734,7 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
736
734
|
var key = item.msgType || "ding";
|
|
737
735
|
var formatMsgContent = /*#__PURE__*/React.createElement("span", {
|
|
738
736
|
key: index
|
|
739
|
-
}, msgTypeCh[key]
|
|
737
|
+
}, msgTypeCh[key], "-", item.ruleName ? "".concat(item.ruleName, "-") : "", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "");
|
|
740
738
|
return /*#__PURE__*/React.createElement("div", {
|
|
741
739
|
key: "wrap_".concat(index),
|
|
742
740
|
style: {
|
|
@@ -903,11 +903,11 @@ var GoodHeaderMap = {
|
|
|
903
903
|
name: "总金额",
|
|
904
904
|
transformValue: function transformValue(val, record, parentName) {
|
|
905
905
|
if (!record) return "--";
|
|
906
|
-
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
906
|
+
return ((record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0)).toFixed(2);
|
|
907
907
|
},
|
|
908
908
|
renderExport: function renderExport(val, record, parentName) {
|
|
909
909
|
if (!record) return "--";
|
|
910
|
-
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
910
|
+
return ((record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0)).toFixed(2);
|
|
911
911
|
}
|
|
912
912
|
},
|
|
913
913
|
batchId: "批次号",
|
|
@@ -999,11 +999,11 @@ var GoodHeaderMap = {
|
|
|
999
999
|
name: "总金额",
|
|
1000
1000
|
transformValue: function transformValue(val, record, parentName) {
|
|
1001
1001
|
if (!record) return "--";
|
|
1002
|
-
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1002
|
+
return ((record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0)).toFixed(2);
|
|
1003
1003
|
},
|
|
1004
1004
|
renderExport: function renderExport(val, record, parentName) {
|
|
1005
1005
|
if (!record) return "--";
|
|
1006
|
-
return (record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0);
|
|
1006
|
+
return ((record["".concat(parentName, "_qty")] || 0) * (+record["".concat(parentName, "_salePrice")] || 0)).toFixed(2);
|
|
1007
1007
|
}
|
|
1008
1008
|
},
|
|
1009
1009
|
batchId: "批次号",
|
|
@@ -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"];
|
|
@@ -186,7 +186,7 @@ var GyReissue = /*#__PURE__*/_createClass(function GyReissue(options) {
|
|
|
186
186
|
required: isRequired,
|
|
187
187
|
validator: function validator(_, value) {
|
|
188
188
|
var _value, _typeMap$options$type5;
|
|
189
|
-
if (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.key)]) !== null && _value !== void 0 && _value.length)) {
|
|
189
|
+
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.key)]) !== null && _value !== void 0 && _value.length))) {
|
|
190
190
|
var _typeMap$options$type6;
|
|
191
191
|
return Promise.reject(new Error("".concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.errMsg)));
|
|
192
192
|
}
|
|
@@ -178,7 +178,7 @@ var GyReturn = /*#__PURE__*/_createClass(function GyReturn(options) {
|
|
|
178
178
|
required: isRequired,
|
|
179
179
|
validator: function validator(_, value) {
|
|
180
180
|
var _value, _typeMap$options$type4;
|
|
181
|
-
if (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.key)]) !== null && _value !== void 0 && _value.length)) {
|
|
181
|
+
if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.key)]) !== null && _value !== void 0 && _value.length))) {
|
|
182
182
|
var _typeMap$options$type5;
|
|
183
183
|
return Promise.reject(new Error("".concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.errMsg)));
|
|
184
184
|
}
|
|
@@ -38,7 +38,7 @@ var GetFormItem = function GetFormItem(_ref) {
|
|
|
38
38
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
39
39
|
while (1) switch (_context.prev = _context.next) {
|
|
40
40
|
case 0:
|
|
41
|
-
if (!(
|
|
41
|
+
if (!(value && !value.vipCode && value.gySystemOrderNo)) {
|
|
42
42
|
_context.next = 2;
|
|
43
43
|
break;
|
|
44
44
|
}
|
|
@@ -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
|
}] : [];
|