@kmkf-fe-packages/services-components 0.8.13-alpha.1 → 0.8.13-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/{ReissueTradeId → CommonTradeId}/index.d.ts +2 -2
- package/dist/esm/components/{ReissueTradeId → CommonTradeId}/index.js +28 -25
- package/dist/esm/components/Radio/index.js +1 -2
- package/dist/esm/components/Select/index.d.ts +2 -1
- package/dist/esm/components/Select/index.js +20 -8
- package/dist/esm/components/{ReissueStatus → StatusSelect}/index.d.ts +9 -11
- package/dist/esm/components/{ReissueStatus → StatusSelect}/index.js +75 -29
- package/dist/esm/factory.d.ts +2 -2
- package/dist/esm/factory.js +9 -4
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare class
|
|
3
|
+
declare class CommonTradeId implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
@@ -33,4 +33,4 @@ declare class ReissueTradeId implements ComponentInterface {
|
|
|
33
33
|
formatFilterValue: (input: string) => string[];
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
export default
|
|
36
|
+
export default CommonTradeId;
|
|
@@ -7,17 +7,27 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
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
9
|
import React from "react";
|
|
10
|
-
import { message } from "antd";
|
|
11
|
-
import { TradeId } from "@kmkf-fe-packages/basic-components";
|
|
10
|
+
import { message, Input } from "antd";
|
|
12
11
|
import { CopyOutlined } from "@ant-design/icons";
|
|
13
12
|
import GetFormItem from "../GetFormItem";
|
|
14
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
14
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
15
|
import copy from "copy-to-clipboard";
|
|
17
16
|
import { SYMBOL } from "../../constant";
|
|
18
|
-
var
|
|
17
|
+
var TRADE_ID_MAP = {
|
|
18
|
+
REISSUE_TRADE_ID: {
|
|
19
|
+
key: "reissueTradeId"
|
|
20
|
+
},
|
|
21
|
+
EXCHANGE_TRADE_ID: {
|
|
22
|
+
key: "exchangeTradeId"
|
|
23
|
+
},
|
|
24
|
+
RETURN_GOODS_TRADE_ID: {
|
|
25
|
+
key: "returnGoodsTradeId"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var CommonTradeId = /*#__PURE__*/_createClass(function CommonTradeId(options) {
|
|
19
29
|
var _this = this;
|
|
20
|
-
_classCallCheck(this,
|
|
30
|
+
_classCallCheck(this, CommonTradeId);
|
|
21
31
|
_defineProperty(this, "name", void 0);
|
|
22
32
|
_defineProperty(this, "id", void 0);
|
|
23
33
|
_defineProperty(this, "sortField", void 0);
|
|
@@ -44,16 +54,16 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
|
|
|
44
54
|
message.success("复制成功");
|
|
45
55
|
});
|
|
46
56
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
47
|
-
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "
|
|
57
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]) === undefined) {
|
|
48
58
|
return /*#__PURE__*/React.createElement(React.Fragment, null, "--");
|
|
49
59
|
}
|
|
50
60
|
return /*#__PURE__*/React.createElement("span", {
|
|
51
61
|
onClick: function onClick(e) {
|
|
52
62
|
return e.stopPropagation();
|
|
53
63
|
}
|
|
54
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "
|
|
64
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)], /*#__PURE__*/React.createElement("span", {
|
|
55
65
|
onClick: function onClick(e) {
|
|
56
|
-
_this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "
|
|
66
|
+
_this.copyHandle(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]);
|
|
57
67
|
e.stopPropagation();
|
|
58
68
|
}
|
|
59
69
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -64,34 +74,27 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
|
|
|
64
74
|
}, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
|
|
65
75
|
});
|
|
66
76
|
_defineProperty(this, "renderLog", function (r) {
|
|
67
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
77
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)])) return null;
|
|
68
78
|
return _this.renderPc(undefined, r);
|
|
69
79
|
});
|
|
70
80
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
71
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
81
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)];
|
|
72
82
|
});
|
|
73
83
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
74
84
|
var _record;
|
|
75
|
-
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "
|
|
85
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(TRADE_ID_MAP[_this.type].key)]) !== null && _record !== void 0 ? _record : "--";
|
|
76
86
|
});
|
|
77
87
|
_defineProperty(this, "editRender", function (p) {
|
|
78
|
-
var _this$componentConfig, _this$componentConfig2
|
|
79
|
-
var onTradeIdBlur = function onTradeIdBlur(e) {
|
|
80
|
-
var _p$onBlur;
|
|
81
|
-
p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, e.target.value, "tradeId");
|
|
82
|
-
};
|
|
88
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
83
89
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
84
90
|
title: _this.name,
|
|
85
91
|
name: _this.id,
|
|
86
92
|
rules: _this.rules,
|
|
87
93
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
88
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,
|
|
89
|
-
component: /*#__PURE__*/React.createElement(
|
|
90
|
-
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
91
|
-
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
|
95
|
+
component: /*#__PURE__*/React.createElement(Input, _extends({}, _this.componentConfig, {
|
|
92
96
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
93
|
-
disabled: true
|
|
94
|
-
onBlur: onTradeIdBlur
|
|
97
|
+
disabled: true
|
|
95
98
|
}))
|
|
96
99
|
});
|
|
97
100
|
});
|
|
@@ -99,14 +102,14 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
|
|
|
99
102
|
return {
|
|
100
103
|
searchDefaultConditions: SYMBOL.in,
|
|
101
104
|
type: item.type,
|
|
102
|
-
id: "".concat(item.id, "
|
|
105
|
+
id: "".concat(item.id, "_").concat(TRADE_ID_MAP[_this.type].key),
|
|
103
106
|
// 过滤组件id
|
|
104
107
|
name: item.name,
|
|
105
108
|
// 过滤组件名称
|
|
106
109
|
filterComponentType: "Input",
|
|
107
110
|
filterFn: function filterFn(value) {
|
|
108
111
|
return function (i) {
|
|
109
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "
|
|
112
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(TRADE_ID_MAP[_this.type].key)), value);
|
|
110
113
|
};
|
|
111
114
|
},
|
|
112
115
|
formatFilterValue: function formatFilterValue(input) {
|
|
@@ -116,8 +119,8 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
|
|
|
116
119
|
});
|
|
117
120
|
this.name = options.name;
|
|
118
121
|
this.id = options.id;
|
|
119
|
-
this.sortField = "".concat(options.id, "
|
|
120
|
-
this.formField = "".concat(options.id, "
|
|
122
|
+
this.sortField = "".concat(options.id, "_").concat(TRADE_ID_MAP[options.type].key);
|
|
123
|
+
this.formField = "".concat(options.id, "_").concat(TRADE_ID_MAP[options.type].key);
|
|
121
124
|
this.type = options.type;
|
|
122
125
|
this.showContains = false;
|
|
123
126
|
this.onlyContainsString = true;
|
|
@@ -129,4 +132,4 @@ var ReissueTradeId = /*#__PURE__*/_createClass(function ReissueTradeId(options)
|
|
|
129
132
|
this.children = [];
|
|
130
133
|
this.dataType = "string";
|
|
131
134
|
});
|
|
132
|
-
export default
|
|
135
|
+
export default CommonTradeId;
|
|
@@ -14,7 +14,6 @@ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
|
14
14
|
import get from 'lodash/get';
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
var typeMap = {
|
|
17
|
-
BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
|
|
18
17
|
RADIO: 'radio'
|
|
19
18
|
};
|
|
20
19
|
var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
@@ -36,7 +35,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
|
36
35
|
_defineProperty(this, "options", void 0);
|
|
37
36
|
_defineProperty(this, "render", function (value) {
|
|
38
37
|
var _value$value;
|
|
39
|
-
return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : value.value) && (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, ")"));
|
|
38
|
+
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, ")"));
|
|
40
39
|
});
|
|
41
40
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
42
41
|
var type = _this.type;
|
|
@@ -6,7 +6,7 @@ declare class BasicSelect implements ComponentInterface {
|
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
10
|
isCombinationComponent: boolean;
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
@@ -14,6 +14,7 @@ declare class BasicSelect implements ComponentInterface {
|
|
|
14
14
|
dataType: ComponentInterface['dataType'];
|
|
15
15
|
options: ComponentInterface['options'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getKeyByComponentType: (type: string) => any;
|
|
17
18
|
editRender: (p: any) => React.JSX.Element;
|
|
18
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
20
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -12,6 +12,10 @@ import GetFormItem from "../GetFormItem";
|
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
13
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
14
|
import { SYMBOL } from "../../constant";
|
|
15
|
+
var typeMap = {
|
|
16
|
+
BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
|
|
17
|
+
SELECT: 'select'
|
|
18
|
+
};
|
|
15
19
|
var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
16
20
|
var _this = this,
|
|
17
21
|
_this$componentConfig3;
|
|
@@ -28,6 +32,9 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
28
32
|
_defineProperty(this, "children", void 0);
|
|
29
33
|
_defineProperty(this, "dataType", void 0);
|
|
30
34
|
_defineProperty(this, "options", void 0);
|
|
35
|
+
_defineProperty(this, "getKeyByComponentType", function (type) {
|
|
36
|
+
return typeMap[type] || '';
|
|
37
|
+
});
|
|
31
38
|
_defineProperty(this, "editRender", function (p) {
|
|
32
39
|
var _this$componentConfig, _this$componentConfig2;
|
|
33
40
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
@@ -52,25 +59,30 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
52
59
|
});
|
|
53
60
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
54
61
|
var _record;
|
|
55
|
-
|
|
62
|
+
var type = _this.type;
|
|
63
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record !== void 0 ? _record : '--');
|
|
56
64
|
});
|
|
57
65
|
_defineProperty(this, "renderLog", function (r) {
|
|
58
|
-
|
|
66
|
+
var type = _this.type;
|
|
67
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])])) return null;
|
|
59
68
|
return _this.renderPc(undefined, r);
|
|
60
69
|
});
|
|
61
70
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
62
|
-
|
|
71
|
+
var type = _this.type;
|
|
72
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])];
|
|
63
73
|
});
|
|
64
74
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
65
75
|
var _record2;
|
|
66
|
-
|
|
76
|
+
var type = _this.type;
|
|
77
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
67
78
|
});
|
|
68
79
|
_defineProperty(this, "filterConfig", function (item) {
|
|
69
80
|
var _item$config;
|
|
81
|
+
var key = _this.getKeyByComponentType(item.type);
|
|
70
82
|
return {
|
|
71
83
|
searchDefaultConditions: SYMBOL.in,
|
|
72
84
|
type: item.type,
|
|
73
|
-
id: "".concat(item.id, "
|
|
85
|
+
id: "".concat(item.id, "_").concat(key),
|
|
74
86
|
// 过滤组件id
|
|
75
87
|
name: item.name,
|
|
76
88
|
// 过滤组件名称
|
|
@@ -80,15 +92,15 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
80
92
|
},
|
|
81
93
|
filterFn: function filterFn(value) {
|
|
82
94
|
return function (i) {
|
|
83
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
95
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, key));
|
|
84
96
|
};
|
|
85
97
|
} // 第一个为选中值,第二个参数为表格行记录值
|
|
86
98
|
};
|
|
87
99
|
});
|
|
88
100
|
this.name = options.name;
|
|
89
101
|
this.id = options.id;
|
|
90
|
-
this.sortField = "".concat(options.id, "
|
|
91
|
-
this.formField = "".concat(options.id, "
|
|
102
|
+
this.sortField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
|
|
103
|
+
this.formField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
|
|
92
104
|
this.type = options.type;
|
|
93
105
|
this.componentConfig = options.componentConfig;
|
|
94
106
|
this.rules = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
3
|
-
declare class
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
declare class StatusSelect implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
@@ -11,13 +11,13 @@ declare class BasicReissueStatusSelect implements ComponentInterface {
|
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface[
|
|
15
|
-
options: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
options: ComponentInterface["options"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
editRender: (p: any) => React.JSX.Element;
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
-
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
20
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
19
|
+
renderPc: (value: any, record: Record) => React.JSX.Element | "--";
|
|
20
|
+
renderLog: (r: Record) => React.JSX.Element | "--" | null;
|
|
21
21
|
getComponentValue: (r: Record) => any;
|
|
22
22
|
renderExport: (value: any, record: Record) => any;
|
|
23
23
|
filterConfig: (item: ColumnConfig) => {
|
|
@@ -27,11 +27,9 @@ declare class BasicReissueStatusSelect implements ComponentInterface {
|
|
|
27
27
|
name: string;
|
|
28
28
|
filterComponentType: "MultipleSelect";
|
|
29
29
|
props: {
|
|
30
|
-
options:
|
|
31
|
-
value: string;
|
|
32
|
-
}[];
|
|
30
|
+
options: Record[];
|
|
33
31
|
};
|
|
34
32
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
35
33
|
};
|
|
36
34
|
}
|
|
37
|
-
export default
|
|
35
|
+
export default StatusSelect;
|
|
@@ -8,20 +8,66 @@ 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 {
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { CommonStatus } from "@kmkf-fe-packages/basic-components";
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull, filterFn as _filterFn } from
|
|
15
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { SYMBOL } from "../../constant";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
// const statusOptions: Array<{ value: string }> = [{ value: '成功' }, { value: '失败' }]
|
|
18
|
+
var selectTypeMap = {
|
|
19
|
+
REISSUE_STATUS: {
|
|
20
|
+
options: [{
|
|
21
|
+
value: "成功",
|
|
22
|
+
label: "成功"
|
|
23
|
+
}, {
|
|
24
|
+
value: "失败",
|
|
25
|
+
label: "失败"
|
|
26
|
+
}],
|
|
27
|
+
key: "reissueStatusValue",
|
|
28
|
+
info: "reissueReason",
|
|
29
|
+
failValue: "失败"
|
|
30
|
+
},
|
|
31
|
+
EXCHANGE_STATUS: {
|
|
32
|
+
options: [{
|
|
33
|
+
value: "成功",
|
|
34
|
+
label: "成功"
|
|
35
|
+
}, {
|
|
36
|
+
value: "失败",
|
|
37
|
+
label: "失败"
|
|
38
|
+
}],
|
|
39
|
+
key: "exchangeStatusValue",
|
|
40
|
+
info: "exchangeReason",
|
|
41
|
+
failValue: "失败"
|
|
42
|
+
},
|
|
43
|
+
CREATE_STATUS: {
|
|
44
|
+
options: [{
|
|
45
|
+
value: "成功",
|
|
46
|
+
label: "成功"
|
|
47
|
+
}, {
|
|
48
|
+
value: "失败",
|
|
49
|
+
label: "失败"
|
|
50
|
+
}],
|
|
51
|
+
key: "createStatusValue",
|
|
52
|
+
info: "createReason",
|
|
53
|
+
failValue: "失败"
|
|
54
|
+
},
|
|
55
|
+
RETURN_GOODS_STATUS: {
|
|
56
|
+
options: [{
|
|
57
|
+
value: "成功",
|
|
58
|
+
label: "成功"
|
|
59
|
+
}, {
|
|
60
|
+
value: "失败",
|
|
61
|
+
label: "失败"
|
|
62
|
+
}],
|
|
63
|
+
key: "returnGoodsStatusValue",
|
|
64
|
+
info: "returnGoodsReason",
|
|
65
|
+
failValue: "失败"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
var StatusSelect = /*#__PURE__*/_createClass(function StatusSelect(options) {
|
|
23
69
|
var _this = this;
|
|
24
|
-
_classCallCheck(this,
|
|
70
|
+
_classCallCheck(this, StatusSelect);
|
|
25
71
|
_defineProperty(this, "name", void 0);
|
|
26
72
|
_defineProperty(this, "id", void 0);
|
|
27
73
|
_defineProperty(this, "sortField", void 0);
|
|
@@ -42,66 +88,66 @@ var BasicReissueStatusSelect = /*#__PURE__*/_createClass(function BasicReissueSt
|
|
|
42
88
|
rules: _this.rules,
|
|
43
89
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
44
90
|
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,
|
|
45
|
-
component: /*#__PURE__*/React.createElement(
|
|
91
|
+
component: /*#__PURE__*/React.createElement(CommonStatus, _extends({}, _this.componentConfig, {
|
|
46
92
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
47
|
-
|
|
93
|
+
failValue: selectTypeMap[_this.type].failValue
|
|
48
94
|
}))
|
|
49
95
|
});
|
|
50
96
|
});
|
|
51
97
|
_defineProperty(this, "renderClient", function (record) {
|
|
98
|
+
var _record$_this$id, _record$_this$id2;
|
|
52
99
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
53
100
|
id: _this.id,
|
|
54
101
|
label: _this.name,
|
|
55
|
-
value: (record === null || record === void 0 ? void 0 : record[_this.id]) ||
|
|
102
|
+
value: "".concat(record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.status, ",").concat(record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.reason)
|
|
56
103
|
}) : null;
|
|
57
104
|
});
|
|
58
105
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
59
|
-
|
|
60
|
-
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_reissue_status")]) !== null && _record !== void 0 ? _record : '--');
|
|
106
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]) ? /*#__PURE__*/React.createElement("span", null, [record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)], record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].info)]].join(",")) : "--";
|
|
61
107
|
});
|
|
62
108
|
_defineProperty(this, "renderLog", function (r) {
|
|
63
|
-
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
109
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)])) return null;
|
|
64
110
|
return _this.renderPc(undefined, r);
|
|
65
111
|
});
|
|
66
112
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
67
|
-
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "
|
|
113
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)];
|
|
68
114
|
});
|
|
69
115
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
70
|
-
var
|
|
71
|
-
return (
|
|
116
|
+
var _record;
|
|
117
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(selectTypeMap[_this.type].key)]) !== null && _record !== void 0 ? _record : "--";
|
|
72
118
|
});
|
|
73
119
|
_defineProperty(this, "filterConfig", function (item) {
|
|
74
120
|
return {
|
|
75
121
|
searchDefaultConditions: SYMBOL.in,
|
|
76
122
|
type: item.type,
|
|
77
|
-
id: "".concat(item.id, "
|
|
123
|
+
id: "".concat(item.id, "_").concat(selectTypeMap[_this.type].key),
|
|
78
124
|
// 过滤组件id
|
|
79
125
|
name: item.name,
|
|
80
126
|
// 过滤组件名称
|
|
81
|
-
filterComponentType:
|
|
127
|
+
filterComponentType: "MultipleSelect",
|
|
82
128
|
props: {
|
|
83
|
-
options:
|
|
129
|
+
options: selectTypeMap[_this.type].options
|
|
84
130
|
},
|
|
85
131
|
filterFn: function filterFn(value) {
|
|
86
132
|
return function (i) {
|
|
87
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
133
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, "".concat(selectTypeMap[_this.type].key)));
|
|
88
134
|
};
|
|
89
135
|
} // 第一个为选中值,第二个参数为表格行记录值
|
|
90
136
|
};
|
|
91
137
|
});
|
|
92
138
|
this.name = options.name;
|
|
93
139
|
this.id = options.id;
|
|
94
|
-
this.sortField = "".concat(options.id, "
|
|
95
|
-
this.formField = "".concat(options.id, "
|
|
140
|
+
this.sortField = "".concat(options.id, "_").concat(selectTypeMap[options.type].key);
|
|
141
|
+
this.formField = "".concat(options.id, "_").concat(selectTypeMap[options.type].key);
|
|
96
142
|
this.type = options.type;
|
|
97
143
|
this.componentConfig = _objectSpread(_objectSpread({}, options.componentConfig), {}, {
|
|
98
|
-
options:
|
|
144
|
+
options: selectTypeMap[options.type].options
|
|
99
145
|
});
|
|
100
146
|
this.rules = [];
|
|
101
147
|
this.isCombinationComponent = false;
|
|
102
148
|
this.canSort = true;
|
|
103
149
|
this.children = [];
|
|
104
|
-
this.dataType =
|
|
105
|
-
this.options =
|
|
150
|
+
this.dataType = "string";
|
|
151
|
+
this.options = selectTypeMap[options.type].options;
|
|
106
152
|
});
|
|
107
|
-
export default
|
|
153
|
+
export default StatusSelect;
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue,
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, StatusSelect, CommonTradeId } 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) => CommonTradeId | StatusSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
|
package/dist/esm/factory.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue,
|
|
1
|
+
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, StatusSelect, CommonTradeId } from "./index";
|
|
2
2
|
export var factory = function factory(type, options) {
|
|
3
3
|
var _options$componentCon;
|
|
4
4
|
switch (type) {
|
|
@@ -15,7 +15,6 @@ export var factory = function factory(type, options) {
|
|
|
15
15
|
case "INPUT":
|
|
16
16
|
return new BasicInput(options);
|
|
17
17
|
case "RADIO":
|
|
18
|
-
case "BUYER_MESSAGE_NOTICE":
|
|
19
18
|
return new BasicRadio(options);
|
|
20
19
|
case "TEXTAREA":
|
|
21
20
|
return new BasicTextArea(options);
|
|
@@ -24,6 +23,7 @@ export var factory = function factory(type, options) {
|
|
|
24
23
|
case "DATETIME":
|
|
25
24
|
return new BasicDataTime(options);
|
|
26
25
|
case "SELECT":
|
|
26
|
+
case "BUYER_MESSAGE_NOTICE":
|
|
27
27
|
return new BasicSelect(options);
|
|
28
28
|
case "PICTURE":
|
|
29
29
|
return new BasicPicture(options);
|
|
@@ -128,9 +128,14 @@ export var factory = function factory(type, options) {
|
|
|
128
128
|
case "OUTER_WORK_ORDER_ID_INPUT":
|
|
129
129
|
return new FlowWorkOrderId(options);
|
|
130
130
|
case "REISSUE_STATUS":
|
|
131
|
-
|
|
131
|
+
case "EXCHANGE_STATUS":
|
|
132
|
+
case "CREATE_STATUS":
|
|
133
|
+
case "RETURN_GOODS_STATUS":
|
|
134
|
+
return new StatusSelect(options);
|
|
132
135
|
case "REISSUE_TRADE_ID":
|
|
133
|
-
|
|
136
|
+
case "EXCHANGE_TRADE_ID":
|
|
137
|
+
case "RETURN_GOODS_TRADE_ID":
|
|
138
|
+
return new CommonTradeId(options);
|
|
134
139
|
default:
|
|
135
140
|
return new BasicInput(options);
|
|
136
141
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -51,8 +51,8 @@ export { default as Submitter } from "./components/Submitter";
|
|
|
51
51
|
export { default as Handler } from "./components/Handler";
|
|
52
52
|
export { default as CompletedUser } from "./components/CompletedUser";
|
|
53
53
|
export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
|
|
54
|
-
export { default as
|
|
55
|
-
export { default as
|
|
54
|
+
export { default as StatusSelect } from "./components/StatusSelect";
|
|
55
|
+
export { default as CommonTradeId } from "./components/CommonTradeId";
|
|
56
56
|
export { factory } from "./factory";
|
|
57
57
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
58
58
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
package/dist/esm/index.js
CHANGED
|
@@ -51,8 +51,8 @@ export { default as Submitter } from "./components/Submitter";
|
|
|
51
51
|
export { default as Handler } from "./components/Handler";
|
|
52
52
|
export { default as CompletedUser } from "./components/CompletedUser";
|
|
53
53
|
export { default as FlowWorkOrderId } from "./components/FlowWorkOrderId";
|
|
54
|
-
export { default as
|
|
55
|
-
export { default as
|
|
54
|
+
export { default as StatusSelect } from "./components/StatusSelect";
|
|
55
|
+
export { default as CommonTradeId } from "./components/CommonTradeId";
|
|
56
56
|
export { factory } from "./factory";
|
|
57
57
|
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
58
58
|
export { default as PlatBuyer } from "./commonComponents/PlatBuyer";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.13-alpha.
|
|
3
|
+
"version": "0.8.13-alpha.3",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.8.13-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.13-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.13-alpha.3",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.13-alpha.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "e58e0cdec5ee262d63ba5694f112b422227240cd"
|
|
44
44
|
}
|