@kmkf-fe-packages/kmkf-work-order-service-component 2.2.25 → 2.2.27

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.
@@ -2,9 +2,21 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2
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
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
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
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
14
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
15
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
16
  import { message } from 'antd';
6
17
  var globalResolveMap = new Map();
7
18
  window.replyTradeInfo = function (res) {
19
+ console.debug("in replyTradeInfo res:", res);
8
20
  var jsonRes = JSON.parse(res);
9
21
  if (jsonRes.reqId && globalResolveMap.has(jsonRes.reqId)) {
10
22
  var _globalResolveMap$get;
@@ -130,33 +142,132 @@ var getTradeInfoByBuyerId = function getTradeInfoByBuyerId(buyerId) {
130
142
  code: -1,
131
143
  msg: '请检查当前环境是否属于小智面板'
132
144
  });
133
- var reqId = "".concat(Date.now(), "_").concat(buyerId);
134
145
  setTimeout(function () {
135
146
  reject(new Error('window.invokerSDK执行超时,未调用回调函数'));
136
147
  }, 30000);
137
- // getTradeInfo 同步回调不再执行, 所以默认记录reqId
138
- globalResolveMap.set(reqId, resolve);
139
- window.invokerSDK(jsonToBase64({
140
- cmd: 'getTradeInfo',
141
- param: {
142
- reqId: reqId,
143
- buyerId: buyerId
144
- }
145
- }), function (cmd, res) {
146
- var jsonRes = JSON.parse(res);
147
- if (jsonRes.code === 200) {
148
- // globalResolveMap.set(reqId, resolve);
149
- } else {
150
- reject(jsonRes.msg || jsonRes);
151
- }
152
- });
148
+ var allOrders = [];
149
+ var getOrders = function getOrders() {
150
+ var pageNo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
151
+ var pageSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 40;
152
+ var checkIsGetAll = function checkIsGetAll(res) {
153
+ var _res$data, _res$result;
154
+ var list = 'data' in res ? (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.data) || [] : (res === null || res === void 0 ? void 0 : (_res$result = res.result) === null || _res$result === void 0 ? void 0 : _res$result.orders) || [];
155
+ allOrders.push.apply(allOrders, _toConsumableArray(list));
156
+ if (list.length < pageSize || 'result' in res && res.result.pageNo !== pageNo || 'data' in res && (!res.data.totalSize || res.data.totalSize <= allOrders.length)) {
157
+ if ('data' in res) {
158
+ resolve(_objectSpread(_objectSpread({}, res), {}, {
159
+ data: _objectSpread(_objectSpread({}, res.data), {}, {
160
+ data: allOrders
161
+ })
162
+ }));
163
+ } else {
164
+ resolve(_objectSpread(_objectSpread({}, res), {}, {
165
+ result: _objectSpread(_objectSpread({}, res.result), {}, {
166
+ orders: allOrders
167
+ })
168
+ }));
169
+ }
170
+ } else {
171
+ getOrders(pageNo + 1, pageSize);
172
+ }
173
+ };
174
+ if (!window.invokerSDK) return reject({
175
+ code: -1,
176
+ msg: '请检查当前环境是否属于小智面板'
177
+ });
178
+ var reqId = "".concat(Date.now(), "_").concat(buyerId);
179
+ // getTradeInfo 同步回调不再执行, 所以默认记录reqId
180
+ globalResolveMap.set(reqId, checkIsGetAll);
181
+ window.invokerSDK(jsonToBase64({
182
+ cmd: 'getTradeInfo',
183
+ param: {
184
+ reqId: reqId,
185
+ buyerId: buyerId,
186
+ ext: {
187
+ pageNo: pageNo,
188
+ // 可选 分页从1开始
189
+ pageSize: pageSize // 可选
190
+ }
191
+ }
192
+ }), function (cmd, res) {
193
+ var jsonRes = JSON.parse(res);
194
+ if (jsonRes.code === 200) {
195
+ // globalResolveMap.set(reqId, resolve);
196
+ } else {
197
+ reject(jsonRes.msg || jsonRes);
198
+ }
199
+ });
200
+ };
201
+ getOrders();
153
202
  } catch (e) {
154
203
  reject(e);
155
204
  }
156
205
  });
157
206
  };
