@kmkf-fe-packages/kmkf-work-order-service-component 2.2.31 → 2.2.33

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.
@@ -8,7 +8,7 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyri
8
8
  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); } }
9
9
  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); }); }; }
10
10
  import { orderBackKmVideoByLogisticsCode } from "../../../common/utils/orderBackKm";
11
- import { isNull, skxSystemOrderBackValues, skxReturnSystemOrderBackValues } from '@kmkf-fe-packages/kmkf-utils';
11
+ import { isNull, skxSystemOrderBackValues, skxReturnSystemOrderBackValues, updateWdtAftersaleGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
12
12
  import { queryTidByOutSid, queryTidByWdtOutSid } from "../../../model/servers/api";
13
13
  import { servers } from '@kmkf-fe-packages/kmkf-utils';
14
14
  export var onBlurErpAfterSaleTradeId = /*#__PURE__*/function () {
@@ -168,60 +168,61 @@ export var onBlurExpressLogisticsCode = /*#__PURE__*/function () {
168
168
  return _ref4.apply(this, arguments);
169
169
  };
170
170
  }();
171
- export var onBlurSkxOutboundNoticeNo = /*#__PURE__*/function () {
171
+ export var onBlurReturnLogisticsCode = /*#__PURE__*/function () {
172
172
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref5) {
173
- var form, value, templateDetail, componentOnBlur, _ref5$onlyGetTid, onlyGetTid, _ref5$needTradeIdOrde, needTradeIdOrderBack;
173
+ var _wdtReturnBillNoCompo;
174
+ var form, value, templateDetail, componentOnBlur, orderBackRule, wdtReturnBillNoComponent;
174
175
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
175
176
  while (1) switch (_context4.prev = _context4.next) {
176
177
  case 0:
177
- form = _ref5.form, value = _ref5.value, templateDetail = _ref5.templateDetail, componentOnBlur = _ref5.componentOnBlur, _ref5$onlyGetTid = _ref5.onlyGetTid, onlyGetTid = _ref5$onlyGetTid === void 0 ? false : _ref5$onlyGetTid, _ref5$needTradeIdOrde = _ref5.needTradeIdOrderBack, needTradeIdOrderBack = _ref5$needTradeIdOrde === void 0 ? true : _ref5$needTradeIdOrde;
178
+ form = _ref5.form, value = _ref5.value, templateDetail = _ref5.templateDetail, componentOnBlur = _ref5.componentOnBlur, orderBackRule = _ref5.orderBackRule;
178
179
  if (value) {
179
180
  _context4.next = 3;
180
181
  break;
181
182
  }
182
183
  return _context4.abrupt("return");
183
184
  case 3:
184
- _context4.next = 5;
185
- return servers.SKX.querySkxOrderDetailSingleton({
186
- onBillNo: value
185
+ wdtReturnBillNoComponent = templateDetail.componentDtoList.find(function (item) {
186
+ return item.workOrderComponentType === 'WDT_RETURN_BILL_NO';
187
+ });
188
+ if (!(!wdtReturnBillNoComponent || (wdtReturnBillNoComponent === null || wdtReturnBillNoComponent === void 0 ? void 0 : (_wdtReturnBillNoCompo = wdtReturnBillNoComponent.componentConfig) === null || _wdtReturnBillNoCompo === void 0 ? void 0 : _wdtReturnBillNoCompo.orderBackRule) !== orderBackRule)) {
189
+ _context4.next = 6;
190
+ break;
191
+ }
192
+ return _context4.abrupt("return");
193
+ case 6:
194
+ _context4.next = 8;
195
+ return servers.WDT.queryReturnOrderDetailSingleton({
196
+ logisticsCode: value
187
197
  }).then( /*#__PURE__*/function () {
188
198
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(res) {
189
- var data, tradeId, blurPromise, values;
199
+ var _list$find, _list$find$call;
200
+ var data, list, onlyOneReturnBillNo;
190
201
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
191
202
  while (1) switch (_context3.prev = _context3.next) {
192
203
  case 0:
193
204
  data = res.data;
194
- tradeId = data === null || data === void 0 ? void 0 : data.tid;
195
- if (!onlyGetTid) {
196
- _context3.next = 4;
197
- break;
198
- }
199
- return _context3.abrupt("return", tradeId);
200
- case 4:
201
- if (!needTradeIdOrderBack) {
202
- _context3.next = 8;
203
- break;
204
- }
205
- // 创建一个异步操作的Promise
206
- blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
207
- _context3.next = 8;
208
- return blurPromise;
209
- case 8:
210
- // 所有异步操作完成后执行
211
- values = skxSystemOrderBackValues({
212
- templateList: templateDetail,
213
- value: {
214
- allOrders: (data === null || data === void 0 ? void 0 : data.orderDetailInfoList) || []
205
+ list = (data === null || data === void 0 ? void 0 : data.orderList) || [];
206
+ onlyOneReturnBillNo = (list === null || list === void 0 ? void 0 : list.length) === 1; // // 所有异步操作完成后执行
207
+ form.setFieldsValue({
208
+ bbff0e52da: {
209
+ isRequest: true,
210
+ showOrderInfo: list || [],
211
+ orders: list,
212
+ selectIds: onlyOneReturnBillNo ? list.map(function (item) {
213
+ return item.refundNo;
214
+ }) : []
215
215
  },
216
- form: form,
217
- isReverseFilling: false
216
+ '6c27eb94d3': {
217
+ isRequest: true,
218
+ orders: list,
219
+ shopCode: (list === null || list === void 0 ? void 0 : (_list$find = list.find) === null || _list$find === void 0 ? void 0 : (_list$find$call = _list$find.call(list, function (item) {
220
+ return item.shopNo;
221
+ })) === null || _list$find$call === void 0 ? void 0 : _list$find$call.shopNo) || null,
222
+ wdtAftersaleGoods: onlyOneReturnBillNo ? updateWdtAftersaleGoodsHandle(list) : []
223
+ }
218
224
  });
219
- form.setFieldsValue(_objectSpread(_objectSpread({}, values || {}), {}, {
220
- m3ap1EvEyd: tradeId,
221
- '78CADF2951': value
222
- }));
223
- return _context3.abrupt("return", res.data);
224
- case 11:
225
+ case 4:
225
226
  case "end":
226
227
  return _context3.stop();
227
228
  }
@@ -231,19 +232,19 @@ export var onBlurSkxOutboundNoticeNo = /*#__PURE__*/function () {
231
232
  return _ref7.apply(this, arguments);
232
233
  };
233
234
  }()).catch(console.debug);
234
- case 5:
235
+ case 8:
235
236
  return _context4.abrupt("return", _context4.sent);
236
- case 6:
237
+ case 9:
237
238
  case "end":
238
239
  return _context4.stop();
239
240
  }
240
241
  }, _callee4);
241
242
  }));
242
- return function onBlurSkxOutboundNoticeNo(_x3) {
243
+ return function onBlurReturnLogisticsCode(_x3) {
243
244
  return _ref6.apply(this, arguments);
244
245
  };
245
246
  }();
246
- export var onBlurSkxReturnBillNo = /*#__PURE__*/function () {
247
+ export var onBlurSkxOutboundNoticeNo = /*#__PURE__*/function () {
247
248
  var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(_ref8) {
248
249
  var form, value, templateDetail, componentOnBlur, _ref8$onlyGetTid, onlyGetTid, _ref8$needTradeIdOrde, needTradeIdOrderBack;
249
250
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
@@ -257,8 +258,8 @@ export var onBlurSkxReturnBillNo = /*#__PURE__*/function () {
257
258
  return _context6.abrupt("return");
258
259
  case 3:
259
260
  _context6.next = 5;
260
- return servers.SKX.queryReturnOrderDetailSingleton({
261
- returnBillNo: value
261
+ return servers.SKX.querySkxOrderDetailSingleton({
262
+ onBillNo: value
262
263
  }).then( /*#__PURE__*/function () {
263
264
  var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(res) {
264
265
  var data, tradeId, blurPromise, values;
@@ -283,17 +284,17 @@ export var onBlurSkxReturnBillNo = /*#__PURE__*/function () {
283
284
  return blurPromise;
284
285
  case 8:
285
286
  // 所有异步操作完成后执行
286
- values = skxReturnSystemOrderBackValues({
287
+ values = skxSystemOrderBackValues({
287
288
  templateList: templateDetail,
288
289
  value: {
289
- allOrders: (data === null || data === void 0 ? void 0 : data.skqReturnOrderDetailInfoDtos) || []
290
+ allOrders: (data === null || data === void 0 ? void 0 : data.orderDetailInfoList) || []
290
291
  },
291
292
  form: form,
292
293
  isReverseFilling: false
293
294
  });
294
295
  form.setFieldsValue(_objectSpread(_objectSpread({}, values || {}), {}, {
295
296
  m3ap1EvEyd: tradeId,
296
- fe10d6f36b: value
297
+ '78CADF2951': value
297
298
  }));
298
299
  return _context5.abrupt("return", res.data);
299
300
  case 11:
@@ -314,13 +315,13 @@ export var onBlurSkxReturnBillNo = /*#__PURE__*/function () {
314
315
  }
315
316
  }, _callee6);
316
317
  }));
317
- return function onBlurSkxReturnBillNo(_x5) {
318
+ return function onBlurSkxOutboundNoticeNo(_x5) {
318
319
  return _ref9.apply(this, arguments);
319
320
  };
320
321
  }();
321
- export var onBlurSkxLogisticsCode = /*#__PURE__*/function () {
322
+ export var onBlurSkxReturnBillNo = /*#__PURE__*/function () {
322
323
  var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_ref11) {
323
- var form, value, templateDetail, componentOnBlur, _ref11$onlyGetTid, onlyGetTid, _ref11$needTradeIdOrd, needTradeIdOrderBack, hasTradeIdComponent;
324
+ var form, value, templateDetail, componentOnBlur, _ref11$onlyGetTid, onlyGetTid, _ref11$needTradeIdOrd, needTradeIdOrderBack;
324
325
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
325
326
  while (1) switch (_context8.prev = _context8.next) {
326
327
  case 0:
@@ -331,21 +332,12 @@ export var onBlurSkxLogisticsCode = /*#__PURE__*/function () {
331
332
  }
332
333
  return _context8.abrupt("return");
333
334
  case 3:
334
- hasTradeIdComponent = templateDetail.componentDtoList.some(function (item) {
335
- return item.workOrderComponentType === 'TRADE_ID_INPUT';
336
- });
337
- if (hasTradeIdComponent) {
338
- _context8.next = 6;
339
- break;
340
- }
341
- return _context8.abrupt("return");
342
- case 6:
343
- _context8.next = 8;
335
+ _context8.next = 5;
344
336
  return servers.SKX.queryReturnOrderDetailSingleton({
345
- expressCode: value
337
+ returnBillNo: value
346
338
  }).then( /*#__PURE__*/function () {
347
339
  var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(res) {
348
- var data, tradeId, oldValue, blurPromise;
340
+ var data, tradeId, blurPromise, values;
349
341
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
350
342
  while (1) switch (_context7.prev = _context7.next) {
351
343
  case 0:
@@ -357,21 +349,30 @@ export var onBlurSkxLogisticsCode = /*#__PURE__*/function () {
357
349
  }
358
350
  return _context7.abrupt("return", tradeId);
359
351
  case 4:
360
- oldValue = form.getFieldValue('0eVTfMGEyd');
361
352
  if (!needTradeIdOrderBack) {
362
- _context7.next = 9;
353
+ _context7.next = 8;
363
354
  break;
364
355
  }
365
356
  // 创建一个异步操作的Promise
366
357
  blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
367
- _context7.next = 9;
358
+ _context7.next = 8;
368
359
  return blurPromise;
369
- case 9:
370
- form.setFieldsValue({
371
- m3ap1EvEyd: tradeId,
372
- '0eVTfMGEyd': oldValue
360
+ case 8:
361
+ // 所有异步操作完成后执行
362
+ values = skxReturnSystemOrderBackValues({
363
+ templateList: templateDetail,
364
+ value: {
365
+ allOrders: (data === null || data === void 0 ? void 0 : data.skqReturnOrderDetailInfoDtos) || []
366
+ },
367
+ form: form,
368
+ isReverseFilling: false
373
369
  });
374
- case 10:
370
+ form.setFieldsValue(_objectSpread(_objectSpread({}, values || {}), {}, {
371
+ m3ap1EvEyd: tradeId,
372
+ fe10d6f36b: value
373
+ }));
374
+ return _context7.abrupt("return", res.data);
375
+ case 11:
375
376
  case "end":
376
377
  return _context7.stop();
377
378
  }
@@ -381,35 +382,35 @@ export var onBlurSkxLogisticsCode = /*#__PURE__*/function () {
381
382
  return _ref13.apply(this, arguments);
382
383
  };
383
384
  }()).catch(console.debug);
384
- case 8:
385
+ case 5:
385
386
  return _context8.abrupt("return", _context8.sent);
386
- case 9:
387
+ case 6:
387
388
  case "end":
388
389
  return _context8.stop();
389
390
  }
390
391
  }, _callee8);
391
392
  }));
392
- return function onBlurSkxLogisticsCode(_x7) {
393
+ return function onBlurSkxReturnBillNo(_x7) {
393
394
  return _ref12.apply(this, arguments);
394
395
  };
395
396
  }();
396
- export var onBlurSkxReturnTHLogisticsCode = /*#__PURE__*/function () {
397
+ export var onBlurSkxLogisticsCode = /*#__PURE__*/function () {
397
398
  var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_ref14) {
398
- var form, value, templateDetail, componentOnBlur, hasSkxReturnBillNoComponent;
399
+ var form, value, templateDetail, componentOnBlur, _ref14$onlyGetTid, onlyGetTid, _ref14$needTradeIdOrd, needTradeIdOrderBack, hasTradeIdComponent;
399
400
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
400
401
  while (1) switch (_context10.prev = _context10.next) {
401
402
  case 0:
402
- form = _ref14.form, value = _ref14.value, templateDetail = _ref14.templateDetail, componentOnBlur = _ref14.componentOnBlur;
403
+ form = _ref14.form, value = _ref14.value, templateDetail = _ref14.templateDetail, componentOnBlur = _ref14.componentOnBlur, _ref14$onlyGetTid = _ref14.onlyGetTid, onlyGetTid = _ref14$onlyGetTid === void 0 ? false : _ref14$onlyGetTid, _ref14$needTradeIdOrd = _ref14.needTradeIdOrderBack, needTradeIdOrderBack = _ref14$needTradeIdOrd === void 0 ? true : _ref14$needTradeIdOrd;
403
404
  if (value) {
404
405
  _context10.next = 3;
405
406
  break;
406
407
  }
407
408
  return _context10.abrupt("return");
408
409
  case 3:
409
- hasSkxReturnBillNoComponent = templateDetail.componentDtoList.some(function (item) {
410
- return item.workOrderComponentType === 'SKX_RETURN_BILL_NO';
410
+ hasTradeIdComponent = templateDetail.componentDtoList.some(function (item) {
411
+ return item.workOrderComponentType === 'TRADE_ID_INPUT';
411
412
  });
412
- if (hasSkxReturnBillNoComponent) {
413
+ if (hasTradeIdComponent) {
413
414
  _context10.next = 6;
414
415
  break;
415
416
  }
@@ -420,17 +421,92 @@ export var onBlurSkxReturnTHLogisticsCode = /*#__PURE__*/function () {
420
421
  expressCode: value
421
422
  }).then( /*#__PURE__*/function () {
422
423
  var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(res) {
423
- var _list$;
424
- var data, list, oldValue, returnBillNo, blurPromise;
424
+ var data, tradeId, oldValue, blurPromise;
425
425
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
426
426
  while (1) switch (_context9.prev = _context9.next) {
427
+ case 0:
428
+ data = res.data;
429
+ tradeId = data === null || data === void 0 ? void 0 : data.tid;
430
+ if (!onlyGetTid) {
431
+ _context9.next = 4;
432
+ break;
433
+ }
434
+ return _context9.abrupt("return", tradeId);
435
+ case 4:
436
+ oldValue = form.getFieldValue('0eVTfMGEyd');
437
+ if (!needTradeIdOrderBack) {
438
+ _context9.next = 9;
439
+ break;
440
+ }
441
+ // 创建一个异步操作的Promise
442
+ blurPromise = componentOnBlur(tradeId, 'tradeId'); // 等待异步操作完成后再执行setTimeout
443
+ _context9.next = 9;
444
+ return blurPromise;
445
+ case 9:
446
+ form.setFieldsValue({
447
+ m3ap1EvEyd: tradeId,
448
+ '0eVTfMGEyd': oldValue
449
+ });
450
+ case 10:
451
+ case "end":
452
+ return _context9.stop();
453
+ }
454
+ }, _callee9);
455
+ }));
456
+ return function (_x10) {
457
+ return _ref16.apply(this, arguments);
458
+ };
459
+ }()).catch(console.debug);
460
+ case 8:
461
+ return _context10.abrupt("return", _context10.sent);
462
+ case 9:
463
+ case "end":
464
+ return _context10.stop();
465
+ }
466
+ }, _callee10);
467
+ }));
468
+ return function onBlurSkxLogisticsCode(_x9) {
469
+ return _ref15.apply(this, arguments);
470
+ };
471
+ }();
472
+ export var onBlurSkxReturnTHLogisticsCode = /*#__PURE__*/function () {
473
+ var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_ref17) {
474
+ var form, value, templateDetail, componentOnBlur, hasSkxReturnBillNoComponent;
475
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
476
+ while (1) switch (_context12.prev = _context12.next) {
477
+ case 0:
478
+ form = _ref17.form, value = _ref17.value, templateDetail = _ref17.templateDetail, componentOnBlur = _ref17.componentOnBlur;
479
+ if (value) {
480
+ _context12.next = 3;
481
+ break;
482
+ }
483
+ return _context12.abrupt("return");
484
+ case 3:
485
+ hasSkxReturnBillNoComponent = templateDetail.componentDtoList.some(function (item) {
486
+ return item.workOrderComponentType === 'SKX_RETURN_BILL_NO';
487
+ });
488
+ if (hasSkxReturnBillNoComponent) {
489
+ _context12.next = 6;
490
+ break;
491
+ }
492
+ return _context12.abrupt("return");
493
+ case 6:
494
+ _context12.next = 8;
495
+ return servers.SKX.queryReturnOrderDetailSingleton({
496
+ expressCode: value
497
+ }).then( /*#__PURE__*/function () {
498
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(res) {
499
+ var _list$;
500
+ var data, list, oldValue, returnBillNo, blurPromise;
501
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
502
+ while (1) switch (_context11.prev = _context11.next) {
427
503
  case 0:
428
504
  data = res.data;
429
505
  list = (data === null || data === void 0 ? void 0 : data.skqReturnOrderDetailInfoDtos) || [];
430
506
  oldValue = form.getFieldValue('4487c6516b');
431
507
  returnBillNo = (list === null || list === void 0 ? void 0 : list.length) === 1 ? (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.returnBillNo : ''; // 创建一个异步操作的Promise
432
508
  blurPromise = componentOnBlur(returnBillNo, 'skxReturnBillNo'); // 等待异步操作完成后再执行setTimeout
433
- _context9.next = 7;
509
+ _context11.next = 7;
434
510
  return blurPromise;
435
511
  case 7:
436
512
  // // 所有异步操作完成后执行
@@ -441,23 +517,23 @@ export var onBlurSkxReturnTHLogisticsCode = /*#__PURE__*/function () {
441
517
  });
442
518
  case 8:
443
519
  case "end":
444
- return _context9.stop();
520
+ return _context11.stop();
445
521
  }
446
- }, _callee9);
522
+ }, _callee11);
447
523
  }));
448
- return function (_x10) {
449
- return _ref16.apply(this, arguments);
524
+ return function (_x12) {
525
+ return _ref19.apply(this, arguments);
450
526
  };
451
527
  }()).catch(console.debug);
452
528
  case 8:
453
- return _context10.abrupt("return", _context10.sent);
529
+ return _context12.abrupt("return", _context12.sent);
454
530
  case 9:
455
531
  case "end":
456
- return _context10.stop();
532
+ return _context12.stop();
457
533
  }
458
- }, _callee10);
534
+ }, _callee12);
459
535
  }));
460
- return function onBlurSkxReturnTHLogisticsCode(_x9) {
461
- return _ref15.apply(this, arguments);
536
+ return function onBlurSkxReturnTHLogisticsCode(_x11) {
537
+ return _ref18.apply(this, arguments);
462
538
  };
463
539
  }();
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface JumpBuyerProps {
3
+ platformType: string;
4
+ buyer?: string;
5
+ shop: string;
6
+ order_number?: string;
7
+ }
8
+ declare const JumpBuyer: (param: JumpBuyerProps) => React.JSX.Element;
9
+ export default JumpBuyer;
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { Image } from 'antd';
3
+ import { Base64 } from 'js-base64';
4
+ import contact from "../../../common/imgs/contact.png";
5
+ //工单通需要加一个联系买家按钮跳转到买家聊天框
6
+ // platformType:
7
+ // 1_千牛
8
+ // 2_咚咚
9
+ // 3_拼多多
10
+ // 4_飞鸽
11
+ // 5_快手
12
+ // 6_小红书
13
+ // 7_唯品会
14
+ // 8_得物
15
+ // 9_微信小店
16
+ // 10_美团
17
+ var JumpBuyer = function JumpBuyer(param) {
18
+ var platformType = param.platformType,
19
+ buyer = param.buyer,
20
+ shop = param.shop,
21
+ order_number = param.order_number;
22
+ var onClick = function onClick() {
23
+ var _window;
24
+ var info = {
25
+ event: 'open_buyers',
26
+ param: {
27
+ platformType: Number(platformType),
28
+ buyer: buyer,
29
+ shop: shop,
30
+ order_number: order_number
31
+ }
32
+ };
33
+ var jsonString = JSON.stringify(info);
34
+ // 使用安全的 Base64 编码
35
+ var base64String = Base64.encodeURL(jsonString);
36
+ console.log('jumpBuyer', info, "zxd:/".concat(base64String));
37
+ if ((_window = window) !== null && _window !== void 0 && _window.xiaozhiSDK) {
38
+ var _window2, _window2$xiaozhiSDK;
39
+ (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$xiaozhiSDK = _window2.xiaozhiSDK) === null || _window2$xiaozhiSDK === void 0 ? void 0 : _window2$xiaozhiSDK.openUrlWithDefault({
40
+ param: {
41
+ url: "zxd:/".concat(base64String)
42
+ }
43
+ });
44
+ }
45
+ };
46
+ return /*#__PURE__*/React.createElement("span", {
47
+ onClick: onClick,
48
+ style: {
49
+ color: '#1890ff',
50
+ cursor: 'pointer'
51
+ }
52
+ }, /*#__PURE__*/React.createElement(Image, {
53
+ src: contact,
54
+ preview: false,
55
+ width: 12
56
+ }), "\u8054\u7CFB\u4E70\u5BB6");
57
+ };
58
+ export default JumpBuyer;
@@ -43,6 +43,7 @@ import RemarkModal from "./components/RemarkModal";
43
43
  import WithdrawModal from "./components/WithdrawModal";
