@kmkf-fe-packages/services-components 0.23.1-alpha.0 → 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.
- package/dist/esm/components/BS/BsLogistics/index.js +11 -4
- package/dist/esm/components/BS/BsReissue/index.d.ts +7 -8
- package/dist/esm/components/BS/BsReissue/index.js +55 -32
- package/dist/esm/components/BS/BsSystemOrder/index.d.ts +7 -6
- package/dist/esm/components/BS/BsSystemOrder/index.js +22 -19
- package/dist/esm/components/BS/DeliveryNo/index.d.ts +6 -5
- package/dist/esm/components/BS/DeliveryNo/index.js +15 -12
- package/dist/esm/components/BS/common/expressCode.js +3 -0
- package/dist/esm/components/BS/common/expressCompany.js +3 -0
- package/dist/esm/components/CommonMultiStatus/index.d.ts +6 -5
- package/dist/esm/components/CommonMultiStatus/index.js +58 -51
- package/dist/esm/components/CommonSystemOrder/index.d.ts +6 -5
- package/dist/esm/components/CommonSystemOrder/index.js +29 -26
- package/dist/esm/components/Input/index.d.ts +7 -6
- package/dist/esm/components/Input/index.js +37 -26
- package/dist/esm/components/JST/JstLogistics/index.d.ts +11 -0
- package/dist/esm/components/JST/JstLogistics/index.js +21 -7
- package/dist/esm/components/JST/JstSendGood/index.js +6 -0
- package/dist/esm/components/Logistics/index.d.ts +6 -6
- package/dist/esm/components/Logistics/index.js +16 -15
- package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +48 -0
- package/dist/esm/components/LogisticsMoreTrajectory/index.js +119 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.d.ts +34 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.js +98 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.d.ts +40 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.js +95 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.d.ts +32 -0
- package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.js +74 -0
- package/dist/esm/components/Payment/index.d.ts +12 -12
- package/dist/esm/components/Payment/index.js +11 -12
- package/dist/esm/components/TradeId/index.d.ts +1 -1
- package/dist/esm/components/TradeId/index.js +2 -2
- package/dist/esm/constant.d.ts +1 -0
- package/dist/esm/constant.js +8 -0
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +7 -3
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/type.d.ts +12 -12
- package/package.json +4 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
import { ExpressData } from
|
|
4
|
-
import Express from
|
|
5
|
-
import ExpressCode from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
|
+
import Express from "../Express";
|
|
5
|
+
import ExpressCode from "../ExpressCode";
|
|
6
6
|
declare class Logistics implements ComponentInterface {
|
|
7
7
|
name: string;
|
|
8
8
|
id: string;
|
|
@@ -17,7 +17,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
17
17
|
formField: string;
|
|
18
18
|
canSort: boolean;
|
|
19
19
|
children: ComponentInterface[];
|
|
20
|
-
dataType: ComponentInterface[
|
|
20
|
+
dataType: ComponentInterface["dataType"];
|
|
21
21
|
constructor(options: PickOption);
|
|
22
22
|
editRender: (p: any) => React.JSX.Element;
|
|
23
23
|
renderClient: (record: Record) => React.JSX.Element;
|
|
@@ -8,9 +8,9 @@ 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
|
|
12
|
-
import { ExpressData } from
|
|
13
|
-
import { ExpressLogistics } from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import { ExpressLogistics } from "@kmkf-fe-packages/basic-components";
|
|
14
14
|
import Express from "../Express";
|
|
15
15
|
import ExpressCode from "../ExpressCode";
|
|
16
16
|
import GetFormItem from "../GetFormItem";
|
|
@@ -42,7 +42,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
42
42
|
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,
|
|
43
43
|
component: /*#__PURE__*/React.createElement(ExpressLogistics, _extends({}, _this.componentConfig, {
|
|
44
44
|
options: _this.expressDateInstance.getExpressData(),
|
|
45
|
-
onBlur: p === null || p === void 0 ? void 0 : p.onBlur
|
|
45
|
+
onBlur: p === null || p === void 0 ? void 0 : p.onBlur,
|
|
46
|
+
onChange: p === null || p === void 0 ? void 0 : p.onChange
|
|
46
47
|
}))
|
|
47
48
|
});
|
|
48
49
|
});
|
|
@@ -66,9 +67,9 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
66
67
|
});
|
|
67
68
|
_defineProperty(this, "filterConfig", function (item) {
|
|
68
69
|
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
69
|
-
subKey:
|
|
70
|
+
subKey: "expressLogisticsCompany"
|
|
70
71
|
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
71
|
-
subKey:
|
|
72
|
+
subKey: "expressLogisticsCode"
|
|
72
73
|
}))];
|
|
73
74
|
});
|
|
74
75
|
this.name = options.name;
|
|
@@ -79,33 +80,33 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
79
80
|
this.componentConfig = options.componentConfig;
|
|
80
81
|
this.expressDateInstance = ExpressData.getInstance();
|
|
81
82
|
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
82
|
-
name:
|
|
83
|
+
name: "快递物流公司",
|
|
83
84
|
id: "".concat(this.id, "_expressLogisticsCompany")
|
|
84
85
|
}));
|
|
85
86
|
this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
86
|
-
name:
|
|
87
|
+
name: "快递物流单号",
|
|
87
88
|
id: "".concat(this.id, "_expressLogisticsCode")
|
|
88
89
|
}));
|
|
89
90
|
this.isCombinationComponent = true;
|
|
90
91
|
this.canSort = false;
|
|
91
|
-
this.dataType =
|
|
92
|
+
this.dataType = "object";
|
|
92
93
|
this.children = [this.express, this.expressCode];
|
|
93
94
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
94
95
|
validator: function validator(_, value) {
|
|
95
96
|
var _this$componentConfig4;
|
|
96
97
|
if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.isSingle) {
|
|
97
98
|
var _this$componentConfig5, _this$componentConfig6;
|
|
98
|
-
if (((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) ===
|
|
99
|
-
return Promise.reject(new Error(
|
|
100
|
-
} else if (((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.showField) ===
|
|
101
|
-
return Promise.reject(new Error(
|
|
99
|
+
if (((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.showField) === "EXPRESS_COMPANY" && !(value !== null && value !== void 0 && value.company)) {
|
|
100
|
+
return Promise.reject(new Error("请选择物流公司"));
|
|
101
|
+
} else if (((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.showField) === "EXPRESS_WAYBILL_CODE" && !(value !== null && value !== void 0 && value.order)) {
|
|
102
|
+
return Promise.reject(new Error("请输入物流单号"));
|
|
102
103
|
}
|
|
103
104
|
} else {
|
|
104
105
|
if (!(value !== null && value !== void 0 && value.company)) {
|
|
105
|
-
return Promise.reject(new Error(
|
|
106
|
+
return Promise.reject(new Error("请选择物流公司"));
|
|
106
107
|
}
|
|
107
108
|
if (!(value !== null && value !== void 0 && value.order)) {
|
|
108
|
-
return Promise.reject(new Error(
|
|
109
|
+
return Promise.reject(new Error("请输入物流单号"));
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
return Promise.resolve();
|
|
@@ -0,0 +1,48 @@
|
|
|
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 LogisticsMoreTrajectory 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 | null;
|
|
26
|
+
renderPc: () => null;
|
|
27
|
+
renderLog: (r: Record) => any;
|
|
28
|
+
getComponentValue: (r: Record) => any;
|
|
29
|
+
renderExport: () => null;
|
|
30
|
+
filterConfig: (item: ColumnConfig) => ({
|
|
31
|
+
searchDefaultConditions: "in";
|
|
32
|
+
type: string;
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
filterComponentType: "MultipleSelect";
|
|
36
|
+
props: {
|
|
37
|
+
options: any[];
|
|
38
|
+
};
|
|
39
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
40
|
+
} | {
|
|
41
|
+
searchDefaultConditions: "like";
|
|
42
|
+
type: string;
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
filterComponentType: "Input";
|
|
46
|
+
})[];
|
|
47
|
+
}
|
|
48
|
+
export default LogisticsMoreTrajectory;
|
|
@@ -0,0 +1,119 @@
|
|
|
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 _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); } }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
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; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
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); }
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { ExpressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
|
+
import { LogisticsMoreTrajectory as MoreTrajectory } from "@kmkf-fe-packages/basic-components";
|
|
13
|
+
import TrajectoryCompany from "./trajectoryCompany";
|
|
14
|
+
import TrajectoryCode from "./trajectoryCode";
|
|
15
|
+
import TrajectorySnapshot from "./trajectorySnapshot";
|
|
16
|
+
import GetFormItem from "../GetFormItem";
|
|
17
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
18
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
19
|
+
var LogisticsMoreTrajectory = /*#__PURE__*/_createClass(function LogisticsMoreTrajectory(options) {
|
|
20
|
+
var _this = this,
|
|
21
|
+
_this$componentConfig3;
|
|
22
|
+
_classCallCheck(this, LogisticsMoreTrajectory);
|
|
23
|
+
_defineProperty(this, "name", void 0);
|
|
24
|
+
_defineProperty(this, "id", void 0);
|
|
25
|
+
_defineProperty(this, "sortField", void 0);
|
|
26
|
+
_defineProperty(this, "type", void 0);
|
|
27
|
+
_defineProperty(this, "rules", void 0);
|
|
28
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
29
|
+
_defineProperty(this, "expressDateInstance", void 0);
|
|
30
|
+
_defineProperty(this, "express", void 0);
|
|
31
|
+
_defineProperty(this, "expressCode", void 0);
|
|
32
|
+
_defineProperty(this, "expressSnapshot", void 0);
|
|
33
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
34
|
+
_defineProperty(this, "formField", void 0);
|
|
35
|
+
_defineProperty(this, "canSort", void 0);
|
|
36
|
+
_defineProperty(this, "children", void 0);
|
|
37
|
+
_defineProperty(this, "dataType", void 0);
|
|
38
|
+
_defineProperty(this, "editRender", function (p) {
|
|
39
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
40
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
41
|
+
title: _this.name,
|
|
42
|
+
name: _this.id,
|
|
43
|
+
rules: _this.rules,
|
|
44
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
45
|
+
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,
|
|
46
|
+
component: /*#__PURE__*/React.createElement(MoreTrajectory, _this.componentConfig)
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
50
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
51
|
+
id: _this.id,
|
|
52
|
+
label: _this.name,
|
|
53
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id].map(function (item, index) {
|
|
54
|
+
return /*#__PURE__*/React.createElement("div", null, (record === null || record === void 0 ? void 0 : record[_this.id].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot);
|
|
55
|
+
})
|
|
56
|
+
}) : null;
|
|
57
|
+
});
|
|
58
|
+
_defineProperty(this, "renderPc", function () {
|
|
59
|
+
return null;
|
|
60
|
+
});
|
|
61
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
62
|
+
return !isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")]) ? r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")].map(function (item, index) {
|
|
63
|
+
return /*#__PURE__*/React.createElement("div", null, (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")].length) > 1 ? "\u5305\u88F9".concat(index + 1, ":") : "", _this.expressDateInstance.getExpressNameByCode(item.trajectoryCompany) || item.trajectoryCompany, "/", item.trajectoryCode, "/", item.trajectorySnapshot);
|
|
64
|
+
}) : null;
|
|
65
|
+
});
|
|
66
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
67
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_trajectoryList")];
|
|
68
|
+
});
|
|
69
|
+
_defineProperty(this, "renderExport", function () {
|
|
70
|
+
return null;
|
|
71
|
+
});
|
|
72
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
73
|
+
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
74
|
+
subKey: "trajectoryMoreCompany"
|
|
75
|
+
})), _this.expressCode.filterConfig(item), _this.expressSnapshot.filterConfig(item)];
|
|
76
|
+
});
|
|
77
|
+
this.name = options.name;
|
|
78
|
+
this.id = options.id;
|
|
79
|
+
this.sortField = "".concat(options.id, "_trajectoryList");
|
|
80
|
+
this.formField = "".concat(options.id, "_trajectoryList");
|
|
81
|
+
this.type = options.type;
|
|
82
|
+
this.componentConfig = options.componentConfig;
|
|
83
|
+
this.expressDateInstance = ExpressData.getInstance();
|
|
84
|
+
this.express = new TrajectoryCompany(_objectSpread(_objectSpread({}, options), {}, {
|
|
85
|
+
name: "".concat(this.name, "-\u516C\u53F8"),
|
|
86
|
+
id: "".concat(this.id, "_trajectoryMoreCompany")
|
|
87
|
+
}));
|
|
88
|
+
this.expressCode = new TrajectoryCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
89
|
+
name: "".concat(this.name, "-\u5355\u53F7"),
|
|
90
|
+
id: "".concat(this.id, "_trajectoryMoreCode")
|
|
91
|
+
}));
|
|
92
|
+
this.expressSnapshot = new TrajectorySnapshot(_objectSpread(_objectSpread({}, options), {}, {
|
|
93
|
+
name: "".concat(this.name, "-\u5FEB\u7167"),
|
|
94
|
+
id: "".concat(this.id, "_trajectoryMoreSnapshot")
|
|
95
|
+
}));
|
|
96
|
+
this.isCombinationComponent = true;
|
|
97
|
+
this.canSort = false;
|
|
98
|
+
this.dataType = "object";
|
|
99
|
+
this.children = [this.express, this.expressCode, this.expressSnapshot];
|
|
100
|
+
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
101
|
+
required: true,
|
|
102
|
+
validator: function validator(_, value) {
|
|
103
|
+
var hasNoCompany = value.some(function (item) {
|
|
104
|
+
return !item.trajectoryCompany;
|
|
105
|
+
});
|
|
106
|
+
var hasNoCode = value.some(function (item) {
|
|
107
|
+
return !item.trajectoryCode;
|
|
108
|
+
});
|
|
109
|
+
if (!hasNoCompany) {
|
|
110
|
+
return Promise.reject(new Error("请选择物流公司"));
|
|
111
|
+
}
|
|
112
|
+
if (!hasNoCode) {
|
|
113
|
+
return Promise.reject(new Error("请输入物流单号"));
|
|
114
|
+
}
|
|
115
|
+
return Promise.resolve();
|
|
116
|
+
}
|
|
117
|
+
}] : [];
|
|
118
|
+
});
|
|
119
|
+
export default LogisticsMoreTrajectory;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class TrajectoryCode implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
parentId: 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: () => 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
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export default TrajectoryCode;
|
|
@@ -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;
|