@kmkf-fe-packages/services-components 0.8.17-alpha.8 → 0.8.17
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/README.md +3 -3
- package/dist/esm/components/BS/BsReturn/index.d.ts +54 -0
- package/dist/esm/components/BS/BsReturn/index.js +150 -0
- package/dist/esm/components/BS/DeliveryNo/index.d.ts +32 -0
- package/dist/esm/components/BS/DeliveryNo/index.js +137 -0
- package/dist/esm/components/BS/common/BsHeaderGood.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderGood.js +43 -36
- package/dist/esm/components/BS/common/BsMemo.d.ts +4 -4
- package/dist/esm/components/BS/common/BsMemo.js +15 -14
- package/dist/esm/components/BS/common/BsType.d.ts +4 -4
- package/dist/esm/components/BS/common/BsType.js +13 -12
- package/dist/esm/components/Calculation/index.d.ts +31 -0
- package/dist/esm/components/Calculation/index.js +97 -0
- package/dist/esm/components/Common/index.d.ts +1 -0
- package/dist/esm/components/Common/index.js +73 -29
- package/dist/esm/components/CommonMultiStatus/index.d.ts +32 -0
- package/dist/esm/components/CommonMultiStatus/index.js +163 -0
- package/dist/esm/components/CommonSystemOrder/index.d.ts +32 -0
- package/dist/esm/components/CommonSystemOrder/index.js +152 -0
- package/dist/esm/components/CommonTradeId/index.js +1 -4
- package/dist/esm/components/GetFormItem/index.d.ts +4 -2
- package/dist/esm/components/GetFormItem/index.js +10 -3
- package/dist/esm/components/HandlerDeadLine/index.d.ts +43 -0
- package/dist/esm/components/HandlerDeadLine/index.js +85 -0
- package/dist/esm/components/HandlerDeadLine/index.less +3 -0
- package/dist/esm/components/NodeDeadLine/index.d.ts +43 -0
- package/dist/esm/components/NodeDeadLine/index.js +85 -0
- package/dist/esm/components/NodeDeadLine/index.less +3 -0
- package/dist/esm/components/NodeStayDuration/index.d.ts +26 -0
- package/dist/esm/components/NodeStayDuration/index.js +61 -0
- package/dist/esm/components/NodeStayDuration/index.less +3 -0
- package/dist/esm/components/ShopInput/index.d.ts +1 -0
- package/dist/esm/components/ShopInput/index.js +2 -0
- package/dist/esm/components/StatusSelect/index.js +6 -6
- package/dist/esm/components/TextArea/index.d.ts +3 -3
- package/dist/esm/components/TextArea/index.js +9 -9
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +17 -3
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/type.d.ts +2 -1
- package/package.json +4 -4
|
@@ -11,12 +11,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import React from
|
|
14
|
+
import React from "react";
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
var componentType = {
|
|
18
|
-
BS_EXCHANGE_GOODS:
|
|
19
|
-
BS_REISSUE_GOODS:
|
|
18
|
+
BS_EXCHANGE_GOODS: "bsExchangeType",
|
|
19
|
+
BS_REISSUE_GOODS: "bsReissueType",
|
|
20
|
+
BS_RETURN_GOODS: "bsReturnType"
|
|
20
21
|
};
|
|
21
22
|
var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
22
23
|
var _this = this;
|
|
@@ -34,7 +35,7 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
34
35
|
_defineProperty(this, "children", void 0);
|
|
35
36
|
_defineProperty(this, "dataType", void 0);
|
|
36
37
|
_defineProperty(this, "getParentId", function () {
|
|
37
|
-
var _this$id$split = _this.id.split(
|
|
38
|
+
var _this$id$split = _this.id.split("_"),
|
|
38
39
|
_this$id$split2 = _slicedToArray(_this$id$split, 2),
|
|
39
40
|
key = _this$id$split2[0],
|
|
40
41
|
name = _this$id$split2[1];
|
|
@@ -42,14 +43,14 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
42
43
|
});
|
|
43
44
|
_defineProperty(this, "renderClient", function (r) {
|
|
44
45
|
var _r$key$componentType$, _r$key, _r$key$componentType$2, _r$key2, _r$key2$componentType, _find, _this$componentConfig, _find2;
|
|
45
|
-
var _this$getParentId$spl = _this.getParentId().split(
|
|
46
|
+
var _this$getParentId$spl = _this.getParentId().split("_"),
|
|
46
47
|
_this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
|
|
47
48
|
key = _this$getParentId$spl2[0];
|
|
48
49
|
if (!(r !== null && r !== void 0 && (_r$key$componentType$ = r[key][componentType[_this.type]]) !== null && _r$key$componentType$ !== void 0 && _r$key$componentType$.length)) {
|
|
49
50
|
return null;
|
|
50
51
|
}
|
|
51
|
-
var type = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : (_r$key$componentType$2 = _r$key[componentType[_this.type]]) === null || _r$key$componentType$2 === void 0 ? void 0 : _r$key$componentType$2[0] :
|
|
52
|
-
var memo = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key2 = r[key]) === null || _r$key2 === void 0 ? void 0 : (_r$key2$componentType = _r$key2[componentType[_this.type]]) === null || _r$key2$componentType === void 0 ? void 0 : _r$key2$componentType[1] :
|
|
52
|
+
var type = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : (_r$key$componentType$2 = _r$key[componentType[_this.type]]) === null || _r$key$componentType$2 === void 0 ? void 0 : _r$key$componentType$2[0] : "";
|
|
53
|
+
var memo = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key2 = r[key]) === null || _r$key2 === void 0 ? void 0 : (_r$key2$componentType = _r$key2[componentType[_this.type]]) === null || _r$key2$componentType === void 0 ? void 0 : _r$key2$componentType[1] : "";
|
|
53
54
|
var children = (_find = (((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.reasonList) || []).find(function (item) {
|
|
54
55
|
return item.value === type;
|
|
55
56
|
})) === null || _find === void 0 ? void 0 : _find.children;
|
|
@@ -64,7 +65,7 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
64
65
|
});
|
|
65
66
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
66
67
|
var _this$getComponentVal;
|
|
67
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
68
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
68
69
|
});
|
|
69
70
|
_defineProperty(this, "renderLog", function (r) {
|
|
70
71
|
var id = _this.getParentId();
|
|
@@ -74,8 +75,8 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
74
75
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
75
76
|
var _r$id, _r$id2, _find3, _this$componentConfig2, _find4;
|
|
76
77
|
var id = _this.getParentId();
|
|
77
|
-
var type = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id[0] :
|
|
78
|
-
var memo = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id2 = r[id]) === null || _r$id2 === void 0 ? void 0 : _r$id2[1] :
|
|
78
|
+
var type = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id[0] : "";
|
|
79
|
+
var memo = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id2 = r[id]) === null || _r$id2 === void 0 ? void 0 : _r$id2[1] : "";
|
|
79
80
|
var children = (_find3 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
|
|
80
81
|
return item.value === type;
|
|
81
82
|
})) === null || _find3 === void 0 ? void 0 : _find3.children;
|
|
@@ -86,7 +87,7 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
86
87
|
});
|
|
87
88
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
88
89
|
var _this$getComponentVal2;
|
|
89
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
90
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
90
91
|
});
|
|
91
92
|
_defineProperty(this, "editRender", function () {
|
|
92
93
|
return null;
|
|
@@ -100,11 +101,11 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
100
101
|
this.formField = options.id;
|
|
101
102
|
this.type = options.type;
|
|
102
103
|
this.componentConfig = options.componentConfig;
|
|
103
|
-
this.align =
|
|
104
|
+
this.align = "left";
|
|
104
105
|
this.width = 140;
|
|
105
106
|
this.isCombinationComponent = false;
|
|
106
107
|
this.canSort = false;
|
|
107
|
-
this.dataType =
|
|
108
|
+
this.dataType = "string";
|
|
108
109
|
this.children = [];
|
|
109
110
|
});
|
|
110
111
|
export default BsMemo;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class BsType implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
getParentId: () => string;
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -11,13 +11,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import React from
|
|
14
|
+
import React from "react";
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull, filterFn as _filterFn } from
|
|
16
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
17
|
import { SYMBOL } from "../../../constant";
|
|
18
18
|
var componentType = {
|
|
19
|
-
BS_EXCHANGE_GOODS:
|
|
20
|
-
BS_REISSUE_GOODS:
|
|
19
|
+
BS_EXCHANGE_GOODS: "bsExchangeType",
|
|
20
|
+
BS_REISSUE_GOODS: "bsReissueType",
|
|
21
|
+
BS_RETURN_GOODS: "bsReturnType"
|
|
21
22
|
};
|
|
22
23
|
var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
23
24
|
var _this = this;
|
|
@@ -35,7 +36,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
35
36
|
_defineProperty(this, "children", void 0);
|
|
36
37
|
_defineProperty(this, "dataType", void 0);
|
|
37
38
|
_defineProperty(this, "getParentId", function () {
|
|
38
|
-
var _this$id$split = _this.id.split(
|
|
39
|
+
var _this$id$split = _this.id.split("_"),
|
|
39
40
|
_this$id$split2 = _slicedToArray(_this$id$split, 2),
|
|
40
41
|
key = _this$id$split2[0],
|
|
41
42
|
name = _this$id$split2[1];
|
|
@@ -43,7 +44,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
43
44
|
});
|
|
44
45
|
_defineProperty(this, "renderClient", function (record) {
|
|
45
46
|
var _record$key$component, _find, _this$componentConfig;
|
|
46
|
-
var _this$getParentId$spl = _this.getParentId().split(
|
|
47
|
+
var _this$getParentId$spl = _this.getParentId().split("_"),
|
|
47
48
|
_this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
|
|
48
49
|
key = _this$getParentId$spl2[0];
|
|
49
50
|
if (!(record !== null && record !== void 0 && (_record$key$component = record[key][componentType[_this.type]]) !== null && _record$key$component !== void 0 && _record$key$component.length)) {
|
|
@@ -61,7 +62,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
61
62
|
});
|
|
62
63
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
63
64
|
var _this$getComponentVal;
|
|
64
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
65
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
|
|
65
66
|
});
|
|
66
67
|
_defineProperty(this, "renderLog", function (r) {
|
|
67
68
|
var id = _this.getParentId();
|
|
@@ -71,7 +72,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
71
72
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
72
73
|
var _r$id, _find2, _this$componentConfig2;
|
|
73
74
|
var id = _this.getParentId();
|
|
74
|
-
var type = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id[0] :
|
|
75
|
+
var type = r !== null && r !== void 0 && r[id] ? r === null || r === void 0 ? void 0 : (_r$id = r[id]) === null || _r$id === void 0 ? void 0 : _r$id[0] : "";
|
|
75
76
|
var text = (_find2 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
|
|
76
77
|
return item.value === type;
|
|
77
78
|
})) === null || _find2 === void 0 ? void 0 : _find2.label;
|
|
@@ -79,7 +80,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
79
80
|
});
|
|
80
81
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
81
82
|
var _this$getComponentVal2;
|
|
82
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
83
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
|
|
83
84
|
});
|
|
84
85
|
_defineProperty(this, "editRender", function () {
|
|
85
86
|
return null;
|
|
@@ -93,7 +94,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
93
94
|
type: item.type,
|
|
94
95
|
id: _this.id,
|
|
95
96
|
name: "".concat(item.name, "-\u7C7B\u578B"),
|
|
96
|
-
filterComponentType:
|
|
97
|
+
filterComponentType: "Cascader",
|
|
97
98
|
props: {
|
|
98
99
|
options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList) || []
|
|
99
100
|
},
|
|
@@ -115,11 +116,11 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
115
116
|
this.formField = options.id;
|
|
116
117
|
this.type = options.type;
|
|
117
118
|
this.componentConfig = options.componentConfig;
|
|
118
|
-
this.align =
|
|
119
|
+
this.align = "left";
|
|
119
120
|
this.width = 140;
|
|
120
121
|
this.isCombinationComponent = false;
|
|
121
122
|
this.canSort = false;
|
|
122
|
-
this.dataType =
|
|
123
|
+
this.dataType = "string";
|
|
123
124
|
this.children = [];
|
|
124
125
|
});
|
|
125
126
|
export default BsType;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class Calculation implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
isCombinationComponent: boolean;
|
|
11
|
+
formField: string;
|
|
12
|
+
canSort: boolean;
|
|
13
|
+
children: ComponentInterface[];
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
constructor(options: PickOption);
|
|
16
|
+
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
17
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
18
|
+
getComponentValue: (r: Record) => any;
|
|
19
|
+
renderExport: (value: any, record: Record) => any;
|
|
20
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
21
|
+
editRender: (p: any) => React.JSX.Element;
|
|
22
|
+
filterConfig: (item: ColumnConfig) => {
|
|
23
|
+
searchDefaultConditions: "like";
|
|
24
|
+
type: string;
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
filterComponentType: "Input";
|
|
28
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export default Calculation;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { CalculationInput } from "@kmkf-fe-packages/basic-components";
|
|
11
|
+
import GetFormItem from "../GetFormItem";
|
|
12
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
|
+
import { SYMBOL } from "../../constant";
|
|
15
|
+
var Calculation = /*#__PURE__*/_createClass(function Calculation(options) {
|
|
16
|
+
var _this = this;
|
|
17
|
+
_classCallCheck(this, Calculation);
|
|
18
|
+
_defineProperty(this, "name", void 0);
|
|
19
|
+
_defineProperty(this, "id", void 0);
|
|
20
|
+
_defineProperty(this, "sortField", void 0);
|
|
21
|
+
_defineProperty(this, "type", void 0);
|
|
22
|
+
_defineProperty(this, "rules", void 0);
|
|
23
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
24
|
+
_defineProperty(this, "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, "renderPc", function (value, record) {
|
|
30
|
+
var _record;
|
|
31
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_numericalCalculation")]) !== null && _record !== void 0 ? _record : "--");
|
|
32
|
+
});
|
|
33
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
34
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_numericalCalculation")])) return null;
|
|
35
|
+
return _this.renderPc(undefined, r);
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
38
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_numericalCalculation")];
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
41
|
+
var _record2;
|
|
42
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_numericalCalculation")]) !== null && _record2 !== void 0 ? _record2 : "--";
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
45
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
|
|
46
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
47
|
+
id: _this.id,
|
|
48
|
+
label: _this.name,
|
|
49
|
+
value: "".concat(record === null || record === void 0 ? void 0 : record[_this.id], " ").concat((_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : (_this$componentConfig3 = _this$componentConfig2.config) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.unit) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : '')
|
|
50
|
+
}) : null;
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "editRender", function (p) {
|
|
53
|
+
var _this$componentConfig4, _this$componentConfig5;
|
|
54
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
55
|
+
title: _this.name,
|
|
56
|
+
name: _this.id,
|
|
57
|
+
rules: _this.rules,
|
|
58
|
+
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
59
|
+
required: false,
|
|
60
|
+
style: {
|
|
61
|
+
display: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && (_this$componentConfig5 = _this$componentConfig4.config) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.display ? 'unset' : 'none'
|
|
62
|
+
} // TODO: 样式隐藏
|
|
63
|
+
,
|
|
64
|
+
component: /*#__PURE__*/React.createElement(CalculationInput, _extends({}, _this.componentConfig, {
|
|
65
|
+
disabled: true
|
|
66
|
+
}))
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
70
|
+
return {
|
|
71
|
+
searchDefaultConditions: SYMBOL.like,
|
|
72
|
+
type: item.type,
|
|
73
|
+
id: "".concat(item.id, "_numericalCalculation"),
|
|
74
|
+
// 过滤组件id
|
|
75
|
+
name: item.name,
|
|
76
|
+
// 过滤组件名称
|
|
77
|
+
filterComponentType: "Input",
|
|
78
|
+
filterFn: function filterFn(value) {
|
|
79
|
+
return function (i) {
|
|
80
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "numericalCalculation")).includes(value);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
this.name = options.name;
|
|
86
|
+
this.id = options.id;
|
|
87
|
+
this.sortField = "".concat(options.id, "_numericalCalculation");
|
|
88
|
+
this.formField = "".concat(options.id, "_numericalCalculation");
|
|
89
|
+
this.type = options.type;
|
|
90
|
+
this.componentConfig = options.componentConfig;
|
|
91
|
+
this.rules = [];
|
|
92
|
+
this.isCombinationComponent = false;
|
|
93
|
+
this.canSort = true;
|
|
94
|
+
this.children = [];
|
|
95
|
+
this.dataType = "number";
|
|
96
|
+
});
|
|
97
|
+
export default Calculation;
|
|
@@ -15,6 +15,7 @@ export declare const showImage: ({ item, type, index, }: {
|
|
|
15
15
|
export declare const ShowTotalImage: ({ total, allImage, type }: any) => React.JSX.Element;
|
|
16
16
|
export declare const GoodImage: ({ list, type }: any) => React.JSX.Element | null;
|
|
17
17
|
export declare const JstGoodImage: ({ list, type }: any) => any;
|
|
18
|
+
export declare const CommonOrderContent: ({ list, valueKey, failValue, options, }: any) => any;
|
|
18
19
|
export declare const BsGoodImage: ({ item, index }: {
|
|
19
20
|
item: any;
|
|
20
21
|
index: number;
|
|
@@ -226,13 +226,51 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
226
226
|
color: "#1890ff",
|
|
227
227
|
cursor: "pointer"
|
|
228
228
|
}
|
|
229
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join("/") : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join("/") : item.sendId ? item.sendId : item.sendName) : null));
|
|
229
|
+
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join("/") : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join("/") : item.sendId ? item.sendId : item.sendName) : null, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || "") : null));
|
|
230
230
|
}) : null;
|
|
231
231
|
};
|
|
232
|
+
export var CommonOrderContent = function CommonOrderContent(_ref7) {
|
|
233
|
+
var _ref7$list = _ref7.list,
|
|
234
|
+
list = _ref7$list === void 0 ? [] : _ref7$list,
|
|
235
|
+
valueKey = _ref7.valueKey,
|
|
236
|
+
failValue = _ref7.failValue,
|
|
237
|
+
_ref7$options = _ref7.options,
|
|
238
|
+
options = _ref7$options === void 0 ? [] : _ref7$options;
|
|
239
|
+
var orderContent = function orderContent(item, index) {
|
|
240
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
241
|
+
style: {
|
|
242
|
+
textAlign: "center"
|
|
243
|
+
}
|
|
244
|
+
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId));
|
|
245
|
+
};
|
|
246
|
+
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
247
|
+
var _options$find;
|
|
248
|
+
var color = ((_options$find = options.find(function (item) {
|
|
249
|
+
return item[valueKey] === failValue;
|
|
250
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.color) || "#000";
|
|
251
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
|
252
|
+
content: orderContent(item, index),
|
|
253
|
+
overlayStyle: {
|
|
254
|
+
zIndex: 1080
|
|
255
|
+
}
|
|
256
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
257
|
+
key: index,
|
|
258
|
+
style: {
|
|
259
|
+
color: "#1890ff",
|
|
260
|
+
cursor: "pointer"
|
|
261
|
+
}
|
|
262
|
+
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":")), /*#__PURE__*/React.createElement("span", {
|
|
263
|
+
style: {
|
|
264
|
+
color: color
|
|
265
|
+
}
|
|
266
|
+
}, (item === null || item === void 0 ? void 0 : item[valueKey]) || "")));
|
|
267
|
+
}) : null;
|
|
268
|
+
};
|
|
269
|
+
|
|
232
270
|
//bs商品展示 todo
|
|
233
|
-
export var BsGoodImage = function BsGoodImage(
|
|
234
|
-
var item =
|
|
235
|
-
index =
|
|
271
|
+
export var BsGoodImage = function BsGoodImage(_ref8) {
|
|
272
|
+
var item = _ref8.item,
|
|
273
|
+
index = _ref8.index;
|
|
236
274
|
var picUrl = item.picUrl || defaultImg;
|
|
237
275
|
var keyMap = {
|
|
238
276
|
name: "bs名称",
|
|
@@ -263,9 +301,9 @@ export var BsGoodImage = function BsGoodImage(_ref7) {
|
|
|
263
301
|
})));
|
|
264
302
|
};
|
|
265
303
|
//bs换货 todo
|
|
266
|
-
export var BsExchangeList = function BsExchangeList(
|
|
267
|
-
var list =
|
|
268
|
-
showHeader =
|
|
304
|
+
export var BsExchangeList = function BsExchangeList(_ref9) {
|
|
305
|
+
var list = _ref9.list,
|
|
306
|
+
showHeader = _ref9.showHeader;
|
|
269
307
|
return /*#__PURE__*/React.createElement("div", {
|
|
270
308
|
className: styles.bsImgBox
|
|
271
309
|
}, list.map(function (item) {
|
|
@@ -289,11 +327,11 @@ export var BsGoodPic = function BsGoodPic(list) {
|
|
|
289
327
|
});
|
|
290
328
|
});
|
|
291
329
|
};
|
|
292
|
-
export var BsGoodsTable = function BsGoodsTable(
|
|
293
|
-
var list =
|
|
294
|
-
showHeader =
|
|
295
|
-
|
|
296
|
-
text =
|
|
330
|
+
export var BsGoodsTable = function BsGoodsTable(_ref10) {
|
|
331
|
+
var list = _ref10.list,
|
|
332
|
+
showHeader = _ref10.showHeader,
|
|
333
|
+
_ref10$text = _ref10.text,
|
|
334
|
+
text = _ref10$text === void 0 ? "" : _ref10$text;
|
|
297
335
|
//商品信息
|
|
298
336
|
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
299
337
|
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
@@ -303,6 +341,24 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
|
|
|
303
341
|
align: "center",
|
|
304
342
|
ellipsis: true,
|
|
305
343
|
width: 100
|
|
344
|
+
}, {
|
|
345
|
+
dataIndex: "skuName",
|
|
346
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
347
|
+
align: "center",
|
|
348
|
+
ellipsis: true,
|
|
349
|
+
width: 200
|
|
350
|
+
}, {
|
|
351
|
+
dataIndex: "sku",
|
|
352
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
353
|
+
align: "center",
|
|
354
|
+
ellipsis: true,
|
|
355
|
+
width: 100
|
|
356
|
+
}, {
|
|
357
|
+
dataIndex: "name",
|
|
358
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
359
|
+
align: "center",
|
|
360
|
+
ellipsis: true,
|
|
361
|
+
width: 200
|
|
306
362
|
}, {
|
|
307
363
|
dataIndex: "pic",
|
|
308
364
|
title: "\u56FE\u7247",
|
|
@@ -315,24 +371,12 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
|
|
|
315
371
|
src: val
|
|
316
372
|
});
|
|
317
373
|
}
|
|
318
|
-
}, {
|
|
319
|
-
dataIndex: "name",
|
|
320
|
-
title: "".concat(text, "\u540D\u79F0"),
|
|
321
|
-
align: "center",
|
|
322
|
-
ellipsis: true,
|
|
323
|
-
width: 200
|
|
324
374
|
}, {
|
|
325
375
|
dataIndex: "code",
|
|
326
376
|
title: "".concat(text, "\u7F16\u7801"),
|
|
327
377
|
align: "center",
|
|
328
378
|
ellipsis: true,
|
|
329
379
|
width: 100
|
|
330
|
-
}, {
|
|
331
|
-
dataIndex: "sku",
|
|
332
|
-
title: "".concat(text, "sku\u7F16\u7801"),
|
|
333
|
-
align: "center",
|
|
334
|
-
ellipsis: true,
|
|
335
|
-
width: 100
|
|
336
380
|
}, {
|
|
337
381
|
dataIndex: "money",
|
|
338
382
|
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
@@ -388,9 +432,9 @@ export var BsGoodsTable = function BsGoodsTable(_ref9) {
|
|
|
388
432
|
}
|
|
389
433
|
});
|
|
390
434
|
};
|
|
391
|
-
export var FileRender = function FileRender(
|
|
392
|
-
var
|
|
393
|
-
fileList =
|
|
435
|
+
export var FileRender = function FileRender(_ref11) {
|
|
436
|
+
var _ref11$fileList = _ref11.fileList,
|
|
437
|
+
fileList = _ref11$fileList === void 0 ? [] : _ref11$fileList;
|
|
394
438
|
var _useState3 = useState(false),
|
|
395
439
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
396
440
|
visible = _useState4[0],
|
|
@@ -468,8 +512,8 @@ export var FileRender = function FileRender(_ref10) {
|
|
|
468
512
|
src: fileUrl
|
|
469
513
|
})));
|
|
470
514
|
};
|
|
471
|
-
export var BsSystemOrderTable = function BsSystemOrderTable(
|
|
472
|
-
var value =
|
|
515
|
+
export var BsSystemOrderTable = function BsSystemOrderTable(_ref12) {
|
|
516
|
+
var value = _ref12.value;
|
|
473
517
|
var columns = [{
|
|
474
518
|
dataIndex: "billType",
|
|
475
519
|
title: "单据类型"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class CommonMultiStatus implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
align: ALignType;
|
|
11
|
+
isCombinationComponent: boolean;
|
|
12
|
+
formField: string;
|
|
13
|
+
canSort: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
|
+
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
19
|
+
renderLog: (r: Record) => React.JSX.Element | null;
|
|
20
|
+
getComponentValue: (r: Record) => any;
|
|
21
|
+
renderExport: (value: any, record: any) => any;
|
|
22
|
+
editRender: (p: any) => React.JSX.Element;
|
|
23
|
+
filterConfig: (item: ColumnConfig) => {
|
|
24
|
+
searchDefaultConditions: "like";
|
|
25
|
+
type: string;
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
filterComponentType: "Input";
|
|
29
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
30
|
+
}[];
|
|
31
|
+
}
|
|
32
|
+
export default CommonMultiStatus;
|