@kmkf-fe-packages/kmkf-work-order-service-component 0.24.2-beta.5 → 0.24.2-beta.7

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.
@@ -84,7 +84,7 @@ var FormRender = function FormRender(props, ref) {
84
84
  var logisticsMappingConfig = useMemo(function () {
85
85
  return templateDetail.componentDtoList.filter(function (item) {
86
86
  var _item$componentConfig;
87
- return item.workOrderComponentType === 'LOGISTICS_TRAJECTORY_MORE' && ((_item$componentConfig = item.componentConfig) === null || _item$componentConfig === void 0 ? void 0 : _item$componentConfig.isOpen);
87
+ return ['LOGISTICS_TRAJECTORY_MORE', 'LOGISTICS_INTERCEPTION_MORE'].includes(item.workOrderComponentType) && ((_item$componentConfig = item.componentConfig) === null || _item$componentConfig === void 0 ? void 0 : _item$componentConfig.isOpen);
88
88
  });
89
89
  }, [templateDetail]);
90
90
  var finallyMappdingHideComponents = useRef(mappingConfig.hideComponents);
@@ -274,6 +274,53 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
274
274
  content: get(nowData, "".concat(item.uniqueKey, ".interceptAddress[2]"), ''),
275
275
  name: item.name
276
276
  });
277
+ } else if (item.workOrderComponentType === 'LOGISTICS_INTERCEPTION_MORE') {
278
+ var logisticsInterceptionList = get(nowData, "".concat(item.uniqueKey), []);
279
+ contentVoList.push({
280
+ uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptList"),
281
+ content: logisticsInterceptionList,
282
+ name: item.name
283
+ }, {
284
+ uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptCompanyList"),
285
+ content: logisticsInterceptionList.filter(function (t) {
286
+ return t.interceptCompany;
287
+ }).map(function (t) {
288
+ return t.interceptCompany + '';
289
+ }),
290
+ name: item.name
291
+ }, {
292
+ uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptCodeList"),
293
+ content: logisticsInterceptionList.filter(function (t) {
294
+ return t.interceptCode;
295
+ }).map(function (t) {
296
+ return t.interceptCode + '';
297
+ }),
298
+ name: item.name
299
+ }, {
300
+ uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptTypeList"),
301
+ content: logisticsInterceptionList.filter(function (t) {
302
+ return t.interceptType;
303
+ }).map(function (t) {
304
+ return t.interceptType + '';
305
+ }),
306
+ name: item.name
307
+ }, {
308
+ uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptStatusList"),
309
+ content: logisticsInterceptionList.filter(function (t) {
310
+ return t.interceptLogisticsStatus;
311
+ }).map(function (t) {
312
+ return t.interceptLogisticsStatus + '';
313
+ }),
314
+ name: item.name
315
+ }, {
316
+ uniqueKey: "".concat(item.uniqueKey, "_logisticsInterceptSnapshotList"),
317
+ content: logisticsInterceptionList.filter(function (t) {
318
+ return t.interceptLogisticsSnapshot;
319
+ }).map(function (t) {
320
+ return t.interceptLogisticsSnapshot + '';
321
+ }),
322
+ name: item.name
323
+ });
277
324
  } else if (item.workOrderComponentType === 'PICTURE') {
278
325
  var _value$map;
279
326
  var host = cache.getHost() || window.location.origin;
@@ -1105,8 +1152,9 @@ var transDataSource = function transDataSource(templateColumns) {
1105
1152
  } else if (nex.workOrderComponentType === 'FILE') {
1106
1153
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_file")], [])));
1107
1154
  } else if (nex.workOrderComponentType === 'POSTING') {
1108
- var _nex$componentConfig;
1109
- var needTrans = ((_nex$componentConfig = nex.componentConfig) === null || _nex$componentConfig === void 0 ? void 0 : _nex$componentConfig.showField) !== 'wdt';
1155
+ // PS: 旺店通收寄地址和其他的统一用code, 所以固定需要转,代码先保留
1156
+ var needTrans = true;
1157
+ // const needTrans = nex.componentConfig?.showField !== 'wdt'
1110
1158
  var address = [needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingProvince")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingProvince")], needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingCity")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingCity")]];
