@fle-ui/plus-choose-site-goods 1.1.2 → 1.1.4

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.
Files changed (3) hide show
  1. package/es/index.js +18 -12
  2. package/lib/index.js +18 -12
  3. package/package.json +3 -3
package/es/index.js CHANGED
@@ -61,9 +61,9 @@ import { QuestionCircleOutlined, LoadingOutlined } from '@ant-design/icons';
61
61
  import PlusConfigProvider from '@fle-ui/plus-config-provider';
62
62
  import Icon from './components/icon';
63
63
  import { tabs, tabsSearchParamsMap, priceRangeForOnce, priceRangeForPurchase, profitRangeForOnce, profitRangeForPurchase, sortOptions } from './utils/options';
64
+ import api from './utils/api';
64
65
  import request from './utils/request';
65
66
  import { getApiHost } from './utils/serviceEnv';
66
- import api from './utils/api';
67
67
  import { showMoney } from './utils/common';
68
68
  import './index.less';
69
69
  var ChooseSiteGoods = function ChooseSiteGoods(props) {
@@ -199,7 +199,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
199
199
  setLoading = _useState14[1];
200
200
  var getGoodsList = /*#__PURE__*/function () {
201
201
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
202
- 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;
203
203
  return _regeneratorRuntime().wrap(function _callee$(_context) {
204
204
  while (1) switch (_context.prev = _context.next) {
205
205
  case 0:
@@ -218,7 +218,14 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
218
218
  flagTags: searchParams.flagTags,
219
219
  flagIndustry: searchParams.flagIndustry,
220
220
  flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
221
- }); // 价格区间
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
+ // 价格区间
222
229
  if (searchParams.priceRangeMin !== undefined) {
223
230
  params[searchParams.priceType + 'Min'] = Number(searchParams.priceRangeMin * 100);
224
231
  }
@@ -250,9 +257,9 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
250
257
  }
251
258
  // return;
252
259
  setLoading(true);
253
- _context.next = 11;
260
+ _context.next = 13;
254
261
  return $http.post(api['getGoodsList'], params);
255
- case 11:
262
+ case 13:
256
263
  res = _context.sent;
257
264
  if (res === null || res === void 0 ? void 0 : res.success) {
258
265
  list = (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
@@ -268,15 +275,15 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
268
275
  getJdStock(list, jdGoods);
269
276
  }
270
277
  }
271
- case 13:
272
- _context.prev = 13;
278
+ case 15:
279
+ _context.prev = 15;
273
280
  setLoading(false);
274
- return _context.finish(13);
275
- case 16:
281
+ return _context.finish(15);
282
+ case 18:
276
283
  case "end":
277
284
  return _context.stop();
278
285
  }
279
- }, _callee, null, [[0,, 13, 16]]);
286
+ }, _callee, null, [[0,, 15, 18]]);
280
287
  }));
