@kmkf-fe-packages/services-components 1.0.4-rc.5 → 1.0.4

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.
package/README.md CHANGED
@@ -3,3 +3,4 @@
3
3
  - 针对于自定义组件的后缀,在提交的时候是以组件类型的驼峰式来命名的
4
4
 
5
5
  ---
6
+
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany" | "queryWdtLogisticsCompany" | "queryWdtSendData";
2
+ declare type RequestType = "queryAddressData" | "queryBsAddressData" | "queryExpressInterceptData" | "queryLogisticsAddressData" | "queryPlatData" | "queryWdtAddressData" | "queryAllLogisticsCompany";
3
3
  declare const Global: ({ children, requestList, repeatRequestList }: React.PropsWithChildren<{
4
4
  requestList?: RequestType[] | undefined;
5
5
  repeatRequestList?: Record<string, () => Promise<any>> | undefined;
@@ -15,8 +15,7 @@ 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 { queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryAllLogisticsCompany, queryWdtLogisticsCompany, queryWdtSendData } from "../../service/api";
19
- import { servers } from '@kmkf-fe-packages/kmkf-utils';
18
+ import { queryAddressData, queryBsAddressData, queryExpressInterceptData, queryLogisticsAddressData, queryPlatData, queryWdtAddressData, queryAllLogisticsCompany } from "../../service/api";
20
19
  var Global = function Global(_ref) {
21
20
  var children = _ref.children,
22
21
  _ref$requestList = _ref.requestList,
@@ -34,15 +33,13 @@ var Global = function Global(_ref) {
34
33
  while (1) switch (_context.prev = _context.next) {
35
34
  case 0:
36
35
  mapping = {
37
- queryAddressData: servers.queryAddressData,
38
- queryBsAddressData: servers.queryBsAddressData,
36
+ queryAddressData: queryAddressData,
37
+ queryBsAddressData: queryBsAddressData,
39
38
  queryExpressInterceptData: queryExpressInterceptData,
40
39
  queryLogisticsAddressData: queryLogisticsAddressData,
41
40
  queryPlatData: queryPlatData,
42
- queryWdtAddressData: servers.queryWdtAddressData,
43
- queryAllLogisticsCompany: queryAllLogisticsCompany,
44
- queryWdtLogisticsCompany: queryWdtLogisticsCompany,
45
- queryWdtSendData: queryWdtSendData
41
+ queryWdtAddressData: queryWdtAddressData,
42
+ queryAllLogisticsCompany: queryAllLogisticsCompany
46
43
  };
47
44
  mergeMapping = _objectSpread(_objectSpread({}, mapping), repeatRequestList);
48
45
  promises = [];
@@ -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$componentConfig5;
50
+ _this$componentConfig4;
51
51
  _classCallCheck(this, BsLogistics);
52
52
  _defineProperty(this, "name", void 0);
53
53
  _defineProperty(this, "id", void 0);
@@ -73,8 +73,7 @@ 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,
77
- platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
76
+ type: 1
78
77
  })
79
78
  }) : null;
80
79
  });
@@ -121,8 +120,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
121
120
  }
122
121
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
123
122
  list: list,
124
- type: 1,
125
- platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
123
+ type: 1
126
124
  }));
127
125
  });
128
126
  _defineProperty(this, "renderLog", function (r) {
@@ -149,7 +147,6 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
149
147
  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,
150
148
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
151
149
  type: 1,
152
- platformType: _this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default',
153
150
  options: _this.expressDateInstance.getExpressData(),
154
151
  onChange: p === null || p === void 0 ? void 0 : p.onChange
155
152
  }))
@@ -175,8 +172,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
175
172
  name: "物流公司",
176
173
  parentName: this.name,
177
174
  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),
178
- width: 200,
179
- platformType: this.type === 'WDT_LOGISTICS' ? 'wdt' : 'default'
175
+ width: 200
180
176
  }));
181
177
  this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, _options), {}, {
182
178
  name: "物流单号",
@@ -189,8 +185,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
189
185
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
190
186
  required: true,
191
187
  validator: function validator(_, value) {
192
- var _this$componentConfig4;
193
- var showField = (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.showField;
188
+ var showField = _this.componentConfig.showField;
194
189
  var hasNo = (value || []).some(function (item) {
195
190
  if (showField === "logisticsCompany") {
196
191
  return item.logisticsCompany;
@@ -206,7 +201,7 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
206
201
  return Promise.resolve();
207
202
  }
208
203
  }] : [];
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);
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);
211
206
  });
212
207
  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: '请选择旺店通补发商品'
27
34
  }
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,
@@ -18,10 +18,7 @@ declare class Express implements ComponentInterface {
18
18
  dataType: ComponentInterface["dataType"];
19
19
  options: ComponentInterface["options"];
20
20
  parentName: string;
21
- platformType?: string;
22
- constructor(options: PickOption & {
23
- platformType: string;
24
- });
21
+ constructor(options: PickOption);
25
22
  renderClient: () => null;
26
23
  renderPc: (value: unknown, record: Record) => React.JSX.Element;
27
24
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -46,7 +46,6 @@ 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);
50
49
  _defineProperty(this, "renderClient", function () {
51
50
  return null;
52
51
  });