1111
1159
  //兼容地址是只有省市的
1112
1160
  var interceptDistrict = needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingDistrict")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingDistrict")];
@@ -1233,6 +1281,8 @@ var transDataSource = function transDataSource(templateColumns) {
1233
1281
  interceptLogisticsStatusOther: item.jsonMap["".concat(nex.uniqueKey, "_interceptLogisticsStatusOther")],
1234
1282
  interceptLogisticsSnapshot: item.jsonMap["".concat(nex.uniqueKey, "_interceptLogisticsSnapshot")]
1235
1283
  }));
1284
+ } else if (nex.workOrderComponentType === 'LOGISTICS_INTERCEPTION_MORE') {
1285
+ return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_logisticsInterceptList")], [])));
1236
1286
  } else if (nex.workOrderComponentType === 'LOGISTICS_TRAJECTORY') {
1237
1287
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
1238
1288
  trajectoryCompany: item.jsonMap["".concat(nex.uniqueKey, "_trajectoryCompany")],
@@ -1256,8 +1306,8 @@ var transDataSource = function transDataSource(templateColumns) {
1256
1306
  });
1257
1307
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), _itemList));
1258
1308
  } else if (nex.workOrderComponentType === 'ENTERPRISE_PAYMENT') {
1259
- var _objectSpread41;
1260
- return _objectSpread(_objectSpread({}, cur), {}, (_objectSpread41 = {}, _defineProperty(_objectSpread41, "".concat(nex.uniqueKey), {
1309
+ var _objectSpread42;
1310
+ return _objectSpread(_objectSpread({}, cur), {}, (_objectSpread42 = {}, _defineProperty(_objectSpread42, "".concat(nex.uniqueKey), {
1261
1311
  enterprisePaymentAlipayNick: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick")],
1262
1312
  enterprisePaymentAlipayNo: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo")],
1263
1313
  enterprisePaymentBuyerNick: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick")],
@@ -1265,7 +1315,7 @@ var transDataSource = function transDataSource(templateColumns) {
1265
1315
  enterprisePaymentRefundFee: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentRefundFee")],
1266
1316
  enterprisePaymentStatus: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentStatus")],
1267
1317
  enterprisePaymentTid: item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTid")]
1268
- }), _defineProperty(_objectSpread41, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick")]), _defineProperty(_objectSpread41, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo")]), _defineProperty(_objectSpread41, "".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick")]), _defineProperty(_objectSpread41, "".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentRefundFee")]), _defineProperty(_objectSpread41, "".concat(nex.uniqueKey, "_enterprisePaymentStatus"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentStatus")]), _defineProperty(_objectSpread41, "".concat(nex.uniqueKey, "_enterprisePaymentTime"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTime")]), _defineProperty(_objectSpread41, "".concat(nex.uniqueKey, "_enterprisePaymentTid"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTid")]), _objectSpread41));
1318
+ }), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNick")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentAlipayNo")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentBuyerNick")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentRefundFee"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentRefundFee")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentStatus"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentStatus")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentTime"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTime")]), _defineProperty(_objectSpread42, "".concat(nex.uniqueKey, "_enterprisePaymentTid"), item.jsonMap["".concat(nex.uniqueKey, "_enterprisePaymentTid")]), _objectSpread42));
1269
1319
  } else if (nex.workOrderComponentType === 'SYSTEM_ORDER_NO') {
1270
1320
  return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), item.jsonMap["".concat(nex.uniqueKey, "_systemOrderNo")]));
