@kmkf-fe-packages/services-components 2.0.54-beta.9 → 2.0.54-beta.90
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 +29 -12
- 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/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/BsGoods/index.js +41 -5
- package/dist/esm/components/BS/common/BsMemo.js +2 -1
- package/dist/esm/components/BS/common/BsType.js +2 -1
- package/dist/esm/components/BS/common/SystemOrderNo.js +2 -1
- package/dist/esm/components/BuyerNick/index.js +3 -3
- package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +4 -2
- package/dist/esm/components/Common/index.d.ts +1 -0
- package/dist/esm/components/Common/index.js +148 -31
- package/dist/esm/components/CommonHeaderGood/index.js +124 -4
- package/dist/esm/components/CommonSystemOrder/index.d.ts +1 -0
- package/dist/esm/components/CommonSystemOrder/index.js +21 -1
- package/dist/esm/components/EItemEnCode/index.js +3 -2
- package/dist/esm/components/GY/GyReissue/index.js +2 -2
- package/dist/esm/components/GY/GyReturn/index.js +11 -11
- package/dist/esm/components/KM/KmVideo/index.d.ts +34 -0
- package/dist/esm/components/KM/KmVideo/index.js +144 -0
- package/dist/esm/components/Logistics/index.d.ts +1 -0
- package/dist/esm/components/Logistics/index.js +19 -3
- package/dist/esm/components/LogisticsInterception/InterceptAddress.d.ts +1 -1
- package/dist/esm/components/LogisticsInterception/InterceptAddress.js +13 -8
- package/dist/esm/components/LogisticsInterception/columnHeader.js +1 -1
- package/dist/esm/components/LogisticsInterception/index.js +16 -8
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.d.ts +6 -6
- package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +11 -11
- package/dist/esm/components/LogisticsMoreInterception/columnHeader.js +1 -1
- package/dist/esm/components/LogisticsMoreInterception/index.js +29 -16
- 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/LogisticsTrajectory/trajectorySnapshot.js +1 -1
- package/dist/esm/components/MsgStatus/index.d.ts +2 -0
- package/dist/esm/components/MsgStatus/index.js +4 -0
- package/dist/esm/components/PicturePro/PictureUrl.d.ts +1 -0
- package/dist/esm/components/PicturePro/PictureUrl.js +4 -0
- package/dist/esm/components/PostIng/index.d.ts +11 -11
- package/dist/esm/components/PostIng/index.js +75 -30
- package/dist/esm/components/Public/AsyncSelect/index.d.ts +46 -0
- package/dist/esm/components/Public/AsyncSelect/index.js +254 -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/Public/ReissueGoods/index.d.ts +2 -3
- package/dist/esm/components/Public/ReissueGoods/index.js +42 -23
- package/dist/esm/components/ThirdItemSelect/index.d.ts +3 -3
- package/dist/esm/components/ThirdItemSelect/index.js +16 -16
- 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 +11 -1
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/type.d.ts +24 -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
|
* **/
|
|
@@ -41,13 +42,16 @@ var Global = function Global(_ref) {
|
|
|
41
42
|
loading = _useState4[0],
|
|
42
43
|
setLoading = _useState4[1];
|
|
43
44
|
var reduxDataMap = useMemo(function () {
|
|
45
|
+
return reduxData;
|
|
46
|
+
}, [JSON.stringify(reduxData)]);
|
|
47
|
+
useEffect(function () {
|
|
44
48
|
try {
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
var _reduxData$main, _reduxData$workOrder, _reduxData$global;
|
|
50
|
+
var userInfo = (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$main = reduxData.main) === null || _reduxData$main === void 0 ? void 0 : _reduxData$main.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$workOrder = reduxData.workOrder) === null || _reduxData$workOrder === void 0 ? void 0 : _reduxData$workOrder.userInfo) || (reduxData === null || reduxData === void 0 ? void 0 : (_reduxData$global = reduxData.global) === null || _reduxData$global === void 0 ? void 0 : _reduxData$global.userInfo) || {};
|
|
51
|
+
localStorage.setItem("reduxData_userInfo", JSON.stringify(userInfo));
|
|
52
|
+
} catch (e) {
|
|
53
|
+
console.error(e);
|
|
49
54
|
}
|
|
50
|
-
return reduxData;
|
|
51
55
|
}, [JSON.stringify(reduxData)]);
|
|
52
56
|
useEffect(function () {
|
|
53
57
|
initDataSource();
|
|
@@ -71,14 +75,19 @@ var Global = function Global(_ref) {
|
|
|
71
75
|
_useGetErpAddressData2 = _slicedToArray(_useGetErpAddressData, 2),
|
|
72
76
|
addressDataState = _useGetErpAddressData2[0],
|
|
73
77
|
reloadGetErpAddressData = _useGetErpAddressData2[1];
|
|
78
|
+
//获取Erp地址数据
|
|
79
|
+
var _useGetRequest = useGetRequest(reduxDataMap, notJudgedErp),
|
|
80
|
+
_useGetRequest2 = _slicedToArray(_useGetRequest, 2),
|
|
81
|
+
requestState = _useGetRequest2[0],
|
|
82
|
+
reloadGetRequest = _useGetRequest2[1];
|
|
74
83
|
var allState = useMemo(function () {
|
|
75
|
-
var allStateList = [globalState, logisticsCompanyState, sendDataState, addressDataState];
|
|
84
|
+
var allStateList = [globalState, logisticsCompanyState, sendDataState, addressDataState, requestState];
|
|
76
85
|
if (allStateList.includes("loading")) return "loading";
|
|
77
86
|
if (allStateList.includes("failed")) return "failed";
|
|
78
87
|
return "success";
|
|
79
|
-
}, [globalState, logisticsCompanyState, sendDataState, addressDataState]);
|
|
88
|
+
}, [globalState, logisticsCompanyState, sendDataState, addressDataState, requestState]);
|
|
80
89
|
var reloadData = /*#__PURE__*/function () {
|
|
81
|
-
var
|
|
90
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
82
91
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
83
92
|
while (1) switch (_context.prev = _context.next) {
|
|
84
93
|
case 0:
|
|
@@ -115,20 +124,28 @@ var Global = function Global(_ref) {
|
|
|
115
124
|
_context.next = 17;
|
|
116
125
|
return reloadGetErpAddressData();
|
|
117
126
|
case 17:
|
|
127
|
+
_context.t4 = requestState === "failed";
|
|
128
|
+
if (!_context.t4) {
|
|
129
|
+
_context.next = 21;
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
_context.next = 21;
|
|
133
|
+
return reloadGetRequest();
|
|
134
|
+
case 21:
|
|
118
135
|
setLoading(false);
|
|
119
136
|
message.success("刷新完成");
|
|
120
|
-
case
|
|
137
|
+
case 23:
|
|
121
138
|
case "end":
|
|
122
139
|
return _context.stop();
|
|
123
140
|
}
|
|
124
141
|
}, _callee);
|
|
125
142
|
}));
|
|
126
143
|
return function reloadData() {
|
|
127
|
-
return
|
|
144
|
+
return _ref2.apply(this, arguments);
|
|
128
145
|
};
|
|
129
146
|
}();
|
|
130
147
|
var initDataSource = /*#__PURE__*/function () {
|
|
131
|
-
var
|
|
148
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
132
149
|
var mapping, mergeMapping, promises, _Object$keys, _Object$keys2, _Object$keys2$filter, _promises;
|
|
133
150
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
134
151
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -176,7 +193,7 @@ var Global = function Global(_ref) {
|
|
|
176
193
|
}, _callee2, null, [[4, 10]]);
|
|
177
194
|
}));
|
|
178
195
|
return function initDataSource() {
|
|
179
|
-
return
|
|
196
|
+
return _ref3.apply(this, arguments);
|
|
180
197
|
};
|
|
181
198
|
}();
|
|
182
199
|
if (allState === "loading") {
|
|
@@ -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;
|
|
@@ -13,9 +13,16 @@ import GetFormItem from "../../GetFormItem";
|
|
|
13
13
|
import { BsGoodsTable } from "../../Common";
|
|
14
14
|
import { BsHeaderGood } from "../common/index";
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
|
+
import { isNull, findLabelBySelectValue } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
import { BsGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
18
|
import { SYMBOL } from "../../../constant";
|
|
19
|
+
var hasQualityValue = function hasQualityValue(value, componentConfig) {
|
|
20
|
+
var _findLabelBySelectVal, _findLabelBySelectVal2;
|
|
21
|
+
var label = (_findLabelBySelectVal = findLabelBySelectValue(value, componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (item) {
|
|
22
|
+
return item.label;
|
|
23
|
+
})) === null || _findLabelBySelectVal2 === void 0 ? void 0 : _findLabelBySelectVal2[0];
|
|
24
|
+
return label === "质量类";
|
|
25
|
+
};
|
|
19
26
|
var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
20
27
|
var _this = this,
|
|
21
28
|
_this$componentConfig6;
|
|
@@ -109,16 +116,45 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
|
|
|
109
116
|
}));
|
|
110
117
|
this.children = [this.bsGoods];
|
|
111
118
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
112
|
-
this.rules =
|
|
113
|
-
|
|
119
|
+
this.rules = [
|
|
120
|
+
//花西子定制,当自定义问题场景组件值一级为“质量类”时,校验bs商品信息是否存在一行商品标记
|
|
121
|
+
{
|
|
114
122
|
validator: function validator(_, value) {
|
|
115
123
|
var _value$bsGoods;
|
|
116
|
-
if (
|
|
124
|
+
if (value !== null && value !== void 0 && (_value$bsGoods = value.bsGoods) !== null && _value$bsGoods !== void 0 && _value$bsGoods.length) {
|
|
125
|
+
var _options$effects, _options$effects$temp, _options$effects$temp2;
|
|
126
|
+
var specialCascader = "8MIqJOso1j";
|
|
127
|
+
var cascader = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : (_options$effects$temp = _options$effects.templateDetail) === null || _options$effects$temp === void 0 ? void 0 : (_options$effects$temp2 = _options$effects$temp.componentDtoList) === null || _options$effects$temp2 === void 0 ? void 0 : _options$effects$temp2.find(function (item) {
|
|
128
|
+
return specialCascader === (item === null || item === void 0 ? void 0 : item.uniqueKey);
|
|
129
|
+
});
|
|
130
|
+
var hasQuality = false;
|
|
131
|
+
if (cascader !== null && cascader !== void 0 && cascader.componentConfig) {
|
|
132
|
+
var _options$effects2, _options$effects2$for;
|
|
133
|
+
var specialCascaderValue = options === null || options === void 0 ? void 0 : (_options$effects2 = options.effects) === null || _options$effects2 === void 0 ? void 0 : (_options$effects2$for = _options$effects2.form) === null || _options$effects2$for === void 0 ? void 0 : _options$effects2$for.getFieldValue(specialCascader);
|
|
134
|
+
hasQuality = hasQualityValue(specialCascaderValue, cascader === null || cascader === void 0 ? void 0 : cascader.componentConfig);
|
|
135
|
+
}
|
|
136
|
+
if (hasQuality) {
|
|
137
|
+
var _value$bsGoods2;
|
|
138
|
+
var hasOneMark = value === null || value === void 0 ? void 0 : (_value$bsGoods2 = value.bsGoods) === null || _value$bsGoods2 === void 0 ? void 0 : _value$bsGoods2.some(function (good) {
|
|
139
|
+
return good.mark === "是";
|
|
140
|
+
});
|
|
141
|
+
if (!hasOneMark) return Promise.reject(new Error("当【问题场景】组件一级为“质量类”时,商品信息需有一行「商品标记」为“是”"));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return Promise.resolve();
|
|
145
|
+
}
|
|
146
|
+
}];
|
|
147
|
+
(this === null || this === void 0 ? void 0 : (_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required) && this.rules.push({
|
|
148
|
+
required: true,
|
|
149
|
+
validator: function validator(_, value) {
|
|
150
|
+
var _value$bsGoods3;
|
|
151
|
+
console.log("111");
|
|
152
|
+
if (!value || !(value !== null && value !== void 0 && (_value$bsGoods3 = value.bsGoods) !== null && _value$bsGoods3 !== void 0 && _value$bsGoods3.length)) {
|
|
117
153
|
return Promise.reject(new Error("请选择bs商品"));
|
|
118
154
|
}
|
|
119
155
|
return Promise.resolve();
|
|
120
156
|
}
|
|
121
|
-
}
|
|
157
|
+
});
|
|
122
158
|
this.dataType = "object";
|
|
123
159
|
});
|
|
124
160
|
export default BsGoods;
|
|
@@ -24,7 +24,8 @@ var componentType = {
|
|
|
24
24
|
GY_REISSUE_GOODS: "gyReissueType",
|
|
25
25
|
GY_RETURN_GOODS: "gyReturnType",
|
|
26
26
|
JST_REISSUE_GOODS: "jstReissueType",
|
|
27
|
-
JST_RETURN_GOODS: "jstReturnType"
|
|
27
|
+
JST_RETURN_GOODS: "jstReturnType",
|
|
28
|
+
KM_REISSUE_GOODS: "kmReissueType"
|
|
28
29
|
};
|
|
29
30
|
var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
30
31
|
var _this = this;
|
|
@@ -25,7 +25,8 @@ var componentType = {
|
|
|
25
25
|
GY_REISSUE_GOODS: "gyReissueType",
|
|
26
26
|
GY_RETURN_GOODS: "gyReturnType",
|
|
27
27
|
JST_REISSUE_GOODS: "jstReissueType",
|
|
28
|
-
JST_RETURN_GOODS: "jstReturnType"
|
|
28
|
+
JST_RETURN_GOODS: "jstReturnType",
|
|
29
|
+
KM_REISSUE_GOODS: "kmReissueType"
|
|
29
30
|
};
|
|
30
31
|
var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
31
32
|
var _this = this;
|
|
@@ -20,7 +20,8 @@ var componentType = {
|
|
|
20
20
|
GY_REISSUE_GOODS: "gySystemOrderNo",
|
|
21
21
|
GY_RETURN_GOODS: "gySystemOrderNo",
|
|
22
22
|
JST_REISSUE_GOODS: "jstSystemOrderNo",
|
|
23
|
-
JST_RETURN_GOODS: "jstSystemOrderNo"
|
|
23
|
+
JST_RETURN_GOODS: "jstSystemOrderNo",
|
|
24
|
+
KM_REISSUE_GOODS: "kmSystemOrderNo"
|
|
24
25
|
};
|
|
25
26
|
var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
|
|
26
27
|
var _this = this;
|
|
@@ -93,7 +93,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
93
93
|
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,
|
|
94
94
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
95
95
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
96
|
-
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 :
|
|
96
|
+
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 : "",
|
|
97
97
|
component: /*#__PURE__*/React.createElement(BuyerNick, _extends({}, _this.componentConfig, {
|
|
98
98
|
shopId: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.shopId,
|
|
99
99
|
shopList: (_this$effects4 = _this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.shopList,
|
|
@@ -126,6 +126,8 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
126
126
|
this.canSort = true;
|
|
127
127
|
this.children = [];
|
|
128
128
|
this.dataType = "string";
|
|
129
|
+
this.componentConfig = options.componentConfig;
|
|
130
|
+
this.effects = options.effects;
|
|
129
131
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
130
132
|
validator: function validator(_, value) {
|
|
131
133
|
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
@@ -134,8 +136,6 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
134
136
|
return Promise.resolve();
|
|
135
137
|
}
|
|
136
138
|
}] : [];
|
|
137
|
-
this.componentConfig = options.componentConfig;
|
|
138
|
-
this.effects = options.effects;
|
|
139
139
|
}
|
|
140
140
|
// 渲染淘宝端的时候需要亮灯
|
|
141
141
|
);
|
|
@@ -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
|
|
@@ -39,6 +39,7 @@ export declare const BsGoodsTable: ({ list, showHeader, text, type, }: {
|
|
|
39
39
|
type?: string | undefined;
|
|
40
40
|
}) => React.JSX.Element;
|
|
41
41
|
export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
|
|
42
|
+
export declare const KmVideoRender: ({ fileList, canDownload }: any) => React.JSX.Element;
|
|
42
43
|
export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
|
|
43
44
|
export declare const MsgContent: ({ horizontal, list, valueKey, failValue, options, }: any) => React.JSX.Element;
|
|
44
45
|
export declare const AlipayBill: (props: any) => React.JSX.Element;
|
|
@@ -23,6 +23,7 @@ import defaultImg from "./img/default-img.png";
|
|
|
23
23
|
import CopyText from "../../commonComponents/CopyText";
|
|
24
24
|
import { KM_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, BS_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, msgTypeCh, getMapping, columnsGoodsList } from "@kmkf-fe-packages/kmkf-utils";
|
|
25
25
|
import { getColumnsMap } from "./constants/columnsBaseInfoMap";
|
|
26
|
+
import { VideoCameraTwoTone } from "@ant-design/icons";
|
|
26
27
|
var Paragraph = Typography.Paragraph;
|
|
27
28
|
export var getFormItem = function getFormItem(_ref) {
|
|
28
29
|
var name = _ref.name,
|
|
@@ -79,10 +80,7 @@ export var showImage = function showImage(_ref2) {
|
|
|
79
80
|
},
|
|
80
81
|
src: picUrl
|
|
81
82
|
}), /*#__PURE__*/React.createElement("div", {
|
|
82
|
-
className: styles.options
|
|
83
|
-
onClick: function onClick() {
|
|
84
|
-
console.log("show---", showHeader);
|
|
85
|
-
}
|
|
83
|
+
className: styles.options
|
|
86
84
|
}, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
|
|
87
85
|
title: "商品id",
|
|
88
86
|
text: item.numIid
|
|
@@ -635,9 +633,128 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
635
633
|
src: fileUrl
|
|
636
634
|
})));
|
|
637
635
|
};
|
|
638
|
-
export var
|
|
639
|
-
var
|
|
640
|
-
|
|
636
|
+
export var KmVideoRender = function KmVideoRender(_ref13) {
|
|
637
|
+
var _ref13$fileList = _ref13.fileList,
|
|
638
|
+
fileList = _ref13$fileList === void 0 ? [] : _ref13$fileList,
|
|
639
|
+
_ref13$canDownload = _ref13.canDownload,
|
|
640
|
+
canDownload = _ref13$canDownload === void 0 ? false : _ref13$canDownload;
|
|
641
|
+
var _useState13 = useState(false),
|
|
642
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
643
|
+
visible = _useState14[0],
|
|
644
|
+
setVisible = _useState14[1];
|
|
645
|
+
var _useState15 = useState(""),
|
|
646
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
647
|
+
fileUrl = _useState16[0],
|
|
648
|
+
setFileUrl = _useState16[1];
|
|
649
|
+
var _useState17 = useState(""),
|
|
650
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
651
|
+
fileType = _useState18[0],
|
|
652
|
+
setFileType = _useState18[1];
|
|
653
|
+
var _useState19 = useState(""),
|
|
654
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
655
|
+
fileName = _useState20[0],
|
|
656
|
+
setFileName = _useState20[1];
|
|
657
|
+
var _useState21 = useState(false),
|
|
658
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
659
|
+
downloading = _useState22[0],
|
|
660
|
+
setDownloading = _useState22[1];
|
|
661
|
+
var handleCancel = function handleCancel() {
|
|
662
|
+
setFileUrl("");
|
|
663
|
+
setFileName("");
|
|
664
|
+
setVisible(false);
|
|
665
|
+
setDownloading(false);
|
|
666
|
+
};
|
|
667
|
+
var onPreview = function onPreview(file) {
|
|
668
|
+
var _file$kmVideoUrl;
|
|
669
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$kmVideoUrl = file.kmVideoUrl) === null || _file$kmVideoUrl === void 0 ? void 0 : _file$kmVideoUrl.split(".");
|
|
670
|
+
var fileType = fileArr[fileArr.length - 1];
|
|
671
|
+
if (["mp4", "avi", "mpeg", "asf", "mov", "3gp", "wmv", "rmvb"].includes(fileType.toLowerCase())) {
|
|
672
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.kmVideoUrl);
|
|
673
|
+
setFileName(file === null || file === void 0 ? void 0 : file.kmVideoName);
|
|
674
|
+
setFileType("video");
|
|
675
|
+
setVisible(true);
|
|
676
|
+
} else {
|
|
677
|
+
window.open(file === null || file === void 0 ? void 0 : file.kmVideoUrl);
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
var download = function download(url, name) {
|
|
681
|
+
if (url !== null && url !== void 0 && url.startsWith("https://erp-storage-video.oss-cn-beijing.aliyuncs.com")) {
|
|
682
|
+
window.open(url);
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
setDownloading(true);
|
|
686
|
+
fetch(url).then(function (res) {
|
|
687
|
+
return res.blob();
|
|
688
|
+
}).then(function (blob) {
|
|
689
|
+
var a = document.createElement("a");
|
|
690
|
+
document.body.appendChild(a);
|
|
691
|
+
a.style.display = "none";
|
|
692
|
+
var url = window.URL.createObjectURL(blob);
|
|
693
|
+
a.href = url;
|
|
694
|
+
a.download = name;
|
|
695
|
+
a.click();
|
|
696
|
+
document.body.removeChild(a);
|
|
697
|
+
window.URL.revokeObjectURL(url);
|
|
698
|
+
}).finally(function () {
|
|
699
|
+
setDownloading(false);
|
|
700
|
+
});
|
|
701
|
+
};
|
|
702
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
|
|
703
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
704
|
+
align: "center"
|
|
705
|
+
}, /*#__PURE__*/React.createElement(VideoCameraTwoTone, {
|
|
706
|
+
style: {
|
|
707
|
+
fontSize: 16
|
|
708
|
+
}
|
|
709
|
+
}), item.kmVideoType && "".concat(item.kmVideoType), /*#__PURE__*/React.createElement("a", {
|
|
710
|
+
style: {
|
|
711
|
+
color: "#1890ff",
|
|
712
|
+
cursor: "pointer",
|
|
713
|
+
display: "block"
|
|
714
|
+
},
|
|
715
|
+
onClick: function onClick(e) {
|
|
716
|
+
e.preventDefault();
|
|
717
|
+
onPreview(item);
|
|
718
|
+
},
|
|
719
|
+
href: item === null || item === void 0 ? void 0 : item.kmVideoUrl
|
|
720
|
+
}, item.kmVideoName));
|
|
721
|
+
}), /*#__PURE__*/React.createElement(Modal, {
|
|
722
|
+
visible: visible,
|
|
723
|
+
title: fileName,
|
|
724
|
+
footer: null,
|
|
725
|
+
onCancel: handleCancel
|
|
726
|
+
}, canDownload ? /*#__PURE__*/React.createElement(Button, {
|
|
727
|
+
type: "link",
|
|
728
|
+
onClick: function onClick() {
|
|
729
|
+
return download(fileUrl, fileName);
|
|
730
|
+
},
|
|
731
|
+
loading: downloading
|
|
732
|
+
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
733
|
+
text: fileUrl,
|
|
734
|
+
onCopy: function onCopy() {
|
|
735
|
+
message.success("复制成功");
|
|
736
|
+
}
|
|
737
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
738
|
+
type: "link"
|
|
739
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === "pic" ? /*#__PURE__*/React.createElement("img", {
|
|
740
|
+
alt: "example",
|
|
741
|
+
style: {
|
|
742
|
+
width: "100%"
|
|
743
|
+
},
|
|
744
|
+
src: fileUrl
|
|
745
|
+
}) : /*#__PURE__*/React.createElement("video", {
|
|
746
|
+
style: {
|
|
747
|
+
width: "100%",
|
|
748
|
+
height: "100%"
|
|
749
|
+
},
|
|
750
|
+
autoPlay: true,
|
|
751
|
+
controls: true,
|
|
752
|
+
src: fileUrl
|
|
753
|
+
})));
|
|
754
|
+
};
|
|
755
|
+
export var BsSystemOrderTable = function BsSystemOrderTable(_ref14) {
|
|
756
|
+
var value = _ref14.value,
|
|
757
|
+
type = _ref14.type;
|
|
641
758
|
var columnMap = {
|
|
642
759
|
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
643
760
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -692,15 +809,15 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
692
809
|
// ruleName: string
|
|
693
810
|
// status: string
|
|
694
811
|
// }
|
|
695
|
-
export var MsgContent = function MsgContent(
|
|
696
|
-
var
|
|
697
|
-
horizontal =
|
|
698
|
-
|
|
699
|
-
list =
|
|
700
|
-
valueKey =
|
|
701
|
-
failValue =
|
|
702
|
-
|
|
703
|
-
options =
|
|
812
|
+
export var MsgContent = function MsgContent(_ref15) {
|
|
813
|
+
var _ref15$horizontal = _ref15.horizontal,
|
|
814
|
+
horizontal = _ref15$horizontal === void 0 ? true : _ref15$horizontal,
|
|
815
|
+
_ref15$list = _ref15.list,
|
|
816
|
+
list = _ref15$list === void 0 ? [] : _ref15$list,
|
|
817
|
+
valueKey = _ref15.valueKey,
|
|
818
|
+
failValue = _ref15.failValue,
|
|
819
|
+
_ref15$options = _ref15.options,
|
|
820
|
+
options = _ref15$options === void 0 ? [] : _ref15$options;
|
|
704
821
|
var getColorByStatus = function getColorByStatus(value) {
|
|
705
822
|
var _options$find2;
|
|
706
823
|
return ((_options$find2 = options.find(function (innerItem) {
|
|
@@ -737,7 +854,7 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
737
854
|
var key = item.msgType || "ding";
|
|
738
855
|
var formatMsgContent = /*#__PURE__*/React.createElement("span", {
|
|
739
856
|
key: index
|
|
740
|
-
}, msgTypeCh[key]
|
|
857
|
+
}, msgTypeCh[key], "-", item.ruleName ? "".concat(item.ruleName, "-") : "", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || "");
|
|
741
858
|
return /*#__PURE__*/React.createElement("div", {
|
|
742
859
|
key: "wrap_".concat(index),
|
|
743
860
|
style: {
|
|
@@ -758,20 +875,20 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
758
875
|
export var AlipayBill = function AlipayBill(props) {
|
|
759
876
|
var value = props.value,
|
|
760
877
|
platform = props.platform;
|
|
761
|
-
var
|
|
762
|
-
|
|
763
|
-
visible =
|
|
764
|
-
setVisible =
|
|
765
|
-
var
|
|
766
|
-
|
|
767
|
-
msg =
|
|
768
|
-
setMsg =
|
|
769
|
-
var
|
|
770
|
-
|
|
771
|
-
hasUrl =
|
|
772
|
-
setHasUrl =
|
|
878
|
+
var _useState23 = useState(false),
|
|
879
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
880
|
+
visible = _useState24[0],
|
|
881
|
+
setVisible = _useState24[1];
|
|
882
|
+
var _useState25 = useState(""),
|
|
883
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
884
|
+
msg = _useState26[0],
|
|
885
|
+
setMsg = _useState26[1];
|
|
886
|
+
var _useState27 = useState(false),
|
|
887
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
888
|
+
hasUrl = _useState28[0],
|
|
889
|
+
setHasUrl = _useState28[1];
|
|
773
890
|
var voucherHandle = /*#__PURE__*/function () {
|
|
774
|
-
var
|
|
891
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
|
|
775
892
|
var params, res, data, msg;
|
|
776
893
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
777
894
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -805,7 +922,7 @@ export var AlipayBill = function AlipayBill(props) {
|
|
|
805
922
|
}, _callee);
|
|
806
923
|
}));
|
|
807
924
|
return function voucherHandle(_x2) {
|
|
808
|
-
return
|
|
925
|
+
return _ref16.apply(this, arguments);
|
|
809
926
|
};
|
|
810
927
|
}();
|
|
811
928
|
var closeHandle = function closeHandle(e) {
|