158
207
  var transformTardeInfo = function transformTardeInfo(buyer, tradeInfo) {
208
+ console.debug("***** \u6570\u636E\u8F6C\u6362 *****", tradeInfo);
159
209
  if (!tradeInfo) return;
210
+ if ('orderSn' in tradeInfo) {
211
+ var _tradeInfo$tagType;
212
+ var trade = tradeInfo.orderGoodsList || {};
213
+ var flagType = ((_tradeInfo$tagType = tradeInfo.tagType) === null || _tradeInfo$tagType === void 0 ? void 0 : _tradeInfo$tagType.toLowerCase()) || '';
214
+ var flag = ['gray', 'red', 'yellow', 'green', 'blue', 'purple'].findIndex(function (item) {
215
+ return item === flagType;
216
+ });
217
+ return {
218
+ // TRADE_ID_INPUT
219
+ orderNo: tradeInfo.orderSn,
220
+ // BUYER_NICK_INPUT 买家昵称
221
+ buyerNick: buyer.buyerNick,
222
+ buyerOpenUid: buyer.buyerId,
223
+ // // ERP_ORDER_STATUS 这个值和后端接口拿到的不一致,所以不反填了
224
+ // statusDesc: tradeInfo.orderStatusStr,
225
+ // RECEIVER_NAME_INPUT 收件人姓名
226
+ // RECEIVER_MOBILE_INPUT 收件人手机号
227
+ // RECEIVER_ADDRESS_INPUT 收货地址
228
+ // TRADE_CREATE_DATETIME 下单时间
229
+ orderCreateDateTime: tradeInfo.createdAt ? tradeInfo.createdAt * 1000 : '',
230
+ // TRADE_PAYMENT_DATETIME 付款时间
231
+ orderPaymentDateTime: tradeInfo.payTime ? tradeInfo.payTime * 1000 : '',
232
+ // TRADE_DELIVERY_DATETIME 发货时间
233
+ // TRADE_CLOSING_DATETIME 成交时间
234
+ // ACTUAL_PAYMENT 实付金额
235
+ // actualPayment: tradeInfo.goodsAmount ? tradeInfo.goodsAmount / 100 : undefined, // 是否就是实付
236
+ // ACTUAL_RECEIPT_PAYMENT 实收金额
237
+ actualReceiptPayment: tradeInfo.orderAmount ? tradeInfo.orderAmount / 100 : undefined,
238
+ // EXPRESS_LOGISTICS_SELECT 快递物流
239
+ expressLogisticsCode: tradeInfo.trackingNumber,
240
+ // RETURN_LOGISTICS_SELECT 退货物流
241
+ // ALI_PAY_INPUT 支付宝
242
+
243
+ // ITEM_SELECT/ITEM_ID/ITEM_ENCODE/ITEM_SELECT_THIRD 宝贝类组件
244
+ itemList: [{
245
+ numIid: trade.skuId,
246
+ title: trade.goodsName,
247
+ // picUrl: string,
248
+ price: trade.goodsPrice ? trade.goodsPrice / 100 : undefined,
249
+ platform: 'pdd',
250
+ // outerId: string;
251
+ num: trade.goodsNumber,
252
+ skuInfoDTO: {
253
+ picUrl: trade.thumbUrl,
254
+ price: typeof trade.goodsPrice === 'number' ? trade.goodsPrice / 100 : undefined,
255
+ skuId: trade.skuId,
256
+ propertiesName: trade.spec
257
+ // outerSkuId: number | string;
258
+ // itemId: string;
259
+ // supplierName: string;
260
+ }
261
+ }],
262
+
263
+ // REMARK_INPUT 备注
264
+ remark: tradeInfo.note || '',
265
+ flag: flag >= 0 ? flag : undefined
266
+ // ENTERPRISE_PAYMENT 打款组件 只反填订单号,已经有了
267
+ // LOGISTICS_INTERCEPTION 物流拦截
268
+ };
269
+ }
270
+
160
271
  return {
161
272
  // TRADE_ID_INPUT
162
273
  orderNo: tradeInfo.orderId,
@@ -213,7 +324,7 @@ var getActiveUserTardeInfo = function getActiveUserTardeInfo(orderId) {
213
324
  console.debug('orderId: ', orderId);
214
325
  return getActiveUser().then( /*#__PURE__*/function () {
215
326
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(buyer) {
216
- var _tardes$data;
327
+ var _tardes$data, _tardes$result;
217
328
  var tardes, tradeInfo;
218
329
  return _regeneratorRuntime().wrap(function _callee$(_context) {
219
330
  while (1) switch (_context.prev = _context.next) {
@@ -230,8 +341,8 @@ var getActiveUserTardeInfo = function getActiveUserTardeInfo(orderId) {
230
341
  return getTradeInfoByBuyerId(buyer.buyerId);
231
342
  case 6:
232
343
  tardes = _context.sent;
233
- tradeInfo = ((tardes === null || tardes === void 0 ? void 0 : (_tardes$data = tardes.data) === null || _tardes$data === void 0 ? void 0 : _tardes$data.data) || []).find(function (tarde) {
234
- return orderId === tarde.orderId;
344
+ tradeInfo = (('data' in tardes ? tardes === null || tardes === void 0 ? void 0 : (_tardes$data = tardes.data) === null || _tardes$data === void 0 ? void 0 : _tardes$data.data : tardes === null || tardes === void 0 ? void 0 : (_tardes$result = tardes.result) === null || _tardes$result === void 0 ? void 0 : _tardes$result.orders) || []).find(function (tarde) {
345
+ return 'orderId' in tarde ? orderId === tarde.orderId : orderId === tarde.orderSn;
235
346
  });
236
347
  return _context.abrupt("return", transformTardeInfo(buyer, tradeInfo));
237
348
  case 9:
@@ -251,6 +362,25 @@ var getActiveUserTardeInfo = function getActiveUserTardeInfo(orderId) {
251
362
  }
252
363
  });
253
364
  };
365
+
366
+ // const getActiveUserTardeInfoTest = (orderId: string) => {
367
+ // return new Promise((resolve, reject) => {
368
+ // const tardes = base64ToJson(text) as TradesRes
369
+ // const tradeInfo = (
370
+ // ('data' in tardes ? tardes?.data?.data : tardes?.result?.orders) || []
371
+ // ).find((tarde) => {
372
+ // return 'orderId' in tarde ? orderId === tarde.orderId : orderId === tarde.orderSn ;
373
+ // });
374
+ // resolve(transformTardeInfo({
375
+ // buyerId: "3633810253",
376
+ // buyerNick: "e***",
377
+ // clientType: 3,
378
+ // qnCCode: "",
379
+ // qnPrefix: ""
380
+ // }, tradeInfo))
381
+ // })
382
+ // }
383
+
254
384
  var sendMsgToTab = function sendMsgToTab(dispatch) {
255
385
  return function (msg) {
256
386
  try {
@@ -298,5 +428,6 @@ export default {
298
428
  getActiveUser: getActiveUser,
299
429
  getActiveUserTardeInfo: getActiveUserTardeInfo,
300
430
  getTradeInfoByBuyerId: getTradeInfoByBuyerId,
431
+ // getActiveUserTardeInfoTest,
301
432
  receiveTabMsg: receiveTabMsg
302
433
  };
@@ -40,6 +40,9 @@ export declare const queryMultiNodeAssistantInfo: (data: {
40
40
  name: string;
41
41
  }>;
42
42
  }>>;
43
+ export declare const queryUserGroupList: (data: {
44
+ groupUkList: string[];
45
+ }) => Promise<serverProps<Array<string>>>;
43
46
  export declare const forwardWorkOrder: (data: any) => Promise<serverProps<{
44
47
  failList: Array<{
45
48
  failReason: string;
@@ -106,6 +106,13 @@ export var queryMultiNodeAssistantInfo = function queryMultiNodeAssistantInfo(da
106
106
  data: data
107
107
  });
108
108
  };
109
+ export var queryUserGroupList = function queryUserGroupList(data) {
110
+ return request({
111
+ url: '/qy/user/group/listBelongTheSameGroupUserKeys',
112
+ method: 'post',
113
+ data: data
114
+ });
115
+ };
109
116
 
110
117
  // 转交
111
118
  export var forwardWorkOrder = function forwardWorkOrder(data) {
@@ -42,6 +42,9 @@ export interface FlowTemplateDetailState {
42
42
  assistantMap: {
43
43
  [nodeId: string]: Array<Assistant>;
44
44
  };
45
+ userGroupMap: {
46
+ [nodeId: string]: Array<string>;
47
+ };
45
48
  remarkList: Array<Remark>;
46
49
  currentNode: CurrentNodeDetail;
47
50
  action: ActionType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "2.2.25",
3
+ "version": "2.2.27",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@ant-design/icons": "^4.7.0",
35
- "@kmkf-fe-packages/basic-components": "2.2.25",
36
- "@kmkf-fe-packages/kmkf-utils": "2.2.24",
37
- "@kmkf-fe-packages/services-components": "2.2.25",
35
+ "@kmkf-fe-packages/basic-components": "2.2.27",
36
+ "@kmkf-fe-packages/kmkf-utils": "2.2.27",
37
+ "@kmkf-fe-packages/services-components": "2.2.27",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -74,7 +74,7 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "eb88c3c93e2a120ed15b41688edff56c7faaf043",
77
+ "gitHead": "58f53f4ddc7e22b5d5437bcb14d2d0f211bd6954",
78
78
  "gitHooks": {
79
79
  "pre-commit": "lint-staged"
80
80
  }