@fle-ui/plus-choose-site-goods 1.1.1 → 1.1.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/README.md +18 -18
- package/es/index.js +76 -44
- package/es/index.less +106 -107
- package/lib/index.js +74 -44
- package/lib/index.less +106 -107
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# @fle-ui/plus-choose-site-goods
|
|
2
|
-
|
|
3
|
-
> @fle-ui/plus-choose-site-goods
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
Using npm:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
$ npm install --save @fle-ui/plus-choose-site-goods
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
or using yarn:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
$ yarn add @fle-ui/plus-choose-site-goods
|
|
17
|
-
```
|
|
18
|
-
|
|
1
|
+
# @fle-ui/plus-choose-site-goods
|
|
2
|
+
|
|
3
|
+
> @fle-ui/plus-choose-site-goods
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Using npm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
$ npm install --save @fle-ui/plus-choose-site-goods
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
or using yarn:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
$ yarn add @fle-ui/plus-choose-site-goods
|
|
17
|
+
```
|
|
18
|
+
|
|
19
19
|
|
package/es/index.js
CHANGED
|
@@ -7,6 +7,8 @@ import "antd/es/table/style";
|
|
|
7
7
|
import _Table from "antd/es/table";
|
|
8
8
|
import "antd/es/spin/style";
|
|
9
9
|
import _Spin from "antd/es/spin";
|
|
10
|
+
import "antd/es/typography/style";
|
|
11
|
+
import _Typography from "antd/es/typography";
|
|
10
12
|
import "antd/es/tooltip/style";
|
|
11
13
|
import _Tooltip from "antd/es/tooltip";
|
|
12
14
|
import "antd/es/row/style";
|
|
@@ -50,17 +52,18 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
50
52
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
51
53
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
52
54
|
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; }
|
|
53
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
55
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
54
56
|
import React, { useEffect, useState, useRef } from 'react';
|
|
55
57
|
import ProImage from '@fle-ui/plus-image';
|
|
56
58
|
import ChooseMallGoods from '@fle-ui/plus-choose-mall-goods';
|
|
57
59
|
import AddressSelection from '@fle-ui/plus-address-selection';
|
|
58
60
|
import { QuestionCircleOutlined, LoadingOutlined } from '@ant-design/icons';
|
|
61
|
+
import PlusConfigProvider from '@fle-ui/plus-config-provider';
|
|
59
62
|
import Icon from './components/icon';
|
|
60
63
|
import { tabs, tabsSearchParamsMap, priceRangeForOnce, priceRangeForPurchase, profitRangeForOnce, profitRangeForPurchase, sortOptions } from './utils/options';
|
|
64
|
+
import api from './utils/api';
|
|
61
65
|
import request from './utils/request';
|
|
62
66
|
import { getApiHost } from './utils/serviceEnv';
|
|
63
|
-
import api from './utils/api';
|
|
64
67
|
import { showMoney } from './utils/common';
|
|
65
68
|
import './index.less';
|
|
66
69
|
var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
@@ -196,7 +199,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
196
199
|
setLoading = _useState14[1];
|
|
197
200
|
var getGoodsList = /*#__PURE__*/function () {
|
|
198
201
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
199
|
-
var _searchParams$flagCat, _searchParams$saleabl, params, text, res, _res$data, _res$data2, list, jdGoods;
|
|
202
|
+
var _searchParams$flagCat, _searchParams$priceTy, _searchParams$priceTy2, _searchParams$saleabl, params, text, res, _res$data, _res$data2, list, jdGoods;
|
|
200
203
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
201
204
|
while (1) switch (_context.prev = _context.next) {
|
|
202
205
|
case 0:
|
|
@@ -215,7 +218,14 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
215
218
|
flagTags: searchParams.flagTags,
|
|
216
219
|
flagIndustry: searchParams.flagIndustry,
|
|
217
220
|
flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
|
|
218
|
-
});
|
|
221
|
+
});
|
|
222
|
+
if ((_searchParams$priceTy = searchParams.priceType) === null || _searchParams$priceTy === void 0 ? void 0 : _searchParams$priceTy.includes('once')) {
|
|
223
|
+
params['isOnce'] = 1;
|
|
224
|
+
}
|
|
225
|
+
if ((_searchParams$priceTy2 = searchParams.priceType) === null || _searchParams$priceTy2 === void 0 ? void 0 : _searchParams$priceTy2.includes('purchase')) {
|
|
226
|
+
params['isPurchase'] = 1;
|
|
227
|
+
}
|
|
228
|
+
// 价格区间
|
|
219
229
|
if (searchParams.priceRangeMin !== undefined) {
|
|
220
230
|
params[searchParams.priceType + 'Min'] = Number(searchParams.priceRangeMin * 100);
|
|
221
231
|
}
|
|
@@ -245,12 +255,11 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
245
255
|
text = text.slice(0, text.length - 1);
|
|
246
256
|
params.saleableCity = text;
|
|
247
257
|
}
|
|
248
|
-
// console.log(params);
|
|
249
258
|
// return;
|
|
250
259
|
setLoading(true);
|
|
251
|
-
_context.next =
|
|
260
|
+
_context.next = 13;
|
|
252
261
|
return $http.post(api['getGoodsList'], params);
|
|
253
|
-
case
|
|
262
|
+
case 13:
|
|
254
263
|
res = _context.sent;
|
|
255
264
|
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
256
265
|
list = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
|
|
@@ -266,15 +275,15 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
266
275
|
getJdStock(list, jdGoods);
|
|
267
276
|
}
|
|
268
277
|
}
|
|
269
|
-
case
|
|
270
|
-
_context.prev =
|
|
278
|
+
case 15:
|
|
279
|
+
_context.prev = 15;
|
|
271
280
|
setLoading(false);
|
|
272
|
-
return _context.finish(
|
|
273
|
-
case
|
|
281
|
+
return _context.finish(15);
|
|
282
|
+
case 18:
|
|
274
283
|
case "end":
|
|
275
284
|
return _context.stop();
|
|
276
285
|
}
|
|
277
|
-
}, _callee, null, [[0,,
|
|
286
|
+
}, _callee, null, [[0,, 15, 18]]);
|
|
278
287
|
}));
|
|
279
288
|
return function getGoodsList() {
|
|
280
289
|
return _ref.apply(this, arguments);
|
|
@@ -629,7 +638,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
629
638
|
placeholder: "\u9009\u62E9\u884C\u4E1A\u6807\u7B7E",
|
|
630
639
|
allowClear: true
|
|
631
640
|
}), /*#__PURE__*/React.createElement(_Cascader, {
|
|
632
|
-
placeholder: "\u9009\u62E9\u5546\u54C1\
|
|
641
|
+
placeholder: "\u9009\u62E9\u5546\u54C1\u5206\u7C7B",
|
|
633
642
|
fieldNames: {
|
|
634
643
|
label: 'name',
|
|
635
644
|
value: 'id'
|
|
@@ -650,13 +659,13 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
650
659
|
})))
|
|
651
660
|
}, {
|
|
652
661
|
name: 'categoryTree',
|
|
653
|
-
show: !(hiddenSearchProps === null || hiddenSearchProps === void 0 ? void 0 : hiddenSearchProps.includes('categoryTree')),
|
|
662
|
+
show: !(hiddenSearchProps === null || hiddenSearchProps === void 0 ? void 0 : hiddenSearchProps.includes('categoryTree')) && searchParams.tab !== 'zy',
|
|
654
663
|
span: 8,
|
|
655
664
|
node: /*#__PURE__*/React.createElement(_Col, {
|
|
656
665
|
span: 8
|
|
657
666
|
}, /*#__PURE__*/React.createElement("div", {
|
|
658
667
|
className: "ww-search-flex"
|
|
659
|
-
},
|
|
668
|
+
}, /*#__PURE__*/React.createElement(_TreeSelect, {
|
|
660
669
|
style: {
|
|
661
670
|
flex: 1
|
|
662
671
|
},
|
|
@@ -665,7 +674,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
665
674
|
maxHeight: 400,
|
|
666
675
|
overflow: 'auto'
|
|
667
676
|
},
|
|
668
|
-
placeholder: "\u9009\u62E9\
|
|
677
|
+
placeholder: "\u9009\u62E9\u7CFB\u7EDF\u7C7B\u76EE",
|
|
669
678
|
allowClear: true,
|
|
670
679
|
onChange: function onChange(e) {
|
|
671
680
|
handleChangeParams({
|
|
@@ -797,7 +806,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
797
806
|
span: 8
|
|
798
807
|
}, /*#__PURE__*/React.createElement("div", {
|
|
799
808
|
className: "ww-search-flex"
|
|
800
|
-
},
|
|
809
|
+
}, /*#__PURE__*/React.createElement(_Select, {
|
|
801
810
|
showSearch: true,
|
|
802
811
|
mode: "multiple",
|
|
803
812
|
allowClear: true,
|
|
@@ -822,20 +831,20 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
822
831
|
}))))
|
|
823
832
|
}, {
|
|
824
833
|
name: 'addressCodes',
|
|
825
|
-
show: !(hiddenSearchProps === null || hiddenSearchProps === void 0 ? void 0 : hiddenSearchProps.includes('addressCodes')),
|
|
834
|
+
show: !(hiddenSearchProps === null || hiddenSearchProps === void 0 ? void 0 : hiddenSearchProps.includes('addressCodes')) && searchParams.tab !== 'zy',
|
|
826
835
|
span: 8,
|
|
827
836
|
node: /*#__PURE__*/React.createElement(_Col, {
|
|
828
837
|
span: 8
|
|
829
838
|
}, /*#__PURE__*/React.createElement("div", {
|
|
830
839
|
className: "ww-search-flex"
|
|
831
|
-
},
|
|
840
|
+
}, /*#__PURE__*/React.createElement(AddressSelection, {
|
|
832
841
|
value: searchParams.addressCodes,
|
|
833
842
|
onChange: function onChange(v) {
|
|
834
843
|
handleChangeParams({
|
|
835
844
|
addressCodes: v
|
|
836
845
|
});
|
|
837
846
|
},
|
|
838
|
-
placeholder: "\u8BF7\u9009\u62E9\u5730\u5740",
|
|
847
|
+
placeholder: "\u8BF7\u9009\u62E9\u53D1\u8D27\u5730\u5740",
|
|
839
848
|
level: 2,
|
|
840
849
|
style: {
|
|
841
850
|
flex: 1
|
|
@@ -849,7 +858,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
849
858
|
span: 8
|
|
850
859
|
}, /*#__PURE__*/React.createElement("div", {
|
|
851
860
|
className: "ww-search-flex"
|
|
852
|
-
},
|
|
861
|
+
}, /*#__PURE__*/React.createElement(_Radio.Group, {
|
|
853
862
|
onChange: handleSortChange,
|
|
854
863
|
value: searchParams.orderName,
|
|
855
864
|
optionType: "button",
|
|
@@ -1003,7 +1012,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1003
1012
|
dataIndex: 'supplyPriceMin',
|
|
1004
1013
|
key: 'supplyPriceMin',
|
|
1005
1014
|
align: 'center',
|
|
1006
|
-
width: 120,
|
|
1007
1015
|
render: function render(text, record) {
|
|
1008
1016
|
if ((record === null || record === void 0 ? void 0 : record.isOnce) === 1) {
|
|
1009
1017
|
var _record$onceInfo6, _record$onceInfo7, _record$onceInfo9, _record$onceInfo10;
|
|
@@ -1020,7 +1028,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1020
1028
|
dataIndex: 'sitePriceMaxPurchase',
|
|
1021
1029
|
key: 'sitePriceMaxPurchase',
|
|
1022
1030
|
align: 'center',
|
|
1023
|
-
width: 120,
|
|
1024
1031
|
render: function render(text, record) {
|
|
1025
1032
|
var _record$purchaseInfo16, _record$purchaseInfo17, _record$purchaseInfo19, _record$purchaseInfo20;
|
|
1026
1033
|
if (record.isPurchase === 0) return '-';
|
|
@@ -1035,7 +1042,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1035
1042
|
dataIndex: 'sitePriceMaxOnce',
|
|
1036
1043
|
key: 'sitePriceMaxOnce',
|
|
1037
1044
|
align: 'center',
|
|
1038
|
-
width: 120,
|
|
1039
1045
|
render: function render(text, record) {
|
|
1040
1046
|
var _record$onceInfo11, _record$onceInfo12, _record$onceInfo14, _record$onceInfo15;
|
|
1041
1047
|
if (record.isOnce === 0) return '-';
|
|
@@ -1098,7 +1104,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1098
1104
|
dataIndex: 'marketPriceMax',
|
|
1099
1105
|
key: 'marketPriceMax',
|
|
1100
1106
|
align: 'center',
|
|
1101
|
-
width: 98,
|
|
1102
1107
|
render: function render(text, record) {
|
|
1103
1108
|
var _record$onceInfo21, _record$onceInfo22, _record$onceInfo24, _record$onceInfo25;
|
|
1104
1109
|
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo21 = record.onceInfo) === null || _record$onceInfo21 === void 0 ? void 0 : _record$onceInfo21.marketPriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo22 = record.onceInfo) === null || _record$onceInfo22 === void 0 ? void 0 : _record$onceInfo22.marketPriceMax)) {
|
|
@@ -1112,7 +1117,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1112
1117
|
dataIndex: 'salePriceMax',
|
|
1113
1118
|
key: 'salePriceMax',
|
|
1114
1119
|
align: 'center',
|
|
1115
|
-
width: 86,
|
|
1116
1120
|
render: function render(text, record) {
|
|
1117
1121
|
var _record$onceInfo26, _record$onceInfo27, _record$onceInfo29, _record$onceInfo30;
|
|
1118
1122
|
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo26 = record.onceInfo) === null || _record$onceInfo26 === void 0 ? void 0 : _record$onceInfo26.salePriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo27 = record.onceInfo) === null || _record$onceInfo27 === void 0 ? void 0 : _record$onceInfo27.salePriceMax)) {
|
|
@@ -1126,7 +1130,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1126
1130
|
dataIndex: 'sitePriceMax',
|
|
1127
1131
|
key: 'sitePriceMax',
|
|
1128
1132
|
align: 'center',
|
|
1129
|
-
width: 86,
|
|
1130
1133
|
render: function render(text, record) {
|
|
1131
1134
|
var _record$onceInfo31, _record$onceInfo32, _record$onceInfo34, _record$onceInfo35;
|
|
1132
1135
|
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo31 = record.onceInfo) === null || _record$onceInfo31 === void 0 ? void 0 : _record$onceInfo31.sitePriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo32 = record.onceInfo) === null || _record$onceInfo32 === void 0 ? void 0 : _record$onceInfo32.sitePriceMax)) {
|
|
@@ -1171,9 +1174,32 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1171
1174
|
}, v === null || v === void 0 ? void 0 : v.slice(0, 50)));
|
|
1172
1175
|
}
|
|
1173
1176
|
}];
|
|
1177
|
+
// 系统类目
|
|
1178
|
+
var categoryTree = [{
|
|
1179
|
+
title: '系统类目',
|
|
1180
|
+
dataIndex: 'categoryId',
|
|
1181
|
+
key: 'categoryId',
|
|
1182
|
+
align: 'center',
|
|
1183
|
+
width: 170,
|
|
1184
|
+
render: function render(text, record) {
|
|
1185
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, record.isEntity ? '实物商品' : '虚拟商品'), /*#__PURE__*/React.createElement("div", null, record.categoryTreeName));
|
|
1186
|
+
}
|
|
1187
|
+
}];
|
|
1188
|
+
// 商品分类
|
|
1189
|
+
var flagCategoryInfo = [{
|
|
1190
|
+
title: '商品分类',
|
|
1191
|
+
key: 'flagCategoryInfo',
|
|
1192
|
+
align: 'center',
|
|
1193
|
+
width: 150,
|
|
1194
|
+
render: function render(_, record) {
|
|
1195
|
+
var _record$flagCategoryI;
|
|
1196
|
+
return (record === null || record === void 0 ? void 0 : (_record$flagCategoryI = record.flagCategoryInfo) === null || _record$flagCategoryI === void 0 ? void 0 : _record$flagCategoryI.treeName) || '-';
|
|
1197
|
+
}
|
|
1198
|
+
}];
|
|
1174
1199
|
var columns = function columns() {
|
|
1175
1200
|
var list = app === 1 ? columns1 : columns2;
|
|
1176
1201
|
var list2 = searchParams.tab === 'xhdg' ? dgssColumns : [];
|
|
1202
|
+
var list3 = searchParams.tab === 'zy' ? flagCategoryInfo : categoryTree;
|
|
1177
1203
|
var _columns = [{
|
|
1178
1204
|
title: '商品',
|
|
1179
1205
|
dataIndex: 'goodsId',
|
|
@@ -1193,8 +1219,12 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1193
1219
|
needOssProcess: false
|
|
1194
1220
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1195
1221
|
className: 'table-goods-content'
|
|
1196
|
-
}, /*#__PURE__*/React.createElement(
|
|
1197
|
-
|
|
1222
|
+
}, /*#__PURE__*/React.createElement(_Typography.Paragraph, {
|
|
1223
|
+
ellipsis: {
|
|
1224
|
+
rows: 2,
|
|
1225
|
+
tooltip: true
|
|
1226
|
+
},
|
|
1227
|
+
className: "table-goods-content-title"
|
|
1198
1228
|
}, record.name), /*#__PURE__*/React.createElement("div", {
|
|
1199
1229
|
title: record.goodsId,
|
|
1200
1230
|
className: 'table-goods-content-sub-title'
|
|
@@ -1205,17 +1235,11 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1205
1235
|
dataIndex: 'brandName',
|
|
1206
1236
|
key: 'brandName',
|
|
1207
1237
|
align: 'center',
|
|
1208
|
-
width: 140
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
dataIndex: 'categoryId',
|
|
1212
|
-
key: 'categoryId',
|
|
1213
|
-
align: 'center',
|
|
1214
|
-
width: 170,
|
|
1215
|
-
render: function render(text, record) {
|
|
1216
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, record.isEntity ? '实物商品' : '虚拟商品'), /*#__PURE__*/React.createElement("div", null, record.categoryTreeName));
|
|
1238
|
+
width: 140,
|
|
1239
|
+
render: function render(_, record) {
|
|
1240
|
+
return record.brandName || '-';
|
|
1217
1241
|
}
|
|
1218
|
-
}].concat(list, [{
|
|
1242
|
+
}].concat(list3, list, [{
|
|
1219
1243
|
title: '库存',
|
|
1220
1244
|
dataIndex: 'stock',
|
|
1221
1245
|
key: 'stock',
|
|
@@ -1237,7 +1261,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1237
1261
|
key: 'action',
|
|
1238
1262
|
align: 'center',
|
|
1239
1263
|
fixed: 'right',
|
|
1240
|
-
width:
|
|
1264
|
+
width: 80,
|
|
1241
1265
|
render: function render(text, record) {
|
|
1242
1266
|
if (defaultSelectedGoodsIds.includes(record.goodsId)) {
|
|
1243
1267
|
return /*#__PURE__*/React.createElement(_Button, {
|
|
@@ -1259,12 +1283,19 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1259
1283
|
});
|
|
1260
1284
|
});
|
|
1261
1285
|
};
|
|
1262
|
-
return /*#__PURE__*/React.createElement(
|
|
1286
|
+
return /*#__PURE__*/React.createElement(PlusConfigProvider, {
|
|
1287
|
+
prefixCls: "ant"
|
|
1288
|
+
}, /*#__PURE__*/React.createElement(_Modal, _extends({
|
|
1263
1289
|
title: "\u6311\u9009\u7AD9\u70B9\u5546\u54C1",
|
|
1264
1290
|
open: true,
|
|
1265
1291
|
footer: null,
|
|
1266
1292
|
width: 1366,
|
|
1267
1293
|
onCancel: onClose,
|
|
1294
|
+
styles: {
|
|
1295
|
+
body: {
|
|
1296
|
+
padding: '0 16px'
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1268
1299
|
className: "choose-site-goods-modal",
|
|
1269
1300
|
centered: true
|
|
1270
1301
|
}, otherProps), renderTabs(), renderMainSearch(), renderSearch2(), /*#__PURE__*/React.createElement(_Table, {
|
|
@@ -1276,7 +1307,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1276
1307
|
current: pageNo,
|
|
1277
1308
|
position: ['bottomRight'],
|
|
1278
1309
|
total: total,
|
|
1279
|
-
|
|
1310
|
+
size: 'default',
|
|
1311
|
+
showQuickJumper: false,
|
|
1280
1312
|
showSizeChanger: true,
|
|
1281
1313
|
defaultPageSize: pageSize || 10,
|
|
1282
1314
|
onChange: function onChange(page, size) {
|
|
@@ -1295,7 +1327,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1295
1327
|
marginTop: '20px'
|
|
1296
1328
|
},
|
|
1297
1329
|
scroll: {
|
|
1298
|
-
x:
|
|
1330
|
+
x: 1800,
|
|
1299
1331
|
y: 500
|
|
1300
1332
|
},
|
|
1301
1333
|
rowSelection: multiple ? rowSelection : undefined
|
|
@@ -1320,6 +1352,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1320
1352
|
tabsConfig: tabsConfig,
|
|
1321
1353
|
hiddenColumns: hiddenColumns,
|
|
1322
1354
|
hiddenSearchProps: hiddenSearchProps
|
|
1323
|
-
}));
|
|
1355
|
+
})));
|
|
1324
1356
|
};
|
|
1325
1357
|
export default ChooseSiteGoods;
|
package/es/index.less
CHANGED
|
@@ -1,107 +1,106 @@
|
|
|
1
|
-
@primar-color: #2c68ff;
|
|
2
|
-
|
|
3
|
-
.choose-site-goods-modal {
|
|
4
|
-
.ww-search {
|
|
5
|
-
background-color: #fafafa;
|
|
6
|
-
padding: 20px;
|
|
7
|
-
.ww-search-flex {
|
|
8
|
-
width: 100%;
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
.ww-search-range-input {
|
|
13
|
-
flex: 1;
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
.main-search {
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
margin-bottom: 16px;
|
|
23
|
-
position: relative;
|
|
24
|
-
.choose-more-btn {
|
|
25
|
-
position: absolute;
|
|
26
|
-
right: 0px;
|
|
27
|
-
top: 0px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
.search-2 {
|
|
31
|
-
.sort-item {
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
.sort-item-label {
|
|
35
|
-
font-size: 12px;
|
|
36
|
-
}
|
|
37
|
-
.sort-item-icon {
|
|
38
|
-
font-size: 10px;
|
|
39
|
-
margin-left: 4px;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
.ant-radio-button-wrapper {
|
|
43
|
-
padding: 0 10px !important;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
.table-goods-wrap {
|
|
47
|
-
display: flex;
|
|
48
|
-
|
|
49
|
-
.table-goods-img-wrap {
|
|
50
|
-
width: 60px;
|
|
51
|
-
height: 60px;
|
|
52
|
-
background: #ffffff;
|
|
53
|
-
border-radius: 1px;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
font-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
overflow:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
font-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
overflow:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
1
|
+
@primar-color: #2c68ff;
|
|
2
|
+
|
|
3
|
+
.choose-site-goods-modal {
|
|
4
|
+
.ww-search {
|
|
5
|
+
background-color: #fafafa;
|
|
6
|
+
padding: 20px;
|
|
7
|
+
.ww-search-flex {
|
|
8
|
+
width: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
.ww-search-range-input {
|
|
13
|
+
flex: 1;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.main-search {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
margin-bottom: 16px;
|
|
23
|
+
position: relative;
|
|
24
|
+
.choose-more-btn {
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: 0px;
|
|
27
|
+
top: 0px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.search-2 {
|
|
31
|
+
.sort-item {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
.sort-item-label {
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
}
|
|
37
|
+
.sort-item-icon {
|
|
38
|
+
font-size: 10px;
|
|
39
|
+
margin-left: 4px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.ant-radio-button-wrapper {
|
|
43
|
+
padding: 0 10px !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.table-goods-wrap {
|
|
47
|
+
display: flex;
|
|
48
|
+
|
|
49
|
+
.table-goods-img-wrap {
|
|
50
|
+
width: 60px;
|
|
51
|
+
height: 60px;
|
|
52
|
+
background: #ffffff;
|
|
53
|
+
border-radius: 1px;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
.pro-image {
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
object-fit: cover;
|
|
62
|
+
.ant-image {
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.table-goods-content {
|
|
70
|
+
margin-left: 10px;
|
|
71
|
+
flex: 1;
|
|
72
|
+
|
|
73
|
+
.table-goods-content-title {
|
|
74
|
+
height: 34px;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
color: #666666;
|
|
78
|
+
line-height: 17px;
|
|
79
|
+
text-overflow: -o-ellipsis-lastline;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
text-overflow: ellipsis;
|
|
82
|
+
display: -webkit-box;
|
|
83
|
+
-webkit-line-clamp: 2;
|
|
84
|
+
line-clamp: 2;
|
|
85
|
+
-webkit-box-orient: vertical;
|
|
86
|
+
text-align: left;
|
|
87
|
+
// color: @primary-color;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.table-goods-content-sub-title {
|
|
91
|
+
text-align: left;
|
|
92
|
+
height: 17px;
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
font-weight: 400;
|
|
95
|
+
color: #666666;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
margin-top: 9px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
.ml-3 {
|
|
104
|
+
margin-left: 3px;
|
|
105
|
+
}
|
|
106
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -11,11 +11,12 @@ var _plusImage = _interopRequireDefault(require("@fle-ui/plus-image"));
|
|
|
11
11
|
var _plusChooseMallGoods = _interopRequireDefault(require("@fle-ui/plus-choose-mall-goods"));
|
|
12
12
|
var _plusAddressSelection = _interopRequireDefault(require("@fle-ui/plus-address-selection"));
|
|
13
13
|
var _icons = require("@ant-design/icons");
|
|
14
|
+
var _plusConfigProvider = _interopRequireDefault(require("@fle-ui/plus-config-provider"));
|
|
14
15
|
var _icon = _interopRequireDefault(require("./components/icon"));
|
|
15
16
|
var _options = require("./utils/options");
|
|
17
|
+
var _api = _interopRequireDefault(require("./utils/api"));
|
|
16
18
|
var _request = _interopRequireDefault(require("./utils/request"));
|
|
17
19
|
var _serviceEnv = require("./utils/serviceEnv");
|
|
18
|
-
var _api = _interopRequireDefault(require("./utils/api"));
|
|
19
20
|
var _common = require("./utils/common");
|
|
20
21
|
require("./index.less");
|
|
21
22
|
var _excluded = ["env", "token", "loginErrFn", "onClose", "siteId", "app", "multiple", "defaultSelectedGoodsIds", "onSelectOk", "showMore", "showMoreText", "tabsConfig", "hiddenColumns", "hiddenSearchProps"];
|
|
@@ -42,7 +43,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
42
43
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
43
44
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
44
45
|
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; }
|
|
45
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
46
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
46
47
|
var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
47
48
|
var _props$env = props.env,
|
|
48
49
|
env = _props$env === void 0 ? 'prod' : _props$env,
|
|
@@ -176,7 +177,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
176
177
|
setLoading = _useState14[1];
|
|
177
178
|
var getGoodsList = /*#__PURE__*/function () {
|
|
178
179
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
179
|
-
var _searchParams$flagCat, _searchParams$saleabl, params, text, res, _res$data, _res$data2, list, jdGoods;
|
|
180
|
+
var _searchParams$flagCat, _searchParams$priceTy, _searchParams$priceTy2, _searchParams$saleabl, params, text, res, _res$data, _res$data2, list, jdGoods;
|
|
180
181
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
181
182
|
while (1) switch (_context.prev = _context.next) {
|
|
182
183
|
case 0:
|
|
@@ -195,7 +196,14 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
195
196
|
flagTags: searchParams.flagTags,
|
|
196
197
|
flagIndustry: searchParams.flagIndustry,
|
|
197
198
|
flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
|
|
198
|
-
});
|
|
199
|
+
});
|
|
200
|
+
if ((_searchParams$priceTy = searchParams.priceType) === null || _searchParams$priceTy === void 0 ? void 0 : _searchParams$priceTy.includes('once')) {
|
|
201
|
+
params['isOnce'] = 1;
|
|
202
|
+
}
|
|
203
|
+
if ((_searchParams$priceTy2 = searchParams.priceType) === null || _searchParams$priceTy2 === void 0 ? void 0 : _searchParams$priceTy2.includes('purchase')) {
|
|
204
|
+
params['isPurchase'] = 1;
|
|
205
|
+
}
|
|
206
|
+
// 价格区间
|
|
199
207
|
if (searchParams.priceRangeMin !== undefined) {
|
|
200
208
|
params[searchParams.priceType + 'Min'] = Number(searchParams.priceRangeMin * 100);
|
|
201
209
|
}
|
|
@@ -225,12 +233,11 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
225
233
|
text = text.slice(0, text.length - 1);
|
|
226
234
|
params.saleableCity = text;
|
|
227
235
|
}
|
|
228
|
-
// console.log(params);
|
|
229
236
|
// return;
|
|
230
237
|
setLoading(true);
|
|
231
|
-
_context.next =
|
|
238
|
+
_context.next = 13;
|
|
232
239
|
return $http.post(_api.default['getGoodsList'], params);
|
|
233
|
-
case
|
|
240
|
+
case 13:
|
|
234
241
|
res = _context.sent;
|
|
235
242
|
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
236
243
|
list = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
|
|
@@ -246,15 +253,15 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
246
253
|
getJdStock(list, jdGoods);
|
|
247
254
|
}
|
|
248
255
|
}
|
|
249
|
-
case
|
|
250
|
-
_context.prev =
|
|
256
|
+
case 15:
|
|
257
|
+
_context.prev = 15;
|
|
251
258
|
setLoading(false);
|
|
252
|
-
return _context.finish(
|
|
253
|
-
case
|
|
259
|
+
return _context.finish(15);
|
|
260
|
+
case 18:
|
|
254
261
|
case "end":
|
|
255
262
|
return _context.stop();
|
|
256
263
|
}
|
|
257
|
-
}, _callee, null, [[0,,
|
|
264
|
+
}, _callee, null, [[0,, 15, 18]]);
|
|
258
265
|
}));
|
|
259
266
|
return function getGoodsList() {
|
|
260
267
|
return _ref.apply(this, arguments);
|
|
@@ -609,7 +616,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
609
616
|
placeholder: "\u9009\u62E9\u884C\u4E1A\u6807\u7B7E",
|
|
610
617
|
allowClear: true
|
|
611
618
|
}), /*#__PURE__*/_react.default.createElement(_antd.Cascader, {
|
|
612
|
-
placeholder: "\u9009\u62E9\u5546\u54C1\
|
|
619
|
+
placeholder: "\u9009\u62E9\u5546\u54C1\u5206\u7C7B",
|
|
613
620
|
fieldNames: {
|
|
614
621
|
label: 'name',
|
|
615
622
|
value: 'id'
|
|
@@ -630,13 +637,13 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
630
637
|
})))
|
|
631
638
|
}, {
|
|
632
639
|
name: 'categoryTree',
|
|
633
|
-
show: !(hiddenSearchProps === null || hiddenSearchProps === void 0 ? void 0 : hiddenSearchProps.includes('categoryTree')),
|
|
640
|
+
show: !(hiddenSearchProps === null || hiddenSearchProps === void 0 ? void 0 : hiddenSearchProps.includes('categoryTree')) && searchParams.tab !== 'zy',
|
|
634
641
|
span: 8,
|
|
635
642
|
node: /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
636
643
|
span: 8
|
|
637
644
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
638
645
|
className: "ww-search-flex"
|
|
639
|
-
},
|
|
646
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.TreeSelect, {
|
|
640
647
|
style: {
|
|
641
648
|
flex: 1
|
|
642
649
|
},
|
|
@@ -645,7 +652,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
645
652
|
maxHeight: 400,
|
|
646
653
|
overflow: 'auto'
|
|
647
654
|
},
|
|
648
|
-
placeholder: "\u9009\u62E9\
|
|
655
|
+
placeholder: "\u9009\u62E9\u7CFB\u7EDF\u7C7B\u76EE",
|
|
649
656
|
allowClear: true,
|
|
650
657
|
onChange: function onChange(e) {
|
|
651
658
|
handleChangeParams({
|
|
@@ -777,7 +784,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
777
784
|
span: 8
|
|
778
785
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
779
786
|
className: "ww-search-flex"
|
|
780
|
-
},
|
|
787
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
781
788
|
showSearch: true,
|
|
782
789
|
mode: "multiple",
|
|
783
790
|
allowClear: true,
|
|
@@ -802,20 +809,20 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
802
809
|
}))))
|
|
803
810
|
}, {
|
|
804
811
|
name: 'addressCodes',
|
|
805
|
-
show: !(hiddenSearchProps === null || hiddenSearchProps === void 0 ? void 0 : hiddenSearchProps.includes('addressCodes')),
|
|
812
|
+
show: !(hiddenSearchProps === null || hiddenSearchProps === void 0 ? void 0 : hiddenSearchProps.includes('addressCodes')) && searchParams.tab !== 'zy',
|
|
806
813
|
span: 8,
|
|
807
814
|
node: /*#__PURE__*/_react.default.createElement(_antd.Col, {
|
|
808
815
|
span: 8
|
|
809
816
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
810
817
|
className: "ww-search-flex"
|
|
811
|
-
},
|
|
818
|
+
}, /*#__PURE__*/_react.default.createElement(_plusAddressSelection.default, {
|
|
812
819
|
value: searchParams.addressCodes,
|
|
813
820
|
onChange: function onChange(v) {
|
|
814
821
|
handleChangeParams({
|
|
815
822
|
addressCodes: v
|
|
816
823
|
});
|
|
817
824
|
},
|
|
818
|
-
placeholder: "\u8BF7\u9009\u62E9\u5730\u5740",
|
|
825
|
+
placeholder: "\u8BF7\u9009\u62E9\u53D1\u8D27\u5730\u5740",
|
|
819
826
|
level: 2,
|
|
820
827
|
style: {
|
|
821
828
|
flex: 1
|
|
@@ -829,7 +836,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
829
836
|
span: 8
|
|
830
837
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
831
838
|
className: "ww-search-flex"
|
|
832
|
-
},
|
|
839
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Radio.Group, {
|
|
833
840
|
onChange: handleSortChange,
|
|
834
841
|
value: searchParams.orderName,
|
|
835
842
|
optionType: "button",
|
|
@@ -983,7 +990,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
983
990
|
dataIndex: 'supplyPriceMin',
|
|
984
991
|
key: 'supplyPriceMin',
|
|
985
992
|
align: 'center',
|
|
986
|
-
width: 120,
|
|
987
993
|
render: function render(text, record) {
|
|
988
994
|
if ((record === null || record === void 0 ? void 0 : record.isOnce) === 1) {
|
|
989
995
|
var _record$onceInfo6, _record$onceInfo7, _record$onceInfo9, _record$onceInfo10;
|
|
@@ -1000,7 +1006,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1000
1006
|
dataIndex: 'sitePriceMaxPurchase',
|
|
1001
1007
|
key: 'sitePriceMaxPurchase',
|
|
1002
1008
|
align: 'center',
|
|
1003
|
-
width: 120,
|
|
1004
1009
|
render: function render(text, record) {
|
|
1005
1010
|
var _record$purchaseInfo16, _record$purchaseInfo17, _record$purchaseInfo19, _record$purchaseInfo20;
|
|
1006
1011
|
if (record.isPurchase === 0) return '-';
|
|
@@ -1015,7 +1020,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1015
1020
|
dataIndex: 'sitePriceMaxOnce',
|
|
1016
1021
|
key: 'sitePriceMaxOnce',
|
|
1017
1022
|
align: 'center',
|
|
1018
|
-
width: 120,
|
|
1019
1023
|
render: function render(text, record) {
|
|
1020
1024
|
var _record$onceInfo11, _record$onceInfo12, _record$onceInfo14, _record$onceInfo15;
|
|
1021
1025
|
if (record.isOnce === 0) return '-';
|
|
@@ -1078,7 +1082,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1078
1082
|
dataIndex: 'marketPriceMax',
|
|
1079
1083
|
key: 'marketPriceMax',
|
|
1080
1084
|
align: 'center',
|
|
1081
|
-
width: 98,
|
|
1082
1085
|
render: function render(text, record) {
|
|
1083
1086
|
var _record$onceInfo21, _record$onceInfo22, _record$onceInfo24, _record$onceInfo25;
|
|
1084
1087
|
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo21 = record.onceInfo) === null || _record$onceInfo21 === void 0 ? void 0 : _record$onceInfo21.marketPriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo22 = record.onceInfo) === null || _record$onceInfo22 === void 0 ? void 0 : _record$onceInfo22.marketPriceMax)) {
|
|
@@ -1092,7 +1095,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1092
1095
|
dataIndex: 'salePriceMax',
|
|
1093
1096
|
key: 'salePriceMax',
|
|
1094
1097
|
align: 'center',
|
|
1095
|
-
width: 86,
|
|
1096
1098
|
render: function render(text, record) {
|
|
1097
1099
|
var _record$onceInfo26, _record$onceInfo27, _record$onceInfo29, _record$onceInfo30;
|
|
1098
1100
|
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo26 = record.onceInfo) === null || _record$onceInfo26 === void 0 ? void 0 : _record$onceInfo26.salePriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo27 = record.onceInfo) === null || _record$onceInfo27 === void 0 ? void 0 : _record$onceInfo27.salePriceMax)) {
|
|
@@ -1106,7 +1108,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1106
1108
|
dataIndex: 'sitePriceMax',
|
|
1107
1109
|
key: 'sitePriceMax',
|
|
1108
1110
|
align: 'center',
|
|
1109
|
-
width: 86,
|
|
1110
1111
|
render: function render(text, record) {
|
|
1111
1112
|
var _record$onceInfo31, _record$onceInfo32, _record$onceInfo34, _record$onceInfo35;
|
|
1112
1113
|
if ((record === null || record === void 0 ? void 0 : (_record$onceInfo31 = record.onceInfo) === null || _record$onceInfo31 === void 0 ? void 0 : _record$onceInfo31.sitePriceMin) === (record === null || record === void 0 ? void 0 : (_record$onceInfo32 = record.onceInfo) === null || _record$onceInfo32 === void 0 ? void 0 : _record$onceInfo32.sitePriceMax)) {
|
|
@@ -1151,9 +1152,32 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1151
1152
|
}, v === null || v === void 0 ? void 0 : v.slice(0, 50)));
|
|
1152
1153
|
}
|
|
1153
1154
|
}];
|
|
1155
|
+
// 系统类目
|
|
1156
|
+
var categoryTree = [{
|
|
1157
|
+
title: '系统类目',
|
|
1158
|
+
dataIndex: 'categoryId',
|
|
1159
|
+
key: 'categoryId',
|
|
1160
|
+
align: 'center',
|
|
1161
|
+
width: 170,
|
|
1162
|
+
render: function render(text, record) {
|
|
1163
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, record.isEntity ? '实物商品' : '虚拟商品'), /*#__PURE__*/_react.default.createElement("div", null, record.categoryTreeName));
|
|
1164
|
+
}
|
|
1165
|
+
}];
|
|
1166
|
+
// 商品分类
|
|
1167
|
+
var flagCategoryInfo = [{
|
|
1168
|
+
title: '商品分类',
|
|
1169
|
+
key: 'flagCategoryInfo',
|
|
1170
|
+
align: 'center',
|
|
1171
|
+
width: 150,
|
|
1172
|
+
render: function render(_, record) {
|
|
1173
|
+
var _record$flagCategoryI;
|
|
1174
|
+
return (record === null || record === void 0 ? void 0 : (_record$flagCategoryI = record.flagCategoryInfo) === null || _record$flagCategoryI === void 0 ? void 0 : _record$flagCategoryI.treeName) || '-';
|
|
1175
|
+
}
|
|
1176
|
+
}];
|
|
1154
1177
|
var columns = function columns() {
|
|
1155
1178
|
var list = app === 1 ? columns1 : columns2;
|
|
1156
1179
|
var list2 = searchParams.tab === 'xhdg' ? dgssColumns : [];
|
|
1180
|
+
var list3 = searchParams.tab === 'zy' ? flagCategoryInfo : categoryTree;
|
|
1157
1181
|
var _columns = [{
|
|
1158
1182
|
title: '商品',
|
|
1159
1183
|
dataIndex: 'goodsId',
|
|
@@ -1173,8 +1197,12 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1173
1197
|
needOssProcess: false
|
|
1174
1198
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
1175
1199
|
className: 'table-goods-content'
|
|
1176
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
1177
|
-
|
|
1200
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Typography.Paragraph, {
|
|
1201
|
+
ellipsis: {
|
|
1202
|
+
rows: 2,
|
|
1203
|
+
tooltip: true
|
|
1204
|
+
},
|
|
1205
|
+
className: "table-goods-content-title"
|
|
1178
1206
|
}, record.name), /*#__PURE__*/_react.default.createElement("div", {
|
|
1179
1207
|
title: record.goodsId,
|
|
1180
1208
|
className: 'table-goods-content-sub-title'
|
|
@@ -1185,17 +1213,11 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1185
1213
|
dataIndex: 'brandName',
|
|
1186
1214
|
key: 'brandName',
|
|
1187
1215
|
align: 'center',
|
|
1188
|
-
width: 140
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
dataIndex: 'categoryId',
|
|
1192
|
-
key: 'categoryId',
|
|
1193
|
-
align: 'center',
|
|
1194
|
-
width: 170,
|
|
1195
|
-
render: function render(text, record) {
|
|
1196
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, record.isEntity ? '实物商品' : '虚拟商品'), /*#__PURE__*/_react.default.createElement("div", null, record.categoryTreeName));
|
|
1216
|
+
width: 140,
|
|
1217
|
+
render: function render(_, record) {
|
|
1218
|
+
return record.brandName || '-';
|
|
1197
1219
|
}
|
|
1198
|
-
}].concat(list, [{
|
|
1220
|
+
}].concat(list3, list, [{
|
|
1199
1221
|
title: '库存',
|
|
1200
1222
|
dataIndex: 'stock',
|
|
1201
1223
|
key: 'stock',
|
|
@@ -1217,7 +1239,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1217
1239
|
key: 'action',
|
|
1218
1240
|
align: 'center',
|
|
1219
1241
|
fixed: 'right',
|
|
1220
|
-
width:
|
|
1242
|
+
width: 80,
|
|
1221
1243
|
render: function render(text, record) {
|
|
1222
1244
|
if (defaultSelectedGoodsIds.includes(record.goodsId)) {
|
|
1223
1245
|
return /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
@@ -1239,12 +1261,19 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1239
1261
|
});
|
|
1240
1262
|
});
|
|
1241
1263
|
};
|
|
1242
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
1264
|
+
return /*#__PURE__*/_react.default.createElement(_plusConfigProvider.default, {
|
|
1265
|
+
prefixCls: "ant"
|
|
1266
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Modal, _extends({
|
|
1243
1267
|
title: "\u6311\u9009\u7AD9\u70B9\u5546\u54C1",
|
|
1244
1268
|
open: true,
|
|
1245
1269
|
footer: null,
|
|
1246
1270
|
width: 1366,
|
|
1247
1271
|
onCancel: onClose,
|
|
1272
|
+
styles: {
|
|
1273
|
+
body: {
|
|
1274
|
+
padding: '0 16px'
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1248
1277
|
className: "choose-site-goods-modal",
|
|
1249
1278
|
centered: true
|
|
1250
1279
|
}, otherProps), renderTabs(), renderMainSearch(), renderSearch2(), /*#__PURE__*/_react.default.createElement(_antd.Table, {
|
|
@@ -1256,7 +1285,8 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1256
1285
|
current: pageNo,
|
|
1257
1286
|
position: ['bottomRight'],
|
|
1258
1287
|
total: total,
|
|
1259
|
-
|
|
1288
|
+
size: 'default',
|
|
1289
|
+
showQuickJumper: false,
|
|
1260
1290
|
showSizeChanger: true,
|
|
1261
1291
|
defaultPageSize: pageSize || 10,
|
|
1262
1292
|
onChange: function onChange(page, size) {
|
|
@@ -1275,7 +1305,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1275
1305
|
marginTop: '20px'
|
|
1276
1306
|
},
|
|
1277
1307
|
scroll: {
|
|
1278
|
-
x:
|
|
1308
|
+
x: 1800,
|
|
1279
1309
|
y: 500
|
|
1280
1310
|
},
|
|
1281
1311
|
rowSelection: multiple ? rowSelection : undefined
|
|
@@ -1300,6 +1330,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
|
|
|
1300
1330
|
tabsConfig: tabsConfig,
|
|
1301
1331
|
hiddenColumns: hiddenColumns,
|
|
1302
1332
|
hiddenSearchProps: hiddenSearchProps
|
|
1303
|
-
}));
|
|
1333
|
+
})));
|
|
1304
1334
|
};
|
|
1305
1335
|
var _default = exports.default = ChooseSiteGoods;
|
package/lib/index.less
CHANGED
|
@@ -1,107 +1,106 @@
|
|
|
1
|
-
@primar-color: #2c68ff;
|
|
2
|
-
|
|
3
|
-
.choose-site-goods-modal {
|
|
4
|
-
.ww-search {
|
|
5
|
-
background-color: #fafafa;
|
|
6
|
-
padding: 20px;
|
|
7
|
-
.ww-search-flex {
|
|
8
|
-
width: 100%;
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
.ww-search-range-input {
|
|
13
|
-
flex: 1;
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
.main-search {
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
margin-bottom: 16px;
|
|
23
|
-
position: relative;
|
|
24
|
-
.choose-more-btn {
|
|
25
|
-
position: absolute;
|
|
26
|
-
right: 0px;
|
|
27
|
-
top: 0px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
.search-2 {
|
|
31
|
-
.sort-item {
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
.sort-item-label {
|
|
35
|
-
font-size: 12px;
|
|
36
|
-
}
|
|
37
|
-
.sort-item-icon {
|
|
38
|
-
font-size: 10px;
|
|
39
|
-
margin-left: 4px;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
.ant-radio-button-wrapper {
|
|
43
|
-
padding: 0 10px !important;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
.table-goods-wrap {
|
|
47
|
-
display: flex;
|
|
48
|
-
|
|
49
|
-
.table-goods-img-wrap {
|
|
50
|
-
width: 60px;
|
|
51
|
-
height: 60px;
|
|
52
|
-
background: #ffffff;
|
|
53
|
-
border-radius: 1px;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
font-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
overflow:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
font-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
overflow:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
1
|
+
@primar-color: #2c68ff;
|
|
2
|
+
|
|
3
|
+
.choose-site-goods-modal {
|
|
4
|
+
.ww-search {
|
|
5
|
+
background-color: #fafafa;
|
|
6
|
+
padding: 20px;
|
|
7
|
+
.ww-search-flex {
|
|
8
|
+
width: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
.ww-search-range-input {
|
|
13
|
+
flex: 1;
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.main-search {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
margin-bottom: 16px;
|
|
23
|
+
position: relative;
|
|
24
|
+
.choose-more-btn {
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: 0px;
|
|
27
|
+
top: 0px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
.search-2 {
|
|
31
|
+
.sort-item {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
.sort-item-label {
|
|
35
|
+
font-size: 12px;
|
|
36
|
+
}
|
|
37
|
+
.sort-item-icon {
|
|
38
|
+
font-size: 10px;
|
|
39
|
+
margin-left: 4px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
.ant-radio-button-wrapper {
|
|
43
|
+
padding: 0 10px !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.table-goods-wrap {
|
|
47
|
+
display: flex;
|
|
48
|
+
|
|
49
|
+
.table-goods-img-wrap {
|
|
50
|
+
width: 60px;
|
|
51
|
+
height: 60px;
|
|
52
|
+
background: #ffffff;
|
|
53
|
+
border-radius: 1px;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
.pro-image {
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: 100%;
|
|
61
|
+
object-fit: cover;
|
|
62
|
+
.ant-image {
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.table-goods-content {
|
|
70
|
+
margin-left: 10px;
|
|
71
|
+
flex: 1;
|
|
72
|
+
|
|
73
|
+
.table-goods-content-title {
|
|
74
|
+
height: 34px;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
color: #666666;
|
|
78
|
+
line-height: 17px;
|
|
79
|
+
text-overflow: -o-ellipsis-lastline;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
text-overflow: ellipsis;
|
|
82
|
+
display: -webkit-box;
|
|
83
|
+
-webkit-line-clamp: 2;
|
|
84
|
+
line-clamp: 2;
|
|
85
|
+
-webkit-box-orient: vertical;
|
|
86
|
+
text-align: left;
|
|
87
|
+
// color: @primary-color;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.table-goods-content-sub-title {
|
|
91
|
+
text-align: left;
|
|
92
|
+
height: 17px;
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
font-weight: 400;
|
|
95
|
+
color: #666666;
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
margin-top: 9px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
.ml-3 {
|
|
104
|
+
margin-left: 3px;
|
|
105
|
+
}
|
|
106
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-choose-site-goods",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "@fle-ui/plus-choose-site-goods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fle-ui",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@ant-design/icons": "^5.3.0",
|
|
29
29
|
"@fle-tools/env": "^1.0.3",
|
|
30
|
-
"@fle-ui/plus-address-selection": "^1.0.
|
|
31
|
-
"@fle-ui/plus-choose-mall-goods": "^1.1.
|
|
30
|
+
"@fle-ui/plus-address-selection": "^1.0.12",
|
|
31
|
+
"@fle-ui/plus-choose-mall-goods": "^1.1.3"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"antd": ">=4.23.0 || >=5.0.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "961fbbdd6c0cbc39663350a77a01bd9b7131f246"
|
|
49
49
|
}
|