@fonixtree/magic-design 2.0.191 → 2.0.193
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/common/SelectStoreModal/SortableImageList/index.js +118 -0
- package/es/common/SelectStoreModal/SortableImageList/index.less +3 -0
- package/es/common/SelectStoreModal/index.js +497 -0
- package/es/common/SelectStoreModal/index.less +152 -0
- package/es/common/StoreSource/index.js +255 -0
- package/es/common/StoreSource/index.less +14 -0
- package/es/common/index.js +8 -0
- package/es/composite-comp/public/components/Stores/defaultJSON.js +2 -1
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultHImg.png +0 -0
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultImg.png +0 -0
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +18 -6
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +15 -1
- package/es/composite-comp/public/components/Stores/mobile/index.js +11 -10
- package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +16 -3
- package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +14 -0
- package/es/locale/ar/ar.json +10 -1
- package/es/locale/en/en.json +10 -1
- package/es/locale/es/es.json +10 -1
- package/es/locale/mn/mn.json +10 -1
- package/es/utils/commonUtil.js +11 -1
- package/lib/common/SelectStoreModal/SortableImageList/index.js +118 -0
- package/lib/common/SelectStoreModal/SortableImageList/index.less +3 -0
- package/lib/common/SelectStoreModal/index.js +497 -0
- package/lib/common/SelectStoreModal/index.less +152 -0
- package/lib/common/StoreSource/index.js +255 -0
- package/lib/common/StoreSource/index.less +14 -0
- package/lib/common/index.js +8 -0
- package/lib/composite-comp/public/components/Stores/defaultJSON.js +2 -1
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultHImg.png +0 -0
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/img/defaultImg.png +0 -0
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +18 -6
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +15 -1
- package/lib/composite-comp/public/components/Stores/mobile/index.js +11 -10
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +16 -3
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +14 -0
- package/lib/locale/ar/ar.json +10 -1
- package/lib/locale/en/en.json +10 -1
- package/lib/locale/es/es.json +10 -1
- package/lib/locale/mn/mn.json +10 -1
- package/lib/utils/commonUtil.js +11 -1
- package/package.json +1 -1
|
@@ -0,0 +1,497 @@
|
|
|
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 _antd = require("antd4");
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
|
|
14
|
+
var _SortableImageList = _interopRequireDefault(require("./SortableImageList"));
|
|
15
|
+
|
|
16
|
+
var _commonUtil = require("../../utils/commonUtil");
|
|
17
|
+
|
|
18
|
+
var _locale = require("../../locale");
|
|
19
|
+
|
|
20
|
+
require("./index.less");
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
29
|
+
__assign = Object.assign || function (t) {
|
|
30
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
31
|
+
s = arguments[i];
|
|
32
|
+
|
|
33
|
+
for (var p in s) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return t;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return __assign.apply(this, arguments);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
45
|
+
function adopt(value) {
|
|
46
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
47
|
+
resolve(value);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
52
|
+
function fulfilled(value) {
|
|
53
|
+
try {
|
|
54
|
+
step(generator.next(value));
|
|
55
|
+
} catch (e) {
|
|
56
|
+
reject(e);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function rejected(value) {
|
|
61
|
+
try {
|
|
62
|
+
step(generator["throw"](value));
|
|
63
|
+
} catch (e) {
|
|
64
|
+
reject(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function step(result) {
|
|
69
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
77
|
+
var _ = {
|
|
78
|
+
label: 0,
|
|
79
|
+
sent: function sent() {
|
|
80
|
+
if (t[0] & 1) throw t[1];
|
|
81
|
+
return t[1];
|
|
82
|
+
},
|
|
83
|
+
trys: [],
|
|
84
|
+
ops: []
|
|
85
|
+
},
|
|
86
|
+
f,
|
|
87
|
+
y,
|
|
88
|
+
t,
|
|
89
|
+
g;
|
|
90
|
+
return g = {
|
|
91
|
+
next: verb(0),
|
|
92
|
+
"throw": verb(1),
|
|
93
|
+
"return": verb(2)
|
|
94
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
95
|
+
return this;
|
|
96
|
+
}), g;
|
|
97
|
+
|
|
98
|
+
function verb(n) {
|
|
99
|
+
return function (v) {
|
|
100
|
+
return step([n, v]);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function step(op) {
|
|
105
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
106
|
+
|
|
107
|
+
while (_) {
|
|
108
|
+
try {
|
|
109
|
+
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;
|
|
110
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
111
|
+
|
|
112
|
+
switch (op[0]) {
|
|
113
|
+
case 0:
|
|
114
|
+
case 1:
|
|
115
|
+
t = op;
|
|
116
|
+
break;
|
|
117
|
+
|
|
118
|
+
case 4:
|
|
119
|
+
_.label++;
|
|
120
|
+
return {
|
|
121
|
+
value: op[1],
|
|
122
|
+
done: false
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
case 5:
|
|
126
|
+
_.label++;
|
|
127
|
+
y = op[1];
|
|
128
|
+
op = [0];
|
|
129
|
+
continue;
|
|
130
|
+
|
|
131
|
+
case 7:
|
|
132
|
+
op = _.ops.pop();
|
|
133
|
+
|
|
134
|
+
_.trys.pop();
|
|
135
|
+
|
|
136
|
+
continue;
|
|
137
|
+
|
|
138
|
+
default:
|
|
139
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
140
|
+
_ = 0;
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
145
|
+
_.label = op[1];
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
150
|
+
_.label = t[1];
|
|
151
|
+
t = op;
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (t && _.label < t[2]) {
|
|
156
|
+
_.label = t[2];
|
|
157
|
+
|
|
158
|
+
_.ops.push(op);
|
|
159
|
+
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (t[2]) _.ops.pop();
|
|
164
|
+
|
|
165
|
+
_.trys.pop();
|
|
166
|
+
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
op = body.call(thisArg, _);
|
|
171
|
+
} catch (e) {
|
|
172
|
+
op = [6, e];
|
|
173
|
+
y = 0;
|
|
174
|
+
} finally {
|
|
175
|
+
f = t = 0;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
if (op[0] & 5) throw op[1];
|
|
180
|
+
return {
|
|
181
|
+
value: op[0] ? op[1] : void 0,
|
|
182
|
+
done: true
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
188
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
|
|
189
|
+
s += arguments[i].length;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++) {
|
|
193
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
|
|
194
|
+
r[k] = a[j];
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return r;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
var Option = _antd.Select.Option;
|
|
202
|
+
|
|
203
|
+
var SelectStoreModal = function SelectStoreModal(props) {
|
|
204
|
+
var handleModalSave = props.handleModalSave,
|
|
205
|
+
closeModal = props.closeModal,
|
|
206
|
+
visible = props.visible,
|
|
207
|
+
_a = props.defaultList,
|
|
208
|
+
defaultList = _a === void 0 ? [] : _a,
|
|
209
|
+
_b = props.maxSelect,
|
|
210
|
+
maxSelect = _b === void 0 ? 20 : _b;
|
|
211
|
+
|
|
212
|
+
var _c = (0, _react.useState)(''),
|
|
213
|
+
storeName = _c[0],
|
|
214
|
+
setStoreName = _c[1];
|
|
215
|
+
|
|
216
|
+
var _d = (0, _react.useState)('All'),
|
|
217
|
+
bizType = _d[0],
|
|
218
|
+
setBizType = _d[1];
|
|
219
|
+
|
|
220
|
+
var _e = (0, _react.useState)('All'),
|
|
221
|
+
storeState = _e[0],
|
|
222
|
+
setStoreState = _e[1];
|
|
223
|
+
|
|
224
|
+
var _f = (0, _react.useState)([]),
|
|
225
|
+
bizTypeList = _f[0],
|
|
226
|
+
setBizTypeList = _f[1];
|
|
227
|
+
|
|
228
|
+
var _g = (0, _react.useState)([]),
|
|
229
|
+
list = _g[0],
|
|
230
|
+
setList = _g[1];
|
|
231
|
+
|
|
232
|
+
var _h = (0, _react.useState)(defaultList),
|
|
233
|
+
selectedList = _h[0],
|
|
234
|
+
setSelectedList = _h[1];
|
|
235
|
+
|
|
236
|
+
var _j = (0, _react.useState)(false),
|
|
237
|
+
loading = _j[0],
|
|
238
|
+
setLoading = _j[1];
|
|
239
|
+
|
|
240
|
+
var _k = (0, _react.useState)({
|
|
241
|
+
pageSize: 20,
|
|
242
|
+
pageIndex: 1,
|
|
243
|
+
total: 0
|
|
244
|
+
}),
|
|
245
|
+
paginationParams = _k[0],
|
|
246
|
+
setPaginationParams = _k[1];
|
|
247
|
+
|
|
248
|
+
var rowSelection = {
|
|
249
|
+
selectedRowKeys: selectedList.map(function (v) {
|
|
250
|
+
return v.storeId;
|
|
251
|
+
}),
|
|
252
|
+
onSelect: function onSelect(record, selected) {
|
|
253
|
+
if (selected) {
|
|
254
|
+
if (selectedList.length === maxSelect) {
|
|
255
|
+
_antd.message.warning("Max " + maxSelect);
|
|
256
|
+
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (selectedList.length < maxSelect) {
|
|
261
|
+
setSelectedList(__spreadArrays(selectedList, [record]));
|
|
262
|
+
}
|
|
263
|
+
} else {
|
|
264
|
+
setSelectedList(selectedList.filter(function (v) {
|
|
265
|
+
return v.storeId !== record.storeId;
|
|
266
|
+
}));
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
270
|
+
return {
|
|
271
|
+
name: record.name
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}; // 业态列表
|
|
275
|
+
|
|
276
|
+
var getBizTypeList = function getBizTypeList() {
|
|
277
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
278
|
+
var res;
|
|
279
|
+
return __generator(this, function (_a) {
|
|
280
|
+
switch (_a.label) {
|
|
281
|
+
case 0:
|
|
282
|
+
return [4
|
|
283
|
+
/*yield*/
|
|
284
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/biztype/list", {}, 'GET')];
|
|
285
|
+
|
|
286
|
+
case 1:
|
|
287
|
+
res = _a.sent();
|
|
288
|
+
setBizTypeList(res || []);
|
|
289
|
+
return [2
|
|
290
|
+
/*return*/
|
|
291
|
+
];
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
}; // 请求店铺列表
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
var getStoreList = function getStoreList() {
|
|
299
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
300
|
+
var params, res;
|
|
301
|
+
return __generator(this, function (_a) {
|
|
302
|
+
switch (_a.label) {
|
|
303
|
+
case 0:
|
|
304
|
+
setLoading(true);
|
|
305
|
+
setList([]);
|
|
306
|
+
params = {
|
|
307
|
+
pageSize: paginationParams.pageSize,
|
|
308
|
+
pageIndex: paginationParams.pageIndex
|
|
309
|
+
};
|
|
310
|
+
if (storeName) params.storeName = storeName;
|
|
311
|
+
if (bizType !== 'All') params.storeBizTypeId = bizType;
|
|
312
|
+
if (storeState !== 'All') params.state = storeState;
|
|
313
|
+
return [4
|
|
314
|
+
/*yield*/
|
|
315
|
+
, (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/stores/page", params, 'GET')];
|
|
316
|
+
|
|
317
|
+
case 1:
|
|
318
|
+
res = _a.sent();
|
|
319
|
+
setLoading(false);
|
|
320
|
+
setList((res === null || res === void 0 ? void 0 : res.list) || []);
|
|
321
|
+
paginationParams.total = res === null || res === void 0 ? void 0 : res.total;
|
|
322
|
+
setPaginationParams(__assign({}, paginationParams));
|
|
323
|
+
return [2
|
|
324
|
+
/*return*/
|
|
325
|
+
];
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
var reset = function reset() {
|
|
332
|
+
setStoreName('');
|
|
333
|
+
setBizType('All');
|
|
334
|
+
setStoreState('All');
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
(0, _react.useEffect)(function () {
|
|
338
|
+
setSelectedList(defaultList);
|
|
339
|
+
}, [visible]);
|
|
340
|
+
(0, _react.useEffect)(function () {
|
|
341
|
+
getBizTypeList();
|
|
342
|
+
getStoreList();
|
|
343
|
+
}, []);
|
|
344
|
+
var columns = [{
|
|
345
|
+
title: (0, _locale.i18n)('STORE_LOGO'),
|
|
346
|
+
dataIndex: 'storeLogoUrl',
|
|
347
|
+
render: function render(storeLogoUrl) {
|
|
348
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
349
|
+
className: "prodImg",
|
|
350
|
+
style: {
|
|
351
|
+
backgroundImage: "url(" + storeLogoUrl + ")"
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
},
|
|
355
|
+
width: 80
|
|
356
|
+
}, {
|
|
357
|
+
title: (0, _locale.i18n)('STORE_NAME'),
|
|
358
|
+
dataIndex: 'storeName',
|
|
359
|
+
width: 120,
|
|
360
|
+
ellipsis: true
|
|
361
|
+
}, {
|
|
362
|
+
title: (0, _locale.i18n)('BUSINESS_TYPE'),
|
|
363
|
+
dataIndex: 'bizTypeName',
|
|
364
|
+
width: 120,
|
|
365
|
+
ellipsis: true
|
|
366
|
+
}, {
|
|
367
|
+
title: (0, _locale.i18n)('STORE_STATE'),
|
|
368
|
+
dataIndex: 'state',
|
|
369
|
+
render: function render(state) {
|
|
370
|
+
return /*#__PURE__*/_react["default"].createElement("span", null, state === 'A' ? (0, _locale.i18n)('OPEN') : (0, _locale.i18n)('CLOSE'));
|
|
371
|
+
},
|
|
372
|
+
width: 100,
|
|
373
|
+
ellipsis: true
|
|
374
|
+
}];
|
|
375
|
+
return /*#__PURE__*/_react["default"].createElement(_antd.Modal, {
|
|
376
|
+
cancelText: (0, _locale.i18n)('CANCEL'),
|
|
377
|
+
draggable: false,
|
|
378
|
+
footer: null,
|
|
379
|
+
okText: "OK",
|
|
380
|
+
onCancel: closeModal,
|
|
381
|
+
onOk: handleModalSave,
|
|
382
|
+
title: (0, _locale.i18n)('STORE_SELECT'),
|
|
383
|
+
visible: visible,
|
|
384
|
+
width: "1200px",
|
|
385
|
+
wrapClassName: "modalCot"
|
|
386
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
387
|
+
className: "storeModalWrap"
|
|
388
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
389
|
+
className: "content"
|
|
390
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
391
|
+
className: "leftCot"
|
|
392
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
|
|
393
|
+
layout: "vertical"
|
|
394
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
395
|
+
label: (0, _locale.i18n)('STORE_NAME')
|
|
396
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
|
|
397
|
+
onChange: function onChange(e) {
|
|
398
|
+
setStoreName(e.target.value);
|
|
399
|
+
},
|
|
400
|
+
placeholder: (0, _locale.i18n)('PLEASE_INPUT'),
|
|
401
|
+
size: "small",
|
|
402
|
+
value: storeName
|
|
403
|
+
})), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
404
|
+
label: (0, _locale.i18n)('BUSINESS_TYPE')
|
|
405
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
406
|
+
onChange: function onChange(value) {
|
|
407
|
+
setBizType(value);
|
|
408
|
+
},
|
|
409
|
+
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
410
|
+
size: "small",
|
|
411
|
+
value: bizType
|
|
412
|
+
}, /*#__PURE__*/_react["default"].createElement(Option, {
|
|
413
|
+
value: "All"
|
|
414
|
+
}, (0, _locale.i18n)('ALL')), bizTypeList.map(function (m) {
|
|
415
|
+
return /*#__PURE__*/_react["default"].createElement(Option, {
|
|
416
|
+
value: m.storeBizTypeId
|
|
417
|
+
}, m.bizTypeName);
|
|
418
|
+
}))), /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
|
|
419
|
+
label: (0, _locale.i18n)('STORE_STATE')
|
|
420
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
421
|
+
onChange: function onChange(value) {
|
|
422
|
+
setStoreState(value);
|
|
423
|
+
},
|
|
424
|
+
placeholder: (0, _locale.i18n)('PLEASE_SELECT'),
|
|
425
|
+
size: "small",
|
|
426
|
+
value: storeState
|
|
427
|
+
}, /*#__PURE__*/_react["default"].createElement(Option, {
|
|
428
|
+
value: "All"
|
|
429
|
+
}, (0, _locale.i18n)('ALL')), /*#__PURE__*/_react["default"].createElement(Option, {
|
|
430
|
+
value: "A"
|
|
431
|
+
}, (0, _locale.i18n)('OPEN')), /*#__PURE__*/_react["default"].createElement(Option, {
|
|
432
|
+
value: "X"
|
|
433
|
+
}, (0, _locale.i18n)('CLOSE')))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
434
|
+
className: "buttonStyle"
|
|
435
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
436
|
+
onClick: function onClick() {
|
|
437
|
+
reset();
|
|
438
|
+
},
|
|
439
|
+
size: "small"
|
|
440
|
+
}, (0, _locale.i18n)('RESET')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
441
|
+
onClick: function onClick() {
|
|
442
|
+
setLoading(true);
|
|
443
|
+
paginationParams.pageIndex = 1;
|
|
444
|
+
getStoreList();
|
|
445
|
+
},
|
|
446
|
+
size: "small",
|
|
447
|
+
style: {
|
|
448
|
+
marginRight: 8
|
|
449
|
+
},
|
|
450
|
+
type: "primary"
|
|
451
|
+
}, (0, _locale.i18n)('QUERY'))))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
452
|
+
className: "rightCot"
|
|
453
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Table, {
|
|
454
|
+
columns: columns,
|
|
455
|
+
dataSource: list,
|
|
456
|
+
loading: loading,
|
|
457
|
+
pagination: __assign(__assign({}, paginationParams), {
|
|
458
|
+
onChange: function onChange(page) {
|
|
459
|
+
setLoading(true);
|
|
460
|
+
paginationParams.pageIndex = page;
|
|
461
|
+
getStoreList();
|
|
462
|
+
}
|
|
463
|
+
}),
|
|
464
|
+
rowKey: "storeId",
|
|
465
|
+
rowSelection: rowSelection,
|
|
466
|
+
scroll: {
|
|
467
|
+
y: 420
|
|
468
|
+
}
|
|
469
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
470
|
+
className: "selectedCot"
|
|
471
|
+
}, /*#__PURE__*/_react["default"].createElement(_SortableImageList["default"], {
|
|
472
|
+
selectedList: selectedList,
|
|
473
|
+
setSelectedList: setSelectedList
|
|
474
|
+
})))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
475
|
+
className: "footer"
|
|
476
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
477
|
+
className: "total"
|
|
478
|
+
}, (0, _locale.i18n)('SELECTED'), ' ', /*#__PURE__*/_react["default"].createElement("span", {
|
|
479
|
+
className: "totalNum"
|
|
480
|
+
}, selectedList.length, "/", maxSelect)), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
481
|
+
onClick: function onClick() {
|
|
482
|
+
handleModalSave(selectedList);
|
|
483
|
+
closeModal();
|
|
484
|
+
},
|
|
485
|
+
style: {
|
|
486
|
+
marginRight: 10
|
|
487
|
+
},
|
|
488
|
+
type: "primary"
|
|
489
|
+
}, (0, _locale.i18n)('OK')), /*#__PURE__*/_react["default"].createElement(_antd.Button, {
|
|
490
|
+
onClick: function onClick() {
|
|
491
|
+
return closeModal && closeModal();
|
|
492
|
+
}
|
|
493
|
+
}, (0, _locale.i18n)('CANCEL'))))));
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
var _default = SelectStoreModal;
|
|
497
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
.modalCot {
|
|
2
|
+
width: 1200px;
|
|
3
|
+
right: unset !important;
|
|
4
|
+
left: unset !important;
|
|
5
|
+
|
|
6
|
+
.storeModalWrap {
|
|
7
|
+
thead .cylon-checkbox {
|
|
8
|
+
visibility: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.content {
|
|
12
|
+
display: flex;
|
|
13
|
+
margin-bottom: 8px;
|
|
14
|
+
|
|
15
|
+
.rightCot {
|
|
16
|
+
width: calc(100% - 260px);
|
|
17
|
+
margin-left: 16px;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
.btn-select-type {
|
|
24
|
+
text-align: right;
|
|
25
|
+
margin-bottom: 15px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.prodImg {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
width: 36px;
|
|
31
|
+
height: 36px;
|
|
32
|
+
background-size: cover;
|
|
33
|
+
background-position: 50% 50%;
|
|
34
|
+
background-repeat: no-repeat;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.selectedCot {
|
|
38
|
+
padding-right: 18px;
|
|
39
|
+
margin-left: 4px;
|
|
40
|
+
height: 78px;
|
|
41
|
+
background: #f8f8f8;
|
|
42
|
+
border: 1px solid #e0e0e0;
|
|
43
|
+
border-radius: 2px;
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: row;
|
|
46
|
+
// flex-wrap: wrap;
|
|
47
|
+
overflow-x: auto;
|
|
48
|
+
|
|
49
|
+
.selectedItem {
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
margin-top: 12px;
|
|
52
|
+
margin-left: 18px;
|
|
53
|
+
height: 52px;
|
|
54
|
+
position: relative;
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
.selectedItemImg {
|
|
58
|
+
width: 52px;
|
|
59
|
+
height: 52px;
|
|
60
|
+
border: 1px solid #4477ee !important;
|
|
61
|
+
box-shadow: 0 0 0 2px rgba(68, 119, 238, 0.15);
|
|
62
|
+
border-radius: 2px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.selectedItemClose {
|
|
66
|
+
display: flex;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.selectedItemClose {
|
|
71
|
+
display: none;
|
|
72
|
+
border: 1px solid #000;
|
|
73
|
+
width: 16px;
|
|
74
|
+
height: 16px;
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
padding: 2px;
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: -9px;
|
|
79
|
+
right: -8px;
|
|
80
|
+
z-index: 400;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// &:nth-child(n + 11) {
|
|
85
|
+
// margin-top: 5px !important;
|
|
86
|
+
// }
|
|
87
|
+
|
|
88
|
+
.selectedItemImg {
|
|
89
|
+
height: 52px;
|
|
90
|
+
width: 52px;
|
|
91
|
+
border: 1px solid #e0e0e0;
|
|
92
|
+
border-radius: 2px;
|
|
93
|
+
|
|
94
|
+
&.invalid {
|
|
95
|
+
border: 1px solid red;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.leftCot {
|
|
103
|
+
width: 260px;
|
|
104
|
+
padding-right: 14px;
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
border-right: 1px solid #e0e0e0;
|
|
107
|
+
|
|
108
|
+
.divider {
|
|
109
|
+
width: 10%;
|
|
110
|
+
display: inline-block;
|
|
111
|
+
text-align: center;
|
|
112
|
+
height: 32px;
|
|
113
|
+
line-height: 32px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.buttonStyle {
|
|
117
|
+
margin-top: 10px;
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: row-reverse;
|
|
120
|
+
align-items: center;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.footer {
|
|
126
|
+
padding-top: 12px;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: space-between;
|
|
130
|
+
border-top: 1px solid #e0e0e0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.total {
|
|
134
|
+
font-size: 16px;
|
|
135
|
+
color: #2d3040;
|
|
136
|
+
letter-spacing: 0;
|
|
137
|
+
|
|
138
|
+
.totalNum {
|
|
139
|
+
color: #4477ee;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.cylon-modal-root {
|
|
146
|
+
display: flex;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
position: absolute;
|
|
149
|
+
left: 0;
|
|
150
|
+
right: 0;
|
|
151
|
+
z-index: 1001;
|
|
152
|
+
}
|