1271
1321
  } else if (nex.workOrderComponentType === 'JST_LOGISTICS') {
@@ -1569,7 +1619,7 @@ export var calcWorkOrderList = function calcWorkOrderList(source, templateColumn
1569
1619
  //订单返填
1570
1620
  export var orderBack = /*#__PURE__*/function () {
1571
1621
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
1572
- var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWdt, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, wdtOrder, orderInfo, jstInfo, bsOrders, wlnOrders, wdtOrders, bsInfo, wlnInfo, wdtInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread70, _cacheOrderInfo;
1622
+ var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWdt, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, wdtOrder, orderInfo, jstInfo, bsOrders, wlnOrders, wdtOrders, bsInfo, wlnInfo, wdtInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread71, _cacheOrderInfo;
1573
1623
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1574
1624
  while (1) switch (_context.prev = _context.next) {
1575
1625
  case 0:
@@ -1803,7 +1853,7 @@ export var orderBack = /*#__PURE__*/function () {
1803
1853
  sessionStorage.setItem('cacheOmsOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, cacheOrderInfo), {}, _defineProperty({}, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, plat === null || plat === void 0 ? void 0 : plat.subOrderNo, _objectSpread(_objectSpread({}, formValue), values))))));
1804
1854
  } else {
1805
1855
  _cacheOrderInfo = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
1806
- sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (_objectSpread70 = {}, _defineProperty(_objectSpread70, order_no, values), _defineProperty(_objectSpread70, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, order_no, _objectSpread(_objectSpread({}, formValue), values))), _objectSpread70))));
1856
+ sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (_objectSpread71 = {}, _defineProperty(_objectSpread71, order_no, values), _defineProperty(_objectSpread71, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, order_no, _objectSpread(_objectSpread({}, formValue), values))), _objectSpread71))));
1807
1857
  }
1808
1858
  }
1809
1859
  // console.log('orderback', values);
@@ -2184,7 +2234,7 @@ export var bsSystemOrderBackValues = function bsSystemOrderBackValues(_ref6) {
2184
2234
  //如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
2185
2235
  if (!(value !== null && value !== void 0 && value.selectedRows)) return;
2186
2236
  var bsGoodsComponent = (_templateList$compone = templateList.componentDtoList) === null || _templateList$compone === void 0 ? void 0 : _templateList$compone.filter(function (item) {
2187
- return ['BS_GOODS', 'BS_DELIVERY_NO', 'BS_SEND_GOOD', 'BS_LOGISTICS', 'LOGISTICS_TRAJECTORY_MORE'].includes(item.workOrderComponentType);
2237
+ return ['BS_GOODS', 'BS_DELIVERY_NO', 'BS_SEND_GOOD', 'BS_LOGISTICS', 'LOGISTICS_TRAJECTORY_MORE', 'LOGISTICS_INTERCEPTION_MORE'].includes(item.workOrderComponentType);
2188
2238
  });
2189
2239
  if (!(bsGoodsComponent !== null && bsGoodsComponent !== void 0 && bsGoodsComponent.length)) return;
2190
2240
  var bsGoodsValue = form.getFieldValue(bsGoodsComponent[0].uniqueKey);
@@ -2195,7 +2245,6 @@ export var bsSystemOrderBackValues = function bsSystemOrderBackValues(_ref6) {
2195
2245
  var values = bsOrderBackFormValues(orderInfo, {
2196
2246
  componentDtoList: bsGoodsComponent
2197
2247
  });
2198
- console.log('bsSystemOrderBackValues', values);
2199
2248
  form.setFieldsValue(values);
2200
2249
  };
2201
2250
 
@@ -2334,31 +2383,67 @@ export var setLogisticsInfo = function setLogisticsInfo(_ref9) {
2334
2383
  codeUniqueKey = _componentConfig$logi.codeUniqueKey,
2335
2384
  codeType = _componentConfig$logi.codeType;
2336
2385
  if (companyUniqueKey === uniqueKey && workOrderComponentType === companyType) {
2337
- if (companyType === 'INPUT') {
2338
- prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2339
- trajectoryCompany: ExpressData.getInstance().getExpressCodeByName(value, true)
2340
- })];
2341
- } else if (companyType === 'EXPRESS_LOGISTICS_SELECT') {
2342
- prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2343
- trajectoryCompany: value.company,
2344
- trajectoryCode: value.order
2345
- })];
2346
- } else if (companyType === 'BS_LOGISTICS') {
2347
- prv[next.uniqueKey] = value.map(function (item) {
2348
- return {
2349
- trajectoryCompany: item.logisticsCompany,
2350
- trajectoryCode: item.logisticsCode,
2351
- trajectorySnapshot: '',
2352
- trajectoryPhone: ''
2353
- };
2354
- });
2386
+ if (next.workOrderComponentType === 'LOGISTICS_TRAJECTORY_MORE') {
2387
+ if (companyType === 'INPUT') {
2388
+ prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2389
+ trajectoryCompany: ExpressData.getInstance().getExpressCodeByName(value, true)
2390
+ })];
2391
+ } else if (companyType === 'EXPRESS_LOGISTICS_SELECT') {
2392
+ prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2393
+ trajectoryCompany: value.company,
2394
+ trajectoryCode: value.order
2395
+ })];
2396
+ } else if (companyType === 'BS_LOGISTICS') {
2397
+ prv[next.uniqueKey] = value.map(function (item) {
2398
+ return {
2399
+ trajectoryCompany: item.logisticsCompany,
2400
+ trajectoryCode: item.logisticsCode,
2401
+ trajectorySnapshot: '',
2402
+ trajectoryPhone: ''
2403
+ };
2404
+ });
2405
+ }
2406
+ } else if (next.workOrderComponentType === 'LOGISTICS_INTERCEPTION_MORE') {
2407
+ if (companyType === 'INPUT') {
2408
+ prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2409
+ interceptCompany: ExpressData.getInstance().getExpressCodeByName(value, false)
2410
+ })];
2411
+ } else if (companyType === 'EXPRESS_LOGISTICS_SELECT') {
2412
+ prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2413
+ interceptCompany: value.company,
2414
+ interceptCode: value.order
2415
+ })];
2416
+ } else if (companyType === 'BS_LOGISTICS') {
2417
+ prv[next.uniqueKey] = value.map(function (item) {
2418
+ return {
2419
+ interceptCompany: item.logisticsCompany,
2420
+ interceptCode: item.logisticsCode,
2421
+ interceptType: undefined,
2422
+ interceptSenderMobile: undefined,
2423
+ interceptAddress: [],
2424
+ interceptDetail: undefined,
2425
+ interceptReceiverName: undefined,
2426
+ interceptReceiverMobile: undefined,
2427
+ interceptStatus: undefined,
2428
+ interceptOther: undefined
2429
+ };
2430
+ });
2431
+ }
2355
2432
  }
