@kmkf-fe-packages/services-components 2.4.0-rc.0 → 2.4.1

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 (123) hide show
  1. package/dist/esm/Hooks/index.d.ts +2 -0
  2. package/dist/esm/Hooks/index.js +2 -0
  3. package/dist/esm/Hooks/useColumnsConfig.d.ts +26 -0
  4. package/dist/esm/Hooks/useColumnsConfig.js +243 -0
  5. package/dist/esm/Hooks/useGoodsSourceFormat.d.ts +29 -0
  6. package/dist/esm/Hooks/useGoodsSourceFormat.js +441 -0
  7. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.d.ts +1 -1
  8. package/dist/esm/commonComponents/GlobalContext/hook/useGetHasErpData.js +4 -2
  9. package/dist/esm/commonComponents/GlobalContext/index.js +10 -3
  10. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpAddressData.js +14 -11
  11. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpLogisticsCompany.js +14 -12
  12. package/dist/esm/commonComponents/GlobalContext/orderQuery/useGetErpSendData.js +11 -9
  13. package/dist/esm/commonComponents/OperationLog/index.d.ts +2 -1
  14. package/dist/esm/commonComponents/OperationLog/index.js +4 -2
  15. package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +5 -3
  16. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -19
  17. package/dist/esm/commonComponents/ShopList/index.js +3 -1
  18. package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -2
  19. package/dist/esm/components/BS/BsLogistics/index.js +61 -8
  20. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +8 -0
  21. package/dist/esm/components/BS/BsSystemOrder/index.js +56 -9
  22. package/dist/esm/components/BS/common/BsHeaderChild.d.ts +4 -4
  23. package/dist/esm/components/BS/common/BsHeaderChild.js +8 -8
  24. package/dist/esm/components/BS/common/BsHeaderGood.js +2 -2
  25. package/dist/esm/components/BS/common/BsHeaderPic.d.ts +2 -0
  26. package/dist/esm/components/BS/common/BsHeaderPic.js +20 -10
  27. package/dist/esm/components/BS/common/BsMemo.js +4 -1
  28. package/dist/esm/components/BS/common/BsType.js +4 -1
  29. package/dist/esm/components/BS/common/SystemOrderNo.js +4 -1
  30. package/dist/esm/components/BS/common/expressCode.d.ts +4 -1
  31. package/dist/esm/components/BS/common/expressCode.js +16 -4
  32. package/dist/esm/components/BS/common/expressCompany.d.ts +5 -2
  33. package/dist/esm/components/BS/common/expressCompany.js +31 -5
  34. package/dist/esm/components/BsE3/BsReissueE3/index.js +4 -1
  35. package/dist/esm/components/Cascader/index.d.ts +8 -6
  36. package/dist/esm/components/Cascader/index.js +26 -22
  37. package/dist/esm/components/Common/constants/bs.js +2 -2
  38. package/dist/esm/components/Common/constants/columnsBaseInfoMap.js +6 -2
  39. package/dist/esm/components/Common/constants/defaultColumns.js +2 -2
  40. package/dist/esm/components/Common/constants/wdt.js +104 -0
  41. package/dist/esm/components/Common/index.d.ts +3 -3
  42. package/dist/esm/components/Common/index.js +49 -28
  43. package/dist/esm/components/CommonDataTime/index.d.ts +2 -2
  44. package/dist/esm/components/CommonDataTime/index.js +2 -2
  45. package/dist/esm/components/CommonHeaderGood/index.js +1165 -18
  46. package/dist/esm/components/CommonInput/index.js +11 -3
  47. package/dist/esm/components/CommonMultiStatus/index.js +73 -36
  48. package/dist/esm/components/ErpTradeId/index.d.ts +2 -2
  49. package/dist/esm/components/ErpTradeId/index.js +7 -4
  50. package/dist/esm/components/File/index.d.ts +6 -6
  51. package/dist/esm/components/File/index.js +9 -10
  52. package/dist/esm/components/FlowOverallStatusSelect/index.d.ts +40 -0
  53. package/dist/esm/components/FlowOverallStatusSelect/index.js +180 -0
  54. package/dist/esm/components/GY/GyGoods/index.js +5 -1
  55. package/dist/esm/components/GY/GyReissue/index.js +5 -1
  56. package/dist/esm/components/GY/GyReturn/index.js +5 -1
  57. package/dist/esm/components/Input/index.d.ts +4 -4
  58. package/dist/esm/components/Input/index.js +35 -31
  59. package/dist/esm/components/JST/JstSendGood/index.js +17 -1
  60. package/dist/esm/components/KM/KmExchange/index.d.ts +35 -0
  61. package/dist/esm/components/KM/KmExchange/index.js +136 -0
  62. package/dist/esm/components/KmErpSendGood/index.js +1 -1
  63. package/dist/esm/components/Logistics/index.d.ts +1 -0
  64. package/dist/esm/components/Logistics/index.js +10 -0
  65. package/dist/esm/components/LogisticsInterception/columnHeader.js +1 -1
  66. package/dist/esm/components/LogisticsInterception/index.d.ts +20 -0
  67. package/dist/esm/components/LogisticsInterception/index.js +10 -5
  68. package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.d.ts +45 -0
  69. package/dist/esm/components/LogisticsInterception/interceptApiStatusReason.js +97 -0
  70. package/dist/esm/components/LogisticsInterception/interceptSenderMobile.js +3 -2
  71. package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +4 -2
  72. package/dist/esm/components/LogisticsMoreInterception/InterceptApiStatus.js +1 -1
  73. package/dist/esm/components/LogisticsMoreInterception/index.js +1 -0
  74. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +5 -5
  75. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +9 -9
  76. package/dist/esm/components/OrderSubForm/index.d.ts +56 -0
  77. package/dist/esm/components/OrderSubForm/index.js +285 -0
  78. package/dist/esm/components/Payment/index.d.ts +13 -12
  79. package/dist/esm/components/Payment/index.js +31 -11
  80. package/dist/esm/components/PaymentVoucherCode/Preview.js +35 -9
  81. package/dist/esm/components/Picture/index.d.ts +5 -5
  82. package/dist/esm/components/Picture/index.js +20 -20
  83. package/dist/esm/components/PicturePro/index.d.ts +15 -6
  84. package/dist/esm/components/PicturePro/index.js +42 -25
  85. package/dist/esm/components/PostIng/index.d.ts +5 -0
  86. package/dist/esm/components/PostIng/index.js +42 -8
  87. package/dist/esm/components/Public/Goods/index.d.ts +10 -8
  88. package/dist/esm/components/Public/Goods/index.js +42 -2
  89. package/dist/esm/components/Public/ReissueGoods/index.js +62 -4
  90. package/dist/esm/components/Public/ReturnWarehouse/index.d.ts +51 -0
  91. package/dist/esm/components/Public/ReturnWarehouse/index.js +210 -0
  92. package/dist/esm/components/ReceiverAddress/index.d.ts +7 -6
  93. package/dist/esm/components/ReceiverAddress/index.js +41 -27
  94. package/dist/esm/components/Reissue/Logistics/index.js +2 -2
  95. package/dist/esm/components/Remark/index.d.ts +18 -2
  96. package/dist/esm/components/Remark/index.js +37 -2
  97. package/dist/esm/components/ReturnLogistics/index.d.ts +7 -6
  98. package/dist/esm/components/ReturnLogistics/index.js +34 -17
  99. package/dist/esm/components/SKX/SkxGoods/index.js +4 -0
  100. package/dist/esm/components/SKX/SkxIdInputSelect/index.js +4 -0
  101. package/dist/esm/components/Select/index.d.ts +1 -0
  102. package/dist/esm/components/Select/index.js +22 -11
  103. package/dist/esm/components/ShopInput/index.d.ts +5 -5
  104. package/dist/esm/components/ShopInput/index.js +12 -9
  105. package/dist/esm/components/StatusSelect/index.js +4 -0
  106. package/dist/esm/components/SubForm/children/HeaderChildFile.d.ts +30 -0
  107. package/dist/esm/components/SubForm/children/HeaderChildFile.js +117 -0
  108. package/dist/esm/components/SubForm/children/HeaderChildPic.d.ts +30 -0
  109. package/dist/esm/components/SubForm/children/HeaderChildPic.js +116 -0
  110. package/dist/esm/components/SubForm/index.js +78 -6
  111. package/dist/esm/components/TradeId/index.d.ts +5 -5
  112. package/dist/esm/components/TradeId/index.js +17 -14
  113. package/dist/esm/components/WDT/WdtRessuie/index.js +28 -8
  114. package/dist/esm/factory.d.ts +2 -2
  115. package/dist/esm/factory.js +37 -7
  116. package/dist/esm/index.d.ts +5 -0
  117. package/dist/esm/index.js +7 -1
  118. package/dist/esm/service/api.d.ts +3 -0
  119. package/dist/esm/service/api.js +34 -1
  120. package/dist/esm/type.d.ts +38 -0
  121. package/package.json +4 -4
  122. package/dist/esm/components/Common/constants/gy.d.ts +0 -3
  123. package/dist/esm/components/Common/constants/gy.js +0 -219
