@kmkf-fe-packages/services-components 0.7.15-alpha.1 → 0.7.15-alpha.2

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 (39) hide show
  1. package/dist/esm/commonComponents/QueryLogisticsTrack/index.d.ts +1 -1
  2. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +61 -31
  3. package/dist/esm/components/BS/BsExchange/index.d.ts +32 -0
  4. package/dist/esm/components/{BsSendGood → BS/BsExchange}/index.js +60 -54
  5. package/dist/esm/components/BS/BsGoods/index.d.ts +32 -0
  6. package/dist/esm/components/BS/BsGoods/index.js +122 -0
  7. package/dist/esm/components/{BsLogistics → BS/BsLogistics}/index.d.ts +3 -3
  8. package/dist/esm/components/{BsLogistics → BS/BsLogistics}/index.js +3 -3
  9. package/dist/esm/components/BS/BsReissue/index.d.ts +32 -0
  10. package/dist/esm/components/BS/BsReissue/index.js +122 -0
  11. package/dist/esm/components/BS/common/BsPic.d.ts +43 -0
  12. package/dist/esm/components/BS/common/BsPic.js +98 -0
  13. package/dist/esm/components/File/index.js +4 -4
  14. package/dist/esm/components/Input/index.js +1 -1
  15. package/dist/esm/components/{JstItemSelect → JST/JstItemSelect}/index.d.ts +4 -4
  16. package/dist/esm/components/{JstItemSelect → JST/JstItemSelect}/index.js +19 -19
  17. package/dist/esm/components/{JstLogistics → JST/JstLogistics}/index.d.ts +4 -4
  18. package/dist/esm/components/{JstLogistics → JST/JstLogistics}/index.js +17 -17
  19. package/dist/esm/components/{JstSendGood → JST/JstSendGood}/index.d.ts +3 -3
  20. package/dist/esm/components/{JstSendGood → JST/JstSendGood}/index.js +46 -29
  21. package/dist/esm/components/{JstSupply → JST/JstSupply}/index.d.ts +3 -3
  22. package/dist/esm/components/{JstSupply → JST/JstSupply}/index.js +20 -20
  23. package/dist/esm/components/LogisticsTrajectory/index.d.ts +53 -0
  24. package/dist/esm/components/LogisticsTrajectory/index.js +117 -0
  25. package/dist/esm/components/LogisticsTrajectory/trajectoryCode.d.ts +35 -0
  26. package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +103 -0
  27. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +39 -0
  28. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +91 -0
  29. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +32 -0
  30. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +80 -0
  31. package/dist/esm/components/PostIng/index.d.ts +26 -3
  32. package/dist/esm/components/PostIng/index.js +94 -25
  33. package/dist/esm/factory.d.ts +2 -2
  34. package/dist/esm/factory.js +12 -3
  35. package/dist/esm/index.d.ts +9 -6
  36. package/dist/esm/index.js +9 -6
  37. package/dist/esm/type.d.ts +1 -1
  38. package/package.json +3 -3
  39. package/dist/esm/components/BsSendGood/index.d.ts +0 -25
