@kmkf-fe-packages/kmkf-work-order-service-component 2.2.44-beta.1 → 2.2.44-beta.11

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.
@@ -27,7 +27,8 @@ export var getFlowOperate = {
27
27
  REMINDER: '催单',
28
28
  AI_BUILD: 'AI自动建单',
29
29
  CANCEL_REMINDER: '取消催单',
30
- AUTO_TASK_RETRY: '自动任务重试'
30
+ AUTO_TASK_RETRY: '自动任务重试',
31
+ JUMP: '跳过'
31
32
  };
32
33
  export var FLOW_STATUS_V2 = {
33
34
  WAIT_COMMIT: '待提交',
@@ -296,7 +296,7 @@ var CurrentNode = function CurrentNode(props, ref) {
296
296
  onOk: function () {
297
297
  var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
298
298
  var _currentNodeDetail$no21;
299
- var _yield$skipNode, success, _controllerRef$curren3;
299
+ var _yield$skipNode, success;
300
300
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
301
301
  while (1) switch (_context3.prev = _context3.next) {
302
302
  case 0:
@@ -316,12 +316,15 @@ var CurrentNode = function CurrentNode(props, ref) {
316
316
  if (success) {
317
317
  message.success('跳过成功');
318
318
  queryRemarkList();
319
- dispatch(fetchPanelInfo({
320
- flowTemplateKey: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey,
321
- flowWorkOrderId: flowWorkOrderId
322
- }, {
323
- signal: controllerRef === null || controllerRef === void 0 ? void 0 : (_controllerRef$curren3 = controllerRef.current) === null || _controllerRef$curren3 === void 0 ? void 0 : _controllerRef$curren3.signal
324
- }));
319
+ setTimeout(function () {
320
+ var _controllerRef$curren3;
321
+ dispatch(fetchPanelInfo({
322
+ flowTemplateKey: operateParams === null || operateParams === void 0 ? void 0 : operateParams.flowTemplateKey,
323
+ flowWorkOrderId: flowWorkOrderId
324
+ }, {
325
+ signal: controllerRef === null || controllerRef === void 0 ? void 0 : (_controllerRef$curren3 = controllerRef.current) === null || _controllerRef$curren3 === void 0 ? void 0 : _controllerRef$curren3.signal
326
+ }));
327
+ }, 100);
325
328
  }
326
329
  case 5:
327
330
  case "end":
@@ -189,7 +189,9 @@ var FormRender = function FormRender(props, ref) {
189
189
  });
190
190
  var transData = calcWorkOrderList([record], preNodeComponentDtoList);
191
191
  preNodeForm.setFieldsValue(_objectSpread({}, get(transData, '0', {})));
192
- record.preCreateAndNotModified && fillByShopId(get(transData, '0', {}).shopId);
192
+ if (record.preCreateAndNotModified || record.notAutoFillWithFirstSubmit) {
193
+ fillByShopId(get(transData, '0', {}).shopId);
194
+ }
193
195
  }
194
196
  }, [record]);
195
197
  // 过滤打款组件订单与支付宝账号重复校验结果
@@ -1407,7 +1409,7 @@ var FormRender = function FormRender(props, ref) {
1407
1409
  newComponentConfig['disabled'] = componentCanEdit;
1408
1410
  }
1409
1411
  if (workOrderComponentType === 'ENTERPRISE_PAYMENT') {
1410
- newComponentConfig['disabled'] = disabled || !canModifyPayment;
1412
+ newComponentConfig['disabled'] = disabled || componentCanEdit || !canModifyPayment;
1411
1413
  }
1412
1414
  if (['RADIO', 'SELECT', 'MULT_SELECT'].includes(workOrderComponentType)) {
1413
1415
  var _mappingConfig$readon;
@@ -236,6 +236,7 @@ export declare const selectCurrentNodeDetail: (state: FlowTemplateDetailState) =
236
236
  }[];
237
237
  } | undefined;
238
238
  } | undefined;
239
+ uniqueKey: string;
239
240
  } | undefined;
240
241
  } | undefined;
241
242
  export declare const selectTid: (state: FlowTemplateDetailState) => string;
@@ -184,6 +184,10 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
184
184
  var _JSON$parse, _JSON$parse$plugins, _JSON$parse$plugins$w;
185
185
  return ((_JSON$parse = JSON.parse(state.workOrder.userInfo.companyUserConfig || '{}')) === null || _JSON$parse === void 0 ? void 0 : (_JSON$parse$plugins = _JSON$parse.plugins) === null || _JSON$parse$plugins === void 0 ? void 0 : (_JSON$parse$plugins$w = _JSON$parse$plugins.wdt) === null || _JSON$parse$plugins$w === void 0 ? void 0 : _JSON$parse$plugins$w.show) || false;
186
186
  });
187
+ var hasBindJst = useAppSelector(function (state) {
188
+ var _JSON$parse2, _JSON$parse2$plugins, _JSON$parse2$plugins$;
189
+ return ((_JSON$parse2 = JSON.parse(state.workOrder.userInfo.companyUserConfig || '{}')) === null || _JSON$parse2 === void 0 ? void 0 : (_JSON$parse2$plugins = _JSON$parse2.plugins) === null || _JSON$parse2$plugins === void 0 ? void 0 : (_JSON$parse2$plugins$ = _JSON$parse2$plugins.jst) === null || _JSON$parse2$plugins$ === void 0 ? void 0 : _JSON$parse2$plugins$.show) || false;
190
+ });
187
191
  var hasSuperAdminRole = useAppSelector(function (state) {
188
192
  return state.workOrder.userInfo.hasSuperAdminRole;
189
193
  });
@@ -667,7 +671,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
667
671
  shopId: shopId,
668
672
  userKey: userKey,
669
673
  companyKey: companyKey,
670
- bindERP: bindERP || hasBindWdt,
674
+ bindERP: bindERP || hasBindWdt || hasBindJst,
671
675
  hasSuperAdminRole: hasSuperAdminRole
672
676
  },
673
677
  otherInfo: _objectSpread(_objectSpread({}, otherInfo), {}, {
@@ -601,7 +601,7 @@ var handleBsOrWdtReissueGoods = function handleBsOrWdtReissueGoods(_ref44) {
601
601
  if (item.workOrderComponentType !== 'GY_REISSUE_GOODS') {
602
602
  addContent(SUBMIT_COMPONENT_REISSUE_MAP[item.workOrderComponentType].shopCode, (reissue === null || reissue === void 0 ? void 0 : reissue.shopCode) || '');
603
603
  }
604
- if (item.workOrderComponentType === 'WDT_REISSUE_GOODS' || item.workOrderComponentType === 'JST_REISSUE_GOODS' || item.workOrderComponentType === 'JST_RETURN_GOODS' || item.workOrderComponentType === 'GY_REISSUE_GOODS' || item.workOrderComponentType === 'KM_REISSUE_GOODS' || item.workOrderComponentType === 'JY_REISSUE_GOODS') {
604
+ if (item.workOrderComponentType === 'WDT_REISSUE_GOODS' || item.workOrderComponentType === 'JST_REISSUE_GOODS' || item.workOrderComponentType === 'JST_RETURN_GOODS' || item.workOrderComponentType === 'GY_REISSUE_GOODS' || item.workOrderComponentType === 'KM_REISSUE_GOODS' || item.workOrderComponentType === 'JY_REISSUE_GOODS' || item.workOrderComponentType === 'JKY_REISSUE_GOODS') {
605
605
  addContent(SUBMIT_COMPONENT_REISSUE_MAP[item.workOrderComponentType].systemOrderNo, (reissue === null || reissue === void 0 ? void 0 : reissue[SUBMIT_COMPONENT_REISSUE_MAP[item.workOrderComponentType].systemOrderNo]) || '');
606
606
  }
607
607
  // 管易补发商品信息vipCode/shopCode未复现出丢失情况,兜底措施
@@ -1043,6 +1043,7 @@ var processComponent = function processComponent(_ref60) {
1043
1043
  case 'JST_RETURN_GOODS':
1044
1044
  case 'KM_REISSUE_GOODS':
1045
1045
  case 'JY_REISSUE_GOODS':
1046
+ case 'JKY_REISSUE_GOODS':
1046
1047
  wrapFn(handleBsOrWdtReissueGoods);
1047
1048
  break;
1048
1049
  case 'BS_RETURN_GOODS':
@@ -295,6 +295,7 @@ export var orderBack = /*#__PURE__*/function () {
295
295
  } else {
296
296
  promise.push(Promise.resolve([]));
297
297
  }
298
+ console.log('promise', promise);
298
299
  // 旺店通售后订单数据获取
299
300
  wdtReturnBillNoComponent = templateDetail.componentDtoList.find(function (item) {
300
301
  return item.workOrderComponentType === 'WDT_RETURN_BILL_NO';
@@ -308,9 +309,9 @@ export var orderBack = /*#__PURE__*/function () {
308
309
  }
309
310
 
310
311
  //需按照orderBackMap中的顺序结构
311
- _context.next = 40;
312
+ _context.next = 41;
312
313
  return Promise.allSettled(promise);
313
- case 40:
314
+ case 41:
314
315
  _yield$Promise$allSet = _context.sent;
315
316
  _yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 16);
316
317
  data = _yield$Promise$allSet2[0];
@@ -615,7 +616,7 @@ export var orderBack = /*#__PURE__*/function () {
615
616
  pushGyLog('detail', detail);
616
617
  //抖音数据特殊处理
617
618
  if (!orderInfo) {
618
- _context.next = 148;
619
+ _context.next = 149;
619
620
  break;
620
621
  }
621
622
  if (shopSourceStr === 'FXG') {
@@ -627,7 +628,7 @@ export var orderBack = /*#__PURE__*/function () {
627
628
  hasSelectItem = HasErpItemSelectHandle(templateDetail);
628
629
  erpPromiseList = [];
629
630
  if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
630
- _context.next = 132;
631
+ _context.next = 133;
631
632
  break;
632
633
  }
633
634
  list = detail['itemList'];
@@ -645,10 +646,10 @@ export var orderBack = /*#__PURE__*/function () {
645
646
  resolve({});
646
647
  });
647
648
  });
648
- _context.prev = 122;
649
- _context.next = 125;
649
+ _context.prev = 123;
650
+ _context.next = 126;
650
651
  return Promise.all(promises);
651
- case 125:
652
+ case 126:
652
653
  erpPromiseList = _context.sent;
653
654
  detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
654
655
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -658,25 +659,25 @@ export var orderBack = /*#__PURE__*/function () {
658
659
  })
659
660
  });
660
661
  });
