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

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 (67) 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 +48 -0
  4. package/dist/esm/components/BS/BsExchange/index.js +258 -0
  5. package/dist/esm/components/BS/BsGoods/index.d.ts +31 -0
  6. package/dist/esm/components/BS/BsGoods/index.js +136 -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 +43 -0
  10. package/dist/esm/components/BS/BsReissue/index.js +149 -0
  11. package/dist/esm/components/{BsSendGood/index.d.ts → BS/common/BsChildCode.d.ts} +9 -9
  12. package/dist/esm/components/BS/common/BsChildCode.js +71 -0
  13. package/dist/esm/components/BS/common/BsChildMoney.d.ts +25 -0
  14. package/dist/esm/components/BS/common/BsChildMoney.js +71 -0
  15. package/dist/esm/components/BS/common/BsChildName.d.ts +25 -0
  16. package/dist/esm/components/BS/common/BsChildName.js +71 -0
  17. package/dist/esm/components/BS/common/BsChildNumber.d.ts +25 -0
  18. package/dist/esm/components/BS/common/BsChildNumber.js +71 -0
  19. package/dist/esm/components/BS/common/BsChildPic.d.ts +25 -0
  20. package/dist/esm/components/BS/common/BsChildPic.js +72 -0
  21. package/dist/esm/components/BS/common/BsChildShare.d.ts +25 -0
  22. package/dist/esm/components/BS/common/BsChildShare.js +71 -0
  23. package/dist/esm/components/BS/common/BsChildSku.d.ts +25 -0
  24. package/dist/esm/components/BS/common/BsChildSku.js +71 -0
  25. package/dist/esm/components/BS/common/BsChildType.d.ts +25 -0
  26. package/dist/esm/components/BS/common/BsChildType.js +71 -0
  27. package/dist/esm/components/BS/common/BsExchangeImage.d.ts +31 -0
  28. package/dist/esm/components/BS/common/BsExchangeImage.js +126 -0
  29. package/dist/esm/components/BS/common/BsGoodImage.d.ts +31 -0
  30. package/dist/esm/components/BS/common/BsGoodImage.js +88 -0
  31. package/dist/esm/components/BS/common/BsMemo.d.ts +25 -0
  32. package/dist/esm/components/BS/common/BsMemo.js +76 -0
  33. package/dist/esm/components/BS/common/BsType.d.ts +35 -0
  34. package/dist/esm/components/BS/common/BsType.js +89 -0
  35. package/dist/esm/components/BS/common/index.d.ts +10 -0
  36. package/dist/esm/components/BS/common/index.js +10 -0
  37. package/dist/esm/components/Common/index.d.ts +12 -6
  38. package/dist/esm/components/Common/index.js +115 -50
  39. package/dist/esm/components/Common/index.module.less +8 -0
  40. package/dist/esm/components/File/index.d.ts +7 -8
  41. package/dist/esm/components/File/index.js +20 -49
  42. package/dist/esm/components/Input/index.js +4 -1
  43. package/dist/esm/components/{JstItemSelect → JST/JstItemSelect}/index.d.ts +4 -4
  44. package/dist/esm/components/{JstItemSelect → JST/JstItemSelect}/index.js +19 -19
  45. package/dist/esm/components/{JstLogistics → JST/JstLogistics}/index.d.ts +4 -4
  46. package/dist/esm/components/{JstLogistics → JST/JstLogistics}/index.js +17 -17
  47. package/dist/esm/components/{JstSendGood → JST/JstSendGood}/index.d.ts +3 -3
  48. package/dist/esm/components/{JstSendGood → JST/JstSendGood}/index.js +46 -29
  49. package/dist/esm/components/{JstSupply → JST/JstSupply}/index.d.ts +3 -3
  50. package/dist/esm/components/{JstSupply → JST/JstSupply}/index.js +20 -20
  51. package/dist/esm/components/LogisticsTrajectory/index.d.ts +53 -0
  52. package/dist/esm/components/LogisticsTrajectory/index.js +107 -0
  53. package/dist/esm/components/LogisticsTrajectory/trajectoryCode.d.ts +35 -0
  54. package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +103 -0
  55. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +39 -0
  56. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +91 -0
  57. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +32 -0
  58. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +80 -0
  59. package/dist/esm/components/PostIng/index.d.ts +26 -3
  60. package/dist/esm/components/PostIng/index.js +94 -25
  61. package/dist/esm/factory.d.ts +2 -2
  62. package/dist/esm/factory.js +12 -3
  63. package/dist/esm/index.d.ts +9 -6
  64. package/dist/esm/index.js +9 -6
  65. package/dist/esm/type.d.ts +2 -1
  66. package/package.json +4 -4
  67. package/dist/esm/components/BsSendGood/index.js +0 -116
