@kmkf-fe-packages/services-components 0.23.0-alpha.0 → 0.23.0-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/components/BS/common/BsHeaderChild.js +1 -2
- package/dist/esm/components/BS/common/BsHeaderGood.js +1 -59
- package/dist/esm/components/Common/index.d.ts +1 -8
- package/dist/esm/components/Common/index.js +220 -284
- package/dist/esm/components/EItemEnCode/index.d.ts +4 -6
- package/dist/esm/components/EItemEnCode/index.js +43 -56
- package/dist/esm/factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -58,8 +58,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
58
58
|
});
|
|
59
59
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
60
60
|
var _this$getComponentVal2;
|
|
61
|
-
|
|
62
|
-
return typeof val === 'number' ? val + '' : val;
|
|
61
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
63
62
|
});
|
|
64
63
|
_defineProperty(this, "editRender", function () {
|
|
65
64
|
return null;
|
|
@@ -81,57 +81,7 @@ var HeaderMap = {
|
|
|
81
81
|
name: "赠品类型",
|
|
82
82
|
key: "type",
|
|
83
83
|
width: 150
|
|
84
|
-
},
|
|
85
|
-
title: {
|
|
86
|
-
component: BsHeaderChild,
|
|
87
|
-
name: "商品名称",
|
|
88
|
-
key: "title",
|
|
89
|
-
width: 200
|
|
90
|
-
},
|
|
91
|
-
outerId: {
|
|
92
|
-
component: BsHeaderChild,
|
|
93
|
-
name: "商品编码",
|
|
94
|
-
key: "outerId",
|
|
95
|
-
width: 100
|
|
96
|
-
},
|
|
97
|
-
picUrl: {
|
|
98
|
-
component: BsHeaderPic,
|
|
99
|
-
name: "图片",
|
|
100
|
-
key: "picUrl",
|
|
101
|
-
width: 140
|
|
102
|
-
},
|
|
103
|
-
numIid: {
|
|
104
|
-
component: BsHeaderChild,
|
|
105
|
-
name: "商品id",
|
|
106
|
-
key: "numIid",
|
|
107
|
-
width: 100
|
|
108
|
-
},
|
|
109
|
-
skuId: {
|
|
110
|
-
component: BsHeaderChild,
|
|
111
|
-
name: "SKU ID",
|
|
112
|
-
key: "skuId",
|
|
113
|
-
width: 140
|
|
114
|
-
},
|
|
115
|
-
outerSkuId: {
|
|
116
|
-
component: BsHeaderChild,
|
|
117
|
-
name: "SKU 编码",
|
|
118
|
-
key: "outerSkuId",
|
|
119
|
-
width: 140
|
|
120
|
-
},
|
|
121
|
-
propertiesName: {
|
|
122
|
-
component: BsHeaderChild,
|
|
123
|
-
name: "SKU 信息",
|
|
124
|
-
key: "propertiesName",
|
|
125
|
-
width: 140
|
|
126
84
|
}
|
|
127
|
-
|
|
128
|
-
// title: '商品名称',
|
|
129
|
-
// outerId: '商品编码',
|
|
130
|
-
// picUrl: '图片',
|
|
131
|
-
// numIid: '商品id',
|
|
132
|
-
// skuId: 'SKU ID',
|
|
133
|
-
// outerSkuId: 'SKU 编码',
|
|
134
|
-
// propertiesName: 'SKU 信息',
|
|
135
85
|
};
|
|
136
86
|
var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
137
87
|
var _this = this;
|
|
@@ -202,15 +152,7 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
202
152
|
this.isCombinationComponent = true;
|
|
203
153
|
this.canSort = false;
|
|
204
154
|
this.dataType = "string";
|
|
205
|
-
this.itemKey =
|
|
206
|
-
title: '商品名称',
|
|
207
|
-
outerId: '商品编码',
|
|
208
|
-
picUrl: '图片',
|
|
209
|
-
numIid: '商品id',
|
|
210
|
-
skuId: 'SKU ID',
|
|
211
|
-
outerSkuId: 'SKU 编码',
|
|
212
|
-
propertiesName: 'SKU 信息'
|
|
213
|
-
} : {
|
|
155
|
+
this.itemKey = {
|
|
214
156
|
mark: "商品标记",
|
|
215
157
|
pic: "图片",
|
|
216
158
|
name: "名称",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
declare type getFormItemProps = {
|
|
3
3
|
name: string;
|
|
4
4
|
title: string;
|
|
@@ -27,13 +27,6 @@ export declare const BsGoodsTable: ({ list, showHeader, text, }: {
|
|
|
27
27
|
list: any[];
|
|
28
28
|
showHeader: string[];
|
|
29
29
|
text?: string | undefined;
|
|
30
|
-
type?: string | undefined;
|
|
31
|
-
}) => React.JSX.Element;
|
|
32
|
-
export declare const TBGoodTable: ({ list, showHeader, text, }: {
|
|
33
|
-
list: any[];
|
|
34
|
-
showHeader: string[];
|
|
35
|
-
text?: string | undefined;
|
|
36
|
-
type?: string | undefined;
|
|
37
30
|
}) => React.JSX.Element;
|
|
38
31
|
export declare const FileRender: ({ fileList, canDownload }: any) => React.JSX.Element;
|
|
39
32
|
export declare const BsSystemOrderTable: ({ value, type }: any) => React.JSX.Element;
|
|
@@ -8,10 +8,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
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; }
|
|
9
9
|
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; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message } from
|
|
12
|
-
import React, { useState, useMemo } from
|
|
13
|
-
import { ExpressData } from
|
|
14
|
-
import { CopyToClipboard } from
|
|
11
|
+
import { Form, Button, Modal, Tooltip, Space, Image, Popover, Table, message } from 'antd';
|
|
12
|
+
import React, { useState, useMemo } from 'react';
|
|
13
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
|
+
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
15
15
|
import styles from "./index.module.less";
|
|
16
16
|
import defaultImg from "./img/default-img.png";
|
|
17
17
|
export var getFormItem = function getFormItem(_ref) {
|
|
@@ -31,7 +31,7 @@ export var getFormItem = function getFormItem(_ref) {
|
|
|
31
31
|
return /*#__PURE__*/React.createElement("div", {
|
|
32
32
|
className: "form-item--wrap",
|
|
33
33
|
style: {
|
|
34
|
-
position:
|
|
34
|
+
position: 'relative'
|
|
35
35
|
}
|
|
36
36
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
37
37
|
name: name,
|
|
@@ -45,43 +45,43 @@ export var showImage = function showImage(_ref2) {
|
|
|
45
45
|
var item = _ref2.item,
|
|
46
46
|
type = _ref2.type,
|
|
47
47
|
index = _ref2.index;
|
|
48
|
-
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !==
|
|
48
|
+
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
|
|
49
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
50
50
|
className: styles.goodImgBox,
|
|
51
51
|
key: index
|
|
52
|
-
}, (item === null || item === void 0 ? void 0 : item.platform) ===
|
|
52
|
+
}, (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
|
|
53
53
|
target: "_blank",
|
|
54
54
|
href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
|
|
55
55
|
}, /*#__PURE__*/React.createElement("img", {
|
|
56
56
|
style: {
|
|
57
|
-
width:
|
|
58
|
-
height:
|
|
59
|
-
objectFit:
|
|
57
|
+
width: '40px',
|
|
58
|
+
height: '40px',
|
|
59
|
+
objectFit: 'contain'
|
|
60
60
|
},
|
|
61
61
|
src: picUrl
|
|
62
62
|
})) : /*#__PURE__*/React.createElement("img", {
|
|
63
63
|
style: {
|
|
64
|
-
width:
|
|
65
|
-
height:
|
|
66
|
-
objectFit:
|
|
64
|
+
width: '40px',
|
|
65
|
+
height: '40px',
|
|
66
|
+
objectFit: 'contain'
|
|
67
67
|
},
|
|
68
68
|
src: picUrl
|
|
69
69
|
}), /*#__PURE__*/React.createElement("div", {
|
|
70
70
|
className: styles.options
|
|
71
|
-
}, type ===
|
|
72
|
-
title:
|
|
71
|
+
}, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
72
|
+
title: '商品id',
|
|
73
73
|
text: item.numIid
|
|
74
|
-
}), type ===
|
|
75
|
-
title:
|
|
74
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
|
75
|
+
title: '商品编码',
|
|
76
76
|
text: item.outerId
|
|
77
|
-
}), (type ===
|
|
78
|
-
title:
|
|
77
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
78
|
+
title: '供应商编码',
|
|
79
79
|
text: item.itemId || item.supplierItemOuterId
|
|
80
|
-
}), (type ===
|
|
81
|
-
title:
|
|
80
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
81
|
+
title: '供应商名称',
|
|
82
82
|
text: item.supplierName
|
|
83
83
|
}), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
84
|
-
title:
|
|
84
|
+
title: '规格',
|
|
85
85
|
text: item.propertiesName
|
|
86
86
|
})));
|
|
87
87
|
};
|
|
@@ -94,9 +94,9 @@ var TextTool = function TextTool(_ref3) {
|
|
|
94
94
|
title: text
|
|
95
95
|
}, /*#__PURE__*/React.createElement("div", {
|
|
96
96
|
style: {
|
|
97
|
-
overflow:
|
|
98
|
-
whiteSpace:
|
|
99
|
-
textOverflow:
|
|
97
|
+
overflow: 'hidden',
|
|
98
|
+
whiteSpace: 'nowrap',
|
|
99
|
+
textOverflow: 'ellipsis'
|
|
100
100
|
}
|
|
101
101
|
}, title, ":", text));
|
|
102
102
|
};
|
|
@@ -124,47 +124,47 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
|
124
124
|
title: "\u6240\u6709\u9009\u62E9\u5B9D\u8D1D"
|
|
125
125
|
}, /*#__PURE__*/React.createElement("div", {
|
|
126
126
|
style: {
|
|
127
|
-
display:
|
|
128
|
-
flexWrap:
|
|
127
|
+
display: 'flex',
|
|
128
|
+
flexWrap: 'wrap'
|
|
129
129
|
}
|
|
130
130
|
}, allImage.map(function (i, index) {
|
|
131
131
|
return /*#__PURE__*/React.createElement("div", {
|
|
132
132
|
style: {
|
|
133
|
-
width:
|
|
133
|
+
width: '50%'
|
|
134
134
|
},
|
|
135
135
|
key: index
|
|
136
136
|
}, /*#__PURE__*/React.createElement("a", {
|
|
137
137
|
href: i.link,
|
|
138
138
|
target: "__blank",
|
|
139
139
|
style: {
|
|
140
|
-
marginRight:
|
|
141
|
-
marginTop:
|
|
142
|
-
padding:
|
|
143
|
-
border:
|
|
144
|
-
display:
|
|
140
|
+
marginRight: '12px',
|
|
141
|
+
marginTop: '8px',
|
|
142
|
+
padding: '2px',
|
|
143
|
+
border: '1px dashed #ccc',
|
|
144
|
+
display: 'inline-block'
|
|
145
145
|
}
|
|
146
146
|
}, /*#__PURE__*/React.createElement("img", {
|
|
147
147
|
alt: "",
|
|
148
148
|
src: i.picUrl || defaultImg,
|
|
149
149
|
style: {
|
|
150
|
-
width:
|
|
151
|
-
height:
|
|
152
|
-
objectFit:
|
|
150
|
+
width: '72px',
|
|
151
|
+
height: '72px',
|
|
152
|
+
objectFit: 'contain'
|
|
153
153
|
}
|
|
154
|
-
})), /*#__PURE__*/React.createElement("div", null, type ===
|
|
155
|
-
title:
|
|
154
|
+
})), /*#__PURE__*/React.createElement("div", null, type === 'itemId' && /*#__PURE__*/React.createElement(TextTool, {
|
|
155
|
+
title: '商品id',
|
|
156
156
|
text: i.numIid
|
|
157
|
-
}), type ===
|
|
158
|
-
title:
|
|
157
|
+
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
|
158
|
+
title: '商品编码',
|
|
159
159
|
text: i.outerId
|
|
160
|
-
}), (type ===
|
|
161
|
-
title:
|
|
160
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
|
161
|
+
title: '供应商编码',
|
|
162
162
|
text: i.itemId || i.supplierItemOuterId
|
|
163
|
-
}), (type ===
|
|
164
|
-
title:
|
|
163
|
+
}), (type === 'itemThird' || type === 'jstItemThird') && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
|
164
|
+
title: '供应商名称',
|
|
165
165
|
text: i.supplierName
|
|
166
166
|
}), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
|
167
|
-
title:
|
|
167
|
+
title: '规格',
|
|
168
168
|
text: i.propertiesName
|
|
169
169
|
})));
|
|
170
170
|
}))));
|
|
@@ -174,12 +174,12 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
174
174
|
var _list$slice;
|
|
175
175
|
var list = _ref5.list,
|
|
176
176
|
_ref5$type = _ref5.type,
|
|
177
|
-
type = _ref5$type === void 0 ?
|
|
177
|
+
type = _ref5$type === void 0 ? '' : _ref5$type;
|
|
178
178
|
var total = (list === null || list === void 0 ? void 0 : list.length) || 0;
|
|
179
179
|
var initShowTotal = 3;
|
|
180
180
|
return (list === null || list === void 0 ? void 0 : list.length) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
181
181
|
style: {
|
|
182
|
-
display: type ===
|
|
182
|
+
display: type === 'itemSelect' ? 'flex' : 'block'
|
|
183
183
|
}
|
|
184
184
|
}, 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) {
|
|
185
185
|
return showImage({
|
|
@@ -196,7 +196,7 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
|
196
196
|
var content = function content(item, index) {
|
|
197
197
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
198
198
|
style: {
|
|
199
|
-
textAlign:
|
|
199
|
+
textAlign: 'center'
|
|
200
200
|
}
|
|
201
201
|
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
|
202
202
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -223,17 +223,17 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
|
|
|
223
223
|
}, /*#__PURE__*/React.createElement("span", {
|
|
224
224
|
key: index,
|
|
225
225
|
style: {
|
|
226
|
-
color:
|
|
227
|
-
cursor:
|
|
226
|
+
color: '#1890ff',
|
|
227
|
+
cursor: 'pointer'
|
|
228
228
|
}
|
|
229
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join(
|
|
229
|
+
}, "\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, type === 4 ? /*#__PURE__*/React.createElement("span", null, (item === null || item === void 0 ? void 0 : item.deliveryNo) || '') : null));
|
|
230
230
|
}) : null;
|
|
231
231
|
};
|
|
232
232
|
export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
233
233
|
var _ref7$list = _ref7.list,
|
|
234
234
|
list = _ref7$list === void 0 ? [] : _ref7$list,
|
|
235
235
|
_ref7$showField = _ref7.showField,
|
|
236
|
-
showField = _ref7$showField === void 0 ?
|
|
236
|
+
showField = _ref7$showField === void 0 ? '' : _ref7$showField;
|
|
237
237
|
return list !== null && list !== void 0 && list.length ? (list || []).map(function (item, index) {
|
|
238
238
|
var logisticsCompany = item.logisticsCompany;
|
|
239
239
|
var company = ExpressData.getInstance().getExpressNameByCode(logisticsCompany);
|
|
@@ -245,10 +245,10 @@ export var BsExpressRender = function BsExpressRender(_ref7) {
|
|
|
245
245
|
}, /*#__PURE__*/React.createElement("span", {
|
|
246
246
|
key: index,
|
|
247
247
|
style: {
|
|
248
|
-
color:
|
|
249
|
-
cursor:
|
|
248
|
+
color: '#1890ff',
|
|
249
|
+
cursor: 'pointer'
|
|
250
250
|
}
|
|
251
|
-
}, "\u5305\u88F9", ":")), showField ===
|
|
251
|
+
}, "\u5305\u88F9", ":")), showField === 'company' ? /*#__PURE__*/React.createElement("span", null, company ? company : null) : null, showField === 'code' ? /*#__PURE__*/React.createElement("span", null, item.logisticsCode ? item.logisticsCode : null) : null));
|
|
252
252
|
}) : null;
|
|
253
253
|
};
|
|
254
254
|
export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
@@ -261,7 +261,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
261
261
|
var orderContent = function orderContent(item, index) {
|
|
262
262
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
263
263
|
style: {
|
|
264
|
-
textAlign:
|
|
264
|
+
textAlign: 'center'
|
|
265
265
|
}
|
|
266
266
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7", index + 1, "\uFF1A", item.systemOrderId));
|
|
267
267
|
};
|
|
@@ -269,7 +269,7 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
269
269
|
var _options$find;
|
|
270
270
|
var color = ((_options$find = options.find(function (it) {
|
|
271
271
|
return item[valueKey] === it.value;
|
|
272
|
-
})) === null || _options$find === void 0 ? void 0 : _options$find.color) ||
|
|
272
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.color) || '#000';
|
|
273
273
|
var currentOption = options.find(function (option) {
|
|
274
274
|
return item[valueKey] === option.value;
|
|
275
275
|
});
|
|
@@ -281,14 +281,14 @@ export var CommonOrderContent = function CommonOrderContent(_ref8) {
|
|
|
281
281
|
}, /*#__PURE__*/React.createElement("span", {
|
|
282
282
|
key: index,
|
|
283
283
|
style: {
|
|
284
|
-
color:
|
|
285
|
-
cursor:
|
|
284
|
+
color: '#1890ff',
|
|
285
|
+
cursor: 'pointer'
|
|
286
286
|
}
|
|
287
287
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1), ":")), /*#__PURE__*/React.createElement("span", {
|
|
288
288
|
style: {
|
|
289
289
|
color: color
|
|
290
290
|
}
|
|
291
|
-
}, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) ||
|
|
291
|
+
}, currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || '')), item.reason && (item === null || item === void 0 ? void 0 : item[valueKey]) !== '成功' && /*#__PURE__*/React.createElement("div", {
|
|
292
292
|
className: "c-red"
|
|
293
293
|
}, item.reason));
|
|
294
294
|
}) : null;
|
|
@@ -300,22 +300,22 @@ export var BsGoodImage = function BsGoodImage(_ref9) {
|
|
|
300
300
|
index = _ref9.index;
|
|
301
301
|
var picUrl = item.picUrl || defaultImg;
|
|
302
302
|
var keyMap = {
|
|
303
|
-
name:
|
|
304
|
-
code:
|
|
305
|
-
skuId:
|
|
306
|
-
money:
|
|
307
|
-
number:
|
|
308
|
-
share:
|
|
309
|
-
type:
|
|
303
|
+
name: 'bs名称',
|
|
304
|
+
code: 'bs编码',
|
|
305
|
+
skuId: 'bssku编码',
|
|
306
|
+
money: 'bs实付金额',
|
|
307
|
+
number: 'bs数量',
|
|
308
|
+
share: 'bs分摊价',
|
|
309
|
+
type: 'bs赠品类型'
|
|
310
310
|
};
|
|
311
311
|
return /*#__PURE__*/React.createElement("div", {
|
|
312
312
|
className: styles.goodImgBox,
|
|
313
313
|
key: index
|
|
314
314
|
}, /*#__PURE__*/React.createElement("img", {
|
|
315
315
|
style: {
|
|
316
|
-
width:
|
|
317
|
-
height:
|
|
318
|
-
objectFit:
|
|
316
|
+
width: '40px',
|
|
317
|
+
height: '40px',
|
|
318
|
+
objectFit: 'contain'
|
|
319
319
|
},
|
|
320
320
|
src: picUrl
|
|
321
321
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -337,11 +337,11 @@ export var BsExchangeList = function BsExchangeList(_ref10) {
|
|
|
337
337
|
return /*#__PURE__*/React.createElement(React.Fragment, null, BsGoodsTable({
|
|
338
338
|
list: (item === null || item === void 0 ? void 0 : item.bsExchangeReturnGoods) || [],
|
|
339
339
|
showHeader: showHeader,
|
|
340
|
-
text:
|
|
340
|
+
text: '退回'
|
|
341
341
|
}), BsGoodsTable({
|
|
342
342
|
list: item === null || item === void 0 ? void 0 : item.bsExchangeSwapOutGoods,
|
|
343
343
|
showHeader: showHeader,
|
|
344
|
-
text:
|
|
344
|
+
text: '换出'
|
|
345
345
|
}));
|
|
346
346
|
}));
|
|
347
347
|
};
|
|
@@ -354,175 +354,111 @@ export var BsGoodPic = function BsGoodPic(list) {
|
|
|
354
354
|
});
|
|
355
355
|
});
|
|
356
356
|
};
|
|
357
|
-
var
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
},
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
357
|
+
export var BsGoodsTable = function BsGoodsTable(_ref11) {
|
|
358
|
+
var list = _ref11.list,
|
|
359
|
+
showHeader = _ref11.showHeader,
|
|
360
|
+
_ref11$text = _ref11.text,
|
|
361
|
+
text = _ref11$text === void 0 ? '' : _ref11$text;
|
|
362
|
+
//商品信息
|
|
363
|
+
var GOODS_INFO_COLUMNS = function GOODS_INFO_COLUMNS() {
|
|
364
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
365
|
+
return [{
|
|
366
|
+
dataIndex: 'mark',
|
|
367
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
368
|
+
align: 'center',
|
|
369
|
+
ellipsis: true,
|
|
370
|
+
width: 100
|
|
371
|
+
}, {
|
|
372
|
+
dataIndex: 'skuName',
|
|
373
|
+
title: "".concat(text, "sku\u540D\u79F0"),
|
|
374
|
+
align: 'center',
|
|
375
|
+
ellipsis: true,
|
|
376
|
+
width: 200
|
|
377
|
+
}, {
|
|
378
|
+
dataIndex: 'sku',
|
|
379
|
+
title: "".concat(text, "sku\u7F16\u7801"),
|
|
380
|
+
align: 'center',
|
|
381
|
+
ellipsis: true,
|
|
382
|
+
width: 100
|
|
383
|
+
}, {
|
|
384
|
+
dataIndex: 'name',
|
|
385
|
+
title: "".concat(text, "\u540D\u79F0"),
|
|
386
|
+
align: 'center',
|
|
387
|
+
ellipsis: true,
|
|
388
|
+
width: 200
|
|
389
|
+
}, {
|
|
390
|
+
dataIndex: 'pic',
|
|
391
|
+
title: "\u56FE\u7247",
|
|
392
|
+
align: 'center',
|
|
393
|
+
ellipsis: true,
|
|
394
|
+
width: 100,
|
|
395
|
+
render: function render(val) {
|
|
396
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
397
|
+
width: 60,
|
|
398
|
+
src: val
|
|
399
|
+
});
|
|
393
400
|
}
|
|
394
|
-
}
|
|
401
|
+
}, {
|
|
402
|
+
dataIndex: 'code',
|
|
403
|
+
title: "".concat(text, "\u7F16\u7801"),
|
|
404
|
+
align: 'center',
|
|
405
|
+
ellipsis: true,
|
|
406
|
+
width: 100
|
|
407
|
+
}, {
|
|
408
|
+
dataIndex: 'money',
|
|
409
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
410
|
+
align: 'center',
|
|
411
|
+
ellipsis: true,
|
|
412
|
+
width: 100
|
|
413
|
+
}, {
|
|
414
|
+
dataIndex: 'number',
|
|
415
|
+
title: "".concat(text, "\u6570\u91CF"),
|
|
416
|
+
align: 'center',
|
|
417
|
+
ellipsis: true,
|
|
418
|
+
width: 100
|
|
419
|
+
}, {
|
|
420
|
+
dataIndex: 'share',
|
|
421
|
+
title: "\u5206\u644A\u4EF7",
|
|
422
|
+
align: 'center',
|
|
423
|
+
ellipsis: true,
|
|
424
|
+
width: 70
|
|
425
|
+
}, {
|
|
426
|
+
dataIndex: 'type',
|
|
427
|
+
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
428
|
+
align: 'center',
|
|
429
|
+
ellipsis: true,
|
|
430
|
+
width: 100
|
|
431
|
+
}];
|
|
395
432
|
};
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
width: 200
|
|
423
|
-
}, {
|
|
424
|
-
dataIndex: "pic",
|
|
425
|
-
title: "\u56FE\u7247",
|
|
426
|
-
align: "center",
|
|
427
|
-
ellipsis: true,
|
|
428
|
-
width: 100,
|
|
429
|
-
render: function render(val) {
|
|
430
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
431
|
-
width: 60,
|
|
432
|
-
src: val
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
}, {
|
|
436
|
-
dataIndex: "code",
|
|
437
|
-
title: "".concat(text, "\u7F16\u7801"),
|
|
438
|
-
align: "center",
|
|
439
|
-
ellipsis: true,
|
|
440
|
-
width: 100
|
|
441
|
-
}, {
|
|
442
|
-
dataIndex: "money",
|
|
443
|
-
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
444
|
-
align: "center",
|
|
445
|
-
ellipsis: true,
|
|
446
|
-
width: 100
|
|
447
|
-
}, {
|
|
448
|
-
dataIndex: "number",
|
|
449
|
-
title: "".concat(text, "\u6570\u91CF"),
|
|
450
|
-
align: "center",
|
|
451
|
-
ellipsis: true,
|
|
452
|
-
width: 100
|
|
453
|
-
}, {
|
|
454
|
-
dataIndex: "share",
|
|
455
|
-
title: "\u5206\u644A\u4EF7",
|
|
456
|
-
align: "center",
|
|
457
|
-
ellipsis: true,
|
|
458
|
-
width: 70
|
|
459
|
-
}, {
|
|
460
|
-
dataIndex: "type",
|
|
461
|
-
title: "\u8D60\u54C1\u7C7B\u578B",
|
|
462
|
-
align: "center",
|
|
463
|
-
ellipsis: true,
|
|
464
|
-
width: 100
|
|
465
|
-
}];
|
|
466
|
-
});
|
|
467
|
-
export var TBGoodTable = getTable(function () {
|
|
468
|
-
return [{
|
|
469
|
-
dataIndex: "title",
|
|
470
|
-
title: '商品名称',
|
|
471
|
-
align: "center",
|
|
472
|
-
ellipsis: true,
|
|
473
|
-
width: 200
|
|
474
|
-
}, {
|
|
475
|
-
dataIndex: "outerId",
|
|
476
|
-
title: '商品编码',
|
|
477
|
-
align: "center",
|
|
478
|
-
ellipsis: true,
|
|
479
|
-
width: 140
|
|
480
|
-
}, {
|
|
481
|
-
dataIndex: "picUrl",
|
|
482
|
-
title: '图片',
|
|
483
|
-
align: "center",
|
|
484
|
-
ellipsis: true,
|
|
485
|
-
width: 100,
|
|
486
|
-
render: function render(val) {
|
|
487
|
-
return /*#__PURE__*/React.createElement(Image, {
|
|
488
|
-
width: 60,
|
|
489
|
-
src: val
|
|
490
|
-
});
|
|
433
|
+
var newColumns = useMemo(function () {
|
|
434
|
+
var columnList = [{
|
|
435
|
+
dataIndex: '',
|
|
436
|
+
title: '序号',
|
|
437
|
+
align: 'center',
|
|
438
|
+
ellipsis: true,
|
|
439
|
+
width: 50,
|
|
440
|
+
render: function render(val, record, index) {
|
|
441
|
+
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
442
|
+
}
|
|
443
|
+
}].concat(_toConsumableArray(GOODS_INFO_COLUMNS(text).filter(function (t) {
|
|
444
|
+
return showHeader.includes(t === null || t === void 0 ? void 0 : t.dataIndex);
|
|
445
|
+
})));
|
|
446
|
+
return columnList;
|
|
447
|
+
}, [showHeader, list]);
|
|
448
|
+
return /*#__PURE__*/React.createElement(Table, {
|
|
449
|
+
columns: newColumns,
|
|
450
|
+
dataSource: list,
|
|
451
|
+
rowKey: 'uuid',
|
|
452
|
+
size: "small",
|
|
453
|
+
pagination: false,
|
|
454
|
+
scroll: {
|
|
455
|
+
x: '100%'
|
|
456
|
+
},
|
|
457
|
+
locale: {
|
|
458
|
+
emptyText: '暂无数据'
|
|
491
459
|
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
title: '商品id',
|
|
495
|
-
align: "center",
|
|
496
|
-
ellipsis: true,
|
|
497
|
-
width: 200
|
|
498
|
-
}, {
|
|
499
|
-
dataIndex: "skuId",
|
|
500
|
-
title: 'SKU ID',
|
|
501
|
-
align: "center",
|
|
502
|
-
ellipsis: true,
|
|
503
|
-
width: 200
|
|
504
|
-
}, {
|
|
505
|
-
dataIndex: "outerSkuId",
|
|
506
|
-
title: 'SKU 编码',
|
|
507
|
-
align: "center",
|
|
508
|
-
ellipsis: true,
|
|
509
|
-
width: 100
|
|
510
|
-
}, {
|
|
511
|
-
dataIndex: "propertiesName",
|
|
512
|
-
title: 'SKU 信息',
|
|
513
|
-
align: "center",
|
|
514
|
-
ellipsis: true,
|
|
515
|
-
width: 200
|
|
516
|
-
}];
|
|
517
|
-
// title: '商品名称',
|
|
518
|
-
// outerId: '商品编码',
|
|
519
|
-
// picUrl: '图片',
|
|
520
|
-
// numIid: '商品id',
|
|
521
|
-
// skuId: 'SKU ID',
|
|
522
|
-
// outerSkuId: 'SKU 编码',
|
|
523
|
-
// propertiesName: 'SKU 信息',
|
|
524
|
-
});
|
|
525
|
-
|
|
460
|
+
});
|
|
461
|
+
};
|
|
526
462
|
export var FileRender = function FileRender(_ref12) {
|
|
527
463
|
var _ref12$fileList = _ref12.fileList,
|
|
528
464
|
fileList = _ref12$fileList === void 0 ? [] : _ref12$fileList,
|
|
@@ -532,15 +468,15 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
532
468
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
533
469
|
visible = _useState4[0],
|
|
534
470
|
setVisible = _useState4[1];
|
|
535
|
-
var _useState5 = useState(
|
|
471
|
+
var _useState5 = useState(''),
|
|
536
472
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
537
473
|
fileUrl = _useState6[0],
|
|
538
474
|
setFileUrl = _useState6[1];
|
|
539
|
-
var _useState7 = useState(
|
|
475
|
+
var _useState7 = useState(''),
|
|
540
476
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
541
477
|
fileType = _useState8[0],
|
|
542
478
|
setFileType = _useState8[1];
|
|
543
|
-
var _useState9 = useState(
|
|
479
|
+
var _useState9 = useState(''),
|
|
544
480
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
545
481
|
fileName = _useState10[0],
|
|
546
482
|
setFileName = _useState10[1];
|
|
@@ -549,24 +485,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
549
485
|
downloading = _useState12[0],
|
|
550
486
|
setDownloading = _useState12[1];
|
|
551
487
|
var handleCancel = function handleCancel() {
|
|
552
|
-
setFileUrl(
|
|
553
|
-
setFileName(
|
|
488
|
+
setFileUrl('');
|
|
489
|
+
setFileName('');
|
|
554
490
|
setVisible(false);
|
|
555
491
|
setDownloading(false);
|
|
556
492
|
};
|
|
557
493
|
var onPreview = function onPreview(file) {
|
|
558
494
|
var _file$url;
|
|
559
|
-
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split(
|
|
495
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
560
496
|
var fileType = fileArr[fileArr.length - 1];
|
|
561
|
-
if ([
|
|
497
|
+
if (['png', 'jpg', 'jpeg', 'gif', 'bmp', 'svg'].includes(fileType.toLowerCase())) {
|
|
562
498
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
563
499
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
564
|
-
setFileType(
|
|
500
|
+
setFileType('pic');
|
|
565
501
|
setVisible(true);
|
|
566
|
-
} else if ([
|
|
502
|
+
} else if (['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'].includes(fileType.toLowerCase())) {
|
|
567
503
|
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
568
504
|
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
569
|
-
setFileType(
|
|
505
|
+
setFileType('video');
|
|
570
506
|
setVisible(true);
|
|
571
507
|
} else {
|
|
572
508
|
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
@@ -577,9 +513,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
577
513
|
fetch(url).then(function (res) {
|
|
578
514
|
return res.blob();
|
|
579
515
|
}).then(function (blob) {
|
|
580
|
-
var a = document.createElement(
|
|
516
|
+
var a = document.createElement('a');
|
|
581
517
|
document.body.appendChild(a);
|
|
582
|
-
a.style.display =
|
|
518
|
+
a.style.display = 'none';
|
|
583
519
|
var url = window.URL.createObjectURL(blob);
|
|
584
520
|
a.href = url;
|
|
585
521
|
a.download = name;
|
|
@@ -593,9 +529,9 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
593
529
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList.map(function (item) {
|
|
594
530
|
return /*#__PURE__*/React.createElement("a", {
|
|
595
531
|
style: {
|
|
596
|
-
color:
|
|
597
|
-
cursor:
|
|
598
|
-
display:
|
|
532
|
+
color: '#1890ff',
|
|
533
|
+
cursor: 'pointer',
|
|
534
|
+
display: 'block'
|
|
599
535
|
},
|
|
600
536
|
onClick: function onClick(e) {
|
|
601
537
|
e.preventDefault();
|
|
@@ -617,20 +553,20 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
617
553
|
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
618
554
|
text: fileUrl,
|
|
619
555
|
onCopy: function onCopy() {
|
|
620
|
-
message.success(
|
|
556
|
+
message.success('复制成功');
|
|
621
557
|
}
|
|
622
558
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
623
559
|
type: "link"
|
|
624
|
-
}, "\u4E0B\u8F7D\u5730\u5740")), fileType ===
|
|
560
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
|
|
625
561
|
alt: "example",
|
|
626
562
|
style: {
|
|
627
|
-
width:
|
|
563
|
+
width: '100%'
|
|
628
564
|
},
|
|
629
565
|
src: fileUrl
|
|
630
566
|
}) : /*#__PURE__*/React.createElement("video", {
|
|
631
567
|
style: {
|
|
632
|
-
width:
|
|
633
|
-
height:
|
|
568
|
+
width: '100%',
|
|
569
|
+
height: '100%'
|
|
634
570
|
},
|
|
635
571
|
autoPlay: true,
|
|
636
572
|
controls: true,
|
|
@@ -640,24 +576,24 @@ export var FileRender = function FileRender(_ref12) {
|
|
|
640
576
|
export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
641
577
|
var value = _ref13.value,
|
|
642
578
|
type = _ref13.type;
|
|
643
|
-
var columns = type ===
|
|
644
|
-
dataIndex:
|
|
645
|
-
title:
|
|
579
|
+
var columns = type === 'WLN_SYSTEM_ORDER' ? [{
|
|
580
|
+
dataIndex: 'billType',
|
|
581
|
+
title: '单据类型'
|
|
646
582
|
}, {
|
|
647
|
-
dataIndex:
|
|
648
|
-
title:
|
|
583
|
+
dataIndex: 'billNo',
|
|
584
|
+
title: '系统订单号'
|
|
649
585
|
}, {
|
|
650
|
-
dataIndex:
|
|
651
|
-
title:
|
|
586
|
+
dataIndex: 'billTag',
|
|
587
|
+
title: '标签'
|
|
652
588
|
}] : [{
|
|
653
|
-
dataIndex:
|
|
654
|
-
title:
|
|
589
|
+
dataIndex: 'billType',
|
|
590
|
+
title: '订单类型'
|
|
655
591
|
}, {
|
|
656
|
-
dataIndex:
|
|
657
|
-
title:
|
|
592
|
+
dataIndex: 'billNo',
|
|
593
|
+
title: '系统订单号'
|
|
658
594
|
}, {
|
|
659
|
-
dataIndex:
|
|
660
|
-
title:
|
|
595
|
+
dataIndex: 'billTag',
|
|
596
|
+
title: '标记'
|
|
661
597
|
}];
|
|
662
598
|
var rowSelection = {
|
|
663
599
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || ((value === null || value === void 0 ? void 0 : value.showOrderInfo) || []).reduce(function (prv, next) {
|
|
@@ -678,14 +614,14 @@ export var BsSystemOrderTable = function BsSystemOrderTable(_ref13) {
|
|
|
678
614
|
dataSource: (value === null || value === void 0 ? void 0 : value.showOrderInfo) || [],
|
|
679
615
|
columns: columns,
|
|
680
616
|
rowSelection: rowSelection,
|
|
681
|
-
rowKey:
|
|
617
|
+
rowKey: 'billNo',
|
|
682
618
|
size: "small",
|
|
683
619
|
pagination: false,
|
|
684
620
|
scroll: {
|
|
685
|
-
x:
|
|
621
|
+
x: '100%'
|
|
686
622
|
},
|
|
687
623
|
locale: {
|
|
688
|
-
emptyText:
|
|
624
|
+
emptyText: '暂无数据'
|
|
689
625
|
}
|
|
690
626
|
});
|
|
691
627
|
};
|
|
@@ -705,33 +641,33 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
705
641
|
_ref14$options = _ref14.options,
|
|
706
642
|
options = _ref14$options === void 0 ? [] : _ref14$options;
|
|
707
643
|
var msgTypeCh = {
|
|
708
|
-
ding:
|
|
709
|
-
wechat:
|
|
710
|
-
qq:
|
|
711
|
-
qywx:
|
|
644
|
+
ding: '钉钉',
|
|
645
|
+
wechat: '微信',
|
|
646
|
+
qq: 'QQ',
|
|
647
|
+
qywx: '企业微信'
|
|
712
648
|
};
|
|
713
649
|
var detailContent = function detailContent(item) {
|
|
714
650
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
715
651
|
style: {
|
|
716
|
-
textAlign:
|
|
652
|
+
textAlign: 'left'
|
|
717
653
|
}
|
|
718
654
|
}, /*#__PURE__*/React.createElement("div", null, item.ruleName)));
|
|
719
655
|
};
|
|
720
656
|
return /*#__PURE__*/React.createElement(Space, {
|
|
721
|
-
direction: !horizontal ?
|
|
657
|
+
direction: !horizontal ? 'vertical' : 'horizontal'
|
|
722
658
|
}, Array.isArray(list) ? (list || []).map(function (item, index) {
|
|
723
659
|
var _options$find2;
|
|
724
660
|
var color = ((_options$find2 = options.find(function (innerItem) {
|
|
725
661
|
return item[valueKey] === innerItem.label;
|
|
726
|
-
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) ||
|
|
662
|
+
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.color) || '#000';
|
|
727
663
|
var currentOption = options.find(function (option) {
|
|
728
664
|
return item[valueKey] === option.value;
|
|
729
665
|
});
|
|
730
|
-
var key = item.msgType ||
|
|
666
|
+
var key = item.msgType || 'ding';
|
|
731
667
|
return /*#__PURE__*/React.createElement("div", {
|
|
732
668
|
style: {
|
|
733
669
|
color: color,
|
|
734
|
-
cursor:
|
|
670
|
+
cursor: 'pointer'
|
|
735
671
|
}
|
|
736
672
|
}, /*#__PURE__*/React.createElement(Popover, {
|
|
737
673
|
content: detailContent(item),
|
|
@@ -740,6 +676,6 @@ export var MsgContent = function MsgContent(_ref14) {
|
|
|
740
676
|
}
|
|
741
677
|
}, /*#__PURE__*/React.createElement("span", {
|
|
742
678
|
key: index
|
|
743
|
-
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) ||
|
|
679
|
+
}, msgTypeCh[key], "-", currentOption ? currentOption.label : (item === null || item === void 0 ? void 0 : item[valueKey]) || '')));
|
|
744
680
|
}) : null);
|
|
745
681
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { BsHeaderGood } from "../BS/common/index";
|
|
4
3
|
declare class EItemEncode implements ComponentInterface {
|
|
5
4
|
name: string;
|
|
6
5
|
id: string;
|
|
@@ -14,14 +13,12 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
14
13
|
canSort: boolean;
|
|
15
14
|
children: ComponentInterface[];
|
|
16
15
|
dataType: ComponentInterface['dataType'];
|
|
17
|
-
goods: BsHeaderGood;
|
|
18
|
-
showHeader: string[];
|
|
19
16
|
constructor(options: PickOption);
|
|
20
17
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
21
|
-
renderPc: (value: unknown, record: Record) => React.JSX.Element
|
|
18
|
+
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
22
19
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
23
20
|
getComponentValue: (r: Record) => any;
|
|
24
|
-
renderExport: () =>
|
|
21
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
25
22
|
editRender: (p: any) => React.JSX.Element;
|
|
26
23
|
filterConfig: (item: ColumnConfig) => {
|
|
27
24
|
searchDefaultConditions: "like";
|
|
@@ -29,6 +26,7 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
29
26
|
id: string;
|
|
30
27
|
name: string;
|
|
31
28
|
filterComponentType: "Input";
|
|
32
|
-
|
|
29
|
+
filterFn: (value: string) => (i: Record) => any;
|
|
30
|
+
};
|
|
33
31
|
}
|
|
34
32
|
export default EItemEncode;
|
|
@@ -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; }
|
|
@@ -11,15 +9,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
11
9
|
import React from 'react';
|
|
12
10
|
import GetFormItem from "../GetFormItem";
|
|
13
11
|
import ItemEncode from "./ItemEncode";
|
|
14
|
-
import {
|
|
15
|
-
import { BsHeaderGood } from "../BS/common/index";
|
|
12
|
+
import { GoodImage } from "../Common";
|
|
16
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
15
|
import { SYMBOL } from "../../constant";
|
|
19
16
|
var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
20
17
|
var _this = this,
|
|
21
|
-
_this$componentConfig
|
|
22
|
-
_this$componentConfig2;
|
|
18
|
+
_this$componentConfig;
|
|
23
19
|
_classCallCheck(this, EItemEncode);
|
|
24
20
|
_defineProperty(this, "name", void 0);
|
|
25
21
|
_defineProperty(this, "id", void 0);
|
|
@@ -33,43 +29,45 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
33
29
|
_defineProperty(this, "canSort", void 0);
|
|
34
30
|
_defineProperty(this, "children", void 0);
|
|
35
31
|
_defineProperty(this, "dataType", void 0);
|
|
36
|
-
_defineProperty(this, "goods", void 0);
|
|
37
|
-
_defineProperty(this, "showHeader", void 0);
|
|
38
32
|
_defineProperty(this, "renderClient", function (record) {
|
|
39
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[
|
|
33
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
40
34
|
id: _this.id,
|
|
41
35
|
label: _this.name,
|
|
42
|
-
value: /*#__PURE__*/React.createElement(
|
|
43
|
-
list:
|
|
44
|
-
|
|
36
|
+
value: /*#__PURE__*/React.createElement(GoodImage, {
|
|
37
|
+
list: record === null || record === void 0 ? void 0 : record[_this.id],
|
|
38
|
+
type: "itemCode"
|
|
45
39
|
})
|
|
46
|
-
})
|
|
40
|
+
}) : null;
|
|
47
41
|
});
|
|
48
42
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) === undefined) {
|
|
44
|
+
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
45
|
+
}
|
|
46
|
+
//兼容多个商品
|
|
47
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
48
|
+
onClick: function onClick(e) {
|
|
49
|
+
return e.stopPropagation();
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement(GoodImage, {
|
|
52
|
+
list: record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")],
|
|
53
|
+
type: "itemCode"
|
|
54
|
+
}));
|
|
57
55
|
});
|
|
58
56
|
_defineProperty(this, "renderLog", function (r) {
|
|
59
57
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")])) return null;
|
|
60
|
-
return
|
|
61
|
-
list: (r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")]) || [],
|
|
62
|
-
showHeader: _this.showHeader
|
|
63
|
-
});
|
|
58
|
+
return _this.renderPc(undefined, r);
|
|
64
59
|
});
|
|
65
60
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
66
61
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_itemList")];
|
|
67
62
|
});
|
|
68
|
-
_defineProperty(this, "renderExport", function () {
|
|
69
|
-
|
|
63
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
64
|
+
var _ref;
|
|
65
|
+
return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (item) {
|
|
66
|
+
return item.outerId;
|
|
67
|
+
}).join(' ');
|
|
70
68
|
});
|
|
71
69
|
_defineProperty(this, "editRender", function (p) {
|
|
72
|
-
var _this$effects, _this$effects2
|
|
70
|
+
var _this$effects, _this$effects2;
|
|
73
71
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
74
72
|
title: _this.name,
|
|
75
73
|
name: _this.id,
|
|
@@ -79,21 +77,29 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
79
77
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({}, _this.componentConfig, {
|
|
80
78
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
81
79
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
|
82
|
-
companyKey: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.companyKey,
|
|
83
80
|
width: "90%"
|
|
84
81
|
}))
|
|
85
82
|
});
|
|
86
83
|
});
|
|
87
84
|
_defineProperty(this, "filterConfig", function (item) {
|
|
88
|
-
return
|
|
85
|
+
return {
|
|
89
86
|
searchDefaultConditions: SYMBOL.like,
|
|
90
87
|
type: item.type,
|
|
91
88
|
id: "".concat(item.id, "_itemList"),
|
|
92
89
|
// 过滤组件id
|
|
93
90
|
name: item.name,
|
|
94
91
|
// 过滤组件名称
|
|
95
|
-
filterComponentType:
|
|
96
|
-
|
|
92
|
+
filterComponentType: 'Input',
|
|
93
|
+
filterFn: function filterFn(value) {
|
|
94
|
+
return function (i) {
|
|
95
|
+
var _ref2;
|
|
96
|
+
return (_ref2 = _filterFn.filterTableListItemColumnValue(i, item.id, 'itemList') || []) === null || _ref2 === void 0 ? void 0 : _ref2.some(function (item) {
|
|
97
|
+
var _String;
|
|
98
|
+
return item !== null && item !== void 0 && item.outerId ? (_String = String(item === null || item === void 0 ? void 0 : item.outerId)) === null || _String === void 0 ? void 0 : _String.includes(value) : false;
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
};
|
|
97
103
|
});
|
|
98
104
|
this.name = options.name;
|
|
99
105
|
this.id = options.id;
|
|
@@ -102,29 +108,10 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
102
108
|
this.type = options.type;
|
|
103
109
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
104
110
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
105
|
-
this.
|
|
106
|
-
// 商品名称
|
|
107
|
-
'outerId',
|
|
108
|
-
// 商品编码
|
|
109
|
-
'picUrl',
|
|
110
|
-
// 图片
|
|
111
|
-
'numIid',
|
|
112
|
-
// 商品id
|
|
113
|
-
'skuId',
|
|
114
|
-
// skuId
|
|
115
|
-
'outerSkuId',
|
|
116
|
-
// sku编码
|
|
117
|
-
'propertiesName' // sku 信息
|
|
118
|
-
];
|
|
119
|
-
|
|
120
|
-
this.isCombinationComponent = true;
|
|
111
|
+
this.isCombinationComponent = false;
|
|
121
112
|
this.canSort = false;
|
|
122
|
-
this.
|
|
123
|
-
|
|
124
|
-
name: "商品信息"
|
|
125
|
-
}));
|
|
126
|
-
this.children = [this.goods];
|
|
127
|
-
this.rules = this !== null && this !== void 0 && (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
|
|
113
|
+
this.children = [];
|
|
114
|
+
this.rules = this !== null && this !== void 0 && (_this$componentConfig = this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? [{
|
|
128
115
|
required: true,
|
|
129
116
|
validator: function validator(_, value) {
|
|
130
117
|
if (!value || !value.length) {
|
|
@@ -134,7 +121,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
134
121
|
return !item.outerId;
|
|
135
122
|
});
|
|
136
123
|
if (hasNotId) {
|
|
137
|
-
return Promise.reject(new Error('
|
|
124
|
+
return Promise.reject(new Error('请输入商品编码'));
|
|
138
125
|
}
|
|
139
126
|
return Promise.resolve();
|
|
140
127
|
}
|
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, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } 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) => BsReissue | ItemEnCode | FlowCreator | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | MsgStatus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.23.0-alpha.
|
|
3
|
+
"version": "0.23.0-alpha.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.23.0-alpha.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.23.0-alpha.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.23.0-alpha.2",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.23.0-alpha.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "e44ca54a4f0a6202e2480eaceceb9bb2c966da0c",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|