@kmkf-fe-packages/services-components 0.23.1-beta.1 → 0.23.1-beta.3

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 (35) hide show
  1. package/dist/esm/components/BS/BsLogistics/index.js +5 -4
  2. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +7 -6
  3. package/dist/esm/components/BS/BsSystemOrder/index.js +22 -19
  4. package/dist/esm/components/BS/DeliveryNo/index.d.ts +6 -5
  5. package/dist/esm/components/BS/DeliveryNo/index.js +15 -12
  6. package/dist/esm/components/CommonMultiStatus/index.d.ts +6 -5
  7. package/dist/esm/components/CommonMultiStatus/index.js +58 -51
  8. package/dist/esm/components/CommonSystemOrder/index.d.ts +6 -5
  9. package/dist/esm/components/CommonSystemOrder/index.js +29 -26
  10. package/dist/esm/components/Input/index.d.ts +7 -6
  11. package/dist/esm/components/Input/index.js +37 -26
  12. package/dist/esm/components/JST/JstLogistics/index.d.ts +11 -0
  13. package/dist/esm/components/JST/JstLogistics/index.js +21 -7
  14. package/dist/esm/components/Logistics/index.d.ts +6 -6
  15. package/dist/esm/components/Logistics/index.js +16 -15
  16. package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +48 -0
  17. package/dist/esm/components/LogisticsMoreTrajectory/index.js +119 -0
  18. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.d.ts +34 -0
  19. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.js +98 -0
  20. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.d.ts +40 -0
  21. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.js +95 -0
  22. package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.d.ts +32 -0
  23. package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.js +74 -0
  24. package/dist/esm/components/Payment/index.d.ts +12 -12
  25. package/dist/esm/components/Payment/index.js +11 -12
  26. package/dist/esm/components/TradeId/index.d.ts +1 -1
  27. package/dist/esm/components/TradeId/index.js +2 -2
  28. package/dist/esm/constant.d.ts +1 -0
  29. package/dist/esm/constant.js +8 -0
  30. package/dist/esm/factory.d.ts +2 -2
  31. package/dist/esm/factory.js +3 -1
  32. package/dist/esm/index.d.ts +2 -1
  33. package/dist/esm/index.js +1 -0
  34. package/dist/esm/type.d.ts +12 -12
  35. package/package.json +4 -4