@@ -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 some from 'lodash/some';
11
- import GetFormItem from "../GetFormItem";
12
- import { JstGoodImage } from "../Common";
13
- import { JstGoods } 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 some from "lodash/some";
11
+ import GetFormItem from "../../GetFormItem";
12
+ import { JstGoodImage } from "../../Common";
13
+ import { JstGoods } 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 JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
18
18
  var _this = this,
19
19
  _this$componentConfig;
@@ -62,8 +62,8 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
62
62
  _defineProperty(this, "renderExport", function (value, record) {
63
63
  var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_jstItemList")]) || [];
64
64
  return list.map(function (item) {
65
- return [item === null || item === void 0 ? void 0 : item.supplyId, item === null || item === void 0 ? void 0 : item.supplyName].join('/');
66
- }).join(',');
65
+ return [item === null || item === void 0 ? void 0 : item.supplyId, item === null || item === void 0 ? void 0 : item.supplyName].join("/");
66
+ }).join(",");
67
67
  });
68
68
  _defineProperty(this, "editRender", function (p) {
69
69
  return /*#__PURE__*/React.createElement(GetFormItem, {
@@ -83,11 +83,11 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
83
83
  type: item.type,
84
84
  id: "".concat(item.id, "_supplyName"),
85
85
  name: "jst\u4F9B\u9500\u5546\u540D\u79F0",
86
- filterComponentType: 'Input',
86
+ filterComponentType: "Input",
87
87
  filterFn: function filterFn(value) {
88
88
  return function (i) {
89
89
  var _ref;
90
- return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, 'jstItemList') || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
90
+ return (_ref = _filterFn.filterTableListItemColumnValue(i, item.id, "jstItemList") || []) === null || _ref === void 0 ? void 0 : _ref.some(function (item) {
91
91
  var _String;
92
92
  var name = item !== null && item !== void 0 && item.supplyName ? (_String = String(item === null || item === void 0 ? void 0 : item.supplyName)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
93
93
  return name;
@@ -99,11 +99,11 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
99
99
  type: item.type,
100
100
  id: "".concat(item.id, "_supplyId"),
101
101
  name: "jst\u4F9B\u9500\u5546\u7F16\u7801",
102
- filterComponentType: 'Input',
102
+ filterComponentType: "Input",
103
103
  filterFn: function filterFn(value) {
104
104
  return function (i) {
105
105
  var _ref2;
106
- return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, 'jstItemList') || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
106
+ return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, "jstItemList") || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
107
107
  var _String2;
108
108
  var id = item !== null && item !== void 0 && item.supplyId ? (_String2 = String(item === null || item === void 0 ? void 0 : item.supplyId)) === null || _String2 === void 0 ? void 0 : _String2.includes(value) : false;
109
109
  return id;
@@ -121,19 +121,19 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
121
121
  this.isCombinationComponent = false;
122
122
  this.canSort = false;
123
123
  this.children = [];
124
- this.dataType = 'object';
124
+ this.dataType = "object";
125
125
  this.rules = (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
126
126
  required: true,
127
127
  validator: function validator(_, value) {
128
128
  var _this$componentConfig2;
129
- var showField = (_this === null || _this === void 0 ? void 0 : (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showField) || '';
129
+ var showField = (_this === null || _this === void 0 ? void 0 : (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showField) || "";
130
130
  if (!value || !value.length) {
131
- return Promise.reject(new Error('请选择宝贝'));
131
+ return Promise.reject(new Error("请选择宝贝"));
132
132
  }
133
133
  var hasNo = (value || []).some(function (item) {
134
- if (['supplyName'].includes(showField)) {
134
+ if (["supplyName"].includes(showField)) {
135
135
  return item.supplyName;
136
- } else if (['supplyId'].includes(showField)) {
136
+ } else if (["supplyId"].includes(showField)) {
137
137
  return item.supplyId;
138
138
  } else {
139
139
  return item.supplyId && item.supplyName;
@@ -145,6 +145,6 @@ var JstSupply = /*#__PURE__*/_createClass(function JstSupply(options) {
145
145
  return Promise.resolve();
146
146
  }
147
147
  }] : [];
148
- this.align = 'left';
148
+ this.align = "left";
149
149
  });
150
150
  export default JstSupply;
@@ -0,0 +1,53 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
+ import TrajectoryCompany from "./trajectoryCompany";
5
+ import TrajectoryCode from "./trajectoryCode";
6
+ import TrajectorySnapshot from "./trajectorySnapshot";
7
+ declare class LogisticsTrajectory implements ComponentInterface {
8
+ name: string;
9
+ id: string;
10
+ sortField: string;
11
+ type: string;
12
+ rules: any[];
13
+ componentConfig: ComponentInterface["componentConfig"];
14
+ expressDateInstance: InstanceType<typeof ExpressData>;
15
+ express: TrajectoryCompany;
16
+ expressCode: TrajectoryCode;
17
+ expressSnapshot: TrajectorySnapshot;
18
+ isCombinationComponent: boolean;
19
+ formField: string;
20
+ canSort: boolean;
21
+ children: ComponentInterface[];
22
+ dataType: ComponentInterface["dataType"];
23
+ constructor(options: PickOption);
24
+ editRender: (p: any) => React.JSX.Element;
25
+ renderClient: (record: Record) => React.JSX.Element;
26
+ renderPc: () => null;
27
+ renderLog: (r: Record) => React.JSX.Element;
28
+ getComponentValue: (r: Record) => {
29
+ company: any;
30
+ order: any;
31
+ snapshot: any;
32
+ };
33
+ renderExport: () => null;
34
+ filterConfig: (item: ColumnConfig) => ({
35
+ searchDefaultConditions: "in";
36
+ type: string;
37
+ id: string;
38
+ name: string;
39
+ filterComponentType: "MultipleSelect";
40
+ props: {
41
+ options: any[];
42
+ };
43
+ filterFn: (value: string) => (i: Record) => boolean;
44
+ } | {
45
+ searchDefaultConditions: "like";
46
+ type: string;
47
+ id: string;
48
+ name: string;
49
+ filterComponentType: "Input";
50
+ filterFn: (value: string) => (i: Record) => boolean;
51
+ })[];
52
+ }
53
+ export default LogisticsTrajectory;
@@ -0,0 +1,107 @@
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 { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
13
+ import { LogisticsTrajectory as Trajectory } from "@kmkf-fe-packages/basic-components";
14
+ import TrajectoryCompany from "./trajectoryCompany";
15
+ import TrajectoryCode from "./trajectoryCode";
16
+ import TrajectorySnapshot from "./trajectorySnapshot";
17
+ import GetFormItem from "../GetFormItem";
18
+ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory(options) {
19
+ var _this = this,
20
+ _this$componentConfig3;
21
+ _classCallCheck(this, LogisticsTrajectory);
22
+ _defineProperty(this, "name", void 0);
23
+ _defineProperty(this, "id", void 0);
24
+ _defineProperty(this, "sortField", void 0);
25
+ _defineProperty(this, "type", void 0);
26
+ _defineProperty(this, "rules", void 0);
27
+ _defineProperty(this, "componentConfig", void 0);
28
+ _defineProperty(this, "expressDateInstance", void 0);
29
+ _defineProperty(this, "express", void 0);
30
+ _defineProperty(this, "expressCode", void 0);
31
+ _defineProperty(this, "expressSnapshot", void 0);
32
+ _defineProperty(this, "isCombinationComponent", void 0);
33
+ _defineProperty(this, "formField", void 0);
34
+ _defineProperty(this, "canSort", void 0);
35
+ _defineProperty(this, "children", void 0);
36
+ _defineProperty(this, "dataType", void 0);
37
+ _defineProperty(this, "editRender", function (p) {
38
+ var _this$componentConfig, _this$componentConfig2;
39
+ return /*#__PURE__*/React.createElement(GetFormItem, {
40
+ title: _this.name,
41
+ name: _this.id,
42
+ rules: _this.rules,
43
+ hidden: p === null || p === void 0 ? void 0 : p.hidden,
44
+ 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,
45
+ component: /*#__PURE__*/React.createElement(Trajectory, _extends({}, _this.componentConfig, {
46
+ options: _this.expressDateInstance.getExpressData()
47
+ }))
48
+ });
49
+ });
50
+ _defineProperty(this, "renderClient", function (record) {
51
+ return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.expressSnapshot.renderClient(record));
52
+ });
53
+ _defineProperty(this, "renderPc", function () {
54
+ return null;
55
+ });
56
+ _defineProperty(this, "renderLog", function (r) {
57
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, _this.express.name, ": ", _this.express.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressCode.name, ": ", _this.expressCode.renderLog(r)), /*#__PURE__*/React.createElement("div", null, _this.expressSnapshot.name, ":", _this.expressSnapshot.renderLog(r)));
58
+ });
59
+ _defineProperty(this, "getComponentValue", function (r) {
60
+ return {
61
+ company: _this.express.getComponentValue(r),
62
+ order: _this.expressCode.getComponentValue(r),
63
+ snapshot: _this.expressSnapshot.getComponentValue(r)
64
+ };
65
+ });
66
+ _defineProperty(this, "renderExport", function () {
67
+ return null;
68
+ });
69
+ _defineProperty(this, "filterConfig", function (item) {
70
+ return [_this.express.filterConfig(item), _this.expressCode.filterConfig(item), _this.expressSnapshot.filterConfig(item)];
71
+ });
72
+ this.name = options.name;
73
+ this.id = options.id;
74
+ this.sortField = options.id;
75
+ this.formField = options.id;
76
+ this.type = options.type;
77
+ this.componentConfig = options.componentConfig;
78
+ this.expressDateInstance = ExpressData.getInstance();
79
+ this.express = new TrajectoryCompany(_objectSpread(_objectSpread({}, options), {}, {
80
+ name: "物流公司",
81
+ id: "".concat(this.id, "_trajectoryCompany")
82
+ }));
83
+ this.expressCode = new TrajectoryCode(_objectSpread(_objectSpread({}, options), {}, {
84
+ name: "物流单号",
85
+ id: "".concat(this.id)
86
+ }));
87
+ this.expressSnapshot = new TrajectorySnapshot(_objectSpread(_objectSpread({}, options), {}, {
88
+ name: "物流快照",
89
+ id: "".concat(this.id, "_trajectorySnapshot")
90
+ }));
91
+ this.isCombinationComponent = true;
92
+ this.canSort = false;
93
+ this.dataType = "object";
94
+ this.children = [this.express, this.expressCode, this.expressSnapshot];
95
+ this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
96
+ validator: function validator(_, value) {
97
+ if (!value.trajectoryCompany) {
98
+ return Promise.reject(new Error("请选择物流公司"));
99
+ }
100
+ if (!value.trajectoryCode) {
101
+ return Promise.reject(new Error("请输入物流单号"));
102
+ }
103
+ return Promise.resolve();
104
+ }
105
+ }] : [];
106
+ });
107
+ export default LogisticsTrajectory;
@@ -0,0 +1,35 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class TrajectoryCode 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
+ align: ALignType;
12
+ width: number;
13
+ isCombinationComponent: boolean;
14
+ formField: string;
15
+ canSort: boolean;
16
+ children: ComponentInterface[];
17
+ dataType: ComponentInterface["dataType"];
18
+ constructor(options: PickOption);
19
+ renderCode: (record: any, w?: number) => React.JSX.Element;
20
+ renderClient: (record: any) => React.JSX.Element | null;
21
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
22
+ renderLog: (r: Record) => React.JSX.Element | null;
23
+ getComponentValue: (r: Record) => any;
24
+ renderExport: (value: string, record: Record) => any;
25
+ editRender: () => null;
26
+ filterConfig: (item: ColumnConfig) => {
27
+ searchDefaultConditions: "like";
28
+ type: string;
29
+ id: string;
30
+ name: string;
31
+ filterComponentType: "Input";
32
+ filterFn: (value: string) => (i: Record) => boolean;
33
+ };
34
+ }
35
+ export default TrajectoryCode;
@@ -0,0 +1,103 @@
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 ItemView from "../../commonComponents/ItemView";
10
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
11
+ import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
12
+ import { SYMBOL } from "../../constant";
13
+ var TrajectoryCode = /*#__PURE__*/_createClass(function TrajectoryCode(options) {
14
+ var _this = this,
15
+ _this$componentConfig;
16
+ _classCallCheck(this, TrajectoryCode);
17
+ _defineProperty(this, "name", void 0);
18
+ _defineProperty(this, "parentId", void 0);
19
+ _defineProperty(this, "id", void 0);
20
+ _defineProperty(this, "sortField", void 0);
21
+ _defineProperty(this, "type", void 0);
22
+ _defineProperty(this, "rules", void 0);
23
+ _defineProperty(this, "componentConfig", void 0);
24
+ _defineProperty(this, "align", void 0);
25
+ _defineProperty(this, "width", void 0);
26
+ _defineProperty(this, "isCombinationComponent", void 0);
27
+ _defineProperty(this, "formField", void 0);
28
+ _defineProperty(this, "canSort", void 0);
29
+ _defineProperty(this, "children", void 0);
30
+ _defineProperty(this, "dataType", void 0);
31
+ _defineProperty(this, "renderCode", function (record) {
32
+ var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
33
+ var company = record === null || record === void 0 ? void 0 : record["".concat(_this.parentId, "_trajectoryCompany")];
34
+ var code = record === null || record === void 0 ? void 0 : record[_this.id];
35
+ return /*#__PURE__*/React.createElement("div", null, code ? /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
36
+ modelWidth: w,
37
+ interceptCompany: company,
38
+ interceptCode: code,
39
+ interceptSenderMobile: ""
40
+ }) : "--");
41
+ });
42
+ _defineProperty(this, "renderClient", function (record) {
43
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
44
+ id: _this.id,
45
+ label: _this.name,
46
+ value: _this.renderCode(record)
47
+ }) : null;
48
+ });
49
+ _defineProperty(this, "renderPc", function (value, record) {
50
+ return _this.renderCode(record, 700);
51
+ });
52
+ _defineProperty(this, "renderLog", function (r) {
53
+ if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) 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[_this.id];
58
+ });
59
+ _defineProperty(this, "renderExport", function (value, record) {
60
+ var _record$_this$id;
61
+ return (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--";
62
+ });
63
+ _defineProperty(this, "editRender", function () {
64
+ return null;
65
+ });
66
+ _defineProperty(this, "filterConfig", function (item) {
67
+ var subKey = item.subKey;
68
+ return {
69
+ searchDefaultConditions: SYMBOL.like,
70
+ type: item.type,
71
+ id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
72
+ name: "".concat(item.name, "-\u7269\u6D41\u5355\u53F7"),
73
+ filterComponentType: "Input",
74
+ filterFn: function filterFn(value) {
75
+ return function (i) {
76
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(subKey)), value);
77
+ };
78
+ }
79
+ };
80
+ });
81
+ this.name = options.name;
82
+ this.parentId = options.id;
83
+ this.id = "".concat(options.id, "_trajectoryCode");
84
+ this.sortField = "".concat(options.id, "_trajectoryCode");
85
+ this.formField = "".concat(options.id, "_trajectoryCode");
86
+ this.type = options.type;
87
+ this.componentConfig = options.componentConfig;
88
+ this.rules = (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
89
+ validator: function validator(_, value) {
90
+ if (/^[0-9a-zA-Z]*$/.test(value)) {
91
+ return Promise.resolve();
92
+ }
93
+ return Promise.reject(new Error("只能输入数字和字母"));
94
+ }
95
+ }] : [];
96
+ this.align = "left";
97
+ this.width = 200;
98
+ this.isCombinationComponent = false;
99
+ this.canSort = true;
100
+ this.dataType = "string";
101
+ this.children = [];
102
+ });
103
+ export default TrajectoryCode;
@@ -0,0 +1,39 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
4
+ declare class TrajectoryCompany implements ComponentInterface {
5
+ name: string;
6
+ id: string;
7
+ sortField: string;
8
+ type: string;
9
+ rules: any[];
10
+ componentConfig: ComponentInterface["componentConfig"];
11
+ align: ALignType;
12
+ expressDateInstance: InstanceType<typeof ExpressData>;
13
+ width: number;
14
+ isCombinationComponent: boolean;
15
+ formField: string;
16
+ canSort: boolean;
17
+ children: ComponentInterface[];
18
+ dataType: ComponentInterface["dataType"];
19
+ options: ComponentInterface["options"];
20
+ constructor(options: PickOption);
21
+ renderClient: (record: any) => React.JSX.Element | null;
22
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
23
+ renderLog: (r: Record) => React.JSX.Element | null;
24
+ getComponentValue: (r: Record) => any;
25
+ renderExport: (value: string, 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: any[];
35
+ };
36
+ filterFn: (value: string) => (i: Record) => boolean;
37
+ };
38
+ }
39
+ export default TrajectoryCompany;
@@ -0,0 +1,91 @@
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 { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
10
+ import ItemView from "../../commonComponents/ItemView";
11
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
12
+ import { SYMBOL } from "../../constant";
13
+ var TrajectoryCompany = /*#__PURE__*/_createClass(function TrajectoryCompany(options) {
14
+ var _this = this;
15
+ _classCallCheck(this, TrajectoryCompany);
16
+ _defineProperty(this, "name", void 0);
17
+ _defineProperty(this, "id", void 0);
18
+ _defineProperty(this, "sortField", void 0);
19
+ _defineProperty(this, "type", void 0);
20
+ _defineProperty(this, "rules", void 0);
21
+ _defineProperty(this, "componentConfig", void 0);
22
+ _defineProperty(this, "align", void 0);
23
+ _defineProperty(this, "expressDateInstance", void 0);
24
+ _defineProperty(this, "width", void 0);
25
+ _defineProperty(this, "isCombinationComponent", void 0);
26
+ _defineProperty(this, "formField", void 0);
27
+ _defineProperty(this, "canSort", void 0);
28
+ _defineProperty(this, "children", void 0);
29
+ _defineProperty(this, "dataType", void 0);
30
+ _defineProperty(this, "options", void 0);
31
+ _defineProperty(this, "renderClient", function (record) {
32
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
33
+ id: _this.id,
34
+ label: _this.name,
35
+ value: _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]) || (record === null || record === void 0 ? void 0 : record[_this.id])
36
+ }) : null;
37
+ });
38
+ _defineProperty(this, "renderPc", function (value, record) {
39
+ if ((record === null || record === void 0 ? void 0 : record[_this.id]) === undefined) {
40
+ return /*#__PURE__*/React.createElement("span", null, "--");
41
+ }
42
+ return /*#__PURE__*/React.createElement("span", null, _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]) || (record === null || record === void 0 ? void 0 : record[_this.id]));
43
+ });
44
+ _defineProperty(this, "renderLog", function (r) {
45
+ if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
46
+ return _this.renderPc(undefined, r);
47
+ });
48
+ _defineProperty(this, "getComponentValue", function (r) {
49
+ return r === null || r === void 0 ? void 0 : r[_this.id];
50
+ });
51
+ _defineProperty(this, "renderExport", function (value, record) {
52
+ return _this.expressDateInstance.getExpressNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]) || (record === null || record === void 0 ? void 0 : record[_this.id]);
53
+ });
54
+ _defineProperty(this, "editRender", function () {
55
+ return null;
56
+ });
57
+ _defineProperty(this, "filterConfig", function (item) {
58
+ var subKey = item.subKey;
59
+ return {
60
+ searchDefaultConditions: SYMBOL.in,
61
+ type: item.type,
62
+ id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
63
+ name: "".concat(item.name, "-\u7269\u6D41\u516C\u53F8"),
64
+ filterComponentType: "MultipleSelect",
65
+ props: {
66
+ options: _this.expressDateInstance.getExpressData() || []
67
+ },
68
+ filterFn: function filterFn(value) {
69
+ return function (i) {
70
+ return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(subKey)));
71
+ };
72
+ }
73
+ };
74
+ });
75
+ this.name = options.name;
76
+ this.id = options.id;
77
+ this.sortField = options.id;
78
+ this.formField = options.id;
79
+ this.type = options.type;
80
+ this.componentConfig = options.componentConfig;
81
+ this.rules = [];
82
+ this.align = "left";
83
+ this.expressDateInstance = ExpressData.getInstance();
84
+ this.width = 200;
85
+ this.isCombinationComponent = false;
86
+ this.canSort = true;
87
+ this.children = [];
88
+ this.dataType = "string";
89
+ this.options = this.expressDateInstance.getExpressData() || [];
90
+ });
91
+ export default TrajectoryCompany;
@@ -0,0 +1,32 @@
1
+ import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
2
+ import React from "react";
3
+ declare class TrajectorySnapshot 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
+ renderClient: (record: any) => React.JSX.Element | null;
18
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
19
+ renderLog: (r: Record) => React.JSX.Element | null;
20
+ getComponentValue: (r: Record) => any;
21
+ renderExport: (value: string, record: Record) => any;
22
+ editRender: () => null;
23
+ filterConfig: (item: ColumnConfig) => {
24
+ searchDefaultConditions: "like";
25
+ type: string;
26
+ id: string;
27
+ name: string;
28
+ filterComponentType: "Input";
29
+ filterFn: (value: string) => (i: Record) => boolean;
30
+ };
31
+ }
32
+ export default TrajectorySnapshot;
@@ -0,0 +1,80 @@
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 ItemView from "../../commonComponents/ItemView";
10
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
11
+ import { SYMBOL } from "../../constant";
12
+ var TrajectorySnapshot = /*#__PURE__*/_createClass(function TrajectorySnapshot(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, TrajectorySnapshot);
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, "componentConfig", void 0);
20
+ _defineProperty(this, "align", void 0);
21
+ _defineProperty(this, "width", void 0);
22
+ _defineProperty(this, "isCombinationComponent", void 0);
23
+ _defineProperty(this, "formField", void 0);
24
+ _defineProperty(this, "canSort", void 0);
25
+ _defineProperty(this, "children", void 0);
26
+ _defineProperty(this, "dataType", void 0);
27
+ _defineProperty(this, "renderClient", function (record) {
28
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
29
+ id: _this.id,
30
+ label: _this.name,
31
+ value: record === null || record === void 0 ? void 0 : record[_this.id]
32
+ }) : null;
33
+ });
34
+ _defineProperty(this, "renderPc", function (value, record) {
35
+ var _record$_this$id;
36
+ return /*#__PURE__*/React.createElement("span", null, (_record$_this$id = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id !== void 0 ? _record$_this$id : "--");
37
+ });
38
+ _defineProperty(this, "renderLog", function (r) {
39
+ if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
40
+ return _this.renderPc(undefined, r);
41
+ });
42
+ _defineProperty(this, "getComponentValue", function (r) {
43
+ return r === null || r === void 0 ? void 0 : r[_this.id];
44
+ });
45
+ _defineProperty(this, "renderExport", function (value, record) {
46
+ var _record$_this$id2;
47
+ return (_record$_this$id2 = record === null || record === void 0 ? void 0 : record[_this.id]) !== null && _record$_this$id2 !== void 0 ? _record$_this$id2 : "--";
48
+ });
49
+ _defineProperty(this, "editRender", function () {
50
+ return null;
51
+ });
52
+ _defineProperty(this, "filterConfig", function (item) {
53
+ var subKey = item.subKey;
54
+ return {
55
+ searchDefaultConditions: SYMBOL.like,
56
+ type: item.type,
57
+ id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
58
+ name: "".concat(item.name, "-\u7269\u6D41\u5FEB\u7167"),
59
+ filterComponentType: "Input",
60
+ filterFn: function filterFn(value) {
61
+ return function (i) {
62
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(subKey)), value);
63
+ };
64
+ }
65
+ };
66
+ });
67
+ this.name = options.name;
68
+ this.id = options.id;
69
+ this.sortField = options.id;
70
+ this.formField = options.id;
71
+ this.type = options.type;
72
+ this.componentConfig = options.componentConfig;
73
+ this.align = "left";
74
+ this.width = 200;
75
+ this.isCombinationComponent = false;
76
+ this.canSort = true;
77
+ this.dataType = "string";
78
+ this.children = [];
79
+ });
80
+ export default TrajectorySnapshot;