@fonixtree/magic-design 0.0.49 → 0.0.51
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/cylon-antd.less +32526 -32526
- package/es/common/LinkModal/BundleCampaign/index.js +390 -0
- package/es/common/LinkModal/BundleCampaign/index.less +17 -0
- package/es/common/LinkModal/CatgTable/index.js +1 -1
- package/es/common/LinkModal/CouponTable/index.js +2 -2
- package/es/common/LinkModal/CustomTable/index.js +1 -1
- package/es/common/LinkModal/FilteredProductModal/index.js +72 -24
- package/es/common/LinkModal/FunctionTable/index.js +1 -1
- package/es/common/LinkModal/ProductDetailPage/index.js +96 -23
- package/es/common/LinkModal/index.js +7 -1
- package/es/common/LinkModal/index.less +1 -1
- package/es/common/ProductModal/index.js +75 -36
- package/es/common/ProductSource/index.js +3 -1
- package/es/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/es/composite-comp/common/components/ImageLabel/index.less +6 -2
- package/es/composite-comp/common/components/ProductItem/index.less +6 -7
- package/es/composite-comp/dito/components/Recommend/defaultJSON.js +8 -2
- package/es/composite-comp/dito/components/Recommend/index.js +5 -1
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +32 -29
- package/es/composite-comp/dito/components/Recommend/pc/index.js +5 -3
- package/es/composite-comp/dito/components/Recommend/pc/index.less +4 -1
- package/es/composite-comp/dito/config-panels/RecommendConfig/index.js +17 -3
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +27 -15
- package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
- package/es/constants/layout.js +24 -6
- package/es/core/Designer/PageCompList/index.less +10 -10
- package/es/locale/index.js +3 -1
- package/es/meta-comp/components/Image/index.js +6 -3
- package/lib/assets/less/cylon-antd.less +32526 -32526
- package/lib/common/LinkModal/BundleCampaign/index.js +390 -0
- package/lib/common/LinkModal/BundleCampaign/index.less +17 -0
- package/lib/common/LinkModal/CatgTable/index.js +1 -1
- package/lib/common/LinkModal/CouponTable/index.js +2 -2
- package/lib/common/LinkModal/CustomTable/index.js +1 -1
- package/lib/common/LinkModal/FilteredProductModal/index.js +72 -24
- package/lib/common/LinkModal/FunctionTable/index.js +1 -1
- package/lib/common/LinkModal/ProductDetailPage/index.js +96 -23
- package/lib/common/LinkModal/index.js +7 -1
- package/lib/common/LinkModal/index.less +1 -1
- package/lib/common/ProductModal/index.js +75 -36
- package/lib/common/ProductSource/index.js +3 -1
- package/lib/composite-comp/common/components/ImageLabel/index.js +2 -2
- package/lib/composite-comp/common/components/ImageLabel/index.less +6 -2
- package/lib/composite-comp/common/components/ProductItem/index.less +6 -7
- package/lib/composite-comp/dito/components/Recommend/defaultJSON.js +8 -2
- package/lib/composite-comp/dito/components/Recommend/index.js +5 -1
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +32 -29
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +5 -3
- package/lib/composite-comp/dito/components/Recommend/pc/index.less +4 -1
- package/lib/composite-comp/dito/config-panels/RecommendConfig/index.js +17 -3
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +27 -15
- package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.less +14 -1
- package/lib/constants/layout.js +24 -6
- package/lib/core/Designer/PageCompList/index.less +10 -10
- package/lib/locale/index.js +3 -1
- package/lib/meta-comp/components/Image/index.js +6 -3
- package/package.json +1 -1
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _antd = require("antd");
|
|
13
|
+
|
|
14
|
+
var _commonUtil = require("../../../utils/commonUtil");
|
|
15
|
+
|
|
16
|
+
var _dateUtil = require("../../../utils/dateUtil");
|
|
17
|
+
|
|
18
|
+
require("./index.less");
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
25
|
+
function adopt(value) {
|
|
26
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
27
|
+
resolve(value);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
32
|
+
function fulfilled(value) {
|
|
33
|
+
try {
|
|
34
|
+
step(generator.next(value));
|
|
35
|
+
} catch (e) {
|
|
36
|
+
reject(e);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function rejected(value) {
|
|
41
|
+
try {
|
|
42
|
+
step(generator["throw"](value));
|
|
43
|
+
} catch (e) {
|
|
44
|
+
reject(e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function step(result) {
|
|
49
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
57
|
+
var _ = {
|
|
58
|
+
label: 0,
|
|
59
|
+
sent: function sent() {
|
|
60
|
+
if (t[0] & 1) throw t[1];
|
|
61
|
+
return t[1];
|
|
62
|
+
},
|
|
63
|
+
trys: [],
|
|
64
|
+
ops: []
|
|
65
|
+
},
|
|
66
|
+
f,
|
|
67
|
+
y,
|
|
68
|
+
t,
|
|
69
|
+
g;
|
|
70
|
+
return g = {
|
|
71
|
+
next: verb(0),
|
|
72
|
+
"throw": verb(1),
|
|
73
|
+
"return": verb(2)
|
|
74
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
75
|
+
return this;
|
|
76
|
+
}), g;
|
|
77
|
+
|
|
78
|
+
function verb(n) {
|
|
79
|
+
return function (v) {
|
|
80
|
+
return step([n, v]);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function step(op) {
|
|
85
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
86
|
+
|
|
87
|
+
while (_) {
|
|
88
|
+
try {
|
|
89
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
90
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
91
|
+
|
|
92
|
+
switch (op[0]) {
|
|
93
|
+
case 0:
|
|
94
|
+
case 1:
|
|
95
|
+
t = op;
|
|
96
|
+
break;
|
|
97
|
+
|
|
98
|
+
case 4:
|
|
99
|
+
_.label++;
|
|
100
|
+
return {
|
|
101
|
+
value: op[1],
|
|
102
|
+
done: false
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
case 5:
|
|
106
|
+
_.label++;
|
|
107
|
+
y = op[1];
|
|
108
|
+
op = [0];
|
|
109
|
+
continue;
|
|
110
|
+
|
|
111
|
+
case 7:
|
|
112
|
+
op = _.ops.pop();
|
|
113
|
+
|
|
114
|
+
_.trys.pop();
|
|
115
|
+
|
|
116
|
+
continue;
|
|
117
|
+
|
|
118
|
+
default:
|
|
119
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
120
|
+
_ = 0;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
125
|
+
_.label = op[1];
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
130
|
+
_.label = t[1];
|
|
131
|
+
t = op;
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (t && _.label < t[2]) {
|
|
136
|
+
_.label = t[2];
|
|
137
|
+
|
|
138
|
+
_.ops.push(op);
|
|
139
|
+
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (t[2]) _.ops.pop();
|
|
144
|
+
|
|
145
|
+
_.trys.pop();
|
|
146
|
+
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
op = body.call(thisArg, _);
|
|
151
|
+
} catch (e) {
|
|
152
|
+
op = [6, e];
|
|
153
|
+
y = 0;
|
|
154
|
+
} finally {
|
|
155
|
+
f = t = 0;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (op[0] & 5) throw op[1];
|
|
160
|
+
return {
|
|
161
|
+
value: op[0] ? op[1] : void 0,
|
|
162
|
+
done: true
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
var Option = _antd.Select.Option;
|
|
168
|
+
|
|
169
|
+
var BundleCampaign = function BundleCampaign(props) {
|
|
170
|
+
var setUrl = props.setUrl;
|
|
171
|
+
|
|
172
|
+
var _a = (0, _react.useState)([]),
|
|
173
|
+
bundleList = _a[0],
|
|
174
|
+
SetBundleList = _a[1];
|
|
175
|
+
|
|
176
|
+
var _b = (0, _react.useState)(''),
|
|
177
|
+
campaignName = _b[0],
|
|
178
|
+
setCampaignName = _b[1];
|
|
179
|
+
|
|
180
|
+
var _c = (0, _react.useState)(''),
|
|
181
|
+
storeId = _c[0],
|
|
182
|
+
setStoreId = _c[1];
|
|
183
|
+
|
|
184
|
+
var _d = (0, _react.useState)('A,B'),
|
|
185
|
+
cmpState = _d[0],
|
|
186
|
+
setCmpState = _d[1];
|
|
187
|
+
|
|
188
|
+
var _e = (0, _react.useState)(false),
|
|
189
|
+
loading = _e[0],
|
|
190
|
+
setLoading = _e[1];
|
|
191
|
+
|
|
192
|
+
var _f = (0, _react.useState)([]),
|
|
193
|
+
storeList = _f[0],
|
|
194
|
+
setStoreList = _f[1];
|
|
195
|
+
|
|
196
|
+
var stateMap = [{
|
|
197
|
+
key: 'A,B',
|
|
198
|
+
value: 'All'
|
|
199
|
+
}, {
|
|
200
|
+
key: 'A',
|
|
201
|
+
value: 'Has not started'
|
|
202
|
+
}, {
|
|
203
|
+
key: 'B',
|
|
204
|
+
value: 'Processing'
|
|
205
|
+
}];
|
|
206
|
+
var cmpStateMap = {
|
|
207
|
+
A: 'Has not started',
|
|
208
|
+
B: 'Processing'
|
|
209
|
+
};
|
|
210
|
+
var columns = [{
|
|
211
|
+
title: 'Campaign Name',
|
|
212
|
+
dataIndex: 'campaignName'
|
|
213
|
+
}, {
|
|
214
|
+
title: 'Start/End time',
|
|
215
|
+
dataIndex: 'effDate',
|
|
216
|
+
render: function render(text, record) {
|
|
217
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", null, (0, _dateUtil.formatDateTime)(record.effDate)), /*#__PURE__*/_react["default"].createElement("div", null, (0, _dateUtil.formatDateTime)(record.expDate)));
|
|
218
|
+
}
|
|
219
|
+
}, {
|
|
220
|
+
title: 'Campaign State',
|
|
221
|
+
dataIndex: 'cmpState',
|
|
222
|
+
render: function render(text, record) {
|
|
223
|
+
return cmpStateMap[record.cmpState];
|
|
224
|
+
}
|
|
225
|
+
}, {
|
|
226
|
+
title: 'Store Name',
|
|
227
|
+
dataIndex: 'storeName'
|
|
228
|
+
}];
|
|
229
|
+
var rowSelection = {
|
|
230
|
+
onChange: function onChange(selectedRowKeys) {
|
|
231
|
+
setUrl("bundleCampaign-" + selectedRowKeys);
|
|
232
|
+
},
|
|
233
|
+
type: 'radio'
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
var changeCamState = function changeCamState(value) {
|
|
237
|
+
setCmpState(value);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
var reset = function reset() {
|
|
241
|
+
setCampaignName('');
|
|
242
|
+
setStoreId('');
|
|
243
|
+
setCmpState('A,B');
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
var queryBundleList = function queryBundleList(params) {
|
|
247
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
248
|
+
var res;
|
|
249
|
+
return __generator(this, function (_a) {
|
|
250
|
+
switch (_a.label) {
|
|
251
|
+
case 0:
|
|
252
|
+
return [4
|
|
253
|
+
/*yield*/
|
|
254
|
+
, (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/bundle/list", params, 'GET')];
|
|
255
|
+
|
|
256
|
+
case 1:
|
|
257
|
+
res = _a.sent();
|
|
258
|
+
setLoading(false);
|
|
259
|
+
SetBundleList(res.list);
|
|
260
|
+
return [2
|
|
261
|
+
/*return*/
|
|
262
|
+
];
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
var queryFunc = function queryFunc() {
|
|
269
|
+
var params = {
|
|
270
|
+
campaignName: campaignName,
|
|
271
|
+
storeId: storeId,
|
|
272
|
+
cmpState: cmpState
|
|
273
|
+
};
|
|
274
|
+
setLoading(true);
|
|
275
|
+
queryBundleList(params);
|
|
276
|
+
}; // 请求店铺列表
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
var queryStore = function queryStore() {
|
|
280
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
281
|
+
var res;
|
|
282
|
+
return __generator(this, function (_a) {
|
|
283
|
+
switch (_a.label) {
|
|
284
|
+
case 0:
|
|
285
|
+
return [4
|
|
286
|
+
/*yield*/
|
|
287
|
+
, (0, _commonUtil.commonFetch)(window.magicDesign.MBaseUrl + "/stores/list", {}, 'GET')];
|
|
288
|
+
|
|
289
|
+
case 1:
|
|
290
|
+
res = _a.sent();
|
|
291
|
+
setStoreList(res);
|
|
292
|
+
return [2
|
|
293
|
+
/*return*/
|
|
294
|
+
];
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
(0, _react.useEffect)(function () {
|
|
301
|
+
queryStore();
|
|
302
|
+
var params = {
|
|
303
|
+
campaignName: campaignName,
|
|
304
|
+
storeId: storeId,
|
|
305
|
+
cmpState: cmpState
|
|
306
|
+
};
|
|
307
|
+
setLoading(true);
|
|
308
|
+
queryBundleList(params);
|
|
309
|
+
}, []);
|
|
310
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
311
|
+
className: "bundleCampaign"
|
|
312
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
|
|
313
|
+
className: "mb12",
|
|
314
|
+
style: {
|
|
315
|
+
width: '100%'
|
|
316
|
+
}
|
|
317
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
318
|
+
span: 12
|
|
319
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
320
|
+
className: "labelStyle"
|
|
321
|
+
}, "Campaign Name"), /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
322
|
+
className: "inputStyle",
|
|
323
|
+
onChange: function onChange(e) {
|
|
324
|
+
setCampaignName(e.target.value);
|
|
325
|
+
},
|
|
326
|
+
value: campaignName
|
|
327
|
+
})), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
328
|
+
span: 12
|
|
329
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
330
|
+
className: "labelStyle"
|
|
331
|
+
}, "Store"), /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
332
|
+
className: "inputStyle",
|
|
333
|
+
onChange: function onChange(value) {
|
|
334
|
+
return setStoreId(value);
|
|
335
|
+
},
|
|
336
|
+
optionFilterProp: "children",
|
|
337
|
+
placeholder: "Please select",
|
|
338
|
+
showSearch: true,
|
|
339
|
+
value: storeId
|
|
340
|
+
}, storeList && storeList.length > 0 && storeList.map(function (v) {
|
|
341
|
+
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
342
|
+
key: v.storeId,
|
|
343
|
+
value: v.storeId
|
|
344
|
+
}, v.storeName);
|
|
345
|
+
})))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
|
|
346
|
+
className: "mb12",
|
|
347
|
+
style: {
|
|
348
|
+
width: '100%'
|
|
349
|
+
}
|
|
350
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
351
|
+
span: 12
|
|
352
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
353
|
+
className: "labelStyle"
|
|
354
|
+
}, "Campaign State"), /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
355
|
+
className: "inputStyle",
|
|
356
|
+
defaultValue: "A,B",
|
|
357
|
+
onChange: changeCamState,
|
|
358
|
+
value: cmpState
|
|
359
|
+
}, stateMap && stateMap.length > 0 && stateMap.map(function (v) {
|
|
360
|
+
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
361
|
+
key: v.key,
|
|
362
|
+
value: v.key
|
|
363
|
+
}, v.value);
|
|
364
|
+
}))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
|
|
365
|
+
span: 12
|
|
366
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
367
|
+
onClick: queryFunc,
|
|
368
|
+
style: {
|
|
369
|
+
marginRight: 10
|
|
370
|
+
},
|
|
371
|
+
type: "primary"
|
|
372
|
+
}, "Query"), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
373
|
+
onClick: function onClick() {
|
|
374
|
+
reset();
|
|
375
|
+
}
|
|
376
|
+
}, "Cancel"))), /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
377
|
+
bordered: false,
|
|
378
|
+
columns: columns,
|
|
379
|
+
dataSource: bundleList,
|
|
380
|
+
loading: loading,
|
|
381
|
+
rowKey: "campaignId",
|
|
382
|
+
rowSelection: rowSelection,
|
|
383
|
+
scroll: {
|
|
384
|
+
y: 340
|
|
385
|
+
}
|
|
386
|
+
}));
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
var _default = BundleCampaign;
|
|
390
|
+
exports["default"] = _default;
|
|
@@ -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
|
+
}
|
|
@@ -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:
|
|
299
|
+
y: 480
|
|
300
300
|
}
|
|
301
301
|
}));
|
|
302
302
|
}
|
|
@@ -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
|
-
|
|
222
|
-
|
|
220
|
+
var _h = (0, _react.useState)([]),
|
|
221
|
+
storeId = _h[0],
|
|
222
|
+
setStoreId = _h[1];
|
|
223
223
|
|
|
224
|
-
var _j = (0, _react.useState)(
|
|
225
|
-
|
|
226
|
-
|
|
224
|
+
var _j = (0, _react.useState)([]),
|
|
225
|
+
storeList = _j[0],
|
|
226
|
+
setStoreList = _j[1];
|
|
227
227
|
|
|
228
228
|
var _k = (0, _react.useState)(''),
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
productName = _k[0],
|
|
230
|
+
setProductName = _k[1];
|
|
231
231
|
|
|
232
|
-
var _l = (0, _react.useState)(
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
var _l = (0, _react.useState)(''),
|
|
233
|
+
minimum = _l[0],
|
|
234
|
+
setMinimum = _l[1];
|
|
235
235
|
|
|
236
|
-
var _m = (0, _react.useState)(
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
var _m = (0, _react.useState)(''),
|
|
237
|
+
maximum = _m[0],
|
|
238
|
+
setMaximum = _m[1];
|
|
239
239
|
|
|
240
|
-
var _o = (0, _react.useState)(
|
|
241
|
-
|
|
242
|
-
|
|
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 =
|
|
250
|
-
setPaginationParams =
|
|
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:
|
|
686
|
+
y: 400
|
|
639
687
|
}
|
|
640
688
|
})))));
|
|
641
689
|
};
|