@kmkf-fe-packages/services-components 0.28.2-rc.8 → 0.28.3-beta.0

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 (61) hide show
  1. package/README.md +1 -0
  2. package/dist/esm/commonComponents/CopyText/index.d.ts +7 -0
  3. package/dist/esm/commonComponents/CopyText/index.js +14 -0
  4. package/dist/esm/commonComponents/GlobalContext/index.d.ts +1 -1
  5. package/dist/esm/commonComponents/GlobalContext/index.js +8 -5
  6. package/dist/esm/commonComponents/PlatBuyer/index.d.ts +1 -1
  7. package/dist/esm/commonComponents/PlatBuyer/index.js +4 -17
  8. package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +1 -1
  9. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +21 -15
  10. package/dist/esm/components/BS/BsLogistics/index.js +12 -7
  11. package/dist/esm/components/BS/BsReissue/index.js +7 -7
  12. package/dist/esm/components/BS/common/SystemOrderNo.d.ts +26 -0
  13. package/dist/esm/components/BS/common/SystemOrderNo.js +94 -0
  14. package/dist/esm/components/BS/common/expressCompany.d.ts +4 -1
  15. package/dist/esm/components/BS/common/expressCompany.js +5 -2
  16. package/dist/esm/components/BS/common/index.d.ts +1 -0
  17. package/dist/esm/components/BS/common/index.js +2 -1
  18. package/dist/esm/components/Common/index.d.ts +2 -2
  19. package/dist/esm/components/Common/index.js +187 -176
  20. package/dist/esm/components/CommonTradeId/index.d.ts +5 -6
  21. package/dist/esm/components/CommonTradeId/index.js +15 -26
  22. package/dist/esm/components/ErpTradeId/components/OrderNum/index.d.ts +1 -0
  23. package/dist/esm/components/ErpTradeId/components/OrderNum/index.js +7 -7
  24. package/dist/esm/components/ErpTradeId/components/OrderNum/{index.module.scss → index.less} +2 -2
  25. package/dist/esm/components/ExpressCode/index.d.ts +2 -2
  26. package/dist/esm/components/ExpressCode/index.js +9 -5
  27. package/dist/esm/components/FlowWorkOrderId/index.d.ts +2 -3
  28. package/dist/esm/components/FlowWorkOrderId/index.js +4 -18
  29. package/dist/esm/components/JST/JstLogistics/index.js +16 -11
  30. package/dist/esm/components/JST/JstSendGood/index.js +8 -5
  31. package/dist/esm/components/LogisticsMoreInterception/index.d.ts +13 -13
  32. package/dist/esm/components/LogisticsMoreInterception/index.js +17 -14
  33. package/dist/esm/components/LogisticsMoreInterception/{interceptItem.d.ts → interceptCode.d.ts} +2 -2
  34. package/dist/esm/components/LogisticsMoreInterception/{interceptItem.js → interceptCode.js} +7 -4
  35. package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +3 -3
  36. package/dist/esm/components/LogisticsMoreTrajectory/index.js +16 -7
  37. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryLastLogisticsInfo.d.ts +30 -0
  38. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryLastLogisticsInfo.js +80 -0
  39. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryLastUpdateTime.d.ts +29 -0
  40. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryLastUpdateTime.js +77 -0
  41. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryStatus.d.ts +32 -0
  42. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryStatus.js +96 -0
  43. package/dist/esm/components/LogisticsTrajectory/index.js +2 -1
  44. package/dist/esm/components/LogisticsTrajectory/trajectoryStatus.d.ts +3 -1
  45. package/dist/esm/components/LogisticsTrajectory/trajectoryStatus.js +4 -4
  46. package/dist/esm/components/Payment/PaymentTid.d.ts +2 -2
  47. package/dist/esm/components/Payment/PaymentTid.js +14 -3
  48. package/dist/esm/components/TradeId/index.d.ts +0 -1
  49. package/dist/esm/components/TradeId/index.js +7 -19
  50. package/dist/esm/components/WDT/WdtRessuie/index.d.ts +58 -0
  51. package/dist/esm/components/WDT/WdtRessuie/index.js +185 -0
  52. package/dist/esm/components/WorkOrderId/index.d.ts +2 -3
  53. package/dist/esm/components/WorkOrderId/index.js +4 -18
  54. package/dist/esm/factory.d.ts +2 -2
  55. package/dist/esm/factory.js +6 -2
  56. package/dist/esm/index.d.ts +4 -3
  57. package/dist/esm/index.js +1 -0
  58. package/dist/esm/service/api.d.ts +2 -0
  59. package/dist/esm/service/api.js +13 -1
  60. package/dist/esm/type.d.ts +4 -2
  61. 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) {
@@ -43,13 +42,11 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
43
42
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
44
43
  id: _this.id,
45
44
  label: _this.name,
46
- value: record === null || record === void 0 ? void 0 : record[_this.id]
45
+ value: /*#__PURE__*/React.createElement(CopyText, {
46
+ text: record === null || record === void 0 ? void 0 : record[_this.id]
47
+ })
47
48
  }) : null;
48
49
  });
49
- _defineProperty(this, "copyHandle", function (text) {
50
- copy(text);
51
- message.success("复制成功");
52
- });
53
50
  _defineProperty(this, "renderPc", function (value, record) {
54
51
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]) === undefined) {
55
52
  return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
@@ -58,17 +55,9 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
58
55
  onClick: function onClick(e) {
59
56
  return e.stopPropagation();
60
57
  }
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)))));
58
+ }, /*#__PURE__*/React.createElement(CopyText, {
59
+ text: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]
60
+ }));
72
61
  });
73
62
  _defineProperty(this, "renderLog", function (r) {
74
63
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)])) return null;
@@ -79,7 +68,7 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
79
68
  });
80
69
  _defineProperty(this, "renderExport", function (value, record) {
81
70
  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 : "--";
71
+ 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
72
  });
84
73
  _defineProperty(this, "editRender", function (p) {
85
74
  var _this$componentConfig, _this$componentConfig2;
@@ -104,7 +93,7 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
104
93
  // 过滤组件id
105
94
  name: item.name,
106
95
  // 过滤组件名称
107
- filterComponentType: "Input",
96
+ filterComponentType: 'Input',
108
97
  filterFn: function filterFn(value) {
109
98
  return function (i) {
110
99
  return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(TRADE_ID_MAP[_this.type].key)), value);
@@ -128,6 +117,6 @@ var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
128
117
  this.isCombinationComponent = false;
129
118
  this.canSort = true;
130
119
  this.children = [];
131
- this.dataType = "string";
120
+ this.dataType = 'string';
132
121
  });
133
122
  export default CommonTradeId;
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
+ import './index.less';
2
3
  declare const OrderNum: ({ value, onChange, onTradeIdBlur, ...otherProp }: any) => React.JSX.Element;
3
4
  export default OrderNum;
@@ -30,21 +30,21 @@ import get from 'lodash/get';
30
30
  import { ErpScenes } from "../../../../index";
31
31
  import { queryOrderDetail, queryDouDianOpenId } from "./communication";
32
32
  import noImage from "./noImage.png";
33
- import styles from "./index.module.scss";
33
+ import "./index.less";
34
34
  var Card = function Card(_ref) {
35
35
  var tid = _ref.tid,
36
36
  sid = _ref.sid,
37
37
  itemList = _ref.itemList,
38
38
  sysStatusName = _ref.sysStatusName;
39
39
  return /*#__PURE__*/React.createElement("div", {
40
- className: styles.card
40
+ className: "erp-suborder-card"
41
41
  }, /*#__PURE__*/React.createElement("span", {
42
42
  style: {
43
43
  display: 'flex',
44
44
  alignItems: 'center'
45
45
  }
46
46
  }, sysStatusName && /*#__PURE__*/React.createElement("span", {
47
- className: styles.tag
47
+ className: "tag"
48
48
  }, sysStatusName), /*#__PURE__*/React.createElement("span", {
49
49
  style: {
50
50
  marginLeft: '8px',
@@ -53,7 +53,7 @@ var Card = function Card(_ref) {
53
53
  }
54
54
  }, /*#__PURE__*/React.createElement("span", null, "\u7CFB\u7EDF\u5355\u53F7: ", /*#__PURE__*/React.createElement("b", null, sid)), /*#__PURE__*/React.createElement("span", null, "\u5E73\u53F0\u5355\u53F7: ", /*#__PURE__*/React.createElement("b", null, tid)))), itemList.map(function (item) {
55
55
  return /*#__PURE__*/React.createElement("div", {
56
- className: styles.good
56
+ className: "good"
57
57
  }, item.picUrl ? /*#__PURE__*/React.createElement(Image, {
58
58
  width: 56,
59
59
  src: item.picUrl
@@ -65,9 +65,9 @@ var Card = function Card(_ref) {
65
65
  height: '56px'
66
66
  }
67
67
  }), /*#__PURE__*/React.createElement("div", {
68
- className: styles.content
68
+ className: "content"
69
69
  }, /*#__PURE__*/React.createElement("span", null, item.title), /*#__PURE__*/React.createElement("span", null, item.productCode)), /*#__PURE__*/React.createElement("div", {
70
- className: styles.price
70
+ className: "price"
71
71
  }, item.price && /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("b", {
72
72
  style: {
73
73
  color: '#ff7a45',
@@ -104,7 +104,7 @@ var SubOrderList = function SubOrderList(_ref2) {
104
104
  height: '300px',
105
105
  overflowY: 'auto'
106
106
  },
107
- className: styles.itemWrap,
107
+ className: "erp-suborder-itemWrap",
108
108
  onClick: function onClick(e) {
109
109
  return e.stopPropagation();
110
110
  }
@@ -1,7 +1,7 @@
1
- .itemWrap {
1
+ .erp-suborder-itemWrap {
2
2
  width: 420px;
3
3
  }
4
- .card {
4
+ .erp-suborder-card {
5
5
  margin-bottom: 16px;
6
6
  .tag {
7
7
  padding: 2px;
@@ -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) {
@@ -32,12 +33,15 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
32
33
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
33
34
  id: _this.id,
34
35
  label: _this.name,
35
- value: record === null || record === void 0 ? void 0 : record[_this.id]
36
+ value: /*#__PURE__*/React.createElement(CopyText, {
37
+ text: record === null || record === void 0 ? void 0 : record[_this.id]
38
+ })
36
39
  }) : null;
37
40
  });
38
41
  _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 : "--");
42
+ return record !== null && record !== void 0 && record[_this.id] ? /*#__PURE__*/React.createElement(CopyText, {
43
+ text: record === null || record === void 0 ? void 0 : record[_this.id]
44
+ }) : '--';
41
45
  });
42
46
  _defineProperty(this, "renderLog", function (r) {
43
47
  if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
@@ -47,8 +51,8 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
47
51
  return r === null || r === void 0 ? void 0 : r[_this.id];
48
52
  });
49
53
  _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 : "--";
54
+ var _record$_this$id;
55
+ return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
52
56
  });
53
57
  _defineProperty(this, "editRender", function (p) {
54
58
  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;
@@ -33,8 +33,9 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
33
33
  var _this = this,
34
34
  _typeMap$_options$typ,
35
35
  _typeMap$_options$typ2,
36
- _this$componentConfig3,
37
- _this$componentConfig4;
36
+ _this$componentConfig6,
37
+ _this$componentConfig7,
38
+ _this$componentConfig8;
38
39
  _classCallCheck(this, JstLogistics);
39
40
  _defineProperty(this, "name", void 0);
40
41
  _defineProperty(this, "id", void 0);
@@ -84,6 +85,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
84
85
  return [];
85
86
  });
86
87
  _defineProperty(this, "renderClient", function (record) {
88
+ var _this$componentConfig;
87
89
  var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
88
90
  return !isNull(item);
89
91
  }) : false;
@@ -92,12 +94,13 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
92
94
  label: _this.name,
93
95
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
94
96
  list: record === null || record === void 0 ? void 0 : record[_this.id],
95
- type: 1
97
+ type: 1,
98
+ platformType: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.logistics
96
99
  })
97
100
  }) : null;
98
101
  });
99
102
  _defineProperty(this, "renderPc", function (value, record) {
100
- var _typeMap$_this$type;
103
+ var _typeMap$_this$type, _this$componentConfig2;
101
104
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key)];
102
105
  //兼容多个商品
103
106
  return /*#__PURE__*/React.createElement("span", {
@@ -106,7 +109,8 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
106
109
  }
107
110
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
108
111
  list: list,
109
- type: 1
112
+ type: 1,
113
+ platformType: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.logistics
110
114
  }));
