@kmkf-fe-packages/basic-components 1.19.2 → 1.19.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1463 -619
- package/dist/index.js +1461 -617
- package/dist/src/bs/component/GoodItem/index.d.ts +3 -0
- package/dist/src/bs/component/model/BsE3GoodList.d.ts +32 -0
- package/dist/src/bs/component/model/BsE3GoodsModal.d.ts +12 -0
- package/dist/src/e3/common/index.d.ts +3 -0
- package/dist/src/wdt/common/index.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
|
|
76
|
-
};
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
t[e] = r.value;
|
|
75
|
+
return exports;
|
|
76
|
+
};
|
|
77
|
+
var exports = {},
|
|
78
|
+
Op = Object.prototype,
|
|
79
|
+
hasOwn = Op.hasOwnProperty,
|
|
80
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
81
|
+
obj[key] = desc.value;
|
|
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 {
|
|
@@ -499,6 +485,20 @@ function _nonIterableSpread() {
|
|
|
499
485
|
function _nonIterableRest() {
|
|
500
486
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
501
487
|
}
|
|
488
|
+
function _toPrimitive(input, hint) {
|
|
489
|
+
if (typeof input !== "object" || input === null) return input;
|
|
490
|
+
var prim = input[Symbol.toPrimitive];
|
|
491
|
+
if (prim !== undefined) {
|
|
492
|
+
var res = prim.call(input, hint || "default");
|
|
493
|
+
if (typeof res !== "object") return res;
|
|
494
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
495
|
+
}
|
|
496
|
+
return (hint === "string" ? String : Number)(input);
|
|
497
|
+
}
|
|
498
|
+
function _toPropertyKey(arg) {
|
|
499
|
+
var key = _toPrimitive(arg, "string");
|
|
500
|
+
return typeof key === "symbol" ? key : String(key);
|
|
501
|
+
}
|
|
502
502
|
|
|
503
503
|
function ApaasCascader(props) {
|
|
504
504
|
return /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
|
|
@@ -929,7 +929,7 @@ function dataURLtoFile(dataurl, filename) {
|
|
|
929
929
|
});
|
|
930
930
|
}
|
|
931
931
|
|
|
932
|
-
var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__8zj7A .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__8zj7A .index-module_inputImage__3VrvC {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageShow__3wD4d {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo {\n width: 80px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover {\n background: transparent;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover .index-module_mask__3LUIn:before {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo .index-module_delete__2cFpf {\n
|
|
932
|
+
var css_248z$1 = ".index-module_imageBox__8zj7A {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__8zj7A .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__8zj7A .index-module_inputImage__3VrvC {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageShow__3wD4d {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo {\n width: 80px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover {\n background: transparent;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo:hover .index-module_mask__3LUIn:before {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__8zj7A .index-module_imageWrap__JkMJo .index-module_delete__2cFpf {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn:hover .index-module_actions__2tY_V {\n opacity: 1;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__8zj7A .index-module_mask__3LUIn .index-module_actions__2tY_V .index-module_icon__ZI-2P {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 {\n display: inline-block;\n margin-right: 8px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__8zj7A .index-module_imagePaste__2X-K1 .index-module_fakeBox__2_3rA .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload {\n height: 80px;\n width: 80px;\n border: none;\n background-color: #F2F3F5;\n color: #86909C;\n}\n.index-module_imageBox__8zj7A .index-module_upload__2igU3 .ant-upload .index-module_addBtn__2m5lC {\n color: #86909C;\n}\n.index-module_tips__1ATcr {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
933
933
|
var styles$1 = {"imageBox":"index-module_imageBox__8zj7A","inputImage":"index-module_inputImage__3VrvC","imageShow":"index-module_imageShow__3wD4d","imageWrap":"index-module_imageWrap__JkMJo","-webkit-mask":"index-module_mask__3LUIn","mask":"index-module_mask__3LUIn","delete":"index-module_delete__2cFpf","actions":"index-module_actions__2tY_V","icon":"index-module_icon__ZI-2P","imagePaste":"index-module_imagePaste__2X-K1","fakeBox":"index-module_fakeBox__2_3rA","addBtn":"index-module_addBtn__2m5lC","upload":"index-module_upload__2igU3","tips":"index-module_tips__1ATcr"};
|
|
934
934
|
styleInject(css_248z$1);
|
|
935
935
|
|
|
@@ -951,7 +951,6 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
951
951
|
_ref$accept = _ref.accept,
|
|
952
952
|
accept = _ref$accept === void 0 ? 'image/gif,image/jpg,image/jpeg,image/png' : _ref$accept,
|
|
953
953
|
_ref$canPreview = _ref.canPreview,
|
|
954
|
-
canPreview = _ref$canPreview === void 0 ? true : _ref$canPreview,
|
|
955
954
|
_ref$disabled = _ref.disabled,
|
|
956
955
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
957
956
|
uniqueKey = _ref.uniqueKey,
|
|
@@ -1108,39 +1107,25 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
|
|
|
1108
1107
|
}));
|
|
1109
1108
|
};
|
|
1110
1109
|
};
|
|
1111
|
-
var handlePreview = function handlePreview(imgUrl) {
|
|
1112
|
-
return function () {
|
|
1113
|
-
setCurrentPreviewImg(imgUrl);
|
|
1114
|
-
setVisible(true);
|
|
1115
|
-
};
|
|
1116
|
-
};
|
|
1117
1110
|
var renderImages = function renderImages(images) {
|
|
1118
|
-
return images.map(function (image, index) {
|
|
1111
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image.PreviewGroup, null, images.map(function (image, index) {
|
|
1119
1112
|
var finalImage = "".concat(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image, "?x-oss-process=image/resize,h_60,w_60");
|
|
1113
|
+
var showImage = /^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image;
|
|
1120
1114
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1121
1115
|
className: styles$1.imageWrap,
|
|
1122
1116
|
key: index
|
|
1123
|
-
}, /*#__PURE__*/React__default['default'].createElement(
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1128
|
-
className: styles$1.actions
|
|
1129
|
-
}, canPreview && /*#__PURE__*/React__default['default'].createElement(icons.EyeOutlined, {
|
|
1130
|
-
style: {
|
|
1131
|
-
fontSize: '16px',
|
|
1132
|
-
color: '#FFF',
|
|
1133
|
-
marginRight: '8px'
|
|
1134
|
-
},
|
|
1135
|
-
onClick: handlePreview(/^pic\/[\s\S]*$/.test(image) ? "".concat(hostUrl, "/").concat(image) : image)
|
|
1136
|
-
}), /*#__PURE__*/React__default['default'].createElement(icons.DeleteOutlined, {
|
|
1137
|
-
style: {
|
|
1138
|
-
fontSize: '16px',
|
|
1139
|
-
color: '#FFF'
|
|
1117
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
1118
|
+
src: finalImage,
|
|
1119
|
+
preview: {
|
|
1120
|
+
src: showImage
|
|
1140
1121
|
},
|
|
1122
|
+
width: '100%',
|
|
1123
|
+
height: '80%'
|
|
1124
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
1125
|
+
className: styles$1.delete,
|
|
1141
1126
|
onClick: handleDelete(index)
|
|
1142
|
-
}))
|
|
1143
|
-
});
|
|
1127
|
+
}, "\u5220\u9664"));
|
|
1128
|
+
}));
|
|
1144
1129
|
};
|
|
1145
1130
|
React.useEffect(function () {
|
|
1146
1131
|
var _inputRef$current2;
|
|
@@ -11697,9 +11682,11 @@ var GoodsModal$1 = function GoodsModal(props, ref) {
|
|
|
11697
11682
|
var GoodsModal$2 = /*#__PURE__*/React.forwardRef(GoodsModal$1);
|
|
11698
11683
|
|
|
11699
11684
|
var getTableData = function getTableData(_ref, formData) {
|
|
11685
|
+
var _formData$brandIds;
|
|
11700
11686
|
var current = _ref.current,
|
|
11701
11687
|
pageSize = _ref.pageSize;
|
|
11702
11688
|
var data = {
|
|
11689
|
+
brandIds: ((_formData$brandIds = formData.brandIds) === null || _formData$brandIds === void 0 ? void 0 : _formData$brandIds.length) ? formData.brandIds : null,
|
|
11703
11690
|
skuCode: formData.skuCode || null,
|
|
11704
11691
|
skuName: formData.skuName || null,
|
|
11705
11692
|
goodName: formData.goodName || null,
|
|
@@ -11784,6 +11771,11 @@ var columns$1 = [{
|
|
|
11784
11771
|
title: '商品ID',
|
|
11785
11772
|
width: 200,
|
|
11786
11773
|
ellipsis: true
|
|
11774
|
+
}, {
|
|
11775
|
+
dataIndex: 'brandName',
|
|
11776
|
+
title: '品牌名称',
|
|
11777
|
+
width: 200,
|
|
11778
|
+
ellipsis: true
|
|
11787
11779
|
}, {
|
|
11788
11780
|
dataIndex: 'marketPrice',
|
|
11789
11781
|
title: '市场价',
|
|
@@ -11815,6 +11807,10 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11815
11807
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
11816
11808
|
selectIds = _useState4[0],
|
|
11817
11809
|
setSelectIds = _useState4[1];
|
|
11810
|
+
var _useState5 = React.useState([]),
|
|
11811
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
11812
|
+
brandList = _useState6[0],
|
|
11813
|
+
setBrandList = _useState6[1];
|
|
11818
11814
|
React.useImperativeHandle(ref, function () {
|
|
11819
11815
|
return {
|
|
11820
11816
|
getSelectGoodList: function getSelectGoodList() {
|
|
@@ -11834,6 +11830,38 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11834
11830
|
params = _useAntdTable.params;
|
|
11835
11831
|
var submit = search.submit,
|
|
11836
11832
|
reset = search.reset;
|
|
11833
|
+
var setGoodBrandList = function setGoodBrandList() {
|
|
11834
|
+
var list = [];
|
|
11835
|
+
var pageNo = 0;
|
|
11836
|
+
var pageSize = 100;
|
|
11837
|
+
var getMore = function getMore() {
|
|
11838
|
+
extendRequest('/qy/gdfw/wdt/erp/goodBrand/list', {
|
|
11839
|
+
method: 'post',
|
|
11840
|
+
data: {
|
|
11841
|
+
pageSize: pageSize,
|
|
11842
|
+
pageNo: pageNo
|
|
11843
|
+
}
|
|
11844
|
+
}).then(function (res) {
|
|
11845
|
+
var _res$data2;
|
|
11846
|
+
if (res.success && (res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.detailList)) {
|
|
11847
|
+
var _res$data3, _res$data4;
|
|
11848
|
+
list.push.apply(list, _toConsumableArray((res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.detailList) || []));
|
|
11849
|
+
if ((res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.detailList.length) === pageSize) {
|
|
11850
|
+
pageNo += 1;
|
|
11851
|
+
getMore();
|
|
11852
|
+
} else {
|
|
11853
|
+
setBrandList(list);
|
|
11854
|
+
}
|
|
11855
|
+
} else {
|
|
11856
|
+
lodash.reject(res);
|
|
11857
|
+
}
|
|
11858
|
+
}).catch(console.error);
|
|
11859
|
+
};
|
|
11860
|
+
getMore();
|
|
11861
|
+
};
|
|
11862
|
+
React__default['default'].useEffect(function () {
|
|
11863
|
+
setGoodBrandList();
|
|
11864
|
+
}, []);
|
|
11837
11865
|
var advanceSearchForm = /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
11838
11866
|
layout: "inline",
|
|
11839
11867
|
form: form
|
|
@@ -11881,6 +11909,32 @@ var GoodList = function GoodList(props, ref) {
|
|
|
11881
11909
|
style: {
|
|
11882
11910
|
width: 150
|
|
11883
11911
|
}
|
|
11912
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11913
|
+
name: "brandIds",
|
|
11914
|
+
style: {
|
|
11915
|
+
marginBottom: '12px'
|
|
11916
|
+
}
|
|
11917
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11918
|
+
mode: "multiple",
|
|
11919
|
+
showSearch: true,
|
|
11920
|
+
allowClear: true,
|
|
11921
|
+
filterOption: function filterOption(input, option) {
|
|
11922
|
+
return option.label.includes(input);
|
|
11923
|
+
},
|
|
11924
|
+
style: {
|
|
11925
|
+
width: 150
|
|
11926
|
+
},
|
|
11927
|
+
placeholder: "\u54C1\u724C",
|
|
11928
|
+
options: brandList.filter(function (item) {
|
|
11929
|
+
return !item.isDisabled;
|
|
11930
|
+
}).map(function (_ref2) {
|
|
11931
|
+
var value = _ref2.brandId,
|
|
11932
|
+
label = _ref2.brandName;
|
|
11933
|
+
return {
|
|
11934
|
+
value: value,
|
|
11935
|
+
label: label
|
|
11936
|
+
};
|
|
11937
|
+
})
|
|
11884
11938
|
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
11885
11939
|
style: {
|
|
11886
11940
|
marginBottom: '12px'
|
|
@@ -12037,91 +12091,493 @@ var GoodsModal$3 = function GoodsModal(props, ref) {
|
|
|
12037
12091
|
};
|
|
12038
12092
|
var WdtGoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$3);
|
|
12039
12093
|
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
var _props$value = props.value,
|
|
12049
|
-
value = _props$value === void 0 ? [] : _props$value,
|
|
12050
|
-
type = props.type,
|
|
12051
|
-
onChange = props.onChange,
|
|
12052
|
-
disabled = props.disabled,
|
|
12053
|
-
_props$showHeader = props.showHeader,
|
|
12054
|
-
showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
|
|
12055
|
-
width = props.width,
|
|
12056
|
-
_props$shopList = props.shopList,
|
|
12057
|
-
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
12058
|
-
_props$shopId = props.shopId,
|
|
12059
|
-
shopId = _props$shopId === void 0 ? '' : _props$shopId,
|
|
12060
|
-
_props$maxLength = props.maxLength,
|
|
12061
|
-
maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
|
|
12062
|
-
_props$showChangeBtn = props.showChangeBtn,
|
|
12063
|
-
showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
|
|
12064
|
-
_props$tableSelect = props.tableSelect,
|
|
12065
|
-
tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
|
|
12066
|
-
_props$selectType = props.selectType,
|
|
12067
|
-
selectType = _props$selectType === void 0 ? '' : _props$selectType,
|
|
12068
|
-
_props$otherOperation = props.otherOperations,
|
|
12069
|
-
otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
|
|
12070
|
-
_props$canUpdateNumbe = props.canUpdateNumber,
|
|
12071
|
-
canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
|
|
12072
|
-
shopCode = props.shopCode,
|
|
12073
|
-
_props$companyKey = props.companyKey,
|
|
12074
|
-
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
12075
|
-
onSelect = props.onSelect,
|
|
12076
|
-
onDelete = props.onDelete;
|
|
12077
|
-
var refModal = React.useRef();
|
|
12078
|
-
var handleDelete = function handleDelete(record, index) {
|
|
12079
|
-
onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
|
|
12080
|
-
var newList = _toConsumableArray(value).filter(function (item, i) {
|
|
12081
|
-
return index !== i;
|
|
12082
|
-
});
|
|
12083
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
|
|
12094
|
+
var getTableData$1 = function getTableData(_ref, formData) {
|
|
12095
|
+
var current = _ref.current,
|
|
12096
|
+
pageSize = _ref.pageSize;
|
|
12097
|
+
var data = {
|
|
12098
|
+
goodsSn: formData.goodsSn || null,
|
|
12099
|
+
goodsName: formData.goodsName || null,
|
|
12100
|
+
sku: formData.sku || null,
|
|
12101
|
+
skuId: formData.skuId || null
|
|
12084
12102
|
};
|
|
12103
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
12104
|
+
method: 'post',
|
|
12105
|
+
data: _objectSpread2({
|
|
12106
|
+
pageSize: pageSize,
|
|
12107
|
+
pageNo: current,
|
|
12108
|
+
platform: 'WDT_ERP'
|
|
12109
|
+
}, data)
|
|
12110
|
+
}).then(function (res) {
|
|
12111
|
+
var _res$data = res.data,
|
|
12112
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
12113
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
12114
|
+
_res$data$total = _res$data.total,
|
|
12115
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
12116
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
12117
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
12118
|
+
index: index + 1
|
|
12119
|
+
});
|
|
12120
|
+
});
|
|
12121
|
+
return {
|
|
12122
|
+
total: total,
|
|
12123
|
+
list: newProducts
|
|
12124
|
+
};
|
|
12125
|
+
});
|
|
12126
|
+
};
|
|
12127
|
+
var columns$2 = [{
|
|
12128
|
+
dataIndex: 'index',
|
|
12129
|
+
title: 'NO',
|
|
12130
|
+
render: function render(val, record, index) {
|
|
12131
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12132
|
+
style: {
|
|
12133
|
+
width: 25
|
|
12134
|
+
}
|
|
12135
|
+
}, index + 1);
|
|
12136
|
+
},
|
|
12137
|
+
width: 100
|
|
12138
|
+
}, {
|
|
12139
|
+
dataIndex: 'sku',
|
|
12140
|
+
title: "SKU",
|
|
12141
|
+
ellipsis: true,
|
|
12142
|
+
width: 70
|
|
12143
|
+
}, {
|
|
12144
|
+
dataIndex: 'skuId',
|
|
12145
|
+
title: "SKU ID",
|
|
12146
|
+
ellipsis: true,
|
|
12147
|
+
width: 70
|
|
12148
|
+
}, {
|
|
12149
|
+
dataIndex: 'goodsName',
|
|
12150
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12151
|
+
ellipsis: true,
|
|
12152
|
+
width: 70
|
|
12153
|
+
}, {
|
|
12154
|
+
dataIndex: 'goodsShortName',
|
|
12155
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12156
|
+
ellipsis: true,
|
|
12157
|
+
width: 70
|
|
12158
|
+
}, {
|
|
12159
|
+
dataIndex: 'picPath',
|
|
12160
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12161
|
+
ellipsis: true,
|
|
12162
|
+
width: 100,
|
|
12163
|
+
render: function render(picUrl) {
|
|
12164
|
+
return /*#__PURE__*/React__default['default'].createElement("img", {
|
|
12165
|
+
style: {
|
|
12166
|
+
width: '60px',
|
|
12167
|
+
height: '60px',
|
|
12168
|
+
objectFit: 'contain'
|
|
12169
|
+
},
|
|
12170
|
+
src: picUrl
|
|
12171
|
+
});
|
|
12172
|
+
}
|
|
12173
|
+
}, {
|
|
12174
|
+
dataIndex: 'goodsSn',
|
|
12175
|
+
title: "\u8D27\u53F7",
|
|
12176
|
+
ellipsis: true,
|
|
12177
|
+
width: 70
|
|
12178
|
+
}, {
|
|
12179
|
+
dataIndex: 'goodsId',
|
|
12180
|
+
title: "\u8D27\u53F7ID",
|
|
12181
|
+
ellipsis: true,
|
|
12182
|
+
width: 70
|
|
12183
|
+
}, {
|
|
12184
|
+
dataIndex: 'colorName',
|
|
12185
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12186
|
+
ellipsis: true,
|
|
12187
|
+
width: 70
|
|
12188
|
+
}, {
|
|
12189
|
+
dataIndex: 'colorCode',
|
|
12190
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12191
|
+
ellipsis: true,
|
|
12192
|
+
width: 70
|
|
12193
|
+
}, {
|
|
12194
|
+
dataIndex: 'sizeName',
|
|
12195
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
12196
|
+
ellipsis: true,
|
|
12197
|
+
width: 70
|
|
12198
|
+
}, {
|
|
12199
|
+
dataIndex: 'sizeCode',
|
|
12200
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
12201
|
+
ellipsis: true,
|
|
12202
|
+
width: 70
|
|
12203
|
+
}, {
|
|
12204
|
+
dataIndex: 'brandName',
|
|
12205
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12206
|
+
ellipsis: true,
|
|
12207
|
+
width: 70
|
|
12208
|
+
}, {
|
|
12209
|
+
dataIndex: 'goodsNumber',
|
|
12210
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
12211
|
+
ellipsis: true,
|
|
12212
|
+
width: 70
|
|
12213
|
+
}, {
|
|
12214
|
+
dataIndex: 'goodsPrice',
|
|
12215
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
12216
|
+
ellipsis: true,
|
|
12217
|
+
width: 70
|
|
12218
|
+
}, {
|
|
12219
|
+
dataIndex: 'shopPrice',
|
|
12220
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
12221
|
+
ellipsis: true,
|
|
12222
|
+
width: 70
|
|
12223
|
+
}, {
|
|
12224
|
+
dataIndex: 'sharePrice',
|
|
12225
|
+
title: "\u5206\u644A\u4EF7",
|
|
12226
|
+
ellipsis: true,
|
|
12227
|
+
width: 70
|
|
12228
|
+
}, {
|
|
12229
|
+
dataIndex: 'sharePayment',
|
|
12230
|
+
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
12231
|
+
ellipsis: true,
|
|
12232
|
+
width: 70
|
|
12233
|
+
}, {
|
|
12234
|
+
dataIndex: 'payment',
|
|
12235
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
12236
|
+
ellipsis: true,
|
|
12237
|
+
width: 70
|
|
12238
|
+
}, {
|
|
12239
|
+
dataIndex: 'tcSku',
|
|
12240
|
+
title: "\u5957\u9910SKU",
|
|
12241
|
+
ellipsis: true,
|
|
12242
|
+
width: 70
|
|
12243
|
+
}, {
|
|
12244
|
+
dataIndex: 'tcGoodsNumber',
|
|
12245
|
+
title: "\u5957\u9910\u5957\u6570",
|
|
12246
|
+
ellipsis: true,
|
|
12247
|
+
width: 70
|
|
12248
|
+
}, {
|
|
12249
|
+
dataIndex: 'taoCanSingleSl',
|
|
12250
|
+
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
12251
|
+
ellipsis: true,
|
|
12252
|
+
width: 70
|
|
12253
|
+
}, {
|
|
12254
|
+
dataIndex: 'isGift',
|
|
12255
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12256
|
+
ellipsis: true,
|
|
12257
|
+
width: 70
|
|
12258
|
+
}];
|
|
12259
|
+
var GoodList$1 = function GoodList(props, ref) {
|
|
12085
12260
|
var _useState = React.useState([]),
|
|
12086
12261
|
_useState2 = _slicedToArray(_useState, 2),
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
React.
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
var totalMoney = null;
|
|
12098
|
-
if (columnType === 'num') {
|
|
12099
|
-
totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].sharePrice));
|
|
12100
|
-
} else {
|
|
12101
|
-
totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
|
|
12102
|
-
}
|
|
12103
|
-
if (totalMoney !== null) {
|
|
12104
|
-
value[index]['returnPrice'] = totalMoney.toString();
|
|
12105
|
-
}
|
|
12106
|
-
}
|
|
12107
|
-
} else if (type === 'WDT_EXCHANGE_GOODS') {
|
|
12108
|
-
if (['price', 'num'].includes(columnType)) {
|
|
12109
|
-
var _totalMoney = null;
|
|
12110
|
-
if (columnType === 'num') {
|
|
12111
|
-
_totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].price));
|
|
12112
|
-
} else {
|
|
12113
|
-
_totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
|
|
12114
|
-
}
|
|
12115
|
-
if (_totalMoney !== null) {
|
|
12116
|
-
value[index]['exchangePrice'] = _totalMoney.toString();
|
|
12117
|
-
}
|
|
12118
|
-
}
|
|
12262
|
+
selectList = _useState2[0],
|
|
12263
|
+
setSelect = _useState2[1];
|
|
12264
|
+
var _useState3 = React.useState([]),
|
|
12265
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
12266
|
+
selectIds = _useState4[0],
|
|
12267
|
+
setSelectIds = _useState4[1];
|
|
12268
|
+
React.useImperativeHandle(ref, function () {
|
|
12269
|
+
return {
|
|
12270
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
12271
|
+
return selectList;
|
|
12119
12272
|
}
|
|
12120
|
-
|
|
12273
|
+
};
|
|
12274
|
+
});
|
|
12275
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
12276
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
12277
|
+
form = _Form$useForm2[0];
|
|
12278
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$1, {
|
|
12279
|
+
defaultPageSize: 10,
|
|
12280
|
+
form: form
|
|
12281
|
+
}),
|
|
12282
|
+
tableProps = _useAntdTable.tableProps,
|
|
12283
|
+
search = _useAntdTable.search,
|
|
12284
|
+
params = _useAntdTable.params;
|
|
12285
|
+
var submit = search.submit,
|
|
12286
|
+
reset = search.reset;
|
|
12287
|
+
var advanceSearchForm = /*#__PURE__*/React__default['default'].createElement(antd.Form, {
|
|
12288
|
+
layout: "inline",
|
|
12289
|
+
form: form
|
|
12290
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12291
|
+
name: "goodsSn",
|
|
12292
|
+
style: {
|
|
12293
|
+
marginBottom: '12px'
|
|
12121
12294
|
}
|
|
12122
|
-
}
|
|
12123
|
-
|
|
12124
|
-
|
|
12295
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12296
|
+
placeholder: "\u5546\u54C1\u8D27\u53F7",
|
|
12297
|
+
allowClear: true,
|
|
12298
|
+
style: {
|
|
12299
|
+
width: 150
|
|
12300
|
+
}
|
|
12301
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12302
|
+
name: "goodsName",
|
|
12303
|
+
style: {
|
|
12304
|
+
marginBottom: '12px'
|
|
12305
|
+
}
|
|
12306
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12307
|
+
placeholder: "\u5546\u54C1\u540D\u79F0",
|
|
12308
|
+
allowClear: true,
|
|
12309
|
+
style: {
|
|
12310
|
+
width: 150
|
|
12311
|
+
}
|
|
12312
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12313
|
+
name: "sku",
|
|
12314
|
+
style: {
|
|
12315
|
+
marginBottom: '12px'
|
|
12316
|
+
}
|
|
12317
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12318
|
+
placeholder: "SKU",
|
|
12319
|
+
allowClear: true,
|
|
12320
|
+
style: {
|
|
12321
|
+
width: 150
|
|
12322
|
+
}
|
|
12323
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12324
|
+
name: "skuId",
|
|
12325
|
+
style: {
|
|
12326
|
+
marginBottom: '12px'
|
|
12327
|
+
}
|
|
12328
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
12329
|
+
placeholder: "SKU ID",
|
|
12330
|
+
allowClear: true,
|
|
12331
|
+
style: {
|
|
12332
|
+
width: 150
|
|
12333
|
+
}
|
|
12334
|
+
})), /*#__PURE__*/React__default['default'].createElement(antd.Form.Item, {
|
|
12335
|
+
style: {
|
|
12336
|
+
marginBottom: '12px'
|
|
12337
|
+
}
|
|
12338
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12339
|
+
type: "primary",
|
|
12340
|
+
style: {
|
|
12341
|
+
marginRight: '8px'
|
|
12342
|
+
},
|
|
12343
|
+
onClick: submit
|
|
12344
|
+
}, "\u67E5\u8BE2"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12345
|
+
onClick: reset
|
|
12346
|
+
}, "\u91CD\u7F6E")));
|
|
12347
|
+
var rowSelection = {
|
|
12348
|
+
selectedRowKeys: selectIds,
|
|
12349
|
+
fixed: true,
|
|
12350
|
+
onSelect: function onSelect(record, selected) {
|
|
12351
|
+
if (selected) {
|
|
12352
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record.specNo]));
|
|
12353
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
12354
|
+
} else {
|
|
12355
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12356
|
+
return t !== record.specNo;
|
|
12357
|
+
}));
|
|
12358
|
+
setSelect(selectList.filter(function (t) {
|
|
12359
|
+
return t.specNo !== record.specNo;
|
|
12360
|
+
}));
|
|
12361
|
+
}
|
|
12362
|
+
},
|
|
12363
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
12364
|
+
if (selected) {
|
|
12365
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
12366
|
+
return t.specNo;
|
|
12367
|
+
}))));
|
|
12368
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
12369
|
+
} else {
|
|
12370
|
+
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
12371
|
+
return t.specNo;
|
|
12372
|
+
})));
|
|
12373
|
+
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
12374
|
+
return arrVal.specNo !== othVal.specNo;
|
|
12375
|
+
});
|
|
12376
|
+
setSelect(list);
|
|
12377
|
+
}
|
|
12378
|
+
}
|
|
12379
|
+
};
|
|
12380
|
+
var showTable = function showTable() {
|
|
12381
|
+
var handleDelete = function handleDelete(record) {
|
|
12382
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
12383
|
+
return t !== record.specNo;
|
|
12384
|
+
}));
|
|
12385
|
+
setSelect(selectList.filter(function (t) {
|
|
12386
|
+
return t.specNo !== record.specNo;
|
|
12387
|
+
}));
|
|
12388
|
+
};
|
|
12389
|
+
var showColumns = [{
|
|
12390
|
+
dataIndex: '',
|
|
12391
|
+
title: "\u64CD\u4F5C",
|
|
12392
|
+
ellipsis: true,
|
|
12393
|
+
width: 100,
|
|
12394
|
+
render: function render(val, record) {
|
|
12395
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12396
|
+
type: "link",
|
|
12397
|
+
onClick: function onClick() {
|
|
12398
|
+
return handleDelete(record);
|
|
12399
|
+
}
|
|
12400
|
+
}, "\u5220\u9664");
|
|
12401
|
+
}
|
|
12402
|
+
}].concat(lodash.takeRight(columns$2, columns$2.length - 1));
|
|
12403
|
+
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12404
|
+
style: {
|
|
12405
|
+
width: '100%',
|
|
12406
|
+
maxWidth: '387px'
|
|
12407
|
+
}
|
|
12408
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
12409
|
+
columns: showColumns,
|
|
12410
|
+
rowKey: 'specNo',
|
|
12411
|
+
dataSource: selectList,
|
|
12412
|
+
scroll: {
|
|
12413
|
+
x: '100%',
|
|
12414
|
+
y: 250
|
|
12415
|
+
},
|
|
12416
|
+
pagination: {
|
|
12417
|
+
size: 'small',
|
|
12418
|
+
total: selectIds.length,
|
|
12419
|
+
pageSize: 10,
|
|
12420
|
+
showSizeChanger: false
|
|
12421
|
+
}
|
|
12422
|
+
})) : null;
|
|
12423
|
+
};
|
|
12424
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, advanceSearchForm, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
12425
|
+
style: {
|
|
12426
|
+
marginTop: '4px'
|
|
12427
|
+
}
|
|
12428
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
12429
|
+
rowSelection: rowSelection,
|
|
12430
|
+
rowKey: "goodsId",
|
|
12431
|
+
columns: columns$2,
|
|
12432
|
+
scroll: {
|
|
12433
|
+
x: '100%',
|
|
12434
|
+
y: 250
|
|
12435
|
+
}
|
|
12436
|
+
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
12437
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
12438
|
+
return triggerNode.parentElement;
|
|
12439
|
+
},
|
|
12440
|
+
content: showTable(),
|
|
12441
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
12442
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12443
|
+
danger: true,
|
|
12444
|
+
type: "text"
|
|
12445
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
12446
|
+
};
|
|
12447
|
+
var BsE3GoodList = /*#__PURE__*/React.forwardRef(GoodList$1);
|
|
12448
|
+
|
|
12449
|
+
var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
12450
|
+
React.useImperativeHandle(ref, function () {
|
|
12451
|
+
return {
|
|
12452
|
+
open: function open() {
|
|
12453
|
+
setVisible(true);
|
|
12454
|
+
}
|
|
12455
|
+
};
|
|
12456
|
+
});
|
|
12457
|
+
var onSubmit = props.onSubmit,
|
|
12458
|
+
width = props.width;
|
|
12459
|
+
var _useState = React.useState(false),
|
|
12460
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12461
|
+
visible = _useState2[0],
|
|
12462
|
+
setVisible = _useState2[1];
|
|
12463
|
+
var bsE3GoodListRef = React.useRef(null);
|
|
12464
|
+
var _onCancel = function onCancel() {
|
|
12465
|
+
setVisible(false);
|
|
12466
|
+
};
|
|
12467
|
+
var onOk = function onOk() {
|
|
12468
|
+
var _bsE3GoodListRef$curr;
|
|
12469
|
+
var selectedList = ((_bsE3GoodListRef$curr = bsE3GoodListRef.current) === null || _bsE3GoodListRef$curr === void 0 ? void 0 : _bsE3GoodListRef$curr.getSelectGoodList()) || [];
|
|
12470
|
+
onSubmit(selectedList);
|
|
12471
|
+
_onCancel();
|
|
12472
|
+
};
|
|
12473
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
12474
|
+
title: '选择商品',
|
|
12475
|
+
okText: '确认',
|
|
12476
|
+
cancelText: '取消',
|
|
12477
|
+
visible: visible,
|
|
12478
|
+
width: width || 850,
|
|
12479
|
+
onCancel: function onCancel() {
|
|
12480
|
+
_onCancel();
|
|
12481
|
+
},
|
|
12482
|
+
onOk: onOk,
|
|
12483
|
+
wrapClassName: "goodModal"
|
|
12484
|
+
}, /*#__PURE__*/React__default['default'].createElement(BsE3GoodList, {
|
|
12485
|
+
ref: bsE3GoodListRef
|
|
12486
|
+
})));
|
|
12487
|
+
};
|
|
12488
|
+
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
12489
|
+
|
|
12490
|
+
// interface GoodsItem {
|
|
12491
|
+
// title: string;
|
|
12492
|
+
// pic: string;
|
|
12493
|
+
// platform: string;
|
|
12494
|
+
// skuId: string;
|
|
12495
|
+
// styleId: string;
|
|
12496
|
+
// }
|
|
12497
|
+
var GoodItem$1 = function GoodItem(props) {
|
|
12498
|
+
var _ref;
|
|
12499
|
+
var _props$value = props.value,
|
|
12500
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
12501
|
+
type = props.type,
|
|
12502
|
+
onChange = props.onChange,
|
|
12503
|
+
disabled = props.disabled,
|
|
12504
|
+
_props$showHeader = props.showHeader,
|
|
12505
|
+
showHeader = _props$showHeader === void 0 ? [] : _props$showHeader,
|
|
12506
|
+
width = props.width,
|
|
12507
|
+
_props$shopList = props.shopList,
|
|
12508
|
+
shopList = _props$shopList === void 0 ? [] : _props$shopList,
|
|
12509
|
+
_props$shopId = props.shopId,
|
|
12510
|
+
shopId = _props$shopId === void 0 ? '' : _props$shopId,
|
|
12511
|
+
_props$maxLength = props.maxLength,
|
|
12512
|
+
maxLength = _props$maxLength === void 0 ? 20 : _props$maxLength,
|
|
12513
|
+
_props$showChangeBtn = props.showChangeBtn,
|
|
12514
|
+
showChangeBtn = _props$showChangeBtn === void 0 ? true : _props$showChangeBtn,
|
|
12515
|
+
_props$showModeBtn = props.showModeBtn,
|
|
12516
|
+
showModeBtn = _props$showModeBtn === void 0 ? false : _props$showModeBtn,
|
|
12517
|
+
_props$isStrict = props.isStrict,
|
|
12518
|
+
isStrict = _props$isStrict === void 0 ? false : _props$isStrict,
|
|
12519
|
+
_props$tableSelect = props.tableSelect,
|
|
12520
|
+
tableSelect = _props$tableSelect === void 0 ? false : _props$tableSelect,
|
|
12521
|
+
_props$selectType = props.selectType,
|
|
12522
|
+
selectType = _props$selectType === void 0 ? '' : _props$selectType,
|
|
12523
|
+
_props$otherOperation = props.otherOperations,
|
|
12524
|
+
otherOperations = _props$otherOperation === void 0 ? null : _props$otherOperation,
|
|
12525
|
+
_props$canUpdateNumbe = props.canUpdateNumber,
|
|
12526
|
+
canUpdateNumber = _props$canUpdateNumbe === void 0 ? false : _props$canUpdateNumbe,
|
|
12527
|
+
shopCode = props.shopCode,
|
|
12528
|
+
_props$companyKey = props.companyKey,
|
|
12529
|
+
companyKey = _props$companyKey === void 0 ? '' : _props$companyKey,
|
|
12530
|
+
onSelect = props.onSelect,
|
|
12531
|
+
onDelete = props.onDelete,
|
|
12532
|
+
onModeChange = props.onModeChange;
|
|
12533
|
+
var refModal = React.useRef();
|
|
12534
|
+
var handleDelete = function handleDelete(record, index) {
|
|
12535
|
+
onDelete === null || onDelete === void 0 ? void 0 : onDelete(value[index]);
|
|
12536
|
+
var newList = _toConsumableArray(value).filter(function (item, i) {
|
|
12537
|
+
return index !== i;
|
|
12538
|
+
});
|
|
12539
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newList));
|
|
12540
|
+
};
|
|
12541
|
+
var _useState = React.useState([]),
|
|
12542
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12543
|
+
selectedRowKeys = _useState2[0],
|
|
12544
|
+
setSelectedRowKeys = _useState2[1];
|
|
12545
|
+
React.useEffect(function () {
|
|
12546
|
+
setSelectedRowKeys([]);
|
|
12547
|
+
}, [tableSelect, selectType]);
|
|
12548
|
+
var updateHandle = function updateHandle(val, index, columnType) {
|
|
12549
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
12550
|
+
value[index][columnType] = val;
|
|
12551
|
+
if (type === 'WDT_RETURN_GOODS') {
|
|
12552
|
+
if (['sharePrice', 'num'].includes(columnType)) {
|
|
12553
|
+
var totalMoney = null;
|
|
12554
|
+
if (columnType === 'num') {
|
|
12555
|
+
totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].sharePrice));
|
|
12556
|
+
} else {
|
|
12557
|
+
totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
|
|
12558
|
+
}
|
|
12559
|
+
if (totalMoney !== null) {
|
|
12560
|
+
value[index]['returnPrice'] = totalMoney.toString();
|
|
12561
|
+
}
|
|
12562
|
+
}
|
|
12563
|
+
} else if (type === 'WDT_EXCHANGE_GOODS') {
|
|
12564
|
+
if (['price', 'num'].includes(columnType)) {
|
|
12565
|
+
var _totalMoney = null;
|
|
12566
|
+
if (columnType === 'num') {
|
|
12567
|
+
_totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].price));
|
|
12568
|
+
} else {
|
|
12569
|
+
_totalMoney = new BigNumber__default['default'](value[index][columnType]).multipliedBy(new BigNumber__default['default'](value[index].num));
|
|
12570
|
+
}
|
|
12571
|
+
if (_totalMoney !== null) {
|
|
12572
|
+
value[index]['exchangePrice'] = _totalMoney.toString();
|
|
12573
|
+
}
|
|
12574
|
+
}
|
|
12575
|
+
}
|
|
12576
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(value));
|
|
12577
|
+
}
|
|
12578
|
+
};
|
|
12579
|
+
var COLUMNS_MAP = function COLUMNS_MAP() {
|
|
12580
|
+
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
12125
12581
|
return function (type) {
|
|
12126
12582
|
var columns = [];
|
|
12127
12583
|
switch (type) {
|
|
@@ -12407,72 +12863,215 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12407
12863
|
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12408
12864
|
}
|
|
12409
12865
|
}, {
|
|
12410
|
-
dataIndex: 'price',
|
|
12411
|
-
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
12866
|
+
dataIndex: 'price',
|
|
12867
|
+
title: "".concat(text, "\u5546\u54C1\u5355\u4EF7"),
|
|
12868
|
+
align: 'center',
|
|
12869
|
+
ellipsis: true,
|
|
12870
|
+
width: 100,
|
|
12871
|
+
render: function render(val, record, index) {
|
|
12872
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12873
|
+
style: {
|
|
12874
|
+
width: 70
|
|
12875
|
+
},
|
|
12876
|
+
value: val,
|
|
12877
|
+
min: 0,
|
|
12878
|
+
onChange: function onChange(value) {
|
|
12879
|
+
return updateHandle(value, index, 'price');
|
|
12880
|
+
}
|
|
12881
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12882
|
+
}
|
|
12883
|
+
}, {
|
|
12884
|
+
dataIndex: 'exchangePrice',
|
|
12885
|
+
title: "".concat(text, "\u6362\u51FA\u91D1\u989D"),
|
|
12886
|
+
align: 'center',
|
|
12887
|
+
ellipsis: true,
|
|
12888
|
+
width: 100
|
|
12889
|
+
}, {
|
|
12890
|
+
dataIndex: 'giftType',
|
|
12891
|
+
title: "\u8D60\u54C1\u65B9\u5F0F",
|
|
12892
|
+
align: 'center',
|
|
12893
|
+
ellipsis: true,
|
|
12894
|
+
width: 100,
|
|
12895
|
+
render: function render(val) {
|
|
12896
|
+
var giftTypeMap = {
|
|
12897
|
+
0: '非赠品',
|
|
12898
|
+
1: '自动赠送',
|
|
12899
|
+
2: '手工赠送',
|
|
12900
|
+
3: '回购自动送赠品',
|
|
12901
|
+
4: '前N有礼送赠品',
|
|
12902
|
+
6: '天猫优仓赠品',
|
|
12903
|
+
7: '淘宝CRM会员送赠'
|
|
12904
|
+
};
|
|
12905
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
12906
|
+
}
|
|
12907
|
+
}, {
|
|
12908
|
+
dataIndex: 'type',
|
|
12909
|
+
title: "".concat(text, "\u5546\u54C1\u7C7B\u578B"),
|
|
12910
|
+
align: 'center',
|
|
12911
|
+
ellipsis: true,
|
|
12912
|
+
width: 100,
|
|
12913
|
+
render: function render(val, record, index) {
|
|
12914
|
+
var options = [{
|
|
12915
|
+
label: '单品',
|
|
12916
|
+
value: '1'
|
|
12917
|
+
}, {
|
|
12918
|
+
label: '组合装',
|
|
12919
|
+
value: '2'
|
|
12920
|
+
}];
|
|
12921
|
+
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
12922
|
+
style: {
|
|
12923
|
+
width: 70
|
|
12924
|
+
},
|
|
12925
|
+
options: options,
|
|
12926
|
+
value: val,
|
|
12927
|
+
onChange: function onChange(value) {
|
|
12928
|
+
return updateHandle(value, index, 'type');
|
|
12929
|
+
}
|
|
12930
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12931
|
+
}
|
|
12932
|
+
}];
|
|
12933
|
+
}
|
|
12934
|
+
break;
|
|
12935
|
+
case 'BS_E3_GOODS':
|
|
12936
|
+
{
|
|
12937
|
+
columns = [{
|
|
12938
|
+
dataIndex: 'sku',
|
|
12939
|
+
title: "SKU",
|
|
12940
|
+
align: 'center',
|
|
12941
|
+
ellipsis: true,
|
|
12942
|
+
width: 150
|
|
12943
|
+
}, {
|
|
12944
|
+
dataIndex: 'skuId',
|
|
12945
|
+
title: "SKU ID",
|
|
12946
|
+
align: 'center',
|
|
12947
|
+
ellipsis: true,
|
|
12948
|
+
width: 150
|
|
12949
|
+
}, {
|
|
12950
|
+
dataIndex: 'goodsName',
|
|
12951
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
12952
|
+
align: 'center',
|
|
12953
|
+
ellipsis: true,
|
|
12954
|
+
width: 150
|
|
12955
|
+
}, {
|
|
12956
|
+
dataIndex: 'goodsShortName',
|
|
12957
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12958
|
+
align: 'center',
|
|
12959
|
+
ellipsis: true,
|
|
12960
|
+
width: 100
|
|
12961
|
+
}, {
|
|
12962
|
+
dataIndex: 'picPath',
|
|
12963
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12964
|
+
align: 'center',
|
|
12965
|
+
ellipsis: true,
|
|
12966
|
+
width: 100,
|
|
12967
|
+
render: function render(val) {
|
|
12968
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12969
|
+
width: 60,
|
|
12970
|
+
src: val
|
|
12971
|
+
});
|
|
12972
|
+
}
|
|
12973
|
+
}, {
|
|
12974
|
+
dataIndex: 'goodsSn',
|
|
12975
|
+
title: "\u8D27\u53F7",
|
|
12976
|
+
align: 'center',
|
|
12977
|
+
ellipsis: true,
|
|
12978
|
+
width: 150
|
|
12979
|
+
}, {
|
|
12980
|
+
dataIndex: 'goodsId',
|
|
12981
|
+
title: "\u8D27\u53F7ID",
|
|
12982
|
+
align: 'center',
|
|
12983
|
+
ellipsis: true,
|
|
12984
|
+
width: 150
|
|
12985
|
+
}, {
|
|
12986
|
+
dataIndex: 'colorName',
|
|
12987
|
+
title: "\u989C\u8272\u540D\u79F0",
|
|
12988
|
+
align: 'center',
|
|
12989
|
+
ellipsis: true,
|
|
12990
|
+
width: 100
|
|
12991
|
+
}, {
|
|
12992
|
+
dataIndex: 'colorCode',
|
|
12993
|
+
title: "\u989C\u8272\u4EE3\u7801",
|
|
12994
|
+
align: 'center',
|
|
12995
|
+
ellipsis: true,
|
|
12996
|
+
width: 150
|
|
12997
|
+
}, {
|
|
12998
|
+
dataIndex: 'sizeName',
|
|
12999
|
+
title: "\u5C3A\u7801\u540D\u79F0",
|
|
13000
|
+
align: 'center',
|
|
13001
|
+
ellipsis: true,
|
|
13002
|
+
width: 100
|
|
13003
|
+
}, {
|
|
13004
|
+
dataIndex: 'sizeCode',
|
|
13005
|
+
title: "\u5C3A\u7801\u4EE3\u7801",
|
|
13006
|
+
align: 'center',
|
|
13007
|
+
ellipsis: true,
|
|
13008
|
+
width: 100
|
|
13009
|
+
}, {
|
|
13010
|
+
dataIndex: 'brandName',
|
|
13011
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
13012
|
+
align: 'center',
|
|
13013
|
+
ellipsis: true,
|
|
13014
|
+
width: 150
|
|
13015
|
+
}, {
|
|
13016
|
+
dataIndex: 'goodsNumber',
|
|
13017
|
+
title: "\u5546\u54C1\u6570\u91CF",
|
|
13018
|
+
align: 'center',
|
|
13019
|
+
ellipsis: true,
|
|
13020
|
+
width: 100
|
|
13021
|
+
}, {
|
|
13022
|
+
dataIndex: 'goodsPrice',
|
|
13023
|
+
title: "\u5546\u54C1\u5355\u4EF7",
|
|
13024
|
+
align: 'center',
|
|
13025
|
+
ellipsis: true,
|
|
13026
|
+
width: 120
|
|
13027
|
+
}, {
|
|
13028
|
+
dataIndex: 'shopPrice',
|
|
13029
|
+
title: "\u5546\u54C1\u7F51\u5E97\u552E\u4EF7",
|
|
13030
|
+
align: 'center',
|
|
13031
|
+
ellipsis: true,
|
|
13032
|
+
width: 120
|
|
13033
|
+
}, {
|
|
13034
|
+
dataIndex: 'sharePrice',
|
|
13035
|
+
title: "\u5206\u644A\u4EF7",
|
|
12412
13036
|
align: 'center',
|
|
12413
13037
|
ellipsis: true,
|
|
12414
|
-
width:
|
|
12415
|
-
render: function render(val, record, index) {
|
|
12416
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
12417
|
-
style: {
|
|
12418
|
-
width: 70
|
|
12419
|
-
},
|
|
12420
|
-
value: val,
|
|
12421
|
-
min: 0,
|
|
12422
|
-
onChange: function onChange(value) {
|
|
12423
|
-
return updateHandle(value, index, 'price');
|
|
12424
|
-
}
|
|
12425
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12426
|
-
}
|
|
13038
|
+
width: 120
|
|
12427
13039
|
}, {
|
|
12428
|
-
dataIndex: '
|
|
12429
|
-
title: "
|
|
13040
|
+
dataIndex: 'sharePayment',
|
|
13041
|
+
title: "\u5206\u644A\u5B9E\u4ED8\u91D1\u989D",
|
|
13042
|
+
align: 'center',
|
|
13043
|
+
ellipsis: true,
|
|
13044
|
+
width: 120
|
|
13045
|
+
}, {
|
|
13046
|
+
dataIndex: 'payment',
|
|
13047
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
13048
|
+
align: 'center',
|
|
13049
|
+
ellipsis: true,
|
|
13050
|
+
width: 120
|
|
13051
|
+
}, {
|
|
13052
|
+
dataIndex: 'tcSku',
|
|
13053
|
+
title: "\u5957\u9910SKU",
|
|
13054
|
+
align: 'center',
|
|
13055
|
+
ellipsis: true,
|
|
13056
|
+
width: 150
|
|
13057
|
+
}, {
|
|
13058
|
+
dataIndex: 'tcGoodsNumber',
|
|
13059
|
+
title: "\u5957\u9910\u5957\u6570",
|
|
12430
13060
|
align: 'center',
|
|
12431
13061
|
ellipsis: true,
|
|
12432
13062
|
width: 100
|
|
12433
13063
|
}, {
|
|
12434
|
-
dataIndex: '
|
|
12435
|
-
title: "\
|
|
13064
|
+
dataIndex: 'taoCanSingleSl',
|
|
13065
|
+
title: "\u5355\u4E2A\u5957\u9910\u6570\u91CF",
|
|
12436
13066
|
align: 'center',
|
|
12437
13067
|
ellipsis: true,
|
|
12438
|
-
width: 100
|
|
12439
|
-
render: function render(val) {
|
|
12440
|
-
var giftTypeMap = {
|
|
12441
|
-
0: '非赠品',
|
|
12442
|
-
1: '自动赠送',
|
|
12443
|
-
2: '手工赠送',
|
|
12444
|
-
3: '回购自动送赠品',
|
|
12445
|
-
4: '前N有礼送赠品',
|
|
12446
|
-
6: '天猫优仓赠品',
|
|
12447
|
-
7: '淘宝CRM会员送赠'
|
|
12448
|
-
};
|
|
12449
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, giftTypeMap[val]);
|
|
12450
|
-
}
|
|
13068
|
+
width: 100
|
|
12451
13069
|
}, {
|
|
12452
|
-
dataIndex: '
|
|
12453
|
-
title: "
|
|
13070
|
+
dataIndex: 'isGift',
|
|
13071
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12454
13072
|
align: 'center',
|
|
12455
13073
|
ellipsis: true,
|
|
12456
|
-
width: 100
|
|
12457
|
-
render: function render(val, record, index) {
|
|
12458
|
-
var options = [{
|
|
12459
|
-
label: '单品',
|
|
12460
|
-
value: '1'
|
|
12461
|
-
}, {
|
|
12462
|
-
label: '组合装',
|
|
12463
|
-
value: '2'
|
|
12464
|
-
}];
|
|
12465
|
-
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
12466
|
-
style: {
|
|
12467
|
-
width: 70
|
|
12468
|
-
},
|
|
12469
|
-
options: options,
|
|
12470
|
-
value: val,
|
|
12471
|
-
onChange: function onChange(value) {
|
|
12472
|
-
return updateHandle(value, index, 'type');
|
|
12473
|
-
}
|
|
12474
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
12475
|
-
}
|
|
13074
|
+
width: 100
|
|
12476
13075
|
}];
|
|
12477
13076
|
}
|
|
12478
13077
|
break;
|
|
@@ -12631,6 +13230,15 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12631
13230
|
}
|
|
12632
13231
|
return item;
|
|
12633
13232
|
});
|
|
13233
|
+
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
13234
|
+
newList = list.map(function (item) {
|
|
13235
|
+
item.uuid = kmkfUtils.uuid();
|
|
13236
|
+
item.canDelete = true;
|
|
13237
|
+
item.goodsNumber = 1;
|
|
13238
|
+
item.goodsPrice = 0;
|
|
13239
|
+
item.canUpdateNumber = canUpdateNumber;
|
|
13240
|
+
return item;
|
|
13241
|
+
});
|
|
12634
13242
|
} else {
|
|
12635
13243
|
newList = list.map(function (item) {
|
|
12636
13244
|
var goodsId = item.goodsId,
|
|
@@ -12673,6 +13281,9 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12673
13281
|
fixed: true,
|
|
12674
13282
|
onChange: onSelectChange
|
|
12675
13283
|
};
|
|
13284
|
+
var handleCheckboxChange = function handleCheckboxChange(e) {
|
|
13285
|
+
onModeChange === null || onModeChange === void 0 ? void 0 : onModeChange(e.target.checked);
|
|
13286
|
+
};
|
|
12676
13287
|
var tableConfig = React.useMemo(function () {
|
|
12677
13288
|
var params = {};
|
|
12678
13289
|
if (tableSelect) {
|
|
@@ -12684,7 +13295,10 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12684
13295
|
style: {
|
|
12685
13296
|
float: 'right'
|
|
12686
13297
|
}
|
|
12687
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.
|
|
13298
|
+
}, showModeBtn && /*#__PURE__*/React__default['default'].createElement(antd.Checkbox, {
|
|
13299
|
+
checked: isStrict,
|
|
13300
|
+
onChange: handleCheckboxChange
|
|
13301
|
+
}, "\u5408\u5E76\u5355\uFF0C\u52FE\u9009\u540E\u53EA\u5C55\u793A\u5F53\u524D\u5E73\u53F0\u8BA2\u5355\u5546\u54C1"), !((_ref = ['BS_E3_GOODS']) === null || _ref === void 0 ? void 0 : _ref.includes(type)) && /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
12688
13302
|
type: "link",
|
|
12689
13303
|
onClick: handleChangeGoods
|
|
12690
13304
|
}, "\u9009\u62E9\u5546\u54C1"), otherOperations), /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2(_objectSpread2({}, tableConfig), {}, {
|
|
@@ -12707,6 +13321,14 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12707
13321
|
shopId: shopId,
|
|
12708
13322
|
maxLength: maxLength,
|
|
12709
13323
|
companyKey: companyKey
|
|
13324
|
+
}) : ['BS_E3_REISSUE_GOODS', 'BS_E3_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type) ? /*#__PURE__*/React__default['default'].createElement(BsE3GoodsModal, {
|
|
13325
|
+
ref: refModal,
|
|
13326
|
+
onSubmit: onSubmit,
|
|
13327
|
+
width: width,
|
|
13328
|
+
shopList: shopList,
|
|
13329
|
+
shopId: shopId,
|
|
13330
|
+
maxLength: maxLength,
|
|
13331
|
+
companyKey: companyKey
|
|
12710
13332
|
}) : /*#__PURE__*/React__default['default'].createElement(GoodsModal$2, {
|
|
12711
13333
|
ref: refModal,
|
|
12712
13334
|
onSubmit: onSubmit,
|
|
@@ -13326,19 +13948,185 @@ var BsReturnGoods = function BsReturnGoods(props) {
|
|
|
13326
13948
|
})));
|
|
13327
13949
|
};
|
|
13328
13950
|
|
|
13329
|
-
var
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13951
|
+
var singletonMap = new Map();
|
|
13952
|
+
var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
13953
|
+
if (!singletonMap.has(orderNo)) {
|
|
13954
|
+
var p = new Promise(function (resolve, reject) {
|
|
13955
|
+
var doReject = function doReject(err) {
|
|
13956
|
+
// 清空掉错误的请求记录
|
|
13957
|
+
singletonMap.delete(orderNo);
|
|
13958
|
+
reject(err);
|
|
13959
|
+
};
|
|
13960
|
+
extendRequest('/qy/gdfw/order/wdtOrderDetail', {
|
|
13961
|
+
method: 'post',
|
|
13962
|
+
data: {
|
|
13963
|
+
billNo: orderNo
|
|
13964
|
+
}
|
|
13965
|
+
}).then(function (data) {
|
|
13966
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
13967
|
+
var _data$data, _data$data$trades;
|
|
13968
|
+
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
|
|
13969
|
+
data.data.trades = kmkfUtils.filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
13970
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13971
|
+
billNo: item.tradeNo,
|
|
13972
|
+
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13973
|
+
billTag: item.tagName
|
|
13974
|
+
});
|
|
13975
|
+
});
|
|
13976
|
+
}
|
|
13977
|
+
resolve(data.data);
|
|
13978
|
+
// 延迟10秒清除,保证订单的时效性
|
|
13979
|
+
setTimeout(function () {
|
|
13980
|
+
singletonMap.delete(orderNo);
|
|
13981
|
+
}, 1000 * 10);
|
|
13982
|
+
} else {
|
|
13983
|
+
doReject(data);
|
|
13984
|
+
}
|
|
13985
|
+
}).catch(doReject);
|
|
13986
|
+
});
|
|
13987
|
+
singletonMap.set(orderNo, p);
|
|
13988
|
+
}
|
|
13989
|
+
return singletonMap.get(orderNo);
|
|
13990
|
+
};
|
|
13991
|
+
var wdtUtils = {
|
|
13992
|
+
getWdtOrderListSingleton: getWdtOrderListSingleton
|
|
13993
|
+
};
|
|
13994
|
+
|
|
13995
|
+
var singletonMap$1 = new Map();
|
|
13996
|
+
var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
13997
|
+
if (!singletonMap$1.has(orderNo)) {
|
|
13998
|
+
var p = new Promise(function (resolve, reject) {
|
|
13999
|
+
var doReject = function doReject(err) {
|
|
14000
|
+
// 清空掉错误的请求记录
|
|
14001
|
+
// singletonMap.delete(orderNo);
|
|
14002
|
+
reject(err);
|
|
14003
|
+
};
|
|
14004
|
+
extendRequest('/qy/gdfw/order/bse3OrderDetail', {
|
|
14005
|
+
method: 'post',
|
|
14006
|
+
data: {
|
|
14007
|
+
billNo: orderNo
|
|
14008
|
+
}
|
|
14009
|
+
}).then(function (data) {
|
|
14010
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
14011
|
+
var _data$data, _data$data$orderList;
|
|
14012
|
+
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderList = _data$data.orderList) === null || _data$data$orderList === void 0 ? void 0 : _data$data$orderList.length) {
|
|
14013
|
+
var _filterBsE3Orders;
|
|
14014
|
+
data.data.orderList = (_filterBsE3Orders = kmkfUtils.filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo)) === null || _filterBsE3Orders === void 0 ? void 0 : _filterBsE3Orders.map(function (item) {
|
|
14015
|
+
var isSplit = item.isSplit,
|
|
14016
|
+
isSplitNew = item.isSplitNew,
|
|
14017
|
+
isCopy = item.isCopy,
|
|
14018
|
+
isExchangeOrder = item.isExchangeOrder,
|
|
14019
|
+
isCombineNew = item.isCombineNew,
|
|
14020
|
+
isCombine = item.isCombine,
|
|
14021
|
+
orderStatus = item.orderStatus;
|
|
14022
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14023
|
+
orderStatus: kmkfUtils.BS_E3_ORDER_STATUS_MAP[orderStatus],
|
|
14024
|
+
isSplit: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isSplit],
|
|
14025
|
+
isSplitNew: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isSplitNew],
|
|
14026
|
+
isExchangeOrder: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isExchangeOrder],
|
|
14027
|
+
isCopy: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCopy],
|
|
14028
|
+
isCombineNew: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCombineNew],
|
|
14029
|
+
isCombine: kmkfUtils.BS_E3_BOOLEAN_STATUS_MAP[isCombine]
|
|
14030
|
+
});
|
|
14031
|
+
});
|
|
14032
|
+
}
|
|
14033
|
+
resolve(data.data);
|
|
14034
|
+
} else {
|
|
14035
|
+
doReject(data);
|
|
14036
|
+
}
|
|
14037
|
+
}).catch(doReject);
|
|
14038
|
+
});
|
|
14039
|
+
singletonMap$1.set(orderNo, p);
|
|
13341
14040
|
}
|
|
14041
|
+
return singletonMap$1.get(orderNo);
|
|
14042
|
+
};
|
|
14043
|
+
var bsE3Utils = {
|
|
14044
|
+
getBsE3OrderListSingleton: getBsE3OrderListSingleton
|
|
14045
|
+
};
|
|
14046
|
+
|
|
14047
|
+
var columnsMap = {
|
|
14048
|
+
BS_SYSTEM_ORDER: [{
|
|
14049
|
+
title: '单据类型',
|
|
14050
|
+
dataIndex: 'billType',
|
|
14051
|
+
width: 150
|
|
14052
|
+
}, {
|
|
14053
|
+
title: '系统订单号',
|
|
14054
|
+
dataIndex: 'billNo',
|
|
14055
|
+
width: 150
|
|
14056
|
+
}, {
|
|
14057
|
+
title: '标签',
|
|
14058
|
+
dataIndex: 'billTag',
|
|
14059
|
+
width: 150
|
|
14060
|
+
}],
|
|
14061
|
+
WLN_SYSTEM_ORDER: [{
|
|
14062
|
+
title: '订单类型',
|
|
14063
|
+
dataIndex: 'billType',
|
|
14064
|
+
width: 150
|
|
14065
|
+
}, {
|
|
14066
|
+
title: '系统订单号',
|
|
14067
|
+
dataIndex: 'billNo',
|
|
14068
|
+
width: 150
|
|
14069
|
+
}, {
|
|
14070
|
+
title: '标记',
|
|
14071
|
+
dataIndex: 'billTag',
|
|
14072
|
+
width: 150
|
|
14073
|
+
}],
|
|
14074
|
+
WDT_SYSTEM_ORDER: [{
|
|
14075
|
+
title: '订单类型',
|
|
14076
|
+
dataIndex: 'billType',
|
|
14077
|
+
width: 150
|
|
14078
|
+
}, {
|
|
14079
|
+
title: '系统订单号',
|
|
14080
|
+
dataIndex: 'billNo',
|
|
14081
|
+
width: 150
|
|
14082
|
+
}, {
|
|
14083
|
+
title: '订单标签',
|
|
14084
|
+
dataIndex: 'billTag',
|
|
14085
|
+
width: 150
|
|
14086
|
+
}],
|
|
14087
|
+
BS_E3_SYSTEM_ORDER: [{
|
|
14088
|
+
title: '系统订单号',
|
|
14089
|
+
dataIndex: 'orderSn',
|
|
14090
|
+
width: 150
|
|
14091
|
+
}, {
|
|
14092
|
+
title: '订单状态',
|
|
14093
|
+
dataIndex: 'orderStatus',
|
|
14094
|
+
width: 100
|
|
14095
|
+
}, {
|
|
14096
|
+
title: '是否被拆分',
|
|
14097
|
+
dataIndex: 'isSplit',
|
|
14098
|
+
width: 70
|
|
14099
|
+
}, {
|
|
14100
|
+
title: '是否拆分子单',
|
|
14101
|
+
dataIndex: 'isSplitNew',
|
|
14102
|
+
width: 70
|
|
14103
|
+
}, {
|
|
14104
|
+
title: '是否被合并',
|
|
14105
|
+
dataIndex: 'isCombine',
|
|
14106
|
+
width: 70
|
|
14107
|
+
}, {
|
|
14108
|
+
title: '是否合并新单',
|
|
14109
|
+
dataIndex: 'isCombineNew',
|
|
14110
|
+
width: 70
|
|
14111
|
+
}, {
|
|
14112
|
+
title: '是否复制单',
|
|
14113
|
+
dataIndex: 'isCopy',
|
|
14114
|
+
width: 70
|
|
14115
|
+
}, {
|
|
14116
|
+
title: '是否换货单',
|
|
14117
|
+
dataIndex: 'isExchangeOrder',
|
|
14118
|
+
width: 70
|
|
14119
|
+
}, {
|
|
14120
|
+
title: '订单备注',
|
|
14121
|
+
dataIndex: 'orderMsg',
|
|
14122
|
+
width: 150
|
|
14123
|
+
}]
|
|
14124
|
+
};
|
|
14125
|
+
var rowKeyMap = {
|
|
14126
|
+
BS_SYSTEM_ORDER: 'billNo',
|
|
14127
|
+
WLN_SYSTEM_ORDER: 'billNo',
|
|
14128
|
+
WDT_SYSTEM_ORDER: 'billNo',
|
|
14129
|
+
BS_E3_SYSTEM_ORDER: 'orderSn'
|
|
13342
14130
|
};
|
|
13343
14131
|
var index$1 = (function (props) {
|
|
13344
14132
|
var value = props.value,
|
|
@@ -13356,21 +14144,13 @@ var index$1 = (function (props) {
|
|
|
13356
14144
|
getWlnOrderList(value.orderNo);
|
|
13357
14145
|
} else if (type === 'WDT_SYSTEM_ORDER') {
|
|
13358
14146
|
getWdtOrderList(value.orderNo);
|
|
14147
|
+
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
14148
|
+
getBsE3OrderList(value.orderNo);
|
|
13359
14149
|
}
|
|
13360
14150
|
}
|
|
13361
14151
|
}, [value, type]);
|
|
13362
14152
|
var columns = React.useMemo(function () {
|
|
13363
|
-
|
|
13364
|
-
return [{
|
|
13365
|
-
dataIndex: 'billType',
|
|
13366
|
-
title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type = columnsNameMap[type]) === null || _columnsNameMap$type === void 0 ? void 0 : _columnsNameMap$type.typeName
|
|
13367
|
-
}, {
|
|
13368
|
-
dataIndex: 'billNo',
|
|
13369
|
-
title: '系统订单号'
|
|
13370
|
-
}, {
|
|
13371
|
-
dataIndex: 'billTag',
|
|
13372
|
-
title: columnsNameMap === null || columnsNameMap === void 0 ? void 0 : (_columnsNameMap$type2 = columnsNameMap[type]) === null || _columnsNameMap$type2 === void 0 ? void 0 : _columnsNameMap$type2.tagName
|
|
13373
|
-
}];
|
|
14153
|
+
return columnsMap[type] || [];
|
|
13374
14154
|
}, [type]);
|
|
13375
14155
|
var getOrderList = /*#__PURE__*/function () {
|
|
13376
14156
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
@@ -13460,51 +14240,29 @@ var index$1 = (function (props) {
|
|
|
13460
14240
|
}();
|
|
13461
14241
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13462
14242
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
13463
|
-
var _yield$request3, success, data, trades;
|
|
13464
14243
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
13465
14244
|
while (1) switch (_context3.prev = _context3.next) {
|
|
13466
14245
|
case 0:
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
method: 'post',
|
|
13470
|
-
data: {
|
|
13471
|
-
billNo: orderNo
|
|
13472
|
-
}
|
|
13473
|
-
});
|
|
13474
|
-
case 2:
|
|
13475
|
-
_yield$request3 = _context3.sent;
|
|
13476
|
-
success = _yield$request3.success;
|
|
13477
|
-
data = _yield$request3.data;
|
|
13478
|
-
if (success) {
|
|
13479
|
-
trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
14246
|
+
wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
|
|
14247
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
13480
14248
|
return (item.srcTid || '').split(',').includes(orderNo);
|
|
13481
|
-
}).map(function (item) {
|
|
13482
|
-
if (Array.isArray(item.goodDetails)) {
|
|
13483
|
-
item.goodDetails = item.goodDetails.filter(function (good) {
|
|
13484
|
-
return good.srcTid === orderNo;
|
|
13485
|
-
});
|
|
13486
|
-
}
|
|
13487
|
-
return item;
|
|
13488
14249
|
});
|
|
13489
|
-
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13490
|
-
orders: trades
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
billType
|
|
13494
|
-
billTag
|
|
13495
|
-
});
|
|
13496
|
-
}),
|
|
13497
|
-
showOrderInfo: trades.map(function (item) {
|
|
14250
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14251
|
+
orders: trades,
|
|
14252
|
+
showOrderInfo: trades.map(function (_ref4) {
|
|
14253
|
+
var billNo = _ref4.billNo,
|
|
14254
|
+
billType = _ref4.billType,
|
|
14255
|
+
billTag = _ref4.billTag;
|
|
13498
14256
|
return {
|
|
13499
|
-
billNo:
|
|
13500
|
-
billType:
|
|
13501
|
-
billTag:
|
|
14257
|
+
billNo: billNo,
|
|
14258
|
+
billType: billType,
|
|
14259
|
+
billTag: billTag
|
|
13502
14260
|
};
|
|
13503
14261
|
})
|
|
13504
14262
|
}));
|
|
13505
|
-
}
|
|
14263
|
+
});
|
|
13506
14264
|
onceRef.current = false;
|
|
13507
|
-
case
|
|
14265
|
+
case 2:
|
|
13508
14266
|
case "end":
|
|
13509
14267
|
return _context3.stop();
|
|
13510
14268
|
}
|
|
@@ -13514,6 +14272,31 @@ var index$1 = (function (props) {
|
|
|
13514
14272
|
return _ref3.apply(this, arguments);
|
|
13515
14273
|
};
|
|
13516
14274
|
}();
|
|
14275
|
+
var getBsE3OrderList = /*#__PURE__*/function () {
|
|
14276
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(orderNo) {
|
|
14277
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
14278
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
14279
|
+
case 0:
|
|
14280
|
+
bsE3Utils.getBsE3OrderListSingleton(orderNo).then(function (data) {
|
|
14281
|
+
var trades = ((data === null || data === void 0 ? void 0 : data.orderList) || []).filter(function (item) {
|
|
14282
|
+
return (item.dealCode || '').split(',').includes(orderNo);
|
|
14283
|
+
});
|
|
14284
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14285
|
+
orders: trades,
|
|
14286
|
+
showOrderInfo: trades
|
|
14287
|
+
}));
|
|
14288
|
+
});
|
|
14289
|
+
onceRef.current = false;
|
|
14290
|
+
case 2:
|
|
14291
|
+
case "end":
|
|
14292
|
+
return _context4.stop();
|
|
14293
|
+
}
|
|
14294
|
+
}, _callee4);
|
|
14295
|
+
}));
|
|
14296
|
+
return function getBsE3OrderList(_x4) {
|
|
14297
|
+
return _ref5.apply(this, arguments);
|
|
14298
|
+
};
|
|
14299
|
+
}();
|
|
13517
14300
|
var rowSelection = {
|
|
13518
14301
|
selectedRowKeys: (value === null || value === void 0 ? void 0 : value.selectIds) || [],
|
|
13519
14302
|
fixed: true,
|
|
@@ -13534,7 +14317,7 @@ var index$1 = (function (props) {
|
|
|
13534
14317
|
dataSource: (value === null || value === void 0 ? void 0 : value.orders) || [],
|
|
13535
14318
|
columns: columns,
|
|
13536
14319
|
rowSelection: rowSelection,
|
|
13537
|
-
rowKey: 'billNo',
|
|
14320
|
+
rowKey: rowKeyMap[type] || 'billNo',
|
|
13538
14321
|
size: "small",
|
|
13539
14322
|
pagination: false,
|
|
13540
14323
|
scroll: {
|
|
@@ -13573,8 +14356,11 @@ var componentMap$1 = {
|
|
|
13573
14356
|
type: 'wdt',
|
|
13574
14357
|
key: 'wdtGoods',
|
|
13575
14358
|
name: '旺店通',
|
|
14359
|
+
orderNo: 'srcTid',
|
|
14360
|
+
goodDetailOrderNo: 'srcTid',
|
|
13576
14361
|
eventNameMap: {
|
|
13577
14362
|
type: 'wdtType',
|
|
14363
|
+
updateGoodsHandle: kmkfUtils.updateWdtGoodsHandle,
|
|
13578
14364
|
selectListReturn: 'wdtSelectListReturn',
|
|
13579
14365
|
selectList: 'wdtSelectList',
|
|
13580
14366
|
reissueSelectList: 'wdtReissueSelectList',
|
|
@@ -13589,6 +14375,30 @@ var componentMap$1 = {
|
|
|
13589
14375
|
returnDeleteGood: 'wdtReturnDeleteGood',
|
|
13590
14376
|
exchangeDeleteGood: 'wdtExchangeDeleteGood'
|
|
13591
14377
|
}
|
|
14378
|
+
},
|
|
14379
|
+
'BS_E3_GOODS': {
|
|
14380
|
+
type: 'e3',
|
|
14381
|
+
key: 'bsE3Goods',
|
|
14382
|
+
name: '百胜E3',
|
|
14383
|
+
orderNo: 'dealCode',
|
|
14384
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
14385
|
+
eventNameMap: {
|
|
14386
|
+
type: 'bsE3Type',
|
|
14387
|
+
updateGoodsHandle: kmkfUtils.updateBsE3GoodsHandle,
|
|
14388
|
+
selectListReturn: 'bsE3SelectListReturn',
|
|
14389
|
+
selectList: 'bsE3SelectList',
|
|
14390
|
+
reissueSelectList: 'bsE3ReissueSelectList',
|
|
14391
|
+
reissueSelectListReturn: 'bsE3ReissueSelectListReturn',
|
|
14392
|
+
reissueDeleteGood: 'bsE3ReissueDeleteGood',
|
|
14393
|
+
changeShopCode: 'bsE3ChangeShopCode',
|
|
14394
|
+
reissueType: 'bsE3ReissueType',
|
|
14395
|
+
returnType: 'bsE3ReturnType',
|
|
14396
|
+
returnSelectListReturn: 'bsE3ReturnSelectListReturn',
|
|
14397
|
+
returnSelectList: 'bsE3ReturnSelectList',
|
|
14398
|
+
deleteGood: 'bsE3DeleteGood',
|
|
14399
|
+
returnDeleteGood: 'bsE3ReturnDeleteGood',
|
|
14400
|
+
exchangeDeleteGood: 'bsE3ExchangeDeleteGood'
|
|
14401
|
+
}
|
|
13592
14402
|
}
|
|
13593
14403
|
};
|
|
13594
14404
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -13597,6 +14407,13 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13597
14407
|
disabled = props.disabled,
|
|
13598
14408
|
onChange = props.onChange,
|
|
13599
14409
|
compType = props.type;
|
|
14410
|
+
console.log('value?.orders', value === null || value === void 0 ? void 0 : value.orders);
|
|
14411
|
+
// 合并单订单会包含","
|
|
14412
|
+
var showModeBtn = ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
14413
|
+
var _order$componentMap$c;
|
|
14414
|
+
return order === null || order === void 0 ? void 0 : (_order$componentMap$c = order[componentMap$1[compType].orderNo]) === null || _order$componentMap$c === void 0 ? void 0 : _order$componentMap$c.includes(',');
|
|
14415
|
+
});
|
|
14416
|
+
var getOrderFlag = React.useRef(false);
|
|
13600
14417
|
var _useState = React.useState(false),
|
|
13601
14418
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13602
14419
|
tableSelect = _useState2[0],
|
|
@@ -13604,8 +14421,36 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13604
14421
|
var withInfo = React.useRef(null);
|
|
13605
14422
|
var valueRef = React.useRef(null);
|
|
13606
14423
|
React.useEffect(function () {
|
|
14424
|
+
var _value$orders;
|
|
13607
14425
|
valueRef.current = value;
|
|
14426
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo)) {
|
|
14427
|
+
getOrderFlag.current = true;
|
|
14428
|
+
getWdtOrderList(value === null || value === void 0 ? void 0 : value.orderNo);
|
|
14429
|
+
}
|
|
13608
14430
|
}, [value]);
|
|
14431
|
+
var getWdtOrderList = /*#__PURE__*/function () {
|
|
14432
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
14433
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14434
|
+
while (1) switch (_context.prev = _context.next) {
|
|
14435
|
+
case 0:
|
|
14436
|
+
wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
|
|
14437
|
+
var orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (trade) {
|
|
14438
|
+
return (value.selectIds || []).includes(trade.tradeNo);
|
|
14439
|
+
});
|
|
14440
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14441
|
+
orders: orders
|
|
14442
|
+
}));
|
|
14443
|
+
});
|
|
14444
|
+
case 1:
|
|
14445
|
+
case "end":
|
|
14446
|
+
return _context.stop();
|
|
14447
|
+
}
|
|
14448
|
+
}, _callee);
|
|
14449
|
+
}));
|
|
14450
|
+
return function getWdtOrderList(_x) {
|
|
14451
|
+
return _ref.apply(this, arguments);
|
|
14452
|
+
};
|
|
14453
|
+
}();
|
|
13609
14454
|
React.useEffect(function () {
|
|
13610
14455
|
pubsub__default['default'].subscribe(componentMap$1[compType].eventNameMap.type, function (type, data) {
|
|
13611
14456
|
if (disabled) return;
|
|
@@ -13663,7 +14508,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13663
14508
|
});
|
|
13664
14509
|
pubsub__default['default'].subscribeOnce(componentMap$1[compType].eventNameMap.changeShopCode, function (type, data) {
|
|
13665
14510
|
// console.log(data);
|
|
13666
|
-
onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
14511
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
|
|
13667
14512
|
shopCode: data.shopCode
|
|
13668
14513
|
}));
|
|
13669
14514
|
});
|
|
@@ -13703,6 +14548,25 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13703
14548
|
var changeHandle = function changeHandle(list) {
|
|
13704
14549
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, componentMap$1[compType].key, list)));
|
|
13705
14550
|
};
|
|
14551
|
+
var handleModeChange = function handleModeChange(isStrict) {
|
|
14552
|
+
// isStrict 是否只展示当前平台订单商品
|
|
14553
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({
|
|
14554
|
+
isStrict: isStrict
|
|
14555
|
+
}, componentMap$1[compType].key, getGoodDetails({
|
|
14556
|
+
mode: isStrict
|
|
14557
|
+
}))));
|
|
14558
|
+
};
|
|
14559
|
+
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
14560
|
+
var mode = _ref2.mode;
|
|
14561
|
+
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
14562
|
+
var goodDetails = updateHandle(value.orders || []);
|
|
14563
|
+
var orderNo = value.orderNo;
|
|
14564
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
14565
|
+
var _componentMap$compTyp;
|
|
14566
|
+
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;
|
|
14567
|
+
}) : goodDetails;
|
|
14568
|
+
};
|
|
14569
|
+
console.log('commonStatus', value, compType);
|
|
13706
14570
|
return /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
13707
14571
|
key: componentMap$1[compType].key
|
|
13708
14572
|
}, props), {}, {
|
|
@@ -13719,7 +14583,10 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
13719
14583
|
},
|
|
13720
14584
|
onChange: function onChange(val) {
|
|
13721
14585
|
return changeHandle(val);
|
|
13722
|
-
}
|
|
14586
|
+
},
|
|
14587
|
+
onModeChange: handleModeChange,
|
|
14588
|
+
showModeBtn: showModeBtn,
|
|
14589
|
+
isStrict: value === null || value === void 0 ? void 0 : value.isStrict
|
|
13723
14590
|
}));
|
|
13724
14591
|
};
|
|
13725
14592
|
|
|
@@ -13986,8 +14853,8 @@ var typeMap$1 = {
|
|
|
13986
14853
|
key: 'wdtReissueGoods',
|
|
13987
14854
|
name: '旺店通',
|
|
13988
14855
|
typeName: 'wdtReissueType',
|
|
13989
|
-
|
|
13990
|
-
|
|
14856
|
+
systemOrder: 'wdtSystemOrder',
|
|
14857
|
+
systemOrderNo: 'wdtSystemOrderNo',
|
|
13991
14858
|
reissueSelectList: 'wdtReissueSelectList',
|
|
13992
14859
|
reissueSelectListReturn: 'wdtReissueSelectListReturn',
|
|
13993
14860
|
reissueDeleteGood: 'wdtReissueDeleteGood',
|
|
@@ -14000,7 +14867,7 @@ var typeMap$1 = {
|
|
|
14000
14867
|
}
|
|
14001
14868
|
};
|
|
14002
14869
|
var wdtReissue = function wdtReissue(props) {
|
|
14003
|
-
var
|
|
14870
|
+
var _value$wdtSystemOrder, _typeMap$type7, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
14004
14871
|
var value = props.value,
|
|
14005
14872
|
onChange = props.onChange,
|
|
14006
14873
|
_props$reasonList = props.reasonList,
|
|
@@ -14008,177 +14875,148 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14008
14875
|
disabled = props.disabled,
|
|
14009
14876
|
type = props.type,
|
|
14010
14877
|
other = _objectWithoutProperties(props, _excluded$g);
|
|
14011
|
-
var
|
|
14012
|
-
|
|
14013
|
-
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
newValue["".concat((_typeMap$type2 = typeMap$1[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.key)] = newValue === null || newValue === void 0 ? void 0 : newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type3 = typeMap$1[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.key)].filter(function (item) {
|
|
14021
|
-
return item.sku !== data;
|
|
14022
|
-
});
|
|
14023
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14024
|
-
}
|
|
14025
|
-
});
|
|
14026
|
-
pubsub__default['default'].subscribeOnce("".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.changeShopCode), function (type, data) {
|
|
14027
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
14028
|
-
shopCode: data.shopCode
|
|
14029
|
-
}));
|
|
14030
|
-
});
|
|
14031
|
-
}, [value, disabled]);
|
|
14878
|
+
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
|
|
14879
|
+
var _order$srcTid;
|
|
14880
|
+
return order === null || order === void 0 ? void 0 : (_order$srcTid = order.srcTid) === null || _order$srcTid === void 0 ? void 0 : _order$srcTid.includes(',');
|
|
14881
|
+
});
|
|
14882
|
+
var getOrderFlag = React.useRef(false);
|
|
14883
|
+
var _useState = React.useState(false),
|
|
14884
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14885
|
+
isStrict = _useState2[0],
|
|
14886
|
+
setIsStrict = _useState2[1];
|
|
14032
14887
|
React.useEffect(function () {
|
|
14033
|
-
var _value$
|
|
14034
|
-
if (!(value === null || value === void 0 ? void 0 : (_value$
|
|
14035
|
-
|
|
14036
|
-
|
|
14037
|
-
|
|
14888
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
14889
|
+
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$1[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$1[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)) {
|
|
14890
|
+
var _value$typeMap$type$s4, _typeMap$type3;
|
|
14891
|
+
getOrderFlag.current = true;
|
|
14892
|
+
getWdtOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$1[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);
|
|
14038
14893
|
}
|
|
14039
14894
|
return;
|
|
14040
14895
|
}, [value]);
|
|
14041
14896
|
React.useEffect(function () {
|
|
14042
|
-
var _typeMap$
|
|
14043
|
-
var
|
|
14044
|
-
if (
|
|
14045
|
-
var _value$typeMap$type$t, _typeMap$
|
|
14046
|
-
if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
14047
|
-
|
|
14897
|
+
var _typeMap$type4;
|
|
14898
|
+
var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$1[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo];
|
|
14899
|
+
if (systemOrderNo) {
|
|
14900
|
+
var _value$typeMap$type$t, _typeMap$type5;
|
|
14901
|
+
if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) {
|
|
14902
|
+
var _typeMap$type6;
|
|
14903
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.key, getGoodDetails({
|
|
14904
|
+
mode: isStrict
|
|
14905
|
+
}))));
|
|
14048
14906
|
}
|
|
14049
14907
|
}
|
|
14050
14908
|
return;
|
|
14051
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.
|
|
14052
|
-
React.useEffect(function () {
|
|
14053
|
-
var _value$typeMap$type$t2, _typeMap$type8, _typeMap$type9;
|
|
14054
|
-
var typeName = value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0];
|
|
14055
|
-
var wdtSystemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.wdtSystemOrderNo];
|
|
14056
|
-
if (['1'].includes(typeName)) {
|
|
14057
|
-
wdtSystemOrderNo && getGoodItems(wdtSystemOrderNo);
|
|
14058
|
-
} else if (['2'].includes(typeName)) {
|
|
14059
|
-
var newValue = _objectSpread2({}, value);
|
|
14060
|
-
// newValue[`${typeMap?.[type]?.key}`] = [];
|
|
14061
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14062
|
-
}
|
|
14063
|
-
return;
|
|
14064
|
-
}, [value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]]);
|
|
14065
|
-
var getGoodItems = function getGoodItems(wdtSystemOrderNo) {
|
|
14066
|
-
var _value$typeMap$type$w, _typeMap$type11, _ref;
|
|
14067
|
-
var orders = value === null || value === void 0 ? void 0 : (_value$typeMap$type$w = value[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.wdtSystemOrder]) === null || _value$typeMap$type$w === void 0 ? void 0 : _value$typeMap$type$w.orders;
|
|
14068
|
-
var order = (_ref = orders || []) === null || _ref === void 0 ? void 0 : _ref.find(function (orderItem) {
|
|
14069
|
-
return orderItem.billNo === wdtSystemOrderNo;
|
|
14070
|
-
});
|
|
14071
|
-
if (order) {
|
|
14072
|
-
var _typeMap$type12, _order$goodDetails;
|
|
14073
|
-
var newValue = _objectSpread2({}, value);
|
|
14074
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key)] = order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.map(function (item) {
|
|
14075
|
-
var _typeMap$type13, _typeMap$type14;
|
|
14076
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.formatDefaultField.money)] = 0;
|
|
14077
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.formatDefaultField.share)] = 0;
|
|
14078
|
-
item.canUpdateNumber = true;
|
|
14079
|
-
return item;
|
|
14080
|
-
});
|
|
14081
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14082
|
-
}
|
|
14083
|
-
};
|
|
14909
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type7 = typeMap$1[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.systemOrderNo]]);
|
|
14084
14910
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
14085
|
-
var
|
|
14086
|
-
var _yield$request, success, data, _typeMap$type15, _typeMap$type16, orders, showOrderInfo;
|
|
14911
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
14087
14912
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
14088
14913
|
while (1) switch (_context.prev = _context.next) {
|
|
14089
14914
|
case 0:
|
|
14090
|
-
|
|
14091
|
-
|
|
14092
|
-
|
|
14093
|
-
|
|
14094
|
-
billNo
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
case 2:
|
|
14098
|
-
_yield$request = _context.sent;
|
|
14099
|
-
success = _yield$request.success;
|
|
14100
|
-
data = _yield$request.data;
|
|
14101
|
-
if (success) {
|
|
14102
|
-
orders = ((data === null || data === void 0 ? void 0 : data.trades) || []).map(function (item) {
|
|
14103
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
14104
|
-
billNo: item.tradeNo,
|
|
14105
|
-
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
14106
|
-
billTag: item.tagName
|
|
14107
|
-
});
|
|
14108
|
-
});
|
|
14109
|
-
showOrderInfo = data === null || data === void 0 ? void 0 : data.trades.map(function (item) {
|
|
14915
|
+
wdtUtils.getWdtOrderListSingleton(orderNo).then(function (data) {
|
|
14916
|
+
var _typeMap$type8, _typeMap$type9;
|
|
14917
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
14918
|
+
var showOrderInfo = orders.map(function (_ref2) {
|
|
14919
|
+
var billNo = _ref2.billNo,
|
|
14920
|
+
billType = _ref2.billType,
|
|
14921
|
+
billTag = _ref2.billTag;
|
|
14110
14922
|
return {
|
|
14111
|
-
billNo:
|
|
14112
|
-
billType:
|
|
14113
|
-
billTag:
|
|
14923
|
+
billNo: billNo,
|
|
14924
|
+
billType: billType,
|
|
14925
|
+
billTag: billTag
|
|
14114
14926
|
};
|
|
14115
14927
|
});
|
|
14116
|
-
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
14928
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type8 = typeMap$1[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, value[(_typeMap$type9 = typeMap$1[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]), {}, {
|
|
14117
14929
|
showOrderInfo: showOrderInfo,
|
|
14118
14930
|
orders: orders
|
|
14119
14931
|
}))));
|
|
14120
|
-
}
|
|
14121
|
-
case
|
|
14932
|
+
});
|
|
14933
|
+
case 1:
|
|
14122
14934
|
case "end":
|
|
14123
14935
|
return _context.stop();
|
|
14124
14936
|
}
|
|
14125
14937
|
}, _callee);
|
|
14126
14938
|
}));
|
|
14127
14939
|
return function getWdtOrderList(_x) {
|
|
14128
|
-
return
|
|
14940
|
+
return _ref.apply(this, arguments);
|
|
14129
14941
|
};
|
|
14130
14942
|
}();
|
|
14131
14943
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
14132
|
-
var _typeMap$
|
|
14944
|
+
var _value$typeMap$type$t2, _typeMap$type10, _typeMap$type11;
|
|
14945
|
+
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
14946
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type10 = typeMap$1[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) return;
|
|
14947
|
+
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
14133
14948
|
var newValue = _objectSpread2({}, value);
|
|
14134
|
-
newValue[
|
|
14135
|
-
|
|
14949
|
+
newValue[(_typeMap$type11 = typeMap$1[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
14950
|
+
if (typeName === '1') {
|
|
14951
|
+
var _typeMap$type12;
|
|
14952
|
+
newValue[(_typeMap$type12 = typeMap$1[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
14953
|
+
mode: isStrict
|
|
14954
|
+
});
|
|
14955
|
+
} else if (typeName === '2') {
|
|
14956
|
+
var _typeMap$type13;
|
|
14957
|
+
// 切换到非原单,清空列表
|
|
14958
|
+
newValue[(_typeMap$type13 = typeMap$1[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
14959
|
+
}
|
|
14136
14960
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14137
|
-
valueRef.current = newValue;
|
|
14138
|
-
// if (['2'].includes(val[0])) {
|
|
14139
|
-
// onChange?.(newValue);
|
|
14140
|
-
// valueRef.current = newValue;
|
|
14141
|
-
// }
|
|
14142
|
-
// pubsub.publish(`${typeMap?.[type]?.reissueType}`, {
|
|
14143
|
-
// val: val[0],
|
|
14144
|
-
// goodValue: newValue,
|
|
14145
|
-
// });
|
|
14146
14961
|
};
|
|
14147
|
-
|
|
14962
|
+
var handleModeChange = function handleModeChange(mode) {
|
|
14963
|
+
var _value$typeMap$type$t3, _typeMap$type14, _typeMap$type15;
|
|
14964
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type14 = typeMap$1[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0]) === '1';
|
|
14965
|
+
setIsStrict(mode);
|
|
14966
|
+
if (!isOriginalOrder) return;
|
|
14967
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type15 = typeMap$1[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.key, getGoodDetails({
|
|
14968
|
+
mode: mode
|
|
14969
|
+
}))));
|
|
14970
|
+
};
|
|
14971
|
+
var getGoodDetails = function getGoodDetails(_ref3) {
|
|
14972
|
+
var _typeMap$type16, _typeMap$type17, _order$goodDetails;
|
|
14973
|
+
var mode = _ref3.mode;
|
|
14974
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type16 = typeMap$1[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.systemOrder];
|
|
14975
|
+
var systemOrderNo = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$1[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo];
|
|
14976
|
+
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
14977
|
+
return order.tradeNo === systemOrderNo;
|
|
14978
|
+
});
|
|
14979
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$goodDetails = order.goodDetails) === null || _order$goodDetails === void 0 ? void 0 : _order$goodDetails.length) ? kmkfUtils.updateWdtGoodsHandle([order]) : [];
|
|
14980
|
+
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
14981
|
+
return mode ? goodDetails.filter(function (goodItem) {
|
|
14982
|
+
return !orderNo || goodItem.srcTid === orderNo;
|
|
14983
|
+
}) : goodDetails;
|
|
14984
|
+
};
|
|
14148
14985
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
14149
|
-
var _typeMap$
|
|
14986
|
+
var _typeMap$type18;
|
|
14150
14987
|
var newValue = _objectSpread2({}, value);
|
|
14151
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14152
|
-
var _typeMap$
|
|
14153
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14154
|
-
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14988
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type18 = typeMap$1[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.key)] = (val || []).map(function (item) {
|
|
14989
|
+
var _typeMap$type19, _typeMap$type20;
|
|
14990
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type19 = typeMap$1[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.formatDefaultField.money)] = 0;
|
|
14991
|
+
item["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type20 = typeMap$1[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.share)] = 0;
|
|
14155
14992
|
return item;
|
|
14156
14993
|
});
|
|
14157
14994
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14158
14995
|
};
|
|
14159
14996
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
14160
|
-
var _typeMap$
|
|
14997
|
+
var _typeMap$type21, _value$typeMap$type$t4, _typeMap$type22;
|
|
14161
14998
|
var newValue = _objectSpread2({}, value);
|
|
14162
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14163
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
14164
|
-
var _typeMap$
|
|
14165
|
-
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
14999
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type21 = typeMap$1[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.systemOrderNo)] = val;
|
|
15000
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0])) {
|
|
15001
|
+
var _typeMap$type23;
|
|
15002
|
+
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)] = [];
|
|
14166
15003
|
}
|
|
14167
15004
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
14168
15005
|
};
|
|
14169
15006
|
//显示选择商品按钮 原单换不显示选择商品
|
|
14170
15007
|
var showChangeBtn = React.useMemo(function () {
|
|
14171
|
-
var _typeMap$
|
|
14172
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
14173
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
15008
|
+
var _typeMap$type24;
|
|
15009
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
15010
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
14174
15011
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
14175
|
-
gutter: 8
|
|
15012
|
+
gutter: 8,
|
|
15013
|
+
wrap: true
|
|
14176
15014
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
14177
15015
|
className: "gutter-row",
|
|
14178
15016
|
xs: {
|
|
14179
15017
|
span: 11
|
|
14180
15018
|
},
|
|
14181
|
-
|
|
15019
|
+
sm: {
|
|
14182
15020
|
span: 6
|
|
14183
15021
|
}
|
|
14184
15022
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
@@ -14187,12 +15025,12 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14187
15025
|
},
|
|
14188
15026
|
disabled: disabled,
|
|
14189
15027
|
allowClear: false,
|
|
14190
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15028
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
|
|
14191
15029
|
onChange: function onChange(val) {
|
|
14192
15030
|
return changeSystemOrderHandle(val);
|
|
14193
15031
|
},
|
|
14194
15032
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
14195
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
15033
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
14196
15034
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
14197
15035
|
key: item.billNo,
|
|
14198
15036
|
value: item.billNo,
|
|
@@ -14203,7 +15041,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14203
15041
|
xs: {
|
|
14204
15042
|
span: 11
|
|
14205
15043
|
},
|
|
14206
|
-
|
|
15044
|
+
sm: {
|
|
14207
15045
|
span: 6
|
|
14208
15046
|
}
|
|
14209
15047
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
@@ -14213,7 +15051,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14213
15051
|
disabled: disabled,
|
|
14214
15052
|
allowClear: false,
|
|
14215
15053
|
options: reasonList,
|
|
14216
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15054
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
|
|
14217
15055
|
onChange: function onChange(val) {
|
|
14218
15056
|
return changeTypeHandle(val);
|
|
14219
15057
|
}
|
|
@@ -14225,10 +15063,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
14225
15063
|
canUpdateNumber: showChangeBtn,
|
|
14226
15064
|
showChangeBtn: showChangeBtn,
|
|
14227
15065
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
14228
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
15066
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
14229
15067
|
onChange: function onChange(val) {
|
|
14230
15068
|
return changeGoodHandle(val);
|
|
14231
|
-
}
|
|
15069
|
+
},
|
|
15070
|
+
onModeChange: handleModeChange,
|
|
15071
|
+
showModeBtn: showModeBtn,
|
|
15072
|
+
isStrict: isStrict
|
|
14232
15073
|
})));
|
|
14233
15074
|
};
|
|
14234
15075
|
|
|
@@ -14238,7 +15079,7 @@ styleInject(css_248z$a);
|
|
|
14238
15079
|
var TabPane$1 = antd.Tabs.TabPane;
|
|
14239
15080
|
var Option$2 = antd.Select.Option;
|
|
14240
15081
|
var Search$1 = antd.Input.Search;
|
|
14241
|
-
var GoodsModal$
|
|
15082
|
+
var GoodsModal$5 = function GoodsModal(props) {
|
|
14242
15083
|
var onSubmit = props.onSubmit,
|
|
14243
15084
|
_onCancel = props.onCancel,
|
|
14244
15085
|
visible = props.visible,
|
|
@@ -14689,7 +15530,7 @@ var Goods$1 = function Goods(props, ref) {
|
|
|
14689
15530
|
};
|
|
14690
15531
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14691
15532
|
className: "goodsBox"
|
|
14692
|
-
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$
|
|
15533
|
+
}, /*#__PURE__*/React__default['default'].createElement(GoodsModal$5, {
|
|
14693
15534
|
visible: visible,
|
|
14694
15535
|
onSubmit: onSubmit,
|
|
14695
15536
|
type: type,
|
|
@@ -14919,7 +15760,10 @@ var msgTypeCh = {
|
|
|
14919
15760
|
ding: '钉钉',
|
|
14920
15761
|
wechat: '微信',
|
|
14921
15762
|
qq: 'QQ',
|
|
14922
|
-
qywx: '企业微信'
|
|
15763
|
+
qywx: '企业微信',
|
|
15764
|
+
YZDKH: '邮政拦截',
|
|
15765
|
+
YT: '圆通拦截',
|
|
15766
|
+
feishu: '飞书'
|
|
14923
15767
|
};
|
|
14924
15768
|
var MsgStatus = function MsgStatus(props) {
|
|
14925
15769
|
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3;
|