@@ -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 React from "react";
9
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
10
+ import QueryLogisticsTrack from "../../commonComponents/QueryLogisticsTrack";
11
+ import { SYMBOL } from "../../constant";
12
+ var TrajectoryCode = /*#__PURE__*/_createClass(function TrajectoryCode(options) {
13
+ var _this = this,
14
+ _this$componentConfig;
15
+ _classCallCheck(this, TrajectoryCode);
16
+ _defineProperty(this, "name", void 0);
17
+ _defineProperty(this, "id", void 0);
18
+ _defineProperty(this, "parentId", void 0);
19
+ _defineProperty(this, "sortField", void 0);
20
+ _defineProperty(this, "type", void 0);
21
+ _defineProperty(this, "rules", void 0);
22
+ _defineProperty(this, "componentConfig", void 0);
23
+ _defineProperty(this, "align", 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, "renderCode", function (record) {
31
+ var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
32
+ var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.parentId, "_trajectoryList")]) || [];
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ onClick: function onClick(e) {
35
+ return e.stopPropagation();
36
+ }
37
+ }, list.length ? list.map(function (item, index) {
38
+ return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", /*#__PURE__*/React.createElement(QueryLogisticsTrack, {
39
+ title: item.trajectoryCode,
40
+ modelWidth: w,
41
+ interceptCompany: item.trajectoryCompany,
42
+ interceptCode: item.trajectoryCode,
43
+ interceptSenderMobile: item.trajectoryPhone
44
+ }));
45
+ }) : "--");
46
+ });
47
+ _defineProperty(this, "renderClient", function () {
48
+ return null;
49
+ });
50
+ _defineProperty(this, "renderPc", function (value, record) {
51
+ return _this.renderCode(record || [], 700);
52
+ });
53
+ _defineProperty(this, "renderLog", function (r) {
54
+ if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
55
+ return _this.renderPc(undefined, r);
56
+ });
57
+ _defineProperty(this, "getComponentValue", function (r) {
58
+ return ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).join();
59
+ });
60
+ _defineProperty(this, "renderExport", function (value, record) {
61
+ var _this$getComponentVal;
62
+ return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
63
+ });
64
+ _defineProperty(this, "editRender", function () {
65
+ return null;
66
+ });
67
+ _defineProperty(this, "filterConfig", function (item) {
68
+ return {
69
+ searchDefaultConditions: SYMBOL.like,
70
+ type: item.type,
71
+ id: _this.id,
72
+ name: "".concat(item.name, "-\u7269\u6D41\u5355\u53F7"),
73
+ filterComponentType: "Input"
74
+ };
75
+ });
76
+ this.name = options.name;
77
+ this.id = options.id;
78
+ this.parentId = options.id.split("_")[0];
79
+ this.sortField = options.id;
80
+ this.formField = options.id;
81
+ this.type = options.type;
82
+ this.componentConfig = options.componentConfig;
83
+ this.rules = (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
84
+ validator: function validator(_, value) {
85
+ if (/^[0-9a-zA-Z]*$/.test(value)) {
86
+ return Promise.resolve();
87
+ }
88
+ return Promise.reject(new Error("只能输入数字和字母"));
89
+ }
90
+ }] : [];
91
+ this.align = "left";
92
+ this.width = 200;
93
+ this.isCombinationComponent = false;
94
+ this.canSort = false;
95
+ this.dataType = "string";
96
+ this.children = [];
97
+ });
98
+ export default TrajectoryCode;
@@ -0,0 +1,40 @@
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
+ renderCompany: (record: any) => any;
22
+ renderClient: () => null;
23
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
24
+ renderLog: (r: Record) => React.JSX.Element | null;
25
+ getComponentValue: (r: Record) => any;
26
+ renderExport: (value: string, record: Record) => any;
27
+ editRender: () => null;
28
+ filterConfig: (item: ColumnConfig) => {
29
+ searchDefaultConditions: "in";
30
+ type: string;
31
+ id: string;
32
+ name: string;
33
+ filterComponentType: "MultipleSelect";
34
+ props: {
35
+ options: any[];
36
+ };
37
+ filterFn: (value: string) => (i: Record) => boolean;
38
+ };
39
+ }
40
+ export default TrajectoryCompany;
@@ -0,0 +1,95 @@
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 { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
11
+ import { SYMBOL } from "../../constant";
12
+ var TrajectoryCompany = /*#__PURE__*/_createClass(function TrajectoryCompany(options) {
13
+ var _this = this;
14
+ _classCallCheck(this, TrajectoryCompany);
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, "align", void 0);
22
+ _defineProperty(this, "expressDateInstance", 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, "dataType", void 0);
29
+ _defineProperty(this, "options", void 0);
30
+ _defineProperty(this, "renderCompany", function (record) {
31
+ var list = (record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) || [];
32
+ return list.length ? list.map(function (item, index) {
33
+ return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item));
34
+ }) : "--";
35
+ });
36
+ _defineProperty(this, "renderClient", function () {
37
+ return null;
38
+ });
39
+ _defineProperty(this, "renderPc", function (value, record) {
40
+ if ((record === null || record === void 0 ? void 0 : record[_this.id]) === undefined) {
41
+ return /*#__PURE__*/React.createElement("span", null, "--");
42
+ }
43
+ return /*#__PURE__*/React.createElement("span", null, _this.renderCompany(record || []));
44
+ });
45
+ _defineProperty(this, "renderLog", function (r) {
46
+ if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
47
+ return _this.renderPc(undefined, r);
48
+ });
49
+ _defineProperty(this, "getComponentValue", function (r) {
50
+ return ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).map(function (item) {
51
+ return _this.expressDateInstance.getExpressNameByCode(item);
52
+ }).join();
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
+ var subKey = item.subKey;
63
+ return {
64
+ searchDefaultConditions: SYMBOL.in,
65
+ type: item.type,
66
+ id: subKey ? "".concat(item.id, "_").concat(subKey) : item.id,
67
+ name: "".concat(item.name, "-\u7269\u6D41\u516C\u53F8"),
68
+ filterComponentType: "MultipleSelect",
69
+ props: {
70
+ options: _this.expressDateInstance.getExpressData() || []
71
+ },
72
+ filterFn: function filterFn(value) {
73
+ return function (i) {
74
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(subKey)), value);
75
+ };
76
+ }
77
+ };
78
+ });
79
+ this.name = options.name;
80
+ this.id = options.id;
81
+ this.sortField = options.id;
82
+ this.formField = options.id;
83
+ this.type = options.type;
84
+ this.componentConfig = options.componentConfig;
85
+ this.rules = [];
86
+ this.align = "left";
87
+ this.expressDateInstance = ExpressData.getInstance();
88
+ this.width = 200;
89
+ this.isCombinationComponent = false;
90
+ this.canSort = false;
91
+ this.children = [];
92
+ this.dataType = "string";
93
+ this.options = this.expressDateInstance.getExpressData() || [];
94
+ });
95
+ 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
+ renderCode: (record: any) => React.JSX.Element;
18
+ renderClient: () => null;
19
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
20
+ renderLog: (r: Record) => React.JSX.Element | null;
21
+ getComponentValue: (r: Record) => any;
22
+ renderExport: (value: string, record: Record) => any;
23
+ editRender: () => null;
24
+ filterConfig: (item: ColumnConfig) => {
25
+ searchDefaultConditions: "like";
26
+ type: string;
27
+ id: string;
28
+ name: string;
29
+ filterComponentType: "Input";
30
+ };
31
+ }
32
+ export default TrajectorySnapshot;
@@ -0,0 +1,74 @@
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 { SYMBOL } from "../../constant";
11
+ var TrajectorySnapshot = /*#__PURE__*/_createClass(function TrajectorySnapshot(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, TrajectorySnapshot);
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, "componentConfig", void 0);
19
+ _defineProperty(this, "align", void 0);
20
+ _defineProperty(this, "width", void 0);
21
+ _defineProperty(this, "isCombinationComponent", void 0);
22
+ _defineProperty(this, "formField", void 0);
23
+ _defineProperty(this, "canSort", void 0);
24
+ _defineProperty(this, "children", void 0);
25
+ _defineProperty(this, "dataType", void 0);
26
+ _defineProperty(this, "renderCode", function (record) {
27
+ var list = (record === null || record === void 0 ? void 0 : record[_this.id]) || [];
28
+ return /*#__PURE__*/React.createElement("div", null, list.length ? list.map(function (item, index) {
29
+ return /*#__PURE__*/React.createElement("div", null, list.length > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", item);
30
+ }) : "--");
31
+ });
32
+ _defineProperty(this, "renderClient", function () {
33
+ return null;
34
+ });
35
+ _defineProperty(this, "renderPc", function (value, record) {
36
+ return _this.renderCode(record || []);
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]) || []).join();
44
+ });
45
+ _defineProperty(this, "renderExport", function (value, record) {
46
+ var _this$getComponentVal;
47
+ return (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--";
48
+ });
49
+ _defineProperty(this, "editRender", function () {
50
+ return null;
51
+ });
52
+ _defineProperty(this, "filterConfig", function (item) {
53
+ return {
54
+ searchDefaultConditions: SYMBOL.like,
55
+ type: item.type,
56
+ id: _this.id,
57
+ name: "".concat(item.name, "-\u7269\u6D41\u5FEB\u7167"),
58
+ filterComponentType: "Input"
59
+ };
60
+ });
61
+ this.name = options.name;
62
+ this.id = options.id;
63
+ this.sortField = options.id;
64
+ this.formField = options.id;
65
+ this.type = options.type;
66
+ this.componentConfig = options.componentConfig;
67
+ this.align = "left";
68
+ this.width = 200;
69
+ this.isCombinationComponent = false;
70
+ this.canSort = false;
71
+ this.dataType = "string";
72
+ this.children = [];
73
+ });
74
+ export default TrajectorySnapshot;
@@ -1,19 +1,19 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
3
- import AlipayNick from './AlipayNick';
4
- import AlipayNo from './AlipayNo';
5
- import AlipayTime from './AlipayTime';
6
- import BuyerNick from './BuyerNick';
7
- import PaymentAmount from './PaymentAmount';
8
- import PaymentStatus from './PaymentStatus';
9
- import PaymentTid from './PaymentTid';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ import AlipayNick from "./AlipayNick";
4
+ import AlipayNo from "./AlipayNo";
5
+ import AlipayTime from "./AlipayTime";
6
+ import BuyerNick from "./BuyerNick";
7
+ import PaymentAmount from "./PaymentAmount";
8
+ import PaymentStatus from "./PaymentStatus";
9
+ import PaymentTid from "./PaymentTid";
10
10
  declare class Logistics implements ComponentInterface {
11
11
  name: string;
12
12
  id: string;
13
13
  sortField: string;
14
14
  type: string;
15
15
  rules: any[];
16
- componentConfig: ComponentInterface['componentConfig'];
16
+ componentConfig: ComponentInterface["componentConfig"];
17
17
  paymentTid: PaymentTid;
18
18
  paymentStatus: PaymentStatus;
19
19
  paymentAmount: PaymentAmount;
@@ -25,8 +25,8 @@ declare class Logistics implements ComponentInterface {
25
25
  formField: string;
26
26
  canSort: boolean;
27
27
  children: ComponentInterface[];
28
- dataType: ComponentInterface['dataType'];
29
- effects: ComponentInterface['effects'];
28
+ dataType: ComponentInterface["dataType"];
29
+ effects: ComponentInterface["effects"];
30
30
  constructor(options: PickOption);
31
31
  renderClient: (record: any, params: any) => React.JSX.Element;
32
32
  renderPc: () => null;
@@ -8,8 +8,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
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
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
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 { Payment as ApaasPayment } from '@kmkf-fe-packages/basic-components';
11
+ import React from "react";
12
+ import { Payment as ApaasPayment } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import AlipayNick from "./AlipayNick";
15
15
  import AlipayNo from "./AlipayNo";
@@ -97,38 +97,37 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
97
97
  this.isCombinationComponent = true;
98
98
  this.canSort = false;
99
99
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
100
- console.log();
101
100
  this.children = [this.alipayNick, this.alipayNo, this.buyerNick, this.paymentAmount, this.paymentStatus, this.paymentTid, this.payTime];
102
101
  this.rules = [{
103
102
  validator: function validator(_, value) {
104
103
  var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
105
104
  if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required && !(value !== null && value !== void 0 && value.enterprisePaymentRefundFee)) {
106
- return Promise.reject(new Error('请输入打款金额'));
105
+ return Promise.reject(new Error("请输入打款金额"));
107
106
  } else if (value !== null && value !== void 0 && value.enterprisePaymentRefundFee && !/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/.test(value === null || value === void 0 ? void 0 : value.enterprisePaymentRefundFee)) {
108
- return Promise.reject(new Error('打款金额最多2位小数'));
107
+ return Promise.reject(new Error("打款金额最多2位小数"));
109
108
  }
110
109
  if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
111
- return Promise.reject(new Error('请输入订单编号'));
110
+ return Promise.reject(new Error("请输入订单编号"));
112
111
  } else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
113
- return Promise.reject(new Error('请输入正确的订单编号'));
112
+ return Promise.reject(new Error("请输入正确的订单编号"));
114
113
  }
115
114
  if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick)) {
116
- return Promise.reject(new Error('请输入支付宝名称'));
115
+ return Promise.reject(new Error("请输入支付宝名称"));
117
116
  }
