@fonixtree/magic-design 0.1.81 → 0.1.83
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/es/assets/less/button.less +5 -0
- package/es/common/AffiliateProductModal/index.js +1 -1
- package/es/common/AffiliateProductModal/index.less +1 -1
- package/es/common/Button/index.less +0 -1
- package/es/common/LinkModal/BundleCampaign/index.js +2 -2
- package/es/common/LinkModal/CouponTable/index.js +1 -1
- package/es/common/LinkModal/CustomTable/index.js +1 -0
- package/es/common/LinkModal/FilteredProductModal/index.js +82 -106
- package/es/common/LinkModal/FilteredProductModal/index.less +1 -0
- package/es/common/LinkModal/ProductDetailPage/index.js +115 -60
- package/es/common/LinkModal/ProductDetailPage/index.less +6 -1
- package/es/common/ProductModal/index.js +144 -100
- package/es/common/ProductModal/index.less +7 -1
- package/es/common/ProductSource/index.js +81 -21
- package/es/composite-comp/bol/components/Wallet/mobile/index.js +1 -1
- package/es/composite-comp/bol/components/Wallet/mobile/index.less +1 -1
- package/es/composite-comp/bol/components/Wallet/pc/index.js +0 -2
- package/es/composite-comp/bol/components/Wallet/pc/index.less +1 -40
- package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -1
- package/es/composite-comp/common/components/AffiliateProductItem/index.js +1 -10
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +22 -17
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +27 -24
- package/es/composite-comp/dito/components/Recommend/pc/index.js +1 -1
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +25 -27
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
- package/es/constants/index.js +13 -4
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +34 -16
- package/es/core/Designer/ChatRobot/index.js +49 -4
- package/es/core/Designer/FonixtreeGpt/index.js +222 -29
- package/es/core/Designer/PageCompList/index.js +1 -1
- package/es/core/Designer/QuickMenuBar/index.js +6 -2
- package/es/core/Designer/index.js +11 -1
- package/es/locale/en/en.json +2 -1
- package/es/locale/es/es.json +2 -1
- package/es/locale/id/id.json +2 -1
- package/es/utils/businessUtil.js +2 -2
- package/es/utils/commonUtil.js +14 -6
- package/lib/assets/less/button.less +5 -0
- package/lib/common/AffiliateProductModal/index.js +1 -1
- package/lib/common/AffiliateProductModal/index.less +1 -1
- package/lib/common/Button/index.less +0 -1
- package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
- package/lib/common/LinkModal/CouponTable/index.js +1 -1
- package/lib/common/LinkModal/CustomTable/index.js +1 -0
- package/lib/common/LinkModal/FilteredProductModal/index.js +82 -106
- package/lib/common/LinkModal/FilteredProductModal/index.less +1 -0
- package/lib/common/LinkModal/ProductDetailPage/index.js +115 -60
- package/lib/common/LinkModal/ProductDetailPage/index.less +6 -1
- package/lib/common/ProductModal/index.js +144 -100
- package/lib/common/ProductModal/index.less +7 -1
- package/lib/common/ProductSource/index.js +81 -21
- package/lib/composite-comp/bol/components/Wallet/mobile/index.js +1 -1
- package/lib/composite-comp/bol/components/Wallet/mobile/index.less +1 -1
- package/lib/composite-comp/bol/components/Wallet/pc/index.js +0 -2
- package/lib/composite-comp/bol/components/Wallet/pc/index.less +1 -40
- package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +1 -1
- package/lib/composite-comp/common/components/AffiliateProductItem/index.js +1 -10
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +22 -17
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +27 -24
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +1 -1
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +25 -27
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +4 -2
- package/lib/constants/index.js +13 -4
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +34 -16
- package/lib/core/Designer/ChatRobot/index.js +49 -4
- package/lib/core/Designer/FonixtreeGpt/index.js +222 -29
- package/lib/core/Designer/PageCompList/index.js +1 -1
- package/lib/core/Designer/QuickMenuBar/index.js +6 -2
- package/lib/core/Designer/index.js +11 -1
- package/lib/locale/en/en.json +2 -1
- package/lib/locale/es/es.json +2 -1
- package/lib/locale/id/id.json +2 -1
- package/lib/utils/businessUtil.js +2 -2
- package/lib/utils/commonUtil.js +14 -6
- package/package.json +1 -1
|
@@ -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
|
|
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.
|
|
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
|
-
|
|
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.
|
|
227
|
-
|
|
228
|
-
_b = props.
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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,31 @@ var ProductModal = function ProductModal(props) {
|
|
|
292
298
|
loading = _t[0],
|
|
293
299
|
setLoading = _t[1];
|
|
294
300
|
|
|
295
|
-
var _u = (0, _react.useState)(
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
301
|
+
var _u = (0, _react.useState)(prodType),
|
|
302
|
+
proType = _u[0],
|
|
303
|
+
setProType = _u[1];
|
|
304
|
+
|
|
305
|
+
var _v = (0, _react.useState)(false),
|
|
306
|
+
flag = _v[0],
|
|
307
|
+
setFlag = _v[1];
|
|
308
|
+
|
|
309
|
+
var _w = (0, _react.useState)(defaultList),
|
|
310
|
+
selectedList = _w[0],
|
|
311
|
+
setSelectedList = _w[1];
|
|
312
|
+
|
|
313
|
+
var _x = (0, _react.useState)({
|
|
314
|
+
pageSize: 20,
|
|
315
|
+
current: 1,
|
|
316
|
+
total: 0
|
|
317
|
+
}),
|
|
318
|
+
paginationParams = _x[0],
|
|
319
|
+
setPaginationParams = _x[1];
|
|
300
320
|
|
|
301
321
|
var rowSelection = {
|
|
302
|
-
selectedRowKeys:
|
|
303
|
-
|
|
322
|
+
selectedRowKeys: selectedList.map(function (v) {
|
|
323
|
+
return v.id;
|
|
324
|
+
}),
|
|
325
|
+
onSelect: function onSelect(record, selected) {
|
|
304
326
|
if (selected) {
|
|
305
327
|
if (selectedList.length === maxSelect) {
|
|
306
328
|
_antd.message.warning("Max " + maxSelect);
|
|
@@ -309,17 +331,13 @@ var ProductModal = function ProductModal(props) {
|
|
|
309
331
|
}
|
|
310
332
|
|
|
311
333
|
if (selectedList.length < maxSelect) {
|
|
312
|
-
setSelectedList(__spreadArrays(selectedList,
|
|
334
|
+
setSelectedList(__spreadArrays(selectedList, [record]));
|
|
313
335
|
}
|
|
314
336
|
} else {
|
|
315
337
|
setSelectedList(selectedList.filter(function (v) {
|
|
316
|
-
return v.
|
|
338
|
+
return v.id !== record.id;
|
|
317
339
|
}));
|
|
318
340
|
}
|
|
319
|
-
|
|
320
|
-
setSelectedRowKeys(selectedRows.map(function (v) {
|
|
321
|
-
return v === null || v === void 0 ? void 0 : v.productId;
|
|
322
|
-
}));
|
|
323
341
|
},
|
|
324
342
|
getCheckboxProps: function getCheckboxProps(record) {
|
|
325
343
|
return {
|
|
@@ -328,41 +346,80 @@ var ProductModal = function ProductModal(props) {
|
|
|
328
346
|
}
|
|
329
347
|
};
|
|
330
348
|
|
|
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
349
|
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
350
|
var rows = JSON.parse(JSON.stringify(selectedList));
|
|
345
351
|
rows.splice(index, 1);
|
|
346
352
|
setSelectedList(rows);
|
|
347
353
|
}; // 请求商品列表
|
|
348
354
|
|
|
349
355
|
|
|
350
|
-
var queryGoods = function queryGoods(
|
|
356
|
+
var queryGoods = function queryGoods() {
|
|
351
357
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
352
|
-
var res;
|
|
358
|
+
var _list, total, params, res_1, res;
|
|
359
|
+
|
|
353
360
|
return __generator(this, function (_a) {
|
|
354
361
|
switch (_a.label) {
|
|
355
362
|
case 0:
|
|
363
|
+
setLoading(true);
|
|
364
|
+
setGoodsList([]);
|
|
365
|
+
_list = [];
|
|
366
|
+
total = 0;
|
|
367
|
+
params = {
|
|
368
|
+
productName: productName,
|
|
369
|
+
storeId: storeId,
|
|
370
|
+
cmpTypeId: promotions || '',
|
|
371
|
+
minPrice: (0, _currencyUtil.formatBackendCurrency)(minPrice),
|
|
372
|
+
maxPrice: (0, _currencyUtil.formatBackendCurrency)(maxPrice),
|
|
373
|
+
catgIds: selCatgsList.join(','),
|
|
374
|
+
brandIds: selBrandsList.join(','),
|
|
375
|
+
labelIds: selLabelData.value || '',
|
|
376
|
+
pageSize: paginationParams.pageSize,
|
|
377
|
+
pageIndex: paginationParams.current
|
|
378
|
+
};
|
|
379
|
+
if (!(proType === 'spu')) return [3
|
|
380
|
+
/*break*/
|
|
381
|
+
, 2];
|
|
356
382
|
return [4
|
|
357
383
|
/*yield*/
|
|
358
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
384
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
|
|
385
|
+
offerCode: productCode,
|
|
386
|
+
isDefaultCover: 'Y',
|
|
387
|
+
onlyQryPublishSku: true,
|
|
388
|
+
auditState: 'S',
|
|
389
|
+
crmFlag: 'on'
|
|
390
|
+
}), 'GET')];
|
|
359
391
|
|
|
360
392
|
case 1:
|
|
393
|
+
res_1 = _a.sent();
|
|
394
|
+
_list = formatData((0, _commonUtil.ensure)(function () {
|
|
395
|
+
return res_1.list.map(function (m) {
|
|
396
|
+
return __assign(__assign({}, m.products[0]), m);
|
|
397
|
+
});
|
|
398
|
+
}, []), proType);
|
|
399
|
+
total = res_1.total;
|
|
400
|
+
return [3
|
|
401
|
+
/*break*/
|
|
402
|
+
, 4];
|
|
403
|
+
|
|
404
|
+
case 2:
|
|
405
|
+
return [4
|
|
406
|
+
/*yield*/
|
|
407
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
408
|
+
state: 'A',
|
|
409
|
+
productCode: productCode
|
|
410
|
+
}), 'GET')];
|
|
411
|
+
|
|
412
|
+
case 3:
|
|
361
413
|
res = _a.sent();
|
|
414
|
+
_list = formatData(res.list || []);
|
|
415
|
+
total = res.total;
|
|
416
|
+
_a.label = 4;
|
|
417
|
+
|
|
418
|
+
case 4:
|
|
362
419
|
setLoading(false);
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
420
|
+
setGoodsList(_list);
|
|
421
|
+
paginationParams.total = total;
|
|
422
|
+
setPaginationParams(__assign({}, paginationParams));
|
|
366
423
|
return [2
|
|
367
424
|
/*return*/
|
|
368
425
|
];
|
|
@@ -460,6 +517,18 @@ var ProductModal = function ProductModal(props) {
|
|
|
460
517
|
});
|
|
461
518
|
};
|
|
462
519
|
|
|
520
|
+
var reset = function reset() {
|
|
521
|
+
setSelBrandsList([]);
|
|
522
|
+
setSelCatgsList([]);
|
|
523
|
+
setSelLabelData([]);
|
|
524
|
+
setProductName('');
|
|
525
|
+
setStoreId('');
|
|
526
|
+
setProductCode('');
|
|
527
|
+
setMinPrice('');
|
|
528
|
+
setMaxPrice('');
|
|
529
|
+
setPromotions(props.type === 'groupBuy' ? promType.GROUP_BUY : null);
|
|
530
|
+
};
|
|
531
|
+
|
|
463
532
|
(0, _react.useEffect)(function () {
|
|
464
533
|
queryOfferCatgs();
|
|
465
534
|
queryBrands();
|
|
@@ -471,27 +540,19 @@ var ProductModal = function ProductModal(props) {
|
|
|
471
540
|
}, []);
|
|
472
541
|
(0, _react.useEffect)(function () {
|
|
473
542
|
setSelectedList(defaultList);
|
|
474
|
-
setSelectedRowKeys(defaultList.map(function (v) {
|
|
475
|
-
return v.productId;
|
|
476
|
-
}));
|
|
477
543
|
|
|
478
544
|
if (props.type === 'groupBuy') {
|
|
479
545
|
setPromotions(promType.GROUP_BUY);
|
|
480
546
|
}
|
|
481
547
|
}, [visible]);
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
setMinPrice('');
|
|
491
|
-
setMaxPrice('');
|
|
492
|
-
setPromotions(props.type === 'groupBuy' ? promType.GROUP_BUY : null);
|
|
493
|
-
};
|
|
494
|
-
|
|
548
|
+
(0, _react.useEffect)(function () {
|
|
549
|
+
reset();
|
|
550
|
+
paginationParams.current = 1;
|
|
551
|
+
setFlag(!flag);
|
|
552
|
+
}, [proType]);
|
|
553
|
+
(0, _react.useEffect)(function () {
|
|
554
|
+
queryGoods();
|
|
555
|
+
}, [flag]);
|
|
495
556
|
var columns = [{
|
|
496
557
|
title: (0, _locale.i18n)('IMAGE'),
|
|
497
558
|
dataIndex: 'productImageUrl',
|
|
@@ -510,8 +571,8 @@ var ProductModal = function ProductModal(props) {
|
|
|
510
571
|
width: 120,
|
|
511
572
|
ellipsis: true
|
|
512
573
|
}, {
|
|
513
|
-
title: (0, _locale.i18n)('
|
|
514
|
-
dataIndex: 'productCode',
|
|
574
|
+
title: proType === 'spu' ? (0, _locale.i18n)('SPU_CODE') : (0, _locale.i18n)('SKU_CODE'),
|
|
575
|
+
dataIndex: proType === 'spu' ? 'offerCode' : 'productCode',
|
|
515
576
|
width: 120,
|
|
516
577
|
ellipsis: true
|
|
517
578
|
}, _defineProperty({
|
|
@@ -599,7 +660,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
599
660
|
return setStoreId(value);
|
|
600
661
|
},
|
|
601
662
|
optionFilterProp: "children",
|
|
602
|
-
placeholder:
|
|
663
|
+
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
603
664
|
showSearch: true,
|
|
604
665
|
value: storeId
|
|
605
666
|
}, storeList && storeList.length > 0 && storeList.map(function (v) {
|
|
@@ -612,7 +673,6 @@ var ProductModal = function ProductModal(props) {
|
|
|
612
673
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
613
674
|
defaultValue: selLabelData.children || null,
|
|
614
675
|
onChange: function onChange(v, o) {
|
|
615
|
-
console.log(v, o, 33);
|
|
616
676
|
setSelLabelData(o);
|
|
617
677
|
},
|
|
618
678
|
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
@@ -659,7 +719,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
659
719
|
size: "small",
|
|
660
720
|
value: productName
|
|
661
721
|
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
662
|
-
label:
|
|
722
|
+
label: proType === 'spu' ? 'SPU Code' : 'SKU Code'
|
|
663
723
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
664
724
|
className: "inputStyle",
|
|
665
725
|
onChange: function onChange(e) {
|
|
@@ -693,20 +753,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
693
753
|
onClick: function onClick() {
|
|
694
754
|
setLoading(true);
|
|
695
755
|
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
|
-
});
|
|
756
|
+
queryGoods();
|
|
710
757
|
},
|
|
711
758
|
size: "small",
|
|
712
759
|
style: {
|
|
@@ -715,7 +762,17 @@ var ProductModal = function ProductModal(props) {
|
|
|
715
762
|
type: "primary"
|
|
716
763
|
}, (0, _locale.i18n)('QUERY'))))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
717
764
|
className: "rightCot"
|
|
718
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.
|
|
765
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
766
|
+
buttonStyle: "solid",
|
|
767
|
+
className: "btn-select-type",
|
|
768
|
+
onChange: function onChange(e) {
|
|
769
|
+
setProType(e.target.value);
|
|
770
|
+
setSelectedList([]);
|
|
771
|
+
},
|
|
772
|
+
options: proTypeOption,
|
|
773
|
+
optionType: "button",
|
|
774
|
+
value: proType
|
|
775
|
+
}), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
719
776
|
columns: columns,
|
|
720
777
|
dataSource: goodsList,
|
|
721
778
|
loading: loading,
|
|
@@ -723,26 +780,13 @@ var ProductModal = function ProductModal(props) {
|
|
|
723
780
|
onChange: function onChange(page) {
|
|
724
781
|
setLoading(true);
|
|
725
782
|
paginationParams.current = page;
|
|
726
|
-
|
|
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
|
-
});
|
|
783
|
+
queryGoods();
|
|
740
784
|
}
|
|
741
785
|
}),
|
|
742
|
-
rowKey: "
|
|
786
|
+
rowKey: "id",
|
|
743
787
|
rowSelection: rowSelection,
|
|
744
788
|
scroll: {
|
|
745
|
-
y:
|
|
789
|
+
y: 420
|
|
746
790
|
}
|
|
747
791
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
748
792
|
className: "selectedCot"
|
|
@@ -772,7 +816,7 @@ var ProductModal = function ProductModal(props) {
|
|
|
772
816
|
className: "totalNum"
|
|
773
817
|
}, selectedList.length, "/", maxSelect)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
774
818
|
onClick: function onClick() {
|
|
775
|
-
handleModalSave && handleModalSave(selectedList);
|
|
819
|
+
handleModalSave && handleModalSave(selectedList, proType);
|
|
776
820
|
closeModal && closeModal();
|
|
777
821
|
},
|
|
778
822
|
style: {
|
|
@@ -17,7 +17,13 @@
|
|
|
17
17
|
margin-left: 16px;
|
|
18
18
|
display: flex;
|
|
19
19
|
flex-direction: column;
|
|
20
|
-
justify-content:
|
|
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;
|
|
@@ -15,7 +15,7 @@ var _commonUtil = require("../../utils/commonUtil");
|
|
|
15
15
|
|
|
16
16
|
var _Button = _interopRequireDefault(require("../Button"));
|
|
17
17
|
|
|
18
|
-
var _ProductModal =
|
|
18
|
+
var _ProductModal = _interopRequireWildcard(require("../ProductModal"));
|
|
19
19
|
|
|
20
20
|
require("./index.less");
|
|
21
21
|
|
|
@@ -27,6 +27,22 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
31
|
+
__assign = Object.assign || function (t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
|
|
35
|
+
for (var p in s) {
|
|
36
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return t;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return __assign.apply(this, arguments);
|
|
44
|
+
};
|
|
45
|
+
|
|
30
46
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
31
47
|
function adopt(value) {
|
|
32
48
|
return value instanceof P ? value : new P(function (resolve) {
|
|
@@ -175,7 +191,8 @@ function ProductSource(_a) {
|
|
|
175
191
|
|
|
176
192
|
var value = _a.value,
|
|
177
193
|
onChange = _a.onChange,
|
|
178
|
-
isAffiliate = _a.isAffiliate
|
|
194
|
+
isAffiliate = _a.isAffiliate,
|
|
195
|
+
prodType = _a.prodType;
|
|
179
196
|
|
|
180
197
|
var _b = (0, _react.useState)([]),
|
|
181
198
|
selectedProds = _b[0],
|
|
@@ -187,27 +204,22 @@ function ProductSource(_a) {
|
|
|
187
204
|
|
|
188
205
|
var onSelectProduct = function onSelectProduct() {
|
|
189
206
|
return __awaiter(_this, void 0, void 0, function () {
|
|
190
|
-
var url, param, list;
|
|
207
|
+
var url, param, list, url, param, list_1, url, param, list;
|
|
191
208
|
return __generator(this, function (_a) {
|
|
192
209
|
switch (_a.label) {
|
|
193
210
|
case 0:
|
|
194
211
|
if (!(value && value.length > 0)) return [3
|
|
195
212
|
/*break*/
|
|
213
|
+
, 7];
|
|
214
|
+
if (!isAffiliate) return [3
|
|
215
|
+
/*break*/
|
|
196
216
|
, 2];
|
|
197
|
-
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
217
|
+
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/distributor/product/list";
|
|
198
218
|
param = {
|
|
199
|
-
|
|
219
|
+
affiliateProductIds: value,
|
|
220
|
+
pageSize: value.length,
|
|
221
|
+
pageIndex: 1
|
|
200
222
|
};
|
|
201
|
-
|
|
202
|
-
if (isAffiliate) {
|
|
203
|
-
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/distributor/product/list";
|
|
204
|
-
param = {
|
|
205
|
-
affiliateProductIds: value,
|
|
206
|
-
pageSize: value.length,
|
|
207
|
-
pageIndex: 1
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
|
|
211
223
|
return [4
|
|
212
224
|
/*yield*/
|
|
213
225
|
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
@@ -217,13 +229,60 @@ function ProductSource(_a) {
|
|
|
217
229
|
setSelectedProds(list || []);
|
|
218
230
|
return [3
|
|
219
231
|
/*break*/
|
|
220
|
-
,
|
|
232
|
+
, 6];
|
|
221
233
|
|
|
222
234
|
case 2:
|
|
223
|
-
|
|
224
|
-
|
|
235
|
+
if (!(prodType === 'spu')) return [3
|
|
236
|
+
/*break*/
|
|
237
|
+
, 4];
|
|
238
|
+
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/offers";
|
|
239
|
+
param = {
|
|
240
|
+
offers: value,
|
|
241
|
+
isDefaultCover: 'Y',
|
|
242
|
+
onlyQryPublishSku: true,
|
|
243
|
+
auditState: 'S',
|
|
244
|
+
crmFlag: 'on'
|
|
245
|
+
};
|
|
246
|
+
return [4
|
|
247
|
+
/*yield*/
|
|
248
|
+
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
225
249
|
|
|
226
250
|
case 3:
|
|
251
|
+
list_1 = _a.sent().list;
|
|
252
|
+
setSelectedProds((0, _ProductModal.formatData)((0, _commonUtil.ensure)(function () {
|
|
253
|
+
return list_1.map(function (m) {
|
|
254
|
+
return __assign(__assign({}, m.products[0]), m);
|
|
255
|
+
});
|
|
256
|
+
}, []), prodType));
|
|
257
|
+
return [3
|
|
258
|
+
/*break*/
|
|
259
|
+
, 6];
|
|
260
|
+
|
|
261
|
+
case 4:
|
|
262
|
+
url = "/designer/v1/" + window.magicDesign.MBaseUrl + "/products";
|
|
263
|
+
param = {
|
|
264
|
+
products: value,
|
|
265
|
+
state: 'A'
|
|
266
|
+
};
|
|
267
|
+
return [4
|
|
268
|
+
/*yield*/
|
|
269
|
+
, (0, _commonUtil.commonFetch)(url, param, 'GET')];
|
|
270
|
+
|
|
271
|
+
case 5:
|
|
272
|
+
list = _a.sent().list;
|
|
273
|
+
setSelectedProds((0, _ProductModal.formatData)(list || []));
|
|
274
|
+
_a.label = 6;
|
|
275
|
+
|
|
276
|
+
case 6:
|
|
277
|
+
return [3
|
|
278
|
+
/*break*/
|
|
279
|
+
, 8];
|
|
280
|
+
|
|
281
|
+
case 7:
|
|
282
|
+
setSelectedProds([]);
|
|
283
|
+
_a.label = 8;
|
|
284
|
+
|
|
285
|
+
case 8:
|
|
227
286
|
setVisbile(true);
|
|
228
287
|
return [2
|
|
229
288
|
/*return*/
|
|
@@ -233,7 +292,7 @@ function ProductSource(_a) {
|
|
|
233
292
|
});
|
|
234
293
|
};
|
|
235
294
|
|
|
236
|
-
var handleModalSave = function handleModalSave(list) {
|
|
295
|
+
var handleModalSave = function handleModalSave(list, type) {
|
|
237
296
|
var ids = '';
|
|
238
297
|
|
|
239
298
|
if (isAffiliate) {
|
|
@@ -242,11 +301,11 @@ function ProductSource(_a) {
|
|
|
242
301
|
}).join(',');
|
|
243
302
|
} else {
|
|
244
303
|
ids = list.map(function (prod) {
|
|
245
|
-
return prod.
|
|
304
|
+
return prod.id;
|
|
246
305
|
}).join(',');
|
|
247
306
|
}
|
|
248
307
|
|
|
249
|
-
onChange(ids);
|
|
308
|
+
onChange(ids, type);
|
|
250
309
|
};
|
|
251
310
|
|
|
252
311
|
var getLength = function getLength() {
|
|
@@ -281,6 +340,7 @@ function ProductSource(_a) {
|
|
|
281
340
|
defaultList: selectedProds,
|
|
282
341
|
handleModalSave: handleModalSave,
|
|
283
342
|
maxSelect: 100,
|
|
343
|
+
prodType: prodType,
|
|
284
344
|
visible: visible
|
|
285
345
|
})));
|
|
286
346
|
}
|
|
@@ -290,7 +290,7 @@ function (_super) {
|
|
|
290
290
|
show: true
|
|
291
291
|
}, _b[_constants.walletType.CENDUIT] = {
|
|
292
292
|
amount: userPoint === null ? '****' : userPoint,
|
|
293
|
-
btnText: userPoint ? '
|
|
293
|
+
btnText: userPoint ? 'CenDuit Mall' : '',
|
|
294
294
|
show: true
|
|
295
295
|
}, _b)
|
|
296
296
|
}, function () {
|
|
@@ -17,8 +17,6 @@ var _currencyUtil = require("../../../../../utils/currencyUtil");
|
|
|
17
17
|
|
|
18
18
|
var _ConfigPanel = require("../../../../../core/Designer/ConfigPanel");
|
|
19
19
|
|
|
20
|
-
require("./index.less");
|
|
21
|
-
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
21
|
|
|
24
22
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
.m-Wallet-pc {
|
|
2
|
-
|
|
3
|
-
.headline {
|
|
4
|
-
margin-bottom: 20px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.content {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-wrap: wrap;
|
|
10
|
-
|
|
11
|
-
&.column_3 {
|
|
12
|
-
.item-wrap {
|
|
13
|
-
.title {
|
|
14
|
-
top: 24%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.amount {
|
|
18
|
-
bottom: 14%;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.item-wrap {
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
position: relative;
|
|
28
|
-
border-radius: 10px;
|
|
29
|
-
|
|
30
|
-
.image {
|
|
31
|
-
border-radius: 10px;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.text-content {
|
|
36
|
-
position: absolute;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
.m-Wallet-pc {}
|
|
@@ -136,7 +136,7 @@ function (_super) {
|
|
|
136
136
|
value: _constants.walletType.B2B
|
|
137
137
|
}, (0, _locale.i18n)('B2B PayLater')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
138
138
|
value: _constants.walletType.CENDUIT
|
|
139
|
-
}, (0, _locale.i18n)('
|
|
139
|
+
}, (0, _locale.i18n)('CenDuit')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
140
140
|
value: _constants.walletType.BNPL
|
|
141
141
|
}, (0, _locale.i18n)('BNPL')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
142
142
|
value: _constants.walletType.CREDIT
|
|
@@ -11,8 +11,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
|
|
12
12
|
var _iconBalance = _interopRequireDefault(require("./imgs/icon-Balance2.svg"));
|
|
13
13
|
|
|
14
|
-
var _iconKoin = _interopRequireDefault(require("./imgs/icon-Koin.svg"));
|
|
15
|
-
|
|
16
14
|
var _currencyUtil = require("../../../../utils/currencyUtil");
|
|
17
15
|
|
|
18
16
|
var _components = require("../../../../meta-comp/components");
|
|
@@ -144,14 +142,7 @@ function (_super) {
|
|
|
144
142
|
src: _iconBalance["default"]
|
|
145
143
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
146
144
|
className: "cashBackBox_text " + (customFont ? 'custom_font' : '')
|
|
147
|
-
}, "Cashback Saldo", /*#__PURE__*/_react["default"].createElement("span", null, (0, _currencyUtil.formatCurrencyWithSymbolNotSpace)(data.buyCommission || 0)))), /*#__PURE__*/_react["default"].createElement(
|
|
148
|
-
className: "cashBackBox_koin"
|
|
149
|
-
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
150
|
-
alt: "",
|
|
151
|
-
src: _iconKoin["default"]
|
|
152
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
153
|
-
className: "cashBackBox_text " + (customFont ? 'custom_font' : '')
|
|
154
|
-
}, "Cashback", /*#__PURE__*/_react["default"].createElement("span", null, (0, _currencyUtil.formatCurrency)(data.giftCommission || 0)), "Koin"))), panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
145
|
+
}, "Cashback Saldo", /*#__PURE__*/_react["default"].createElement("span", null, (0, _currencyUtil.formatCurrencyWithSymbolNotSpace)(data.buyCommission || 0))))), panelProps.salesPrice.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
155
146
|
className: "producItemPrice",
|
|
156
147
|
data: __assign(__assign({}, panelProps.salesPrice), {
|
|
157
148
|
text: (0, _currencyUtil.formatCurrencyWithSymbolNotSpace)(data.productPrice || 0)
|