111
115
  });
112
116
  _defineProperty(this, "renderLog", function (r) {
@@ -127,17 +131,18 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
127
131
  }).join(",");
128
132
  });
129
133
  _defineProperty(this, "editRender", function (p) {
130
- var _this$componentConfig, _this$componentConfig2;
134
+ var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
131
135
  return /*#__PURE__*/React.createElement(GetFormItem, {
132
136
  title: _this.name,
133
137
  name: _this.id,
134
138
  rules: _this.rules,
135
139
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
136
140
  display: p === null || p === void 0 ? void 0 : p.display,
137
- required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
141
+ required: (_this$componentConfig3 = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.required) !== null && _this$componentConfig3 !== void 0 ? _this$componentConfig3 : false,
138
142
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
139
143
  type: 1,
140
- options: _this.expressDateInstance.getExpressData()
144
+ options: _this.expressDateInstance.getExpressData(),
145
+ platformType: (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.logistics
141
146
  }))
142
147
  });
143
148
  });
@@ -199,7 +204,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
199
204
  this.canSort = false;
200
205
  this.children = [];
201
206
  this.dataType = "object";
202
- this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
207
+ this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
203
208
  required: true,
204
209
  validator: function validator(_, value) {
205
210
  var hasNo = (value || []).some(function (item) {
@@ -212,7 +217,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
212
217
  }
213
218
  }] : [];
214
219
  this.align = "left";
215
- this.expressDateInstance = ExpressData.getInstance();
216
- this.sortChildField = this.getSortChildFields(((_this$componentConfig4 = this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) || "", _options);
220
+ this.expressDateInstance = ExpressData.getInstance((_this$componentConfig7 = this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.logistics);
221
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.showField) || "", _options);
217
222
  });
218
223
  export default JstLogistics;
@@ -12,7 +12,7 @@ import GetFormItem from "../../GetFormItem";
12
12
  import { JstGoodImage } from "../../Common";
13
13
  import { JstGoods } from "@kmkf-fe-packages/basic-components";
14
14
  import ItemView from "../../../commonComponents/ItemView";
15
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { isNull, filterFn as _filterFn, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  var typeMap = {
18
18
  JST_SEND_GOOD: {
@@ -100,7 +100,8 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
100
100
  label: _this.name,
101
101
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
102
102
  list: record === null || record === void 0 ? void 0 : record[_this.id],
103
- type: 3
103
+ type: 3,
104
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
104
105
  })
105
106
  }) : null;
106
107
  });
@@ -114,7 +115,8 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
114
115
  }
115
116
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
116
117
  list: list,
117
- type: 3
118
+ type: 3,
119
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
118
120
  }));
119
121
  });
120
122
  _defineProperty(this, "renderLog", function (r) {
@@ -131,7 +133,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
131
133
  var _typeMap$_this$type4;
132
134
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.key)];
133
135
  return (list || []).map(function (item) {
134
- return [item === null || item === void 0 ? void 0 : item.sendId, item === null || item === void 0 ? void 0 : item.sendName].join("/");
136
+ return [item === null || item === void 0 ? void 0 : item.sendId, _this.type === 'WDT_SEND_GOOD' ? WdtSendData.getInstance().getWdtSendNameByCode(item === null || item === void 0 ? void 0 : item.sendName) : item === null || item === void 0 ? void 0 : item.sendName].join("/");
135
137
  }).join(",");
136
138
  });
137
139
  _defineProperty(this, "editRender", function (p) {
@@ -143,7 +145,8 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
143
145
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
144
146
  display: p === null || p === void 0 ? void 0 : p.display,
145
147
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
146
- type: 3
148
+ type: 3,
149
+ platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
147
150
  }))
148
151
  });
149
152
  });
@@ -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,10 +19,11 @@ 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";
26
+ import CopyText from "../../commonComponents/CopyText";
26
27
  var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
27
28
  var _this = this,
28
29
  _this$componentConfig3;
@@ -60,8 +61,10 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
60
61
  var _ref, _this$expressIntercep;
61
62
  var addressText = (_ref = item.interceptAddress || []) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
