@kmkf-fe-packages/services-components 0.24.2-beta.1 → 0.24.2-beta.11

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 (34) hide show
  1. package/dist/esm/commonComponents/SelectMark/index.js +6 -2
  2. package/dist/esm/components/BS/BsLogistics/index.js +4 -6
  3. package/dist/esm/components/BS/common/expressCode.js +1 -1
  4. package/dist/esm/components/BS/common/expressCompany.js +1 -1
  5. package/dist/esm/components/Common/index.js +5 -5
  6. package/dist/esm/components/CommonHeaderGood/index.js +14 -8
  7. package/dist/esm/components/HandlerDeadLine/index.js +0 -1
  8. package/dist/esm/components/LogisticsInterception/InterceptStatus.d.ts +2 -2
  9. package/dist/esm/components/LogisticsInterception/InterceptStatus.js +1 -1
  10. package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.d.ts +31 -0
  11. package/dist/esm/components/LogisticsMoreInterception/InterceptAddress.js +87 -0
  12. package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.d.ts +46 -0
  13. package/dist/esm/components/LogisticsMoreInterception/InterceptStatus.js +109 -0
  14. package/dist/esm/components/LogisticsMoreInterception/InterceptType.d.ts +44 -0
  15. package/dist/esm/components/LogisticsMoreInterception/InterceptType.js +96 -0
  16. package/dist/esm/components/LogisticsMoreInterception/columnHeader.d.ts +5 -0
  17. package/dist/esm/components/LogisticsMoreInterception/columnHeader.js +55 -0
  18. package/dist/esm/components/LogisticsMoreInterception/index.d.ts +69 -0
  19. package/dist/esm/components/LogisticsMoreInterception/index.js +184 -0
  20. package/dist/esm/components/LogisticsMoreInterception/interceptCompany.d.ts +39 -0
  21. package/dist/esm/components/LogisticsMoreInterception/interceptCompany.js +88 -0
  22. package/dist/esm/components/LogisticsMoreInterception/interceptItem.d.ts +34 -0
  23. package/dist/esm/components/LogisticsMoreInterception/interceptItem.js +81 -0
  24. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.d.ts +35 -0
  25. package/dist/esm/components/LogisticsMoreInterception/interceptSenderMobile.js +82 -0
  26. package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.d.ts +34 -0
  27. package/dist/esm/components/LogisticsMoreInterception/interceptSnapshot.js +81 -0
  28. package/dist/esm/components/NodeDeadLine/index.js +0 -1
  29. package/dist/esm/constant.js +12 -13
  30. package/dist/esm/factory.d.ts +2 -2
  31. package/dist/esm/factory.js +3 -1
  32. package/dist/esm/index.d.ts +1 -0
  33. package/dist/esm/index.js +1 -0
  34. package/package.json +4 -4
@@ -79,11 +79,15 @@ export default (function (props) {
79
79
  return item.value === value;
80
80
  })) === null || _workOrderMark$find === void 0 ? void 0 : _workOrderMark$find.label;
81
81
  }, [value]);
82
- return /*#__PURE__*/React.createElement(Dropdown, {
82
+ return markLabel ? /*#__PURE__*/React.createElement(Dropdown, {
83
83
  overlay: renderMenu()
84
84
  }, /*#__PURE__*/React.createElement("span", {
85
85
  onClick: function onClick(e) {
86
86
  return e.stopPropagation();
87
87
  }
88
- }, markLabel || "--"));
88
+ }, markLabel || "--")) : /*#__PURE__*/React.createElement("span", {
89
+ onClick: function onClick(e) {
90
+ return e.stopPropagation();
91
+ }
92
+ }, markLabel || "--");
89
93
  });
@@ -46,8 +46,6 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
46
46
  _typeMap$_options$typ4,
47
47
  _typeMap$_options$typ5,
48
48
  _typeMap$_options$typ6,
49
- _typeMap$_options$typ7,
50
- _typeMap$_options$typ8,
51
49
  _this$componentConfig3,
52
50
  _this$componentConfig4;
53
51
  _classCallCheck(this, BsLogistics);
@@ -171,14 +169,14 @@ var BsLogistics = /*#__PURE__*/_createClass(function BsLogistics(_options) {
171
169
  this.canSort = false;
172
170
  this.expressCompany = new ExpressCompany(_objectSpread(_objectSpread({}, _options), {}, {
173
171
  name: "物流公司",
174
- parentName: (_typeMap$_options$typ3 = typeMap[_options.type]) === null || _typeMap$_options$typ3 === void 0 ? void 0 : _typeMap$_options$typ3.name,
175
- id: "".concat(_options.id, "_").concat((_typeMap$_options$typ4 = typeMap[_options.type]) === null || _typeMap$_options$typ4 === void 0 ? void 0 : _typeMap$_options$typ4.key, "_").concat((_typeMap$_options$typ5 = typeMap[_options.type]) === null || _typeMap$_options$typ5 === void 0 ? void 0 : _typeMap$_options$typ5.company),
172
+ parentName: this.name,
173
+ 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),
176
174
  width: 200
177
175
  }));
178
176
  this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, _options), {}, {
179
177
  name: "物流单号",
180
- parentName: (_typeMap$_options$typ6 = typeMap[_options.type]) === null || _typeMap$_options$typ6 === void 0 ? void 0 : _typeMap$_options$typ6.name,
181
- id: "".concat(_options.id, "_").concat((_typeMap$_options$typ7 = typeMap[_options.type]) === null || _typeMap$_options$typ7 === void 0 ? void 0 : _typeMap$_options$typ7.key, "_").concat((_typeMap$_options$typ8 = typeMap[_options.type]) === null || _typeMap$_options$typ8 === void 0 ? void 0 : _typeMap$_options$typ8.code),
178
+ parentName: this.name,
179
+ id: "".concat(_options.id, "_").concat((_typeMap$_options$typ5 = typeMap[_options.type]) === null || _typeMap$_options$typ5 === void 0 ? void 0 : _typeMap$_options$typ5.key, "_").concat((_typeMap$_options$typ6 = typeMap[_options.type]) === null || _typeMap$_options$typ6 === void 0 ? void 0 : _typeMap$_options$typ6.code),
182
180
  width: 200
183
181
  }));
184
182
  this.children = [this.expressCompany, this.expressCode];
@@ -81,7 +81,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
81
81
  searchDefaultConditions: SYMBOL.in,
82
82
  type: item.type,
83
83
  id: "".concat(item.id, "_").concat(subKey),
84
- name: "".concat(_this.parentName, "\u7269\u6D41\u5355\u53F7"),
84
+ name: "".concat(_this.parentName, "-\u7269\u6D41\u5355\u53F7"),
85
85
  filterComponentType: "SelectInput",