661
- _context.next = 132;
662
+ _context.next = 133;
662
663
  break;
663
- case 129:
664
- _context.prev = 129;
665
- _context.t1 = _context["catch"](122);
664
+ case 130:
665
+ _context.prev = 130;
666
+ _context.t1 = _context["catch"](123);
666
667
  console.error('调用erp获取宝贝编码错误', _context.t1);
667
- case 132:
668
+ case 133:
668
669
  // 判断是否存在签收时间组件
669
670
  hasSigningDatetime = HasTradeSigningDatetime(templateDetail); // 如存在签收时间组件且订单也有返回相应物流单号跟物流公司编码,则调用接口获取签收时间
670
671
  if (!hasSigningDatetime) {
671
- _context.next = 148;
672
+ _context.next = 149;
672
673
  break;
673
674
  }
674
675
  if (!(orderInfo !== null && orderInfo !== void 0 && orderInfo.expressLogisticsCompany && orderInfo !== null && orderInfo !== void 0 && orderInfo.expressLogisticsCode)) {
675
- _context.next = 147;
676
+ _context.next = 148;
676
677
  break;
677
678
  }
678
- _context.prev = 135;
679
- _context.next = 138;
679
+ _context.prev = 136;
680
+ _context.next = 139;
680
681
  return request({
681
682
  url: '/qy/logistics/logisticsSignTime',
682
683
  method: 'post',
@@ -686,21 +687,21 @@ export var orderBack = /*#__PURE__*/function () {
686
687
  mailNo: orderInfo.expressLogisticsCode
687
688
  }
688
689
  });
689
- case 138:
690
+ case 139:
690
691
  signDatetime = _context.sent;
691
692
  detail['tradeSigningDateTime'] = signDatetime === null || signDatetime === void 0 ? void 0 : (_signDatetime$data = signDatetime.data) === null || _signDatetime$data === void 0 ? void 0 : _signDatetime$data.signTime;
692
- _context.next = 145;
693
+ _context.next = 146;
693
694
  break;
694
- case 142:
695
- _context.prev = 142;
696
- _context.t2 = _context["catch"](135);
695
+ case 143:
696
+ _context.prev = 143;
697
+ _context.t2 = _context["catch"](136);
697
698
  console.error('调用签收时间错误', _context.t2);
698
- case 145:
699
- _context.next = 148;
699
+ case 146:
700
+ _context.next = 149;
700
701
  break;
701
- case 147:
702
- detail['tradeSigningDateTime'] = '';
703
702
  case 148:
703
+ detail['tradeSigningDateTime'] = '';
704
+ case 149:
704
705
  values = orderBackFormValues({
705
706
  detail: detail,
706
707
  _get_order_fail_: !orderInfo,
@@ -753,21 +754,21 @@ export var orderBack = /*#__PURE__*/function () {
753
754
  shopId: shopId
754
755
  }));
755
756
  callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
756
- _context.next = 160;
757
+ _context.next = 161;
757
758
  break;
758
- case 157:
759
- _context.prev = 157;
759
+ case 158:
760
+ _context.prev = 158;
760
761
  _context.t3 = _context["catch"](27);
761
762
  console.error(_context.t3);
762
- case 160:
763
- _context.prev = 160;
763
+ case 161:
764
+ _context.prev = 161;
764
765
  setLoading === null || setLoading === void 0 ? void 0 : setLoading(false);
765
- return _context.finish(160);
766
- case 163:
766
+ return _context.finish(161);
767
+ case 164:
767
768
  case "end":
768
769
  return _context.stop();
769
770
  }
770
- }, _callee, null, [[7, 14, 17, 20], [27, 157, 160, 163], [122, 129], [135, 142]]);
771
+ }, _callee, null, [[7, 14, 17, 20], [27, 158, 161, 164], [123, 130], [136, 143]]);
771
772
  }));
772
773
  return function orderBack(_x) {
773
774
  return _ref2.apply(this, arguments);
@@ -1110,6 +1111,7 @@ export var reversalFormValues = function reversalFormValues() {
1110
1111
  case 'JST_RETURN_GOODS':
1111
1112
  case 'KM_REISSUE_GOODS':
1112
1113
  case 'JY_REISSUE_GOODS':
1114
+ case 'JKY_REISSUE_GOODS':
1113
1115
  prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
1114
1116
  break;
1115
1117
  case 'BS_DELIVERY_NO':
@@ -1,5 +1,5 @@
1
1
  import { HasFilterHandle } from "./tools";
2
- import { bsOrderDetail, wlnOrderDetail, wdtOrderDetail, bsE3OrderDetail, kmOrderDetail, gyOrderDetail, skxOrderDetail, jyOrderDetail, skxReturnOrderDetail } from "../../model/servers/api";
2
+ import { bsOrderDetail, wlnOrderDetail, wdtOrderDetail, bsE3OrderDetail, kmOrderDetail, jkyOrderDetail, gyOrderDetail, skxOrderDetail, jyOrderDetail, skxReturnOrderDetail } from "../../model/servers/api";
3
3
  import { servers } from '@kmkf-fe-packages/kmkf-utils';
4
4
  var orderBackKeyListMap = {
5
5
  hasJst: ['JST_SYSTEM_ORDER', 'JST_GOODS', 'JST_REISSUE_GOODS', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD'],
@@ -104,6 +104,14 @@ export var orderBackMap = function orderBackMap(_ref) {
104
104
  tid: order_no
105
105
  });
106
106
  }
107
+ },
108
+ hasJky: {
109
+ flag: HasFilterHandle(templateDetail, orderBackKeyListMap.hasJky),
110
+ promiseRequest: function promiseRequest() {
111
+ return jkyOrderDetail({
112
+ sourceTradeNos: order_no
113
+ });
114
+ }
107
115
  }
108
116
  };
109
117
  };
@@ -1130,6 +1130,28 @@ var processJyReissueGoods = function processJyReissueGoods(templateColumns) {
1130
1130
  };
1131
1131
  };
1132
1132
  };
1133
+ var processJkyReissueGoods = function processJkyReissueGoods(templateColumns) {
1134
+ return function (getValue) {
1135
+ return function (nex, config) {
1136
+ var orderNo = '';
1137
+ var tradeId = templateColumns === null || templateColumns === void 0 ? void 0 : templateColumns.find(function (col) {
1138
+ return col.workOrderComponentType === 'TRADE_ID_INPUT';
1139
+ });
1140
+ if (tradeId) {
1141
+ orderNo = getValue("".concat(tradeId.uniqueKey, "_").concat(updateWorkTypeKeys[tradeId.workOrderComponentType]));
1142
+ }
1143
+ return _defineProperty({}, nex.uniqueKey, {
1144
+ jkySystemOrder: {
1145
+ orderNo: orderNo
1146
+ },
1147
+ jkyReissueType: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jkyReissueType")), !isNull(config === null || config === void 0 ? void 0 : config.initReason) ? [config.initReason] : ['1']),
1148
+ jkyReissueGoods: jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_jkyReissueGoods")), []),
1149
+ shopCode: getValue("".concat(nex.uniqueKey, "_shopCode")),
1150
+ jkySystemOrderNo: getValue("".concat(nex.uniqueKey, "_jkySystemOrderNo"))
1151
+ });
1152
+ };
1153
+ };
1154
+ };
1133
1155
  var processGyReissueGoods = function processGyReissueGoods(templateColumns) {
1134
1156
  return function (getValue) {
1135
1157
  return function (nex, config) {
@@ -1223,14 +1245,14 @@ var processJstReturnGoods = function processJstReturnGoods(templateColumns) {
1223
1245
  };
1224
1246
  var processLabel = function processLabel(getValue) {
1225
1247
  return function (nex, config) {
1226
- var _ref81;
1227
- return _ref81 = {}, _defineProperty(_ref81, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref81, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref81;
1248
+ var _ref82;
1249
+ return _ref82 = {}, _defineProperty(_ref82, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _defineProperty(_ref82, "".concat(nex.uniqueKey, "_label"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_label")), [])), _ref82;
1228
1250
  };
1229
1251
  };
1230
1252
  var processMemberLevel = function processMemberLevel(getValue) {
1231
1253
  return function (nex, config) {
1232
- var _ref82;
1233
- return _ref82 = {}, _defineProperty(_ref82, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref82, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref82;
1254
+ var _ref83;
1255
+ return _ref83 = {}, _defineProperty(_ref83, nex.uniqueKey, jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _defineProperty(_ref83, "".concat(nex.uniqueKey, "_memberLevel"), jsonParseSecurity(getValue("".concat(nex.uniqueKey, "_memberLevel")), [])), _ref83;
1234
1256
  };
1235
1257
  };
1236
1258
  var processAfterSalesOrderId = function processAfterSalesOrderId(getValue) {
@@ -1363,6 +1385,7 @@ var transformWorkOrderData = function transformWorkOrderData(templateColumns) {
1363
1385
  KM_GOODS: processKmGoods(templateColumns),
1364
1386
  KM_REISSUE_GOODS: processKmReissueGoods(templateColumns),
1365
1387
  JY_REISSUE_GOODS: processJyReissueGoods(templateColumns),
1388
+ JKY_REISSUE_GOODS: processJkyReissueGoods(templateColumns),
1366
1389
  JST_GOODS: processJstGoods(templateColumns),
1367
1390
  BS_REISSUE_GOODS: processBsReissueGoods,
1368
1391
  BS_EXCHANGE_GOODS: processBsExchangeGoods,
@@ -80,6 +80,7 @@ export declare const bsOrderDetail: (data: any) => Promise<any>;
80
80
  export declare const wdtOrderDetail: (data: any) => Promise<any>;
81
81
  export declare const bsE3OrderDetail: (data: any) => Promise<any>;
82
82
  export declare const kmOrderDetail: (data: any) => Promise<serverProps<any>>;
83
+ export declare const jkyOrderDetail: (data: any) => Promise<serverProps<any>>;
83
84
  export declare const gyOrderDetail: (data: any) => Promise<any>;
84
85
  export declare const skxOrderDetail: (data: any) => Promise<any>;
85
86
  export declare const skxReturnOrderDetail: (data: any) => Promise<any>;
@@ -459,6 +459,14 @@ export var kmOrderDetail = function kmOrderDetail(data) {
459
459
  infoLevel: 'warning'
460
460
  });
461
461
  };
462
+ export var jkyOrderDetail = function jkyOrderDetail(data) {
463
+ return request({
464
+ url: '/qy/gdfw/jky/erp/trade/fullInfo',
465
+ method: 'post',
466
+ data: data,
467
+ infoLevel: 'warning'
468
+ });
469
+ };
462
470
 
463
471
  // 管易订单详情
464
472
  export var gyOrderDetail = function gyOrderDetail(data) {
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.44-beta.1",
3
+ "version": "2.2.44-beta.11",
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.44-beta.1",
36
- "@kmkf-fe-packages/kmkf-utils": "2.2.44-beta.0",
37
- "@kmkf-fe-packages/services-components": "2.2.44-beta.1",
35
+ "@kmkf-fe-packages/basic-components": "2.2.44-beta.9",
36
+ "@kmkf-fe-packages/kmkf-utils": "2.2.44-beta.9",
37
+ "@kmkf-fe-packages/services-components": "2.2.44-beta.9",
38
38
  "@reduxjs/toolkit": "^1.8.5",
39
39
  "ahooks": "^3.7.4",
40
40
  "copy-to-clipboard": "^3.3.3",
@@ -75,7 +75,7 @@
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  },
78
- "gitHead": "c00744d32f63b39594689fb8310b85ff10662f4c",
78
+ "gitHead": "d9bbe8ab60c4a74ddafd5bacd396f20a5719012d",
79
79
  "gitHooks": {
80
80
  "pre-commit": "lint-staged"
81
81
  }