@kmkf-fe-packages/kmkf-utils 2.10.14 → 2.10.15
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/constants/constant.d.ts +4 -0
- package/dist/esm/constants/constant.js +6 -2
- package/dist/esm/dxdSuppliersData/index.d.ts +22 -0
- package/dist/esm/dxdSuppliersData/index.js +104 -0
- package/dist/esm/global.d.ts +6 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/servers/DXD/index.d.ts +3 -0
- package/dist/esm/servers/DXD/index.js +3 -0
- package/dist/esm/servers/DXD/logisticsData.d.ts +6 -0
- package/dist/esm/servers/DXD/logisticsData.js +44 -0
- package/dist/esm/servers/DXD/shopData.d.ts +7 -0
- package/dist/esm/servers/DXD/shopData.js +22 -0
- package/dist/esm/servers/DXD/warehouseData.d.ts +2 -0
- package/dist/esm/servers/DXD/warehouseData.js +27 -0
- package/dist/esm/servers/index.d.ts +1 -0
- package/dist/esm/servers/index.js +2 -0
- package/dist/esm/utils/DxdShopData.d.ts +15 -0
- package/dist/esm/utils/DxdShopData.js +49 -0
- package/dist/esm/utils/SendData.js +4 -2
- package/dist/esm/utils/dxdOrderBackFormValues.d.ts +63 -0
- package/dist/esm/utils/dxdOrderBackFormValues.js +342 -0
- package/dist/esm/utils/index.d.ts +3 -1
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/utils/jkyOrderBackFormValues.d.ts +2 -2
- package/dist/esm/utils/jstOrderBackFormValues.js +5 -1
- package/dist/esm/utils/orderBackFormValues.js +3 -1
- package/dist/esm/utils/transformList.js +7 -2
- package/dist/esm/utils/unTransField.js +1 -1
- package/package.json +2 -2
|
@@ -105,6 +105,10 @@ export declare const DATA_SPLIT_COMPONENT_FIELDS_MAP: {
|
|
|
105
105
|
JST_REISSUE_GOODS: string[];
|
|
106
106
|
JKY_SYSTEM_ORDER: string[];
|
|
107
107
|
PICTURE_PRO: string[];
|
|
108
|
+
DXD_SYSTEM_ORDER: string[];
|
|
109
|
+
DXD_LOGISTICS: string[];
|
|
110
|
+
DXD_GOODS: string[];
|
|
111
|
+
DXD_SUPPLIERS: string[];
|
|
108
112
|
};
|
|
109
113
|
export declare const SEARCH_OPTIONS: {
|
|
110
114
|
label: string;
|
|
@@ -125,7 +125,7 @@ export var SYMBOL = {
|
|
|
125
125
|
EQ: "eq"
|
|
126
126
|
};
|
|
127
127
|
export var hasAddNullComponent = ["RADIO", "SELECT", "CHECKBOX", "BASIC_MULT_SELECT", "FLOW_TAG", "WAREHOUSING_STATUS", "BS_E3_WAREHOUSING_STATUS", "ADJUST_WORK_ORDER_STATUS", "ERP_REMARK", "REISSUE_STATUS", "INVOICE_STATUS", "INVOICING_STATUS", "MSG_STATUS", "AGREE_REFUND_STATUS", "REPAIR_ORDER_STATUS", "ERP_AFTER_SALE_STATUS", "ERP_AFTER_SALES_ORDER_REVIEW_STATUS", "REJECT_REFUND_STATUS", "LOGISTICS_INTERCEPTION", "AGREE_RETURN_GOODS_STATUS", "REJECT_RETURN_GOODS_STATUS", "RETURN_EXCHANGE_GOODS_REVIEW_STATUS", "GY_PAYMENT_METHOD"];
|
|
128
|
-
export var SelectInputComponent = ["INPUT", "TEXTAREA", "SHOP_NAME_INPUT", "BUYER_NICK_INPUT", "RECEIVER_NAME_INPUT", "REMARK_INPUT", "RETURN_GOODS_STATUS", "EXCHANGE_STATUS", "BS_LOGISTICS", "WLN_LOGISTICS", "WDT_LOGISTICS", "KM_LOGISTICS", "GY_LOGISTICS", "JST_LOGISTICS", "AFTER_SALES_ORDER_ID"];
|
|
128
|
+
export var SelectInputComponent = ["INPUT", "TEXTAREA", "SHOP_NAME_INPUT", "BUYER_NICK_INPUT", "RECEIVER_NAME_INPUT", "REMARK_INPUT", "RETURN_GOODS_STATUS", "EXCHANGE_STATUS", "BS_LOGISTICS", "WLN_LOGISTICS", "WDT_LOGISTICS", "KM_LOGISTICS", "GY_LOGISTICS", "JST_LOGISTICS", "DXD_LOGISTICS", "AFTER_SALES_ORDER_ID"];
|
|
129
129
|
|
|
130
130
|
// 表单默认值
|
|
131
131
|
export var INIT_FORM_VALUE = {
|
|
@@ -177,7 +177,11 @@ export var DATA_SPLIT_COMPONENT_FIELDS_MAP = {
|
|
|
177
177
|
JST_GOODS: ["jstGoods"],
|
|
178
178
|
JST_REISSUE_GOODS: ["jstReissueGoods"],
|
|
179
179
|
JKY_SYSTEM_ORDER: ["jkySystemShowOrder"],
|
|
180
|
-
PICTURE_PRO: ["pictureProList"]
|
|
180
|
+
PICTURE_PRO: ["pictureProList"],
|
|
181
|
+
DXD_SYSTEM_ORDER: ["dxdSystemShowOrder"],
|
|
182
|
+
DXD_LOGISTICS: ["dxdLogisticsList"],
|
|
183
|
+
DXD_GOODS: ["dxdGoods"],
|
|
184
|
+
DXD_SUPPLIERS: ["dxdSuppliers"]
|
|
181
185
|
};
|
|
182
186
|
export var SEARCH_OPTIONS = [{
|
|
183
187
|
label: "关键字",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface SupplierOption {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 大希地供应商数据存储(单例):仿照 ExpressData 的单例 + 存储模式,
|
|
7
|
+
* 自带 fetchData 拉 /qy/open/suppliers,组装成两个数据:
|
|
8
|
+
* 1. supplierOptions —— 所有供应商下拉 options(label=supplierName, value=supplierCode)
|
|
9
|
+
* 2. skuCodeSupplierMap —— skuCode -> 该 skuCode 对应的供应商 options(多个供应商含同一 skuCode 时合并)
|
|
10
|
+
*/
|
|
11
|
+
declare class DxdSuppliersData {
|
|
12
|
+
private static instance;
|
|
13
|
+
supplierOptions: SupplierOption[];
|
|
14
|
+
skuCodeSupplierMap: Record<string, SupplierOption[]>;
|
|
15
|
+
codeToNameMap: Record<string, string>;
|
|
16
|
+
static getInstance(): DxdSuppliersData;
|
|
17
|
+
fetchData: () => Promise<void>;
|
|
18
|
+
getSupplierOptions: () => SupplierOption[];
|
|
19
|
+
getSuppliersBySkuCode: (skuCode: string) => SupplierOption[];
|
|
20
|
+
getSupplierNameByCode: (code: string, returnCurrentValue?: boolean) => string;
|
|
21
|
+
}
|
|
22
|
+
export default DxdSuppliersData;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
3
|
+
function 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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
7
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
import request from "../request";
|
|
12
|
+
/**
|
|
13
|
+
* 大希地供应商数据存储(单例):仿照 ExpressData 的单例 + 存储模式,
|
|
14
|
+
* 自带 fetchData 拉 /qy/open/suppliers,组装成两个数据:
|
|
15
|
+
* 1. supplierOptions —— 所有供应商下拉 options(label=supplierName, value=supplierCode)
|
|
16
|
+
* 2. skuCodeSupplierMap —— skuCode -> 该 skuCode 对应的供应商 options(多个供应商含同一 skuCode 时合并)
|
|
17
|
+
*/
|
|
18
|
+
var DxdSuppliersData = /*#__PURE__*/function () {
|
|
19
|
+
function DxdSuppliersData() {
|
|
20
|
+
var _this = this;
|
|
21
|
+
_classCallCheck(this, DxdSuppliersData);
|
|
22
|
+
_defineProperty(this, "supplierOptions", []);
|
|
23
|
+
_defineProperty(this, "skuCodeSupplierMap", {});
|
|
24
|
+
_defineProperty(this, "codeToNameMap", {});
|
|
25
|
+
_defineProperty(this, "fetchData", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
26
|
+
var _res$data, res, suppliers, supplierOptions, skuCodeSupplierMap, codeToNameMap;
|
|
27
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
28
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29
|
+
case 0:
|
|
30
|
+
_context.prev = 0;
|
|
31
|
+
_context.next = 3;
|
|
32
|
+
return request({
|
|
33
|
+
url: "/qy/gdfw/daxidi/erp/supplier/list",
|
|
34
|
+
method: "post",
|
|
35
|
+
data: {}
|
|
36
|
+
});
|
|
37
|
+
case 3:
|
|
38
|
+
res = _context.sent;
|
|
39
|
+
suppliers = ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.suppliers) || []).filter(function (item) {
|
|
40
|
+
return item.supplierCode && item.supplierName;
|
|
41
|
+
});
|
|
42
|
+
supplierOptions = [];
|
|
43
|
+
skuCodeSupplierMap = {};
|
|
44
|
+
codeToNameMap = {};
|
|
45
|
+
suppliers.forEach(function (s) {
|
|
46
|
+
var option = {
|
|
47
|
+
label: s.supplierName,
|
|
48
|
+
value: s.supplierCode
|
|
49
|
+
};
|
|
50
|
+
supplierOptions.push(option);
|
|
51
|
+
codeToNameMap[s.supplierCode] = s.supplierName;
|
|
52
|
+
(s.skuCodeList || []).forEach(function (skuCode) {
|
|
53
|
+
if (!skuCodeSupplierMap[skuCode]) {
|
|
54
|
+
skuCodeSupplierMap[skuCode] = [];
|
|
55
|
+
}
|
|
56
|
+
// 同一供应商可能对同一 skuCode 重复出现,按 value 去重
|
|
57
|
+
if (!skuCodeSupplierMap[skuCode].some(function (o) {
|
|
58
|
+
return o.value === option.value;
|
|
59
|
+
})) {
|
|
60
|
+
skuCodeSupplierMap[skuCode].push(option);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
_this.supplierOptions = supplierOptions;
|
|
65
|
+
_this.skuCodeSupplierMap = skuCodeSupplierMap;
|
|
66
|
+
_this.codeToNameMap = codeToNameMap;
|
|
67
|
+
_context.next = 16;
|
|
68
|
+
break;
|
|
69
|
+
case 14:
|
|
70
|
+
_context.prev = 14;
|
|
71
|
+
_context.t0 = _context["catch"](0);
|
|
72
|
+
case 16:
|
|
73
|
+
case "end":
|
|
74
|
+
return _context.stop();
|
|
75
|
+
}
|
|
76
|
+
}, _callee, null, [[0, 14]]);
|
|
77
|
+
})));
|
|
78
|
+
_defineProperty(this, "getSupplierOptions", function () {
|
|
79
|
+
return _this.supplierOptions;
|
|
80
|
+
});
|
|
81
|
+
_defineProperty(this, "getSuppliersBySkuCode", function (skuCode) {
|
|
82
|
+
return _this.skuCodeSupplierMap[skuCode] || [];
|
|
83
|
+
});
|
|
84
|
+
_defineProperty(this, "getSupplierNameByCode", function (code) {
|
|
85
|
+
var _this$codeToNameMap$c;
|
|
86
|
+
var returnCurrentValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
87
|
+
return (_this$codeToNameMap$c = _this.codeToNameMap[code]) !== null && _this$codeToNameMap$c !== void 0 ? _this$codeToNameMap$c : returnCurrentValue ? code : "";
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
_createClass(DxdSuppliersData, null, [{
|
|
91
|
+
key: "getInstance",
|
|
92
|
+
value: function getInstance() {
|
|
93
|
+
if (!DxdSuppliersData.instance) {
|
|
94
|
+
DxdSuppliersData.instance = new DxdSuppliersData();
|
|
95
|
+
}
|
|
96
|
+
return DxdSuppliersData.instance;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 拉取供应商数据并组装成 supplierOptions + skuCodeSupplierMap
|
|
100
|
+
}]);
|
|
101
|
+
return DxdSuppliersData;
|
|
102
|
+
}();
|
|
103
|
+
_defineProperty(DxdSuppliersData, "instance", null);
|
|
104
|
+
export default DxdSuppliersData;
|
package/dist/esm/global.d.ts
CHANGED
|
@@ -66,6 +66,12 @@ declare enum TComponentType {
|
|
|
66
66
|
BS_SEND_GOOD = "BS_SEND_GOOD",
|
|
67
67
|
BS_SYSTEM_ORDER = "BS_SYSTEM_ORDER",
|
|
68
68
|
KM_SYSTEM_ORDER = "KM_SYSTEM_ORDER",
|
|
69
|
+
DXD_SYSTEM_ORDER = "DXD_SYSTEM_ORDER",
|
|
70
|
+
DXD_SEND_GOOD = "DXD_SEND_GOOD",
|
|
71
|
+
DXD_LOGISTICS = "DXD_LOGISTICS",
|
|
72
|
+
DXD_SHOP = "DXD_SHOP",
|
|
73
|
+
DXD_GOODS = "DXD_GOODS",
|
|
74
|
+
DXD_SUPPLIERS = "DXD_SUPPLIERS",
|
|
69
75
|
BS_SIGNING_TIME = "BS_SIGNING_TIME",
|
|
70
76
|
BS_SEND_TIME = "BS_SEND_TIME",
|
|
71
77
|
BS_TRADE_PAYMENT_TIME = "BS_TRADE_PAYMENT_TIME",
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { default as ExpressData } from "./expressData";
|
|
2
2
|
export { default as ExpressInterceptData } from "./expressInterceptData";
|
|
3
3
|
export { default as PlatData } from "./platData";
|
|
4
|
+
export { default as DxdSuppliersData } from "./dxdSuppliersData";
|
|
5
|
+
export { DxdShopDataCenter } from "./utils/DxdShopData";
|
|
4
6
|
export { default as LogisticsAddressData } from "./logisticsAddressData";
|
|
5
7
|
export { default as LabelData } from "./labelData";
|
|
6
8
|
export { default as request } from "./request";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { default as ExpressData } from "./expressData";
|
|
2
2
|
export { default as ExpressInterceptData } from "./expressInterceptData";
|
|
3
3
|
export { default as PlatData } from "./platData";
|
|
4
|
+
export { default as DxdSuppliersData } from "./dxdSuppliersData";
|
|
5
|
+
export { DxdShopDataCenter } from "./utils/DxdShopData";
|
|
4
6
|
export { default as LogisticsAddressData } from "./logisticsAddressData";
|
|
5
7
|
export { default as LabelData } from "./labelData";
|
|
6
8
|
export { default as request } from "./request";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare type DxdReturnLogisticsOrderResponse = {
|
|
2
|
+
platformOrderNo: string;
|
|
3
|
+
};
|
|
4
|
+
export declare const getLogisticsDataAsync: () => Promise<any[]>;
|
|
5
|
+
export declare const queryReturnLogisticsOrder: (returnLogisticsNo: string) => Promise<import("../../request").serverProps<DxdReturnLogisticsOrderResponse>>;
|
|
6
|
+
export default getLogisticsDataAsync;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import request from "../../request";
|
|
2
|
+
export var getLogisticsDataAsync = function getLogisticsDataAsync() {
|
|
3
|
+
return request({
|
|
4
|
+
url: "/qy/gdfw/daxidi/erp/logistics/list",
|
|
5
|
+
method: "get",
|
|
6
|
+
data: {}
|
|
7
|
+
}).then(function (res) {
|
|
8
|
+
var _res$data;
|
|
9
|
+
var list = [];
|
|
10
|
+
var logistics = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.logistics) || [];
|
|
11
|
+
// DXD 物流按月卡维度返回:同一 logisticsCode 可能对应多个 monthCardNo,
|
|
12
|
+
// 故下拉 value 用 monthCardNo(唯一),label 用 monthCardName,并保留 logisticsCode/Name。
|
|
13
|
+
logistics.map(function (_ref) {
|
|
14
|
+
var logisticsCode = _ref.logisticsCode,
|
|
15
|
+
logisticsName = _ref.logisticsName,
|
|
16
|
+
cardNo = _ref.cardNo,
|
|
17
|
+
cardName = _ref.cardName;
|
|
18
|
+
list.push({
|
|
19
|
+
label: cardName,
|
|
20
|
+
value: cardNo,
|
|
21
|
+
expressCode: logisticsCode,
|
|
22
|
+
expressName: logisticsName
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
var valueMap = {};
|
|
26
|
+
list.forEach(function (item) {
|
|
27
|
+
valueMap[item.value] = item; // 每次遇到相同的 monthCardNo,更新为最新的对象
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return Object.values(valueMap);
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// DXD 根据退货物流单号查询平台订单号
|
|
35
|
+
export var queryReturnLogisticsOrder = function queryReturnLogisticsOrder(returnLogisticsNo) {
|
|
36
|
+
return request({
|
|
37
|
+
url: "/qy/gdfw/daxidi/erp/return/logistics/order",
|
|
38
|
+
method: "post",
|
|
39
|
+
data: {
|
|
40
|
+
returnLogisticsNo: returnLogisticsNo
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
export default getLogisticsDataAsync;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import request from "../../request";
|
|
2
|
+
// 大希地店铺列表(/qy/open/shops,无分页,直接返回 shops 数组)
|
|
3
|
+
export var getShopDataAsync = function getShopDataAsync() {
|
|
4
|
+
return request({
|
|
5
|
+
url: "/qy/gdfw/daxidi/erp/shop/list",
|
|
6
|
+
method: "get",
|
|
7
|
+
data: {}
|
|
8
|
+
}).then(function (res) {
|
|
9
|
+
var _res$data;
|
|
10
|
+
var shops = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.shops) || [];
|
|
11
|
+
return shops.map(function (_ref) {
|
|
12
|
+
var shopCode = _ref.shopCode,
|
|
13
|
+
shopName = _ref.shopName;
|
|
14
|
+
return {
|
|
15
|
+
label: shopName,
|
|
16
|
+
value: shopCode,
|
|
17
|
+
disabled: false
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export default getShopDataAsync;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import request from "../../request";
|
|
2
|
+
export var getWarehouseDataAsync = function getWarehouseDataAsync() {
|
|
3
|
+
return request({
|
|
4
|
+
url: "/qy/gdfw/daxidi/erp/warehouse/list",
|
|
5
|
+
method: "get",
|
|
6
|
+
data: {}
|
|
7
|
+
}).then(function (res) {
|
|
8
|
+
var _res$data;
|
|
9
|
+
var list = [];
|
|
10
|
+
var warehouses = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.warehouses) || [];
|
|
11
|
+
warehouses.map(function (_ref) {
|
|
12
|
+
var warehouseCode = _ref.warehouseCode,
|
|
13
|
+
warehouseName = _ref.warehouseName;
|
|
14
|
+
list.push({
|
|
15
|
+
label: warehouseName,
|
|
16
|
+
value: warehouseCode
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
var valueMap = {};
|
|
20
|
+
list.forEach(function (item) {
|
|
21
|
+
valueMap[item.value] = item; // 每次遇到相同的 code,更新为最新的对象
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
return Object.values(valueMap);
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export default getWarehouseDataAsync;
|
|
@@ -10,6 +10,7 @@ export * as WLN from "./WLN";
|
|
|
10
10
|
export * as orderSubForm from "./orderSubForm";
|
|
11
11
|
export * as SKX from "./SKX";
|
|
12
12
|
export * as JKY from "./JKY";
|
|
13
|
+
export * as DXD from "./DXD";
|
|
13
14
|
export * from "./workOrder";
|
|
14
15
|
export * from "./constants";
|
|
15
16
|
export declare const queryWdtAddressData: (instance?: WdtAddressData) => Promise<void>;
|
|
@@ -23,6 +23,8 @@ import * as _SKX from "./SKX";
|
|
|
23
23
|
export { _SKX as SKX };
|
|
24
24
|
import * as _JKY from "./JKY";
|
|
25
25
|
export { _JKY as JKY };
|
|
26
|
+
import * as _DXD from "./DXD";
|
|
27
|
+
export { _DXD as DXD };
|
|
26
28
|
export * from "./workOrder";
|
|
27
29
|
export * from "./constants";
|
|
28
30
|
var transformData = function transformData(list) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface OptionsItem {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare class ShopData {
|
|
7
|
+
private shopData;
|
|
8
|
+
fetchData: () => Promise<void>;
|
|
9
|
+
getShopData: () => OptionsItem[];
|
|
10
|
+
setShopData: (val: OptionsItem[]) => OptionsItem[];
|
|
11
|
+
}
|
|
12
|
+
export declare class DxdShopDataCenter {
|
|
13
|
+
static getInstance(): ShopData;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
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 _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
import { DXD } from "../servers/index";
|
|
12
|
+
var ShopData = /*#__PURE__*/_createClass(function ShopData() {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, ShopData);
|
|
15
|
+
_defineProperty(this, "shopData", []);
|
|
16
|
+
_defineProperty(this, "fetchData", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
17
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
|
+
while (1) switch (_context.prev = _context.next) {
|
|
19
|
+
case 0:
|
|
20
|
+
_context.next = 2;
|
|
21
|
+
return DXD.getShopDataAsync().then(function (list) {
|
|
22
|
+
_this.shopData = list;
|
|
23
|
+
});
|
|
24
|
+
case 2:
|
|
25
|
+
case "end":
|
|
26
|
+
return _context.stop();
|
|
27
|
+
}
|
|
28
|
+
}, _callee);
|
|
29
|
+
})));
|
|
30
|
+
_defineProperty(this, "getShopData", function () {
|
|
31
|
+
return _this.shopData;
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "setShopData", function (val) {
|
|
34
|
+
return _this.shopData = val;
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
var instance = new ShopData();
|
|
38
|
+
export var DxdShopDataCenter = /*#__PURE__*/function () {
|
|
39
|
+
function DxdShopDataCenter() {
|
|
40
|
+
_classCallCheck(this, DxdShopDataCenter);
|
|
41
|
+
}
|
|
42
|
+
_createClass(DxdShopDataCenter, null, [{
|
|
43
|
+
key: "getInstance",
|
|
44
|
+
value: function getInstance() {
|
|
45
|
+
return instance;
|
|
46
|
+
}
|
|
47
|
+
}]);
|
|
48
|
+
return DxdShopDataCenter;
|
|
49
|
+
}();
|
|
@@ -8,7 +8,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
-
import { BSE3, WDT, KM, GY, JST, JY, JKY, WLN } from "../servers/index";
|
|
11
|
+
import { BSE3, WDT, KM, GY, JST, JY, JKY, WLN, DXD } from "../servers/index";
|
|
12
12
|
var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
|
|
13
13
|
var _this = this;
|
|
14
14
|
_classCallCheck(this, SendData);
|
|
@@ -71,7 +71,8 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
|
|
|
71
71
|
jst: JST,
|
|
72
72
|
jy: JY,
|
|
73
73
|
jky: JKY,
|
|
74
|
-
wln: WLN
|
|
74
|
+
wln: WLN,
|
|
75
|
+
dxd: DXD
|
|
75
76
|
}[this.platform];
|
|
76
77
|
});
|
|
77
78
|
export var SendDataCenter = /*#__PURE__*/function () {
|
|
@@ -90,6 +91,7 @@ export var SendDataCenter = /*#__PURE__*/function () {
|
|
|
90
91
|
if (platform === "JY_SEND_GOOD") platform = "jy";
|
|
91
92
|
if (platform === "JKY_SEND_GOOD") platform = "jky";
|
|
92
93
|
if (platform === "WLN_SEND_GOOD") platform = "wln";
|
|
94
|
+
if (platform === "DXD_SEND_GOOD") platform = "dxd";
|
|
93
95
|
if (!this.instanceMap.has(platform)) {
|
|
94
96
|
this.instanceMap.set(platform, new SendData(platform));
|
|
95
97
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const DXD_SYSTEM_ORDER_CONFIG: {
|
|
2
|
+
key: string;
|
|
3
|
+
name: string;
|
|
4
|
+
selectId: string;
|
|
5
|
+
orderNo: string;
|
|
6
|
+
columns: ({
|
|
7
|
+
dataIndex: string;
|
|
8
|
+
title: string;
|
|
9
|
+
width: number;
|
|
10
|
+
render?: undefined;
|
|
11
|
+
renderExport?: undefined;
|
|
12
|
+
conditionOptionsSetting?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
dataIndex: string;
|
|
15
|
+
title: string;
|
|
16
|
+
width: number;
|
|
17
|
+
render: (val: boolean) => "否" | "是";
|
|
18
|
+
renderExport: (val: boolean) => "否" | "是";
|
|
19
|
+
conditionOptionsSetting: {
|
|
20
|
+
dataType: string;
|
|
21
|
+
getOptions: () => {
|
|
22
|
+
value: boolean;
|
|
23
|
+
label: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
} | {
|
|
27
|
+
dataIndex: string;
|
|
28
|
+
title: string;
|
|
29
|
+
width: number;
|
|
30
|
+
render: (val: boolean) => "否" | "是";
|
|
31
|
+
renderExport: (val: boolean) => "否" | "是";
|
|
32
|
+
conditionOptionsSetting?: undefined;
|
|
33
|
+
})[];
|
|
34
|
+
};
|
|
35
|
+
export declare const updateDxdGoodsHandle: (orders?: any[], config?: {
|
|
36
|
+
canEdit?: boolean;
|
|
37
|
+
}) => any[];
|
|
38
|
+
export declare const dxdOrderTransform: (detail: any, form: any) => {
|
|
39
|
+
dxdSystemOrderNo: any;
|
|
40
|
+
dxdSystemOrder: {
|
|
41
|
+
isRequest: boolean;
|
|
42
|
+
orderNo: any;
|
|
43
|
+
orders: any;
|
|
44
|
+
selectIds: any;
|
|
45
|
+
selectedRows: any;
|
|
46
|
+
showOrderInfo: any;
|
|
47
|
+
};
|
|
48
|
+
dxdGoods: {
|
|
49
|
+
isRequest: boolean;
|
|
50
|
+
allOrders: any;
|
|
51
|
+
orders: any;
|
|
52
|
+
systemOrders: any;
|
|
53
|
+
orderNo: any;
|
|
54
|
+
dxdGoods: any[];
|
|
55
|
+
shopCode: any;
|
|
56
|
+
shopName: any;
|
|
57
|
+
platformOrderNo: any;
|
|
58
|
+
};
|
|
59
|
+
dxdLogistics: any;
|
|
60
|
+
dxdSendGood: any;
|
|
61
|
+
shopCode: any;
|
|
62
|
+
};
|
|
63
|
+
export declare const dxdOrderBackFormValues: (detail?: any, templateDetail?: any) => any;
|
|
@@ -0,0 +1,342 @@
|
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import uuid from "./getUUid";
|
|
8
|
+
export var DXD_SYSTEM_ORDER_CONFIG = {
|
|
9
|
+
key: "dxdSystemShowOrder",
|
|
10
|
+
name: "大希地",
|
|
11
|
+
selectId: "dxdSystemSelectIds",
|
|
12
|
+
orderNo: "dxdSystemOrderNo",
|
|
13
|
+
columns: [{
|
|
14
|
+
dataIndex: "orderNo",
|
|
15
|
+
title: "出库单号",
|
|
16
|
+
width: 150
|
|
17
|
+
}, {
|
|
18
|
+
dataIndex: "warehouseName",
|
|
19
|
+
title: "发货仓名称",
|
|
20
|
+
width: 150
|
|
21
|
+
}, {
|
|
22
|
+
dataIndex: "warehouseCode",
|
|
23
|
+
title: "发货仓编码",
|
|
24
|
+
width: 150
|
|
25
|
+
}, {
|
|
26
|
+
dataIndex: "monthCardName",
|
|
27
|
+
title: "大希地物流公司名称",
|
|
28
|
+
width: 180
|
|
29
|
+
}, {
|
|
30
|
+
dataIndex: "monthCardNo",
|
|
31
|
+
title: "大希地物流公司编码",
|
|
32
|
+
width: 180
|
|
33
|
+
}, {
|
|
34
|
+
dataIndex: "logisticsNo",
|
|
35
|
+
title: "物流单号",
|
|
36
|
+
width: 180
|
|
37
|
+
}, {
|
|
38
|
+
dataIndex: "logisticsName",
|
|
39
|
+
title: "标准快递名称",
|
|
40
|
+
width: 180
|
|
41
|
+
}, {
|
|
42
|
+
dataIndex: "logisticsCode",
|
|
43
|
+
title: "标准快递编码",
|
|
44
|
+
width: 180
|
|
45
|
+
}, {
|
|
46
|
+
dataIndex: "coldChain",
|
|
47
|
+
title: "是否冷链",
|
|
48
|
+
width: 120,
|
|
49
|
+
render: function render(val) {
|
|
50
|
+
return typeof val === "boolean" ? val ? "是" : "否" : val;
|
|
51
|
+
},
|
|
52
|
+
renderExport: function renderExport(val) {
|
|
53
|
+
return typeof val === "boolean" ? val ? "是" : "否" : val;
|
|
54
|
+
},
|
|
55
|
+
conditionOptionsSetting: {
|
|
56
|
+
dataType: "weakenArray",
|
|
57
|
+
getOptions: function getOptions() {
|
|
58
|
+
return [{
|
|
59
|
+
value: true,
|
|
60
|
+
label: "是"
|
|
61
|
+
}, {
|
|
62
|
+
value: false,
|
|
63
|
+
label: "否"
|
|
64
|
+
}];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
dataIndex: "split",
|
|
69
|
+
title: "是否拆分单",
|
|
70
|
+
width: 120,
|
|
71
|
+
render: function render(val) {
|
|
72
|
+
return typeof val === "boolean" ? val ? "是" : "否" : val;
|
|
73
|
+
},
|
|
74
|
+
renderExport: function renderExport(val) {
|
|
75
|
+
return typeof val === "boolean" ? val ? "是" : "否" : val;
|
|
76
|
+
}
|
|
77
|
+
}]
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// DXD 商品标准化(按 DXD 数据格式:items.skus → 商品列表)
|
|
81
|
+
// orders = 平台商品 items,每个 item 含 platformItemId/platformSkuId/packageCode/packageName + skus[]
|
|
82
|
+
// 展平 doOrders.skus 为商品列表(...sku 保留所有字段,与反填 dxdOrderTransform 一致)
|
|
83
|
+
export var updateDxdGoodsHandle = function updateDxdGoodsHandle() {
|
|
84
|
+
var orders = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
85
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
86
|
+
return (orders || []).reduce(function (prv, order) {
|
|
87
|
+
((order === null || order === void 0 ? void 0 : order.skus) || []).forEach(function (sku) {
|
|
88
|
+
var _sku$uuid;
|
|
89
|
+
prv.push(_objectSpread(_objectSpread({}, sku), {}, {
|
|
90
|
+
systemOrderNo: order.orderNo,
|
|
91
|
+
uuid: (_sku$uuid = sku === null || sku === void 0 ? void 0 : sku.uuid) !== null && _sku$uuid !== void 0 ? _sku$uuid : uuid(),
|
|
92
|
+
canDelete: true,
|
|
93
|
+
canEdit: !!config.canEdit
|
|
94
|
+
}));
|
|
95
|
+
});
|
|
96
|
+
return prv;
|
|
97
|
+
}, []);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// 物流/发货仓反填列表处理(参考 KM:检查 notOrderBack + 生成列表)
|
|
101
|
+
var updateDxdItemListHandle = function updateDxdItemListHandle(list, type, comList, form) {
|
|
102
|
+
var _newList;
|
|
103
|
+
if (type === "logistics") {
|
|
104
|
+
var _comList$find, _currentCom$component;
|
|
105
|
+
var currentCom = comList === null || comList === void 0 ? void 0 : (_comList$find = comList.find) === null || _comList$find === void 0 ? void 0 : _comList$find.call(comList, function (item) {
|
|
106
|
+
return item.workOrderComponentType === "DXD_LOGISTICS";
|
|
107
|
+
});
|
|
108
|
+
var notOrderBack = (currentCom === null || currentCom === void 0 ? void 0 : (_currentCom$component = currentCom.componentConfig) === null || _currentCom$component === void 0 ? void 0 : _currentCom$component.notOrderBack) || false;
|
|
109
|
+
if (notOrderBack) {
|
|
110
|
+
var _currentValue;
|
|
111
|
+
var currentValue = form.getFieldValue(currentCom.uniqueKey);
|
|
112
|
+
currentValue = (_currentValue = currentValue) !== null && _currentValue !== void 0 && _currentValue.length ? currentValue : [{
|
|
113
|
+
logisticsCode: "",
|
|
114
|
+
logisticsCompany: ""
|
|
115
|
+
}];
|
|
116
|
+
return currentValue;
|
|
117
|
+
}
|
|
118
|
+
} else if (type === "send") {
|
|
119
|
+
var _comList$find2, _currentCom$component2;
|
|
120
|
+
var _currentCom = comList === null || comList === void 0 ? void 0 : (_comList$find2 = comList.find) === null || _comList$find2 === void 0 ? void 0 : _comList$find2.call(comList, function (item) {
|
|
121
|
+
return item.workOrderComponentType === "DXD_SEND_GOOD";
|
|
122
|
+
});
|
|
123
|
+
var _notOrderBack = (_currentCom === null || _currentCom === void 0 ? void 0 : (_currentCom$component2 = _currentCom.componentConfig) === null || _currentCom$component2 === void 0 ? void 0 : _currentCom$component2.notOrderBack) || false;
|
|
124
|
+
if (_notOrderBack) {
|
|
125
|
+
var _currentValue3;
|
|
126
|
+
var _currentValue2 = form.getFieldValue(_currentCom.uniqueKey);
|
|
127
|
+
_currentValue2 = (_currentValue3 = _currentValue2) !== null && _currentValue3 !== void 0 && _currentValue3.length ? _currentValue2 : [{
|
|
128
|
+
sendId: "",
|
|
129
|
+
sendName: ""
|
|
130
|
+
}];
|
|
131
|
+
return _currentValue2;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
var newList = list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
|
|
135
|
+
var params = {};
|
|
136
|
+
if (type === "logistics") {
|
|
137
|
+
params.logisticsCompany = next === null || next === void 0 ? void 0 : next.monthCardNo;
|
|
138
|
+
params.logisticsCode = next === null || next === void 0 ? void 0 : next.logisticsNo;
|
|
139
|
+
} else if (type === "send") {
|
|
140
|
+
params.sendId = next.warehouseCode;
|
|
141
|
+
// sendName 是下拉框,最终存的是编码,所以用 warehouseCode 反填
|
|
142
|
+
params.sendName = next.warehouseCode;
|
|
143
|
+
params.sendSnapshotName = next.warehouseName;
|
|
144
|
+
}
|
|
145
|
+
prv.push(params);
|
|
146
|
+
return prv;
|
|
147
|
+
}, []);
|
|
148
|
+
if (!((_newList = newList) !== null && _newList !== void 0 && _newList.length)) {
|
|
149
|
+
switch (type) {
|
|
150
|
+
case "logistics":
|
|
151
|
+
newList = [{
|
|
152
|
+
logisticsCode: ""
|
|
153
|
+
}];
|
|
154
|
+
break;
|
|
155
|
+
case "send":
|
|
156
|
+
newList = [{
|
|
157
|
+
sendId: "",
|
|
158
|
+
sendName: ""
|
|
159
|
+
}];
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return newList;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// 物流/发货仓按 showField 过滤反填字段(参考 KM:只反填组件配置要显示的字段)
|
|
167
|
+
var updateDxdItemListByConfigHandle = function updateDxdItemListByConfigHandle(list, type) {
|
|
168
|
+
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
169
|
+
var showField = config.showField;
|
|
170
|
+
return list === null || list === void 0 ? void 0 : list.reduce(function (prv, next) {
|
|
171
|
+
if (type === "logistics") {
|
|
172
|
+
if (!["logisticsCompany", ""].includes(showField || "")) {
|
|
173
|
+
next.logisticsCompany = undefined;
|
|
174
|
+
}
|
|
175
|
+
if (!["logisticsCode", ""].includes(showField || "")) {
|
|
176
|
+
next.logisticsCode = undefined;
|
|
177
|
+
}
|
|
178
|
+
} else if (type === "send") {
|
|
179
|
+
if (!["sendId", "all"].includes(showField || "")) {
|
|
180
|
+
next.sendId = undefined;
|
|
181
|
+
}
|
|
182
|
+
if (!["sendName", "all"].includes(showField || "")) {
|
|
183
|
+
next.sendName = undefined;
|
|
184
|
+
next.sendSnapshotName = undefined;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
prv.push(next);
|
|
188
|
+
return prv;
|
|
189
|
+
}, []);
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
// DXD 订单数据转换
|
|
193
|
+
export var dxdOrderTransform = function dxdOrderTransform(detail, form) {
|
|
194
|
+
var _doOrders$3, _doOrders$4, _doOrders$5, _doOrders$6;
|
|
195
|
+
var _ref = detail || {},
|
|
196
|
+
doOrders = _ref.doOrders,
|
|
197
|
+
orderNo = _ref.orderNo,
|
|
198
|
+
componentList = _ref.componentList,
|
|
199
|
+
inputSelectedRows = _ref.selectedRows,
|
|
200
|
+
matchLogisticsNo = _ref.matchLogisticsNo;
|
|
201
|
+
var data = doOrders[0] || {};
|
|
202
|
+
|
|
203
|
+
// 参考 KM:判断是否只有一个出库订单(用于系统订单组件的默认选中逻辑)
|
|
204
|
+
var onlyOneSystemOrder = doOrders.length === 1;
|
|
205
|
+
|
|
206
|
+
// 参考 KM/WDT:根据物流单号匹配系统订单
|
|
207
|
+
var matchedSystemOrders = matchLogisticsNo ? doOrders.filter(function (item) {
|
|
208
|
+
return "".concat((item === null || item === void 0 ? void 0 : item.logisticsNo) || "").trim() === "".concat(matchLogisticsNo).trim();
|
|
209
|
+
}) : [];
|
|
210
|
+
var matchedSystemOrderIds = matchedSystemOrders.map(function (item) {
|
|
211
|
+
return item === null || item === void 0 ? void 0 : item.orderNo;
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
// 参考 KM kmOrderTransform 第479-493行:
|
|
215
|
+
// 1. 如果有匹配的订单(matchLogisticsNo 匹配),使用匹配的订单
|
|
216
|
+
// 2. 如果传入了 selectedRows(用户勾选场景),使用传入的 selectedRows
|
|
217
|
+
// 3. 如果只有一个订单(初始反填场景),默认选中第一个订单
|
|
218
|
+
// 4. 如果有多个订单且未匹配且未传入 selectedRows(初始反填场景),不选中任何订单
|
|
219
|
+
|
|
220
|
+
var selectedRows = [];
|
|
221
|
+
if (matchedSystemOrders.length > 0) {
|
|
222
|
+
// 场景1:根据物流单号匹配到订单
|
|
223
|
+
selectedRows = matchedSystemOrders.map(function (order) {
|
|
224
|
+
return _objectSpread(_objectSpread({}, order), {}, {
|
|
225
|
+
coldChain: order.coldChain,
|
|
226
|
+
skus: order.skus || [],
|
|
227
|
+
billNo: order.orderNo,
|
|
228
|
+
billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
} else if (inputSelectedRows) {
|
|
232
|
+
// 场景2:用户手动勾选
|
|
233
|
+
selectedRows = inputSelectedRows;
|
|
234
|
+
} else if (onlyOneSystemOrder) {
|
|
235
|
+
var _doOrders$, _doOrders$2;
|
|
236
|
+
// 场景3:只有一个订单,默认选中
|
|
237
|
+
selectedRows = [_objectSpread(_objectSpread({}, doOrders[0] || {}), {}, {
|
|
238
|
+
skus: ((_doOrders$ = doOrders[0]) === null || _doOrders$ === void 0 ? void 0 : _doOrders$.skus) || [],
|
|
239
|
+
billNo: (_doOrders$2 = doOrders[0]) === null || _doOrders$2 === void 0 ? void 0 : _doOrders$2.orderNo,
|
|
240
|
+
billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
|
|
241
|
+
})];
|
|
242
|
+
}
|
|
243
|
+
// 场景4:多个订单且未匹配且未手动勾选,selectedRows 为空数组
|
|
244
|
+
|
|
245
|
+
// 参考 KM:决定用哪些订单反填商品
|
|
246
|
+
var orderBackDoOrders = selectedRows.length > 0 ? doOrders.filter(function (order) {
|
|
247
|
+
return selectedRows.some(function (row) {
|
|
248
|
+
return row.orderNo === order.orderNo;
|
|
249
|
+
});
|
|
250
|
+
}) : [];
|
|
251
|
+
|
|
252
|
+
// 转换 orderBackDoOrders.skus 为 dxdGoods 格式:展平订单的 skus
|
|
253
|
+
var dxdGoods = updateDxdGoodsHandle(orderBackDoOrders, {
|
|
254
|
+
canEdit: true
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// 转换 doOrders(出库订单)为系统订单格式
|
|
258
|
+
var dxdSystemOrder = {
|
|
259
|
+
isRequest: true,
|
|
260
|
+
orderNo: (data === null || data === void 0 ? void 0 : data.platformOrderNo) || orderNo,
|
|
261
|
+
orders: doOrders.map(function (order) {
|
|
262
|
+
return _objectSpread(_objectSpread({}, order), {}, {
|
|
263
|
+
skus: order.skus || [],
|
|
264
|
+
billNo: order.orderNo,
|
|
265
|
+
billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
|
|
266
|
+
});
|
|
267
|
+
}),
|
|
268
|
+
selectIds: matchedSystemOrderIds.length > 0 ? matchedSystemOrderIds : doOrders.length === 1 ? [(_doOrders$3 = doOrders[0]) === null || _doOrders$3 === void 0 ? void 0 : _doOrders$3.orderNo] : [],
|
|
269
|
+
selectedRows: matchedSystemOrders.length > 0 ? matchedSystemOrders.map(function (order) {
|
|
270
|
+
return _objectSpread(_objectSpread({}, order), {}, {
|
|
271
|
+
skus: order.skus || [],
|
|
272
|
+
billNo: order.orderNo,
|
|
273
|
+
billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
|
|
274
|
+
});
|
|
275
|
+
}) : doOrders.length === 1 ? [_objectSpread(_objectSpread({}, doOrders[0] || {}), {}, {
|
|
276
|
+
skus: ((_doOrders$4 = doOrders[0]) === null || _doOrders$4 === void 0 ? void 0 : _doOrders$4.skus) || [],
|
|
277
|
+
billNo: (_doOrders$5 = doOrders[0]) === null || _doOrders$5 === void 0 ? void 0 : _doOrders$5.orderNo,
|
|
278
|
+
billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
|
|
279
|
+
})] : [],
|
|
280
|
+
showOrderInfo: doOrders.map(function (order) {
|
|
281
|
+
return _objectSpread(_objectSpread({}, order), {}, {
|
|
282
|
+
skus: order.skus || [],
|
|
283
|
+
billNo: order.orderNo,
|
|
284
|
+
billType: data !== null && data !== void 0 && data.split ? "拆分订单" : "普通订单"
|
|
285
|
+
});
|
|
286
|
+
})
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// 转换物流信息(检查 notOrderBack;用通用字段名 logisticsCompany/logisticsCode,与 KM/showField 一致)
|
|
290
|
+
var dxdLogistics = updateDxdItemListHandle(matchedSystemOrders.length > 0 ? matchedSystemOrders : doOrders, "logistics", componentList, form);
|
|
291
|
+
|
|
292
|
+
// 转换发货信息(sendName 存编码,sendSnapshotName 存名称快照;检查 notOrderBack)
|
|
293
|
+
var dxdSendGood = updateDxdItemListHandle(matchedSystemOrders.length > 0 ? matchedSystemOrders : doOrders, "send", componentList, form);
|
|
294
|
+
return {
|
|
295
|
+
dxdSystemOrderNo: doOrders.length > 0 ? (_doOrders$6 = doOrders[0]) === null || _doOrders$6 === void 0 ? void 0 : _doOrders$6.orderNo : null,
|
|
296
|
+
dxdSystemOrder: dxdSystemOrder,
|
|
297
|
+
dxdGoods: {
|
|
298
|
+
isRequest: true,
|
|
299
|
+
allOrders: detail === null || detail === void 0 ? void 0 : detail.allOrders,
|
|
300
|
+
// DXD 无独立系统订单勾选逻辑,orders 取 allOrders(与 KM_GOODS 结构一致,供选品使用)
|
|
301
|
+
orders: doOrders || [],
|
|
302
|
+
// systemOrders 用 doOrders(出库订单),供 GoodItem 筛选系统订单商品下拉(allOrders 是 items 平台商品,不含 orderNo)
|
|
303
|
+
systemOrders: detail === null || detail === void 0 ? void 0 : detail.allOrders,
|
|
304
|
+
orderNo: orderNo,
|
|
305
|
+
dxdGoods: dxdGoods,
|
|
306
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode,
|
|
307
|
+
shopName: data === null || data === void 0 ? void 0 : data.shopName,
|
|
308
|
+
platformOrderNo: data === null || data === void 0 ? void 0 : data.platformOrderNo
|
|
309
|
+
},
|
|
310
|
+
dxdLogistics: dxdLogistics,
|
|
311
|
+
dxdSendGood: dxdSendGood,
|
|
312
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
// DXD 订单返填逻辑
|
|
317
|
+
export var dxdOrderBackFormValues = function dxdOrderBackFormValues() {
|
|
318
|
+
var detail = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
319
|
+
var templateDetail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
320
|
+
return ((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentDtoList) || []).reduce(function (prv, next) {
|
|
321
|
+
var uniqueKey = next.uniqueKey;
|
|
322
|
+
var config = next.componentConfig;
|
|
323
|
+
switch (next.workOrderComponentType) {
|
|
324
|
+
case "DXD_SYSTEM_ORDER":
|
|
325
|
+
prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.dxdSystemOrder;
|
|
326
|
+
break;
|
|
327
|
+
case "DXD_GOODS":
|
|
328
|
+
prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.dxdGoods;
|
|
329
|
+
break;
|
|
330
|
+
case "DXD_LOGISTICS":
|
|
331
|
+
prv[uniqueKey] = updateDxdItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.dxdLogistics, "logistics", config);
|
|
332
|
+
break;
|
|
333
|
+
case "DXD_SEND_GOOD":
|
|
334
|
+
prv[uniqueKey] = updateDxdItemListByConfigHandle(detail === null || detail === void 0 ? void 0 : detail.dxdSendGood, "send", config);
|
|
335
|
+
break;
|
|
336
|
+
case "DXD_SHOP":
|
|
337
|
+
prv[uniqueKey] = detail === null || detail === void 0 ? void 0 : detail.shopCode;
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
return prv;
|
|
341
|
+
}, {});
|
|
342
|
+
};
|
|
@@ -13,8 +13,10 @@ export { BS_SYSTEM_ORDER_CONFIG, bsOrderBackFormValues, bsOrderTransform, } from
|
|
|
13
13
|
export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_SYSTEM_ORDER_CONFIG, } from "./bsE3OrderBackFormValues";
|
|
14
14
|
export { WLN_SYSTEM_ORDER_CONFIG, wlnOrderBackFormValues, wlnOrderTransform, updateWlnGoodsHandle, } from "./wlnOrderBackFormValues";
|
|
15
15
|
export { WDT_RETURN_BILL_NO_CONFIG, WDT_SYSTEM_ORDER_CONFIG, wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle, updateWdtAftersaleGoodsHandle, tradeStatusMap, } from "./wdtOrderBackFormValues";
|
|
16
|
+
export { DXD_SYSTEM_ORDER_CONFIG } from "./dxdOrderBackFormValues";
|
|
17
|
+
export { dxdOrderBackFormValues, dxdOrderTransform, updateDxdGoodsHandle, } from "./dxdOrderBackFormValues";
|
|
16
18
|
export * from "./jstOrderBackFormValues";
|
|
17
|
-
export * from
|
|
19
|
+
export * from "./platformAfterSalesOrderBackFormValues";
|
|
18
20
|
export { kmOrderBackFormValues, kmOrderTransform, KM_SYSTEM_ORDER_CONFIG, filterKmOrders, updateKmGoodsHandle, handleKmAddressIdentify, kmSkuTypeMap, KM_ORDER_TYPE_MAP, KM_ORDER_STATUS, } from "./kmOrderBackFormValues";
|
|
19
21
|
export { getIsPlatformCodesIncludeOrderNos, GY_DELIVERY_STATE_MAPPING, GY_SYSTEM_ORDER_CONFIG, updateGyGoodsHandle, gyOrderTransform, gyOrderBackFormValues, filterGyOrders, } from "./gyOrderBackFormValues";
|
|
20
22
|
export { filterJyOrders, jyOrderBackFormValues, jyOrderTransform, updateJyGoodsHandle, JY_SYSTEM_ORDER_CONFIG, JY_ORDER_TYPE_MAP, JY_ORDER_STATUS_MAP, } from "./jyOrderBackFormValues";
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -13,6 +13,8 @@ export { BS_SYSTEM_ORDER_CONFIG, bsOrderBackFormValues, bsOrderTransform } from
|
|
|
13
13
|
export { bsE3OrderBackFormValues, bsE3OrderTransform, updateBsE3GoodsHandle, filterBsE3Orders, BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP, BS_E3_SYSTEM_ORDER_CONFIG } from "./bsE3OrderBackFormValues";
|
|
14
14
|
export { WLN_SYSTEM_ORDER_CONFIG, wlnOrderBackFormValues, wlnOrderTransform, updateWlnGoodsHandle } from "./wlnOrderBackFormValues";
|
|
15
15
|
export { WDT_RETURN_BILL_NO_CONFIG, WDT_SYSTEM_ORDER_CONFIG, wdtOrderBackFormValues, wdtOrderTransform, WDT_ORDER_TYPE_MAP, filterWdtOrders, updateWdtGoodsHandle, updateWdtAftersaleGoodsHandle, tradeStatusMap } from "./wdtOrderBackFormValues";
|
|
16
|
+
export { DXD_SYSTEM_ORDER_CONFIG } from "./dxdOrderBackFormValues";
|
|
17
|
+
export { dxdOrderBackFormValues, dxdOrderTransform, updateDxdGoodsHandle } from "./dxdOrderBackFormValues";
|
|
16
18
|
// export { default as jstOrderBackFormValues } from "./jstOrderBackFormValues";
|
|
17
19
|
export * from "./jstOrderBackFormValues";
|
|
18
20
|
export * from "./platformAfterSalesOrderBackFormValues";
|
|
@@ -12,8 +12,8 @@ export declare const JKY_SYSTEM_ORDER_CONFIG: {
|
|
|
12
12
|
dataIndex: string;
|
|
13
13
|
title: string;
|
|
14
14
|
width: number;
|
|
15
|
-
render: (val: number) => "
|
|
16
|
-
renderExport: (val: number) => "
|
|
15
|
+
render: (val: number) => "否" | "是";
|
|
16
|
+
renderExport: (val: number) => "否" | "是";
|
|
17
17
|
})[];
|
|
18
18
|
};
|
|
19
19
|
export declare const JKY_ORDER_FROM_MAP: {
|
|
@@ -22,6 +22,10 @@ export var JST_SYSTEM_ORDER_CONFIG = {
|
|
|
22
22
|
dataIndex: "orderType",
|
|
23
23
|
title: "订单类型",
|
|
24
24
|
width: 150
|
|
25
|
+
}, {
|
|
26
|
+
dataIndex: "erpOrderType",
|
|
27
|
+
title: "拆合单类型",
|
|
28
|
+
width: 150
|
|
25
29
|
}, {
|
|
26
30
|
dataIndex: "oId",
|
|
27
31
|
title: "系统订单号",
|
|
@@ -62,7 +66,7 @@ export var updateJstGoodsHandle = function updateJstGoodsHandle() {
|
|
|
62
66
|
var _next$items;
|
|
63
67
|
// 反填子商品
|
|
64
68
|
next === null || next === void 0 ? void 0 : (_next$items = next.items) === null || _next$items === void 0 ? void 0 : _next$items.forEach(function (item) {
|
|
65
|
-
if (item.skuType ===
|
|
69
|
+
if (item.skuType === "combine") {
|
|
66
70
|
item.subItems.forEach(function (subItem) {
|
|
67
71
|
var newSubItem = wrapItem(subItem, next === null || next === void 0 ? void 0 : next.oId);
|
|
68
72
|
newSubItem.batchId = item.batchId;
|
|
@@ -21,6 +21,7 @@ import { jyOrderBackFormValues } from "./jyOrderBackFormValues";
|
|
|
21
21
|
import { skxOrderBackFormValues } from "./skxOrderBackFormValues";
|
|
22
22
|
import { skxReturnOrderBackFormValues } from "./skxReturnOrderBackFormValues";
|
|
23
23
|
import { jkyOrderBackFormValues } from "./jkyOrderBackFormValues";
|
|
24
|
+
import { dxdOrderBackFormValues } from "./dxdOrderBackFormValues";
|
|
24
25
|
import { pushGyLog } from "../utils";
|
|
25
26
|
|
|
26
27
|
// 淘宝商品组件信息处理
|
|
@@ -290,11 +291,12 @@ export default (function (_ref) {
|
|
|
290
291
|
var jyValues = detail["jyOrder"] ? jyOrderBackFormValues(detail["jyOrder"], templateDetail) : {};
|
|
291
292
|
var gyValues = detail["gyOrder"] ? gyOrderBackFormValues(detail["gyOrder"], templateDetail) : {};
|
|
292
293
|
var jkyValues = detail["jkyOrder"] ? jkyOrderBackFormValues(detail["jkyOrder"], templateDetail) : {};
|
|
294
|
+
var dxdValues = detail["dxdOrder"] ? dxdOrderBackFormValues(detail["dxdOrder"], templateDetail) : {};
|
|
293
295
|
//不判断是否存在detail["skxOrder"],不存在直接清空所有skx相关组件值
|
|
294
296
|
var skxValues = detail["skxOrder"] ? skxOrderBackFormValues(detail["skxOrder"], templateDetail) : {};
|
|
295
297
|
var skxReturnValues = detail["skxReturnOrder"] ? skxReturnOrderBackFormValues(detail["skxReturnOrder"], templateDetail) : {};
|
|
296
298
|
pushGyLog("gyValues", gyValues);
|
|
297
299
|
// console.log("bsE3Values", bsE3Values);
|
|
298
300
|
|
|
299
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), afterSalesValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues), gyValues), jyValues), skxValues), skxReturnValues), jkyValues);
|
|
301
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, orderValues), afterSalesValues), jstValues), bsValues), wlnValues), wdtValues), bsE3Values), kmValues), gyValues), jyValues), skxValues), skxReturnValues), jkyValues), dxdValues);
|
|
300
302
|
});
|
|
@@ -21,7 +21,7 @@ import { BS_E3_ORDER_STATUS_MAP, BS_E3_BOOLEAN_STATUS_MAP } from "@kmkf-fe-packa
|
|
|
21
21
|
import ExpressInterceptData from "../expressInterceptData";
|
|
22
22
|
var interceptExpress = ExpressInterceptData.getInstance();
|
|
23
23
|
export var unTransField = function unTransField(key) {
|
|
24
|
-
return ["itemList", "jstItemList", "dateTime", "basicMultSelect", "memberLevel", "erpOrderType", "orderRefundType", "checkbox", "multSelect", "rate", "picture", "file", "bsSendGood", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsSystemShowOrder", "bsSystemSelectIds", "reissueLogisticsList", "deliveryNoList", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "erpAfterSaleTradeItemList", "erpAfterSaleTradeIdList", "wlnLogisticsList", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "flowTags", "exchangeReason", "exchangeStatusValue", "inStockStatusItemList", "inStockStatusList", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "wlnInStockStatusItemList", "wlnInStockStatusList", "msgStatusValues", "msgStatus4Search", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "trajectoryMoreStatus", "trajectoryMoreLastLogisticsInfo", "trajectoryMoreLastUpdateTime", "trajectoryApiStatus", "wdtGoods", "wdtSendGood", "wdtReissueType", "wdtReissueGoods", "wdtAftersaleGoods", "wdtSystemOrderNo", "wdtLogisticsList", "wdtSystemShowOrder", "kmSystemShowOrder", "platformAfaterSalesShowOrder", "platformAfaterSalesSelectIds", "wdtSystemSelectIds", "wdtReturnBillNo", "wdtReturnBillSelectIds", "wdtReturnBillShowOrder", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsE3Goods", "bsE3SystemShowOrder", "bsE3SystemSelectIds", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptApiStatusList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptSnapshotList", "interceptLogisticsApiStatus", "productList", "label", "kmSendGood", "kmReturnWarehouse", "kmGoods", "bsE3ReissueType", "bsE3ReissueGoods", "gyGoods", "gySendGood", "gyReissueType", "gyReissueGoods", "gySystemOrderNo", "gyLogisticsList", "gySystemShowOrder", "gySystemSelectIds", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "kmLogisticsList", "jstGoods", "jstSendGood", "jstReissueType", "jstReissueGoods", "jstSystemOrderNo", "jstLogisticsList", "jstSystemShowOrder", "jstSystemSelectIds", "jstReturnGoods", "jstReturnType", "jstExchangeGoods", "kmReissueGoods", "kmReissueType", "kmReturnGoods", "kmReturnType", "kmExchangeGoods", "wdtTags", "kmVideo", "jstAftersaleGoods", "wlnReissueType", "wlnReissueGoods"].reduce(function (cur, nxt) {
|
|
24
|
+
return ["itemList", "jstItemList", "dateTime", "basicMultSelect", "memberLevel", "erpOrderType", "orderRefundType", "checkbox", "multSelect", "rate", "picture", "file", "bsSendGood", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsSystemShowOrder", "bsSystemSelectIds", "reissueLogisticsList", "deliveryNoList", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "erpAfterSaleTradeItemList", "erpAfterSaleTradeIdList", "wlnLogisticsList", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "flowTags", "exchangeReason", "exchangeStatusValue", "inStockStatusItemList", "inStockStatusList", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "wlnInStockStatusItemList", "wlnInStockStatusList", "dxdInStockStatusItemList", "dxdInStockStatusList", "dxdSystemShowOrder", "dxdSystemSelectIds", "dxdGoods", "dxdSuppliers", "dxdSendGood", "dxdLogisticsList", "dxdInStockStatusItemList", "dxdInStockStatusList", "msgStatusValues", "msgStatus4Search", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "trajectoryMoreStatus", "trajectoryMoreLastLogisticsInfo", "trajectoryMoreLastUpdateTime", "trajectoryApiStatus", "wdtGoods", "wdtSendGood", "wdtReissueType", "wdtReissueGoods", "wdtAftersaleGoods", "wdtSystemOrderNo", "wdtLogisticsList", "wdtSystemShowOrder", "kmSystemShowOrder", "platformAfaterSalesShowOrder", "platformAfaterSalesSelectIds", "wdtSystemSelectIds", "wdtReturnBillNo", "wdtReturnBillSelectIds", "wdtReturnBillShowOrder", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsE3Goods", "bsE3SystemShowOrder", "bsE3SystemSelectIds", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptApiStatusList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptSnapshotList", "interceptLogisticsApiStatus", "productList", "label", "kmSendGood", "kmReturnWarehouse", "kmGoods", "bsE3ReissueType", "bsE3ReissueGoods", "gyGoods", "gySendGood", "gyReissueType", "gyReissueGoods", "gySystemOrderNo", "gyLogisticsList", "gySystemShowOrder", "gySystemSelectIds", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "kmLogisticsList", "jstGoods", "jstSendGood", "jstReissueType", "jstReissueGoods", "jstSystemOrderNo", "jstLogisticsList", "jstSystemShowOrder", "jstSystemSelectIds", "jstReturnGoods", "jstReturnType", "jstExchangeGoods", "kmReissueGoods", "kmReissueType", "kmReturnGoods", "kmReturnType", "kmExchangeGoods", "wdtTags", "kmVideo", "jstAftersaleGoods", "wlnReissueType", "wlnReissueGoods"].reduce(function (cur, nxt) {
|
|
25
25
|
return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
|
|
26
26
|
}, false);
|
|
27
27
|
};
|
|
@@ -169,7 +169,7 @@ export var transformList = function transformList(fields, uniqueKeys) {
|
|
|
169
169
|
return acc;
|
|
170
170
|
}, {});
|
|
171
171
|
}
|
|
172
|
-
} else if (["bsLogisticsList", "wlnLogisticsList", "wdtLogisticsList", "jstItemList", "kmLogisticsList", "gyLogisticsList"].includes(field)) {
|
|
172
|
+
} else if (["bsLogisticsList", "wlnLogisticsList", "wdtLogisticsList", "jstItemList", "kmLogisticsList", "gyLogisticsList", "dxdLogisticsList"].includes(field)) {
|
|
173
173
|
var logisticsMap = {
|
|
174
174
|
bsLogisticsList: {
|
|
175
175
|
company: "bsLogisticsCompany",
|
|
@@ -200,6 +200,11 @@ export var transformList = function transformList(fields, uniqueKeys) {
|
|
|
200
200
|
company: "gyLogisticsCompany",
|
|
201
201
|
code: "gyLogisticsCode",
|
|
202
202
|
item: "gyLogisticsItem"
|
|
203
|
+
},
|
|
204
|
+
dxdLogisticsList: {
|
|
205
|
+
company: "dxdLogisticsCompany",
|
|
206
|
+
code: "dxdLogisticsCode",
|
|
207
|
+
item: "dxdLogisticsItem"
|
|
203
208
|
}
|
|
204
209
|
};
|
|
205
210
|
if (goodsParams[index]) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default (function (key) {
|
|
2
|
-
return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "memberLevel", "erpOrderType", "erpOrderStatus", "jstOutboundStatus", "orderRefundType", "executeActionType", "checkbox", "multSelect", "rate", "picture", "pictureProList", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtAftersaleGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtReturnBillNo", "wdtReturnBillSelectIds", "wdtReturnBillShowOrder", "wdtLogisticsCompany", "wdtLogisticsList", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode", "kmSystemShowOrder", "platformAfaterSalesShowOrder", "platformAfaterSalesSelectIds", "bsSystemShowOrder", "bsSystemSelectIds", "bsE3SystemOrderNo", "bsE3SystemShowOrder", "bsE3SystemSelectIds", "bsE3Goods", "bsE3ReissueGoods", "bsE3ReissueType", "reissueLogisticsList", "reissueLogisticsCompany", "reissueLogisticsCode", "deliveryNoList", "deliveryNoIds", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "wlnLogisticsList", "wlnLogisticsCompany", "wlnLogisticsCode", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "wlnSendId", "wlnSendName", "exchangeReason", "flowTag", "returnGoodsStatusList", "returnGoodsStatusValue", "exchangeReason", "exchangeStatusValue", "inStockStatusItemList", "inStockStatusList", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "wdtInStockStatusItemList", "wdtInStockStatusList", "jkyInStockStatusItemList", "jkyInStockStatusList", "jstInStockStatusList", "jstInStockStatusItemList", "wlnInStockStatusItemList", "wlnInStockStatusList", "kmInStockStatusItemList", "kmInStockStatusList", "reissueStatusValue", "reissueReason", "adjustWorkOrderStatusValue", "adjustWorkOrderReason", "msgStatusValues", "msgStatus4Search", "createStatusValue", "createReason", "invoiceStatusValue", "invoiceReason", "invoicingStatusValue", "invoicingReason", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptApiStatusList", "interceptLogisticsApiStatus", "logisticsInterceptSnapshotList", "productList", "subOrderList", "label", "kmSendGood", "kmReturnWarehouse", "kmSendId", "kmSendName", "kmGoods", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "jyGoods", "jySystemOrderNo", "jySystemShowOrder", "jySystemSelectIds", "jySendGood", "jySendId", "jySendName", "jyLogisticsList", "jyLogisticsCompany", "jyLogisticsCode", "jkyGoods", "jkySystemOrderNo", "jkySystemSelectIds", "jkySystemShowOrder", "jkySendGood", "jkySendId", "jkySendName", "jkyLogisticsList", "jkyLogisticsCompany", "jkyLogisticsCode", "kmLogisticsList", "jstGoods", "jstSendGood", "jstReissueType", "jstReissueGoods", "jstSystemOrderNo", "jstLogisticsList", "jstSystemShowOrder", "jstSystemSelectIds", "jstReturnGoods", "jstReturnType", "jstExchangeGoods", "trajectoryApiStatus", "kmReissueGoods", "kmReissueType", "kmReturnGoods", "kmReturnType", "kmExchangeGoods", "kmVideo", "wdtTags", "skxGoods", "skxReturnGoods", "skxLogisticsList", "skxReturnLogistics", "jyReissueGoods", "jyReissueType", "jstAftersaleGoods", "wlnReissueType", "wlnReissueGoods"].reduce(function (cur, nxt) {
|
|
2
|
+
return ["itemList", "itemId", "supplierName", "numIid", "aloneItemId", "aloneItemEncode", "jstItemList", "logisticsCompany", "logisticsCode", "supplyId", "supplyName", "sendId", "sendName", "dateTime", "basicMultSelect", "memberLevel", "erpOrderType", "erpOrderStatus", "jstOutboundStatus", "orderRefundType", "executeActionType", "checkbox", "multSelect", "rate", "picture", "pictureProList", "file", "wdtGoods", "wdtReissueType", "wdtSystemOrderNo", "wdtReissueGoods", "wdtAftersaleGoods", "wdtSendGood", "wdtSendId", "wdtSendName", "wdtLogisticsCode", "wdtSystemShowOrder", "wdtSystemSelectIds", "wdtReturnBillNo", "wdtReturnBillSelectIds", "wdtReturnBillShowOrder", "wdtLogisticsCompany", "wdtLogisticsList", "wdtReturnGoods", "wdtReturnType", "wdtExchangeGoods", "bsSendGood", "bsSendId", "bsSendName", "bsGoods", "bsExchangeType", "bsExchangeReturnGoods", "bsExchangeSwapOutGoods", "bsExchangeGiftGoods", "bsReissueType", "bsReissueGoods", "bsReturnGoods", "bsReturnType", "bsLogisticsList", "bsLogisticsCompany", "bsLogisticsCode", "kmSystemShowOrder", "platformAfaterSalesShowOrder", "platformAfaterSalesSelectIds", "bsSystemShowOrder", "bsSystemSelectIds", "bsE3SystemOrderNo", "bsE3SystemShowOrder", "bsE3SystemSelectIds", "bsE3Goods", "bsE3ReissueGoods", "bsE3ReissueType", "reissueLogisticsList", "reissueLogisticsCompany", "reissueLogisticsCode", "deliveryNoList", "deliveryNoIds", "returnGoodsStatusList", "returnGoodsTradeIdList", "returnGoodsTradeItemList", "tradeIdList", "tradeItemList", "wlnLogisticsList", "wlnLogisticsCompany", "wlnLogisticsCode", "wlnSystemShowOrder", "wlnSystemSelectIds", "wlnGoods", "wlnSendGood", "wlnSendId", "wlnSendName", "exchangeReason", "flowTag", "returnGoodsStatusList", "returnGoodsStatusValue", "exchangeReason", "exchangeStatusValue", "inStockStatusItemList", "inStockStatusList", "bsE3InStockStatusItemList", "bsE3InStockStatusList", "wdtInStockStatusItemList", "wdtInStockStatusList", "dxdInStockStatusItemList", "dxdInStockStatusList", "jkyInStockStatusItemList", "jkyInStockStatusList", "jstInStockStatusList", "jstInStockStatusItemList", "wlnInStockStatusItemList", "wlnInStockStatusList", "kmInStockStatusItemList", "kmInStockStatusList", "dxdInStockStatusItemList", "dxdInStockStatusList", "dxdSystemOrderNo", "dxdSystemShowOrder", "dxdSystemSelectIds", "dxdGoods", "dxdSuppliers", "dxdSendGood", "dxdSendId", "dxdSendName", "dxdLogisticsList", "dxdLogisticsCompany", "dxdLogisticsCode", "reissueStatusValue", "reissueReason", "adjustWorkOrderStatusValue", "adjustWorkOrderReason", "msgStatusValues", "msgStatus4Search", "createStatusValue", "createReason", "invoiceStatusValue", "invoiceReason", "invoicingStatusValue", "invoicingReason", "trajectoryList", "trajectoryMoreCompany", "trajectoryMoreCode", "trajectoryMoreSnapshot", "logisticsInterceptList", "logisticsInterceptCompanyList", "logisticsInterceptCodeList", "logisticsInterceptTypeList", "logisticsInterceptStatusList", "logisticsInterceptApiStatusList", "interceptLogisticsApiStatus", "logisticsInterceptSnapshotList", "productList", "subOrderList", "label", "kmSendGood", "kmReturnWarehouse", "kmSendId", "kmSendName", "kmGoods", "gyGoods", "gyReissueType", "gySystemOrderNo", "gyReissueGoods", "gySendGood", "gySendId", "gySendName", "gyLogisticsCode", "gySystemShowOrder", "gySystemSelectIds", "gyLogisticsCompany", "gyLogisticsList", "gyReturnGoods", "gyReturnType", "gyExchangeGoods", "jyGoods", "jySystemOrderNo", "jySystemShowOrder", "jySystemSelectIds", "jySendGood", "jySendId", "jySendName", "jyLogisticsList", "jyLogisticsCompany", "jyLogisticsCode", "jkyGoods", "jkySystemOrderNo", "jkySystemSelectIds", "jkySystemShowOrder", "jkySendGood", "jkySendId", "jkySendName", "jkyLogisticsList", "jkyLogisticsCompany", "jkyLogisticsCode", "kmLogisticsList", "jstGoods", "jstSendGood", "jstReissueType", "jstReissueGoods", "jstSystemOrderNo", "jstLogisticsList", "jstSystemShowOrder", "jstSystemSelectIds", "jstReturnGoods", "jstReturnType", "jstExchangeGoods", "trajectoryApiStatus", "kmReissueGoods", "kmReissueType", "kmReturnGoods", "kmReturnType", "kmExchangeGoods", "kmVideo", "wdtTags", "skxGoods", "skxReturnGoods", "skxLogisticsList", "skxReturnLogistics", "jyReissueGoods", "jyReissueType", "jstAftersaleGoods", "wlnReissueType", "wlnReissueGoods"].reduce(function (cur, nxt) {
|
|
3
3
|
return cur || (key === null || key === void 0 ? void 0 : key.includes(nxt));
|
|
4
4
|
}, false);
|
|
5
5
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-utils",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.15",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "5494e6b503ad00c913466a68eb58b77081f1fff6",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|