@kmkf-fe-packages/kmkf-work-order-service-component 2.7.5 → 2.7.7-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/FlowTemplateDetailV2/common.js +1 -1
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/index.js +185 -97
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.d.ts +6 -2
- package/dist/esm/FlowTemplateDetailV2/components/FormRender/onBlur.js +39 -29
- package/dist/esm/FlowTemplateDetailV2/components/XiaozhiConversation/index.d.ts +1 -0
- package/dist/esm/FlowTemplateDetailV2/components/XiaozhiConversation/index.js +113 -25
- package/dist/esm/FlowTemplateDetailV2/constant.js +1 -1
- package/dist/esm/FlowTemplateDetailV2/index.js +12 -9
- package/dist/esm/common/constant.js +12 -0
- package/dist/esm/common/utils/constant.js +14 -0
- package/dist/esm/common/utils/submitDataTransOldFormat.js +4 -1
- package/dist/esm/common/utils/tools.d.ts +1 -1
- package/dist/esm/common/utils/tools.js +37 -26
- package/dist/esm/common/utils/tools_constants.js +21 -6
- package/dist/esm/common/utils/transformWorkOrderData.js +36 -6
- package/dist/esm/model/logicFlow/selector.d.ts +0 -3
- package/dist/esm/model/paymentWorkOrder/selector.d.ts +0 -9
- package/dist/esm/model/singleShopWorkOrder/selector.d.ts +0 -5
- package/package.json +5 -5
|
@@ -40,7 +40,7 @@ export var FLOW_STATUS_V2 = {
|
|
|
40
40
|
RETURNING: '回退中'
|
|
41
41
|
};
|
|
42
42
|
//不能回填的组件type
|
|
43
|
-
export var CANNOT_BACK_FILL = ['LOGISTICS_TRAJECTORY', 'LOGISTICS_TRAJECTORY_MORE', 'BUYER_MESSAGE_NOTICE', 'MSG_STATUS', 'NEW_PAYMENT_STATUS', 'REISSUE_STATUS', 'REISSUE_LOGISTICS', 'RETURN_GOODS_STATUS', 'RETURN_GOODS_TRADE_ID', 'ADJUST_WORK_ORDER_STATUS', 'ERP_REMARK', 'INVOICE_STATUS', 'INVOICING_STATUS', 'EXCHANGE_STATUS', 'WAREHOUSING_STATUS', 'BS_E3_WAREHOUSING_STATUS', 'WDT_WAREHOUSING_STATUS', 'JKY_WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'SWAP_OUT_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE', 'ORDER_TYPE', 'REFUND_TYPE', 'RETURN_EXCHANGE_GOODS_REVIEW_STATUS', 'EXECUTE_ACTION_TYPE'];
|
|
43
|
+
export var CANNOT_BACK_FILL = ['LOGISTICS_TRAJECTORY', 'LOGISTICS_TRAJECTORY_MORE', 'BUYER_MESSAGE_NOTICE', 'MSG_STATUS', 'NEW_PAYMENT_STATUS', 'REISSUE_STATUS', 'REISSUE_LOGISTICS', 'RETURN_GOODS_STATUS', 'RETURN_GOODS_TRADE_ID', 'ADJUST_WORK_ORDER_STATUS', 'ERP_REMARK', 'INVOICE_STATUS', 'INVOICING_STATUS', 'EXCHANGE_STATUS', 'WAREHOUSING_STATUS', 'BS_E3_WAREHOUSING_STATUS', 'WDT_WAREHOUSING_STATUS', 'WLN_WAREHOUSING_STATUS', 'JKY_WAREHOUSING_STATUS', 'EXCHANGE_TRADE_ID', 'REISSUE_TRADE_ID', 'SWAP_OUT_TRADE_ID', 'ERP_AFTER_SALE_TRADE_ID', 'LOGISTICS_INTERCEPTION', 'LOGISTICS_INTERCEPTION_MORE', 'ORDER_TYPE', 'REFUND_TYPE', 'RETURN_EXCHANGE_GOODS_REVIEW_STATUS', 'EXECUTE_ACTION_TYPE'];
|
|
44
44
|
export var verifyHandle = function verifyHandle(data, componentDtoList) {
|
|
45
45
|
var _componentDtoList$fin, _componentDtoList$fin2, _data$paymentUniqueKe, _data$paymentUniqueKe2;
|
|
46
46
|
var res = {
|
|
@@ -3,6 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
5
|
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); }
|
|
6
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
6
7
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
7
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); } }
|
|
8
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); }); }; }
|
|
@@ -411,7 +412,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
411
412
|
}, [labelComponent, record]);
|
|
412
413
|
var queryDetail = /*#__PURE__*/function () {
|
|
413
414
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
|
|
414
|
-
var workOrderId, shopId, shopList, record, orderNo, buyerId, buyerNick, jsonMap, newRecord, jsonMapOrderId, getCacheInfo, newFormValues, transData, initialValues, tradeIdUniqueKey, _record$jsonMap2, _record$jsonMap3,
|
|
415
|
+
var workOrderId, shopId, shopList, record, orderNo, buyerId, buyerNick, jsonMap, newRecord, jsonMapOrderId, getCacheInfo, newFormValues, transData, initialValues, tradeIdUniqueKey, _record$jsonMap2, _record$jsonMap3, _record$jsonMap4, currentNodeTradeIdUniqueKey, _currentNodeTid, logisticsOrderBackSources, lastLogisticsOrderBackSource, preTradeId, tradeId, isSkx, _iterator, _step, source, initFormValues, _getCacheInfo, _getCacheInfo2, _getCacheInfo3, _getCacheInfo4, _orderNo, _shopId, orderNoField, _transData, _initialValues, antFormEl;
|
|
415
416
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
416
417
|
while (1) switch (_context2.prev = _context2.next) {
|
|
417
418
|
case 0:
|
|
@@ -441,7 +442,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
441
442
|
return prv;
|
|
442
443
|
}, {});
|
|
443
444
|
if (!workOrderId) {
|
|
444
|
-
_context2.next =
|
|
445
|
+
_context2.next = 70;
|
|
445
446
|
break;
|
|
446
447
|
}
|
|
447
448
|
// 先初始化端上内容
|
|
@@ -453,7 +454,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
453
454
|
}
|
|
454
455
|
return prv;
|
|
455
456
|
}, ''); //获取保存时的订单缓存数据,解决用户显隐组件不展示二次编辑没有订单信息的问题
|
|
456
|
-
getCacheInfo = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
457
|
+
getCacheInfo = autoSubmit ? {} : JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
457
458
|
newFormValues = _objectSpread({}, getCacheInfo[jsonMapOrderId] || {});
|
|
458
459
|
newFormValues = reversalFormValues(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, newFormValues);
|
|
459
460
|
newRecord.jsonMap = _objectSpread(_objectSpread(_objectSpread({}, newFormValues), jsonMap), newRecord.jsonMap);
|
|
@@ -474,26 +475,45 @@ var FormRender = function FormRender(props, ref) {
|
|
|
474
475
|
// TODO: 非开始节点录入,都会有workOrderId,这里判断是否有前置组件含有订单号;如果存在订单号,进行订单反填。
|
|
475
476
|
tradeIdUniqueKey = findComponentUniqueKeyByType(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList, 'TRADE_ID_INPUT');
|
|
476
477
|
if (!notAutoFillFlag) {
|
|
477
|
-
_context2.next =
|
|
478
|
+
_context2.next = 66;
|
|
478
479
|
break;
|
|
479
480
|
}
|
|
480
481
|
currentNodeTradeIdUniqueKey = findComponentUniqueKeyByType(templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList, 'TRADE_ID_INPUT');
|
|
481
482
|
_currentNodeTid = record === null || record === void 0 ? void 0 : (_record$jsonMap2 = record.jsonMap) === null || _record$jsonMap2 === void 0 ? void 0 : _record$jsonMap2["".concat(currentNodeTradeIdUniqueKey, "_tradeId")];
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
483
|
+
logisticsOrderBackSources = ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (cur, component) {
|
|
484
|
+
if (component.workOrderComponentType === 'EXPRESS_LOGISTICS_SELECT') {
|
|
485
|
+
var _initialValues$compon;
|
|
486
|
+
var logisticsCode = (_initialValues$compon = initialValues[component.uniqueKey]) === null || _initialValues$compon === void 0 ? void 0 : _initialValues$compon.order;
|
|
487
|
+
if (logisticsCode) {
|
|
488
|
+
cur.push({
|
|
489
|
+
logisticsCode: logisticsCode,
|
|
490
|
+
uniqueKey: component.uniqueKey
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
if (component.workOrderComponentType === 'LOGISTICS_INTERCEPTION') {
|
|
495
|
+
var _initialValues$compon2;
|
|
496
|
+
var _logisticsCode = (_initialValues$compon2 = initialValues[component.uniqueKey]) === null || _initialValues$compon2 === void 0 ? void 0 : _initialValues$compon2.interceptCode;
|
|
497
|
+
if (_logisticsCode) {
|
|
498
|
+
cur.push({
|
|
499
|
+
logisticsCode: _logisticsCode,
|
|
500
|
+
uniqueKey: component.uniqueKey
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
return cur;
|
|
505
|
+
}, []);
|
|
506
|
+
lastLogisticsOrderBackSource = logisticsOrderBackSources[logisticsOrderBackSources.length - 1];
|
|
507
|
+
preTradeId = tradeIdUniqueKey && shopId && record !== null && record !== void 0 && (_record$jsonMap3 = record.jsonMap) !== null && _record$jsonMap3 !== void 0 && _record$jsonMap3["".concat(tradeIdUniqueKey, "_tradeId")] && firstOrderBackfill ? record === null || record === void 0 ? void 0 : (_record$jsonMap4 = record.jsonMap) === null || _record$jsonMap4 === void 0 ? void 0 : _record$jsonMap4["".concat(tradeIdUniqueKey, "_tradeId")] : undefined;
|
|
489
508
|
tradeId = _currentNodeTid || preTradeId;
|
|
509
|
+
isSkx = ['TR3E2FYXFZCFANVG6O6AALSM'].includes(companyKey); // SKX 特殊处理逻辑
|
|
490
510
|
if (!tradeId) {
|
|
491
|
-
_context2.next =
|
|
511
|
+
_context2.next = 35;
|
|
492
512
|
break;
|
|
493
513
|
}
|
|
494
514
|
queryLabels(tradeId, shopId);
|
|
495
515
|
queryMemberLevels(tradeId, shopId);
|
|
496
|
-
_context2.next =
|
|
516
|
+
_context2.next = 33;
|
|
497
517
|
return orderBack({
|
|
498
518
|
companyKey: companyKey,
|
|
499
519
|
order_no: tradeId,
|
|
@@ -505,17 +525,20 @@ var FormRender = function FormRender(props, ref) {
|
|
|
505
525
|
fromQNCreateWorkOrderByOrderNo: fromQNCreateWorkOrderByOrderNo,
|
|
506
526
|
plat: plat,
|
|
507
527
|
callKey: 1,
|
|
508
|
-
setLoading: setLoading
|
|
528
|
+
setLoading: setLoading,
|
|
529
|
+
skipCache: autoSubmit,
|
|
530
|
+
matchLogisticsNo: lastLogisticsOrderBackSource === null || lastLogisticsOrderBackSource === void 0 ? void 0 : lastLogisticsOrderBackSource.logisticsCode,
|
|
531
|
+
skipOrderBackUniqueKeys: lastLogisticsOrderBackSource !== null && lastLogisticsOrderBackSource !== void 0 && lastLogisticsOrderBackSource.uniqueKey ? [lastLogisticsOrderBackSource.uniqueKey] : []
|
|
509
532
|
});
|
|
510
|
-
case
|
|
511
|
-
_context2.next =
|
|
533
|
+
case 33:
|
|
534
|
+
_context2.next = 63;
|
|
512
535
|
break;
|
|
513
|
-
case
|
|
536
|
+
case 35:
|
|
514
537
|
if (!isSkx) {
|
|
515
|
-
_context2.next =
|
|
538
|
+
_context2.next = 41;
|
|
516
539
|
break;
|
|
517
540
|
}
|
|
518
|
-
_context2.next =
|
|
541
|
+
_context2.next = 38;
|
|
519
542
|
return skxOrderBack({
|
|
520
543
|
form: form,
|
|
521
544
|
companyKey: companyKey,
|
|
@@ -523,49 +546,78 @@ var FormRender = function FormRender(props, ref) {
|
|
|
523
546
|
componentOnBlur: componentOnBlur,
|
|
524
547
|
jsonMap: record === null || record === void 0 ? void 0 : record.jsonMap
|
|
525
548
|
});
|
|
526
|
-
case
|
|
549
|
+
case 38:
|
|
527
550
|
// 售后单反填
|
|
528
551
|
afterSaleOrderBack(form, templateDetail);
|
|
529
|
-
_context2.next =
|
|
552
|
+
_context2.next = 63;
|
|
530
553
|
break;
|
|
531
|
-
case
|
|
532
|
-
if (!
|
|
533
|
-
_context2.next =
|
|
554
|
+
case 41:
|
|
555
|
+
if (!logisticsOrderBackSources.length) {
|
|
556
|
+
_context2.next = 62;
|
|
534
557
|
break;
|
|
535
558
|
}
|
|
536
|
-
|
|
559
|
+
_iterator = _createForOfIteratorHelper(logisticsOrderBackSources);
|
|
560
|
+
_context2.prev = 43;
|
|
561
|
+
_iterator.s();
|
|
562
|
+
case 45:
|
|
563
|
+
if ((_step = _iterator.n()).done) {
|
|
564
|
+
_context2.next = 52;
|
|
565
|
+
break;
|
|
566
|
+
}
|
|
567
|
+
source = _step.value;
|
|
537
568
|
afterSaleOrderBack(form, templateDetail);
|
|
538
|
-
_context2.next =
|
|
539
|
-
return
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
569
|
+
_context2.next = 50;
|
|
570
|
+
return onBlurExpressLogisticsCode({
|
|
571
|
+
form: form,
|
|
572
|
+
value: source.logisticsCode,
|
|
573
|
+
templateDetail: templateDetail,
|
|
574
|
+
setKmLoading: setKmLoading,
|
|
575
|
+
componentOnBlur: componentOnBlur,
|
|
576
|
+
sourceUniqueKey: source.uniqueKey
|
|
577
|
+
});
|
|
543
578
|
case 50:
|
|
579
|
+
_context2.next = 45;
|
|
580
|
+
break;
|
|
581
|
+
case 52:
|
|
582
|
+
_context2.next = 57;
|
|
583
|
+
break;
|
|
584
|
+
case 54:
|
|
585
|
+
_context2.prev = 54;
|
|
586
|
+
_context2.t0 = _context2["catch"](43);
|
|
587
|
+
_iterator.e(_context2.t0);
|
|
588
|
+
case 57:
|
|
589
|
+
_context2.prev = 57;
|
|
590
|
+
_iterator.f();
|
|
591
|
+
return _context2.finish(57);
|
|
592
|
+
case 60:
|
|
593
|
+
_context2.next = 63;
|
|
594
|
+
break;
|
|
595
|
+
case 62:
|
|
544
596
|
// 售后单反填
|
|
545
597
|
afterSaleOrderBack(form, templateDetail);
|
|
546
|
-
case
|
|
598
|
+
case 63:
|
|
547
599
|
// 仅在依赖值有值且映射值为空时触发一次映射
|
|
548
600
|
batchFillByMappingWhenTargetEmpty(initialValues);
|
|
549
|
-
_context2.next =
|
|
601
|
+
_context2.next = 68;
|
|
550
602
|
break;
|
|
551
|
-
case
|
|
603
|
+
case 66:
|
|
552
604
|
// 如果没有订单反填,则单独更新remark
|
|
553
605
|
fetchRemark(shopId, currentNodeTid);
|
|
554
606
|
// 售后单反填
|
|
555
607
|
afterSaleOrderBack(form, templateDetail);
|
|
556
|
-
case
|
|
557
|
-
_context2.next =
|
|
608
|
+
case 68:
|
|
609
|
+
_context2.next = 94;
|
|
558
610
|
break;
|
|
559
|
-
case
|
|
611
|
+
case 70:
|
|
560
612
|
fillByShopId(shopId);
|
|
561
613
|
initFormValues = null;
|
|
562
614
|
if (plat !== null && plat !== void 0 && plat.subOrderNo) {
|
|
563
|
-
_getCacheInfo = JSON.parse(sessionStorage.getItem('cacheOmsOrderInfo') || '{}');
|
|
615
|
+
_getCacheInfo = autoSubmit ? {} : JSON.parse(sessionStorage.getItem('cacheOmsOrderInfo') || '{}');
|
|
564
616
|
if (plat !== null && plat !== void 0 && plat.subOrderNo && plat.buyerId) {
|
|
565
617
|
initFormValues = (_getCacheInfo2 = _getCacheInfo["".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId)]) === null || _getCacheInfo2 === void 0 ? void 0 : _getCacheInfo2[plat === null || plat === void 0 ? void 0 : plat.subOrderNo];
|
|
566
618
|
}
|
|
567
619
|
} else {
|
|
568
|
-
_getCacheInfo3 = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
620
|
+
_getCacheInfo3 = autoSubmit ? {} : JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
569
621
|
if (orderNo && plat.buyerId) {
|
|
570
622
|
initFormValues = (_getCacheInfo4 = _getCacheInfo3["".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId)]) === null || _getCacheInfo4 === void 0 ? void 0 : _getCacheInfo4[orderNo];
|
|
571
623
|
} else if (!orderNo && plat.buyerId) {
|
|
@@ -575,7 +627,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
575
627
|
|
|
576
628
|
// console.log(orderNo, initFormValues);
|
|
577
629
|
if (!initFormValues) {
|
|
578
|
-
_context2.next =
|
|
630
|
+
_context2.next = 81;
|
|
579
631
|
break;
|
|
580
632
|
}
|
|
581
633
|
form.setFieldsValue(_objectSpread(_objectSpread({}, initFormValues), {}, {
|
|
@@ -592,9 +644,9 @@ var FormRender = function FormRender(props, ref) {
|
|
|
592
644
|
_orderNo = orderNoField !== null && orderNoField !== void 0 && orderNoField.uniqueKey ? initFormValues[orderNoField === null || orderNoField === void 0 ? void 0 : orderNoField.uniqueKey] || _orderNo : _orderNo;
|
|
593
645
|
}
|
|
594
646
|
fetchRemark(_shopId, _orderNo);
|
|
595
|
-
_context2.next =
|
|
647
|
+
_context2.next = 94;
|
|
596
648
|
break;
|
|
597
|
-
case
|
|
649
|
+
case 81:
|
|
598
650
|
_transData = calcWorkOrderList([{
|
|
599
651
|
jsonMap: jsonMap
|
|
600
652
|
}], [].concat(_toConsumableArray((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList) || []), _toConsumableArray((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || [])), 'init');
|
|
@@ -606,12 +658,12 @@ var FormRender = function FormRender(props, ref) {
|
|
|
606
658
|
batchFillByMapping(_initialValues);
|
|
607
659
|
//如果有订单号 订单返填 通过订单号入口进行工单录入,需要将订单数据反填到工单
|
|
608
660
|
if (!(orderNo && shopId)) {
|
|
609
|
-
_context2.next =
|
|
661
|
+
_context2.next = 92;
|
|
610
662
|
break;
|
|
611
663
|
}
|
|
612
664
|
queryLabels(orderNo, shopId);
|
|
613
665
|
queryMemberLevels(orderNo, shopId);
|
|
614
|
-
_context2.next =
|
|
666
|
+
_context2.next = 90;
|
|
615
667
|
return orderBack({
|
|
616
668
|
companyKey: companyKey,
|
|
617
669
|
order_no: orderNo,
|
|
@@ -624,17 +676,18 @@ var FormRender = function FormRender(props, ref) {
|
|
|
624
676
|
// TODO: 只有在千牛端通过订单号录入工单的时候,订单备注不需要反填
|
|
625
677
|
plat: plat,
|
|
626
678
|
callKey: 2,
|
|
627
|
-
setLoading: setLoading
|
|
679
|
+
setLoading: setLoading,
|
|
680
|
+
skipCache: autoSubmit
|
|
628
681
|
});
|
|
629
|
-
case
|
|
630
|
-
_context2.next =
|
|
682
|
+
case 90:
|
|
683
|
+
_context2.next = 94;
|
|
631
684
|
break;
|
|
632
|
-
case
|
|
685
|
+
case 92:
|
|
633
686
|
// 如果没有订单反填,则单独更新remark
|
|
634
687
|
fetchRemark(shopId, currentNodeTid);
|
|
635
688
|
// 售后单反填
|
|
636
689
|
afterSaleOrderBack(form, templateDetail);
|
|
637
|
-
case
|
|
690
|
+
case 94:
|
|
638
691
|
antFormEl = document.getElementsByClassName('ant-form');
|
|
639
692
|
(antFormEl === null || antFormEl === void 0 ? void 0 : antFormEl.length) > 0 && set(antFormEl, '0.scrollTop', 0);
|
|
640
693
|
resetMappingHideComponents();
|
|
@@ -643,11 +696,11 @@ var FormRender = function FormRender(props, ref) {
|
|
|
643
696
|
type: 'setaAutoSubmitFlag',
|
|
644
697
|
payload: true
|
|
645
698
|
});
|
|
646
|
-
case
|
|
699
|
+
case 98:
|
|
647
700
|
case "end":
|
|
648
701
|
return _context2.stop();
|
|
649
702
|
}
|
|
650
|
-
}, _callee2);
|
|
703
|
+
}, _callee2, null, [[43, 54, 57, 60]]);
|
|
651
704
|
}));
|
|
652
705
|
return function queryDetail(_x4) {
|
|
653
706
|
return _ref3.apply(this, arguments);
|
|
@@ -895,7 +948,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
895
948
|
|
|
896
949
|
//订单返填
|
|
897
950
|
var changeHandle = /*#__PURE__*/function () {
|
|
898
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(order_no) {
|
|
951
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(order_no, options) {
|
|
899
952
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
900
953
|
while (1) switch (_context5.prev = _context5.next) {
|
|
901
954
|
case 0:
|
|
@@ -928,7 +981,10 @@ var FormRender = function FormRender(props, ref) {
|
|
|
928
981
|
}, 0);
|
|
929
982
|
},
|
|
930
983
|
callKey: 3,
|
|
931
|
-
setLoading: setLoading
|
|
984
|
+
setLoading: setLoading,
|
|
985
|
+
skipCache: autoSubmit,
|
|
986
|
+
matchLogisticsNo: options === null || options === void 0 ? void 0 : options.matchLogisticsNo,
|
|
987
|
+
skipOrderBackUniqueKeys: options === null || options === void 0 ? void 0 : options.skipOrderBackUniqueKeys
|
|
932
988
|
});
|
|
933
989
|
case 5:
|
|
934
990
|
case "end":
|
|
@@ -936,7 +992,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
936
992
|
}
|
|
937
993
|
}, _callee5);
|
|
938
994
|
}));
|
|
939
|
-
return function changeHandle(_x9) {
|
|
995
|
+
return function changeHandle(_x9, _x10) {
|
|
940
996
|
return _ref6.apply(this, arguments);
|
|
941
997
|
};
|
|
942
998
|
}();
|
|
@@ -1046,7 +1102,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1046
1102
|
|
|
1047
1103
|
//组件失焦事件
|
|
1048
1104
|
var componentOnBlur = /*#__PURE__*/function () {
|
|
1049
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value, type, uniqueKey) {
|
|
1105
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(value, type, uniqueKey, options) {
|
|
1050
1106
|
var promises;
|
|
1051
1107
|
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
1052
1108
|
while (1) switch (_context6.prev = _context6.next) {
|
|
@@ -1072,36 +1128,43 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1072
1128
|
setKmLoading: setKmLoading
|
|
1073
1129
|
});
|
|
1074
1130
|
case 4:
|
|
1075
|
-
_context6.next =
|
|
1131
|
+
_context6.next = 58;
|
|
1076
1132
|
break;
|
|
1077
1133
|
case 6:
|
|
1078
1134
|
if (!(type === 'expressLogisticsCode')) {
|
|
1079
|
-
_context6.next =
|
|
1135
|
+
_context6.next = 18;
|
|
1080
1136
|
break;
|
|
1081
1137
|
}
|
|
1082
|
-
|
|
1138
|
+
if ("".concat(value || '').trim()) {
|
|
1139
|
+
_context6.next = 9;
|
|
1140
|
+
break;
|
|
1141
|
+
}
|
|
1142
|
+
return _context6.abrupt("return");
|
|
1143
|
+
case 9:
|
|
1144
|
+
_context6.next = 11;
|
|
1083
1145
|
return onBlurExpressLogisticsCode({
|
|
1084
1146
|
form: form,
|
|
1085
1147
|
value: value,
|
|
1086
1148
|
templateDetail: templateDetail,
|
|
1087
1149
|
setKmLoading: setKmLoading,
|
|
1088
|
-
componentOnBlur: componentOnBlur
|
|
1150
|
+
componentOnBlur: componentOnBlur,
|
|
1151
|
+
sourceUniqueKey: uniqueKey
|
|
1089
1152
|
});
|
|
1090
|
-
case
|
|
1153
|
+
case 11:
|
|
1091
1154
|
if (!['TR3E2FYXFZCFANVG6O6AALSM' //prod 斯凯奇
|
|
1092
1155
|
].includes(companyKey)) {
|
|
1093
|
-
_context6.next =
|
|
1156
|
+
_context6.next = 14;
|
|
1094
1157
|
break;
|
|
1095
1158
|
}
|
|
1096
|
-
_context6.next =
|
|
1159
|
+
_context6.next = 14;
|
|
1097
1160
|
return onBlurSkxLogisticsCode({
|
|
1098
1161
|
form: form,
|
|
1099
1162
|
value: value,
|
|
1100
1163
|
templateDetail: templateDetail,
|
|
1101
1164
|
componentOnBlur: componentOnBlur
|
|
1102
1165
|
});
|
|
1103
|
-
case
|
|
1104
|
-
_context6.next =
|
|
1166
|
+
case 14:
|
|
1167
|
+
_context6.next = 16;
|
|
1105
1168
|
return onBlurReturnLogisticsCode({
|
|
1106
1169
|
form: form,
|
|
1107
1170
|
value: value,
|
|
@@ -1109,15 +1172,38 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1109
1172
|
componentOnBlur: componentOnBlur,
|
|
1110
1173
|
orderBackRule: 'outSid'
|
|
1111
1174
|
});
|
|
1112
|
-
case 14:
|
|
1113
|
-
_context6.next = 49;
|
|
1114
|
-
break;
|
|
1115
1175
|
case 16:
|
|
1116
|
-
|
|
1176
|
+
_context6.next = 58;
|
|
1177
|
+
break;
|
|
1178
|
+
case 18:
|
|
1179
|
+
if (!(type === 'interceptCode')) {
|
|
1180
|
+
_context6.next = 25;
|
|
1181
|
+
break;
|
|
1182
|
+
}
|
|
1183
|
+
if ("".concat(value || '').trim()) {
|
|
1117
1184
|
_context6.next = 21;
|
|
1118
1185
|
break;
|
|
1119
1186
|
}
|
|
1120
|
-
_context6.
|
|
1187
|
+
return _context6.abrupt("return");
|
|
1188
|
+
case 21:
|
|
1189
|
+
_context6.next = 23;
|
|
1190
|
+
return onBlurExpressLogisticsCode({
|
|
1191
|
+
form: form,
|
|
1192
|
+
value: value,
|
|
1193
|
+
templateDetail: templateDetail,
|
|
1194
|
+
setKmLoading: setKmLoading,
|
|
1195
|
+
componentOnBlur: componentOnBlur,
|
|
1196
|
+
sourceUniqueKey: uniqueKey
|
|
1197
|
+
});
|
|
1198
|
+
case 23:
|
|
1199
|
+
_context6.next = 58;
|
|
1200
|
+
break;
|
|
1201
|
+
case 25:
|
|
1202
|
+
if (!(type === 'returnLogisticsCode')) {
|
|
1203
|
+
_context6.next = 30;
|
|
1204
|
+
break;
|
|
1205
|
+
}
|
|
1206
|
+
_context6.next = 28;
|
|
1121
1207
|
return onBlurReturnLogisticsCode({
|
|
1122
1208
|
form: form,
|
|
1123
1209
|
value: value,
|
|
@@ -1125,57 +1211,57 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1125
1211
|
componentOnBlur: componentOnBlur,
|
|
1126
1212
|
orderBackRule: 'logisticsCode'
|
|
1127
1213
|
});
|
|
1128
|
-
case
|
|
1129
|
-
_context6.next =
|
|
1214
|
+
case 28:
|
|
1215
|
+
_context6.next = 58;
|
|
1130
1216
|
break;
|
|
1131
|
-
case
|
|
1217
|
+
case 30:
|
|
1132
1218
|
if (!(type === 'skxOutboundNoticeNo')) {
|
|
1133
|
-
_context6.next =
|
|
1219
|
+
_context6.next = 36;
|
|
1134
1220
|
break;
|
|
1135
1221
|
}
|
|
1136
1222
|
//[SKX]ON出库通知单号 返填
|
|
1137
1223
|
console.log('skxOutboundNoticeNo', value);
|
|
1138
|
-
_context6.next =
|
|
1224
|
+
_context6.next = 34;
|
|
1139
1225
|
return onBlurSkxOutboundNoticeNo({
|
|
1140
1226
|
form: form,
|
|
1141
1227
|
value: value,
|
|
1142
1228
|
templateDetail: templateDetail,
|
|
1143
1229
|
componentOnBlur: componentOnBlur
|
|
1144
1230
|
});
|
|
1145
|
-
case
|
|
1146
|
-
_context6.next =
|
|
1231
|
+
case 34:
|
|
1232
|
+
_context6.next = 58;
|
|
1147
1233
|
break;
|
|
1148
|
-
case
|
|
1234
|
+
case 36:
|
|
1149
1235
|
if (!(type === 'skxReturnBillNo')) {
|
|
1150
|
-
_context6.next =
|
|
1236
|
+
_context6.next = 41;
|
|
1151
1237
|
break;
|
|
1152
1238
|
}
|
|
1153
|
-
_context6.next =
|
|
1239
|
+
_context6.next = 39;
|
|
1154
1240
|
return onBlurSkxReturnBillNo({
|
|
1155
1241
|
form: form,
|
|
1156
1242
|
value: value,
|
|
1157
1243
|
templateDetail: templateDetail,
|
|
1158
1244
|
componentOnBlur: componentOnBlur
|
|
1159
1245
|
});
|
|
1160
|
-
case
|
|
1161
|
-
_context6.next =
|
|
1246
|
+
case 39:
|
|
1247
|
+
_context6.next = 58;
|
|
1162
1248
|
break;
|
|
1163
|
-
case
|
|
1249
|
+
case 41:
|
|
1164
1250
|
if (!(type === 'skxReturnTHLogisticsCode')) {
|
|
1165
|
-
_context6.next =
|
|
1251
|
+
_context6.next = 46;
|
|
1166
1252
|
break;
|
|
1167
1253
|
}
|
|
1168
|
-
_context6.next =
|
|
1254
|
+
_context6.next = 44;
|
|
1169
1255
|
return onBlurSkxReturnTHLogisticsCode({
|
|
1170
1256
|
form: form,
|
|
1171
1257
|
value: value,
|
|
1172
1258
|
templateDetail: templateDetail,
|
|
1173
1259
|
componentOnBlur: componentOnBlur
|
|
1174
1260
|
});
|
|
1175
|
-
case
|
|
1176
|
-
_context6.next =
|
|
1261
|
+
case 44:
|
|
1262
|
+
_context6.next = 58;
|
|
1177
1263
|
break;
|
|
1178
|
-
case
|
|
1264
|
+
case 46:
|
|
1179
1265
|
// 收集所有需要执行的异步操作
|
|
1180
1266
|
promises = [];
|
|
1181
1267
|
if (type === 'tradeId') {
|
|
@@ -1187,7 +1273,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1187
1273
|
promises.push(handleChangeTradeId(value));
|
|
1188
1274
|
}
|
|
1189
1275
|
if (value) {
|
|
1190
|
-
_context6.next =
|
|
1276
|
+
_context6.next = 53;
|
|
1191
1277
|
break;
|
|
1192
1278
|
}
|
|
1193
1279
|
setReplaceValue(function (prev) {
|
|
@@ -1198,24 +1284,24 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1198
1284
|
});
|
|
1199
1285
|
replaceValueRef.current = _objectSpread(_objectSpread({}, replaceValue), {}, _defineProperty({}, type, 0));
|
|
1200
1286
|
return _context6.abrupt("return");
|
|
1201
|
-
case
|
|
1287
|
+
case 53:
|
|
1202
1288
|
promises.push(queryReplaceCount(_defineProperty({}, type, value), templateDetail));
|
|
1203
1289
|
// TODO: ERP不走订单反弹逻辑
|
|
1204
1290
|
if ((type === 'tradeId' || type === 'enterprisePaymentTid') && !isErpUse) {
|
|
1205
|
-
promises.push(changeHandle(value));
|
|
1291
|
+
promises.push(changeHandle(value, options));
|
|
1206
1292
|
}
|
|
1207
1293
|
// 等待所有异步操作完成
|
|
1208
|
-
_context6.next =
|
|
1294
|
+
_context6.next = 57;
|
|
1209
1295
|
return Promise.all(promises);
|
|
1210
|
-
case
|
|
1296
|
+
case 57:
|
|
1211
1297
|
return _context6.abrupt("return", Promise.resolve());
|
|
1212
|
-
case
|
|
1298
|
+
case 58:
|
|
1213
1299
|
case "end":
|
|
1214
1300
|
return _context6.stop();
|
|
1215
1301
|
}
|
|
1216
1302
|
}, _callee6);
|
|
1217
1303
|
}));
|
|
1218
|
-
return function componentOnBlur(
|
|
1304
|
+
return function componentOnBlur(_x11, _x12, _x13, _x14) {
|
|
1219
1305
|
return _ref7.apply(this, arguments);
|
|
1220
1306
|
};
|
|
1221
1307
|
}();
|
|
@@ -1345,12 +1431,13 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1345
1431
|
}, 0);
|
|
1346
1432
|
},
|
|
1347
1433
|
callKey: 4,
|
|
1348
|
-
setLoading: setLoading
|
|
1434
|
+
setLoading: setLoading,
|
|
1435
|
+
skipCache: autoSubmit
|
|
1349
1436
|
});
|
|
1350
|
-
} else {
|
|
1351
|
-
// 售后单反填
|
|
1352
|
-
afterSaleOrderBack(form, templateDetail);
|
|
1353
1437
|
}
|
|
1438
|
+
} else {
|
|
1439
|
+
// 售后单反填
|
|
1440
|
+
afterSaleOrderBack(form, templateDetail);
|
|
1354
1441
|
}
|
|
1355
1442
|
};
|
|
1356
1443
|
|
|
@@ -1642,6 +1729,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
1642
1729
|
var changeValuesCacheOrderInfo = throttle(function (value, tempLateList) {
|
|
1643
1730
|
//如果店铺id不存在 不缓存
|
|
1644
1731
|
if (!(value !== null && value !== void 0 && value.shopId)) return;
|
|
1732
|
+
if (autoSubmit) return;
|
|
1645
1733
|
//如果是初始化创建工单 缓存信息
|
|
1646
1734
|
if (!workOrderId && ['fxg', 'tb', 'ks', 'xiaozhi'].includes(plat.platform)) {
|
|
1647
1735
|
var _findComponentUniqueK;
|
|
@@ -5,12 +5,16 @@ export declare const onBlurErpAfterSaleTradeId: ({ form, value, templateDetail,
|
|
|
5
5
|
templateDetail: any;
|
|
6
6
|
setKmLoading: (loading: boolean) => void;
|
|
7
7
|
}) => Promise<void>;
|
|
8
|
-
export declare const onBlurExpressLogisticsCode: ({ form, value, templateDetail, setKmLoading, componentOnBlur, onlyGetTid, needTradeIdOrderBack, }: {
|
|
8
|
+
export declare const onBlurExpressLogisticsCode: ({ form, value, templateDetail, setKmLoading, componentOnBlur, sourceUniqueKey, onlyGetTid, needTradeIdOrderBack, }: {
|
|
9
9
|
form: FormInstance;
|
|
10
10
|
value: string;
|
|
11
11
|
templateDetail: any;
|
|
12
12
|
setKmLoading: (loading: boolean) => void;
|
|
13
|
-
componentOnBlur: (value: any, type: string
|
|
13
|
+
componentOnBlur: (value: any, type: string, uniqueKey?: string, options?: {
|
|
14
|
+
matchLogisticsNo?: string;
|
|
15
|
+
skipOrderBackUniqueKeys?: string[];
|
|
16
|
+
}) => Promise<void>;
|
|
17
|
+
sourceUniqueKey?: string | undefined;
|
|
14
18
|
onlyGetTid?: boolean | undefined;
|
|
15
19
|
needTradeIdOrderBack?: boolean | undefined;
|
|
16
20
|
}) => Promise<any>;
|