@kmkf-fe-packages/services-components 0.29.0 → 0.29.1-rc.3

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.
Files changed (33) hide show
  1. package/README.md +0 -1
  2. package/dist/esm/commonComponents/CopyText/index.d.ts +6 -0
  3. package/dist/esm/commonComponents/CopyText/index.js +12 -0
  4. package/dist/esm/commonComponents/PlatBuyer/index.d.ts +1 -1
  5. package/dist/esm/commonComponents/PlatBuyer/index.js +4 -17
  6. package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +1 -1
  7. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +18 -15
  8. package/dist/esm/components/Common/index.d.ts +1 -1
  9. package/dist/esm/components/Common/index.js +182 -175
  10. package/dist/esm/components/CommonTradeId/index.d.ts +5 -6
  11. package/dist/esm/components/CommonTradeId/index.js +12 -25
  12. package/dist/esm/components/ExpressCode/index.d.ts +2 -2
  13. package/dist/esm/components/ExpressCode/index.js +6 -4
  14. package/dist/esm/components/FlowWorkOrderId/index.d.ts +2 -3
  15. package/dist/esm/components/FlowWorkOrderId/index.js +4 -18
  16. package/dist/esm/components/LogisticsInterception/InterceptState.d.ts +37 -0
  17. package/dist/esm/components/LogisticsInterception/InterceptState.js +89 -0
  18. package/dist/esm/components/LogisticsInterception/index.d.ts +4 -16
  19. package/dist/esm/components/LogisticsInterception/index.js +11 -6
  20. package/dist/esm/components/LogisticsMoreInterception/index.d.ts +13 -13
  21. package/dist/esm/components/LogisticsMoreInterception/index.js +14 -14
  22. package/dist/esm/components/LogisticsMoreInterception/{interceptItem.d.ts → interceptCode.d.ts} +2 -2
  23. package/dist/esm/components/LogisticsMoreInterception/{interceptItem.js → interceptCode.js} +7 -4
  24. package/dist/esm/components/Payment/PaymentTid.d.ts +1 -2
  25. package/dist/esm/components/Payment/PaymentTid.js +4 -18
  26. package/dist/esm/components/TradeId/index.d.ts +0 -1
  27. package/dist/esm/components/TradeId/index.js +4 -18
  28. package/dist/esm/components/WorkOrderId/index.d.ts +2 -3
  29. package/dist/esm/components/WorkOrderId/index.js +4 -18
  30. package/dist/esm/factory.d.ts +2 -2
  31. package/dist/esm/factory.js +1 -4
  32. package/dist/esm/index.d.ts +3 -3
  33. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, Record, ColumnConfig } from '../../type';
2
+ import React from 'react';
3
3
  declare class CommonTradeId implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -8,16 +8,15 @@ declare class CommonTradeId implements ComponentInterface {
8
8
  rules: any[];
9
9
  showContains: boolean;
10
10
  onlyContainsString: boolean;
11
- componentConfig: ComponentInterface["componentConfig"];
12
- effects: ComponentInterface["effects"];
11
+ componentConfig: ComponentInterface['componentConfig'];
12
+ effects: ComponentInterface['effects'];
13
13
  isCombinationComponent: boolean;
14
14
  formField: string;
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
- dataType: ComponentInterface["dataType"];
17
+ dataType: ComponentInterface['dataType'];
18
18
  constructor(options: PickOption);
19
19
  renderClient: (record: any) => React.JSX.Element | null;
20
- copyHandle: (text: string) => void;
21
20
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
22
21
  renderLog: (r: Record) => React.JSX.Element | null;
23
22
  getComponentValue: (r: Record) => any;
@@ -6,20 +6,19 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
- import React from "react";
10
- import { message, Input } from "antd";
11
- import { CopyOutlined } from "@ant-design/icons";
9
+ import React from 'react';
10
+ import { Input } from 'antd';
12
11
  import GetFormItem from "../GetFormItem";
13
12
  import ItemView from "../../commonComponents/ItemView";
14
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
- import copy from "copy-to-clipboard";
13
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
14
  import { SYMBOL } from "../../constant";
15
+ import CopyText from "../../commonComponents/CopyText";
17
16
  var TRADE_ID_MAP = {
18
17
  REISSUE_TRADE_ID: {
19
- key: "reissueTradeId"
18
+ key: 'reissueTradeId'
20
19
  },
21
20
  EXCHANGE_TRADE_ID: {
22
- key: "exchangeTradeId"
21
+ key: 'exchangeTradeId'
23
22
  }
24
23
  };
25
24
  var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
@@ -46,10 +45,6 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
46
45
  value: record === null || record === void 0 ? void 0 : record[_this.id]
47
46
  }) : null;
48
47
  });
49
- _defineProperty(this, "copyHandle", function (text) {
50
- copy(text);
51
- message.success("复制成功");
52
- });
53
48
  _defineProperty(this, "renderPc", function (value, record) {
54
49
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]) === undefined) {
55
50
  return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
@@ -58,17 +53,9 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
58
53
  onClick: function onClick(e) {
59
54
  return e.stopPropagation();
60
55
  }
61
- }, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)], /*#__PURE__*/React.createElement("span", {
62
- onClick: function onClick(e) {
63
- _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]);
64
- e.stopPropagation();
65
- }
66
- }, /*#__PURE__*/React.createElement("span", {
67
- style: {
68
- paddingLeft: "4px",
69
- cursor: "pointer"
70
- }
71
- }, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
56
+ }, /*#__PURE__*/React.createElement(CopyText, {
57
+ text: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]
58
+ }));
72
59
  });
73
60
  _defineProperty(this, "renderLog", function (r) {
74
61
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)])) return null;
@@ -79,7 +66,7 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
79
66
  });
80
67
  _defineProperty(this, "renderExport", function (value, record) {
81
68
  var _record;
82
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]) !== null && _record !== void 0 ? _record : "--";
69
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]) !== null && _record !== void 0 ? _record : '--';
83
70
  });
84
71
  _defineProperty(this, "editRender", function (p) {
85
72
  var _this$componentConfig, _this$componentConfig2;
@@ -104,7 +91,7 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
104
91
  // 过滤组件id
105
92
  name: item.name,
106
93
  // 过滤组件名称
107
- filterComponentType: "Input",
94
+ filterComponentType: 'Input',
108
95
  filterFn: function filterFn(value) {
109
96
  return function (i) {
110
97
  return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(TRADE_ID_MAP[_this.type].key)), value);
@@ -128,6 +115,6 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
128
115
  this.isCombinationComponent = false;
129
116
  this.canSort = true;
130
117
  this.children = [];
131
- this.dataType = "string";
118
+ this.dataType = 'string';
132
119
  });
133
120
  export default CommonTradeId;
@@ -16,8 +16,8 @@ declare class ExpressCode implements ComponentInterface {
16
16
  dataType: ComponentInterface["dataType"];
17
17
  constructor(options: PickOption);
18
18
  renderClient: (record: any) => React.JSX.Element | null;
19
- renderPc: (value: unknown, record: Record) => React.JSX.Element;
20
- renderLog: (r: Record) => React.JSX.Element | null;
19
+ renderPc: (value: unknown, record: Record) => React.JSX.Element | "--";
20
+ renderLog: (r: Record) => React.JSX.Element | "--" | null;
21
21
  getComponentValue: (r: Record) => any;
22
22
  renderExport: (value: string, record: Record) => any;
23
23
  editRender: (p: any) => React.JSX.Element;
@@ -9,6 +9,7 @@ import React from "react";
9
9
  import { Input } from "antd";
10
10
  import GetFormItem from "../GetFormItem";
11
11
  import ItemView from "../../commonComponents/ItemView";
12
+ import CopyText from "../../commonComponents/CopyText";
12
13
  import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
13
14
  import { SYMBOL } from "../../constant";
14
15
  var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
@@ -36,8 +37,9 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
36
37
  }) : null;
37
38
  });
38
39
  _defineProperty(this, "renderPc", function (value, record) {
39
- var _record$_this$id;
40
- return /*#__PURE__*/React.createElement("span", null, (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--");
40
+ return record !== null && record !== void 0 && record[_this.id] ? /*#__PURE__*/React.createElement(CopyText, {
41
+ text: record === null || record === void 0 ? void 0 : record[_this.id]
42
+ }) : '--';
41
43
  });
42
44
  _defineProperty(this, "renderLog", function (r) {
43
45
  if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
@@ -47,8 +49,8 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
47
49
  return r === null || r === void 0 ? void 0 : r[_this.id];
48
50
  });
49
51
  _defineProperty(this, "renderExport", function (value, record) {
50
- var _record$_this$id2;
51
- return (_record$_this$id2 = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id2 !== void 0 ? _record$_this$id2 : "--";
52
+ var _record$_this$id;
53
+ return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
52
54
  });
53
55
  _defineProperty(this, "editRender", function (p) {
54
56
  var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
@@ -6,15 +6,14 @@ declare class FlowWorkOrderId implements ComponentInterface {
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface["componentConfig"];
10
- effects: ComponentInterface["effects"];
9
+ componentConfig: ComponentInterface['componentConfig'];
10
+ effects: ComponentInterface['effects'];
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
15
  dataType: ComponentInterface['dataType'];
16
16
  constructor(options: PickOption);
17
- copyHandle: (text: string) => void;
18
17
  renderPc: (value: any, record: any) => React.JSX.Element;
19
18
  renderLog: (r: Record) => React.JSX.Element | null;
20
19
  getComponentValue: (r: Record) => any;
@@ -7,13 +7,11 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
9
  import React from 'react';
10
- import { message } from 'antd';
11
- import { CopyOutlined } from '@ant-design/icons';
12
10
  import { ApaasInput } from '@kmkf-fe-packages/basic-components';
13
11
  import { filterFn as _filterFn, isNull } from '@kmkf-fe-packages/kmkf-utils';
14
12
  import GetFormItem from "../GetFormItem";
15
- import copy from 'copy-to-clipboard';
16
13
  import { SYMBOL } from "../../constant";
14
+ import CopyText from "../../commonComponents/CopyText";
17
15
  var FlowWorkOrderId = /*#__PURE__*/_createClass(function FlowWorkOrderId(options) {
18
16
  var _this = this;
19
17
  _classCallCheck(this, FlowWorkOrderId);
@@ -29,10 +27,6 @@ var FlowWorkOrderId = /*#__PURE__*/_createClass(function FlowWorkOrderId(options
29
27
  _defineProperty(this, "canSort", void 0);
30
28
  _defineProperty(this, "children", void 0);
31
29
  _defineProperty(this, "dataType", void 0);
32
- _defineProperty(this, "copyHandle", function (text) {
33
- copy(text);
34
- message.success('复制成功');
35
- });
36
30
  _defineProperty(this, "renderPc", function (value, record) {
37
31
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
38
32
  return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
@@ -41,17 +35,9 @@ var FlowWorkOrderId = /*#__PURE__*/_createClass(function FlowWorkOrderId(options
41
35
  onClick: function onClick(e) {
42
36
  return e.stopPropagation();
43
37
  }
44
- }, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id)], /*#__PURE__*/React.createElement("span", {
45
- onClick: function onClick(e) {
46
- _this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
47
- e.stopPropagation();
48
- }
49
- }, /*#__PURE__*/React.createElement("span", {
50
- style: {
51
- paddingLeft: '4px',
52
- cursor: 'pointer'
53
- }
54
- }, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
38
+ }, /*#__PURE__*/React.createElement(CopyText, {
39
+ text: record === null || record === void 0 ? void 0 : record["".concat(_this.id)]
40
+ }));
55
41
  });
56
42
  _defineProperty(this, "renderLog", function (r) {
57
43
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
@@ -0,0 +1,37 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class InterceptState implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ rules: any[];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
+ align: ALignType;
12
+ width: number;
13
+ isCombinationComponent: boolean;
14
+ formField: string;
15
+ canSort: boolean;
16
+ children: ComponentInterface[];
17
+ dataType: ComponentInterface["dataType"];
18
+ options: ComponentInterface["options"];
19
+ constructor(options: PickOption);
20
+ getComponentValue: (r: Record) => any;
21
+ renderClient: (record: any) => React.JSX.Element | null;
22
+ renderPc: (value: any, record: Record) => any;
23
+ renderLog: (r: Record) => any;
24
+ renderExport: (value: any, record: Record) => any;
25
+ editRender: () => null;
26
+ filterConfig: (item: ColumnConfig) => {
27
+ searchDefaultConditions: "in";
28
+ type: string;
29
+ id: string;
30
+ name: string;
31
+ filterComponentType: "MultipleSelect";
32
+ props: {
33
+ options: any[];
34
+ };
35
+ };
36
+ }
37
+ export default InterceptState;
@@ -0,0 +1,89 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import React from "react";
9
+ import ItemView from "../../commonComponents/ItemView";
10
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
11
+ import { SYMBOL } from "../../constant";
12
+ var InterceptState = /*#__PURE__*/_createClass(function InterceptState(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, InterceptState);
15
+ _defineProperty(this, "name", void 0);
16
+ _defineProperty(this, "id", void 0);
17
+ _defineProperty(this, "sortField", void 0);
18
+ _defineProperty(this, "type", void 0);
19
+ _defineProperty(this, "rules", void 0);
20
+ _defineProperty(this, "componentConfig", void 0);
21
+ _defineProperty(this, "effects", void 0);
22
+ _defineProperty(this, "align", void 0);
23
+ _defineProperty(this, "width", void 0);
24
+ _defineProperty(this, "isCombinationComponent", void 0);
25
+ _defineProperty(this, "formField", void 0);
26
+ _defineProperty(this, "canSort", void 0);
27
+ _defineProperty(this, "children", void 0);
28
+ _defineProperty(this, "dataType", void 0);
29
+ _defineProperty(this, "options", void 0);
30
+ _defineProperty(this, "getComponentValue", function (r) {
31
+ return r === null || r === void 0 ? void 0 : r[_this.id];
32
+ });
33
+ _defineProperty(this, "renderClient", function (record) {
34
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
35
+ id: _this.id,
36
+ label: _this.name,
37
+ value: record === null || record === void 0 ? void 0 : record[_this.id]
38
+ }) : null;
39
+ });
40
+ _defineProperty(this, "renderPc", function (value, record) {
41
+ var _record$_this$id;
42
+ return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
43
+ });
44
+ _defineProperty(this, "renderLog", function (r) {
45
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
46
+ return r === null || r === void 0 ? void 0 : r[_this.id];
47
+ });
48
+ _defineProperty(this, "renderExport", function (value, record) {
49
+ var _record$_this$id2;
50
+ return (_record$_this$id2 = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id2 !== void 0 ? _record$_this$id2 : "--";
51
+ });
52
+ _defineProperty(this, "editRender", function () {
53
+ return null;
54
+ });
55
+ _defineProperty(this, "filterConfig", function (item) {
56
+ return {
57
+ searchDefaultConditions: SYMBOL.in,
58
+ type: item.type,
59
+ id: "".concat(item.id, "_qySelfInterceptLogisticsStatus"),
60
+ name: "".concat(item.name, "-\u62E6\u622A\u72B6\u6001"),
61
+ filterComponentType: "MultipleSelect",
62
+ props: {
63
+ options: _this.options || []
64
+ }
65
+ };
66
+ });
67
+ this.name = "拦截状态";
68
+ this.id = "".concat(options.id, "_qySelfInterceptLogisticsStatus");
69
+ this.sortField = "".concat(options.id, "_qySelfInterceptLogisticsStatus");
70
+ this.formField = "".concat(options.id, "_qySelfInterceptLogisticsStatus");
71
+ this.type = options.type;
72
+ this.componentConfig = options.componentConfig;
73
+ this.rules = [];
74
+ this.align = "left";
75
+ this.width = 200;
76
+ this.isCombinationComponent = false;
77
+ this.canSort = true;
78
+ this.children = [];
79
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
80
+ this.dataType = "string";
81
+ this.options = [{
82
+ label: "拦截成功",
83
+ value: "拦截成功"
84
+ }, {
85
+ label: "拦截失败",
86
+ value: "拦截失败"
87
+ }];
88
+ });
89
+ export default InterceptState;
@@ -6,6 +6,7 @@ import InterceptSnapshot from "./interceptSnapshot";
6
6
  import InterceptAddress from "./InterceptAddress";
7
7
  import InterceptType from "./InterceptType";
8
8
  import InterceptStatus from "./InterceptStatus";
9
+ import InterceptState from "./InterceptState";
9
10
  import Express from "../Express";
10
11
  import ExpressCode from "../ExpressCode";
11
12
  declare class Logistics implements ComponentInterface {
@@ -21,6 +22,7 @@ declare class Logistics implements ComponentInterface {
21
22
  interceptLogisticsStatus: InterceptStatus;
22
23
  interceptSenderMobile: InterceptSenderMobile;
23
24
  interceptSnapshot: InterceptSnapshot;
25
+ interceptState: InterceptState;
24
26
  isCombinationComponent: boolean;
25
27
  formField: string;
26
28
  canSort: boolean;
@@ -50,21 +52,12 @@ declare class Logistics implements ComponentInterface {
50
52
  mobile: any;
51
53
  };
52
54
  interceptSnapshot: any;
55
+ interceptState: any;
53
56
  };
54
57
  renderPc: () => null;
55
58
  renderExport: () => null;
56
59
  editRender: (p: any) => React.JSX.Element;
57
60
  filterConfig: (item: ColumnConfig) => ({
58
- searchDefaultConditions: "in";
59
- type: string;
60
- id: string;
61
- name: string;
62
- filterComponentType: "MultipleSelect";
63
- props: {
64
- options: any[];
65
- };
66
- filterFn: (value: string) => (i: Record) => boolean;
67
- } | {
68
61
  searchDefaultConditions: "like";
69
62
  type: string;
70
63
  id: string;
@@ -78,13 +71,8 @@ declare class Logistics implements ComponentInterface {
78
71
  name: string;
79
72
  filterComponentType: "MultipleSelect";
80
73
  props: {
81
- options: {
82
- label: string;
83
- value: string;
84
- }[];
74
+ options: any[];
85
75
  };
86
- formatFilterValue: (value: string[]) => string[];
87
- filterFn: (value: string[]) => (i: Record) => boolean;
88
76
  })[];
89
77
  }
90
78
  export default Logistics;
@@ -17,6 +17,7 @@ import InterceptSnapshot from "./interceptSnapshot";
17
17
  import InterceptAddress from "./InterceptAddress";
18
18
  import InterceptType from "./InterceptType";
19
19
  import InterceptStatus from "./InterceptStatus";
20
+ import InterceptState from "./InterceptState";
20
21
  import Express from "../Express";
21
22
  import ExpressCode from "../ExpressCode";
22
23
  import ColumnHeader from "./columnHeader";
@@ -35,6 +36,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
35
36
  _defineProperty(this, "interceptLogisticsStatus", void 0);
36
37
  _defineProperty(this, "interceptSenderMobile", void 0);
37
38
  _defineProperty(this, "interceptSnapshot", void 0);
39
+ _defineProperty(this, "interceptState", void 0);
38
40
  _defineProperty(this, "isCombinationComponent", void 0);
39
41
  _defineProperty(this, "formField", void 0);
40
42
  _defineProperty(this, "canSort", void 0);
@@ -47,10 +49,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
47
49
  _defineProperty(this, "effects", void 0);
48
50
  _defineProperty(this, "dataType", void 0);
49
51
  _defineProperty(this, "renderClient", function (record) {
50
- return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptSnapshot.renderClient(record));
52
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptSenderMobile.renderClient(record), _this.interceptType.renderClient(record), _this.interceptAddress.renderClient(record), _this.interceptLogisticsStatus.renderClient(record), _this.interceptSnapshot.renderClient(record), _this.interceptState.renderClient(record));
51
53
  });
52
54
  _defineProperty(this, "renderLog", function (record) {
53
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))));
55
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, !isNull(_this.express.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.name, ": ", _this.express.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.expressCode.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.expressCode.name, ": ", _this.expressCode.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSenderMobile.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSenderMobile.name, ":", " ", _this.interceptSenderMobile.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptType.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptType.name, ": ", _this.interceptType.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptAddress.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.name, ":", " ", _this.interceptAddress.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptLogisticsStatus.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptLogisticsStatus.name, ":", " ", _this.interceptLogisticsStatus.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptSnapshot.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptSnapshot.name, ":", " ", _this.interceptSnapshot.renderLog(record))), /*#__PURE__*/React.createElement("div", null, !isNull(_this.interceptState.getComponentValue(record)) && /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptState.name, ":", " ", _this.interceptState.renderLog(record))));
54
56
  });
55
57
  _defineProperty(this, "getComponentValue", function (r) {
56
58
  return {
@@ -60,7 +62,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
60
62
  interceptType: _this.interceptType.getComponentValue(r),
61
63
  interceptLogisticsStatus: _this.interceptLogisticsStatus.getComponentValue(r),
62
64
  interceptRedirectTo: _this.interceptAddress.getComponentValue(r),
63
- interceptSnapshot: _this.interceptSnapshot.getComponentValue(r)
65
+ interceptSnapshot: _this.interceptSnapshot.getComponentValue(r),
66
+ interceptState: _this.interceptState.getComponentValue(r)
64
67
  };
65
68
  });
66
69
  _defineProperty(this, "renderPc", function () {
@@ -82,7 +85,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
82
85
  logisticsOptions: _this.expressDateInstance.getExpressData(),
83
86
  expressInterceptData: _this.expressInterceptData.getExpressData(),
84
87
  logisticsAddressData: _this.logisticsAddressData.getAddressData(),
85
- isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing
88
+ isEditing: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.isEditing,
89
+ showState: true
86
90
  }))
87
91
  });
88
92
  });
@@ -91,7 +95,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
91
95
  subKey: "interceptCompany"
92
96
  })), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
93
97
  subKey: "interceptCode"
94
- })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
98
+ })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item), _this.interceptState.filterConfig(item)];
95
99
  });
96
100
  this.name = options.name;
97
101
  this.columnHeader = /*#__PURE__*/React.createElement(ColumnHeader, {
@@ -111,6 +115,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
111
115
  this.interceptLogisticsStatus = new InterceptStatus(options);
112
116
  this.interceptSenderMobile = new InterceptSenderMobile(options);
113
117
  this.interceptSnapshot = new InterceptSnapshot(options);
118
+ this.interceptState = new InterceptState(options);
114
119
  this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
115
120
  id: "".concat(options.id, "_interceptCompany"),
116
121
  name: "物流信息"
@@ -122,7 +127,7 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
122
127
  this.isCombinationComponent = true;
123
128
  this.canSort = false;
124
129
  this.dataType = "object";
125
- this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot];
130
+ this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot, this.interceptState];
126
131
  this.rules = [{
127
132
  validator: function validator(_, value) {
128
133
  var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre, _value$interceptSende;
@@ -1,13 +1,13 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
- import React from "react";
3
- import { ExpressData, ExpressInterceptData, LogisticsAddressData, AddressData } from "@kmkf-fe-packages/kmkf-utils";
4
- import InterceptSenderMobile from "./interceptSenderMobile";
5
- import InterceptSnapshot from "./interceptSnapshot";
6
- import InterceptAddress from "./InterceptAddress";
7
- import InterceptType from "./InterceptType";
8
- import InterceptStatus from "./InterceptStatus";
9
- import InterceptCode from "./interceptItem";
10
- import Express from "./interceptCompany";
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
+ import React from 'react';
3
+ import { ExpressData, ExpressInterceptData, LogisticsAddressData, AddressData } from '@kmkf-fe-packages/kmkf-utils';
4
+ import InterceptSenderMobile from './interceptSenderMobile';
5
+ import InterceptSnapshot from './interceptSnapshot';
6
+ import InterceptAddress from './InterceptAddress';
7
+ import InterceptType from './InterceptType';
8
+ import InterceptStatus from './InterceptStatus';
9
+ import InterceptCode from './interceptCode';
10
+ import Express from './interceptCompany';
11
11
  declare class Logistics implements ComponentInterface {
12
12
  name: string;
13
13
  columnHeader: string | JSX.Element;
@@ -15,7 +15,7 @@ declare class Logistics implements ComponentInterface {
15
15
  sortField: string;
16
16
  type: string;
17
17
  rules: any[];
18
- componentConfig: ComponentInterface["componentConfig"];
18
+ componentConfig: ComponentInterface['componentConfig'];
19
19
  interceptAddress: InterceptAddress;
20
20
  interceptType: InterceptType;
21
21
  interceptLogisticsStatus: InterceptStatus;
@@ -32,8 +32,8 @@ declare class Logistics implements ComponentInterface {
32
32
  logisticsAddressData: InstanceType<typeof LogisticsAddressData>;
33
33
  addressDateInstance: InstanceType<typeof AddressData>;
34
34
  expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
35
- effects: ComponentInterface["effects"];
36
- dataType: ComponentInterface["dataType"];
35
+ effects: ComponentInterface['effects'];
36
+ dataType: ComponentInterface['dataType'];
37
37
  constructor(options: PickOption);
38
38
  renderInfo: (list?: any[]) => React.JSX.Element;
39
39
  renderClient: (record: any) => React.JSX.Element | null;
@@ -8,10 +8,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
- import React from "react";
12
- import { Space } from "antd";
13
- import { LogisticsMoreInterception } from "@kmkf-fe-packages/basic-components";
14
- import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData } from "@kmkf-fe-packages/kmkf-utils";
11
+ import React from 'react';
12
+ import { Space } from 'antd';
13
+ import { LogisticsMoreInterception } from '@kmkf-fe-packages/basic-components';
14
+ import { ExpressData, ExpressInterceptData, LogisticsAddressData, isNull, AddressData } from '@kmkf-fe-packages/kmkf-utils';
15
15
  import ItemView from "../../commonComponents/ItemView";
16
16
  import GetFormItem from "../GetFormItem";
17
17
  import InterceptSenderMobile from "./interceptSenderMobile";
@@ -19,7 +19,7 @@ import InterceptSnapshot from "./interceptSnapshot";
19
19
  import InterceptAddress from "./InterceptAddress";
20
20
  import InterceptType from "./InterceptType";
21
21
  import InterceptStatus from "./InterceptStatus";
22
- import InterceptCode from "./interceptItem";
22
+ import InterceptCode from "./interceptCode";
23
23
  import Express from "./interceptCompany";
24
24
  import ColumnHeader from "./columnHeader";
25
25
  import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
@@ -60,8 +60,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
60
60
  var _ref, _this$expressIntercep;
61
61
  var addressText = (_ref = item.interceptAddress || []) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
62
62
  return _this.addressDateInstance.getNameByCode(suffix);
63
- }).join("");
64
- return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", item.interceptCompany ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u516C\u53F8\uFF1A", _this.expressDateInstance.getExpressNameByCode(item.interceptCompany) || item.interceptCompany) : null, item.interceptCode ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u5355\u53F7\uFF1A", item.interceptCode) : null, item.interceptAddress.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", addressText, item.interceptDetail, " ", item.interceptReceiverName, " ", item.interceptReceiverMobile) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
63
+ }).join('');
64
+ return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : '', item.interceptCompany ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u516C\u53F8\uFF1A", _this.expressDateInstance.getExpressNameByCode(item.interceptCompany) || item.interceptCompany) : null, item.interceptCode ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u5355\u53F7\uFF1A", item.interceptCode) : null, item.interceptAddress.length || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u6D3E\u4EF6\u4FE1\u606F\uFF1A", addressText, item.interceptDetail, " ", item.interceptReceiverName, ' ', item.interceptReceiverMobile) : null, item.interceptType ? /*#__PURE__*/React.createElement("div", null, "\u62E6\u622A\u7C7B\u578B\uFF1A", _this.expressInterceptInstance.getTypeNameMap()[item.interceptType]) : null, item.interceptLogisticsStatus ? /*#__PURE__*/React.createElement("div", null, "\u7269\u6D41\u72B6\u6001\uFF1A", (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item.interceptLogisticsStatus], /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
65
65
  modelWidth: 500,
