@kmkf-fe-packages/basic-components 2.1.0 → 2.1.1
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/dist/index.js
CHANGED
|
@@ -22,377 +22,363 @@ var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
|
|
|
22
22
|
var pubsub__default = /*#__PURE__*/_interopDefaultLegacy(pubsub);
|
|
23
23
|
var BigNumber__default = /*#__PURE__*/_interopDefaultLegacy(BigNumber);
|
|
24
24
|
|
|
25
|
-
function _iterableToArrayLimit(
|
|
26
|
-
var
|
|
27
|
-
if (null !=
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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;
|
|
35
35
|
try {
|
|
36
|
-
if (
|
|
37
|
-
if (Object(
|
|
38
|
-
|
|
39
|
-
} else for (; !(
|
|
40
|
-
} catch (
|
|
41
|
-
|
|
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;
|
|
42
42
|
} finally {
|
|
43
43
|
try {
|
|
44
|
-
if (!
|
|
44
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
45
45
|
} finally {
|
|
46
|
-
if (
|
|
46
|
+
if (_d) throw _e;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
return
|
|
49
|
+
return _arr;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function ownKeys(
|
|
53
|
-
var
|
|
52
|
+
function ownKeys(object, enumerableOnly) {
|
|
53
|
+
var keys = Object.keys(object);
|
|
54
54
|
if (Object.getOwnPropertySymbols) {
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
return Object.getOwnPropertyDescriptor(
|
|
58
|
-
})),
|
|
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);
|
|
59
59
|
}
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
function _objectSpread2(
|
|
63
|
-
for (var
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
_defineProperty(
|
|
67
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
68
|
-
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));
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return target;
|
|
72
72
|
}
|
|
73
73
|
function _regeneratorRuntime() {
|
|
74
74
|
_regeneratorRuntime = function () {
|
|
75
|
-
return
|
|
75
|
+
return exports;
|
|
76
76
|
};
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
t[e] = r.value;
|
|
77
|
+
var exports = {},
|
|
78
|
+
Op = Object.prototype,
|
|
79
|
+
hasOwn = Op.hasOwnProperty,
|
|
80
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
81
|
+
obj[key] = desc.value;
|
|
83
82
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
function define(
|
|
89
|
-
return Object.defineProperty(
|
|
90
|
-
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,
|
|
91
90
|
enumerable: !0,
|
|
92
91
|
configurable: !0,
|
|
93
92
|
writable: !0
|
|
94
|
-
}),
|
|
93
|
+
}), obj[key];
|
|
95
94
|
}
|
|
96
95
|
try {
|
|
97
96
|
define({}, "");
|
|
98
|
-
} catch (
|
|
99
|
-
define = function (
|
|
100
|
-
return
|
|
97
|
+
} catch (err) {
|
|
98
|
+
define = function (obj, key, value) {
|
|
99
|
+
return obj[key] = value;
|
|
101
100
|
};
|
|
102
101
|
}
|
|
103
|
-
function wrap(
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return
|
|
108
|
-
value: makeInvokeMethod(
|
|
109
|
-
}),
|
|
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;
|
|
110
109
|
}
|
|
111
|
-
function tryCatch(
|
|
110
|
+
function tryCatch(fn, obj, arg) {
|
|
112
111
|
try {
|
|
113
112
|
return {
|
|
114
113
|
type: "normal",
|
|
115
|
-
arg:
|
|
114
|
+
arg: fn.call(obj, arg)
|
|
116
115
|
};
|
|
117
|
-
} catch (
|
|
116
|
+
} catch (err) {
|
|
118
117
|
return {
|
|
119
118
|
type: "throw",
|
|
120
|
-
arg:
|
|
119
|
+
arg: err
|
|
121
120
|
};
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
|
-
|
|
125
|
-
var
|
|
126
|
-
l = "suspendedYield",
|
|
127
|
-
f = "executing",
|
|
128
|
-
s = "completed",
|
|
129
|
-
y = {};
|
|
123
|
+
exports.wrap = wrap;
|
|
124
|
+
var ContinueSentinel = {};
|
|
130
125
|
function Generator() {}
|
|
131
126
|
function GeneratorFunction() {}
|
|
132
127
|
function GeneratorFunctionPrototype() {}
|
|
133
|
-
var
|
|
134
|
-
define(
|
|
128
|
+
var IteratorPrototype = {};
|
|
129
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
135
130
|
return this;
|
|
136
131
|
});
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
var
|
|
141
|
-
function defineIteratorMethods(
|
|
142
|
-
["next", "throw", "return"].forEach(function (
|
|
143
|
-
define(
|
|
144
|
-
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);
|
|
145
140
|
});
|
|
146
141
|
});
|
|
147
142
|
}
|
|
148
|
-
function AsyncIterator(
|
|
149
|
-
function invoke(
|
|
150
|
-
var
|
|
151
|
-
if ("throw" !==
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
return
|
|
155
|
-
invoke("next",
|
|
156
|
-
}, function (
|
|
157
|
-
invoke("throw",
|
|
158
|
-
}) :
|
|
159
|
-
|
|
160
|
-
}, function (
|
|
161
|
-
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);
|
|
162
157
|
});
|
|
163
158
|
}
|
|
164
|
-
|
|
159
|
+
reject(record.arg);
|
|
165
160
|
}
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
value: function (
|
|
161
|
+
var previousPromise;
|
|
162
|
+
defineProperty(this, "_invoke", {
|
|
163
|
+
value: function (method, arg) {
|
|
169
164
|
function callInvokeWithMethodAndArg() {
|
|
170
|
-
return new
|
|
171
|
-
invoke(
|
|
165
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
166
|
+
invoke(method, arg, resolve, reject);
|
|
172
167
|
});
|
|
173
168
|
}
|
|
174
|
-
return
|
|
169
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
175
170
|
}
|
|
176
171
|
});
|
|
177
172
|
}
|
|
178
|
-
function makeInvokeMethod(
|
|
179
|
-
var
|
|
180
|
-
return function (
|
|
181
|
-
if (
|
|
182
|
-
if (
|
|
183
|
-
if ("throw" ===
|
|
184
|
-
return
|
|
185
|
-
value: t,
|
|
186
|
-
done: !0
|
|
187
|
-
};
|
|
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();
|
|
188
180
|
}
|
|
189
|
-
for (
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
var
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
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;
|
|
196
188
|
}
|
|
197
189
|
}
|
|
198
|
-
if ("next" ===
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
} else "return" ===
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
if ("normal" ===
|
|
205
|
-
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;
|
|
206
198
|
return {
|
|
207
|
-
value:
|
|
208
|
-
done:
|
|
199
|
+
value: record.arg,
|
|
200
|
+
done: context.done
|
|
209
201
|
};
|
|
210
202
|
}
|
|
211
|
-
"throw" ===
|
|
203
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
212
204
|
}
|
|
213
205
|
};
|
|
214
206
|
}
|
|
215
|
-
function maybeInvokeDelegate(
|
|
216
|
-
var
|
|
217
|
-
|
|
218
|
-
if (
|
|
219
|
-
var
|
|
220
|
-
if ("throw" ===
|
|
221
|
-
var
|
|
222
|
-
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);
|
|
223
215
|
}
|
|
224
|
-
function pushTryEntry(
|
|
225
|
-
var
|
|
226
|
-
tryLoc:
|
|
216
|
+
function pushTryEntry(locs) {
|
|
217
|
+
var entry = {
|
|
218
|
+
tryLoc: locs[0]
|
|
227
219
|
};
|
|
228
|
-
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);
|
|
229
221
|
}
|
|
230
|
-
function resetTryEntry(
|
|
231
|
-
var
|
|
232
|
-
|
|
222
|
+
function resetTryEntry(entry) {
|
|
223
|
+
var record = entry.completion || {};
|
|
224
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
233
225
|
}
|
|
234
|
-
function Context(
|
|
226
|
+
function Context(tryLocsList) {
|
|
235
227
|
this.tryEntries = [{
|
|
236
228
|
tryLoc: "root"
|
|
237
|
-
}],
|
|
229
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
238
230
|
}
|
|
239
|
-
function values(
|
|
240
|
-
if (
|
|
241
|
-
var
|
|
242
|
-
if (
|
|
243
|
-
if ("function" == typeof
|
|
244
|
-
if (!isNaN(
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
for (; ++
|
|
248
|
-
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;
|
|
249
241
|
};
|
|
250
|
-
return
|
|
242
|
+
return next.next = next;
|
|
251
243
|
}
|
|
252
244
|
}
|
|
253
|
-
|
|
245
|
+
return {
|
|
246
|
+
next: doneResult
|
|
247
|
+
};
|
|
254
248
|
}
|
|
255
|
-
|
|
249
|
+
function doneResult() {
|
|
250
|
+
return {
|
|
251
|
+
value: undefined,
|
|
252
|
+
done: !0
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
256
256
|
value: GeneratorFunctionPrototype,
|
|
257
257
|
configurable: !0
|
|
258
|
-
}),
|
|
258
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
259
259
|
value: GeneratorFunction,
|
|
260
260
|
configurable: !0
|
|
261
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
262
|
-
var
|
|
263
|
-
return !!
|
|
264
|
-
},
|
|
265
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
266
|
-
},
|
|
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) {
|
|
267
267
|
return {
|
|
268
|
-
__await:
|
|
268
|
+
__await: arg
|
|
269
269
|
};
|
|
270
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
270
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
271
271
|
return this;
|
|
272
|
-
}),
|
|
273
|
-
void 0 ===
|
|
274
|
-
var
|
|
275
|
-
return
|
|
276
|
-
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();
|
|
277
277
|
});
|
|
278
|
-
}, defineIteratorMethods(
|
|
278
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
279
279
|
return this;
|
|
280
|
-
}), define(
|
|
280
|
+
}), define(Gp, "toString", function () {
|
|
281
281
|
return "[object Generator]";
|
|
282
|
-
}),
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
for (var
|
|
286
|
-
return
|
|
287
|
-
for (;
|
|
288
|
-
var
|
|
289
|
-
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;
|
|
290
290
|
}
|
|
291
291
|
return next.done = !0, next;
|
|
292
292
|
};
|
|
293
|
-
},
|
|
293
|
+
}, exports.values = values, Context.prototype = {
|
|
294
294
|
constructor: Context,
|
|
295
|
-
reset: function (
|
|
296
|
-
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);
|
|
297
297
|
},
|
|
298
298
|
stop: function () {
|
|
299
299
|
this.done = !0;
|
|
300
|
-
var
|
|
301
|
-
if ("throw" ===
|
|
300
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
301
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
302
302
|
return this.rval;
|
|
303
303
|
},
|
|
304
|
-
dispatchException: function (
|
|
305
|
-
if (this.done) throw
|
|
306
|
-
var
|
|
307
|
-
function handle(
|
|
308
|
-
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;
|
|
309
309
|
}
|
|
310
|
-
for (var
|
|
311
|
-
var
|
|
312
|
-
|
|
313
|
-
if ("root" ===
|
|
314
|
-
if (
|
|
315
|
-
var
|
|
316
|
-
|
|
317
|
-
if (
|
|
318
|
-
if (this.prev <
|
|
319
|
-
if (this.prev <
|
|
320
|
-
} else if (
|
|
321
|
-
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);
|
|
322
322
|
} else {
|
|
323
|
-
if (!
|
|
324
|
-
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);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
|
-
abrupt: function (
|
|
330
|
-
for (var
|
|
331
|
-
var
|
|
332
|
-
if (
|
|
333
|
-
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;
|
|
334
334
|
break;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
|
|
338
|
-
var
|
|
339
|
-
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);
|
|
340
340
|
},
|
|
341
|
-
complete: function (
|
|
342
|
-
if ("throw" ===
|
|
343
|
-
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;
|
|
344
344
|
},
|
|
345
|
-
finish: function (
|
|
346
|
-
for (var
|
|
347
|
-
var
|
|
348
|
-
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;
|
|
349
349
|
}
|
|
350
350
|
},
|
|
351
|
-
catch: function (
|
|
352
|
-
for (var
|
|
353
|
-
var
|
|
354
|
-
if (
|
|
355
|
-
var
|
|
356
|
-
if ("throw" ===
|
|
357
|
-
var
|
|
358
|
-
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);
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return thrown;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
throw new Error("illegal catch attempt");
|
|
364
364
|
},
|
|
365
|
-
delegateYield: function (
|
|
365
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
366
366
|
return this.delegate = {
|
|
367
|
-
iterator: values(
|
|
368
|
-
resultName:
|
|
369
|
-
nextLoc:
|
|
370
|
-
}, "next" === this.method && (this.arg =
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
}
|
|
374
|
-
function _toPrimitive(t, r) {
|
|
375
|
-
if ("object" != typeof t || !t) return t;
|
|
376
|
-
var e = t[Symbol.toPrimitive];
|
|
377
|
-
if (void 0 !== e) {
|
|
378
|
-
var i = e.call(t, r || "default");
|
|
379
|
-
if ("object" != typeof i) return i;
|
|
380
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
381
|
-
}
|
|
382
|
-
return ("string" === r ? String : Number)(t);
|
|
383
|
-
}
|
|
384
|
-
function _toPropertyKey(t) {
|
|
385
|
-
var i = _toPrimitive(t, "string");
|
|
386
|
-
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;
|
|
387
373
|
}
|
|
388
|
-
function _typeof(
|
|
374
|
+
function _typeof(obj) {
|
|
389
375
|
"@babel/helpers - typeof";
|
|
390
376
|
|
|
391
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
392
|
-
return typeof
|
|
393
|
-
} : function (
|
|
394
|
-
return
|
|
395
|
-
}, _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);
|
|
396
382
|
}
|
|
397
383
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
398
384
|
try {
|
|
@@ -550,6 +536,20 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
550
536
|
}
|
|
551
537
|
};
|
|
552
538
|
}
|
|
539
|
+
function _toPrimitive(input, hint) {
|
|
540
|
+
if (typeof input !== "object" || input === null) return input;
|
|
541
|
+
var prim = input[Symbol.toPrimitive];
|
|
542
|
+
if (prim !== undefined) {
|
|
543
|
+
var res = prim.call(input, hint || "default");
|
|
544
|
+
if (typeof res !== "object") return res;
|
|
545
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
546
|
+
}
|
|
547
|
+
return (hint === "string" ? String : Number)(input);
|
|
548
|
+
}
|
|
549
|
+
function _toPropertyKey(arg) {
|
|
550
|
+
var key = _toPrimitive(arg, "string");
|
|
551
|
+
return typeof key === "symbol" ? key : String(key);
|
|
552
|
+
}
|
|
553
553
|
|
|
554
554
|
function ApaasCascader(props) {
|
|
555
555
|
return /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
|
|
@@ -17015,6 +17015,14 @@ var GoodsModalMap = {
|
|
|
17015
17015
|
KM_REISSUE_GOODS: KmGoodsModal,
|
|
17016
17016
|
OTHER_GOODS: GoodsModal$2
|
|
17017
17017
|
};
|
|
17018
|
+
var systemOrderNoMap = {
|
|
17019
|
+
GY_GOODS: 'code',
|
|
17020
|
+
KM_GOODS: 'sid',
|
|
17021
|
+
WDT_GOODS: 'tradeNo',
|
|
17022
|
+
BS_E3_GOODS: 'orderSn',
|
|
17023
|
+
JST_GOODS: 'oId',
|
|
17024
|
+
WLN_GOODS: 'tradeNo'
|
|
17025
|
+
};
|
|
17018
17026
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
17019
17027
|
var columns = _ref.columns,
|
|
17020
17028
|
dataSource = _ref.dataSource,
|
|
@@ -17022,35 +17030,60 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
17022
17030
|
selectedRowKeys = _ref.selectedRowKeys,
|
|
17023
17031
|
onChangeSelectedKeys = _ref.onChangeSelectedKeys,
|
|
17024
17032
|
_ref$uniqueKey = _ref.uniqueKey,
|
|
17025
|
-
uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey
|
|
17026
|
-
|
|
17033
|
+
uniqueKey = _ref$uniqueKey === void 0 ? 'uuid' : _ref$uniqueKey,
|
|
17034
|
+
_ref$isGoods = _ref.isGoods,
|
|
17035
|
+
isGoods = _ref$isGoods === void 0 ? false : _ref$isGoods,
|
|
17036
|
+
_ref$systemOrders = _ref.systemOrders,
|
|
17037
|
+
systemOrders = _ref$systemOrders === void 0 ? [] : _ref$systemOrders,
|
|
17038
|
+
_ref$selectedSystemOr = _ref.selectedSystemOrders,
|
|
17039
|
+
_ref$type = _ref.type,
|
|
17040
|
+
type = _ref$type === void 0 ? '' : _ref$type,
|
|
17041
|
+
width = _ref.width;
|
|
17042
|
+
var _useState = React.useState(),
|
|
17027
17043
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17028
|
-
|
|
17029
|
-
|
|
17044
|
+
selectSystemNo = _useState2[0],
|
|
17045
|
+
setSelectSystemNo = _useState2[1];
|
|
17046
|
+
var _useState3 = React.useState(false),
|
|
17047
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
17048
|
+
tradeGoodsVisible = _useState4[0],
|
|
17049
|
+
setTradeGoodsVisible = _useState4[1];
|
|
17030
17050
|
var openModal = function openModal() {
|
|
17031
|
-
if (getDataSourceAsync) {
|
|
17051
|
+
if (getDataSourceAsync && !(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length)) {
|
|
17032
17052
|
getDataSourceAsync().then(function () {
|
|
17033
17053
|
setTradeGoodsVisible(true);
|
|
17034
17054
|
});
|
|
17035
17055
|
} else {
|
|
17036
17056
|
setTradeGoodsVisible(true);
|
|
17037
17057
|
}
|
|
17058
|
+
// 暂时先去掉带入系统自订单组件所选值作为默认筛选项
|
|
17059
|
+
// if (isGoods) {
|
|
17060
|
+
// const codeList: string[] = selectedSystemOrders?.map(
|
|
17061
|
+
// (item) => item?.[systemOrderNoMap?.[type]],
|
|
17062
|
+
// );
|
|
17063
|
+
// setSelectSystemNo(codeList || []);
|
|
17064
|
+
// }
|
|
17038
17065
|
};
|
|
17066
|
+
|
|
17039
17067
|
var closeModal = function closeModal() {
|
|
17040
17068
|
return setTradeGoodsVisible(false);
|
|
17041
17069
|
};
|
|
17042
|
-
var
|
|
17070
|
+
var filterDataSource = React.useMemo(function () {
|
|
17071
|
+
return (selectSystemNo === null || selectSystemNo === void 0 ? void 0 : selectSystemNo.length) ? dataSource === null || dataSource === void 0 ? void 0 : dataSource.filter(function (item) {
|
|
17072
|
+
return selectSystemNo === null || selectSystemNo === void 0 ? void 0 : selectSystemNo.includes(item.systemOrderNo);
|
|
17073
|
+
}) : dataSource;
|
|
17074
|
+
}, [dataSource, selectSystemNo]);
|
|
17075
|
+
var currentTradeOriginGoods = lodash.intersection(filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.map(function (item) {
|
|
17043
17076
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
17044
17077
|
}), selectedRowKeys);
|
|
17045
|
-
var unCurrentTradeOriginGoods = lodash.difference(selectedRowKeys,
|
|
17078
|
+
var unCurrentTradeOriginGoods = lodash.difference(selectedRowKeys, filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.map(function (item) {
|
|
17046
17079
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
17047
17080
|
}));
|
|
17048
17081
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
17049
|
-
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
17050
17082
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
17051
17083
|
};
|
|
17052
17084
|
var rowSelection = {
|
|
17053
17085
|
selectedRowKeys: selectedRowKeys,
|
|
17086
|
+
fixed: true,
|
|
17054
17087
|
onChange: handleChangeSelectedKeys
|
|
17055
17088
|
};
|
|
17056
17089
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
@@ -17060,18 +17093,44 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
17060
17093
|
title: "\u8BA2\u5355\u5546\u54C1",
|
|
17061
17094
|
visible: tradeGoodsVisible,
|
|
17062
17095
|
footer: null,
|
|
17063
|
-
onCancel: closeModal
|
|
17064
|
-
|
|
17096
|
+
onCancel: closeModal,
|
|
17097
|
+
width: width || 850,
|
|
17098
|
+
style: {
|
|
17099
|
+
maxWidth: '1000px'
|
|
17100
|
+
}
|
|
17101
|
+
}, isGoods && /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
17102
|
+
style: {
|
|
17103
|
+
marginBottom: '20px'
|
|
17104
|
+
}
|
|
17105
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
17106
|
+
span: 12
|
|
17107
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
17108
|
+
placeholder: "\u7B5B\u9009\u7CFB\u7EDF\u8BA2\u5355\u5546\u54C1",
|
|
17109
|
+
style: {
|
|
17110
|
+
width: '100%'
|
|
17111
|
+
},
|
|
17112
|
+
mode: "multiple",
|
|
17113
|
+
value: selectSystemNo,
|
|
17114
|
+
onChange: function onChange(val) {
|
|
17115
|
+
return setSelectSystemNo(val);
|
|
17116
|
+
},
|
|
17117
|
+
options: systemOrders === null || systemOrders === void 0 ? void 0 : systemOrders.map(function (item) {
|
|
17118
|
+
return {
|
|
17119
|
+
label: item === null || item === void 0 ? void 0 : item[systemOrderNoMap === null || systemOrderNoMap === void 0 ? void 0 : systemOrderNoMap[type]],
|
|
17120
|
+
value: item === null || item === void 0 ? void 0 : item[systemOrderNoMap === null || systemOrderNoMap === void 0 ? void 0 : systemOrderNoMap[type]]
|
|
17121
|
+
};
|
|
17122
|
+
})
|
|
17123
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
17065
17124
|
rowKey: uniqueKey,
|
|
17066
17125
|
rowSelection: rowSelection,
|
|
17067
17126
|
columns: columns,
|
|
17068
|
-
dataSource:
|
|
17127
|
+
dataSource: filterDataSource,
|
|
17069
17128
|
pagination: false,
|
|
17070
17129
|
scroll: {
|
|
17071
17130
|
x: 500,
|
|
17072
17131
|
y: 500
|
|
17073
17132
|
}
|
|
17074
|
-
}), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/",
|
|
17133
|
+
}), /*#__PURE__*/React__default['default'].createElement("span", null, "\u5DF2\u9009\u62E9(", currentTradeOriginGoods === null || currentTradeOriginGoods === void 0 ? void 0 : currentTradeOriginGoods.length, "/", filterDataSource === null || filterDataSource === void 0 ? void 0 : filterDataSource.length, ")")));
|
|
17075
17134
|
};
|
|
17076
17135
|
var getButtonText = function getButtonText() {
|
|
17077
17136
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
@@ -17081,7 +17140,7 @@ var getButtonText = function getButtonText() {
|
|
|
17081
17140
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
17082
17141
|
return '选择百胜ERP商品';
|
|
17083
17142
|
}
|
|
17084
|
-
if (['WDT_REISSUE_GOODS'].includes(type)) {
|
|
17143
|
+
if (['WDT_GOODS', 'WDT_REISSUE_GOODS'].includes(type)) {
|
|
17085
17144
|
return '选择旺店通商品';
|
|
17086
17145
|
}
|
|
17087
17146
|
if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
@@ -17132,11 +17191,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
17132
17191
|
onDelete = props.onDelete,
|
|
17133
17192
|
onModeChange = props.onModeChange,
|
|
17134
17193
|
tradeGoods = props.tradeGoods,
|
|
17135
|
-
form = props.form
|
|
17194
|
+
form = props.form,
|
|
17195
|
+
systemOrders = props.systemOrders,
|
|
17196
|
+
selectedSystemOrders = props.selectedSystemOrders;
|
|
17136
17197
|
var uniqueKey = (tradeGoods === null || tradeGoods === void 0 ? void 0 : tradeGoods.uniqueKey) || 'uuid';
|
|
17137
17198
|
// 监听聚水潭退货商品
|
|
17138
17199
|
var jstReturnGoods = antd.Form === null || antd.Form === void 0 ? void 0 : antd.Form.useWatch('3979edfd6d', form);
|
|
17139
17200
|
var isShowSelectTradeGoods = type !== 'JST_EXCHANGE_GOODS' || (jstReturnGoods === null || jstReturnGoods === void 0 ? void 0 : jstReturnGoods.jstSystemOrderNo);
|
|
17201
|
+
// 判断是否为商品信息组件
|
|
17202
|
+
var isGoods = type && ['WDT_GOODS', 'BS_E3_GOODS', 'GY_GOODS', 'JST_GOODS', 'WLN_GOODS', 'KM_GOODS'].includes(type) || false;
|
|
17140
17203
|
var refModal = React.useRef();
|
|
17141
17204
|
console.debug('表格数据', value);
|
|
17142
17205
|
var handleDelete = function handleDelete(record, index) {
|
|
@@ -17146,14 +17209,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
17146
17209
|
});
|
|
17147
17210
|
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
|
|
17148
17211
|
};
|
|
17149
|
-
var
|
|
17150
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
17151
|
-
selectedRowKeys = _useState4[0],
|
|
17152
|
-
setSelectedRowKeys = _useState4[1];
|
|
17153
|
-
var _useState5 = React.useState(null),
|
|
17212
|
+
var _useState5 = React.useState([]),
|
|
17154
17213
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
17155
|
-
|
|
17156
|
-
|
|
17214
|
+
selectedRowKeys = _useState6[0],
|
|
17215
|
+
setSelectedRowKeys = _useState6[1];
|
|
17216
|
+
var _useState7 = React.useState(null),
|
|
17217
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
17218
|
+
hoveredRowIndex = _useState8[0],
|
|
17219
|
+
setHoveredRowIndex = _useState8[1];
|
|
17157
17220
|
React.useEffect(function () {
|
|
17158
17221
|
setSelectedRowKeys([]);
|
|
17159
17222
|
}, [tableSelect, selectType]);
|
|
@@ -17323,6 +17386,21 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
17323
17386
|
}
|
|
17324
17387
|
return columnList;
|
|
17325
17388
|
}, [showHeader, value, disabled, hoveredRowIndex]);
|
|
17389
|
+
var orderModalColumns = React.useMemo(function () {
|
|
17390
|
+
var list = newColumns.filter(function (col) {
|
|
17391
|
+
return !['操作', '序号'].includes(col.title);
|
|
17392
|
+
});
|
|
17393
|
+
return [{
|
|
17394
|
+
dataIndex: '',
|
|
17395
|
+
title: '序号',
|
|
17396
|
+
align: 'center',
|
|
17397
|
+
ellipsis: true,
|
|
17398
|
+
width: 80,
|
|
17399
|
+
render: function render(val, record, index) {
|
|
17400
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, index + 1);
|
|
17401
|
+
}
|
|
17402
|
+
}].concat(_toConsumableArray(list));
|
|
17403
|
+
}, [newColumns]);
|
|
17326
17404
|
var orderColumns = React.useMemo(function () {
|
|
17327
17405
|
var columns = COLUMNS_MAP('', {
|
|
17328
17406
|
operate: false,
|
|
@@ -17382,12 +17460,17 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
17382
17460
|
checked: isStrict,
|
|
17383
17461
|
onChange: handleCheckboxChange
|
|
17384
17462
|
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !lodash.isEmpty(tradeGoods) && isShowSelectTradeGoods && /*#__PURE__*/React__default['default'].createElement(SelectTradeGoods, {
|
|
17463
|
+
isGoods: isGoods,
|
|
17385
17464
|
uniqueKey: uniqueKey,
|
|
17386
|
-
|
|
17465
|
+
type: type,
|
|
17466
|
+
columns: orderModalColumns,
|
|
17387
17467
|
dataSource: tradeGoods.originDataSource,
|
|
17388
17468
|
getDataSourceAsync: tradeGoods.getDataSourceAsync,
|
|
17389
17469
|
selectedRowKeys: selectedGoods,
|
|
17390
|
-
onChangeSelectedKeys: tradeGoods.selectedGoodsChange
|
|
17470
|
+
onChangeSelectedKeys: tradeGoods.selectedGoodsChange,
|
|
17471
|
+
systemOrders: systemOrders,
|
|
17472
|
+
selectedSystemOrders: selectedSystemOrders,
|
|
17473
|
+
width: width || 850
|
|
17391
17474
|
}), showErpGoodsBtn && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
17392
17475
|
type: "link",
|
|
17393
17476
|
onClick: handleChangeGoods
|
|
@@ -18238,7 +18321,7 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
18238
18321
|
extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
18239
18322
|
method: 'post',
|
|
18240
18323
|
data: {
|
|
18241
|
-
|
|
18324
|
+
billCode: orderNo
|
|
18242
18325
|
}
|
|
18243
18326
|
}).then(function (data) {
|
|
18244
18327
|
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
@@ -18670,6 +18753,85 @@ var index$3 = (function (props) {
|
|
|
18670
18753
|
}));
|
|
18671
18754
|
});
|
|
18672
18755
|
|
|
18756
|
+
var isErpType$1 = {
|
|
18757
|
+
isWdt: function isWdt(type) {
|
|
18758
|
+
return ['WDT_GOODS'].includes(type);
|
|
18759
|
+
},
|
|
18760
|
+
isBsE3: function isBsE3(type) {
|
|
18761
|
+
return ['BS_E3_GOODS'].includes(type);
|
|
18762
|
+
},
|
|
18763
|
+
isGy: function isGy(type) {
|
|
18764
|
+
return ['GY_GOODS'].includes(type);
|
|
18765
|
+
},
|
|
18766
|
+
isWln: function isWln(type) {
|
|
18767
|
+
return ['WLN_GOODS'].includes(type);
|
|
18768
|
+
}
|
|
18769
|
+
};
|
|
18770
|
+
var processAllOrders = function processAllOrders(_ref) {
|
|
18771
|
+
var data = _ref.data,
|
|
18772
|
+
orderNo = _ref.orderNo,
|
|
18773
|
+
type = _ref.type;
|
|
18774
|
+
var newList = [];
|
|
18775
|
+
// 根据商品类型处理数据
|
|
18776
|
+
if (isErpType$1.isWdt(type)) {
|
|
18777
|
+
newList = processWdtOrders({
|
|
18778
|
+
data: data,
|
|
18779
|
+
orderNo: orderNo
|
|
18780
|
+
});
|
|
18781
|
+
} else if (isErpType$1.isBsE3(type)) {
|
|
18782
|
+
newList = processBsE3Orders({
|
|
18783
|
+
data: data,
|
|
18784
|
+
orderNo: orderNo
|
|
18785
|
+
});
|
|
18786
|
+
} else if (isErpType$1.isGy(type)) {
|
|
18787
|
+
newList = processGyOrders({
|
|
18788
|
+
data: data,
|
|
18789
|
+
orderNo: orderNo
|
|
18790
|
+
});
|
|
18791
|
+
} else if (isErpType$1.isWln(type)) {
|
|
18792
|
+
newList = processWlnOrders({
|
|
18793
|
+
data: data
|
|
18794
|
+
});
|
|
18795
|
+
} else {
|
|
18796
|
+
newList = processDefaultOrders({
|
|
18797
|
+
data: data
|
|
18798
|
+
});
|
|
18799
|
+
}
|
|
18800
|
+
return newList;
|
|
18801
|
+
};
|
|
18802
|
+
var processWdtOrders = function processWdtOrders(_ref2) {
|
|
18803
|
+
var data = _ref2.data,
|
|
18804
|
+
orderNo = _ref2.orderNo;
|
|
18805
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
18806
|
+
return (item.srcTid || '').split(',').includes(orderNo);
|
|
18807
|
+
});
|
|
18808
|
+
return trades;
|
|
18809
|
+
};
|
|
18810
|
+
var processBsE3Orders = function processBsE3Orders(_ref3) {
|
|
18811
|
+
var data = _ref3.data,
|
|
18812
|
+
orderNo = _ref3.orderNo;
|
|
18813
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.orderList) || []).filter(function (item) {
|
|
18814
|
+
return (item === null || item === void 0 ? void 0 : item.dealCode) === orderNo;
|
|
18815
|
+
});
|
|
18816
|
+
return trades;
|
|
18817
|
+
};
|
|
18818
|
+
var processGyOrders = function processGyOrders(_ref4) {
|
|
18819
|
+
var data = _ref4.data,
|
|
18820
|
+
orderNo = _ref4.orderNo;
|
|
18821
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
18822
|
+
return kmkfUtils.getIsPlatformCodesIncludeOrderNos(item.platformCode, orderNo);
|
|
18823
|
+
});
|
|
18824
|
+
return trades;
|
|
18825
|
+
};
|
|
18826
|
+
var processWlnOrders = function processWlnOrders(_ref5) {
|
|
18827
|
+
var data = _ref5.data;
|
|
18828
|
+
return (data === null || data === void 0 ? void 0 : data.orders) || [];
|
|
18829
|
+
};
|
|
18830
|
+
var processDefaultOrders = function processDefaultOrders(_ref6) {
|
|
18831
|
+
var data = _ref6.data;
|
|
18832
|
+
return data || [];
|
|
18833
|
+
};
|
|
18834
|
+
|
|
18673
18835
|
var WlnGoods = function WlnGoods(props) {
|
|
18674
18836
|
var value = props.value,
|
|
18675
18837
|
disabled = props.disabled,
|
|
@@ -18679,15 +18841,53 @@ var WlnGoods = function WlnGoods(props) {
|
|
|
18679
18841
|
wlnGoods: list
|
|
18680
18842
|
}));
|
|
18681
18843
|
};
|
|
18844
|
+
// 找到该订单号下所有商品
|
|
18845
|
+
var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
|
|
18846
|
+
var goodDetails = kmkfUtils.updateWlnGoodsHandle((value === null || value === void 0 ? void 0 : value.allOrders) || []);
|
|
18847
|
+
return goodDetails;
|
|
18848
|
+
};
|
|
18849
|
+
// 商品信息组件暂存后 重新编辑,此时需要重新获取订单下所有系统自订单的商品信息
|
|
18850
|
+
var getDataSourceAsync = function getDataSourceAsync() {
|
|
18851
|
+
return (value === null || value === void 0 ? void 0 : value.orderNo) ? wlnUtils === null || wlnUtils === void 0 ? void 0 : wlnUtils.getOrderListSingleton(value === null || value === void 0 ? void 0 : value.orderNo).then(function (data) {
|
|
18852
|
+
var list = processAllOrders({
|
|
18853
|
+
data: data,
|
|
18854
|
+
orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
|
|
18855
|
+
type: 'WLN_GOODS'
|
|
18856
|
+
});
|
|
18857
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
18858
|
+
allOrders: list || []
|
|
18859
|
+
}));
|
|
18860
|
+
}) : Promise.resolve();
|
|
18861
|
+
};
|
|
18862
|
+
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18863
|
+
var _uniqBy;
|
|
18864
|
+
var newValue = _objectSpread2({}, value);
|
|
18865
|
+
// 原订单商品
|
|
18866
|
+
var originTradeGoodList = getAllTradeGoodsDetails() || [];
|
|
18867
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18868
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value.wlnGoods) || [];
|
|
18869
|
+
newValue['wlnGoods'] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18870
|
+
return skuList.includes(item.uuid);
|
|
18871
|
+
});
|
|
18872
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18873
|
+
}, [value === null || value === void 0 ? void 0 : value.wlnGoods]);
|
|
18682
18874
|
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
18683
18875
|
key: 'wlnGoods'
|
|
18684
18876
|
}, props), {}, {
|
|
18685
18877
|
disabled: disabled,
|
|
18686
18878
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18687
18879
|
value: value === null || value === void 0 ? void 0 : value.wlnGoods,
|
|
18688
|
-
showChangeBtn:
|
|
18880
|
+
showChangeBtn: true,
|
|
18881
|
+
showErpGoodsBtn: false,
|
|
18689
18882
|
onChange: function onChange(val) {
|
|
18690
18883
|
return changeHandle(val);
|
|
18884
|
+
},
|
|
18885
|
+
systemOrders: value === null || value === void 0 ? void 0 : value.allOrders,
|
|
18886
|
+
selectedSystemOrders: value === null || value === void 0 ? void 0 : value.orders,
|
|
18887
|
+
tradeGoods: {
|
|
18888
|
+
originDataSource: getAllTradeGoodsDetails(),
|
|
18889
|
+
selectedGoodsChange: selectedGoodsChange,
|
|
18890
|
+
getDataSourceAsync: getDataSourceAsync
|
|
18691
18891
|
}
|
|
18692
18892
|
}));
|
|
18693
18893
|
};
|
|
@@ -18716,7 +18916,8 @@ var componentMap$1 = {
|
|
|
18716
18916
|
deleteGood: 'wdtDeleteGood',
|
|
18717
18917
|
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
18718
18918
|
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
18719
|
-
}
|
|
18919
|
+
},
|
|
18920
|
+
getOrderList: wdtUtils.getWdtOrderListSingleton
|
|
18720
18921
|
},
|
|
18721
18922
|
BS_E3_GOODS: {
|
|
18722
18923
|
type: 'e3',
|
|
@@ -18741,7 +18942,8 @@ var componentMap$1 = {
|
|
|
18741
18942
|
deleteGood: 'bsE3DeleteGood',
|
|
18742
18943
|
returnDeleteGood: 'bsE3ReturnDeleteGood',
|
|
18743
18944
|
exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
|
|
18744
|
-
}
|
|
18945
|
+
},
|
|
18946
|
+
getOrderList: bsE3Utils.getBsE3OrderListSingleton
|
|
18745
18947
|
},
|
|
18746
18948
|
GY_GOODS: {
|
|
18747
18949
|
type: 'gy',
|
|
@@ -18766,7 +18968,8 @@ var componentMap$1 = {
|
|
|
18766
18968
|
deleteGood: 'gyDeleteGood',
|
|
18767
18969
|
returnDeleteGood: 'gyReturnDeleteGood',
|
|
18768
18970
|
exchangeDeleteGood: 'gyExchangeDeleteGood'
|
|
18769
|
-
}
|
|
18971
|
+
},
|
|
18972
|
+
getOrderList: gyUtils.getGyOrderListSingleton
|
|
18770
18973
|
},
|
|
18771
18974
|
JST_GOODS: {
|
|
18772
18975
|
type: 'jst',
|
|
@@ -18791,7 +18994,8 @@ var componentMap$1 = {
|
|
|
18791
18994
|
deleteGood: 'jstDeleteGood',
|
|
18792
18995
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
18793
18996
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
18794
|
-
}
|
|
18997
|
+
},
|
|
18998
|
+
getOrderList: jstUtils.getJstOrderListSingleton
|
|
18795
18999
|
},
|
|
18796
19000
|
KM_GOODS: {
|
|
18797
19001
|
type: 'km',
|
|
@@ -18816,11 +19020,12 @@ var componentMap$1 = {
|
|
|
18816
19020
|
deleteGood: 'kmDeleteGood',
|
|
18817
19021
|
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18818
19022
|
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18819
|
-
}
|
|
19023
|
+
},
|
|
19024
|
+
getOrderList: kmUtils.getOrderListSingleton
|
|
18820
19025
|
}
|
|
18821
19026
|
};
|
|
18822
19027
|
var CommonGoods = function CommonGoods(props) {
|
|
18823
|
-
var _withInfo$current3, _withInfo$current4;
|
|
19028
|
+
var _componentMap$compTyp5, _withInfo$current3, _withInfo$current4;
|
|
18824
19029
|
var value = props.value,
|
|
18825
19030
|
disabled = props.disabled,
|
|
18826
19031
|
onChange = props.onChange,
|
|
@@ -18922,7 +19127,6 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
18922
19127
|
});
|
|
18923
19128
|
}
|
|
18924
19129
|
}), pubsub__default['default'].subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
18925
|
-
// console.log(data);
|
|
18926
19130
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
18927
19131
|
shopCode: data.shopCode
|
|
18928
19132
|
}));
|
|
@@ -18978,15 +19182,58 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
18978
19182
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
18979
19183
|
var mode = _ref2.mode;
|
|
18980
19184
|
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
18981
|
-
var goodDetails = updateHandle(value.orders || [], {
|
|
19185
|
+
var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.orders) || [], {
|
|
18982
19186
|
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
18983
19187
|
});
|
|
18984
|
-
var orderNo = value.orderNo;
|
|
19188
|
+
var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
|
|
18985
19189
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
18986
19190
|
var _componentMap$compTyp;
|
|
18987
19191
|
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp = componentMap$1[compType]) === null || _componentMap$compTyp === void 0 ? void 0 : _componentMap$compTyp.goodDetailOrderNo]) === orderNo;
|
|
18988
19192
|
}) : goodDetails;
|
|
18989
19193
|
};
|
|
19194
|
+
// 找到该订单号下所有商品
|
|
19195
|
+
var getAllTradeGoodsDetails = function getAllTradeGoodsDetails(_ref3) {
|
|
19196
|
+
var mode = _ref3.mode;
|
|
19197
|
+
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
19198
|
+
console.log('value?.allOrders', value, (value === null || value === void 0 ? void 0 : value.allOrders) || []);
|
|
19199
|
+
var goodDetails = updateHandle((value === null || value === void 0 ? void 0 : value.allOrders) || [], {
|
|
19200
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
19201
|
+
});
|
|
19202
|
+
var orderNo = value === null || value === void 0 ? void 0 : value.orderNo;
|
|
19203
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
19204
|
+
var _componentMap$compTyp2;
|
|
19205
|
+
return !orderNo || (goodItem === null || goodItem === void 0 ? void 0 : goodItem[(_componentMap$compTyp2 = componentMap$1[compType]) === null || _componentMap$compTyp2 === void 0 ? void 0 : _componentMap$compTyp2.goodDetailOrderNo]) === orderNo;
|
|
19206
|
+
}) : goodDetails;
|
|
19207
|
+
};
|
|
19208
|
+
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
19209
|
+
var _componentMap$compTyp3, _componentMap$compTyp4, _uniqBy;
|
|
19210
|
+
var newValue = _objectSpread2({}, value);
|
|
19211
|
+
var isStrict = value.isStrict;
|
|
19212
|
+
// 原订单商品
|
|
19213
|
+
var originTradeGoodList = getAllTradeGoodsDetails({
|
|
19214
|
+
mode: isStrict
|
|
19215
|
+
}) || [];
|
|
19216
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
19217
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(componentMap$1 === null || componentMap$1 === void 0 ? void 0 : (_componentMap$compTyp3 = componentMap$1[compType]) === null || _componentMap$compTyp3 === void 0 ? void 0 : _componentMap$compTyp3.key)]) || [];
|
|
19218
|
+
newValue["".concat(componentMap$1 === null || componentMap$1 === void 0 ? void 0 : (_componentMap$compTyp4 = componentMap$1[compType]) === null || _componentMap$compTyp4 === void 0 ? void 0 : _componentMap$compTyp4.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19219
|
+
return skuList.includes(item.uuid);
|
|
19220
|
+
});
|
|
19221
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19222
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(componentMap$1 === null || componentMap$1 === void 0 ? void 0 : (_componentMap$compTyp5 = componentMap$1[compType]) === null || _componentMap$compTyp5 === void 0 ? void 0 : _componentMap$compTyp5.key)], value === null || value === void 0 ? void 0 : value.isStrict]);
|
|
19223
|
+
// 商品信息组件暂存后 重新编辑,此时需要重新获取订单下所有系统自订单的商品信息
|
|
19224
|
+
var getDataSourceAsync = function getDataSourceAsync() {
|
|
19225
|
+
var _componentMap$compTyp6;
|
|
19226
|
+
return (value === null || value === void 0 ? void 0 : value.orderNo) ? (_componentMap$compTyp6 = componentMap$1[compType]) === null || _componentMap$compTyp6 === void 0 ? void 0 : _componentMap$compTyp6.getOrderList(value === null || value === void 0 ? void 0 : value.orderNo).then(function (data) {
|
|
19227
|
+
var list = processAllOrders({
|
|
19228
|
+
data: data,
|
|
19229
|
+
orderNo: value === null || value === void 0 ? void 0 : value.orderNo,
|
|
19230
|
+
type: compType
|
|
19231
|
+
});
|
|
19232
|
+
onChange(_objectSpread2(_objectSpread2({}, valueRef.current), {}, {
|
|
19233
|
+
allOrders: list || []
|
|
19234
|
+
}));
|
|
19235
|
+
}) : Promise.resolve();
|
|
19236
|
+
};
|
|
18990
19237
|
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
18991
19238
|
key: componentMap$1[compType].key
|
|
18992
19239
|
}, props), {}, {
|
|
@@ -19006,7 +19253,16 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
19006
19253
|
},
|
|
19007
19254
|
onModeChange: handleModeChange,
|
|
19008
19255
|
showModeBtn: showModeBtn,
|
|
19009
|
-
isStrict: value === null || value === void 0 ? void 0 : value.isStrict
|
|
19256
|
+
isStrict: value === null || value === void 0 ? void 0 : value.isStrict,
|
|
19257
|
+
systemOrders: value === null || value === void 0 ? void 0 : value.allOrders,
|
|
19258
|
+
selectedSystemOrders: value === null || value === void 0 ? void 0 : value.orders,
|
|
19259
|
+
tradeGoods: {
|
|
19260
|
+
originDataSource: getAllTradeGoodsDetails({
|
|
19261
|
+
mode: value === null || value === void 0 ? void 0 : value.isStrict
|
|
19262
|
+
}),
|
|
19263
|
+
getDataSourceAsync: getDataSourceAsync,
|
|
19264
|
+
selectedGoodsChange: selectedGoodsChange
|
|
19265
|
+
}
|
|
19010
19266
|
}));
|
|
19011
19267
|
};
|
|
19012
19268
|
|
|
@@ -21221,6 +21477,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
21221
21477
|
sysOrderNo: val
|
|
21222
21478
|
});
|
|
21223
21479
|
}
|
|
21480
|
+
valueRef.current = newValue;
|
|
21224
21481
|
kmkfUtils.pushGyLog('afterChangeSystemOrder', newValue);
|
|
21225
21482
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
21226
21483
|
};
|