@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
|
@@ -29,4 +29,9 @@
|
|
|
29
29
|
color: #2F54EB;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
}
|
|
33
|
+
.cylon-btn[disabled], .cylon-btn[disabled]:hover, .cylon-btn[disabled]:focus, .cylon-btn[disabled]:active {
|
|
34
|
+
color: rgba(0, 0, 0, 0.25) !important;
|
|
35
|
+
border-color: #d9d9d9 !important;
|
|
36
|
+
background: #f5f5f5 !important;
|
|
32
37
|
}
|
|
@@ -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: "
|
|
434
|
+
wrapClassName: "affiliateModalCot"
|
|
435
435
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
436
436
|
className: "proModalWrap"
|
|
437
437
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -179,7 +179,7 @@ var BundleCampaign = function BundleCampaign(props) {
|
|
|
179
179
|
campaignName = _b[0],
|
|
180
180
|
setCampaignName = _b[1];
|
|
181
181
|
|
|
182
|
-
var _c = (0, _react.useState)(window.magicDesign.storeId ? window.magicDesign.storeId : ''),
|
|
182
|
+
var _c = (0, _react.useState)(window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''),
|
|
183
183
|
storeId = _c[0],
|
|
184
184
|
setStoreId = _c[1];
|
|
185
185
|
|
|
@@ -241,7 +241,7 @@ var BundleCampaign = function BundleCampaign(props) {
|
|
|
241
241
|
|
|
242
242
|
var reset = function reset() {
|
|
243
243
|
setCampaignName('');
|
|
244
|
-
setStoreId(window.magicDesign.storeId ? window.magicDesign.storeId : '');
|
|
244
|
+
setStoreId(window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : '');
|
|
245
245
|
setCmpState('A,B');
|
|
246
246
|
};
|
|
247
247
|
|
|
@@ -257,7 +257,7 @@ function CouponTable(props) {
|
|
|
257
257
|
state: 'A',
|
|
258
258
|
couponLocation: 'Promotion',
|
|
259
259
|
pageTotal: false,
|
|
260
|
-
storeId: window.magicDesign.storeId ? window.magicDesign.storeId : ''
|
|
260
|
+
storeId: window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''
|
|
261
261
|
});
|
|
262
262
|
return [4
|
|
263
263
|
/*yield*/
|
|
@@ -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
|
-
|
|
218
|
-
|
|
216
|
+
var _g = (0, _react.useState)(window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''),
|
|
217
|
+
storeId = _g[0],
|
|
218
|
+
setStoreId = _g[1];
|
|
219
219
|
|
|
220
|
-
var _h = (0, _react.useState)(
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
var _h = (0, _react.useState)([]),
|
|
221
|
+
storeList = _h[0],
|
|
222
|
+
setStoreList = _h[1];
|
|
223
223
|
|
|
224
|
-
var _j = (0, _react.useState)(
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
var _j = (0, _react.useState)(''),
|
|
225
|
+
productName = _j[0],
|
|
226
|
+
setProductName = _j[1];
|
|
227
227
|
|
|
228
228
|
var _k = (0, _react.useState)(''),
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
minimum = _k[0],
|
|
230
|
+
setMinimum = _k[1];
|
|
231
231
|
|
|
232
232
|
var _l = (0, _react.useState)(''),
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
maximum = _l[0],
|
|
234
|
+
setMaximum = _l[1];
|
|
235
235
|
|
|
236
|
-
var _m = (0, _react.useState)(
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
var _m = (0, _react.useState)([]),
|
|
237
|
+
dataSource = _m[0],
|
|
238
|
+
setDataSource = _m[1];
|
|
239
239
|
|
|
240
|
-
var _o = (0, _react.useState)(
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
var _o = (0, _react.useState)({}),
|
|
241
|
+
promotions = _o[0],
|
|
242
|
+
setPromotions = _o[1];
|
|
243
243
|
|
|
244
|
-
var _p = (0, _react.useState)(
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
var _p = (0, _react.useState)(false),
|
|
245
|
+
loading = _p[0],
|
|
246
|
+
setLoading = _p[1];
|
|
247
247
|
|
|
248
|
-
var _q = (0, _react.useState)(
|
|
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 =
|
|
258
|
-
setPaginationParams =
|
|
253
|
+
paginationParams = _q[0],
|
|
254
|
+
setPaginationParams = _q[1];
|
|
259
255
|
|
|
260
256
|
var onChange = function onChange(value) {
|
|
261
257
|
settVal(value);
|
|
@@ -281,8 +277,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
|
|
|
281
277
|
settVal([]);
|
|
282
278
|
settBrandId([]);
|
|
283
279
|
settLabelId({});
|
|
284
|
-
setStoreId(window.magicDesign.storeId
|
|
285
|
-
setStoreName('');
|
|
280
|
+
setStoreId(window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : '');
|
|
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: '
|
|
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
|
-
|
|
443
|
-
|
|
444
|
-
return
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
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);
|
|
649
|
+
onDataChange('', res.total);
|
|
674
650
|
}
|
|
675
651
|
});
|
|
676
652
|
},
|
|
@@ -182,23 +182,10 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
|
|
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
185
|
var Option = _antd.Select.Option;
|
|
199
186
|
|
|
200
187
|
var ProductDetailPage = function ProductDetailPage(props) {
|
|
201
|
-
var
|
|
188
|
+
var onChange = props.onChange;
|
|
202
189
|
|
|
203
190
|
var _a = (0, _react.useState)([]),
|
|
204
191
|
productList = _a[0],
|
|
@@ -232,12 +219,25 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
232
219
|
loading = _h[0],
|
|
233
220
|
setLoading = _h[1];
|
|
234
221
|
|
|
235
|
-
var _j = (0, _react.useState)(
|
|
222
|
+
var _j = (0, _react.useState)('sku'),
|
|
223
|
+
proType = _j[0],
|
|
224
|
+
setProType = _j[1];
|
|
225
|
+
|
|
226
|
+
var _k = (0, _react.useState)(false),
|
|
227
|
+
flag = _k[0],
|
|
228
|
+
setFlag = _k[1];
|
|
229
|
+
|
|
230
|
+
var _l = (0, _react.useState)({}),
|
|
231
|
+
selectedPro = _l[0],
|
|
232
|
+
setSelectedPro = _l[1];
|
|
233
|
+
|
|
234
|
+
var _m = (0, _react.useState)({
|
|
236
235
|
pageSize: 20,
|
|
237
|
-
|
|
236
|
+
current: 1,
|
|
237
|
+
total: 0
|
|
238
238
|
}),
|
|
239
|
-
paginationParams =
|
|
240
|
-
setPaginationParams =
|
|
239
|
+
paginationParams = _m[0],
|
|
240
|
+
setPaginationParams = _m[1];
|
|
241
241
|
|
|
242
242
|
var columns = [{
|
|
243
243
|
title: 'Image',
|
|
@@ -266,32 +266,81 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
266
266
|
ellipsis: true
|
|
267
267
|
}];
|
|
268
268
|
var rowSelection = {
|
|
269
|
+
selectedRowKeys: [(selectedPro === null || selectedPro === void 0 ? void 0 : selectedPro.productId) || ''],
|
|
269
270
|
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
270
|
-
|
|
271
|
+
var selected = {
|
|
271
272
|
offerId: selectedRows[0].offerId,
|
|
272
273
|
productId: selectedRows[0].productId,
|
|
273
274
|
name: selectedRows[0].productName
|
|
274
|
-
}
|
|
275
|
+
};
|
|
276
|
+
setSelectedPro(selected);
|
|
275
277
|
},
|
|
276
278
|
type: 'radio'
|
|
277
279
|
};
|
|
278
280
|
|
|
279
|
-
var queryGoods = function queryGoods(
|
|
281
|
+
var queryGoods = function queryGoods() {
|
|
280
282
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
281
|
-
var res;
|
|
283
|
+
var _list, total, params, res_1, res;
|
|
284
|
+
|
|
282
285
|
return __generator(this, function (_a) {
|
|
283
286
|
switch (_a.label) {
|
|
284
287
|
case 0:
|
|
288
|
+
_list = [];
|
|
289
|
+
total = 0;
|
|
290
|
+
params = {
|
|
291
|
+
productName: productName,
|
|
292
|
+
brandIds: brandId.map(function (v) {
|
|
293
|
+
return v.key;
|
|
294
|
+
}).join(',') || '',
|
|
295
|
+
storeId: storeId,
|
|
296
|
+
pageSize: paginationParams.pageSize,
|
|
297
|
+
pageIndex: paginationParams.current
|
|
298
|
+
};
|
|
299
|
+
if (!(proType === 'spu')) return [3
|
|
300
|
+
/*break*/
|
|
301
|
+
, 2];
|
|
285
302
|
return [4
|
|
286
303
|
/*yield*/
|
|
287
|
-
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/
|
|
304
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
|
|
305
|
+
offerCode: productCode,
|
|
306
|
+
isDefaultCover: 'Y',
|
|
307
|
+
onlyQryPublishSku: true,
|
|
308
|
+
auditState: 'S',
|
|
309
|
+
crmFlag: 'on'
|
|
310
|
+
}), 'GET')];
|
|
288
311
|
|
|
289
312
|
case 1:
|
|
313
|
+
res_1 = _a.sent();
|
|
314
|
+
_list = (0, _commonUtil.ensure)(function () {
|
|
315
|
+
return res_1.list.map(function (m) {
|
|
316
|
+
return __assign(__assign({}, m.products[0]), m);
|
|
317
|
+
});
|
|
318
|
+
}, []);
|
|
319
|
+
total = res_1.total;
|
|
320
|
+
return [3
|
|
321
|
+
/*break*/
|
|
322
|
+
, 4];
|
|
323
|
+
|
|
324
|
+
case 2:
|
|
325
|
+
return [4
|
|
326
|
+
/*yield*/
|
|
327
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
|
|
328
|
+
state: 'A',
|
|
329
|
+
productCode: productCode
|
|
330
|
+
}), 'GET')];
|
|
331
|
+
|
|
332
|
+
case 3:
|
|
290
333
|
res = _a.sent();
|
|
334
|
+
_list = res.list || [];
|
|
335
|
+
total = res.total;
|
|
336
|
+
_a.label = 4;
|
|
337
|
+
|
|
338
|
+
case 4:
|
|
339
|
+
setProductList(_list);
|
|
291
340
|
setLoading(false);
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
341
|
+
window.MProductList = _list;
|
|
342
|
+
paginationParams.total = total;
|
|
343
|
+
setPaginationParams(__assign({}, paginationParams));
|
|
295
344
|
return [2
|
|
296
345
|
/*return*/
|
|
297
346
|
];
|
|
@@ -361,18 +410,32 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
361
410
|
};
|
|
362
411
|
|
|
363
412
|
(0, _react.useEffect)(function () {
|
|
364
|
-
setLoading(true);
|
|
365
|
-
|
|
366
|
-
var total = paginationParams.total,
|
|
367
|
-
params = __rest(paginationParams, ["total"]);
|
|
368
|
-
|
|
369
|
-
queryGoods(params);
|
|
370
413
|
queryBrand();
|
|
371
414
|
|
|
372
415
|
if ((0, _businessUtil.isPlatform)()) {
|
|
373
416
|
queryStore();
|
|
374
417
|
}
|
|
375
418
|
}, []);
|
|
419
|
+
(0, _react.useEffect)(function () {
|
|
420
|
+
onChange(selectedPro);
|
|
421
|
+
}, [selectedPro]);
|
|
422
|
+
(0, _react.useEffect)(function () {
|
|
423
|
+
setLoading(true);
|
|
424
|
+
reset();
|
|
425
|
+
setSelectedPro({});
|
|
426
|
+
paginationParams.current = 1;
|
|
427
|
+
setFlag(!flag);
|
|
428
|
+
}, [proType]);
|
|
429
|
+
(0, _react.useEffect)(function () {
|
|
430
|
+
queryGoods();
|
|
431
|
+
}, [flag]);
|
|
432
|
+
var proTypeOption = [{
|
|
433
|
+
label: 'SKU',
|
|
434
|
+
value: 'sku'
|
|
435
|
+
}, {
|
|
436
|
+
label: 'SPU',
|
|
437
|
+
value: 'spu'
|
|
438
|
+
}];
|
|
376
439
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
377
440
|
className: "productDetailPage"
|
|
378
441
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
|
|
@@ -382,6 +445,20 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
382
445
|
layout: "horizontal"
|
|
383
446
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
|
|
384
447
|
gutter: 24
|
|
448
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
449
|
+
offset: 20,
|
|
450
|
+
span: 4
|
|
451
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
|
|
452
|
+
buttonStyle: "solid",
|
|
453
|
+
className: "btn-select-type",
|
|
454
|
+
onChange: function onChange(e) {
|
|
455
|
+
setProType(e.target.value);
|
|
456
|
+
},
|
|
457
|
+
options: proTypeOption,
|
|
458
|
+
optionType: "button",
|
|
459
|
+
value: proType
|
|
460
|
+
}))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
|
|
461
|
+
gutter: 24
|
|
385
462
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
386
463
|
span: 9
|
|
387
464
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
@@ -395,7 +472,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
395
472
|
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
396
473
|
span: 9
|
|
397
474
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
398
|
-
label:
|
|
475
|
+
label: proType === 'spu' ? 'SPU Code' : 'SKU Code'
|
|
399
476
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
400
477
|
onChange: function onChange(e) {
|
|
401
478
|
return setProductCode(e.target.value);
|
|
@@ -444,19 +521,8 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
444
521
|
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
445
522
|
onClick: function onClick() {
|
|
446
523
|
setLoading(true);
|
|
447
|
-
paginationParams.
|
|
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));
|
|
524
|
+
paginationParams.current = 1;
|
|
525
|
+
queryGoods();
|
|
460
526
|
},
|
|
461
527
|
size: "small",
|
|
462
528
|
style: {
|
|
@@ -476,26 +542,15 @@ var ProductDetailPage = function ProductDetailPage(props) {
|
|
|
476
542
|
pagination: __assign(__assign({}, paginationParams), {
|
|
477
543
|
onChange: function onChange(page) {
|
|
478
544
|
setLoading(true);
|
|
479
|
-
paginationParams.
|
|
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));
|
|
545
|
+
paginationParams.current = page;
|
|
546
|
+
queryGoods();
|
|
492
547
|
},
|
|
493
548
|
showSizeChanger: false
|
|
494
549
|
}),
|
|
495
550
|
rowKey: "productId",
|
|
496
551
|
rowSelection: rowSelection,
|
|
497
552
|
scroll: {
|
|
498
|
-
y:
|
|
553
|
+
y: 300
|
|
499
554
|
}
|
|
500
555
|
}));
|
|
501
556
|
};
|