@kmkf-fe-packages/kmkf-utils 2.0.54-beta.9 → 2.0.54-beta.94

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.
Files changed (43) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/baseAddressData/baseAddressData.js +1 -1
  3. package/dist/esm/index.d.ts +1 -0
  4. package/dist/esm/index.js +2 -1
  5. package/dist/esm/servers/GY/index.d.ts +1 -0
  6. package/dist/esm/servers/GY/index.js +2 -1
  7. package/dist/esm/servers/GY/tradePaymentData.d.ts +6 -0
  8. package/dist/esm/servers/GY/tradePaymentData.js +37 -0
  9. package/dist/esm/servers/KM/index.d.ts +1 -0
  10. package/dist/esm/servers/KM/index.js +2 -1
  11. package/dist/esm/servers/KM/video.d.ts +7 -0
  12. package/dist/esm/servers/KM/video.js +26 -0
  13. package/dist/esm/servers/WDT/index.d.ts +3 -1
  14. package/dist/esm/servers/WDT/index.js +3 -1
  15. package/dist/esm/servers/WDT/shopData.d.ts +7 -0
  16. package/dist/esm/servers/WDT/shopData.js +32 -0
  17. package/dist/esm/servers/WDT/tags.d.ts +6 -0
  18. package/dist/esm/servers/WDT/tags.js +37 -0
  19. package/dist/esm/servers/constants.d.ts +1 -0
  20. package/dist/esm/servers/constants.js +12 -0
  21. package/dist/esm/servers/index.d.ts +1 -0
  22. package/dist/esm/servers/index.js +1 -0
  23. package/dist/esm/setSessionStorage/cacheOrderInfo.js +9 -9
  24. package/dist/esm/utils/WdtShopData.d.ts +15 -0
  25. package/dist/esm/utils/WdtShopData.js +49 -0
  26. package/dist/esm/utils/bsE3OrderBackFormValues.js +18 -9
  27. package/dist/esm/utils/bsOrderBackFormValues.d.ts +1 -1
  28. package/dist/esm/utils/bsOrderBackFormValues.js +5 -3
  29. package/dist/esm/utils/gyOrderBackFormValues.d.ts +1 -0
  30. package/dist/esm/utils/gyOrderBackFormValues.js +58 -32
  31. package/dist/esm/utils/index.d.ts +2 -2
  32. package/dist/esm/utils/index.js +2 -2
  33. package/dist/esm/utils/jstOrderBackFormValues.d.ts +2 -0
  34. package/dist/esm/utils/jstOrderBackFormValues.js +37 -19
  35. package/dist/esm/utils/kmOrderBackFormValues.d.ts +18 -0
  36. package/dist/esm/utils/kmOrderBackFormValues.js +178 -4
  37. package/dist/esm/utils/orderBackFormValues.d.ts +2 -1
  38. package/dist/esm/utils/orderBackFormValues.js +19 -15
  39. package/dist/esm/utils/pushGyLog.js +6 -12
  40. package/dist/esm/utils/unTransField.js +1 -1
  41. package/dist/esm/utils/wdtOrderBackFormValues.d.ts +2 -0
  42. package/dist/esm/utils/wdtOrderBackFormValues.js +95 -15
  43. package/package.json +2 -2
package/README.md CHANGED
@@ -1 +1 @@
1
- 1123111
1
+ 1123111111
@@ -53,7 +53,7 @@ var BaseAddressData = /*#__PURE__*/function () {
53
53
  } finally {
54
54
  _iterator.f();
55
55
  }
56
- return codes;
56
+ return codes.filter(Boolean);
57
57
  }
58
58
  }]);
59
59
  return BaseAddressData;
@@ -10,3 +10,4 @@ export * from "./baseAddressData";
10
10
  export * from "./utils";
11
11
  export * from "./constants";
12
12
  export { SendDataCenter } from "./utils/SendData";
13
+ export { WdtShopDataCenter } from "./utils/WdtShopData";
package/dist/esm/index.js CHANGED
@@ -10,4 +10,5 @@ export { _servers as servers };
10
10
  export * from "./baseAddressData";
