@kmkf-fe-packages/services-components 0.7.15-alpha.2 → 0.7.15-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/BS/BsExchange/index.d.ts +20 -5
- package/dist/esm/components/BS/BsExchange/index.js +59 -38
- package/dist/esm/components/BS/BsGoods/index.d.ts +3 -4
- package/dist/esm/components/BS/BsGoods/index.js +13 -23
- package/dist/esm/components/BS/BsReissue/index.d.ts +21 -6
- package/dist/esm/components/BS/BsReissue/index.js +29 -36
- package/dist/esm/components/BS/common/BsExchangeImage.d.ts +31 -0
- package/dist/esm/components/BS/common/BsExchangeImage.js +126 -0
- package/dist/esm/components/BS/common/BsGoodImage.d.ts +31 -0
- package/dist/esm/components/BS/common/BsGoodImage.js +88 -0
- package/dist/esm/components/BS/common/BsMemo.d.ts +25 -0
- package/dist/esm/components/BS/common/BsMemo.js +76 -0
- package/dist/esm/components/BS/common/BsType.d.ts +35 -0
- package/dist/esm/components/BS/common/{BsPic.js → BsType.js} +40 -49
- package/dist/esm/components/Common/index.d.ts +11 -6
- package/dist/esm/components/Common/index.js +105 -50
- package/dist/esm/components/Common/index.module.less +8 -0
- package/dist/esm/components/File/index.d.ts +7 -8
- package/dist/esm/components/File/index.js +18 -47
- package/dist/esm/components/Input/index.js +3 -0
- package/dist/esm/components/LogisticsTrajectory/index.js +6 -16
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +1 -0
- package/package.json +4 -4
- package/dist/esm/components/BS/common/BsPic.d.ts +0 -43
|
@@ -4,9 +4,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
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
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
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { Form, Button, Modal, Tooltip, Space, Image, Popover } from
|
|
8
|
-
import React, { useState } from
|
|
9
|
-
import { ExpressData } from
|
|
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
10
|
import styles from "./index.module.less";
|
|
11
11
|
import defaultImg from "./img/default-img.png";
|
|
12
12
|
export var getFormItem = function getFormItem(_ref) {
|
|
@@ -26,7 +26,7 @@ export var getFormItem = function getFormItem(_ref) {
|
|
|
26
26
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
27
|
className: "form-item--wrap",
|
|
28
28
|
style: {
|
|
29
|
-
position:
|
|
29
|
+
position: "relative"
|
|
30
30
|
}
|
|
31
31
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
32
32
|
name: name,
|
|
@@ -40,43 +40,43 @@ export var showImage = function showImage(_ref2) {
|
|
|
40
40
|
var item = _ref2.item,
|
|
41
41
|
type = _ref2.type,
|
|
42
42
|
index = _ref2.index;
|
|
43
|
-
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !==
|
|
43
|
+
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== "tabao" ? item.picUrl : item.picUrl + "_40x40.jpg" : defaultImg;
|
|
44
44
|
return /*#__PURE__*/React.createElement("div", {
|
|
45
45
|
className: styles.goodImgBox,
|
|
46
46
|
key: index
|
|
47
|
-
}, (item === null || item === void 0 ? void 0 : item.platform) ===
|
|
47
|
+
}, (item === null || item === void 0 ? void 0 : item.platform) === "taobao" ? /*#__PURE__*/React.createElement("a", {
|
|
48
48
|
target: "_blank",
|
|
49
49
|
href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
|
|
50
50
|
}, /*#__PURE__*/React.createElement("img", {
|
|
51
51
|
style: {
|
|
52
|
-
width:
|
|
53
|
-
height:
|
|
54
|
-
objectFit:
|
|
52
|
+
width: "40px",
|
|
53
|
+
height: "40px",
|
|
54
|
+
objectFit: "contain"
|
|
55
55
|
},
|
|
56
56
|
src: picUrl
|
|
57
57
|
})) : /*#__PURE__*/React.createElement("img", {
|
|
58
58
|
style: {
|
|
59
|
-
width:
|
|
60
|
-
height:
|
|
61
|
-
objectFit:
|
|
59
|
+
width: "40px",
|
|
60
|
+
height: "40px",
|
|
61
|
+
objectFit: "contain"
|
|
62
62
|
},
|
|
63
63
|
src: picUrl
|
|
64
64
|
}), /*#__PURE__*/React.createElement("div", {
|
|
65
65
|
className: styles.options
|
|
66
|
-
}, type ===
|
|
67
|
-
title:
|
|
66
|
+
}, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
|
|
67
|
+
title: "商品id",
|
|
68
68
|
text: item.numIid
|
|
69
|
-
}), type ===
|
|
70
|
-
title:
|
|
69
|
+
}), type === "itemCode" && /*#__PURE__*/React.createElement(TextTool, {
|
|
70
|
+
title: "商品编码",
|
|
71
71
|
text: item.outerId
|
|
72
|
-
}), (type ===
|
|
73
|
-
title:
|
|
72
|
+
}), (type === "itemThird" || type === "jstItemThird") && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
73
|
+
title: "供应商编码",
|
|
74
74
|
text: item.itemId || item.supplierItemOuterId
|
|
75
|
-
}), (type ===
|
|
76
|
-
title:
|
|
75
|
+
}), (type === "itemThird" || type === "jstItemThird") && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
76
|
+
title: "供应商名称",
|
|
77
77
|
text: item.supplierName
|
|
78
78
|
}), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
79
|
-
title:
|
|
79
|
+
title: "规格",
|
|
80
80
|
text: item.propertiesName
|
|
81
81
|
})));
|
|
82
82
|
};
|
|
@@ -89,9 +89,9 @@ var TextTool = function TextTool(_ref3) {
|
|
|
89
89
|
title: text
|
|
90
90
|
}, /*#__PURE__*/React.createElement("div", {
|
|
91
91
|
style: {
|
|
92
|
-
overflow:
|
|
93
|
-
whiteSpace:
|
|
94
|
-
textOverflow:
|
|
92
|
+
overflow: "hidden",
|
|
93
|
+
whiteSpace: "nowrap",
|
|
94
|
+
textOverflow: "ellipsis"
|
|
95
95
|
}
|
|
96
96
|
}, title, ":", text));
|
|
97
97
|
};
|
|
@@ -119,47 +119,47 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
119
119
|
title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
|
|
120
120
|
}, /*#__PURE__*/React.createElement("div", {
|
|
121
121
|
style: {
|
|
122
|
-
display:
|
|
123
|
-
flexWrap:
|
|
122
|
+
display: "flex",
|
|
123
|
+
flexWrap: "wrap"
|
|
124
124
|
}
|
|
125
125
|
}, allImage.map(function (i, index) {
|
|
126
126
|
return /*#__PURE__*/React.createElement("div", {
|
|
127
127
|
style: {
|
|
128
|
-
width:
|
|
128
|
+
width: "50%"
|
|
129
129
|
},
|
|
130
130
|
key: index
|
|
131
131
|
}, /*#__PURE__*/React.createElement("a", {
|
|
132
132
|
href: i.link,
|
|
133
133
|
target: "__blank",
|
|
134
134
|
style: {
|
|
135
|
-
marginRight:
|
|
136
|
-
marginTop:
|
|
137
|
-
padding:
|
|
138
|
-
border:
|
|
139
|
-
display:
|
|
135
|
+
marginRight: "12px",
|
|
136
|
+
marginTop: "8px",
|
|
137
|
+
padding: "2px",
|
|
138
|
+
border: "1px dashed #ccc",
|
|
139
|
+
display: "inline-block"
|
|
140
140
|
}
|
|
141
141
|
}, /*#__PURE__*/React.createElement("img", {
|
|
142
142
|
alt: "",
|
|
143
143
|
src: i.picUrl || defaultImg,
|
|
144
144
|
style: {
|
|
145
|
-
width:
|
|
146
|
-
height:
|
|
147
|
-
objectFit:
|
|
145
|
+
width: "72px",
|
|
146
|
+
height: "72px",
|
|
147
|
+
objectFit: "contain"
|
|
148
148
|
}
|
|
149
|
-
})), /*#__PURE__*/React.createElement("div", null, type ===
|
|
150
|
-
title:
|
|
149
|
+
})), /*#__PURE__*/React.createElement("div", null, type === "itemId" && /*#__PURE__*/React.createElement(TextTool, {
|
|
150
|
+
title: "商品id",
|
|
151
151
|
text: i.numIid
|
|
152
|
-
}), type ===
|
|
153
|
-
title:
|
|
152
|
+
}), type === "itemCode" && /*#__PURE__*/React.createElement(TextTool, {
|
|
153
|
+
title: "商品编码",
|
|
154
154
|
text: i.outerId
|
|
155
|
-
}), (type ===
|
|
156
|
-
title:
|
|
155
|
+
}), (type === "itemThird" || type === "jstItemThird") && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
156
|
+
title: "供应商编码",
|
|
157
157
|
text: i.itemId || i.supplierItemOuterId
|
|
158
|
-
}), (type ===
|
|
159
|
-
title:
|
|
158
|
+
}), (type === "itemThird" || type === "jstItemThird") && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
159
|
+
title: "供应商名称",
|
|
160
160
|
text: i.supplierName
|
|
161
161
|
}), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
162
|
-
title:
|
|
162
|
+
title: "规格",
|
|
163
163
|
text: i.propertiesName
|
|
164
164
|
})));
|
|
165
165
|
}))));
|
|
@@ -169,12 +169,12 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
169
169
|
var _list$slice;
|
|
170
170
|
var list = _ref5.list,
|
|
171
171
|
_ref5$type = _ref5.type,
|
|
172
|
-
type = _ref5$type === void 0 ?
|
|
172
|
+
type = _ref5$type === void 0 ? "" : _ref5$type;
|
|
173
173
|
var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
|
|
174
174
|
var initShowTotal = 3;
|
|
175
175
|
return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
176
176
|
style: {
|
|
177
|
-
display: type ===
|
|
177
|
+
display: type === "itemSelect" ? "flex" : "block"
|
|
178
178
|
}
|
|
179
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
180
|
return showImage({
|
|
@@ -191,7 +191,7 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
191
191
|
var content = function content(item, index) {
|
|
192
192
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
193
193
|
style: {
|
|
194
|
-
textAlign:
|
|
194
|
+
textAlign: "center"
|
|
195
195
|
}
|
|
196
196
|
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
197
197
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -215,9 +215,64 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
215
215
|
}, /*#__PURE__*/React.createElement("span", {
|
|
216
216
|
key: index,
|
|
217
217
|
style: {
|
|
218
|
-
color:
|
|
219
|
-
cursor:
|
|
218
|
+
color: "#1890ff",
|
|
219
|
+
cursor: "pointer"
|
|
220
220
|
}
|
|
221
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join(
|
|
221
|
+
}, "\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));
|
|
222
222
|
}) : null;
|
|
223
|
+
};
|
|
224
|
+
//bs商品展示
|
|
225
|
+
export var BsGoodImage = function BsGoodImage(_ref7) {
|
|
226
|
+
var item = _ref7.item,
|
|
227
|
+
index = _ref7.index;
|
|
228
|
+
var picUrl = item.picUrl || defaultImg;
|
|
229
|
+
var keyMap = {
|
|
230
|
+
name: "bs名称",
|
|
231
|
+
code: "bs编码",
|
|
232
|
+
skuId: "bssku编码",
|
|
233
|
+
money: "bs实付金额",
|
|
234
|
+
number: "bs数量",
|
|
235
|
+
share: "bs分摊价",
|
|
236
|
+
type: "bs赠品类型"
|
|
237
|
+
};
|
|
238
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
239
|
+
className: styles.goodImgBox,
|
|
240
|
+
key: index
|
|
241
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
242
|
+
style: {
|
|
243
|
+
width: "40px",
|
|
244
|
+
height: "40px",
|
|
245
|
+
objectFit: "contain"
|
|
246
|
+
},
|
|
247
|
+
src: picUrl
|
|
248
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
249
|
+
className: styles.options
|
|
250
|
+
}, Object.keys(keyMap).map(function (key) {
|
|
251
|
+
return item[key] ? /*#__PURE__*/React.createElement(TextTool, {
|
|
252
|
+
title: keyMap[key],
|
|
253
|
+
text: item[key]
|
|
254
|
+
}) : null;
|
|
255
|
+
})));
|
|
256
|
+
};
|
|
257
|
+
export var BsExchangeList = function BsExchangeList(_ref8) {
|
|
258
|
+
var list = _ref8.list;
|
|
259
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
260
|
+
className: styles.bsImgBox
|
|
261
|
+
}, list.map(function (item) {
|
|
262
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
263
|
+
className: styles.bsImgItem
|
|
264
|
+
}, ((item === null || item === void 0 ? void 0 : item.returnGood) || []).map(function (t, i) {
|
|
265
|
+
return BsGoodImage({
|
|
266
|
+
item: t,
|
|
267
|
+
index: i
|
|
268
|
+
});
|
|
269
|
+
})), "==>", /*#__PURE__*/React.createElement("div", {
|
|
270
|
+
className: styles.bsImgItem
|
|
271
|
+
}, ((item === null || item === void 0 ? void 0 : item.returnGood) || []).map(function (t, i) {
|
|
272
|
+
return BsGoodImage({
|
|
273
|
+
item: t,
|
|
274
|
+
index: i
|
|
275
|
+
});
|
|
276
|
+
})));
|
|
277
|
+
}));
|
|
223
278
|
};
|
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, Record } from "../../type";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare type Value = string[] | undefined;
|
|
4
3
|
declare class BasicFile implements ComponentInterface {
|
|
5
4
|
name: string;
|
|
6
5
|
id: string;
|
|
7
6
|
sortField: string;
|
|
7
|
+
formField: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
10
|
componentConfig: ComponentInterface["componentConfig"];
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
14
15
|
constructor(options: PickOption);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
renderPc: (value: any, record: Record) => React.JSX.Element | React.JSX.Element[];
|
|
18
|
-
renderLog: (r: Record) => React.JSX.Element | React.JSX.Element[] | null;
|
|
16
|
+
renderPc: (value: any, record: Record) => any;
|
|
17
|
+
renderLog: (r: Record) => any;
|
|
19
18
|
getComponentValue: (r: Record) => any;
|
|
20
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
21
20
|
editRender: () => React.JSX.Element;
|
|
22
21
|
/**
|
|
23
22
|
*
|
|
24
|
-
* @returns
|
|
23
|
+
* @returns
|
|
25
24
|
*/
|
|
26
|
-
renderExport: () =>
|
|
25
|
+
renderExport: (value: any, record: any) => any;
|
|
27
26
|
/**
|
|
28
27
|
*
|
|
29
|
-
* @returns
|
|
28
|
+
* @returns 文件不支持过滤
|
|
30
29
|
*/
|
|
31
30
|
filterConfig: () => never[];
|
|
32
31
|
}
|
|
@@ -7,9 +7,7 @@ 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 { Image } from "antd";
|
|
11
10
|
import { ApaasUploadFile } from "@kmkf-fe-packages/basic-components";
|
|
12
|
-
import { imgResize } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
11
|
import GetFormItem from "../GetFormItem";
|
|
14
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
13
|
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
@@ -19,56 +17,23 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
19
17
|
_defineProperty(this, "name", void 0);
|
|
20
18
|
_defineProperty(this, "id", void 0);
|
|
21
19
|
_defineProperty(this, "sortField", void 0);
|
|
20
|
+
_defineProperty(this, "formField", void 0);
|
|
22
21
|
_defineProperty(this, "type", void 0);
|
|
23
22
|
_defineProperty(this, "rules", void 0);
|
|
24
23
|
_defineProperty(this, "componentConfig", void 0);
|
|
25
24
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
26
25
|
_defineProperty(this, "canSort", void 0);
|
|
27
26
|
_defineProperty(this, "children", void 0);
|
|
28
|
-
_defineProperty(this, "
|
|
29
|
-
pictures = pictures.replace(/[\[\]]/g, "");
|
|
30
|
-
pictures = pictures.replace(/\s/g, "");
|
|
31
|
-
return pictures ? pictures.split(",") : [];
|
|
32
|
-
});
|
|
33
|
-
_defineProperty(this, "render", function (value) {
|
|
34
|
-
if (!(value !== null && value !== void 0 && value.length)) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
return /*#__PURE__*/React.createElement("div", null, value === null || value === void 0 ? void 0 : value.map(function (pic) {
|
|
38
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
style: {
|
|
40
|
-
marginRight: "5px",
|
|
41
|
-
display: "inline-block"
|
|
42
|
-
}
|
|
43
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
44
|
-
width: 32,
|
|
45
|
-
src: imgResize(pic || ""),
|
|
46
|
-
preview: {
|
|
47
|
-
src: imgResize(pic || "", 0, 0)
|
|
48
|
-
}
|
|
49
|
-
}));
|
|
50
|
-
}));
|
|
51
|
-
});
|
|
27
|
+
_defineProperty(this, "dataType", void 0);
|
|
52
28
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
53
|
-
|
|
29
|
+
var fileList = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")]) || [];
|
|
30
|
+
if (!fileList.length) {
|
|
54
31
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
55
32
|
}
|
|
56
|
-
|
|
57
|
-
return ""
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
style: {
|
|
62
|
-
marginRight: "5px",
|
|
63
|
-
display: "inline-block"
|
|
64
|
-
}
|
|
65
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
66
|
-
width: 32,
|
|
67
|
-
src: "".concat(pic, "?x-oss-process=image/resize,m_pad,h_40,w_40"),
|
|
68
|
-
preview: {
|
|
69
|
-
src: pic
|
|
70
|
-
}
|
|
71
|
-
}));
|
|
33
|
+
return fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file) {
|
|
34
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
35
|
+
href: file.url
|
|
36
|
+
}, file.name);
|
|
72
37
|
});
|
|
73
38
|
});
|
|
74
39
|
_defineProperty(this, "renderLog", function (r) {
|
|
@@ -79,10 +44,10 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
79
44
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_file")];
|
|
80
45
|
});
|
|
81
46
|
_defineProperty(this, "renderClient", function (record) {
|
|
82
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
47
|
+
return !isNull(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
83
48
|
id: _this.id,
|
|
84
49
|
label: _this.name,
|
|
85
|
-
value: _this.
|
|
50
|
+
value: _this.renderPc(null, record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")])
|
|
86
51
|
}) : null;
|
|
87
52
|
});
|
|
88
53
|
_defineProperty(this, "editRender", function () {
|
|
@@ -98,8 +63,12 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
98
63
|
}))
|
|
99
64
|
});
|
|
100
65
|
});
|
|
101
|
-
_defineProperty(this, "renderExport", function () {
|
|
102
|
-
|
|
66
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
67
|
+
var textArr = ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_rate")]) || []).reduce(function (prv, next) {
|
|
68
|
+
prv.push(next.url);
|
|
69
|
+
return prv;
|
|
70
|
+
}, []);
|
|
71
|
+
return textArr === null || textArr === void 0 ? void 0 : textArr.join(",");
|
|
103
72
|
});
|
|
104
73
|
_defineProperty(this, "filterConfig", function () {
|
|
105
74
|
return [];
|
|
@@ -107,11 +76,13 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
|
|
|
107
76
|
this.name = options.name;
|
|
108
77
|
this.id = options.id;
|
|
109
78
|
this.sortField = "".concat(options.id, "_file");
|
|
79
|
+
this.formField = "".concat(options.id, "_file");
|
|
110
80
|
this.type = options.type;
|
|
111
81
|
this.componentConfig = options.componentConfig;
|
|
112
82
|
this.rules = [];
|
|
113
83
|
this.isCombinationComponent = false;
|
|
114
84
|
this.canSort = false;
|
|
115
85
|
this.children = [];
|
|
86
|
+
this.dataType = "array";
|
|
116
87
|
});
|
|
117
88
|
export default BasicFile;
|
|
@@ -87,6 +87,9 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
87
87
|
this.rules = [{
|
|
88
88
|
validator: function validator(_, value) {
|
|
89
89
|
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
|
|
90
|
+
if (!value) {
|
|
91
|
+
return Promise.resolve();
|
|
92
|
+
}
|
|
90
93
|
var number = /^(([0-9]*(\.[0-9]{1,})$)|([0-9]+$))/;
|
|
91
94
|
var mail = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(.[a-zA-Z0-9_-]+)+$/;
|
|
92
95
|
var phone = /^1\d{10}$/;
|
|
@@ -91,24 +91,14 @@ var LogisticsTrajectory = /*#__PURE__*/_createClass(function LogisticsTrajectory
|
|
|
91
91
|
this.isCombinationComponent = true;
|
|
92
92
|
this.canSort = false;
|
|
93
93
|
this.dataType = "object";
|
|
94
|
-
this.children = [this.express, this.expressCode];
|
|
94
|
+
this.children = [this.express, this.expressCode, this.expressSnapshot];
|
|
95
95
|
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
96
96
|
validator: function validator(_, value) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
} else if (((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.showField) === "EXPRESS_WAYBILL_CODE" && !(value !== null && value !== void 0 && value.order)) {
|
|
103
|
-
return Promise.reject(new Error("请输入物流单号"));
|
|
104
|
-
}
|
|
105
|
-
} else {
|
|
106
|
-
if (!(value !== null && value !== void 0 && value.company)) {
|
|
107
|
-
return Promise.reject(new Error("请选择物流公司"));
|
|
108
|
-
}
|
|
109
|
-
if (!(value !== null && value !== void 0 && value.order)) {
|
|
110
|
-
return Promise.reject(new Error("请输入物流单号"));
|
|
111
|
-
}
|
|
97
|
+
if (!value.trajectoryCompany) {
|
|
98
|
+
return Promise.reject(new Error("请选择物流公司"));
|
|
99
|
+
}
|
|
100
|
+
if (!value.trajectoryCode) {
|
|
101
|
+
return Promise.reject(new Error("请输入物流单号"));
|
|
112
102
|
}
|
|
113
103
|
return Promise.resolve();
|
|
114
104
|
}
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
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, BsLogistics, BsGoods, BsExchange, BsReissue } 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) => ActualPayment | BsExchange | BsGoods | BsLogistics | BsReissue | BasicFile | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | LogisticsTrajectory | BasicPosting | BasicDataTime | TradeDateTime | BasicAddress | BasicCascader | BasicCheckbox | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | Logistics | ReturnLogistics | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | PlatForm | ShopInput | Submitter | Handler | CompletedUser;
|
package/dist/esm/type.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-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.7.15-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.7.15-alpha.3",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.15-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": "ed7ac8d0c87afbda8f080748adc790cd6755c9e0"
|
|
44
44
|
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
|
|
2
|
-
import { ExpressInterceptData } from "@kmkf-fe-packages/kmkf-utils";
|
|
3
|
-
declare class BsPic implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
parentId: string;
|
|
6
|
-
id: string;
|
|
7
|
-
sortField: string;
|
|
8
|
-
type: string;
|
|
9
|
-
rules: any[];
|
|
10
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
-
effects: ComponentInterface["effects"];
|
|
12
|
-
align: ALignType;
|
|
13
|
-
width: number;
|
|
14
|
-
isCombinationComponent: boolean;
|
|
15
|
-
formField: string;
|
|
16
|
-
canSort: boolean;
|
|
17
|
-
children: ComponentInterface[];
|
|
18
|
-
expressInterceptInstance: InstanceType<typeof ExpressInterceptData>;
|
|
19
|
-
dataType: ComponentInterface["dataType"];
|
|
20
|
-
constructor(options: PickOption);
|
|
21
|
-
getComponentValue: (r: Record) => any;
|
|
22
|
-
renderClient: (record: any) => null;
|
|
23
|
-
renderPc: (value: any, record: Record) => null;
|
|
24
|
-
renderLog: (r: Record) => any;
|
|
25
|
-
renderExport: (value: any, record: Record) => any;
|
|
26
|
-
editRender: () => null;
|
|
27
|
-
filterConfig: (item: ColumnConfig) => {
|
|
28
|
-
searchDefaultConditions: "in";
|
|
29
|
-
type: string;
|
|
30
|
-
id: string;
|
|
31
|
-
name: string;
|
|
32
|
-
filterComponentType: "MultipleSelect";
|
|
33
|
-
props: {
|
|
34
|
-
options: {
|
|
35
|
-
label: string;
|
|
36
|
-
value: string;
|
|
37
|
-
}[];
|
|
38
|
-
};
|
|
39
|
-
formatFilterValue: (value: string[]) => string[];
|
|
40
|
-
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export default BsPic;
|