@kmkf-fe-packages/kmkf-utils 2.2.4 → 2.2.5-beta.17
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/README.md +1 -0
- package/dist/esm/constants/constant.d.ts +143 -0
- package/dist/esm/constants/constant.js +215 -0
- package/dist/esm/constants/index.d.ts +2 -1
- package/dist/esm/constants/index.js +3 -2
- package/dist/esm/constants/msgTypeMapping.js +2 -1
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/useStatus.d.ts +1 -0
- package/dist/esm/hooks/useStatus.js +32 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/request/index.js +25 -8
- package/dist/esm/servers/JY/index.d.ts +2 -0
- package/dist/esm/servers/JY/index.js +2 -0
- package/dist/esm/servers/JY/logisticsData.d.ts +6 -0
- package/dist/esm/servers/JY/logisticsData.js +42 -0
- package/dist/esm/servers/JY/warehouseData.d.ts +7 -0
- package/dist/esm/servers/JY/warehouseData.js +38 -0
- package/dist/esm/servers/SKX/index.d.ts +1 -0
- package/dist/esm/servers/SKX/index.js +1 -0
- package/dist/esm/servers/SKX/order.d.ts +12 -0
- package/dist/esm/servers/SKX/order.js +41 -0
- package/dist/esm/servers/index.d.ts +11 -0
- package/dist/esm/servers/index.js +40 -0
- package/dist/esm/servers/orderSubForm/index.d.ts +37 -0
- package/dist/esm/servers/orderSubForm/index.js +71 -0
- package/dist/esm/servers/utils.d.ts +6 -0
- package/dist/esm/servers/utils.js +32 -0
- package/dist/esm/servers/workOrder/index.d.ts +58 -0
- package/dist/esm/servers/workOrder/index.js +106 -0
- package/dist/esm/utils/SendData.js +4 -2
- package/dist/esm/utils/finalFormData.d.ts +8 -0
- package/dist/esm/utils/finalFormData.js +164 -0
- package/dist/esm/utils/getExpression.js +6 -6
- package/dist/esm/utils/index.d.ts +7 -1
- package/dist/esm/utils/index.js +8 -2
- package/dist/esm/utils/jyOrderBackFormValues.d.ts +36 -0
- package/dist/esm/utils/jyOrderBackFormValues.js +307 -0
- package/dist/esm/utils/kmOrderBackFormValues.js +6 -9
- package/dist/esm/utils/orderBackFormValues.js +11 -1
- package/dist/esm/utils/orderSubFormOrderBackFormValues.d.ts +8 -0
- package/dist/esm/utils/orderSubFormOrderBackFormValues.js +37 -0
- package/dist/esm/utils/skxOrderBackFormValues.d.ts +1 -0
- package/dist/esm/utils/skxOrderBackFormValues.js +10 -7
- package/dist/esm/utils/skxReturnOrderBackFormValues.d.ts +32 -0
- package/dist/esm/utils/skxReturnOrderBackFormValues.js +154 -0
- package/dist/esm/utils/transformList.d.ts +3 -0
- package/dist/esm/utils/transformList.js +347 -0
- package/dist/esm/utils/transformWorkOrderData.d.ts +15 -0
- package/dist/esm/utils/transformWorkOrderData.js +1327 -0
- package/dist/esm/utils/unTransField.js +1 -1
- package/package.json +2 -2
- package/dist/esm/utils/dist/gyOrderBackFormValues.js +0 -285
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const queryReturnOrderDetailSingleton: (params: {
|
|
2
|
+
tid: string;
|
|
3
|
+
} | {
|
|
4
|
+
returnBillNo: string;
|
|
5
|
+
} | {
|
|
6
|
+
expressCode: string;
|
|
7
|
+
}) => Promise<any>;
|
|
8
|
+
export declare const querySkxOrderDetailSingleton: (params: {
|
|
9
|
+
tid: string;
|
|
10
|
+
} | {
|
|
11
|
+
onBillNo: string;
|
|
12
|
+
}) => Promise<any>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: flyingMonkey 760958607@qq.com
|
|
3
|
+
* @Date: 2025-09-02 10:35:00
|
|
4
|
+
* @LastEditors: flyingMonkey 760958607@qq.com
|
|
5
|
+
* @LastEditTime: 2025-09-03 16:42:18
|
|
6
|
+
* @FilePath: /kmkf-fe-packages/packages/kmkf-utils/src/servers/SKX/order.ts
|
|
7
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
+
*/
|
|
9
|
+
import request from "../../request";
|
|
10
|
+
import { singletonWrap } from "../utils";
|
|
11
|
+
var queryReturnOrderDetail = function queryReturnOrderDetail(params) {
|
|
12
|
+
return request({
|
|
13
|
+
url: "/qy/gdfw/order/skxReturnOrderDetail",
|
|
14
|
+
method: "post",
|
|
15
|
+
data: params
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
export var queryReturnOrderDetailSingleton = function queryReturnOrderDetailSingleton(params) {
|
|
19
|
+
var key = "tid" in params ? params.tid : "returnBillNo" in params ? params.returnBillNo : params.expressCode;
|
|
20
|
+
return singletonWrap(function () {
|
|
21
|
+
return queryReturnOrderDetail(params);
|
|
22
|
+
}, {
|
|
23
|
+
name: "skx_queryReturnOrderDetailSingleton",
|
|
24
|
+
key: key,
|
|
25
|
+
cacheTime: 1000 * 60 * 3
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
export var querySkxOrderDetailSingleton = function querySkxOrderDetailSingleton(params) {
|
|
29
|
+
var key = "tid" in params ? params.tid : params.onBillNo;
|
|
30
|
+
return singletonWrap(function () {
|
|
31
|
+
return request({
|
|
32
|
+
url: "/qy/gdfw/order/skxOrderDetail",
|
|
33
|
+
method: "post",
|
|
34
|
+
data: params
|
|
35
|
+
});
|
|
36
|
+
}, {
|
|
37
|
+
name: "skx_querySkxOrderDetailSingleton",
|
|
38
|
+
key: key,
|
|
39
|
+
cacheTime: 1000 * 60 * 3
|
|
40
|
+
});
|
|
41
|
+
};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { WdtAddressData, GyAddressData, BsAddressData, AddressData } from "../baseAddressData";
|
|
2
|
+
export * from "./utils";
|
|
2
3
|
export * as BSE3 from "./BSE3";
|
|
3
4
|
export * as WDT from "./WDT";
|
|
4
5
|
export * as KM from "./KM";
|
|
5
6
|
export * as GY from "./GY";
|
|
7
|
+
export * as JY from "./JY";
|
|
6
8
|
export * as JST from "./JST";
|
|
7
9
|
export * as WLN from "./WLN";
|
|
10
|
+
export * from "./workOrder";
|
|
11
|
+
export * as orderSubForm from "./orderSubForm";
|
|
12
|
+
export * as SKX from "./SKX";
|
|
8
13
|
export * from "./constants";
|
|
9
14
|
export declare const queryWdtAddressData: (instance?: WdtAddressData) => Promise<void>;
|
|
10
15
|
export declare const queryGyAddressData: (instance?: GyAddressData) => Promise<void>;
|
|
@@ -23,3 +28,9 @@ export declare const getWdtSellerLogisticsCompanyRelation: () => Promise<{
|
|
|
23
28
|
value: string;
|
|
24
29
|
disabled: boolean;
|
|
25
30
|
}[]>;
|
|
31
|
+
export declare const singletonWrap: <T = any>(promise: () => Promise<T>, options: {
|
|
32
|
+
name: string;
|
|
33
|
+
key: string | number;
|
|
34
|
+
isSuccess?: ((data: T) => boolean) | undefined;
|
|
35
|
+
cacheTime?: number | undefined;
|
|
36
|
+
}) => Promise<any>;
|
|
@@ -2,6 +2,7 @@ import get from "lodash/get";
|
|
|
2
2
|
import { WdtAddressData, GyAddressData, BsAddressData, AddressData } from "../baseAddressData";
|
|
3
3
|
import toTree from "../utils/toTree";
|
|
4
4
|
import request from "../request/index";
|
|
5
|
+
export * from "./utils";
|
|
5
6
|
import * as _BSE from "./BSE3";
|
|
6
7
|
export { _BSE as BSE3 };
|
|
7
8
|
import * as _WDT from "./WDT";
|
|
@@ -10,10 +11,17 @@ import * as _KM from "./KM";
|
|
|
10
11
|
export { _KM as KM };
|
|
11
12
|
import * as _GY from "./GY";
|
|
12
13
|
export { _GY as GY };
|
|
14
|
+
import * as _JY from "./JY";
|
|
15
|
+
export { _JY as JY };
|
|
13
16
|
import * as _JST from "./JST";
|
|
14
17
|
export { _JST as JST };
|
|
15
18
|
import * as _WLN from "./WLN";
|
|
16
19
|
export { _WLN as WLN };
|
|
20
|
+
export * from "./workOrder";
|
|
21
|
+
import * as _orderSubForm from "./orderSubForm";
|
|
22
|
+
export { _orderSubForm as orderSubForm };
|
|
23
|
+
import * as _SKX from "./SKX";
|
|
24
|
+
export { _SKX as SKX };
|
|
17
25
|
export * from "./constants";
|
|
18
26
|
var transformData = function transformData(list) {
|
|
19
27
|
var map = {};
|
|
@@ -125,4 +133,36 @@ export var getWdtSellerLogisticsCompanyRelation = function getWdtSellerLogistics
|
|
|
125
133
|
}
|
|
126
134
|
return [];
|
|
127
135
|
});
|
|
136
|
+
};
|
|
137
|
+
var allCacheMap = new Map();
|
|
138
|
+
export var singletonWrap = function singletonWrap(promise, options) {
|
|
139
|
+
var singletonMap = allCacheMap.get(options.name) || new Map();
|
|
140
|
+
var p = singletonMap.get(options.key);
|
|
141
|
+
if (p) return p;
|
|
142
|
+
p = new Promise(function (resolve, reject) {
|
|
143
|
+
var doReject = function doReject(err) {
|
|
144
|
+
// 清空掉错误的请求记录
|
|
145
|
+
singletonMap.delete(options.key);
|
|
146
|
+
reject(err);
|
|
147
|
+
};
|
|
148
|
+
promise().then(function (res) {
|
|
149
|
+
var isSuccess = typeof options.isSuccess === "function" ? options.isSuccess : function (_data) {
|
|
150
|
+
return _data === null || _data === void 0 ? void 0 : _data.success;
|
|
151
|
+
};
|
|
152
|
+
if (isSuccess(res)) {
|
|
153
|
+
resolve(res);
|
|
154
|
+
// 延迟 * 秒清除, 保证时效性
|
|
155
|
+
if (typeof options.cacheTime === "number") {
|
|
156
|
+
setTimeout(function () {
|
|
157
|
+
singletonMap.delete(options.key);
|
|
158
|
+
}, options.cacheTime);
|
|
159
|
+
}
|
|
160
|
+
} else {
|
|
161
|
+
doReject(res);
|
|
162
|
+
}
|
|
163
|
+
}).catch(doReject);
|
|
164
|
+
});
|
|
165
|
+
singletonMap.set(options.key, p);
|
|
166
|
+
allCacheMap.set(options.name, singletonMap);
|
|
167
|
+
return p;
|
|
128
168
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare type Params = {
|
|
2
|
+
orderNo: string;
|
|
3
|
+
shopId?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare type OrderSubFormDataType = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const mockOrderSubformRowData: {
|
|
11
|
+
title: string;
|
|
12
|
+
productCode: string;
|
|
13
|
+
picUrl: string;
|
|
14
|
+
numIid: string;
|
|
15
|
+
quantity: number;
|
|
16
|
+
skuId: string;
|
|
17
|
+
outerSkuId: string;
|
|
18
|
+
propertiesName: string;
|
|
19
|
+
oid: string;
|
|
20
|
+
price: number;
|
|
21
|
+
actualPayment: number;
|
|
22
|
+
expressLogisticsCode: string;
|
|
23
|
+
expressLogisticsCompany: string;
|
|
24
|
+
refundId: string;
|
|
25
|
+
returnExpressLogisticsCode: string;
|
|
26
|
+
returnExpressLogisticsCompany: string;
|
|
27
|
+
reason: string;
|
|
28
|
+
refundAmount: number;
|
|
29
|
+
afterSaleType: string;
|
|
30
|
+
platformStatus: string;
|
|
31
|
+
onlineStatus: string;
|
|
32
|
+
applyTime: string;
|
|
33
|
+
shippingType: string;
|
|
34
|
+
isCNShipment: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const getOrderSubFormDataAsync: (params: Params) => Promise<any>;
|
|
37
|
+
export default getOrderSubFormDataAsync;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 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; }
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
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); }
|
|
10
|
+
import request from "../../request";
|
|
11
|
+
var queryOrderSubFormList = function queryOrderSubFormList(params) {
|
|
12
|
+
return request({
|
|
13
|
+
url: "/qy/gdfw/order/subOrderItemsDetail",
|
|
14
|
+
method: "post",
|
|
15
|
+
data: _objectSpread({}, params)
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
// Mock 一行表格数据
|
|
19
|
+
export var mockOrderSubformRowData = {
|
|
20
|
+
title: "苹果iPhone 15 Pro Max 256GB 深空黑色",
|
|
21
|
+
productCode: "IPHONE15PM256BK",
|
|
22
|
+
picUrl: "https://example.com/iphone15pm.jpg",
|
|
23
|
+
numIid: "1234567890123456789",
|
|
24
|
+
quantity: 1,
|
|
25
|
+
skuId: "9876543210987654321",
|
|
26
|
+
outerSkuId: "SKU-IPHONE15PM256BK-001",
|
|
27
|
+
propertiesName: "颜色:深空黑色;容量:256GB;版本:iPhone 15 Pro Max",
|
|
28
|
+
oid: "20231215000123456789",
|
|
29
|
+
price: 9999.0,
|
|
30
|
+
actualPayment: 8999.0,
|
|
31
|
+
expressLogisticsCode: "SF1234567890",
|
|
32
|
+
expressLogisticsCompany: "顺丰速运",
|
|
33
|
+
refundId: "RF202312150001",
|
|
34
|
+
returnExpressLogisticsCode: "YTO9876543210",
|
|
35
|
+
returnExpressLogisticsCompany: "圆通速递",
|
|
36
|
+
reason: "商品质量问题,屏幕有划痕",
|
|
37
|
+
refundAmount: 8999.0,
|
|
38
|
+
afterSaleType: "2",
|
|
39
|
+
// 退货
|
|
40
|
+
platformStatus: "退款成功",
|
|
41
|
+
onlineStatus: "7",
|
|
42
|
+
// 退款成功
|
|
43
|
+
applyTime: "2023-12-15 14:30:25",
|
|
44
|
+
shippingType: "免运费",
|
|
45
|
+
isCNShipment: "1" // 是
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export var getOrderSubFormDataAsync = /*#__PURE__*/function () {
|
|
49
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
50
|
+
var result, orderSubFormList;
|
|
51
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
52
|
+
while (1) switch (_context.prev = _context.next) {
|
|
53
|
+
case 0:
|
|
54
|
+
console.log("params", params);
|
|
55
|
+
_context.next = 3;
|
|
56
|
+
return queryOrderSubFormList(params);
|
|
57
|
+
case 3:
|
|
58
|
+
result = _context.sent;
|
|
59
|
+
orderSubFormList = (result === null || result === void 0 ? void 0 : result.data) || [];
|
|
60
|
+
return _context.abrupt("return", orderSubFormList);
|
|
61
|
+
case 6:
|
|
62
|
+
case "end":
|
|
63
|
+
return _context.stop();
|
|
64
|
+
}
|
|
65
|
+
}, _callee);
|
|
66
|
+
}));
|
|
67
|
+
return function getOrderSubFormDataAsync(_x) {
|
|
68
|
+
return _ref.apply(this, arguments);
|
|
69
|
+
};
|
|
70
|
+
}();
|
|
71
|
+
export default getOrderSubFormDataAsync;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var allCacheMap = new Map();
|
|
2
|
+
export var singletonWrap = function singletonWrap(promise, options) {
|
|
3
|
+
var singletonMap = allCacheMap.get(options.name) || new Map();
|
|
4
|
+
var p = singletonMap.get(options.key);
|
|
5
|
+
if (p) return p;
|
|
6
|
+
p = new Promise(function (resolve, reject) {
|
|
7
|
+
var doReject = function doReject(err) {
|
|
8
|
+
// 清空掉错误的请求记录
|
|
9
|
+
singletonMap.delete(options.key);
|
|
10
|
+
reject(err);
|
|
11
|
+
};
|
|
12
|
+
promise().then(function (res) {
|
|
13
|
+
var isSuccess = typeof options.isSuccess === "function" ? options.isSuccess : function (_data) {
|
|
14
|
+
return _data === null || _data === void 0 ? void 0 : _data.success;
|
|
15
|
+
};
|
|
16
|
+
if (isSuccess(res)) {
|
|
17
|
+
resolve(res);
|
|
18
|
+
// 延迟 * 秒清除, 保证时效性
|
|
19
|
+
if (typeof options.cacheTime === "number") {
|
|
20
|
+
setTimeout(function () {
|
|
21
|
+
singletonMap.delete(options.key);
|
|
22
|
+
}, options.cacheTime);
|
|
23
|
+
}
|
|
24
|
+
} else {
|
|
25
|
+
doReject(res);
|
|
26
|
+
}
|
|
27
|
+
}).catch(doReject);
|
|
28
|
+
});
|
|
29
|
+
singletonMap.set(options.key, p);
|
|
30
|
+
allCacheMap.set(options.name, singletonMap);
|
|
31
|
+
return p;
|
|
32
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
interface ColumnsConfigI {
|
|
2
|
+
show: boolean;
|
|
3
|
+
delete: boolean;
|
|
4
|
+
width: number;
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
config?: any;
|
|
9
|
+
searchFixedFields?: Array<string>;
|
|
10
|
+
templateConfig?: any;
|
|
11
|
+
templateConfigList?: any[];
|
|
12
|
+
}
|
|
13
|
+
export declare const queryColumns: (params: {
|
|
14
|
+
templateId: string;
|
|
15
|
+
nodeId: string;
|
|
16
|
+
flowTemplateKey: string;
|
|
17
|
+
}) => Promise<import("../../request").serverProps<{
|
|
18
|
+
fixedColumns: ColumnsConfigI[];
|
|
19
|
+
nonFixedColumns: ColumnsConfigI[];
|
|
20
|
+
}>>;
|
|
21
|
+
/**
|
|
22
|
+
* @description: 获取发布流程详情
|
|
23
|
+
*/
|
|
24
|
+
export declare const getPublishFlowDetail: (flowTemplateKey: string) => Promise<import("../../request").serverProps<any>>;
|
|
25
|
+
/**
|
|
26
|
+
* @description: 获取模版详情
|
|
27
|
+
*/
|
|
28
|
+
export declare const queryTemplateDetail: (uniqueKey: string) => Promise<import("../../request").serverProps<any>>;
|
|
29
|
+
/**
|
|
30
|
+
* @description: 获取模版列表详情
|
|
31
|
+
*/
|
|
32
|
+
export declare const getTemplateDetailList: (templateUniqueKeyList: string[]) => Promise<import("../../request").serverProps<any>>;
|
|
33
|
+
/**
|
|
34
|
+
* @description: 获取模版列头配置
|
|
35
|
+
*/
|
|
36
|
+
export declare const queryColumnsConfig: (params: {
|
|
37
|
+
flowTemplateKey: string;
|
|
38
|
+
isGroupNode: boolean;
|
|
39
|
+
nodeId: string;
|
|
40
|
+
templateId: string;
|
|
41
|
+
}) => Promise<import("../../request").serverProps<any>>;
|
|
42
|
+
/**
|
|
43
|
+
* @description: 获取流程数据
|
|
44
|
+
*/
|
|
45
|
+
export declare const queryWorkOrderList: (params: any) => Promise<import("../../request").serverProps<any>>;
|
|
46
|
+
/**
|
|
47
|
+
* @description: 获取店铺列表
|
|
48
|
+
*/
|
|
49
|
+
export declare const queryShopList: () => Promise<import("../../request").serverProps<any>>;
|
|
50
|
+
/**
|
|
51
|
+
* @description: 获取账号列表
|
|
52
|
+
*/
|
|
53
|
+
export declare const queryCompanyUserSimpleInfoList: () => Promise<import("../../request").serverProps<any>>;
|
|
54
|
+
/**
|
|
55
|
+
* @description: 获取group列表
|
|
56
|
+
*/
|
|
57
|
+
export declare const getGroupList: () => Promise<import("../../request").serverProps<any>>;
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import request from "../../request";
|
|
2
|
+
export var queryColumns = function queryColumns(params) {
|
|
3
|
+
return request({
|
|
4
|
+
url: "/qy/column/header/queryConfig/admin",
|
|
5
|
+
method: "post",
|
|
6
|
+
data: params
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @description: 获取发布流程详情
|
|
12
|
+
*/
|
|
13
|
+
export var getPublishFlowDetail = function getPublishFlowDetail(flowTemplateKey) {
|
|
14
|
+
return request({
|
|
15
|
+
url: "/qy/flow/publish/template/detail",
|
|
16
|
+
method: "get",
|
|
17
|
+
data: {
|
|
18
|
+
flowTemplateKey: flowTemplateKey
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @description: 获取模版详情
|
|
25
|
+
*/
|
|
26
|
+
export var queryTemplateDetail = function queryTemplateDetail(uniqueKey) {
|
|
27
|
+
return request({
|
|
28
|
+
url: "/qy/gdfw/template/queryTemplateDetail",
|
|
29
|
+
method: "post",
|
|
30
|
+
data: {
|
|
31
|
+
uniqueKey: uniqueKey,
|
|
32
|
+
apiName: "queryTemplateDetail",
|
|
33
|
+
templateType: "QY_CUSTOM"
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @description: 获取模版列表详情
|
|
40
|
+
*/
|
|
41
|
+
export var getTemplateDetailList = function getTemplateDetailList(templateUniqueKeyList) {
|
|
42
|
+
return request({
|
|
43
|
+
url: "/qy/gdfw/template/listTemplateDetail",
|
|
44
|
+
method: "post",
|
|
45
|
+
data: {
|
|
46
|
+
templateUniqueKeyList: templateUniqueKeyList
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @description: 获取模版列头配置
|
|
53
|
+
*/
|
|
54
|
+
export var queryColumnsConfig = function queryColumnsConfig(params) {
|
|
55
|
+
return request({
|
|
56
|
+
url: "/qy/column/header/queryConfig",
|
|
57
|
+
method: "post",
|
|
58
|
+
data: params
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @description: 获取流程数据
|
|
64
|
+
*/
|
|
65
|
+
export var queryWorkOrderList = function queryWorkOrderList(params) {
|
|
66
|
+
return request({
|
|
67
|
+
url: "/qy/view/workOrderPopList",
|
|
68
|
+
method: "post",
|
|
69
|
+
data: params
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @description: 获取店铺列表
|
|
75
|
+
*/
|
|
76
|
+
export var queryShopList = function queryShopList() {
|
|
77
|
+
return request({
|
|
78
|
+
url: "/qy/shop/listShop",
|
|
79
|
+
method: "post",
|
|
80
|
+
data: {
|
|
81
|
+
apiName: "listShop"
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @description: 获取账号列表
|
|
88
|
+
*/
|
|
89
|
+
export var queryCompanyUserSimpleInfoList = function queryCompanyUserSimpleInfoList() {
|
|
90
|
+
return request({
|
|
91
|
+
url: "/qy/gdfw/company/queryCompanyUserSimpleInfoList",
|
|
92
|
+
method: "post",
|
|
93
|
+
data: {}
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @description: 获取group列表
|
|
99
|
+
*/
|
|
100
|
+
export var getGroupList = function getGroupList() {
|
|
101
|
+
return request({
|
|
102
|
+
url: "/qy/user/group/listAll",
|
|
103
|
+
method: "get",
|
|
104
|
+
data: {}
|
|
105
|
+
});
|
|
106
|
+
};
|
|
@@ -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 } from "../servers/index";
|
|
11
|
+
import { BSE3, WDT, KM, GY, JST, JY } from "../servers/index";
|
|
12
12
|
var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
|
|
13
13
|
var _this = this;
|
|
14
14
|
_classCallCheck(this, SendData);
|
|
@@ -58,7 +58,8 @@ var SendData = /*#__PURE__*/_createClass(function SendData(platform) {
|
|
|
58
58
|
wdt: WDT,
|
|
59
59
|
km: KM,
|
|
60
60
|
gy: GY,
|
|
61
|
-
jst: JST
|
|
61
|
+
jst: JST,
|
|
62
|
+
jy: JY
|
|
62
63
|
}[this.platform];
|
|
63
64
|
});
|
|
64
65
|
export var SendDataCenter = /*#__PURE__*/function () {
|
|
@@ -74,6 +75,7 @@ export var SendDataCenter = /*#__PURE__*/function () {
|
|
|
74
75
|
if (platform === "KM_SEND_GOOD") platform = "km";
|
|
75
76
|
if (platform === "GY_SEND_GOOD") platform = "gy";
|
|
76
77
|
if (platform === "JST_SEND_GOOD") platform = "jst";
|
|
78
|
+
if (platform === "JY_SEND_GOOD") platform = "jy";
|
|
77
79
|
if (!this.instanceMap.has(platform)) {
|
|
78
80
|
this.instanceMap.set(platform, new SendData(platform));
|
|
79
81
|
}
|