@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
package/README.md CHANGED
@@ -3,3 +3,4 @@
3
3
  - 针对于自定义组件的后缀,在提交的时候是以组件类型的驼峰式来命名的
4
4
 
5
5
  ---
6
+
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const _default: (props: {
3
+ text: string;
4
+ showText?: string;
5
+ style?: any;
6
+ }) => React.JSX.Element;
7
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { Typography } from 'antd';
3
+ var Paragraph = Typography.Paragraph;
4
+ export default (function (props) {
5
+ var text = props.text,
6
+ showText = props.showText,
7
+ style = props.style;
8
+ return /*#__PURE__*/React.createElement(Paragraph, {
9
+ copyable: {
10
+ text: text
11
+ },
12
+ style: style
13
+ }, showText || text);
14
+ });
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany";
2
+ declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryWdtLogisticsCompany" | "queryWdtSendData";
3
3
  declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
4
4
  requestList?: RequestType[] | undefined;
5
5
  repeatRequestList?: Record<string, () => Promise<any>> | undefined;
@@ -15,7 +15,8 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useEffect, useState } from "react";
17
17
  import { Skeleton, Result, Button } from "antd";
18
- import { queryAddressData, queryBsAddressData, queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryWdtAddressData, queryAllLogisticsCompany } from "../../service/api";
18
+ import { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
19
+ import { servers } from '@kmkf-fe-packages/kmkf-utils';
19
20
  var Global = function Global(_ref) {
20
21
  var children = _ref.children,
21
22
  _ref$requestList = _ref.requestList,
@@ -33,13 +34,15 @@ var Global = function Global(_ref) {
33
34
  while (1) switch (_context.prev = _context.next) {
34
35
  case 0:
35
36
  mapping = {
36
- queryAddressData: queryAddressData,
37
- queryBsAddressData: queryBsAddressData,
37
+ queryAddressData: servers.queryAddressData,
38
+ queryBsAddressData: servers.queryBsAddressData,
38
39
  queryExpressInterceptData: queryExpressInterceptData,
39
40
  queryLogisticsAddressData: queryLogisticsAddressData,
40
41
  queryPlatData: queryPlatData,
41
- queryWdtAddressData: queryWdtAddressData,
42
- queryAllLogisticsCompany: queryAllLogisticsCompany
42
+ queryWdtAddressData: servers.queryWdtAddressData,
43
+ queryAllLogisticsCompany: queryAllLogisticsCompany,
44
+ queryWdtLogisticsCompany: queryWdtLogisticsCompany,
45
+ queryWdtSendData: queryWdtSendData
43
46
  };
44
47
  mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
45
48
  promises = [];
@@ -6,5 +6,5 @@ declare type PlatBuyerProp = {
6
6
  shopList: any[];
7
7
  tbAppKey?: string;
8
8
  };
9
- declare const PlatBuyer: ({ shopId, buyerNick, buyerOpenUid, shopList, tbAppKey }: PlatBuyerProp) => React.JSX.Element;
9
+ declare const PlatBuyer: ({ shopId, buyerNick, buyerOpenUid, shopList, tbAppKey, }: PlatBuyerProp) => React.JSX.Element;
10
10
  export default PlatBuyer;
@@ -5,11 +5,9 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  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); }
7
7
  import React, { useMemo } from 'react';
8
- import { CopyOutlined } from '@ant-design/icons';
9
- import { message } from 'antd';
10
- import copy from 'copy-to-clipboard';
11
8
  import { PlatData } from '@kmkf-fe-packages/kmkf-utils';
12
9
  import Wangwang from "../Wangwang";
10
+ import CopyText from "../CopyText";
13
11
  var PlatBuyer = function PlatBuyer(_ref) {
14
12
  var _platInfo$shopId;
15
13
  var shopId = _ref.shopId,
@@ -18,10 +16,6 @@ var PlatBuyer = function PlatBuyer(_ref) {
18
16
  shopList = _ref.shopList,
19
17
  tbAppKey = _ref.tbAppKey;
20
18
  var platList = PlatData.getInstance().getPlatData();
21
- var copyHandle = function copyHandle(text) {
22
- copy(text);
23
- message.success('复制成功');
24
- };
25
19
  var platInfo = useMemo(function () {
26
20
  var info = {};
27
21
  (shopList || []).forEach(function (item) {
@@ -36,15 +30,8 @@ var PlatBuyer = function PlatBuyer(_ref) {
36
30
  nick: buyerNick,
37
31
  buyerOpenUid: buyerOpenUid,
38
32
  tbAppKey: tbAppKey
39
- })) : /*#__PURE__*/React.createElement(React.Fragment, null, buyerNick, /*#__PURE__*/React.createElement("span", {
40
- onClick: function onClick() {
41
- return copyHandle(buyerNick);
42
- }
43
- }, /*#__PURE__*/React.createElement("span", {
44
- style: {
45
- paddingLeft: '4px',
46
- cursor: 'pointer'
47
- }
48
- }, /*#__PURE__*/React.createElement(CopyOutlined, null))));
33
+ })) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CopyText, {
34
+ text: buyerNick
35
+ }));
49
36
  };