281
288
  return function getGoodsList() {
282
289
  return _ref.apply(this, arguments);
@@ -975,7 +982,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
975
982
  dataIndex: 'salePriceMin',
976
983
  key: 'salePriceMin',
977
984
  align: 'center',
978
- width: 150,
979
985
  render: function render(text, record) {
980
986
  if ((record === null || record === void 0 ? void 0 : record.isPurchase) === 1) {
981
987
  var _record$purchaseInfo6, _record$purchaseInfo12;
@@ -1286,7 +1292,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
1286
1292
  onCancel: onClose,
1287
1293
  styles: {
1288
1294
  body: {
1289
- padding: '0 16px'
1295
+ padding: '16px 16px 0'
1290
1296
  }
1291
1297
  },
1292
1298
  className: "choose-site-goods-modal",
package/lib/index.js CHANGED
@@ -14,9 +14,9 @@ var _icons = require("@ant-design/icons");
14
14
  var _plusConfigProvider = _interopRequireDefault(require("@fle-ui/plus-config-provider"));
15
15
  var _icon = _interopRequireDefault(require("./components/icon"));
16
16
  var _options = require("./utils/options");
17
+ var _api = _interopRequireDefault(require("./utils/api"));
17
18
  var _request = _interopRequireDefault(require("./utils/request"));
18
19
  var _serviceEnv = require("./utils/serviceEnv");
19
- var _api = _interopRequireDefault(require("./utils/api"));
20
20
  var _common = require("./utils/common");
21
21
  require("./index.less");
22
22
  var _excluded = ["env", "token", "loginErrFn", "onClose", "siteId", "app", "multiple", "defaultSelectedGoodsIds", "onSelectOk", "showMore", "showMoreText", "tabsConfig", "hiddenColumns", "hiddenSearchProps"];
@@ -177,7 +177,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
177
177
  setLoading = _useState14[1];
178
178
  var getGoodsList = /*#__PURE__*/function () {
179
179
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
180
- 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;
181
181
  return _regeneratorRuntime().wrap(function _callee$(_context) {
182
182
  while (1) switch (_context.prev = _context.next) {
183
183
  case 0:
@@ -196,7 +196,14 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
196
196
  flagTags: searchParams.flagTags,
197
197
  flagIndustry: searchParams.flagIndustry,
198
198
  flagCategory: ((_searchParams$flagCat = searchParams.flagCategory) === null || _searchParams$flagCat === void 0 ? void 0 : _searchParams$flagCat.length) ? searchParams.flagCategory[searchParams.flagCategory.length - 1] : undefined
199
- }); // 价格区间
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
+ // 价格区间
200
207
  if (searchParams.priceRangeMin !== undefined) {
201
208
  params[searchParams.priceType + 'Min'] = Number(searchParams.priceRangeMin * 100);
202
209
  }
@@ -228,9 +235,9 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
228
235
  }
229
236
  // return;
230
237
  setLoading(true);
231
- _context.next = 11;
238
+ _context.next = 13;
232
239
  return $http.post(_api.default['getGoodsList'], params);
233
- case 11:
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 13:
250
- _context.prev = 13;
256
+ case 15:
257
+ _context.prev = 15;
251
258
  setLoading(false);
252
- return _context.finish(13);
253
- case 16:
259
+ return _context.finish(15);
260
+ case 18:
254
261
  case "end":
255
262
  return _context.stop();
256
263
  }
257
- }, _callee, null, [[0,, 13, 16]]);
264
+ }, _callee, null, [[0,, 15, 18]]);
258
265
  }));
259
266
  return function getGoodsList() {
260
267
  return _ref.apply(this, arguments);
@@ -953,7 +960,6 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
953
960
  dataIndex: 'salePriceMin',
954
961
  key: 'salePriceMin',
955
962
  align: 'center',
956
- width: 150,
957
963
  render: function render(text, record) {
958
964
  if ((record === null || record === void 0 ? void 0 : record.isPurchase) === 1) {
959
965
  var _record$purchaseInfo6, _record$purchaseInfo12;
@@ -1264,7 +1270,7 @@ var ChooseSiteGoods = function ChooseSiteGoods(props) {
1264
1270
  onCancel: onClose,
1265
1271
  styles: {
1266
1272
  body: {
1267
- padding: '0 16px'
1273
+ padding: '16px 16px 0'
1268
1274
  }
1269
1275
  },
1270
1276
  className: "choose-site-goods-modal",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fle-ui/plus-choose-site-goods",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "@fle-ui/plus-choose-site-goods",
5
5
  "keywords": [
6
6
  "fle-ui",
@@ -28,7 +28,7 @@
28
28
  "@ant-design/icons": "^5.3.0",
29
29
  "@fle-tools/env": "^1.0.3",
30
30
  "@fle-ui/plus-address-selection": "^1.0.12",
31
- "@fle-ui/plus-choose-mall-goods": "^1.1.2"
31
+ "@fle-ui/plus-choose-mall-goods": "^1.1.4"
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": "e56b10c76831c3d57c62576452c07ae1cee01a8a"
48
+ "gitHead": "6900a3b541e1a24a85cc767a8b9b8247915f454c"
49
49
  }