66
66
  interceptCompany: item.interceptCompany,
67
67
  interceptCode: item.interceptCode,
@@ -104,9 +104,9 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
104
104
  });
105
105
  _defineProperty(this, "filterConfig", function (item) {
106
106
  return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
107
- subKey: "logisticsInterceptCompanyList"
107
+ subKey: 'logisticsInterceptCompanyList'
108
108
  })), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
109
- subKey: "logisticsInterceptCodeList"
109
+ subKey: 'logisticsInterceptCodeList'
110
110
  })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
111
111
  });
112
112
  this.name = options.name;
@@ -130,15 +130,15 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
130
130
  this.interceptSnapshot = new InterceptSnapshot(options);
131
131
  this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
132
132
  id: "".concat(options.id, "_logisticsInterceptCompanyList"),
133
- name: "物流信息"
133
+ name: '物流信息'
134
134
  }));
135
135
  this.expressCode = new InterceptCode(_objectSpread(_objectSpread({}, options), {}, {
136
136
  id: "".concat(options.id, "_logisticsInterceptCodeList"),
137
- name: "物流单号"
137
+ name: '物流单号'
138
138
  }));
139
139
  this.isCombinationComponent = true;
140
140
  this.canSort = false;
141
- this.dataType = "object";
141
+ this.dataType = 'object';
142
142
  this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot];