2356
2433
  }
2357
2434
  if (codeUniqueKey === uniqueKey && workOrderComponentType === codeType) {
2358
- if (companyType === 'INPUT') {
2359
- prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2360
- trajectoryCode: value
2361
- })];
2435
+ if (next.workOrderComponentType === 'LOGISTICS_TRAJECTORY_MORE') {
2436
+ if (companyType === 'INPUT') {
2437
+ prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2438
+ trajectoryCode: value
2439
+ })];
2440
+ }
2441
+ } else if (next.workOrderComponentType === 'LOGISTICS_INTERCEPTION_MORE') {
2442
+ if (companyType === 'INPUT') {
2443
+ prv[next.uniqueKey] = [_objectSpread(_objectSpread({}, logisticsValues === null || logisticsValues === void 0 ? void 0 : logisticsValues[0]), {}, {
2444
+ interceptCode: value
2445
+ })];
2446
+ }
2362
2447
  }
2363
2448
  }
2364
2449
  return prv;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-work-order-service-component",
3
- "version": "0.24.2-beta.5",
3
+ "version": "0.24.2-beta.7",
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": "^0.24.2-beta.5",
36
- "@kmkf-fe-packages/kmkf-utils": "^0.24.2-beta.2",
37
- "@kmkf-fe-packages/services-components": "^0.24.2-beta.5",
35
+ "@kmkf-fe-packages/basic-components": "^0.24.2-beta.7",
36
+ "@kmkf-fe-packages/kmkf-utils": "^0.24.2-beta.7",
37
+ "@kmkf-fe-packages/services-components": "^0.24.2-beta.7",
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": "93d1f53448bce918fe2c3b859a641f95274be673",
76
+ "gitHead": "5a6b4943077fcfdbd99fd09141aa4633151793ea",
77
77
  "gitHooks": {
78
78
  "pre-commit": "lint-staged"
79
79
  }