@kmkf-fe-packages/basic-components 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.esm.js +828 -278
- package/dist/index.js +830 -277
- package/dist/src/common/CommonExchangeGoods/index.d.ts +3 -0
- package/dist/src/common/CommonReturnGoods/index.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var zhCN = require('antd/lib/locale/zh_CN');
|
|
|
12
12
|
var lodash = require('lodash');
|
|
13
13
|
var ahooks = require('ahooks');
|
|
14
14
|
var pubsub = require('pubsub-js');
|
|
15
|
+
var BigNumber = require('bignumber.js');
|
|
15
16
|
|
|
16
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
18
|
|
|
@@ -19,378 +20,365 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
19
20
|
var request__default = /*#__PURE__*/_interopDefaultLegacy(request);
|
|
20
21
|
var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
|
|
21
22
|
var pubsub__default = /*#__PURE__*/_interopDefaultLegacy(pubsub);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
var BigNumber__default = /*#__PURE__*/_interopDefaultLegacy(BigNumber);
|
|
24
|
+
|
|
25
|
+
function _iterableToArrayLimit(arr, i) {
|
|
26
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
27
|
+
if (null != _i) {
|
|
28
|
+
var _s,
|
|
29
|
+
_e,
|
|
30
|
+
_x,
|
|
31
|
+
_r,
|
|
32
|
+
_arr = [],
|
|
33
|
+
_n = !0,
|
|
34
|
+
_d = !1;
|
|
33
35
|
try {
|
|
34
|
-
if (
|
|
35
|
-
if (Object(
|
|
36
|
-
|
|
37
|
-
} else for (; !(
|
|
38
|
-
} catch (
|
|
39
|
-
|
|
36
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
37
|
+
if (Object(_i) !== _i) return;
|
|
38
|
+
_n = !1;
|
|
39
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
40
|
+
} catch (err) {
|
|
41
|
+
_d = !0, _e = err;
|
|
40
42
|
} finally {
|
|
41
43
|
try {
|
|
42
|
-
if (!
|
|
44
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
43
45
|
} finally {
|
|
44
|
-
if (
|
|
46
|
+
if (_d) throw _e;
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
|
-
return
|
|
49
|
+
return _arr;
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
function ownKeys(
|
|
51
|
-
var
|
|
52
|
+
function ownKeys(object, enumerableOnly) {
|
|
53
|
+
var keys = Object.keys(object);
|
|
52
54
|
if (Object.getOwnPropertySymbols) {
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
return Object.getOwnPropertyDescriptor(
|
|
56
|
-
})),
|
|
55
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
56
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
58
|
+
})), keys.push.apply(keys, symbols);
|
|
57
59
|
}
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
function _objectSpread2(
|
|
61
|
-
for (var
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
_defineProperty(
|
|
65
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
66
|
-
Object.defineProperty(
|
|
60
|
+
return keys;
|
|
61
|
+
}
|
|
62
|
+
function _objectSpread2(target) {
|
|
63
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
64
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
65
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
66
|
+
_defineProperty(target, key, source[key]);
|
|
67
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
68
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
67
69
|
});
|
|
68
70
|
}
|
|
69
|
-
return
|
|
71
|
+
return target;
|
|
70
72
|
}
|
|
71
73
|
function _regeneratorRuntime() {
|
|
72
74
|
_regeneratorRuntime = function () {
|
|
73
|
-
return
|
|
74
|
-
};
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
t[e] = r.value;
|
|
75
|
+
return exports;
|
|
76
|
+
};
|
|
77
|
+
var exports = {},
|
|
78
|
+
Op = Object.prototype,
|
|
79
|
+
hasOwn = Op.hasOwnProperty,
|
|
80
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
81
|
+
obj[key] = desc.value;
|
|
81
82
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
function define(
|
|
87
|
-
return Object.defineProperty(
|
|
88
|
-
value:
|
|
83
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
84
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
85
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
86
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
87
|
+
function define(obj, key, value) {
|
|
88
|
+
return Object.defineProperty(obj, key, {
|
|
89
|
+
value: value,
|
|
89
90
|
enumerable: !0,
|
|
90
91
|
configurable: !0,
|
|
91
92
|
writable: !0
|
|
92
|
-
}),
|
|
93
|
+
}), obj[key];
|
|
93
94
|
}
|
|
94
95
|
try {
|
|
95
96
|
define({}, "");
|
|
96
|
-
} catch (
|
|
97
|
-
define = function (
|
|
98
|
-
return
|
|
97
|
+
} catch (err) {
|
|
98
|
+
define = function (obj, key, value) {
|
|
99
|
+
return obj[key] = value;
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
|
-
function wrap(
|
|
102
|
-
var
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return
|
|
106
|
-
value: makeInvokeMethod(
|
|
107
|
-
}),
|
|
102
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
103
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
104
|
+
generator = Object.create(protoGenerator.prototype),
|
|
105
|
+
context = new Context(tryLocsList || []);
|
|
106
|
+
return defineProperty(generator, "_invoke", {
|
|
107
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
108
|
+
}), generator;
|
|
108
109
|
}
|
|
109
|
-
function tryCatch(
|
|
110
|
+
function tryCatch(fn, obj, arg) {
|
|
110
111
|
try {
|
|
111
112
|
return {
|
|
112
113
|
type: "normal",
|
|
113
|
-
arg:
|
|
114
|
+
arg: fn.call(obj, arg)
|
|
114
115
|
};
|
|
115
|
-
} catch (
|
|
116
|
+
} catch (err) {
|
|
116
117
|
return {
|
|
117
118
|
type: "throw",
|
|
118
|
-
arg:
|
|
119
|
+
arg: err
|
|
119
120
|
};
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
l = "suspendedYield",
|
|
125
|
-
f = "executing",
|
|
126
|
-
s = "completed",
|
|
127
|
-
y = {};
|
|
123
|
+
exports.wrap = wrap;
|
|
124
|
+
var ContinueSentinel = {};
|
|
128
125
|
function Generator() {}
|
|
129
126
|
function GeneratorFunction() {}
|
|
130
127
|
function GeneratorFunctionPrototype() {}
|
|
131
|
-
var
|
|
132
|
-
define(
|
|
128
|
+
var IteratorPrototype = {};
|
|
129
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
133
130
|
return this;
|
|
134
131
|
});
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
var
|
|
139
|
-
function defineIteratorMethods(
|
|
140
|
-
["next", "throw", "return"].forEach(function (
|
|
141
|
-
define(
|
|
142
|
-
return this._invoke(
|
|
132
|
+
var getProto = Object.getPrototypeOf,
|
|
133
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
134
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
135
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
136
|
+
function defineIteratorMethods(prototype) {
|
|
137
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
138
|
+
define(prototype, method, function (arg) {
|
|
139
|
+
return this._invoke(method, arg);
|
|
143
140
|
});
|
|
144
141
|
});
|
|
145
142
|
}
|
|
146
|
-
function AsyncIterator(
|
|
147
|
-
function invoke(
|
|
148
|
-
var
|
|
149
|
-
if ("throw" !==
|
|
150
|
-
var
|
|
151
|
-
|
|
152
|
-
return
|
|
153
|
-
invoke("next",
|
|
154
|
-
}, function (
|
|
155
|
-
invoke("throw",
|
|
156
|
-
}) :
|
|
157
|
-
|
|
158
|
-
}, function (
|
|
159
|
-
return invoke("throw",
|
|
143
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
144
|
+
function invoke(method, arg, resolve, reject) {
|
|
145
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
146
|
+
if ("throw" !== record.type) {
|
|
147
|
+
var result = record.arg,
|
|
148
|
+
value = result.value;
|
|
149
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
150
|
+
invoke("next", value, resolve, reject);
|
|
151
|
+
}, function (err) {
|
|
152
|
+
invoke("throw", err, resolve, reject);
|
|
153
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
154
|
+
result.value = unwrapped, resolve(result);
|
|
155
|
+
}, function (error) {
|
|
156
|
+
return invoke("throw", error, resolve, reject);
|
|
160
157
|
});
|
|
161
158
|
}
|
|
162
|
-
|
|
159
|
+
reject(record.arg);
|
|
163
160
|
}
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
value: function (
|
|
161
|
+
var previousPromise;
|
|
162
|
+
defineProperty(this, "_invoke", {
|
|
163
|
+
value: function (method, arg) {
|
|
167
164
|
function callInvokeWithMethodAndArg() {
|
|
168
|
-
return new
|
|
169
|
-
invoke(
|
|
165
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
166
|
+
invoke(method, arg, resolve, reject);
|
|
170
167
|
});
|
|
171
168
|
}
|
|
172
|
-
return
|
|
169
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
173
170
|
}
|
|
174
171
|
});
|
|
175
172
|
}
|
|
176
|
-
function makeInvokeMethod(
|
|
177
|
-
var
|
|
178
|
-
return function (
|
|
179
|
-
if (
|
|
180
|
-
if (
|
|
181
|
-
if ("throw" ===
|
|
182
|
-
return
|
|
183
|
-
value: t,
|
|
184
|
-
done: !0
|
|
185
|
-
};
|
|
173
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
174
|
+
var state = "suspendedStart";
|
|
175
|
+
return function (method, arg) {
|
|
176
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
177
|
+
if ("completed" === state) {
|
|
178
|
+
if ("throw" === method) throw arg;
|
|
179
|
+
return doneResult();
|
|
186
180
|
}
|
|
187
|
-
for (
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
if (
|
|
193
|
-
return
|
|
181
|
+
for (context.method = method, context.arg = arg;;) {
|
|
182
|
+
var delegate = context.delegate;
|
|
183
|
+
if (delegate) {
|
|
184
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
185
|
+
if (delegateResult) {
|
|
186
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
187
|
+
return delegateResult;
|
|
194
188
|
}
|
|
195
189
|
}
|
|
196
|
-
if ("next" ===
|
|
197
|
-
if (
|
|
198
|
-
|
|
199
|
-
} else "return" ===
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
if ("normal" ===
|
|
203
|
-
if (
|
|
190
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
191
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
192
|
+
context.dispatchException(context.arg);
|
|
193
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
194
|
+
state = "executing";
|
|
195
|
+
var record = tryCatch(innerFn, self, context);
|
|
196
|
+
if ("normal" === record.type) {
|
|
197
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
204
198
|
return {
|
|
205
|
-
value:
|
|
206
|
-
done:
|
|
199
|
+
value: record.arg,
|
|
200
|
+
done: context.done
|
|
207
201
|
};
|
|
208
202
|
}
|
|
209
|
-
"throw" ===
|
|
203
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
210
204
|
}
|
|
211
205
|
};
|
|
212
206
|
}
|
|
213
|
-
function maybeInvokeDelegate(
|
|
214
|
-
var
|
|
215
|
-
|
|
216
|
-
if (
|
|
217
|
-
var
|
|
218
|
-
if ("throw" ===
|
|
219
|
-
var
|
|
220
|
-
return
|
|
207
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
208
|
+
var methodName = context.method,
|
|
209
|
+
method = delegate.iterator[methodName];
|
|
210
|
+
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;
|
|
211
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
212
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
213
|
+
var info = record.arg;
|
|
214
|
+
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);
|
|
221
215
|
}
|
|
222
|
-
function pushTryEntry(
|
|
223
|
-
var
|
|
224
|
-
tryLoc:
|
|
216
|
+
function pushTryEntry(locs) {
|
|
217
|
+
var entry = {
|
|
218
|
+
tryLoc: locs[0]
|
|
225
219
|
};
|
|
226
|
-
1 in
|
|
220
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
227
221
|
}
|
|
228
|
-
function resetTryEntry(
|
|
229
|
-
var
|
|
230
|
-
|
|
222
|
+
function resetTryEntry(entry) {
|
|
223
|
+
var record = entry.completion || {};
|
|
224
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
231
225
|
}
|
|
232
|
-
function Context(
|
|
226
|
+
function Context(tryLocsList) {
|
|
233
227
|
this.tryEntries = [{
|
|
234
228
|
tryLoc: "root"
|
|
235
|
-
}],
|
|
229
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
236
230
|
}
|
|
237
|
-
function values(
|
|
238
|
-
if (
|
|
239
|
-
var
|
|
240
|
-
if (
|
|
241
|
-
if ("function" == typeof
|
|
242
|
-
if (!isNaN(
|
|
243
|
-
var
|
|
244
|
-
|
|
245
|
-
for (; ++
|
|
246
|
-
return next.value =
|
|
231
|
+
function values(iterable) {
|
|
232
|
+
if (iterable) {
|
|
233
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
234
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
235
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
236
|
+
if (!isNaN(iterable.length)) {
|
|
237
|
+
var i = -1,
|
|
238
|
+
next = function next() {
|
|
239
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
240
|
+
return next.value = undefined, next.done = !0, next;
|
|
247
241
|
};
|
|
248
|
-
return
|
|
242
|
+
return next.next = next;
|
|
249
243
|
}
|
|
250
244
|
}
|
|
251
|
-
|
|
245
|
+
return {
|
|
246
|
+
next: doneResult
|
|
247
|
+
};
|
|
252
248
|
}
|
|
253
|
-
|
|
249
|
+
function doneResult() {
|
|
250
|
+
return {
|
|
251
|
+
value: undefined,
|
|
252
|
+
done: !0
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
254
256
|
value: GeneratorFunctionPrototype,
|
|
255
257
|
configurable: !0
|
|
256
|
-
}),
|
|
258
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
257
259
|
value: GeneratorFunction,
|
|
258
260
|
configurable: !0
|
|
259
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
260
|
-
var
|
|
261
|
-
return !!
|
|
262
|
-
},
|
|
263
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
264
|
-
},
|
|
261
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
262
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
263
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
264
|
+
}, exports.mark = function (genFun) {
|
|
265
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
266
|
+
}, exports.awrap = function (arg) {
|
|
265
267
|
return {
|
|
266
|
-
__await:
|
|
268
|
+
__await: arg
|
|
267
269
|
};
|
|
268
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
270
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
269
271
|
return this;
|
|
270
|
-
}),
|
|
271
|
-
void 0 ===
|
|
272
|
-
var
|
|
273
|
-
return
|
|
274
|
-
return
|
|
272
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
273
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
274
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
275
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
276
|
+
return result.done ? result.value : iter.next();
|
|
275
277
|
});
|
|
276
|
-
}, defineIteratorMethods(
|
|
278
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
277
279
|
return this;
|
|
278
|
-
}), define(
|
|
280
|
+
}), define(Gp, "toString", function () {
|
|
279
281
|
return "[object Generator]";
|
|
280
|
-
}),
|
|
281
|
-
var
|
|
282
|
-
|
|
283
|
-
for (var
|
|
284
|
-
return
|
|
285
|
-
for (;
|
|
286
|
-
var
|
|
287
|
-
if (
|
|
282
|
+
}), exports.keys = function (val) {
|
|
283
|
+
var object = Object(val),
|
|
284
|
+
keys = [];
|
|
285
|
+
for (var key in object) keys.push(key);
|
|
286
|
+
return keys.reverse(), function next() {
|
|
287
|
+
for (; keys.length;) {
|
|
288
|
+
var key = keys.pop();
|
|
289
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
288
290
|
}
|
|
289
291
|
return next.done = !0, next;
|
|
290
292
|
};
|
|
291
|
-
},
|
|
293
|
+
}, exports.values = values, Context.prototype = {
|
|
292
294
|
constructor: Context,
|
|
293
|
-
reset: function (
|
|
294
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
295
|
+
reset: function (skipTempReset) {
|
|
296
|
+
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);
|
|
295
297
|
},
|
|
296
298
|
stop: function () {
|
|
297
299
|
this.done = !0;
|
|
298
|
-
var
|
|
299
|
-
if ("throw" ===
|
|
300
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
301
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
300
302
|
return this.rval;
|
|
301
303
|
},
|
|
302
|
-
dispatchException: function (
|
|
303
|
-
if (this.done) throw
|
|
304
|
-
var
|
|
305
|
-
function handle(
|
|
306
|
-
return
|
|
304
|
+
dispatchException: function (exception) {
|
|
305
|
+
if (this.done) throw exception;
|
|
306
|
+
var context = this;
|
|
307
|
+
function handle(loc, caught) {
|
|
308
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
307
309
|
}
|
|
308
|
-
for (var
|
|
309
|
-
var
|
|
310
|
-
|
|
311
|
-
if ("root" ===
|
|
312
|
-
if (
|
|
313
|
-
var
|
|
314
|
-
|
|
315
|
-
if (
|
|
316
|
-
if (this.prev <
|
|
317
|
-
if (this.prev <
|
|
318
|
-
} else if (
|
|
319
|
-
if (this.prev <
|
|
310
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
311
|
+
var entry = this.tryEntries[i],
|
|
312
|
+
record = entry.completion;
|
|
313
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
314
|
+
if (entry.tryLoc <= this.prev) {
|
|
315
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
316
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
317
|
+
if (hasCatch && hasFinally) {
|
|
318
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
319
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
320
|
+
} else if (hasCatch) {
|
|
321
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
320
322
|
} else {
|
|
321
|
-
if (!
|
|
322
|
-
if (this.prev <
|
|
323
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
324
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
323
325
|
}
|
|
324
326
|
}
|
|
325
327
|
}
|
|
326
328
|
},
|
|
327
|
-
abrupt: function (
|
|
328
|
-
for (var
|
|
329
|
-
var
|
|
330
|
-
if (
|
|
331
|
-
var
|
|
329
|
+
abrupt: function (type, arg) {
|
|
330
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
331
|
+
var entry = this.tryEntries[i];
|
|
332
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
333
|
+
var finallyEntry = entry;
|
|
332
334
|
break;
|
|
333
335
|
}
|
|
334
336
|
}
|
|
335
|
-
|
|
336
|
-
var
|
|
337
|
-
return
|
|
337
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
338
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
339
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
338
340
|
},
|
|
339
|
-
complete: function (
|
|
340
|
-
if ("throw" ===
|
|
341
|
-
return "break" ===
|
|
341
|
+
complete: function (record, afterLoc) {
|
|
342
|
+
if ("throw" === record.type) throw record.arg;
|
|
343
|
+
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;
|
|
342
344
|
},
|
|
343
|
-
finish: function (
|
|
344
|
-
for (var
|
|
345
|
-
var
|
|
346
|
-
if (
|
|
345
|
+
finish: function (finallyLoc) {
|
|
346
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
347
|
+
var entry = this.tryEntries[i];
|
|
348
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
347
349
|
}
|
|
348
350
|
},
|
|
349
|
-
catch: function (
|
|
350
|
-
for (var
|
|
351
|
-
var
|
|
352
|
-
if (
|
|
353
|
-
var
|
|
354
|
-
if ("throw" ===
|
|
355
|
-
var
|
|
356
|
-
resetTryEntry(
|
|
351
|
+
catch: function (tryLoc) {
|
|
352
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
353
|
+
var entry = this.tryEntries[i];
|
|
354
|
+
if (entry.tryLoc === tryLoc) {
|
|
355
|
+
var record = entry.completion;
|
|
356
|
+
if ("throw" === record.type) {
|
|
357
|
+
var thrown = record.arg;
|
|
358
|
+
resetTryEntry(entry);
|
|
357
359
|
}
|
|
358
|
-
return
|
|
360
|
+
return thrown;
|
|
359
361
|
}
|
|
360
362
|
}
|
|
361
363
|
throw new Error("illegal catch attempt");
|
|
362
364
|
},
|
|
363
|
-
delegateYield: function (
|
|
365
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
364
366
|
return this.delegate = {
|
|
365
|
-
iterator: values(
|
|
366
|
-
resultName:
|
|
367
|
-
nextLoc:
|
|
368
|
-
}, "next" === this.method && (this.arg =
|
|
369
|
-
}
|
|
370
|
-
},
|
|
371
|
-
}
|
|
372
|
-
function _toPrimitive(t, r) {
|
|
373
|
-
if ("object" != typeof t || !t) return t;
|
|
374
|
-
var e = t[Symbol.toPrimitive];
|
|
375
|
-
if (void 0 !== e) {
|
|
376
|
-
var i = e.call(t, r || "default");
|
|
377
|
-
if ("object" != typeof i) return i;
|
|
378
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
379
|
-
}
|
|
380
|
-
return ("string" === r ? String : Number)(t);
|
|
381
|
-
}
|
|
382
|
-
function _toPropertyKey(t) {
|
|
383
|
-
var i = _toPrimitive(t, "string");
|
|
384
|
-
return "symbol" == typeof i ? i : String(i);
|
|
367
|
+
iterator: values(iterable),
|
|
368
|
+
resultName: resultName,
|
|
369
|
+
nextLoc: nextLoc
|
|
370
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
371
|
+
}
|
|
372
|
+
}, exports;
|
|
385
373
|
}
|
|
386
|
-
function _typeof(
|
|
374
|
+
function _typeof(obj) {
|
|
387
375
|
"@babel/helpers - typeof";
|
|
388
376
|
|
|
389
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
390
|
-
return typeof
|
|
391
|
-
} : function (
|
|
392
|
-
return
|
|
393
|
-
}, _typeof(
|
|
377
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
378
|
+
return typeof obj;
|
|
379
|
+
} : function (obj) {
|
|
380
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
381
|
+
}, _typeof(obj);
|
|
394
382
|
}
|
|
395
383
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
396
384
|
try {
|
|
@@ -497,6 +485,20 @@ function _nonIterableSpread() {
|
|
|
497
485
|
function _nonIterableRest() {
|
|
498
486
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
499
487
|
}
|
|
488
|
+
function _toPrimitive(input, hint) {
|
|
489
|
+
if (typeof input !== "object" || input === null) return input;
|
|
490
|
+
var prim = input[Symbol.toPrimitive];
|
|
491
|
+
if (prim !== undefined) {
|
|
492
|
+
var res = prim.call(input, hint || "default");
|
|
493
|
+
if (typeof res !== "object") return res;
|
|
494
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
495
|
+
}
|
|
496
|
+
return (hint === "string" ? String : Number)(input);
|
|
497
|
+
}
|
|
498
|
+
function _toPropertyKey(arg) {
|
|
499
|
+
var key = _toPrimitive(arg, "string");
|
|
500
|
+
return typeof key === "symbol" ? key : String(key);
|
|
501
|
+
}
|
|
500
502
|
|
|
501
503
|
function ApaasCascader(props) {
|
|
502
504
|
return /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
|
|
@@ -10453,7 +10455,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10453
10455
|
var wdtSendOptions = kmkfUtils.WdtSendData.getInstance().wdtSendData || [];
|
|
10454
10456
|
React.useEffect(function () {
|
|
10455
10457
|
//没有值塞个默认值
|
|
10456
|
-
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10458
|
+
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
10457
10459
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10458
10460
|
}
|
|
10459
10461
|
}, [value, type]);
|
|
@@ -10516,7 +10518,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10516
10518
|
return setChangeIndex(index);
|
|
10517
10519
|
}
|
|
10518
10520
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
10519
|
-
}))) : null, value.length ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, {
|
|
10521
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React__default['default'].createElement(ApaasLogistics, {
|
|
10520
10522
|
disabled: disabled,
|
|
10521
10523
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
10522
10524
|
onChange: function onChange(val) {
|
|
@@ -11673,9 +11675,34 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11673
11675
|
React.useEffect(function () {
|
|
11674
11676
|
setSelectedRowKeys([]);
|
|
11675
11677
|
}, [tableSelect, selectType]);
|
|
11676
|
-
var updateHandle = function updateHandle(val, index,
|
|
11678
|
+
var updateHandle = function updateHandle(val, index, columnType) {
|
|
11677
11679
|
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
11678
|
-
value[index][
|
|
11680
|
+
value[index][columnType] = val;
|
|
11681
|
+
if (type === 'WDT_RETURN_GOODS') {
|
|
11682
|
+
if (['sharePrice', 'num'].includes(columnType)) {
|
|
11683
|
+
var totalMoney = null;
|
|
11684
|
+
if (columnType === 'num') {
|
|
11685
|
+
totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].sharePrice));
|
|
11686
|
+
} else {
|
|
11687
|
+
totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
|
|
11688
|
+
}
|
|
11689
|
+
if (totalMoney !== null) {
|
|
11690
|
+
value[index]['returnPrice'] = totalMoney.toString();
|
|
11691
|
+
}
|
|
11692
|
+
}
|
|
11693
|
+
} else if (type === 'WDT_EXCHANGE_GOODS') {
|
|
11694
|
+
if (['price', 'num'].includes(columnType)) {
|
|
11695
|
+
var _totalMoney = null;
|
|
11696
|
+
if (columnType === 'num') {
|
|
11697
|
+
_totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].price));
|
|
11698
|
+
} else {
|
|
11699
|
+
_totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
|
|
11700
|
+
}
|
|
11701
|
+
if (_totalMoney !== null) {
|
|
11702
|
+
value[index]['exchangePrice'] = _totalMoney.toString();
|
|
11703
|
+
}
|
|
11704
|
+
}
|
|
11705
|
+
}
|
|
11679
11706
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11680
11707
|
}
|
|
11681
11708
|
};
|
|
@@ -11781,6 +11808,260 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11781
11808
|
}
|
|
11782
11809
|
}];
|
|
11783
11810
|
break;
|
|
11811
|
+
case 'WDT_RETURN_GOODS':
|
|
11812
|
+
{
|
|
11813
|
+
columns = [{
|
|
11814
|
+
dataIndex: 'goodId',
|
|
11815
|
+
title: "SPUID",
|
|
11816
|
+
align: 'center',
|
|
11817
|
+
ellipsis: true,
|
|
11818
|
+
width: 70
|
|
11819
|
+
}, {
|
|
11820
|
+
dataIndex: 'goodNo',
|
|
11821
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11822
|
+
align: 'center',
|
|
11823
|
+
ellipsis: true,
|
|
11824
|
+
width: 180
|
|
11825
|
+
}, {
|
|
11826
|
+
dataIndex: 'goodName',
|
|
11827
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11828
|
+
align: 'center',
|
|
11829
|
+
ellipsis: true,
|
|
11830
|
+
width: 250
|
|
11831
|
+
}, {
|
|
11832
|
+
dataIndex: 'specId',
|
|
11833
|
+
title: "".concat(text, "SKUID"),
|
|
11834
|
+
align: 'center',
|
|
11835
|
+
ellipsis: true,
|
|
11836
|
+
width: 100
|
|
11837
|
+
}, {
|
|
11838
|
+
dataIndex: 'specNo',
|
|
11839
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11840
|
+
align: 'center',
|
|
11841
|
+
ellipsis: true,
|
|
11842
|
+
width: 180
|
|
11843
|
+
}, {
|
|
11844
|
+
dataIndex: 'specName',
|
|
11845
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11846
|
+
align: 'center',
|
|
11847
|
+
ellipsis: true,
|
|
11848
|
+
width: 250
|
|
11849
|
+
}, {
|
|
11850
|
+
dataIndex: 'num',
|
|
11851
|
+
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
11852
|
+
align: 'center',
|
|
11853
|
+
ellipsis: true,
|
|
11854
|
+
width: 100,
|
|
11855
|
+
render: function render(val, record, index) {
|
|
11856
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11857
|
+
style: {
|
|
11858
|
+
width: 70
|
|
11859
|
+
},
|
|
11860
|
+
value: val,
|
|
11861
|
+
min: 1,
|
|
11862
|
+
precision: 0,
|
|
11863
|
+
onChange: function onChange(num) {
|
|
11864
|
+
return updateHandle(num, index, 'num');
|
|
11865
|
+
}
|
|
11866
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11867
|
+
}
|
|
11868
|
+
}, {
|
|
11869
|
+
dataIndex: 'sharePrice',
|
|
11870
|
+
title: "\u5206\u644A\u4EF7",
|
|
11871
|
+
align: 'center',
|
|
11872
|
+
ellipsis: true,
|
|
11873
|
+
width: 80,
|
|
11874
|
+
render: function render(val, record, index) {
|
|
11875
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11876
|
+
style: {
|
|
11877
|
+
width: 70
|
|
11878
|
+
},
|
|
11879
|
+
value: val,
|
|
11880
|
+
min: 0,
|
|
11881
|
+
onChange: function onChange(value) {
|
|
11882
|
+
return updateHandle(value, index, 'sharePrice');
|
|
11883
|
+
}
|
|
11884
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11885
|
+
}
|
|
11886
|
+
}, {
|
|
11887
|
+
dataIndex: 'returnPrice',
|
|
11888
|
+
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
11889
|
+
align: 'center',
|
|
11890
|
+
ellipsis: true,
|
|
11891
|
+
width: 100
|
|
11892
|
+
}, {
|
|
11893
|
+
dataIndex: 'giftType',
|
|
11894
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11895
|
+
align: 'center',
|
|
11896
|
+
ellipsis: true,
|
|
11897
|
+
width: 100,
|
|
11898
|
+
render: function render(val) {
|
|
11899
|
+
var giftTypeMap = {
|
|
11900
|
+
0: '非赠品',
|
|
11901
|
+
1: '自动赠送',
|
|
11902
|
+
2: '手工赠送',
|
|
11903
|
+
3: '回购自动送赠品',
|
|
11904
|
+
4: '前N有礼送赠品',
|
|
11905
|
+
6: '天猫优仓赠品',
|
|
11906
|
+
7: '淘宝CRM会员送赠'
|
|
11907
|
+
};
|
|
11908
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
11909
|
+
}
|
|
11910
|
+
}, {
|
|
11911
|
+
dataIndex: 'type',
|
|
11912
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
11913
|
+
align: 'center',
|
|
11914
|
+
ellipsis: true,
|
|
11915
|
+
width: 100,
|
|
11916
|
+
render: function render(val, record, index) {
|
|
11917
|
+
var options = [{
|
|
11918
|
+
label: '单品',
|
|
11919
|
+
value: '1'
|
|
11920
|
+
}, {
|
|
11921
|
+
label: '组合装',
|
|
11922
|
+
value: '2'
|
|
11923
|
+
}];
|
|
11924
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11925
|
+
style: {
|
|
11926
|
+
width: 70
|
|
11927
|
+
},
|
|
11928
|
+
options: options,
|
|
11929
|
+
value: val,
|
|
11930
|
+
onChange: function onChange(value) {
|
|
11931
|
+
return updateHandle(value, index, 'type');
|
|
11932
|
+
}
|
|
11933
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11934
|
+
}
|
|
11935
|
+
}];
|
|
11936
|
+
}
|
|
11937
|
+
break;
|
|
11938
|
+
case 'WDT_EXCHANGE_GOODS':
|
|
11939
|
+
{
|
|
11940
|
+
columns = [{
|
|
11941
|
+
dataIndex: 'goodId',
|
|
11942
|
+
title: "SPUID",
|
|
11943
|
+
align: 'center',
|
|
11944
|
+
ellipsis: true,
|
|
11945
|
+
width: 70
|
|
11946
|
+
}, {
|
|
11947
|
+
dataIndex: 'goodNo',
|
|
11948
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11949
|
+
align: 'center',
|
|
11950
|
+
ellipsis: true,
|
|
11951
|
+
width: 180
|
|
11952
|
+
}, {
|
|
11953
|
+
dataIndex: 'goodName',
|
|
11954
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11955
|
+
align: 'center',
|
|
11956
|
+
ellipsis: true,
|
|
11957
|
+
width: 250
|
|
11958
|
+
}, {
|
|
11959
|
+
dataIndex: 'specId',
|
|
11960
|
+
title: "".concat(text, "SKUID"),
|
|
11961
|
+
align: 'center',
|
|
11962
|
+
ellipsis: true,
|
|
11963
|
+
width: 100
|
|
11964
|
+
}, {
|
|
11965
|
+
dataIndex: 'specNo',
|
|
11966
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11967
|
+
align: 'center',
|
|
11968
|
+
ellipsis: true,
|
|
11969
|
+
width: 180
|
|
11970
|
+
}, {
|
|
11971
|
+
dataIndex: 'specName',
|
|
11972
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11973
|
+
align: 'center',
|
|
11974
|
+
ellipsis: true,
|
|
11975
|
+
width: 250
|
|
11976
|
+
}, {
|
|
11977
|
+
dataIndex: 'num',
|
|
11978
|
+
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
11979
|
+
align: 'center',
|
|
11980
|
+
ellipsis: true,
|
|
11981
|
+
width: 100,
|
|
11982
|
+
render: function render(val, record, index) {
|
|
11983
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
11984
|
+
style: {
|
|
11985
|
+
width: 70
|
|
11986
|
+
},
|
|
11987
|
+
value: val,
|
|
11988
|
+
min: 1,
|
|
11989
|
+
precision: 0,
|
|
11990
|
+
onChange: function onChange(num) {
|
|
11991
|
+
return updateHandle(num, index, 'num');
|
|
11992
|
+
}
|
|
11993
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
11994
|
+
}
|
|
11995
|
+
}, {
|
|
11996
|
+
dataIndex: 'price',
|
|
11997
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
11998
|
+
align: 'center',
|
|
11999
|
+
ellipsis: true,
|
|
12000
|
+
width: 100,
|
|
12001
|
+
render: function render(val, record, index) {
|
|
12002
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12003
|
+
style: {
|
|
12004
|
+
width: 70
|
|
12005
|
+
},
|
|
12006
|
+
value: val,
|
|
12007
|
+
min: 0,
|
|
12008
|
+
onChange: function onChange(value) {
|
|
12009
|
+
return updateHandle(value, index, 'price');
|
|
12010
|
+
}
|
|
12011
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12012
|
+
}
|
|
12013
|
+
}, {
|
|
12014
|
+
dataIndex: 'exchangePrice',
|
|
12015
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
12016
|
+
align: 'center',
|
|
12017
|
+
ellipsis: true,
|
|
12018
|
+
width: 100
|
|
12019
|
+
}, {
|
|
12020
|
+
dataIndex: 'giftType',
|
|
12021
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12022
|
+
align: 'center',
|
|
12023
|
+
ellipsis: true,
|
|
12024
|
+
width: 100,
|
|
12025
|
+
render: function render(val) {
|
|
12026
|
+
var giftTypeMap = {
|
|
12027
|
+
0: '非赠品',
|
|
12028
|
+
1: '自动赠送',
|
|
12029
|
+
2: '手工赠送',
|
|
12030
|
+
3: '回购自动送赠品',
|
|
12031
|
+
4: '前N有礼送赠品',
|
|
12032
|
+
6: '天猫优仓赠品',
|
|
12033
|
+
7: '淘宝CRM会员送赠'
|
|
12034
|
+
};
|
|
12035
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
12036
|
+
}
|
|
12037
|
+
}, {
|
|
12038
|
+
dataIndex: 'type',
|
|
12039
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
12040
|
+
align: 'center',
|
|
12041
|
+
ellipsis: true,
|
|
12042
|
+
width: 100,
|
|
12043
|
+
render: function render(val, record, index) {
|
|
12044
|
+
var options = [{
|
|
12045
|
+
label: '单品',
|
|
12046
|
+
value: '1'
|
|
12047
|
+
}, {
|
|
12048
|
+
label: '组合装',
|
|
12049
|
+
value: '2'
|
|
12050
|
+
}];
|
|
12051
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
12052
|
+
style: {
|
|
12053
|
+
width: 70
|
|
12054
|
+
},
|
|
12055
|
+
options: options,
|
|
12056
|
+
value: val,
|
|
12057
|
+
onChange: function onChange(value) {
|
|
12058
|
+
return updateHandle(value, index, 'type');
|
|
12059
|
+
}
|
|
12060
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12061
|
+
}
|
|
12062
|
+
}];
|
|
12063
|
+
}
|
|
12064
|
+
break;
|
|
11784
12065
|
default:
|
|
11785
12066
|
columns = [{
|
|
11786
12067
|
dataIndex: 'mark',
|
|
@@ -11922,7 +12203,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11922
12203
|
}, [showHeader, value, disabled]);
|
|
11923
12204
|
var onSubmit = function onSubmit(list) {
|
|
11924
12205
|
var newList = [];
|
|
11925
|
-
if (['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type)) {
|
|
12206
|
+
if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
|
|
11926
12207
|
newList = list.map(function (item) {
|
|
11927
12208
|
item.uuid = kmkfUtils.uuid();
|
|
11928
12209
|
item.canDelete = true;
|
|
@@ -11930,6 +12211,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11930
12211
|
item.orderPrice = 0;
|
|
11931
12212
|
item.sharePrice = 0;
|
|
11932
12213
|
item.canUpdateNumber = canUpdateNumber;
|
|
12214
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
12215
|
+
item.price = item.retailPrice;
|
|
12216
|
+
item.type = '1';
|
|
12217
|
+
}
|
|
11933
12218
|
return item;
|
|
11934
12219
|
});
|
|
11935
12220
|
} else {
|
|
@@ -12000,7 +12285,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12000
12285
|
locale: {
|
|
12001
12286
|
emptyText: '暂无数据'
|
|
12002
12287
|
}
|
|
12003
|
-
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(WdtGoodsModal, {
|
|
12288
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(WdtGoodsModal, {
|
|
12004
12289
|
ref: refModal,
|
|
12005
12290
|
onSubmit: onSubmit,
|
|
12006
12291
|
width: width,
|
|
@@ -12870,8 +13155,10 @@ var componentMap$1 = {
|
|
|
12870
13155
|
reissueType: 'wdtReissueType',
|
|
12871
13156
|
returnType: 'wdtReturnType',
|
|
12872
13157
|
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
13158
|
+
returnSelectList: 'wdtReturnSelectList',
|
|
12873
13159
|
deleteGood: 'wdtDeleteGood',
|
|
12874
|
-
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
13160
|
+
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13161
|
+
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
12875
13162
|
}
|
|
12876
13163
|
}
|
|
12877
13164
|
};
|
|
@@ -12938,7 +13225,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12938
13225
|
setTableSelect(['2', '4'].includes(data.val));
|
|
12939
13226
|
if (['1', '3'].includes(data.val)) {
|
|
12940
13227
|
var _valueRef$current5, _valueRef$current6;
|
|
12941
|
-
pubsub__default['default'].publish(componentMap$1[
|
|
13228
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnSelectListReturn, {
|
|
12942
13229
|
list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current5 = valueRef.current) === null || _valueRef$current5 === void 0 ? void 0 : _valueRef$current5[componentMap$1[compType].key]) || []),
|
|
12943
13230
|
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12944
13231
|
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
@@ -12956,15 +13243,15 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12956
13243
|
};
|
|
12957
13244
|
}, [disabled]);
|
|
12958
13245
|
var _onSelect = function onSelect(list) {
|
|
12959
|
-
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
13246
|
+
var _typeMap, _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12960
13247
|
if (disabled) return;
|
|
12961
13248
|
var newList = lodash.cloneDeep(list);
|
|
12962
|
-
var typeMap =
|
|
13249
|
+
var typeMap = (_typeMap = {
|
|
12963
13250
|
// type: componentMap[compType].eventNameMap.selectList,
|
|
12964
13251
|
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12965
13252
|
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12966
13253
|
type: componentMap$1[compType].eventNameMap.selectList
|
|
12967
|
-
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
13254
|
+
}, _defineProperty(_typeMap, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList), _defineProperty(_typeMap, "".concat(componentMap$1[compType].type, "ReturnType"), componentMap$1[compType].eventNameMap.returnSelectList), _typeMap);
|
|
12968
13255
|
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12969
13256
|
// console.log('onSelect', type, withInfo.current, newList);
|
|
12970
13257
|
pubsub__default['default'].publish(type, {
|
|
@@ -12982,6 +13269,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12982
13269
|
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12983
13270
|
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12984
13271
|
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
13272
|
+
pubsub__default['default'].publish(componentMap$1[compType].eventNameMap.exchangeDeleteGood, deleteId);
|
|
12985
13273
|
};
|
|
12986
13274
|
var changeHandle = function changeHandle(list) {
|
|
12987
13275
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
@@ -13006,6 +13294,263 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13006
13294
|
}));
|
|
13007
13295
|
};
|
|
13008
13296
|
|
|
13297
|
+
var componentMap$2 = {
|
|
13298
|
+
'WDT_RETURN_GOODS': {
|
|
13299
|
+
type: 'wdt',
|
|
13300
|
+
valueKey: 'wdtReturnGoods',
|
|
13301
|
+
returnTypeKey: 'wdtReturnType',
|
|
13302
|
+
name: '旺店通',
|
|
13303
|
+
eventNameMap: {
|
|
13304
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13305
|
+
returnType: 'wdtReturnType',
|
|
13306
|
+
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
13307
|
+
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13308
|
+
returnSelectList: 'wdtReturnSelectList',
|
|
13309
|
+
exchangeCopyGood: 'wdtExchangeCopyGood',
|
|
13310
|
+
exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
|
|
13311
|
+
}
|
|
13312
|
+
}
|
|
13313
|
+
};
|
|
13314
|
+
var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
13315
|
+
var value = props.value,
|
|
13316
|
+
onChange = props.onChange,
|
|
13317
|
+
_props$reasonList = props.reasonList,
|
|
13318
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13319
|
+
disabled = props.disabled,
|
|
13320
|
+
compType = props.type;
|
|
13321
|
+
var valueRef = React.useRef({});
|
|
13322
|
+
React.useEffect(function () {
|
|
13323
|
+
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
13324
|
+
var _valueRef$current, _valueRef$current2;
|
|
13325
|
+
pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.exchangeBackCopyGood, {
|
|
13326
|
+
list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current = valueRef.current) === null || _valueRef$current === void 0 ? void 0 : _valueRef$current[componentMap$2[compType].valueKey]) || []),
|
|
13327
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
|
|
13328
|
+
});
|
|
13329
|
+
});
|
|
13330
|
+
return function () {
|
|
13331
|
+
pubsub__default['default'].unsubscribe(subscription);
|
|
13332
|
+
};
|
|
13333
|
+
}, []);
|
|
13334
|
+
React.useEffect(function () {
|
|
13335
|
+
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.returnSelectList, function (_, data) {
|
|
13336
|
+
if (disabled) return;
|
|
13337
|
+
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
13338
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13339
|
+
});
|
|
13340
|
+
if (compType === 'WDT_RETURN_GOODS') {
|
|
13341
|
+
newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13342
|
+
if (typeof item.type === 'undefined') {
|
|
13343
|
+
item.type = '1';
|
|
13344
|
+
}
|
|
13345
|
+
if (typeof item.returnPrice === 'undefined') {
|
|
13346
|
+
item.returnPrice = new BigNumber__default['default'](item.num).multipliedBy(new BigNumber__default['default'](item.sharePrice)).toString();
|
|
13347
|
+
}
|
|
13348
|
+
if (item.srcOid) {
|
|
13349
|
+
item.oid = item.srcOid;
|
|
13350
|
+
}
|
|
13351
|
+
return item;
|
|
13352
|
+
});
|
|
13353
|
+
} else {
|
|
13354
|
+
newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13355
|
+
}
|
|
13356
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13357
|
+
});
|
|
13358
|
+
return function () {
|
|
13359
|
+
pubsub__default['default'].unsubscribe(subscription);
|
|
13360
|
+
};
|
|
13361
|
+
}, []);
|
|
13362
|
+
React.useEffect(function () {
|
|
13363
|
+
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.returnSelectListReturn, function (_, data) {
|
|
13364
|
+
if (disabled) return;
|
|
13365
|
+
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
13366
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13367
|
+
});
|
|
13368
|
+
if (compType === 'WDT_RETURN_GOODS') {
|
|
13369
|
+
newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13370
|
+
if (typeof item.type === 'undefined') {
|
|
13371
|
+
item.type = '1';
|
|
13372
|
+
}
|
|
13373
|
+
if (typeof item.returnPrice === 'undefined') {
|
|
13374
|
+
item.returnPrice = new BigNumber__default['default'](item.num).multipliedBy(new BigNumber__default['default'](item.sharePrice)).toString();
|
|
13375
|
+
}
|
|
13376
|
+
if (item.srcOid) {
|
|
13377
|
+
item.oid = item.srcOid;
|
|
13378
|
+
}
|
|
13379
|
+
return item;
|
|
13380
|
+
});
|
|
13381
|
+
} else {
|
|
13382
|
+
newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13383
|
+
}
|
|
13384
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13385
|
+
});
|
|
13386
|
+
return function () {
|
|
13387
|
+
pubsub__default['default'].unsubscribe(subscription);
|
|
13388
|
+
};
|
|
13389
|
+
}, []);
|
|
13390
|
+
React.useEffect(function () {
|
|
13391
|
+
valueRef.current = value;
|
|
13392
|
+
pubsub__default['default'].subscribeOnce(componentMap$2[compType].eventNameMap.returnDeleteGood, function (_, data) {
|
|
13393
|
+
if (disabled) return;
|
|
13394
|
+
if (value) {
|
|
13395
|
+
var newValue = _objectSpread2({}, value);
|
|
13396
|
+
newValue[componentMap$2[compType].valueKey] = newValue[componentMap$2[compType].valueKey].filter(function (item) {
|
|
13397
|
+
return item.sku !== data;
|
|
13398
|
+
});
|
|
13399
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13400
|
+
}
|
|
13401
|
+
});
|
|
13402
|
+
pubsub__default['default'].subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13403
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13404
|
+
shopCode: data.shopCode
|
|
13405
|
+
}));
|
|
13406
|
+
});
|
|
13407
|
+
}, [value, disabled]);
|
|
13408
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13409
|
+
var newValue = _objectSpread2({}, value);
|
|
13410
|
+
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
13411
|
+
newValue[componentMap$2[compType].valueKey] = [];
|
|
13412
|
+
if (['2'].includes(val[0])) {
|
|
13413
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13414
|
+
valueRef.current = newValue;
|
|
13415
|
+
}
|
|
13416
|
+
pubsub__default['default'].publish(componentMap$2[compType].eventNameMap.returnType, {
|
|
13417
|
+
val: val[0],
|
|
13418
|
+
goodValue: newValue
|
|
13419
|
+
});
|
|
13420
|
+
};
|
|
13421
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13422
|
+
var newValue = _objectSpread2({}, value);
|
|
13423
|
+
newValue[componentMap$2[compType].valueKey] = val;
|
|
13424
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13425
|
+
};
|
|
13426
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13427
|
+
// const showChangeBtn = useMemo(() => {
|
|
13428
|
+
// return ['2'].includes(value?.[componentMap[compType].returnTypeKey]?.[0]);
|
|
13429
|
+
// }, [value?.[componentMap[compType].returnTypeKey]]);
|
|
13430
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13431
|
+
style: {
|
|
13432
|
+
marginBottom: '8px'
|
|
13433
|
+
},
|
|
13434
|
+
disabled: disabled,
|
|
13435
|
+
allowClear: false,
|
|
13436
|
+
options: reasonList,
|
|
13437
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
13438
|
+
onChange: function onChange(val) {
|
|
13439
|
+
return changeTypeHandle(val);
|
|
13440
|
+
}
|
|
13441
|
+
}), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13442
|
+
key: componentMap$2[compType].type
|
|
13443
|
+
}, props), {}, {
|
|
13444
|
+
disabled: disabled,
|
|
13445
|
+
canUpdateNumber: true,
|
|
13446
|
+
showChangeBtn: false,
|
|
13447
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13448
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].valueKey],
|
|
13449
|
+
onChange: function onChange(val) {
|
|
13450
|
+
return changeGoodHandle(val);
|
|
13451
|
+
}
|
|
13452
|
+
})));
|
|
13453
|
+
};
|
|
13454
|
+
|
|
13455
|
+
var componentMap$3 = {
|
|
13456
|
+
'WDT_EXCHANGE_GOODS': {
|
|
13457
|
+
type: 'wdt',
|
|
13458
|
+
valueKey: 'wdtExchangeGoods',
|
|
13459
|
+
returnTypeKey: 'wdtExchangeType',
|
|
13460
|
+
name: '旺店通',
|
|
13461
|
+
eventNameMap: {
|
|
13462
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13463
|
+
exchangeDeleteGood: 'wdtExchangeDeleteGood',
|
|
13464
|
+
exchangeCopyGood: 'wdtExchangeCopyGood',
|
|
13465
|
+
exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
|
|
13466
|
+
}
|
|
13467
|
+
}
|
|
13468
|
+
};
|
|
13469
|
+
var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
13470
|
+
var value = props.value,
|
|
13471
|
+
onChange = props.onChange,
|
|
13472
|
+
disabled = props.disabled,
|
|
13473
|
+
compType = props.type;
|
|
13474
|
+
var valueRef = React.useRef({});
|
|
13475
|
+
React.useEffect(function () {
|
|
13476
|
+
var subscription = pubsub__default['default'].subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
|
|
13477
|
+
if (disabled) return;
|
|
13478
|
+
var newValue = {
|
|
13479
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13480
|
+
};
|
|
13481
|
+
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
13482
|
+
newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13483
|
+
if (typeof item.type === 'undefined') {
|
|
13484
|
+
item.type = '1';
|
|
13485
|
+
}
|
|
13486
|
+
item.price = item.sharePrice;
|
|
13487
|
+
if (typeof item.exchangePrice === 'undefined') {
|
|
13488
|
+
item.exchangePrice = new BigNumber__default['default'](item.num).multipliedBy(new BigNumber__default['default'](item.price)).toString();
|
|
13489
|
+
}
|
|
13490
|
+
return item;
|
|
13491
|
+
});
|
|
13492
|
+
} else {
|
|
13493
|
+
newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13494
|
+
}
|
|
13495
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13496
|
+
});
|
|
13497
|
+
return function () {
|
|
13498
|
+
pubsub__default['default'].unsubscribe(subscription);
|
|
13499
|
+
};
|
|
13500
|
+
});
|
|
13501
|
+
React.useEffect(function () {
|
|
13502
|
+
valueRef.current = value;
|
|
13503
|
+
pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.exchangeDeleteGood, function (_, data) {
|
|
13504
|
+
if (disabled) return;
|
|
13505
|
+
if (value) {
|
|
13506
|
+
var newValue = _objectSpread2({}, value);
|
|
13507
|
+
newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
|
|
13508
|
+
return item.sku !== data;
|
|
13509
|
+
});
|
|
13510
|
+
onChange(newValue);
|
|
13511
|
+
}
|
|
13512
|
+
});
|
|
13513
|
+
pubsub__default['default'].subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13514
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13515
|
+
shopCode: data.shopCode
|
|
13516
|
+
}));
|
|
13517
|
+
});
|
|
13518
|
+
}, [value]);
|
|
13519
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13520
|
+
var newValue = _objectSpread2({}, value);
|
|
13521
|
+
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
13522
|
+
val = val.map(function (item) {
|
|
13523
|
+
item.exchangePrice = new BigNumber__default['default'](item.num).multipliedBy(new BigNumber__default['default'](item.price)).toString();
|
|
13524
|
+
return item;
|
|
13525
|
+
});
|
|
13526
|
+
}
|
|
13527
|
+
newValue[componentMap$3[compType].valueKey] = val;
|
|
13528
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13529
|
+
};
|
|
13530
|
+
var copyGoods = function copyGoods() {
|
|
13531
|
+
var copyHandle = function copyHandle() {
|
|
13532
|
+
pubsub__default['default'].publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, 'WDT_EXCHANGE_GOODS');
|
|
13533
|
+
};
|
|
13534
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
13535
|
+
type: "link",
|
|
13536
|
+
onClick: copyHandle
|
|
13537
|
+
}, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
|
|
13538
|
+
};
|
|
13539
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13540
|
+
key: componentMap$3[compType].type
|
|
13541
|
+
}, props), {}, {
|
|
13542
|
+
disabled: disabled,
|
|
13543
|
+
canUpdateNumber: true,
|
|
13544
|
+
showChangeBtn: true,
|
|
13545
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13546
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
|
|
13547
|
+
otherOperations: copyGoods(),
|
|
13548
|
+
onChange: function onChange(val) {
|
|
13549
|
+
return changeGoodHandle(val);
|
|
13550
|
+
}
|
|
13551
|
+
})));
|
|
13552
|
+
};
|
|
13553
|
+
|
|
13009
13554
|
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
13010
13555
|
var typeMap$1 = {
|
|
13011
13556
|
WDT_REISSUE_GOODS: {
|
|
@@ -13794,7 +14339,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13794
14339
|
changeIndex = _useState2[0],
|
|
13795
14340
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
13796
14341
|
React.useEffect(function () {
|
|
13797
|
-
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
14342
|
+
if (!(value === null || value === void 0 ? void 0 : value.length) && type === 1) {
|
|
13798
14343
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap$1[type].initValue);
|
|
13799
14344
|
}
|
|
13800
14345
|
}, [value, type]);
|
|
@@ -13833,7 +14378,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13833
14378
|
return setChangeIndex(index);
|
|
13834
14379
|
}
|
|
13835
14380
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
|
|
13836
|
-
}))) : null, value.length ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
14381
|
+
}))) : null, value.length || type !== 1 ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, type === 1 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
13837
14382
|
disabled: disabled,
|
|
13838
14383
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
13839
14384
|
onChange: function onChange(e) {
|
|
@@ -13848,12 +14393,18 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13848
14393
|
},
|
|
13849
14394
|
value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.returnGoodsTradeId
|
|
13850
14395
|
})) : null, type === 3 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
13851
|
-
disabled:
|
|
14396
|
+
disabled: disabled,
|
|
13852
14397
|
placeholder: "\u8BF7\u8F93\u5165\u8865\u53D1\u5355id",
|
|
14398
|
+
onChange: function onChange(e) {
|
|
14399
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
14400
|
+
},
|
|
13853
14401
|
value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.billNo
|
|
13854
14402
|
})) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
13855
|
-
disabled:
|
|
14403
|
+
disabled: disabled,
|
|
13856
14404
|
placeholder: "\u8BF7\u8F93\u5165\u6362\u8D27\u5355id",
|
|
14405
|
+
onChange: function onChange(e) {
|
|
14406
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
14407
|
+
},
|
|
13857
14408
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
13858
14409
|
})) : null) : null);
|
|
13859
14410
|
};
|
|
@@ -13915,7 +14466,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13915
14466
|
return setChangeIndex(index);
|
|
13916
14467
|
}
|
|
13917
14468
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
|
|
13918
|
-
}))) : null,
|
|
14469
|
+
}))) : null, /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
13919
14470
|
showSearch: true,
|
|
13920
14471
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
13921
14472
|
filterOption: function filterOption(input, option) {
|
|
@@ -13931,7 +14482,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13931
14482
|
}
|
|
13932
14483
|
}))), ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13933
14484
|
className: "c-red"
|
|
13934
|
-
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null)
|
|
14485
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
13935
14486
|
};
|
|
13936
14487
|
|
|
13937
14488
|
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
@@ -14047,8 +14598,10 @@ exports.BsSystemOrder = index$1;
|
|
|
14047
14598
|
exports.BuyerNick = BuyerNick;
|
|
14048
14599
|
exports.CalculationInput = CalculationInput;
|
|
14049
14600
|
exports.ChooseBaby = ChooseBaby;
|
|
14601
|
+
exports.CommonExchangeGoods = CommonExchangeGoods;
|
|
14050
14602
|
exports.CommonGoods = CommonGoods;
|
|
14051
14603
|
exports.CommonMultiStatus = CommonSystemOrder$1;
|
|
14604
|
+
exports.CommonReturnGoods = CommonReturnGoods;
|
|
14052
14605
|
exports.CommonStatus = CommonStatus;
|
|
14053
14606
|
exports.CommonSystemOrder = CommonSystemOrder;
|
|
14054
14607
|
exports.ExpressLogistics = ExpressLogistics;
|