@fonixtree/magic-design 0.0.49 → 0.0.50

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 (55) hide show
  1. package/es/assets/less/cylon-antd.less +32526 -32526
  2. package/es/common/LinkModal/BundleCampaign/index.less +17 -0
  3. package/es/common/LinkModal/CatgTable/index.js +1 -1
  4. package/es/common/LinkModal/CouponTable/index.js +2 -2
  5. package/es/common/LinkModal/CustomTable/index.js +1 -1
  6. package/es/common/LinkModal/FilteredProductModal/index.js +72 -24
  7. package/es/common/LinkModal/FunctionTable/index.js +1 -1
  8. package/es/common/LinkModal/ProductDetailPage/index.js +96 -23
  9. package/es/common/LinkModal/index.js +7 -1
  10. package/es/common/LinkModal/index.less +1 -1
  11. package/es/common/ProductModal/index.js +75 -36
  12. package/es/common/ProductSource/index.js +3 -1
  13. package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
  14. package/es/composite-comp/common/components/ImageLabel/index.less +6 -2
  15. package/es/composite-comp/common/components/ProductItem/index.less +6 -7
  16. package/es/composite-comp/dito/components/Recommend/defaultJSON.js +8 -2
  17. package/es/composite-comp/dito/components/Recommend/index.js +5 -1
  18. package/es/composite-comp/dito/components/Recommend/mobile/index.js +32 -29
  19. package/es/composite-comp/dito/components/Recommend/pc/index.js +5 -3
  20. package/es/composite-comp/dito/components/Recommend/pc/index.less +4 -1
  21. package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +17 -3
  22. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +27 -15
  23. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
  24. package/es/constants/layout.js +24 -6
  25. package/es/core/Designer/PageCompList/index.less +10 -10
  26. package/es/locale/index.js +3 -1
  27. package/es/meta-comp/components/Image/index.js +6 -3
  28. package/lib/assets/less/cylon-antd.less +32526 -32526
  29. package/lib/common/LinkModal/BundleCampaign/index.less +17 -0
  30. package/lib/common/LinkModal/CatgTable/index.js +1 -1
  31. package/lib/common/LinkModal/CouponTable/index.js +2 -2
  32. package/lib/common/LinkModal/CustomTable/index.js +1 -1
  33. package/lib/common/LinkModal/FilteredProductModal/index.js +72 -24
  34. package/lib/common/LinkModal/FunctionTable/index.js +1 -1
  35. package/lib/common/LinkModal/ProductDetailPage/index.js +96 -23
  36. package/lib/common/LinkModal/index.js +7 -1
  37. package/lib/common/LinkModal/index.less +1 -1
  38. package/lib/common/ProductModal/index.js +75 -36
  39. package/lib/common/ProductSource/index.js +3 -1
  40. package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
  41. package/lib/composite-comp/common/components/ImageLabel/index.less +6 -2
  42. package/lib/composite-comp/common/components/ProductItem/index.less +6 -7
  43. package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +8 -2
  44. package/lib/composite-comp/dito/components/Recommend/index.js +5 -1
  45. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +32 -29
  46. package/lib/composite-comp/dito/components/Recommend/pc/index.js +5 -3
  47. package/lib/composite-comp/dito/components/Recommend/pc/index.less +4 -1
  48. package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +17 -3
  49. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +27 -15
  50. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
  51. package/lib/constants/layout.js +24 -6
  52. package/lib/core/Designer/PageCompList/index.less +10 -10
  53. package/lib/locale/index.js +3 -1
  54. package/lib/meta-comp/components/Image/index.js +6 -3
  55. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ .bundleCampaign{
2
+ padding-top: 12px;
3
+ border-top: 1px solid #f0f0f0;
4
+
5
+ .inputStyle {
6
+ width: 320px;
7
+ height: 32px;
8
+ margin-left: 10px;
9
+ }
10
+ .labelStyle {
11
+ display: inline-block;
12
+ width: 110px;
13
+ }
14
+ .mb12 {
15
+ margin-bottom: 12px;
16
+ }
17
+ }
@@ -228,7 +228,7 @@ function CatgTable(props) {
228
228
  },
229
229
  rowSelection: rowSelection,
230
230
  scroll: {
231
- y: 450
231
+ y: 480
232
232
  }
233
233
  });
234
234
  }
@@ -250,7 +250,7 @@ function CouponTable(props) {
250
250
  setLoading(true);
251
251
  return [4
252
252
  /*yield*/
253
- , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/coupons/couponList/page?tableFlag=effective&isPublic=Y&state=A&pageTotal=false", params, 'GET')];
253
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/coupons/couponList/page?tableFlag=effective&isPublic=Y&state=A&pageTotal=false&couponLocation=Promotion", params, 'GET')];
254
254
 
255
255
  case 1:
256
256
  res = _a.sent();
@@ -296,7 +296,7 @@ function CouponTable(props) {
296
296
  }),
297
297
  rowSelection: rowSelection,
298
298
  scroll: {
299
- y: 405
299
+ y: 480
300
300
  }
301
301
  }));
302
302
  }
@@ -221,7 +221,7 @@ function CustomTable(props) {
221
221
  rowKey: "bdPageId",
222
222
  rowSelection: rowSelection,
223
223
  scroll: {
224
- y: 450
224
+ y: 480
225
225
  }
226
226
  });
227
227
  }
@@ -217,37 +217,45 @@ var FilteredProductModal = function FilteredProductModal(props) {
217
217
  storeName = _g[0],
218
218
  setStoreName = _g[1];
219
219
 
220
- var _h = (0, _react.useState)(''),
221
- productName = _h[0],
222
- setProductName = _h[1];
220
+ var _h = (0, _react.useState)([]),
221
+ storeId = _h[0],
222
+ setStoreId = _h[1];
223
223
 
224
- var _j = (0, _react.useState)(''),
225
- minimum = _j[0],
226
- setMinimum = _j[1];
224
+ var _j = (0, _react.useState)([]),
225
+ storeList = _j[0],
226
+ setStoreList = _j[1];
227
227
 
228
228
  var _k = (0, _react.useState)(''),
229
- maximum = _k[0],
230
- setMaximum = _k[1];
229
+ productName = _k[0],
230
+ setProductName = _k[1];
231
231
 
232
- var _l = (0, _react.useState)([]),
233
- dataSource = _l[0],
234
- setDataSource = _l[1];
232
+ var _l = (0, _react.useState)(''),
233
+ minimum = _l[0],
234
+ setMinimum = _l[1];
235
235
 
236
- var _m = (0, _react.useState)({}),
237
- promotions = _m[0],
238
- setPromotions = _m[1];
236
+ var _m = (0, _react.useState)(''),
237
+ maximum = _m[0],
238
+ setMaximum = _m[1];
239
239
 
240
- var _o = (0, _react.useState)(false),
241
- loading = _o[0],
242
- setLoading = _o[1];
240
+ var _o = (0, _react.useState)([]),
241
+ dataSource = _o[0],
242
+ setDataSource = _o[1];
243
243
 
244
- var _p = (0, _react.useState)({
244
+ var _p = (0, _react.useState)({}),
245
+ promotions = _p[0],
246
+ setPromotions = _p[1];
247
+
248
+ var _q = (0, _react.useState)(false),
249
+ loading = _q[0],
250
+ setLoading = _q[1];
251
+
252
+ var _r = (0, _react.useState)({
245
253
  pageSize: 20,
246
254
  current: 1,
247
255
  total: 0
248
256
  }),
249
- paginationParams = _p[0],
250
- setPaginationParams = _p[1];
257
+ paginationParams = _r[0],
258
+ setPaginationParams = _r[1];
251
259
 
252
260
  var onChange = function onChange(value) {
253
261
  settVal(value);
@@ -273,6 +281,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
273
281
  settVal([]);
274
282
  settBrandId([]);
275
283
  settLabelId({});
284
+ setStoreId([]);
276
285
  setStoreName('');
277
286
  setProductName('');
278
287
  setMinimum('');
@@ -390,6 +399,28 @@ var FilteredProductModal = function FilteredProductModal(props) {
390
399
  }
391
400
  });
392
401
  });
402
+ }; // 请求店铺列表
403
+
404
+
405
+ var queryStore = function queryStore() {
406
+ return __awaiter(void 0, void 0, void 0, function () {
407
+ var res;
408
+ return __generator(this, function (_a) {
409
+ switch (_a.label) {
410
+ case 0:
411
+ return [4
412
+ /*yield*/
413
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
414
+
415
+ case 1:
416
+ res = _a.sent();
417
+ setStoreList(res);
418
+ return [2
419
+ /*return*/
420
+ ];
421
+ }
422
+ });
423
+ });
393
424
  };
394
425
 
395
426
  var JsonToUrl = function JsonToUrl(data) {
@@ -423,6 +454,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
423
454
  }).join(','),
424
455
  labelIds: labelId.key,
425
456
  productName: productName,
457
+ storeId: storeId,
426
458
  minPrice: minimum * precision || '',
427
459
  maxPrice: maximum * precision || '',
428
460
  // storeName:storeName,
@@ -478,6 +510,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
478
510
  queryCategory();
479
511
  queryBrand();
480
512
  queryLabel();
513
+ queryStore();
481
514
  }, []);
482
515
  return /*#__PURE__*/_react["default"].createElement("div", {
483
516
  className: "filteredProductModal"
@@ -522,6 +555,23 @@ var FilteredProductModal = function FilteredProductModal(props) {
522
555
  key: v.brandId,
523
556
  value: v.brandName
524
557
  }, v.brandName);
558
+ }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
559
+ label: "Store"
560
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
561
+ className: "inputStyle",
562
+ defaultValue: [],
563
+ onChange: function onChange(value) {
564
+ return setStoreId(value);
565
+ },
566
+ optionFilterProp: "children",
567
+ placeholder: "Please select",
568
+ showSearch: true,
569
+ value: storeId
570
+ }, storeList && storeList.length > 0 && storeList.map(function (v) {
571
+ return /*#__PURE__*/_react["default"].createElement(Option, {
572
+ key: v.storeId,
573
+ value: v.storeId
574
+ }, v.storeName);
525
575
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
526
576
  label: "Lable"
527
577
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
@@ -606,9 +656,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
606
656
  if (res.total !== 0) {
607
657
  onDataChange("filter-" + res.url, res.total);
608
658
  } else {
609
- onDataChange('', res.total);
610
-
611
- _antd.message.warn('no goods!');
659
+ onDataChange('', res.total); // message.warn('no goods!');
612
660
  }
613
661
  });
614
662
  },
@@ -635,7 +683,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
635
683
  }
636
684
  }),
637
685
  scroll: {
638
- y: 330
686
+ y: 400
639
687
  }
640
688
  })))));
641
689
  };
@@ -218,7 +218,7 @@ function FunctionTable(props) {
218
218
  rowKey: "funcUrlLibId",
219
219
  rowSelection: rowSelection,
220
220
  scroll: {
221
- y: 450
221
+ y: 480
222
222
  }
223
223
  });
224
224
  }
@@ -206,9 +206,9 @@ var ProductDetailPage = function ProductDetailPage(props) {
206
206
  brandData = _b[0],
207
207
  setBrandData = _b[1];
208
208
 
209
- var _c = (0, _react.useState)({}),
209
+ var _c = (0, _react.useState)([]),
210
210
  brandId = _c[0],
211
- settBrandId = _c[1];
211
+ setBrandId = _c[1];
212
212
 
213
213
  var _d = (0, _react.useState)(''),
214
214
  productCode = _d[0],
@@ -218,16 +218,24 @@ var ProductDetailPage = function ProductDetailPage(props) {
218
218
  productName = _e[0],
219
219
  setProductName = _e[1];
220
220
 
221
- var _f = (0, _react.useState)(false),
222
- loading = _f[0],
223
- setLoading = _f[1];
221
+ var _f = (0, _react.useState)([]),
222
+ storeId = _f[0],
223
+ setStoreId = _f[1];
224
224
 
225
- var _g = (0, _react.useState)({
225
+ var _g = (0, _react.useState)([]),
226
+ storeList = _g[0],
227
+ setStoreList = _g[1];
228
+
229
+ var _h = (0, _react.useState)(false),
230
+ loading = _h[0],
231
+ setLoading = _h[1];
232
+
233
+ var _j = (0, _react.useState)({
226
234
  pageSize: 20,
227
235
  current: 1
228
236
  }),
229
- paginationParams = _g[0],
230
- setPaginationParams = _g[1];
237
+ paginationParams = _j[0],
238
+ setPaginationParams = _j[1];
231
239
 
232
240
  var columns = [{
233
241
  title: 'Image',
@@ -250,7 +258,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
250
258
  dataIndex: 'attrValues',
251
259
  ellipsis: true
252
260
  }, {
253
- title: 'Merchant',
261
+ title: 'Store',
254
262
  dataIndex: 'storeName',
255
263
  width: 150,
256
264
  ellipsis: true
@@ -307,16 +315,44 @@ var ProductDetailPage = function ProductDetailPage(props) {
307
315
  }
308
316
  });
309
317
  });
318
+ }; // 请求店铺列表
319
+
320
+
321
+ var queryStore = function queryStore() {
322
+ return __awaiter(void 0, void 0, void 0, function () {
323
+ var res;
324
+ return __generator(this, function (_a) {
325
+ switch (_a.label) {
326
+ case 0:
327
+ return [4
328
+ /*yield*/
329
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
330
+
331
+ case 1:
332
+ res = _a.sent();
333
+ setStoreList(res);
334
+ return [2
335
+ /*return*/
336
+ ];
337
+ }
338
+ });
339
+ });
310
340
  };
311
341
 
312
342
  var handleBrandChange = function handleBrandChange(value, node) {
313
- settBrandId(node);
343
+ setBrandId(node.map(function (v) {
344
+ return {
345
+ key: v.key,
346
+ value: v.value
347
+ };
348
+ }));
314
349
  };
315
350
 
316
351
  var reset = function reset() {
317
352
  setProductName('');
318
353
  setProductCode('');
319
- settBrandId({});
354
+ setBrandId([]);
355
+ setStoreId([]);
320
356
  };
321
357
 
322
358
  (0, _react.useEffect)(function () {
@@ -327,6 +363,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
327
363
 
328
364
  queryGoods(params);
329
365
  queryBrand();
366
+ queryStore();
330
367
  }, []);
331
368
  return /*#__PURE__*/_react["default"].createElement("div", {
332
369
  className: "productDetailPage"
@@ -340,17 +377,23 @@ var ProductDetailPage = function ProductDetailPage(props) {
340
377
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
341
378
  span: 9
342
379
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
343
- label: "Product Name",
344
- name: "productName"
380
+ label: "Product Name"
345
381
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
346
- size: "small"
382
+ onChange: function onChange(e) {
383
+ return setProductName(e.target.value);
384
+ },
385
+ size: "small",
386
+ value: productName
347
387
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
348
388
  span: 9
349
389
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
350
- label: "SKU Code",
351
- name: "productCode"
390
+ label: "SKU Code"
352
391
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
353
- size: "small"
392
+ onChange: function onChange(e) {
393
+ return setProductCode(e.target.value);
394
+ },
395
+ size: "small",
396
+ value: productCode
354
397
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
355
398
  span: 6
356
399
  }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
@@ -364,7 +407,10 @@ var ProductDetailPage = function ProductDetailPage(props) {
364
407
  queryGoods(__assign({
365
408
  productName: productName,
366
409
  productCode: productCode,
367
- brandIds: brandId.key || ''
410
+ brandIds: brandId.map(function (v) {
411
+ return v.key;
412
+ }).join(',') || '',
413
+ storeId: storeId
368
414
  }, params));
369
415
  },
370
416
  size: "small",
@@ -380,16 +426,40 @@ var ProductDetailPage = function ProductDetailPage(props) {
380
426
  }, (0, _locale.i18n)('CANCEL'))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
381
427
  span: 9
382
428
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
383
- label: "Brand",
384
- name: "brandId"
429
+ label: "Brand"
385
430
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
431
+ defaultValue: [],
432
+ mode: "multiple",
433
+ onChange: handleBrandChange,
386
434
  placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
387
- size: "small"
435
+ size: "small",
436
+ value: brandId.map(function (v) {
437
+ return v.value;
438
+ })
388
439
  }, brandData && brandData.length > 0 && brandData.map(function (v) {
389
440
  return /*#__PURE__*/_react["default"].createElement(Option, {
390
441
  key: v.brandId,
391
442
  value: v.brandName
392
443
  }, v.brandName);
444
+ })))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
445
+ span: 9
446
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
447
+ label: "Store"
448
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
449
+ defaultValue: [],
450
+ onChange: function onChange(value) {
451
+ return setStoreId(value);
452
+ },
453
+ optionFilterProp: "children",
454
+ placeholder: "Please select",
455
+ showSearch: true,
456
+ size: "small",
457
+ value: storeId
458
+ }, storeList && storeList.length > 0 && storeList.map(function (v) {
459
+ return /*#__PURE__*/_react["default"].createElement(Option, {
460
+ key: v.storeId,
461
+ value: v.storeId
462
+ }, v.storeName);
393
463
  })))))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
