@kmkf-fe-packages/services-components 2.9.1-beta.15 → 2.9.1-beta.17

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.
@@ -1,6 +1,6 @@
1
1
  import LogisticsInterception from "../components/LogisticsInterception";
2
2
  import LogisticsMoreInterception from "../components/LogisticsMoreInterception";
3
- export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsSystemOrder").default | import("../components/Cascader").default | import("../components/JST/JstSendGood").default | import("../components/KM/KmExchange").default | import("../components/Logistics").default | import("../components/MsgStatus").default | import("../components/Payment").default | import("../components/PicturePro").default | import("../components/Public/Goods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/ReturnWarehouse").default | import("../components/ReceiverAddress").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Address").default | import("../components/Checkbox").default | import("../components/DataTime").default | import("../components/Select").default | import("../components/SelectOption").default | import("../components/Radio").default | import("../components/TextArea").default | import("../components/Picture").default | import("../components/MultSelect").default | import("../components/Grade").default | import("../components/Rate").default | import("../components/File").default | import("../components/PostIng").default | import("../components/SubForm").default | import("../components/CommonDataTime").default | import("../components/TradeId").default | import("../components/ShopName").default | import("../components/BuyerNick").default | import("../components/ReceiverName").default | import("../components/ReceiverMobile").default | import("../components/TradeDateTime").default | import("../components/ReturnLogistics").default | import("../components/ActualPayment").default | import("../components/Remark").default | import("../components/Alipay").default | import("../components/EItemSelect").default | import("../components/EItemId").default | import("../components/EItemEnCode").default | import("../components/SystemOrderNo").default | import("../components/Ordinary").default | import("../components/ThirdItemSelect").default | import("../components/Reissue/Logistics").default | import("../components/JST/JstItemSelect").default | import("../components/JST/JstSupply").default | import("../components/BS/BsGoods").default | import("../components/BsE3/BsGoods").default | import("../components/Public/Exchange").default | import("../components/BsE3/BsReissueE3").default | import("../components/BS/BsExchange").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").default | import("../components/BS/BsLogistics").default | import("../components/FlowStatusSelect").default | import("../components/FlowMarkSelect").default | import("../components/FlowTag").default | import("../components/TemplateSelect").default | import("../components/WorkOrderId").default | LogisticsInterception | LogisticsMoreInterception | import("../components/LogisticsTrajectory").default | import("../components/LogisticsMoreTrajectory").default | import("../components/PlatForm").default | import("../components/ShopInput").default | import("../components/Submitter").default | import("../components/PrevSubmitter").default | import("../components/FlowCreator").default | import("../components/Handler").default | import("../components/CompletedUser").default | import("../components/FlowWorkOrderId").default | import("../components/StatusSelect").default | import("../components/Calculation").default | import("../components/CommonSystemOrder").default | import("../components/CommonMultiStatus").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/WLN/WlnGoods").default | import("../components/BS/BsPosting").default | import("../components/NodeInput").default | import("../components/FlowWorkOrderStatus").default | import("../components/WDT/WdtGoods").default | import("../components/WDT/WdtRessuie").default | import("../components/WDT/WdtReturn").default | import("../components/WDT/WdtExchange").default | import("../components/WDT/WdtShopSelect").default | import("../components/KM/KmVideo").default | import("../components/CommonInput").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/AfterSalesOrderId").default | import("../components/GY/GyGoods").default | import("../components/GY/GyReissue").default | import("../components/GY/GyReturn").default | import("../components/Public/AsyncSelect").default | import("../components/SKX/SkxIdInputSelect").default | import("../components/SKX/SkxGoods").default | import("../components/OrderSubForm").default | import("../components/FlowOverallStatusSelect").default;
3
+ export declare const newRenderColumnItem: (effects: any) => (item: any) => import("../components/BS/BsSystemOrder").default | import("../components/Cascader").default | import("../components/CommonSystemOrder").default | import("../components/JST/JstSendGood").default | import("../components/KM/KmExchange").default | import("../components/Logistics").default | import("../components/Payment").default | import("../components/PicturePro").default | import("../components/Public/Goods").default | import("../components/Public/ReissueGoods").default | import("../components/Public/ReturnWarehouse").default | import("../components/ReceiverAddress").default | import("../components/StatusSelect").default | import("../components/TradeId").default | import("../components/Input").default | import("../components/TypeInput").default | import("../components/Address").default | import("../components/Checkbox").default | import("../components/DataTime").default | import("../components/Select").default | import("../components/SelectOption").default | import("../components/Radio").default | import("../components/TextArea").default | import("../components/Picture").default | import("../components/MultSelect").default | import("../components/Grade").default | import("../components/Rate").default | import("../components/File").default | import("../components/PostIng").default | import("../components/SubForm").default | import("../components/CommonDataTime").default | import("../components/ShopName").default | import("../components/BuyerNick").default | import("../components/ReceiverName").default | import("../components/ReceiverMobile").default | import("../components/TradeDateTime").default | import("../components/ReturnLogistics").default | import("../components/ActualPayment").default | import("../components/Remark").default | import("../components/Alipay").default | import("../components/EItemSelect").default | import("../components/EItemId").default | import("../components/EItemEnCode").default | import("../components/SystemOrderNo").default | import("../components/Ordinary").default | import("../components/ThirdItemSelect").default | import("../components/Reissue/Logistics").default | import("../components/JST/JstItemSelect").default | import("../components/JST/JstSupply").default | import("../components/BS/BsGoods").default | import("../components/BsE3/BsGoods").default | import("../components/Public/Exchange").default | import("../components/BsE3/BsReissueE3").default | import("../components/BS/BsExchange").default | import("../components/BS/BsReissue").default | import("../components/BS/BsReturn").default | import("../components/BS/BsLogistics").default | import("../components/FlowStatusSelect").default | import("../components/FlowMarkSelect").default | import("../components/FlowTag").default | import("../components/TemplateSelect").default | import("../components/WorkOrderId").default | LogisticsInterception | LogisticsMoreInterception | import("../components/LogisticsTrajectory").default | import("../components/LogisticsMoreTrajectory").default | import("../components/PlatForm").default | import("../components/ShopInput").default | import("../components/Submitter").default | import("../components/PrevSubmitter").default | import("../components/FlowCreator").default | import("../components/Handler").default | import("../components/CompletedUser").default | import("../components/FlowWorkOrderId").default | import("../components/Calculation").default | import("../components/CommonMultiStatus").default | import("../components/NodeDeadLine").default | import("../components/HandlerDeadLine").default | import("../components/NodeStayDuration").default | import("../components/WLN/WlnGoods").default | import("../components/BS/BsPosting").default | import("../components/NodeInput").default | import("../components/FlowWorkOrderStatus").default | import("../components/MsgStatus").default | import("../components/WDT/WdtGoods").default | import("../components/WDT/WdtRessuie").default | import("../components/WDT/WdtReturn").default | import("../components/WDT/WdtExchange").default | import("../components/WDT/WdtShopSelect").default | import("../components/KM/KmVideo").default | import("../components/CommonInput").default | import("../components/PaymentVoucherCode").default | import("../components/Label").default | import("../components/MemberLevel").default | import("../components/AfterSalesOrderId").default | import("../components/GY/GyGoods").default | import("../components/GY/GyReissue").default | import("../components/GY/GyReturn").default | import("../components/Public/AsyncSelect").default | import("../components/SKX/SkxIdInputSelect").default | import("../components/SKX/SkxGoods").default | import("../components/OrderSubForm").default | import("../components/FlowOverallStatusSelect").default;
4
4
  export declare const useColumnsConfig: ({ queryWorkOrderDetail, flatTemplateList, shopList, sortState, onChangeSort, handleReset, handleSubmit, handleChangeSingleWorkOrderMark, userList, tbAppKey, isShare, openSingleColumnsFilter, openSingleColumnsSort, }: {
5
5
  queryWorkOrderDetail?: ((p: any) => void) | undefined;
6
6
  flatTemplateList?: any;
@@ -311,7 +311,7 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
311
311
  getShopList().then(function (_ref5) {
312
312
  var data = _ref5.data;
313
313
  setShopList(data);
314
- }).catch(function () {});
314
+ }).catch(console.warn);
315
315
  queryCompanyUserSimpleInfoList().then(function (_ref6) {
316
316
  var data = _ref6.data;
317
317
  setUserList((data || []).map(function (_ref7) {
@@ -322,7 +322,7 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
322
322
  value: userKey
323
323
  };
324
324
  }));
325
- }).catch(function () {});
325
+ }).catch(console.warn);
326
326
  getGroupList().then(function (_ref8) {
327
327
  var data = _ref8.data;
328
328
  setGroupList((data || []).map(function (_ref9) {
@@ -335,7 +335,7 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
335
335
  relationUserList: relationUserList
336
336
  };
337
337
  }));
338
- }).catch(function () {});
338
+ }).catch(console.warn);
339
339
 
