kmkf-work-order-service-component 0.4.10-alpha.7 → 0.4.11
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/FormRender/index.js +27 -59
- package/dist/esm/FormRender/index.less +1 -1
- package/dist/esm/SingleShopWorkOrder/components/Card/index.less +1 -1
- package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.js +4 -4
- package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.less +1 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.less +1 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/RecordLog/index.js +2 -2
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.js +1 -5
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +0 -1
- package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.d.ts +1 -3
- package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.js +10 -48
- package/dist/esm/WorkOrder/components/Widget/index.d.ts +1 -5
- package/dist/esm/WorkOrder/components/Widget/index.js +0 -16
- package/dist/esm/WorkOrder/index.js +17 -6
- package/dist/esm/common/utils/express.d.ts +0 -1
- package/dist/esm/common/utils/express.js +1 -7
- package/dist/esm/common/utils/tools.d.ts +1 -4
- package/dist/esm/common/utils/tools.js +181 -430
- package/dist/esm/model/servers/api.d.ts +0 -1
- package/dist/esm/model/servers/api.js +0 -8
- package/package.json +2 -2
- package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.d.ts +0 -17
- package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.js +0 -129
- package/dist/esm/WorkOrder/components/Widget/jst/JstLogistics/index.d.ts +0 -14
- package/dist/esm/WorkOrder/components/Widget/jst/JstLogistics/index.js +0 -121
- package/dist/esm/WorkOrder/components/Widget/jst/JstSendGood/index.d.ts +0 -14
- package/dist/esm/WorkOrder/components/Widget/jst/JstSendGood/index.js +0 -129
- package/dist/esm/WorkOrder/components/Widget/jst/JstSupply/index.d.ts +0 -14
- package/dist/esm/WorkOrder/components/Widget/jst/JstSupply/index.js +0 -117
@@ -1,11 +1,3 @@
|
|
1
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
2
|
-
|
3
|
-
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."); }
|
4
|
-
|
5
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
6
|
-
|
7
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
8
|
-
|
9
1
|
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, $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 generator._invoke = function (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); } }; }(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; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return 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, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), 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 (object) { var 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; }
|
10
2
|
|
11
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
@@ -34,7 +26,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
34
26
|
|
35
27
|
import { get, isEmpty, find, keys, every } from 'lodash';
|
36
28
|
import V from 'voca';
|
37
|
-
import { orderDetail,
|
29
|
+
import { orderDetail, getThirdOpenUidByOrderNo } from "../../model/servers/api";
|
38
30
|
import moment from 'moment';
|
39
31
|
import express from "./express";
|
40
32
|
import cache from "../cache";
|
@@ -442,110 +434,6 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
442
434
|
}).join(),
|
443
435
|
name: item.name
|
444
436
|
});
|
445
|
-
} else if (item.workOrderComponentType === 'JST_LOGISTICS') {
|
446
|
-
var logisticsList = get(nowData, "".concat(item.uniqueKey), []); //判断单个组件是否有输入值 没有就传空
|
447
|
-
// if (
|
448
|
-
// logisticsList.length === 1 &&
|
449
|
-
// !logisticsList[0]?.items?.length &&
|
450
|
-
// logisticsList.some((t) => {
|
451
|
-
// return !t.logisticsCompany && !t.logisticsCode;
|
452
|
-
// })
|
453
|
-
// ) {
|
454
|
-
// logisticsList = [];
|
455
|
-
// }
|
456
|
-
|
457
|
-
contentVoList.push({
|
458
|
-
uniqueKey: "".concat(item.uniqueKey, "_jstItemList"),
|
459
|
-
content: JSON.stringify(logisticsList),
|
460
|
-
name: item.name
|
461
|
-
});
|
462
|
-
contentVoList.push({
|
463
|
-
uniqueKey: "".concat(item.uniqueKey, "_logisticsCompany"),
|
464
|
-
content: logisticsList.map(function (item) {
|
465
|
-
return item.logisticsCompany;
|
466
|
-
}).join(),
|
467
|
-
name: item.name
|
468
|
-
});
|
469
|
-
contentVoList.push({
|
470
|
-
uniqueKey: "".concat(item.uniqueKey, "_logisticsCode"),
|
471
|
-
content: logisticsList.map(function (item) {
|
472
|
-
return item.logisticsCode;
|
473
|
-
}).join(),
|
474
|
-
name: item.name
|
475
|
-
});
|
476
|
-
} else if (item.workOrderComponentType === 'JST_SUPPLY') {
|
477
|
-
var supplyList = get(nowData, "".concat(item.uniqueKey), []); // if (
|
478
|
-
// supplyList.length === 1 &&
|
479
|
-
// !supplyList[0]?.items?.length &&
|
480
|
-
// supplyList.some((t) => {
|
481
|
-
// return !t.supplyId;
|
482
|
-
// })
|
483
|
-
// ) {
|
484
|
-
// supplyList = [];
|
485
|
-
// }
|
486
|
-
|
487
|
-
contentVoList.push({
|
488
|
-
uniqueKey: "".concat(item.uniqueKey, "_jstItemList"),
|
489
|
-
content: JSON.stringify(supplyList),
|
490
|
-
name: item.name
|
491
|
-
});
|
492
|
-
contentVoList.push({
|
493
|
-
uniqueKey: "".concat(item.uniqueKey, "_supplyId"),
|
494
|
-
content: supplyList.map(function (item) {
|
495
|
-
return item.supplyId;
|
496
|
-
}).join(),
|
497
|
-
name: item.name
|
498
|
-
});
|
499
|
-
} else if (item.workOrderComponentType === 'JST_SEND_GOOD') {
|
500
|
-
var sendList = get(nowData, "".concat(item.uniqueKey), []); // if (
|
501
|
-
// sendList.length === 1 &&
|
502
|
-
// !sendList[0]?.items?.length &&
|
503
|
-
// sendList.some((t) => {
|
504
|
-
// return !t.sendId && !t.sendName;
|
505
|
-
// })
|
506
|
-
// ) {
|
507
|
-
// sendList = [];
|
508
|
-
// }
|
509
|
-
|
510
|
-
contentVoList.push({
|
511
|
-
uniqueKey: "".concat(item.uniqueKey, "_jstItemList"),
|
512
|
-
content: JSON.stringify(sendList),
|
513
|
-
name: item.name
|
514
|
-
});
|
515
|
-
contentVoList.push({
|
516
|
-
uniqueKey: "".concat(item.uniqueKey, "_sendId"),
|
517
|
-
content: sendList.map(function (item) {
|
518
|
-
return item.sendId;
|
519
|
-
}).join(),
|
520
|
-
name: item.name
|
521
|
-
});
|
522
|
-
contentVoList.push({
|
523
|
-
uniqueKey: "".concat(item.uniqueKey, "_sendName"),
|
524
|
-
content: sendList.map(function (item) {
|
525
|
-
return item.sendName;
|
526
|
-
}).join(),
|
527
|
-
name: item.name
|
528
|
-
});
|
529
|
-
} else if (item.workOrderComponentType === 'JST_ITEM_SELECT_THIRD') {
|
530
|
-
contentVoList.push({
|
531
|
-
uniqueKey: "".concat(item.uniqueKey, "_jstItemList"),
|
532
|
-
content: JSON.stringify(get(nowData, "".concat(item.uniqueKey), [])),
|
533
|
-
name: item.name
|
534
|
-
});
|
535
|
-
contentVoList.push({
|
536
|
-
uniqueKey: "".concat(item.uniqueKey, "_itemId"),
|
537
|
-
content: get(nowData, "".concat(item.uniqueKey), []).map(function (item) {
|
538
|
-
return item.itemId;
|
539
|
-
}).join(),
|
540
|
-
name: item.name
|
541
|
-
});
|
542
|
-
contentVoList.push({
|
543
|
-
uniqueKey: "".concat(item.uniqueKey, "_supplierName"),
|
544
|
-
content: get(nowData, "".concat(item.uniqueKey), []).map(function (item) {
|
545
|
-
return item.supplierName;
|
546
|
-
}).join(),
|
547
|
-
name: item.name
|
548
|
-
});
|
549
437
|
} else {
|
550
438
|
var _nowData$item$uniqueK;
|
551
439
|
|
@@ -754,30 +642,6 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
754
642
|
}));
|
755
643
|
} else if (nex.workOrderComponentType === 'SYSTEM_ORDER_NO') {
|
756
644
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_systemOrderNo")]));
|
757
|
-
} else if (nex.workOrderComponentType === 'JST_LOGISTICS') {
|
758
|
-
var _itemList2 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_jstItemList")], [{
|
759
|
-
logisticsCompany: null,
|
760
|
-
logisticsCode: null
|
761
|
-
}]);
|
762
|
-
|
763
|
-
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList2));
|
764
|
-
} else if (nex.workOrderComponentType === 'JST_ITEM_SELECT_THIRD') {
|
765
|
-
var _itemList3 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_jstItemList")], []);
|
766
|
-
|
767
|
-
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList3));
|
768
|
-
} else if (nex.workOrderComponentType === 'JST_SUPPLY') {
|
769
|
-
var _itemList4 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_jstItemList")], [{
|
770
|
-
supplyId: null
|
771
|
-
}]);
|
772
|
-
|
773
|
-
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList4));
|
774
|
-
} else if (nex.workOrderComponentType === 'JST_SEND_GOOD') {
|
775
|
-
var _itemList5 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_jstItemList")], [{
|
776
|
-
sendName: '',
|
777
|
-
sendId: ''
|
778
|
-
}]);
|
779
|
-
|
780
|
-
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList5));
|
781
645
|
}
|
782
646
|
|
783
647
|
return cur;
|
@@ -802,7 +666,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
802
666
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
803
667
|
var _shopList$find;
|
804
668
|
|
805
|
-
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, JOIN_SHOP, shopSourceStr,
|
669
|
+
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, JOIN_SHOP, shopSourceStr, _shopList$find2, _data$value, _buyer$value, taobaoId, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, buyer, orderInfo, buyerInfo, _ref3, orderNo, provinceCode, cityCode, townCode, orderCreateDateTime, orderPaymentDateTime, orderDeliveryDateTime, orderClosingDateTime, itemList, transField, finalResponse, formValue, detail, componentsParams, detailsValue, _templateDetail$compo, paymentUniqueKey;
|
806
670
|
|
807
671
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
808
672
|
while (1) {
|
@@ -826,22 +690,24 @@ export var orderBack = /*#__PURE__*/function () {
|
|
826
690
|
return item.shopId == shopId;
|
827
691
|
})) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopSourceStr;
|
828
692
|
_context.prev = 5;
|
693
|
+
taobaoId = (_shopList$find2 = shopList.find(function (item) {
|
694
|
+
return item.shopSourceStr === 'TAOBAO' && item.shopId == shopId;
|
695
|
+
})) === null || _shopList$find2 === void 0 ? void 0 : _shopList$find2.taobaoId;
|
829
696
|
promise = [orderDetail({
|
830
697
|
shopId: shopId,
|
831
698
|
//店铺id
|
832
699
|
orderNo: order_no,
|
833
700
|
//订单id
|
834
701
|
templateId: templateDetail.uniqueKey
|
835
|
-
})];
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
})
|
843
|
-
}
|
844
|
-
|
702
|
+
})];
|
703
|
+
taobaoId ? promise.push(getThirdOpenUidByOrderNo({
|
704
|
+
orderNo: order_no,
|
705
|
+
toAppKey: '21819818',
|
706
|
+
platform: 'tb',
|
707
|
+
taobaoId: taobaoId
|
708
|
+
})) : promise.push(new Promise(function (resolve) {
|
709
|
+
resolve({});
|
710
|
+
}));
|
845
711
|
_context.next = 11;
|
846
712
|
return Promise.allSettled(promise);
|
847
713
|
|
@@ -849,138 +715,115 @@ export var orderBack = /*#__PURE__*/function () {
|
|
849
715
|
_yield$Promise$allSet = _context.sent;
|
850
716
|
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 2);
|
851
717
|
data = _yield$Promise$allSet2[0];
|
852
|
-
|
853
|
-
|
854
|
-
|
718
|
+
buyer = _yield$Promise$allSet2[1];
|
719
|
+
// console.log(data, buyer);
|
720
|
+
orderInfo = data === null || data === void 0 ? void 0 : (_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.data;
|
721
|
+
buyerInfo = buyer === null || buyer === void 0 ? void 0 : (_buyer$value = buyer.value) === null || _buyer$value === void 0 ? void 0 : _buyer$value.data;
|
722
|
+
_ref3 = orderInfo || {}, orderNo = _ref3.orderNo, provinceCode = _ref3.provinceCode, cityCode = _ref3.cityCode, townCode = _ref3.townCode, orderCreateDateTime = _ref3.orderCreateDateTime, orderPaymentDateTime = _ref3.orderPaymentDateTime, orderDeliveryDateTime = _ref3.orderDeliveryDateTime, orderClosingDateTime = _ref3.orderClosingDateTime, itemList = _ref3.itemList;
|
723
|
+
transField = orderInfo ? {
|
724
|
+
tradeId: orderNo,
|
725
|
+
province: provinceCode,
|
726
|
+
city: cityCode,
|
727
|
+
district: townCode,
|
728
|
+
tradeCreateDateTime: orderCreateDateTime,
|
729
|
+
tradePaymentDateTime: orderPaymentDateTime,
|
730
|
+
tradeDeliveryDateTime: orderDeliveryDateTime,
|
731
|
+
tradeClosingDateTime: orderClosingDateTime,
|
732
|
+
goodId: itemList,
|
733
|
+
goodSerial: itemList
|
734
|
+
} : {};
|
735
|
+
finalResponse = {};
|
736
|
+
|
737
|
+
if (orderInfo) {
|
738
|
+
finalResponse = _objectSpread(_objectSpread({}, orderInfo || {}), transField);
|
739
|
+
}
|
740
|
+
|
741
|
+
if (buyerInfo) {
|
742
|
+
finalResponse = _objectSpread(_objectSpread({}, finalResponse), {}, {
|
743
|
+
buyer: buyerInfo || {},
|
744
|
+
payBuyer: buyerInfo || {}
|
745
|
+
});
|
746
|
+
} //获取当前表单字段
|
747
|
+
|
855
748
|
|
856
749
|
formValue = form.getFieldsValue();
|
857
|
-
detail =
|
858
|
-
jstItemList: jstInfo
|
859
|
-
});
|
860
|
-
console.log(detail); //抖音数据特殊处理
|
750
|
+
detail = finalResponse || {}; //抖音数据
|
861
751
|
|
862
752
|
if (shopSourceStr === 'FXG') {
|
863
|
-
detail = updateDYDetails(
|
864
|
-
}
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
var
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
prv[uniqueKey] = {
|
934
|
-
name: detail['alipayName'],
|
935
|
-
user: detail['alipayAccount']
|
936
|
-
};
|
937
|
-
break;
|
938
|
-
|
939
|
-
case 'ITEM_SELECT':
|
940
|
-
case 'ITEM_ID':
|
941
|
-
case 'ITEM_ENCODE':
|
942
|
-
prv[uniqueKey] = taobaoGoodHandle(detail['itemList'], next.workOrderComponentType, next.componentConfig);
|
943
|
-
break;
|
944
|
-
|
945
|
-
case 'REMARK_INPUT':
|
946
|
-
prv[uniqueKey] = {
|
947
|
-
remark: detail['remark'] || '',
|
948
|
-
flag: !!detail['flag'] ? Number(detail['flag']) : detail['flag']
|
949
|
-
};
|
950
|
-
break;
|
951
|
-
|
952
|
-
case 'ENTERPRISE_PAYMENT':
|
953
|
-
//编辑的时候不能修改打款信息
|
954
|
-
if (type === 'edit') break;
|
955
|
-
prv[uniqueKey] = {
|
956
|
-
enterprisePaymentTid: '',
|
957
|
-
enterprisePaymentRefundFee: '',
|
958
|
-
enterprisePaymentBuyerNick: detail['buyerNick'],
|
959
|
-
enterprisePaymentBuyerOpenUid: detail['buyerOpenUid'],
|
960
|
-
enterprisePaymentAlipayNick: '',
|
961
|
-
enterprisePaymentAlipayNo: ''
|
962
|
-
};
|
963
|
-
break;
|
964
|
-
|
965
|
-
case 'JST_ITEM_SELECT_THIRD':
|
966
|
-
prv[uniqueKey] = updateJSTItemListHandle(detail['jstItemList'], 'itemList', config);
|
967
|
-
break;
|
968
|
-
|
969
|
-
case 'JST_SUPPLY':
|
970
|
-
prv[uniqueKey] = updateJSTItemListHandle(detail['jstItemList'], 'supply', config);
|
971
|
-
break;
|
972
|
-
|
973
|
-
case 'JST_SEND_GOOD':
|
974
|
-
prv[uniqueKey] = updateJSTItemListHandle(detail['jstItemList'], 'send', config);
|
975
|
-
break;
|
976
|
-
|
977
|
-
case 'JST_LOGISTICS':
|
978
|
-
prv[uniqueKey] = updateJSTItemListHandle(detail['jstItemList'], 'logistics', config);
|
979
|
-
break;
|
753
|
+
detail = updateDYDetails(finalResponse);
|
754
|
+
}
|
755
|
+
|
756
|
+
componentsParams = getComponentsValue((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []); //获取详情映射表单字段
|
757
|
+
|
758
|
+
detailsValue = Object.keys(componentsParams).reduce(function (prv, next) {
|
759
|
+
var _detail$buyer, _detail$buyer2;
|
760
|
+
|
761
|
+
var key = componentsParams[next].key;
|
762
|
+
var uniqueKey = componentsParams[next].uniqueKey;
|
763
|
+
|
764
|
+
if (detail[next]) {
|
765
|
+
switch (next) {
|
766
|
+
case 'province':
|
767
|
+
prv[uniqueKey] = {
|
768
|
+
address: [+detail['province'], +detail['city'], +detail['district']],
|
769
|
+
detail: detail['address'] || ''
|
770
|
+
};
|
771
|
+
break;
|
772
|
+
|
773
|
+
case 'expressLogisticsCompany':
|
774
|
+
prv[uniqueKey] = {
|
775
|
+
company: detail['expressLogisticsCompany'],
|
776
|
+
order: detail['expressLogisticsCode']
|
777
|
+
};
|
778
|
+
break;
|
779
|
+
|
780
|
+
case 'alipayName':
|
781
|
+
prv[uniqueKey] = {
|
782
|
+
name: detail['alipayName'],
|
783
|
+
user: detail['alipayAccount']
|
784
|
+
};
|
785
|
+
break;
|
786
|
+
|
787
|
+
case 'tradePaymentDateTime':
|
788
|
+
case 'tradeCreateDateTime':
|
789
|
+
case 'tradeClosingDateTime':
|
790
|
+
case 'tradeDeliveryDateTime':
|
791
|
+
prv[uniqueKey] = detail[key] ? moment(detail[key]).format('YYYY-MM-DD HH:mm:ss') : '';
|
792
|
+
break;
|
793
|
+
|
794
|
+
case 'remark':
|
795
|
+
prv[uniqueKey] = {
|
796
|
+
remark: detail['remark'] || '',
|
797
|
+
flag: !!detail['flag'] ? Number(detail['flag']) : detail['flag']
|
798
|
+
};
|
799
|
+
break;
|
800
|
+
|
801
|
+
case 'goodId':
|
802
|
+
case 'goodSerial':
|
803
|
+
case 'itemList':
|
804
|
+
prv[uniqueKey] = detail['itemList'];
|
805
|
+
break;
|
806
|
+
|
807
|
+
case 'payBuyer':
|
808
|
+
if (type === 'edit') break;
|
809
|
+
prv[uniqueKey] = {
|
810
|
+
enterprisePaymentTid: '',
|
811
|
+
enterprisePaymentRefundFee: '',
|
812
|
+
enterprisePaymentBuyerNick: (_detail$buyer = detail['buyer']) === null || _detail$buyer === void 0 ? void 0 : _detail$buyer.buyerNick,
|
813
|
+
enterprisePaymentBuyerOpenUid: (_detail$buyer2 = detail['buyer']) === null || _detail$buyer2 === void 0 ? void 0 : _detail$buyer2.buyerOpenUid,
|
814
|
+
enterprisePaymentAlipayNick: '',
|
815
|
+
enterprisePaymentAlipayNo: ''
|
816
|
+
};
|
817
|
+
break;
|
818
|
+
|
819
|
+
default:
|
820
|
+
prv["".concat(uniqueKey)] = detail[key];
|
821
|
+
break;
|
822
|
+
}
|
980
823
|
}
|
981
824
|
|
982
825
|
return prv;
|
983
|
-
}, {});
|
826
|
+
}, {}); //打款组件
|
984
827
|
|
985
828
|
if (type !== 'edit') {
|
986
829
|
paymentUniqueKey = templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$compo = templateDetail.componentDtoList.find(function (item) {
|
@@ -988,28 +831,29 @@ export var orderBack = /*#__PURE__*/function () {
|
|
988
831
|
})) === null || _templateDetail$compo === void 0 ? void 0 : _templateDetail$compo.uniqueKey;
|
989
832
|
|
990
833
|
if (paymentUniqueKey && orderInfo) {
|
991
|
-
|
834
|
+
detailsValue[paymentUniqueKey] = _objectSpread(_objectSpread(_objectSpread({}, formValue[paymentUniqueKey]), detailsValue[paymentUniqueKey]), {}, {
|
992
835
|
enterprisePaymentTid: order_no
|
993
836
|
});
|
994
837
|
}
|
995
838
|
}
|
996
839
|
|
997
|
-
console.log(
|
998
|
-
|
999
|
-
|
1000
|
-
|
840
|
+
console.debug('detailsValue', detailsValue); // console.log('detailsValue++', formValue, detailsValue);
|
841
|
+
|
842
|
+
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), detailsValue));
|
843
|
+
callback === null || callback === void 0 ? void 0 : callback(finalResponse, templateDetail);
|
844
|
+
_context.next = 35;
|
1001
845
|
break;
|
1002
846
|
|
1003
|
-
case
|
1004
|
-
_context.prev =
|
847
|
+
case 33:
|
848
|
+
_context.prev = 33;
|
1005
849
|
_context.t0 = _context["catch"](5);
|
1006
850
|
|
1007
|
-
case
|
851
|
+
case 35:
|
1008
852
|
case "end":
|
1009
853
|
return _context.stop();
|
1010
854
|
}
|
1011
855
|
}
|
1012
|
-
}, _callee, null, [[5,
|
856
|
+
}, _callee, null, [[5, 33]]);
|
1013
857
|
}));
|
1014
858
|
|
1015
859
|
return function orderBack(_x) {
|
@@ -1018,23 +862,33 @@ export var orderBack = /*#__PURE__*/function () {
|
|
1018
862
|
}(); //抖音平台数据处理
|
1019
863
|
|
1020
864
|
var updateDYDetails = function updateDYDetails(value) {
|
1021
|
-
var details = _objectSpread({}, value);
|
865
|
+
var details = _objectSpread({}, value);
|
1022
866
|
|
867
|
+
var address = ['province', 'city', 'district']; //处理地址
|
1023
868
|
|
1024
|
-
if (details['
|
869
|
+
if (details['province']) {
|
870
|
+
// let cityData: string[] = [],
|
871
|
+
// areaData: string[] = [];
|
1025
872
|
//直辖市区特殊处理
|
1026
873
|
var addList = ['110000', '120000', '310000', '500000'];
|
1027
874
|
|
1028
|
-
if (addList.includes(details.
|
1029
|
-
var
|
1030
|
-
var newCity =
|
875
|
+
if (addList.includes(details.province)) {
|
876
|
+
var city = details['city'];
|
877
|
+
var newCity = city.split('');
|
1031
878
|
newCity[3] = '1';
|
1032
|
-
details['
|
1033
|
-
}
|
879
|
+
details['city'] = newCity.join('');
|
880
|
+
} // address.forEach(item => {
|
881
|
+
// if (item === 'city') {
|
882
|
+
// cityData = details['province'] ? formatAddrData.getCityByProCode(details['province']) : []
|
883
|
+
// } else if (item === 'district') {
|
884
|
+
// areaData = details['city'] ? formatAddrData.getAreaByCityCode(details['city']) : []
|
885
|
+
// }
|
886
|
+
// })
|
887
|
+
|
1034
888
|
} //处理时间
|
1035
889
|
|
1036
890
|
|
1037
|
-
var times = ['
|
891
|
+
var times = ['tradeClosingDateTime', 'tradeCreateDateTime', 'tradeDeliveryDateTime', 'tradePaymentDateTime'];
|
1038
892
|
times.forEach(function (item) {
|
1039
893
|
if (details[item]) {
|
1040
894
|
details[item] = moment(details[item]).format('YYYY-MM-DD HH:mm:ss');
|
@@ -1052,6 +906,42 @@ var updateDYDetails = function updateDYDetails(value) {
|
|
1052
906
|
}
|
1053
907
|
});
|
1054
908
|
return details;
|
909
|
+
}; //获取模版组件
|
910
|
+
|
911
|
+
|
912
|
+
var getComponentsValue = function getComponentsValue() {
|
913
|
+
var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
914
|
+
//订单详情映射字段
|
915
|
+
var mapList = {
|
916
|
+
TRADE_ID_INPUT: 'tradeId',
|
917
|
+
RECEIVER_NAME_INPUT: 'receiveName',
|
918
|
+
RECEIVER_MOBILE_INPUT: 'receiveMobile',
|
919
|
+
RECEIVER_ADDRESS_INPUT: 'province',
|
920
|
+
TRADE_CREATE_DATETIME: 'tradeCreateDateTime',
|
921
|
+
TRADE_PAYMENT_DATETIME: 'tradePaymentDateTime',
|
922
|
+
TRADE_DELIVERY_DATETIME: 'tradeDeliveryDateTime',
|
923
|
+
TRADE_CLOSING_DATETIME: 'tradeClosingDateTime',
|
924
|
+
ACTUAL_PAYMENT: 'actualPayment',
|
925
|
+
EXPRESS_LOGISTICS_SELECT: 'expressLogisticsCompany',
|
926
|
+
RETURN_LOGISTICS_SELECT: 'returnLogisticsCompany',
|
927
|
+
ALI_PAY_INPUT: 'alipayName',
|
928
|
+
ITEM_SELECT: 'itemList',
|
929
|
+
REMARK_INPUT: 'remark',
|
930
|
+
ITEM_ID: 'goodId',
|
931
|
+
ITEM_ENCODE: 'goodSerial',
|
932
|
+
BUYER_NICK_INPUT: 'buyer',
|
933
|
+
ENTERPRISE_PAYMENT: 'payBuyer'
|
934
|
+
};
|
935
|
+
return list.reduce(function (prv, next) {
|
936
|
+
if (mapList[next.workOrderComponentType]) {
|
937
|
+
prv[mapList[next.workOrderComponentType]] = {
|
938
|
+
uniqueKey: next.uniqueKey,
|
939
|
+
key: mapList[next.workOrderComponentType]
|
940
|
+
};
|
941
|
+
}
|
942
|
+
|
943
|
+
return prv;
|
944
|
+
}, {});
|
1055
945
|
}; //图片压缩
|
1056
946
|
|
1057
947
|
|
@@ -1083,7 +973,7 @@ export var COMPONENT_MAP_NAME = {
|
|
1083
973
|
}; //数据唯一性校验提交数据组装
|
1084
974
|
|
1085
975
|
export var getReplaceWarnValues = function getReplaceWarnValues(templateDetail, keyValues) {
|
1086
|
-
return templateDetail.componentDtoList.reduce(function (prv, next) {
|
976
|
+
return templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList.reduce(function (prv, next) {
|
1087
977
|
Object.keys(keyValues).forEach(function (key) {
|
1088
978
|
if (COMPONENT_MAP[key] === next.workOrderComponentType) {
|
1089
979
|
var componentConfig = next.componentConfig;
|
@@ -1100,143 +990,4 @@ export var getReplaceWarnValues = function getReplaceWarnValues(templateDetail,
|
|
1100
990
|
});
|
1101
991
|
return prv;
|
1102
992
|
}, []);
|
1103
|
-
}; //淘宝商品组件信息处理
|
1104
|
-
|
1105
|
-
export var taobaoGoodHandle = function taobaoGoodHandle(arr, type, config) {
|
1106
|
-
var list = JSON.parse(JSON.stringify(arr));
|
1107
|
-
var changeSku = config.changeSku;
|
1108
|
-
return list.map(function (item) {
|
1109
|
-
var numIid = item.numIid,
|
1110
|
-
title = item.title,
|
1111
|
-
picUrl = item.picUrl,
|
1112
|
-
price = item.price,
|
1113
|
-
outerId = item.outerId,
|
1114
|
-
skuId = item.skuId,
|
1115
|
-
platform = item.platform,
|
1116
|
-
skuInfoDTO = item.skuInfoDTO;
|
1117
|
-
var params = {
|
1118
|
-
numIid: numIid,
|
1119
|
-
title: title,
|
1120
|
-
picUrl: picUrl,
|
1121
|
-
price: price,
|
1122
|
-
platform: platform
|
1123
|
-
};
|
1124
|
-
|
1125
|
-
if (skuInfoDTO) {
|
1126
|
-
params.picUrl = skuInfoDTO === null || skuInfoDTO === void 0 ? void 0 : skuInfoDTO.picUrl;
|
1127
|
-
params.price = skuInfoDTO === null || skuInfoDTO === void 0 ? void 0 : skuInfoDTO.price;
|
1128
|
-
params.skuId = skuInfoDTO === null || skuInfoDTO === void 0 ? void 0 : skuInfoDTO.skuId;
|
1129
|
-
}
|
1130
|
-
|
1131
|
-
if (changeSku) {
|
1132
|
-
params.propertiesName = (skuInfoDTO === null || skuInfoDTO === void 0 ? void 0 : skuInfoDTO.propertiesName) || '';
|
1133
|
-
}
|
1134
|
-
|
1135
|
-
if (type === 'ITEM_ENCODE') {
|
1136
|
-
params.outerId = (skuInfoDTO === null || skuInfoDTO === void 0 ? void 0 : skuInfoDTO.outerSkuId) || outerId;
|
1137
|
-
} else if (type === 'ITEM_SELECT_THIRD') {
|
1138
|
-
params.itemId = '';
|
1139
|
-
params.supplierName = '';
|
1140
|
-
}
|
1141
|
-
|
1142
|
-
return params;
|
1143
|
-
});
|
1144
|
-
}; //聚水潭订单返填
|
1145
|
-
|
1146
|
-
export var HasJstHandle = function HasJstHandle(templateDetail) {
|
1147
|
-
return templateDetail.componentDtoList.some(function (item) {
|
1148
|
-
return ['JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD'].includes(item.workOrderComponentType);
|
1149
|
-
});
|
1150
|
-
}; //重组聚水潭商品数据
|
1151
|
-
|
1152
|
-
export var updateJSTItemListHandle = function updateJSTItemListHandle() {
|
1153
|
-
var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
1154
|
-
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'logistics';
|
1155
|
-
var config = arguments.length > 2 ? arguments[2] : undefined;
|
1156
|
-
var newList = JSON.parse(JSON.stringify(list));
|
1157
|
-
var showField = config.showField,
|
1158
|
-
enableItemId = config.enableItemId,
|
1159
|
-
enableSupplierName = config.enableSupplierName;
|
1160
|
-
|
1161
|
-
if (type !== 'itemList') {
|
1162
|
-
var _list = newList.map(function (item) {
|
1163
|
-
var items = item.items.map(function (t) {
|
1164
|
-
return {
|
1165
|
-
title: t.skuName,
|
1166
|
-
picUrl: t.pic,
|
1167
|
-
platform: 'jst',
|
1168
|
-
skuId: t.skuId
|
1169
|
-
};
|
1170
|
-
});
|
1171
|
-
var params = {
|
1172
|
-
items: items
|
1173
|
-
};
|
1174
|
-
|
1175
|
-
if (type === 'logistics') {
|
1176
|
-
params.logisticsCompany = express.getExpressNameByName(item.logisticsCompany);
|
1177
|
-
params.logisticsCode = item.lId;
|
1178
|
-
} else if (type === 'supply') {
|
1179
|
-
params.supplyId = item.drpCoIdTo;
|
1180
|
-
} else if (type === 'send') {
|
1181
|
-
if (['sendId', 'all'].includes(showField)) {
|
1182
|
-
params.sendId = item.wmsCoId;
|
1183
|
-
}
|
1184
|
-
|
1185
|
-
if (['sendName', 'all'].includes(showField)) {
|
1186
|
-
params.sendName = item.wmsCoName;
|
1187
|
-
}
|
1188
|
-
}
|
1189
|
-
|
1190
|
-
console.log(params);
|
1191
|
-
return params;
|
1192
|
-
});
|
1193
|
-
|
1194
|
-
if (!_list.length) {
|
1195
|
-
switch (type) {
|
1196
|
-
case 'logistics':
|
1197
|
-
_list = [{
|
1198
|
-
logisticsCompany: null,
|
1199
|
-
logisticsCode: ''
|
1200
|
-
}];
|
1201
|
-
break;
|
1202
|
-
|
1203
|
-
case 'supply':
|
1204
|
-
_list = [{
|
1205
|
-
supplyId: ''
|
1206
|
-
}];
|
1207
|
-
break;
|
1208
|
-
|
1209
|
-
case 'send':
|
1210
|
-
_list = [{
|
1211
|
-
sendId: '',
|
1212
|
-
sendName: ''
|
1213
|
-
}];
|
1214
|
-
break;
|
1215
|
-
}
|
1216
|
-
}
|
1217
|
-
|
1218
|
-
return _list;
|
1219
|
-
} else {
|
1220
|
-
return newList.reduce(function (prv, next) {
|
1221
|
-
var items = next.items.map(function (t) {
|
1222
|
-
var params = {
|
1223
|
-
title: t.skuName,
|
1224
|
-
picUrl: t.pic,
|
1225
|
-
platform: 'jst'
|
1226
|
-
};
|
1227
|
-
|
1228
|
-
if (enableItemId) {
|
1229
|
-
params.itemId = t.supplierId;
|
1230
|
-
}
|
1231
|
-
|
1232
|
-
if (enableSupplierName) {
|
1233
|
-
params.supplierName = t.supplierName;
|
1234
|
-
}
|
1235
|
-
|
1236
|
-
return params;
|
1237
|
-
});
|
1238
|
-
prv.push.apply(prv, _toConsumableArray(items));
|
1239
|
-
return prv;
|
1240
|
-
}, []);
|
1241
|
-
}
|
1242
993
|
};
|