@@ -8,17 +8,17 @@ 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 { ApaasUploadProAsync } from "@kmkf-fe-packages/basic-components";
11
+ import React from 'react';
12
+ import { ApaasUploadProAsync } from '@kmkf-fe-packages/basic-components';
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
15
  import PictureName from "./PictureName";
16
16
  import PictureUrl from "./PictureUrl";
17
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
18
18
  import "./index.less";
19
- import { Image, Tooltip, message } from "antd";
20
- import { DownloadOutlined, CopyOutlined } from "@ant-design/icons";
21
- import copy from "copy-to-clipboard";
19
+ import { Image, Tooltip, message } from 'antd';
20
+ import { DownloadOutlined, CopyOutlined } from '@ant-design/icons';
21
+ import copy from 'copy-to-clipboard';
22
22
  import { hostUrl } from "../../constant";
23
23
  var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options) {
24
24
  var _this = this,
@@ -36,10 +36,24 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
36
36
  _defineProperty(this, "children", void 0);
37
37
  _defineProperty(this, "dataType", void 0);
38
38
  _defineProperty(this, "currenEnv", void 0);
39
+ _defineProperty(this, "sortChildField", void 0);
40
+ _defineProperty(this, "exampleValue", void 0);
41
+ _defineProperty(this, "standardDateType", void 0);
39
42
  _defineProperty(this, "formatPictures", function (pictures) {
40
- pictures = pictures.replace(/[\[\]]/g, "");
41
- pictures = pictures.replace(/\s/g, "");
42
- return pictures ? pictures.split(",") : [];
43
+ pictures = pictures.replace(/[\[\]]/g, '');
44
+ pictures = pictures.replace(/\s/g, '');
45
+ return pictures ? pictures.split(',') : [];
46
+ });
47
+ _defineProperty(this, "getSortChildFields", function () {
48
+ return [{
49
+ name: '图片名称',
50
+ key: "".concat(_this.id, "_name"),
51
+ dataType: 'arrayObject'
52
+ }, {
53
+ name: '图片链接',
54
+ key: "".concat(_this.id, "_url"),
55
+ dataType: 'arrayObject'
56
+ }];
43
57
  });
44
58
  _defineProperty(this, "render", function (value) {
45
59
  var _document;
@@ -48,29 +62,29 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
48
62
  }
49
63
  var copyText = value.map(function (item) {
50
64
  return item.name;
51
- }).join(",");
65
+ }).join(',');
52
66
  var onCopy = function onCopy() {
53
67
  copy(copyText);
54
- message.success("图片名称复制成功");
68
+ message.success('图片名称复制成功');
55
69
  };