11
11
  export * from "./utils";
12
12
  export * from "./constants";
13
- export { SendDataCenter } from "./utils/SendData";
13
+ export { SendDataCenter } from "./utils/SendData";
14
+ export { WdtShopDataCenter } from "./utils/WdtShopData";
@@ -1,2 +1,3 @@
1
1
  export * from "./warehouseData";
2
2
  export * from "./logisticsData";
3
+ export * from "./tradePaymentData";
@@ -1,2 +1,3 @@
1
1
  export * from "./warehouseData";
2
- export * from "./logisticsData";
2
+ export * from "./logisticsData";
3
+ export * from "./tradePaymentData";
@@ -0,0 +1,6 @@
1
+ export declare type TradePaymentType = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ export declare const getTradePaymentDataAsync: () => Promise<TradePaymentType[]>;
6
+ export default getTradePaymentDataAsync;
@@ -0,0 +1,37 @@
1
+ import { fetchAll } from "../../utils";
2
+ import request from "../../request";
3
+ var queryTradePaymentList = function queryTradePaymentList(_ref) {
4
+ var pageNo = _ref.pageNo,
5
+ pageSize = _ref.pageSize;
6
+ return request({
7
+ url: "/qy/gdfw/gy/erp/getPaymentList",
8
+ // url: "/qy/gdfw/gy/erp/getTradePayment",
9
+ method: "post",
10
+ data: {
11
+ pageNo: pageNo,
12
+ pageSize: pageSize,
13
+ hasDeletedData: true
14
+ }
15
+ });
16
+ };
17
+ export var getTradePaymentDataAsync = function getTradePaymentDataAsync() {
18
+ return fetchAll("GY_TRADE_PAYMENT_DATA", queryTradePaymentList, function (data) {
19
+ var list = [];
20
+ var paymentList = data || [];
21
+ paymentList.map(function (_ref2) {
22
+ var code = _ref2.code,
23
+ name = _ref2.name;
24
+ list.push({
25
+ label: name,
26
+ value: code
27
+ });
28
+ });
29
+ var valueMap = {};
30
+ list.forEach(function (item) {
31
+ valueMap[item.value] = item; // 每次遇到相同的 code,更新为最新的对象
32
+ });
33
+
34
+ return Object.values(valueMap);
35
+ });
36
+ };
37
+ export default getTradePaymentDataAsync;
@@ -1,2 +1,3 @@
1
1
  export * from "./warehouseData";
2
2
  export * from "./logisticsData";
3
+ export * from "./video";
@@ -1,2 +1,3 @@
1
1
  export * from "./warehouseData";
