@kmkf-fe-packages/services-components 0.6.2 → 0.6.3-alpha.1
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/commonComponents/PlatformAvatar/index.d.ts +7 -0
- package/dist/esm/commonComponents/PlatformAvatar/index.js +28 -0
- package/dist/esm/commonComponents/ShopList/index.d.ts +13 -0
- package/dist/esm/commonComponents/ShopList/index.js +34 -0
- package/dist/esm/components/ActualPayment/index.d.ts +8 -11
- package/dist/esm/components/ActualPayment/index.js +19 -22
- package/dist/esm/components/Address/index.d.ts +6 -14
- package/dist/esm/components/Address/index.js +9 -22
- package/dist/esm/components/Alipay/index.d.ts +9 -18
- package/dist/esm/components/Alipay/index.js +6 -17
- package/dist/esm/components/AlipayAccount/index.d.ts +9 -13
- package/dist/esm/components/AlipayAccount/index.js +19 -24
- package/dist/esm/components/AlipayName/index.d.ts +8 -12
- package/dist/esm/components/AlipayName/index.js +18 -23
- package/dist/esm/components/BuyerNick/index.d.ts +8 -11
- package/dist/esm/components/BuyerNick/index.js +30 -25
- package/dist/esm/components/Cascader/index.d.ts +9 -23
- package/dist/esm/components/Cascader/index.js +29 -27
- package/dist/esm/components/Checkbox/index.d.ts +9 -10
- package/dist/esm/components/Checkbox/index.js +24 -20
- package/dist/esm/components/CommonDataTime/index.d.ts +8 -10
- package/dist/esm/components/CommonDataTime/index.js +19 -20
- package/dist/esm/components/CompletedUser/index.d.ts +28 -0
- package/dist/esm/components/CompletedUser/index.js +60 -0
- package/dist/esm/components/DataTime/index.d.ts +9 -10
- package/dist/esm/components/DataTime/index.js +22 -23
- package/dist/esm/components/EItemEnCode/index.d.ts +8 -10
- package/dist/esm/components/EItemEnCode/index.js +22 -20
- package/dist/esm/components/EItemId/index.d.ts +8 -10
- package/dist/esm/components/EItemId/index.js +22 -20
- package/dist/esm/components/EItemSelect/index.d.ts +4 -11
- package/dist/esm/components/EItemSelect/index.js +6 -18
- package/dist/esm/components/ErpTradeId/index.d.ts +8 -11
- package/dist/esm/components/ErpTradeId/index.js +18 -21
- package/dist/esm/components/Express/index.d.ts +9 -13
- package/dist/esm/components/Express/index.js +18 -29
- package/dist/esm/components/ExpressCode/index.d.ts +8 -12
- package/dist/esm/components/ExpressCode/index.js +17 -22
- package/dist/esm/components/FlowStatusSelect/index.d.ts +13 -33
- package/dist/esm/components/FlowStatusSelect/index.js +27 -22
- package/dist/esm/components/Grade/index.d.ts +4 -11
- package/dist/esm/components/Grade/index.js +6 -19
- package/dist/esm/components/Handler/index.d.ts +32 -0
- package/dist/esm/components/Handler/index.js +64 -0
- package/dist/esm/components/Input/index.d.ts +8 -11
- package/dist/esm/components/Input/index.js +20 -24
- package/dist/esm/components/JstItemSelect/index.d.ts +9 -11
- package/dist/esm/components/JstItemSelect/index.js +35 -20
- package/dist/esm/components/JstLogistics/index.d.ts +16 -11
- package/dist/esm/components/JstLogistics/index.js +31 -20
- package/dist/esm/components/JstSendGood/index.d.ts +9 -11
- package/dist/esm/components/JstSendGood/index.js +35 -20
- package/dist/esm/components/JstSupply/index.d.ts +9 -11
- package/dist/esm/components/JstSupply/index.js +35 -20
- package/dist/esm/components/Logistics/index.d.ts +15 -25
- package/dist/esm/components/Logistics/index.js +10 -17
- package/dist/esm/components/LogisticsInterception/InterceptAddress.d.ts +25 -0
- package/dist/esm/components/LogisticsInterception/InterceptAddress.js +89 -0
- package/dist/esm/components/LogisticsInterception/InterceptType.d.ts +24 -0
- package/dist/esm/components/LogisticsInterception/InterceptType.js +62 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +27 -0
- package/dist/esm/components/LogisticsInterception/index.js +90 -0
- package/dist/esm/components/MultSelect/index.d.ts +9 -10
- package/dist/esm/components/MultSelect/index.js +21 -20
- package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +8 -21
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +14 -26
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +8 -21
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +14 -26
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +8 -16
- package/dist/esm/components/Ordinary/OrdinarySerial.js +14 -16
- package/dist/esm/components/Ordinary/index.d.ts +9 -22
- package/dist/esm/components/Ordinary/index.js +8 -7
- package/dist/esm/components/Payment/AlipayNick.d.ts +9 -22
- package/dist/esm/components/Payment/AlipayNick.js +16 -28
- package/dist/esm/components/Payment/AlipayNo.d.ts +8 -20
- package/dist/esm/components/Payment/AlipayNo.js +16 -27
- package/dist/esm/components/Payment/AlipayTime.d.ts +8 -22
- package/dist/esm/components/Payment/AlipayTime.js +15 -27
- package/dist/esm/components/Payment/BuyerNick.d.ts +8 -21
- package/dist/esm/components/Payment/BuyerNick.js +14 -26
- package/dist/esm/components/Payment/PaymentAmount.d.ts +8 -21
- package/dist/esm/components/Payment/PaymentAmount.js +14 -26
- package/dist/esm/components/Payment/PaymentStatus.d.ts +13 -27
- package/dist/esm/components/Payment/PaymentStatus.js +37 -36
- package/dist/esm/components/Payment/PaymentTid.d.ts +8 -21
- package/dist/esm/components/Payment/PaymentTid.js +14 -26
- package/dist/esm/components/Payment/index.d.ts +23 -96
- package/dist/esm/components/Payment/index.js +8 -17
- package/dist/esm/components/Picture/index.d.ts +8 -10
- package/dist/esm/components/Picture/index.js +6 -18
- package/dist/esm/components/PlatForm/index.d.ts +29 -0
- package/dist/esm/components/PlatForm/index.js +62 -0
- package/dist/esm/components/Radio/index.d.ts +9 -10
- package/dist/esm/components/Radio/index.js +23 -20
- package/dist/esm/components/Rate/index.d.ts +4 -11
- package/dist/esm/components/Rate/index.js +6 -19
- package/dist/esm/components/ReceiverAddress/index.d.ts +4 -12
- package/dist/esm/components/ReceiverAddress/index.js +9 -26
- package/dist/esm/components/ReceiverMobile/index.d.ts +9 -12
- package/dist/esm/components/ReceiverMobile/index.js +20 -23
- package/dist/esm/components/ReceiverName/index.d.ts +8 -11
- package/dist/esm/components/ReceiverName/index.js +20 -23
- package/dist/esm/components/Remark/index.d.ts +8 -11
- package/dist/esm/components/Remark/index.js +18 -21
- package/dist/esm/components/ReturnLogistics/index.d.ts +15 -20
- package/dist/esm/components/ReturnLogistics/index.js +10 -7
- package/dist/esm/components/Select/index.d.ts +9 -10
- package/dist/esm/components/Select/index.js +20 -20
- package/dist/esm/components/ShopInput/index.d.ts +26 -0
- package/dist/esm/components/ShopInput/index.js +71 -0
- package/dist/esm/components/ShopName/index.d.ts +8 -11
- package/dist/esm/components/ShopName/index.js +18 -20
- package/dist/esm/components/Submitter/index.d.ts +28 -0
- package/dist/esm/components/Submitter/index.js +60 -0
- package/dist/esm/components/SystemOrderNo/index.d.ts +8 -11
- package/dist/esm/components/SystemOrderNo/index.js +18 -21
- package/dist/esm/components/TemplateSelect/index.d.ts +9 -11
- package/dist/esm/components/TemplateSelect/index.js +20 -20
- package/dist/esm/components/TextArea/index.d.ts +8 -10
- package/dist/esm/components/TextArea/index.js +18 -20
- package/dist/esm/components/ThirdItemSelect/index.d.ts +8 -10
- package/dist/esm/components/ThirdItemSelect/index.js +24 -20
- package/dist/esm/components/TradeDateTime/index.d.ts +9 -5
- package/dist/esm/components/TradeDateTime/index.js +34 -10
- package/dist/esm/components/TradeId/index.d.ts +8 -5
- package/dist/esm/components/TradeId/index.js +18 -10
- package/dist/esm/components/WorkOrderId/index.d.ts +8 -11
- package/dist/esm/components/WorkOrderId/index.js +20 -22
- package/dist/esm/factory.d.ts +3 -0
- package/dist/esm/factory.js +105 -0
- package/dist/esm/index.d.ts +9 -0
- package/dist/esm/index.js +10 -1
- package/dist/esm/type.d.ts +38 -36
- package/package.json +4 -4
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
2
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
3
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -22,22 +20,15 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
22
20
|
_defineProperty(this, "id", void 0);
|
|
23
21
|
_defineProperty(this, "type", void 0);
|
|
24
22
|
_defineProperty(this, "rules", void 0);
|
|
25
|
-
_defineProperty(this, "canFilter", void 0);
|
|
26
|
-
_defineProperty(this, "canGroup", void 0);
|
|
27
|
-
_defineProperty(this, "canHidden", void 0);
|
|
28
|
-
_defineProperty(this, "dataType", void 0);
|
|
29
|
-
_defineProperty(this, "showContains", void 0);
|
|
30
23
|
_defineProperty(this, "componentConfig", void 0);
|
|
31
24
|
_defineProperty(this, "effects", void 0);
|
|
25
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
26
|
+
_defineProperty(this, "children", void 0);
|
|
32
27
|
_defineProperty(this, "addressDateInstance", void 0);
|
|
33
28
|
_defineProperty(this, "render", function (value, record) {
|
|
34
29
|
var _value$address;
|
|
35
30
|
return /*#__PURE__*/React.createElement("span", {
|
|
36
|
-
className: "pointer"
|
|
37
|
-
onClick: function onClick() {
|
|
38
|
-
var _this$effects;
|
|
39
|
-
return _this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail(record);
|
|
40
|
-
}
|
|
31
|
+
className: "pointer"
|
|
41
32
|
}, value === null || value === void 0 ? void 0 : (_value$address = value.address) === null || _value$address === void 0 ? void 0 : _value$address.map(function (suffix) {
|
|
42
33
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
43
34
|
}).join(''), value === null || value === void 0 ? void 0 : value.detail);
|
|
@@ -58,8 +49,8 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
58
49
|
return /*#__PURE__*/React.createElement("span", {
|
|
59
50
|
className: "pointer",
|
|
60
51
|
onClick: function onClick() {
|
|
61
|
-
var _this$effects2;
|
|
62
|
-
|
|
52
|
+
var _this$effects, _this$effects2;
|
|
53
|
+
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
|
|
63
54
|
}
|
|
64
55
|
}, (_address = address) === null || _address === void 0 ? void 0 : _address.map(function () {
|
|
65
56
|
var suffix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -98,23 +89,15 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
98
89
|
component: /*#__PURE__*/React.createElement(Address, _this.componentConfig)
|
|
99
90
|
});
|
|
100
91
|
});
|
|
101
|
-
_defineProperty(this, "
|
|
102
|
-
return
|
|
103
|
-
dataIndex: _this.id,
|
|
104
|
-
title: _this.name,
|
|
105
|
-
componentType: _this.editRender,
|
|
106
|
-
renderExport: _this.renderExport
|
|
107
|
-
});
|
|
92
|
+
_defineProperty(this, "filterConfig", function () {
|
|
93
|
+
return [];
|
|
108
94
|
});
|
|
109
95
|
this.name = options.name;
|
|
110
96
|
this.id = options.id;
|
|
111
97
|
this.type = options.type;
|
|
112
|
-
this.canFilter = false;
|
|
113
|
-
this.canGroup = false;
|
|
114
|
-
this.canHidden = true;
|
|
115
|
-
this.dataType = 'array';
|
|
116
|
-
this.showContains = false;
|
|
117
98
|
this.componentConfig = options.componentConfig;
|
|
99
|
+
this.isCombinationComponent = false;
|
|
100
|
+
this.children = [];
|
|
118
101
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
119
102
|
validator: function validator(_, value) {
|
|
120
103
|
var _value$address2;
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare class ReceiverMobile implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
type: string;
|
|
7
7
|
rules: any[];
|
|
8
|
-
canFilter: boolean;
|
|
9
|
-
canGroup: boolean;
|
|
10
|
-
canHidden: boolean;
|
|
11
|
-
dataType: DataType;
|
|
12
|
-
showContains: boolean;
|
|
13
8
|
componentConfig: ComponentInterface["componentConfig"];
|
|
14
9
|
effects: ComponentInterface["effects"];
|
|
10
|
+
isCombinationComponent: boolean;
|
|
11
|
+
children: ComponentInterface[];
|
|
15
12
|
constructor(options: PickOption);
|
|
16
|
-
render: (value: string, record
|
|
13
|
+
render: (value: string, record?: Record) => JSX.Element;
|
|
17
14
|
renderClient: (record: Record) => JSX.Element | null;
|
|
18
15
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
19
16
|
renderExport: (value: any, record: Record) => any;
|
|
20
17
|
editRender: (value: any) => JSX.Element;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
filterConfig: (item: ColumnConfig) => {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
filterComponentType: "Input";
|
|
22
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
26
23
|
};
|
|
27
24
|
}
|
|
28
25
|
export default ReceiverMobile;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
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); }
|
|
5
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); } }
|
|
6
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; }
|
|
@@ -12,7 +10,7 @@ import React from 'react';
|
|
|
12
10
|
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
11
|
import GetFormItem from "../GetFormItem";
|
|
14
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
14
|
var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options) {
|
|
17
15
|
var _this = this;
|
|
18
16
|
_classCallCheck(this, ReceiverMobile);
|
|
@@ -20,13 +18,10 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
|
|
|
20
18
|
_defineProperty(this, "id", void 0);
|
|
21
19
|
_defineProperty(this, "type", void 0);
|
|
22
20
|
_defineProperty(this, "rules", void 0);
|
|
23
|
-
_defineProperty(this, "canFilter", void 0);
|
|
24
|
-
_defineProperty(this, "canGroup", void 0);
|
|
25
|
-
_defineProperty(this, "canHidden", void 0);
|
|
26
|
-
_defineProperty(this, "dataType", void 0);
|
|
27
|
-
_defineProperty(this, "showContains", void 0);
|
|
28
21
|
_defineProperty(this, "componentConfig", void 0);
|
|
29
22
|
_defineProperty(this, "effects", void 0);
|
|
23
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
30
25
|
_defineProperty(this, "render", function (value, record) {
|
|
31
26
|
return /*#__PURE__*/React.createElement("span", null, value);
|
|
32
27
|
});
|
|
@@ -44,8 +39,8 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
|
|
|
44
39
|
return /*#__PURE__*/React.createElement("span", {
|
|
45
40
|
className: "pointer",
|
|
46
41
|
onClick: function onClick() {
|
|
47
|
-
var _this$effects;
|
|
48
|
-
|
|
42
|
+
var _this$effects, _this$effects2;
|
|
43
|
+
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
|
|
49
44
|
}
|
|
50
45
|
}, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_receiveMobile")]);
|
|
51
46
|
});
|
|
@@ -67,25 +62,27 @@ var ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options)
|
|
|
67
62
|
}))
|
|
68
63
|
});
|
|
69
64
|
});
|
|
70
|
-
_defineProperty(this, "
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
66
|
+
return {
|
|
67
|
+
id: item.id,
|
|
68
|
+
// 过滤组件id
|
|
69
|
+
name: item.name,
|
|
70
|
+
// 过滤组件名称
|
|
71
|
+
filterComponentType: 'Input',
|
|
72
|
+
filterFn: function filterFn(value) {
|
|
73
|
+
return function (i) {
|
|
74
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'receiveMobile')).includes(value);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
78
|
});
|
|
79
79
|
this.name = options.name;
|
|
80
80
|
this.id = options.id;
|
|
81
81
|
this.type = options.type;
|
|
82
|
-
this.canFilter = true;
|
|
83
|
-
this.canGroup = false;
|
|
84
|
-
this.canHidden = true;
|
|
85
|
-
this.dataType = 'string';
|
|
86
|
-
this.showContains = true;
|
|
87
82
|
this.componentConfig = options.componentConfig;
|
|
88
83
|
this.rules = [];
|
|
89
84
|
this.effects = options.effects;
|
|
85
|
+
this.isCombinationComponent = false;
|
|
86
|
+
this.children = [];
|
|
90
87
|
});
|
|
91
88
|
export default ReceiverMobile;
|
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare class ReceiverName implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
type: string;
|
|
7
7
|
rules: any[];
|
|
8
|
-
canFilter: boolean;
|
|
9
|
-
canGroup: boolean;
|
|
10
|
-
canHidden: boolean;
|
|
11
|
-
dataType: DataType;
|
|
12
|
-
showContains: boolean;
|
|
13
8
|
componentConfig: ComponentInterface["componentConfig"];
|
|
14
9
|
effects: ComponentInterface["effects"];
|
|
10
|
+
isCombinationComponent: boolean;
|
|
11
|
+
children: ComponentInterface[];
|
|
15
12
|
constructor(options: PickOption);
|
|
16
13
|
render: (value: string, record: any) => JSX.Element;
|
|
17
14
|
renderClient: (record: any) => JSX.Element | null;
|
|
18
15
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
19
16
|
renderExport: (value: any, record: Record) => any;
|
|
20
17
|
editRender: () => JSX.Element;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
filterConfig: (item: ColumnConfig) => {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
filterComponentType: "Input";
|
|
22
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
26
23
|
};
|
|
27
24
|
}
|
|
28
25
|
export default ReceiverName;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
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); }
|
|
5
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); } }
|
|
6
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; }
|
|
@@ -12,7 +10,7 @@ import React from 'react';
|
|
|
12
10
|
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
11
|
import GetFormItem from "../GetFormItem";
|
|
14
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
14
|
var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
|
|
17
15
|
var _this = this;
|
|
18
16
|
_classCallCheck(this, ReceiverName);
|
|
@@ -20,13 +18,10 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
|
|
|
20
18
|
_defineProperty(this, "id", void 0);
|
|
21
19
|
_defineProperty(this, "type", void 0);
|
|
22
20
|
_defineProperty(this, "rules", void 0);
|
|
23
|
-
_defineProperty(this, "canFilter", void 0);
|
|
24
|
-
_defineProperty(this, "canGroup", void 0);
|
|
25
|
-
_defineProperty(this, "canHidden", void 0);
|
|
26
|
-
_defineProperty(this, "dataType", void 0);
|
|
27
|
-
_defineProperty(this, "showContains", void 0);
|
|
28
21
|
_defineProperty(this, "componentConfig", void 0);
|
|
29
22
|
_defineProperty(this, "effects", void 0);
|
|
23
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
30
25
|
_defineProperty(this, "render", function (value, record) {
|
|
31
26
|
return /*#__PURE__*/React.createElement("span", null, value);
|
|
32
27
|
});
|
|
@@ -44,8 +39,8 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
|
|
|
44
39
|
return /*#__PURE__*/React.createElement("span", {
|
|
45
40
|
className: "pointer",
|
|
46
41
|
onClick: function onClick() {
|
|
47
|
-
var _this$effects;
|
|
48
|
-
|
|
42
|
+
var _this$effects, _this$effects2;
|
|
43
|
+
typeof (_this === null || _this === void 0 ? void 0 : (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.queryWorkOrderDetail) === 'function' && (_this === null || _this === void 0 ? void 0 : (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.queryWorkOrderDetail(record));
|
|
49
44
|
}
|
|
50
45
|
}, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_receiveName")]);
|
|
51
46
|
});
|
|
@@ -64,25 +59,27 @@ var ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
|
|
|
64
59
|
}))
|
|
65
60
|
});
|
|
66
61
|
});
|
|
67
|
-
_defineProperty(this, "
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
63
|
+
return {
|
|
64
|
+
id: item.id,
|
|
65
|
+
// 过滤组件id
|
|
66
|
+
name: item.name,
|
|
67
|
+
// 过滤组件名称
|
|
68
|
+
filterComponentType: 'Input',
|
|
69
|
+
filterFn: function filterFn(value) {
|
|
70
|
+
return function (i) {
|
|
71
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'receiveName')).includes(value);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
75
|
});
|
|
76
76
|
this.name = options.name;
|
|
77
77
|
this.id = options.id;
|
|
78
78
|
this.type = options.type;
|
|
79
|
-
this.canFilter = true;
|
|
80
|
-
this.canGroup = false;
|
|
81
|
-
this.canHidden = true;
|
|
82
|
-
this.dataType = 'string';
|
|
83
|
-
this.showContains = true;
|
|
84
79
|
this.componentConfig = options.componentConfig;
|
|
85
80
|
this.rules = [];
|
|
86
81
|
this.effects = options.effects;
|
|
82
|
+
this.isCombinationComponent = false;
|
|
83
|
+
this.children = [];
|
|
87
84
|
});
|
|
88
85
|
export default ReceiverName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare type Value = {
|
|
4
4
|
flag?: number | string;
|
|
5
5
|
remark?: string;
|
|
@@ -9,25 +9,22 @@ declare class ERemark implements ComponentInterface {
|
|
|
9
9
|
id: string;
|
|
10
10
|
type: string;
|
|
11
11
|
rules: any[];
|
|
12
|
-
canFilter: boolean;
|
|
13
|
-
canGroup: boolean;
|
|
14
|
-
canHidden: boolean;
|
|
15
|
-
dataType: DataType;
|
|
16
|
-
showContains: boolean;
|
|
17
12
|
componentConfig: ComponentInterface["componentConfig"];
|
|
18
13
|
imgList: any[];
|
|
19
14
|
flagColors: string[];
|
|
15
|
+
isCombinationComponent: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
20
17
|
constructor(options: PickOption);
|
|
21
18
|
render: (value: Value) => JSX.Element;
|
|
22
19
|
renderClient: (record: Record) => JSX.Element | null;
|
|
23
20
|
renderPc: (value: unknown, record: Record) => JSX.Element;
|
|
24
21
|
renderExport: (value: unknown, record: Record) => any;
|
|
25
22
|
editRender: () => JSX.Element;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
filterConfig: (item: ColumnConfig) => {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
filterComponentType: "Input";
|
|
27
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
31
28
|
};
|
|
32
29
|
}
|
|
33
30
|
export default ERemark;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
2
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
5
3
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -18,7 +16,7 @@ import trade4 from "./flag/trade-icon-flag-4.png";
|
|
|
18
16
|
import trade5 from "./flag/trade-icon-flag-5.png";
|
|
19
17
|
import get from 'lodash/get';
|
|
20
18
|
import ItemView from "../../commonComponents/ItemView";
|
|
21
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
19
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
22
20
|
var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
|
|
23
21
|
var _this = this,
|
|
24
22
|
_this$componentConfig3;
|
|
@@ -27,14 +25,11 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
|
|
|
27
25
|
_defineProperty(this, "id", void 0);
|
|
28
26
|
_defineProperty(this, "type", void 0);
|
|
29
27
|
_defineProperty(this, "rules", void 0);
|
|
30
|
-
_defineProperty(this, "canFilter", void 0);
|
|
31
|
-
_defineProperty(this, "canGroup", void 0);
|
|
32
|
-
_defineProperty(this, "canHidden", void 0);
|
|
33
|
-
_defineProperty(this, "dataType", void 0);
|
|
34
|
-
_defineProperty(this, "showContains", void 0);
|
|
35
28
|
_defineProperty(this, "componentConfig", void 0);
|
|
36
29
|
_defineProperty(this, "imgList", void 0);
|
|
37
30
|
_defineProperty(this, "flagColors", void 0);
|
|
31
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
32
|
+
_defineProperty(this, "children", void 0);
|
|
38
33
|
_defineProperty(this, "render", function (value) {
|
|
39
34
|
var index = get(value, 'flag');
|
|
40
35
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -77,23 +72,23 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
|
|
|
77
72
|
component: /*#__PURE__*/React.createElement(Remark, _this.componentConfig)
|
|
78
73
|
});
|
|
79
74
|
});
|
|
80
|
-
_defineProperty(this, "
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
75
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
76
|
+
return {
|
|
77
|
+
id: item.id,
|
|
78
|
+
// 过滤组件id
|
|
79
|
+
name: item.name,
|
|
80
|
+
// 过滤组件名称
|
|
81
|
+
filterComponentType: 'Input',
|
|
82
|
+
filterFn: function filterFn(value) {
|
|
83
|
+
return function (i) {
|
|
84
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'remark')).includes(value);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
88
|
});
|
|
89
89
|
this.name = options.name;
|
|
90
90
|
this.id = options.id;
|
|
91
91
|
this.type = options.type;
|
|
92
|
-
this.canFilter = false;
|
|
93
|
-
this.canGroup = false;
|
|
94
|
-
this.canHidden = true;
|
|
95
|
-
this.dataType = 'string';
|
|
96
|
-
this.showContains = false;
|
|
97
92
|
this.componentConfig = options.componentConfig;
|
|
98
93
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
99
94
|
validator: function validator(_, value) {
|
|
@@ -109,5 +104,7 @@ var ERemark = /*#__PURE__*/_createClass(function ERemark(options) {
|
|
|
109
104
|
}] : [];
|
|
110
105
|
this.imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
|
|
111
106
|
this.flagColors = ['gray', 'red', 'yellow', 'green', 'blue', 'purple'];
|
|
107
|
+
this.isCombinationComponent = false;
|
|
108
|
+
this.children = [];
|
|
112
109
|
});
|
|
113
110
|
export default ERemark;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption, DataType } from '../../type';
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, ColumnConfig } from '../../type';
|
|
3
3
|
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
4
|
import Express from '../Express';
|
|
5
5
|
import ExpressCode from '../ExpressCode';
|
|
@@ -17,30 +17,25 @@ declare class ReturnLogistics implements ComponentInterface {
|
|
|
17
17
|
expressDateInstance: ExpressData;
|
|
18
18
|
express: Express;
|
|
19
19
|
expressCode: ExpressCode;
|
|
20
|
+
isCombinationComponent: boolean;
|
|
21
|
+
children: ComponentInterface[];
|
|
20
22
|
constructor(options: PickOption);
|
|
21
23
|
render: () => null;
|
|
22
24
|
renderClient: (record: any) => JSX.Element;
|
|
23
25
|
renderPc: () => null;
|
|
24
26
|
renderExport: () => null;
|
|
25
27
|
editRender: (value: any) => JSX.Element;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
groupFieldPath: string;
|
|
39
|
-
renderExport: (value: string, record: import("../../type").Record) => string;
|
|
40
|
-
render: (value: any, record: import("../../type").Record) => JSX.Element;
|
|
41
|
-
}))[];
|
|
42
|
-
canHidden: boolean;
|
|
43
|
-
dataIndex: string;
|
|
44
|
-
};
|
|
28
|
+
filterConfig: (item: ColumnConfig) => ({
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
filterComponentType: "MultipleSelect";
|
|
32
|
+
options: any[];
|
|
33
|
+
filterFn: (value: string) => (i: import("../../type").Record) => boolean;
|
|
34
|
+
} | {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
filterComponentType: "Input";
|
|
38
|
+
filterFn: (value: string) => (i: import("../../type").Record) => boolean;
|
|
39
|
+
})[];
|
|
45
40
|
}
|
|
46
41
|
export default ReturnLogistics;
|
|
@@ -31,6 +31,8 @@ var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options
|
|
|
31
31
|
_defineProperty(this, "expressDateInstance", void 0);
|
|
32
32
|
_defineProperty(this, "express", void 0);
|
|
33
33
|
_defineProperty(this, "expressCode", void 0);
|
|
34
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
35
|
+
_defineProperty(this, "children", void 0);
|
|
34
36
|
_defineProperty(this, "render", function () {
|
|
35
37
|
return null;
|
|
36
38
|
});
|
|
@@ -56,13 +58,12 @@ var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options
|
|
|
56
58
|
}))
|
|
57
59
|
});
|
|
58
60
|
});
|
|
59
|
-
_defineProperty(this, "
|
|
60
|
-
return {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
61
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
62
|
+
return [_this.express.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
63
|
+
subKey: 'returnLogisticsCompany'
|
|
64
|
+
})), _this.expressCode.filterConfig(_objectSpread(_objectSpread({}, item), {}, {
|
|
65
|
+
subKey: 'returnLogisticsCode'
|
|
66
|
+
}))];
|
|
66
67
|
});
|
|
67
68
|
this.name = options.name;
|
|
68
69
|
this.id = options.id;
|
|
@@ -82,6 +83,8 @@ var ReturnLogistics = /*#__PURE__*/_createClass(function ReturnLogistics(options
|
|
|
82
83
|
name: '退货物流单号',
|
|
83
84
|
id: "".concat(options.id, "_returnLogisticsCode")
|
|
84
85
|
}));
|
|
86
|
+
this.isCombinationComponent = true;
|
|
87
|
+
this.children = [this.express, this.expressCode];
|
|
85
88
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
86
89
|
validator: function validator(_, value) {
|
|
87
90
|
var _this$componentConfig4;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
3
3
|
declare class BasicSelect implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
type: string;
|
|
7
7
|
rules: any[];
|
|
8
|
-
canFilter: boolean;
|
|
9
|
-
canGroup: boolean;
|
|
10
|
-
canHidden: boolean;
|
|
11
|
-
dataType: DataType;
|
|
12
|
-
showContains: boolean;
|
|
13
8
|
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
isCombinationComponent: boolean;
|
|
10
|
+
children: ComponentInterface[];
|
|
14
11
|
constructor(options: PickOption);
|
|
15
12
|
render: (value: string) => JSX.Element;
|
|
16
13
|
editRender: () => JSX.Element;
|
|
17
14
|
renderClient: (record: any) => JSX.Element | null;
|
|
18
15
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
19
16
|
renderExport: (value: any, record: Record) => any;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
filterConfig: (item: ColumnConfig) => {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
filterComponentType: "MultipleSelect";
|
|
21
|
+
options: any[];
|
|
22
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
24
23
|
};
|
|
25
24
|
}
|
|
26
25
|
export default BasicSelect;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
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); }
|
|
5
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); } }
|
|
6
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; }
|
|
@@ -12,7 +10,7 @@ import React from 'react';
|
|
|
12
10
|
import { ApaasSelect } from '@kmkf-fe-packages/basic-components';
|
|
13
11
|
import GetFormItem from "../GetFormItem";
|
|
14
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
14
|
var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
17
15
|
var _this = this;
|
|
18
16
|
_classCallCheck(this, BasicSelect);
|
|
@@ -20,12 +18,9 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
20
18
|
_defineProperty(this, "id", void 0);
|
|
21
19
|
_defineProperty(this, "type", void 0);
|
|
22
20
|
_defineProperty(this, "rules", void 0);
|
|
23
|
-
_defineProperty(this, "canFilter", void 0);
|
|
24
|
-
_defineProperty(this, "canGroup", void 0);
|
|
25
|
-
_defineProperty(this, "canHidden", void 0);
|
|
26
|
-
_defineProperty(this, "dataType", void 0);
|
|
27
|
-
_defineProperty(this, "showContains", void 0);
|
|
28
21
|
_defineProperty(this, "componentConfig", void 0);
|
|
22
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
23
|
+
_defineProperty(this, "children", void 0);
|
|
29
24
|
_defineProperty(this, "render", function (value) {
|
|
30
25
|
return /*#__PURE__*/React.createElement("span", null, value);
|
|
31
26
|
});
|
|
@@ -57,23 +52,28 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
57
52
|
var _record2;
|
|
58
53
|
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_select")]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
59
54
|
});
|
|
60
|
-
_defineProperty(this, "
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
55
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
56
|
+
var _item$config;
|
|
57
|
+
return {
|
|
58
|
+
id: item.id,
|
|
59
|
+
// 过滤组件id
|
|
60
|
+
name: item.name,
|
|
61
|
+
// 过滤组件名称
|
|
62
|
+
filterComponentType: 'MultipleSelect',
|
|
63
|
+
options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || [],
|
|
64
|
+
filterFn: function filterFn(value) {
|
|
65
|
+
return function (i) {
|
|
66
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, 'select'));
|
|
67
|
+
};
|
|
68
|
+
} // 第一个为选中值,第二个参数为表格行记录值
|
|
69
|
+
};
|
|
67
70
|
});
|
|
68
71
|
this.name = options.name;
|
|
69
72
|
this.id = options.id;
|
|
70
73
|
this.type = options.type;
|
|
71
|
-
this.canFilter = true;
|
|
72
|
-
this.canGroup = true;
|
|
73
|
-
this.canHidden = true;
|
|
74
|
-
this.showContains = false;
|
|
75
|
-
this.dataType = 'string';
|
|
76
74
|
this.componentConfig = options.componentConfig;
|
|
77
75
|
this.rules = [];
|
|
76
|
+
this.isCombinationComponent = false;
|
|
77
|
+
this.children = [];
|
|
78
78
|
});
|
|
79
79
|
export default BasicSelect;
|