@kmkf-fe-packages/basic-components 0.1.3-alpha.1 → 0.1.3-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/package.json +2 -2
  2. package/dist/apaas/ApaasAddress/index.d.ts +0 -13
  3. package/dist/apaas/ApaasCascader/index.d.ts +0 -2
  4. package/dist/apaas/ApaasCheckbox/index.d.ts +0 -21
  5. package/dist/apaas/ApaasDate/index.d.ts +0 -8
  6. package/dist/apaas/ApaasInput/index.d.ts +0 -7
  7. package/dist/apaas/ApaasInputNumber/index.d.ts +0 -3
  8. package/dist/apaas/ApaasMultipleSelect/index.d.ts +0 -3
  9. package/dist/apaas/ApaasRadio/index.d.ts +0 -21
  10. package/dist/apaas/ApaasRate/index.d.ts +0 -17
  11. package/dist/apaas/ApaasSelect/index.d.ts +0 -12
  12. package/dist/apaas/ApaasSlider/index.d.ts +0 -9
  13. package/dist/apaas/ApaasTextArea/index.d.ts +0 -7
  14. package/dist/apaas/ApaasUpload/index.d.ts +0 -13
  15. package/dist/apaas/ApaasUploadAsync/index.d.ts +0 -16
  16. package/dist/apaas/hoc/withFormItem.d.ts +0 -12
  17. package/dist/basics/FormItem/index.d.ts +0 -2
  18. package/dist/business/Address/index.d.ts +0 -13
  19. package/dist/business/AliPay/index.d.ts +0 -13
  20. package/dist/business/BuyerNick/index.d.ts +0 -14
  21. package/dist/business/ChooseBaby/index.d.ts +0 -3
  22. package/dist/business/ExpressLogistics/index.d.ts +0 -3
  23. package/dist/business/Invoice/index.d.ts +0 -14
  24. package/dist/business/Payment/index.d.ts +0 -14
  25. package/dist/business/Remark/index.d.ts +0 -12
  26. package/dist/business/ShopName/index.d.ts +0 -8
  27. package/dist/business/Status/index.d.ts +0 -16
  28. package/dist/business/Supplier/index.d.ts +0 -3
  29. package/dist/business/TBGoodId/index.d.ts +0 -3
  30. package/dist/business/TBGoodSerial/index.d.ts +0 -3
  31. package/dist/business/TradeId/index.d.ts +0 -10
  32. package/dist/common/ExpressCompany/index.d.ts +0 -7
  33. package/dist/common/Goods/goodModel.d.ts +0 -15
  34. package/dist/common/Goods/index.d.ts +0 -37
  35. package/dist/common/GoodsTable/goodModel.d.ts +0 -13
  36. package/dist/common/GoodsTable/index.d.ts +0 -14
  37. package/dist/common/Logistics/index.d.ts +0 -3
  38. package/dist/common/Sku/index.d.ts +0 -13
  39. package/dist/common/request.d.ts +0 -2
  40. package/dist/config/utils.d.ts +0 -3
  41. package/dist/index.d.ts +0 -31
  42. package/dist/index.esm.js +0 -3588
  43. package/dist/index.js +0 -3628