340
340
  // return () => {
341
341
  // setShopList(void 0);
@@ -419,9 +419,13 @@ export var useGoodsSourceFormat = function useGoodsSourceFormat(goodsSource) {
419
419
  // newFilterItems,
420
420
  // allTableColumns,
421
421
  // });
422
- }).catch(function (error) {});
422
+ }).catch(function (error) {
423
+ console.log("**** 获取表头信息 error", error);
424
+ });
423
425
  }
424
- }).catch(function (error) {});
426
+ }).catch(function (error) {
427
+ console.log("**** in 获取流程数据 error", error);
428
+ });
425
429
  }
426
430
  }, [shopList, userList, groupList]);
427
431
  return {
@@ -33,6 +33,7 @@ function useGetHasErpData(reduxData) {
33
33
  try {
34
34
  companyUserConfig = JSON.parse(companyUserConfig);
35
35
  } catch (e) {
36
+ console.error("companyUserConfig转换异常", companyUserConfig);
36
37
  companyUserConfig = {};
37
38
  }
38
39
  }
@@ -62,7 +62,9 @@ var Global = function Global(_ref) {
62
62
  }
63
63
  setUserInfo(_userInfo);
64
64
  localStorage.setItem("reduxData_userInfo", JSON.stringify(_userInfo));
65
- } catch (e) {}
65
+ } catch (e) {
66
+ console.error(e);
67
+ }
66
68
  }, [JSON.stringify(reduxData)]);
67
69
  useEffect(function () {
68
70
  initDataSource();
@@ -29,6 +29,7 @@ var OperationLog = function OperationLog(_ref) {
29
29
  beforeList = JSON.parse(before);
30
30
  afterList = JSON.parse(after);
31
31
  } catch (e) {
32
+ console.log(e);
32
33
  beforeList = [];
33
34
  afterList = [];
34
35
  }
@@ -135,6 +136,7 @@ var OperationLog = function OperationLog(_ref) {
135
136
  }
136
137
  return /*#__PURE__*/React.createElement("div", null, content);
137
138
  } catch (e) {
139
+ console.error("日志信息JSON转换异常", e);
138
140
  return /*#__PURE__*/React.createElement("div", null, content);
139
141
  }
140
142
  };
@@ -148,6 +148,7 @@ var BsGoods = /*#__PURE__*/_createClass(function BsGoods(options) {
148
148
  required: true,
149
149
  validator: function validator(_, value) {
150
150
  var _value$bsGoods3;
151
+ console.log("111");
151
152
  if (!value || !(value !== null && value !== void 0 && (_value$bsGoods3 = value.bsGoods) !== null && _value$bsGoods3 !== void 0 && _value$bsGoods3.length)) {
152
153
  return Promise.reject(new Error("请选择bs商品"));
153
154
  }
@@ -337,15 +337,15 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
337
337
  idKey = _ref8.idKey;
338
338
  var getContentData = function getContentData(item, index) {
339
339
  if (item.platformId) return {
340
- text: "平台售后单号",
340
+ text: item.hiddenPrefix ? undefined : "平台售后单号",
341
341
  id: item.platformId
342
342
  };
343
343
  if (item.returnLogisticsCode) return {
344
- text: "物流单号",
344
+ text: item.hiddenPrefix ? undefined : "物流单号",
345
345
  id: item.returnLogisticsCode
346
346
  };
347
347
  return {
348
- text: "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1),
348
+ text: item.hiddenPrefix ? undefined : "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1),
349
349
  id: item.systemOrderId || item.systemOrderNo || (item === null || item === void 0 ? void 0 : item[idKey])
350
350
  };
351
351
  };
@@ -355,7 +355,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
355
355
  style: {
356
356
  textAlign: "center"
357
357
  }
358
- }, contentData.text, "\uFF1A", contentData.id));
358
+ }, contentData.text ? "".concat(contentData.text, "\uFF1A") : "", contentData.id));
359
359
  };
