@kmkf-fe-packages/services-components 1.17.5-beta.12 → 1.17.5-beta.14

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 React from "react";
2
2
  declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryLabel" | "queryWdtLogisticsCompany" | "queryWdtSendData";
3
- declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
3
+ declare const Global: ({ children, requestList, repeatRequestList, }: React.PropsWithChildren<{
4
4
  requestList?: RequestType[] | undefined;
5
5
  repeatRequestList?: Record<string, () => Promise<any>> | undefined;
6
6
  }>) => React.JSX.Element;
@@ -14,9 +14,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
14
14
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useEffect, useState } from "react";
17
- import { Skeleton, Result, Button } from "antd";
17
+ import { Skeleton, Button, Alert, Space } from "antd";
18
18
  import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryLabel, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
19
- import { servers } from '@kmkf-fe-packages/kmkf-utils';
19
+ import { servers } from "@kmkf-fe-packages/kmkf-utils";
20
20
  var Global = function Global(_ref) {
21
21
  var children = _ref.children,
22
22
  _ref$requestList = _ref.requestList,
@@ -93,15 +93,17 @@ var Global = function Global(_ref) {
93
93
  });
94
94
  }
95
95
  if (globalState === "failed") {
96
- return /*#__PURE__*/React.createElement(Result, {
97
- status: "error",
98
- title: "\u6570\u636E\u52A0\u8F7D\u5F02\u5E38,\u8BF7\u5237\u65B0\u91CD\u8BD5",
99
- extra: /*#__PURE__*/React.createElement(Button, {
96
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Alert, {
97
+ message: "\u6570\u636E\u52A0\u8F7D\u5F02\u5E38,\u53EF\u80FD\u5F71\u54CD\u90E8\u5206\u7EC4\u4EF6\u4F7F\u7528",
98
+ type: "warning",
99
+ action: /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
100
100
  type: "primary",
101
101
  key: "console",
102
- onClick: initDataSource
103
- }, "\u5237\u65B0\u91CD\u8BD5")
104
- });
102
+ onClick: initDataSource,
103
+ size: "small"
104
+ }, "\u5237\u65B0\u91CD\u8BD5")),
105
+ closable: true
106
+ }), children);
105
107
  }
106
108
  return /*#__PURE__*/React.createElement(React.Fragment, null, children);
107
109
  };
@@ -20,7 +20,7 @@ declare class JstSendGood implements ComponentInterface {
20
20
  children: ComponentInterface[];
21
21
  dataType: ComponentInterface["dataType"];
22
22
  constructor(options: PickOption);
23
- getSortChildFields: (type: string, options: PickOption) => any;
23
+ getSortChildFields: (type: string, options: PickOption, fieldType?: string) => any;
24
24
  renderClient: (record: Record) => React.JSX.Element | null;
25
25
  renderPc: (value: any, record: Record) => React.JSX.Element;
26
26
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -60,34 +60,29 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
60
60
  _defineProperty(this, "canSort", void 0);
61
61
  _defineProperty(this, "children", void 0);
62
62
  _defineProperty(this, "dataType", void 0);
63
- _defineProperty(this, "getSortChildFields", function (type, options) {
63
+ _defineProperty(this, "getSortChildFields", function (type, options, fieldType) {
64
+ var _typeMap$options$type, _typeMap$options$type2;
65
+ var sendName = {
66
+ name: "发货仓名称",
67
+ key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.sendName),
68
+ dataType: "string"
69
+ };
70
+ var sendId = {
71
+ name: "发货仓编码",
72
+ key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.sendId),
73
+ dataType: "string"
74
+ };
75
+ if (fieldType === 'WDT_SEND_GOOD') {
76
+ sendName.options = WdtSendData.getInstance().getWdtSendData() || [];
77
+ }
64
78
  if (type === 'all') {
65
- var _typeMap$options$type, _typeMap$options$type2;
66
- return [{
67
- name: "发货仓名称",
68
- key: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.sendName),
69
- dataType: "string"
70
- }, {
71
- name: "发货仓编码",
72
- key: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.sendId),
73
- dataType: "string"
74
- }];
79
+ return [sendName, sendId];
75
80
  }
76
81
  if (type === 'sendName') {
77
- var _typeMap$options$type3;
78
- return [{
79
- name: "发货仓名称",
80
- key: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.sendName),
81
- dataType: "string"
82
- }];
82
+ return [sendName];
83
83
  }