86
86
  filterFn: function filterFn(value) {
87
87
  return function (i) {
@@ -83,7 +83,7 @@ var Express = /*#__PURE__*/_createClass(function Express(options) {
83
83
  searchDefaultConditions: SYMBOL.in,
84
84
  type: item.type,
85
85
  id: "".concat(item.id, "_").concat(subKey),
86
- name: "".concat(_this.parentName, "\u7269\u6D41\u516C\u53F8"),
86
+ name: "".concat(_this.parentName, "-\u7269\u6D41\u516C\u53F8"),
87
87
  filterComponentType: "MultipleSelect",
88
88
  props: {
89
89
  options: _this.expressDateInstance.getExpressData() || []
@@ -428,10 +428,10 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
428
428
  width: 70
429
429
  }, {
430
430
  dataIndex: 'goodNo',
431
- title: "SPU\u5546\u54C1\u7F16\u7801",
431
+ title: "\u5546\u54C1SPU\u7F16\u7801",
432
432
  align: 'center',
433
433
  ellipsis: true,
434
- width: 100
434
+ width: 180
435
435
  }, {
436
436
  dataIndex: 'goodName',
437
437
  title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
@@ -446,13 +446,13 @@ export var BsGoodsTable = function BsGoodsTable(_ref11) {
446
446
  width: 100
447
447
  }, {
448
448
  dataIndex: 'specNo',
449
- title: "".concat(text, "sku\u7F16\u7801"),
449
+ title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
450
450
  align: 'center',
451
451
  ellipsis: true,
452
- width: 100
452
+ width: 180
453
453
  }, {
454
454
  dataIndex: 'specName',
455
- title: "".concat(text, "sku\u540D\u79F0"),
455
+ title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
456
456
  align: 'center',
457
457
  ellipsis: true,
458
458
  width: 250
@@ -32,9 +32,9 @@ var GoodHeaderMap = {
32
32
  },
33
33
  goodNo: {
34
34
  component: BsHeaderChild,
35
- name: "SPU商品编码",
35
+ name: "商品SPU编码",
36
36
  key: "goodNo",
37
- width: 200
37
+ width: 180
38
38
  },
39
39
  imgUrl: {
40
40
  component: BsHeaderPic,
@@ -56,13 +56,13 @@ var GoodHeaderMap = {
56
56
  },
57
57
  specNo: {
58
58
  component: BsHeaderChild,
59
- name: "sku编码",
59
+ name: "商品SKU编码",
60
60
  key: "specNo",
61
- width: 140
61
+ width: 180
62
62
  },
63
63
  specName: {
64
64
  component: BsHeaderChild,
65
- name: "sku名称",
65
+ name: "商品SKU名称",
66
66
  key: "specName",
67
67
  width: 140
68
68
  },
@@ -72,6 +72,12 @@ var GoodHeaderMap = {
72
72
  key: "orderPrice",
73
73
  width: 100
74
74
  },
75
+ num: {
76
+ component: BsHeaderChild,
77
+ name: "数量",
78
+ key: "num",
79
+ width: 100
80
+ },
75
81
  sharePrice: {
76
82
  component: BsHeaderChild,
77
83
  name: "分摊价",
@@ -87,11 +93,11 @@ var GoodHeaderMap = {
87
93
  },
88
94
  itemKey: {
89
95
  goodId: "SPUID",
90
- goodNo: "SPU商品编码",
96
+ goodNo: "商品SPU编码",
91
97
  goodName: "商品名称",
92
98
  specId: "SKUID",
93
- specNo: "sku编码",
94
- specName: "sku名称",
99
+ specNo: "商品SKU编码",
100
+ specName: "商品SKU名称",
95
101
  orderPrice: "实付总金额",
96
102
  num: "数量",
97
103
  sharePrice: "分摊价",
@@ -26,7 +26,6 @@ var HandlerDeadLine = /*#__PURE__*/_createClass(function HandlerDeadLine(options
26
26
  _defineProperty(this, "options", void 0);
27
27
  _defineProperty(this, "renderPc", function (value, record) {
28
28
  var _record, _record2;
29
- if (!(record !== null && record !== void 0 && record.hasHandlerDeadLine)) return /*#__PURE__*/React.createElement("span", null, "\u672A\u8BBE\u7F6E");
30
29
  return /*#__PURE__*/React.createElement("span", {
31
30
  className: record !== null && record !== void 0 && (_record = record["".concat(_this.id)]) !== null && _record !== void 0 && _record.includes('已超时') ? 'timeout' : ''
32
31
  }, (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record2 !== void 0 ? _record2 : '--');
@@ -18,8 +18,8 @@ declare class InterceptStatus implements ComponentInterface {
18
18
  canSort: boolean;
19
19
  children: ComponentInterface[];
20
20
  expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
21
- dataType: ComponentInterface['dataType'];
22
- options: ComponentInterface['options'];
21
+ dataType: ComponentInterface["dataType"];
22
+ options: ComponentInterface["options"];
23
23
  constructor(options: PickOption);
24
24
  getComponentValue: (r: Record) => any;
25
25
  renderStatus: (record: any, w?: number) => React.JSX.Element;
@@ -116,7 +116,7 @@ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options
116
116
  this.children = [];
117
117
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
118
118
  this.expressInterceptInstance = ExpressInterceptData.getInstance();
119
- this.dataType = 'string';
119
+ this.dataType = "string";
120
120
  this.options = this.expressInterceptInstance.getStatusOptions() || [];
121
121
  }
122
122
 
@@ -0,0 +1,31 @@
1
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../type';
2
+ import React from 'react';
3
+ import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
4
+ declare class PaymentTid implements ComponentInterface {
5
+ name: string;
6
+ id: string;
7
+ sortField: string;
8
+ type: string;
9
+ rules: any[];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
+ effects: ComponentInterface['effects'];
12
+ align: ALignType;
13
+ width: number;
14
+ isCombinationComponent: boolean;
15
+ formField: string;
16
+ canSort: boolean;
17
+ children: ComponentInterface[];
18
+ originId: string;
19
+ addressDateInstance: InstanceType<typeof AddressData>;
20
+ dataType: ComponentInterface['dataType'];
21
+ constructor(options: PickOption);
22
+ renderAddress: (record: any) => React.JSX.Element;
23
+ renderClient: () => null;
24
+ renderPc: (value: any, record: Record) => React.JSX.Element | null;
25
+ renderLog: (r: Record) => null;
26
+ getComponentValue: (r: Record) => null;
27
+ renderExport: (value: any, record: Record) => any;
28
+ editRender: () => null;
29
+ filterConfig: () => never[];
30
+ }
31
+ export default PaymentTid;
@@ -0,0 +1,87 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import React from 'react';
9
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
10
+ import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
11
+ var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, PaymentTid);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "sortField", void 0);
17
+ _defineProperty(this, "type", void 0);
18
+ _defineProperty(this, "rules", void 0);
19
+ _defineProperty(this, "componentConfig", void 0);
20
+ _defineProperty(this, "effects", void 0);
21
+ _defineProperty(this, "align", void 0);
22
+ _defineProperty(this, "width", void 0);
23
+ _defineProperty(this, "isCombinationComponent", void 0);
24
+ _defineProperty(this, "formField", void 0);
25
+ _defineProperty(this, "canSort", void 0);
26
+ _defineProperty(this, "children", void 0);
27
+ _defineProperty(this, "originId", void 0);
28
+ _defineProperty(this, "addressDateInstance", void 0);
29
+ _defineProperty(this, "dataType", void 0);
30
+ _defineProperty(this, "renderAddress", function (record) {
31
+ var logisticsInterceptList = record["".concat(_this.originId, "_logisticsInterceptList")] || [];
32
+ return /*#__PURE__*/React.createElement(React.Fragment, null, logisticsInterceptList.map(function (item, index) {
33
+ var _item$interceptAddres;
34
+ var addressText = (_item$interceptAddres = item.interceptAddress) === null || _item$interceptAddres === void 0 ? void 0 : _item$interceptAddres.map(function (suffix) {
35
+ return _this.addressDateInstance.getNameByCode(suffix);
36
+ }).join('');
37
+ return addressText || item.interceptDetail || item.interceptReceiverName || item.interceptReceiverMobile ? /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), addressText, item.interceptDetail, item.interceptReceiverName, item.interceptReceiverMobile) : '--';
38
+ }));
39
+ });
40
+ _defineProperty(this, "renderClient", function () {
41
+ return null;
42
+ });
43
+ _defineProperty(this, "renderPc", function (value, record) {
44
+ var logisticsInterceptList = record["".concat(_this.originId, "_logisticsInterceptList")];
45
+ return !isNull(logisticsInterceptList) ? _this.renderAddress(record) : null;
46
+ });
47
+ _defineProperty(this, "renderLog", function (r) {
48
+ return null;
49
+ });
50
+ _defineProperty(this, "getComponentValue", function (r) {
51
+ return null;
52
+ });
53
+ _defineProperty(this, "renderExport", function (value, record) {
54
+ var logisticsInterceptList = record["".concat(_this.originId, "_logisticsInterceptList")] || [];
55
+ return logisticsInterceptList.reduce(function (prv, item) {
56
+ var _item$interceptAddres2;
57
+ var addressText = (_item$interceptAddres2 = item.interceptAddress) === null || _item$interceptAddres2 === void 0 ? void 0 : _item$interceptAddres2.map(function (suffix) {
58
+ return _this.addressDateInstance.getNameByCode(suffix);
59
+ }).join('');
60
+ prv.push("".concat(addressText).concat(item.interceptDetail, "\n ").concat(item.interceptReceiverName, "\n ").concat(item.interceptReceiverMobile));
61
+ return prv;
62
+ }, []).join(',');
63
+ });
64
+ _defineProperty(this, "editRender", function () {
65
+ return null;
66
+ });
67
+ _defineProperty(this, "filterConfig", function () {
68
+ return [];
69
+ });
70
+ this.name = '派送地址';
71
+ this.id = "".concat(options.id);
72
+ this.sortField = "".concat(options.id);
73
+ this.formField = "".concat(options.id);
74
+ this.type = options.type;
75
+ this.componentConfig = options.componentConfig;
76
+ this.rules = [];
77
+ this.align = 'left';
78
+ this.width = 350;
79
+ this.originId = options.id;
80
+ this.isCombinationComponent = false;
81
+ this.canSort = false;
82
+ this.dataType = 'object';
83
+ this.children = [];
84
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
85
+ this.addressDateInstance = AddressData.getInstance();
86
+ });
87
+ export default PaymentTid;
@@ -0,0 +1,46 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
+ import React from 'react';
3
+ import { ExpressInterceptData } from '@kmkf-fe-packages/kmkf-utils';
4
+ declare class InterceptStatus implements ComponentInterface {
5
+ name: string;
6
+ parentId: string;
7
+ id: string;
8
+ sortField: string;
9
+ companyId: string;
10
+ type: string;
11
+ rules: any[];
12
+ componentConfig: ComponentInterface['componentConfig'];
13
+ effects: ComponentInterface['effects'];
14
+ align: ALignType;
15
+ width: number;
16
+ isCombinationComponent: boolean;
17
+ formField: string;
18
+ canSort: boolean;
19
+ children: ComponentInterface[];
20
+ expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
21
+ dataType: ComponentInterface['dataType'];
22
+ options: ComponentInterface['options'];
23
+ constructor(options: PickOption);
24
+ getComponentValue: (r: Record) => any;
25
+ renderStatus: (record: any, w?: number) => React.JSX.Element | "--";
26
+ renderClient: () => null;
27
+ renderPc: (value: any, record: Record) => React.JSX.Element | "--";
28
+ renderLog: () => null;
29
+ renderExport: (value: any, record: Record) => any;
30
+ editRender: () => null;
31
+ filterConfig: (item: ColumnConfig) => {
32
+ searchDefaultConditions: "in";
33
+ type: string;
34
+ id: string;
35
+ name: string;
36
+ filterComponentType: "MultipleSelect";
37
+ props: {
38
+ options: {
39
+ label: string;
40
+ value: string;
41
+ }[];
42
+ };
43
+ formatFilterValue: (value: string[]) => string[];
44
+ };
45
+ }
46
+ export default InterceptStatus;
@@ -0,0 +1,109 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import React from 'react';
9
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
10
+ import { ExpressInterceptData } from '@kmkf-fe-packages/kmkf-utils';
11
+ import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
12
+ import { SYMBOL } from "../../constant";
13
+ var InterceptStatus = /*#__PURE__*/_createClass(function InterceptStatus(options) {
14
+ var _this = this;
15
+ _classCallCheck(this, InterceptStatus);
16
+ _defineProperty(this, "name", void 0);
17
+ _defineProperty(this, "parentId", void 0);
18
+ _defineProperty(this, "id", void 0);
19
+ _defineProperty(this, "sortField", void 0);
20
+ _defineProperty(this, "companyId", void 0);
21
+ _defineProperty(this, "type", void 0);
22
+ _defineProperty(this, "rules", void 0);
23
+ _defineProperty(this, "componentConfig", void 0);
24
+ _defineProperty(this, "effects", void 0);
25
+ _defineProperty(this, "align", void 0);
26
+ _defineProperty(this, "width", void 0);
27
+ _defineProperty(this, "isCombinationComponent", void 0);
28
+ _defineProperty(this, "formField", void 0);
29
+ _defineProperty(this, "canSort", void 0);
30
+ _defineProperty(this, "children", void 0);
31
+ _defineProperty(this, "expressInterceptInstance", void 0);
32
+ _defineProperty(this, "dataType", void 0);
33
+ _defineProperty(this, "options", void 0);
34
+ _defineProperty(this, "getComponentValue", function (r) {
35
+ return ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).map(function (item) {
36
+ return _this.expressInterceptInstance.getStatusNameMap()[item];
37
+ }).join(',');
38
+ });
39
+ _defineProperty(this, "renderStatus", function (record) {
40
+ var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
41
+ var statusList = record[_this.id] || [];
42
+ if (isNull(statusList)) return '--';
43
+ return /*#__PURE__*/React.createElement("div", null, statusList.map(function (item, index) {
44
+ return /*#__PURE__*/React.createElement("div", {
45
+ onClick: function onClick(e) {
46
+ return e.stopPropagation();
47
+ }
48
+ }, "\u5305\u88F9".concat(index + 1, ":"), /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
49
+ modelWidth: w,
50
+ interceptCompany: item.interceptCompany,
51
+ interceptCode: item.interceptCode,
52
+ interceptSenderMobile: item.interceptSenderMobile
53
+ }));
54
+ }));
55
+ });
56
+ _defineProperty(this, "renderClient", function () {
57
+ return null;
58
+ });
59
+ _defineProperty(this, "renderPc", function (value, record) {
60
+ return _this.renderStatus(record, 700);
61
+ });
62
+ _defineProperty(this, "renderLog", function () {
63
+ return null;
64
+ });
65
+ _defineProperty(this, "renderExport", function (value, record) {
66
+ var _this$getComponentVal;
67
+ return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--';
68
+ });
69
+ _defineProperty(this, "editRender", function () {
70
+ return null;
71
+ });
72
+ _defineProperty(this, "filterConfig", function (item) {
73
+ return {
74
+ searchDefaultConditions: SYMBOL.in,
75
+ type: item.type,
76
+ id: "".concat(item.id, "_logisticsInterceptStatusList"),
77
+ name: "".concat(item.name, "-\u7269\u6D41\u72B6\u6001"),
78
+ filterComponentType: 'MultipleSelect',
79
+ props: {
80
+ options: _this.expressInterceptInstance.getStatusOptions() || []
81
+ },
82
+ formatFilterValue: function formatFilterValue(value) {
83
+ var _value$map;
84
+ return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (v) {
85
+ return v === null || v === void 0 ? void 0 : v.split(',');
86
+ })) === null || _value$map === void 0 ? void 0 : _value$map.flat();
87
+ }
88
+ };
89
+ });
90
+ this.name = '物流状态';
91
+ this.parentId = options.id;
92
+ this.id = "".concat(options.id, "_logisticsInterceptStatusList");
93
+ this.sortField = "".concat(options.id, "_logisticsInterceptStatusList");
94
+ this.formField = "".concat(options.id, "_logisticsInterceptStatusList");
95
+ this.companyId = "".concat(options.id, "_interceptCompany");
96
+ this.type = options.type;
97
+ this.componentConfig = options.componentConfig;
98
+ this.rules = [];
99
+ this.align = 'left';
100
+ this.width = 220;
101
+ this.isCombinationComponent = false;
102
+ this.canSort = false;
103
+ this.children = [];
104
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
105
+ this.expressInterceptInstance = ExpressInterceptData.getInstance();
106
+ this.dataType = 'string';
107
+ this.options = this.expressInterceptInstance.getStatusOptions() || [];
108
+ });
109
+ export default InterceptStatus;
@@ -0,0 +1,44 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
+ import React from 'react';
3
+ import { ExpressInterceptData } from '@kmkf-fe-packages/kmkf-utils';
4
+ declare class InterceptType implements ComponentInterface {
5
+ name: string;
6
+ id: string;
7
+ sortField: string;
8
+ type: string;
9
+ rules: any[];
10
+ componentConfig: ComponentInterface['componentConfig'];
11
+ effects: ComponentInterface['effects'];
12
+ align: ALignType;
13
+ width: number;
14
+ isCombinationComponent: boolean;
15
+ formField: string;
16
+ canSort: boolean;
17
+ children: ComponentInterface[];
18
+ expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
19
+ dataType: ComponentInterface['dataType'];
20
+ options: ComponentInterface['options'];
21
+ constructor(options: PickOption);
22
+ renderType: (record: any) => React.JSX.Element;
23
+ getComponentValue: (r: Record) => any;
24
+ renderClient: () => null;
25
+ renderPc: (value: any, record: Record) => React.JSX.Element | "--";
26
+ renderLog: () => null;
27
+ renderExport: (value: any, record: Record) => any;
28
+ editRender: () => null;
29
+ filterConfig: (item: ColumnConfig) => {
30
+ searchDefaultConditions: "in";
31
+ type: string;
32
+ id: string;
33
+ name: string;
34
+ filterComponentType: "MultipleSelect";
35
+ props: {
36
+ options: {
37
+ label: string;
38
+ value: string;
39
+ }[];
40
+ };
41
+ formatFilterValue: (value: string[]) => string[];
42
+ };
43
+ }
44
+ export default InterceptType;
@@ -0,0 +1,96 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import React from 'react';
9
+ import { isNull } from '@kmkf-fe-packages/kmkf-utils';
10
+ import { ExpressInterceptData } from '@kmkf-fe-packages/kmkf-utils';
11
+ import { SYMBOL } from "../../constant";
12
+ var InterceptType = /*#__PURE__*/_createClass(function InterceptType(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, InterceptType);
15
+ _defineProperty(this, "name", void 0);
16
+ _defineProperty(this, "id", void 0);
17
+ _defineProperty(this, "sortField", void 0);
18
+ _defineProperty(this, "type", void 0);
19
+ _defineProperty(this, "rules", void 0);
20
+ _defineProperty(this, "componentConfig", void 0);
21
+ _defineProperty(this, "effects", void 0);
22
+ _defineProperty(this, "align", void 0);
23
+ _defineProperty(this, "width", void 0);
24
+ _defineProperty(this, "isCombinationComponent", void 0);
25
+ _defineProperty(this, "formField", void 0);
26
+ _defineProperty(this, "canSort", void 0);
27
+ _defineProperty(this, "children", void 0);
28
+ _defineProperty(this, "expressInterceptInstance", void 0);
29
+ _defineProperty(this, "dataType", void 0);
30
+ _defineProperty(this, "options", void 0);
31
+ _defineProperty(this, "renderType", function (record) {
32
+ var typeList = record[_this.id] || [];
33
+ return /*#__PURE__*/React.createElement(React.Fragment, null, typeList.map(function (item, index) {
34
+ var _this$expressIntercep;
35
+ return /*#__PURE__*/React.createElement("div", null, "\u5305\u88F9".concat(index + 1, ":"), (_this$expressIntercep = _this.expressInterceptInstance.getTypeNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[item]);
36
+ }));
37
+ });
38
+ _defineProperty(this, "getComponentValue", function (r) {
39
+ return ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).map(function (t) {
40
+ var _this$expressIntercep2;
41
+ return (_this$expressIntercep2 = _this.expressInterceptInstance.getTypeNameMap()) === null || _this$expressIntercep2 === void 0 ? void 0 : _this$expressIntercep2[t];
42
+ }).join(',');
43
+ });
44
+ _defineProperty(this, "renderClient", function () {
45
+ return null;
46
+ });
47
+ _defineProperty(this, "renderPc", function (value, record) {
48
+ if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return '--';
49
+ return _this.renderType(record);
50
+ });
51
+ _defineProperty(this, "renderLog", function () {
52
+ return null;
53
+ });
54
+ _defineProperty(this, "renderExport", function (value, record) {
55
+ var _this$getComponentVal;
56
+ return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--';
57
+ });
58
+ _defineProperty(this, "editRender", function () {
59
+ return null;
60
+ });
61
+ _defineProperty(this, "filterConfig", function (item) {
62
+ return {
63
+ searchDefaultConditions: SYMBOL.in,
64
+ type: item.type,
65
+ id: "".concat(item.id, "_logisticsInterceptTypeList"),
66
+ name: "".concat(item.name, "-\u62E6\u622A\u7C7B\u578B"),
67
+ filterComponentType: 'MultipleSelect',
68
+ props: {
69
+ options: _this.expressInterceptInstance.getTypeOptions() || []
70
+ },
71
+ formatFilterValue: function formatFilterValue(value) {
72
+ var _value$map;
73
+ return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (v) {
74
+ return v === null || v === void 0 ? void 0 : v.split(',');
75
+ })) === null || _value$map === void 0 ? void 0 : _value$map.flat();
76
+ }
77
+ };
78
+ });
79
+ this.name = '拦截类型';
80
+ this.id = "".concat(options.id, "_logisticsInterceptTypeList");
81
+ this.sortField = "".concat(options.id, "_logisticsInterceptTypeList");
82
+ this.formField = "".concat(options.id, "_logisticsInterceptTypeList");
83
+ this.type = options.type;
84
+ this.componentConfig = options.componentConfig;
85
+ this.rules = [];
86
+ this.align = 'left';
87
+ this.width = 200;
88
+ this.isCombinationComponent = false;
89
+ this.canSort = false;
90
+ this.children = [];
91
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
92
+ this.expressInterceptInstance = ExpressInterceptData.getInstance();
93
+ this.dataType = 'string';
94
+ this.options = this.expressInterceptInstance.getTypeOptions() || [];
95
+ });
96
+ export default InterceptType;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ declare const ColumnHeader: ({ name }: {
3
+ name: string | JSX.Element;
4
+ }) => React.JSX.Element;
5
+ export default ColumnHeader;