@@ -0,0 +1,122 @@
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 _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); }
3
+ 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); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
+ import React from "react";
10
+ import GetFormItem from "../../GetFormItem";
11
+ import { GoodImage } from "../../Common";
12
+ import ItemView from "../../../commonComponents/ItemView";
13
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
+ import { BsReissue as Reissue } from "@kmkf-fe-packages/basic-components";
15
+ import { SYMBOL } from "../../../constant";
16
+ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
17
+ var _this = this,
18
+ _this$componentConfig2;
19
+ _classCallCheck(this, BsReissue);
20
+ _defineProperty(this, "name", void 0);
21
+ _defineProperty(this, "id", void 0);
22
+ _defineProperty(this, "sortField", void 0);
23
+ _defineProperty(this, "type", void 0);
24
+ _defineProperty(this, "rules", void 0);
25
+ _defineProperty(this, "componentConfig", void 0);
26
+ _defineProperty(this, "effects", 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, "dataType", void 0);
32
+ _defineProperty(this, "renderClient", function (record) {
33
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
34
+ id: _this.id,
35
+ label: _this.name,
36
+ value: /*#__PURE__*/React.createElement(GoodImage, {
37
+ list: record === null || record === void 0 ? void 0 : record[_this.id],
38
+ type: "itemId"
39
+ })
40
+ }) : null;
41
+ });
42
+ _defineProperty(this, "renderPc", function (value, record) {
43
+ if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsReissueGoods")]) === undefined) {
44
+ return /*#__PURE__*/React.createElement("span", null, "--");
45
+ }
46
+ //兼容多个商品
47
+ return /*#__PURE__*/React.createElement(GoodImage, {
48
+ list: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsReissueGoods")],
49
+ type: "itemId"
50
+ });
51
+ });
52
+ _defineProperty(this, "renderLog", function (r) {
53
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")])) return null;
54
+ return _this.renderPc(undefined, r);
55
+ });
56
+ _defineProperty(this, "getComponentValue", function (r) {
57
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")];
58
+ });
59
+ _defineProperty(this, "renderExport", function (value, record) {
60
+ var _ref;
61
+ return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_bsReissueGoods")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (i) {
62
+ return i.numIid;
63
+ }).join("\n");
64
+ });
65
+ _defineProperty(this, "editRender", function (p) {
66
+ var _this$componentConfig, _this$effects, _this$effects2;
67
+ return /*#__PURE__*/React.createElement(GetFormItem, {
68
+ title: _this.name,
69
+ name: _this.id,
70
+ rules: _this.rules,
71
+ required: false,
72
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
73
+ component: /*#__PURE__*/React.createElement(Reissue, _extends({}, _this.componentConfig, {
74
+ maxLength: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.maxLength) || 20,
75
+ shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
76
+ shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
77
+ width: "90%"
78
+ }))
79
+ });
80
+ });
81
+ _defineProperty(this, "filterConfig", function (item) {
82
+ return {
83
+ searchDefaultConditions: SYMBOL.like,
84
+ type: item.type,
85
+ id: "".concat(item.id, "_bsReissueGoods"),
86
+ // 过滤组件id
87
+ name: item.name,
88
+ // 过滤组件名称
89
+ filterComponentType: "Input",
90
+ filterFn: function filterFn(value) {
91
+ return function (i) {
92
+ var _ref2;
93
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, "bsGoods") || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
94
+ var _String;
95
+ return item !== null && item !== void 0 && item.numIid ? (_String = String(item === null || item === void 0 ? void 0 : item.numIid)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
96
+ });
97
+ };
98
+ }
99
+ };
100
+ });
101
+ this.name = options.name;
102
+ this.id = options.id;
103
+ this.sortField = "".concat(options.id, "_bsReissueGoods");
104
+ this.formField = "".concat(options.id, "_bsReissueGoods");
105
+ this.type = options.type;
106
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
107
+ this.isCombinationComponent = false;
108
+ this.canSort = false;
109
+ this.children = [];
110
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
111
+ this.rules = this !== null && this !== void 0 && (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
112
+ required: true,
113
+ validator: function validator(_, value) {
114
+ if (!value || !value.length) {
115
+ return Promise.reject(new Error("请选择bs商品"));
116
+ }
117
+ return Promise.resolve();
118
+ }
119
+ }] : [];
120
+ this.dataType = "object";
121
+ });
122
+ export default BsReissue;
@@ -0,0 +1,43 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
3
+ declare class BsPic implements ComponentInterface {
4
+ name: string;
5
+ parentId: 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
+ constructor(options: PickOption);
21
+ getComponentValue: (r: Record) => any;
22
+ renderClient: (record: any) => null;
23
+ renderPc: (value: any, record: Record) => null;
24
+ renderLog: (r: Record) => any;
25
+ renderExport: (value: any, record: Record) => any;
26
+ editRender: () => null;
27
+ filterConfig: (item: ColumnConfig) => {
28
+ searchDefaultConditions: "in";
29
+ type: string;
30
+ id: string;
31
+ name: string;
32
+ filterComponentType: "MultipleSelect";
33
+ props: {
34
+ options: {
35
+ label: string;
36
+ value: string;
37
+ }[];
38
+ };
39
+ formatFilterValue: (value: string[]) => string[];
40
+ filterFn: (value: string[]) => (i: Record) => boolean;
41
+ };
42
+ }
43
+ export default BsPic;
@@ -0,0 +1,98 @@
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 { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
9
+ import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
10
+ import { SYMBOL } from "../../../constant";
11
+ var BsPic = /*#__PURE__*/_createClass(function BsPic(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, BsPic);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "parentId", 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, "getComponentValue", function (r) {
31
+ return r === null || r === void 0 ? void 0 : r[_this.id];
32
+ });
33
+ _defineProperty(this, "renderClient", function (record) {
34
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? null : null;
35
+ });
36
+ _defineProperty(this, "renderPc", function (value, record) {
37
+ return null;
38
+ });
39
+ _defineProperty(this, "renderLog", function (r) {
40
+ var _this$expressIntercep;
41
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id)])) return null;
42
+ return (_this$expressIntercep = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep === void 0 ? void 0 : _this$expressIntercep[r === null || r === void 0 ? void 0 : r["".concat(_this.id)]];
43
+ });
44
+ _defineProperty(this, "renderExport", function (value, record) {
45
+ var _this$expressIntercep2, _this$expressIntercep3;
46
+ return (_this$expressIntercep2 = (_this$expressIntercep3 = _this.expressInterceptInstance.getStatusNameMap()) === null || _this$expressIntercep3 === void 0 ? void 0 : _this$expressIntercep3["".concat(record === null || record === void 0 ? void 0 : record[_this.id])]) !== null && _this$expressIntercep2 !== void 0 ? _this$expressIntercep2 : "--";
47
+ });
48
+ _defineProperty(this, "editRender", function () {
49
+ return null;
50
+ });
51
+ _defineProperty(this, "filterConfig", function (item) {
52
+ return {
53
+ searchDefaultConditions: SYMBOL.in,
54
+ type: item.type,
55
+ id: "".concat(item.id, "_interceptLogisticsStatus"),
56
+ name: "".concat(item.name, "-\u7269\u6D41\u72B6\u6001"),
57
+ filterComponentType: "MultipleSelect",
58
+ props: {
59
+ options: _this.expressInterceptInstance.getStatusOptions() || []
60
+ },
61
+ formatFilterValue: function formatFilterValue(value) {
62
+ var _value$map;
63
+ return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (v) {
64
+ return v === null || v === void 0 ? void 0 : v.split(",");
65
+ })) === null || _value$map === void 0 ? void 0 : _value$map.flat();
66
+ },
67
+ filterFn: function filterFn(value) {
68
+ return function (i) {
69
+ var _value$map2, _value$map2$flat;
70
+ return value === null || value === void 0 ? void 0 : (_value$map2 = value.map(function (v) {
71
+ return v === null || v === void 0 ? void 0 : v.split(",");
72
+ })) === null || _value$map2 === void 0 ? void 0 : (_value$map2$flat = _value$map2.flat()) === null || _value$map2$flat === void 0 ? void 0 : _value$map2$flat.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "interceptLogisticsStatus"));
73
+ };
74
+ }
75
+ };
76
+ });
77
+ this.name = "bs商品图片";
78
+ this.parentId = options.id;
79
+ this.id = "".concat(options.id);
80
+ this.sortField = "".concat(options.id);
81
+ this.formField = "".concat(options.id);
82
+ this.type = options.type;
83
+ this.componentConfig = options.componentConfig;
84
+ this.rules = [];
85
+ this.align = "left";
86
+ this.width = 220;
87
+ this.isCombinationComponent = false;
88
+ this.canSort = false;
89
+ this.children = [];
90
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
91
+ this.expressInterceptInstance = ExpressInterceptData.getInstance();
92
+ this.dataType = "string";
93
+ }
94
+
95
+ //物流轨迹查询
96
+ );
97
+
98
+ export default BsPic;
@@ -50,10 +50,10 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
50
50
  }));