2
- export * from "./logisticsData";
2
+ export * from "./logisticsData";
3
+ export * from "./video";
@@ -0,0 +1,7 @@
1
+ declare type Params = {
2
+ afterSaleOrderNumber?: string;
3
+ platformOrderNumber?: string;
4
+ outSid?: string;
5
+ };
6
+ export declare const getVideoDataAsync: (params: Params) => Promise<any>;
7
+ export default getVideoDataAsync;
@@ -0,0 +1,26 @@
1
+ import request from "../../request";
2
+ var queryVideoList = function queryVideoList(params) {
3
+ return request({
4
+ url: "/qy/gdfw/kmErp/erp/queryVideoList",
5
+ method: "post",
6
+ data: params
7
+ });
8
+ };
9
+ export var getVideoDataAsync = function getVideoDataAsync(params) {
10
+ return queryVideoList(params).then(function (res) {
11
+ if (res !== null && res !== void 0 && res.data && Array.isArray(res.data) && res.data.length > 0) {
12
+ //过滤没有返回视频地址的数据
13
+ return res.data.filter(function (item) {
14
+ return !!item.videoInfo;
15
+ }).map(function (item) {
16
+ return {
17
+ kmVideoUrl: item.videoInfo,
18
+ kmVideoName: item.videoInfo,
19
+ kmVideoType: item.operateType
20
+ };
21
+ });
22
+ }
23
+ return [];
24
+ });
25
+ };
26
+ export default getVideoDataAsync;
@@ -1 +1,3 @@
1
- export * from './warehouseData';
1
+ export * from "./warehouseData";
2
+ export * from "./shopData";
3
+ export * from "./tags";
@@ -1 +1,3 @@
1
- export * from "./warehouseData";
1
+ export * from "./warehouseData";
2
+ export * from "./shopData";
3
+ export * from "./tags";
@@ -0,0 +1,7 @@
1
+ declare type ShopType = {
2
+ disabled: boolean;
3
+ label: string;
4
+ value: string;
5
+ };
6
+ export declare const getShopDataAsync: () => Promise<ShopType[]>;
7
+ export default getShopDataAsync;
@@ -0,0 +1,32 @@
1
+ import { fetchAll } from "../../utils";
2
+ import request from "../../request";
3
+ var queryShopList = function queryShopList(_ref) {
4
+ var pageNo = _ref.pageNo,
5
+ pageSize = _ref.pageSize;
6
+ return request({
7
+ url: "/qy/gdfw/wdt/erp/shop/list",
8
+ method: "post",
9
+ data: {
10
+ pageNo: pageNo,
11
+ pageSize: pageSize
12
+ }
13
+ });
14
+ };
15
+ export var getShopDataAsync = function getShopDataAsync() {
16
+ return fetchAll("WDT_SHOP_DATA", queryShopList, function (data) {
17
+ var list = [];
18
+ var shops = (data === null || data === void 0 ? void 0 : data.shopList) || [];
19
+ shops.map(function (_ref2) {
20
+ var shopNo = _ref2.shopNo,
21
+ shopName = _ref2.shopName,
22
+ isDisabled = _ref2.isDisabled;
23
+ list.push({
24
+ label: shopName,
25
+ value: shopNo,
26
+ disabled: isDisabled
27
+ });
28
+ });
29
+ return list;
30
+ });
31
+ };
32
+ export default getShopDataAsync;
@@ -0,0 +1,6 @@
1
+ export declare type TagsType = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ export declare const getTagsDataAsync: () => Promise<TagsType[]>;
6
+ export default getTagsDataAsync;
@@ -0,0 +1,37 @@
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 { fetchAll } from "../../utils";
8
+ import request from "../../request";
9
+ var queryTagsList = function queryTagsList(_ref) {
10
+ var pageNo = _ref.pageNo,
11
+ pageSize = _ref.pageSize;
12
+ return request({
13
+ url: "/qy/gdfw/wdt/erp/trade/label/list",
14
+ method: "post",
15
+ data: {
16
+ pageNo: pageNo,
17
+ pageSize: pageSize
18
+ }
19
+ });
20
+ };
21
+ export var getTagsDataAsync = function getTagsDataAsync() {
22
+ return fetchAll("WDT_TAGS_DATA", queryTagsList, function (data) {
23
+ var _ref2 = data || {},
24
+ tags = _ref2.tags;
25
+ if (!tags) return [];
26
+ return tags.filter(function (item) {
27
+ return !!item.tagName;
28
+ }).map(function (item) {
29
+ return _objectSpread(_objectSpread({}, item), {}, {
30
+ label: item.tagName,
31
+ value: item.tagName,
32
+ disabled: !!item.isDisabled
33
+ });
34
+ });
35
+ });
36
+ };
37
+ export default getTagsDataAsync;
@@ -0,0 +1 @@
1
+ export declare const orderDetail: (data: any, infoLevel?: "error" | "warning" | "quiet") => Promise<any>;
@@ -0,0 +1,12 @@
1
+ import request from "../request";
2
+
3
+ //订单详情
4
+ export var orderDetail = function orderDetail(data) {
5
+ var infoLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "warning";
6
+ return request({
7
+ url: "/qy/gdfw/order/orderDetail",
8
+ method: "post",
9
+ data: data,
10
+ infoLevel: infoLevel
11
+ });
12
+ };
@@ -5,6 +5,7 @@ export * as KM from "./KM";
5
5
  export * as GY from "./GY";
6
6
  export * as JST from "./JST";
7
7
  export * as WLN from "./WLN";
8
+ export * from "./constants";
8
9
  export declare const queryWdtAddressData: (instance?: WdtAddressData) => Promise<void>;
9
10
  export declare const queryGyAddressData: (instance?: GyAddressData) => Promise<void>;
10
11
  export declare const queryAddressData: (instance?: AddressData) => Promise<void>;
@@ -14,6 +14,7 @@ import * as _JST from "./JST";
14
14
  export { _JST as JST };
15
15
  import * as _WLN from "./WLN";
16
16
  export { _WLN as WLN };
17
+ export * from "./constants";
17
18
  var transformData = function transformData(list) {
18
19
  var map = {};
19
20
  var res = {};
@@ -7,10 +7,10 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
7
7
  export var setCacheOmsOrderInfo = function setCacheOmsOrderInfo(_ref) {
8
8
  var itemKey = _ref.itemKey,
9
9
  itemValue = _ref.itemValue;
10
- console.log("触发--setCacheOmsOrderInfo", {
11
- itemKey: itemKey,
12
- itemValue: itemValue
13
- });
10
+ // console.log("触发--setCacheOmsOrderInfo", {
11
+ // itemKey,
12
+ // itemValue,
13
+ // });
14
14
  var cacheOmsOrderInfo = JSON.parse(sessionStorage.getItem("cacheOmsOrderInfo") || "{}");
15
15
  sessionStorage.setItem("cacheOmsOrderInfo", JSON.stringify(_objectSpread(_objectSpread({}, cacheOmsOrderInfo), {}, _defineProperty({}, itemKey, itemValue))));
16
16
  };
@@ -18,11 +18,11 @@ export var setCacheOrderInfo = function setCacheOrderInfo(_ref2) {
18
18
  var itemKey = _ref2.itemKey,
19
19
  itemValue = _ref2.itemValue,
20
20
  ext = _ref2.ext;
21
- console.log("触发--setCacheOrderInfo", {
22
- itemKey: itemKey,
23
- itemValue: itemValue,
24
- ext: ext
25
- });
21
+ // console.log("触发--setCacheOrderInfo", {
22
+ // itemKey,
23
+ // itemValue,
24
+ // ext,
25
+ // });
26
26
  var cacheOrderInfo = JSON.parse(sessionStorage.getItem("cacheOrderInfo") || "{}");
27
27
  sessionStorage.setItem("cacheOrderInfo", JSON.stringify(_objectSpread(_objectSpread(_objectSpread({}, cacheOrderInfo), ext !== null && ext !== void 0 ? ext : {}), {}, _defineProperty({}, itemKey, itemValue))));
28
28
  };
@@ -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 WdtShopDataCenter {
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 { WDT } 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 WDT.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 WdtShopDataCenter = /*#__PURE__*/function () {
39
+ function WdtShopDataCenter() {
40
+ _classCallCheck(this, WdtShopDataCenter);
41
+ }
42
+ _createClass(WdtShopDataCenter, null, [{
43
+ key: "getInstance",
44
+ value: function getInstance() {
45
+ return instance;
46
+ }
47
+ }]);
48
+ return WdtShopDataCenter;
49
+ }();
@@ -11,6 +11,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
11
11
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
12
  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); }
13
13
  import uuid from "./getUUid";