56
70
  return /*#__PURE__*/React.createElement("div", {
57
71
  className: "pictureProClient"
58
72
  }, /*#__PURE__*/React.createElement(Image.PreviewGroup, {
59
- preview: _this.currenEnv === "ks" ? {
60
- getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById("root")
73
+ preview: _this.currenEnv === 'ks' ? {
74
+ getContainer: (_document = document) === null || _document === void 0 ? void 0 : _document.getElementById('root')
61
75
  } : true
62
76
  }, value.map(function (item) {
63
77
  var finalImage = "".concat(/^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url, "?x-oss-process=image/resize,h_60,w_60");
64
78
  var showImage = /^pic\/[\s\S]*$/.test(item.url) ? "".concat(hostUrl, "/").concat(item.url) : item.url;
65
79
  var downloadHandle = function downloadHandle() {
66
- if (_this.currenEnv === "pc") {
80
+ if (_this.currenEnv === 'pc') {
67
81
  try {
68
82
  fetch("".concat(hostUrl, "/").concat(item.url)).then(function (res) {
69
83
  return res.blob();
70
84
  }).then(function (blob) {
71
- var a = document.createElement("a");
85
+ var a = document.createElement('a');
72
86
  document.body.appendChild(a);
73
- a.style.display = "none";
87
+ a.style.display = 'none';
74
88
  var url = window.URL.createObjectURL(blob);
75
89
  a.href = url;
76
90
  a.download = item.name;
@@ -83,7 +97,7 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
83
97
  }
84
98
  } else {
85
99
  copy("".concat(hostUrl, "/").concat(item.url));
86
- message.success("图片链接复制成功");
100
+ message.success('图片链接复制成功');
87
101
  }
88
102
  };
89
103
  return /*#__PURE__*/React.createElement("div", {
@@ -96,15 +110,15 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
96
110
  preview: {
97
111
  src: showImage
98
112
  },
99
- width: "100%",
100
- height: "100%"
113
+ width: '100%',
114
+ height: '100%'
101
115
  })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
102
116
  title: item.name
103
117
  }, /*#__PURE__*/React.createElement("div", {
104
118
  className: "pictureProText"
105
119
  }, item.name)), /*#__PURE__*/React.createElement("div", {
106
120
  className: "pictureProOperate"
107
- }, _this.currenEnv === "pc" ? /*#__PURE__*/React.createElement(DownloadOutlined, {
121
+ }, _this.currenEnv === 'pc' ? /*#__PURE__*/React.createElement(DownloadOutlined, {
108
122
  className: "downloadIcon",
109
123
  onClick: downloadHandle
110
124
  }) : /*#__PURE__*/React.createElement(CopyOutlined, {
@@ -142,9 +156,9 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
142
156
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
143
157
  display: p === null || p === void 0 ? void 0 : p.display,
144
158
  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,
145
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
159
+ tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : '',
146
160
  component: /*#__PURE__*/React.createElement(ApaasUploadProAsync, _extends({}, _this.componentConfig, {
147
- uniqueKey: _this.id,
161
+ uniqueKey: 'picturePro',
148
162
  hostUrl: hostUrl,
149
163
  platform: _this.currenEnv
150
164
  }))
@@ -166,15 +180,18 @@ var BasicPicturePro = /*#__PURE__*/_createClass(function BasicPicturePro(options
166
180
  this.isCombinationComponent = true;
167
181
  this.canSort = true;
168
182
  this.children = [new PictureName(_objectSpread(_objectSpread({}, options), {}, {
169
- name: "图片名称",
183
+ name: '图片名称',
170
184
  id: "".concat(options.id, "_pictureProList_name"),
171
185
  width: 250
172
186
  })), new PictureUrl(_objectSpread(_objectSpread({}, options), {}, {
173
- name: "图片详情",
187
+ name: '图片详情',
174
188
  id: "".concat(options.id, "_pictureProList_url"),
175
189
  width: 200
176
190
  }))];
177
- this.dataType = "object";
191
+ this.dataType = 'object';
178
192
  this.currenEnv = options === null || options === void 0 ? void 0 : (_options$effects = options.effects) === null || _options$effects === void 0 ? void 0 : _options$effects.env;
193
+ this.sortChildField = this.getSortChildFields();
194
+ this.exampleValue = '[{"name":"c.jpeg","url":"https://kefu.kuaimai.com/pic/c.jpeg"}]';
195
+ this.standardDateType = 'Array';
179
196
  });
180
197
  export default BasicPicturePro;
@@ -7,6 +7,7 @@ import District from "../BS/BsPosting/components//District";
7
7
  import Detail from "../BS/BsPosting/components//Detail";
8
8
  import ReceiverName from "../BS/BsPosting/components//ReceiverName";
9
9
  import ReceiverMobile from "../BS/BsPosting/components//ReceiverMobile";
10
+ declare type SortColumnsField = Array<string>;
10
11
  declare class BasicPosting implements ComponentInterface {
11
12
  name: string;
12
13
  id: string;
@@ -27,7 +28,11 @@ declare class BasicPosting implements ComponentInterface {
27
28
  receiverName: ReceiverName;
28
29
  receiverMobile: ReceiverMobile;
29
30
  isSplitColumns: boolean;
31
+ sortColumns: SortColumnsField;
32
+ headerProvince: boolean;
30
33
  constructor(options: PickOption);
34
+ getChildren: () => (Province | City | District | Detail | ReceiverName | ReceiverMobile | undefined)[];
35
+ getSortColumns: (sortColumns: string | undefined) => SortColumnsField;
31
36
  renderPc: (value: any, record: Record) => React.JSX.Element | null;
32
37
  renderLog: (r: Record) => React.JSX.Element | null;
33
38
  getComponentValue: (r: Record) => {
@@ -23,7 +23,7 @@ import { ApaasPosting } from "@kmkf-fe-packages/basic-components";
23
23
  import GetFormItem from "../GetFormItem";
24
24
  import ItemView from "../../commonComponents/ItemView";
25
25
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
26
- import { AddressData, BsAddressData, WdtAddressData, GyAddressData } from "@kmkf-fe-packages/kmkf-utils";
26
+ import { AddressData, BsAddressData, WdtAddressData, GyAddressData, JstAddressData } from "@kmkf-fe-packages/kmkf-utils";
27
27
  import Province from "../BS/BsPosting/components/Province";
28
28
  import City from "../BS/BsPosting/components//City";
29
29
  import District from "../BS/BsPosting/components//District";
@@ -35,6 +35,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
35
35
  var _this = this,
36
36
  _options$componentCon,
37
37
  _options$componentCon2,
38
+ _this$componentConfig6,
38
39
  _options$componentCon3;
39
40
  _classCallCheck(this, BasicPosting);
40
41
  _defineProperty(this, "name", void 0);
@@ -56,6 +57,26 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
56
57
  _defineProperty(this, "receiverName", void 0);
57
58
  _defineProperty(this, "receiverMobile", void 0);
58
59
  _defineProperty(this, "isSplitColumns", void 0);
60
+ _defineProperty(this, "sortColumns", void 0);
61
+ _defineProperty(this, "headerProvince", void 0);
62
+ _defineProperty(this, "getChildren", function () {
63
+ var _this$sortColumns;
64
+ if (!_this.isSplitColumns) return [];
65
+ return (_this$sortColumns = _this.sortColumns) === null || _this$sortColumns === void 0 ? void 0 : _this$sortColumns.map(function (filed) {
66
+ if (filed === 'province') return _this.province;
67
+ if (filed === 'city') return _this.city;
68
+ if (filed === 'district') return _this.district;
69
+ if (filed === 'detail') return _this.detail;
70
+ if (filed === 'name') return _this.receiverName;
71
+ if (filed === 'mobile') return _this.receiverMobile;
72
+ });
73
+ });
74
+ _defineProperty(this, "getSortColumns", function (sortColumns) {
75
+ var _sortColumns$split;
76
+ var defaultSortColumn = ['province', 'city', 'district', 'detail', 'name', 'mobile'];
77
+ if (!sortColumns) return defaultSortColumn;
78
+ return (_sortColumns$split = sortColumns === null || sortColumns === void 0 ? void 0 : sortColumns.split(',')) !== null && _sortColumns$split !== void 0 ? _sortColumns$split : [];
79
+ });
59
80
  _defineProperty(this, "renderPc", function (value, record) {
60
81
  var _ref;
61
82
  if (_this.isSplitColumns) {
@@ -73,20 +94,26 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
73
94
  var addressText = (_ref = [province, city, district]) === null || _ref === void 0 ? void 0 : _ref.map(function (suffix) {
74
95
  return _this.addressDateInstance.getNameByCode(suffix);
75
96
  }).join("");
97
+ var text = _this.headerProvince ? "".concat(addressText).concat(detail, " ").concat(name, " ").concat(mobile) : "".concat(name, " ").concat(mobile, " ").concat(addressText).concat(detail);
98
+ var firstContent = _this.headerProvince ? "".concat(addressText).concat(detail) : "".concat(name, " ").concat(mobile);
99
+ var secondContent = _this.headerProvince ? "".concat(name, " ").concat(mobile) : "".concat(addressText).concat(detail);
76
100
  return /*#__PURE__*/React.createElement(CopyText, {
77
- text: "".concat(addressText).concat(detail, " ").concat(name, " ").concat(mobile),
101
+ text: text,
78
102
  showText: /*#__PURE__*/React.createElement("div", {
79
103
  style: {
80
104
  maxHeight: "100px",
81
105
  overflowY: "auto"
82
106
  }
83
- }, "".concat(addressText).concat(detail), /*#__PURE__*/React.createElement("br", null), "".concat(name, " ").concat(mobile))
107
+ }, firstContent, /*#__PURE__*/React.createElement("br", null), secondContent)
84
108
  });
85
109
  });
86
110
  _defineProperty(this, "renderLog", function (r) {
87
111
  var _ref2;
88
112
  if (_this.isSplitColumns) {
89
- return /*#__PURE__*/React.createElement(React.Fragment, null, _this.province.renderLog(r), _this.city.renderLog(r), _this.district.renderLog(r), _this.detail.renderLog(r), "/", _this.receiverName.renderLog(r), _this.receiverMobile.renderLog(r));
113
+ var _this$children;
114
+ return /*#__PURE__*/React.createElement(React.Fragment, null, (_this$children = _this.children) === null || _this$children === void 0 ? void 0 : _this$children.map(function (instance) {
115
+ return instance.renderLog(r);
116
+ }));
90
117
  }
91
118
  var _this$getComponentVal = _this.getComponentValue(r),
92
119
  province = _this$getComponentVal.province,
@@ -101,7 +128,8 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
101
128
  var addressText = (_ref2 = [province, city, district]) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (suffix) {
102
129
  return _this.addressDateInstance.getNameByCode(suffix);
103
130
  }).join("");
104
- return /*#__PURE__*/React.createElement(React.Fragment, null, "".concat(addressText).concat(detail, " ").concat(name).concat(mobile));
131
+ var content = _this.headerProvince ? "".concat(addressText).concat(detail, " ").concat(name).concat(mobile) : "".concat(name).concat(mobile, " ").concat(addressText).concat(detail);
132
+ return /*#__PURE__*/React.createElement(React.Fragment, null, content);
105
133
  });
106
134
  _defineProperty(this, "getComponentValue", function (r) {
107
135
  if (_this.isSplitColumns) {
@@ -141,7 +169,8 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
141
169
  var addressText = (_ref3 = [province, city, district]) === null || _ref3 === void 0 ? void 0 : _ref3.map(function (suffix) {
142
170
  return _this.addressDateInstance.getNameByCode(suffix);
143
171
  }).join("/");
144
- return "".concat(addressText, "/").concat(detail, "/ ").concat(name, "/").concat(mobile);
172
+ var content = _this.headerProvince ? "".concat(addressText, "/").concat(detail, "/ ").concat(name, "/").concat(mobile) : "".concat(name, "/").concat(mobile, "/ ").concat(addressText, "/").concat(detail);
173
+ return content;
145
174
  });
146
175
  _defineProperty(this, "renderClient", function (record) {
147
176
  var _ref4;
@@ -155,7 +184,9 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
155
184
  return _this.addressDateInstance.getNameByCode(suffix);
156
185
  }).join("");
157
186
  var hasValue = addressText || detail || name || mobile;
158
- var value = hasValue ? /*#__PURE__*/React.createElement("div", null, [addressText, detail].join("/"), /*#__PURE__*/React.createElement("br", null), [name, mobile].join("/")) : null;
187
+ var firstContent = _this.headerProvince ? [addressText, detail].join("/") : [name, mobile].join("/");
188
+ var secondContent = _this.headerProvince ? [name, mobile].join("/") : [addressText, detail].join("/");
189
+ var value = hasValue ? /*#__PURE__*/React.createElement("div", null, firstContent, /*#__PURE__*/React.createElement("br", null), secondContent) : null;
159
190
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
160
191
  id: _this.id,
161
192
  label: _this.name,
@@ -197,8 +228,11 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
197
228
  bs: BsAddressData,
198
229
  gy: GyAddressData,
199
230
  wdt: WdtAddressData,
231
+ jst: JstAddressData,
200
232
  workOrder: AddressData
201
233
  }[showField] || AddressData).getInstance();
234
+ this.sortColumns = this.getSortColumns((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.sortColumns);
235
+ this.headerProvince = this.sortColumns[0] === 'province';
202
236
  this.province = new Province(_objectSpread(_objectSpread({}, options), {}, {
203
237
  id: "".concat(options.id, "_postingProvince"),
204
238
  name: "省",
@@ -229,7 +263,7 @@ var BasicPosting = /*#__PURE__*/_createClass(function BasicPosting(options) {
229
263
  parentName: this.name,
230
264
  name: "收件人电话"
231
265
  }));
232
- this.children = this.isSplitColumns ? [this.province, this.city, this.district, this.detail, this.receiverName, this.receiverMobile] : [];
266
+ this.children = this.getChildren();
233
267
  this.rules = [].concat(_toConsumableArray(options !== null && options !== void 0 && (_options$componentCon3 = options.componentConfig) !== null && _options$componentCon3 !== void 0 && _options$componentCon3.required ? [{
234
268
  validator: function validator(_, value) {
235
269
  var _options$componentCon4, _value$postingAddress, _value$postingAddress2;
@@ -1,14 +1,7 @@
1
1
  import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
2
  import React from "react";
3
3
  import CommonHeaderGoods from "../../CommonHeaderGood";
4
- declare const CONFIG_MAP: {
5
- JST_GOODS: {
6
- key: string;
7
- };
8
- KM_GOODS: {
9
- key: string;
10
- };
11
- };
4
+ declare const CONFIG_MAP: Record;
12
5
  declare class PublicGoods implements ComponentInterface {
13
6
  name: string;
14
7
  id: string;
@@ -23,7 +16,16 @@ declare class PublicGoods implements ComponentInterface {
23
16
  children: ComponentInterface[];
24
17
  dataType: ComponentInterface["dataType"];
25
18
  headers: CommonHeaderGoods;
19
+ exampleValue?: string;
20
+ standardDateType: ComponentInterface["standardDateType"];
21
+ sortChildField: {
22
+ name: string;
23
+ key: string;
24
+ dataType: string;
25
+ [key: string]: any;
26
+ }[];
26
27
  constructor(options: PickOption);
28
+ getSortChildFields: () => any;
27
29
  renderClient: (record: any) => React.JSX.Element | null;
28
30
  renderPc: () => null;
29
31
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -15,19 +15,40 @@ import CommonHeaderGoods from "../../CommonHeaderGood";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
18
+ import { getColumnsMap } from "../../Common/constants/columnsBaseInfoMap";
18
19
  import { SYMBOL } from "../../../constant";
19
20
  var CONFIG_MAP = {
20
21
  JST_GOODS: {
22
+ name: "聚水潭",
21
23
  key: "jstGoods"
22
24
  },
23
25
  KM_GOODS: {
26
+ name: "快麦ERP",
24
27
  key: "kmGoods"
28
+ },
29
+ JY_GOODS: {
30
+ name: "巨益",
31
+ key: "jyGoods",
32
+ exampleValue: '[{"gift":"","bfit":"","mallSkuId":"","specCode":"","sellTotal":0,"canEdit":false,"sellPrice":0,"mallProductName":"","oid":"","uuid":"","productName":"","skuName":"","canDelete":false,"divideOrderFee":0,"goodsName":"","mallSellingPrice":0,"productId":"","mallProductId":"","productCode":"","specName":"","mallSkuName":"","sellCount":0,"settlementPrice":0,"goodsCode":"","systemOrderNo":"","skuCode":""}]'
33
+ },
34
+ JKY_GOODS: {
35
+ name: "吉客云",
36
+ key: "jkyGoods"
37
+ },
38
+ WDT_AFTERSALE_GOODS: {
39
+ name: "旺店通售后",
40
+ key: "wdtAftersaleGoods"
41
+ },
42
+ JST_AFTERSALE_GOODS: {
43
+ name: "jst售后",
44
+ key: "jstAftersaleGoods"
25
45
  }
26
46
  };
27
47
  var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
28
48
  var _this = this,
29
49
  _CONFIG_MAP$this$type,
30
- _this$componentConfig6;
50
+ _this$componentConfig6,
51
+ _CONFIG_MAP$this$type2;
31
52
  _classCallCheck(this, PublicGoods);
32
53
  _defineProperty(this, "name", void 0);
33
54
  _defineProperty(this, "id", void 0);
@@ -42,6 +63,21 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
42
63
  _defineProperty(this, "children", void 0);
43
64
  _defineProperty(this, "dataType", void 0);
44
65
  _defineProperty(this, "headers", void 0);
66
+ _defineProperty(this, "exampleValue", void 0);
67
+ _defineProperty(this, "standardDateType", void 0);
68
+ _defineProperty(this, "sortChildField", void 0);
69
+ _defineProperty(this, "getSortChildFields", function () {
70
+ var Columns = getColumnsMap();
71
+ return Columns[_this.type].filter(function (item) {
72
+ return !["picUrl"].includes(item.dataIndex);
73
+ }).map(function (item) {
74
+ return {
75
+ name: item.title,
76
+ key: "".concat(_this.id, "_").concat(item.dataIndex),
77
+ dataType: "arrayObject"
78
+ };
79
+ });
80
+ });
45
81
  _defineProperty(this, "renderClient", function (record) {
46
82
  var _record, _CONFIG_MAP$_this$typ, _this$componentConfig;
47
83
  return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
@@ -125,11 +161,15 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
125
161
  validator: function validator(_, value) {
126
162
  var _value$key;
127
163
  if (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length)) {
128
- return Promise.reject(new Error("请选择聚水潭商品"));
164
+ var _CONFIG_MAP$_this$typ6;
165
+ return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat((_CONFIG_MAP$_this$typ6 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ6 === void 0 ? void 0 : _CONFIG_MAP$_this$typ6.name, "\u5546\u54C1")));
129
166
  }
130
167
  return Promise.resolve();
131
168
  }
132
169
  }] : [];
133
170
  this.dataType = "object";
171
+ this.sortChildField = this.getSortChildFields();
172
+ this.exampleValue = ((_CONFIG_MAP$this$type2 = CONFIG_MAP[this.type]) === null || _CONFIG_MAP$this$type2 === void 0 ? void 0 : _CONFIG_MAP$this$type2.exampleValue) || "";
173
+ this.standardDateType = "Array";
134
174
  });
135
175
  export default PublicGoods;
@@ -66,6 +66,60 @@ var typeMap = {
66
66
  errMsg: "请选择快麦补发商品",
67
67
  name: "快麦",
68
68
  compType: "补发",
69
+ validator: function validator(_rule, value, type, componentConfig) {
70
+ if (!_rule.required) return Promise.resolve();
71
+ var validatorFlag = erpFormValidator(_rule, value, type, componentConfig);
72
+ if (validatorFlag) {
73
+ return validatorFlag;
74
+ }
75
+ return Promise.resolve();
76
+ }
77
+ },
78
+ KM_RETURN_GOODS: {
79
+ key: "kmReturnGoods",
80
+ typeName: "kmReturnType",
81
+ remark: "kmReturnType_memo",
82
+ systemOrderNo: "kmSystemOrderNo",
83
+ systemOrderBillType: "kmSystemOrderBillType",
84
+ errMsg: "请选择快麦退货商品",
85
+ name: "快麦",
86
+ compType: "退货",
87
+ validator: function validator(_rule, value, type) {
88
+ if (!_rule.required) return Promise.resolve();
89
+ var validatorFlag = erpFormValidator(_rule, value, type);
90
+ if (validatorFlag) {
91
+ return validatorFlag;
92
+ }
93
+ return Promise.resolve();
94
+ }
95
+ },
96
+ JY_REISSUE_GOODS: {
97
+ key: "jyReissueGoods",
98
+ typeName: "jyReissueType",
99
+ remark: "jyReissueType_memo",
100
+ systemOrderNo: "jySystemOrderNo",
101
+ systemOrderBillType: "jySystemOrderBillType",
102
+ errMsg: "请选择巨益补发商品",
103
+ name: "巨益",
104
+ compType: "补发",
105
+ validator: function validator(_rule, value, type) {
106
+ if (!_rule.required) return Promise.resolve();
107
+ var validatorFlag = erpFormValidator(_rule, value, type);
108
+ if (validatorFlag) {
109
+ return validatorFlag;
110
+ }
111
+ return Promise.resolve();
112
+ }
113
+ },
114
+ JKY_REISSUE_GOODS: {
115
+ key: "jkyReissueGoods",
116
+ typeName: "jkyReissueType",
117
+ remark: "jkyReissueType_memo",
118
+ systemOrderNo: "jkySystemOrderNo",
119
+ systemOrderBillType: "jkySystemOrderBillType",
120
+ errMsg: "请选择吉客云补发商品",
121
+ name: "吉客云",
122
+ compType: "补发",
69
123
  validator: function validator(_rule, value, type) {
70
124
  if (!_rule.required) return Promise.resolve();
71
125
  var validatorFlag = erpFormValidator(_rule, value, type);
@@ -144,7 +198,7 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
144
198
  _defineProperty(this, "editRender", function (p) {
145
199
  var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$effects, _this$effects2, _this$effects3;
146
200
  var onChange = function onChange(val, type) {
147
- if (_this.type === "KM_REISSUE_GOODS" && type === "systemOrder") {
201
+ if (["KM_REISSUE_GOODS", "KM_RETURN_GOODS"].includes(_this.type) && type === "systemOrder") {
148
202
  p === null || p === void 0 ? void 0 : p.onChange(val, "kmSystemOrder");
149
203
  }
150
204
  };
@@ -238,18 +292,22 @@ var PublicReissue = /*#__PURE__*/_createClass(function PublicReissue(options) {
238
292
  this.rules = [{
239
293
  required: isRequired,
240
294
  validator: function validator(_, value) {
241
- var _value, _typeMap$options$type11;
295
+ var _value, _typeMap$options$type11, _typeMap$options$type13;
242
296
  if (isRequired && (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type11 = typeMap[options.type]) === null || _typeMap$options$type11 === void 0 ? void 0 : _typeMap$options$type11.key)]) !== null && _value !== void 0 && _value.length))) {
243
297
  var _typeMap$options$type12;
244
298
  return Promise.reject(new Error("".concat((_typeMap$options$type12 = typeMap[options.type]) === null || _typeMap$options$type12 === void 0 ? void 0 : _typeMap$options$type12.errMsg)));
245
299
  }
300
+ // 快麦补发/退货商品需要校验系统单
301
+ if (isRequired && ["KM_REISSUE_GOODS", "KM_RETURN_GOODS"].includes(options.type) && (!value || !(value !== null && value !== void 0 && value["".concat((_typeMap$options$type13 = typeMap[options.type]) === null || _typeMap$options$type13 === void 0 ? void 0 : _typeMap$options$type13.systemOrderNo)]))) {
302
+ return Promise.reject(new Error(options.type === "KM_REISSUE_GOODS" ? "\u8BF7\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355" : "\u8BF7\u9009\u62E9\u9000\u8D27\u7CFB\u7EDF\u5355"));
303
+ }
246
304
  return Promise.resolve();
247
305
  }
248
306
  }, {
249
307
  required: isRequired,
250
308
  validator: function validator(_rule, value) {
251
- var _typeMap$options$type13, _typeMap$options$type14;
252
- return ((_typeMap$options$type13 = typeMap[options.type]) === null || _typeMap$options$type13 === void 0 ? void 0 : (_typeMap$options$type14 = _typeMap$options$type13.validator) === null || _typeMap$options$type14 === void 0 ? void 0 : _typeMap$options$type14.call(_typeMap$options$type13, _rule, value, options.type)) || function () {
309
+ var _typeMap$options$type14, _typeMap$options$type15;
310
+ return ((_typeMap$options$type14 = typeMap[options.type]) === null || _typeMap$options$type14 === void 0 ? void 0 : (_typeMap$options$type15 = _typeMap$options$type14.validator) === null || _typeMap$options$type15 === void 0 ? void 0 : _typeMap$options$type15.call(_typeMap$options$type14, _rule, value, options.type, _this.componentConfig)) || function () {
253
311
  return Promise.resolve();
254
312
  };
255
313
  }
@@ -0,0 +1,51 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ declare class ReturnWarehouse implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ sortChildField: {
8
+ name: string;
9
+ key: string;
10
+ dataType: string;
11
+ [key: string]: any;
12
+ }[];
13
+ type: string;
14
+ rules: any[];
15
+ componentConfig: ComponentInterface["componentConfig"];
16
+ align: ALignType;
17
+ isCombinationComponent: boolean;
18
+ formField: string;
19
+ canSort: boolean;
20
+ children: ComponentInterface[];
21
+ dataType: ComponentInterface["dataType"];
22
+ format: ComponentInterface["format"];
23
+ constructor(options: PickOption);
24
+ getSortChildFields: (type: string, options: PickOption, fieldType?: string) => any;
25
+ renderClient: (record: Record) => React.JSX.Element | null;
26
+ renderPc: (value: any, record: Record) => React.JSX.Element;
27
+ renderLog: (r: Record) => React.JSX.Element | null;
28
+ getComponentValue: (r: Record) => any;
29
+ renderExport: (value: any, record: any) => any;
30
+ editRender: (p: any) => React.JSX.Element;
31
+ filterConfig: (item: ColumnConfig) => ({
32
+ searchDefaultConditions: "in";
33
+ type: string;
34
+ id: string;
35
+ name: string;
36
+ filterComponentType: "MultipleSelect";
37
+ props: {
38
+ options: any[];
39
+ };
40
+ filterFn: (value: string) => (i: Record) => any;
41
+ } | {
42
+ searchDefaultConditions: "like";
43
+ type: string;
44
+ id: string;
45
+ name: string;
46
+ filterComponentType: "Input";
47
+ filterFn: (value: string) => (i: Record) => any;
48
+ props?: undefined;
49
+ })[];
50
+ }
51
+ export default ReturnWarehouse;