143
143
  this.rules = [{
144
144
  required: (_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required,
@@ -146,12 +146,12 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
146
146
  if (value.some(function (t) {
147
147
  return !(t !== null && t !== void 0 && t.interceptCompany) || !(t !== null && t !== void 0 && t.interceptCode);
148
148
  })) {
149
- return Promise.reject(new Error("请填写物流信息"));
149
+ return Promise.reject(new Error('请填写物流信息'));
150
150
  }
151
151
  if (value.some(function (t) {
152
152
  return !(t !== null && t !== void 0 && t.interceptType);
153
153
  })) {
154
- return Promise.reject(new Error("请选择拦截类型"));
154
+ return Promise.reject(new Error('请选择拦截类型'));
155
155
  }
156
156
  var hasNoAddress = value.some(function (t) {
157
157
  var _t$interceptAddress;
@@ -1,6 +1,6 @@
1
1
  import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
2
  import React from 'react';
3
- declare class InterceptItem implements ComponentInterface {
3
+ declare class InterceptCode implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
@@ -31,4 +31,4 @@ declare class InterceptItem implements ComponentInterface {
31
31
  formatFilterValue: (input: string) => string | string[];
32
32
  };
33
33
  }
34
- export default InterceptItem;
34
+ export default InterceptCode;