package/dist/index.esm.js DELETED
@@ -1,3588 +0,0 @@
1
- import React, { useRef, useState, useEffect, useMemo, forwardRef, useImperativeHandle } from 'react';
2
- import { Cascader, DatePicker, Input, InputNumber, Select, Upload, Image, message, Radio, Space, Spin, Checkbox, Row, Col, Slider, Rate, Form, Tabs, Modal, Button, ConfigProvider, Pagination } from 'antd';
3
- import { EyeOutlined, DeleteOutlined } from '@ant-design/icons';
4
- import request, { extend } from 'umi-request';
5
- import zhCN from 'antd/lib/locale/zh_CN';
6
-
7
- function _iterableToArrayLimit(arr, i) {
8
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
9
- if (null != _i) {
10
- var _s,
11
- _e,
12
- _x,
13
- _r,
14
- _arr = [],
15
- _n = !0,
16
- _d = !1;
17
- try {
18
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
19
- if (Object(_i) !== _i) return;
20
- _n = !1;
21
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
22
- } catch (err) {
23
- _d = !0, _e = err;
24
- } finally {
25
- try {
26
- if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
27
- } finally {
28
- if (_d) throw _e;
29
- }
30
- }
31
- return _arr;
32
- }
33
- }
34
- function ownKeys(object, enumerableOnly) {
35
- var keys = Object.keys(object);
36
- if (Object.getOwnPropertySymbols) {
37
- var symbols = Object.getOwnPropertySymbols(object);
38
- enumerableOnly && (symbols = symbols.filter(function (sym) {
39
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
40
- })), keys.push.apply(keys, symbols);
41
- }
42
- return keys;
43
- }
44
- function _objectSpread2(target) {
45
- for (var i = 1; i < arguments.length; i++) {
46
- var source = null != arguments[i] ? arguments[i] : {};
47
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
48
- _defineProperty(target, key, source[key]);
49
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
50
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
51
- });
52
- }
53
- return target;
54
- }
55
- function _regeneratorRuntime() {
56
- _regeneratorRuntime = function () {
57
- return exports;
58
- };
59
- var exports = {},
60
- Op = Object.prototype,
61
- hasOwn = Op.hasOwnProperty,
62
- defineProperty = Object.defineProperty || function (obj, key, desc) {
63
- obj[key] = desc.value;
64
- },
65
- $Symbol = "function" == typeof Symbol ? Symbol : {},
66
- iteratorSymbol = $Symbol.iterator || "@@iterator",
67
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
68
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
69
- function define(obj, key, value) {
70
- return Object.defineProperty(obj, key, {
71
- value: value,
72
- enumerable: !0,
73
- configurable: !0,
74
- writable: !0
75
- }), obj[key];
76
- }
77
- try {
78
- define({}, "");
79
- } catch (err) {
80
- define = function (obj, key, value) {
81
- return obj[key] = value;
82
- };
83
- }
84
- function wrap(innerFn, outerFn, self, tryLocsList) {
85
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
86
- generator = Object.create(protoGenerator.prototype),
87
- context = new Context(tryLocsList || []);
88
- return defineProperty(generator, "_invoke", {
89
- value: makeInvokeMethod(innerFn, self, context)
90
- }), generator;
91
- }
92
- function tryCatch(fn, obj, arg) {
93
- try {
94
- return {
95
- type: "normal",
96
- arg: fn.call(obj, arg)
97
- };
98
- } catch (err) {
99
- return {
100
- type: "throw",
101
- arg: err
102
- };
103
- }
104
- }
105
- exports.wrap = wrap;
106
- var ContinueSentinel = {};
107
- function Generator() {}
108
- function GeneratorFunction() {}
109
- function GeneratorFunctionPrototype() {}
110
- var IteratorPrototype = {};
111
- define(IteratorPrototype, iteratorSymbol, function () {
112
- return this;
113
- });
114
- var getProto = Object.getPrototypeOf,
115
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
116
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
117
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
118
- function defineIteratorMethods(prototype) {
119
- ["next", "throw", "return"].forEach(function (method) {
120
- define(prototype, method, function (arg) {
121
- return this._invoke(method, arg);
122
- });
123
- });
124
- }
125
- function AsyncIterator(generator, PromiseImpl) {
126
- function invoke(method, arg, resolve, reject) {
127
- var record = tryCatch(generator[method], generator, arg);
128
- if ("throw" !== record.type) {
129
- var result = record.arg,
130
- value = result.value;
131
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
132
- invoke("next", value, resolve, reject);
133
- }, function (err) {
134
- invoke("throw", err, resolve, reject);
135
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
136
- result.value = unwrapped, resolve(result);
137
- }, function (error) {
138
- return invoke("throw", error, resolve, reject);
139
- });
140
- }
141
- reject(record.arg);
142
- }
143
- var previousPromise;
144
- defineProperty(this, "_invoke", {
145
- value: function (method, arg) {
146
- function callInvokeWithMethodAndArg() {
147
- return new PromiseImpl(function (resolve, reject) {
148
- invoke(method, arg, resolve, reject);
149
- });
150
- }
151
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
152
- }
153
- });
154
- }
155
- function makeInvokeMethod(innerFn, self, context) {
156
- var state = "suspendedStart";
157
- return function (method, arg) {
158
- if ("executing" === state) throw new Error("Generator is already running");
159
- if ("completed" === state) {
160
- if ("throw" === method) throw arg;
161
- return doneResult();
162
- }
163
- for (context.method = method, context.arg = arg;;) {
164
- var delegate = context.delegate;
165
- if (delegate) {
166
- var delegateResult = maybeInvokeDelegate(delegate, context);
167
- if (delegateResult) {
168
- if (delegateResult === ContinueSentinel) continue;
169
- return delegateResult;
170
- }
171
- }
172
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
173
- if ("suspendedStart" === state) throw state = "completed", context.arg;
174
- context.dispatchException(context.arg);
175
- } else "return" === context.method && context.abrupt("return", context.arg);
176
- state = "executing";
177
- var record = tryCatch(innerFn, self, context);
178
- if ("normal" === record.type) {
179
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
180
- return {
181
- value: record.arg,
182
- done: context.done
183
- };
184
- }
185
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
186
- }
187
- };
188
- }
189
- function maybeInvokeDelegate(delegate, context) {
190
- var methodName = context.method,
191
- method = delegate.iterator[methodName];
192
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
193
- var record = tryCatch(method, delegate.iterator, context.arg);
194
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
195
- var info = record.arg;
196
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
197
- }
198
- function pushTryEntry(locs) {
199
- var entry = {
200
- tryLoc: locs[0]
201
- };
202
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
203
- }
204
- function resetTryEntry(entry) {
205
- var record = entry.completion || {};
206
- record.type = "normal", delete record.arg, entry.completion = record;
207
- }
208
- function Context(tryLocsList) {
209
- this.tryEntries = [{
210
- tryLoc: "root"
211
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
212
- }
213
- function values(iterable) {
214
- if (iterable) {
215
- var iteratorMethod = iterable[iteratorSymbol];
216
- if (iteratorMethod) return iteratorMethod.call(iterable);
217
- if ("function" == typeof iterable.next) return iterable;
218
- if (!isNaN(iterable.length)) {
219
- var i = -1,
220
- next = function next() {
221
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
222
- return next.value = undefined, next.done = !0, next;
223
- };
224
- return next.next = next;
225
- }
226
- }
227
- return {
228
- next: doneResult
229
- };
230
- }
231
- function doneResult() {
232
- return {
233
- value: undefined,
234
- done: !0
235
- };
236
- }
237
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
238
- value: GeneratorFunctionPrototype,
239
- configurable: !0
240
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
241
- value: GeneratorFunction,
242
- configurable: !0
243
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
244
- var ctor = "function" == typeof genFun && genFun.constructor;
245
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
246
- }, exports.mark = function (genFun) {
247
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
248
- }, exports.awrap = function (arg) {
249
- return {
250
- __await: arg
251
- };
252
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
253
- return this;
254
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
255
- void 0 === PromiseImpl && (PromiseImpl = Promise);
256
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
257
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
258
- return result.done ? result.value : iter.next();
259
- });
260
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
261
- return this;
262
- }), define(Gp, "toString", function () {
263
- return "[object Generator]";
264
- }), exports.keys = function (val) {
265
- var object = Object(val),
266
- keys = [];
267
- for (var key in object) keys.push(key);
268
- return keys.reverse(), function next() {
269
- for (; keys.length;) {
270
- var key = keys.pop();
271
- if (key in object) return next.value = key, next.done = !1, next;
272
- }
273
- return next.done = !0, next;
274
- };
275
- }, exports.values = values, Context.prototype = {
276
- constructor: Context,
277
- reset: function (skipTempReset) {
278
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
279
- },
280
- stop: function () {
281
- this.done = !0;
282
- var rootRecord = this.tryEntries[0].completion;
283
- if ("throw" === rootRecord.type) throw rootRecord.arg;
284
- return this.rval;
285
- },
286
- dispatchException: function (exception) {
287
- if (this.done) throw exception;
288
- var context = this;
289
- function handle(loc, caught) {
290
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
291
- }
292
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
293
- var entry = this.tryEntries[i],
294
- record = entry.completion;
295
- if ("root" === entry.tryLoc) return handle("end");
296
- if (entry.tryLoc <= this.prev) {
297
- var hasCatch = hasOwn.call(entry, "catchLoc"),
298
- hasFinally = hasOwn.call(entry, "finallyLoc");
299
- if (hasCatch && hasFinally) {
300
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
301
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
302
- } else if (hasCatch) {
303
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
304
- } else {
305
- if (!hasFinally) throw new Error("try statement without catch or finally");
306
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
307
- }
308
- }
309
- }
310
- },
311
- abrupt: function (type, arg) {
312
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
313
- var entry = this.tryEntries[i];
314
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
315
- var finallyEntry = entry;
316
- break;
317
- }
318
- }
319
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
320
- var record = finallyEntry ? finallyEntry.completion : {};
321
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
322
- },
323
- complete: function (record, afterLoc) {
324
- if ("throw" === record.type) throw record.arg;
325
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
326
- },
327
- finish: function (finallyLoc) {
328
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
329
- var entry = this.tryEntries[i];
330
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
331
- }
332
- },
333
- catch: function (tryLoc) {
334
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
335
- var entry = this.tryEntries[i];
336
- if (entry.tryLoc === tryLoc) {
337
- var record = entry.completion;
338
- if ("throw" === record.type) {
339
- var thrown = record.arg;
340
- resetTryEntry(entry);
341
- }
342
- return thrown;
343
- }
344
- }
345
- throw new Error("illegal catch attempt");
346
- },
347
- delegateYield: function (iterable, resultName, nextLoc) {
348
- return this.delegate = {
349
- iterator: values(iterable),
350
- resultName: resultName,
351
- nextLoc: nextLoc
352
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
353
- }
354
- }, exports;
355
- }
356
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
357
- try {
358
- var info = gen[key](arg);
359
- var value = info.value;
360
- } catch (error) {
361
- reject(error);
362
- return;
363
- }
364
- if (info.done) {
365
- resolve(value);
366
- } else {
367
- Promise.resolve(value).then(_next, _throw);
368
- }
369
- }
370
- function _asyncToGenerator(fn) {
371
- return function () {
372
- var self = this,
373
- args = arguments;
374
- return new Promise(function (resolve, reject) {
375
- var gen = fn.apply(self, args);
376
- function _next(value) {
377
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
378
- }
379
- function _throw(err) {
380
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
381
- }
382
- _next(undefined);
383
- });
384
- };
385
- }
386
- function _defineProperty(obj, key, value) {
387
- key = _toPropertyKey(key);
388
- if (key in obj) {
389
- Object.defineProperty(obj, key, {
390
- value: value,
391
- enumerable: true,
392
- configurable: true,
393
- writable: true
394
- });
395
- } else {
396
- obj[key] = value;
397
- }
398
- return obj;
399
- }
400
- function _objectWithoutPropertiesLoose(source, excluded) {
401
- if (source == null) return {};
402
- var target = {};
403
- var sourceKeys = Object.keys(source);
404
- var key, i;
405
- for (i = 0; i < sourceKeys.length; i++) {
406
- key = sourceKeys[i];
407
- if (excluded.indexOf(key) >= 0) continue;
408
- target[key] = source[key];
409
- }
410
- return target;
411
- }
412
- function _objectWithoutProperties(source, excluded) {
413
- if (source == null) return {};
414
- var target = _objectWithoutPropertiesLoose(source, excluded);
415
- var key, i;
416
- if (Object.getOwnPropertySymbols) {
417
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
418
- for (i = 0; i < sourceSymbolKeys.length; i++) {
419
- key = sourceSymbolKeys[i];
420
- if (excluded.indexOf(key) >= 0) continue;
421
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
422
- target[key] = source[key];
423
- }
424
- }
425
- return target;
426
- }
427
- function _slicedToArray(arr, i) {
428
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
429
- }
430
- function _toConsumableArray(arr) {
431
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
432
- }
433
- function _arrayWithoutHoles(arr) {
434
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
435
- }
436
- function _arrayWithHoles(arr) {
437
- if (Array.isArray(arr)) return arr;
438
- }
439
- function _iterableToArray(iter) {
440
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
441
- }
442
- function _unsupportedIterableToArray(o, minLen) {
443
- if (!o) return;
444
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
445
- var n = Object.prototype.toString.call(o).slice(8, -1);
446
- if (n === "Object" && o.constructor) n = o.constructor.name;
447
- if (n === "Map" || n === "Set") return Array.from(o);
448
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
449
- }
450
- function _arrayLikeToArray(arr, len) {
451
- if (len == null || len > arr.length) len = arr.length;
452
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
453
- return arr2;
454
- }
455
- function _nonIterableSpread() {
456
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
457
- }
458
- function _nonIterableRest() {
459
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
460
- }
461
- function _toPrimitive(input, hint) {
462
- if (typeof input !== "object" || input === null) return input;
463
- var prim = input[Symbol.toPrimitive];
464
- if (prim !== undefined) {
465
- var res = prim.call(input, hint || "default");
466
- if (typeof res !== "object") return res;
467
- throw new TypeError("@@toPrimitive must return a primitive value.");
468
- }
469
- return (hint === "string" ? String : Number)(input);
470
- }
471
- function _toPropertyKey(arg) {
472
- var key = _toPrimitive(arg, "string");
473
- return typeof key === "symbol" ? key : String(key);
474
- }
475
-
476
- function ApaasCascader(props) {
477
- return /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
478
- placeholder: "\u8BF7\u9009\u62E9"
479
- }, props));
480
- }
481
-
482
- var _excluded = ["dateType"];
483
- var componentMap = {
484
- "DATE": DatePicker,
485
- "DATE_TIME": DatePicker,
486
- "DATE_RANGE": DatePicker.RangePicker,
487
- "DATE_TIME_RANGE": DatePicker.RangePicker
488
- };
489
- var ApaasDate = function ApaasDate(props) {
490
- var _props$dateType = props.dateType,
491
- dateType = _props$dateType === void 0 ? 'DATE' : _props$dateType,
492
- otherProps = _objectWithoutProperties(props, _excluded);
493
- var Component = componentMap[dateType];
494
- return /*#__PURE__*/React.createElement(Component, _objectSpread2({
495
- showTime: ['DATE_TIME_RANGE', 'DATE_TIME'].includes(dateType)
496
- }, otherProps));
497
- };
498
-
499
- var _excluded$1 = ["isNumber", "replaceWarn"];
500
- function ApaasInput(props) {
501
- var isNumber = props.isNumber,
502
- replaceWarn = props.replaceWarn,
503
- other = _objectWithoutProperties(props, _excluded$1);
504
- return /*#__PURE__*/React.createElement(Input, _objectSpread2({}, other));
505
- }
506
-
507
- function ApaasInputNumber(props) {
508
- return /*#__PURE__*/React.createElement(InputNumber, _objectSpread2({}, props));
509
- }
510
-
511
- var _excluded$2 = ["options", "basicMultSelect"];
512
- function ApaasSelect(props) {
513
- var _props$options = props.options,
514
- options = _props$options === void 0 ? [] : _props$options,
515
- basicMultSelect = props.basicMultSelect,
516
- otherProps = _objectWithoutProperties(props, _excluded$2);
517
- return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, otherProps), {}, {
518
- style: {
519
- width: '100%'
520
- }
521
- }), options.map(function (item) {
522
- return /*#__PURE__*/React.createElement(Select.Option, {
523
- value: item.value,
524
- key: item.value
525
- }, item.label);
526
- }));
527
- }
528
-
529
- function ApaasMultipleSelect(props) {
530
- return /*#__PURE__*/React.createElement(ApaasSelect, _objectSpread2(_objectSpread2({}, props), {}, {
531
- mode: 'multiple'
532
- }));
533
- }
534
-
535
- var _excluded$3 = ["minRows", "maxRows"];
536
- function ApaasTextArea(props) {
537
- var _props$minRows = props.minRows,
538
- minRows = _props$minRows === void 0 ? 2 : _props$minRows,
539
- _props$maxRows = props.maxRows,
540
- maxRows = _props$maxRows === void 0 ? 5 : _props$maxRows,
541
- otherProps = _objectWithoutProperties(props, _excluded$3);
542
- return /*#__PURE__*/React.createElement(Input.TextArea, _objectSpread2(_objectSpread2({}, otherProps), {}, {
543
- autoSize: {
544
- minRows: minRows,
545
- maxRows: maxRows
546
- }
547
- }));
548
- }
549
-
550
- function styleInject(css, ref) {
551
- if ( ref === void 0 ) ref = {};
552
- var insertAt = ref.insertAt;
553
-
554
- if (!css || typeof document === 'undefined') { return; }
555
-
556
- var head = document.head || document.getElementsByTagName('head')[0];
557
- var style = document.createElement('style');
558
- style.type = 'text/css';
559
-
560
- if (insertAt === 'top') {
561
- if (head.firstChild) {
562
- head.insertBefore(style, head.firstChild);
563
- } else {
564
- head.appendChild(style);
565
- }
566
- } else {
567
- head.appendChild(style);
568
- }
569
-
570
- if (style.styleSheet) {
571
- style.styleSheet.cssText = css;
572
- } else {
573
- style.appendChild(document.createTextNode(css));
574
- }
575
- }
576
-
577
- var css_248z = ".index-module_imageBox__3tOEt {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__3tOEt .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__3tOEt .index-module_inputImage__3ExnT {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__3tOEt .index-module_imageShow__2MZ8c {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__3tOEt .index-module_imageWrap__3Gcy0 {\n width: 80px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin: 0 8px 8px 0;\n}\n.index-module_imageBox__3tOEt .index-module_imageWrap__3Gcy0:hover {\n background: transparent;\n}\n.index-module_imageBox__3tOEt .index-module_imageWrap__3Gcy0:hover .index-module_mask__A9GJN:before {\n opacity: 1;\n}\n.index-module_imageBox__3tOEt .index-module_imageWrap__3Gcy0 img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__3tOEt .index-module_imageWrap__3Gcy0 .index-module_delete__3ent_ {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__3tOEt .index-module_mask__A9GJN {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__3tOEt .index-module_mask__A9GJN::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__3tOEt .index-module_mask__A9GJN:hover .index-module_actions__1cQKz {\n opacity: 1;\n}\n.index-module_imageBox__3tOEt .index-module_mask__A9GJN .index-module_actions__1cQKz {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__3tOEt .index-module_mask__A9GJN .index-module_actions__1cQKz .index-module_icon__1QG8L {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__3tOEt .index-module_imagePaste__9NJaN {\n display: inline-block;\n margin-right: 8px;\n}\n.index-module_imageBox__3tOEt .index-module_imagePaste__9NJaN .index-module_fakeBox__2NVan {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__3tOEt .index-module_imagePaste__9NJaN .index-module_fakeBox__2NVan .index-module_addBtn__2bSOl {\n color: #86909C;\n}\n.index-module_imageBox__3tOEt .index-module_upload__33q6T .ant-upload {\n height: 80px;\n width: 80px;\n border: none;\n background-color: #F2F3F5;\n color: #86909C;\n}\n.index-module_imageBox__3tOEt .index-module_upload__33q6T .ant-upload .index-module_addBtn__2bSOl {\n color: #86909C;\n}\n.index-module_tips__1uXeZ {\n color: #4E5969;\n font-size: 12px;\n}\n";
578
- var styles = {"imageBox":"index-module_imageBox__3tOEt","inputImage":"index-module_inputImage__3ExnT","imageShow":"index-module_imageShow__2MZ8c","imageWrap":"index-module_imageWrap__3Gcy0","-webkit-mask":"index-module_mask__A9GJN","mask":"index-module_mask__A9GJN","delete":"index-module_delete__3ent_","actions":"index-module_actions__1cQKz","icon":"index-module_icon__1QG8L","imagePaste":"index-module_imagePaste__9NJaN","fakeBox":"index-module_fakeBox__2NVan","addBtn":"index-module_addBtn__2bSOl","upload":"index-module_upload__33q6T","tips":"index-module_tips__1uXeZ"};
579
- styleInject(css_248z);
580
-
581
- var _excluded$4 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled"];
582
- var fn = function fn(_ref) {
583
- var _ref2 = _slicedToArray(_ref, 0);
584
- };
585
- var getBase64 = function getBase64(file) {
586
- return new Promise(function (resolve, reject) {
587
- var reader = new FileReader();
588
- reader.readAsDataURL(file);
589
- reader.onload = function () {
590
- return resolve(reader.result);
591
- };
592
- reader.onerror = function (error) {
593
- return reject(error);
594
- };
595
- });
596
- };
597
- var ApaasUpload = function ApaasUpload(_ref3) {
598
- var _ref3$maxCount = _ref3.maxCount,
599
- maxCount = _ref3$maxCount === void 0 ? 10 : _ref3$maxCount,
600
- _ref3$maxSize = _ref3.maxSize,
601
- maxSize = _ref3$maxSize === void 0 ? 10 : _ref3$maxSize,
602
- _ref3$uploadText = _ref3.uploadText,
603
- uploadText = _ref3$uploadText === void 0 ? '上传' : _ref3$uploadText,
604
- _ref3$onChange = _ref3.onChange,
605
- onChange = _ref3$onChange === void 0 ? fn : _ref3$onChange,
606
- _ref3$value = _ref3.value,
607
- value = _ref3$value === void 0 ? [] : _ref3$value,
608
- _ref3$accept = _ref3.accept,
609
- accept = _ref3$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref3$accept,
610
- _ref3$canPreview = _ref3.canPreview,
611
- canPreview = _ref3$canPreview === void 0 ? false : _ref3$canPreview,
612
- _ref3$disabled = _ref3.disabled,
613
- disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
614
- resetProps = _objectWithoutProperties(_ref3, _excluded$4);
615
- var inputRef = useRef(null);
616
- var valueRef = useRef(value);
617
- var _useState = useState(false),
618
- _useState2 = _slicedToArray(_useState, 2),
619
- visible = _useState2[0],
620
- setVisible = _useState2[1];
621
- var _useState3 = useState(''),
622
- _useState4 = _slicedToArray(_useState3, 2),
623
- currentPreviewImg = _useState4[0],
624
- setCurrentPreviewImg = _useState4[1];
625
- var _useState5 = useState(true),
626
- _useState6 = _slicedToArray(_useState5, 2),
627
- pasteDefaultStates = _useState6[0],
628
- setPasteDefaultStates = _useState6[1];
629
- useEffect(function () {
630
- valueRef.current = value;
631
- }, [value]);
632
- var imgReader = function imgReader(item) {
633
- var blob = item.getAsFile(),
634
- reader = new FileReader();
635
- if (blob.size > maxSize * 1024 * 1024) {
636
- message.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
637
- return;
638
- }
639
- if (valueRef.current.length >= maxCount) {
640
- message.error("\u53EA\u80FD\u4E0A\u4F20".concat(maxCount, "\u5F20\u56FE\u7247"));
641
- return;
642
- }
643
- reader.onload = function (e) {
644
- var _e$target;
645
- var result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
646
- handleChange([].concat(_toConsumableArray(valueRef.current), [result]));
647
- };
648
- reader.readAsDataURL(blob);
649
- };
650
- var handleChange = function handleChange(list) {
651
- valueRef.current = list;
652
- onChange(list);
653
- };
654
- var clipboardDataChange = function clipboardDataChange(e) {
655
- var clipboardData = e.clipboardData || window.clipboardData,
656
- i = 0,
657
- items,
658
- item,
659
- types;
660
- if (clipboardData) {
661
- items = clipboardData.items;
662
- if (!items) return;
663
- item = items[0];
664
- types = clipboardData.types || [];
665
- for (; i < types.length; i++) {
666
- if (types[i] === 'Files') {
667
- item = items[i];
668
- break;
669
- }
670
- }
671
- if (item && item.kind === 'file' && item.type.match(/^image\//i)) {
672
- imgReader(item);
673
- }
674
- }
675
- };
676
- // 手动上传模式, 一直返回false
677
- var beforeUpload = function beforeUpload(file) {
678
- var size = file.size / 1024 / 1024 < maxSize;
679
- if (value.length > maxCount) {
680
- message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u5F20\u56FE\u7247\uFF01"));
681
- return Upload.LIST_IGNORE;
682
- }
683
- if (!size) {
684
- message.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
685
- return Upload.LIST_IGNORE;
686
- }
687
- getBase64(file).then(function (res) {
688
- return handleChange([].concat(_toConsumableArray(valueRef.current), [res]));
689
- });
690
- return Upload.LIST_IGNORE;
691
- };
692
- var handleDelete = function handleDelete(key) {
693
- return function () {
694
- if (disabled) return;
695
- handleChange(value.filter(function (_, index) {
696
- return key !== index;
697
- }));
698
- };
699
- };
700
- var handlePreview = function handlePreview(key) {
701
- return function () {
702
- setCurrentPreviewImg(value[key]);
703
- setVisible(true);
704
- };
705
- };
706
- var renderImages = function renderImages(images) {
707
- return images.map(function (image, index) {
708
- return /*#__PURE__*/React.createElement("div", {
709
- className: styles.imageWrap,
710
- key: index
711
- }, /*#__PURE__*/React.createElement("div", {
712
- className: styles.mask
713
- }, /*#__PURE__*/React.createElement("img", {
714
- src: image
715
- }), /*#__PURE__*/React.createElement("div", {
716
- className: styles.actions
717
- }, canPreview && /*#__PURE__*/React.createElement(EyeOutlined, {
718
- style: {
719
- fontSize: '16px',
720
- color: '#FFF',
721
- marginRight: '8px'
722
- },
723
- onClick: handlePreview(index)
724
- }), /*#__PURE__*/React.createElement(DeleteOutlined, {
725
- style: {
726
- fontSize: '16px',
727
- color: '#FFF'
728
- },
729
- onClick: handleDelete(index)
730
- }))));
731
- });
732
- };
733
- useEffect(function () {
734
- var _inputRef$current2;
735
- if (!pasteDefaultStates) {
736
- var _inputRef$current;
737
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
738
- }
739
- (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.addEventListener('paste', function (e) {
740
- return clipboardDataChange(e);
741
- });
742
- return function () {
743
- var _inputRef$current3;
744
- (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.removeEventListener('paste', function (e) {
745
- return clipboardDataChange(e);
746
- });
747
- };
748
- }, [pasteDefaultStates]);
749
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("p", {
750
- className: styles.tips
751
- }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u5F20\u56FE\u7247"), /*#__PURE__*/React.createElement("div", {
752
- className: styles.imageBox
753
- }, !disabled && /*#__PURE__*/React.createElement("div", {
754
- className: styles.imagePaste
755
- }, pasteDefaultStates ? /*#__PURE__*/React.createElement("div", {
756
- className: styles.fakeBox,
757
- onClick: function onClick() {
758
- setPasteDefaultStates(false);
759
- }
760
- }, /*#__PURE__*/React.createElement("span", {
761
- className: styles.addBtn
762
- }, "+"), /*#__PURE__*/React.createElement("p", {
763
- className: styles.text
764
- }, "\u590D\u5236\u7C98\u8D34")) : /*#__PURE__*/React.createElement("input", {
765
- ref: inputRef,
766
- className: styles.inputImage,
767
- type: "text",
768
- placeholder: "\u590D\u5236\u7C98\u8D34",
769
- onBlur: function onBlur() {
770
- setPasteDefaultStates(true);
771
- },
772
- value: ""
773
- })), renderImages(value), /*#__PURE__*/React.createElement(Upload, _objectSpread2({
774
- disabled: disabled,
775
- accept: accept,
776
- name: "file",
777
- listType: "picture-card",
778
- maxCount: maxCount,
779
- className: styles.upload,
780
- beforeUpload: beforeUpload
781
- }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
782
- className: 'addBtn'
783
- }, "+"), /*#__PURE__*/React.createElement("div", null, uploadText))), /*#__PURE__*/React.createElement(Image, {
784
- width: 0,
785
- style: {
786
- display: visible ? '' : 'none'
787
- },
788
- src: currentPreviewImg,
789
- preview: {
790
- visible: visible,
791
- src: currentPreviewImg,
792
- onVisibleChange: function onVisibleChange(value) {
793
- setCurrentPreviewImg('');
794
- setVisible(value);
795
- }
796
- }
797
- })));
798
- };
799
-
800
- var _excluded$5 = ["showOther", "horizontal", "options", "value", "onChange", "disabled"];
801
- function ApaasRadio(props) {
802
- var showOther = props.showOther,
803
- _props$horizontal = props.horizontal,
804
- horizontal = _props$horizontal === void 0 ? true : _props$horizontal,
805
- _props$options = props.options,
806
- options = _props$options === void 0 ? [] : _props$options,
807
- _props$value = props.value,
808
- value = _props$value === void 0 ? {} : _props$value,
809
- onChange = props.onChange,
810
- disabled = props.disabled,
811
- otherProps = _objectWithoutProperties(props, _excluded$5);
812
- var radioValue = value.value,
813
- other = value.other;
814
- var triggerChange = function triggerChange(changedValue) {
815
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), changedValue));
816
- };
817
- var onRadioChange = function onRadioChange(e) {
818
- var radioValue = e.target.value;
819
- triggerChange({
820
- value: radioValue
821
- });
822
- };
823
- var onOtherChange = function onOtherChange(e) {
824
- var other = e.target.value;
825
- triggerChange({
826
- other: other
827
- });
828
- };
829
- return /*#__PURE__*/React.createElement(Radio.Group, _objectSpread2({
830
- value: radioValue,
831
- onChange: onRadioChange
832
- }, otherProps), /*#__PURE__*/React.createElement(Space, {
833
- direction: horizontal ? 'horizontal' : 'vertical',
834
- wrap: true
835
- }, options.map(function (item) {
836
- return /*#__PURE__*/React.createElement(Radio, {
837
- value: item.value,
838
- key: item.label,
839
- disabled: disabled
840
- }, item.label);
841
- }), showOther && /*#__PURE__*/React.createElement(Radio, {
842
- value: "\u5176\u4ED6",
843
- disabled: disabled
844
- }, "\u5176\u4ED6", /*#__PURE__*/React.createElement(Input, {
845
- disabled: disabled,
846
- value: other,
847
- style: {
848
- width: 120,
849
- marginLeft: 10
850
- },
851
- onChange: onOtherChange
852
- }))));
853
- }
854
-
855
- /*
856
- * @Author: wangzhenggui jianjia.wzg@raycloud.com
857
- * @Date: 2022-09-20 14:29:14
858
- * @LastEditors: litian
859
- * @LastEditTime: 2022-09-27 13:49:32
860
- * @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/config/utils.ts
861
- * @Description:
862
- *
863
- * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
864
- */
865
- //组装地址
866
- var toTree = function toTree() {
867
- var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
868
- var parId = arguments.length > 1 ? arguments[1] : undefined;
869
- var len = list === null || list === void 0 ? void 0 : list.length;
870
- function loop(parId) {
871
- var res = [];
872
- for (var i = 0; i < len; i++) {
873
- var item = list[i];
874
- if (item.parentId === Number(parId)) {
875
- item.children = loop(item.id);
876
- res.push(_objectSpread2(_objectSpread2({}, item), {}, {
877
- label: item.name,
878
- value: item.id
879
- }));
880
- }
881
- }
882
- return res;
883
- }
884
- return loop(parId);
885
- };
886
- var keepDecimals = function keepDecimals(value) {
887
- value = value.replace(/[^\d.]/g, ''); //清除"数字"和"."以外的字符
888
- value = value.replace(/^\./g, ''); //验证第一个字符是数字
889
- value = value.replace(/\.{2,}/g, '.'); //只保留第一个, 清除多余的
890
- value = value.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //限制"10.5." 这种情况
891
- value = value.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3'); //只能输入两个小数
892
- return value;
893
- };
894
- function dataURLtoFile(dataurl, filename) {
895
- // 获取到base64编码
896
- var arr = dataurl.split(',');
897
- // 将base64编码转为字符串
898
- var bstr = window.atob(arr[1]);
899
- var n = bstr.length;
900
- var u8arr = new Uint8Array(n); // 创建初始化为0的,包含length个元素的无符号整型数组
901
- while (n--) {
902
- u8arr[n] = bstr.charCodeAt(n);
903
- }
904
- return new File([u8arr], filename, {
905
- type: 'image/jpeg'
906
- });
907
- }
908
-
909
- var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__8zj7A .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__8zj7A .index-module_inputImage__3VrvC {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageShow__3wD4d {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo {\n width: 80px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover {\n background: transparent;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover .index-module_mask__3LUIn:before {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo .index-module_delete__2cFpf {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn:hover .index-module_actions__2tY_V {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V .index-module_icon__ZI-2P {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 {\n display: inline-block;\n margin-right: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload {\n height: 80px;\n width: 80px;\n border: none;\n background-color: #F2F3F5;\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_tips__1ATcr {\n color: #4E5969;\n font-size: 12px;\n}\n";
910
- var styles$1 = {"imageBox":"index-module_imageBox__8zj7A","inputImage":"index-module_inputImage__3VrvC","imageShow":"index-module_imageShow__3wD4d","imageWrap":"index-module_imageWrap__JkMJo","-webkit-mask":"index-module_mask__3LUIn","mask":"index-module_mask__3LUIn","delete":"index-module_delete__2cFpf","actions":"index-module_actions__2tY_V","icon":"index-module_icon__ZI-2P","imagePaste":"index-module_imagePaste__2X-K1","fakeBox":"index-module_fakeBox__2_3rA","addBtn":"index-module_addBtn__2m5lC","upload":"index-module_upload__2igU3","tips":"index-module_tips__1ATcr"};
911
- styleInject(css_248z$1);
912
-
913
- var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "accept", "canPreview", "disabled", "uniqueKey", "hostUrl", "actionUrl"];
914
- var fn$1 = function fn(_ref) {
915
- var _ref2 = _slicedToArray(_ref, 0);
916
- };
917
- var ApaasUploadAsync = function ApaasUploadAsync(_ref3) {
918
- var _ref3$maxCount = _ref3.maxCount,
919
- maxCount = _ref3$maxCount === void 0 ? 10 : _ref3$maxCount,
920
- _ref3$maxSize = _ref3.maxSize,
921
- maxSize = _ref3$maxSize === void 0 ? 10 : _ref3$maxSize,
922
- _ref3$uploadText = _ref3.uploadText,
923
- uploadText = _ref3$uploadText === void 0 ? '上传' : _ref3$uploadText,
924
- _ref3$onChange = _ref3.onChange,
925
- onChange = _ref3$onChange === void 0 ? fn$1 : _ref3$onChange,
926
- _ref3$value = _ref3.value,
927
- value = _ref3$value === void 0 ? [] : _ref3$value,
928
- _ref3$accept = _ref3.accept,
929
- accept = _ref3$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref3$accept,
930
- _ref3$canPreview = _ref3.canPreview,
931
- canPreview = _ref3$canPreview === void 0 ? false : _ref3$canPreview,
932
- _ref3$disabled = _ref3.disabled,
933
- disabled = _ref3$disabled === void 0 ? false : _ref3$disabled,
934
- uniqueKey = _ref3.uniqueKey,
935
- _ref3$hostUrl = _ref3.hostUrl,
936
- hostUrl = _ref3$hostUrl === void 0 ? '' : _ref3$hostUrl,
937
- _ref3$actionUrl = _ref3.actionUrl,
938
- actionUrl = _ref3$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref3$actionUrl,
939
- resetProps = _objectWithoutProperties(_ref3, _excluded$6);
940
- var inputRef = useRef(null);
941
- var valueRef = useRef(value);
942
- var _useState = useState(false),
943
- _useState2 = _slicedToArray(_useState, 2),
944
- uploading = _useState2[0],
945
- setUploading = _useState2[1];
946
- var _useState3 = useState(false),
947
- _useState4 = _slicedToArray(_useState3, 2),
948
- visible = _useState4[0],
949
- setVisible = _useState4[1];
950
- var _useState5 = useState(''),
951
- _useState6 = _slicedToArray(_useState5, 2),
952
- currentPreviewImg = _useState6[0],
953
- setCurrentPreviewImg = _useState6[1];
954
- var _useState7 = useState(true),
955
- _useState8 = _slicedToArray(_useState7, 2),
956
- pasteDefaultStates = _useState8[0],
957
- setPasteDefaultStates = _useState8[1];
958
- useEffect(function () {
959
- valueRef.current = value;
960
- }, [value]);
961
- var asyncUpload = /*#__PURE__*/function () {
962
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
963
- var _valueRef$current;
964
- var formData, fileName, _yield$request, success, data;
965
- return _regeneratorRuntime().wrap(function _callee$(_context) {
966
- while (1) switch (_context.prev = _context.next) {
967
- case 0:
968
- setUploading(true);
969
- formData = new FormData();
970
- formData.append('file', file);
971
- fileName = "".concat(uniqueKey, "_").concat(((_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current.length) + 1, "_").concat(new Date().getTime(), ".jpg");
972
- formData.append('fileName', fileName);
973
- _context.prev = 5;
974
- _context.next = 8;
975
- return request(actionUrl, {
976
- method: 'post',
977
- body: formData
978
- });
979
- case 8:
980
- _yield$request = _context.sent;
981
- success = _yield$request.success;
982
- data = _yield$request.data;
983
- if (success) {
984
- handleChange([].concat(_toConsumableArray(valueRef.current), [data]));
985
- }
986
- _context.next = 17;
987
- break;
988
- case 14:
989
- _context.prev = 14;
990
- _context.t0 = _context["catch"](5);
991
- message.error('图片上传失败');
992
- case 17:
993
- _context.prev = 17;
994
- setUploading(false);
995
- return _context.finish(17);
996
- case 20:
997
- case "end":
998
- return _context.stop();
999
- }
1000
- }, _callee, null, [[5, 14, 17, 20]]);
1001
- }));
1002
- return function asyncUpload(_x) {
1003
- return _ref4.apply(this, arguments);
1004
- };
1005
- }();
1006
- var imgReader = function imgReader(item) {
1007
- var blob = item.getAsFile(),
1008
- reader = new FileReader();
1009
- if (blob.size > maxSize * 1024 * 1024) {
1010
- message.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
1011
- return;
1012
- }
1013
- if (valueRef.current.length >= maxCount) {
1014
- message.error("\u53EA\u80FD\u4E0A\u4F20".concat(maxCount, "\u5F20\u56FE\u7247"));
1015
- return;
1016
- }
1017
- reader.onload = /*#__PURE__*/function () {
1018
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
1019
- var _e$target, _valueRef$current2;
1020
- var result, fileName, file;
1021
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1022
- while (1) switch (_context2.prev = _context2.next) {
1023
- case 0:
1024
- result = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result;
1025
- fileName = "".concat(uniqueKey, "_").concat(((_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.length) + 1, "_").concat(new Date().getTime(), ".jpg");
1026
- file = dataURLtoFile(result, fileName);
1027
- asyncUpload(file);
1028
- case 4:
1029
- case "end":
1030
- return _context2.stop();
1031
- }
1032
- }, _callee2);
1033
- }));
1034
- return function (_x2) {
1035
- return _ref5.apply(this, arguments);
1036
- };
1037
- }();
1038
- reader.readAsDataURL(blob);
1039
- };
1040
- var handleChange = function handleChange(list) {
1041
- valueRef.current = list;
1042
- onChange(list);
1043
- };
1044
- var clipboardDataChange = function clipboardDataChange(e) {
1045
- var clipboardData = e.clipboardData || window.clipboardData,
1046
- i = 0,
1047
- items,
1048
- item,
1049
- types;
1050
- if (clipboardData) {
1051
- items = clipboardData.items;
1052
- if (!items) return;
1053
- item = items[0];
1054
- types = clipboardData.types || [];
1055
- for (; i < types.length; i++) {
1056
- if (types[i] === 'Files') {
1057
- item = items[i];
1058
- break;
1059
- }
1060
- }
1061
- if (item && item.kind === 'file' && item.type.match(/^image\//i)) {
1062
- imgReader(item);
1063
- }
1064
- }
1065
- };
1066
- // 手动上传模式, 一直返回false
1067
- var beforeUpload = function beforeUpload(file) {
1068
- var size = file.size / 1024 / 1024 < maxSize;
1069
- if (value.length > maxCount) {
1070
- message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u5F20\u56FE\u7247\uFF01"));
1071
- return Upload.LIST_IGNORE;
1072
- }
1073
- if (!size) {
1074
- message.error("\u56FE\u7247\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
1075
- return Upload.LIST_IGNORE;
1076
- }
1077
- asyncUpload(file);
1078
- return Upload.LIST_IGNORE;
1079
- };
1080
- var handleDelete = function handleDelete(key) {
1081
- return function () {
1082
- if (disabled) return;
1083
- handleChange(value.filter(function (_, index) {
1084
- return key !== index;
1085
- }));
1086
- };
1087
- };
1088
- var handlePreview = function handlePreview(imgUrl) {
1089
- return function () {
1090
- setCurrentPreviewImg(imgUrl);
1091
- setVisible(true);
1092
- };
1093
- };
1094
- var renderImages = function renderImages(images) {
1095
- return images.map(function (image, index) {
1096
- var finalImage = "".concat(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image, "?x-oss-process=image/resize,h_60,w_60");
1097
- return /*#__PURE__*/React.createElement("div", {
1098
- className: styles$1.imageWrap,
1099
- key: index
1100
- }, /*#__PURE__*/React.createElement("div", {
1101
- className: styles$1.mask
1102
- }, /*#__PURE__*/React.createElement("img", {
1103
- src: finalImage
1104
- }), /*#__PURE__*/React.createElement("div", {
1105
- className: styles$1.actions
1106
- }, canPreview && /*#__PURE__*/React.createElement(EyeOutlined, {
1107
- style: {
1108
- fontSize: '16px',
1109
- color: '#FFF',
1110
- marginRight: '8px'
1111
- },
1112
- onClick: handlePreview(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image)
1113
- }), /*#__PURE__*/React.createElement(DeleteOutlined, {
1114
- style: {
1115
- fontSize: '16px',
1116
- color: '#FFF'
1117
- },
1118
- onClick: handleDelete(index)
1119
- }))));
1120
- });
1121
- };
1122
- useEffect(function () {
1123
- var _inputRef$current2;
1124
- if (!pasteDefaultStates) {
1125
- var _inputRef$current;
1126
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
1127
- }
1128
- (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.addEventListener('paste', function (e) {
1129
- return clipboardDataChange(e);
1130
- });
1131
- return function () {
1132
- var _inputRef$current3;
1133
- (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.removeEventListener('paste', function (e) {
1134
- return clipboardDataChange(e);
1135
- });
1136
- };
1137
- }, [pasteDefaultStates]);
1138
- return /*#__PURE__*/React.createElement(Spin, {
1139
- spinning: uploading
1140
- }, /*#__PURE__*/React.createElement("p", {
1141
- className: styles$1.tips
1142
- }, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u5F20\u56FE\u7247"), /*#__PURE__*/React.createElement("div", {
1143
- className: styles$1.imageBox
1144
- }, !disabled && /*#__PURE__*/React.createElement("div", {
1145
- className: styles$1.imagePaste
1146
- }, pasteDefaultStates ? /*#__PURE__*/React.createElement("div", {
1147
- className: styles$1.fakeBox,
1148
- onClick: function onClick() {
1149
- setPasteDefaultStates(false);
1150
- }
1151
- }, /*#__PURE__*/React.createElement("span", {
1152
- className: styles$1.addBtn
1153
- }, "+"), /*#__PURE__*/React.createElement("p", {
1154
- className: styles$1.text
1155
- }, "\u590D\u5236\u7C98\u8D34")) : /*#__PURE__*/React.createElement("input", {
1156
- ref: inputRef,
1157
- className: styles$1.inputImage,
1158
- type: "text",
1159
- placeholder: "\u590D\u5236\u7C98\u8D34",
1160
- onBlur: function onBlur() {
1161
- setPasteDefaultStates(true);
1162
- },
1163
- value: ""
1164
- })), renderImages(value), /*#__PURE__*/React.createElement(Upload, _objectSpread2({
1165
- disabled: disabled,
1166
- accept: accept,
1167
- name: "file",
1168
- listType: "picture-card",
1169
- maxCount: maxCount,
1170
- className: styles$1.upload,
1171
- beforeUpload: beforeUpload
1172
- }, resetProps), value.length >= maxCount ? null : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
1173
- className: "addBtn"
1174
- }, "+"), /*#__PURE__*/React.createElement("div", null, uploadText))), /*#__PURE__*/React.createElement(Image, {
1175
- width: 0,
1176
- style: {
1177
- display: visible ? '' : 'none'
1178
- },
1179
- src: currentPreviewImg,
1180
- preview: {
1181
- visible: visible,
1182
- src: "".concat(currentPreviewImg),
1183
- onVisibleChange: function onVisibleChange(value) {
1184
- setCurrentPreviewImg('');
1185
- setVisible(value);
1186
- }
1187
- }
1188
- })));
1189
- };
1190
-
1191
- var _excluded$7 = ["showOther", "horizontal", "options", "value", "onChange", "disabled", "checkboxOther"];
1192
- function ApaasCheckbox(props) {
1193
- var showOther = props.showOther,
1194
- _props$horizontal = props.horizontal,
1195
- horizontal = _props$horizontal === void 0 ? true : _props$horizontal,
1196
- _props$options = props.options,
1197
- options = _props$options === void 0 ? [] : _props$options,
1198
- _props$value = props.value,
1199
- value = _props$value === void 0 ? {} : _props$value,
1200
- onChange = props.onChange,
1201
- disabled = props.disabled,
1202
- checkboxOther = props.checkboxOther,
1203
- otherProps = _objectWithoutProperties(props, _excluded$7);
1204
- var checkboxValue = value.value,
1205
- other = value.other;
1206
- var triggerChange = function triggerChange(changedValue) {
1207
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), changedValue));
1208
- };
1209
- var onCheckboxChange = function onCheckboxChange(selectValues) {
1210
- triggerChange({
1211
- value: selectValues
1212
- });
1213
- };
1214
- var onOtherChange = function onOtherChange(e) {
1215
- var other = e.target.value;
1216
- triggerChange({
1217
- other: other
1218
- });
1219
- };
1220
- return /*#__PURE__*/React.createElement(Checkbox.Group, _objectSpread2(_objectSpread2({
1221
- value: checkboxValue
1222
- }, otherProps), {}, {
1223
- onChange: onCheckboxChange
1224
- }), /*#__PURE__*/React.createElement(Space, {
1225
- direction: horizontal ? 'horizontal' : 'vertical',
1226
- wrap: true
1227
- }, options.map(function (item) {
1228
- return /*#__PURE__*/React.createElement(Checkbox, {
1229
- value: item.value,
1230
- key: item.value,
1231
- disabled: disabled
1232
- }, item.label);
1233
- }), showOther && /*#__PURE__*/React.createElement(Checkbox, {
1234
- value: "\u5176\u4ED6",
1235
- disabled: disabled
1236
- }, "\u5176\u4ED6", /*#__PURE__*/React.createElement(Input, {
1237
- value: other,
1238
- style: {
1239
- width: 120,
1240
- marginLeft: 10
1241
- },
1242
- onChange: onOtherChange,
1243
- disabled: disabled
1244
- }))));
1245
- }
1246
-
1247
- function ApaasSlider(props) {
1248
- var value = props.value,
1249
- onChange = props.onChange,
1250
- _props$range = props.range,
1251
- range = _props$range === void 0 ? 100 : _props$range,
1252
- disabled = props.disabled;
1253
- var marks = _defineProperty({
1254
- 0: 0
1255
- }, range, range);
1256
- var limitDecimals = function limitDecimals(value) {
1257
- if (value > range) {
1258
- return range + '';
1259
- } else if (value < 0) {
1260
- return '0';
1261
- }
1262
- return String(value).replace(/[^\d]/g, '');
1263
- };
1264
- return /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
1265
- span: 12
1266
- }, /*#__PURE__*/React.createElement(Slider, {
1267
- disabled: disabled,
1268
- marks: marks,
1269
- min: 0,
1270
- max: range,
1271
- value: value,
1272
- onChange: onChange
1273
- })), /*#__PURE__*/React.createElement(Col, {
1274
- span: 12
1275
- }, /*#__PURE__*/React.createElement(InputNumber, {
1276
- disabled: disabled,
1277
- min: 0,
1278
- max: range,
1279
- formatter: limitDecimals,
1280
- style: {
1281
- margin: '0 16px'
1282
- },
1283
- value: value,
1284
- placeholder: "\u8BF7\u8F93\u5165\u8BC4\u5206",
1285
- onChange: onChange
1286
- })));
1287
- }
1288
-
1289
- var css_248z$2 = ".index-module_rateLabel__3k-Xa {\n margin-right: 8px;\n}\n.index-module_rateText__A1GRy {\n margin-left: 8px;\n}\n";
1290
- var styles$2 = {"rateLabel":"index-module_rateLabel__3k-Xa","rateText":"index-module_rateText__A1GRy"};
1291
- styleInject(css_248z$2);
1292
-
1293
- var _excluded$8 = ["value", "onChange", "options", "textStyle"];
1294
- //状态文字映射
1295
- var RATE_MAP = {
1296
- 0: '',
1297
- 0.5: '非常差',
1298
- 1: '非常差',
1299
- 1.5: '差',
1300
- 2: '差',
1301
- 2.5: '一般',
1302
- 3: '一般',
1303
- 3.5: '好',
1304
- 4: '好',
1305
- 4.5: '非常好',
1306
- 5: '非常好'
1307
- };
1308
- function ApaasRate(props) {
1309
- var _props$value = props.value,
1310
- value = _props$value === void 0 ? [] : _props$value,
1311
- onChange = props.onChange,
1312
- _props$options = props.options,
1313
- options = _props$options === void 0 ? [] : _props$options,
1314
- textStyle = props.textStyle,
1315
- other = _objectWithoutProperties(props, _excluded$8);
1316
- var rateValues = useMemo(function () {
1317
- return (value || []).reduce(function (prv, next) {
1318
- prv[next.id || ''] = next.value;
1319
- return prv;
1320
- }, {});
1321
- }, [value]);
1322
- var changeHandle = function changeHandle(val, id) {
1323
- var newValue = _toConsumableArray(value);
1324
- var hasValue = newValue.some(function (item) {
1325
- return item.id === id;
1326
- });
1327
- if (hasValue) {
1328
- newValue.forEach(function (item) {
1329
- if (item.id === id) {
1330
- item.value = val;
1331
- }
1332
- });
1333
- } else {
1334
- var findValue = options.find(function (item) {
1335
- return item.id === id;
1336
- });
1337
- if (findValue) {
1338
- newValue.push(_objectSpread2(_objectSpread2({}, findValue), {}, {
1339
- value: val
1340
- }));
1341
- }
1342
- }
1343
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
1344
- };
1345
- return /*#__PURE__*/React.createElement("div", null, options.map(function (item) {
1346
- return /*#__PURE__*/React.createElement(Row, {
1347
- key: item.id
1348
- }, /*#__PURE__*/React.createElement(Col, {
1349
- span: 24
1350
- }, /*#__PURE__*/React.createElement("span", {
1351
- className: styles$2.rateLabel
1352
- }, item === null || item === void 0 ? void 0 : item.name), /*#__PURE__*/React.createElement(Rate, _objectSpread2(_objectSpread2({}, other), {}, {
1353
- value: rateValues[item.id] || 0,
1354
- onChange: function onChange(val) {
1355
- return changeHandle(val, item.id);
1356
- }
1357
- })), /*#__PURE__*/React.createElement("span", {
1358
- className: styles$2.rateText,
1359
- style: textStyle
1360
- }, RATE_MAP[rateValues[item.id]])));
1361
- }));
1362
- }
1363
-
1364
- /*
1365
- * @Author: wangzhenggui jianjia.wzg@raycloud.com
1366
- * @Date: 2022-09-13 11:06:09
1367
- * @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
1368
- * @LastEditTime: 2022-11-04 15:55:10
1369
- * @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
1370
- * @Description:
1371
- *
1372
- * Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
1373
- */
1374
- var extendRequest = extend({});
1375
-
1376
- var Province = function Province(props) {
1377
- var _useState = useState([]),
1378
- _useState2 = _slicedToArray(_useState, 2),
1379
- option = _useState2[0],
1380
- setOptions = _useState2[1];
1381
- var isFirst = useRef(false);
1382
- var initPageSource = /*#__PURE__*/function () {
1383
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1384
- var apaasAddress, apaasSaveTime, isExpire, _yield$request, list, arr;
1385
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1386
- while (1) switch (_context.prev = _context.next) {
1387
- case 0:
1388
- apaasAddress = window.localStorage.getItem('apaasAddress');
1389
- apaasSaveTime = window.localStorage.getItem('apaasSaveTime'); //判断是否过期 缓存7天
1390
- isExpire = apaasSaveTime ? Number(apaasSaveTime) + 7 * 3600 * 24 * 1000 < new Date().getTime() : true;
1391
- if (!(apaasAddress && !isExpire)) {
1392
- _context.next = 6;
1393
- break;
1394
- }
1395
- setOptions(JSON.parse(apaasAddress));
1396
- return _context.abrupt("return");
1397
- case 6:
1398
- _context.next = 8;
1399
- return extendRequest('/qy/gdfw/template/queryAreas', {
1400
- method: 'get',
1401
- params: {
1402
- apiName: 'queryAreas'
1403
- }
1404
- });
1405
- case 8:
1406
- _yield$request = _context.sent;
1407
- list = _yield$request.data;
1408
- arr = toTree(list, 0);
1409
- setOptions(arr[0].children);
1410
- window.localStorage.setItem('apaasAddress', JSON.stringify(arr[0].children));
1411
- window.localStorage.setItem('apaasSaveTime', new Date().getTime().toString());
1412
- case 14:
1413
- case "end":
1414
- return _context.stop();
1415
- }
1416
- }, _callee);
1417
- }));
1418
- return function initPageSource() {
1419
- return _ref.apply(this, arguments);
1420
- };
1421
- }();
1422
- useEffect(function () {
1423
- if (!isFirst.current) {
1424
- initPageSource();
1425
- isFirst.current = true;
1426
- }
1427
- }, []);
1428
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
1429
- options: option,
1430
- placeholder: "\u8BF7\u9009\u62E9\u7701\u5E02\u533A"
1431
- })));
1432
- };
1433
-
1434
- var _excluded$9 = ["label", "name", "extra", "required", "rules", "initialValue"];
1435
- function withFormItem(WrappedComponent) {
1436
- return function (props) {
1437
- var label = props.label,
1438
- name = props.name,
1439
- extra = props.extra,
1440
- required = props.required,
1441
- rules = props.rules,
1442
- initialValue = props.initialValue,
1443
- otherProps = _objectWithoutProperties(props, _excluded$9);
1444
- return /*#__PURE__*/React.createElement(Form.Item, _objectSpread2({}, {
1445
- label: label,
1446
- name: name,
1447
- extra: extra,
1448
- required: required,
1449
- rules: rules,
1450
- initialValue: initialValue
1451
- }), /*#__PURE__*/React.createElement(WrappedComponent, _objectSpread2({}, otherProps)));
1452
- };
1453
- }
1454
-
1455
- var BuyerNick = function BuyerNick(props) {
1456
- var _props$value = props.value,
1457
- value = _props$value === void 0 ? {} : _props$value,
1458
- onChange = props.onChange,
1459
- shopId = props.shopId,
1460
- shopList = props.shopList,
1461
- disabled = props.disabled,
1462
- _onBlur = props.onBlur;
1463
- var changeValue = function changeValue(e, type) {
1464
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value)));
1465
- };
1466
- useEffect(function () {
1467
- //淘宝平台和抖音平台需要展示买家id
1468
- var platformList = ['TAOBAO', 'FXG'];
1469
- var showBuyerId = (shopList || []).some(function (item) {
1470
- return item.shopId == shopId && platformList.includes(item.shopSourceStr);
1471
- });
1472
- //如果不是淘宝店铺 旺旺id为空
1473
- if (!showBuyerId) {
1474
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
1475
- buyerOpenUid: ''
1476
- }));
1477
- }
1478
- }, [shopId, shopList]);
1479
- return /*#__PURE__*/React.createElement(Input, {
1480
- disabled: disabled,
1481
- placeholder: "\u8BF7\u8F93\u5165\u4E70\u5BB6\u6635\u79F0",
1482
- value: value === null || value === void 0 ? void 0 : value.buyerNick,
1483
- onChange: function onChange(e) {
1484
- changeValue(e, 'buyerNick');
1485
- },
1486
- onBlur: function onBlur(e) {
1487
- _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, 'buyerNick');
1488
- },
1489
- style: {
1490
- marginRight: '8px'
1491
- }
1492
- });
1493
- };
1494
-
1495
- function TradeId(props) {
1496
- return /*#__PURE__*/React.createElement("div", {
1497
- style: {
1498
- display: 'flex'
1499
- }
1500
- }, /*#__PURE__*/React.createElement(Input, _objectSpread2({}, props)));
1501
- }
1502
-
1503
- var Option = Select.Option;
1504
- var ShopNameSelect = function ShopNameSelect(props) {
1505
- var value = props.value,
1506
- onChange = props.onChange,
1507
- disabled = props.disabled,
1508
- style = props.style;
1509
- var _useState = useState([]),
1510
- _useState2 = _slicedToArray(_useState, 2),
1511
- options = _useState2[0],
1512
- setOptions = _useState2[1];
1513
- var handleChange = function handleChange(value) {
1514
- onChange === null || onChange === void 0 ? void 0 : onChange(value);
1515
- };
1516
- useEffect(function () {
1517
- // initDataSource();
1518
- }, []);
1519
- return /*#__PURE__*/React.createElement(Select, {
1520
- defaultValue: value,
1521
- disabled: disabled,
1522
- onChange: handleChange,
1523
- style: _objectSpread2(_objectSpread2({}, style), {}, {
1524
- width: '100%'
1525
- }),
1526
- showSearch: true,
1527
- placeholder: "\u8BF7\u9009\u62E9\u5E97\u94FA\u540D\u79F0",
1528
- filterOption: function filterOption(input, option) {
1529
- return option['children'].toLowerCase().indexOf(input.toLowerCase()) >= 0;
1530
- }
1531
- }, options.map(function (option) {
1532
- return /*#__PURE__*/React.createElement(Option, {
1533
- value: option.value,
1534
- key: option.value
1535
- }, option.label);
1536
- }));
1537
- };
1538
-
1539
- function ApaasAddress(props) {
1540
- var value = props.value,
1541
- onChange = props.onChange,
1542
- disabled = props.disabled;
1543
- var changeCity = function changeCity(city, selectedOptions) {
1544
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
1545
- address: city
1546
- }));
1547
- };
1548
- var changeDetail = function changeDetail(e) {
1549
- onChange === null || onChange === void 0 ? void 0 : onChange({
1550
- address: value === null || value === void 0 ? void 0 : value.address,
1551
- detail: e.target.value
1552
- });
1553
- };
1554
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Province, {
1555
- value: value === null || value === void 0 ? void 0 : value.address,
1556
- onChange: changeCity,
1557
- options: [],
1558
- disabled: disabled
1559
- }), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
1560
- disabled: disabled,
1561
- value: value === null || value === void 0 ? void 0 : value.detail,
1562
- placeholder: "\u8BE6\u7EC6\u5730\u5740",
1563
- onChange: changeDetail
1564
- }));
1565
- }
1566
-
1567
- var trade0 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1MEQ1MkIyMjIzQUIxMUU0QjU5NjkwNDQxQkU4N0E1MiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1MEQ1MkIyMzIzQUIxMUU0QjU5NjkwNDQxQkU4N0E1MiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjUwRDUyQjIwMjNBQjExRTRCNTk2OTA0NDFCRTg3QTUyIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjUwRDUyQjIxMjNBQjExRTRCNTk2OTA0NDFCRTg3QTUyIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+PFEh+QAAAPhJREFUeNqM0MFKAkEcx/FZNcwSihBBT3oRog4RBHnqoiA+SuAL7J73Fbz7Ah5DOiw5QcdOQUhECoL1BBpC0/eP/0URUf/wYWaH+c3Ofzzf97+NMR1kcY85BuiqLxSRD8PQppgk0MC7WdQBLpWPsWzGC+qy+QEVfMBpKB7lwBKOcBUEwZkEnnCoJ/+YZbkVUjncSOBZF8sr11qvOHQngRHecK3NSnkbSDWT1tq/KIrOtfFIr9aGxRRpnGhgmNLJI1qYyW95vt/4LjR6yiAHZvDqOedkscDHpzwdm2tmS0kPhk0TSeOWcG5nQKuHY1T3DfR1vNgW+BdgACxMP/P+iLA3AAAAAElFTkSuQmCC";
1568
-
1569
- var trade1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFQ0NGNkNCNjIzQUExMUU0OTZDM0UxQUI1MEVCOUU2RSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFQ0NGNkNCNzIzQUExMUU0OTZDM0UxQUI1MEVCOUU2RSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkVDQ0Y2Q0I0MjNBQTExRTQ5NkMzRTFBQjUwRUI5RTZFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkVDQ0Y2Q0I1MjNBQTExRTQ5NkMzRTFBQjUwRUI5RTZFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+WQ64bQAAAPVJREFUeNqM0M9KQkEUx/GZwUDNhYQItjKCQNyEEOSqVZtewHcQfIE2Posv0FIiWvQHLDeuBBEXUgTX3LmxRHH6njgXrnC5eODDzFzmNzPn2jdrZ8aYDnJoYo0x7tQUxyhebrcvlsCcRYARGma3NviSzegRuHZMujjDBF43hmMKZWRx/u7ckQSekMYBviOn+wipAi4k8KofT/RZcRWGriTwgSFq2qyUjSF142hko886xQJ93KKt/X1GbvpJ6eQBLfzKtRyyCnfQaJ6hggwGxntv+LUlLPEo6yTSg+HE4D/NlBMLJqFcZH6PQ9T3DTzrWE0K/AkwAPKxWrUjgeKsAAAAAElFTkSuQmCC";
1570
-
1571
- var trade2 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowMkExMTUwNTIzQUIxMUU0OEE2MEE5M0YxQjVBOTRDMyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowMkExMTUwNjIzQUIxMUU0OEE2MEE5M0YxQjVBOTRDMyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjAyQTExNTAzMjNBQjExRTQ4QTYwQTkzRjFCNUE5NEMzIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjAyQTExNTA0MjNBQjExRTQ4QTYwQTkzRjFCNUE5NEMzIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+VBLygAAAAPZJREFUeNqM0M9KQkEUx/EzF4OsFiEi1KoQgsiFCEGt3BRIjxL0Ai263EfpBVpGtOoPCG5aBRERoQjaspVFwul7rse8hJgHPjNzh/nNnxv0TPoico4VHOMbz7hwb1hHSRK9yzGI0MCTjGoBFXeKbrpYpIlDW3yJLbxAPTTubcMNLKEqcShY4AaLvvO7TEozrIrYtcC9T25mrvW3xqG6Bdp4RM0faxWmsDqKePnQr1XGB1r+2Njf18mcNMj54Bon+LRj2eTrd0kcVmm3kcdDUFWbXOPjNf11iR7IjIrSNtGepbFHuPh/YFRXWMb+vIFb73dmBX4EGADWsDqrOlvMIgAAAABJRU5ErkJggg==";
1572
-
1573
- var trade3 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxNzZEMTM5MDIzQUIxMUU0QTYwNkU0NjgyODRCQkFFQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxNzZEMTM5MTIzQUIxMUU0QTYwNkU0NjgyODRCQkFFQiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjE3NkQxMzhFMjNBQjExRTRBNjA2RTQ2ODI4NEJCQUVCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjE3NkQxMzhGMjNBQjExRTRBNjA2RTQ2ODI4NEJCQUVCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+RDIqWgAAAPhJREFUeNpi1JvJ+4KBgWEhEPMAcRYQ/wbim0C8DorvA7EUEItdTPt0iAXIYAJiDyC+zgABrECsA8VVQPwEpBiIjwGxK0jxNiBWA+LbQPwfqglGgwxUAGIuIDbQn8UnBNJwAIg5oCa/ZECA/0gYBESA2BSk4TBUUBHJWegApskepOEhEF8BYiOoZ0GAEQsGAS8moM//QJ2lDMQfgfgk1LP1UP89QrLpOwuUsQuIc4H4B8haoCE/YSqAHhUAUppAzAnE5xj///8PEpQEcu6Cgg6o2IUBDwD5gQGo6DlINxBbADWLENQABTuAmBuILYnVcBBKa+PTABBgAC90PqvqQj28AAAAAElFTkSuQmCC";
1574
-
1575
- var trade4 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyRDAzQ0FGRTIzQUIxMUU0OEYzRkI0MzQxOTNCNjg5QiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyRDAzQ0FGRjIzQUIxMUU0OEYzRkI0MzQxOTNCNjg5QiI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjJEMDNDQUZDMjNBQjExRTQ4RjNGQjQzNDE5M0I2ODlCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjJEMDNDQUZEMjNBQjExRTQ4RjNGQjQzNDE5M0I2ODlCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+z54Y5QAAAPhJREFUeNpi5Op4+IKBgWEhEPMAcRYQ/wbim0C8DorvA7EUEIt9LZc7xAJkMAGxBxBfZ4AAViDWgeIqIH4CUgzEx4DYFaR4GxCrAfFtIP4P1QSjQQYqADEXEBtwdz4SAmk4AMQcUJNfMiDAfyQMAiJAbArScBgqqIjkLHQA02QP0vAQiK8AsRHUsyDAiAWDgBcT0Od/oM5SBuKPQHwS6tl6qP8eIdn0nQXK2AXEuUD8A2Qt0JCfMBVAjwoAKU0g5gTic4z///8HCUoCOXdBQQdU7MKAB4D8wABU9BykG4gtgJpFCGqAgh0gFwCxJbEaDkJpbXwaAAIMAKG8PqsrBnEUAAAAAElFTkSuQmCC";
1576
-
1577
- var trade5 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0MUVBOUVCQjIzQUIxMUU0QUZCMkFCQ0QzMzVDM0ZDMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0MUVBOUVCQzIzQUIxMUU0QUZCMkFCQ0QzMzVDM0ZDMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjQxRUE5RUI5MjNBQjExRTRBRkIyQUJDRDMzNUMzRkMwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjQxRUE5RUJBMjNBQjExRTRBRkIyQUJDRDMzNUMzRkMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+xU6hIgAAAPdJREFUeNqM0M9KAlEUx/E7MoF/WoiIoCslCyIXIgS5alMgvoJvIPgCbXwWobYuJVqVgeCmVSAyxGgE1dJVicH1e/AMDSLqgQ935nJ+d+4Z57bofxljOjhEEwuM0VU+csg0vHzf5SGCGkZmVQcoqRt8SDMGuJbmHk7gwWooWOXAPOIo3x1PUhJ4RFRP/jb/ZUOk0jiXwLNuFkLXWq8gdCmBKV5R0WGlnA2k6hEm/9NrHWGGoQ7b1vneQ1/6cfXhAS38ymc5ZB50MGiS5RQxvDjWWtnM8vImv47mK7OlZAZD06ekcUE4vTOgdY8EqvsGnnQ92xZYCjAAxxw+q99X1uIAAAAASUVORK5CYII=";
1578
-
1579
- var TextArea = Input.TextArea;
1580
- var imgList = [trade0, trade1, trade2, trade3, trade4, trade5];
1581
- var RemarkInput = function RemarkInput(props) {
1582
- var isShowFlag = props.isShowFlag,
1583
- value = props.value,
1584
- onChange = props.onChange,
1585
- disabled = props.disabled;
1586
- var changeUrl = function changeUrl(e) {
1587
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
1588
- flag: e.target.value
1589
- });
1590
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
1591
- };
1592
- var changeRemark = function changeRemark(e) {
1593
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
1594
- remark: e.target.value
1595
- });
1596
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
1597
- };
1598
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextArea, {
1599
- disabled: disabled,
1600
- rows: 4,
1601
- value: value === null || value === void 0 ? void 0 : value.remark,
1602
- placeholder: "\u8BF7\u8F93\u5165\u5907\u6CE8",
1603
- key: "remark",
1604
- onChange: changeRemark
1605
- }), isShowFlag && /*#__PURE__*/React.createElement(Radio.Group, {
1606
- style: {
1607
- marginTop: '12px'
1608
- },
1609
- value: value === null || value === void 0 ? void 0 : value.flag,
1610
- onChange: changeUrl
1611
- }, imgList.map(function (item, index) {
1612
- return /*#__PURE__*/React.createElement(Radio, {
1613
- value: index,
1614
- key: item,
1615
- disabled: disabled
1616
- }, /*#__PURE__*/React.createElement("img", {
1617
- src: item
1618
- }));
1619
- })));
1620
- };
1621
-
1622
- var css_248z$3 = ".mb8 {\n margin-bottom: 8px;\n}\n";
1623
- styleInject(css_248z$3);
1624
-
1625
- var Logistics = function Logistics(props) {
1626
- var options = props.options,
1627
- isSingle = props.isSingle,
1628
- showField = props.showField,
1629
- _props$value = props.value,
1630
- value = _props$value === void 0 ? {} : _props$value,
1631
- disabled = props.disabled,
1632
- onChange = props.onChange,
1633
- _onBlur = props.onBlur;
1634
- var handleInputChange = function handleInputChange(e) {
1635
- var val = e.target.value;
1636
- typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, {
1637
- order: val
1638
- }));
1639
- };
1640
- var handelSelectChange = function handelSelectChange(val) {
1641
- typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, {
1642
- company: val
1643
- }));
1644
- };
1645
- //物流公司
1646
- var LogisticsCompany = function LogisticsCompany() {
1647
- return /*#__PURE__*/React.createElement(Select, {
1648
- disabled: disabled,
1649
- placeholder: "\u7269\u6D41\u516C\u53F8",
1650
- onChange: handelSelectChange,
1651
- value: (value === null || value === void 0 ? void 0 : value.company) === '' ? undefined : value === null || value === void 0 ? void 0 : value.company,
1652
- options: options,
1653
- showSearch: true,
1654
- style: {
1655
- width: '100%'
1656
- },
1657
- filterOption: function filterOption(input, option) {
1658
- return option.label.includes(input);
1659
- }
1660
- });
1661
- };
1662
- //物流单号
1663
- var LogisticsCode = function LogisticsCode() {
1664
- return /*#__PURE__*/React.createElement(Input, {
1665
- disabled: disabled,
1666
- placeholder: "\u7269\u6D41\u5355\u53F7",
1667
- className: css_248z$3.logisticsInput,
1668
- onChange: handleInputChange,
1669
- value: value === null || value === void 0 ? void 0 : value.order,
1670
- onBlur: function onBlur(e) {
1671
- _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, 'expressLogisticsCode');
1672
- }
1673
- });
1674
- };
1675
- return /*#__PURE__*/React.createElement("div", {
1676
- className: css_248z$3.logistics
1677
- }, isSingle ? showField === 'EXPRESS_COMPANY' ? LogisticsCompany() : null : LogisticsCompany(), isSingle ? showField === 'EXPRESS_WAYBILL_CODE' ? LogisticsCode() : null : LogisticsCode());
1678
- };
1679
-
1680
- var ExpressLogistics = function ExpressLogistics(props) {
1681
- return /*#__PURE__*/React.createElement(Logistics, _objectSpread2({}, props));
1682
- };
1683
-
1684
- var AliPay = function AliPay(props) {
1685
- var value = props.value,
1686
- onChange = props.onChange,
1687
- isSingle = props.isSingle,
1688
- disabled = props.disabled,
1689
- _onBlur = props.onBlur;
1690
- var changeValue = function changeValue(e, type) {
1691
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value)));
1692
- };
1693
- useEffect(function () {}, []);
1694
- return /*#__PURE__*/React.createElement("div", null, !isSingle ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
1695
- disabled: disabled,
1696
- placeholder: "\u8BF7\u8F93\u5165\u652F\u4ED8\u5B9D\u540D\u79F0",
1697
- value: value === null || value === void 0 ? void 0 : value.name,
1698
- onChange: function onChange(e) {
1699
- changeValue(e, 'name');
1700
- },
1701
- style: {
1702
- marginRight: '8px'
1703
- }
1704
- })) : null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
1705
- placeholder: "\u8BF7\u8F93\u5165\u652F\u4ED8\u5B9D\u8D26\u53F7",
1706
- value: value === null || value === void 0 ? void 0 : value.user,
1707
- onChange: function onChange(e) {
1708
- changeValue(e, 'user');
1709
- },
1710
- onBlur: function onBlur(e) {
1711
- _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, 'alipayAccount');
1712
- },
1713
- disabled: disabled,
1714
- style: {
1715
- marginRight: '8px'
1716
- }
1717
- })));
1718
- };
1719
-
1720
- var css_248z$4 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.goodsBox .right-context {\n font-size: 12px;\n}\n.goodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.goodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.goodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.goods-imgBox .add-btn {\n color: #86909c;\n}\n.goods-imgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
1721
- styleInject(css_248z$4);
1722
-
1723
- var defaultImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAOKADAAQAAAABAAAAOAAAAAANV2hTAAACcklEQVRoBe1aa3OqMBBdlFatfVivnV7H29f//0md6XSc1hegKCCigE2c0YKtri7Rm3ayX0zCbjhnzyZEVBs53hx+seV+MbcFNUXwpyusFFQKSp4BVaKSC4TCUwqiKZLcQSkouUAoPKUgmiLJHZSCkguEwtNRjw0O8/kcTMuGWRhu8BAzfKLrUPtTAU3TSBOSCXqeD2bfJt1036BSqQjn5dK+YQt/8hoMo4h0Q0pQmKFKyAomgdZva1C5ukgOZW7bQwfaXTPzPEIIZkXBXnyBN/aBr7fq9SXkcuTC+gLlvxPkG5VhDVbAHHcMj/f1VT9rQ1yqiEj69jAVOQkC8CdBaixL5ygEB/YIhiM3C05y7EFLNGI7battgMvWF7d8Pv9lu69WrlIlWiwUoFQswHQ6I5NKBh6MIC+z93YPZrPPg0Cr04Onh8ZiM1mC4A/x09OT1CZDfagv50x+HoTgwHag2zNh/TeBKIoZaQMe/v1NnUzO2IP88qKcxCWsLXQNxnEMrY4BnW/ILRH7/mRVkvy4x/2fX5osxgLeF23CFAzYmnlv9SCYTlGMVn8IMVOTx4wZYW58IwrDCBr1m5S66GSIgxCCLjuXdg0L4nh3BQbspLJujutB8y2Cu8bt+iVyX0iJcmD7kNuGliv62mwD34FFmBAFRQBJzsHL3DDxUk/GbGoLUXDT5FnGdy/27XeRluB22LtfVQR3z5WcnmQFdXauPJbp7Hsi1ciRZfaOpFatHOWlU/msSOUHmvobCTl3cgSS16Ac8HEUiiCeI7k9lIJy64OjUwriOZLbQykotz44OqUgniO5PZSCcuuDo1MK4jmS2+MD4RXMNiaoge4AAAAASUVORK5CYII=";
1724
-
1725
- var TabPane = Tabs.TabPane;
1726
- var Option$1 = Select.Option;
1727
- var Search = Input.Search;
1728
- var GoodsModal = function GoodsModal(props) {
1729
- var onSubmit = props.onSubmit,
1730
- _onCancel = props.onCancel,
1731
- visible = props.visible,
1732
- type = props.type,
1733
- shopId = props.shopId,
1734
- imgList = props.imgList,
1735
- maxLength = props.maxLength,
1736
- shopList = props.shopList,
1737
- changeSku = props.changeSku,
1738
- width = props.width;
1739
- var _useState = useState([]),
1740
- _useState2 = _slicedToArray(_useState, 2),
1741
- selectList = _useState2[0],
1742
- setSelect = _useState2[1];
1743
- var _useState3 = useState([]),
1744
- _useState4 = _slicedToArray(_useState3, 2),
1745
- selectIds = _useState4[0],
1746
- setSelectIds = _useState4[1];
1747
- var _useState5 = useState([]),
1748
- _useState6 = _slicedToArray(_useState5, 2),
1749
- goodList = _useState6[0],
1750
- setGoodList = _useState6[1];
1751
- var _useState7 = useState(false),
1752
- _useState8 = _slicedToArray(_useState7, 2),
1753
- loading = _useState8[0],
1754
- setLoading = _useState8[1];
1755
- var _useState9 = useState({
1756
- apiName: 'queryItems',
1757
- desc: true,
1758
- numIids: '',
1759
- orderBy: 'list_time',
1760
- pageNo: 1,
1761
- pageSize: 10,
1762
- shopId: shopId,
1763
- type: 'onSale',
1764
- cids: '',
1765
- title: ""
1766
- }),
1767
- _useState10 = _slicedToArray(_useState9, 2),
1768
- searchParams = _useState10[0],
1769
- setSearch = _useState10[1];
1770
- var _useState11 = useState(0),
1771
- _useState12 = _slicedToArray(_useState11, 2),
1772
- total = _useState12[0],
1773
- setTotal = _useState12[1];
1774
- var _useState13 = useState(''),
1775
- _useState14 = _slicedToArray(_useState13, 2),
1776
- platform = _useState14[0],
1777
- setPlatform = _useState14[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
1778
- var _useState15 = useState({}),
1779
- _useState16 = _slicedToArray(_useState15, 2),
1780
- shopInfo = _useState16[0],
1781
- setShopInfo = _useState16[1]; //店铺信息
1782
- var _useState17 = useState(true),
1783
- _useState18 = _slicedToArray(_useState17, 2),
1784
- canSearch = _useState18[0],
1785
- setCanSearch = _useState18[1];
1786
- var _useState19 = useState([null]),
1787
- _useState20 = _slicedToArray(_useState19, 2),
1788
- nextKeyList = _useState20[0],
1789
- setNextKeyList = _useState20[1];
1790
- var _useState21 = useState([{
1791
- tab: '出售中',
1792
- key: 'onSale'
1793
- }, {
1794
- tab: '仓库中',
1795
- key: 'inventory'
1796
- }, {
1797
- tab: '已选择',
1798
- key: 'select'
1799
- }]),
1800
- _useState22 = _slicedToArray(_useState21, 2),
1801
- tabs = _useState22[0],
1802
- setTabs = _useState22[1];
1803
- var _useState23 = useState([{
1804
- name: '上架时间',
1805
- value: 'list_time'
1806
- }, {
1807
- name: '按库存',
1808
- value: 'num'
1809
- }, {
1810
- name: '按价格',
1811
- value: 'price'
1812
- }]),
1813
- _useState24 = _slicedToArray(_useState23, 1),
1814
- goodSort = _useState24[0];
1815
- //宝贝分类
1816
- var _useState25 = useState([]),
1817
- _useState26 = _slicedToArray(_useState25, 2),
1818
- shell = _useState26[0],
1819
- setShell = _useState26[1];
1820
- var clickOrder = function clickOrder(sort) {
1821
- if (sort.value === searchParams.orderBy) {
1822
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
1823
- desc: !searchParams.desc
1824
- }));
1825
- } else {
1826
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
1827
- orderBy: sort.value
1828
- }));
1829
- }
1830
- };
1831
- //选择页码
1832
- var pageChange = function pageChange(page, pageSize) {
1833
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
1834
- pageNo: page,
1835
- pageSize: pageSize
1836
- }));
1837
- };
1838
- /**
1839
- * 选择商品
1840
- * @param good
1841
- * @returns
1842
- */
1843
- var changeItem = function changeItem(good) {
1844
- if (searchParams.type === 'select') {
1845
- var newSelect = selectList.filter(function (item) {
1846
- return item.numIid !== good.numIid;
1847
- });
1848
- setSelect(_toConsumableArray(newSelect));
1849
- var ids = newSelect.map(function (item) {
1850
- return item.numIid;
1851
- });
1852
- setSelectIds(ids);
1853
- } else {
1854
- if (type === 4 || changeSku) {
1855
- setSelect([good]);
1856
- setSelectIds([good.numIid]);
1857
- } else {
1858
- if (selectList.length >= maxLength) {
1859
- message.error("\u6700\u591A\u6DFB\u52A0".concat(maxLength, "\u5F20"));
1860
- return;
1861
- }
1862
- var hasGood = selectList.some(function (t) {
1863
- return t.numIid === good.numIid;
1864
- });
1865
- if (hasGood) {
1866
- var newSelectList = selectList.filter(function (item) {
1867
- return item.numIid !== good.numIid;
1868
- });
1869
- setSelect(newSelectList);
1870
- var _ids = newSelectList.map(function (item) {
1871
- return item.numIid;
1872
- });
1873
- setSelectIds(_ids);
1874
- } else {
1875
- setSelect([].concat(_toConsumableArray(selectList), [good]));
1876
- setSelectIds([].concat(_toConsumableArray(selectIds), [good.numIid]));
1877
- }
1878
- }
1879
- }
1880
- };
1881
- /**
1882
- * 获取分类列表
1883
- */
1884
- var querySellerCat = function querySellerCat() {
1885
- extendRequest('/qy/gdfw/workOrder/querySellerCat', {
1886
- method: 'get',
1887
- params: {
1888
- shopId: shopId || 257615501,
1889
- apiName: 'querySellerCat'
1890
- }
1891
- }).then(function (res) {
1892
- var arr = [{
1893
- value: '',
1894
- label: '所有分类'
1895
- }];
1896
- (res.data || []).forEach(function (item) {
1897
- var category = item.category,
1898
- _item$children = item.children,
1899
- children = _item$children === void 0 ? [] : _item$children;
1900
- arr.push({
1901
- label: "| ".concat(category.name),
1902
- value: [category.value].concat(_toConsumableArray(children.map(function (v) {
1903
- return v.value;
1904
- }))).join(',')
1905
- });
1906
- children.forEach(function (c) {
1907
- arr.push({
1908
- label: "|-- ".concat(c.name),
1909
- value: c.value
1910
- });
1911
- });
1912
- });
1913
- setShell([].concat(arr));
1914
- });
1915
- };
1916
- /**
1917
- *
1918
- * @returns 获取查询参数
1919
- */
1920
- var queryPd = function queryPd() {
1921
- var params = {
1922
- apiName: 'queryItems',
1923
- desc: searchParams.desc,
1924
- productIds: searchParams.numIids,
1925
- orderBy: searchParams.orderBy,
1926
- pageNo: searchParams.pageNo,
1927
- pageSize: searchParams.pageSize,
1928
- shopId: shopId,
1929
- type: searchParams.type,
1930
- title: searchParams.title,
1931
- cids: searchParams.cids
1932
- };
1933
- if (platform === 'sph') {
1934
- params.useNext = true;
1935
- params.nextKey = nextKeyList[searchParams.pageNo - 1];
1936
- }
1937
- return params;
1938
- };
1939
- /**
1940
- * 查询商品
1941
- */
1942
- var queryItems = /*#__PURE__*/function () {
1943
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(platform) {
1944
- var res, _ref2, items, totalCount, params, _res, _ref3, list, _total, nextKey, newList;
1945
- return _regeneratorRuntime().wrap(function _callee$(_context) {
1946
- while (1) switch (_context.prev = _context.next) {
1947
- case 0:
1948
- _context.prev = 0;
1949
- setLoading(true);
1950
- if (!(platform === 'taobao')) {
1951
- _context.next = 12;
1952
- break;
1953
- }
1954
- _context.next = 5;
1955
- return extendRequest('/qy/gdfw/workOrder/queryItems', {
1956
- method: 'post',
1957
- data: queryPd()
1958
- });
1959
- case 5:
1960
- res = _context.sent;
1961
- _ref2 = res.data || {
1962
- items: [],
1963
- totalCount: 0
1964
- }, items = _ref2.items, totalCount = _ref2.totalCount;
1965
- items.forEach(function (item) {
1966
- item.platform = platform;
1967
- });
1968
- setGoodList(_toConsumableArray(items));
1969
- setTotal(totalCount);
1970
- _context.next = 26;
1971
- break;
1972
- case 12:
1973
- params = _objectSpread2({}, queryPd());
1974
- params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
1975
- params.platform = platform;
1976
- params.status = params.type === 'onSale' ? 1 : 0;
1977
- delete params.type;
1978
- _context.next = 19;
1979
- return extendRequest('/qy/gdfw/product/listProduct', {
1980
- method: 'post',
1981
- data: params
1982
- });
1983
- case 19:
1984
- _res = _context.sent;
1985
- _ref3 = _res.data || {
1986
- result: [],
1987
- total: 0
1988
- }, list = _ref3.result, _total = _ref3.total, nextKey = _ref3.nextKey;
1989
- newList = list || [];
1990
- newList.forEach(function (item) {
1991
- item.numIid = item.productId;
1992
- item.outerId = item.outId;
1993
- item.title = item.productName;
1994
- item.platform = platform;
1995
- });
1996
- setGoodList(_toConsumableArray(newList));
1997
- setTotal(_total);
1998
- if (platform === 'sph' && nextKey && !nextKeyList.includes(nextKey)) {
1999
- setNextKeyList([].concat(_toConsumableArray(nextKeyList), [nextKey]));
2000
- }
2001
- case 26:
2002
- _context.prev = 26;
2003
- setLoading(false);
2004
- return _context.finish(26);
2005
- case 29:
2006
- case "end":
2007
- return _context.stop();
2008
- }
2009
- }, _callee, null, [[0,, 26, 29]]);
2010
- }));
2011
- return function queryItems(_x) {
2012
- return _ref.apply(this, arguments);
2013
- };
2014
- }();
2015
- var getItem = function getItem(searchParams, platform) {
2016
- if (searchParams.type === 'select') {
2017
- setTotal(1);
2018
- return;
2019
- } else {
2020
- queryItems(platform);
2021
- }
2022
- };
2023
- /**
2024
- * 获取平台
2025
- */
2026
- var setPlatformHandle = function setPlatformHandle(platform) {
2027
- platform === 'taobao' && querySellerCat();
2028
- };
2029
- //视屏号平台游标查询
2030
- var PaginationSph = function PaginationSph() {
2031
- var changePageHandle = function changePageHandle(type) {
2032
- var pageNo = searchParams.pageNo;
2033
- type === 'next' ? pageNo++ : pageNo--;
2034
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
2035
- pageNo: pageNo
2036
- }));
2037
- };
2038
- return /*#__PURE__*/React.createElement("div", {
2039
- className: "sphPagination"
2040
- }, /*#__PURE__*/React.createElement("div", {
2041
- className: "shpBtn ".concat(searchParams.pageNo <= 1 && 'unCursor'),
2042
- onClick: function onClick() {
2043
- if (searchParams.pageNo <= 1) return;
2044
- changePageHandle('before');
2045
- }
2046
- }, "\u4E0A\u4E00\u9875"), /*#__PURE__*/React.createElement("div", null, searchParams.pageNo, "/", Math.ceil(total / searchParams.pageSize) || 0), /*#__PURE__*/React.createElement("div", {
2047
- className: "shpBtn ".concat(searchParams.pageNo >= Math.ceil(total / searchParams.pageSize) && 'unCursor'),
2048
- onClick: function onClick() {
2049
- if (searchParams.pageNo >= Math.ceil(total / searchParams.pageSize)) return;
2050
- changePageHandle('next');
2051
- }
2052
- }, "\u4E0B\u4E00\u9875"));
2053
- };
2054
- useEffect(function () {
2055
- var shopInfo = shopList.find(function (item) {
2056
- return shopId === item.shopId || shopId === item.shopName;
2057
- });
2058
- setShopInfo(shopInfo);
2059
- var platform = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopSourceStr.toLowerCase();
2060
- setPlatform(platform);
2061
- var tab = platform === 'fxg' ? [{
2062
- tab: '选商品',
2063
- key: 'onSale'
2064
- }, {
2065
- tab: '已选择',
2066
- key: 'select'
2067
- }] : [{
2068
- tab: '出售中',
2069
- key: 'onSale'
2070
- }, {
2071
- tab: '仓库中',
2072
- key: 'inventory'
2073
- }, {
2074
- tab: '已选择',
2075
- key: 'select'
2076
- }];
2077
- setTabs(tab);
2078
- }, []);
2079
- useEffect(function () {
2080
- setPlatformHandle(platform);
2081
- if (imgList.length) {
2082
- setSelect(imgList);
2083
- var ids = imgList.map(function (item) {
2084
- return item.numIid;
2085
- });
2086
- if (!(changeSku || type === 4)) {
2087
- setSelectIds(ids);
2088
- }
2089
- }
2090
- }, [platform]);
2091
- useEffect(function () {
2092
- platform && canSearch && getItem(searchParams, platform);
2093
- }, [searchParams, platform]);
2094
- return /*#__PURE__*/React.createElement(Modal, {
2095
- title: '选择宝贝',
2096
- okText: '确认',
2097
- cancelText: '取消',
2098
- visible: visible,
2099
- width: width || 850,
2100
- onCancel: function onCancel() {
2101
- _onCancel();
2102
- },
2103
- onOk: function onOk() {
2104
- onSubmit(selectList);
2105
- },
2106
- wrapClassName: "goodModal"
2107
- }, /*#__PURE__*/React.createElement(Tabs, {
2108
- type: "card",
2109
- activeKey: searchParams.type,
2110
- onChange: function onChange(e) {
2111
- var params = _objectSpread2(_objectSpread2({}, searchParams), {}, {
2112
- type: e,
2113
- pageNo: 1
2114
- });
2115
- setSearch(params);
2116
- }
2117
- }, tabs.map(function (tab) {
2118
- return /*#__PURE__*/React.createElement(TabPane, {
2119
- tab: tab.tab + (tab.key === 'select' ? "(".concat(selectList.length, ")") : ''),
2120
- key: tab.key
2121
- });
2122
- })), /*#__PURE__*/React.createElement("div", {
2123
- className: "searchBox",
2124
- style: {
2125
- display: searchParams.type === 'select' ? 'none' : ''
2126
- }
2127
- }, platform === 'taobao' && /*#__PURE__*/React.createElement(Radio.Group, {
2128
- value: searchParams.orderBy,
2129
- onChange: function onChange(e) {
2130
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
2131
- pageNo: 1,
2132
- orderBy: e.target.value
2133
- }));
2134
- }
2135
- }, goodSort.map(function (sort) {
2136
- return /*#__PURE__*/React.createElement(Button, {
2137
- type: sort.value === searchParams.orderBy ? 'primary' : 'default',
2138
- onClick: function onClick() {
2139
- clickOrder(sort);
2140
- },
2141
- key: sort.value
2142
- }, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React.createElement("span", null, "\u21BE") : /*#__PURE__*/React.createElement("span", null, "\u21C2") : /*#__PURE__*/React.createElement("span", null, "\u21C5"));
2143
- })), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && /*#__PURE__*/React.createElement(Select, {
2144
- className: "classify",
2145
- value: searchParams.cids,
2146
- onChange: function onChange(value) {
2147
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
2148
- pageNo: 1,
2149
- cids: value
2150
- }));
2151
- }
2152
- }, shell.map(function (item) {
2153
- return /*#__PURE__*/React.createElement(Option$1, {
2154
- value: item.value,
2155
- key: item.value
2156
- }, item.label);
2157
- })), /*#__PURE__*/React.createElement(Search, {
2158
- placeholder: platform === 'taobao' ? "宝贝链接,标题" : "商品ID",
2159
- // enterButton="搜索"
2160
- className: "search",
2161
- value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
2162
- onChange: function onChange(e) {
2163
- setCanSearch(false);
2164
- platform === 'taobao' ? setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
2165
- pageNo: 1,
2166
- title: e.target.value
2167
- })) : setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
2168
- numIids: e.target.value
2169
- }));
2170
- },
2171
- onSearch: function onSearch(val) {
2172
- setCanSearch(true);
2173
- platform === 'taobao' ? setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
2174
- pageNo: 1,
2175
- title: val
2176
- })) : setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
2177
- pageNo: 1,
2178
- numIids: val
2179
- }));
2180
- }
2181
- }))), /*#__PURE__*/React.createElement(Spin, {
2182
- spinning: loading
2183
- }, /*#__PURE__*/React.createElement("div", {
2184
- className: "goodsMain"
2185
- }, (searchParams.type == 'select' ? selectList : goodList).map(function (good) {
2186
- return /*#__PURE__*/React.createElement("div", {
2187
- key: good.numIid,
2188
- className: "goodItem ".concat(selectIds.includes(good.numIid) ? 'active' : ''),
2189
- onClick: function onClick() {
2190
- changeItem(good);
2191
- }
2192
- }, /*#__PURE__*/React.createElement("div", {
2193
- className: "goodImg"
2194
- }, /*#__PURE__*/React.createElement("img", {
2195
- src: good.picUrl || defaultImg,
2196
- alt: "",
2197
- className: "img"
2198
- })), /*#__PURE__*/React.createElement("div", {
2199
- className: "goodText"
2200
- }, good.title), /*#__PURE__*/React.createElement("div", {
2201
- className: "goodPrice"
2202
- }, "\xA5", good.price));
2203
- }))), /*#__PURE__*/React.createElement("footer", {
2204
- className: "footer"
2205
- }, platform !== 'sph' ? /*#__PURE__*/React.createElement(ConfigProvider, {
2206
- locale: zhCN
2207
- }, /*#__PURE__*/React.createElement(Pagination, {
2208
- total: total,
2209
- current: searchParams.pageNo,
2210
- pageSize: searchParams.pageSize,
2211
- onChange: pageChange
2212
- })) : PaginationSph()));
2213
- };
2214
-
2215
- var Sku = /*#__PURE__*/forwardRef(function (props, ref) {
2216
- var _useState = useState(false),
2217
- _useState2 = _slicedToArray(_useState, 2),
2218
- visible = _useState2[0],
2219
- setVisible = _useState2[1];
2220
- var _useState3 = useState(''),
2221
- _useState4 = _slicedToArray(_useState3, 2),
2222
- sku = _useState4[0],
2223
- setSku = _useState4[1];
2224
- var _useState5 = useState([]),
2225
- _useState6 = _slicedToArray(_useState5, 2),
2226
- options = _useState6[0],
2227
- setOptions = _useState6[1];
2228
- var _useState7 = useState(''),
2229
- _useState8 = _slicedToArray(_useState7, 2),
2230
- numIids = _useState8[0],
2231
- setNumIids = _useState8[1];
2232
- useImperativeHandle(ref, function () {
2233
- return {
2234
- open: function open(_ref) {
2235
- var shopId = _ref.shopId,
2236
- numIids = _ref.numIids,
2237
- options = _ref.options;
2238
- setVisible(true);
2239
- setSku('');
2240
- setNumIids(numIids);
2241
- setOptions(options);
2242
- },
2243
- close: function close() {
2244
- setVisible(false);
2245
- }
2246
- };
2247
- });
2248
- var handleSure = /*#__PURE__*/function () {
2249
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2250
- var type, SKU, _ref3, _ref4, _ref5, _ref6, _yield$request, _yield$request$data, data;
2251
- return _regeneratorRuntime().wrap(function _callee$(_context) {
2252
- while (1) switch (_context.prev = _context.next) {
2253
- case 0:
2254
- type = props.type;
2255
- if (sku) {
2256
- _context.next = 5;
2257
- break;
2258
- }
2259
- props.handleOk({
2260
- enableItemId: '',
2261
- enableSupplierName: '',
2262
- propertiesName: ''
2263
- });
2264
- _context.next = 16;
2265
- break;
2266
- case 5:
2267
- SKU = options.find(function (item) {
2268
- return item.value === sku;
2269
- });
2270
- if (!(type !== 4)) {
2271
- _context.next = 10;
2272
- break;
2273
- }
2274
- props.handleOk({
2275
- enableItemId: '',
2276
- enableSupplierName: '',
2277
- propertiesName: ((_ref3 = SKU || {
2278
- label: ''
2279
- }) === null || _ref3 === void 0 ? void 0 : _ref3.label) || '',
2280
- picUrl: (_ref4 = SKU || {
2281
- picUrl: ''
2282
- }) === null || _ref4 === void 0 ? void 0 : _ref4.picUrl
2283
- });
2284
- _context.next = 16;
2285
- break;
2286
- case 10:
2287
- _context.next = 12;
2288
- return extendRequest('/qy/gdfw/erp/getSupplierInfo', {
2289
- method: 'get',
2290
- params: {
2291
- itemId: numIids,
2292
- skuId: sku,
2293
- userNick: props.userNick
2294
- }
2295
- });
2296
- case 12:
2297
- _yield$request = _context.sent;
2298
- _yield$request$data = _yield$request.data;
2299
- data = _yield$request$data === void 0 ? [] : _yield$request$data;
2300
- props.handleOk({
2301
- enableItemId: data.length > 0 ? data[0]['supplierItemOuterId'] : '',
2302
- enableSupplierName: data.length > 0 ? data[0]['supplierName'] : '',
2303
- propertiesName: ((_ref5 = SKU || {
2304
- label: ''
2305
- }) === null || _ref5 === void 0 ? void 0 : _ref5.label) || '',
2306
- picUrl: (_ref6 = SKU || {
2307
- picUrl: ''
2308
- }) === null || _ref6 === void 0 ? void 0 : _ref6.picUrl
2309
- });
2310
- case 16:
2311
- setVisible(false);
2312
- case 17:
2313
- case "end":
2314
- return _context.stop();
2315
- }
2316
- }, _callee);
2317
- }));
2318
- return function handleSure() {
2319
- return _ref2.apply(this, arguments);
2320
- };
2321
- }();
2322
- return /*#__PURE__*/React.createElement(Modal, {
2323
- title: "\u8BF7\u9009\u62E9\u5BF9\u5E94\u7684SKU",
2324
- visible: visible,
2325
- onCancel: function onCancel() {
2326
- return setVisible(false);
2327
- },
2328
- onOk: handleSure,
2329
- okText: "\u786E\u5B9A",
2330
- cancelText: "\u53D6\u6D88"
2331
- }, /*#__PURE__*/React.createElement(Select, {
2332
- options: options,
2333
- value: sku,
2334
- onChange: function onChange(val) {
2335
- return setSku(val);
2336
- },
2337
- style: {
2338
- width: '300px'
2339
- }
2340
- }));
2341
- });
2342
-
2343
- var iconDelete = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAcZJREFUOI2NlDty01AUhr//mtDinUTswKGhYsasAHswbpnbMXYRU8SUgjaYSVgBZKhosHbgmx0kO3CdDDoUeiBbV3FOJZ3Hp/PQOaJDlulqKKdjMxsASakOkjKRhw/v313F4rSvOEvPE8ldNCBdEszy8dxPQ1PpdmFfF5LbPAIGkEhu8+nLt9NohgVMp+24R4jJz/zbzzWwLHPz34HvQII4jgO4BgLiTa2y/PncT4MrqO6yTtm4mvnJ6I7eoAxswe7oDWZ+MpJRD6bsO1qmqyHiRyNka5afzP00LNKL/lP+ZnWmJWzhx9uyqjXQb3zstTNsfwB9ya3P0vNk4cfbOtNDMMCwxAkGkS61oIdgResYaJmutohnEehO+VAPLwqr/F2Hoarh9p6jm+r1nqMbjNsH/OXAQodxp2etnsaDgjPIDsEkt44OqhVG5oTCIRhFz+LTb4hQEMAyXYXGVmzN8hOAjgHE7cb1zE+SJ8VzPhL16vVLRyKwTruRj6C8NnM/DWb2sRnUAYvbTb76tXqV7s/vX9mLl68kafAAqC2NSwNdBxZ32XlpahDXRj7aP7AtYCXLdDU0LClWU+W+WzDIhMLMT37G4v4ByZT7Ht1YoCYAAAAASUVORK5CYII=";
2344
-
2345
- var imgListConstant = [];
2346
- var Goods = function Goods(props) {
2347
- var _props$value = props.value,
2348
- value = _props$value === void 0 ? {
2349
- shopId: '',
2350
- imgList: []
2351
- } : _props$value,
2352
- _props$maxLength = props.maxLength,
2353
- maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
2354
- onChange = props.onChange,
2355
- _props$type = props.type,
2356
- type = _props$type === void 0 ? 2 : _props$type,
2357
- _props$shopList = props.shopList,
2358
- shopList = _props$shopList === void 0 ? [] : _props$shopList,
2359
- enableItemId = props.enableItemId,
2360
- enableSupplierName = props.enableSupplierName,
2361
- userNick = props.userNick,
2362
- disabled = props.disabled,
2363
- changeSku = props.changeSku,
2364
- width = props.width;
2365
- var shopId = value.shopId,
2366
- imgList = value.imgList;
2367
- console.log(props);
2368
- // 目前当type == 3 时需要讲item项水平排列
2369
- var goodsBoxClassName = 'goodsBox-item-horizontal--box';
2370
- var _useState = useState(false),
2371
- _useState2 = _slicedToArray(_useState, 2),
2372
- visible = _useState2[0],
2373
- setVisible = _useState2[1];
2374
- var _useState3 = useState(''),
2375
- _useState4 = _slicedToArray(_useState3, 2),
2376
- editState = _useState4[0],
2377
- setEditState = _useState4[1];
2378
- var _useState5 = useState(0),
2379
- _useState6 = _slicedToArray(_useState5, 2),
2380
- uploadImageCount = _useState6[0],
2381
- setUploadImageCount = _useState6[1];
2382
- var skuRef = useRef();
2383
- var _useState7 = useState(false),
2384
- _useState8 = _slicedToArray(_useState7, 2),
2385
- editVisible = _useState8[0],
2386
- setEditVisible = _useState8[1];
2387
- // onChange事件会修改imgList里的字段,所以保存初始化的imglist值
2388
- if (!imgListConstant.length) {
2389
- imgListConstant = JSON.parse(JSON.stringify(imgList));
2390
- }
2391
- useEffect(function () {
2392
- return function () {
2393
- setEditVisible(false);
2394
- imgListConstant = [];
2395
- };
2396
- }, []);
2397
- //是否是淘宝店铺
2398
- var isTaobaoPlat = useMemo(function () {
2399
- return shopList.some(function (item) {
2400
- return item.shopId === shopId && item.shopSourceStr === 'TAOBAO';
2401
- });
2402
- }, [shopId]);
2403
- // 查询SKU
2404
- var querySkus = /*#__PURE__*/function () {
2405
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
2406
- var shopId, numIids;
2407
- return _regeneratorRuntime().wrap(function _callee$(_context) {
2408
- while (1) switch (_context.prev = _context.next) {
2409
- case 0:
2410
- shopId = _ref.shopId, numIids = _ref.numIids;
2411
- return _context.abrupt("return", extendRequest('/qy/gdfw/workOrder/queryItemSkus', {
2412
- method: 'post',
2413
- data: {
2414
- shopId: shopId,
2415
- numIids: numIids
2416
- }
2417
- }));
2418
- case 2:
2419
- case "end":
2420
- return _context.stop();
2421
- }
2422
- }, _callee);
2423
- }));
2424
- return function querySkus(_x) {
2425
- return _ref2.apply(this, arguments);
2426
- };
2427
- }();
2428
- //删除图片
2429
- var deleteImg = function deleteImg(index) {
2430
- var newSelect = imgList.filter(function (_, i) {
2431
- return index !== i;
2432
- });
2433
- var newValue = {
2434
- shopId: shopId,
2435
- imgList: _toConsumableArray(newSelect)
2436
- };
2437
- setEditVisible(false);
2438
- setUploadImageCount(newSelect.length);
2439
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
2440
- imgListConstant = [];
2441
- };
2442
- //选择sku
2443
- var handleSelectSku = function handleSelectSku(_ref3) {
2444
- var enableItemId = _ref3.enableItemId,
2445
- enableSupplierName = _ref3.enableSupplierName,
2446
- propertiesName = _ref3.propertiesName,
2447
- picUrl = _ref3.picUrl;
2448
- var newList = JSON.parse(JSON.stringify(imgList));
2449
- if (type === 4) {
2450
- newList[newList.length - 1].itemId = enableItemId;
2451
- newList[newList.length - 1].supplierName = enableSupplierName;
2452
- } else {
2453
- newList[newList.length - 1].propertiesName = propertiesName;
2454
- }
2455
- //替换成sku的图片
2456
- picUrl && (newList[newList.length - 1].picUrl = picUrl);
2457
- var newValue = {
2458
- shopId: shopId,
2459
- imgList: newList
2460
- };
2461
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
2462
- };
2463
- //选择回调
2464
- var onSubmit = /*#__PURE__*/function () {
2465
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
2466
- var newList, newImgList, newValue, _yield$querySkus, data, _skuRef$current, options;
2467
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2468
- while (1) switch (_context2.prev = _context2.next) {
2469
- case 0:
2470
- newList = list.map(function (item) {
2471
- //过滤属性 只保存需要的字段
2472
- var params = {
2473
- numIid: item.numIid,
2474
- picUrl: item.picUrl,
2475
- platform: item.platform,
2476
- title: item.title,
2477
- price: item.price //价格
2478
- };
2479
-
2480
- if (type === 1) {
2481
- params.outerId = item.outerId; //编码
2482
- }
2483
-
2484
- if (changeSku) {
2485
- params.propertiesName = '';
2486
- }
2487
- if (type === 4) {
2488
- if (enableItemId) {
2489
- params.itemId = '';
2490
- }
2491
- if (enableSupplierName) {
2492
- params.supplierName = '';
2493
- }
2494
- }
2495
- return params;
2496
- });
2497
- newImgList = changeSku || type === 4 ? [].concat(_toConsumableArray(imgList), _toConsumableArray(newList)) : _toConsumableArray(newList);
2498
- newValue = {
2499
- shopId: shopId,
2500
- imgList: newImgList
2501
- };
2502
- setUploadImageCount(newImgList.length);
2503
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
2504
- setVisible(false);
2505
- //供应上编码组件 || 商品组件且可以选择sku
2506
- if (!(type === 4 && (enableItemId || enableSupplierName) || type !== 4 && changeSku && isTaobaoPlat && list.length > 0)) {
2507
- _context2.next = 12;
2508
- break;
2509
- }
2510
- _context2.next = 9;
2511
- return querySkus({
2512
- shopId: shopId,
2513
- numIids: list[0].numIid
2514
- });
2515
- case 9:
2516
- _yield$querySkus = _context2.sent;
2517
- data = _yield$querySkus.data;
2518
- if (data.length > 0 && data[0]['skus'] && data[0]['skus']['length'] > 0) {
2519
- options = data[0]['skus'].map(function (item) {
2520
- return {
2521
- label: item.propertiesName.split(';').map(function (i) {
2522
- return i.split(':').slice(2);
2523
- }).join(';'),
2524
- value: item.skuId,
2525
- picUrl: item.picUrl
2526
- };
2527
- });
2528
- (_skuRef$current = skuRef.current) === null || _skuRef$current === void 0 ? void 0 : _skuRef$current.open({
2529
- shopId: shopId,
2530
- numIids: list[0].numIid,
2531
- options: options
2532
- });
2533
- }
2534
- case 12:
2535
- case "end":
2536
- return _context2.stop();
2537
- }
2538
- }, _callee2);
2539
- }));
2540
- return function onSubmit(_x2) {
2541
- return _ref4.apply(this, arguments);
2542
- };
2543
- }();
2544
- //修改参数
2545
- var handleChangeValue = function handleChangeValue(key, index) {
2546
- return function (e) {
2547
- var _e$target;
2548
- var newImgList = _toConsumableArray(imgList);
2549
- newImgList[index][key] = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
2550
- var newValue = {
2551
- shopId: shopId,
2552
- imgList: newImgList
2553
- };
2554
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
2555
- };
2556
- };
2557
- // console.log(enableSupplierName, imgListConstant)
2558
- return /*#__PURE__*/React.createElement(React.Fragment, null, uploadImageCount === 0 ? /*#__PURE__*/React.createElement("p", {
2559
- className: "goods-title"
2560
- }, "\u6700\u591A\u6DFB\u52A0", maxLength, "\u4E2A\u5B9D\u8D1D") : /*#__PURE__*/React.createElement("p", {
2561
- className: "goods-uploaded-state"
2562
- }, "\u5DF2\u6DFB\u52A0", /*#__PURE__*/React.createElement("span", {
2563
- className: "goods-uploaded-count"
2564
- }, uploadImageCount), "/", maxLength, "\u4E2A\u5B9D\u8D1D"), /*#__PURE__*/React.createElement("div", {
2565
- className: "goodsBox ".concat(goodsBoxClassName)
2566
- }, imgList === null || imgList === void 0 ? void 0 : imgList.map(function (img, index) {
2567
- return /*#__PURE__*/React.createElement("div", {
2568
- className: "goodBox-Img"
2569
- }, /*#__PURE__*/React.createElement("div", {
2570
- className: "goods-imgBox",
2571
- key: img.picUrl + '-goods'
2572
- }, img.platform !== 'taobao' ? /*#__PURE__*/React.createElement("img", {
2573
- src: img.picUrl || defaultImg,
2574
- className: "img",
2575
- alt: ""
2576
- }) : /*#__PURE__*/React.createElement("a", {
2577
- href: "https://item.taobao.com/item.htm?id=".concat(img.numIid),
2578
- target: "_blank"
2579
- }, /*#__PURE__*/React.createElement("img", {
2580
- src: img.picUrl || defaultImg,
2581
- className: "img",
2582
- alt: ""
2583
- })), !disabled && /*#__PURE__*/React.createElement("img", {
2584
- src: iconDelete,
2585
- alt: "",
2586
- className: "icon-close",
2587
- onClick: function onClick() {
2588
- deleteImg(index);
2589
- }
2590
- })), /*#__PURE__*/React.createElement("div", {
2591
- className: "right-context",
2592
- key: img.picUrl + '-context'
2593
- }, type === 1 ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
2594
- placeholder: "\u8BF7\u8F93\u5165\u7F16\u7801",
2595
- title: String((img === null || img === void 0 ? void 0 : img.outerId) || ''),
2596
- value: img.outerId,
2597
- disabled: disabled,
2598
- style: {
2599
- width: '80px'
2600
- },
2601
- onChange: handleChangeValue('outerId', index)
2602
- })) : null, type === 2 ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
2603
- placeholder: "\u8BF7\u8F93\u5165\u5B9D\u8D1Did",
2604
- value: img.numIid,
2605
- title: String((img === null || img === void 0 ? void 0 : img.numIid) || ''),
2606
- style: {
2607
- width: '80px'
2608
- },
2609
- disabled: disabled,
2610
- onChange: handleChangeValue('numIid', index)
2611
- })) : null, type !== 4 && changeSku ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
2612
- placeholder: "\u8BF7\u8F93\u5165\u5B9D\u8D1D\u89C4\u683C",
2613
- value: img.propertiesName,
2614
- title: String((img === null || img === void 0 ? void 0 : img.propertiesName) || ''),
2615
- style: {
2616
- width: '80px',
2617
- marginTop: '8px'
2618
- },
2619
- disabled: disabled,
2620
- onChange: handleChangeValue('propertiesName', index)
2621
- })) : null, type === 4 && enableItemId ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
2622
- placeholder: "\u8BF7\u8F93\u5165\u7F16\u7801",
2623
- value: img.itemId || (img === null || img === void 0 ? void 0 : img.supplierItemOuterId),
2624
- title: String((img === null || img === void 0 ? void 0 : img.itemId) || (img === null || img === void 0 ? void 0 : img.supplierItemOuterId) || ''),
2625
- disabled: disabled,
2626
- style: {
2627
- width: '80px',
2628
- marginBottom: '8px'
2629
- },
2630
- onChange: handleChangeValue('itemId', index)
2631
- })) : null, type === 4 && enableSupplierName ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
2632
- placeholder: "\u8BF7\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0",
2633
- title: String((img === null || img === void 0 ? void 0 : img.supplierName) || ''),
2634
- disabled: disabled,
2635
- value: img.supplierName,
2636
- onChange: handleChangeValue('supplierName', index)
2637
- })) : null));
2638
- }), imgList.length < maxLength && !disabled ? /*#__PURE__*/React.createElement("div", {
2639
- className: "goods-imgBox",
2640
- onClick: function onClick() {
2641
- if (!shopId) {
2642
- message.error('请选择店铺');
2643
- return;
2644
- }
2645
- setVisible(true);
2646
- }
2647
- }, /*#__PURE__*/React.createElement("div", {
2648
- className: "add-btn",
2649
- style: {
2650
- marginTop: '15px'
2651
- }
2652
- }, "+"), /*#__PURE__*/React.createElement("div", {
2653
- className: "text"
2654
- }, "\u6DFB\u52A0")) : null, visible ? /*#__PURE__*/React.createElement(GoodsModal, {
2655
- visible: visible,
2656
- onSubmit: onSubmit,
2657
- width: width,
2658
- type: type,
2659
- imgList: imgList,
2660
- shopList: shopList,
2661
- shopId: shopId,
2662
- maxLength: maxLength,
2663
- changeSku: changeSku,
2664
- onCancel: function onCancel() {
2665
- setVisible(false);
2666
- }
2667
- }) : null, /*#__PURE__*/React.createElement(Sku, {
2668
- handleOk: handleSelectSku,
2669
- ref: skuRef,
2670
- userNick: userNick,
2671
- type: type
2672
- })));
2673
- };
2674
-
2675
- var TBGoodId = function TBGoodId(props) {
2676
- return /*#__PURE__*/React.createElement(Goods, _objectSpread2(_objectSpread2({}, props), {}, {
2677
- type: 2
2678
- }));
2679
- };
2680
-
2681
- var ChooseBaby = function ChooseBaby(props) {
2682
- return /*#__PURE__*/React.createElement(Goods, _objectSpread2(_objectSpread2({}, props), {}, {
2683
- type: 3
2684
- }));
2685
- };
2686
-
2687
- var TBGoodSerial = function TBGoodSerial(props) {
2688
- return /*#__PURE__*/React.createElement(Goods, _objectSpread2(_objectSpread2({}, props), {}, {
2689
- type: 1
2690
- }));
2691
- };
2692
-
2693
- var Supplier = function Supplier(props) {
2694
- return /*#__PURE__*/React.createElement(Goods, _objectSpread2(_objectSpread2({}, props), {}, {
2695
- type: 4
2696
- }));
2697
- };
2698
-
2699
- var css_248z$5 = ".cardBox {\n position: absolute;\n z-index: 1;\n border: 1px solid #e6e6e6;\n background-color: #fff;\n color: #303133;\n border-radius: 4px;\n overflow: auto;\n height: 200px;\n cursor: pointer;\n}\n.cardBox .cardli {\n padding: 7px 13px;\n width: 332px;\n}\n.cardBox .cardli:hover {\n background-color: #f5f7fa;\n}\n.cardBox .cardText {\n font-size: 14px;\n color: #333;\n margin: 0;\n padding: 0;\n line-height: 26px;\n}\n.cardBox .c-f60 {\n color: #f60;\n}\n.btn-discern {\n margin-left: 10px;\n height: 24px;\n font-size: 12px;\n color: #1B5BF3;\n border-color: #1B5BF3;\n padding: 0;\n}\n";
2700
- styleInject(css_248z$5);
2701
-
2702
- var Invoice = function Invoice(props) {
2703
- var _props$value = props.value,
2704
- value = _props$value === void 0 ? {
2705
- ordinaryTaitou: '',
2706
- ordinarySerial: '',
2707
- ordinaryMoney: ''
2708
- } : _props$value,
2709
- required = props.required,
2710
- disabled = props.disabled,
2711
- onChange = props.onChange;
2712
- var _useState = useState(false),
2713
- _useState2 = _slicedToArray(_useState, 2),
2714
- visible = _useState2[0],
2715
- setVisible = _useState2[1];
2716
- var _useState3 = useState([]),
2717
- _useState4 = _slicedToArray(_useState3, 2),
2718
- list = _useState4[0],
2719
- setList = _useState4[1];
2720
- var _useRef = useRef({
2721
- timer: null
2722
- }),
2723
- current = _useRef.current;
2724
- var handleInputChange = function handleInputChange(e) {
2725
- var ordinaryTaitou = e.target.value;
2726
- setVisible(false);
2727
- setList([]);
2728
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
2729
- ordinaryTaitou: ordinaryTaitou
2730
- });
2731
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
2732
- if (current.timer) {
2733
- clearTimeout(current.timer);
2734
- }
2735
- current.timer = setTimeout(function () {
2736
- handleChange(ordinaryTaitou);
2737
- }, 1000);
2738
- };
2739
- var handleButtonClick = function handleButtonClick() {
2740
- var ordinaryTaitou = value === null || value === void 0 ? void 0 : value.ordinaryTaitou;
2741
- if (!ordinaryTaitou) {
2742
- message.error('请输入发票抬头');
2743
- return;
2744
- }
2745
- handleChange(ordinaryTaitou);
2746
- };
2747
- var handleValueClick = function handleValueClick(e) {
2748
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
2749
- ordinarySerial: e.target.value
2750
- });
2751
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
2752
- };
2753
- var handleMoneyClick = function handleMoneyClick(e) {
2754
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
2755
- ordinaryMoney: keepDecimals(e.target.value)
2756
- });
2757
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
2758
- };
2759
- var autoFillCompanyInfo = /*#__PURE__*/function () {
2760
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
2761
- return _regeneratorRuntime().wrap(function _callee$(_context) {
2762
- while (1) switch (_context.prev = _context.next) {
2763
- case 0:
2764
- _context.next = 2;
2765
- return extendRequest('/qy/gdfw/workOrder/companyinfo', {
2766
- method: 'post',
2767
- data: _objectSpread2({}, data)
2768
- });
2769
- case 2:
2770
- return _context.abrupt("return", _context.sent);
2771
- case 3:
2772
- case "end":
2773
- return _context.stop();
2774
- }
2775
- }, _callee);
2776
- }));
2777
- return function autoFillCompanyInfo(_x) {
2778
- return _ref.apply(this, arguments);
2779
- };
2780
- }();
2781
- /**
2782
- * 智能识别
2783
- * @returns
2784
- */
2785
- var handleChange = /*#__PURE__*/function () {
2786
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(ordinaryTaitou) {
2787
- var data, list, newList, index, element, kpName, idx;
2788
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2789
- while (1) switch (_context2.prev = _context2.next) {
2790
- case 0:
2791
- ordinaryTaitou = ordinaryTaitou || (value === null || value === void 0 ? void 0 : value.ordinaryTaitou);
2792
- if (ordinaryTaitou) {
2793
- _context2.next = 3;
2794
- break;
2795
- }
2796
- return _context2.abrupt("return");
2797
- case 3:
2798
- _context2.next = 5;
2799
- return autoFillCompanyInfo({
2800
- companyName: ordinaryTaitou
2801
- });
2802
- case 5:
2803
- data = _context2.sent;
2804
- if (!data.success) {
2805
- _context2.next = 16;
2806
- break;
2807
- }
2808
- list = data.data ? data.data.info || [] : [];
2809
- if (list.length) {
2810
- _context2.next = 10;
2811
- break;
2812
- }
2813
- return _context2.abrupt("return");
2814
- case 10:
2815
- newList = [];
2816
- for (index = 0; index < list.length; index++) {
2817
- element = list[index];
2818
- kpName = element.kpName;
2819
- idx = kpName.indexOf(ordinaryTaitou);
2820
- element.kpName1 = kpName.substring(0, idx);
2821
- element.kpName2 = ordinaryTaitou;
2822
- element.kpName3 = kpName.substring(idx + ordinaryTaitou.length);
2823
- newList.push(element);
2824
- }
2825
- setVisible(true);
2826
- setList(newList);
2827
- _context2.next = 16;
2828
- break;
2829
- case 16:
2830
- case "end":
2831
- return _context2.stop();
2832
- }
2833
- }, _callee2);
2834
- }));
2835
- return function handleChange(_x2) {
2836
- return _ref2.apply(this, arguments);
2837
- };
2838
- }();
2839
- /**
2840
- * 选择公司
2841
- * @param {*} item
2842
- */
2843
- var handleChangeOrdinary = function handleChangeOrdinary(item) {
2844
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
2845
- ordinaryTaitou: item.kpName,
2846
- ordinarySerial: item.kpCode
2847
- });
2848
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2({}, newValue));
2849
- setVisible(false);
2850
- };
2851
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Item, {
2852
- label: "\u53D1\u7968\u91D1\u989D",
2853
- required: required,
2854
- className: "invoice-title--basic"
2855
- }, /*#__PURE__*/React.createElement(Input, {
2856
- disabled: disabled,
2857
- value: value === null || value === void 0 ? void 0 : value.ordinaryMoney,
2858
- min: "0",
2859
- placeholder: "\u8BF7\u8F93\u5165\u5F00\u7968\u91D1\u989D,\u6700\u59272\u4F4D\u5C0F\u6570",
2860
- onChange: handleMoneyClick
2861
- })), /*#__PURE__*/React.createElement(Form.Item, {
2862
- label: "\u53D1\u7968\u62AC\u5934",
2863
- required: required,
2864
- className: "invoice-title--basic"
2865
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
2866
- style: {
2867
- display: 'flex',
2868
- alignItems: 'center'
2869
- }
2870
- }, /*#__PURE__*/React.createElement(Input, {
2871
- disabled: disabled,
2872
- value: value === null || value === void 0 ? void 0 : value.ordinaryTaitou,
2873
- placeholder: "\u8BF7\u8F93\u5165\u53D1\u7968\u62AC\u5934",
2874
- onChange: handleInputChange
2875
- }), !disabled && /*#__PURE__*/React.createElement(Button, {
2876
- onClick: handleButtonClick,
2877
- className: "btn-discern"
2878
- }, "\u667A\u80FD\u8BC6\u522B")), visible ? /*#__PURE__*/React.createElement("div", {
2879
- className: "cardBox"
2880
- }, list.map(function (item) {
2881
- return /*#__PURE__*/React.createElement("div", {
2882
- className: "cardli",
2883
- key: item.kpCode,
2884
- onClick: function onClick() {
2885
- handleChangeOrdinary(item);
2886
- }
2887
- }, /*#__PURE__*/React.createElement("p", {
2888
- className: "cardText"
2889
- }, item.kpName1, /*#__PURE__*/React.createElement("span", {
2890
- className: "c-f60"
2891
- }, item.kpName2), item.kpName3), /*#__PURE__*/React.createElement("p", {
2892
- className: "cardText"
2893
- }, item.kpCode));
2894
- })) : null)), /*#__PURE__*/React.createElement(Form.Item, {
2895
- label: "\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
2896
- required: required,
2897
- className: "invoice-title--basic"
2898
- }, /*#__PURE__*/React.createElement(Input, {
2899
- disabled: disabled,
2900
- // style={{ width: 250 }}
2901
- placeholder: "\u8BF7\u8F93\u5165\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
2902
- value: value === null || value === void 0 ? void 0 : value.ordinarySerial,
2903
- onChange: handleValueClick
2904
- })));
2905
- };
2906
-
2907
- var RadioGroup = Radio.Group;
2908
- var Status = function Status(props) {
2909
- var customStatusText = props.customStatusText,
2910
- isSelectStyle = props.isSelectStyle,
2911
- isUseCustomStatus = props.isUseCustomStatus,
2912
- _props$value = props.value,
2913
- value = _props$value === void 0 ? {
2914
- status: '',
2915
- customerService: []
2916
- } : _props$value,
2917
- shopId = props.shopId,
2918
- disabled = props.disabled,
2919
- isEditing = props.isEditing,
2920
- onChange = props.onChange,
2921
- required = props.required,
2922
- originCustomer = props.originCustomer;
2923
- var _useState = useState([]),
2924
- _useState2 = _slicedToArray(_useState, 2),
2925
- dataSource = _useState2[0],
2926
- setDataSource = _useState2[1];
2927
- useEffect(function () {
2928
- if (shopId) {
2929
- extendRequest('/qy/gdfw/template/querySubUsers', {
2930
- method: 'get',
2931
- params: {
2932
- shopId: shopId
2933
- }
2934
- }).then(function (res) {
2935
- var dataList = (res === null || res === void 0 ? void 0 : res.data) || [];
2936
- dataList.length && setDataSource(dataList);
2937
- });
2938
- }
2939
- }, [shopId]);
2940
- var getOptions = function getOptions() {
2941
- var text = '处理';
2942
- if (isUseCustomStatus) {
2943
- text = customStatusText;
2944
- }
2945
- return [{
2946
- label: "\u672A".concat(text),
2947
- value: '0'
2948
- }, {
2949
- label: "\u5DF2".concat(text),
2950
- value: '1'
2951
- }];
2952
- };
2953
- var handleSelectChangeStatus = function handleSelectChangeStatus(val) {
2954
- if (isEditing && val === '1') {
2955
- onChange({
2956
- status: val,
2957
- customerService: originCustomer
2958
- });
2959
- return;
2960
- }
2961
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
2962
- status: val
2963
- }));
2964
- };
2965
- var handleChangeStatus = function handleChangeStatus(e) {
2966
- if (isEditing && e.target.value === '1') {
2967
- onChange({
2968
- status: e.target.value,
2969
- customerService: originCustomer
2970
- });
2971
- return;
2972
- }
2973
- onChange(_objectSpread2(_objectSpread2({}, value), {}, {
2974
- status: e.target.value
2975
- }));
2976
- };
2977
- var handleChangeCustomerService = function handleChangeCustomerService(val) {
2978
- return onChange(_objectSpread2(_objectSpread2({}, value), {}, {
2979
- customerService: val
2980
- }));
2981
- };
2982
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2983
- className: 'status-payment--basic'
2984
- }, /*#__PURE__*/React.createElement(Form.Item, {
2985
- label: "\u5DE5\u5355\u72B6\u6001",
2986
- required: required
2987
- }, isSelectStyle ? /*#__PURE__*/React.createElement(Select, {
2988
- disabled: disabled,
2989
- value: value === null || value === void 0 ? void 0 : value.status,
2990
- onChange: handleSelectChangeStatus,
2991
- style: {
2992
- width: '100px'
2993
- }
2994
- }, getOptions().map(function (item) {
2995
- return /*#__PURE__*/React.createElement(Select.Option, {
2996
- value: item.value,
2997
- key: item.value
2998
- }, item.label);
2999
- })) : /*#__PURE__*/React.createElement(RadioGroup, {
3000
- value: value === null || value === void 0 ? void 0 : value.status,
3001
- onChange: handleChangeStatus
3002
- }, getOptions().map(function (item) {
3003
- return /*#__PURE__*/React.createElement(Radio, {
3004
- value: item.value,
3005
- key: item.value,
3006
- disabled: disabled
3007
- }, item.label);
3008
- }))), /*#__PURE__*/React.createElement(Form.Item, {
3009
- label: "\u5904\u7406\u5BA2\u670D",
3010
- required: required
3011
- }, /*#__PURE__*/React.createElement(Select, {
3012
- mode: "multiple",
3013
- showSearch: true,
3014
- placeholder: "\u8BF7\u9009\u62E9",
3015
- allowClear: true,
3016
- disabled: disabled || isEditing && (value === null || value === void 0 ? void 0 : value.status) === '1',
3017
- style: {
3018
- width: '340px',
3019
- marginTop: '8px'
3020
- },
3021
- value: value === null || value === void 0 ? void 0 : value.customerService,
3022
- onChange: handleChangeCustomerService
3023
- }, dataSource.map(function (data) {
3024
- return /*#__PURE__*/React.createElement(Select.Option, {
3025
- value: data.subUserName,
3026
- key: data.subUserName
3027
- }, data.subUserName);
3028
- })))));
3029
- };
3030
-
3031
- var Payment = function Payment(props) {
3032
- var value = props.value,
3033
- disabled = props.disabled,
3034
- _props$id = props.id,
3035
- id = _props$id === void 0 ? '' : _props$id,
3036
- required = props.required,
3037
- zhiFubaoRequired = props.zhiFubaoRequired,
3038
- shopId = props.shopId,
3039
- shopList = props.shopList,
3040
- onChange = props.onChange,
3041
- onSearch = props.onSearch,
3042
- _onBlur = props.onBlur;
3043
- useEffect(function () {
3044
- var platformList = ['TAOBAO', 'FXG'];
3045
- var showBuyerId = (shopList || []).some(function (item) {
3046
- return item.shopId == shopId && platformList.includes(item.shopSourceStr);
3047
- });
3048
- //如果不是淘宝店铺 旺旺id为空
3049
- if (!showBuyerId) {
3050
- onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
3051
- enterprisePaymentBuyerOpenUid: ''
3052
- }));
3053
- }
3054
- }, [shopId, shopList]);
3055
- var changeValue = function changeValue(e, type) {
3056
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value));
3057
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
3058
- type === 'enterprisePaymentTid' && (onSearch === null || onSearch === void 0 ? void 0 : onSearch(e));
3059
- };
3060
- var PaymentList = [{
3061
- label: '订单编号',
3062
- name: 'enterprisePaymentTid',
3063
- placeholder: '请输入订单编号',
3064
- required: required,
3065
- show: true
3066
- }, {
3067
- label: '打款金额',
3068
- name: 'enterprisePaymentRefundFee',
3069
- placeholder: '请输入打款金额',
3070
- required: required,
3071
- show: true
3072
- }, {
3073
- label: '买家昵称',
3074
- name: 'enterprisePaymentBuyerNick',
3075
- placeholder: '请输入买家昵称',
3076
- required: false,
3077
- show: true
3078
- }, {
3079
- label: '支付宝名称',
3080
- name: 'enterprisePaymentAlipayNick',
3081
- placeholder: '请输入支付宝名称',
3082
- required: zhiFubaoRequired,
3083
- show: true
3084
- }, {
3085
- label: '支付宝账号',
3086
- name: 'enterprisePaymentAlipayNo',
3087
- placeholder: '请输入支付宝账号',
3088
- required: zhiFubaoRequired,
3089
- show: true
3090
- }];
3091
- return /*#__PURE__*/React.createElement(React.Fragment, null, PaymentList.map(function (item) {
3092
- return item.show && /*#__PURE__*/React.createElement(Form.Item, {
3093
- label: item.label,
3094
- name: [id, item.name],
3095
- key: item.name,
3096
- required: item.required
3097
- }, /*#__PURE__*/React.createElement(Input, {
3098
- disabled: disabled,
3099
- placeholder: item.placeholder,
3100
- value: value === null || value === void 0 ? void 0 : value[item.name],
3101
- onChange: function onChange(e) {
3102
- return changeValue(e, item.name);
3103
- },
3104
- onBlur: function onBlur(e) {
3105
- return _onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e.target.value, item.name);
3106
- }
3107
- }));
3108
- }));
3109
- };
3110
-
3111
- var css_248z$6 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border: 1px solid #F2F3F5;\n margin: 0 10px 10px 0;\n text-align: center;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4E5969;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodMain {\n display: flex;\n flex-wrap: wrap;\n height: 265px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodMain .goodItem {\n width: 140px;\n height: 175px;\n padding: 11px 10px 0;\n text-align: center;\n display: inline-block;\n vertical-align: top;\n margin-bottom: 10px;\n margin-right: 30px;\n border: 1px solid #e6e6e6;\n cursor: pointer;\n transition: border 0.3s;\n}\n.goodMain .goodItem .goodImg {\n width: 120px;\n height: 120px;\n}\n.goodMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodMain .goodItem.active {\n border: 1px solid #3089dc;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n";
3112
- styleInject(css_248z$6);
3113
-
3114
- var TabPane$1 = Tabs.TabPane;
3115
- var Option$2 = Select.Option;
3116
- var Search$1 = Input.Search;
3117
- var GoodsModal$1 = function GoodsModal(props) {
3118
- var onSubmit = props.onSubmit,
3119
- _onCancel = props.onCancel,
3120
- visible = props.visible,
3121
- type = props.type,
3122
- shopId = props.shopId,
3123
- imgList = props.imgList,
3124
- maxLength = props.maxLength,
3125
- shopList = props.shopList;
3126
- var _useState = useState([]),
3127
- _useState2 = _slicedToArray(_useState, 2),
3128
- selectList = _useState2[0],
3129
- setSelect = _useState2[1];
3130
- var _useState3 = useState([]),
3131
- _useState4 = _slicedToArray(_useState3, 2),
3132
- selectIds = _useState4[0],
3133
- setSelectIds = _useState4[1];
3134
- var _useState5 = useState([]),
3135
- _useState6 = _slicedToArray(_useState5, 2),
3136
- goodList = _useState6[0],
3137
- setGoodList = _useState6[1];
3138
- var _useState7 = useState(false),
3139
- _useState8 = _slicedToArray(_useState7, 2),
3140
- loading = _useState8[0],
3141
- setLoading = _useState8[1];
3142
- var _useState9 = useState({
3143
- apiName: 'queryItems',
3144
- desc: true,
3145
- numIids: '',
3146
- orderBy: 'list_time',
3147
- pageNo: 1,
3148
- pageSize: 8,
3149
- shopId: shopId,
3150
- type: 'onSale',
3151
- cids: ''
3152
- }),
3153
- _useState10 = _slicedToArray(_useState9, 2),
3154
- searchParams = _useState10[0],
3155
- setSearch = _useState10[1];
3156
- var _useState11 = useState(0),
3157
- _useState12 = _slicedToArray(_useState11, 2),
3158
- total = _useState12[0],
3159
- setTotal = _useState12[1];
3160
- var _useState13 = useState(''),
3161
- _useState14 = _slicedToArray(_useState13, 2),
3162
- platform = _useState14[0],
3163
- setPlatform = _useState14[1]; //平台
3164
- var _useState15 = useState({}),
3165
- _useState16 = _slicedToArray(_useState15, 2),
3166
- shopInfo = _useState16[0],
3167
- setShopInfo = _useState16[1]; //店铺信息
3168
- var _useState17 = useState([{
3169
- tab: '出售中',
3170
- key: 'onSale'
3171
- }, {
3172
- tab: '仓库中',
3173
- key: 'inventory'
3174
- }, {
3175
- tab: '已选择',
3176
- key: 'all'
3177
- }]),
3178
- _useState18 = _slicedToArray(_useState17, 2),
3179
- tabs = _useState18[0],
3180
- setTabs = _useState18[1];
3181
- var _useState19 = useState([{
3182
- name: '上架时间',
3183
- value: 'list_time'
3184
- }, {
3185
- name: '按库存',
3186
- value: 'num'
3187
- }, {
3188
- name: '按价格',
3189
- value: 'price'
3190
- }]),
3191
- _useState20 = _slicedToArray(_useState19, 1),
3192
- goodSort = _useState20[0];
3193
- var _useState21 = useState([]),
3194
- _useState22 = _slicedToArray(_useState21, 2),
3195
- shell = _useState22[0],
3196
- setShell = _useState22[1];
3197
- var clickOrder = function clickOrder(sort) {
3198
- if (sort.value === searchParams.orderBy) {
3199
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
3200
- desc: !searchParams.desc
3201
- }));
3202
- } else {
3203
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
3204
- orderBy: sort.value
3205
- }));
3206
- }
3207
- };
3208
- var pageChange = function pageChange(page) {
3209
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
3210
- pageNo: page
3211
- }));
3212
- };
3213
- /**
3214
- * 选择商品
3215
- * @param good
3216
- * @returns
3217
- */
3218
- var changeItem = function changeItem(good) {
3219
- if (searchParams.type === 'all') {
3220
- var newSelect = selectList.filter(function (item) {
3221
- return item.numIid !== good.numIid;
3222
- });
3223
- setSelect(_toConsumableArray(newSelect));
3224
- var ids = newSelect.map(function (item) {
3225
- return item.numIid;
3226
- });
3227
- setSelectIds(ids);
3228
- } else {
3229
- if (type !== 3) {
3230
- setSelect([good]);
3231
- setSelectIds([good.numIid]);
3232
- } else {
3233
- if (selectList.length >= maxLength) {
3234
- message.error("\u6700\u591A\u6DFB\u52A0".concat(maxLength, "\u5F20"));
3235
- return;
3236
- }
3237
- var hasGood = selectList.some(function (t) {
3238
- return t.numIid === good.numIid;
3239
- });
3240
- if (hasGood) {
3241
- var newSelectList = selectList.filter(function (item) {
3242
- return item.numIid !== good.numIid;
3243
- });
3244
- setSelect(newSelectList);
3245
- var _ids = newSelectList.map(function (item) {
3246
- return item.numIid;
3247
- });
3248
- setSelectIds(_ids);
3249
- } else {
3250
- setSelect([].concat(_toConsumableArray(selectList), [good]));
3251
- setSelectIds([].concat(_toConsumableArray(selectIds), [good.numIid]));
3252
- }
3253
- }
3254
- }
3255
- };
3256
- /**
3257
- * 获取分类列表
3258
- */
3259
- var querySellerCat = function querySellerCat() {
3260
- extendRequest('/qy/gdfw/workOrder/querySellerCat', {
3261
- method: 'get',
3262
- params: {
3263
- shopId: shopId || 257615501,
3264
- apiName: 'querySellerCat'
3265
- }
3266
- }).then(function (res) {
3267
- var arr = [{
3268
- value: '',
3269
- label: '所有分类'
3270
- }];
3271
- (res.data || []).forEach(function (item) {
3272
- var category = item.category,
3273
- _item$children = item.children,
3274
- children = _item$children === void 0 ? [] : _item$children;
3275
- arr.push({
3276
- label: "| ".concat(category.name),
3277
- value: [category.value].concat(_toConsumableArray(children.map(function (v) {
3278
- return v.value;
3279
- }))).join(',')
3280
- });
3281
- children.forEach(function (c) {
3282
- arr.push({
3283
- label: "|-- ".concat(c.name),
3284
- value: c.value
3285
- });
3286
- });
3287
- });
3288
- setShell([].concat(arr));
3289
- });
3290
- };
3291
- /**
3292
- *
3293
- * @returns 获取查询参数
3294
- */
3295
- var queryPd = function queryPd() {
3296
- return {
3297
- apiName: 'queryItems',
3298
- desc: searchParams.desc,
3299
- productIds: searchParams.numIids,
3300
- orderBy: searchParams.orderBy,
3301
- pageNo: searchParams.pageNo,
3302
- pageSize: searchParams.pageSize,
3303
- shopId: shopId,
3304
- type: searchParams.type
3305
- };
3306
- };
3307
- /**
3308
- * 查询商品
3309
- */
3310
- var queryItems = /*#__PURE__*/function () {
3311
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(platform) {
3312
- var res, _ref2, items, totalCount, params, _res, _ref3, list, _total;
3313
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3314
- while (1) switch (_context.prev = _context.next) {
3315
- case 0:
3316
- _context.prev = 0;
3317
- setLoading(true);
3318
- if (!(platform === 'taobao')) {
3319
- _context.next = 11;
3320
- break;
3321
- }
3322
- _context.next = 5;
3323
- return extendRequest('/qy/gdfw/workOrder/queryItems', {
3324
- method: 'post',
3325
- data: queryPd()
3326
- });
3327
- case 5:
3328
- res = _context.sent;
3329
- _ref2 = res.data || {
3330
- items: [],
3331
- totalCount: 0
3332
- }, items = _ref2.items, totalCount = _ref2.totalCount;
3333
- setGoodList(_toConsumableArray(items));
3334
- setTotal(totalCount);
3335
- _context.next = 23;
3336
- break;
3337
- case 11:
3338
- params = _objectSpread2({}, queryPd());
3339
- params.shopName = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopName;
3340
- params.platform = platform;
3341
- params.status = params.type === 'onSale' ? 1 : 0;
3342
- delete params.type;
3343
- _context.next = 18;
3344
- return extendRequest('/qy/gdfw/product/listProduct', {
3345
- method: 'post',
3346
- data: params
3347
- });
3348
- case 18:
3349
- _res = _context.sent;
3350
- _ref3 = _res.data || {
3351
- result: [],
3352
- total: 0
3353
- }, list = _ref3.result, _total = _ref3.total;
3354
- list.forEach(function (item) {
3355
- item.numIid = item.productId;
3356
- item.outerId = item.outId;
3357
- item.title = item.productName;
3358
- item.platform = platform;
3359
- });
3360
- setGoodList(_toConsumableArray(list));
3361
- setTotal(_total);
3362
- case 23:
3363
- _context.prev = 23;
3364
- setLoading(false);
3365
- return _context.finish(23);
3366
- case 26:
3367
- case "end":
3368
- return _context.stop();
3369
- }
3370
- }, _callee, null, [[0,, 23, 26]]);
3371
- }));
3372
- return function queryItems(_x) {
3373
- return _ref.apply(this, arguments);
3374
- };
3375
- }();
3376
- var getItem = function getItem(searchParams, platform) {
3377
- if (searchParams.type === 'all') {
3378
- return;
3379
- } else {
3380
- queryItems(platform);
3381
- }
3382
- };
3383
- /**
3384
- * 获取平台
3385
- */
3386
- var setPlatformHandle = function setPlatformHandle(platform) {
3387
- platform === 'taobao' && querySellerCat();
3388
- };
3389
- useEffect(function () {
3390
- var shopInfo = shopList.find(function (item) {
3391
- return shopId === item.shopId || shopId === item.shopName;
3392
- });
3393
- setShopInfo(shopInfo);
3394
- var platform = shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.shopSourceStr.toLowerCase();
3395
- setPlatform(platform);
3396
- }, [shopId, shopList]);
3397
- useEffect(function () {
3398
- setPlatformHandle(platform);
3399
- if (imgList.length) {
3400
- setSelect(imgList);
3401
- var ids = imgList.map(function (item) {
3402
- return item.numIid;
3403
- });
3404
- setSelectIds(ids);
3405
- }
3406
- }, [platform]);
3407
- useEffect(function () {
3408
- getItem(searchParams, platform);
3409
- }, [searchParams, platform]);
3410
- return /*#__PURE__*/React.createElement(Modal, {
3411
- title: '选择宝贝',
3412
- okText: '确认',
3413
- cancelText: '取消',
3414
- visible: visible,
3415
- width: 730,
3416
- onCancel: function onCancel() {
3417
- _onCancel();
3418
- },
3419
- onOk: function onOk() {
3420
- onSubmit(selectList);
3421
- }
3422
- }, /*#__PURE__*/React.createElement(Tabs, {
3423
- type: "card",
3424
- activeKey: searchParams.type,
3425
- onChange: function onChange(e) {
3426
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
3427
- type: e
3428
- }));
3429
- }
3430
- }, tabs.map(function (tab) {
3431
- return /*#__PURE__*/React.createElement(TabPane$1, {
3432
- tab: tab.tab + (tab.key === 'all' ? "(".concat(selectList.length, ")") : ''),
3433
- key: tab.key
3434
- });
3435
- })), /*#__PURE__*/React.createElement("div", {
3436
- className: "searchBox"
3437
- }, /*#__PURE__*/React.createElement(Radio.Group, {
3438
- value: searchParams.orderBy,
3439
- onChange: function onChange(e) {
3440
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
3441
- orderBy: e.target.value
3442
- }));
3443
- }
3444
- }, goodSort.map(function (sort) {
3445
- return /*#__PURE__*/React.createElement(Button, {
3446
- type: sort.value === searchParams.orderBy ? 'primary' : 'default',
3447
- onClick: function onClick() {
3448
- clickOrder(sort);
3449
- },
3450
- key: sort.value
3451
- }, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React.createElement("span", null, "\u21BE") :
3452
- /*#__PURE__*/
3453
- // <SwapLeftOutlined className="deg90" />
3454
- React.createElement("span", null, "\u21C2")
3455
- // <SwapRightOutlined className="deg90" />
3456
- : /*#__PURE__*/React.createElement("span", null, "\u21C5"));
3457
- })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
3458
- style: {
3459
- width: '150px'
3460
- },
3461
- value: searchParams.cids,
3462
- onSelect: function onSelect(value) {
3463
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
3464
- cids: value
3465
- }));
3466
- }
3467
- }, shell.map(function (item) {
3468
- return /*#__PURE__*/React.createElement(Option$2, {
3469
- value: item.value,
3470
- key: item.value
3471
- }, item.label);
3472
- })), /*#__PURE__*/React.createElement(Search$1, {
3473
- placeholder: "\u5B9D\u8D1D\u94FE\u63A5\uFF0C\u6807\u9898",
3474
- allowClear: true,
3475
- enterButton: "\u641C\u7D22",
3476
- style: {
3477
- width: '200px'
3478
- },
3479
- value: searchParams.title,
3480
- onSearch: function onSearch(e) {
3481
- setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
3482
- title: e
3483
- }));
3484
- }
3485
- }))), /*#__PURE__*/React.createElement("div", {
3486
- className: "goodMain"
3487
- }, /*#__PURE__*/React.createElement(Spin, {
3488
- spinning: loading
3489
- }, (searchParams.type == 'all' ? selectList : goodList).map(function (good) {
3490
- return /*#__PURE__*/React.createElement("div", {
3491
- key: good.numIid,
3492
- className: "goodItem ".concat(selectIds.includes(good.numIid) ? 'active' : ''),
3493
- onClick: function onClick() {
3494
- changeItem(good);
3495
- }
3496
- }, /*#__PURE__*/React.createElement("div", {
3497
- className: "goodImg"
3498
- }, /*#__PURE__*/React.createElement("img", {
3499
- src: good.picUrl,
3500
- alt: "",
3501
- className: "img"
3502
- })), /*#__PURE__*/React.createElement("div", {
3503
- className: "goodText"
3504
- }, good.title), /*#__PURE__*/React.createElement("div", null, "\xA5", good.price));
3505
- }))), /*#__PURE__*/React.createElement(Pagination, {
3506
- total: total,
3507
- current: searchParams.pageNo,
3508
- pageSize: searchParams.pageSize,
3509
- onChange: pageChange
3510
- }));
3511
- };
3512
-
3513
- var Goods$1 = function Goods(props, ref) {
3514
- var _props$value = props.value,
3515
- shopId = _props$value.shopId,
3516
- _props$value$imgList = _props$value.imgList,
3517
- imgList = _props$value$imgList === void 0 ? [] : _props$value$imgList,
3518
- maxLength = props.maxLength,
3519
- onChange = props.onChange,
3520
- type = props.type,
3521
- shopList = props.shopList,
3522
- enableItemId = props.enableItemId,
3523
- enableSupplierName = props.enableSupplierName,
3524
- userNick = props.userNick;
3525
- var _useState = useState(false),
3526
- _useState2 = _slicedToArray(_useState, 2),
3527
- visible = _useState2[0],
3528
- setVisible = _useState2[1];
3529
- var skuRef = useRef();
3530
- useImperativeHandle(ref, function () {
3531
- return {
3532
- open: function open() {
3533
- return setVisible(true);
3534
- },
3535
- close: function close() {
3536
- return setVisible(false);
3537
- }
3538
- };
3539
- }, []);
3540
- var handleSelectSku = function handleSelectSku(_ref) {
3541
- var enableItemId = _ref.enableItemId,
3542
- enableSupplierName = _ref.enableSupplierName;
3543
- var newValue = {
3544
- shopId: shopId,
3545
- imgList: [_objectSpread2(_objectSpread2({}, imgList[0]), {}, {
3546
- supplierItemOuterId: enableItemId,
3547
- supplierName: enableSupplierName
3548
- })]
3549
- };
3550
- onChange(_objectSpread2({}, newValue));
3551
- };
3552
- var onSubmit = function onSubmit(list) {
3553
- var newValue = {
3554
- shopId: shopId,
3555
- imgList: _toConsumableArray(list)
3556
- };
3557
- onChange(_objectSpread2({}, newValue));
3558
- setVisible(false);
3559
- if (type === 4 && (enableItemId || enableSupplierName) && list.length > 0) {
3560
- var _skuRef$current;
3561
- (_skuRef$current = skuRef.current) === null || _skuRef$current === void 0 ? void 0 : _skuRef$current.open({
3562
- shopId: shopId,
3563
- numIids: list[0].numIid
3564
- });
3565
- }
3566
- };
3567
- return /*#__PURE__*/React.createElement("div", {
3568
- className: "goodsBox"
3569
- }, /*#__PURE__*/React.createElement(GoodsModal$1, {
3570
- visible: visible,
3571
- onSubmit: onSubmit,
3572
- type: type,
3573
- imgList: imgList,
3574
- shopList: shopList,
3575
- shopId: shopId,
3576
- maxLength: maxLength,
3577
- onCancel: function onCancel() {
3578
- setVisible(false);
3579
- }
3580
- }), /*#__PURE__*/React.createElement(Sku, {
3581
- handleOk: handleSelectSku,
3582
- ref: skuRef,
3583
- userNick: userNick
3584
- }));
3585
- };
3586
- var index = /*#__PURE__*/forwardRef(Goods$1);
3587
-
3588
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasMultipleSelect, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, BuyerNick, ChooseBaby, ExpressLogistics, index as GoodsTable, Invoice, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId };