@fonixtree/magic-design 2.0.72 → 2.0.73

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 (33) hide show
  1. package/es/assets/fonts/.DS_Store +0 -0
  2. package/es/common/AffiliateProductModal/index.js +1 -1
  3. package/es/common/AffiliateProductModal/index.less +1 -1
  4. package/es/common/LinkModal/FilteredProductModal/index.js +154 -104
  5. package/es/common/LinkModal/FilteredProductModal/index.less +7 -0
  6. package/es/common/LinkModal/ProductDetailPage/index.js +92 -57
  7. package/es/common/LinkModal/ProductDetailPage/index.less +6 -1
  8. package/es/common/ProductModal/index.js +124 -87
  9. package/es/common/ProductModal/index.less +7 -1
  10. package/es/common/ProductSource/index.js +82 -21
  11. package/es/composite-comp/dito/components/Recommend/mobile/index.js +26 -23
  12. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
  13. package/es/locale/en/en.json +3 -2
  14. package/es/locale/es/es.json +3 -2
  15. package/es/locale/id/id.json +3 -2
  16. package/es/utils/commonUtil.js +14 -6
  17. package/lib/assets/fonts/.DS_Store +0 -0
  18. package/lib/common/AffiliateProductModal/index.js +1 -1
  19. package/lib/common/AffiliateProductModal/index.less +1 -1
  20. package/lib/common/LinkModal/FilteredProductModal/index.js +154 -104
  21. package/lib/common/LinkModal/FilteredProductModal/index.less +7 -0
  22. package/lib/common/LinkModal/ProductDetailPage/index.js +92 -57
  23. package/lib/common/LinkModal/ProductDetailPage/index.less +6 -1
  24. package/lib/common/ProductModal/index.js +124 -87
  25. package/lib/common/ProductModal/index.less +7 -1
  26. package/lib/common/ProductSource/index.js +82 -21
  27. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +26 -23
  28. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
  29. package/lib/locale/en/en.json +3 -2
  30. package/lib/locale/es/es.json +3 -2
  31. package/lib/locale/id/id.json +3 -2
  32. package/lib/utils/commonUtil.js +14 -6
  33. package/package.json +1 -1
@@ -17,6 +17,8 @@ var _commonUtil = require("../../../utils/commonUtil");
17
17
 
18
18
  var _businessUtil = require("../../../utils/businessUtil");
19
19
 
20
+ var _ProductModal = require("../../ProductModal");
21
+
20
22
  require("./index.less");
21
23
 
22
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -182,19 +184,6 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
182
184
  }
183
185
  };
184
186
 
185
- var __rest = void 0 && (void 0).__rest || function (s, e) {
186
- var t = {};
187
-
188
- for (var p in s) {
189
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
190
- }
191
-
192
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
193
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
194
- }
195
- return t;
196
- };
197
-
198
187
  var Option = _antd.Select.Option;
199
188
 
200
189
  var ProductDetailPage = function ProductDetailPage(props) {
@@ -232,12 +221,17 @@ var ProductDetailPage = function ProductDetailPage(props) {
232
221
  loading = _h[0],
233
222
  setLoading = _h[1];
234
223
 
235
- var _j = (0, _react.useState)({
224
+ var _j = (0, _react.useState)('sku'),
225
+ proType = _j[0],
226
+ setProType = _j[1];
227
+
228
+ var _k = (0, _react.useState)({
236
229
  pageSize: 20,
237
- pageIndex: 1
230
+ current: 1,
231
+ total: 0
238
232
  }),
239
- paginationParams = _j[0],
240
- setPaginationParams = _j[1];
233
+ paginationParams = _k[0],
234
+ setPaginationParams = _k[1];
241
235
 
242
236
  var columns = [{
243
237
  title: 'Image',
@@ -276,22 +270,68 @@ var ProductDetailPage = function ProductDetailPage(props) {
276
270
  type: 'radio'
277
271
  };
278
272
 
279
- var queryGoods = function queryGoods(params) {
273
+ var queryGoods = function queryGoods() {
280
274
  return __awaiter(void 0, void 0, void 0, function () {
281
- var res;
275
+ var _list, total, params, res, res_1;
276
+
282
277
  return __generator(this, function (_a) {
283
278
  switch (_a.label) {
284
279
  case 0:
280
+ _list = [];
281
+ total = 0;
282
+ params = {
283
+ productName: productName,
284
+ brandIds: brandId.map(function (v) {
285
+ return v.key;
286
+ }).join(',') || '',
287
+ storeId: storeId,
288
+ pageSize: paginationParams.pageSize,
289
+ pageIndex: paginationParams.current
290
+ };
291
+ if (!(proType === 'sku')) return [3
292
+ /*break*/
293
+ , 2];
285
294
  return [4
286
295
  /*yield*/
287
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", params, 'GET')];
296
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
297
+ productCode: productCode
298
+ }), 'GET')];
288
299
 
289
300
  case 1:
290
301
  res = _a.sent();
302
+ _list = (0, _ProductModal.formatData)(res.list || []);
303
+ total = res.total;
304
+ return [3
305
+ /*break*/
306
+ , 4];
307
+
308
+ case 2:
309
+ return [4
310
+ /*yield*/
311
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
312
+ offerCode: productCode,
313
+ isDefaultCover: 'Y',
314
+ onlyQryPublishSku: true,
315
+ auditState: 'S',
316
+ crmFlag: 'on'
317
+ }), 'GET')];
318
+
319
+ case 3:
320
+ res_1 = _a.sent();
321
+ _list = (0, _ProductModal.formatData)((0, _commonUtil.ensure)(function () {
322
+ return res_1.list.map(function (m) {
323
+ return __assign(__assign({}, m.products[0]), m);
324
+ });
325
+ }, []), proType);
326
+ total = res_1.total;
327
+ _a.label = 4;
328
+
329
+ case 4:
330
+ setProductList(_list);
291
331
  setLoading(false);
292
- paginationParams.total = res.total;
293
- setProductList(res.list);
294
- window.MProductList = res.list;
332
+ window.MProductList = _list;
333
+ paginationParams.total = total;
334
+ setPaginationParams(__assign({}, paginationParams));
295
335
  return [2
296
336
  /*return*/
297
337
  ];
@@ -362,17 +402,20 @@ var ProductDetailPage = function ProductDetailPage(props) {
362
402
 
363
403
  (0, _react.useEffect)(function () {
364
404
  setLoading(true);
365
-
366
- var total = paginationParams.total,
367
- params = __rest(paginationParams, ["total"]);
368
-
369
- queryGoods(params);
405
+ queryGoods();
370
406
  queryBrand();
371
407
 
372
408
  if ((0, _businessUtil.isPlatform)()) {
373
409
  queryStore();
374
410
  }
375
411
  }, []);
412
+ var proTypeOption = [{
413
+ label: 'SKU',
414
+ value: 'sku'
415
+ }, {
416
+ label: 'SPU',
417
+ value: 'spu'
418
+ }];
376
419
  return /*#__PURE__*/_react["default"].createElement("div", {
377
420
  className: "productDetailPage"
378
421
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
@@ -382,6 +425,20 @@ var ProductDetailPage = function ProductDetailPage(props) {
382
425
  layout: "horizontal"
383
426
  }, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
384
427
  gutter: 24
428
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
429
+ offset: 20,
430
+ span: 4
431
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
432
+ buttonStyle: "solid",
433
+ className: "btn-select-type",
434
+ onChange: function onChange(e) {
435
+ setProType(e.target.value);
436
+ },
437
+ options: proTypeOption,
438
+ optionType: "button",
439
+ value: proType
440
+ }))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
441
+ gutter: 24
385
442
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
386
443
  span: 9
387
444
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
@@ -395,7 +452,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
395
452
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
396
453
  span: 9
397
454
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
398
- label: "SKU Code"
455
+ label: proType === 'sku' ? 'SKU Code' : 'SPU Code'
399
456
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
400
457
  onChange: function onChange(e) {
401
458
  return setProductCode(e.target.value);
@@ -444,19 +501,8 @@ var ProductDetailPage = function ProductDetailPage(props) {
444
501
  }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
445
502
  onClick: function onClick() {
446
503
  setLoading(true);
447
- paginationParams.pageIndex = 1;
448
-
449
- var total = paginationParams.total,
450
- params = __rest(paginationParams, ["total"]);
451
-
452
- queryGoods(__assign({
453
- productName: productName,
454
- productCode: productCode,
455
- brandIds: brandId.map(function (v) {
456
- return v.key;
457
- }).join(',') || '',
458
- storeId: storeId
459
- }, params));
504
+ paginationParams.current = 1;
505
+ queryGoods();
460
506
  },
461
507
  size: "small",
462
508
  style: {
@@ -476,26 +522,15 @@ var ProductDetailPage = function ProductDetailPage(props) {
476
522
  pagination: __assign(__assign({}, paginationParams), {
477
523
  onChange: function onChange(page) {
478
524
  setLoading(true);
479
- paginationParams.pageIndex = page;
480
-
481
- var total = paginationParams.total,
482
- params = __rest(paginationParams, ["total"]);
483
-
484
- queryGoods(__assign({
485
- productName: productName,
486
- productCode: productCode,
487
- brandIds: brandId.map(function (v) {
488
- return v.key;
489
- }).join(',') || '',
490
- storeId: storeId
491
- }, params));
525
+ paginationParams.current = page;
526
+ queryGoods();
492
527
  },
493
528
  showSizeChanger: false
494
529
  }),
495
- rowKey: "productId",
530
+ rowKey: "id",
496
531
  rowSelection: rowSelection,
497
532
  scroll: {
498
- y: 340
533
+ y: 300
499
534
  }
500
535
  }));
501
536
  };
@@ -1,5 +1,10 @@
1
1
  .productDetailPage {
2
2
  height: 550px;
3
+
4
+ .btn-select-type {
5
+ margin-bottom: 10px;
6
+ }
7
+
3
8
  .prodImage {
4
9
  width: 36px;
5
10
  height: 36px;
@@ -7,4 +12,4 @@
7
12
  background-position: 50% 50%;
8
13
  background-size: contain;
9
14
  }
10
- }
15
+ }
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports["default"] = void 0;
8
+ exports.formatData = exports["default"] = void 0;
9
9
 
10
10
  var _antd = require("antd");
11
11
 
@@ -204,18 +204,26 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
204
204
  return r;
205
205
  };
206
206
 
207
- var formatData = function formatData(list) {
207
+ var promType = {
208
+ FLASH_SALE: '2',
209
+ GROUP_BUY: '4'
210
+ };
211
+ var proTypeOption = [{
212
+ label: 'SKU',
213
+ value: 'sku'
214
+ }, {
215
+ label: 'SPU',
216
+ value: 'spu'
217
+ }];
218
+
219
+ var formatData = function formatData(list, type) {
208
220
  list.map(function (item) {
209
- item.preSalesPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.salesPrice);
210
- item.preMarketPrice = (0, _currencyUtil.formatCurrencyWithSymbol)(item.marketPrice);
221
+ item.id = type === 'spu' ? item.offerId : item.productId;
211
222
  });
212
223
  return list;
213
224
  };
214
225
 
215
- var promType = {
216
- FLASH_SALE: '2',
217
- GROUP_BUY: '4'
218
- };
226
+ exports.formatData = formatData;
219
227
  var Option = _antd.Select.Option;
220
228
  var InputGroup = _antd.Input.Group;
221
229
 
@@ -223,14 +231,12 @@ var ProductModal = function ProductModal(props) {
223
231
  var handleModalSave = props.handleModalSave,
224
232
  closeModal = props.closeModal,
225
233
  visible = props.visible,
226
- _a = props.defaultList,
227
- defaultList = _a === void 0 ? [] : _a,
228
- _b = props.maxSelect,
229
- maxSelect = _b === void 0 ? 20 : _b;
230
-
231
- var _c = (0, _react.useState)(defaultList),
232
- selectedList = _c[0],
233
- setSelectedList = _c[1];
234
+ _a = props.prodType,
235
+ prodType = _a === void 0 ? 'sku' : _a,
236
+ _b = props.defaultList,
237
+ defaultList = _b === void 0 ? [] : _b,
238
+ _c = props.maxSelect,
239
+ maxSelect = _c === void 0 ? 20 : _c;
234
240
 
235
241
  var _d = (0, _react.useState)([]),
236
242
  catgsList = _d[0],
@@ -292,15 +298,27 @@ var ProductModal = function ProductModal(props) {
292
298
  loading = _t[0],
293
299
  setLoading = _t[1];
294
300
 
295
- var _u = (0, _react.useState)(defaultList.map(function (v) {
296
- return v.productId;
297
- })),
298
- selectedRowKeys = _u[0],
299
- setSelectedRowKeys = _u[1];
301
+ var _u = (0, _react.useState)(prodType),
302
+ proType = _u[0],
303
+ setProType = _u[1];
304
+
305
+ var _v = (0, _react.useState)(defaultList),
306
+ selectedList = _v[0],
307
+ setSelectedList = _v[1];
308
+
309
+ var _w = (0, _react.useState)({
310
+ pageSize: 20,
311
+ current: 1,
312
+ total: 0
313
+ }),
314
+ paginationParams = _w[0],
315
+ setPaginationParams = _w[1];
300
316
 
301
317
  var rowSelection = {
302
- selectedRowKeys: selectedRowKeys,
303
- onSelect: function onSelect(record, selected, selectedRows) {
318
+ selectedRowKeys: selectedList.map(function (v) {
319
+ return v.id;
320
+ }),
321
+ onSelect: function onSelect(record, selected) {
304
322
  if (selected) {
305
323
  if (selectedList.length === maxSelect) {
306
324
  _antd.message.warning("Max " + maxSelect);
@@ -309,17 +327,13 @@ var ProductModal = function ProductModal(props) {
309
327
  }
310
328
 
311
329
  if (selectedList.length < maxSelect) {
312
- setSelectedList(__spreadArrays(selectedList, formatData([record])));
330
+ setSelectedList(__spreadArrays(selectedList, [record]));
313
331
  }
314
332
  } else {
315
333
  setSelectedList(selectedList.filter(function (v) {
316
- return v.productId !== record.productId;
334
+ return v.id !== record.id;
317
335
  }));
318
336
  }
319
-
320
- setSelectedRowKeys(selectedRows.map(function (v) {
321
- return v === null || v === void 0 ? void 0 : v.productId;
322
- }));
323
337
  },
324
338
  getCheckboxProps: function getCheckboxProps(record) {
325
339
  return {
@@ -328,41 +342,80 @@ var ProductModal = function ProductModal(props) {
328
342
  }
329
343
  };
330
344
 
331
- var _v = (0, _react.useState)({
332
- pageSize: 20,
333
- current: 1,
334
- total: 0
335
- }),
336
- paginationParams = _v[0],
337
- setPaginationParams = _v[1];
338
-
339
345
  var delSelectedItem = function delSelectedItem(index) {
340
- console.log(selectedRowKeys, index, 2223);
341
- var rowKeys = JSON.parse(JSON.stringify(selectedRowKeys));
342
- rowKeys.splice(index, 1);
343
- setSelectedRowKeys(rowKeys);
344
346
  var rows = JSON.parse(JSON.stringify(selectedList));
345
347
  rows.splice(index, 1);
346
348
  setSelectedList(rows);
347
349
  }; // 请求商品列表
348
350
 
349
351
 
350
- var queryGoods = function queryGoods(data) {
352
+ var queryGoods = function queryGoods() {
351
353
  return __awaiter(void 0, void 0, void 0, function () {
352
- var res;
354
+ var _list, total, params, res, res_1;
355
+
353
356
  return __generator(this, function (_a) {
354
357
  switch (_a.label) {
355
358
  case 0:
359
+ setLoading(true);
360
+ setGoodsList([]);
361
+ _list = [];
362
+ total = 0;
363
+ params = {
364
+ productName: productName,
365
+ storeId: storeId,
366
+ cmpTypeId: promotions || '',
367
+ minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
368
+ maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
369
+ catgIds: selCatgsList.join(','),
370
+ brandIds: selBrandsList.join(','),
371
+ labelIds: selLabelData.value || '',
372
+ pageSize: paginationParams.pageSize,
373
+ pageIndex: paginationParams.current,
374
+ state: 'A'
375
+ };
376
+ if (!(proType === 'sku')) return [3
377
+ /*break*/
378
+ , 2];
356
379
  return [4
357
380
  /*yield*/
358
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", data, 'GET')];
381
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
382
+ productCode: productCode
383
+ }), 'GET')];
359
384
 
360
385
  case 1:
361
386
  res = _a.sent();
387
+ _list = formatData(res.list || []);
388
+ total = res.total;
389
+ return [3
390
+ /*break*/
391
+ , 4];
392
+
393
+ case 2:
394
+ return [4
395
+ /*yield*/
396
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
397
+ offerCode: productCode,
398
+ isDefaultCover: 'Y',
399
+ onlyQryPublishSku: true,
400
+ auditState: 'S',
401
+ crmFlag: 'on'
402
+ }), 'GET')];
403
+
404
+ case 3:
405
+ res_1 = _a.sent();
406
+ _list = formatData((0, _commonUtil.ensure)(function () {
407
+ return res_1.list.map(function (m) {
408
+ return __assign(__assign({}, m.products[0]), m);
409
+ });
410
+ }, []), proType);
411
+ total = res_1.total;
412
+ _a.label = 4;
413
+
414
+ case 4:
362
415
  setLoading(false);
363
- paginationParams.total = res.total;
364
- setPaginationParams(paginationParams);
365
- setGoodsList(res.list || []);
416
+ setGoodsList(_list);
417
+ paginationParams.total = total;
418
+ setPaginationParams(__assign({}, paginationParams));
366
419
  return [2
367
420
  /*return*/
368
421
  ];
@@ -471,14 +524,15 @@ var ProductModal = function ProductModal(props) {
471
524
  }, []);
472
525
  (0, _react.useEffect)(function () {
473
526
  setSelectedList(defaultList);
474
- setSelectedRowKeys(defaultList.map(function (v) {
475
- return v.productId;
476
- }));
477
527
 
478
528
  if (props.type === 'groupBuy') {
479
529
  setPromotions(promType.GROUP_BUY);
480
530
  }
481
531
  }, [visible]);
532
+ (0, _react.useEffect)(function () {
533
+ paginationParams.current = 1;
534
+ queryGoods();
535
+ }, [proType]);
482
536
 
483
537
  var reset = function reset() {
484
538
  setSelBrandsList([]);
@@ -510,8 +564,8 @@ var ProductModal = function ProductModal(props) {
510
564
  width: 120,
511
565
  ellipsis: true
512
566
  }, {
513
- title: (0, _locale.i18n)('PRODUCT_CODE'),
514
- dataIndex: 'productCode',
567
+ title: proType === 'sku' ? (0, _locale.i18n)('SKU_CODE') : (0, _locale.i18n)('SPU_CODE'),
568
+ dataIndex: proType === 'sku' ? 'productCode' : 'offerCode',
515
569
  width: 120,
516
570
  ellipsis: true
517
571
  }, _defineProperty({
@@ -599,7 +653,7 @@ var ProductModal = function ProductModal(props) {
599
653
  return setStoreId(value);
600
654
  },
601
655
  optionFilterProp: "children",
602
- placeholder: "Please select",
656
+ placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
603
657
  showSearch: true,
604
658
  value: storeId
605
659
  }, storeList && storeList.length > 0 && storeList.map(function (v) {
@@ -612,7 +666,6 @@ var ProductModal = function ProductModal(props) {
612
666
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
613
667
  defaultValue: selLabelData.children || null,
614
668
  onChange: function onChange(v, o) {
615
- console.log(v, o, 33);
616
669
  setSelLabelData(o);
617
670
  },
618
671
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
@@ -659,7 +712,7 @@ var ProductModal = function ProductModal(props) {
659
712
  size: "small",
660
713
  value: productName
661
714
  })), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
662
- label: "SKU Code"
715
+ label: proType === 'sku' ? 'SKU Code' : 'SPU Code'
663
716
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
664
717
  className: "inputStyle",
665
718
  onChange: function onChange(e) {
@@ -693,20 +746,7 @@ var ProductModal = function ProductModal(props) {
693
746
  onClick: function onClick() {
694
747
  setLoading(true);
695
748
  paginationParams.current = 1;
696
- queryGoods({
697
- productName: productName,
698
- productCode: productCode,
699
- storeId: storeId,
700
- cmpTypeId: promotions || '',
701
- minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
702
- maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
703
- catgIds: selCatgsList.join(','),
704
- brandIds: selBrandsList.join(','),
705
- labelIds: selLabelData.value || '',
706
- pageSize: paginationParams.pageSize,
707
- pageIndex: paginationParams.current,
708
- state: 'A'
709
- });
749
+ queryGoods();
710
750
  },
711
751
  size: "small",
712
752
  style: {
@@ -715,7 +755,17 @@ var ProductModal = function ProductModal(props) {
715
755
  type: "primary"
716
756
  }, (0, _locale.i18n)('QUERY'))))), /*#__PURE__*/_react["default"].createElement("div", {
717
757
  className: "rightCot"
718
- }, /*#__PURE__*/_react["default"].createElement(_antd.Table, {
758
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
759
+ buttonStyle: "solid",
760
+ className: "btn-select-type",
761
+ onChange: function onChange(e) {
762
+ setProType(e.target.value);
763
+ setSelectedList([]);
764
+ },
765
+ options: proTypeOption,
766
+ optionType: "button",
767
+ value: proType
768
+ }), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
719
769
  columns: columns,
720
770
  dataSource: goodsList,
721
771
  loading: loading,
@@ -723,26 +773,13 @@ var ProductModal = function ProductModal(props) {
723
773
  onChange: function onChange(page) {
724
774
  setLoading(true);
725
775
  paginationParams.current = page;
726
- setPaginationParams(paginationParams);
727
- queryGoods({
728
- productName: productName,
729
- productCode: productCode,
730
- cmpTypeId: promotions || '',
731
- minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
732
- maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
733
- catgIds: selCatgsList.join(','),
734
- brandIds: selBrandsList.join(','),
735
- labelIds: selLabelData.value || '',
736
- pageSize: paginationParams.pageSize,
737
- pageIndex: paginationParams.current,
738
- state: 'A'
739
- });
776
+ queryGoods();
740
777
  }
741
778
  }),
742
- rowKey: "productId",
779
+ rowKey: "id",
743
780
  rowSelection: rowSelection,
744
781
  scroll: {
745
- y: 500
782
+ y: 420
746
783
  }
747
784
  }), /*#__PURE__*/_react["default"].createElement("div", {
748
785
  className: "selectedCot"
@@ -772,7 +809,7 @@ var ProductModal = function ProductModal(props) {
772
809
  className: "totalNum"
773
810
  }, selectedList.length, "/", maxSelect)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
774
811
  onClick: function onClick() {
775
- handleModalSave && handleModalSave(selectedList);
812
+ handleModalSave && handleModalSave(selectedList, proType);
776
813
  closeModal && closeModal();
777
814
  },
778
815
  style: {
@@ -17,7 +17,13 @@
17
17
  margin-left: 16px;
18
18
  display: flex;
19
19
  flex-direction: column;
20
- justify-content: space-between;
20
+ justify-content: flex-start;
21
+
22
+
23
+ .btn-select-type {
24
+ text-align: right;
25
+ margin-bottom: 15px;
26
+ }
21
27
 
22
28
  .prodImg {
23
29
  display: inline-block;