394
464
  bordered: false,
395
465
  columns: columns,
@@ -406,7 +476,10 @@ var ProductDetailPage = function ProductDetailPage(props) {
406
476
  queryGoods(__assign({
407
477
  productName: productName,
408
478
  productCode: productCode,
409
- brandIds: brandId.key || ''
479
+ brandIds: brandId.map(function (v) {
480
+ return v.key;
481
+ }).join(',') || '',
482
+ storeId: storeId
410
483
  }, params));
411
484
  },
412
485
  showSizeChanger: false
@@ -414,7 +487,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
414
487
  rowKey: "productId",
415
488
  rowSelection: rowSelection,
416
489
  scroll: {
417
- y: 290
490
+ y: 340
418
491
  }
419
492
  }));
420
493
  };
@@ -23,6 +23,8 @@ var _CatgTable = _interopRequireDefault(require("./CatgTable"));
23
23
 
24
24
  var _CustomTable = _interopRequireDefault(require("./CustomTable"));
25
25
 
26
+ var _BundleCampaign = _interopRequireDefault(require("./BundleCampaign"));
27
+
26
28
  var _locale = require("../../locale");
27
29
 
28
30
  require("./index.less");
@@ -46,7 +48,7 @@ var LinkModal = function LinkModal(props) {
46
48
  selected = _b[0],
47
49
  setSelected = _b[1];
48
50
 
49
- var list = ['Category', 'Customized Page', 'Product Details Page', 'Filtered Products', 'Function Page', 'Coupons'];
51
+ var list = ['Category', 'Customized Page', 'Product Details Page', 'Filtered Products', 'Function Page', 'Coupons', 'Bundle Campaign'];
50
52
 
51
53
  var _c = (0, _react.useState)(0),
52
54
  total = _c[0],
@@ -118,6 +120,10 @@ var LinkModal = function LinkModal(props) {
118
120
  onChange: function onChange(value) {
119
121
  return setLinkUrl(value);
120
122
  }
123
+ }), selected === 'Bundle Campaign' && /*#__PURE__*/_react["default"].createElement(_BundleCampaign["default"], {
124
+ setUrl: function setUrl(url) {
125
+ return setLinkUrl(url);
126
+ }
121
127
  })), /*#__PURE__*/_react["default"].createElement("div", {
122
128
  className: "footer"
123
129
  }, selected === 'Filtered Products' ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -10,7 +10,7 @@
10
10
  font-size: 14px;
11
11
  line-height: 22px;
12
12
  color: #232F46;
13
- height: 600px;
13
+ height: 680px;
14
14
 
15
15
  .linkType {
16
16
  display: flex;
@@ -257,39 +257,47 @@ var ProductModal = function ProductModal(props) {
257
257
  selLabelData = _j[0],
258
258
  setSelLabelData = _j[1];
259
259
 
260
- var _k = (0, _react.useState)(''),
261
- productName = _k[0],
262
- setProductName = _k[1];
260
+ var _k = (0, _react.useState)([]),
261
+ storeList = _k[0],
262
+ setStoreList = _k[1];
263
263
 
264
264
  var _l = (0, _react.useState)(''),
265
- productCode = _l[0],
266
- setProductCode = _l[1];
265
+ productName = _l[0],
266
+ setProductName = _l[1];
267
267
 
268
268
  var _m = (0, _react.useState)(''),
269
- minPrice = _m[0],
270
- setMinPrice = _m[1];
269
+ productCode = _m[0],
270
+ setProductCode = _m[1];
271
271
 
272
- var _o = (0, _react.useState)(''),
273
- maxPrice = _o[0],
274
- setMaxPrice = _o[1];
272
+ var _o = (0, _react.useState)([]),
273
+ storeId = _o[0],
274
+ setStoreId = _o[1];
275
275
 
276
- var _p = (0, _react.useState)([]),
277
- promotions = _p[0],
278
- setPromotions = _p[1];
276
+ var _p = (0, _react.useState)(''),
277
+ minPrice = _p[0],
278
+ setMinPrice = _p[1];
279
279
 
280
- var _q = (0, _react.useState)([]),
281
- goodsList = _q[0],
282
- setGoodsList = _q[1];
280
+ var _q = (0, _react.useState)(''),
281
+ maxPrice = _q[0],
282
+ setMaxPrice = _q[1];
283
283
 
284
- var _r = (0, _react.useState)(false),
285
- loading = _r[0],
286
- setLoading = _r[1];
284
+ var _r = (0, _react.useState)([]),
285
+ promotions = _r[0],
286
+ setPromotions = _r[1];
287
287
 
288
- var _s = (0, _react.useState)(defaultList.map(function (v) {
288
+ var _s = (0, _react.useState)([]),
289
+ goodsList = _s[0],
290
+ setGoodsList = _s[1];
291
+
292
+ var _t = (0, _react.useState)(false),
293
+ loading = _t[0],
294
+ setLoading = _t[1];
295
+
296
+ var _u = (0, _react.useState)(defaultList.map(function (v) {
289
297
  return v.productId;
290
298
  })),
291
- selectedRowKeys = _s[0],
292
- setSelectedRowKeys = _s[1];
299
+ selectedRowKeys = _u[0],
300
+ setSelectedRowKeys = _u[1];
293
301
 
294
302
  var rowSelection = {
295
303
  selectedRowKeys: selectedRowKeys,
@@ -321,13 +329,13 @@ var ProductModal = function ProductModal(props) {
321
329
  }
322
330
  };
323
331
 
324
- var _t = (0, _react.useState)({
332
+ var _v = (0, _react.useState)({
325
333
  pageSize: 20,
326
334
  current: 1,
327
335
  total: 0
328
336
  }),
329
- paginationParams = _t[0],
330
- setPaginationParams = _t[1];
337
+ paginationParams = _v[0],
338
+ setPaginationParams = _v[1];
331
339
 
332
340
  var delSelectedItem = function delSelectedItem(index) {
333
341
  console.log(selectedRowKeys, index, 2223);
@@ -432,12 +440,35 @@ var ProductModal = function ProductModal(props) {
432
440
  }
433
441
  });
434
442
  });
443
+ }; // 请求店铺列表
444
+
445
+
446
+ var queryStore = function queryStore() {
447
+ return __awaiter(void 0, void 0, void 0, function () {
448
+ var res;
449
+ return __generator(this, function (_a) {
450
+ switch (_a.label) {
451
+ case 0:
452
+ return [4
453
+ /*yield*/
454
+ , (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
455
+
456
+ case 1:
457
+ res = _a.sent();
458
+ setStoreList(res);
459
+ return [2
460
+ /*return*/
461
+ ];
462
+ }
463
+ });
464
+ });
435
465
  };
436
466
 
437
467
  (0, _react.useEffect)(function () {
438
468
  queryOfferCatgs();
439
469
  queryBrands();
440
470
  queryLabel();
471
+ queryStore();
441
472
  }, []);
442
473
  (0, _react.useEffect)(function () {
443
474
  setSelectedList(defaultList);
@@ -455,6 +486,7 @@ var ProductModal = function ProductModal(props) {
455
486
  setSelCatgsList([]);
456
487
  setSelLabelData([]);
457
488
  setProductName('');
489
+ setStoreId([]);
458
490
  setProductCode('');
459
491
  setMinPrice('');
460
492
  setMaxPrice('');
@@ -507,17 +539,6 @@ var ProductModal = function ProductModal(props) {
507
539
  width: 100,
508
540
  ellipsis: true
509
541
  }];
510
-
511
- var onResetQryCondition = function onResetQryCondition() {
512
- setProductName('');
513
- setPromotions(null);
514
- setMinPrice('');
515
- setMaxPrice('');
516
- setSelBrandsList([]);
517
- setSelCatgsList([]);
518
- setSelLabelData([]);
519
- };
520
-
521
542
  return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
522
543
  cancelText: (0, _locale.i18n)('CANCEL'),
523
544
  draggable: false,
@@ -572,6 +593,23 @@ var ProductModal = function ProductModal(props) {
572
593
  key: item.catgId,
573
594
  value: item.brandId
574
595
  }, item.brandName);
596
+ }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
597
+ label: "Store"
598
+ }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
599
+ className: "inputStyle",
600
+ defaultValue: [],
601
+ onChange: function onChange(value) {
602
+ return setStoreId(value);
603
+ },
604
+ optionFilterProp: "children",
605
+ placeholder: "Please select",
606
+ showSearch: true,
607
+ value: storeId
608
+ }, storeList && storeList.length > 0 && storeList.map(function (v) {
609
+ return /*#__PURE__*/_react["default"].createElement(Option, {
610
+ key: v.storeId,
611
+ value: v.storeId
612
+ }, v.storeName);
575
613
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
576
614
  label: "Lable"
577
615
  }, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
@@ -661,6 +699,7 @@ var ProductModal = function ProductModal(props) {
661
699
  queryGoods({
662
700
  productName: productName,
663
701
  productCode: productCode,
702
+ storeId: storeId,
664
703
  cmpTypeId: promotions || '',
665
704
  minPrice: minPrice === '' ? '' : minPrice * Math.pow(10, precision),
666
705
  maxPrice: maxPrice === '' ? '' : maxPrice * Math.pow(10, precision),
@@ -240,7 +240,9 @@ function ProductSource(_a) {
240
240
  type: "primary"
241
241
  }, (0, _locale.i18n)('SELECT_PRODUCT')), /*#__PURE__*/_react["default"].createElement("div", {
242
242
  className: "total"
243
- }, "Total ", getLength(), " products"), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
243
+ }, (0, _locale.i18n)('TOTAL_PRODUCTS', {
244
+ count: getLength()
245
+ })), visible && /*#__PURE__*/_react["default"].createElement(_ProductModal["default"], {
244
246
  closeModal: function closeModal() {
245
247
  return setVisbile(false);
246
248
  },
@@ -71,14 +71,14 @@ function (_super) {
71
71
  return /*#__PURE__*/_react["default"].createElement("img", {
72
72
  key: label.imgUrl || label.labelPictureUrl,
73
73
  alt: "img",
74
- className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + (label.position || 'default')] = true, _a.small = small, _a)),
74
+ className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + (label.position || 'null')] = true, _a.small = small, _a)),
75
75
  src: label.imgUrl || label.labelPictureUrl
76
76
  });
77
77
  }
78
78
 
79
79
  return /*#__PURE__*/_react["default"].createElement("div", {
80
80
  key: label.labelName,
81
- className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + (label.position || 'default')] = true, _b))
81
+ className: (0, _classnames["default"])('image-label-wrap', (_b = {}, _b["position-" + (label.position || 'null')] = true, _b))
82
82
  }, label.labelName);
83
83
  });
84
84
  };