@kmkf-fe-packages/basic-components 2.0.68 → 2.0.69
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.esm.js +512 -361
- package/dist/index.js +510 -359
- package/dist/src/common/Goods/RichItem.d.ts +3 -0
- package/dist/src/common/Goods/goodModel.d.ts +3 -0
- package/package.json +3 -3
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
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function doneResult() {
|
|
250
|
+
return {
|
|
251
|
+
value: undefined,
|
|
252
|
+
done: !0
|
|
253
|
+
};
|
|
254
254
|
}
|
|
255
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
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({
|
|
@@ -8143,17 +8143,16 @@ var SubForm = function SubForm(props) {
|
|
|
8143
8143
|
return [{
|
|
8144
8144
|
dataIndex: 'index',
|
|
8145
8145
|
title: '序号',
|
|
8146
|
+
fixed: 'left',
|
|
8147
|
+
width: 20,
|
|
8146
8148
|
render: function render(val, record, index) {
|
|
8147
|
-
return
|
|
8148
|
-
style: {
|
|
8149
|
-
width: 25
|
|
8150
|
-
}
|
|
8151
|
-
}, index + 1);
|
|
8149
|
+
return index + 1;
|
|
8152
8150
|
}
|
|
8153
8151
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8154
8152
|
return {
|
|
8155
8153
|
dataIndex: t.key,
|
|
8156
|
-
title: t.name
|
|
8154
|
+
title: t.name,
|
|
8155
|
+
width: 90
|
|
8157
8156
|
};
|
|
8158
8157
|
})));
|
|
8159
8158
|
}, [newTableHeader]);
|
|
@@ -8341,7 +8340,7 @@ var SubForm = function SubForm(props) {
|
|
|
8341
8340
|
onScrollCapture: onScrollCapture,
|
|
8342
8341
|
style: {
|
|
8343
8342
|
height: 320,
|
|
8344
|
-
maxWidth: platform !== 'pc' ? '325px' : '
|
|
8343
|
+
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8345
8344
|
overflowY: 'scroll',
|
|
8346
8345
|
overflowX: 'auto'
|
|
8347
8346
|
}
|
|
@@ -8352,7 +8351,7 @@ var SubForm = function SubForm(props) {
|
|
|
8352
8351
|
size: "small",
|
|
8353
8352
|
pagination: false,
|
|
8354
8353
|
scroll: {
|
|
8355
|
-
x: '
|
|
8354
|
+
x: 'max-content'
|
|
8356
8355
|
},
|
|
8357
8356
|
locale: {
|
|
8358
8357
|
emptyText: '暂无数据'
|
|
@@ -8725,7 +8724,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8725
8724
|
changeSku = props.changeSku,
|
|
8726
8725
|
width = props.width,
|
|
8727
8726
|
_props$numIidType = props.numIidType,
|
|
8728
|
-
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType
|
|
8727
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
|
|
8728
|
+
form = props.form,
|
|
8729
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
8729
8730
|
var _useState = React.useState([]),
|
|
8730
8731
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8731
8732
|
selectList = _useState2[0],
|
|
@@ -8738,10 +8739,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8738
8739
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8739
8740
|
goodList = _useState6[0],
|
|
8740
8741
|
setGoodList = _useState6[1];
|
|
8741
|
-
var _useState7 = React.useState(
|
|
8742
|
+
var _useState7 = React.useState([]),
|
|
8742
8743
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
8743
|
-
|
|
8744
|
-
|
|
8744
|
+
orderNoItems = _useState8[0],
|
|
8745
|
+
setOrderNoItems = _useState8[1];
|
|
8746
|
+
var _useState9 = React.useState(false),
|
|
8747
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8748
|
+
loading = _useState10[0],
|
|
8749
|
+
setLoading = _useState10[1];
|
|
8745
8750
|
var transformIdType = function transformIdType(id) {
|
|
8746
8751
|
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
8747
8752
|
return numIidType === 'string' ? id + '' : +id;
|
|
@@ -8761,7 +8766,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8761
8766
|
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8762
8767
|
return setGoodList(list.map(transformType));
|
|
8763
8768
|
};
|
|
8764
|
-
var
|
|
8769
|
+
var _useState11 = React.useState({
|
|
8765
8770
|
apiName: 'queryItems',
|
|
8766
8771
|
desc: true,
|
|
8767
8772
|
numIids: '',
|
|
@@ -8773,30 +8778,30 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8773
8778
|
cids: '',
|
|
8774
8779
|
title: ''
|
|
8775
8780
|
}),
|
|
8776
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8777
|
-
searchParams = _useState10[0],
|
|
8778
|
-
setSearch = _useState10[1];
|
|
8779
|
-
var _useState11 = React.useState(0),
|
|
8780
8781
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
var _useState13 = React.useState(
|
|
8782
|
+
searchParams = _useState12[0],
|
|
8783
|
+
setSearch = _useState12[1];
|
|
8784
|
+
var _useState13 = React.useState(0),
|
|
8784
8785
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
var _useState15 = React.useState(
|
|
8786
|
+
total = _useState14[0],
|
|
8787
|
+
setTotal = _useState14[1];
|
|
8788
|
+
var _useState15 = React.useState(''),
|
|
8788
8789
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
var _useState17 = React.useState(
|
|
8790
|
+
platform = _useState16[0],
|
|
8791
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
8792
|
+
var _useState17 = React.useState({}),
|
|
8792
8793
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
var _useState19 = React.useState(
|
|
8794
|
+
shopInfo = _useState18[0],
|
|
8795
|
+
setShopInfo = _useState18[1]; //店铺信息
|
|
8796
|
+
var _useState19 = React.useState(true),
|
|
8796
8797
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
var _useState21 = React.useState([
|
|
8798
|
+
canSearch = _useState20[0],
|
|
8799
|
+
setCanSearch = _useState20[1];
|
|
8800
|
+
var _useState21 = React.useState([null]),
|
|
8801
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8802
|
+
nextKeyList = _useState22[0],
|
|
8803
|
+
setNextKeyList = _useState22[1];
|
|
8804
|
+
var _useState23 = React.useState([{
|
|
8800
8805
|
tab: '出售中',
|
|
8801
8806
|
key: 'onSale'
|
|
8802
8807
|
}, {
|
|
@@ -8806,10 +8811,10 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8806
8811
|
tab: '已选择',
|
|
8807
8812
|
key: 'select'
|
|
8808
8813
|
}]),
|
|
8809
|
-
|
|
8810
|
-
tabs =
|
|
8811
|
-
setTabs =
|
|
8812
|
-
var
|
|
8814
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
8815
|
+
tabs = _useState24[0],
|
|
8816
|
+
setTabs = _useState24[1];
|
|
8817
|
+
var _useState25 = React.useState([{
|
|
8813
8818
|
name: '上架时间',
|
|
8814
8819
|
value: 'list_time'
|
|
8815
8820
|
}, {
|
|
@@ -8819,13 +8824,13 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8819
8824
|
name: '按价格',
|
|
8820
8825
|
value: 'price'
|
|
8821
8826
|
}]),
|
|
8822
|
-
|
|
8823
|
-
goodSort =
|
|
8827
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
8828
|
+
goodSort = _useState26[0];
|
|
8824
8829
|
//宝贝分类
|
|
8825
|
-
var
|
|
8826
|
-
|
|
8827
|
-
shell =
|
|
8828
|
-
setShell =
|
|
8830
|
+
var _useState27 = React.useState([]),
|
|
8831
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
8832
|
+
shell = _useState28[0],
|
|
8833
|
+
setShell = _useState28[1];
|
|
8829
8834
|
var clickOrder = function clickOrder(sort) {
|
|
8830
8835
|
if (sort.value === searchParams.orderBy) {
|
|
8831
8836
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9098,8 +9103,112 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9098
9103
|
}
|
|
9099
9104
|
}, [platform]);
|
|
9100
9105
|
React.useEffect(function () {
|
|
9101
|
-
platform && canSearch
|
|
9106
|
+
if (platform && canSearch) {
|
|
9107
|
+
if (searchParams.type === 'orderProduct') {
|
|
9108
|
+
getOrderProductItem(searchParams);
|
|
9109
|
+
} else {
|
|
9110
|
+
getItem(searchParams, platform);
|
|
9111
|
+
}
|
|
9112
|
+
}
|
|
9102
9113
|
}, [searchParams, platform]);
|
|
9114
|
+
React.useEffect(function () {
|
|
9115
|
+
if (visible && platform !== 'fxg') {
|
|
9116
|
+
var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9117
|
+
var orderNo = val['m3ap1EvEyd'];
|
|
9118
|
+
if (orderNo) {
|
|
9119
|
+
setTabs(function (prev) {
|
|
9120
|
+
return lodash.uniqBy([{
|
|
9121
|
+
tab: '订单商品',
|
|
9122
|
+
key: 'orderProduct'
|
|
9123
|
+
}].concat(_toConsumableArray(prev)), 'key');
|
|
9124
|
+
});
|
|
9125
|
+
if (isPriorityDisplayOfOrderNo) {
|
|
9126
|
+
setSearch(function (prev) {
|
|
9127
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
9128
|
+
type: 'orderProduct'
|
|
9129
|
+
});
|
|
9130
|
+
});
|
|
9131
|
+
}
|
|
9132
|
+
}
|
|
9133
|
+
}
|
|
9134
|
+
if (!visible) {
|
|
9135
|
+
setOrderNoItems([]);
|
|
9136
|
+
}
|
|
9137
|
+
}, [visible]);
|
|
9138
|
+
var getOrderProductItem = /*#__PURE__*/function () {
|
|
9139
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
9140
|
+
var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
|
|
9141
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9142
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9143
|
+
case 0:
|
|
9144
|
+
val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9145
|
+
orderNo = val.m3ap1EvEyd, shopId = val.shopId;
|
|
9146
|
+
if (orderNo) {
|
|
9147
|
+
_context2.next = 4;
|
|
9148
|
+
break;
|
|
9149
|
+
}
|
|
9150
|
+
return _context2.abrupt("return", handleSetGoodList([]));
|
|
9151
|
+
case 4:
|
|
9152
|
+
if (orderNoItems.length) {
|
|
9153
|
+
_context2.next = 20;
|
|
9154
|
+
break;
|
|
9155
|
+
}
|
|
9156
|
+
_context2.prev = 5;
|
|
9157
|
+
setLoading(true);
|
|
9158
|
+
_context2.next = 9;
|
|
9159
|
+
return kmkfUtils.servers.orderDetail({
|
|
9160
|
+
shopId: shopId,
|
|
9161
|
+
orderNo: orderNo
|
|
9162
|
+
});
|
|
9163
|
+
case 9:
|
|
9164
|
+
res = _context2.sent;
|
|
9165
|
+
if (res.success) {
|
|
9166
|
+
_context2.next = 14;
|
|
9167
|
+
break;
|
|
9168
|
+
}
|
|
9169
|
+
handleSetGoodList([]);
|
|
9170
|
+
antd.message.warn(res.message);
|
|
9171
|
+
return _context2.abrupt("return");
|
|
9172
|
+
case 14:
|
|
9173
|
+
if (res.data && res.data.itemList && res.data.itemList.length) {
|
|
9174
|
+
items = res.data.itemList;
|
|
9175
|
+
totalCount = items.length;
|
|
9176
|
+
items.forEach(function (item) {
|
|
9177
|
+
item.platform = platform;
|
|
9178
|
+
});
|
|
9179
|
+
setOrderNoItems(items);
|
|
9180
|
+
pageNo = params.pageNo, pageSize = params.pageSize;
|
|
9181
|
+
handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
|
|
9182
|
+
setTotal(totalCount);
|
|
9183
|
+
}
|
|
9184
|
+
case 15:
|
|
9185
|
+
_context2.prev = 15;
|
|
9186
|
+
setLoading(false);
|
|
9187
|
+
return _context2.finish(15);
|
|
9188
|
+
case 18:
|
|
9189
|
+
_context2.next = 26;
|
|
9190
|
+
break;
|
|
9191
|
+
case 20:
|
|
9192
|
+
_pageNo = params.pageNo, _pageSize = params.pageSize;
|
|
9193
|
+
title = params.title;
|
|
9194
|
+
if (platform !== 'taobao') {
|
|
9195
|
+
title = params.numIids;
|
|
9196
|
+
}
|
|
9197
|
+
_items = title ? orderNoItems.filter(function (item) {
|
|
9198
|
+
return item.title.includes(title.trim());
|
|
9199
|
+
}) : orderNoItems;
|
|
9200
|
+
handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
|
|
9201
|
+
setTotal(_items.length);
|
|
9202
|
+
case 26:
|
|
9203
|
+
case "end":
|
|
9204
|
+
return _context2.stop();
|
|
9205
|
+
}
|
|
9206
|
+
}, _callee2, null, [[5,, 15, 18]]);
|
|
9207
|
+
}));
|
|
9208
|
+
return function getOrderProductItem(_x2) {
|
|
9209
|
+
return _ref4.apply(this, arguments);
|
|
9210
|
+
};
|
|
9211
|
+
}();
|
|
9103
9212
|
return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
9104
9213
|
title: '选择宝贝',
|
|
9105
9214
|
okText: '确认',
|
|
@@ -9133,7 +9242,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9133
9242
|
style: {
|
|
9134
9243
|
display: searchParams.type === 'select' ? 'none' : ''
|
|
9135
9244
|
}
|
|
9136
|
-
}, platform === 'taobao' && /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, {
|
|
9245
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, {
|
|
9137
9246
|
value: searchParams.orderBy,
|
|
9138
9247
|
onChange: function onChange(e) {
|
|
9139
9248
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9149,7 +9258,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9149
9258
|
},
|
|
9150
9259
|
key: sort.value
|
|
9151
9260
|
}, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u21BE") : /*#__PURE__*/React__default['default'].createElement("span", null, "\u21C2") : /*#__PURE__*/React__default['default'].createElement("span", null, "\u21C5"));
|
|
9152
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9261
|
+
}))), /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9153
9262
|
className: "classify",
|
|
9154
9263
|
value: searchParams.cids,
|
|
9155
9264
|
onChange: function onChange(value) {
|
|
@@ -9164,7 +9273,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9164
9273
|
key: item.value
|
|
9165
9274
|
}, item.label);
|
|
9166
9275
|
})), /*#__PURE__*/React__default['default'].createElement(Search, {
|
|
9167
|
-
placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
|
|
9276
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
|
|
9168
9277
|
// enterButton="搜索"
|
|
9169
9278
|
className: "search",
|
|
9170
9279
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -9787,7 +9896,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9787
9896
|
userNick = props.userNick,
|
|
9788
9897
|
disabled = props.disabled,
|
|
9789
9898
|
changeSku = props.changeSku,
|
|
9790
|
-
width = props.width
|
|
9899
|
+
width = props.width,
|
|
9900
|
+
form = props.form,
|
|
9901
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
9791
9902
|
var shopId = value.shopId,
|
|
9792
9903
|
imgList = value.imgList;
|
|
9793
9904
|
var _useState = React.useState(false),
|
|
@@ -9878,7 +9989,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9878
9989
|
var onSubmit = /*#__PURE__*/function () {
|
|
9879
9990
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9880
9991
|
var _list$;
|
|
9881
|
-
var newList, newImgList;
|
|
9992
|
+
var newList, newImgList, _list$2;
|
|
9882
9993
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9883
9994
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9884
9995
|
case 0:
|
|
@@ -9900,7 +10011,11 @@ var GoodItem = function GoodItem(props) {
|
|
|
9900
10011
|
// if (type === 1) {
|
|
9901
10012
|
// params.outerId = item.outerId; //编码
|
|
9902
10013
|
// }
|
|
9903
|
-
|
|
10014
|
+
//返填商品属性 && 为订单商品
|
|
10015
|
+
if (changeSku && item.skuInfoDTO) {
|
|
10016
|
+
params.outerSkuId = item.skuInfoDTO.outerSkuId;
|
|
10017
|
+
params.propertiesName = item.skuInfoDTO.propertiesName;
|
|
10018
|
+
} else if (changeSku) {
|
|
9904
10019
|
params.propertiesName = '';
|
|
9905
10020
|
}
|
|
9906
10021
|
// if (type === 4) {
|
|
@@ -9919,7 +10034,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9919
10034
|
imgList: newImgList
|
|
9920
10035
|
});
|
|
9921
10036
|
setVisible(false);
|
|
9922
|
-
|
|
10037
|
+
if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
|
|
10038
|
+
checkSkus(list === null || list === void 0 ? void 0 : (_list$2 = list[0]) === null || _list$2 === void 0 ? void 0 : _list$2.numIid, newImgList.length - 1);
|
|
10039
|
+
}
|
|
9923
10040
|
case 5:
|
|
9924
10041
|
case "end":
|
|
9925
10042
|
return _context2.stop();
|
|
@@ -10176,6 +10293,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
10176
10293
|
shopId: shopId,
|
|
10177
10294
|
maxLength: maxLength,
|
|
10178
10295
|
changeSku: changeSku,
|
|
10296
|
+
form: form,
|
|
10297
|
+
isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
|
|
10179
10298
|
onCancel: function onCancel() {
|
|
10180
10299
|
setVisible(false);
|
|
10181
10300
|
}
|
|
@@ -20610,7 +20729,7 @@ var typeMap$4 = {
|
|
|
20610
20729
|
}
|
|
20611
20730
|
};
|
|
20612
20731
|
var GyReissue = function GyReissue(props) {
|
|
20613
|
-
var _typeMap$
|
|
20732
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
20614
20733
|
var value = props.value,
|
|
20615
20734
|
onChange = props.onChange,
|
|
20616
20735
|
_props$reasonList = props.reasonList,
|
|
@@ -20622,6 +20741,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20622
20741
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
20623
20742
|
// order?.platformCode?.includes(';'),
|
|
20624
20743
|
// );
|
|
20744
|
+
var getVipCodeFlag = React.useRef(false);
|
|
20625
20745
|
var getOrderFlag = React.useRef(false);
|
|
20626
20746
|
var valueRef = React.useRef(null);
|
|
20627
20747
|
var _useState = React.useState(false),
|
|
@@ -20629,23 +20749,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
20629
20749
|
isStrict = _useState2[0],
|
|
20630
20750
|
setIsStrict = _useState2[1];
|
|
20631
20751
|
React.useEffect(function () {
|
|
20632
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
20752
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2, _typeMap$type4, _value$typeMap$type$s5, _typeMap$type5;
|
|
20633
20753
|
valueRef.current = value;
|
|
20634
20754
|
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$4[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$4[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
20635
20755
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
20636
20756
|
getOrderFlag.current = true;
|
|
20637
20757
|
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$4[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
20758
|
+
} else if (!getVipCodeFlag.current && (value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo]) && !(value === null || value === void 0 ? void 0 : value.vipCode) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orderNo)) {
|
|
20759
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
20760
|
+
getVipCodeFlag.current = true;
|
|
20761
|
+
getVipCode(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orderNo);
|
|
20638
20762
|
}
|
|
20639
20763
|
return;
|
|
20640
20764
|
}, [value]);
|
|
20641
20765
|
var getOrderList = /*#__PURE__*/function () {
|
|
20642
20766
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
20643
|
-
var _typeMap$
|
|
20767
|
+
var _typeMap$type7;
|
|
20644
20768
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20645
20769
|
while (1) switch (_context.prev = _context.next) {
|
|
20646
20770
|
case 0:
|
|
20647
|
-
(_typeMap$
|
|
20648
|
-
var _typeMap$
|
|
20771
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
20772
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
20649
20773
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20650
20774
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20651
20775
|
var billNo = _ref2.billNo,
|
|
@@ -20667,17 +20791,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
20667
20791
|
shopCode: shopCode
|
|
20668
20792
|
});
|
|
20669
20793
|
});
|
|
20794
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]) || {}), {}, {
|
|
20795
|
+
showOrderInfo: showOrderInfo,
|
|
20796
|
+
orders: orders
|
|
20797
|
+
})), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _defineProperty(_objectSpread2$1, "vipCode", (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$2 = orders[0]) === null || _orders$2 === void 0 ? void 0 : _orders$2.vipCode)), _objectSpread2$1));
|
|
20670
20798
|
kmkfUtils.pushGyLog('getOrderList', {
|
|
20671
20799
|
before: valueRef.current,
|
|
20672
|
-
after:
|
|
20673
|
-
showOrderInfo: showOrderInfo,
|
|
20674
|
-
orders: orders
|
|
20675
|
-
})))
|
|
20800
|
+
after: newValue
|
|
20676
20801
|
});
|
|
20677
|
-
onChange(
|
|
20678
|
-
showOrderInfo: showOrderInfo,
|
|
20679
|
-
orders: orders
|
|
20680
|
-
}))));
|
|
20802
|
+
onChange(newValue);
|
|
20681
20803
|
});
|
|
20682
20804
|
case 1:
|
|
20683
20805
|
case "end":
|
|
@@ -20689,42 +20811,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
20689
20811
|
return _ref.apply(this, arguments);
|
|
20690
20812
|
};
|
|
20691
20813
|
}();
|
|
20814
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
20815
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
20816
|
+
var _typeMap$type10;
|
|
20817
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20818
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
20819
|
+
case 0:
|
|
20820
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
20821
|
+
var _orders$3, _orders$4;
|
|
20822
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20823
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
20824
|
+
shopCode: (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$3 = orders[0]) === null || _orders$3 === void 0 ? void 0 : _orders$3.shopCode),
|
|
20825
|
+
vipCode: (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$4 = orders[0]) === null || _orders$4 === void 0 ? void 0 : _orders$4.vipCode)
|
|
20826
|
+
});
|
|
20827
|
+
kmkfUtils.pushGyLog('getVipCode', {
|
|
20828
|
+
before: valueRef.current,
|
|
20829
|
+
after: newValue
|
|
20830
|
+
});
|
|
20831
|
+
onChange(newValue);
|
|
20832
|
+
}));
|
|
20833
|
+
case 1:
|
|
20834
|
+
case "end":
|
|
20835
|
+
return _context2.stop();
|
|
20836
|
+
}
|
|
20837
|
+
}, _callee2);
|
|
20838
|
+
}));
|
|
20839
|
+
return function getVipCode(_x2) {
|
|
20840
|
+
return _ref4.apply(this, arguments);
|
|
20841
|
+
};
|
|
20842
|
+
}();
|
|
20692
20843
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20693
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
20844
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
20694
20845
|
kmkfUtils.pushGyLog('beforeChangeType', valueRef.current || {});
|
|
20695
20846
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20696
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
20847
|
+
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _ref5$typeMap$type$ty === void 0 ? void 0 : _ref5$typeMap$type$ty[0])) return;
|
|
20697
20848
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20698
20849
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20699
|
-
newValue[(_typeMap$
|
|
20850
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
20700
20851
|
if (typeName === '1') {
|
|
20701
|
-
var _typeMap$
|
|
20702
|
-
newValue[(_typeMap$
|
|
20852
|
+
var _typeMap$type13;
|
|
20853
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
20703
20854
|
mode: isStrict
|
|
20704
20855
|
});
|
|
20705
20856
|
} else if (typeName === '2') {
|
|
20706
|
-
var _typeMap$
|
|
20857
|
+
var _typeMap$type14;
|
|
20707
20858
|
// 切换到非原单,清空列表
|
|
20708
|
-
newValue[(_typeMap$
|
|
20859
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
20709
20860
|
}
|
|
20710
20861
|
kmkfUtils.pushGyLog('afterChangeType', newValue);
|
|
20711
20862
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20712
20863
|
};
|
|
20713
20864
|
var handleModeChange = function handleModeChange(mode) {
|
|
20714
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
20715
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
20865
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
20866
|
+
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _ref6$typeMap$type$ty === void 0 ? void 0 : _ref6$typeMap$type$ty[0]) === '1';
|
|
20716
20867
|
setIsStrict(mode);
|
|
20717
20868
|
if (!isOriginalOrder) return;
|
|
20718
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
20869
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
|
|
20719
20870
|
mode: mode
|
|
20720
20871
|
}))));
|
|
20721
20872
|
};
|
|
20722
20873
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
20723
|
-
var _ref8, _typeMap$
|
|
20874
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
20724
20875
|
var mode = _ref7.mode,
|
|
20725
20876
|
sysOrderNo = _ref7.sysOrderNo;
|
|
20726
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
20727
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
20877
|
+
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
20878
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
|
|
20728
20879
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20729
20880
|
return order.code === systemOrderNo;
|
|
20730
20881
|
});
|
|
@@ -20735,29 +20886,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
20735
20886
|
}) : goodDetails;
|
|
20736
20887
|
};
|
|
20737
20888
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20738
|
-
var _typeMap$
|
|
20889
|
+
var _typeMap$type19;
|
|
20739
20890
|
kmkfUtils.pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20740
20891
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20741
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20742
|
-
var _typeMap$
|
|
20743
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20744
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20892
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = (val || []).map(function (item) {
|
|
20893
|
+
var _typeMap$type20, _typeMap$type21;
|
|
20894
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.money)] = 0;
|
|
20895
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.share)] = 0;
|
|
20745
20896
|
return item;
|
|
20746
20897
|
});
|
|
20747
20898
|
kmkfUtils.pushGyLog('afterChangeGood', newValue);
|
|
20748
20899
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20749
20900
|
};
|
|
20750
20901
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20751
|
-
var _typeMap$
|
|
20902
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20752
20903
|
kmkfUtils.pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20753
20904
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20754
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20755
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
20756
|
-
var _typeMap$type22;
|
|
20757
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = [];
|
|
20758
|
-
} else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
|
|
20905
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
|
|
20906
|
+
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref10$typeMap$type$t === void 0 ? void 0 : _ref10$typeMap$type$t[0])) {
|
|
20759
20907
|
var _typeMap$type24;
|
|
20760
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] =
|
|
20908
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = [];
|
|
20909
|
+
} else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
|
|
20910
|
+
var _typeMap$type26;
|
|
20911
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = getGoodDetails({
|
|
20761
20912
|
mode: isStrict,
|
|
20762
20913
|
sysOrderNo: val
|
|
20763
20914
|
});
|
|
@@ -20766,7 +20917,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20766
20917
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20767
20918
|
};
|
|
20768
20919
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20769
|
-
var _ref12, _typeMap$
|
|
20920
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20770
20921
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20771
20922
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20772
20923
|
// 原订单商品
|
|
@@ -20774,17 +20925,17 @@ var GyReissue = function GyReissue(props) {
|
|
|
20774
20925
|
mode: isStrict
|
|
20775
20926
|
}) || [];
|
|
20776
20927
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20777
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20778
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20928
|
+
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]) || [];
|
|
20929
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20779
20930
|
return skuList.includes(item.uuid);
|
|
20780
20931
|
});
|
|
20781
20932
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20782
20933
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20783
20934
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20784
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20935
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)], isStrict]);
|
|
20785
20936
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20786
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20787
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20937
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder];
|
|
20938
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
20788
20939
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20789
20940
|
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20790
20941
|
gutter: 8,
|
|
@@ -20804,12 +20955,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
20804
20955
|
},
|
|
20805
20956
|
disabled: disabled,
|
|
20806
20957
|
allowClear: false,
|
|
20807
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20958
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo)],
|
|
20808
20959
|
onChange: function onChange(val) {
|
|
20809
20960
|
return changeSystemOrderHandle(val);
|
|
20810
20961
|
},
|
|
20811
20962
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20812
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
20963
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.showOrderInfo) || []).map(function (item) {
|
|
20813
20964
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
20814
20965
|
key: item.billNo,
|
|
20815
20966
|
value: item.billNo,
|
|
@@ -20831,7 +20982,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20831
20982
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20832
20983
|
allowClear: false,
|
|
20833
20984
|
options: reasonList,
|
|
20834
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20985
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.typeName)],
|
|
20835
20986
|
onChange: function onChange(val) {
|
|
20836
20987
|
return changeTypeHandle(val);
|
|
20837
20988
|
}
|
|
@@ -20845,7 +20996,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20845
20996
|
showErpGoodsBtn: showErpGoodsBtn,
|
|
20846
20997
|
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20847
20998
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20848
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20999
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type35 = typeMap$4[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)],
|
|
20849
21000
|
onChange: function onChange(val) {
|
|
20850
21001
|
return changeGoodHandle(val);
|
|
20851
21002
|
},
|
|
@@ -20953,7 +21104,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20953
21104
|
while (1) switch (_context.prev = _context.next) {
|
|
20954
21105
|
case 0:
|
|
20955
21106
|
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
20956
|
-
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
|
|
21107
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20957
21108
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20958
21109
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20959
21110
|
var billNo = _ref2.billNo,
|
|
@@ -20975,10 +21126,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20975
21126
|
shopCode: shopCode
|
|
20976
21127
|
});
|
|
20977
21128
|
});
|
|
20978
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21129
|
+
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type5 = typeMap$5[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, (_typeMap$type$systemO = (_ref3 = (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$5[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) !== null && _typeMap$type$systemO !== void 0 ? _typeMap$type$systemO : {}), {}, {
|
|
20979
21130
|
showOrderInfo: showOrderInfo,
|
|
20980
21131
|
orders: orders
|
|
20981
|
-
}))));
|
|
21132
|
+
})), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _objectSpread2$1)));
|
|
20982
21133
|
});
|
|
20983
21134
|
case 1:
|
|
20984
21135
|
case "end":
|