360
360
  return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
361
361
  var _options$find;
@@ -377,7 +377,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
377
377
  var currentOption = options.find(function (option) {
378
378
  return item[valueKey] === option.value;
379
379
  });
380
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, isShowPopover ? /*#__PURE__*/React.createElement(Popover, {
380
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, isShowPopover && getContentData(item, index).text ? /*#__PURE__*/React.createElement(Popover, {
381
381
  content: orderContent(item, index),
382
382
  overlayStyle: {
383
383
  zIndex: 1080
@@ -769,7 +769,7 @@ export var KmVideoRender = function KmVideoRender(_ref13) {
769
769
  src: fileUrl
770
770
  })));
771
771
  };
772
- var RADIO_TABLE_KEYS = ['PLATFORM_AFTER_SALES_ORDER'];
772
+ var RADIO_TABLE_KEYS = ["PLATFORM_AFTER_SALES_ORDER"];
773
773
  export var BsSystemOrderTable = function BsSystemOrderTable(_ref14) {
774
774
  var value = _ref14.value,
775
775
  type = _ref14.type,
@@ -803,7 +803,7 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref14) {
803
803
  PLATFORM_AFTER_SALES_ORDER: "afterSaleOrderId"
804
804
  };
805
805
  var rowSelection = {
806
- type: isRadio ? 'radio' : 'checkbox',
806
+ type: isRadio ? "radio" : "checkbox",
807
807
  selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || ((value === null || value === void 0 ? void 0 : value.showOrderInfo) || []).reduce(function (prv, next) {
808
808
  if (next.select) {
809
809
  prv.push(next[rowKeyMap[type]] || "billNo");
@@ -1,6 +1,7 @@
1
1
  // 查询订单详情
2
2
  export var queryOrderDetail = function queryOrderDetail(tid) {
3
3
  var _window, _window$parent;
4
+ console.log('请求ERP订单详情', tid);
4
5
  (_window = window) === null || _window === void 0 ? void 0 : (_window$parent = _window.parent) === null || _window$parent === void 0 ? void 0 : _window$parent.postMessage({
5
6
  method: 'queryOrder',
6
7
  data: {
@@ -12,6 +13,7 @@ export var queryOrderDetail = function queryOrderDetail(tid) {
12
13
  // 查询抖店openId
13
14
  export var queryDouDianOpenId = function queryDouDianOpenId(originTid) {
14
15
  var _window2, _window2$parent;
16
+ console.log('查询抖音店铺买家id', originTid);
15
17
  (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$parent = _window2.parent) === null || _window2$parent === void 0 ? void 0 : _window2$parent.postMessage({
16
18
  method: 'queryDouDianOpenId',
17
19
  data: {
@@ -74,7 +74,9 @@ var PictureName = /*#__PURE__*/_createClass(function PictureName(options) {
74
74
  document.body.removeChild(a);
75
75
  window.URL.revokeObjectURL(url);
76
76
  });
77
- } catch (error) {}
77
+ } catch (error) {
78
+ console.error(error);
79
+ }
78
80
  };
79
81
  return /*#__PURE__*/React.createElement(Space, {
80
82
  className: "pictruePc"
@@ -92,7 +92,9 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
92
92
  document.body.removeChild(a);
93
93
  window.URL.revokeObjectURL(url);
94
94
  });
95
- } catch (error) {}
95
+ } catch (error) {
96
+ console.error(error);
97
+ }
96
98
  } else {
97
99
  copy("".concat(hostUrl, "/").concat(item.url));
98
100
  message.success('图片链接复制成功');
@@ -31,7 +31,7 @@ declare class BasicPosting implements ComponentInterface {
31
31
  sortColumns: SortColumnsField;
32
32
  headerProvince: boolean;
33
33
  constructor(options: PickOption);
34
- getChildren: () => (Province | City | District | Detail | ReceiverName | ReceiverMobile | undefined)[];
34
+ getChildren: () => (City | Detail | District | Province | ReceiverMobile | ReceiverName | undefined)[];
35
35
  getSortColumns: (sortColumns: string | undefined) => SortColumnsField;
36
36
  renderPc: (value: any, record: Record) => React.JSX.Element | null;
37
37
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -45,7 +45,9 @@ var typeMap = {
45
45
  }
46
46
  version = ((_companyUserConfig = companyUserConfig) === null || _companyUserConfig === void 0 ? void 0 : (_companyUserConfig$pl = _companyUserConfig.plugins) === null || _companyUserConfig$pl === void 0 ? void 0 : (_companyUserConfig$pl2 = _companyUserConfig$pl.wdt) === null || _companyUserConfig$pl2 === void 0 ? void 0 : _companyUserConfig$pl2.version) || "flagship";
47
47
  }
48
- } catch (error) {}
48
+ } catch (error) {
49
+ console.error(error);
50
+ }
49
51
  if (version === "flagship") return 1;
50
52
  },
51
53
  handleOptions: function handleOptions(options) {
@@ -227,14 +229,15 @@ var AsyncSelect = /*#__PURE__*/function () {
227
229
  componentConfig: this.componentConfig
228
230
  });
229
231
  }
230
- _context.next = 13;
232
+ _context.next = 14;
231
233
  break;
232
234
  case 11:
233
235
  _context.prev = 11;
234
236
  _context.t1 = _context["catch"](1);
235
- case 13:
236
- return _context.abrupt("return", options);
237
+ console.debug("api error", _context.t1);
237
238
  case 14:
239
+ return _context.abrupt("return", options);
240
+ case 15:
238
241
  case "end":
239
242
  return _context.stop();
240
243
  }
@@ -94,12 +94,13 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
94
94
  copy("".concat(addressText).concat(detail));
95
95
  message.success('复制成功');
96
96
  case 14:
97
- _context.next = 18;
97
+ _context.next = 19;
98
98
  break;
99
99
  case 16:
100
100
  _context.prev = 16;
101
101
  _context.t0 = _context["catch"](1);
102
- case 18:
102
+ console.log(_context.t0);
103
+ case 19:
103
104
  case "end":
104
105
  return _context.stop();
105
106
  }
@@ -83,6 +83,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
83
83
  });
84
84
  _defineProperty(this, "renderClient", function (record) {
85
85
  var _this$optionsMap;
86
+ console.log("renderClient", record, _this.getIsValue());
86
87
  // 特殊自定义组件为平台状态时匹配出label
87
88
  var label = _this.getIsValue() ? (_this$optionsMap = _this.optionsMap) === null || _this$optionsMap === void 0 ? void 0 : _this$optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]] : record === null || record === void 0 ? void 0 : record[_this.id];
88
89
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -211,6 +211,7 @@ export var queryExpressInterceptData = function queryExpressInterceptData() {
211
211
  value: _toConsumableArray(typeObj[key]).join(",")
212
212
  };
213
213
  });
