@kmkf-fe-packages/services-components 0.26.1-beta.8 → 0.26.1
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.d.ts +7 -0
- package/dist/esm/commonComponents/GlobalContext/index.js +104 -0
- package/dist/esm/components/BuyerNick/index.d.ts +3 -3
- package/dist/esm/components/BuyerNick/index.js +19 -9
- package/dist/esm/components/Common/index.d.ts +0 -1
- package/dist/esm/components/Common/index.js +3 -74
- package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +2 -2
- package/dist/esm/components/LogisticsInterception/InterceptStatus.js +1 -1
- package/dist/esm/components/LogisticsMoreTrajectory/index.js +2 -2
- package/dist/esm/components/MultSelect/index.d.ts +4 -4
- package/dist/esm/components/MultSelect/index.js +13 -13
- package/dist/esm/components/Payment/PaymentStatus.d.ts +4 -4
- package/dist/esm/components/Payment/PaymentStatus.js +30 -30
- package/dist/esm/constant.js +13 -12
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +8 -15
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.js +2 -4
- package/dist/esm/service/api.d.ts +7 -1
- package/dist/esm/service/api.js +238 -5
- package/dist/esm/service/request.js +9 -1
- package/package.json +4 -4
- package/dist/esm/components/CommonInput/index.d.ts +0 -44
- package/dist/esm/components/CommonInput/index.js +0 -146
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.d.ts +0 -31
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +0 -88
- package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.d.ts +0 -46
- package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.js +0 -111
- package/dist/esm/components/LogisticsMoreInterception/InterceptType.d.ts +0 -44
- package/dist/esm/components/LogisticsMoreInterception/InterceptType.js +0 -96
- package/dist/esm/components/LogisticsMoreInterception/columnHeader.d.ts +0 -5
- package/dist/esm/components/LogisticsMoreInterception/columnHeader.js +0 -55
- package/dist/esm/components/LogisticsMoreInterception/index.d.ts +0 -69
- package/dist/esm/components/LogisticsMoreInterception/index.js +0 -184
- package/dist/esm/components/LogisticsMoreInterception/interceptCompany.d.ts +0 -39
- package/dist/esm/components/LogisticsMoreInterception/interceptCompany.js +0 -88
- package/dist/esm/components/LogisticsMoreInterception/interceptItem.d.ts +0 -34
- package/dist/esm/components/LogisticsMoreInterception/interceptItem.js +0 -81
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +0 -35
- package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +0 -82
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.d.ts +0 -34
- package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.js +0 -81
- package/dist/esm/components/PaymentVoucherCode/index.d.ts +0 -33
- package/dist/esm/components/PaymentVoucherCode/index.js +0 -104
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany";
|
|
3
|
+
declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
|
|
4
|
+
requestList?: RequestType[] | undefined;
|
|
5
|
+
repeatRequestList?: Record<string, () => Promise<any>> | undefined;
|
|
6
|
+
}>) => React.JSX.Element;
|
|
7
|
+
export default Global;
|
|
@@ -0,0 +1,104 @@
|
|
|
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 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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
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); }
|
|
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
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
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
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
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; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
import React, { useEffect, useState } from "react";
|
|
17
|
+
import { Skeleton, Result, Button } from "antd";
|
|
18
|
+
import { queryAddressData, queryBsAddressData, queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryWdtAddressData, queryAllLogisticsCompany } from "../../service/api";
|
|
19
|
+
var Global = function Global(_ref) {
|
|
20
|
+
var children = _ref.children,
|
|
21
|
+
_ref$requestList = _ref.requestList,
|
|
22
|
+
requestList = _ref$requestList === void 0 ? [] : _ref$requestList,
|
|
23
|
+
_ref$repeatRequestLis = _ref.repeatRequestList,
|
|
24
|
+
repeatRequestList = _ref$repeatRequestLis === void 0 ? {} : _ref$repeatRequestLis;
|
|
25
|
+
var _useState = useState("loading"),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
globalState = _useState2[0],
|
|
28
|
+
setGlobalState = _useState2[1];
|
|
29
|
+
var initDataSource = /*#__PURE__*/function () {
|
|
30
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
31
|
+
var mapping, mergeMapping, promises, _Object$keys, _Object$keys2, _Object$keys2$filter, _promises;
|
|
32
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
33
|
+
while (1) switch (_context.prev = _context.next) {
|
|
34
|
+
case 0:
|
|
35
|
+
mapping = {
|
|
36
|
+
queryAddressData: queryAddressData,
|
|
37
|
+
queryBsAddressData: queryBsAddressData,
|
|
38
|
+
queryExpressInterceptData: queryExpressInterceptData,
|
|
39
|
+
queryLogisticsAddressData: queryLogisticsAddressData,
|
|
40
|
+
queryPlatData: queryPlatData,
|
|
41
|
+
queryWdtAddressData: queryWdtAddressData,
|
|
42
|
+
queryAllLogisticsCompany: queryAllLogisticsCompany
|
|
43
|
+
};
|
|
44
|
+
mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
|
|
45
|
+
promises = [];
|
|
46
|
+
if ((requestList === null || requestList === void 0 ? void 0 : requestList.length) === 0) {
|
|
47
|
+
promises = (_Object$keys = Object.keys(mergeMapping)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (item) {
|
|
48
|
+
return mergeMapping[item];
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
promises = (_Object$keys2 = Object.keys(mergeMapping)) === null || _Object$keys2 === void 0 ? void 0 : (_Object$keys2$filter = _Object$keys2.filter(function (item) {
|
|
52
|
+
return requestList === null || requestList === void 0 ? void 0 : requestList.includes(item);
|
|
53
|
+
})) === null || _Object$keys2$filter === void 0 ? void 0 : _Object$keys2$filter.map(function (item) {
|
|
54
|
+
return mergeMapping[item];
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
_context.prev = 4;
|
|
58
|
+
_context.next = 7;
|
|
59
|
+
return Promise.all((_promises = promises) === null || _promises === void 0 ? void 0 : _promises.map(function (promise) {
|
|
60
|
+
return promise();
|
|
61
|
+
}));
|
|
62
|
+
case 7:
|
|
63
|
+
setGlobalState("success");
|
|
64
|
+
_context.next = 13;
|
|
65
|
+
break;
|
|
66
|
+
case 10:
|
|
67
|
+
_context.prev = 10;
|
|
68
|
+
_context.t0 = _context["catch"](4);
|
|
69
|
+
setGlobalState("failed");
|
|
70
|
+
case 13:
|
|
71
|
+
case "end":
|
|
72
|
+
return _context.stop();
|
|
73
|
+
}
|
|
74
|
+
}, _callee, null, [[4, 10]]);
|
|
75
|
+
}));
|
|
76
|
+
return function initDataSource() {
|
|
77
|
+
return _ref2.apply(this, arguments);
|
|
78
|
+
};
|
|
79
|
+
}();
|
|
80
|
+
useEffect(function () {
|
|
81
|
+
initDataSource();
|
|
82
|
+
}, []);
|
|
83
|
+
if (globalState === "loading") {
|
|
84
|
+
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
85
|
+
active: true,
|
|
86
|
+
paragraph: {
|
|
87
|
+
rows: 8
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (globalState === "failed") {
|
|
92
|
+
return /*#__PURE__*/React.createElement(Result, {
|
|
93
|
+
status: "error",
|
|
94
|
+
title: "\u6570\u636E\u52A0\u8F7D\u5F02\u5E38,\u8BF7\u5237\u65B0\u91CD\u8BD5",
|
|
95
|
+
extra: /*#__PURE__*/React.createElement(Button, {
|
|
96
|
+
type: "primary",
|
|
97
|
+
key: "console",
|
|
98
|
+
onClick: initDataSource
|
|
99
|
+
}, "\u5237\u65B0\u91CD\u8BD5")
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
103
|
+
};
|
|
104
|
+
export default Global;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class EBuyerNick implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -12,7 +12,7 @@ declare class EBuyerNick implements ComponentInterface {
|
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderTaoBaoWangWang: (record: any, params: any) => React.JSX.Element;
|
|
18
18
|
renderClient: (record: any, params: any) => React.JSX.Element | null;
|
|
@@ -6,17 +6,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import { BuyerNick } from
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { BuyerNick } from '@kmkf-fe-packages/basic-components';
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
13
|
import PlatBuyer from "../../commonComponents/PlatBuyer";
|
|
14
|
-
import { isNull, filterFn as _filterFn } from
|
|
14
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
import wangImg from "../../commonComponents/Wangwang/img/wang.gif";
|
|
17
17
|
var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
18
18
|
var _this = this,
|
|
19
|
-
_this$componentConfig3
|
|
19
|
+
_this$componentConfig3,
|
|
20
|
+
_this$componentConfig4;
|
|
20
21
|
_classCallCheck(this, EBuyerNick);
|
|
21
22
|
_defineProperty(this, "name", void 0);
|
|
22
23
|
_defineProperty(this, "id", void 0);
|
|
@@ -35,7 +36,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
35
36
|
return /*#__PURE__*/React.createElement("span", {
|
|
36
37
|
onClick: function onClick() {
|
|
37
38
|
var _record$_this$id, _record$_this$id2;
|
|
38
|
-
typeof params.openWangWang ===
|
|
39
|
+
typeof params.openWangWang === 'function' && params.openWangWang(record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.buyerNick, record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.buyerOpenUid);
|
|
39
40
|
}
|
|
40
41
|
}, /*#__PURE__*/React.createElement("img", {
|
|
41
42
|
alt: "\u8BF7\u70B9\u51FB\u76F4\u63A5\u8BBF\u95EE",
|
|
@@ -49,7 +50,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
49
50
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
50
51
|
id: _this.id,
|
|
51
52
|
label: _this.name,
|
|
52
|
-
value: (params === null || params === void 0 ? void 0 : params.platform) ===
|
|
53
|
+
value: (params === null || params === void 0 ? void 0 : params.platform) === 'tb' ? _this.renderTaoBaoWangWang(record, params) : record === null || record === void 0 ? void 0 : (_record$_this$id4 = record[_this.id]) === null || _record$_this$id4 === void 0 ? void 0 : _record$_this$id4.buyerNick
|
|
53
54
|
}) : null;
|
|
54
55
|
});
|
|
55
56
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -108,10 +109,10 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
108
109
|
// 过滤组件id
|
|
109
110
|
name: item.name,
|
|
110
111
|
// 过滤组件名称
|
|
111
|
-
filterComponentType:
|
|
112
|
+
filterComponentType: 'Input',
|
|
112
113
|
filterFn: function filterFn(value) {
|
|
113
114
|
return function (i) {
|
|
114
|
-
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
115
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'buyerNick')).includes(value);
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
118
|
};
|
|
@@ -124,8 +125,17 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
124
125
|
this.isCombinationComponent = false;
|
|
125
126
|
this.canSort = true;
|
|
126
127
|
this.children = [];
|
|
127
|
-
this.dataType =
|
|
128
|
+
this.dataType = 'string';
|
|
128
129
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
130
|
+
validator: function validator(_, value) {
|
|
131
|
+
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
132
|
+
return Promise.reject(new Error('请输入买家昵称'));
|
|
133
|
+
}
|
|
134
|
+
return Promise.resolve();
|
|
135
|
+
}
|
|
136
|
+
}] : [];
|
|
137
|
+
this.componentConfig = options.componentConfig;
|
|
138
|
+
this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
129
139
|
validator: function validator(_, value) {
|
|
130
140
|
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
131
141
|
return Promise.reject(new Error("请输入买家昵称"));
|
|
@@ -33,5 +33,4 @@ export declare const BsGoodsTable: ({ list, showHeader, text, type, }: {
|
|
|
33
33
|
export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
|
|
34
34
|
export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
|
|
35
35
|
export declare const MsgContent: ({ horizontal, list, valueKey, failValue, options, }: any) => React.JSX.Element;
|
|
36
|
-
export declare const AlipayBill: (props: any) => React.JSX.Element;
|
|
37
36
|
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -12,14 +8,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
12
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; }
|
|
13
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; } }
|
|
14
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message
|
|
11
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message } from "antd";
|
|
16
12
|
import React, { useState, useMemo } from "react";
|
|
17
13
|
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
|
-
import { getAlipayBillReceipt } from "../../service/api";
|
|
19
14
|
import { CopyToClipboard } from "react-copy-to-clipboard";
|
|
20
15
|
import styles from "./index.module.less";
|
|
21
16
|
import defaultImg from "./img/default-img.png";
|
|
22
|
-
var Paragraph = Typography.Paragraph;
|
|
23
17
|
export var getFormItem = function getFormItem(_ref) {
|
|
24
18
|
var name = _ref.name,
|
|
25
19
|
title = _ref.title,
|
|
@@ -58,7 +52,7 @@ export var showImage = function showImage(_ref2) {
|
|
|
58
52
|
key: index
|
|
59
53
|
}, type === "itemCode" && !showHeader.includes("picUrl") ? null : (item === null || item === void 0 ? void 0 : item.platform) === "taobao" ? /*#__PURE__*/React.createElement("a", {
|
|
60
54
|
target: "_blank",
|
|
61
|
-
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) :
|
|
55
|
+
href: item.numIid ? "https://item.taobao.com/item.htm?id=".concat(item.numIid) : 'javascript:void(0);'
|
|
62
56
|
}, /*#__PURE__*/React.createElement("img", {
|
|
63
57
|
style: {
|
|
64
58
|
width: "40px",
|
|
@@ -158,7 +152,7 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
158
152
|
},
|
|
159
153
|
key: index
|
|
160
154
|
}, type === "itemCode" && !showHeader.includes("picUrl") ? null : /*#__PURE__*/React.createElement("a", {
|
|
161
|
-
href: i.link || ((i === null || i === void 0 ? void 0 : i.platform) === "taobao" && i.numIid ? "https://item.taobao.com/item.htm?id=".concat(i.numIid) :
|
|
155
|
+
href: i.link || ((i === null || i === void 0 ? void 0 : i.platform) === "taobao" && i.numIid ? "https://item.taobao.com/item.htm?id=".concat(i.numIid) : 'javascript:void(0);'),
|
|
162
156
|
target: "__blank",
|
|
163
157
|
style: {
|
|
164
158
|
marginRight: "12px",
|
|
@@ -899,69 +893,4 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
899
893
|
key: index
|
|
900
894
|
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "")));
|
|
901
895
|
}) : null);
|
|
902
|
-
};
|
|
903
|
-
//获取付款凭证
|
|
904
|
-
export var AlipayBill = function AlipayBill(props) {
|
|
905
|
-
var value = props.value,
|
|
906
|
-
platform = props.platform;
|
|
907
|
-
var _useState13 = useState(false),
|
|
908
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
909
|
-
visible = _useState14[0],
|
|
910
|
-
setVisible = _useState14[1];
|
|
911
|
-
var _useState15 = useState(""),
|
|
912
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
913
|
-
msg = _useState16[0],
|
|
914
|
-
setMsg = _useState16[1];
|
|
915
|
-
var voucherHandle = /*#__PURE__*/function () {
|
|
916
|
-
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
917
|
-
var params, res, data, msg;
|
|
918
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
919
|
-
while (1) switch (_context.prev = _context.next) {
|
|
920
|
-
case 0:
|
|
921
|
-
e.stopPropagation();
|
|
922
|
-
params = {
|
|
923
|
-
alipayBillReceiptDetailId: value
|
|
924
|
-
};
|
|
925
|
-
_context.next = 4;
|
|
926
|
-
return getAlipayBillReceipt(params);
|
|
927
|
-
case 4:
|
|
928
|
-
res = _context.sent;
|
|
929
|
-
data = res.data, msg = res.message;
|
|
930
|
-
if (data) {
|
|
931
|
-
if (["fxg"].includes(platform)) {
|
|
932
|
-
setMsg(data);
|
|
933
|
-
setVisible(true);
|
|
934
|
-
} else {
|
|
935
|
-
window.open(data);
|
|
936
|
-
}
|
|
937
|
-
} else {
|
|
938
|
-
setMsg(msg);
|
|
939
|
-
setVisible(true);
|
|
940
|
-
}
|
|
941
|
-
case 7:
|
|
942
|
-
case "end":
|
|
943
|
-
return _context.stop();
|
|
944
|
-
}
|
|
945
|
-
}, _callee);
|
|
946
|
-
}));
|
|
947
|
-
return function voucherHandle(_x2) {
|
|
948
|
-
return _ref15.apply(this, arguments);
|
|
949
|
-
};
|
|
950
|
-
}();
|
|
951
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
952
|
-
style: {
|
|
953
|
-
color: "#1890ff",
|
|
954
|
-
cursor: "pointer"
|
|
955
|
-
},
|
|
956
|
-
onClick: voucherHandle
|
|
957
|
-
}, value), /*#__PURE__*/React.createElement(Modal, {
|
|
958
|
-
title: "\u4ED8\u6B3E\u51ED\u8BC1",
|
|
959
|
-
visible: visible,
|
|
960
|
-
footer: false,
|
|
961
|
-
onCancel: function onCancel() {
|
|
962
|
-
return setVisible(false);
|
|
963
|
-
}
|
|
964
|
-
}, ["fxg"].includes(platform) ? /*#__PURE__*/React.createElement("div", null, "\u8BF7\u590D\u5236\u94FE\u63A5\u5728\u6D4F\u89C8\u5668\u4E0A\u6253\u5F00\uFF0C\u94FE\u63A5\uFF1A", /*#__PURE__*/React.createElement(Paragraph, {
|
|
965
|
-
copyable: true
|
|
966
|
-
}, msg)) : msg));
|
|
967
896
|
};
|
|
@@ -18,8 +18,8 @@ declare class InterceptStatus implements ComponentInterface {
|
|
|
18
18
|
canSort: boolean;
|
|
19
19
|
children: ComponentInterface[];
|
|
20
20
|
expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
|
|
21
|
-
dataType: ComponentInterface[
|
|
22
|
-
options: ComponentInterface[
|
|
21
|
+
dataType: ComponentInterface['dataType'];
|
|
22
|
+
options: ComponentInterface['options'];
|
|
23
23
|
constructor(options: PickOption);
|
|
24
24
|
getComponentValue: (r: Record) => any;
|
|
25
25
|
renderStatus: (record: any, w?: number) => React.JSX.Element;
|
|
@@ -116,7 +116,7 @@ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options
|
|
|
116
116
|
this.children = [];
|
|
117
117
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
118
118
|
this.expressInterceptInstance = ExpressInterceptData.getInstance();
|
|
119
|
-
this.dataType =
|
|
119
|
+
this.dataType = 'string';
|
|
120
120
|
this.options = this.expressInterceptInstance.getStatusOptions() || [];
|
|
121
121
|
}
|
|
122
122
|
|
|
@@ -107,10 +107,10 @@ var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTr
|
|
|
107
107
|
var hasNoCode = value.some(function (item) {
|
|
108
108
|
return !item.trajectoryCode;
|
|
109
109
|
});
|
|
110
|
-
if (hasNoCompany) {
|
|
110
|
+
if (!hasNoCompany) {
|
|
111
111
|
return Promise.reject(new Error("请选择物流公司"));
|
|
112
112
|
}
|
|
113
|
-
if (hasNoCode) {
|
|
113
|
+
if (!hasNoCode) {
|
|
114
114
|
return Promise.reject(new Error("请输入物流单号"));
|
|
115
115
|
}
|
|
116
116
|
return Promise.resolve();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BasicMultSelect implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -11,8 +11,8 @@ declare class BasicMultSelect implements ComponentInterface {
|
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface[
|
|
15
|
-
options: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface['dataType'];
|
|
15
|
+
options: ComponentInterface['options'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -6,12 +6,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
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; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
|
-
import React from
|
|
10
|
-
import intersection from
|
|
11
|
-
import { ApaasMultipleSelect } from
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import intersection from 'lodash/intersection';
|
|
11
|
+
import { ApaasMultipleSelect } from '@kmkf-fe-packages/basic-components';
|
|
12
12
|
import GetFormItem from "../GetFormItem";
|
|
13
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
import { isNull, filterFn as _filterFn } from
|
|
14
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options) {
|
|
17
17
|
var _this = this,
|
|
@@ -34,15 +34,15 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
34
34
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
35
|
id: _this.id,
|
|
36
36
|
label: _this.name,
|
|
37
|
-
value: record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.join(
|
|
37
|
+
value: record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.join(',')
|
|
38
38
|
}) : null;
|
|
39
39
|
});
|
|
40
40
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
41
41
|
var _record;
|
|
42
|
-
if (
|
|
42
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")]) === undefined) {
|
|
43
43
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
44
44
|
}
|
|
45
|
-
return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_basicMultSelect")]) === null || _record === void 0 ? void 0 : _record.join(
|
|
45
|
+
return /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_basicMultSelect")]) === null || _record === void 0 ? void 0 : _record.join(','));
|
|
46
46
|
});
|
|
47
47
|
_defineProperty(this, "renderLog", function (r) {
|
|
48
48
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_basicMultSelect")])) return null;
|
|
@@ -53,10 +53,10 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
53
53
|
});
|
|
54
54
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
55
55
|
var _record2;
|
|
56
|
-
if (
|
|
57
|
-
return
|
|
56
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_basicMultSelect")]) === undefined) {
|
|
57
|
+
return '--';
|
|
58
58
|
}
|
|
59
|
-
return record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_basicMultSelect")]) === null || _record2 === void 0 ? void 0 : _record2.join(
|
|
59
|
+
return record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id, "_basicMultSelect")]) === null || _record2 === void 0 ? void 0 : _record2.join(',');
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "editRender", function (p) {
|
|
62
62
|
var _this$componentConfig, _this$componentConfig2;
|
|
@@ -81,13 +81,13 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
81
81
|
// 过滤组件id
|
|
82
82
|
name: item.name,
|
|
83
83
|
// 过滤组件名称
|
|
84
|
-
filterComponentType:
|
|
84
|
+
filterComponentType: 'MultipleSelect',
|
|
85
85
|
props: {
|
|
86
86
|
options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []
|
|
87
87
|
},
|
|
88
88
|
filterFn: function filterFn(value) {
|
|
89
89
|
return function (i) {
|
|
90
|
-
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
90
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
};
|
|
@@ -102,7 +102,7 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
102
102
|
this.isCombinationComponent = false;
|
|
103
103
|
this.canSort = true;
|
|
104
104
|
this.children = [];
|
|
105
|
-
this.dataType =
|
|
105
|
+
this.dataType = 'array';
|
|
106
106
|
this.options = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options) || [];
|
|
107
107
|
});
|
|
108
108
|
export default BasicMultSelect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class PaymentStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
@@ -20,8 +20,8 @@ declare class PaymentStatus implements ComponentInterface {
|
|
|
20
20
|
formField: string;
|
|
21
21
|
canSort: boolean;
|
|
22
22
|
children: ComponentInterface[];
|
|
23
|
-
dataType: ComponentInterface[
|
|
24
|
-
options: ComponentInterface[
|
|
23
|
+
dataType: ComponentInterface['dataType'];
|
|
24
|
+
options: ComponentInterface['options'];
|
|
25
25
|
constructor(options: PickOption);
|
|
26
26
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
27
27
|
renderPc: (value: unknown, record: any) => any;
|