62
63
  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, {
64
+ }).join('');
65
+ 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", /*#__PURE__*/React.createElement(CopyText, {
66
+ text: item.interceptCode
67
+ })) : 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
68
  modelWidth: 500,
66
69
  interceptCompany: item.interceptCompany,
67
70
  interceptCode: item.interceptCode,
@@ -104,9 +107,9 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
104
107
  });
105
108
  _defineProperty(this, "filterConfig", function (item) {
106
109
  return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
107
- subKey: "logisticsInterceptCompanyList"
110
+ subKey: 'logisticsInterceptCompanyList'
108
111
  })), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
109
- subKey: "logisticsInterceptCodeList"
112
+ subKey: 'logisticsInterceptCodeList'
110
113
  })), _this.interceptSenderMobile.filterConfig(item), _this.interceptLogisticsStatus.filterConfig(item), _this.interceptType.filterConfig(item), _this.interceptSnapshot.filterConfig(item)];
111
114
  });
112
115
  this.name = options.name;
@@ -130,15 +133,15 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
130
133
  this.interceptSnapshot = new InterceptSnapshot(options);
131
134
  this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
132
135
  id: "".concat(options.id, "_logisticsInterceptCompanyList"),
133
- name: "物流信息"
136
+ name: '物流信息'
134
137
  }));
135
138
  this.expressCode = new InterceptCode(_objectSpread(_objectSpread({}, options), {}, {
136
139
  id: "".concat(options.id, "_logisticsInterceptCodeList"),
137
- name: "物流单号"
140
+ name: '物流单号'
138
141
  }));
139
142
  this.isCombinationComponent = true;
140
143
  this.canSort = false;
141
- this.dataType = "object";
144
+ this.dataType = 'object';
142
145
  this.children = [this.express, this.expressCode, this.interceptType, this.interceptAddress, this.interceptLogisticsStatus, this.interceptSnapshot];
143
146
  this.rules = [{
144
147
  required: (_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required,
@@ -146,12 +149,12 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
146
149
  if (value.some(function (t) {
147
150
  return !(t !== null && t !== void 0 && t.interceptCompany) || !(t !== null && t !== void 0 && t.interceptCode);
148
151
  })) {
149
- return Promise.reject(new Error("请填写物流信息"));
152
+ return Promise.reject(new Error('请填写物流信息'));
150
153
  }
151
154
  if (value.some(function (t) {
152
155
  return !(t !== null && t !== void 0 && t.interceptType);
153
156
  })) {
154
- return Promise.reject(new Error("请选择拦截类型"));
157
+ return Promise.reject(new Error('请选择拦截类型'));
155
158
  }
156
159
  var hasNoAddress = value.some(function (t) {
157
160
  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;
@@ -8,9 +8,10 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
8
8
  import React from 'react';
9
9
  import { isNull } from '@kmkf-fe-packages/kmkf-utils';
10
10
  import { SYMBOL, batchInput } from "../../constant";
11
- var InterceptItem = /*#__PURE__*/_createClass(function InterceptItem(options) {
11
+ import CopyText from "../../commonComponents/CopyText";
12
+ var InterceptCode = /*#__PURE__*/_createClass(function InterceptCode(options) {
12
13
  var _this = this;
13
- _classCallCheck(this, InterceptItem);
14
+ _classCallCheck(this, InterceptCode);
14
15
  _defineProperty(this, "name", void 0);
15
16
  _defineProperty(this, "id", void 0);
16
17
  _defineProperty(this, "sortField", void 0);
@@ -28,7 +29,9 @@ var InterceptItem = /*#__PURE__*/_createClass(function InterceptItem(options) {
28
29
  var list = record[_this.id] || [];
29
30
  if (isNull(list)) return '--';
30
31
  return /*#__PURE__*/React.createElement(React.Fragment, null, list.map(function (item, index) {
31
- return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), item);
32
+ return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), /*#__PURE__*/React.createElement(CopyText, {
33
+ text: item
34
+ }));
32
35
  }));
33
36
  });
34
37
  _defineProperty(this, "renderClient", function () {
@@ -78,4 +81,4 @@ var InterceptItem = /*#__PURE__*/_createClass(function InterceptItem(options) {
78
81
  this.dataType = 'object';
79
82
  this.children = [];
80
83
  });
81
- export default InterceptItem;
84
+ export default InterceptCode;