50
37
  export default PlatBuyer;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare const QueryLogisticsTrack: ({ title, modelWidth, interceptCompany, interceptCode, interceptSenderMobile, }: {
3
3
  title?: string | undefined;
4
4
  modelWidth?: string | number | undefined;
@@ -8,18 +8,19 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
9
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import React, { useState } from "react";
12
- import { Modal, Timeline, message } from "antd";
13
- import { request } from "@kmkf-fe-packages/kmkf-utils";
11
+ import React, { useState } from 'react';
12
+ import { Modal, Timeline, message } from 'antd';
13
+ import { request } from '@kmkf-fe-packages/kmkf-utils';
14
+ import CopyText from "../CopyText";
14
15
  var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
15
16
  var _ref$title = _ref.title,
16
- title = _ref$title === void 0 ? "查轨迹" : _ref$title,
17
+ title = _ref$title === void 0 ? '查轨迹' : _ref$title,
17
18
  _ref$modelWidth = _ref.modelWidth,
18
19
  modelWidth = _ref$modelWidth === void 0 ? 500 : _ref$modelWidth,
19
20
  interceptCompany = _ref.interceptCompany,
20
21
  interceptCode = _ref.interceptCode,
21
22
  interceptSenderMobile = _ref.interceptSenderMobile;
22
- var _useState = useState(""),
23
+ var _useState = useState(''),
23
24
  _useState2 = _slicedToArray(_useState, 2),
24
25
  inputVal = _useState2[0],
25
26
  setInputVal = _useState2[1];
@@ -35,9 +36,9 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
35
36
  var list = _ref2.list;
36
37
  return /*#__PURE__*/React.createElement("div", {
37
38
  style: {
38
- maxHeight: "500px",
39
- padding: "8px 0",
40
- overflowY: "auto"
39
+ maxHeight: '500px',
40
+ padding: '8px 0',
41
+ overflowY: 'auto'
41
42
  }
42
43
  }, /*#__PURE__*/React.createElement(Timeline, null, list.map(function (item, index) {
43
44
  return /*#__PURE__*/React.createElement(Timeline.Item, {
@@ -54,7 +55,7 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
54
55
  _context.next = 2;
55
56
  break;
56
57
  }
57
- return _context.abrupt("return", message.error("缺少物流公司或物流单号"));
58
+ return _context.abrupt("return", message.error('缺少物流公司或物流单号'));
58
59
  case 2:
59
60
  logisticsTraceSearch();
60
61
  //如果是顺丰且没有手机号 要输入手机号
@@ -89,8 +90,8 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
89
90
  var logisticsTraceSearch = function logisticsTraceSearch(mobile) {
90
91
  try {
91
92
  request({
92
- url: "/qy/logistics/logisticsTraceSearch",
93
- method: "post",
93
+ url: '/qy/logistics/logisticsTraceSearch',
94
+ method: 'post',
94
95
  data: {
95
96
  mailNo: interceptCode,
96
97
  cpCode: interceptCompany,
@@ -117,13 +118,18 @@ var QueryLogisticsTrack = function QueryLogisticsTrack(_ref) {
117
118
  };
118
119
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
119
120
  style: {
120
- margin: "0 8px",
121
- color: "#1890ff",
122
- cursor: "pointer"
121
+ margin: '0 8px',
122
+ color: '#1890ff',
123
+ cursor: 'pointer'
123
124
  }
124
125
  }, /*#__PURE__*/React.createElement("span", {
125
126
  onClick: handleQueryLogistics
126
- }, title)), /*#__PURE__*/React.createElement(Modal, {
127
+ }, title === '查轨迹' ? title : /*#__PURE__*/React.createElement(CopyText, {
128
+ text: title,
129
+ style: {
130
+ color: '#1890ff'
131
+ }
132
+ }))), /*#__PURE__*/React.createElement(Modal, {
127
133
  width: modelWidth,
128
134
  title: "\u7269\u6D41\u8F68\u8FF9",
129
135
  footer: false,
@@ -47,7 +47,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
47
47
  _typeMap$_options$typ5,
48
48
  _typeMap$_options$typ6,
49
49
  _this$componentConfig3,
50
- _this$componentConfig4;
50
+ _this$componentConfig5;
51
51
  _classCallCheck(this, BsLogistics);
52
52
  _defineProperty(this, "name", void 0);
53
53
  _defineProperty(this, "id", void 0);
@@ -73,7 +73,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
73
73
  label: _this.name,
74
74
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
75
75
  list: record === null || record === void 0 ? void 0 : record[_this.id],
76
- type: 1
76
+ type: 1,
77
+ platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
77
78
  })
78
79
  }) : null;
79
80
  });
@@ -120,7 +121,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
120
121
  }
121
122
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
122
123
  list: list,
123
- type: 1
124
+ type: 1,
125
+ platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
124
126
  }));
125
127
  });
