@kmkf-fe-packages/services-components 0.23.1-beta.1 → 0.23.1-beta.4
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 +5 -4
- 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/BsMemo.d.ts +4 -4
- package/dist/esm/components/BS/common/BsMemo.js +16 -15
- package/dist/esm/components/BS/common/BsType.d.ts +4 -4
- package/dist/esm/components/BS/common/BsType.js +14 -13
- package/dist/esm/components/Common/index.d.ts +2 -1
- package/dist/esm/components/Common/index.js +168 -68
- 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/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/components/WDT/WdtGoods/index.d.ts +33 -0
- package/dist/esm/components/WDT/WdtGoods/index.js +121 -0
- 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 +13 -8
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/type.d.ts +12 -12
- 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
|
|
2
|
-
import React from
|
|
3
|
-
import AlipayNick from
|
|
4
|
-
import AlipayNo from
|
|
5
|
-
import AlipayTime from
|
|
6
|
-
import BuyerNick from
|
|
7
|
-
import PaymentAmount from
|
|
8
|
-
import PaymentStatus from
|
|
9
|
-
import PaymentTid from
|
|
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[
|
|
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[
|
|
29
|
-
effects: ComponentInterface[
|
|
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
|
|
12
|
-
import { Payment as ApaasPayment } from
|
|
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(
|
|
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 =
|
|
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
|
|
112
|
+
return batchInput(input);
|
|
113
113
|
}
|
|
114
114
|
};
|
|
115
115
|
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BsHeaderGood } from "../../BS/common/index";
|
|
4
|
+
declare class WdtGoods implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
isCombinationComponent: boolean;
|
|
13
|
+
formField: string;
|
|
14
|
+
canSort: boolean;
|
|
15
|
+
children: ComponentInterface[];
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
|
+
wdtGoods: BsHeaderGood;
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
20
|
+
renderPc: () => null;
|
|
21
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
22
|
+
getComponentValue: (r: Record) => any;
|
|
23
|
+
renderExport: () => null;
|
|
24
|
+
editRender: (p: any) => React.JSX.Element;
|
|
25
|
+
filterConfig: (item: ColumnConfig) => {
|
|
26
|
+
searchDefaultConditions: "like";
|
|
27
|
+
type: string;
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
filterComponentType: "Input";
|
|
31
|
+
}[];
|
|
32
|
+
}
|
|
33
|
+
export default WdtGoods;
|
|
@@ -0,0 +1,121 @@
|
|
|
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 GetFormItem from "../../GetFormItem";
|
|
13
|
+
import { BsGoodsTable } from "../../Common";
|
|
14
|
+
import { BsHeaderGood } from "../../BS/common/index";
|
|
15
|
+
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
|
|
18
|
+
import { SYMBOL } from "../../../constant";
|
|
19
|
+
var WdtGoods = /*#__PURE__*/_createClass(function WdtGoods(options) {
|
|
20
|
+
var _this = this,
|
|
21
|
+
_this$componentConfig4;
|
|
22
|
+
_classCallCheck(this, WdtGoods);
|
|
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, "effects", void 0);
|
|
30
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
31
|
+
_defineProperty(this, "formField", void 0);
|
|
32
|
+
_defineProperty(this, "canSort", void 0);
|
|
33
|
+
_defineProperty(this, "children", void 0);
|
|
34
|
+
_defineProperty(this, "dataType", void 0);
|
|
35
|
+
_defineProperty(this, "wdtGoods", void 0);
|
|
36
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
37
|
+
var _record, _this$componentConfig;
|
|
38
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ItemView, {
|
|
39
|
+
id: _this.id,
|
|
40
|
+
label: _this.name,
|
|
41
|
+
value: /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
42
|
+
type: _this.type,
|
|
43
|
+
list: (record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id)]) === null || _record === void 0 ? void 0 : _record.wdtGoods) || [],
|
|
44
|
+
showHeader: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.showHeader) || []
|
|
45
|
+
})
|
|
46
|
+
})) : null;
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "renderPc", function () {
|
|
49
|
+
return null;
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
52
|
+
var _this$componentConfig2;
|
|
53
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtGoods")])) return null;
|
|
54
|
+
return /*#__PURE__*/React.createElement(BsGoodsTable, {
|
|
55
|
+
type: _this.type,
|
|
56
|
+
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtGoods")]) || [],
|
|
57
|
+
showHeader: ((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.showHeader) || []
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
61
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_wdtGoods")];
|
|
62
|
+
});
|
|
63
|
+
_defineProperty(this, "renderExport", function () {
|
|
64
|
+
return null;
|
|
65
|
+
});
|
|
66
|
+
_defineProperty(this, "editRender", function (p) {
|
|
67
|
+
var _this$componentConfig3, _this$effects, _this$effects2, _this$effects3;
|
|
68
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
69
|
+
title: _this.name,
|
|
70
|
+
name: _this.id,
|
|
71
|
+
rules: _this.rules,
|
|
72
|
+
required: false,
|
|
73
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
74
|
+
component: /*#__PURE__*/React.createElement(Goods, _extends({}, _this.componentConfig, {
|
|
75
|
+
maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
|
|
76
|
+
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
77
|
+
shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
|
|
78
|
+
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
79
|
+
type: _this.type,
|
|
80
|
+
width: "90%"
|
|
81
|
+
}))
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
85
|
+
return [{
|
|
86
|
+
searchDefaultConditions: SYMBOL.like,
|
|
87
|
+
type: item.type,
|
|
88
|
+
id: "".concat(item.id, "_wdtGoods"),
|
|
89
|
+
// 过滤组件id
|
|
90
|
+
name: item.name,
|
|
91
|
+
// 过滤组件名称
|
|
92
|
+
filterComponentType: "Input"
|
|
93
|
+
}];
|
|
94
|
+
});
|
|
95
|
+
this.name = options.name;
|
|
96
|
+
this.id = options.id;
|
|
97
|
+
this.sortField = "".concat(options.id, "_wdtGoods");
|
|
98
|
+
this.formField = "".concat(options.id, "_wdtGoods");
|
|
99
|
+
this.type = options.type;
|
|
100
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
101
|
+
this.isCombinationComponent = true;
|
|
102
|
+
this.canSort = false;
|
|
103
|
+
this.wdtGoods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
|
104
|
+
id: "".concat(options.id, "_wdtGoods"),
|
|
105
|
+
name: "商品信息"
|
|
106
|
+
}));
|
|
107
|
+
this.children = [this.wdtGoods];
|
|
108
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
109
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig4 = this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required ? [{
|
|
110
|
+
required: true,
|
|
111
|
+
validator: function validator(_, value) {
|
|
112
|
+
var _value$wdtGoods;
|
|
113
|
+
if (!value || !(value !== null && value !== void 0 && (_value$wdtGoods = value.wdtGoods) !== null && _value$wdtGoods !== void 0 && _value$wdtGoods.length)) {
|
|
114
|
+
return Promise.reject(new Error("请选择旺店通商品"));
|
|
115
|
+
}
|
|
116
|
+
return Promise.resolve();
|
|
117
|
+
}
|
|
118
|
+
}] : [];
|
|
119
|
+
this.dataType = "object";
|
|
120
|
+
});
|
|
121
|
+
export default WdtGoods;
|
package/dist/esm/constant.d.ts
CHANGED