@kmkf-fe-packages/services-components 2.2.0 → 2.2.2
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/BuyerNick/index.d.ts +6 -5
- package/dist/esm/components/BuyerNick/index.js +21 -11
- package/dist/esm/components/Checkbox/index.d.ts +5 -4
- package/dist/esm/components/Checkbox/index.js +37 -20
- package/dist/esm/components/CommonMultiStatus/index.d.ts +4 -4
- package/dist/esm/components/CommonMultiStatus/index.js +107 -76
- package/dist/esm/components/File/index.d.ts +2 -0
- package/dist/esm/components/File/index.js +5 -1
- package/dist/esm/components/MsgStatus/index.d.ts +2 -0
- package/dist/esm/components/MsgStatus/index.js +4 -0
- package/dist/esm/components/MultSelect/index.d.ts +2 -0
- package/dist/esm/components/MultSelect/index.js +5 -1
- package/dist/esm/components/Radio/index.d.ts +1 -0
- package/dist/esm/components/Radio/index.js +16 -1
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/factory.js +1 -0
- package/dist/esm/type.d.ts +8 -0
- package/package.json +4 -4
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class EBuyerNick implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
10
|
-
effects: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface["dataType"];
|
|
16
|
+
compoundConfig: ComponentInterface["compoundConfig"];
|
|
16
17
|
constructor(options: PickOption);
|
|
17
18
|
renderTaoBaoWangWang: (record: any, params: any) => React.JSX.Element;
|
|
18
19
|
renderClient: (record: any, params: any) => React.JSX.Element | null;
|
|
@@ -6,12 +6,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
-
import React from
|
|
10
|
-
import { BuyerNick } from
|
|
9
|
+
import React from "react";
|
|
10
|
+
import { BuyerNick } from "@kmkf-fe-packages/basic-components";
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
13
|
import PlatBuyer from "../../commonComponents/PlatBuyer";
|
|
14
|
-
import { isNull, filterFn as _filterFn } from
|
|
14
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
15
|
import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
|
|
16
16
|
import wangImg from "../../commonComponents/Wangwang/img/wang.gif";
|
|
17
17
|
var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
@@ -30,12 +30,13 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
30
30
|
_defineProperty(this, "canSort", void 0);
|
|
31
31
|
_defineProperty(this, "children", void 0);
|
|
32
32
|
_defineProperty(this, "dataType", void 0);
|
|
33
|
+
_defineProperty(this, "compoundConfig", void 0);
|
|
33
34
|
_defineProperty(this, "renderTaoBaoWangWang", function (record, params) {
|
|
34
35
|
var _record$_this$id3;
|
|
35
36
|
return /*#__PURE__*/React.createElement("span", {
|
|
36
37
|
onClick: function onClick() {
|
|
37
38
|
var _record$_this$id, _record$_this$id2;
|
|
38
|
-
typeof params.openWangWang ===
|
|
39
|
+
typeof params.openWangWang === "function" && params.openWangWang(record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.buyerNick, record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.buyerOpenUid);
|
|
39
40
|
}
|
|
40
41
|
}, /*#__PURE__*/React.createElement("img", {
|
|
41
42
|
alt: "\u8BF7\u70B9\u51FB\u76F4\u63A5\u8BBF\u95EE",
|
|
@@ -49,7 +50,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
49
50
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
50
51
|
id: _this.id,
|
|
51
52
|
label: _this.name,
|
|
52
|
-
value: (params === null || params === void 0 ? void 0 : params.platform) ===
|
|
53
|
+
value: (params === null || params === void 0 ? void 0 : params.platform) === "tb" ? _this.renderTaoBaoWangWang(record, params) : record === null || record === void 0 ? void 0 : (_record$_this$id4 = record[_this.id]) === null || _record$_this$id4 === void 0 ? void 0 : _record$_this$id4.buyerNick
|
|
53
54
|
}) : null;
|
|
54
55
|
});
|
|
55
56
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -93,7 +94,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
93
94
|
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,
|
|
94
95
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
95
96
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
96
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
97
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
97
98
|
component: /*#__PURE__*/React.createElement(BuyerNick, _extends({}, _this.componentConfig, {
|
|
98
99
|
shopId: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.shopId,
|
|
99
100
|
shopList: (_this$effects4 = _this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.shopList,
|
|
@@ -112,17 +113,17 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
112
113
|
// 过滤组件id
|
|
113
114
|
name: item.name,
|
|
114
115
|
// 过滤组件名称
|
|
115
|
-
filterComponentType:
|
|
116
|
+
filterComponentType: "SelectInput",
|
|
116
117
|
props: {
|
|
117
118
|
filterOptions: SEARCH_OPTIONS
|
|
118
119
|
},
|
|
119
120
|
filterFn: function filterFn(value) {
|
|
120
121
|
return function (i) {
|
|
121
|
-
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
122
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "buyerNick")).includes(value);
|
|
122
123
|
};
|
|
123
124
|
},
|
|
124
125
|
formatFilterValue: function formatFilterValue(value) {
|
|
125
|
-
if ([
|
|
126
|
+
if (["in", "anylike"].includes(value.type)) {
|
|
126
127
|
return batchInput(value.keywords);
|
|
127
128
|
} else {
|
|
128
129
|
return value;
|
|
@@ -138,17 +139,26 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
138
139
|
this.isCombinationComponent = false;
|
|
139
140
|
this.canSort = true;
|
|
140
141
|
this.children = [];
|
|
141
|
-
this.dataType =
|
|
142
|
+
this.dataType = "string";
|
|
142
143
|
this.componentConfig = options.componentConfig;
|
|
143
144
|
this.effects = options.effects;
|
|
144
145
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
145
146
|
validator: function validator(_, value) {
|
|
146
147
|
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
147
|
-
return Promise.reject(new Error(
|
|
148
|
+
return Promise.reject(new Error("请输入买家昵称"));
|
|
148
149
|
}
|
|
149
150
|
return Promise.resolve();
|
|
150
151
|
}
|
|
151
152
|
}] : [];
|
|
153
|
+
this.compoundConfig = [{
|
|
154
|
+
name: options.name,
|
|
155
|
+
id: "".concat(options.id, "_buyerNick"),
|
|
156
|
+
standardDateType: "String"
|
|
157
|
+
}, {
|
|
158
|
+
name: "".concat(options.name, "(id)"),
|
|
159
|
+
id: "".concat(options.id, "_buyerOpenUid"),
|
|
160
|
+
standardDateType: "String"
|
|
161
|
+
}];
|
|
152
162
|
}
|
|
153
163
|
// 渲染淘宝端的时候需要亮灯
|
|
154
164
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare type Value = {
|
|
4
4
|
value?: string[];
|
|
5
5
|
other?: string;
|
|
@@ -15,8 +15,9 @@ declare class BasicCheckbox implements ComponentInterface {
|
|
|
15
15
|
formField: string;
|
|
16
16
|
canSort: boolean;
|
|
17
17
|
children: ComponentInterface[];
|
|
18
|
-
dataType: ComponentInterface[
|
|
19
|
-
options: ComponentInterface[
|
|
18
|
+
dataType: ComponentInterface["dataType"];
|
|
19
|
+
options: ComponentInterface["options"];
|
|
20
|
+
compoundConfig: ComponentInterface["compoundConfig"];
|
|
20
21
|
constructor(options: PickOption);
|
|
21
22
|
getValues: (value: Value) => string | null | undefined;
|
|
22
23
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -5,17 +5,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
5
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
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
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
|
|
9
|
-
import intersection from
|
|
10
|
-
import { ApaasCheckbox } from
|
|
8
|
+
import React from "react";
|
|
9
|
+
import intersection from "lodash/intersection";
|
|
10
|
+
import { ApaasCheckbox } from "@kmkf-fe-packages/basic-components";
|
|
11
11
|
import GetFormItem from "../GetFormItem";
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
-
import { isNull, filterFn as _filterFn } from
|
|
13
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import { SYMBOL } from "../../constant";
|
|
15
15
|
var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
16
16
|
var _this = this,
|
|
17
17
|
_options$componentCon,
|
|
18
|
-
_this$componentConfig5
|
|
18
|
+
_this$componentConfig5,
|
|
19
|
+
_this$componentConfig6;
|
|
19
20
|
_classCallCheck(this, BasicCheckbox);
|
|
20
21
|
_defineProperty(this, "name", void 0);
|
|
21
22
|
_defineProperty(this, "id", void 0);
|
|
@@ -29,34 +30,35 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
29
30
|
_defineProperty(this, "children", void 0);
|
|
30
31
|
_defineProperty(this, "dataType", void 0);
|
|
31
32
|
_defineProperty(this, "options", void 0);
|
|
33
|
+
_defineProperty(this, "compoundConfig", void 0);
|
|
32
34
|
_defineProperty(this, "getValues", function (value) {
|
|
33
35
|
var _value$value, _value$value2, _value$value3;
|
|
34
36
|
if ((value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.length) === 0 && isNull(value === null || value === void 0 ? void 0 : value.other)) return null;
|
|
35
37
|
var findIndex = value === null || value === void 0 ? void 0 : (_value$value2 = value.value) === null || _value$value2 === void 0 ? void 0 : _value$value2.findIndex(function (item) {
|
|
36
|
-
return item ===
|
|
38
|
+
return item === "其他";
|
|
37
39
|
});
|
|
38
40
|
if (findIndex > -1 && value !== null && value !== void 0 && value.other) {
|
|
39
41
|
// @ts-ignore
|
|
40
42
|
value.value[findIndex] = "\u5176\u4ED6(".concat(value === null || value === void 0 ? void 0 : value.other, ")");
|
|
41
43
|
}
|
|
42
|
-
return value === null || value === void 0 ? void 0 : (_value$value3 = value.value) === null || _value$value3 === void 0 ? void 0 : _value$value3.join(
|
|
44
|
+
return value === null || value === void 0 ? void 0 : (_value$value3 = value.value) === null || _value$value3 === void 0 ? void 0 : _value$value3.join("/");
|
|
43
45
|
});
|
|
44
46
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
45
47
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) === undefined && (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) === undefined) {
|
|
46
48
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
47
49
|
}
|
|
48
|
-
return /*#__PURE__*/React.createElement("span", null, Array.isArray(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) ? record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")].join(
|
|
50
|
+
return /*#__PURE__*/React.createElement("span", null, Array.isArray(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) ? record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")].join("/") : record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")], (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) && /*#__PURE__*/React.createElement("br", null), (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) || "");
|
|
49
51
|
});
|
|
50
52
|
_defineProperty(this, "renderLog", function (r) {
|
|
51
53
|
var _r;
|
|
52
54
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkbox")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")])) return null;
|
|
53
55
|
var restOtherOptions = (r === null || r === void 0 ? void 0 : (_r = r["".concat(_this.id, "_checkbox")]) === null || _r === void 0 ? void 0 : _r.filter(function (i) {
|
|
54
|
-
return i !==
|
|
56
|
+
return i !== "其他";
|
|
55
57
|
})) || [];
|
|
56
58
|
if (!isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")])) {
|
|
57
|
-
return (restOtherOptions === null || restOtherOptions === void 0 ? void 0 : restOtherOptions.length) > 0 ? restOtherOptions.join(
|
|
59
|
+
return (restOtherOptions === null || restOtherOptions === void 0 ? void 0 : restOtherOptions.length) > 0 ? restOtherOptions.join("/").concat("/\u5176\u4ED6(".concat(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")], ")")) : "\u5176\u4ED6(".concat(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")], ")");
|
|
58
60
|
}
|
|
59
|
-
return restOtherOptions.join(
|
|
61
|
+
return restOtherOptions.join("/");
|
|
60
62
|
});
|
|
61
63
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
62
64
|
return {
|
|
@@ -67,15 +69,15 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
67
69
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
68
70
|
var _ref;
|
|
69
71
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) === undefined) {
|
|
70
|
-
return
|
|
72
|
+
return "--";
|
|
71
73
|
}
|
|
72
|
-
return "".concat((_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) || []) === null || _ref === void 0 ? void 0 : _ref.join(
|
|
74
|
+
return "".concat((_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) || []) === null || _ref === void 0 ? void 0 : _ref.join("/"), " ").concat((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) || "");
|
|
73
75
|
});
|
|
74
76
|
_defineProperty(this, "renderClient", function (record) {
|
|
75
77
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
76
78
|
id: _this.id,
|
|
77
79
|
label: _this.name,
|
|
78
|
-
value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) ||
|
|
80
|
+
value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) || ""
|
|
79
81
|
}) : null;
|
|
80
82
|
});
|
|
81
83
|
_defineProperty(this, "editRender", function (p) {
|
|
@@ -87,7 +89,7 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
87
89
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
88
90
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
89
91
|
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,
|
|
90
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
92
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
91
93
|
component: /*#__PURE__*/React.createElement(ApaasCheckbox, _this.componentConfig)
|
|
92
94
|
});
|
|
93
95
|
});
|
|
@@ -100,16 +102,16 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
100
102
|
// 过滤组件id
|
|
101
103
|
name: item.name,
|
|
102
104
|
// 过滤组件名称
|
|
103
|
-
filterComponentType:
|
|
105
|
+
filterComponentType: "MultipleSelect",
|
|
104
106
|
props: {
|
|
105
107
|
options: item !== null && item !== void 0 && (_item$config = item.config) !== null && _item$config !== void 0 && _item$config.showOther ? item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : (_item$config2$options = _item$config2.options) === null || _item$config2$options === void 0 ? void 0 : _item$config2$options.concat({
|
|
106
|
-
label:
|
|
107
|
-
value:
|
|
108
|
+
label: "其他",
|
|
109
|
+
value: "其他"
|
|
108
110
|
}) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || []
|
|
109
111
|
},
|
|
110
112
|
filterFn: function filterFn(value) {
|
|
111
113
|
return function (i) {
|
|
112
|
-
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
114
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "checkbox")).length > 0;
|
|
113
115
|
};
|
|
114
116
|
}
|
|
115
117
|
};
|
|
@@ -135,7 +137,22 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
135
137
|
return Promise.resolve();
|
|
136
138
|
}
|
|
137
139
|
}] : [];
|
|
138
|
-
this.dataType =
|
|
140
|
+
this.dataType = "array";
|
|
139
141
|
this.options = ((_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.options) || [];
|
|
142
|
+
this.compoundConfig = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.showOther ? [{
|
|
143
|
+
name: options.name,
|
|
144
|
+
id: "".concat(options.id, "_checkbox"),
|
|
145
|
+
standardDateType: "Array",
|
|
146
|
+
exampleValue: '["选项1","选项2"]'
|
|
147
|
+
}, {
|
|
148
|
+
name: "".concat(options.name, "(\u5176\u4ED6)"),
|
|
149
|
+
id: "".concat(options.id, "_checkboxOther"),
|
|
150
|
+
standardDateType: "String"
|
|
151
|
+
}] : [{
|
|
152
|
+
name: options.name,
|
|
153
|
+
id: "".concat(options.id, "_checkbox"),
|
|
154
|
+
standardDateType: "Array",
|
|
155
|
+
exampleValue: '["选项1","选项2"]'
|
|
156
|
+
}];
|
|
140
157
|
});
|
|
141
158
|
export default BasicCheckbox;
|
|
@@ -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 CommonMultiStatus implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
10
|
align: ALignType;
|
|
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
|
isSingleValue: boolean;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -8,100 +8,131 @@ 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 some from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import some from "lodash/some";
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import { CommonOrderContent } from "../Common";
|
|
15
|
-
import { CommonMultiStatus as Status } from
|
|
15
|
+
import { CommonMultiStatus as Status } from "@kmkf-fe-packages/basic-components";
|
|
16
16
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull, filterFn as _filterFn } from
|
|
17
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
18
18
|
import { SEARCH_OPTIONS_V2, SYMBOL } from "../../constant";
|
|
19
19
|
var typeMap = {
|
|
20
20
|
RETURN_GOODS_STATUS: {
|
|
21
21
|
options: [{
|
|
22
|
-
value:
|
|
23
|
-
label:
|
|
24
|
-
color:
|
|
22
|
+
value: "成功",
|
|
23
|
+
label: "成功",
|
|
24
|
+
color: "#52c41a"
|
|
25
25
|
}, {
|
|
26
|
-
value:
|
|
27
|
-
label:
|
|
28
|
-
color:
|
|
26
|
+
value: "失败",
|
|
27
|
+
label: "失败",
|
|
28
|
+
color: "#ff4d4f"
|
|
29
29
|
}],
|
|
30
|
-
key:
|
|
31
|
-
code:
|
|
32
|
-
name:
|
|
30
|
+
key: "returnGoodsStatusList",
|
|
31
|
+
code: "returnGoodsStatusValue",
|
|
32
|
+
name: "退货状态",
|
|
33
33
|
type: 1,
|
|
34
|
-
valueKey:
|
|
35
|
-
idKey:
|
|
36
|
-
failValue:
|
|
34
|
+
valueKey: "status",
|
|
35
|
+
idKey: "systemOrderId",
|
|
36
|
+
failValue: "失败"
|
|
37
37
|
},
|
|
38
38
|
EXCHANGE_STATUS: {
|
|
39
39
|
options: [{
|
|
40
|
-
value:
|
|
41
|
-
label:
|
|
42
|
-
color:
|
|
40
|
+
value: "成功",
|
|
41
|
+
label: "成功",
|
|
42
|
+
color: "#52c41a"
|
|
43
43
|
}, {
|
|
44
|
-
value:
|
|
45
|
-
label:
|
|
46
|
-
color:
|
|
44
|
+
value: "失败",
|
|
45
|
+
label: "失败",
|
|
46
|
+
color: "#ff4d4f"
|
|
47
47
|
}],
|
|
48
|
-
key:
|
|
49
|
-
code:
|
|
50
|
-
name:
|
|
48
|
+
key: "exchangeReason",
|
|
49
|
+
code: "exchangeStatusValue",
|
|
50
|
+
name: "换货状态",
|
|
51
51
|
type: 1,
|
|
52
|
-
valueKey:
|
|
53
|
-
idKey:
|
|
54
|
-
failValue:
|
|
52
|
+
valueKey: "status",
|
|
53
|
+
idKey: "systemOrderId",
|
|
54
|
+
failValue: "失败"
|
|
55
55
|
},
|
|
56
56
|
WAREHOUSING_STATUS: {
|
|
57
57
|
options: [{
|
|
58
|
-
value:
|
|
59
|
-
label:
|
|
60
|
-
color:
|
|
58
|
+
value: "2",
|
|
59
|
+
label: "已入库",
|
|
60
|
+
color: "#52c41a"
|
|
61
61
|
}, {
|
|
62
|
-
value:
|
|
63
|
-
label:
|
|
64
|
-
color:
|
|
62
|
+
value: "1",
|
|
63
|
+
label: "部分入库",
|
|
64
|
+
color: "#e7780f"
|
|
65
65
|
}, {
|
|
66
|
-
value:
|
|
67
|
-
label:
|
|
68
|
-
color:
|
|
66
|
+
value: "0",
|
|
67
|
+
label: "未入库",
|
|
68
|
+
color: "#ff4d4f"
|
|
69
69
|
}],
|
|
70
|
-
key:
|
|
71
|
-
code:
|
|
72
|
-
name:
|
|
70
|
+
key: "inStockStatusItemList",
|
|
71
|
+
code: "inStockStatusList",
|
|
72
|
+
name: "商品入库状态(勿填)",
|
|
73
73
|
type: 2,
|
|
74
|
-
valueKey:
|
|
75
|
-
idKey:
|
|
76
|
-
failValue:
|
|
77
|
-
dataType:
|
|
74
|
+
valueKey: "status",
|
|
75
|
+
idKey: "systemOrderId",
|
|
76
|
+
failValue: "失败",
|
|
77
|
+
dataType: "array_object"
|
|
78
78
|
},
|
|
79
79
|
BS_E3_WAREHOUSING_STATUS: {
|
|
80
80
|
options: [{
|
|
81
|
-
value:
|
|
82
|
-
label:
|
|
83
|
-
color:
|
|
81
|
+
value: "2",
|
|
82
|
+
label: "已入库",
|
|
83
|
+
color: "#52c41a"
|
|
84
84
|
}, {
|
|
85
|
-
value:
|
|
86
|
-
label:
|
|
87
|
-
color:
|
|
85
|
+
value: "1",
|
|
86
|
+
label: "部分入库",
|
|
87
|
+
color: "#e7780f"
|
|
88
88
|
}, {
|
|
89
|
-
value:
|
|
90
|
-
label:
|
|
91
|
-
color:
|
|
89
|
+
value: "0",
|
|
90
|
+
label: "未入库",
|
|
91
|
+
color: "#ff4d4f"
|
|
92
92
|
}, {
|
|
93
|
-
value:
|
|
94
|
-
label:
|
|
95
|
-
color:
|
|
93
|
+
value: "3",
|
|
94
|
+
label: "已退回给客户",
|
|
95
|
+
color: "#1B5BF3"
|
|
96
96
|
}],
|
|
97
|
-
key:
|
|
98
|
-
code:
|
|
99
|
-
name:
|
|
97
|
+
key: "bsE3InStockStatusItemList",
|
|
98
|
+
code: "bsE3InStockStatusList",
|
|
99
|
+
name: "商品入库状态",
|
|
100
100
|
type: 2,
|
|
101
|
-
valueKey:
|
|
102
|
-
idKey:
|
|
103
|
-
failValue:
|
|
104
|
-
dataType:
|
|
101
|
+
valueKey: "status",
|
|
102
|
+
idKey: "systemOrderId",
|
|
103
|
+
failValue: "失败",
|
|
104
|
+
dataType: "array_object"
|
|
105
|
+
},
|
|
106
|
+
WDT_WAREHOUSING_STATUS: {
|
|
107
|
+
options: [{
|
|
108
|
+
value: "0",
|
|
109
|
+
label: "无需入库",
|
|
110
|
+
color: "#333333"
|
|
111
|
+
}, {
|
|
112
|
+
value: "1",
|
|
113
|
+
label: "待入库",
|
|
114
|
+
color: "#ff4d4f"
|
|
115
|
+
}, {
|
|
116
|
+
value: "2",
|
|
117
|
+
label: "部分入库",
|
|
118
|
+
color: "#e7780f"
|
|
119
|
+
}, {
|
|
120
|
+
value: "3",
|
|
121
|
+
label: "全部入库",
|
|
122
|
+
color: "#52c41a"
|
|
123
|
+
}, {
|
|
124
|
+
value: "4",
|
|
125
|
+
label: "终止入库",
|
|
126
|
+
color: "#1B5BF3"
|
|
127
|
+
}],
|
|
128
|
+
key: "wdtInStockStatusItemList",
|
|
129
|
+
code: "wdtInStockStatusList",
|
|
130
|
+
name: "商品入库状态",
|
|
131
|
+
type: 2,
|
|
132
|
+
valueKey: "status",
|
|
133
|
+
idKey: "systemOrderId",
|
|
134
|
+
failValue: "失败",
|
|
135
|
+
dataType: "array_object"
|
|
105
136
|
}
|
|
106
137
|
};
|
|
107
138
|
var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(options) {
|
|
@@ -180,10 +211,10 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
180
211
|
});
|
|
181
212
|
if (_this.isSingleValue) {
|
|
182
213
|
var _typeMap$_this$type15;
|
|
183
|
-
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
214
|
+
return currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type15 = typeMap[_this.type]) === null || _typeMap$_this$type15 === void 0 ? void 0 : _typeMap$_this$type15.valueKey]) || "";
|
|
184
215
|
}
|
|
185
|
-
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) ||
|
|
186
|
-
}).join(
|
|
216
|
+
return "".concat(item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type16 = typeMap[_this.type]) === null || _typeMap$_this$type16 === void 0 ? void 0 : _typeMap$_this$type16.idKey], ":").concat(currentOption ? (currentOption === null || currentOption === void 0 ? void 0 : currentOption.label) || "" : (item === null || item === void 0 ? void 0 : item[(_typeMap$_this$type17 = typeMap[_this.type]) === null || _typeMap$_this$type17 === void 0 ? void 0 : _typeMap$_this$type17.valueKey]) || "");
|
|
217
|
+
}).join(",");
|
|
187
218
|
});
|
|
188
219
|
_defineProperty(this, "editRender", function (p) {
|
|
189
220
|
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _typeMap$_this$type18;
|
|
@@ -194,7 +225,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
194
225
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
195
226
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
196
227
|
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,
|
|
197
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
228
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
198
229
|
component: /*#__PURE__*/React.createElement(Status, _extends({}, _this.componentConfig, {
|
|
199
230
|
type: (_typeMap$_this$type18 = typeMap[_this.type]) === null || _typeMap$_this$type18 === void 0 ? void 0 : _typeMap$_this$type18.type,
|
|
200
231
|
failValue: typeMap[_this.type].failValue
|
|
@@ -204,16 +235,16 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
204
235
|
_defineProperty(this, "filterConfig", function (item) {
|
|
205
236
|
var _typeMap$_this$type19, _item$templateConfig;
|
|
206
237
|
return {
|
|
207
|
-
searchDefaultConditions: [
|
|
238
|
+
searchDefaultConditions: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? SYMBOL.in : SYMBOL.like,
|
|
208
239
|
type: item.type,
|
|
209
240
|
id: "".concat(item.id, "_").concat((_typeMap$_this$type19 = typeMap[_this.type]) === null || _typeMap$_this$type19 === void 0 ? void 0 : _typeMap$_this$type19.code),
|
|
210
241
|
name: "".concat(_this.name),
|
|
211
|
-
filterComponentType: [
|
|
242
|
+
filterComponentType: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? "MultipleSelect" : "SelectInput",
|
|
212
243
|
props: {
|
|
213
244
|
options: item === null || item === void 0 ? void 0 : (_item$templateConfig = item.templateConfig) === null || _item$templateConfig === void 0 ? void 0 : _item$templateConfig.reasonList,
|
|
214
245
|
fieldNames: {
|
|
215
|
-
label:
|
|
216
|
-
value:
|
|
246
|
+
label: "label",
|
|
247
|
+
value: "value"
|
|
217
248
|
},
|
|
218
249
|
filterOptions: SEARCH_OPTIONS_V2
|
|
219
250
|
},
|
|
@@ -223,8 +254,8 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
223
254
|
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, (_typeMap$_this$type20 = typeMap[_this.type]) === null || _typeMap$_this$type20 === void 0 ? void 0 : _typeMap$_this$type20.code), value);
|
|
224
255
|
};
|
|
225
256
|
},
|
|
226
|
-
formatFilterValue: [
|
|
227
|
-
if (value.type ===
|
|
257
|
+
formatFilterValue: ["BS_E3_WAREHOUSING_STATUS", "WAREHOUSING_STATUS", "WDT_WAREHOUSING_STATUS"].includes(_this.type) ? null : function (value) {
|
|
258
|
+
if (value.type === "in") {
|
|
228
259
|
return value.keywords;
|
|
229
260
|
} else {
|
|
230
261
|
return value;
|
|
@@ -243,7 +274,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
243
274
|
this.isCombinationComponent = false;
|
|
244
275
|
this.canSort = false;
|
|
245
276
|
this.children = [];
|
|
246
|
-
this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 :
|
|
277
|
+
this.dataType = (_typeMap$options$type3 = (_typeMap$options$type4 = typeMap[options.type]) === null || _typeMap$options$type4 === void 0 ? void 0 : _typeMap$options$type4.dataType) !== null && _typeMap$options$type3 !== void 0 ? _typeMap$options$type3 : "object";
|
|
247
278
|
this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
|
|
248
279
|
required: true,
|
|
249
280
|
validator: function validator(_, value) {
|
|
@@ -258,7 +289,7 @@ var CommonMultiStatus = /*#__PURE__*/_createClass(function CommonMultiStatus(opt
|
|
|
258
289
|
return Promise.resolve();
|
|
259
290
|
}
|
|
260
291
|
}] : [];
|
|
261
|
-
this.align =
|
|
262
|
-
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) ===
|
|
292
|
+
this.align = "left";
|
|
293
|
+
this.isSingleValue = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.belongType) === "wdt" || this.type === "BS_E3_WAREHOUSING_STATUS" || this.type === "WDT_WAREHOUSING_STATUS";
|
|
263
294
|
});
|
|
264
295
|
export default CommonMultiStatus;
|
|
@@ -13,6 +13,8 @@ declare class BasicFile implements ComponentInterface {
|
|
|
13
13
|
children: ComponentInterface[];
|
|
14
14
|
effects: ComponentInterface["effects"];
|
|
15
15
|
dataType: ComponentInterface["dataType"];
|
|
16
|
+
exampleValue?: string;
|
|
17
|
+
standardDateType: ComponentInterface["standardDateType"];
|
|
16
18
|
constructor(options: PickOption);
|
|
17
19
|
renderPc: (value: any, record: Record) => any;
|
|
18
20
|
renderLog: (r: Record) => any;
|
|
@@ -34,6 +34,8 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
34
34
|
_defineProperty(this, "children", void 0);
|
|
35
35
|
_defineProperty(this, "effects", void 0);
|
|
36
36
|
_defineProperty(this, "dataType", void 0);
|
|
37
|
+
_defineProperty(this, "exampleValue", void 0);
|
|
38
|
+
_defineProperty(this, "standardDateType", void 0);
|
|
37
39
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
40
|
var fileList = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")]) || [];
|
|
39
41
|
if (!fileList.length) {
|
|
@@ -81,7 +83,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
81
83
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
82
84
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
83
85
|
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,
|
|
84
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
86
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
85
87
|
component: /*#__PURE__*/React.createElement(ApaasUploadFile, _extends({}, _this.componentConfig, {
|
|
86
88
|
uniqueKey: _this.id,
|
|
87
89
|
platform: p === null || p === void 0 ? void 0 : p.platform,
|
|
@@ -112,5 +114,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
112
114
|
this.children = [];
|
|
113
115
|
this.dataType = "array";
|
|
114
116
|
this.effects = options.effects;
|
|
117
|
+
this.exampleValue = '[{"name":"c.jpeg","url":"https://kefu.kuaimai.com/pic/c.jpeg"}]';
|
|
118
|
+
this.standardDateType = "Array";
|
|
115
119
|
});
|
|
116
120
|
export default BasicFile;
|
|
@@ -14,6 +14,8 @@ declare class MsgStatus implements ComponentInterface {
|
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
dataType: ComponentInterface["dataType"];
|
|
16
16
|
options: ComponentInterface["options"];
|
|
17
|
+
exampleValue?: string;
|
|
18
|
+
standardDateType: ComponentInterface["standardDateType"];
|
|
17
19
|
constructor(options: PickOption);
|
|
18
20
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
21
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -74,6 +74,8 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
|
|
|
74
74
|
_defineProperty(this, "children", void 0);
|
|
75
75
|
_defineProperty(this, "dataType", void 0);
|
|
76
76
|
_defineProperty(this, "options", void 0);
|
|
77
|
+
_defineProperty(this, "exampleValue", void 0);
|
|
78
|
+
_defineProperty(this, "standardDateType", void 0);
|
|
77
79
|
_defineProperty(this, "renderClient", function (record) {
|
|
78
80
|
var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
|
|
79
81
|
var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
|
|
@@ -196,5 +198,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
|
|
|
196
198
|
}] : [];
|
|
197
199
|
this.align = "left";
|
|
198
200
|
this.options = (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.options;
|
|
201
|
+
this.exampleValue = '{"msgStatus4Search":"["1"]","msgStatusValues":"[{"jobUuid":"1","msgType":"1","msgRuleId":"1","statusKey":"1","ruleName":"1","failReason":"","msgReceivers":[],"status":"1"}]"}';
|
|
202
|
+
this.standardDateType = "Object";
|
|
199
203
|
});
|
|
200
204
|
export default MsgStatus;
|
|
@@ -13,6 +13,8 @@ declare class BasicMultSelect implements ComponentInterface {
|
|
|
13
13
|
children: ComponentInterface[];
|
|
14
14
|
dataType: ComponentInterface["dataType"];
|
|
15
15
|
options: ComponentInterface["options"];
|
|
16
|
+
standardDateType: ComponentInterface["standardDateType"];
|
|
17
|
+
exampleValue: ComponentInterface["exampleValue"];
|
|
16
18
|
constructor(options: PickOption);
|
|
17
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
18
20
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -29,6 +29,8 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
29
29
|
_defineProperty(this, "children", void 0);
|
|
30
30
|
_defineProperty(this, "dataType", void 0);
|
|
31
31
|
_defineProperty(this, "options", void 0);
|
|
32
|
+
_defineProperty(this, "standardDateType", void 0);
|
|
33
|
+
_defineProperty(this, "exampleValue", void 0);
|
|
32
34
|
_defineProperty(this, "renderClient", function (record) {
|
|
33
35
|
var _record$_this$id;
|
|
34
36
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -67,7 +69,7 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
67
69
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
68
70
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
69
71
|
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,
|
|
70
|
-
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip :
|
|
72
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
71
73
|
component: /*#__PURE__*/React.createElement(ApaasMultipleSelect, _extends({}, _this.componentConfig, {
|
|
72
74
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
|
|
73
75
|
}))
|
|
@@ -105,5 +107,7 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
|
|
|
105
107
|
this.children = [];
|
|
106
108
|
this.dataType = "array";
|
|
107
109
|
this.options = ((_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.options) || [];
|
|
110
|
+
this.standardDateType = "Array";
|
|
111
|
+
this.exampleValue = '["选项1","选项2"]';
|
|
108
112
|
});
|
|
109
113
|
export default BasicMultSelect;
|
|
@@ -17,6 +17,7 @@ declare class BasicRadio implements ComponentInterface {
|
|
|
17
17
|
children: ComponentInterface[];
|
|
18
18
|
dataType: ComponentInterface["dataType"];
|
|
19
19
|
options: ComponentInterface["options"];
|
|
20
|
+
compoundConfig: ComponentInterface["compoundConfig"];
|
|
20
21
|
constructor(options: PickOption);
|
|
21
22
|
render: (value: Value) => React.JSX.Element;
|
|
22
23
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -19,7 +19,8 @@ var typeMap = {
|
|
|
19
19
|
var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
20
20
|
var _this = this,
|
|
21
21
|
_this$componentConfig5,
|
|
22
|
-
_this$componentConfig6
|
|
22
|
+
_this$componentConfig6,
|
|
23
|
+
_this$componentConfig7;
|
|
23
24
|
_classCallCheck(this, BasicRadio);
|
|
24
25
|
_defineProperty(this, "name", void 0);
|
|
25
26
|
_defineProperty(this, "id", void 0);
|
|
@@ -33,6 +34,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
|
33
34
|
_defineProperty(this, "children", void 0);
|
|
34
35
|
_defineProperty(this, "dataType", void 0);
|
|
35
36
|
_defineProperty(this, "options", void 0);
|
|
37
|
+
_defineProperty(this, "compoundConfig", void 0);
|
|
36
38
|
_defineProperty(this, "render", function (value) {
|
|
37
39
|
var _value$value;
|
|
38
40
|
return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : value.value) && typeof value.value === "string" && (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf("其他")) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")"));
|
|
@@ -135,5 +137,18 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
|
135
137
|
}] : [];
|
|
136
138
|
this.dataType = "string";
|
|
137
139
|
this.options = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || [];
|
|
140
|
+
this.compoundConfig = (_this$componentConfig7 = this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.showOther ? [{
|
|
141
|
+
name: options.name,
|
|
142
|
+
id: "".concat(options.id, "_radio"),
|
|
143
|
+
standardDateType: "String"
|
|
144
|
+
}, {
|
|
145
|
+
name: "".concat(options.name, "(\u5176\u4ED6)"),
|
|
146
|
+
id: "".concat(options.id, "_radioOther"),
|
|
147
|
+
standardDateType: "String"
|
|
148
|
+
}] : [{
|
|
149
|
+
name: options.name,
|
|
150
|
+
id: "".concat(options.id, "_radio"),
|
|
151
|
+
standardDateType: "String"
|
|
152
|
+
}];
|
|
138
153
|
});
|
|
139
154
|
export default BasicRadio;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, KmVideo } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | BuyerNick | BasicCheckbox | CommonMultiStatus | BasicFile | FlowTag | GyGoods | GyReissue | GyReturn | JstSendGood | MsgStatus | BasicMultSelect | PublicGoods | BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicDataTime | BasicSelect | BasicTextArea | BasicPicture | BasicPicturePro | BasicGrade | BasicRate | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | AsyncSelect;
|
package/dist/esm/factory.js
CHANGED
|
@@ -220,6 +220,7 @@ export var factory = function factory(type, options) {
|
|
|
220
220
|
case "EXCHANGE_STATUS":
|
|
221
221
|
case "WAREHOUSING_STATUS":
|
|
222
222
|
case "BS_E3_WAREHOUSING_STATUS":
|
|
223
|
+
case "WDT_WAREHOUSING_STATUS":
|
|
223
224
|
return new CommonMultiStatus(options);
|
|
224
225
|
case "MSG_STATUS":
|
|
225
226
|
return new MsgStatus(options);
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export interface ComponentInterface {
|
|
|
55
55
|
width?: number;
|
|
56
56
|
align?: ALignType;
|
|
57
57
|
dataType: "string" | "number" | "boolean" | "array" | "range" | "object" | "weakenArray" | "arrayObject";
|
|
58
|
+
standardDateType?: "String" | "Number" | "Boolean" | "Array" | "Object";
|
|
58
59
|
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup" | "object";
|
|
59
60
|
options?: Array<any>;
|
|
60
61
|
optionsMap?: Record;
|
|
@@ -63,6 +64,13 @@ export interface ComponentInterface {
|
|
|
63
64
|
workOrderUniqueKey?: string;
|
|
64
65
|
platform?: PlatForm;
|
|
65
66
|
parentName?: string;
|
|
67
|
+
exampleValue?: any;
|
|
68
|
+
compoundConfig?: Array<{
|
|
69
|
+
id: string;
|
|
70
|
+
standardDateType?: "String" | "Number" | "Boolean" | "Array" | "Object";
|
|
71
|
+
name: string;
|
|
72
|
+
exampleValue?: any;
|
|
73
|
+
}>;
|
|
66
74
|
/**
|
|
67
75
|
* @description 组件下标
|
|
68
76
|
* @deprecated 已弃用字段,后续版本不在使用
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.2.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.2.2",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.2.2",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "e64669cc6f32f9d152afbb1af40c8d10da055f04",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|