@kmkf-fe-packages/services-components 0.3.1-alpha.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/commonComponents/ItemView/index.d.ts +7 -0
- package/dist/esm/commonComponents/ItemView/index.js +15 -0
- package/dist/esm/commonComponents/ItemView/index.module.scss +20 -0
- package/dist/esm/components/ActualPayment/index.d.ts +27 -0
- package/dist/esm/components/ActualPayment/index.js +82 -0
- package/dist/esm/components/Address/index.d.ts +37 -0
- package/dist/esm/components/Address/index.js +112 -0
- package/dist/esm/components/Alipay/index.d.ts +36 -0
- package/dist/esm/components/Alipay/index.js +88 -0
- package/dist/esm/components/AlipayAccount/index.d.ts +29 -0
- package/dist/esm/components/AlipayAccount/index.js +86 -0
- package/dist/esm/components/AlipayName/index.d.ts +29 -0
- package/dist/esm/components/AlipayName/index.js +86 -0
- package/dist/esm/components/BuyerNick/index.d.ts +31 -0
- package/dist/esm/components/BuyerNick/index.js +100 -0
- package/dist/esm/components/Cascader/index.d.ts +45 -0
- package/dist/esm/components/Cascader/index.js +112 -0
- package/dist/esm/components/Checkbox/index.d.ts +31 -0
- package/dist/esm/components/Checkbox/index.js +102 -0
- package/dist/esm/components/Common/img/default-img.png +0 -0
- package/dist/esm/components/Common/index.d.ts +18 -0
- package/dist/esm/components/Common/index.js +222 -0
- package/dist/esm/components/Common/index.module.less +8 -0
- package/dist/esm/components/CommonDataTime/index.d.ts +30 -0
- package/dist/esm/components/CommonDataTime/index.js +79 -0
- package/dist/esm/components/DataTime/ApaasDate.d.ts +9 -0
- package/dist/esm/components/DataTime/ApaasDate.js +22 -0
- package/dist/esm/components/DataTime/index.d.ts +29 -0
- package/dist/esm/components/DataTime/index.js +103 -0
- package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +3 -0
- package/dist/esm/components/EItemEnCode/ItemEncode.js +26 -0
- package/dist/esm/components/EItemEnCode/index.d.ts +27 -0
- package/dist/esm/components/EItemEnCode/index.js +109 -0
- package/dist/esm/components/EItemId/ItemId.d.ts +4 -0
- package/dist/esm/components/EItemId/ItemId.js +26 -0
- package/dist/esm/components/EItemId/index.d.ts +27 -0
- package/dist/esm/components/EItemId/index.js +110 -0
- package/dist/esm/components/EItemSelect/ItemSelect.d.ts +4 -0
- package/dist/esm/components/EItemSelect/ItemSelect.js +27 -0
- package/dist/esm/components/EItemSelect/index.d.ts +27 -0
- package/dist/esm/components/EItemSelect/index.js +92 -0
- package/dist/esm/components/ErpTradeId/index.d.ts +27 -0
- package/dist/esm/components/ErpTradeId/index.js +76 -0
- package/dist/esm/components/Express/index.d.ts +31 -0
- package/dist/esm/components/Express/index.js +91 -0
- package/dist/esm/components/ExpressCode/index.d.ts +28 -0
- package/dist/esm/components/ExpressCode/index.js +84 -0
- package/dist/esm/components/ExpressCompany/index.d.ts +3 -0
- package/dist/esm/components/ExpressCompany/index.js +20 -0
- package/dist/esm/components/FlowStatusSelect/index.d.ts +51 -0
- package/dist/esm/components/FlowStatusSelect/index.js +124 -0
- package/dist/esm/components/GetFormItem/index.d.ts +10 -0
- package/dist/esm/components/GetFormItem/index.js +28 -0
- package/dist/esm/components/Grade/index.d.ts +26 -0
- package/dist/esm/components/Grade/index.js +75 -0
- package/dist/esm/components/Input/index.d.ts +27 -0
- package/dist/esm/components/Input/index.js +84 -0
- package/dist/esm/components/JstItemSelect/index.d.ts +29 -0
- package/dist/esm/components/JstItemSelect/index.js +115 -0
- package/dist/esm/components/JstLogistics/index.d.ts +29 -0
- package/dist/esm/components/JstLogistics/index.js +107 -0
- package/dist/esm/components/JstSendGood/index.d.ts +27 -0
- package/dist/esm/components/JstSendGood/index.js +112 -0
- package/dist/esm/components/JstSupply/index.d.ts +27 -0
- package/dist/esm/components/JstSupply/index.js +113 -0
- package/dist/esm/components/Logistics/index.d.ts +44 -0
- package/dist/esm/components/Logistics/index.js +107 -0
- package/dist/esm/components/MultSelect/index.d.ts +27 -0
- package/dist/esm/components/MultSelect/index.js +84 -0
- package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +37 -0
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +90 -0
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +37 -0
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +90 -0
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +37 -0
- package/dist/esm/components/Ordinary/OrdinarySerial.js +83 -0
- package/dist/esm/components/Ordinary/index.d.ts +46 -0
- package/dist/esm/components/Ordinary/index.js +90 -0
- package/dist/esm/components/OrdinaryHeader/index.d.ts +7 -0
- package/dist/esm/components/OrdinaryHeader/index.js +157 -0
- package/dist/esm/components/OrdinaryHeader/index.module.less +46 -0
- package/dist/esm/components/Payment/AlipayNick.d.ts +37 -0
- package/dist/esm/components/Payment/AlipayNick.js +91 -0
- package/dist/esm/components/Payment/AlipayNo.d.ts +36 -0
- package/dist/esm/components/Payment/AlipayNo.js +98 -0
- package/dist/esm/components/Payment/AlipayTime.d.ts +37 -0
- package/dist/esm/components/Payment/AlipayTime.js +90 -0
- package/dist/esm/components/Payment/BuyerNick.d.ts +36 -0
- package/dist/esm/components/Payment/BuyerNick.js +104 -0
- package/dist/esm/components/Payment/PaymentAmount.d.ts +36 -0
- package/dist/esm/components/Payment/PaymentAmount.js +88 -0
- package/dist/esm/components/Payment/PaymentStatus.d.ts +48 -0
- package/dist/esm/components/Payment/PaymentStatus.js +93 -0
- package/dist/esm/components/Payment/PaymentTid.d.ts +36 -0
- package/dist/esm/components/Payment/PaymentTid.js +81 -0
- package/dist/esm/components/Payment/index.d.ts +88 -0
- package/dist/esm/components/Payment/index.js +118 -0
- package/dist/esm/components/Picture/index.d.ts +31 -0
- package/dist/esm/components/Picture/index.js +118 -0
- package/dist/esm/components/Popover/index.d.ts +3 -0
- package/dist/esm/components/Popover/index.js +51 -0
- package/dist/esm/components/Popover/index.module.less +22 -0
- package/dist/esm/components/Radio/index.d.ts +30 -0
- package/dist/esm/components/Radio/index.js +93 -0
- package/dist/esm/components/Rate/index.d.ts +34 -0
- package/dist/esm/components/Rate/index.js +158 -0
- package/dist/esm/components/ReceiverAddress/index.d.ts +35 -0
- package/dist/esm/components/ReceiverAddress/index.js +133 -0
- package/dist/esm/components/ReceiverMobile/index.d.ts +28 -0
- package/dist/esm/components/ReceiverMobile/index.js +91 -0
- package/dist/esm/components/ReceiverName/index.d.ts +28 -0
- package/dist/esm/components/ReceiverName/index.js +88 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-0.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-1.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-2.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-3.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-4.png +0 -0
- package/dist/esm/components/Remark/flag/trade-icon-flag-5.png +0 -0
- package/dist/esm/components/Remark/index.d.ts +33 -0
- package/dist/esm/components/Remark/index.js +113 -0
- package/dist/esm/components/ReturnLogistics/index.d.ts +44 -0
- package/dist/esm/components/ReturnLogistics/index.js +107 -0
- package/dist/esm/components/Select/index.d.ts +26 -0
- package/dist/esm/components/Select/index.js +79 -0
- package/dist/esm/components/ShopName/index.d.ts +27 -0
- package/dist/esm/components/ShopName/index.js +78 -0
- package/dist/esm/components/SystemOrderNo/index.d.ts +28 -0
- package/dist/esm/components/SystemOrderNo/index.js +81 -0
- package/dist/esm/components/TemplateSelect/index.d.ts +28 -0
- package/dist/esm/components/TemplateSelect/index.js +79 -0
- package/dist/esm/components/TextArea/index.d.ts +26 -0
- package/dist/esm/components/TextArea/index.js +78 -0
- package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +4 -0
- package/dist/esm/components/ThirdItemSelect/ItemEncode.js +31 -0
- package/dist/esm/components/ThirdItemSelect/index.d.ts +27 -0
- package/dist/esm/components/ThirdItemSelect/index.js +120 -0
- package/dist/esm/components/TradeDateTime/index.d.ts +27 -0
- package/dist/esm/components/TradeDateTime/index.js +92 -0
- package/dist/esm/components/TradeId/index.d.ts +28 -0
- package/dist/esm/components/TradeId/index.js +89 -0
- package/dist/esm/components/WorkOrderId/img/repeat.png +0 -0
- package/dist/esm/components/WorkOrderId/index.d.ts +28 -0
- package/dist/esm/components/WorkOrderId/index.js +98 -0
- package/dist/esm/index.d.ts +40 -0
- package/dist/esm/index.js +40 -0
- package/dist/esm/type.d.ts +174 -0
- package/dist/esm/type.js +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover } from 'antd';
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
10
|
+
import styles from "./index.module.less";
|
|
11
|
+
import defaultImg from "./img/default-img.png";
|
|
12
|
+
export var getFormItem = function getFormItem(_ref) {
|
|
13
|
+
var name = _ref.name,
|
|
14
|
+
title = _ref.title,
|
|
15
|
+
_ref$rules = _ref.rules,
|
|
16
|
+
rules = _ref$rules === void 0 ? [] : _ref$rules,
|
|
17
|
+
required = _ref.required,
|
|
18
|
+
component = _ref.component;
|
|
19
|
+
var newRules = rules;
|
|
20
|
+
if (required) {
|
|
21
|
+
newRules = rules.concat({
|
|
22
|
+
required: true,
|
|
23
|
+
message: "\u8BF7\u8F93\u5165".concat(title)
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "form-item--wrap",
|
|
28
|
+
style: {
|
|
29
|
+
position: 'relative'
|
|
30
|
+
}
|
|
31
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
32
|
+
name: name,
|
|
33
|
+
label: title,
|
|
34
|
+
rules: newRules,
|
|
35
|
+
className: "form-item-label--index"
|
|
36
|
+
}, component));
|
|
37
|
+
};
|
|
38
|
+
//图片展示
|
|
39
|
+
export var showImage = function showImage(_ref2) {
|
|
40
|
+
var item = _ref2.item,
|
|
41
|
+
type = _ref2.type,
|
|
42
|
+
index = _ref2.index;
|
|
43
|
+
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: styles.goodImgBox,
|
|
46
|
+
key: index
|
|
47
|
+
}, (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
|
|
48
|
+
target: "_blank",
|
|
49
|
+
href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
|
|
50
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
51
|
+
style: {
|
|
52
|
+
width: '40px',
|
|
53
|
+
height: '40px',
|
|
54
|
+
objectFit: 'contain'
|
|
55
|
+
},
|
|
56
|
+
src: picUrl
|
|
57
|
+
})) : /*#__PURE__*/React.createElement("img", {
|
|
58
|
+
style: {
|
|
59
|
+
width: '40px',
|
|
60
|
+
height: '40px',
|
|
61
|
+
objectFit: 'contain'
|
|
62
|
+
},
|
|
63
|
+
src: picUrl
|
|
64
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: styles.options
|
|
66
|
+
}, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
67
|
+
title: '商品id',
|
|
68
|
+
text: item.numIid
|
|
69
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
|
70
|
+
title: '商品编码',
|
|
71
|
+
text: item.outerId
|
|
72
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
73
|
+
title: '供应商编码',
|
|
74
|
+
text: item.itemId || item.supplierItemOuterId
|
|
75
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
76
|
+
title: '供应商名称',
|
|
77
|
+
text: item.supplierName
|
|
78
|
+
}), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
79
|
+
title: '规格',
|
|
80
|
+
text: item.propertiesName
|
|
81
|
+
})));
|
|
82
|
+
};
|
|
83
|
+
//文字提示
|
|
84
|
+
var TextTool = function TextTool(_ref3) {
|
|
85
|
+
var title = _ref3.title,
|
|
86
|
+
text = _ref3.text;
|
|
87
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
88
|
+
placement: "topLeft",
|
|
89
|
+
title: text
|
|
90
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
style: {
|
|
92
|
+
overflow: 'hidden',
|
|
93
|
+
whiteSpace: 'nowrap',
|
|
94
|
+
textOverflow: 'ellipsis'
|
|
95
|
+
}
|
|
96
|
+
}, title, ":", text));
|
|
97
|
+
};
|
|
98
|
+
//查看更多图片
|
|
99
|
+
export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
100
|
+
var total = _ref4.total,
|
|
101
|
+
_ref4$allImage = _ref4.allImage,
|
|
102
|
+
allImage = _ref4$allImage === void 0 ? [] : _ref4$allImage,
|
|
103
|
+
type = _ref4.type;
|
|
104
|
+
var _useState = useState(false),
|
|
105
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
106
|
+
visible = _useState2[0],
|
|
107
|
+
setVisible = _useState2[1];
|
|
108
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
109
|
+
type: "link",
|
|
110
|
+
onClick: function onClick() {
|
|
111
|
+
return setVisible(true);
|
|
112
|
+
}
|
|
113
|
+
}, "\u67E5\u770B\u5168\u90E8(".concat(total, ")")), /*#__PURE__*/React.createElement(Modal, {
|
|
114
|
+
open: visible,
|
|
115
|
+
footer: null,
|
|
116
|
+
onCancel: function onCancel() {
|
|
117
|
+
return setVisible(false);
|
|
118
|
+
},
|
|
119
|
+
title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
|
|
120
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
style: {
|
|
122
|
+
display: 'flex',
|
|
123
|
+
flexWrap: 'wrap'
|
|
124
|
+
}
|
|
125
|
+
}, allImage.map(function (i, index) {
|
|
126
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
127
|
+
style: {
|
|
128
|
+
width: '50%'
|
|
129
|
+
},
|
|
130
|
+
key: index
|
|
131
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
132
|
+
href: i.link,
|
|
133
|
+
target: "__blank",
|
|
134
|
+
style: {
|
|
135
|
+
marginRight: '12px',
|
|
136
|
+
marginTop: '8px',
|
|
137
|
+
padding: '2px',
|
|
138
|
+
border: '1px dashed #ccc',
|
|
139
|
+
display: 'inline-block'
|
|
140
|
+
}
|
|
141
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
142
|
+
alt: "",
|
|
143
|
+
src: i.picUrl || defaultImg,
|
|
144
|
+
style: {
|
|
145
|
+
width: '72px',
|
|
146
|
+
height: '72px',
|
|
147
|
+
objectFit: 'contain'
|
|
148
|
+
}
|
|
149
|
+
})), /*#__PURE__*/React.createElement("div", null, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
150
|
+
title: '商品id',
|
|
151
|
+
text: i.numIid
|
|
152
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
|
153
|
+
title: '商品编码',
|
|
154
|
+
text: i.outerId
|
|
155
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
156
|
+
title: '供应商编码',
|
|
157
|
+
text: i.itemId || i.supplierItemOuterId
|
|
158
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
159
|
+
title: '供应商名称',
|
|
160
|
+
text: i.supplierName
|
|
161
|
+
}), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
162
|
+
title: '规格',
|
|
163
|
+
text: i.propertiesName
|
|
164
|
+
})));
|
|
165
|
+
}))));
|
|
166
|
+
};
|
|
167
|
+
//商品列表展示
|
|
168
|
+
export var GoodImage = function GoodImage(_ref5) {
|
|
169
|
+
var _list$slice;
|
|
170
|
+
var list = _ref5.list,
|
|
171
|
+
_ref5$type = _ref5.type,
|
|
172
|
+
type = _ref5$type === void 0 ? '' : _ref5$type;
|
|
173
|
+
var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
|
|
174
|
+
var initShowTotal = 3;
|
|
175
|
+
return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
176
|
+
style: {
|
|
177
|
+
display: type === 'itemSelect' ? 'flex' : 'block'
|
|
178
|
+
}
|
|
179
|
+
}, list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item, index) {
|
|
180
|
+
return showImage({
|
|
181
|
+
item: item,
|
|
182
|
+
type: type,
|
|
183
|
+
index: index
|
|
184
|
+
});
|
|
185
|
+
}), total > initShowTotal && /*#__PURE__*/React.createElement(ShowTotalImage, {
|
|
186
|
+
total: total,
|
|
187
|
+
allImage: list,
|
|
188
|
+
type: type
|
|
189
|
+
})) : null;
|
|
190
|
+
};
|
|
191
|
+
var content = function content(item, index) {
|
|
192
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
193
|
+
style: {
|
|
194
|
+
textAlign: 'center'
|
|
195
|
+
}
|
|
196
|
+
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
197
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
198
|
+
key: index
|
|
199
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
|
|
200
|
+
width: 70,
|
|
201
|
+
src: t.picUrl,
|
|
202
|
+
preview: false
|
|
203
|
+
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
|
204
|
+
}));
|
|
205
|
+
};
|
|
206
|
+
export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
207
|
+
var list = _ref6.list,
|
|
208
|
+
type = _ref6.type;
|
|
209
|
+
return list.length ? (list || []).map(function (item, index) {
|
|
210
|
+
var logisticsCompany = item.logisticsCompany;
|
|
211
|
+
var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
|
|
212
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
|
213
|
+
content: content(item, index)
|
|
214
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
215
|
+
key: index,
|
|
216
|
+
style: {
|
|
217
|
+
color: '#1890ff',
|
|
218
|
+
cursor: 'pointer'
|
|
219
|
+
}
|
|
220
|
+
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join('/') : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join('/') : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join('/') : item.sendId ? item.sendId : item.sendName) : null));
|
|
221
|
+
}) : null;
|
|
222
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
/**
|
|
4
|
+
* 针对完成时间、创建时间、修改时间定义了3中类型
|
|
5
|
+
*/
|
|
6
|
+
declare class CommonDataTime implements ComponentInterface {
|
|
7
|
+
name: string;
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
rules: any[];
|
|
11
|
+
canFilter: boolean;
|
|
12
|
+
canGroup: boolean;
|
|
13
|
+
canHidden: boolean;
|
|
14
|
+
dataType: DataType;
|
|
15
|
+
showContains: boolean;
|
|
16
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
17
|
+
constructor(options: PickOption);
|
|
18
|
+
getValue: (value: string) => string;
|
|
19
|
+
render: (value: string) => JSX.Element | null;
|
|
20
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
21
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
22
|
+
renderExport: (value: any, record: Record) => string;
|
|
23
|
+
editRender: () => null;
|
|
24
|
+
getColumns: () => this & {
|
|
25
|
+
dataIndex: string;
|
|
26
|
+
title: string;
|
|
27
|
+
renderExport: (value: any, record: Record) => string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export default CommonDataTime;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _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
|
+
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
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
7
|
+
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; }
|
|
8
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
9
|
+
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); }
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import moment from 'moment';
|
|
12
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 针对完成时间、创建时间、修改时间定义了3中类型
|
|
17
|
+
*/
|
|
18
|
+
var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options) {
|
|
19
|
+
var _this = this;
|
|
20
|
+
_classCallCheck(this, CommonDataTime);
|
|
21
|
+
_defineProperty(this, "name", void 0);
|
|
22
|
+
_defineProperty(this, "id", void 0);
|
|
23
|
+
_defineProperty(this, "type", void 0);
|
|
24
|
+
_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
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
31
|
+
_defineProperty(this, "getValue", function (value) {
|
|
32
|
+
return moment(value).format('YYYY-MM-DD HH:mm:ss');
|
|
33
|
+
});
|
|
34
|
+
_defineProperty(this, "render", function (value) {
|
|
35
|
+
if (!value) return null;
|
|
36
|
+
return /*#__PURE__*/React.createElement("span", null, _this.getValue(value));
|
|
37
|
+
});
|
|
38
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
39
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
40
|
+
id: _this.id,
|
|
41
|
+
label: _this.name,
|
|
42
|
+
value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
|
|
43
|
+
}) : null;
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
46
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
47
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
48
|
+
}
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format('YYYY-MM-DD HH:mm:ss'));
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
52
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
53
|
+
return '--';
|
|
54
|
+
}
|
|
55
|
+
return moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format('YYYY-MM-DD HH:mm:ss');
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "editRender", function () {
|
|
58
|
+
return null;
|
|
59
|
+
});
|
|
60
|
+
_defineProperty(this, "getColumns", function () {
|
|
61
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
62
|
+
dataIndex: _this.id,
|
|
63
|
+
title: _this.name,
|
|
64
|
+
renderExport: _this.renderExport
|
|
65
|
+
});
|
|
66
|
+
;
|
|
67
|
+
});
|
|
68
|
+
this.name = options.name;
|
|
69
|
+
this.id = options.id;
|
|
70
|
+
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
|
+
this.componentConfig = options.componentConfig;
|
|
77
|
+
this.rules = [];
|
|
78
|
+
});
|
|
79
|
+
export default CommonDataTime;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const DateType: ['DATE', 'DATE_TIME', 'DATE_RANGE', 'DATE_TIME_RANGE'];
|
|
3
|
+
export declare type ButtonType = typeof DateType[number];
|
|
4
|
+
export interface ApaasDate {
|
|
5
|
+
dateType?: ButtonType;
|
|
6
|
+
[propName: string]: any;
|
|
7
|
+
}
|
|
8
|
+
declare const Date: (props: ApaasDate) => JSX.Element;
|
|
9
|
+
export default Date;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var _excluded = ["dateType"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { DatePicker } from 'antd';
|
|
7
|
+
var componentMap = {
|
|
8
|
+
DATE: DatePicker,
|
|
9
|
+
DATE_TIME: DatePicker,
|
|
10
|
+
DATE_RANGE: DatePicker.RangePicker,
|
|
11
|
+
DATE_TIME_RANGE: DatePicker.RangePicker
|
|
12
|
+
};
|
|
13
|
+
var Date = function Date(props) {
|
|
14
|
+
var _props$dateType = props.dateType,
|
|
15
|
+
dateType = _props$dateType === void 0 ? 'DATE' : _props$dateType,
|
|
16
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
17
|
+
var Component = componentMap[dateType];
|
|
18
|
+
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
19
|
+
showTime: ['DATE_TIME_RANGE', 'DATE_TIME'].includes(dateType)
|
|
20
|
+
}, otherProps));
|
|
21
|
+
};
|
|
22
|
+
export default Date;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare type Value = string | string[] | undefined;
|
|
4
|
+
export declare const DateTime: ({ value, onChange, ...otherProps }: any) => JSX.Element;
|
|
5
|
+
declare class BasicDataTime implements ComponentInterface {
|
|
6
|
+
name: string;
|
|
7
|
+
id: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
canFilter: boolean;
|
|
11
|
+
canGroup: boolean;
|
|
12
|
+
canHidden: boolean;
|
|
13
|
+
dataType: DataType;
|
|
14
|
+
showContains: boolean;
|
|
15
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
getValue: (value: Value) => string | undefined;
|
|
18
|
+
render: (value: Value) => JSX.Element;
|
|
19
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
20
|
+
renderPc: (value: any, record: Record) => JSX.Element;
|
|
21
|
+
renderExport: (value: any, record: Record) => any;
|
|
22
|
+
editRender: () => JSX.Element;
|
|
23
|
+
getColumns: () => this & {
|
|
24
|
+
dataIndex: string;
|
|
25
|
+
title: string;
|
|
26
|
+
renderExport: (value: any, record: Record) => any;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export default BasicDataTime;
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
var _excluded = ["value", "onChange"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
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); }
|
|
12
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import ApaasDate from "./ApaasDate";
|
|
16
|
+
import moment from 'moment';
|
|
17
|
+
import GetFormItem from "../GetFormItem";
|
|
18
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
19
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
20
|
+
export var DateTime = function DateTime(_ref) {
|
|
21
|
+
var value = _ref.value,
|
|
22
|
+
onChange = _ref.onChange,
|
|
23
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
var handleChange = function handleChange(_, dateString) {
|
|
25
|
+
onChange(dateString);
|
|
26
|
+
};
|
|
27
|
+
return /*#__PURE__*/React.createElement(ApaasDate, _extends({}, otherProps, {
|
|
28
|
+
onChange: handleChange,
|
|
29
|
+
value: Array.isArray(value) ? value.map(function (v) {
|
|
30
|
+
return v ? moment(v) : v;
|
|
31
|
+
}) : value ? moment(value) : value
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
|
|
35
|
+
var _this = this,
|
|
36
|
+
_options$componentCon,
|
|
37
|
+
_options$componentCon2;
|
|
38
|
+
_classCallCheck(this, BasicDataTime);
|
|
39
|
+
_defineProperty(this, "name", void 0);
|
|
40
|
+
_defineProperty(this, "id", void 0);
|
|
41
|
+
_defineProperty(this, "type", void 0);
|
|
42
|
+
_defineProperty(this, "rules", void 0);
|
|
43
|
+
_defineProperty(this, "canFilter", void 0);
|
|
44
|
+
_defineProperty(this, "canGroup", void 0);
|
|
45
|
+
_defineProperty(this, "canHidden", void 0);
|
|
46
|
+
_defineProperty(this, "dataType", void 0);
|
|
47
|
+
_defineProperty(this, "showContains", void 0);
|
|
48
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
49
|
+
_defineProperty(this, "getValue", function (value) {
|
|
50
|
+
return Array.isArray(value) ? value.join('~') : value;
|
|
51
|
+
});
|
|
52
|
+
_defineProperty(this, "render", function (value) {
|
|
53
|
+
return /*#__PURE__*/React.createElement("span", null, _this.getValue(value));
|
|
54
|
+
});
|
|
55
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
56
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
57
|
+
id: _this.id,
|
|
58
|
+
label: _this.name,
|
|
59
|
+
value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
|
|
60
|
+
}) : null;
|
|
61
|
+
});
|
|
62
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
63
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_dateTime")]) === undefined) {
|
|
64
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
65
|
+
}
|
|
66
|
+
return /*#__PURE__*/React.createElement("span", null, Array.isArray(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_dateTime")]) ? record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_dateTime")].join('~') : /*#__PURE__*/React.createElement("span", null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_dateTime")]));
|
|
67
|
+
});
|
|
68
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
69
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_dateTime")]) === undefined) {
|
|
70
|
+
return '--';
|
|
71
|
+
}
|
|
72
|
+
return Array.isArray(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_dateTime")]) ? record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_dateTime")].join('~') : record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_dateTime")];
|
|
73
|
+
});
|
|
74
|
+
_defineProperty(this, "editRender", function () {
|
|
75
|
+
var _this$componentConfig, _this$componentConfig2;
|
|
76
|
+
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
77
|
+
title: _this.name,
|
|
78
|
+
name: _this.id,
|
|
79
|
+
rules: _this.rules,
|
|
80
|
+
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,
|
|
81
|
+
component: /*#__PURE__*/React.createElement(DateTime, _this.componentConfig)
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
_defineProperty(this, "getColumns", function () {
|
|
85
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
86
|
+
dataIndex: _this.id,
|
|
87
|
+
title: _this.name,
|
|
88
|
+
renderExport: _this.renderExport
|
|
89
|
+
});
|
|
90
|
+
;
|
|
91
|
+
});
|
|
92
|
+
this.name = options.name;
|
|
93
|
+
this.id = options.id;
|
|
94
|
+
this.type = options.type;
|
|
95
|
+
this.canFilter = true;
|
|
96
|
+
this.canGroup = true;
|
|
97
|
+
this.canHidden = true;
|
|
98
|
+
this.showContains = false;
|
|
99
|
+
this.dataType = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && (_options$componentCon2 = _options$componentCon.dateType) !== null && _options$componentCon2 !== void 0 && _options$componentCon2.includes('RANGE') ? 'dateArray' : 'date';
|
|
100
|
+
this.componentConfig = options.componentConfig;
|
|
101
|
+
this.rules = [];
|
|
102
|
+
});
|
|
103
|
+
export default BasicDataTime;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
/*
|
|
3
|
+
* @Description:
|
|
4
|
+
* @Author: litian
|
|
5
|
+
* @Date: 2022-06-30 17:30:05
|
|
6
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7
|
+
* @LastEditTime: 2022-09-16 13:39:39
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { TBGoodSerial } from '@kmkf-fe-packages/basic-components';
|
|
11
|
+
var ItemEncode = function ItemEncode(props) {
|
|
12
|
+
var _props$value = props.value,
|
|
13
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
14
|
+
shopId = props.shopId;
|
|
15
|
+
var handleChange = function handleChange(content) {
|
|
16
|
+
typeof props.onChange === 'function' && props.onChange(content === null || content === void 0 ? void 0 : content.imgList);
|
|
17
|
+
};
|
|
18
|
+
return /*#__PURE__*/React.createElement(TBGoodSerial, _extends({}, props, {
|
|
19
|
+
value: {
|
|
20
|
+
shopId: shopId,
|
|
21
|
+
imgList: value || []
|
|
22
|
+
},
|
|
23
|
+
onChange: handleChange
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
export default ItemEncode;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
|
+
declare class EItemEncode implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
type: string;
|
|
7
|
+
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
13
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
14
|
+
effects: ComponentInterface["effects"];
|
|
15
|
+
constructor(options: PickOption);
|
|
16
|
+
render: (value: any) => JSX.Element;
|
|
17
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
18
|
+
renderPc: (value: unknown, record: Record) => JSX.Element;
|
|
19
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
20
|
+
editRender: () => JSX.Element;
|
|
21
|
+
getColumns: () => this & {
|
|
22
|
+
dataIndex: string;
|
|
23
|
+
title: string;
|
|
24
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export default EItemEncode;
|