118
117
  if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
119
- return Promise.reject(new Error('请输入支付宝账号'));
118
+ return Promise.reject(new Error("请输入支付宝账号"));
120
119
  } else if (value.enterprisePaymentAlipayNo && !/^(?:1[3-9]\d{9}|[a-zA-Z\d._-]*\@[a-zA-Z\d.-]{1,10}\.[a-zA-Z\d]{1,20})$/.test(value.enterprisePaymentAlipayNo)) {
121
- return Promise.reject(new Error('请输入正确的支付宝账号格式'));
120
+ return Promise.reject(new Error("请输入正确的支付宝账号格式"));
122
121
  }
123
122
  //支付宝信息不能只填一个,否则不能打款
124
123
  if (value !== null && value !== void 0 && value.enterprisePaymentAlipayNick || value !== null && value !== void 0 && value.enterprisePaymentAlipayNo) {
125
124
  if (!(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick && value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
126
- return Promise.reject(new Error('支付宝姓名/账号都要填写'));
125
+ return Promise.reject(new Error("支付宝姓名/账号都要填写"));
127
126
  }
128
127
  }
129
128
  return Promise.resolve();
130
129
  }
131
130
  }];
132
- this.dataType = 'object';
131
+ this.dataType = "object";
133
132
  });
134
133
  export default Logistics;