84
84
  if (type === 'sendId') {
85
- var _typeMap$options$type4;
86
- return [{
87
- name: "发货仓编码",
88
- key: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.sendId),
89
- dataType: "string"
90
- }];
85
+ return [sendId];
91
86
  }
92
87
  return [];
93
88
  });
@@ -212,7 +207,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
212
207
  this.sortField = "".concat(_options.id, "_").concat((_typeMap$_options$typ = typeMap[_options.type]) === null || _typeMap$_options$typ === void 0 ? void 0 : _typeMap$_options$typ.key);
213
208
  this.formField = "".concat(_options.id, "_").concat((_typeMap$_options$typ2 = typeMap[_options.type]) === null || _typeMap$_options$typ2 === void 0 ? void 0 : _typeMap$_options$typ2.key);
214
209
  this.componentConfig = _options.componentConfig;
215
- this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options);
210
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showField) || '', _options, _options.type);
216
211
  this.type = _options.type;
217
212
  this.dataType = "object";
218
213
  this.rules = (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
@@ -22,7 +22,7 @@ declare class InterceptApiStatus implements ComponentInterface {
22
22
  renderClient: (r: any) => React.JSX.Element | null;
23
23
  renderPc: (value: any, r: Record) => React.JSX.Element | "--";
24
24
  renderLog: (r: Record) => React.JSX.Element | "--" | null;
25
- renderExport: (value: any, r: Record) => any;
25
+ renderExport: (value: any, r: Record) => string;
26
26
  editRender: () => null;
27
27
  filterConfig: (item: ColumnConfig) => {
28
28
  searchDefaultConditions: "in";
@@ -65,9 +65,8 @@ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(o
65
65
  return _this.renderPc(undefined, r);
66
66
  });
67
67
  _defineProperty(this, "renderExport", function (value, r) {
68
- var _record$status;
69
68
  var record = r[_this.id];
70
- return (_record$status = record === null || record === void 0 ? void 0 : record.status) !== null && _record$status !== void 0 ? _record$status : "--";
69
+ return record !== null && record !== void 0 && record.status ? "".concat(record === null || record === void 0 ? void 0 : record.status).concat(record.reason ? ",".concat(record.reason) : "") : "--";
71
70
  });
72
71
  _defineProperty(this, "editRender", function () {
73
72
  return null;
@@ -30,8 +30,8 @@ var InterceptApiStatus = /*#__PURE__*/_createClass(function InterceptApiStatus(o
30
30
  _defineProperty(this, "getComponentValue", function (r) {
31
31
  var _ref;
32
32
  return (_ref = (r === null || r === void 0 ? void 0 : r[_this.id]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
33
- return item === null || item === void 0 ? void 0 : item.status;
34
- }).join(",");
33
+ return "".concat(item === null || item === void 0 ? void 0 : item.status).concat(item !== null && item !== void 0 && item.reason ? ",".concat(item === null || item === void 0 ? void 0 : item.reason) : "");
34
+ }).join(";");
35
35
  });
36
36
  _defineProperty(this, "renderStatus", function (record) {
37
37
  var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
@@ -1,3 +1,3 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, KmErpSendGood, AfterSalesOrderId } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonInput | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | TradeId | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | KmErpSendGood;
3
+ export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonDataTime | CommonInput | CommonMultiStatus | CommonSystemOrder | CompletedUser | BasicDataTime | ItemEnCode | ItemId | ItemSelect | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | KmErpSendGood;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.17.5-beta.12",
3
+ "version": "1.17.5-beta.14",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "4fbea6c3464f52e15c0625802dfe5d9f5247828d",
44
+ "gitHead": "7dc53a9d108de60f9ce37f4356fcf7d1897eccaa",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }