@fonixtree/magic-design 2.0.72 → 2.0.74

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 (39) 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 +81 -105
  5. package/es/common/LinkModal/FilteredProductModal/index.less +1 -0
  6. package/es/common/LinkModal/ProductDetailPage/index.js +96 -58
  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/bol/components/Wallet/mobile/index.js +1 -1
  12. package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -1
  13. package/es/composite-comp/dito/components/Recommend/mobile/index.js +26 -23
  14. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
  15. package/es/constants/index.js +1 -1
  16. package/es/locale/en/en.json +3 -2
  17. package/es/locale/es/es.json +3 -2
  18. package/es/locale/id/id.json +3 -2
  19. package/es/utils/commonUtil.js +14 -6
  20. package/lib/assets/fonts/.DS_Store +0 -0
  21. package/lib/common/AffiliateProductModal/index.js +1 -1
  22. package/lib/common/AffiliateProductModal/index.less +1 -1
  23. package/lib/common/LinkModal/FilteredProductModal/index.js +81 -105
  24. package/lib/common/LinkModal/FilteredProductModal/index.less +1 -0
  25. package/lib/common/LinkModal/ProductDetailPage/index.js +96 -58
  26. package/lib/common/LinkModal/ProductDetailPage/index.less +6 -1
  27. package/lib/common/ProductModal/index.js +124 -87
  28. package/lib/common/ProductModal/index.less +7 -1
  29. package/lib/common/ProductSource/index.js +82 -21
  30. package/lib/composite-comp/bol/components/Wallet/mobile/index.js +1 -1
  31. package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -1
  32. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +26 -23
  33. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
  34. package/lib/constants/index.js +1 -1
  35. package/lib/locale/en/en.json +3 -2
  36. package/lib/locale/es/es.json +3 -2
  37. package/lib/locale/id/id.json +3 -2
  38. package/lib/utils/commonUtil.js +14 -6
  39. package/package.json +1 -1
@@ -114,11 +114,13 @@ function (_super) {
114
114
  }, (0, _locale.i18n)('AI_RECOMMENDATION')))), /*#__PURE__*/_react["default"].createElement("div", {
115
115
  className: "greyBg"
116
116
  }, panelProps.sourceType === 'select' && /*#__PURE__*/_react["default"].createElement(_common.ProductSource, {
117
- onChange: function onChange(v) {
118
- panelProps.prodIds = v;
117
+ onChange: function onChange(ids, type) {
118
+ panelProps.prodIds = ids;
119
+ panelProps.prodType = type;
119
120
 
120
121
  _this.selfRender();
121
122
  },
123
+ prodType: panelProps.prodType,
122
124
  value: panelProps.prodIds
123
125
  }), panelProps.sourceType === 'recommend' && /*#__PURE__*/_react["default"].createElement(_AIRecommendation["default"], {
124
126
  onChange: function onChange(val) {
@@ -42,7 +42,7 @@ var walletType = {
42
42
  BNPL: 'BNPL',
43
43
  B2B: 'B2B PayLater',
44
44
  BALANCE: 'Balance',
45
- CENDUIT: 'Cenduit'
45
+ CENDUIT: 'CenDuit'
46
46
  };
47
47
  exports.walletType = walletType;
48
48
  var urlType = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PUSH": "Push",
3
- "SET_AS_TEMPLATE":"Set as Template",
3
+ "SET_AS_TEMPLATE": "Set as Template",
4
4
  "DISPLAY_PAGE": "Display page",
5
5
  "NAME": "Name",
6
6
  "ADD_MENU": "Add Menu",
@@ -97,7 +97,8 @@
97
97
  "BANNER_HEIGHT": "Banner Height",
98
98
  "IMAGE": "Image",
99
99
  "PRODUCT_NAME": "Product Name",
100
- "PRODUCT_CODE": "Product Code",
100
+ "SKU_CODE": "SKU Code",
101
+ "SPU_CODE": "SPU Code",
101
102
  "SKU": "SKU",
102
103
  "PRICE": "Price",
103
104
  "BRAND": "Brand",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PUSH": "Push",
3
- "SET_AS_TEMPLATE":"Set as Template",
3
+ "SET_AS_TEMPLATE": "Set as Template",
4
4
  "DISPLAY_PAGE": "Display page",
5
5
  "NAME": "Name",
6
6
  "ADD_MENU": "Add Menu",
@@ -97,7 +97,8 @@
97
97
  "BANNER_HEIGHT": "Altura del banner",
98
98
  "IMAGE": "Imagen",
99
99
  "PRODUCT_NAME": "Nombre del producto",
100
- "PRODUCT_CODE": "Código de producto",
100
+ "SKU_CODE": "Código SKU",
101
+ "SPU_CODE": "Código spu",
101
102
  "SKU": "SKU",
102
103
  "PRICE": "Precio",
103
104
  "BRAND": "Marca",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PUSH": "Push",
3
- "SET_AS_TEMPLATE":"Set as Template",
3
+ "SET_AS_TEMPLATE": "Set as Template",
4
4
  "DISPLAY_PAGE": "Display page",
5
5
  "NAME": "Name",
6
6
  "ADD_MENU": "Add Menu",
@@ -97,7 +97,8 @@
97
97
  "BANNER_HEIGHT": "Banner Height",
98
98
  "IMAGE": "Image",
99
99
  "PRODUCT_NAME": "Product Name",
100
- "PRODUCT_CODE": "Product Code",
100
+ "SKU_CODE": "SKU Code",
101
+ "SPU_CODE": "SPU Code",
101
102
  "SKU": "SKU",
102
103
  "PRICE": "Price",
103
104
  "BRAND": "Brand",
@@ -291,14 +291,22 @@ var navigateTo = function navigateTo(url) {
291
291
  return;
292
292
  }
293
293
 
294
- if (url.startsWith('/')) {
295
- if (window.magicDesign.history && !window.magicDesign.navigatePreUrl) {
296
- window.magicDesign.history.push(url);
297
- } else {
294
+ var _a = url.split(';'),
295
+ h5Url = _a[0],
296
+ appUrl = _a[1]; // 未配置App路径并且h5绝对路径时直接跳转,其他情况让业务层处理
297
+
298
+
299
+ if (!appUrl && !h5Url.startsWith('/')) {
300
+ window.location.href = h5Url;
301
+ } else if (window.magicDesign.history) {
302
+ window.magicDesign.history.push(url);
303
+ } else if (window.magicDesign.navigatePreUrl) {
304
+ // 预览模式跳转
305
+ if (h5Url.startsWith('/')) {
298
306
  window.location.href = "" + window.magicDesign.navigatePreUrl + url;
307
+ } else {
308
+ window.location.href = h5Url;
299
309
  }
300
- } else {
301
- window.location.href = url;
302
310
  }
303
311
  };
304
312
 
Binary file
@@ -431,7 +431,7 @@ var AffiliateProductModal = function AffiliateProductModal(props) {
431
431
  title: (0, _locale.i18n)('PRODUCT_SELECT'),
432
432
  visible: visible,
433
433
  width: "1200px",
434
- wrapClassName: "modalCot"
434
+ wrapClassName: "affiliateModalCot"
435
435
  }, /*#__PURE__*/_react["default"].createElement("div", {
436
436
  className: "proModalWrap"
437
437
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -1,4 +1,4 @@
1
- .modalCot {
1
+ .affiliateModalCot {
2
2
  width: 1200px;
3
3
  right: unset !important;
4
4
  left: unset !important;
@@ -213,49 +213,45 @@ var FilteredProductModal = function FilteredProductModal(props) {
213
213
  labelData = _f[0],
214
214
  setLabelData = _f[1];
215
215
 
216
- var _g = (0, _react.useState)(''),
217
- storeName = _g[0],
218
- setStoreName = _g[1];
216
+ var _g = (0, _react.useState)(window.magicDesign.storeId || ''),
217
+ storeId = _g[0],
218
+ setStoreId = _g[1];
219
219
 
220
- var _h = (0, _react.useState)(window.magicDesign.storeId || ''),
221
- storeId = _h[0],
222
- setStoreId = _h[1];
220
+ var _h = (0, _react.useState)([]),
221
+ storeList = _h[0],
222
+ setStoreList = _h[1];
223
223
 
224
- var _j = (0, _react.useState)([]),
225
- storeList = _j[0],
226
- setStoreList = _j[1];
224
+ var _j = (0, _react.useState)(''),
225
+ productName = _j[0],
226
+ setProductName = _j[1];
227
227
 
228
228
  var _k = (0, _react.useState)(''),
229
- productName = _k[0],
230
- setProductName = _k[1];
229
+ minimum = _k[0],
230
+ setMinimum = _k[1];
231
231
 
232
232
  var _l = (0, _react.useState)(''),
233
- minimum = _l[0],
234
- setMinimum = _l[1];
233
+ maximum = _l[0],
234
+ setMaximum = _l[1];
235
235
 
236
- var _m = (0, _react.useState)(''),
237
- maximum = _m[0],
238
- setMaximum = _m[1];
236
+ var _m = (0, _react.useState)([]),
237
+ dataSource = _m[0],
238
+ setDataSource = _m[1];
239
239
 
240
- var _o = (0, _react.useState)([]),
241
- dataSource = _o[0],
242
- setDataSource = _o[1];
240
+ var _o = (0, _react.useState)({}),
241
+ promotions = _o[0],
242
+ setPromotions = _o[1];
243
243
 
244
- var _p = (0, _react.useState)({}),
245
- promotions = _p[0],
246
- setPromotions = _p[1];
244
+ var _p = (0, _react.useState)(false),
245
+ loading = _p[0],
246
+ setLoading = _p[1];
247
247
 
248
- var _q = (0, _react.useState)(false),
249
- loading = _q[0],
250
- setLoading = _q[1];
251
-
252
- var _r = (0, _react.useState)({
248
+ var _q = (0, _react.useState)({
253
249
  pageSize: 20,
254
250
  current: 1,
255
251
  total: 0
256
252
  }),
257
- paginationParams = _r[0],
258
- setPaginationParams = _r[1];
253
+ paginationParams = _q[0],
254
+ setPaginationParams = _q[1];
259
255
 
260
256
  var onChange = function onChange(value) {
261
257
  settVal(value);
@@ -282,7 +278,6 @@ var FilteredProductModal = function FilteredProductModal(props) {
282
278
  settBrandId([]);
283
279
  settLabelId({});
284
280
  setStoreId(window.magicDesign.storeId || '');
285
- setStoreName('');
286
281
  setProductName('');
287
282
  setMinimum('');
288
283
  setMaximum('');
@@ -293,7 +288,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
293
288
 
294
289
  var columns = [{
295
290
  title: 'Image',
296
- dataIndex: 'imgUrl',
291
+ dataIndex: 'productImageUrl',
297
292
  key: 'imgUrl',
298
293
  width: 100,
299
294
  render: function render(imgUrl, record) {
@@ -309,13 +304,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
309
304
  dataIndex: 'offerName',
310
305
  key: 'offerName',
311
306
  ellipsis: true
312
- }, // {
313
- // title: 'SKU',
314
- // dataIndex: 'attrValues',
315
- // key: 'attrValues',
316
- // ellipsis: true,
317
- // },
318
- {
307
+ }, {
319
308
  title: 'Price',
320
309
  dataIndex: 'salesPrice',
321
310
  key: 'salesPrice',
@@ -439,72 +428,57 @@ var FilteredProductModal = function FilteredProductModal(props) {
439
428
  };
440
429
 
441
430
  var loadGoods = function loadGoods() {
442
- setLoading(true);
443
- return new Promise(function (resolve, reject) {
444
- return __awaiter(void 0, void 0, void 0, function () {
445
- var precision, params, res;
446
- return __generator(this, function (_a) {
447
- switch (_a.label) {
448
- case 0:
449
- precision = Math.pow(10, (0, _commonUtil.ensure)(function () {
450
- return window.systemParams.precision;
451
- }, '0'));
452
- params = {
453
- catgIds: tValue.join(','),
454
- brandIds: brandId.map(function (v) {
455
- return v.key;
456
- }).join(','),
457
- labelIds: labelId.key,
458
- q: productName,
459
- // productName,
460
- storeId: storeId,
461
- startPrice: minimum * precision || '',
462
- endPrice: maximum * precision || '',
463
- // storeName:storeName,
464
- campaignType: promotions.key || '',
465
- pageSize: paginationParams.pageSize,
466
- pageIndex: paginationParams.current,
467
- state: 'A'
468
- };
469
- return [4
470
- /*yield*/
471
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
472
-
473
- case 1:
474
- res = _a.sent();
475
- setLoading(false);
476
- paginationParams.total = res.total;
477
-
478
- if (res && res.list && res.list.length > 0) {
479
- setDataSource(res.list);
480
- resolve({
481
- url: JsonToUrl({
482
- catgIds: tValue.join(',') || '',
483
- brandIds: brandId.map(function (v) {
484
- return v.key;
485
- }).join(',') || '',
486
- labelIds: labelId.key || '',
487
- q: productName || '',
488
- minPrice: minimum * precision || '',
489
- maxPrice: maximum * precision || '',
490
- storeId: storeId || '',
491
- campaignType: promotions.key || '',
492
- state: 'A'
493
- }),
494
- total: res.total
495
- });
496
- } else {
497
- setDataSource([]);
498
- resolve({
499
- total: 0
500
- });
501
- }
502
-
503
- return [2
504
- /*return*/
505
- ];
506
- }
507
- });
431
+ return __awaiter(void 0, void 0, void 0, function () {
432
+ var params, res, h5UrlStr;
433
+ return __generator(this, function (_a) {
434
+ switch (_a.label) {
435
+ case 0:
436
+ setLoading(true);
437
+ params = {
438
+ catgIds: tValue.join(','),
439
+ brandIds: brandId.map(function (v) {
440
+ return v.key;
441
+ }).join(','),
442
+ labelIds: labelId.key,
443
+ q: productName,
444
+ storeId: storeId,
445
+ startPrice: (0, _currencyUtil.formatBackendCurrency)(minimum),
446
+ endPrice: (0, _currencyUtil.formatBackendCurrency)(maximum),
447
+ campaignType: promotions.key || '',
448
+ state: 'A',
449
+ pageSize: paginationParams.pageSize,
450
+ pageIndex: paginationParams.current
451
+ };
452
+ return [4
453
+ /*yield*/
454
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
455
+
456
+ case 1:
457
+ res = _a.sent();
458
+ setDataSource(res.list || []);
459
+ paginationParams.total = res.total;
460
+ setPaginationParams(__assign({}, paginationParams));
461
+ setLoading(false);
462
+ h5UrlStr = JsonToUrl({
463
+ catgIds: tValue.join(',') || '',
464
+ brandIds: brandId.map(function (v) {
465
+ return v.key;
466
+ }).join(',') || '',
467
+ labelIds: labelId.key || '',
468
+ q: productName || '',
469
+ storeId: storeId || '',
470
+ minPrice: (0, _currencyUtil.formatBackendCurrency)(minimum),
471
+ maxPrice: (0, _currencyUtil.formatBackendCurrency)(maximum),
472
+ campaignType: promotions.key || '',
473
+ state: 'A'
474
+ });
475
+ return [2
476
+ /*return*/
477
+ , {
478
+ url: h5UrlStr,
479
+ total: res.total
480
+ }];
481
+ }
508
482
  });
509
483
  });
510
484
  };
@@ -664,13 +638,15 @@ var FilteredProductModal = function FilteredProductModal(props) {
664
638
  onClick: function onClick() {
665
639
  paginationParams.current = 1;
666
640
  loadGoods().then(function (res) {
641
+ console.log('res', res);
642
+
667
643
  if (res.total !== 0) {
668
644
  onDataChange({
669
645
  value: res.url,
670
646
  name: res.url
671
647
  }, res.total);
672
648
  } else {
673
- onDataChange('', res.total); // message.warn('no goods!');
649
+ onDataChange('', res.total);
674
650
  }
675
651
  });
676
652
  },
@@ -1,5 +1,6 @@
1
1
  .mFilteredProductModal {
2
2
  height: 550px;
3
+
3
4
  .proModalWrap {
4
5
  .info {
5
6
  background: #ecf1fd;
@@ -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_1, res;
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 === 'spu')) 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 + "/offers", __assign(__assign({}, params), {
297
+ offerCode: productCode,
298
+ isDefaultCover: 'Y',
299
+ onlyQryPublishSku: true,
300
+ auditState: 'S',
301
+ crmFlag: 'on'
302
+ }), 'GET')];
288
303
 
289
304
  case 1:
305
+ res_1 = _a.sent();
306
+ _list = (0, _ProductModal.formatData)((0, _commonUtil.ensure)(function () {
307
+ return res_1.list.map(function (m) {
308
+ return __assign(__assign({}, m.products[0]), m);
309
+ });
310
+ }, []), proType);
311
+ total = res_1.total;
312
+ return [3
313
+ /*break*/
314
+ , 4];
315
+
316
+ case 2:
317
+ return [4
318
+ /*yield*/
319
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
320
+ productCode: productCode
321
+ }), 'GET')];
322
+
323
+ case 3:
290
324
  res = _a.sent();
325
+ _list = (0, _ProductModal.formatData)(res.list || []);
326
+ total = res.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
  ];
@@ -361,18 +401,24 @@ var ProductDetailPage = function ProductDetailPage(props) {
361
401
  };
362
402
 
363
403
  (0, _react.useEffect)(function () {
364
- setLoading(true);
365
-
366
- var total = paginationParams.total,
367
- params = __rest(paginationParams, ["total"]);
368
-
369
- queryGoods(params);
370
404
  queryBrand();
371
405
 
372
406
  if ((0, _businessUtil.isPlatform)()) {
373
407
  queryStore();
374
408
  }
375
409
  }, []);
410
+ (0, _react.useEffect)(function () {
411
+ setLoading(true);
412
+ paginationParams.current = 1;
413
+ queryGoods();
414
+ }, [proType]);
415
+ var proTypeOption = [{
416
+ label: 'SKU',
417
+ value: 'sku'
418
+ }, {
419
+ label: 'SPU',
420
+ value: 'spu'
421
+ }];
376
422
  return /*#__PURE__*/_react["default"].createElement("div", {
377
423
  className: "productDetailPage"
378
424
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
@@ -382,6 +428,20 @@ var ProductDetailPage = function ProductDetailPage(props) {
382
428
  layout: "horizontal"
383
429
  }, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
384
430
  gutter: 24
431
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
432
+ offset: 20,
433
+ span: 4
434
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
435
+ buttonStyle: "solid",
436
+ className: "btn-select-type",
437
+ onChange: function onChange(e) {
438
+ setProType(e.target.value);
439
+ },
440
+ options: proTypeOption,
441
+ optionType: "button",
442
+ value: proType
443
+ }))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
444
+ gutter: 24
385
445
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
386
446
  span: 9
387
447
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
@@ -395,7 +455,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
395
455
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
396
456
  span: 9
397
457
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
398
- label: "SKU Code"
458
+ label: proType === 'spu' ? 'SPU Code' : 'SKU Code'
399
459
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
400
460
  onChange: function onChange(e) {
401
461
  return setProductCode(e.target.value);
@@ -444,19 +504,8 @@ var ProductDetailPage = function ProductDetailPage(props) {
444
504
  }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
445
505
  onClick: function onClick() {
446
506
  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));
507
+ paginationParams.current = 1;
508
+ queryGoods();
460
509
  },
461
510
  size: "small",
462
511
  style: {
@@ -476,26 +525,15 @@ var ProductDetailPage = function ProductDetailPage(props) {
476
525
  pagination: __assign(__assign({}, paginationParams), {
477
526
  onChange: function onChange(page) {
478
527
  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));
528
+ paginationParams.current = page;
529
+ queryGoods();
492
530
  },
493
531
  showSizeChanger: false
494
532
  }),
495
- rowKey: "productId",
533
+ rowKey: "id",
496
534
  rowSelection: rowSelection,
497
535
  scroll: {
498
- y: 340
536
+ y: 300
499
537
  }
500
538
  }));
501
539
  };
@@ -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
+ }