44
44
  import SubmitRemindModal from "./components/SubmitRemindModal";
45
45
  import ShareLinkModal from "./components/ShareLinkModal";
46
+ import JumpBuyer from "./components/JumpBuyer";
46
47
  import { useSignal } from "../hooks/useSignal";
47
48
  import { verifyHandle, FLOW_STATUS_V2, getTag, currentUserHasOperatorAuth, CANNOT_BACK_FILL } from "./common";
48
49
  import { saveWorkOrder, submitWorkOrder, addRemark, stopWorkOrder, closeWorkOrder, startWorkOrder, forwardWorkOrder, returnWorkOrder, withDrawWorkOrder, reminder, cancelReminder } from "../model/flowTemplateDetail/api";
@@ -61,7 +62,7 @@ import { PlatForm } from "../WorkOrder/types";
61
62
  var Text = Typography.Text,
62
63
  Link = Typography.Link;
63
64
  var FlowTemplateDetail = function FlowTemplateDetail(props) {
64
- var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _currentNodeDetail$no14, _shopList$find, _JSON$parse, _currentNodeDetail$wo30, _currentNodeDetail$wo31, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$no27, _currentNodeDetail$no28, _currentNodeDetail$no29, _currentNodeDetail$no30;
65
+ var _currentNodeDetail$wo, _currentNodeDetail$no, _currentNodeDetail$wo2, _currentNodeDetail$no14, _shopList$find, _currentNodeDetail$wo30, _currentNodeDetail$wo31, _JSON$parse, _currentNodeDetail$wo32, _currentNodeDetail$wo33, _currentNodeDetail$wo34, _currentNodeDetail$wo35, _currentNodeDetail$no27, _currentNodeDetail$no28, _currentNodeDetail$no29, _currentNodeDetail$no30;
65
66
  var flowTemplateKey = props.flowTemplateKey,
66
67
  _props$shopList = props.shopList,
67
68
  shopList = _props$shopList === void 0 ? [] : _props$shopList,
@@ -77,7 +78,9 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
77
78
  onTalkChange = props.onTalkChange,
78
79
  _props$autoSubmit = props.autoSubmit,
79
80
  autoSubmit = _props$autoSubmit === void 0 ? false : _props$autoSubmit,
80
- callbackAutoSubmitResult = props.callbackAutoSubmitResult;
81
+ callbackAutoSubmitResult = props.callbackAutoSubmitResult,
82
+ _props$otherInfo = props.otherInfo,
83
+ otherInfo = _props$otherInfo === void 0 ? {} : _props$otherInfo;
81
84
  var _useContext = useContext(Context),
82
85
  dispatch = _useContext.dispatch;
83
86
  var flowRecordList = useSelector(selectFlowRecordList);
@@ -1287,9 +1290,14 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
1287
1290
  }), shopItem === null || shopItem === void 0 ? void 0 : shopItem.shopName, "-"), /*#__PURE__*/React.createElement("span", null, flowWorkOrderId), !['created', 'edit'].includes(privilege) && /*#__PURE__*/React.createElement(Button, {
1288
1291
  type: "link",
1289
1292
  onClick: handleFollow
1290
- }, !follow ? '关注' : '已关注')), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo30 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo30 === void 0 ? void 0 : (_currentNodeDetail$wo31 = _currentNodeDetail$wo30.jsonMap) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : _currentNodeDetail$wo31.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
1293
+ }, !follow ? '关注' : '已关注'), plat.platform === PlatForm.XIAOZHI && ['2'].includes(String(otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType)) && ((otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.buyerOpenUid) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo30 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo30 === void 0 ? void 0 : _currentNodeDetail$wo30.buyerOpenUid)) && /*#__PURE__*/React.createElement(JumpBuyer, {
1294
+ order_number: tid,
1295
+ shop: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.taobaoNick) || '',
1296
+ buyer: (otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.buyerOpenUid) || (currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo31 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo31 === void 0 ? void 0 : _currentNodeDetail$wo31.buyerOpenUid),
1297
+ platformType: otherInfo === null || otherInfo === void 0 ? void 0 : otherInfo.xzClientPlatformType
1298
+ })), /*#__PURE__*/React.createElement("div", null, (_JSON$parse = JSON.parse((currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo32 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : (_currentNodeDetail$wo33 = _currentNodeDetail$wo32.jsonMap) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : _currentNodeDetail$wo33.flowTags) || '[]')) !== null && _JSON$parse !== void 0 && _JSON$parse.includes('AI_BUILD') ? /*#__PURE__*/React.createElement(Tag, {
1291
1299
  color: "blue"
1292
- }, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo32 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo32 === void 0 ? void 0 : (_currentNodeDetail$wo33 = _currentNodeDetail$wo32.jsonMap) === null || _currentNodeDetail$wo33 === void 0 ? void 0 : _currentNodeDetail$wo33.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1300
+ }, "AI\u81EA\u52A8\u5EFA\u5355-".concat(WORK_ORDER_STATUS_AI_BUILD[currentNodeDetail === null || currentNodeDetail === void 0 ? void 0 : (_currentNodeDetail$wo34 = currentNodeDetail.workOrder) === null || _currentNodeDetail$wo34 === void 0 ? void 0 : (_currentNodeDetail$wo35 = _currentNodeDetail$wo34.jsonMap) === null || _currentNodeDetail$wo35 === void 0 ? void 0 : _currentNodeDetail$wo35.flowStatus])) : null)), flowStatus && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
1293
1301
  justify: 'space-between',