126
128
  _defineProperty(this, "renderLog", function (r) {
@@ -147,6 +149,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
147
149
  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,
148
150
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
149
151
  type: 1,
152
+ platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default',
150
153
  options: _this.expressDateInstance.getExpressData(),
151
154
  onChange: p === null || p === void 0 ? void 0 : p.onChange
152
155
  }))
@@ -172,7 +175,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
172
175
  name: "物流公司",
173
176
  parentName: this.name,
174
177
  id: "".concat(_options.id, "_").concat((_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.key, "_").concat((_typeMap$_options$typ4 = typeMap[_options.type]) === null || _typeMap$_options$typ4 === void 0 ? void 0 : _typeMap$_options$typ4.company),
175
- width: 200
178
+ width: 200,
179
+ platformType: this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
176
180
  }));
177
181
  this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, _options), {}, {
178
182
  name: "物流单号",
@@ -185,7 +189,8 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
185
189
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
186
190
  required: true,
187
191
  validator: function validator(_, value) {
188
- var showField = _this.componentConfig.showField;
192
+ var _this$componentConfig4;
193
+ var showField = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField;
189
194
  var hasNo = (value || []).some(function (item) {
190
195
  if (showField === "logisticsCompany") {
191
196
  return item.logisticsCompany;
@@ -201,7 +206,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
201
206
  return Promise.resolve();
202
207
  }
203
208
  }] : [];
204
- this.expressDateInstance = ExpressData.getInstance();
205
- this.sortChildField = this.getSortChildFields(((_this$componentConfig4 = this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField) || "", _options);
209
+ this.expressDateInstance = ExpressData.getInstance(this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default');
210
+ this.sortChildField = this.getSortChildFields(((_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) || "", _options);
206
211
  });
207
212
  export default BsLogistics;
@@ -24,14 +24,14 @@ var typeMap = {
24
24
  typeName: 'bsReissueType',
25
25
  remark: 'bsReissueType_memo',
26
26
  errMsg: '请选择bs补发商品'
27
- },
28
- WDT_REISSUE_GOODS: {
29
- key: 'wdtReissueGoods',
30
- name: '旺店通',
31
- typeName: 'wdtReissueType',
32
- remark: 'wdtReissueType_memo',
33
- errMsg: '请选择旺店通补发商品'
34
27
  }
28
+ // WDT_REISSUE_GOODS: {
29
+ // key: 'wdtReissueGoods',
30
+ // name: '旺店通',
31
+ // typeName: 'wdtReissueType',
32
+ // remark: 'wdtReissueType_memo',
33
+ // errMsg: '请选择旺店通补发商品',
34
+ // },
35
35
  };
36
36
  var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
37
37
  var _this = this,
@@ -0,0 +1,26 @@
1
+ import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ declare class SystemOrderNo implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ align: ALignType;
10
+ width: number;
11
+ isCombinationComponent: boolean;
12
+ formField: string;
13
+ canSort: boolean;
14
+ children: ComponentInterface[];
15
+ dataType: ComponentInterface["dataType"];
16
+ constructor(options: PickOption);
17
+ getParentId: () => string;
18
+ renderClient: (r: any) => React.JSX.Element | null;
19
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
20
+ renderLog: (r: Record) => React.JSX.Element | null;
21
+ getComponentValue: (r: Record) => any;
22
+ renderExport: (value: string, record: Record) => any;
23
+ editRender: () => null;
24
+ filterConfig: () => never[];
25
+ }
26
+ export default SystemOrderNo;
@@ -0,0 +1,94 @@
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ 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); } }
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11
+ 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; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ 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); }
14
+ import React from "react";
15
+ import ItemView from "../../../commonComponents/ItemView";
16
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
+ var componentType = {
18
+ WDT_REISSUE_GOODS: "wdtSystemOrderNo"
19
+ };
20
+ var SystemOrderNo = /*#__PURE__*/_createClass(function SystemOrderNo(options) {
21
+ var _this = this;
22
+ _classCallCheck(this, SystemOrderNo);
23
+ _defineProperty(this, "name", void 0);
24
+ _defineProperty(this, "id", void 0);
25
+ _defineProperty(this, "sortField", void 0);
26
+ _defineProperty(this, "type", void 0);
27
+ _defineProperty(this, "componentConfig", void 0);
28
+ _defineProperty(this, "align", void 0);
29
+ _defineProperty(this, "width", void 0);
30
+ _defineProperty(this, "isCombinationComponent", void 0);
31
+ _defineProperty(this, "formField", void 0);
32
+ _defineProperty(this, "canSort", void 0);
33
+ _defineProperty(this, "children", void 0);
34
+ _defineProperty(this, "dataType", void 0);
35
+ _defineProperty(this, "getParentId", function () {
36
+ var _this$id$split = _this.id.split("_"),
37
+ _this$id$split2 = _slicedToArray(_this$id$split, 2),
38
+ key = _this$id$split2[0],
39
+ name = _this$id$split2[1];
40
+ return "".concat(key, "_").concat(name);
41
+ });
42
+ _defineProperty(this, "renderClient", function (r) {
43
+ var _r$key;
44
+ var _this$getParentId$spl = _this.getParentId().split("_"),
45
+ _this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
46
+ key = _this$getParentId$spl2[0];
47
+ if (!(r !== null && r !== void 0 && r[key][componentType[_this.type]])) {
48
+ return null;
49
+ }
50
+ var text = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : _r$key[componentType[_this.type]] : "";
51
+ return !isNull(r === null || r === void 0 ? void 0 : r[key]) ? /*#__PURE__*/React.createElement(ItemView, {
52
+ id: _this.id,
53
+ label: _this.name,
54
+ value: text
55
+ }) : null;
56
+ });
57
+ _defineProperty(this, "renderPc", function (value, record) {
58
+ var _this$getComponentVal;
59
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
60
+ });
61
+ _defineProperty(this, "renderLog", function (r) {
62
+ var id = _this.getParentId();
63
+ if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
64
+ return _this.renderPc(undefined, r);
65
+ });
66
+ _defineProperty(this, "getComponentValue", function (r) {
67
+ var id = _this.getParentId();
68
+ var text = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : r[id] : "";
69
+ return text;
70
+ });
71
+ _defineProperty(this, "renderExport", function (value, record) {
72
+ var _this$getComponentVal2;
73
+ return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
74
+ });
75
+ _defineProperty(this, "editRender", function () {
76
+ return null;
77
+ });
78
+ _defineProperty(this, "filterConfig", function () {
79
+ return [];
80
+ });
81
+ this.name = options.name;
82
+ this.id = options.id;
83
+ this.sortField = options.id;
84
+ this.formField = options.id;
85
+ this.type = options.type;
86
+ this.componentConfig = options.componentConfig;
87
+ this.align = "left";
88
+ this.width = 140;
89
+ this.isCombinationComponent = false;
90
+ this.canSort = false;
91
+ this.dataType = "string";
92
+ this.children = [];
93
+ });
94
+ export default SystemOrderNo;
@@ -18,7 +18,10 @@ declare class Express implements ComponentInterface {
18
18
  dataType: ComponentInterface["dataType"];
19
19
  options: ComponentInterface["options"];
20
20
  parentName: string;
21
- constructor(options: PickOption);
21
+ platformType?: string;
22
+ constructor(options: PickOption & {
23
+ platformType: string;
24
+ });
22
25
  renderClient: () => null;
23
26
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
24
27
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -46,6 +46,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
46
46
  _defineProperty(this, "dataType", void 0);
47
47
  _defineProperty(this, "options", void 0);
48
48
  _defineProperty(this, "parentName", void 0);
49
+ _defineProperty(this, "platformType", void 0);
49
50
  _defineProperty(this, "renderClient", function () {
50
51
  return null;
51
52
  });
@@ -61,7 +62,8 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
61
62
  }