@@ -30,7 +30,7 @@ declare class ETradeId implements ComponentInterface {
30
30
  name: string;
31
31
  filterComponentType: "Input";
32
32
  filterFn: (value: string) => (i: Record) => boolean;
33
- formatFilterValue: (input: string) => string[];
33
+ formatFilterValue: (input: string) => string | string[];
34
34
  };
35
35
  }
36
36
  export default ETradeId;
@@ -14,7 +14,7 @@ import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
15
  import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
16
  import copy from 'copy-to-clipboard';
17
- import { SYMBOL } from "../../constant";
17
+ import { SYMBOL, batchInput } from "../../constant";
18
18
  var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
19
19
  var _this = this;
20
20
  _classCallCheck(this, ETradeId);
@@ -109,7 +109,7 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
109
109
  };
110
110
  },
111
111
  formatFilterValue: function formatFilterValue(input) {
112
- return input.split(/[,|,|\s|\n|\rn]/);
112
+ return batchInput(input);
113
113
  }
114
114
  };
115
115
  });
@@ -12,3 +12,4 @@ export declare const SYMBOL: {
12
12
  non: string;
13
13
  notnull: string;
14
14
  };
15
+ export declare const batchInput: (val: string) => string | string[];
@@ -11,4 +11,12 @@ export var SYMBOL = {
11
11
  nin: 'nin',
12
12
  non: 'non',
13
13
  notnull: 'notnull'
14
+ };
15
+ export var batchInput = function batchInput(val) {
16
+ console.log('batchInput', val);
17
+ return val ? val.split(/[,|,|\s|\n|\rn]/).filter(function (t) {
18
+ return !!t;
19
+ }).map(function (t) {
20
+ return t.trim();
21
+ }) : val;
14
22
  };