@@ -62,8 +61,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
62
61
  }
63
62
  return /*#__PURE__*/React.createElement(BsExpressRender, {
64
63
  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)],
65
- showField: "company",
66
- platformType: _this.platformType
64
+ showField: "company"
67
65
  });
68
66
  });
69
67
  _defineProperty(this, "renderLog", function (r) {
@@ -110,8 +108,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
110
108
  this.componentConfig = options.componentConfig;
111
109
  this.rules = [];
112
110
  this.align = "left";
113
- this.platformType = options.platformType;
114
- this.expressDateInstance = ExpressData.getInstance(this.platformType);
111
+ this.expressDateInstance = ExpressData.getInstance();
115
112
  this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
116
113
  this.isCombinationComponent = false;
117
114
  this.canSort = false;
@@ -4,4 +4,3 @@ 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,5 +3,4 @@ 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";
7
- export { default as SystemOrderNo } from "./SystemOrderNo";
6
+ export { default as BsHeaderGood } from "./BsHeaderGood";
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  declare type getFormItemProps = {
3
3
  name: string;
4
4
  title: string;
@@ -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, platformType }: any) => any;
19
- export declare const BsExpressRender: ({ list, showField, platformType }: any) => any;
18
+ export declare const JstGoodImage: ({ list, type }: any) => any;
19
+ export declare const BsExpressRender: ({ list, showField }: 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;
@@ -12,14 +12,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
12
12
  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; }
13
13
  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; } }
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
- import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Typography } from "antd";
16
- import React, { useState, useMemo } from "react";
17
- import { ExpressData, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message, Typography } from 'antd';
16
+ import React, { useState, useMemo } from 'react';
17
+ import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
18
18
  import { getAlipayBillReceipt } from "../../service/api";
19
- import { CopyToClipboard } from "react-copy-to-clipboard";
20
- import CopyText from "../../commonComponents/CopyText";
19
+ import { CopyToClipboard } from 'react-copy-to-clipboard';
21
20
  import styles from "./index.module.less";
22
21
  import defaultImg from "./img/default-img.png";
22
+ import CopyText from "../../commonComponents/CopyText";
23
23
  var Paragraph = Typography.Paragraph;
24
24
  export var getFormItem = function getFormItem(_ref) {
25
25
  var name = _ref.name,
@@ -255,12 +255,10 @@ var content = function content(item, index) {
255
255
  export var JstGoodImage = function JstGoodImage(_ref6) {
256
256
  var _ref6$list = _ref6.list,
257
257
  list = _ref6$list === void 0 ? [] : _ref6$list,
258
- type = _ref6.type,
259
- _ref6$platformType = _ref6.platformType,
260
- platformType = _ref6$platformType === void 0 ? 'default' : _ref6$platformType;
258
+ type = _ref6.type;
261
259
  return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
262
260
  var logisticsCompany = item.logisticsCompany;
263
- var company = ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
261
+ var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
264
262
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
265
263
  content: content(item, index),
266
264
  overlayStyle: {
@@ -276,19 +274,17 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
276
274
  text: item.logisticsCode
277
275
  })) : company ? company : item.logisticsCode ? /*#__PURE__*/React.createElement(CopyText, {
278
276
  text: item.logisticsCode
279
- }) : null) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join('/') : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, platformType === 'wdt' ? WdtSendData.getInstance().getWdtSendNameByCode(item.sendName) : item.sendName].join("/") : item.sendId ? item.sendId : platformType === 'wdt' ? WdtSendData.getInstance().getWdtSendNameByCode(item.sendName) : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || '') : null));
277
+ }) : null) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join('/') : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join('/') : item.sendId ? item.sendId : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || '') : null));
280
278
  }) : null;
281
279
  };
282
280
  export var BsExpressRender = function BsExpressRender(_ref7) {
283
281
  var _ref7$list = _ref7.list,
284
282
  list = _ref7$list === void 0 ? [] : _ref7$list,
285
283
  _ref7$showField = _ref7.showField,
286
- showField = _ref7$showField === void 0 ? "" : _ref7$showField,
287
- _ref7$platformType = _ref7.platformType,
288
- platformType = _ref7$platformType === void 0 ? "default" : _ref7$platformType;
284
+ showField = _ref7$showField === void 0 ? '' : _ref7$showField;
289
285
  return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
290
286
  var logisticsCompany = item.logisticsCompany;
291
- var company = ExpressData.getInstance(platformType).getExpressNameByCode(logisticsCompany);
287
+ var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
292
288
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
293
289
  content: content(item, index),
294
290
  overlayStyle: {
@@ -33,9 +33,8 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
33
33
  var _this = this,
34
34
  _typeMap$_options$typ,
35
35
  _typeMap$_options$typ2,
36
- _this$componentConfig6,
37
- _this$componentConfig7,
38
- _this$componentConfig8;
36
+ _this$componentConfig3,
37
+ _this$componentConfig4;
39
38
  _classCallCheck(this, JstLogistics);
40
39
  _defineProperty(this, "name", void 0);
41
40
  _defineProperty(this, "id", void 0);
@@ -85,7 +84,6 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
85
84
  return [];
86
85
  });
87
86
  _defineProperty(this, "renderClient", function (record) {
88
- var _this$componentConfig;
89
87
  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) {
90
88
  return !isNull(item);
91
89
  }) : false;
@@ -94,13 +92,12 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
94
92
  label: _this.name,
95
93
  value: /*#__PURE__*/React.createElement(JstGoodImage, {
96
94
  list: record === null || record === void 0 ? void 0 : record[_this.id],
97
- type: 1,
98
- platformType: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.logistics
95
+ type: 1
99
96
  })
100
97
  }) : null;
101
98
  });
102
99
  _defineProperty(this, "renderPc", function (value, record) {
103
- var _typeMap$_this$type, _this$componentConfig2;
100
+ var _typeMap$_this$type;
104
101
  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)];
105
102
  //兼容多个商品
106
103
  return /*#__PURE__*/React.createElement("span", {
@@ -109,8 +106,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
109
106
  }
110
107
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
111
108
  list: list,
112
- type: 1,
113
- platformType: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.logistics
109
+ type: 1
114
110
  }));
115
111
  });
116
112
  _defineProperty(this, "renderLog", function (r) {
@@ -131,18 +127,17 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
131
127
  }).join(",");
132
128
  });
133
129
  _defineProperty(this, "editRender", function (p) {
134
- var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
130
+ var _this$componentConfig, _this$componentConfig2;
135
131
  return /*#__PURE__*/React.createElement(GetFormItem, {
136
132
  title: _this.name,
137
133
  name: _this.id,
138
134
  rules: _this.rules,
139
135
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
140
136
  display: p === null || p === void 0 ? void 0 : p.display,
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,
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,
142
138
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
143
139
  type: 1,
144
- options: _this.expressDateInstance.getExpressData(),
145
- platformType: (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.logistics
140
+ options: _this.expressDateInstance.getExpressData()
146
141
  }))
147
142
  });
148
143
  });
@@ -204,7 +199,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
204
199
  this.canSort = false;
205
200
  this.children = [];
206
201
  this.dataType = "object";
207
- this.rules = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
202
+ this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
208
203
  required: true,
209
204
  validator: function validator(_, value) {
210
205
  var hasNo = (value || []).some(function (item) {
@@ -217,7 +212,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(_options) {
217
212
  }
218
213
  }] : [];
219
214
  this.align = "left";
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);
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);
222
217
  });
223
218
  export default JstLogistics;
@@ -27,24 +27,13 @@ declare class JstSendGood implements ComponentInterface {
27
27
  getComponentValue: (r: Record) => any;
28
28
  renderExport: (value: any, record: any) => any;
29
29
  editRender: (p: any) => React.JSX.Element;
30
- filterConfig: (item: ColumnConfig) => ({
31
- searchDefaultConditions: "in";
32
- type: string;
33
- id: string;
34
- name: string;
35
- filterComponentType: "MultipleSelect";
36
- props: {
37
- options: any[];
38
- };
39
- filterFn: (value: string) => (i: Record) => any;
40
- } | {
30
+ filterConfig: (item: ColumnConfig) => {
41
31
  searchDefaultConditions: "like";
42
32
  type: string;
43
33
  id: string;
44
34
  name: string;
45
35
  filterComponentType: "Input";
46
36
  filterFn: (value: string) => (i: Record) => any;
47
- props?: undefined;
48
- })[];
37
+ }[];
49
38
  }
50
39
  export default JstSendGood;
@@ -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, WdtSendData } from "@kmkf-fe-packages/kmkf-utils";
15
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
16
  import { SYMBOL } from "../../../constant";
17
17
  var typeMap = {
18
18
  JST_SEND_GOOD: {
@@ -100,8 +100,7 @@ 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,
104
- platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
103
+ type: 3
105
104
  })
106
105
  }) : null;
107
106
  });
@@ -115,8 +114,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
115
114
  }
116
115
  }, /*#__PURE__*/React.createElement(JstGoodImage, {
117
116
  list: list,
118
- type: 3,
119
- platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
117
+ type: 3
120
118
  }));
121
119
  });
122
120
  _defineProperty(this, "renderLog", function (r) {
@@ -133,7 +131,7 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
133
131
  var _typeMap$_this$type4;
134
132
  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)];
135
133
  return (list || []).map(function (item) {
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("/");
134
+ return [item === null || item === void 0 ? void 0 : item.sendId, item === null || item === void 0 ? void 0 : item.sendName].join("/");
137
135
  }).join(",");
138
136
  });
139
137
  _defineProperty(this, "editRender", function (p) {
@@ -145,44 +143,24 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
145
143
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
146
144
  display: p === null || p === void 0 ? void 0 : p.display,
147
145
  component: /*#__PURE__*/React.createElement(JstGoods, _extends({}, _this.componentConfig, {
148
- type: 3,
149
- platformType: _this.type === 'WDT_SEND_GOOD' ? 'wdt' : 'default'
146
+ type: 3
150
147
  }))
151
148
  });
152
149
  });
153
150
  _defineProperty(this, "filterConfig", function (item) {
154
- var _typeMap$_this$type5, _typeMap$_this$type6, _typeMap$_this$type8;
155
- return [_this.type === 'WDT_SEND_GOOD' ? {
156
- searchDefaultConditions: SYMBOL.in,
157
- type: item.type,
158
- id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.sendName),
159
- name: "".concat(_this.name, "\u540D\u79F0"),
160
- filterComponentType: "MultipleSelect",
161
- props: {
162
- options: WdtSendData.getInstance().getWdtSendData() || []
163
- },
164
- filterFn: function filterFn(value) {
165
- return function (i) {
166
- var _ref;
167
- return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "sendName").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
168
- var _String;
169
- var sendName = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
170
- return sendName;
171
- });
172
- };
173
- }
174
- } : {
151
+ var _typeMap$_this$type5, _typeMap$_this$type7;
152
+ return [{
175
153
  searchDefaultConditions: SYMBOL.like,
176
154
  type: item.type,
177
- id: "".concat(item.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.sendName),
155
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.sendName),
178
156
  name: "".concat(_this.name, "\u540D\u79F0"),
179
157
  filterComponentType: "Input",
180
158
  filterFn: function filterFn(value) {
181
159
  return function (i) {
182
- var _ref2, _typeMap$_this$type7;
183
- return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.key) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
184
- var _String2;
185
- var name = item !== null && item !== void 0 && item.sendName ? (_String2 = String(item === null || item === void 0 ? void 0 : item.sendName)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
160
+ var _ref, _typeMap$_this$type6;
161
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key) || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
162
+ var _String;
163
+ var name = item !== null && item !== void 0 && item.sendName ? (_String = String(item === null || item === void 0 ? void 0 : item.sendName)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
186
164
  return name;
187
165
  });
188
166
  };
@@ -190,15 +168,15 @@ var JstSendGood = /*#__PURE__*/_createClass(function JstSendGood(_options) {
190
168
  }, {
191
169
  searchDefaultConditions: SYMBOL.like,
192
170
  type: item.type,
193
- id: "".concat(item.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.sendId),
171
+ id: "".concat(item.id, "_").concat((_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.sendId),
194
172
  name: "".concat(_this.name, "\u7F16\u7801"),
195
173
  filterComponentType: "Input",
196
174
  filterFn: function filterFn(value) {
197
175
  return function (i) {
198
- var _ref3, _typeMap$_this$type9;
199
- return (_ref3 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.key) || []) === null || _ref3 === void 0 ? void 0 : _ref3.some(function (item) {
200
- var _String3;
201
- var id = item !== null && item !== void 0 && item.sendId ? (_String3 = String(item === null || item === void 0 ? void 0 : item.sendId)) === null || _String3 === void 0 ? void 0 : _String3.includes(value) : false;
176
+ var _ref2, _typeMap$_this$type8;
177
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.key) || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
178
+ var _String2;
179
+ var id = item !== null && item !== void 0 && item.sendId ? (_String2 = String(item === null || item === void 0 ? void 0 : item.sendId)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
202
180
  return id;
203
181
  });
204
182
  };
@@ -1,3 +1,3 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, WdtReissue } from "./index";
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => JstSendGood | LogisticsInterception | WdtReissue | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | CommonInput | PaymentVoucherCode;
3
+ export declare const factory: (type: string, options: PickOption) => BsLogistics | BsReissue | JstLogistics | JstSendGood | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | CommonInput | PaymentVoucherCode;
@@ -1,6 +1,6 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
2
2
  // CommonTradeId,
3
- CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode, WdtReissue } from "./index";
3
+ CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, CommonInput, PaymentVoucherCode } from "./index";
4
4
  export var factory = function factory(type, options) {
5
5
  var _options$componentCon;
6
6
  switch (type) {
@@ -139,14 +139,11 @@ export var factory = function factory(type, options) {
139
139
  return new BsPosting(options);
140
140
  case "BS_GOODS":
141
141
  return new BsGoods(options);
142
- case "WDT_GOODS":
143
- return new WdtGoods(options);
144
142
  case "BS_EXCHANGE_GOODS":
145
143
  return new BsExchange(options);
146
144
  case "BS_REISSUE_GOODS":
147
- return new BsReissue(options);
148
145
  case "WDT_REISSUE_GOODS":
149
- return new WdtReissue(options);
146
+ return new BsReissue(options);
150
147
  case "BS_RETURN_GOODS":
151
148
  return new BsReturn(options);
152
149
  case "REISSUE_TRADE_ID":
@@ -199,6 +196,9 @@ export var factory = function factory(type, options) {
199
196
  return new CommonDataTime(options);
200
197
  case "FLOW_UPDATE_DATETIME":
201
198
  return new CommonDataTime(options);
199
+ case "WDT_GOODS":
200
+ // 万里牛商品
201
+ return new WdtGoods(options);
202
202
  case "BUSINESS_ORDER_NO":
203
203
  return new CommonInput(options);
204
204
  case "PAYMENT_VOUCHER_CODE":
@@ -70,11 +70,10 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
70
70
  export { default as NodeStayDuration } from "./components/NodeStayDuration";
71
71
  export { default as WlnGoods } from "./components/WLN/WlnGoods";
72
72
  export { default as BsPosting } from "./components/BS/BsPosting";
73
- export { default as NodeInput } from './components/NodeInput';
74
- export { default as FlowWorkOrderStatus } from './components/FlowWorkOrderStatus';
75
- export { default as MsgStatus } from './components/MsgStatus';
73
+ export { default as NodeInput } from "./components/NodeInput";
74
+ export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus";
75
+ export { default as MsgStatus } from "./components/MsgStatus";
76
76
  export { default as WdtGoods } from "./components/WDT/WdtGoods";
77
- export { default as WdtReissue } from "./components/WDT/WdtRessuie";
78
77
  export { default as CommonInput } from "./components/CommonInput";
79
78
  export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
80
79
  export { default as KmErpOrderNum } from "./components/ErpTradeId/components/OrderNum";
package/dist/esm/index.js CHANGED
@@ -74,7 +74,6 @@ export { default as NodeInput } from "./components/NodeInput";
74
74
  export { default as FlowWorkOrderStatus } from "./components/FlowWorkOrderStatus";
75
75
  export { default as MsgStatus } from "./components/MsgStatus";
76
76
  export { default as WdtGoods } from "./components/WDT/WdtGoods";
77
- export { default as WdtReissue } from "./components/WDT/WdtRessuie";
78
77
  export { default as CommonInput } from "./components/CommonInput";
79
78
  export { default as PaymentVoucherCode } from "./components/PaymentVoucherCode";
80
79
  // TODO: ERP 打款工单使用
@@ -6,6 +6,4 @@ export declare const queryPlatData: () => Promise<void>;
6
6
  export declare const queryExpressInterceptData: () => Promise<void>;
7
7
  export declare const queryLogisticsAddressData: () => Promise<void>;
8
8
  export declare const queryAllLogisticsCompany: () => Promise<void>;
9
- export declare const queryWdtLogisticsCompany: () => Promise<void>;
10
- export declare const queryWdtSendData: () => Promise<void>;
11
9
  export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
10
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
11
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
12
  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; }
13
- import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData, WdtSendData, servers, WDT } from "@kmkf-fe-packages/kmkf-utils";
13
+ import { AddressData, toTree, BsAddressData, WdtAddressData, PlatData, ExpressInterceptData, LogisticsAddressData, ExpressData } from "@kmkf-fe-packages/kmkf-utils";
14
14
  import get from "lodash/get";
15
15
  import request from "./request";
16
16
  // 重复校验
@@ -248,18 +248,6 @@ export var queryAllLogisticsCompany = function queryAllLogisticsCompany() {
248
248
  instance.expressData = expressList;
249
249
  });
250
250
  };
251
- export var queryWdtLogisticsCompany = function queryWdtLogisticsCompany() {
252
- var instance = ExpressData.getInstance('wdt');
253
- return servers.getWdtSellerLogisticsCompanyRelation().then(function (data) {
254
- instance.expressData = data;
255
- }).catch(console.log);
256
- };
257
- export var queryWdtSendData = function queryWdtSendData() {
258
- var instance = WdtSendData.getInstance();
259
- return WDT.getWarehouseDataAsync().then(function (data) {
260
- instance.wdtSendData = data;
261
- }).catch(console.log);
262
- };
263
251
  // 获取支付宝电子回单
264
252
  export var getAlipayBillReceipt = function getAlipayBillReceipt(data) {
265
253
  return request({
@@ -53,7 +53,6 @@ export interface ComponentInterface {
53
53
  templateId?: string;
54
54
  workOrderUniqueKey?: string;
55
55
  platform?: PlatForm;
56
- parentName?: string;
57
56
  /**
58
57
  * @description 组件下标
59
58
  * @deprecated 已弃用字段,后续版本不在使用
@@ -79,7 +78,7 @@ export interface ComponentInterface {
79
78
  /**
80
79
  * @description 显示字段名称
81
80
  */
82
- showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder" | "logisticsCompany" | "logisticsCode";
81
+ showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder";
83
82
  /**
84
83
  * @description 是否选择SKU
85
84
  */
@@ -167,7 +166,6 @@ export interface ComponentInterface {
167
166
  config?: any;
168
167
  rulesOptions?: Array<any>;
169
168
  selectRules?: Array<string>;
170
- logistics?: string;
171
169
  };
172
170
  effects?: {
173
171
  queryWorkOrderDetail?: (r: Record) => void;
@@ -236,7 +234,7 @@ export interface ComponentInterface {
236
234
  getComponentValue: (r: Record) => any;
237
235
  formDataTransform?: (r: any) => any;
238
236
  }
239
- export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width">;
237
+ export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform">;
240
238
  export declare type ColumnConfig = {
241
239
  id: string;
242
240
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "1.0.4-rc.5",
3
+ "version": "1.0.4",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -20,8 +20,8 @@
20
20
  ]
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/basic-components": "^1.0.4-rc.5",
24
- "@kmkf-fe-packages/kmkf-utils": "^1.0.4-rc.5"
23
+ "@kmkf-fe-packages/basic-components": "^1.0.4",
24
+ "@kmkf-fe-packages/kmkf-utils": "^1.0.4"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@typescript-eslint/eslint-plugin": "^5.59.2",
@@ -37,7 +37,7 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "b1f520e7524472838c3aba55cade7c27fcbfcc0c",
40
+ "gitHead": "da6e92200086765ca3d63004ee1a8ebba88c8188",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }
@@ -1,26 +0,0 @@
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;
@@ -1,94 +0,0 @@
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;
@@ -1,58 +0,0 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
- import React from "react";
3
- import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
4
- import CommonHeaderGoods from "../../CommonHeaderGood";
5
- declare class WdtReissue implements ComponentInterface {
6
- name: string;
7
- id: string;
8
- sortField: string;
9
- type: string;
10
- rules: any[];
11
- componentConfig: ComponentInterface["componentConfig"];
12
- effects: ComponentInterface["effects"];
13
- isCombinationComponent: boolean;
14
- formField: string;
15
- canSort: boolean;
16
- children: ComponentInterface[];
17
- dataType: ComponentInterface["dataType"];
18
- bsType: BsType;
19
- bsMemo: BsMemo;
20
- systemOrderNo: SystemOrderNo;
21
- reissueGoods: BsHeaderGood | CommonHeaderGoods;
22
- constructor(options: PickOption);
23
- renderClient: (record: any) => React.JSX.Element | null;
24
- renderPc: () => null;
25
- renderLog: (r: Record) => React.JSX.Element;
26
- getComponentValue: (r: Record) => {
27
- [key: string]: any;
28
- };
29
- renderExport: () => null;
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: "Cascader";
37
- props: {
38
- options: any[] | undefined;
39
- fieldNames: {
40
- label: string;
41
- value: string;
42
- children: string;
43
- };
44
- };
45
- formatFilterValue: (val: Array<string>) => string[] | undefined;
46
- filterFn: (value: string) => (i: Record) => boolean;
47
- } | {
48
- searchDefaultConditions: "like";
49
- type: string;
50
- id: string;
51
- name: string;
52
- filterComponentType: "Input";
53
- props?: undefined;
54
- formatFilterValue?: undefined;
55
- filterFn?: undefined;
56
- })[];
57
- }
58
- export default WdtReissue;
@@ -1,191 +0,0 @@
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
- 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); } }
6
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
7
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
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
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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 GetFormItem from "../../GetFormItem";
13
- import ItemView from "../../../commonComponents/ItemView";
14
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
- import { WdtReissue as Reissue } from "@kmkf-fe-packages/basic-components";
16
- import { SYMBOL } from "../../../constant";
17
- import { BsGoodsTable } from "../../Common/index";
18
- import { BsType, BsMemo, BsHeaderGood, SystemOrderNo } from "../../BS/common/index";
19
- import CommonHeaderGoods from "../../CommonHeaderGood";
20
- var typeMap = {
21
- WDT_REISSUE_GOODS: {
22
- key: "wdtReissueGoods",
23
- name: "旺店通",
24
- typeName: "wdtReissueType",
25
- remark: "wdtReissueType_memo",
26
- systemOrderNo: "wdtSystemOrderNo",
27
- errMsg: "请选择旺店通补发商品"
28
- }
29
- };
30
- var WdtReissue = /*#__PURE__*/_createClass(function WdtReissue(options) {
31
- var _this = this,
32
- _typeMap$options$type,
33
- _typeMap$options$type2,
34
- _typeMap$options$type3,
35
- _typeMap$options$type4,
36
- _typeMap$options$type5,
37
- _this$componentConfig4;
38
- _classCallCheck(this, WdtReissue);
39
- _defineProperty(this, "name", void 0);
40
- _defineProperty(this, "id", void 0);
41
- _defineProperty(this, "sortField", void 0);
42
- _defineProperty(this, "type", void 0);
43
- _defineProperty(this, "rules", void 0);
44
- _defineProperty(this, "componentConfig", void 0);
45
- _defineProperty(this, "effects", void 0);
46
- _defineProperty(this, "isCombinationComponent", void 0);
47
- _defineProperty(this, "formField", void 0);
48
- _defineProperty(this, "canSort", void 0);
49
- _defineProperty(this, "children", void 0);
50
- _defineProperty(this, "dataType", void 0);
51
- _defineProperty(this, "bsType", void 0);
52
- _defineProperty(this, "bsMemo", void 0);
53
- _defineProperty(this, "systemOrderNo", void 0);
54
- _defineProperty(this, "reissueGoods", void 0);
55
- _defineProperty(this, "renderClient", function (record) {
56
- var _record, _typeMap$_this$type, _record2, _typeMap$_this$type2, _this$componentConfig;
57
- return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, _this.bsType.renderClient(record), _this.bsMemo.renderClient(record), _this.systemOrderNo.renderClient(record), record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record[(_typeMap$_this$type = typeMap[_this.type]) === null || _typeMap$_this$type === void 0 ? void 0 : _typeMap$_this$type.key].length ? /*#__PURE__*/React.createElement(ItemView, {
58
- id: _this.id,
59
- label: _this.name,
60
- value: /*#__PURE__*/React.createElement(BsGoodsTable, {
61
- list: (record === null || record === void 0 ? void 0 : (_record2 = record["".concat(_this.id)]) === null || _record2 === void 0 ? void 0 : _record2["".concat((_typeMap$_this$type2 = typeMap[_this.type]) === null || _typeMap$_this$type2 === void 0 ? void 0 : _typeMap$_this$type2.key)]) || [],
62
- showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || [],
63
- type: _this.type
64
- })
65
- }) : null) : null;
66
- });
67
- _defineProperty(this, "renderPc", function () {
68
- return null;
69
- });
70
- _defineProperty(this, "renderLog", function (r) {
71
- var _r, _typeMap$_this$type3, _typeMap$_this$type4, _r2, _typeMap$_this$type5, _typeMap$_this$type6, _this$componentConfig2;
72
- return /*#__PURE__*/React.createElement(React.Fragment, null, r !== null && r !== void 0 && (_r = r["".concat(_this.id, "_").concat((_typeMap$_this$type3 = typeMap[_this.type]) === null || _typeMap$_this$type3 === void 0 ? void 0 : _typeMap$_this$type3.typeName)]) !== null && _r !== void 0 && _r.length ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u7C7B\u578B:", _this.bsType.renderLog(r)), /*#__PURE__*/React.createElement("div", null, "\u5907\u6CE8\u4FE1\u606F:", _this.bsMemo.renderLog(r))) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_").concat((_typeMap$_this$type4 = typeMap[_this.type]) === null || _typeMap$_this$type4 === void 0 ? void 0 : _typeMap$_this$type4.systemOrderNo)] ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, "\u7CFB\u7EDF\u8BA2\u5355\u53F7:", _this.systemOrderNo.renderLog(r))) : null, r !== null && r !== void 0 && (_r2 = r["".concat(_this.id, "_").concat((_typeMap$_this$type5 = typeMap[_this.type]) === null || _typeMap$_this$type5 === void 0 ? void 0 : _typeMap$_this$type5.key)]) !== null && _r2 !== void 0 && _r2.length ? /*#__PURE__*/React.createElement("div", null, "\u8865\u53D1\u5546\u54C1\uFF1A", /*#__PURE__*/React.createElement(BsGoodsTable, {
73
- list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type6 = typeMap[_this.type]) === null || _typeMap$_this$type6 === void 0 ? void 0 : _typeMap$_this$type6.key)]) || [],
74
- showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || [],
75
- type: _this.type
76
- })) : null, r !== null && r !== void 0 && r["".concat(_this.id, "_shopCode")] ? /*#__PURE__*/React.createElement("div", null, "\u5E97\u94FAid:", r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_shopCode")]) : null);
77
- });
78
- _defineProperty(this, "getComponentValue", function (r) {
79
- var _typeMap$_this$type7, _typeMap$_this$type8, _typeMap$_this$type9, _typeMap$_this$type10, _typeMap$_this$type11, _typeMap$_this$type12;
80
- var obj = {};
81
- obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type7 = typeMap[_this.type]) === null || _typeMap$_this$type7 === void 0 ? void 0 : _typeMap$_this$type7.typeName)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type8 = typeMap[_this.type]) === null || _typeMap$_this$type8 === void 0 ? void 0 : _typeMap$_this$type8.typeName)];
82
- obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type9 = typeMap[_this.type]) === null || _typeMap$_this$type9 === void 0 ? void 0 : _typeMap$_this$type9.key)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type10 = typeMap[_this.type]) === null || _typeMap$_this$type10 === void 0 ? void 0 : _typeMap$_this$type10.key)];
83
- obj["".concat(typeMap === null || typeMap === void 0 ? void 0 : (_typeMap$_this$type11 = typeMap[_this.type]) === null || _typeMap$_this$type11 === void 0 ? void 0 : _typeMap$_this$type11.systemOrderNo)] = r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat((_typeMap$_this$type12 = typeMap[_this.type]) === null || _typeMap$_this$type12 === void 0 ? void 0 : _typeMap$_this$type12.systemOrderNo)];
84
- return obj;
85
- });
86
- _defineProperty(this, "renderExport", function () {
87
- return null;
88
- });
89
- _defineProperty(this, "editRender", function (p) {
90
- var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
91
- return /*#__PURE__*/React.createElement(GetFormItem, {
92
- title: _this.name,
93
- name: _this.id,
94
- rules: _this.rules,
95
- required: false,
96
- hidden: p === null || p === void 0 ? void 0 : p.hidden,
97
- display: p === null || p === void 0 ? void 0 : p.display,
98
- component: /*#__PURE__*/React.createElement(Reissue, _extends({}, _this.componentConfig, {
99
- maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
100
- shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
101
- shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
102
- companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
103
- width: "90%",
104
- type: _this.type
105
- }))
106
- });
107
- });
108
- _defineProperty(this, "filterConfig", function (item) {
109
- var _item$templateConfig;
110
- return [{
111
- searchDefaultConditions: SYMBOL.in,
112
- type: item.type,
113
- id: "".concat(item.id, "_").concat(typeMap[_this.type].typeName),
114
- name: "".concat(item.name, "-\u8865\u53D1\u7C7B\u578B"),
115
- filterComponentType: "Cascader",
116
- props: {
117
- options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
118
- fieldNames: {
119
- label: "label",
120
- value: "value",
121
- children: "children"
122
- }
123
- },
124
- formatFilterValue: function formatFilterValue(val) {
125
- if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
126
- return [val[val.length - 1]];
127
- }
128
- },
129
- filterFn: function filterFn(value) {
130
- return function (i) {
131
- var _typeMap$_this$type13;
132
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat((_typeMap$_this$type13 = typeMap[_this.type]) === null || _typeMap$_this$type13 === void 0 ? void 0 : _typeMap$_this$type13.typeName)), value);
133
- };
134
- }
135
- }, {
136
- searchDefaultConditions: SYMBOL.like,
137
- type: item.type,
138
- id: "".concat(item.id, "_").concat(typeMap[_this.type].systemOrderNo),
139
- name: "".concat(item.name, "-\u8865\u53D1\u7CFB\u7EDF\u8BA2\u5355\u53F7"),
140
- filterComponentType: "Input"
141
- }, {
142
- searchDefaultConditions: SYMBOL.like,
143
- type: item.type,
144
- id: "".concat(item.id, "_").concat(typeMap[_this.type].key),
145
- name: "".concat(_this.name),
146
- filterComponentType: "Input"
147
- }];
148
- });
149
- this.name = options.name;
150
- this.id = options.id;
151
- this.sortField = "".concat(options.id);
152
- this.formField = "".concat(options.id);
153
- this.type = options.type;
154
- this.effects = options === null || options === void 0 ? void 0 : options.effects;
155
- this.isCombinationComponent = true;
156
- this.canSort = false;
157
- this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
158
- id: "".concat(options.id, "_").concat((_typeMap$options$type = typeMap[options.type]) === null || _typeMap$options$type === void 0 ? void 0 : _typeMap$options$type.typeName),
159
- name: "补发类型"
160
- }));
161
- this.systemOrderNo = new SystemOrderNo(_objectSpread(_objectSpread({}, options), {}, {
162
- id: "".concat(options.id, "_").concat((_typeMap$options$type2 = typeMap[options.type]) === null || _typeMap$options$type2 === void 0 ? void 0 : _typeMap$options$type2.systemOrderNo),
163
- name: "补发系统订单号"
164
- }));
165
- this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
166
- id: "".concat(options.id, "_").concat((_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.remark),
167
- name: "补发备注"
168
- }));
169
- this.reissueGoods = this.type === "BS_REISSUE_GOODS" ? new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
170
- id: "".concat(options.id, "_").concat((_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.key),
171
- name: "商品信息"
172
- })) : new CommonHeaderGoods(_objectSpread(_objectSpread({}, options), {}, {
173
- id: "".concat(options.id, "_").concat((_typeMap$options$type5 = typeMap[options.type]) === null || _typeMap$options$type5 === void 0 ? void 0 : _typeMap$options$type5.key),
174
- name: "商品信息"
175
- }));
176
- this.children = [this.bsType, this.systemOrderNo, this.bsMemo, this.reissueGoods];
177
- this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
178
- this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
179
- required: true,
180
- validator: function validator(_, value) {
181
- var _value, _typeMap$options$type6;
182
- if (!value || !(value !== null && value !== void 0 && (_value = value["".concat((_typeMap$options$type6 = typeMap[options.type]) === null || _typeMap$options$type6 === void 0 ? void 0 : _typeMap$options$type6.key)]) !== null && _value !== void 0 && _value.length)) {
183
- var _typeMap$options$type7;
184
- return Promise.reject(new Error("".concat((_typeMap$options$type7 = typeMap[options.type]) === null || _typeMap$options$type7 === void 0 ? void 0 : _typeMap$options$type7.errMsg)));
185
- }
186
- return Promise.resolve();
187
- }
188
- }] : [];
189
- this.dataType = "object";
190
- });
191
- export default WdtReissue;