214
+ console.log("typeObj---", typeObj, instance.typeOptions, companyTypeMap);
214
215
  instance.typeConditionOptions = Object.keys(instance.typeNameMap).map(function (key) {
215
216
  var type = key.split("|")[0];
216
217
  return {
@@ -238,7 +239,10 @@ export var queryExpressInterceptData = function queryExpressInterceptData() {
238
239
  }
239
240
  });
240
241
  instance.statusConditionOptions = tempList;
241
- }).catch(function (e) {});
242
+ console.log("instance-----2", instance);
243
+ }).catch(function (e) {
244
+ console.log(e);
245
+ });
242
246
  };
243
247
  export var queryLogisticsAddressData = function queryLogisticsAddressData() {
244
248
  return request({
@@ -249,7 +253,9 @@ export var queryLogisticsAddressData = function queryLogisticsAddressData() {
249
253
  var data = res.data;
250
254
  var instance = LogisticsAddressData.getInstance();
251
255
  instance.addressData = data;
252
- }).catch(function (e) {});
256
+ }).catch(function (e) {
257
+ console.log(e);
258
+ });
253
259
  };
254
260
  export var queryAllLogisticsCompany = function queryAllLogisticsCompany() {
255
261
  return request({
@@ -272,49 +278,50 @@ export var queryWdtLogisticsCompany = function queryWdtLogisticsCompany() {
272
278
  var instance = ExpressData.getInstance("wdt");
273
279
  return servers.getWdtSellerLogisticsCompanyRelation().then(function (data) {
274
280
  instance.expressData = data;
275
- }).catch(function () {});
281
+ }).catch(console.log);
276
282
  };
277
283
  export var queryBsE3LogisticsCompany = function queryBsE3LogisticsCompany() {
278
284
  var instance = ExpressData.getInstance("bsE3");
279
285
  return servers.BSE3.getLogisticsDataAsync().then(function (data) {
280
286
  instance.expressData = data;
281
- }).catch(function () {});
287
+ }).catch(console.log);
282
288
  };
283
289
  export var queryJSTLogisticsCompany = function queryJSTLogisticsCompany() {
284
290
  var instance = ExpressData.getInstance("jst");
285
291
  return servers.JST.getLogisticsDataAsync().then(function (data) {
286
292
  instance.expressData = data;
287
- }).catch(function () {});
293
+ }).catch(console.log);
288
294
  };
289
295
  export var queryGYLogisticsCompany = function queryGYLogisticsCompany() {
290
296
  var instance = ExpressData.getInstance("gy");
291
297
  return servers.GY.getLogisticsDataAsync().then(function (data) {
292
298
  instance.expressData = data;
293
- }).catch(function () {});
299
+ }).catch(console.log);
294
300
  };
295
301
  export var queryJYLogisticsCompany = function queryJYLogisticsCompany() {
296
302
  var instance = ExpressData.getInstance("jy");
297
303
  return servers.JY.getLogisticsDataAsync().then(function (data) {
298
304
  instance.expressData = data;
299
- }).catch(function () {});
305
+ }).catch(console.log);
300
306
  };
301
307
  export var queryJKYLogisticsCompany = function queryJKYLogisticsCompany() {
302
308
  var instance = ExpressData.getInstance("jky");
309
+ console.log("queryJKYLogisticsCompany");
303
310
  return servers.JKY.getLogisticsDataAsync().then(function (data) {
304
311
  instance.expressData = data;
305
- }).catch(function () {});
312
+ }).catch(console.log);
306
313
  };
307
314
  export var queryWLNLogisticsCompany = function queryWLNLogisticsCompany() {
308
315
  var instance = ExpressData.getInstance("wln");
309
316
  return servers.WLN.getLogisticsDataAsync().then(function (data) {
310
317
  instance.expressData = data;
311
- }).catch(function () {});
318
+ }).catch(console.log);
312
319
  };
313
320
  export var queryKMLogisticsCompany = function queryKMLogisticsCompany() {
314
321
  var instance = ExpressData.getInstance("km");
315
322
  return servers.KM.getLogisticsDataAsync().then(function (data) {
316
323
  instance.expressData = data;
317
- }).catch(function () {});
324
+ }).catch(console.log);
318
325
  };
319
326
  // 获取支付宝电子回单
320
327
  export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
@@ -338,6 +345,7 @@ export var queryLabel = function queryLabel() {
338
345
  var finalData = JSON.parse(data);
339
346
  instance.labelData = finalData;
340
347
  } catch (e) {
348
+ console.error("转换标签数据数据异常");
341
349
  instance.labelData = [];
342
350
  }
343
351
  });
@@ -52,10 +52,13 @@ var requestApi = function requestApi(_ref) {
52
52
  message.warn(res.message);
53
53
  } else if (infoLevel === 'error') {
54
54
  message.error(res.message);
55
- } else {}
55
+ } else {
56
+ console.log(res.message);
57
+ }
56
58
  reject(res);
57
59
  }
58
60
  }).catch(function (e) {
61
+ console.error('请求错误', e);
59
62
  reject(e);
60
63
  });
61
64
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.9.1-beta.15",
3
+ "version": "2.9.1-beta.17",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,8 +21,8 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.9.1-beta.15",
25
- "@kmkf-fe-packages/kmkf-utils": "2.9.1-beta.15",
24
+ "@kmkf-fe-packages/basic-components": "2.9.1-beta.17",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.9.1-beta.16",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
28
28
  "react-pdf-js": "^5.1.0"
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "0a90cf25939d9096bb5585a7518d1483161569f5",
44
+ "gitHead": "de249ba6b62462c8f8b55d8de791a5cf2574ec5c",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- var react_1 = require("react");
5
- var react_redux_1 = require("react-redux");
6
- var toolkit_1 = require("@reduxjs/toolkit");
7
- var getTemplate = function getTemplate(companyUserConfig) {
8
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
9
- return JSON.stringify({
10
- hasWln: (_c = (_b = (_a = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _a === void 0 ? void 0 : _a.wln) === null || _b === void 0 ? void 0 : _b.show) !== null && _c !== void 0 ? _c : false,
11
- hasWdt: (_f = (_e = (_d = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _d === void 0 ? void 0 : _d.wdt) === null || _e === void 0 ? void 0 : _e.show) !== null && _f !== void 0 ? _f : false,
12
- hasBs: (_j = (_h = (_g = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _g === void 0 ? void 0 : _g.bs) === null || _h === void 0 ? void 0 : _h.show) !== null && _j !== void 0 ? _j : false,
13
- hasE3: (_m = (_l = (_k = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _k === void 0 ? void 0 : _k.bse3) === null || _l === void 0 ? void 0 : _l.show) !== null && _m !== void 0 ? _m : false,
14
- hasJst: (_q = (_p = (_o = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _o === void 0 ? void 0 : _o.jst) === null || _p === void 0 ? void 0 : _p.show) !== null && _q !== void 0 ? _q : false,
15
- hasGy: (_t = (_s = (_r = companyUserConfig === null || companyUserConfig === void 0 ? void 0 : companyUserConfig.plugins) === null || _r === void 0 ? void 0 : _r.gy) === null || _s === void 0 ? void 0 : _s.show) !== null && _t !== void 0 ? _t : false
16
- });
17
- };
18
- function useGetHasErpData() {
19
- var companyUserConfig = react_redux_1.useSelector(toolkit_1.createSelector([function (state) {
20
- var _a, _b, _c, _d;
21
- /**
22
- * pc main
23
- * 端 workOrder
24
- * **/
25
- return (_d = (_b = (_a = state === null || state === void 0 ? void 0 : state.main) === null || _a === void 0 ? void 0 : _a.userInfo) !== null && _b !== void 0 ? _b : (_c = state === null || state === void 0 ? void 0 : state.workOrder) === null || _c === void 0 ? void 0 : _c.userInfo) !== null && _d !== void 0 ? _d : {};
26
- }], function (state) {
27
- var _a;
28
- var companyUserConfig = (_a = state === null || state === void 0 ? void 0 : state.companyUserConfig) !== null && _a !== void 0 ? _a : {};
29
- if (typeof companyUserConfig === "string") {
30
- try {
31
- companyUserConfig = JSON.parse(companyUserConfig);
32
- } catch (e) {
33
- companyUserConfig = {};
34
- }
35
- }
36
- return companyUserConfig;
37
- }));
38
- var _a = react_1.useState(getTemplate({})),
39
- hasErpDataJson = _a[0],
40
- setHasErpDataJson = _a[1];
41
- react_1.useEffect(function () {
42
- setHasErpDataJson(getTemplate(companyUserConfig));
43
- }, [companyUserConfig]);
44
- var hasErpData = react_1.useMemo(function () {
45
- return JSON.parse(hasErpDataJson);
46
- }, [hasErpDataJson]);
47
- return hasErpData;
48
- }
49
- exports["default"] = useGetHasErpData;
@@ -1,180 +0,0 @@
1
- "use strict";
2
-
3
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
4
- function adopt(value) {
5
- return value instanceof P ? value : new P(function (resolve) {
6
- resolve(value);
7
- });
8
- }
9
- return new (P || (P = Promise))(function (resolve, reject) {
10
- function fulfilled(value) {
11
- try {
12
- step(generator.next(value));
13
- } catch (e) {
14
- reject(e);
15
- }
16
- }
17
- function rejected(value) {
18
- try {
19
- step(generator["throw"](value));
20
- } catch (e) {
21
- reject(e);
22
- }
23
- }
24
- function step(result) {
25
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
26
- }
27
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28
- });
29
- };
30
- var __generator = this && this.__generator || function (thisArg, body) {
31
- var _ = {
32
- label: 0,
33
- sent: function sent() {
34
- if (t[0] & 1) throw t[1];
35
- return t[1];
36
- },
37
- trys: [],
38
- ops: []
39
- },
40
- f,
41
- y,
42
- t,
43
- g;
44
- return g = {
45
- next: verb(0),
46
- "throw": verb(1),
47
- "return": verb(2)
48
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
49
- return this;
50
- }), g;
51
- function verb(n) {
52
- return function (v) {
53
- return step([n, v]);
54
- };
55
- }
56
- function step(op) {
57
- if (f) throw new TypeError("Generator is already executing.");
58
- while (_) try {
59
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
60
- if (y = 0, t) op = [op[0] & 2, t.value];
61
- switch (op[0]) {
62
- case 0:
63
- case 1:
64
- t = op;
65
- break;
66
- case 4:
67
- _.label++;
68
- return {
69
- value: op[1],
70
- done: false
71
- };
72
- case 5:
73
- _.label++;
74
- y = op[1];
75
- op = [0];
76
- continue;
77
- case 7:
78
- op = _.ops.pop();
79
- _.trys.pop();
80
- continue;
81
- default:
82
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
83
- _ = 0;
84
- continue;
85
- }
86
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
87
- _.label = op[1];
88
- break;
89
- }
90
- if (op[0] === 6 && _.label < t[1]) {
91
- _.label = t[1];
92
- t = op;
93
- break;
94
- }
95
- if (t && _.label < t[2]) {
96
- _.label = t[2];
97
- _.ops.push(op);
98
- break;
99
- }
100
- if (t[2]) _.ops.pop();
101
- _.trys.pop();
102
- continue;
103
- }
104
- op = body.call(thisArg, _);
105
- } catch (e) {
106
- op = [6, e];
107
- y = 0;
108
- } finally {
109
- f = t = 0;
110
- }
111
- if (op[0] & 5) throw op[1];
112
- return {
113
- value: op[0] ? op[1] : void 0,
114
- done: true
115
- };
116
- }
117
- };
118
- exports.__esModule = true;
119
- var react_1 = require("react");
120
- var useGetHasErpData_1 = require("../hook/useGetHasErpData");
121
- var ahooks_1 = require("ahooks");
122
- var kmkf_utils_1 = require("@kmkf-fe-packages/kmkf-utils");
123
- function useGetErpAddressData(notJudgedErp) {
124
- var _this = this;
125
- var _a = react_1.useState("loading"),
126
- globalState = _a[0],
127
- setGlobalState = _a[1];
128
- var hasErpData = useGetHasErpData_1["default"]();
129
- ahooks_1.useUpdateEffect(function () {
130
- asyncQueryData(hasErpData, notJudgedErp);
131
- }, [hasErpData, notJudgedErp]);
132
- var asyncQueryData = function asyncQueryData(hasErpData, notJudgedErp) {
133
- return __awaiter(_this, void 0, void 0, function () {
134
- var hasBs, hasWdt, hasGy, promises, e_1;
135
- return __generator(this, function (_a) {
136
- switch (_a.label) {
137
- case 0:
138
- hasBs = hasErpData.hasBs, hasWdt = hasErpData.hasWdt, hasGy = hasErpData.hasGy;
139
- promises = [];
140
- if (hasBs || notJudgedErp) promises.push(kmkf_utils_1.servers.queryBsAddressData);
141
- if (hasWdt || notJudgedErp) promises.push(kmkf_utils_1.servers.queryWdtAddressData);
142
- if (hasGy || notJudgedErp) promises.push(kmkf_utils_1.servers.queryGyAddressData);
143
- _a.label = 1;
144
- case 1:
145
- _a.trys.push([1, 3,, 4]);
146
- return [4 /*yield*/, Promise.all(promises.map(function (promise) {
147
- return promise();
148
- }))];
149
- case 2:
150
- _a.sent();
151
- setGlobalState("success");
152
- return [3 /*break*/, 4];
153
- case 3:
154
- e_1 = _a.sent();
155
- setGlobalState("failed");
156
- return [3 /*break*/, 4];
157
- case 4:
158
- return [2 /*return*/];
159
- }
160
- });
161
- });
162
- };
163
-
164
- var onReload = function onReload() {
165
- return __awaiter(_this, void 0, void 0, function () {
166
- return __generator(this, function (_a) {
167
- switch (_a.label) {
168
- case 0:
169
- return [4 /*yield*/, asyncQueryData(hasErpData, notJudgedErp)];
170
- case 1:
171
- _a.sent();
172
- return [2 /*return*/];
173
- }
174
- });
175
- });
176
- };
177
-
178
- return [globalState, onReload];
179
- }
180
- exports["default"] = useGetErpAddressData;