@@ -1,3 +1,3 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } from "./index";
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BsReissue | BsSystemOrder | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | MsgStatus;
3
+ export declare const factory: (type: string, options: PickOption) => BsLogistics | BsReissue | BsSystemOrder | CommonMultiStatus | CommonSystemOrder | BasicInput | JstLogistics | JstSendGood | Logistics | LogisticsMoreTrajectory | Payment | TradeId | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | JstItemSelect | JstSupply | BsGoods | BsExchange | BsReturn | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | MsgStatus;
@@ -1,4 +1,4 @@
1
- import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
1
+ import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect,
2
2
  // CommonTradeId,
3
3
  CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } from "./index";
4
4
  export var factory = function factory(type, options) {
@@ -98,6 +98,8 @@ export var factory = function factory(type, options) {
98
98
  return new LogisticsInterception(options);
99
99
  case "LOGISTICS_TRAJECTORY":
100
100
  return new LogisticsTrajectory(options);
101
+ case "LOGISTICS_TRAJECTORY_MORE":
102
+ return new LogisticsMoreTrajectory(options);
101
103
  case "WORK_ORDER_ID_INPUT":
102
104
  return new WorkOrderId(options);
103
105
  case "FLOW_STATUS_SELECT":
@@ -50,6 +50,7 @@ export { default as TemplateSelect } from "./components/TemplateSelect";
50
50
  export { default as WorkOrderId } from "./components/WorkOrderId";
51
51
  export { default as LogisticsInterception } from "./components/LogisticsInterception";
52
52
  export { default as LogisticsTrajectory } from "./components/LogisticsTrajectory";
53
+ export { default as LogisticsMoreTrajectory } from "./components/LogisticsMoreTrajectory";
53
54
  export { default as PlatForm } from "./components/PlatForm";
54
55
  export { default as ShopInput } from "./components/ShopInput";
55
56
  export { default as Submitter } from "./components/Submitter";
@@ -68,7 +69,7 @@ export { default as HandlerDeadLine } from "./components/HandlerDeadLine";
68
69
  export { default as NodeStayDuration } from "./components/NodeStayDuration";
69
70
  export { default as WlnGoods } from "./components/WLN/WlnGoods";
70
71
  export { default as BsPosting } from "./components/BS/BsPosting";
71
- export { default as MsgStatus } from './components/MsgStatus';
72
+ export { default as MsgStatus } from "./components/MsgStatus";
72
73
  export { factory } from "./factory";
73
74
  export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
74
75
  export { default as SelectMark } from "./commonComponents/SelectMark";
package/dist/esm/index.js CHANGED
@@ -50,6 +50,7 @@ export { default as TemplateSelect } from "./components/TemplateSelect";
50
50
  export { default as WorkOrderId } from "./components/WorkOrderId";
51
51
  export { default as LogisticsInterception } from "./components/LogisticsInterception";
52
52
  export { default as LogisticsTrajectory } from "./components/LogisticsTrajectory";
53
+ export { default as LogisticsMoreTrajectory } from "./components/LogisticsMoreTrajectory";
53
54
  export { default as PlatForm } from "./components/PlatForm";
54
55
  export { default as ShopInput } from "./components/ShopInput";
55
56
  export { default as Submitter } from "./components/Submitter";
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { FormInstance } from 'antd';
3
- import { SYMBOL } from './constant';
4
- export declare type DataType = 'string' | 'number' | 'array' | 'dateArray' | 'date' | 'tradeId';
5
- export declare type ALignType = 'left' | 'right' | 'center';
2
+ import type { FormInstance } from "antd";
3
+ import { SYMBOL } from "./constant";
4
+ export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
5
+ export declare type ALignType = "left" | "right" | "center";
6
6
  export declare type QuerySymbol = keyof typeof SYMBOL;
7
7
  export declare type Record = {
8
8
  [props in string]: any;
@@ -27,7 +27,7 @@ export declare type FilterConfigType = {
27
27
  filterFn?: (p: any) => (r: Record) => unknown;
28
28
  formatFilterValue?: (p: any) => any;
29
29
  };
30
- export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList' | 'Rate';
30
+ export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate" | "SelectInput";
31
31
  export interface ComponentInterface {
32
32
  id: string;
33
33
  sortField: string;
@@ -77,7 +77,7 @@ export interface ComponentInterface {
77
77
  /**
78
78
  * @description 显示字段名称
79
79
  */
80
- showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all' | 'bs' | 'workOrder';
80
+ showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder";
81
81
  /**
82
82
  * @description 是否选择SKU
83
83
  */
@@ -97,7 +97,7 @@ export interface ComponentInterface {
97
97
  /**
98
98
  * @description 备注状态
99
99
  */
100
- associatedType?: 'APPEND';
100
+ associatedType?: "APPEND";
101
101
  isAssociated?: boolean;
102
102
  isShowFlag?: boolean;
103
103
  /**
@@ -138,7 +138,7 @@ export interface ComponentInterface {
138
138
  * @description 时间初始值
139
139
  */
140
140
  dateTime?: string;
141
- dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
141
+ dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
142
142
  maxSize?: number;
143
143
  basicGrade?: number;
144
144
  range?: number;
@@ -233,13 +233,13 @@ export interface ComponentInterface {
233
233
  getComponentValue: (r: Record) => any;
234
234
  formDataTransform?: (r: any) => any;
235
235
  }
236
- export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader' | 'templateId' | 'workOrderUniqueKey'>;
236
+ export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey">;
237
237
  export declare type ColumnConfig = {
238
238
  id: string;
239
239
  name: string;
240
240
  type: string;
241
241
  subKey?: string;
242
- mode?: 'multiple';
243
- config?: ComponentInterface['componentConfig'];
244
- templateConfig?: ComponentInterface['componentConfig'];
242
+ mode?: "multiple";
243
+ config?: ComponentInterface["componentConfig"];
244
+ templateConfig?: ComponentInterface["componentConfig"];
245
245
  };