@kmkf-fe-packages/basic-components 1.4.0 → 1.4.3-rc.0
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 +2 -2
- package/dist/index.esm.js +844 -281
- package/dist/index.js +846 -280
- 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 +5 -4
package/dist/index.esm.js
CHANGED
|
@@ -8,378 +8,365 @@ import zhCN from 'antd/lib/locale/zh_CN';
|
|
|
8
8
|
import { cloneDeep, difference, differenceWith } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
import BigNumber from 'bignumber.js';
|
|
12
|
+
|
|
13
|
+
function _iterableToArrayLimit(arr, i) {
|
|
14
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
15
|
+
if (null != _i) {
|
|
16
|
+
var _s,
|
|
17
|
+
_e,
|
|
18
|
+
_x,
|
|
19
|
+
_r,
|
|
20
|
+
_arr = [],
|
|
21
|
+
_n = !0,
|
|
22
|
+
_d = !1;
|
|
22
23
|
try {
|
|
23
|
-
if (
|
|
24
|
-
if (Object(
|
|
25
|
-
|
|
26
|
-
} else for (; !(
|
|
27
|
-
} catch (
|
|
28
|
-
|
|
24
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
25
|
+
if (Object(_i) !== _i) return;
|
|
26
|
+
_n = !1;
|
|
27
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
28
|
+
} catch (err) {
|
|
29
|
+
_d = !0, _e = err;
|
|
29
30
|
} finally {
|
|
30
31
|
try {
|
|
31
|
-
if (!
|
|
32
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
32
33
|
} finally {
|
|
33
|
-
if (
|
|
34
|
+
if (_d) throw _e;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
+
return _arr;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
function ownKeys(
|
|
40
|
-
var
|
|
40
|
+
function ownKeys(object, enumerableOnly) {
|
|
41
|
+
var keys = Object.keys(object);
|
|
41
42
|
if (Object.getOwnPropertySymbols) {
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
return Object.getOwnPropertyDescriptor(
|
|
45
|
-
})),
|
|
43
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
44
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
45
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
46
|
+
})), keys.push.apply(keys, symbols);
|
|
46
47
|
}
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
function _objectSpread2(
|
|
50
|
-
for (var
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
_defineProperty(
|
|
54
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
55
|
-
Object.defineProperty(
|
|
48
|
+
return keys;
|
|
49
|
+
}
|
|
50
|
+
function _objectSpread2(target) {
|
|
51
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
52
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
53
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
54
|
+
_defineProperty(target, key, source[key]);
|
|
55
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
56
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
|
-
return
|
|
59
|
+
return target;
|
|
59
60
|
}
|
|
60
61
|
function _regeneratorRuntime() {
|
|
61
62
|
_regeneratorRuntime = function () {
|
|
62
|
-
return
|
|
63
|
-
};
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
t[e] = r.value;
|
|
63
|
+
return exports;
|
|
64
|
+
};
|
|
65
|
+
var exports = {},
|
|
66
|
+
Op = Object.prototype,
|
|
67
|
+
hasOwn = Op.hasOwnProperty,
|
|
68
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
69
|
+
obj[key] = desc.value;
|
|
70
70
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
function define(
|
|
76
|
-
return Object.defineProperty(
|
|
77
|
-
value:
|
|
71
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
72
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
73
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
74
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
75
|
+
function define(obj, key, value) {
|
|
76
|
+
return Object.defineProperty(obj, key, {
|
|
77
|
+
value: value,
|
|
78
78
|
enumerable: !0,
|
|
79
79
|
configurable: !0,
|
|
80
80
|
writable: !0
|
|
81
|
-
}),
|
|
81
|
+
}), obj[key];
|
|
82
82
|
}
|
|
83
83
|
try {
|
|
84
84
|
define({}, "");
|
|
85
|
-
} catch (
|
|
86
|
-
define = function (
|
|
87
|
-
return
|
|
85
|
+
} catch (err) {
|
|
86
|
+
define = function (obj, key, value) {
|
|
87
|
+
return obj[key] = value;
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function wrap(
|
|
91
|
-
var
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return
|
|
95
|
-
value: makeInvokeMethod(
|
|
96
|
-
}),
|
|
90
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
91
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
92
|
+
generator = Object.create(protoGenerator.prototype),
|
|
93
|
+
context = new Context(tryLocsList || []);
|
|
94
|
+
return defineProperty(generator, "_invoke", {
|
|
95
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
96
|
+
}), generator;
|
|
97
97
|
}
|
|
98
|
-
function tryCatch(
|
|
98
|
+
function tryCatch(fn, obj, arg) {
|
|
99
99
|
try {
|
|
100
100
|
return {
|
|
101
101
|
type: "normal",
|
|
102
|
-
arg:
|
|
102
|
+
arg: fn.call(obj, arg)
|
|
103
103
|
};
|
|
104
|
-
} catch (
|
|
104
|
+
} catch (err) {
|
|
105
105
|
return {
|
|
106
106
|
type: "throw",
|
|
107
|
-
arg:
|
|
107
|
+
arg: err
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
var
|
|
113
|
-
l = "suspendedYield",
|
|
114
|
-
f = "executing",
|
|
115
|
-
s = "completed",
|
|
116
|
-
y = {};
|
|
111
|
+
exports.wrap = wrap;
|
|
112
|
+
var ContinueSentinel = {};
|
|
117
113
|
function Generator() {}
|
|
118
114
|
function GeneratorFunction() {}
|
|
119
115
|
function GeneratorFunctionPrototype() {}
|
|
120
|
-
var
|
|
121
|
-
define(
|
|
116
|
+
var IteratorPrototype = {};
|
|
117
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
122
118
|
return this;
|
|
123
119
|
});
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
var
|
|
128
|
-
function defineIteratorMethods(
|
|
129
|
-
["next", "throw", "return"].forEach(function (
|
|
130
|
-
define(
|
|
131
|
-
return this._invoke(
|
|
120
|
+
var getProto = Object.getPrototypeOf,
|
|
121
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
122
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
123
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
124
|
+
function defineIteratorMethods(prototype) {
|
|
125
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
126
|
+
define(prototype, method, function (arg) {
|
|
127
|
+
return this._invoke(method, arg);
|
|
132
128
|
});
|
|
133
129
|
});
|
|
134
130
|
}
|
|
135
|
-
function AsyncIterator(
|
|
136
|
-
function invoke(
|
|
137
|
-
var
|
|
138
|
-
if ("throw" !==
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
return
|
|
142
|
-
invoke("next",
|
|
143
|
-
}, function (
|
|
144
|
-
invoke("throw",
|
|
145
|
-
}) :
|
|
146
|
-
|
|
147
|
-
}, function (
|
|
148
|
-
return invoke("throw",
|
|
131
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
132
|
+
function invoke(method, arg, resolve, reject) {
|
|
133
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
134
|
+
if ("throw" !== record.type) {
|
|
135
|
+
var result = record.arg,
|
|
136
|
+
value = result.value;
|
|
137
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
138
|
+
invoke("next", value, resolve, reject);
|
|
139
|
+
}, function (err) {
|
|
140
|
+
invoke("throw", err, resolve, reject);
|
|
141
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
142
|
+
result.value = unwrapped, resolve(result);
|
|
143
|
+
}, function (error) {
|
|
144
|
+
return invoke("throw", error, resolve, reject);
|
|
149
145
|
});
|
|
150
146
|
}
|
|
151
|
-
|
|
147
|
+
reject(record.arg);
|
|
152
148
|
}
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
value: function (
|
|
149
|
+
var previousPromise;
|
|
150
|
+
defineProperty(this, "_invoke", {
|
|
151
|
+
value: function (method, arg) {
|
|
156
152
|
function callInvokeWithMethodAndArg() {
|
|
157
|
-
return new
|
|
158
|
-
invoke(
|
|
153
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
154
|
+
invoke(method, arg, resolve, reject);
|
|
159
155
|
});
|
|
160
156
|
}
|
|
161
|
-
return
|
|
157
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
162
158
|
}
|
|
163
159
|
});
|
|
164
160
|
}
|
|
165
|
-
function makeInvokeMethod(
|
|
166
|
-
var
|
|
167
|
-
return function (
|
|
168
|
-
if (
|
|
169
|
-
if (
|
|
170
|
-
if ("throw" ===
|
|
171
|
-
return
|
|
172
|
-
value: t,
|
|
173
|
-
done: !0
|
|
174
|
-
};
|
|
161
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
162
|
+
var state = "suspendedStart";
|
|
163
|
+
return function (method, arg) {
|
|
164
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
165
|
+
if ("completed" === state) {
|
|
166
|
+
if ("throw" === method) throw arg;
|
|
167
|
+
return doneResult();
|
|
175
168
|
}
|
|
176
|
-
for (
|
|
177
|
-
var
|
|
178
|
-
if (
|
|
179
|
-
var
|
|
180
|
-
if (
|
|
181
|
-
if (
|
|
182
|
-
return
|
|
169
|
+
for (context.method = method, context.arg = arg;;) {
|
|
170
|
+
var delegate = context.delegate;
|
|
171
|
+
if (delegate) {
|
|
172
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
173
|
+
if (delegateResult) {
|
|
174
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
175
|
+
return delegateResult;
|
|
183
176
|
}
|
|
184
177
|
}
|
|
185
|
-
if ("next" ===
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
} else "return" ===
|
|
189
|
-
|
|
190
|
-
var
|
|
191
|
-
if ("normal" ===
|
|
192
|
-
if (
|
|
178
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
179
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
180
|
+
context.dispatchException(context.arg);
|
|
181
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
182
|
+
state = "executing";
|
|
183
|
+
var record = tryCatch(innerFn, self, context);
|
|
184
|
+
if ("normal" === record.type) {
|
|
185
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
193
186
|
return {
|
|
194
|
-
value:
|
|
195
|
-
done:
|
|
187
|
+
value: record.arg,
|
|
188
|
+
done: context.done
|
|
196
189
|
};
|
|
197
190
|
}
|
|
198
|
-
"throw" ===
|
|
191
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
199
192
|
}
|
|
200
193
|
};
|
|
201
194
|
}
|
|
202
|
-
function maybeInvokeDelegate(
|
|
203
|
-
var
|
|
204
|
-
|
|
205
|
-
if (
|
|
206
|
-
var
|
|
207
|
-
if ("throw" ===
|
|
208
|
-
var
|
|
209
|
-
return
|
|
195
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
196
|
+
var methodName = context.method,
|
|
197
|
+
method = delegate.iterator[methodName];
|
|
198
|
+
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;
|
|
199
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
200
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
201
|
+
var info = record.arg;
|
|
202
|
+
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);
|
|
210
203
|
}
|
|
211
|
-
function pushTryEntry(
|
|
212
|
-
var
|
|
213
|
-
tryLoc:
|
|
204
|
+
function pushTryEntry(locs) {
|
|
205
|
+
var entry = {
|
|
206
|
+
tryLoc: locs[0]
|
|
214
207
|
};
|
|
215
|
-
1 in
|
|
208
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
216
209
|
}
|
|
217
|
-
function resetTryEntry(
|
|
218
|
-
var
|
|
219
|
-
|
|
210
|
+
function resetTryEntry(entry) {
|
|
211
|
+
var record = entry.completion || {};
|
|
212
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
220
213
|
}
|
|
221
|
-
function Context(
|
|
214
|
+
function Context(tryLocsList) {
|
|
222
215
|
this.tryEntries = [{
|
|
223
216
|
tryLoc: "root"
|
|
224
|
-
}],
|
|
217
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
225
218
|
}
|
|
226
|
-
function values(
|
|
227
|
-
if (
|
|
228
|
-
var
|
|
229
|
-
if (
|
|
230
|
-
if ("function" == typeof
|
|
231
|
-
if (!isNaN(
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
for (; ++
|
|
235
|
-
return next.value =
|
|
219
|
+
function values(iterable) {
|
|
220
|
+
if (iterable) {
|
|
221
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
222
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
223
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
224
|
+
if (!isNaN(iterable.length)) {
|
|
225
|
+
var i = -1,
|
|
226
|
+
next = function next() {
|
|
227
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
228
|
+
return next.value = undefined, next.done = !0, next;
|
|
236
229
|
};
|
|
237
|
-
return
|
|
230
|
+
return next.next = next;
|
|
238
231
|
}
|
|
239
232
|
}
|
|
240
|
-
|
|
233
|
+
return {
|
|
234
|
+
next: doneResult
|
|
235
|
+
};
|
|
241
236
|
}
|
|
242
|
-
|
|
237
|
+
function doneResult() {
|
|
238
|
+
return {
|
|
239
|
+
value: undefined,
|
|
240
|
+
done: !0
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
243
244
|
value: GeneratorFunctionPrototype,
|
|
244
245
|
configurable: !0
|
|
245
|
-
}),
|
|
246
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
246
247
|
value: GeneratorFunction,
|
|
247
248
|
configurable: !0
|
|
248
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
249
|
-
var
|
|
250
|
-
return !!
|
|
251
|
-
},
|
|
252
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
253
|
-
},
|
|
249
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
250
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
251
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
252
|
+
}, exports.mark = function (genFun) {
|
|
253
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
254
|
+
}, exports.awrap = function (arg) {
|
|
254
255
|
return {
|
|
255
|
-
__await:
|
|
256
|
+
__await: arg
|
|
256
257
|
};
|
|
257
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
258
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
258
259
|
return this;
|
|
259
|
-
}),
|
|
260
|
-
void 0 ===
|
|
261
|
-
var
|
|
262
|
-
return
|
|
263
|
-
return
|
|
260
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
261
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
262
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
263
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
264
|
+
return result.done ? result.value : iter.next();
|
|
264
265
|
});
|
|
265
|
-
}, defineIteratorMethods(
|
|
266
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
266
267
|
return this;
|
|
267
|
-
}), define(
|
|
268
|
+
}), define(Gp, "toString", function () {
|
|
268
269
|
return "[object Generator]";
|
|
269
|
-
}),
|
|
270
|
-
var
|
|
271
|
-
|
|
272
|
-
for (var
|
|
273
|
-
return
|
|
274
|
-
for (;
|
|
275
|
-
var
|
|
276
|
-
if (
|
|
270
|
+
}), exports.keys = function (val) {
|
|
271
|
+
var object = Object(val),
|
|
272
|
+
keys = [];
|
|
273
|
+
for (var key in object) keys.push(key);
|
|
274
|
+
return keys.reverse(), function next() {
|
|
275
|
+
for (; keys.length;) {
|
|
276
|
+
var key = keys.pop();
|
|
277
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
277
278
|
}
|
|
278
279
|
return next.done = !0, next;
|
|
279
280
|
};
|
|
280
|
-
},
|
|
281
|
+
}, exports.values = values, Context.prototype = {
|
|
281
282
|
constructor: Context,
|
|
282
|
-
reset: function (
|
|
283
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
283
|
+
reset: function (skipTempReset) {
|
|
284
|
+
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);
|
|
284
285
|
},
|
|
285
286
|
stop: function () {
|
|
286
287
|
this.done = !0;
|
|
287
|
-
var
|
|
288
|
-
if ("throw" ===
|
|
288
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
289
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
289
290
|
return this.rval;
|
|
290
291
|
},
|
|
291
|
-
dispatchException: function (
|
|
292
|
-
if (this.done) throw
|
|
293
|
-
var
|
|
294
|
-
function handle(
|
|
295
|
-
return
|
|
292
|
+
dispatchException: function (exception) {
|
|
293
|
+
if (this.done) throw exception;
|
|
294
|
+
var context = this;
|
|
295
|
+
function handle(loc, caught) {
|
|
296
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
296
297
|
}
|
|
297
|
-
for (var
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
if ("root" ===
|
|
301
|
-
if (
|
|
302
|
-
var
|
|
303
|
-
|
|
304
|
-
if (
|
|
305
|
-
if (this.prev <
|
|
306
|
-
if (this.prev <
|
|
307
|
-
} else if (
|
|
308
|
-
if (this.prev <
|
|
298
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
299
|
+
var entry = this.tryEntries[i],
|
|
300
|
+
record = entry.completion;
|
|
301
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
302
|
+
if (entry.tryLoc <= this.prev) {
|
|
303
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
304
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
305
|
+
if (hasCatch && hasFinally) {
|
|
306
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
307
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
308
|
+
} else if (hasCatch) {
|
|
309
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
309
310
|
} else {
|
|
310
|
-
if (!
|
|
311
|
-
if (this.prev <
|
|
311
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
312
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
312
313
|
}
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
316
|
},
|
|
316
|
-
abrupt: function (
|
|
317
|
-
for (var
|
|
318
|
-
var
|
|
319
|
-
if (
|
|
320
|
-
var
|
|
317
|
+
abrupt: function (type, arg) {
|
|
318
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
319
|
+
var entry = this.tryEntries[i];
|
|
320
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
321
|
+
var finallyEntry = entry;
|
|
321
322
|
break;
|
|
322
323
|
}
|
|
323
324
|
}
|
|
324
|
-
|
|
325
|
-
var
|
|
326
|
-
return
|
|
325
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
326
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
327
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
327
328
|
},
|
|
328
|
-
complete: function (
|
|
329
|
-
if ("throw" ===
|
|
330
|
-
return "break" ===
|
|
329
|
+
complete: function (record, afterLoc) {
|
|
330
|
+
if ("throw" === record.type) throw record.arg;
|
|
331
|
+
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;
|
|
331
332
|
},
|
|
332
|
-
finish: function (
|
|
333
|
-
for (var
|
|
334
|
-
var
|
|
335
|
-
if (
|
|
333
|
+
finish: function (finallyLoc) {
|
|
334
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
335
|
+
var entry = this.tryEntries[i];
|
|
336
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
336
337
|
}
|
|
337
338
|
},
|
|
338
|
-
catch: function (
|
|
339
|
-
for (var
|
|
340
|
-
var
|
|
341
|
-
if (
|
|
342
|
-
var
|
|
343
|
-
if ("throw" ===
|
|
344
|
-
var
|
|
345
|
-
resetTryEntry(
|
|
339
|
+
catch: function (tryLoc) {
|
|
340
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
341
|
+
var entry = this.tryEntries[i];
|
|
342
|
+
if (entry.tryLoc === tryLoc) {
|
|
343
|
+
var record = entry.completion;
|
|
344
|
+
if ("throw" === record.type) {
|
|
345
|
+
var thrown = record.arg;
|
|
346
|
+
resetTryEntry(entry);
|
|
346
347
|
}
|
|
347
|
-
return
|
|
348
|
+
return thrown;
|
|
348
349
|
}
|
|
349
350
|
}
|
|
350
351
|
throw new Error("illegal catch attempt");
|
|
351
352
|
},
|
|
352
|
-
delegateYield: function (
|
|
353
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
353
354
|
return this.delegate = {
|
|
354
|
-
iterator: values(
|
|
355
|
-
resultName:
|
|
356
|
-
nextLoc:
|
|
357
|
-
}, "next" === this.method && (this.arg =
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
}
|
|
361
|
-
function _toPrimitive(t, r) {
|
|
362
|
-
if ("object" != typeof t || !t) return t;
|
|
363
|
-
var e = t[Symbol.toPrimitive];
|
|
364
|
-
if (void 0 !== e) {
|
|
365
|
-
var i = e.call(t, r || "default");
|
|
366
|
-
if ("object" != typeof i) return i;
|
|
367
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
368
|
-
}
|
|
369
|
-
return ("string" === r ? String : Number)(t);
|
|
370
|
-
}
|
|
371
|
-
function _toPropertyKey(t) {
|
|
372
|
-
var i = _toPrimitive(t, "string");
|
|
373
|
-
return "symbol" == typeof i ? i : String(i);
|
|
355
|
+
iterator: values(iterable),
|
|
356
|
+
resultName: resultName,
|
|
357
|
+
nextLoc: nextLoc
|
|
358
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
359
|
+
}
|
|
360
|
+
}, exports;
|
|
374
361
|
}
|
|
375
|
-
function _typeof(
|
|
362
|
+
function _typeof(obj) {
|
|
376
363
|
"@babel/helpers - typeof";
|
|
377
364
|
|
|
378
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
379
|
-
return typeof
|
|
380
|
-
} : function (
|
|
381
|
-
return
|
|
382
|
-
}, _typeof(
|
|
365
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
366
|
+
return typeof obj;
|
|
367
|
+
} : function (obj) {
|
|
368
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
369
|
+
}, _typeof(obj);
|
|
383
370
|
}
|
|
384
371
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
385
372
|
try {
|
|
@@ -486,6 +473,20 @@ function _nonIterableSpread() {
|
|
|
486
473
|
function _nonIterableRest() {
|
|
487
474
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
488
475
|
}
|
|
476
|
+
function _toPrimitive(input, hint) {
|
|
477
|
+
if (typeof input !== "object" || input === null) return input;
|
|
478
|
+
var prim = input[Symbol.toPrimitive];
|
|
479
|
+
if (prim !== undefined) {
|
|
480
|
+
var res = prim.call(input, hint || "default");
|
|
481
|
+
if (typeof res !== "object") return res;
|
|
482
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
483
|
+
}
|
|
484
|
+
return (hint === "string" ? String : Number)(input);
|
|
485
|
+
}
|
|
486
|
+
function _toPropertyKey(arg) {
|
|
487
|
+
var key = _toPrimitive(arg, "string");
|
|
488
|
+
return typeof key === "symbol" ? key : String(key);
|
|
489
|
+
}
|
|
489
490
|
|
|
490
491
|
function ApaasCascader(props) {
|
|
491
492
|
return /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
|
|
@@ -10444,7 +10445,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10444
10445
|
var wdtSendOptions = WdtSendData.getInstance().wdtSendData || [];
|
|
10445
10446
|
useEffect(function () {
|
|
10446
10447
|
//没有值塞个默认值
|
|
10447
|
-
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
10448
|
+
if (!(value === null || value === void 0 ? void 0 : value.length) && type !== 1) {
|
|
10448
10449
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap[type]);
|
|
10449
10450
|
}
|
|
10450
10451
|
}, [value, type]);
|
|
@@ -10472,6 +10473,9 @@ var jstGoods = function jstGoods(props) {
|
|
|
10472
10473
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10473
10474
|
changeOrderInfo[type] = val;
|
|
10474
10475
|
changeOrderInfo['sendId'] = option.value;
|
|
10476
|
+
if (platformType === 'wdt' && type === 'sendName') {
|
|
10477
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
10478
|
+
}
|
|
10475
10479
|
var newList = _toConsumableArray(value);
|
|
10476
10480
|
newList[changeIndex] = changeOrderInfo;
|
|
10477
10481
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
@@ -10507,7 +10511,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
10507
10511
|
return setChangeIndex(index);
|
|
10508
10512
|
}
|
|
10509
10513
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
10510
|
-
}))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
|
|
10514
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(ApaasLogistics, {
|
|
10511
10515
|
disabled: disabled,
|
|
10512
10516
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
10513
10517
|
onChange: function onChange(val) {
|
|
@@ -11664,9 +11668,34 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11664
11668
|
useEffect(function () {
|
|
11665
11669
|
setSelectedRowKeys([]);
|
|
11666
11670
|
}, [tableSelect, selectType]);
|
|
11667
|
-
var updateHandle = function updateHandle(val, index,
|
|
11671
|
+
var updateHandle = function updateHandle(val, index, columnType) {
|
|
11668
11672
|
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
11669
|
-
value[index][
|
|
11673
|
+
value[index][columnType] = val;
|
|
11674
|
+
if (type === 'WDT_RETURN_GOODS') {
|
|
11675
|
+
if (['sharePrice', 'num'].includes(columnType)) {
|
|
11676
|
+
var totalMoney = null;
|
|
11677
|
+
if (columnType === 'num') {
|
|
11678
|
+
totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].sharePrice));
|
|
11679
|
+
} else {
|
|
11680
|
+
totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
|
|
11681
|
+
}
|
|
11682
|
+
if (totalMoney !== null) {
|
|
11683
|
+
value[index]['returnPrice'] = totalMoney.toString();
|
|
11684
|
+
}
|
|
11685
|
+
}
|
|
11686
|
+
} else if (type === 'WDT_EXCHANGE_GOODS') {
|
|
11687
|
+
if (['price', 'num'].includes(columnType)) {
|
|
11688
|
+
var _totalMoney = null;
|
|
11689
|
+
if (columnType === 'num') {
|
|
11690
|
+
_totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].price));
|
|
11691
|
+
} else {
|
|
11692
|
+
_totalMoney = new BigNumber(value[index][columnType]).multipliedBy(new BigNumber(value[index].num));
|
|
11693
|
+
}
|
|
11694
|
+
if (_totalMoney !== null) {
|
|
11695
|
+
value[index]['exchangePrice'] = _totalMoney.toString();
|
|
11696
|
+
}
|
|
11697
|
+
}
|
|
11698
|
+
}
|
|
11670
11699
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
11671
11700
|
}
|
|
11672
11701
|
};
|
|
@@ -11772,6 +11801,260 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11772
11801
|
}
|
|
11773
11802
|
}];
|
|
11774
11803
|
break;
|
|
11804
|
+
case 'WDT_RETURN_GOODS':
|
|
11805
|
+
{
|
|
11806
|
+
columns = [{
|
|
11807
|
+
dataIndex: 'goodId',
|
|
11808
|
+
title: "SPUID",
|
|
11809
|
+
align: 'center',
|
|
11810
|
+
ellipsis: true,
|
|
11811
|
+
width: 70
|
|
11812
|
+
}, {
|
|
11813
|
+
dataIndex: 'goodNo',
|
|
11814
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11815
|
+
align: 'center',
|
|
11816
|
+
ellipsis: true,
|
|
11817
|
+
width: 180
|
|
11818
|
+
}, {
|
|
11819
|
+
dataIndex: 'goodName',
|
|
11820
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11821
|
+
align: 'center',
|
|
11822
|
+
ellipsis: true,
|
|
11823
|
+
width: 250
|
|
11824
|
+
}, {
|
|
11825
|
+
dataIndex: 'specId',
|
|
11826
|
+
title: "".concat(text, "SKUID"),
|
|
11827
|
+
align: 'center',
|
|
11828
|
+
ellipsis: true,
|
|
11829
|
+
width: 100
|
|
11830
|
+
}, {
|
|
11831
|
+
dataIndex: 'specNo',
|
|
11832
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11833
|
+
align: 'center',
|
|
11834
|
+
ellipsis: true,
|
|
11835
|
+
width: 180
|
|
11836
|
+
}, {
|
|
11837
|
+
dataIndex: 'specName',
|
|
11838
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11839
|
+
align: 'center',
|
|
11840
|
+
ellipsis: true,
|
|
11841
|
+
width: 250
|
|
11842
|
+
}, {
|
|
11843
|
+
dataIndex: 'num',
|
|
11844
|
+
title: "".concat(text, "\u9000\u8D27\u6570\u91CF"),
|
|
11845
|
+
align: 'center',
|
|
11846
|
+
ellipsis: true,
|
|
11847
|
+
width: 100,
|
|
11848
|
+
render: function render(val, record, index) {
|
|
11849
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11850
|
+
style: {
|
|
11851
|
+
width: 70
|
|
11852
|
+
},
|
|
11853
|
+
value: val,
|
|
11854
|
+
min: 1,
|
|
11855
|
+
precision: 0,
|
|
11856
|
+
onChange: function onChange(num) {
|
|
11857
|
+
return updateHandle(num, index, 'num');
|
|
11858
|
+
}
|
|
11859
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11860
|
+
}
|
|
11861
|
+
}, {
|
|
11862
|
+
dataIndex: 'sharePrice',
|
|
11863
|
+
title: "\u5206\u644A\u4EF7",
|
|
11864
|
+
align: 'center',
|
|
11865
|
+
ellipsis: true,
|
|
11866
|
+
width: 80,
|
|
11867
|
+
render: function render(val, record, index) {
|
|
11868
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11869
|
+
style: {
|
|
11870
|
+
width: 70
|
|
11871
|
+
},
|
|
11872
|
+
value: val,
|
|
11873
|
+
min: 0,
|
|
11874
|
+
onChange: function onChange(value) {
|
|
11875
|
+
return updateHandle(value, index, 'sharePrice');
|
|
11876
|
+
}
|
|
11877
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11878
|
+
}
|
|
11879
|
+
}, {
|
|
11880
|
+
dataIndex: 'returnPrice',
|
|
11881
|
+
title: "".concat(text, "\u9000\u8D27\u91D1\u989D"),
|
|
11882
|
+
align: 'center',
|
|
11883
|
+
ellipsis: true,
|
|
11884
|
+
width: 100
|
|
11885
|
+
}, {
|
|
11886
|
+
dataIndex: 'giftType',
|
|
11887
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
11888
|
+
align: 'center',
|
|
11889
|
+
ellipsis: true,
|
|
11890
|
+
width: 100,
|
|
11891
|
+
render: function render(val) {
|
|
11892
|
+
var giftTypeMap = {
|
|
11893
|
+
0: '非赠品',
|
|
11894
|
+
1: '自动赠送',
|
|
11895
|
+
2: '手工赠送',
|
|
11896
|
+
3: '回购自动送赠品',
|
|
11897
|
+
4: '前N有礼送赠品',
|
|
11898
|
+
6: '天猫优仓赠品',
|
|
11899
|
+
7: '淘宝CRM会员送赠'
|
|
11900
|
+
};
|
|
11901
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
11902
|
+
}
|
|
11903
|
+
}, {
|
|
11904
|
+
dataIndex: 'type',
|
|
11905
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
11906
|
+
align: 'center',
|
|
11907
|
+
ellipsis: true,
|
|
11908
|
+
width: 100,
|
|
11909
|
+
render: function render(val, record, index) {
|
|
11910
|
+
var options = [{
|
|
11911
|
+
label: '单品',
|
|
11912
|
+
value: '1'
|
|
11913
|
+
}, {
|
|
11914
|
+
label: '组合装',
|
|
11915
|
+
value: '2'
|
|
11916
|
+
}];
|
|
11917
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
11918
|
+
style: {
|
|
11919
|
+
width: 70
|
|
11920
|
+
},
|
|
11921
|
+
options: options,
|
|
11922
|
+
value: val,
|
|
11923
|
+
onChange: function onChange(value) {
|
|
11924
|
+
return updateHandle(value, index, 'type');
|
|
11925
|
+
}
|
|
11926
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11927
|
+
}
|
|
11928
|
+
}];
|
|
11929
|
+
}
|
|
11930
|
+
break;
|
|
11931
|
+
case 'WDT_EXCHANGE_GOODS':
|
|
11932
|
+
{
|
|
11933
|
+
columns = [{
|
|
11934
|
+
dataIndex: 'goodId',
|
|
11935
|
+
title: "SPUID",
|
|
11936
|
+
align: 'center',
|
|
11937
|
+
ellipsis: true,
|
|
11938
|
+
width: 70
|
|
11939
|
+
}, {
|
|
11940
|
+
dataIndex: 'goodNo',
|
|
11941
|
+
title: "\u5546\u54C1SPU\u7F16\u7801",
|
|
11942
|
+
align: 'center',
|
|
11943
|
+
ellipsis: true,
|
|
11944
|
+
width: 180
|
|
11945
|
+
}, {
|
|
11946
|
+
dataIndex: 'goodName',
|
|
11947
|
+
title: "".concat(text, "\u5546\u54C1\u540D\u79F0"),
|
|
11948
|
+
align: 'center',
|
|
11949
|
+
ellipsis: true,
|
|
11950
|
+
width: 250
|
|
11951
|
+
}, {
|
|
11952
|
+
dataIndex: 'specId',
|
|
11953
|
+
title: "".concat(text, "SKUID"),
|
|
11954
|
+
align: 'center',
|
|
11955
|
+
ellipsis: true,
|
|
11956
|
+
width: 100
|
|
11957
|
+
}, {
|
|
11958
|
+
dataIndex: 'specNo',
|
|
11959
|
+
title: "".concat(text, "\u5546\u54C1SKU\u7F16\u7801"),
|
|
11960
|
+
align: 'center',
|
|
11961
|
+
ellipsis: true,
|
|
11962
|
+
width: 180
|
|
11963
|
+
}, {
|
|
11964
|
+
dataIndex: 'specName',
|
|
11965
|
+
title: "".concat(text, "\u5546\u54C1SKU\u540D\u79F0"),
|
|
11966
|
+
align: 'center',
|
|
11967
|
+
ellipsis: true,
|
|
11968
|
+
width: 250
|
|
11969
|
+
}, {
|
|
11970
|
+
dataIndex: 'num',
|
|
11971
|
+
title: "".concat(text, "\u6362\u51FA\u6570\u91CF"),
|
|
11972
|
+
align: 'center',
|
|
11973
|
+
ellipsis: true,
|
|
11974
|
+
width: 100,
|
|
11975
|
+
render: function render(val, record, index) {
|
|
11976
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11977
|
+
style: {
|
|
11978
|
+
width: 70
|
|
11979
|
+
},
|
|
11980
|
+
value: val,
|
|
11981
|
+
min: 1,
|
|
11982
|
+
precision: 0,
|
|
11983
|
+
onChange: function onChange(num) {
|
|
11984
|
+
return updateHandle(num, index, 'num');
|
|
11985
|
+
}
|
|
11986
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
11987
|
+
}
|
|
11988
|
+
}, {
|
|
11989
|
+
dataIndex: 'price',
|
|
11990
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
11991
|
+
align: 'center',
|
|
11992
|
+
ellipsis: true,
|
|
11993
|
+
width: 100,
|
|
11994
|
+
render: function render(val, record, index) {
|
|
11995
|
+
return !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
11996
|
+
style: {
|
|
11997
|
+
width: 70
|
|
11998
|
+
},
|
|
11999
|
+
value: val,
|
|
12000
|
+
min: 0,
|
|
12001
|
+
onChange: function onChange(value) {
|
|
12002
|
+
return updateHandle(value, index, 'price');
|
|
12003
|
+
}
|
|
12004
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12005
|
+
}
|
|
12006
|
+
}, {
|
|
12007
|
+
dataIndex: 'exchangePrice',
|
|
12008
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
12009
|
+
align: 'center',
|
|
12010
|
+
ellipsis: true,
|
|
12011
|
+
width: 100
|
|
12012
|
+
}, {
|
|
12013
|
+
dataIndex: 'giftType',
|
|
12014
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12015
|
+
align: 'center',
|
|
12016
|
+
ellipsis: true,
|
|
12017
|
+
width: 100,
|
|
12018
|
+
render: function render(val) {
|
|
12019
|
+
var giftTypeMap = {
|
|
12020
|
+
0: '非赠品',
|
|
12021
|
+
1: '自动赠送',
|
|
12022
|
+
2: '手工赠送',
|
|
12023
|
+
3: '回购自动送赠品',
|
|
12024
|
+
4: '前N有礼送赠品',
|
|
12025
|
+
6: '天猫优仓赠品',
|
|
12026
|
+
7: '淘宝CRM会员送赠'
|
|
12027
|
+
};
|
|
12028
|
+
return /*#__PURE__*/React.createElement("span", null, giftTypeMap[val]);
|
|
12029
|
+
}
|
|
12030
|
+
}, {
|
|
12031
|
+
dataIndex: 'type',
|
|
12032
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
12033
|
+
align: 'center',
|
|
12034
|
+
ellipsis: true,
|
|
12035
|
+
width: 100,
|
|
12036
|
+
render: function render(val, record, index) {
|
|
12037
|
+
var options = [{
|
|
12038
|
+
label: '单品',
|
|
12039
|
+
value: '1'
|
|
12040
|
+
}, {
|
|
12041
|
+
label: '组合装',
|
|
12042
|
+
value: '2'
|
|
12043
|
+
}];
|
|
12044
|
+
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
12045
|
+
style: {
|
|
12046
|
+
width: 70
|
|
12047
|
+
},
|
|
12048
|
+
options: options,
|
|
12049
|
+
value: val,
|
|
12050
|
+
onChange: function onChange(value) {
|
|
12051
|
+
return updateHandle(value, index, 'type');
|
|
12052
|
+
}
|
|
12053
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
12054
|
+
}
|
|
12055
|
+
}];
|
|
12056
|
+
}
|
|
12057
|
+
break;
|
|
11775
12058
|
default:
|
|
11776
12059
|
columns = [{
|
|
11777
12060
|
dataIndex: 'mark',
|
|
@@ -11913,7 +12196,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11913
12196
|
}, [showHeader, value, disabled]);
|
|
11914
12197
|
var onSubmit = function onSubmit(list) {
|
|
11915
12198
|
var newList = [];
|
|
11916
|
-
if (['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type)) {
|
|
12199
|
+
if (['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type)) {
|
|
11917
12200
|
newList = list.map(function (item) {
|
|
11918
12201
|
item.uuid = uuid();
|
|
11919
12202
|
item.canDelete = true;
|
|
@@ -11921,6 +12204,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11921
12204
|
item.orderPrice = 0;
|
|
11922
12205
|
item.sharePrice = 0;
|
|
11923
12206
|
item.canUpdateNumber = canUpdateNumber;
|
|
12207
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
12208
|
+
item.price = item.retailPrice;
|
|
12209
|
+
item.type = '1';
|
|
12210
|
+
}
|
|
11924
12211
|
return item;
|
|
11925
12212
|
});
|
|
11926
12213
|
} else {
|
|
@@ -11991,7 +12278,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11991
12278
|
locale: {
|
|
11992
12279
|
emptyText: '暂无数据'
|
|
11993
12280
|
}
|
|
11994
|
-
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
|
|
12281
|
+
})), ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React.createElement(WdtGoodsModal, {
|
|
11995
12282
|
ref: refModal,
|
|
11996
12283
|
onSubmit: onSubmit,
|
|
11997
12284
|
width: width,
|
|
@@ -12752,7 +13039,7 @@ var index$1 = (function (props) {
|
|
|
12752
13039
|
}();
|
|
12753
13040
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
12754
13041
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
12755
|
-
var _yield$request3, success, data;
|
|
13042
|
+
var _yield$request3, success, data, trades;
|
|
12756
13043
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
12757
13044
|
while (1) switch (_context3.prev = _context3.next) {
|
|
12758
13045
|
case 0:
|
|
@@ -12768,15 +13055,25 @@ var index$1 = (function (props) {
|
|
|
12768
13055
|
success = _yield$request3.success;
|
|
12769
13056
|
data = _yield$request3.data;
|
|
12770
13057
|
if (success) {
|
|
13058
|
+
trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
13059
|
+
return (item.srcTid || '').split(',').includes(orderNo);
|
|
13060
|
+
}).map(function (item) {
|
|
13061
|
+
if (Array.isArray(item.goodDetails)) {
|
|
13062
|
+
item.goodDetails = item.goodDetails.filter(function (good) {
|
|
13063
|
+
return good.srcTid === orderNo;
|
|
13064
|
+
});
|
|
13065
|
+
}
|
|
13066
|
+
return item;
|
|
13067
|
+
});
|
|
12771
13068
|
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
12772
|
-
orders:
|
|
13069
|
+
orders: trades.map(function (item) {
|
|
12773
13070
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12774
13071
|
billNo: item.tradeNo,
|
|
12775
13072
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
12776
13073
|
billTag: item.tagName
|
|
12777
13074
|
});
|
|
12778
13075
|
}),
|
|
12779
|
-
showOrderInfo:
|
|
13076
|
+
showOrderInfo: trades.map(function (item) {
|
|
12780
13077
|
return {
|
|
12781
13078
|
billNo: item.tradeNo,
|
|
12782
13079
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
@@ -12866,8 +13163,10 @@ var componentMap$1 = {
|
|
|
12866
13163
|
reissueType: 'wdtReissueType',
|
|
12867
13164
|
returnType: 'wdtReturnType',
|
|
12868
13165
|
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
13166
|
+
returnSelectList: 'wdtReturnSelectList',
|
|
12869
13167
|
deleteGood: 'wdtDeleteGood',
|
|
12870
|
-
returnDeleteGood: 'wdtReturnDeleteGood'
|
|
13168
|
+
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13169
|
+
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
12871
13170
|
}
|
|
12872
13171
|
}
|
|
12873
13172
|
};
|
|
@@ -12934,7 +13233,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12934
13233
|
setTableSelect(['2', '4'].includes(data.val));
|
|
12935
13234
|
if (['1', '3'].includes(data.val)) {
|
|
12936
13235
|
var _valueRef$current5, _valueRef$current6;
|
|
12937
|
-
pubsub.publish(componentMap$1[
|
|
13236
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.returnSelectListReturn, {
|
|
12938
13237
|
list: 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]) || []),
|
|
12939
13238
|
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current6 = valueRef.current) === null || _valueRef$current6 === void 0 ? void 0 : _valueRef$current6.shopCode,
|
|
12940
13239
|
goodValue: data === null || data === void 0 ? void 0 : data.goodValue
|
|
@@ -12952,15 +13251,15 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12952
13251
|
};
|
|
12953
13252
|
}, [disabled]);
|
|
12954
13253
|
var _onSelect = function onSelect(list) {
|
|
12955
|
-
var _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
13254
|
+
var _typeMap, _withInfo$current, _withInfo$current2, _valueRef$current7;
|
|
12956
13255
|
if (disabled) return;
|
|
12957
13256
|
var newList = cloneDeep(list);
|
|
12958
|
-
var typeMap =
|
|
13257
|
+
var typeMap = (_typeMap = {
|
|
12959
13258
|
// type: componentMap[compType].eventNameMap.selectList,
|
|
12960
13259
|
// returnType: componentMap[compType].eventNameMap.returnSelectList,
|
|
12961
13260
|
// reissueType: componentMap[compType].eventNameMap.reissueSelectList,
|
|
12962
13261
|
type: componentMap$1[compType].eventNameMap.selectList
|
|
12963
|
-
}, "".concat(componentMap$1[compType].type, "ReissueType"), componentMap$1[compType].eventNameMap.reissueSelectList);
|
|
13262
|
+
}, _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);
|
|
12964
13263
|
var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
|
|
12965
13264
|
// console.log('onSelect', type, withInfo.current, newList);
|
|
12966
13265
|
pubsub.publish(type, {
|
|
@@ -12978,6 +13277,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
12978
13277
|
pubsub.publish(componentMap$1[compType].eventNameMap.deleteGood, deleteId);
|
|
12979
13278
|
pubsub.publish(componentMap$1[compType].eventNameMap.reissueDeleteGood, deleteId);
|
|
12980
13279
|
pubsub.publish(componentMap$1[compType].eventNameMap.returnDeleteGood, deleteId);
|
|
13280
|
+
pubsub.publish(componentMap$1[compType].eventNameMap.exchangeDeleteGood, deleteId);
|
|
12981
13281
|
};
|
|
12982
13282
|
var changeHandle = function changeHandle(list) {
|
|
12983
13283
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
@@ -13002,6 +13302,263 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13002
13302
|
}));
|
|
13003
13303
|
};
|
|
13004
13304
|
|
|
13305
|
+
var componentMap$2 = {
|
|
13306
|
+
'WDT_RETURN_GOODS': {
|
|
13307
|
+
type: 'wdt',
|
|
13308
|
+
valueKey: 'wdtReturnGoods',
|
|
13309
|
+
returnTypeKey: 'wdtReturnType',
|
|
13310
|
+
name: '旺店通',
|
|
13311
|
+
eventNameMap: {
|
|
13312
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13313
|
+
returnType: 'wdtReturnType',
|
|
13314
|
+
returnSelectListReturn: 'wdtReturnSelectListReturn',
|
|
13315
|
+
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13316
|
+
returnSelectList: 'wdtReturnSelectList',
|
|
13317
|
+
exchangeCopyGood: 'wdtExchangeCopyGood',
|
|
13318
|
+
exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
|
|
13319
|
+
}
|
|
13320
|
+
}
|
|
13321
|
+
};
|
|
13322
|
+
var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
13323
|
+
var value = props.value,
|
|
13324
|
+
onChange = props.onChange,
|
|
13325
|
+
_props$reasonList = props.reasonList,
|
|
13326
|
+
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
13327
|
+
disabled = props.disabled,
|
|
13328
|
+
compType = props.type;
|
|
13329
|
+
var valueRef = useRef({});
|
|
13330
|
+
useEffect(function () {
|
|
13331
|
+
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
13332
|
+
var _valueRef$current, _valueRef$current2;
|
|
13333
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.exchangeBackCopyGood, {
|
|
13334
|
+
list: 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]) || []),
|
|
13335
|
+
shopCode: valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.shopCode
|
|
13336
|
+
});
|
|
13337
|
+
});
|
|
13338
|
+
return function () {
|
|
13339
|
+
pubsub.unsubscribe(subscription);
|
|
13340
|
+
};
|
|
13341
|
+
}, []);
|
|
13342
|
+
useEffect(function () {
|
|
13343
|
+
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.returnSelectList, function (_, data) {
|
|
13344
|
+
if (disabled) return;
|
|
13345
|
+
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
13346
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13347
|
+
});
|
|
13348
|
+
if (compType === 'WDT_RETURN_GOODS') {
|
|
13349
|
+
newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13350
|
+
if (typeof item.type === 'undefined') {
|
|
13351
|
+
item.type = '1';
|
|
13352
|
+
}
|
|
13353
|
+
if (typeof item.returnPrice === 'undefined') {
|
|
13354
|
+
item.returnPrice = new BigNumber(item.num).multipliedBy(new BigNumber(item.sharePrice)).toString();
|
|
13355
|
+
}
|
|
13356
|
+
if (item.srcOid) {
|
|
13357
|
+
item.oid = item.srcOid;
|
|
13358
|
+
}
|
|
13359
|
+
return item;
|
|
13360
|
+
});
|
|
13361
|
+
} else {
|
|
13362
|
+
newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13363
|
+
}
|
|
13364
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13365
|
+
});
|
|
13366
|
+
return function () {
|
|
13367
|
+
pubsub.unsubscribe(subscription);
|
|
13368
|
+
};
|
|
13369
|
+
}, []);
|
|
13370
|
+
useEffect(function () {
|
|
13371
|
+
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.returnSelectListReturn, function (_, data) {
|
|
13372
|
+
if (disabled) return;
|
|
13373
|
+
var newValue = _objectSpread2(_objectSpread2({}, data.goodValue), {}, {
|
|
13374
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13375
|
+
});
|
|
13376
|
+
if (compType === 'WDT_RETURN_GOODS') {
|
|
13377
|
+
newValue[componentMap$2[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13378
|
+
if (typeof item.type === 'undefined') {
|
|
13379
|
+
item.type = '1';
|
|
13380
|
+
}
|
|
13381
|
+
if (typeof item.returnPrice === 'undefined') {
|
|
13382
|
+
item.returnPrice = new BigNumber(item.num).multipliedBy(new BigNumber(item.sharePrice)).toString();
|
|
13383
|
+
}
|
|
13384
|
+
if (item.srcOid) {
|
|
13385
|
+
item.oid = item.srcOid;
|
|
13386
|
+
}
|
|
13387
|
+
return item;
|
|
13388
|
+
});
|
|
13389
|
+
} else {
|
|
13390
|
+
newValue[componentMap$2[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13391
|
+
}
|
|
13392
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13393
|
+
});
|
|
13394
|
+
return function () {
|
|
13395
|
+
pubsub.unsubscribe(subscription);
|
|
13396
|
+
};
|
|
13397
|
+
}, []);
|
|
13398
|
+
useEffect(function () {
|
|
13399
|
+
valueRef.current = value;
|
|
13400
|
+
pubsub.subscribeOnce(componentMap$2[compType].eventNameMap.returnDeleteGood, function (_, data) {
|
|
13401
|
+
if (disabled) return;
|
|
13402
|
+
if (value) {
|
|
13403
|
+
var newValue = _objectSpread2({}, value);
|
|
13404
|
+
newValue[componentMap$2[compType].valueKey] = newValue[componentMap$2[compType].valueKey].filter(function (item) {
|
|
13405
|
+
return item.sku !== data;
|
|
13406
|
+
});
|
|
13407
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13408
|
+
}
|
|
13409
|
+
});
|
|
13410
|
+
pubsub.subscribeOnce(componentMap$2[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13411
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13412
|
+
shopCode: data.shopCode
|
|
13413
|
+
}));
|
|
13414
|
+
});
|
|
13415
|
+
}, [value, disabled]);
|
|
13416
|
+
var changeTypeHandle = function changeTypeHandle(val) {
|
|
13417
|
+
var newValue = _objectSpread2({}, value);
|
|
13418
|
+
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
13419
|
+
newValue[componentMap$2[compType].valueKey] = [];
|
|
13420
|
+
if (['2'].includes(val[0])) {
|
|
13421
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13422
|
+
valueRef.current = newValue;
|
|
13423
|
+
}
|
|
13424
|
+
pubsub.publish(componentMap$2[compType].eventNameMap.returnType, {
|
|
13425
|
+
val: val[0],
|
|
13426
|
+
goodValue: newValue
|
|
13427
|
+
});
|
|
13428
|
+
};
|
|
13429
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13430
|
+
var newValue = _objectSpread2({}, value);
|
|
13431
|
+
newValue[componentMap$2[compType].valueKey] = val;
|
|
13432
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13433
|
+
};
|
|
13434
|
+
//显示选择商品按钮 原单换不显示选择商品
|
|
13435
|
+
// const showChangeBtn = useMemo(() => {
|
|
13436
|
+
// return ['2'].includes(value?.[componentMap[compType].returnTypeKey]?.[0]);
|
|
13437
|
+
// }, [value?.[componentMap[compType].returnTypeKey]]);
|
|
13438
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, {
|
|
13439
|
+
style: {
|
|
13440
|
+
marginBottom: '8px'
|
|
13441
|
+
},
|
|
13442
|
+
disabled: disabled,
|
|
13443
|
+
allowClear: false,
|
|
13444
|
+
options: reasonList,
|
|
13445
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
13446
|
+
onChange: function onChange(val) {
|
|
13447
|
+
return changeTypeHandle(val);
|
|
13448
|
+
}
|
|
13449
|
+
}), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13450
|
+
key: componentMap$2[compType].type
|
|
13451
|
+
}, props), {}, {
|
|
13452
|
+
disabled: disabled,
|
|
13453
|
+
canUpdateNumber: true,
|
|
13454
|
+
showChangeBtn: false,
|
|
13455
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13456
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].valueKey],
|
|
13457
|
+
onChange: function onChange(val) {
|
|
13458
|
+
return changeGoodHandle(val);
|
|
13459
|
+
}
|
|
13460
|
+
})));
|
|
13461
|
+
};
|
|
13462
|
+
|
|
13463
|
+
var componentMap$3 = {
|
|
13464
|
+
'WDT_EXCHANGE_GOODS': {
|
|
13465
|
+
type: 'wdt',
|
|
13466
|
+
valueKey: 'wdtExchangeGoods',
|
|
13467
|
+
returnTypeKey: 'wdtExchangeType',
|
|
13468
|
+
name: '旺店通',
|
|
13469
|
+
eventNameMap: {
|
|
13470
|
+
changeShopCode: 'wdtChangeShopCode',
|
|
13471
|
+
exchangeDeleteGood: 'wdtExchangeDeleteGood',
|
|
13472
|
+
exchangeCopyGood: 'wdtExchangeCopyGood',
|
|
13473
|
+
exchangeBackCopyGood: 'wdtExchangeBackCopyGood'
|
|
13474
|
+
}
|
|
13475
|
+
}
|
|
13476
|
+
};
|
|
13477
|
+
var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
13478
|
+
var value = props.value,
|
|
13479
|
+
onChange = props.onChange,
|
|
13480
|
+
disabled = props.disabled,
|
|
13481
|
+
compType = props.type;
|
|
13482
|
+
var valueRef = useRef({});
|
|
13483
|
+
useEffect(function () {
|
|
13484
|
+
var subscription = pubsub.subscribe(componentMap$3[compType].eventNameMap.exchangeBackCopyGood, function (_, data) {
|
|
13485
|
+
if (disabled) return;
|
|
13486
|
+
var newValue = {
|
|
13487
|
+
shopCode: data === null || data === void 0 ? void 0 : data.shopCode
|
|
13488
|
+
};
|
|
13489
|
+
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
13490
|
+
newValue[componentMap$3[compType].valueKey] = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
13491
|
+
if (typeof item.type === 'undefined') {
|
|
13492
|
+
item.type = '1';
|
|
13493
|
+
}
|
|
13494
|
+
item.price = item.sharePrice;
|
|
13495
|
+
if (typeof item.exchangePrice === 'undefined') {
|
|
13496
|
+
item.exchangePrice = new BigNumber(item.num).multipliedBy(new BigNumber(item.price)).toString();
|
|
13497
|
+
}
|
|
13498
|
+
return item;
|
|
13499
|
+
});
|
|
13500
|
+
} else {
|
|
13501
|
+
newValue[componentMap$3[compType].valueKey] = (data === null || data === void 0 ? void 0 : data.list) || [];
|
|
13502
|
+
}
|
|
13503
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13504
|
+
});
|
|
13505
|
+
return function () {
|
|
13506
|
+
pubsub.unsubscribe(subscription);
|
|
13507
|
+
};
|
|
13508
|
+
});
|
|
13509
|
+
useEffect(function () {
|
|
13510
|
+
valueRef.current = value;
|
|
13511
|
+
pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.exchangeDeleteGood, function (_, data) {
|
|
13512
|
+
if (disabled) return;
|
|
13513
|
+
if (value) {
|
|
13514
|
+
var newValue = _objectSpread2({}, value);
|
|
13515
|
+
newValue[componentMap$3[compType].valueKey] = newValue[componentMap$3[compType].valueKey].filter(function (item) {
|
|
13516
|
+
return item.sku !== data;
|
|
13517
|
+
});
|
|
13518
|
+
onChange(newValue);
|
|
13519
|
+
}
|
|
13520
|
+
});
|
|
13521
|
+
pubsub.subscribeOnce(componentMap$3[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13522
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13523
|
+
shopCode: data.shopCode
|
|
13524
|
+
}));
|
|
13525
|
+
});
|
|
13526
|
+
}, [value]);
|
|
13527
|
+
var changeGoodHandle = function changeGoodHandle(val) {
|
|
13528
|
+
var newValue = _objectSpread2({}, value);
|
|
13529
|
+
if (compType === 'WDT_EXCHANGE_GOODS') {
|
|
13530
|
+
val = val.map(function (item) {
|
|
13531
|
+
item.exchangePrice = new BigNumber(item.num).multipliedBy(new BigNumber(item.price)).toString();
|
|
13532
|
+
return item;
|
|
13533
|
+
});
|
|
13534
|
+
}
|
|
13535
|
+
newValue[componentMap$3[compType].valueKey] = val;
|
|
13536
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
13537
|
+
};
|
|
13538
|
+
var copyGoods = function copyGoods() {
|
|
13539
|
+
var copyHandle = function copyHandle() {
|
|
13540
|
+
pubsub.publish(componentMap$3[compType].eventNameMap.exchangeCopyGood, 'WDT_EXCHANGE_GOODS');
|
|
13541
|
+
};
|
|
13542
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
13543
|
+
type: "link",
|
|
13544
|
+
onClick: copyHandle
|
|
13545
|
+
}, "\u590D\u5236\u9000\u56DE\u5546\u54C1");
|
|
13546
|
+
};
|
|
13547
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13548
|
+
key: componentMap$3[compType].type
|
|
13549
|
+
}, props), {}, {
|
|
13550
|
+
disabled: disabled,
|
|
13551
|
+
canUpdateNumber: true,
|
|
13552
|
+
showChangeBtn: true,
|
|
13553
|
+
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
13554
|
+
value: value === null || value === void 0 ? void 0 : value[componentMap$3[compType].valueKey],
|
|
13555
|
+
otherOperations: copyGoods(),
|
|
13556
|
+
onChange: function onChange(val) {
|
|
13557
|
+
return changeGoodHandle(val);
|
|
13558
|
+
}
|
|
13559
|
+
})));
|
|
13560
|
+
};
|
|
13561
|
+
|
|
13005
13562
|
var _excluded$g = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
13006
13563
|
var typeMap$1 = {
|
|
13007
13564
|
WDT_REISSUE_GOODS: {
|
|
@@ -13790,7 +14347,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13790
14347
|
changeIndex = _useState2[0],
|
|
13791
14348
|
setChangeIndex = _useState2[1]; //选中的包裹
|
|
13792
14349
|
useEffect(function () {
|
|
13793
|
-
if (!(value === null || value === void 0 ? void 0 : value.length)) {
|
|
14350
|
+
if (!(value === null || value === void 0 ? void 0 : value.length) && type === 1) {
|
|
13794
14351
|
onChange === null || onChange === void 0 ? void 0 : onChange(typeInitValueMap$1[type].initValue);
|
|
13795
14352
|
}
|
|
13796
14353
|
}, [value, type]);
|
|
@@ -13829,7 +14386,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13829
14386
|
return setChangeIndex(index);
|
|
13830
14387
|
}
|
|
13831
14388
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
|
|
13832
|
-
}))) : null, value.length ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
14389
|
+
}))) : null, value.length || type !== 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
13833
14390
|
disabled: disabled,
|
|
13834
14391
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
13835
14392
|
onChange: function onChange(e) {
|
|
@@ -13844,12 +14401,18 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
13844
14401
|
},
|
|
13845
14402
|
value: (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.returnGoodsTradeId
|
|
13846
14403
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
13847
|
-
disabled:
|
|
14404
|
+
disabled: disabled,
|
|
13848
14405
|
placeholder: "\u8BF7\u8F93\u5165\u8865\u53D1\u5355id",
|
|
14406
|
+
onChange: function onChange(e) {
|
|
14407
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
14408
|
+
},
|
|
13849
14409
|
value: (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.billNo
|
|
13850
14410
|
})) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
13851
|
-
disabled:
|
|
14411
|
+
disabled: disabled,
|
|
13852
14412
|
placeholder: "\u8BF7\u8F93\u5165\u6362\u8D27\u5355id",
|
|
14413
|
+
onChange: function onChange(e) {
|
|
14414
|
+
return changeInputHandle(e.target.value, 'billNo');
|
|
14415
|
+
},
|
|
13853
14416
|
value: (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4.billNo
|
|
13854
14417
|
})) : null) : null);
|
|
13855
14418
|
};
|
|
@@ -13911,7 +14474,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13911
14474
|
return setChangeIndex(index);
|
|
13912
14475
|
}
|
|
13913
14476
|
}, "\u7CFB\u7EDF\u8BA2\u5355\u53F7".concat(index + 1)));
|
|
13914
|
-
}))) : null,
|
|
14477
|
+
}))) : null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
13915
14478
|
showSearch: true,
|
|
13916
14479
|
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.status,
|
|
13917
14480
|
filterOption: function filterOption(input, option) {
|
|
@@ -13927,7 +14490,7 @@ var CommonSystemOrder$1 = function CommonSystemOrder(props) {
|
|
|
13927
14490
|
}
|
|
13928
14491
|
}))), ((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2.reason) ? /*#__PURE__*/React.createElement("div", {
|
|
13929
14492
|
className: "c-red"
|
|
13930
|
-
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null)
|
|
14493
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null));
|
|
13931
14494
|
};
|
|
13932
14495
|
|
|
13933
14496
|
var _excluded$j = ["value", "onChange", "disabled", "failValue", "type"];
|
|
@@ -14015,4 +14578,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
14015
14578
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
14016
14579
|
};
|
|
14017
14580
|
|
|
14018
|
-
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|
|
14581
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|