51
51
  });
52
52
  _defineProperty(this, "renderPc", function (value, record) {
53
- if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_picture")]) === undefined) {
53
+ if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")]) === undefined) {
54
54
  return /*#__PURE__*/React.createElement("span", null, "--");
55
55
  }
56
- var finalPictures = _this.formatPictures(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_picture")]).map(function (item) {
56
+ var finalPictures = _this.formatPictures(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")]).map(function (item) {
57
57
  return "".concat(window.location.origin, "/").concat(item);
58
58
  });
59
59
  return finalPictures === null || finalPictures === void 0 ? void 0 : finalPictures.map(function (pic) {
@@ -72,11 +72,11 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
72
72
  });
73
73
  });
74
74
  _defineProperty(this, "renderLog", function (r) {
75
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_picture")])) return null;
75
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_file")])) return null;
76
76
  return _this.renderPc(undefined, r);
77
77
  });
78
78
  _defineProperty(this, "getComponentValue", function (r) {
79
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_picture")];
79
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_file")];
80
80
  });
81
81
  _defineProperty(this, "renderClient", function (record) {
82
82
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -97,7 +97,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
97
97
  var isTest = testList.some(function (item) {
98
98
  return item.test(value);
99
99
  });
100
- if (!isTest) {
100
+ if (testList.length && !isTest) {
101
101
  return Promise.reject(new Error("请填写正确的格式"));
102
102
  }
103
103
  return Promise.resolve();
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
- import React from 'react';
3
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
4
  declare class JstItemSelect implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
@@ -14,7 +14,7 @@ declare class JstItemSelect implements ComponentInterface {
14
14
  formField: string;
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
- dataType: ComponentInterface['dataType'];
17
+ dataType: ComponentInterface["dataType"];
18
18
  constructor(options: PickOption);
19
19
  renderClient: (record: Record) => React.JSX.Element | null;
20
20
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -6,14 +6,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
- import React from 'react';
10
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
11
- import GetFormItem from "../GetFormItem";
12
- import { GoodImage } from "../Common";
13
- import { JstItemList } from '@kmkf-fe-packages/basic-components';
14
- import ItemView from "../../commonComponents/ItemView";
15
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
- import { SYMBOL } from "../../constant";
9
+ import React from "react";
10
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
11
+ import GetFormItem from "../../GetFormItem";
12
+ import { GoodImage } from "../../Common";
13
+ import { JstItemList } from "@kmkf-fe-packages/basic-components";
14
+ import ItemView from "../../../commonComponents/ItemView";
15
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
+ import { SYMBOL } from "../../../constant";
17
17
  var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
18
18
  var _this = this,
19
19
  _this$componentConfig;
@@ -60,8 +60,8 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
60
60
  _defineProperty(this, "renderExport", function (value, record) {
61
61
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_jstItemList")];
62
62
  return (list || []).map(function (item) {
63
- return [item === null || item === void 0 ? void 0 : item.itemId, item === null || item === void 0 ? void 0 : item.supplierName].join('/');
64
- }).join(',');
63
+ return [item === null || item === void 0 ? void 0 : item.itemId, item === null || item === void 0 ? void 0 : item.supplierName].join("/");
64
+ }).join(",");
65
65
  });
66
66
  _defineProperty(this, "editRender", function (p) {
67
67
  return /*#__PURE__*/React.createElement(GetFormItem, {
@@ -81,11 +81,11 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
81
81
  type: item.type,
82
82
  id: "".concat(item.id, "_itemId"),
83
83
  name: "jst\u4F9B\u5E94\u5546\u7F16\u7801",
84
- filterComponentType: 'Input',
84
+ filterComponentType: "Input",
85
85
  filterFn: function filterFn(value) {
86
86
  return function (i) {
87
87
  var _ref;
88
- return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, 'jstItemList') || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
88
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "jstItemList") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
89
89
  var _String;
90
90
  var id = item !== null && item !== void 0 && item.itemId ? (_String = String(item === null || item === void 0 ? void 0 : item.itemId)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
91
91
  return id;
@@ -97,11 +97,11 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
97
97
  type: item.type,
98
98
  id: "".concat(item.id, "_supplierName"),
99
99
  name: "jst\u4F9B\u5E94\u5546\u540D\u79F0",
100
- filterComponentType: 'Input',
100
+ filterComponentType: "Input",
101
101
  filterFn: function filterFn(value) {
102
102
  return function (i) {
103
103
  var _ref2;
104
- return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, 'jstItemList') || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
104
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, "jstItemList") || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
105
105
  var _String2;
106
106
  var name = item !== null && item !== void 0 && item.supplierName ? (_String2 = String(item === null || item === void 0 ? void 0 : item.supplierName)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
107
107
  return name;
@@ -119,30 +119,30 @@ var JstItemSelect = /*#__PURE__*/_createClass(function JstItemSelect(options) {
119
119
  this.isCombinationComponent = false;
120
120
  this.canSort = false;
121
121
  this.children = [];
122
- this.dataType = 'object';
122
+ this.dataType = "object";
123
123
  this.rules = (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
124
124
  required: true,
125
125
  validator: function validator(_, value) {
126
126
  var _this$componentConfig2, _this$componentConfig3;
127
127
  if (!value || !value.length) {
128
- return Promise.reject(new Error('请选择宝贝'));
128
+ return Promise.reject(new Error("请选择宝贝"));
129
129
  }
130
130
  var hasNotId = (value || []).some(function (item) {
131
131
  return !item.itemId;
132
132
  });
133
133
  if ((_this$componentConfig2 = _this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.enableItemId && hasNotId) {
134
- return Promise.reject(new Error('请输入供应商编码'));
134
+ return Promise.reject(new Error("请输入供应商编码"));
135
135
  }
136
136
  var hasNotName = (value || []).some(function (item) {
137
137
  return !item.supplierName;
138
138
  });
139
139
  if ((_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.enableSupplierName && hasNotName) {
140
- return Promise.reject(new Error('请输入供应商名称'));
140
+ return Promise.reject(new Error("请输入供应商名称"));
141
141
  }
142
142
  return Promise.resolve();
143
143
  }
144
144
  }] : [];
145
- this.align = 'left';
145
+ this.align = "left";
146
146
  this.expressDateInstance = ExpressData.getInstance();
147
147
  });
148
148
  export default JstItemSelect;
@@ -1,6 +1,6 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
- import React from 'react';
3
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
4
  declare class JstLogistics implements ComponentInterface {
5
5
  name: string;
6
6
  id: string;
@@ -14,7 +14,7 @@ declare class JstLogistics implements ComponentInterface {
14
14
  formField: string;
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
- dataType: ComponentInterface['dataType'];
17
+ dataType: ComponentInterface["dataType"];
18
18
  constructor(options: PickOption);
19
19
  renderClient: (record: any) => React.JSX.Element | null;
20
20
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -6,15 +6,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
- import React from 'react';
10
- import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
11
- import some from 'lodash/some';
12
- import GetFormItem from "../GetFormItem";
13
- import { JstGoodImage } from "../Common";
14
- import { JstGoods } from '@kmkf-fe-packages/basic-components';
15
- import ItemView from "../../commonComponents/ItemView";
16
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
17
- import { SYMBOL } from "../../constant";
9
+ import React from "react";
10
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
11
+ import some from "lodash/some";
12
+ import GetFormItem from "../../GetFormItem";
13
+ import { JstGoodImage } from "../../Common";
14
+ import { JstGoods } from "@kmkf-fe-packages/basic-components";
15
+ import ItemView from "../../../commonComponents/ItemView";
16
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
17
+ import { SYMBOL } from "../../../constant";
18
18
  var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
19
19
  var _this = this,
20
20
  _this$componentConfig3;
@@ -64,8 +64,8 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
64
64
  _defineProperty(this, "renderExport", function (value, record) {
65
65
  var list = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_jstItemList")];
66
66
  return (list || []).map(function (item) {
67
- return [_this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany), item === null || item === void 0 ? void 0 : item.logisticsCode].join('/');
68
- }).join(',');
67
+ return [_this.expressDateInstance.getExpressNameByCode(item === null || item === void 0 ? void 0 : item.logisticsCompany), item === null || item === void 0 ? void 0 : item.logisticsCode].join("/");
68
+ }).join(",");
69
69
  });
70
70
  _defineProperty(this, "editRender", function (p) {
71
71
  var _this$componentConfig, _this$componentConfig2;
@@ -87,10 +87,10 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
87
87
  type: item.type,
88
88
  id: "".concat(item.id, "_logisticsCode"),
89
89
  name: "jst\u7269\u6D41\u5355\u53F7",
90
- filterComponentType: 'Input',
90
+ filterComponentType: "Input",
91
91
  filterFn: function filterFn(value) {
92
92
  return function (i) {
93
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCode'), value);
93
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCode"), value);
94
94
  };
95
95
  }
96
96
  }, {
@@ -98,14 +98,14 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
98
98
  type: item.type,
99
99
  id: "".concat(item.id, "_logisticsCompany"),
100
100
  name: "jst\u7269\u6D41\u516C\u53F8",
101
- filterComponentType: 'MultipleSelect',
101
+ filterComponentType: "MultipleSelect",
102
102
  props: {
103
103
  options: _this.expressDateInstance.getExpressData() || []
104
104
  },
105
105
  filterFn: function filterFn(value) {
106
106
  return function (i) {
107
107
  var _ref;
108
- return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, 'logisticsCompany').split(',') || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
108
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCompany").split(",") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
109
109
  var _String;
110
110
  var logisticsCompany = item ? (_String = String(item)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
111
111
  return logisticsCompany;
@@ -123,7 +123,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
123
123
  this.isCombinationComponent = false;
124
124
  this.canSort = false;
125
125
  this.children = [];
126
- this.dataType = 'object';
126
+ this.dataType = "object";
127
127
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
128
128
  required: true,
129
129
  validator: function validator(_, value) {
@@ -136,7 +136,7 @@ var JstLogistics = /*#__PURE__*/_createClass(function JstLogistics(options) {
136
136
  return Promise.resolve();
137
137
  }
138
138
  }] : [];
139
- this.align = 'left';
139
+ this.align = "left";
140
140
  this.expressDateInstance = ExpressData.getInstance();
141
141
  });
142
142
  export default JstLogistics;
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
3
  declare class JstSendGood implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -12,7 +12,7 @@ declare class JstSendGood implements ComponentInterface {
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface['dataType'];
15
+ dataType: ComponentInterface["dataType"];
16
16
  constructor(options: PickOption);
17
17
  renderClient: (record: Record) => React.JSX.Element | null;
18
18
  renderPc: (value: any, record: Record) => React.JSX.Element;