1294
1302
  className: "header"
1295
1303
  }, /*#__PURE__*/React.createElement(Col, null, /*#__PURE__*/React.createElement("div", {
@@ -25,4 +25,5 @@ export declare type FlowTemplateDetailProps = {
25
25
  success: boolean;
26
26
  message?: string;
27
27
  }) => void;
28
+ otherInfo?: any;
28
29
  };
@@ -12,12 +12,14 @@ import React, { useState } from 'react';
12
12
  import { Space, Spin, message } from 'antd';
13
13
  import moment from 'moment';
14
14
  import { SelectMark } from '@kmkf-fe-packages/services-components';
15
- import { useAppDispatch } from "../../../../../model/hooks";
15
+ import { useAppDispatch, useAppSelector } from "../../../../../model/hooks";
16
16
  import { setFormModalVisible, setLogicFlowId, setFlowWorkOrderId, setCurrentCustomizeRecord, fetchFlatWorkOrder } from "../../../../../model/customizeWorkOrder";
17
17
  import { queryPanelInfo } from "../../../../../model/flowTemplateDetail/api";
18
18
  import reject from "../../../../../common/imgs/reject.png";
19
19
  import reminder from "../../../../../common/imgs/reminder.png";
20
20
  import ai from "../../../../../common/imgs/ai.png";
21
+ import JumpBuyer from "../../../../../FlowTemplateDetailV2/components/JumpBuyer";
22
+ import { PlatForm } from "../../../../types";
21
23
  import "./index.less";
22
24
  var FlowStatus = {
23
25
  WAIT_COMMIT: {
@@ -50,8 +52,11 @@ var FlowStatus = {
50
52
  }
51
53
  };
52
54
  var CustomizeWorkOrderCard = function CustomizeWorkOrderCard(props) {
53
- var _flowRecordList, _newFlowRecordList, _newFlowRecordList$ma, _FlowStatus$item$flow, _FlowStatus$item$flow2;
55
+ var _flowRecordList, _newFlowRecordList, _newFlowRecordList$ma, _FlowStatus$item$flow, _FlowStatus$item$flow2, _platformInfo$otherIn, _platformInfo$otherIn2, _platformInfo$otherIn3;
54
56
  var dispatch = useAppDispatch();
57
+ var platformInfo = useAppSelector(function (state) {
58
+ return state.global.platformInfo;
59
+ });
55
60
  var _props$item = props.item,
56
61
  item = _props$item === void 0 ? {} : _props$item,
57
62
  onUpDateItem = props.onUpDateItem;
@@ -177,7 +182,12 @@ var CustomizeWorkOrderCard = function CustomizeWorkOrderCard(props) {
177
182
  style: {
178
183
  width: '20px'
179
184
  }
180
- })))), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement("span", {
185
+ })))), /*#__PURE__*/React.createElement(Space, null, (platformInfo === null || platformInfo === void 0 ? void 0 : platformInfo.platform) === PlatForm.XIAOZHI && ['2'].includes(String(platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn = platformInfo.otherInfo) === null || _platformInfo$otherIn === void 0 ? void 0 : _platformInfo$otherIn.xzClientPlatformType)) && (item === null || item === void 0 ? void 0 : item.buyerOpenUid) && /*#__PURE__*/React.createElement(JumpBuyer, {
186
+ order_number: item === null || item === void 0 ? void 0 : item.tid,
187
+ shop: (platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn2 = platformInfo.otherInfo) === null || _platformInfo$otherIn2 === void 0 ? void 0 : _platformInfo$otherIn2.taobaoNick) || '',
188
+ platformType: (platformInfo === null || platformInfo === void 0 ? void 0 : (_platformInfo$otherIn3 = platformInfo.otherInfo) === null || _platformInfo$otherIn3 === void 0 ? void 0 : _platformInfo$otherIn3.xzClientPlatformType) || '',
189
+ buyer: item === null || item === void 0 ? void 0 : item.buyerOpenUid
190
+ }), /*#__PURE__*/React.createElement("span", {
181
191
  className: "order_card_header_detail",
182
192
  onClick: function onClick() {
183
193
  return handleDetailWorkOrderFlow(item);
@@ -670,6 +670,9 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
670
670
  bindERP: bindERP || hasBindWdt,
671
671
  hasSuperAdminRole: hasSuperAdminRole
672
672
  },
673
+ otherInfo: _objectSpread(_objectSpread({}, otherInfo), {}, {
674
+ buyerOpenUid: (record === null || record === void 0 ? void 0 : record.buyerOpenUid) || ''
675
+ }),
673
676
  callbackDealWorkOrderSuccess: onDealWorkOrderSuccess,
674
677
  onOpenWangWang: onOpenWangWang
675
678
  }))));
@@ -118,11 +118,12 @@ var WorkOrder = function WorkOrder(props) {
118
118
  buyerNick: buyerNick,
119
119
  buyerId: buyerId,
120
120
  orderNo: orderNo,
121
- userKey: userKey
121
+ userKey: userKey,
122
+ otherInfo: otherInfo
122
123
  }
123
124
  }
124
125
  });
125
- }, [platform, shopId, buyerNick, buyerId, orderNo, userKey]);
126
+ }, [platform, shopId, buyerNick, buyerId, orderNo, userKey, otherInfo]);
126
127
  useEffect(function () {
127
128
  initHandle();
128
129
  }, []);
@@ -210,7 +211,6 @@ var WorkOrder = function WorkOrder(props) {
210
211
  })).unwrap().then(function (res) {
211
212
  var success = res.success;
212
213
  if (success) {
213
- console.log('xzlogOut3');
214
214
  onEmpowerCallback === null || onEmpowerCallback === void 0 ? void 0 : onEmpowerCallback();
215
215
  }
216
216
  });
Binary file