62
63
  return /*#__PURE__*/React.createElement(BsExpressRender, {
63
64
  list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)],
64
- showField: "company"
65
+ showField: "company",
66
+ platformType: _this.platformType
65
67
  });
66
68
  });
67
69
  _defineProperty(this, "renderLog", function (r) {
@@ -108,7 +110,8 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
108
110
  this.componentConfig = options.componentConfig;
109
111
  this.rules = [];
110
112
  this.align = "left";
111
- this.expressDateInstance = ExpressData.getInstance();
113
+ this.platformType = options.platformType;
114
+ this.expressDateInstance = ExpressData.getInstance(this.platformType);
112
115
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
113
116
  this.isCombinationComponent = false;
114
117
  this.canSort = false;
@@ -4,3 +4,4 @@ export { default as BsHeaderPic } from "./BsHeaderPic";
4
4
  export { default as BsHeaderGoodPic } from "./BsHeaderGoodPic";
5
5
  export { default as BsHeaderChild } from "./BsHeaderChild";
6
6
  export { default as BsHeaderGood } from "./BsHeaderGood";
7
+ export { default as SystemOrderNo } from "./SystemOrderNo";
@@ -3,4 +3,5 @@ export { default as BsMemo } from "./BsMemo";
3
3
  export { default as BsHeaderPic } from "./BsHeaderPic";
4
4
  export { default as BsHeaderGoodPic } from "./BsHeaderGoodPic";
5
5
  export { default as BsHeaderChild } from "./BsHeaderChild";
6
- export { default as BsHeaderGood } from "./BsHeaderGood";
6
+ export { default as BsHeaderGood } from "./BsHeaderGood";
7
+ export { default as SystemOrderNo } from "./SystemOrderNo";
@@ -15,8 +15,8 @@ export declare const showImage: ({ item, type, index, showHeader, }: {
15
15
  }) => React.JSX.Element;
16
16
  export declare const ShowTotalImage: ({ total, allImage, type, showHeader, }: any) => React.JSX.Element;
17
17
  export declare const GoodImage: ({ list, type, showHeader }: any) => React.JSX.Element | null;
18
- export declare const JstGoodImage: ({ list, type }: any) => any;
19
- export declare const BsExpressRender: ({ list, showField }: any) => any;
18
+ export declare const JstGoodImage: ({ list, type, platformType }: any) => any;
19
+ export declare const BsExpressRender: ({ list, showField, platformType }: any) => any;
20
20
  export declare const CommonOrderContent: ({ list, valueKey, failValue, options, }: any) => any;
21
21
  export declare const BsGoodImage: ({ item, index }: {
22
22
  item: any;