@kmkf-fe-packages/kmkf-work-order-service-component 2.0.49 → 2.0.50

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.
@@ -140,15 +140,16 @@ export var orderBack = /*#__PURE__*/function () {
140
140
  console.log('orderBack-run--', callKey);
141
141
  shopId = propsShopid; //如果是pc平台且没有shopId的情况下 获取shopId
142
142
  if (!(order_no && plat.platform === PlatForm.PC && !!(plat !== null && plat !== void 0 && plat.bindERP) && type === 'add')) {
143
- _context.next = 14;
143
+ _context.next = 18;
144
144
  break;
145
145
  }
146
- _context.prev = 4;
147
- _context.next = 7;
146
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
147
+ _context.prev = 5;
148
+ _context.next = 8;
148
149
  return queryShopByTid({
149
150
  tid: order_no
150
151
  });
151
- case 7:
152
+ case 8:
152
153
  res = _context.sent;
153
154
  if (res !== null && res !== void 0 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.shopId) {
154
155
  shopInfo = shopList.find(function (item) {
@@ -166,13 +167,17 @@ export var orderBack = /*#__PURE__*/function () {
166
167
  }
167
168
  }
168
169
  }
169
- _context.next = 14;
170
+ _context.next = 15;
170
171
  break;
171
- case 11:
172
- _context.prev = 11;
173
- _context.t0 = _context["catch"](4);
172
+ case 12:
173
+ _context.prev = 12;
174
+ _context.t0 = _context["catch"](5);
174
175
  console.error(_context.t0);
175
- case 14:
176
+ case 15:
177
+ _context.prev = 15;
178
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
179
+ return _context.finish(15);
180
+ case 18:
176
181
  //是否是对接平台,只有对接平台才能返填订单号
177
182
  JOIN_SHOP = shopList.find(function (item) {
178
183
  return !item.notJoin && item.shopId == shopId;
@@ -188,7 +193,7 @@ export var orderBack = /*#__PURE__*/function () {
188
193
  }).every(function (item) {
189
194
  return item === false;
190
195
  }))) {
191
- _context.next = 19;
196
+ _context.next = 23;
192
197
  break;
193
198
  }
194
199
  //处理店铺映射存在店铺信息却没有返填的问题
@@ -198,12 +203,12 @@ export var orderBack = /*#__PURE__*/function () {
198
203
  });
199
204
  }
200
205
  return _context.abrupt("return");
201
- case 19:
206
+ case 23:
202
207
  _ref3 = shopList.find(function (item) {
203
208
  return item.shopId == shopId;
204
209
  }) || {}, shopSourceStr = _ref3.shopSourceStr, _ref3$thirdUserNick = _ref3.thirdUserNick, thirdUserNick = _ref3$thirdUserNick === void 0 ? '' : _ref3$thirdUserNick, thirdShopMainType = _ref3.thirdShopMainType;
205
210
  setLoading === null || setLoading === void 0 ? void 0 : setLoading(true);
206
- _context.prev = 21;
211
+ _context.prev = 25;
207
212
  promise = [];
208
213
  if (!JOIN_SHOP || thirdShopMainType === '1' && shopSourceStr === 'JD') {
209
214
  promise.push(Promise.resolve([]));
@@ -238,9 +243,9 @@ export var orderBack = /*#__PURE__*/function () {
238
243
  });
239
244
 
240
245
  //需按照orderBackMap中的顺序结构
241
- _context.next = 28;
246
+ _context.next = 32;
242
247
  return Promise.allSettled(promise);
243
- case 28:
248
+ case 32:
244
249
  _yield$Promise$allSet = _context.sent;
245
250
  _yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 9);
246
251
  data = _yield$Promise$allSet2[0];
@@ -431,7 +436,7 @@ export var orderBack = /*#__PURE__*/function () {
431
436
  hasSelectItem = HasErpItemSelectHandle(templateDetail);
432
437
  erpPromiseList = [];
433
438
  if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
434
- _context.next = 93;
439
+ _context.next = 97;
435
440
  break;
436
441
  }
437
442
  list = detail['itemList'];
@@ -449,10 +454,10 @@ export var orderBack = /*#__PURE__*/function () {
449
454
  resolve({});
450
455
  });
451
456
  });
452
- _context.prev = 83;
453
- _context.next = 86;
457
+ _context.prev = 87;
458
+ _context.next = 90;
454
459
  return Promise.all(promises);
455
- case 86:
460
+ case 90:
456
461
  erpPromiseList = _context.sent;
457
462
  detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
458
463
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -462,13 +467,13 @@ export var orderBack = /*#__PURE__*/function () {
462
467
  })
463
468
  });
464
469
  });
465
- _context.next = 93;
470
+ _context.next = 97;
466
471
  break;
467
- case 90:
468
- _context.prev = 90;
469
- _context.t1 = _context["catch"](83);
472
+ case 94:
473
+ _context.prev = 94;
474
+ _context.t1 = _context["catch"](87);
470
475
  console.error('调用erp获取宝贝编码错误', _context.t1);
471
- case 93:
476
+ case 97:
472
477
  // console.log('detail', detail);
473
478
  values = orderBackFormValues({
474
479
  detail: detail,
@@ -513,21 +518,21 @@ export var orderBack = /*#__PURE__*/function () {
513
518
  shopId: shopId
514
519
  }));
515
520
  callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
516
- _context.next = 104;
521
+ _context.next = 108;
517
522
  break;
518
- case 101:
519
- _context.prev = 101;
520
- _context.t2 = _context["catch"](21);
523
+ case 105:
524
+ _context.prev = 105;
525
+ _context.t2 = _context["catch"](25);
521
526
  console.error(_context.t2);
522
- case 104:
523
- _context.prev = 104;
527
+ case 108:
528
+ _context.prev = 108;
524
529
  setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
525
- return _context.finish(104);
526
- case 107:
530
+ return _context.finish(108);
531
+ case 111:
527
532
  case "end":
528
533
  return _context.stop();
529
534
  }
530
- }, _callee, null, [[4, 11], [21, 101, 104, 107], [83, 90]]);
535
+ }, _callee, null, [[5, 12, 15, 18], [25, 105, 108, 111], [87, 94]]);
531
536
  }));
532
537
  return function orderBack(_x) {
533
538
  return _ref2.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "2.0.49",
3
+ "version": "2.0.50",
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.0.49",
36
- "@kmkf-fe-packages/kmkf-utils": "2.0.49",
37
- "@kmkf-fe-packages/services-components": "2.0.49",
35
+ "@kmkf-fe-packages/basic-components": "2.0.50",
36
+ "@kmkf-fe-packages/kmkf-utils": "2.0.50",
37
+ "@kmkf-fe-packages/services-components": "2.0.50",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -73,7 +73,7 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "615e49c2f6ae3ed5f7d84ff7ea8913414d7b4e28",
76
+ "gitHead": "16c894e447edf1416f3bb0cac9f1496e388e92e6",
77
77
  "gitHooks": {
78
78
  "pre-commit": "lint-staged"
79
79
  }