14
+ import isNull from "./isNull";
14
15
  export var BS_E3_SYSTEM_ORDER_CONFIG = {
15
16
  key: "bsE3SystemShowOrder",
16
17
  name: "百胜",
@@ -296,12 +297,15 @@ export var bsE3OrderBackFormValues = function bsE3OrderBackFormValues() {
296
297
  // prv[uniqueKey] = detail?.bsExchangeGoods;
297
298
  // break;
298
299
  case "BS_E3_REISSUE_GOODS":
299
- prv[uniqueKey] = {
300
- bsE3SystemOrder: detail === null || detail === void 0 ? void 0 : detail.bsE3SystemOrder,
301
- bsE3SystemOrderNo: detail === null || detail === void 0 ? void 0 : detail.bsE3SystemOrderNo,
302
- bsE3ReissueType: ["1"],
303
- bsE3ReissueGoods: (detail === null || detail === void 0 ? void 0 : detail.bsE3ReissueGoods) || []
304
- };
300
+ {
301
+ var initReason = !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? config.initReason : "1";
302
+ prv[uniqueKey] = {
303
+ bsE3SystemOrder: detail === null || detail === void 0 ? void 0 : detail.bsE3SystemOrder,
304
+ bsE3SystemOrderNo: detail === null || detail === void 0 ? void 0 : detail.bsE3SystemOrderNo,
305
+ bsE3ReissueType: [initReason],
306
+ bsE3ReissueGoods: initReason === "2" ? [] : (detail === null || detail === void 0 ? void 0 : detail.bsE3ReissueGoods) || []
307
+ };
308
+ }
305
309
  break;
306
310
  // case "BS_RETURN_GOODS":
307
311
  // prv[uniqueKey] = detail?.bsReturnGoods;
@@ -372,7 +376,7 @@ export var bsE3OrderBackFormValues = function bsE3OrderBackFormValues() {
372
376
  };
373
377
  //bsE3订单信息转换
374
378
  export var bsE3OrderTransform = function bsE3OrderTransform(detail, form) {
375
- var _form$getFieldValue, _newOrderList$, _orderList$find, _orderList$find$call;
379
+ var _form$getFieldValue, _bsE3ReissueCom$compo, _newOrderList$, _orderList$find, _orderList$find$call;
376
380
  var orderNo = detail.orderNo,
377
381
  _detail$orderList = detail.orderList,
378
382
  orderList = _detail$orderList === void 0 ? [] : _detail$orderList,
@@ -380,6 +384,9 @@ export var bsE3OrderTransform = function bsE3OrderTransform(detail, form) {
380
384
  var bsE3GoodsCom = (componentList || []).find(function (com) {
381
385
  return com.workOrderComponentType === "BS_E3_GOODS";
382
386
  });
387
+ var bsE3ReissueCom = (componentList || []).find(function (com) {
388
+ return com.workOrderComponentType === "BS_E3_REISSUE_GOODS";
389
+ });
383
390
  var isStrict = bsE3GoodsCom ? (_form$getFieldValue = form.getFieldValue(bsE3GoodsCom.uniqueKey)) === null || _form$getFieldValue === void 0 ? void 0 : _form$getFieldValue.isStrict : false;
384
391
  var newOrderList = orderList === null || orderList === void 0 ? void 0 : orderList.map(function (item) {
385
392
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -387,6 +394,8 @@ export var bsE3OrderTransform = function bsE3OrderTransform(detail, form) {
387
394
  });
388
395
  });
389
396
  var onlyOneSystemOrder = (newOrderList === null || newOrderList === void 0 ? void 0 : newOrderList.length) === 1;
397
+ var isReissueDefaultSelect = !!(bsE3ReissueCom !== null && bsE3ReissueCom !== void 0 && (_bsE3ReissueCom$compo = bsE3ReissueCom.componentConfig) !== null && _bsE3ReissueCom$compo !== void 0 && _bsE3ReissueCom$compo.showDefaultSelect);
398
+ var defaultOrder = newOrderList !== null && newOrderList !== void 0 && newOrderList[0] ? [newOrderList[0]] : [];
390
399
  return {
391
400
  bsE3SystemOrder: {
392
401
  orderNo: orderNo,
@@ -397,8 +406,8 @@ export var bsE3OrderTransform = function bsE3OrderTransform(detail, form) {
397
406
  showOrderInfo: newOrderList
398
407
  },
399
408
  // TODO: 当只有一条系统单时默认选中该系统单
400
- bsE3SystemOrderNo: onlyOneSystemOrder ? (_newOrderList$ = newOrderList[0]) === null || _newOrderList$ === void 0 ? void 0 : _newOrderList$.billNo : undefined,
401
- bsE3ReissueGoods: onlyOneSystemOrder ? updateBsE3GoodsHandle([newOrderList[0]], 'sharePrice').filter(function (good) {
409
+ bsE3SystemOrderNo: onlyOneSystemOrder || isReissueDefaultSelect ? (_newOrderList$ = newOrderList[0]) === null || _newOrderList$ === void 0 ? void 0 : _newOrderList$.billNo : undefined,
410
+ bsE3ReissueGoods: onlyOneSystemOrder || isReissueDefaultSelect ? updateBsE3GoodsHandle(defaultOrder, "sharePrice").filter(function (good) {
402
411
  return !isStrict || !orderNo || good.originalDealCode === orderNo;
403
412
  }) : [],
404
413
  bsE3Goods: {
@@ -9,7 +9,7 @@ export declare const BS_SYSTEM_ORDER_CONFIG: {
9
9
  }[];
10
10
  };
11
11
  export declare const bsOrderBackFormValues: (detail?: any, templateDetail?: any) => any;
12
- export declare const bsOrderTransform: (detail: any) => {
12
+ export declare const bsOrderTransform: ({ detail }: any) => {
13
13
  bsSystemOrder: {
14
14
  orderNo: any;
15
15
  orders: any;
@@ -282,9 +282,11 @@ export var bsOrderBackFormValues = function bsOrderBackFormValues() {
282
282
  return prv;
283
283
  }, {});
284
284
  };
285
+
285
286
  //bs订单信息转换
286
- export var bsOrderTransform = function bsOrderTransform(detail) {
287
- var _detail$orders, _detail$orders$, _detail$orders$$advan, _detail$orders2, _ref, _detail$orders3, _detail$orders3$, _detail$orders3$$adva, _detail$orders3$$adva2;
287
+ export var bsOrderTransform = function bsOrderTransform(_ref) {
288
+ var _detail$orders, _detail$orders$, _detail$orders$$advan, _detail$orders2, _ref2, _detail$orders3, _detail$orders3$, _detail$orders3$$adva, _detail$orders3$$adva2;
289
+ var detail = _ref.detail;
288
290
  var advItem = (detail === null || detail === void 0 ? void 0 : (_detail$orders = detail.orders) === null || _detail$orders === void 0 ? void 0 : (_detail$orders$ = _detail$orders[0]) === null || _detail$orders$ === void 0 ? void 0 : (_detail$orders$$advan = _detail$orders$.advancedDistributionInfos) === null || _detail$orders$$advan === void 0 ? void 0 : _detail$orders$$advan[0]) || {};
289
291
  return {
290
292
  bsSystemOrder: {
@@ -293,7 +295,7 @@ export var bsOrderTransform = function bsOrderTransform(detail) {
293
295
  selectIds: (detail === null || detail === void 0 ? void 0 : (_detail$orders2 = detail.orders) === null || _detail$orders2 === void 0 ? void 0 : _detail$orders2.length) === 1 ? detail === null || detail === void 0 ? void 0 : detail.orders.map(function (item) {
294
296
  return item.billNo;
295
297
  }) : [],
296
- showOrderInfo: (_ref = (detail === null || detail === void 0 ? void 0 : detail.orders) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
298
+ showOrderInfo: (_ref2 = (detail === null || detail === void 0 ? void 0 : detail.orders) || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (item) {
297
299
  return {
298
300
  billNo: item.billNo,
299
301
  billType: item.billType,
@@ -20,6 +20,7 @@ export declare const gyOrderTransform: (detail: any, form: any) => {
20
20
  selectIds: any;
21
21
  showOrderInfo: any;
22
22
  };
23
+ gyReturnSystemOrderNo: any;
23
24
  gySystemOrderNo: any;
24
25
  gyReissueGoods: any;
25
26
  gyReturnGoods: any;