@kmkf-fe-packages/basic-components 2.0.54-beta.10 → 2.0.54-beta.100
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 +2164 -729
- package/dist/index.js +2163 -725
- package/dist/src/apaas/ApaasAddress/index.d.ts +1 -1
- package/dist/src/bs/common/index.d.ts +3 -0
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +1 -1
- package/dist/src/bs/component/GoodItem/constants/index.d.ts +5 -0
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +2 -2
- package/dist/src/bs/component/model/Columns/Erp/km.d.ts +27 -0
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +2 -10
- package/dist/src/bs/component/model/KmGoodsModal/GoodsList.d.ts +25 -0
- package/dist/src/bs/component/model/KmGoodsModal/index.d.ts +5 -0
- package/dist/src/bs/component/model/type.d.ts +9 -0
- package/dist/src/common/AsyncSelect/index.d.ts +9 -0
- package/dist/src/common/CommonSystemOrder/index.d.ts +2 -1
- package/dist/src/common/Goods/RichItem.d.ts +3 -0
- package/dist/src/common/Goods/goodModel.d.ts +3 -0
- package/dist/src/common/IdentifyAddress/index.d.ts +1 -1
- package/dist/src/constants/columnsBaseInfoMap.d.ts +1 -1
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/km.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/km/KmVideo/index.d.ts +20 -0
- package/dist/src/wln/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
|
|
75
|
+
return exports;
|
|
76
76
|
};
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
t[e] = r.value;
|
|
77
|
+
var exports = {},
|
|
78
|
+
Op = Object.prototype,
|
|
79
|
+
hasOwn = Op.hasOwnProperty,
|
|
80
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
81
|
+
obj[key] = desc.value;
|
|
83
82
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
function define(
|
|
89
|
-
return Object.defineProperty(
|
|
90
|
-
value:
|
|
83
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
84
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
85
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
86
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
87
|
+
function define(obj, key, value) {
|
|
88
|
+
return Object.defineProperty(obj, key, {
|
|
89
|
+
value: value,
|
|
91
90
|
enumerable: !0,
|
|
92
91
|
configurable: !0,
|
|
93
92
|
writable: !0
|
|
94
|
-
}),
|
|
93
|
+
}), obj[key];
|
|
95
94
|
}
|
|
96
95
|
try {
|
|
97
96
|
define({}, "");
|
|
98
|
-
} catch (
|
|
99
|
-
define = function (
|
|
100
|
-
return
|
|
97
|
+
} catch (err) {
|
|
98
|
+
define = function (obj, key, value) {
|
|
99
|
+
return obj[key] = value;
|
|
101
100
|
};
|
|
102
101
|
}
|
|
103
|
-
function wrap(
|
|
104
|
-
var
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
return
|
|
108
|
-
value: makeInvokeMethod(
|
|
109
|
-
}),
|
|
102
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
103
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
104
|
+
generator = Object.create(protoGenerator.prototype),
|
|
105
|
+
context = new Context(tryLocsList || []);
|
|
106
|
+
return defineProperty(generator, "_invoke", {
|
|
107
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
108
|
+
}), generator;
|
|
110
109
|
}
|
|
111
|
-
function tryCatch(
|
|
110
|
+
function tryCatch(fn, obj, arg) {
|
|
112
111
|
try {
|
|
113
112
|
return {
|
|
114
113
|
type: "normal",
|
|
115
|
-
arg:
|
|
114
|
+
arg: fn.call(obj, arg)
|
|
116
115
|
};
|
|
117
|
-
} catch (
|
|
116
|
+
} catch (err) {
|
|
118
117
|
return {
|
|
119
118
|
type: "throw",
|
|
120
|
-
arg:
|
|
119
|
+
arg: err
|
|
121
120
|
};
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
|
-
|
|
125
|
-
var
|
|
126
|
-
l = "suspendedYield",
|
|
127
|
-
f = "executing",
|
|
128
|
-
s = "completed",
|
|
129
|
-
y = {};
|
|
123
|
+
exports.wrap = wrap;
|
|
124
|
+
var ContinueSentinel = {};
|
|
130
125
|
function Generator() {}
|
|
131
126
|
function GeneratorFunction() {}
|
|
132
127
|
function GeneratorFunctionPrototype() {}
|
|
133
|
-
var
|
|
134
|
-
define(
|
|
128
|
+
var IteratorPrototype = {};
|
|
129
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
135
130
|
return this;
|
|
136
131
|
});
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
var
|
|
141
|
-
function defineIteratorMethods(
|
|
142
|
-
["next", "throw", "return"].forEach(function (
|
|
143
|
-
define(
|
|
144
|
-
return this._invoke(
|
|
132
|
+
var getProto = Object.getPrototypeOf,
|
|
133
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
134
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
135
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
136
|
+
function defineIteratorMethods(prototype) {
|
|
137
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
138
|
+
define(prototype, method, function (arg) {
|
|
139
|
+
return this._invoke(method, arg);
|
|
145
140
|
});
|
|
146
141
|
});
|
|
147
142
|
}
|
|
148
|
-
function AsyncIterator(
|
|
149
|
-
function invoke(
|
|
150
|
-
var
|
|
151
|
-
if ("throw" !==
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
return
|
|
155
|
-
invoke("next",
|
|
156
|
-
}, function (
|
|
157
|
-
invoke("throw",
|
|
158
|
-
}) :
|
|
159
|
-
|
|
160
|
-
}, function (
|
|
161
|
-
return invoke("throw",
|
|
143
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
144
|
+
function invoke(method, arg, resolve, reject) {
|
|
145
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
146
|
+
if ("throw" !== record.type) {
|
|
147
|
+
var result = record.arg,
|
|
148
|
+
value = result.value;
|
|
149
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
150
|
+
invoke("next", value, resolve, reject);
|
|
151
|
+
}, function (err) {
|
|
152
|
+
invoke("throw", err, resolve, reject);
|
|
153
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
154
|
+
result.value = unwrapped, resolve(result);
|
|
155
|
+
}, function (error) {
|
|
156
|
+
return invoke("throw", error, resolve, reject);
|
|
162
157
|
});
|
|
163
158
|
}
|
|
164
|
-
|
|
159
|
+
reject(record.arg);
|
|
165
160
|
}
|
|
166
|
-
var
|
|
167
|
-
|
|
168
|
-
value: function (
|
|
161
|
+
var previousPromise;
|
|
162
|
+
defineProperty(this, "_invoke", {
|
|
163
|
+
value: function (method, arg) {
|
|
169
164
|
function callInvokeWithMethodAndArg() {
|
|
170
|
-
return new
|
|
171
|
-
invoke(
|
|
165
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
166
|
+
invoke(method, arg, resolve, reject);
|
|
172
167
|
});
|
|
173
168
|
}
|
|
174
|
-
return
|
|
169
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
175
170
|
}
|
|
176
171
|
});
|
|
177
172
|
}
|
|
178
|
-
function makeInvokeMethod(
|
|
179
|
-
var
|
|
180
|
-
return function (
|
|
181
|
-
if (
|
|
182
|
-
if (
|
|
183
|
-
if ("throw" ===
|
|
184
|
-
return
|
|
185
|
-
value: t,
|
|
186
|
-
done: !0
|
|
187
|
-
};
|
|
173
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
174
|
+
var state = "suspendedStart";
|
|
175
|
+
return function (method, arg) {
|
|
176
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
177
|
+
if ("completed" === state) {
|
|
178
|
+
if ("throw" === method) throw arg;
|
|
179
|
+
return doneResult();
|
|
188
180
|
}
|
|
189
|
-
for (
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
var
|
|
193
|
-
if (
|
|
194
|
-
if (
|
|
195
|
-
return
|
|
181
|
+
for (context.method = method, context.arg = arg;;) {
|
|
182
|
+
var delegate = context.delegate;
|
|
183
|
+
if (delegate) {
|
|
184
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
185
|
+
if (delegateResult) {
|
|
186
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
187
|
+
return delegateResult;
|
|
196
188
|
}
|
|
197
189
|
}
|
|
198
|
-
if ("next" ===
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
} else "return" ===
|
|
202
|
-
|
|
203
|
-
var
|
|
204
|
-
if ("normal" ===
|
|
205
|
-
if (
|
|
190
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
191
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
192
|
+
context.dispatchException(context.arg);
|
|
193
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
194
|
+
state = "executing";
|
|
195
|
+
var record = tryCatch(innerFn, self, context);
|
|
196
|
+
if ("normal" === record.type) {
|
|
197
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
206
198
|
return {
|
|
207
|
-
value:
|
|
208
|
-
done:
|
|
199
|
+
value: record.arg,
|
|
200
|
+
done: context.done
|
|
209
201
|
};
|
|
210
202
|
}
|
|
211
|
-
"throw" ===
|
|
203
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
212
204
|
}
|
|
213
205
|
};
|
|
214
206
|
}
|
|
215
|
-
function maybeInvokeDelegate(
|
|
216
|
-
var
|
|
217
|
-
|
|
218
|
-
if (
|
|
219
|
-
var
|
|
220
|
-
if ("throw" ===
|
|
221
|
-
var
|
|
222
|
-
return
|
|
207
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
208
|
+
var methodName = context.method,
|
|
209
|
+
method = delegate.iterator[methodName];
|
|
210
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
211
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
212
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
213
|
+
var info = record.arg;
|
|
214
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
223
215
|
}
|
|
224
|
-
function pushTryEntry(
|
|
225
|
-
var
|
|
226
|
-
tryLoc:
|
|
216
|
+
function pushTryEntry(locs) {
|
|
217
|
+
var entry = {
|
|
218
|
+
tryLoc: locs[0]
|
|
227
219
|
};
|
|
228
|
-
1 in
|
|
220
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
229
221
|
}
|
|
230
|
-
function resetTryEntry(
|
|
231
|
-
var
|
|
232
|
-
|
|
222
|
+
function resetTryEntry(entry) {
|
|
223
|
+
var record = entry.completion || {};
|
|
224
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
233
225
|
}
|
|
234
|
-
function Context(
|
|
226
|
+
function Context(tryLocsList) {
|
|
235
227
|
this.tryEntries = [{
|
|
236
228
|
tryLoc: "root"
|
|
237
|
-
}],
|
|
229
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
238
230
|
}
|
|
239
|
-
function values(
|
|
240
|
-
if (
|
|
241
|
-
var
|
|
242
|
-
if (
|
|
243
|
-
if ("function" == typeof
|
|
244
|
-
if (!isNaN(
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
for (; ++
|
|
248
|
-
return next.value =
|
|
231
|
+
function values(iterable) {
|
|
232
|
+
if (iterable) {
|
|
233
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
234
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
235
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
236
|
+
if (!isNaN(iterable.length)) {
|
|
237
|
+
var i = -1,
|
|
238
|
+
next = function next() {
|
|
239
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
240
|
+
return next.value = undefined, next.done = !0, next;
|
|
249
241
|
};
|
|
250
|
-
return
|
|
242
|
+
return next.next = next;
|
|
251
243
|
}
|
|
252
244
|
}
|
|
253
|
-
|
|
245
|
+
return {
|
|
246
|
+
next: doneResult
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function doneResult() {
|
|
250
|
+
return {
|
|
251
|
+
value: undefined,
|
|
252
|
+
done: !0
|
|
253
|
+
};
|
|
254
254
|
}
|
|
255
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
255
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
256
256
|
value: GeneratorFunctionPrototype,
|
|
257
257
|
configurable: !0
|
|
258
|
-
}),
|
|
258
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
259
259
|
value: GeneratorFunction,
|
|
260
260
|
configurable: !0
|
|
261
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
262
|
-
var
|
|
263
|
-
return !!
|
|
264
|
-
},
|
|
265
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
266
|
-
},
|
|
261
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
262
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
263
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
264
|
+
}, exports.mark = function (genFun) {
|
|
265
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
266
|
+
}, exports.awrap = function (arg) {
|
|
267
267
|
return {
|
|
268
|
-
__await:
|
|
268
|
+
__await: arg
|
|
269
269
|
};
|
|
270
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
270
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
271
271
|
return this;
|
|
272
|
-
}),
|
|
273
|
-
void 0 ===
|
|
274
|
-
var
|
|
275
|
-
return
|
|
276
|
-
return
|
|
272
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
273
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
274
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
275
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
276
|
+
return result.done ? result.value : iter.next();
|
|
277
277
|
});
|
|
278
|
-
}, defineIteratorMethods(
|
|
278
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
279
279
|
return this;
|
|
280
|
-
}), define(
|
|
280
|
+
}), define(Gp, "toString", function () {
|
|
281
281
|
return "[object Generator]";
|
|
282
|
-
}),
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
for (var
|
|
286
|
-
return
|
|
287
|
-
for (;
|
|
288
|
-
var
|
|
289
|
-
if (
|
|
282
|
+
}), exports.keys = function (val) {
|
|
283
|
+
var object = Object(val),
|
|
284
|
+
keys = [];
|
|
285
|
+
for (var key in object) keys.push(key);
|
|
286
|
+
return keys.reverse(), function next() {
|
|
287
|
+
for (; keys.length;) {
|
|
288
|
+
var key = keys.pop();
|
|
289
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
290
290
|
}
|
|
291
291
|
return next.done = !0, next;
|
|
292
292
|
};
|
|
293
|
-
},
|
|
293
|
+
}, exports.values = values, Context.prototype = {
|
|
294
294
|
constructor: Context,
|
|
295
|
-
reset: function (
|
|
296
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
295
|
+
reset: function (skipTempReset) {
|
|
296
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
297
297
|
},
|
|
298
298
|
stop: function () {
|
|
299
299
|
this.done = !0;
|
|
300
|
-
var
|
|
301
|
-
if ("throw" ===
|
|
300
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
301
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
302
302
|
return this.rval;
|
|
303
303
|
},
|
|
304
|
-
dispatchException: function (
|
|
305
|
-
if (this.done) throw
|
|
306
|
-
var
|
|
307
|
-
function handle(
|
|
308
|
-
return
|
|
304
|
+
dispatchException: function (exception) {
|
|
305
|
+
if (this.done) throw exception;
|
|
306
|
+
var context = this;
|
|
307
|
+
function handle(loc, caught) {
|
|
308
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
309
309
|
}
|
|
310
|
-
for (var
|
|
311
|
-
var
|
|
312
|
-
|
|
313
|
-
if ("root" ===
|
|
314
|
-
if (
|
|
315
|
-
var
|
|
316
|
-
|
|
317
|
-
if (
|
|
318
|
-
if (this.prev <
|
|
319
|
-
if (this.prev <
|
|
320
|
-
} else if (
|
|
321
|
-
if (this.prev <
|
|
310
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
311
|
+
var entry = this.tryEntries[i],
|
|
312
|
+
record = entry.completion;
|
|
313
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
314
|
+
if (entry.tryLoc <= this.prev) {
|
|
315
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
316
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
317
|
+
if (hasCatch && hasFinally) {
|
|
318
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
319
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
320
|
+
} else if (hasCatch) {
|
|
321
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
322
322
|
} else {
|
|
323
|
-
if (!
|
|
324
|
-
if (this.prev <
|
|
323
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
324
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
|
-
abrupt: function (
|
|
330
|
-
for (var
|
|
331
|
-
var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
329
|
+
abrupt: function (type, arg) {
|
|
330
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
331
|
+
var entry = this.tryEntries[i];
|
|
332
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
333
|
+
var finallyEntry = entry;
|
|
334
334
|
break;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
|
|
338
|
-
var
|
|
339
|
-
return
|
|
337
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
338
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
339
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
340
340
|
},
|
|
341
|
-
complete: function (
|
|
342
|
-
if ("throw" ===
|
|
343
|
-
return "break" ===
|
|
341
|
+
complete: function (record, afterLoc) {
|
|
342
|
+
if ("throw" === record.type) throw record.arg;
|
|
343
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
344
344
|
},
|
|
345
|
-
finish: function (
|
|
346
|
-
for (var
|
|
347
|
-
var
|
|
348
|
-
if (
|
|
345
|
+
finish: function (finallyLoc) {
|
|
346
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
347
|
+
var entry = this.tryEntries[i];
|
|
348
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
349
349
|
}
|
|
350
350
|
},
|
|
351
|
-
catch: function (
|
|
352
|
-
for (var
|
|
353
|
-
var
|
|
354
|
-
if (
|
|
355
|
-
var
|
|
356
|
-
if ("throw" ===
|
|
357
|
-
var
|
|
358
|
-
resetTryEntry(
|
|
351
|
+
catch: function (tryLoc) {
|
|
352
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
353
|
+
var entry = this.tryEntries[i];
|
|
354
|
+
if (entry.tryLoc === tryLoc) {
|
|
355
|
+
var record = entry.completion;
|
|
356
|
+
if ("throw" === record.type) {
|
|
357
|
+
var thrown = record.arg;
|
|
358
|
+
resetTryEntry(entry);
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return thrown;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
throw new Error("illegal catch attempt");
|
|
364
364
|
},
|
|
365
|
-
delegateYield: function (
|
|
365
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
366
366
|
return this.delegate = {
|
|
367
|
-
iterator: values(
|
|
368
|
-
resultName:
|
|
369
|
-
nextLoc:
|
|
370
|
-
}, "next" === this.method && (this.arg =
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
}
|
|
374
|
-
function _toPrimitive(t, r) {
|
|
375
|
-
if ("object" != typeof t || !t) return t;
|
|
376
|
-
var e = t[Symbol.toPrimitive];
|
|
377
|
-
if (void 0 !== e) {
|
|
378
|
-
var i = e.call(t, r || "default");
|
|
379
|
-
if ("object" != typeof i) return i;
|
|
380
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
381
|
-
}
|
|
382
|
-
return ("string" === r ? String : Number)(t);
|
|
383
|
-
}
|
|
384
|
-
function _toPropertyKey(t) {
|
|
385
|
-
var i = _toPrimitive(t, "string");
|
|
386
|
-
return "symbol" == typeof i ? i : String(i);
|
|
367
|
+
iterator: values(iterable),
|
|
368
|
+
resultName: resultName,
|
|
369
|
+
nextLoc: nextLoc
|
|
370
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
371
|
+
}
|
|
372
|
+
}, exports;
|
|
387
373
|
}
|
|
388
|
-
function _typeof(
|
|
374
|
+
function _typeof(obj) {
|
|
389
375
|
"@babel/helpers - typeof";
|
|
390
376
|
|
|
391
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
392
|
-
return typeof
|
|
393
|
-
} : function (
|
|
394
|
-
return
|
|
395
|
-
}, _typeof(
|
|
377
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
378
|
+
return typeof obj;
|
|
379
|
+
} : function (obj) {
|
|
380
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
381
|
+
}, _typeof(obj);
|
|
396
382
|
}
|
|
397
383
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
398
384
|
try {
|
|
@@ -550,6 +536,20 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
550
536
|
}
|
|
551
537
|
};
|
|
552
538
|
}
|
|
539
|
+
function _toPrimitive(input, hint) {
|
|
540
|
+
if (typeof input !== "object" || input === null) return input;
|
|
541
|
+
var prim = input[Symbol.toPrimitive];
|
|
542
|
+
if (prim !== undefined) {
|
|
543
|
+
var res = prim.call(input, hint || "default");
|
|
544
|
+
if (typeof res !== "object") return res;
|
|
545
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
546
|
+
}
|
|
547
|
+
return (hint === "string" ? String : Number)(input);
|
|
548
|
+
}
|
|
549
|
+
function _toPropertyKey(arg) {
|
|
550
|
+
var key = _toPrimitive(arg, "string");
|
|
551
|
+
return typeof key === "symbol" ? key : String(key);
|
|
552
|
+
}
|
|
553
553
|
|
|
554
554
|
function ApaasCascader(props) {
|
|
555
555
|
return /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
|
|
@@ -7734,7 +7734,8 @@ var Province = function Province(props) {
|
|
|
7734
7734
|
workOrder: kmkfUtils.AddressData.getInstance(),
|
|
7735
7735
|
bs: kmkfUtils.BsAddressData.getInstance(),
|
|
7736
7736
|
wdt: kmkfUtils.WdtAddressData.getInstance(),
|
|
7737
|
-
gy: kmkfUtils.GyAddressData.getInstance()
|
|
7737
|
+
gy: kmkfUtils.GyAddressData.getInstance(),
|
|
7738
|
+
km: kmkfUtils.AddressData.getInstance()
|
|
7738
7739
|
};
|
|
7739
7740
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7740
7741
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7748,8 +7749,7 @@ var Province = function Province(props) {
|
|
|
7748
7749
|
var TextArea$1 = antd.Input.TextArea;
|
|
7749
7750
|
var ParseLogistics = function ParseLogistics(props) {
|
|
7750
7751
|
var onChange = props.onChange,
|
|
7751
|
-
_props$selfCalibratio = props.selfCalibration
|
|
7752
|
-
selfCalibration = _props$selfCalibratio === void 0 ? false : _props$selfCalibratio;
|
|
7752
|
+
_props$selfCalibratio = props.selfCalibration;
|
|
7753
7753
|
var _useState = React.useState(''),
|
|
7754
7754
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7755
7755
|
value = _useState2[0],
|
|
@@ -7758,29 +7758,70 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7758
7758
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
7759
7759
|
isCopy = _useState4[0],
|
|
7760
7760
|
setIsCopy = _useState4[1];
|
|
7761
|
-
var
|
|
7761
|
+
var _useState5 = React.useState(false),
|
|
7762
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7763
|
+
loading = _useState6[0],
|
|
7764
|
+
setLoading = _useState6[1];
|
|
7765
|
+
var _useState7 = React.useState(false),
|
|
7766
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7767
|
+
aiLoading = _useState8[0],
|
|
7768
|
+
setAiLoading = _useState8[1];
|
|
7769
|
+
var handleIdentify = function handleIdentify() {
|
|
7770
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7762
7771
|
if (!value && !val) {
|
|
7763
7772
|
return;
|
|
7764
7773
|
}
|
|
7774
|
+
setLoading(true);
|
|
7765
7775
|
var fullAddress = value || val;
|
|
7766
|
-
|
|
7776
|
+
// const needCalibration = selfCalibration && !/1\d{10}/.test(fullAddress);
|
|
7767
7777
|
setIsCopy(false);
|
|
7768
7778
|
kmkfUtils.request({
|
|
7769
7779
|
url: '/qy/logistics/addressAnalysis',
|
|
7770
7780
|
method: 'post',
|
|
7771
7781
|
data: {
|
|
7772
|
-
fullAddress:
|
|
7782
|
+
fullAddress: fullAddress
|
|
7783
|
+
// fullAddress: needCalibration
|
|
7784
|
+
// ? `${fullAddress} 张三 18888888888`
|
|
7785
|
+
// : fullAddress,
|
|
7773
7786
|
}
|
|
7774
7787
|
}).then(function (res) {
|
|
7775
7788
|
var data = res.data;
|
|
7776
7789
|
// 如果是通过内部校准添加的姓名和手机号,则去除
|
|
7777
|
-
if (needCalibration) {
|
|
7778
|
-
|
|
7779
|
-
|
|
7790
|
+
// if (needCalibration) {
|
|
7791
|
+
// data.name = '';
|
|
7792
|
+
// data.phone = '';
|
|
7793
|
+
// }
|
|
7794
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7795
|
+
}).catch(function (e) {
|
|
7796
|
+
handleAIIdentify(fullAddress);
|
|
7797
|
+
console.log(e);
|
|
7798
|
+
}).finally(function () {
|
|
7799
|
+
setLoading(false);
|
|
7800
|
+
});
|
|
7801
|
+
};
|
|
7802
|
+
var handleAIIdentify = function handleAIIdentify() {
|
|
7803
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7804
|
+
if (!value && !val) {
|
|
7805
|
+
return;
|
|
7806
|
+
}
|
|
7807
|
+
setAiLoading(true);
|
|
7808
|
+
var fullAddress = value || val;
|
|
7809
|
+
setIsCopy(false);
|
|
7810
|
+
kmkfUtils.request({
|
|
7811
|
+
url: '/qy/logistics/addressAnalysis',
|
|
7812
|
+
method: 'post',
|
|
7813
|
+
data: {
|
|
7814
|
+
fullAddress: fullAddress,
|
|
7815
|
+
isAiParse: true
|
|
7780
7816
|
}
|
|
7817
|
+
}).then(function (res) {
|
|
7818
|
+
var data = res.data;
|
|
7781
7819
|
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7782
7820
|
}).catch(function (e) {
|
|
7783
7821
|
console.log(e);
|
|
7822
|
+
antd.message.error('识别失败,请输入正确的信息');
|
|
7823
|
+
}).finally(function () {
|
|
7824
|
+
setAiLoading(false);
|
|
7784
7825
|
});
|
|
7785
7826
|
};
|
|
7786
7827
|
var _onKeyDown = function onKeyDown(e) {
|
|
@@ -7807,10 +7848,18 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7807
7848
|
}), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7808
7849
|
size: "small",
|
|
7809
7850
|
type: "primary",
|
|
7851
|
+
loading: loading,
|
|
7852
|
+
onClick: function onClick() {
|
|
7853
|
+
return handleIdentify();
|
|
7854
|
+
}
|
|
7855
|
+
}, "\u4E00\u952E\u8BC6\u522B"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7856
|
+
size: "small",
|
|
7857
|
+
type: "primary",
|
|
7858
|
+
loading: aiLoading,
|
|
7810
7859
|
onClick: function onClick() {
|
|
7811
|
-
return
|
|
7860
|
+
return handleAIIdentify();
|
|
7812
7861
|
}
|
|
7813
|
-
}, "\
|
|
7862
|
+
}, "AI\u8BC6\u522B"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7814
7863
|
size: "small",
|
|
7815
7864
|
onClick: function onClick() {
|
|
7816
7865
|
return setValue('');
|
|
@@ -7840,6 +7889,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7840
7889
|
bs: kmkfUtils.BsAddressData,
|
|
7841
7890
|
wdt: kmkfUtils.WdtAddressData,
|
|
7842
7891
|
gy: kmkfUtils.GyAddressData,
|
|
7892
|
+
km: kmkfUtils.AddressData,
|
|
7843
7893
|
workOrder: kmkfUtils.AddressData
|
|
7844
7894
|
}[type] || kmkfUtils.AddressData).getInstance();
|
|
7845
7895
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
@@ -8143,17 +8193,16 @@ var SubForm = function SubForm(props) {
|
|
|
8143
8193
|
return [{
|
|
8144
8194
|
dataIndex: 'index',
|
|
8145
8195
|
title: '序号',
|
|
8196
|
+
fixed: 'left',
|
|
8197
|
+
width: 20,
|
|
8146
8198
|
render: function render(val, record, index) {
|
|
8147
|
-
return
|
|
8148
|
-
style: {
|
|
8149
|
-
width: 25
|
|
8150
|
-
}
|
|
8151
|
-
}, index + 1);
|
|
8199
|
+
return index + 1;
|
|
8152
8200
|
}
|
|
8153
8201
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8154
8202
|
return {
|
|
8155
8203
|
dataIndex: t.key,
|
|
8156
|
-
title: t.name
|
|
8204
|
+
title: t.name,
|
|
8205
|
+
width: 90
|
|
8157
8206
|
};
|
|
8158
8207
|
})));
|
|
8159
8208
|
}, [newTableHeader]);
|
|
@@ -8341,7 +8390,7 @@ var SubForm = function SubForm(props) {
|
|
|
8341
8390
|
onScrollCapture: onScrollCapture,
|
|
8342
8391
|
style: {
|
|
8343
8392
|
height: 320,
|
|
8344
|
-
maxWidth: platform !== 'pc' ? '325px' : '
|
|
8393
|
+
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8345
8394
|
overflowY: 'scroll',
|
|
8346
8395
|
overflowX: 'auto'
|
|
8347
8396
|
}
|
|
@@ -8352,7 +8401,7 @@ var SubForm = function SubForm(props) {
|
|
|
8352
8401
|
size: "small",
|
|
8353
8402
|
pagination: false,
|
|
8354
8403
|
scroll: {
|
|
8355
|
-
x: '
|
|
8404
|
+
x: 'max-content'
|
|
8356
8405
|
},
|
|
8357
8406
|
locale: {
|
|
8358
8407
|
emptyText: '暂无数据'
|
|
@@ -8725,7 +8774,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8725
8774
|
changeSku = props.changeSku,
|
|
8726
8775
|
width = props.width,
|
|
8727
8776
|
_props$numIidType = props.numIidType,
|
|
8728
|
-
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType
|
|
8777
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
|
|
8778
|
+
form = props.form,
|
|
8779
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
8729
8780
|
var _useState = React.useState([]),
|
|
8730
8781
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8731
8782
|
selectList = _useState2[0],
|
|
@@ -8738,10 +8789,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8738
8789
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8739
8790
|
goodList = _useState6[0],
|
|
8740
8791
|
setGoodList = _useState6[1];
|
|
8741
|
-
var _useState7 = React.useState(
|
|
8792
|
+
var _useState7 = React.useState([]),
|
|
8742
8793
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
8743
|
-
|
|
8744
|
-
|
|
8794
|
+
orderNoItems = _useState8[0],
|
|
8795
|
+
setOrderNoItems = _useState8[1];
|
|
8796
|
+
var _useState9 = React.useState(false),
|
|
8797
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8798
|
+
loading = _useState10[0],
|
|
8799
|
+
setLoading = _useState10[1];
|
|
8745
8800
|
var transformIdType = function transformIdType(id) {
|
|
8746
8801
|
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
8747
8802
|
return numIidType === 'string' ? id + '' : +id;
|
|
@@ -8761,7 +8816,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8761
8816
|
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8762
8817
|
return setGoodList(list.map(transformType));
|
|
8763
8818
|
};
|
|
8764
|
-
var
|
|
8819
|
+
var _useState11 = React.useState({
|
|
8765
8820
|
apiName: 'queryItems',
|
|
8766
8821
|
desc: true,
|
|
8767
8822
|
numIids: '',
|
|
@@ -8773,30 +8828,30 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8773
8828
|
cids: '',
|
|
8774
8829
|
title: ''
|
|
8775
8830
|
}),
|
|
8776
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8777
|
-
searchParams = _useState10[0],
|
|
8778
|
-
setSearch = _useState10[1];
|
|
8779
|
-
var _useState11 = React.useState(0),
|
|
8780
8831
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
var _useState13 = React.useState(
|
|
8832
|
+
searchParams = _useState12[0],
|
|
8833
|
+
setSearch = _useState12[1];
|
|
8834
|
+
var _useState13 = React.useState(0),
|
|
8784
8835
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
var _useState15 = React.useState(
|
|
8836
|
+
total = _useState14[0],
|
|
8837
|
+
setTotal = _useState14[1];
|
|
8838
|
+
var _useState15 = React.useState(''),
|
|
8788
8839
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
var _useState17 = React.useState(
|
|
8840
|
+
platform = _useState16[0],
|
|
8841
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
8842
|
+
var _useState17 = React.useState({}),
|
|
8792
8843
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
var _useState19 = React.useState(
|
|
8844
|
+
shopInfo = _useState18[0],
|
|
8845
|
+
setShopInfo = _useState18[1]; //店铺信息
|
|
8846
|
+
var _useState19 = React.useState(true),
|
|
8796
8847
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
var _useState21 = React.useState([
|
|
8848
|
+
canSearch = _useState20[0],
|
|
8849
|
+
setCanSearch = _useState20[1];
|
|
8850
|
+
var _useState21 = React.useState([null]),
|
|
8851
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8852
|
+
nextKeyList = _useState22[0],
|
|
8853
|
+
setNextKeyList = _useState22[1];
|
|
8854
|
+
var _useState23 = React.useState([{
|
|
8800
8855
|
tab: '出售中',
|
|
8801
8856
|
key: 'onSale'
|
|
8802
8857
|
}, {
|
|
@@ -8806,10 +8861,10 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8806
8861
|
tab: '已选择',
|
|
8807
8862
|
key: 'select'
|
|
8808
8863
|
}]),
|
|
8809
|
-
|
|
8810
|
-
tabs =
|
|
8811
|
-
setTabs =
|
|
8812
|
-
var
|
|
8864
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
8865
|
+
tabs = _useState24[0],
|
|
8866
|
+
setTabs = _useState24[1];
|
|
8867
|
+
var _useState25 = React.useState([{
|
|
8813
8868
|
name: '上架时间',
|
|
8814
8869
|
value: 'list_time'
|
|
8815
8870
|
}, {
|
|
@@ -8819,13 +8874,13 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8819
8874
|
name: '按价格',
|
|
8820
8875
|
value: 'price'
|
|
8821
8876
|
}]),
|
|
8822
|
-
|
|
8823
|
-
goodSort =
|
|
8877
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
8878
|
+
goodSort = _useState26[0];
|
|
8824
8879
|
//宝贝分类
|
|
8825
|
-
var
|
|
8826
|
-
|
|
8827
|
-
shell =
|
|
8828
|
-
setShell =
|
|
8880
|
+
var _useState27 = React.useState([]),
|
|
8881
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
8882
|
+
shell = _useState28[0],
|
|
8883
|
+
setShell = _useState28[1];
|
|
8829
8884
|
var clickOrder = function clickOrder(sort) {
|
|
8830
8885
|
if (sort.value === searchParams.orderBy) {
|
|
8831
8886
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9098,8 +9153,112 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9098
9153
|
}
|
|
9099
9154
|
}, [platform]);
|
|
9100
9155
|
React.useEffect(function () {
|
|
9101
|
-
platform && canSearch
|
|
9156
|
+
if (platform && canSearch) {
|
|
9157
|
+
if (searchParams.type === 'orderProduct') {
|
|
9158
|
+
getOrderProductItem(searchParams);
|
|
9159
|
+
} else {
|
|
9160
|
+
getItem(searchParams, platform);
|
|
9161
|
+
}
|
|
9162
|
+
}
|
|
9102
9163
|
}, [searchParams, platform]);
|
|
9164
|
+
React.useEffect(function () {
|
|
9165
|
+
if (visible && platform !== 'fxg') {
|
|
9166
|
+
var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9167
|
+
var orderNo = val['m3ap1EvEyd'];
|
|
9168
|
+
if (orderNo) {
|
|
9169
|
+
setTabs(function (prev) {
|
|
9170
|
+
return lodash.uniqBy([{
|
|
9171
|
+
tab: '订单商品',
|
|
9172
|
+
key: 'orderProduct'
|
|
9173
|
+
}].concat(_toConsumableArray(prev)), 'key');
|
|
9174
|
+
});
|
|
9175
|
+
if (isPriorityDisplayOfOrderNo) {
|
|
9176
|
+
setSearch(function (prev) {
|
|
9177
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
9178
|
+
type: 'orderProduct'
|
|
9179
|
+
});
|
|
9180
|
+
});
|
|
9181
|
+
}
|
|
9182
|
+
}
|
|
9183
|
+
}
|
|
9184
|
+
if (!visible) {
|
|
9185
|
+
setOrderNoItems([]);
|
|
9186
|
+
}
|
|
9187
|
+
}, [visible]);
|
|
9188
|
+
var getOrderProductItem = /*#__PURE__*/function () {
|
|
9189
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
9190
|
+
var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
|
|
9191
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9192
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9193
|
+
case 0:
|
|
9194
|
+
val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9195
|
+
orderNo = val.m3ap1EvEyd, shopId = val.shopId;
|
|
9196
|
+
if (orderNo) {
|
|
9197
|
+
_context2.next = 4;
|
|
9198
|
+
break;
|
|
9199
|
+
}
|
|
9200
|
+
return _context2.abrupt("return", handleSetGoodList([]));
|
|
9201
|
+
case 4:
|
|
9202
|
+
if (orderNoItems.length) {
|
|
9203
|
+
_context2.next = 20;
|
|
9204
|
+
break;
|
|
9205
|
+
}
|
|
9206
|
+
_context2.prev = 5;
|
|
9207
|
+
setLoading(true);
|
|
9208
|
+
_context2.next = 9;
|
|
9209
|
+
return kmkfUtils.servers.orderDetail({
|
|
9210
|
+
shopId: shopId,
|
|
9211
|
+
orderNo: orderNo
|
|
9212
|
+
});
|
|
9213
|
+
case 9:
|
|
9214
|
+
res = _context2.sent;
|
|
9215
|
+
if (res.success) {
|
|
9216
|
+
_context2.next = 14;
|
|
9217
|
+
break;
|
|
9218
|
+
}
|
|
9219
|
+
handleSetGoodList([]);
|
|
9220
|
+
antd.message.warn(res.message);
|
|
9221
|
+
return _context2.abrupt("return");
|
|
9222
|
+
case 14:
|
|
9223
|
+
if (res.data && res.data.itemList && res.data.itemList.length) {
|
|
9224
|
+
items = res.data.itemList;
|
|
9225
|
+
totalCount = items.length;
|
|
9226
|
+
items.forEach(function (item) {
|
|
9227
|
+
item.platform = platform;
|
|
9228
|
+
});
|
|
9229
|
+
setOrderNoItems(items);
|
|
9230
|
+
pageNo = params.pageNo, pageSize = params.pageSize;
|
|
9231
|
+
handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
|
|
9232
|
+
setTotal(totalCount);
|
|
9233
|
+
}
|
|
9234
|
+
case 15:
|
|
9235
|
+
_context2.prev = 15;
|
|
9236
|
+
setLoading(false);
|
|
9237
|
+
return _context2.finish(15);
|
|
9238
|
+
case 18:
|
|
9239
|
+
_context2.next = 26;
|
|
9240
|
+
break;
|
|
9241
|
+
case 20:
|
|
9242
|
+
_pageNo = params.pageNo, _pageSize = params.pageSize;
|
|
9243
|
+
title = params.title;
|
|
9244
|
+
if (platform !== 'taobao') {
|
|
9245
|
+
title = params.numIids;
|
|
9246
|
+
}
|
|
9247
|
+
_items = title ? orderNoItems.filter(function (item) {
|
|
9248
|
+
return item.title.includes(title.trim());
|
|
9249
|
+
}) : orderNoItems;
|
|
9250
|
+
handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
|
|
9251
|
+
setTotal(_items.length);
|
|
9252
|
+
case 26:
|
|
9253
|
+
case "end":
|
|
9254
|
+
return _context2.stop();
|
|
9255
|
+
}
|
|
9256
|
+
}, _callee2, null, [[5,, 15, 18]]);
|
|
9257
|
+
}));
|
|
9258
|
+
return function getOrderProductItem(_x2) {
|
|
9259
|
+
return _ref4.apply(this, arguments);
|
|
9260
|
+
};
|
|
9261
|
+
}();
|
|
9103
9262
|
return /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
9104
9263
|
title: '选择宝贝',
|
|
9105
9264
|
okText: '确认',
|
|
@@ -9133,7 +9292,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9133
9292
|
style: {
|
|
9134
9293
|
display: searchParams.type === 'select' ? 'none' : ''
|
|
9135
9294
|
}
|
|
9136
|
-
}, platform === 'taobao' && /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, {
|
|
9295
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React__default['default'].createElement(antd.Radio.Group, {
|
|
9137
9296
|
value: searchParams.orderBy,
|
|
9138
9297
|
onChange: function onChange(e) {
|
|
9139
9298
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9149,7 +9308,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9149
9308
|
},
|
|
9150
9309
|
key: sort.value
|
|
9151
9310
|
}, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React__default['default'].createElement("span", null, "\u21BE") : /*#__PURE__*/React__default['default'].createElement("span", null, "\u21C2") : /*#__PURE__*/React__default['default'].createElement("span", null, "\u21C5"));
|
|
9152
|
-
})), /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9311
|
+
}))), /*#__PURE__*/React__default['default'].createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
9153
9312
|
className: "classify",
|
|
9154
9313
|
value: searchParams.cids,
|
|
9155
9314
|
onChange: function onChange(value) {
|
|
@@ -9164,7 +9323,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9164
9323
|
key: item.value
|
|
9165
9324
|
}, item.label);
|
|
9166
9325
|
})), /*#__PURE__*/React__default['default'].createElement(Search, {
|
|
9167
|
-
placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
|
|
9326
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
|
|
9168
9327
|
// enterButton="搜索"
|
|
9169
9328
|
className: "search",
|
|
9170
9329
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -9787,7 +9946,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9787
9946
|
userNick = props.userNick,
|
|
9788
9947
|
disabled = props.disabled,
|
|
9789
9948
|
changeSku = props.changeSku,
|
|
9790
|
-
width = props.width
|
|
9949
|
+
width = props.width,
|
|
9950
|
+
form = props.form,
|
|
9951
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
9791
9952
|
var shopId = value.shopId,
|
|
9792
9953
|
imgList = value.imgList;
|
|
9793
9954
|
var _useState = React.useState(false),
|
|
@@ -9878,7 +10039,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9878
10039
|
var onSubmit = /*#__PURE__*/function () {
|
|
9879
10040
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9880
10041
|
var _list$;
|
|
9881
|
-
var newList, newImgList;
|
|
10042
|
+
var newList, newImgList, _list$2;
|
|
9882
10043
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9883
10044
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9884
10045
|
case 0:
|
|
@@ -9900,7 +10061,11 @@ var GoodItem = function GoodItem(props) {
|
|
|
9900
10061
|
// if (type === 1) {
|
|
9901
10062
|
// params.outerId = item.outerId; //编码
|
|
9902
10063
|
// }
|
|
9903
|
-
|
|
10064
|
+
//返填商品属性 && 为订单商品
|
|
10065
|
+
if (changeSku && item.skuInfoDTO) {
|
|
10066
|
+
params.outerSkuId = item.skuInfoDTO.outerSkuId;
|
|
10067
|
+
params.propertiesName = item.skuInfoDTO.propertiesName;
|
|
10068
|
+
} else if (changeSku) {
|
|
9904
10069
|
params.propertiesName = '';
|
|
9905
10070
|
}
|
|
9906
10071
|
// if (type === 4) {
|
|
@@ -9919,7 +10084,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9919
10084
|
imgList: newImgList
|
|
9920
10085
|
});
|
|
9921
10086
|
setVisible(false);
|
|
9922
|
-
|
|
10087
|
+
if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
|
|
10088
|
+
checkSkus(list === null || list === void 0 ? void 0 : (_list$2 = list[0]) === null || _list$2 === void 0 ? void 0 : _list$2.numIid, newImgList.length - 1);
|
|
10089
|
+
}
|
|
9923
10090
|
case 5:
|
|
9924
10091
|
case "end":
|
|
9925
10092
|
return _context2.stop();
|
|
@@ -10176,6 +10343,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
10176
10343
|
shopId: shopId,
|
|
10177
10344
|
maxLength: maxLength,
|
|
10178
10345
|
changeSku: changeSku,
|
|
10346
|
+
form: form,
|
|
10347
|
+
isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
|
|
10179
10348
|
onCancel: function onCancel() {
|
|
10180
10349
|
setVisible(false);
|
|
10181
10350
|
}
|
|
@@ -10974,7 +11143,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10974
11143
|
}
|
|
10975
11144
|
})), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
10976
11145
|
label: '发件人手机号',
|
|
10977
|
-
required
|
|
11146
|
+
// required={true}
|
|
10978
11147
|
key: 'interceptSenderMobile',
|
|
10979
11148
|
hidden: !showSenderMobile
|
|
10980
11149
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
@@ -11003,7 +11172,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
11003
11172
|
value: item.uk
|
|
11004
11173
|
}, "".concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.province) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.city) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.district) || '').concat(item.detail, " ").concat(item === null || item === void 0 ? void 0 : item.userName, ":").concat(item === null || item === void 0 ? void 0 : item.mobile));
|
|
11005
11174
|
}))), /*#__PURE__*/React__default['default'].createElement(Item, {
|
|
11006
|
-
label: '
|
|
11175
|
+
label: '修改后派送地址',
|
|
11007
11176
|
required: true,
|
|
11008
11177
|
key: 'newAddress',
|
|
11009
11178
|
hidden: !showNewAddress
|
|
@@ -11154,7 +11323,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11154
11323
|
_props$value = props.value,
|
|
11155
11324
|
value = _props$value === void 0 ? {} : _props$value,
|
|
11156
11325
|
disabled = props.disabled,
|
|
11157
|
-
onChange = props.onChange
|
|
11326
|
+
onChange = props.onChange,
|
|
11327
|
+
_props$isSingle = props.isSingle,
|
|
11328
|
+
isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
|
|
11329
|
+
_props$trajectoryApiS = props.trajectoryApiStatus,
|
|
11330
|
+
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
11158
11331
|
var handleInputChange = function handleInputChange(e, type) {
|
|
11159
11332
|
var val = e.target.value;
|
|
11160
11333
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
@@ -11165,13 +11338,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11165
11338
|
}));
|
|
11166
11339
|
handleSearchSnapshot(val);
|
|
11167
11340
|
};
|
|
11341
|
+
var handleStatusChange = function handleStatusChange(val) {
|
|
11342
|
+
var _value$trajectoryApiS;
|
|
11343
|
+
var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11344
|
+
trajectoryApiStatus: {
|
|
11345
|
+
status: val,
|
|
11346
|
+
reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
|
|
11347
|
+
}
|
|
11348
|
+
});
|
|
11349
|
+
onChange(newVal);
|
|
11350
|
+
};
|
|
11168
11351
|
var handleSearchSnapshot = function handleSearchSnapshot(company) {
|
|
11169
11352
|
var trajectoryCompany = value.trajectoryCompany,
|
|
11170
11353
|
trajectoryCode = value.trajectoryCode,
|
|
11171
11354
|
trajectoryPhone = value.trajectoryPhone;
|
|
11172
11355
|
var newCompany = company ? company : trajectoryCompany;
|
|
11173
11356
|
//不展示拦截状态不请求
|
|
11174
|
-
if (!(showField && showField.includes('snapshot'))) {
|
|
11357
|
+
if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
|
|
11175
11358
|
return;
|
|
11176
11359
|
}
|
|
11177
11360
|
if (disabled) {
|
|
@@ -11196,13 +11379,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11196
11379
|
data = res.data,
|
|
11197
11380
|
msg = res.message;
|
|
11198
11381
|
if (result === 100 || success) {
|
|
11199
|
-
|
|
11200
|
-
trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
|
|
11382
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11201
11383
|
trajectoryCompany: newCompany
|
|
11202
|
-
})
|
|
11384
|
+
});
|
|
11385
|
+
if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
|
|
11386
|
+
if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
|
|
11387
|
+
onChange(newValue);
|
|
11203
11388
|
} else {
|
|
11204
11389
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11205
11390
|
trajectorySnapshot: '',
|
|
11391
|
+
trajectoryApiStatus: {
|
|
11392
|
+
reason: '',
|
|
11393
|
+
status: ''
|
|
11394
|
+
},
|
|
11206
11395
|
trajectoryCompany: newCompany
|
|
11207
11396
|
}));
|
|
11208
11397
|
msg && antd.message.error(msg);
|
|
@@ -11211,6 +11400,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11211
11400
|
} catch (err) {
|
|
11212
11401
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11213
11402
|
trajectorySnapshot: '',
|
|
11403
|
+
trajectoryApiStatus: {
|
|
11404
|
+
reason: '',
|
|
11405
|
+
status: ''
|
|
11406
|
+
},
|
|
11214
11407
|
trajectoryCompany: newCompany
|
|
11215
11408
|
}));
|
|
11216
11409
|
(err === null || err === void 0 ? void 0 : err.message) && antd.message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
@@ -11264,6 +11457,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11264
11457
|
}
|
|
11265
11458
|
});
|
|
11266
11459
|
};
|
|
11460
|
+
// 接口状态
|
|
11461
|
+
var LogisticsApiStatus = function LogisticsApiStatus() {
|
|
11462
|
+
var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
|
|
11463
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11464
|
+
value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
|
|
11465
|
+
disabled: true,
|
|
11466
|
+
style: {
|
|
11467
|
+
width: '100%',
|
|
11468
|
+
marginTop: '8px'
|
|
11469
|
+
},
|
|
11470
|
+
placeholder: "\u63A5\u53E3\u72B6\u6001",
|
|
11471
|
+
onChange: handleStatusChange,
|
|
11472
|
+
options: [{
|
|
11473
|
+
label: '成功',
|
|
11474
|
+
value: '成功'
|
|
11475
|
+
}, {
|
|
11476
|
+
label: '失败',
|
|
11477
|
+
value: '失败'
|
|
11478
|
+
}]
|
|
11479
|
+
}), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
11480
|
+
style: {
|
|
11481
|
+
color: 'red'
|
|
11482
|
+
}
|
|
11483
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : (_value$trajectoryApiS4 = value.trajectoryApiStatus) === null || _value$trajectoryApiS4 === void 0 ? void 0 : _value$trajectoryApiS4.reason) : null);
|
|
11484
|
+
};
|
|
11267
11485
|
//物流快照
|
|
11268
11486
|
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
11269
11487
|
return /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
@@ -11278,7 +11496,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11278
11496
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
11279
11497
|
});
|
|
11280
11498
|
};
|
|
11281
|
-
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
11499
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React__default['default'].createElement(LogisticsSnapshot, null) : null);
|
|
11282
11500
|
};
|
|
11283
11501
|
|
|
11284
11502
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -11491,7 +11709,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
11491
11709
|
disabled: disabled,
|
|
11492
11710
|
onChange: function onChange(val) {
|
|
11493
11711
|
return handleChange(val, changeIndex);
|
|
11494
|
-
}
|
|
11712
|
+
},
|
|
11713
|
+
isSingle: false
|
|
11495
11714
|
}));
|
|
11496
11715
|
};
|
|
11497
11716
|
|
|
@@ -11514,7 +11733,7 @@ var typeInitValueMap = {
|
|
|
11514
11733
|
}]
|
|
11515
11734
|
};
|
|
11516
11735
|
var jstGoods = function jstGoods(props) {
|
|
11517
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11;
|
|
11736
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12;
|
|
11518
11737
|
var _props$value = props.value,
|
|
11519
11738
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11520
11739
|
onChange = props.onChange,
|
|
@@ -11622,7 +11841,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11622
11841
|
onChange: function onChange(val) {
|
|
11623
11842
|
changeInputHandle(val, 'logisticsCompany');
|
|
11624
11843
|
},
|
|
11625
|
-
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false)
|
|
11844
|
+
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false) ? (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'] : (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompanyName'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompany'],
|
|
11626
11845
|
showSearch: true,
|
|
11627
11846
|
dropdownMatchSelectWidth: false,
|
|
11628
11847
|
filterOption: function filterOption(input, option) {
|
|
@@ -11639,28 +11858,28 @@ var jstGoods = function jstGoods(props) {
|
|
|
11639
11858
|
onChange: function onChange(e) {
|
|
11640
11859
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11641
11860
|
},
|
|
11642
|
-
value: (_value$
|
|
11861
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
|
|
11643
11862
|
}) : null) : null, type === 2 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11644
11863
|
disabled: disabled,
|
|
11645
11864
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11646
11865
|
onChange: function onChange(e) {
|
|
11647
11866
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11648
11867
|
},
|
|
11649
|
-
value: (_value$
|
|
11868
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
|
|
11650
11869
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11651
11870
|
disabled: disabled,
|
|
11652
11871
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11653
11872
|
onChange: function onChange(e) {
|
|
11654
11873
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11655
11874
|
},
|
|
11656
|
-
value: (_value$
|
|
11875
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
|
|
11657
11876
|
})) : null, type === 3 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11658
11877
|
disabled: disabled,
|
|
11659
11878
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11660
11879
|
onChange: function onChange(e) {
|
|
11661
11880
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11662
11881
|
},
|
|
11663
|
-
value: (_value$
|
|
11882
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
|
|
11664
11883
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
11665
11884
|
style: {
|
|
11666
11885
|
minWidth: '100px',
|
|
@@ -11671,7 +11890,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11671
11890
|
showSearch: true,
|
|
11672
11891
|
options: sendOptions,
|
|
11673
11892
|
filterOption: filterOption,
|
|
11674
|
-
value: ((_value$
|
|
11893
|
+
value: ((_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendSnapshotId) || ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendName) || null,
|
|
11675
11894
|
onChange: function onChange(value, option) {
|
|
11676
11895
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11677
11896
|
}
|
|
@@ -11681,14 +11900,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11681
11900
|
onChange: function onChange(e) {
|
|
11682
11901
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11683
11902
|
},
|
|
11684
|
-
value: (_value$
|
|
11903
|
+
value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
|
|
11685
11904
|
}))) : null, type === 4 ? /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
11686
11905
|
disabled: disabled,
|
|
11687
11906
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11688
11907
|
onChange: function onChange(e) {
|
|
11689
11908
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11690
11909
|
},
|
|
11691
|
-
value: (_value$
|
|
11910
|
+
value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
|
|
11692
11911
|
})) : null) : null);
|
|
11693
11912
|
};
|
|
11694
11913
|
|
|
@@ -12255,7 +12474,7 @@ var gyColumns = [{
|
|
|
12255
12474
|
}, {
|
|
12256
12475
|
dataIndex: 'specNo',
|
|
12257
12476
|
title: 'SKU编码',
|
|
12258
|
-
width:
|
|
12477
|
+
width: 150,
|
|
12259
12478
|
ellipsis: true
|
|
12260
12479
|
}, {
|
|
12261
12480
|
dataIndex: 'goodName',
|
|
@@ -12266,11 +12485,11 @@ var gyColumns = [{
|
|
|
12266
12485
|
dataIndex: 'goodShortName',
|
|
12267
12486
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12268
12487
|
ellipsis: true,
|
|
12269
|
-
width:
|
|
12488
|
+
width: 150
|
|
12270
12489
|
}, {
|
|
12271
12490
|
dataIndex: 'goodNo',
|
|
12272
12491
|
title: '商品编码',
|
|
12273
|
-
width:
|
|
12492
|
+
width: 150,
|
|
12274
12493
|
ellipsis: true
|
|
12275
12494
|
}, {
|
|
12276
12495
|
dataIndex: 'goodPicUrl',
|
|
@@ -12543,12 +12762,144 @@ var bse3Columns = [{
|
|
|
12543
12762
|
width: 100
|
|
12544
12763
|
}];
|
|
12545
12764
|
|
|
12765
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
12766
|
+
if (!lodash.isBoolean(val)) return null;
|
|
12767
|
+
return val ? '是' : '否';
|
|
12768
|
+
};
|
|
12769
|
+
var kmColumns = [{
|
|
12770
|
+
dataIndex: 'goodName',
|
|
12771
|
+
title: '商品名称',
|
|
12772
|
+
width: 250,
|
|
12773
|
+
ellipsis: true
|
|
12774
|
+
}, {
|
|
12775
|
+
dataIndex: 'goodNo',
|
|
12776
|
+
title: '商品编码',
|
|
12777
|
+
width: 150,
|
|
12778
|
+
ellipsis: true
|
|
12779
|
+
}, {
|
|
12780
|
+
dataIndex: 'goodId',
|
|
12781
|
+
title: '商品ID',
|
|
12782
|
+
width: 200,
|
|
12783
|
+
ellipsis: true
|
|
12784
|
+
}, {
|
|
12785
|
+
dataIndex: 'goodPicUrl',
|
|
12786
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12787
|
+
width: 150,
|
|
12788
|
+
render: function render(val) {
|
|
12789
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12790
|
+
width: 60,
|
|
12791
|
+
src: val
|
|
12792
|
+
});
|
|
12793
|
+
}
|
|
12794
|
+
}, {
|
|
12795
|
+
dataIndex: 'goodShortName',
|
|
12796
|
+
title: '商品简称',
|
|
12797
|
+
width: 200,
|
|
12798
|
+
ellipsis: true
|
|
12799
|
+
}, {
|
|
12800
|
+
dataIndex: 'goodBarcode',
|
|
12801
|
+
title: '商品条码',
|
|
12802
|
+
width: 200,
|
|
12803
|
+
ellipsis: true
|
|
12804
|
+
}, {
|
|
12805
|
+
dataIndex: 'brandName',
|
|
12806
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12807
|
+
ellipsis: true,
|
|
12808
|
+
width: 150
|
|
12809
|
+
}, {
|
|
12810
|
+
dataIndex: 'skuType',
|
|
12811
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12812
|
+
ellipsis: true,
|
|
12813
|
+
width: 150
|
|
12814
|
+
}, {
|
|
12815
|
+
dataIndex: 'specName',
|
|
12816
|
+
title: "SKU\u540D\u79F0",
|
|
12817
|
+
ellipsis: true,
|
|
12818
|
+
width: 150
|
|
12819
|
+
}, {
|
|
12820
|
+
dataIndex: 'specNo',
|
|
12821
|
+
title: "SKU\u7F16\u7801",
|
|
12822
|
+
ellipsis: true,
|
|
12823
|
+
width: 150
|
|
12824
|
+
}, {
|
|
12825
|
+
dataIndex: 'specId',
|
|
12826
|
+
title: "SKU ID",
|
|
12827
|
+
ellipsis: true,
|
|
12828
|
+
width: 150
|
|
12829
|
+
}, {
|
|
12830
|
+
dataIndex: 'propertiesValue',
|
|
12831
|
+
title: "\u89C4\u683C\u503C",
|
|
12832
|
+
ellipsis: true,
|
|
12833
|
+
width: 150
|
|
12834
|
+
}, {
|
|
12835
|
+
dataIndex: 'skuShortTitle',
|
|
12836
|
+
title: "\u89C4\u683C\u7B80\u79F0",
|
|
12837
|
+
ellipsis: true,
|
|
12838
|
+
width: 150
|
|
12839
|
+
}, {
|
|
12840
|
+
dataIndex: 'specBarcode',
|
|
12841
|
+
title: "\u89C4\u683C\u6761\u7801",
|
|
12842
|
+
ellipsis: true,
|
|
12843
|
+
width: 150
|
|
12844
|
+
}, {
|
|
12845
|
+
dataIndex: 'specImgUrl',
|
|
12846
|
+
title: "SKU \u56FE\u7247",
|
|
12847
|
+
ellipsis: true,
|
|
12848
|
+
width: 150,
|
|
12849
|
+
render: function render(val) {
|
|
12850
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
12851
|
+
width: 60,
|
|
12852
|
+
src: val
|
|
12853
|
+
});
|
|
12854
|
+
}
|
|
12855
|
+
}, {
|
|
12856
|
+
dataIndex: 'isGift',
|
|
12857
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12858
|
+
ellipsis: true,
|
|
12859
|
+
width: 150,
|
|
12860
|
+
render: function render(val) {
|
|
12861
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12862
|
+
}
|
|
12863
|
+
}, {
|
|
12864
|
+
dataIndex: 'isVirtual',
|
|
12865
|
+
title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
|
|
12866
|
+
ellipsis: true,
|
|
12867
|
+
width: 150,
|
|
12868
|
+
render: function render(val) {
|
|
12869
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12870
|
+
}
|
|
12871
|
+
}, {
|
|
12872
|
+
dataIndex: 'isSkuItem',
|
|
12873
|
+
title: "\u662F\u5426\u542B\u6709SKU",
|
|
12874
|
+
ellipsis: true,
|
|
12875
|
+
width: 150,
|
|
12876
|
+
render: function render(val) {
|
|
12877
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
12878
|
+
}
|
|
12879
|
+
}, {
|
|
12880
|
+
dataIndex: 'marketPrice',
|
|
12881
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12882
|
+
ellipsis: true,
|
|
12883
|
+
width: 150
|
|
12884
|
+
}, {
|
|
12885
|
+
dataIndex: 'retailPrice',
|
|
12886
|
+
title: "\u96F6\u552E\u4EF7",
|
|
12887
|
+
ellipsis: true,
|
|
12888
|
+
width: 150
|
|
12889
|
+
}, {
|
|
12890
|
+
dataIndex: 'costPrice',
|
|
12891
|
+
title: "\u6210\u672C\u4EF7",
|
|
12892
|
+
ellipsis: true,
|
|
12893
|
+
width: 150
|
|
12894
|
+
}];
|
|
12895
|
+
|
|
12546
12896
|
var getColumnsMap = function getColumnsMap() {
|
|
12547
12897
|
return lodash.cloneDeep({
|
|
12548
12898
|
gy: gyColumns,
|
|
12549
12899
|
jst: jstColumns,
|
|
12550
12900
|
wdt: wdtColumns,
|
|
12551
|
-
bse3: bse3Columns
|
|
12901
|
+
bse3: bse3Columns,
|
|
12902
|
+
km: kmColumns
|
|
12552
12903
|
});
|
|
12553
12904
|
};
|
|
12554
12905
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -13498,23 +13849,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
13498
13849
|
};
|
|
13499
13850
|
var BsE3GoodsModal = /*#__PURE__*/React.forwardRef(GoodsModal$4);
|
|
13500
13851
|
|
|
13852
|
+
var rowCheckKey = 'id';
|
|
13501
13853
|
var getTableData$3 = function getTableData(_ref, formData) {
|
|
13502
13854
|
var current = _ref.current,
|
|
13503
13855
|
pageSize = _ref.pageSize;
|
|
13504
|
-
var data = {
|
|
13505
|
-
goodShortName: formData.goodShortName || null,
|
|
13506
|
-
skuName: formData.skuName || null,
|
|
13507
|
-
skuCode: formData.skuCode || null,
|
|
13508
|
-
goodName: formData.goodName || null,
|
|
13509
|
-
goodNo: formData.goodNo || null
|
|
13510
|
-
};
|
|
13511
13856
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
13512
13857
|
method: 'post',
|
|
13513
13858
|
data: _objectSpread2({
|
|
13514
13859
|
pageSize: pageSize,
|
|
13515
13860
|
pageNo: current,
|
|
13516
|
-
platform: '
|
|
13517
|
-
},
|
|
13861
|
+
platform: 'KM_ERP'
|
|
13862
|
+
}, formData)
|
|
13518
13863
|
}).then(function (res) {
|
|
13519
13864
|
var _res$data = res.data,
|
|
13520
13865
|
_res$data$productSkuL = _res$data.productSkuList,
|
|
@@ -13531,9 +13876,257 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
13531
13876
|
});
|
|
13532
13877
|
};
|
|
13533
13878
|
var searchFormData$2 = [{
|
|
13534
|
-
label: '
|
|
13535
|
-
name: '
|
|
13536
|
-
}, {
|
|
13879
|
+
label: '商品名称',
|
|
13880
|
+
name: 'goodName'
|
|
13881
|
+
}, {
|
|
13882
|
+
label: '商品编码',
|
|
13883
|
+
name: 'goodNo'
|
|
13884
|
+
}, {
|
|
13885
|
+
label: 'SKU名称',
|
|
13886
|
+
name: 'skuName',
|
|
13887
|
+
dataIndex: 'specName'
|
|
13888
|
+
}, {
|
|
13889
|
+
label: 'SKU编码',
|
|
13890
|
+
name: 'skuCode',
|
|
13891
|
+
dataIndex: 'specNo'
|
|
13892
|
+
}];
|
|
13893
|
+
var GoodList$3 = function GoodList(props, ref) {
|
|
13894
|
+
var _useState = React.useState([]),
|
|
13895
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13896
|
+
selectList = _useState2[0],
|
|
13897
|
+
setSelect = _useState2[1];
|
|
13898
|
+
var _useState3 = React.useState([]),
|
|
13899
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
13900
|
+
selectIds = _useState4[0],
|
|
13901
|
+
setSelectIds = _useState4[1];
|
|
13902
|
+
var _useGetColumns = useGetColumns('km'),
|
|
13903
|
+
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
13904
|
+
columns = _useGetColumns2[0],
|
|
13905
|
+
showColumnsDataIndexList = _useGetColumns2[1],
|
|
13906
|
+
loading = _useGetColumns2[2];
|
|
13907
|
+
React.useImperativeHandle(ref, function () {
|
|
13908
|
+
return {
|
|
13909
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
13910
|
+
return selectList;
|
|
13911
|
+
}
|
|
13912
|
+
};
|
|
13913
|
+
});
|
|
13914
|
+
var _Form$useForm = antd.Form.useForm(),
|
|
13915
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13916
|
+
form = _Form$useForm2[0];
|
|
13917
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$3, {
|
|
13918
|
+
defaultPageSize: 10,
|
|
13919
|
+
form: form
|
|
13920
|
+
}),
|
|
13921
|
+
tableProps = _useAntdTable.tableProps,
|
|
13922
|
+
search = _useAntdTable.search,
|
|
13923
|
+
params = _useAntdTable.params;
|
|
13924
|
+
var submit = search.submit,
|
|
13925
|
+
reset = search.reset;
|
|
13926
|
+
var rowSelection = {
|
|
13927
|
+
selectedRowKeys: selectIds,
|
|
13928
|
+
fixed: true,
|
|
13929
|
+
onSelect: function onSelect(record, selected) {
|
|
13930
|
+
if (selected) {
|
|
13931
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
|
|
13932
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
13933
|
+
} else {
|
|
13934
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13935
|
+
return t !== record[rowCheckKey];
|
|
13936
|
+
}));
|
|
13937
|
+
setSelect(selectList.filter(function (t) {
|
|
13938
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13939
|
+
}));
|
|
13940
|
+
}
|
|
13941
|
+
},
|
|
13942
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
13943
|
+
if (selected) {
|
|
13944
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
13945
|
+
return t[rowCheckKey];
|
|
13946
|
+
}))));
|
|
13947
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
13948
|
+
} else {
|
|
13949
|
+
setSelectIds(lodash.difference(selectIds, changeRows.map(function (t) {
|
|
13950
|
+
return t[rowCheckKey];
|
|
13951
|
+
})));
|
|
13952
|
+
var list = lodash.differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
13953
|
+
return arrVal[rowCheckKey] !== othVal[rowCheckKey];
|
|
13954
|
+
});
|
|
13955
|
+
setSelect(list);
|
|
13956
|
+
}
|
|
13957
|
+
},
|
|
13958
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
13959
|
+
var options = {
|
|
13960
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
13961
|
+
return row[rowCheckKey] || row.skuId;
|
|
13962
|
+
}).includes(record[rowCheckKey] || record.skuId),
|
|
13963
|
+
name: record[rowCheckKey]
|
|
13964
|
+
};
|
|
13965
|
+
return options;
|
|
13966
|
+
}
|
|
13967
|
+
};
|
|
13968
|
+
var showTable = function showTable() {
|
|
13969
|
+
var handleDelete = function handleDelete(record) {
|
|
13970
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13971
|
+
return t !== record[rowCheckKey];
|
|
13972
|
+
}));
|
|
13973
|
+
setSelect(selectList.filter(function (t) {
|
|
13974
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13975
|
+
}));
|
|
13976
|
+
};
|
|
13977
|
+
var showColumns = [{
|
|
13978
|
+
dataIndex: '',
|
|
13979
|
+
title: "\u64CD\u4F5C",
|
|
13980
|
+
ellipsis: true,
|
|
13981
|
+
width: 100,
|
|
13982
|
+
render: function render(val, record) {
|
|
13983
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
13984
|
+
type: "link",
|
|
13985
|
+
onClick: function onClick() {
|
|
13986
|
+
return handleDelete(record);
|
|
13987
|
+
}
|
|
13988
|
+
}, "\u5220\u9664");
|
|
13989
|
+
}
|
|
13990
|
+
}].concat(lodash.takeRight(columns, columns.length - 1));
|
|
13991
|
+
return selectList.length ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13992
|
+
style: {
|
|
13993
|
+
width: '100%',
|
|
13994
|
+
maxWidth: '387px'
|
|
13995
|
+
}
|
|
13996
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
13997
|
+
columns: showColumns,
|
|
13998
|
+
rowKey: rowCheckKey,
|
|
13999
|
+
dataSource: selectList,
|
|
14000
|
+
scroll: {
|
|
14001
|
+
x: '100%',
|
|
14002
|
+
y: 250
|
|
14003
|
+
},
|
|
14004
|
+
pagination: {
|
|
14005
|
+
size: 'small',
|
|
14006
|
+
total: selectIds.length,
|
|
14007
|
+
pageSize: 10,
|
|
14008
|
+
showSizeChanger: false
|
|
14009
|
+
}
|
|
14010
|
+
})) : null;
|
|
14011
|
+
};
|
|
14012
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Skeleton, {
|
|
14013
|
+
active: true,
|
|
14014
|
+
loading: loading
|
|
14015
|
+
}, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
|
|
14016
|
+
searchFormData: searchFormData$2,
|
|
14017
|
+
form: form,
|
|
14018
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
14019
|
+
submit: submit,
|
|
14020
|
+
reset: reset
|
|
14021
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
14022
|
+
style: {
|
|
14023
|
+
marginTop: '4px'
|
|
14024
|
+
}
|
|
14025
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _objectSpread2({
|
|
14026
|
+
rowSelection: rowSelection,
|
|
14027
|
+
rowKey: rowCheckKey,
|
|
14028
|
+
columns: columns,
|
|
14029
|
+
scroll: {
|
|
14030
|
+
x: '100%',
|
|
14031
|
+
y: 250
|
|
14032
|
+
}
|
|
14033
|
+
}, tableProps))), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
14034
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
14035
|
+
return triggerNode.parentElement;
|
|
14036
|
+
},
|
|
14037
|
+
content: showTable(),
|
|
14038
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
14039
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
14040
|
+
danger: true,
|
|
14041
|
+
type: "text"
|
|
14042
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
14043
|
+
};
|
|
14044
|
+
var ErpGoodsList = /*#__PURE__*/React.forwardRef(GoodList$3);
|
|
14045
|
+
|
|
14046
|
+
var ErpGoodsModal = function ErpGoodsModal(props, ref) {
|
|
14047
|
+
React.useImperativeHandle(ref, function () {
|
|
14048
|
+
return {
|
|
14049
|
+
open: function open(shopCode) {
|
|
14050
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
14051
|
+
setVisible(true);
|
|
14052
|
+
setSelectedRows(options.value || []);
|
|
14053
|
+
}
|
|
14054
|
+
};
|
|
14055
|
+
});
|
|
14056
|
+
var onSubmit = props.onSubmit,
|
|
14057
|
+
width = props.width;
|
|
14058
|
+
var _useState = React.useState(false),
|
|
14059
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14060
|
+
visible = _useState2[0],
|
|
14061
|
+
setVisible = _useState2[1];
|
|
14062
|
+
var _useState3 = React.useState([]),
|
|
14063
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14064
|
+
selectedRows = _useState4[0],
|
|
14065
|
+
setSelectedRows = _useState4[1];
|
|
14066
|
+
var erpGoodsListRef = React.useRef(null);
|
|
14067
|
+
var _onCancel = function onCancel() {
|
|
14068
|
+
setVisible(false);
|
|
14069
|
+
};
|
|
14070
|
+
var onOk = function onOk() {
|
|
14071
|
+
var _erpGoodsListRef$curr;
|
|
14072
|
+
var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
|
|
14073
|
+
onSubmit(selectedList);
|
|
14074
|
+
_onCancel();
|
|
14075
|
+
};
|
|
14076
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, visible && /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
14077
|
+
title: '选择商品',
|
|
14078
|
+
okText: '确认',
|
|
14079
|
+
cancelText: '取消',
|
|
14080
|
+
visible: visible,
|
|
14081
|
+
width: width || 850,
|
|
14082
|
+
onCancel: function onCancel() {
|
|
14083
|
+
_onCancel();
|
|
14084
|
+
},
|
|
14085
|
+
onOk: onOk,
|
|
14086
|
+
wrapClassName: "goodModal"
|
|
14087
|
+
}, /*#__PURE__*/React__default['default'].createElement(ErpGoodsList, {
|
|
14088
|
+
ref: erpGoodsListRef,
|
|
14089
|
+
selectedRows: selectedRows
|
|
14090
|
+
})));
|
|
14091
|
+
};
|
|
14092
|
+
var KmGoodsModal = /*#__PURE__*/React.forwardRef(ErpGoodsModal);
|
|
14093
|
+
|
|
14094
|
+
var getTableData$4 = function getTableData(_ref, formData) {
|
|
14095
|
+
var current = _ref.current,
|
|
14096
|
+
pageSize = _ref.pageSize;
|
|
14097
|
+
var data = {
|
|
14098
|
+
goodShortName: formData.goodShortName || null,
|
|
14099
|
+
skuName: formData.skuName || null,
|
|
14100
|
+
skuCode: formData.skuCode || null,
|
|
14101
|
+
goodName: formData.goodName || null,
|
|
14102
|
+
goodNo: formData.goodNo || null
|
|
14103
|
+
};
|
|
14104
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
14105
|
+
method: 'post',
|
|
14106
|
+
data: _objectSpread2({
|
|
14107
|
+
pageSize: pageSize,
|
|
14108
|
+
pageNo: current,
|
|
14109
|
+
platform: 'GY_ERP'
|
|
14110
|
+
}, data)
|
|
14111
|
+
}).then(function (res) {
|
|
14112
|
+
var _res$data = res.data,
|
|
14113
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
14114
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
14115
|
+
_res$data$total = _res$data.total,
|
|
14116
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
14117
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
14118
|
+
return _objectSpread2({}, item);
|
|
14119
|
+
});
|
|
14120
|
+
return {
|
|
14121
|
+
total: total,
|
|
14122
|
+
list: newProducts
|
|
14123
|
+
};
|
|
14124
|
+
});
|
|
14125
|
+
};
|
|
14126
|
+
var searchFormData$3 = [{
|
|
14127
|
+
label: '商品简称',
|
|
14128
|
+
name: 'goodShortName'
|
|
14129
|
+
}, {
|
|
13537
14130
|
label: '商品sku名称',
|
|
13538
14131
|
name: 'skuName',
|
|
13539
14132
|
dataIndex: 'specName'
|
|
@@ -13548,7 +14141,7 @@ var searchFormData$2 = [{
|
|
|
13548
14141
|
label: '商品编码',
|
|
13549
14142
|
name: 'goodNo'
|
|
13550
14143
|
}];
|
|
13551
|
-
var GoodList$
|
|
14144
|
+
var GoodList$4 = function GoodList(props, ref) {
|
|
13552
14145
|
var _useState = React.useState([]),
|
|
13553
14146
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13554
14147
|
selectList = _useState2[0],
|
|
@@ -13572,7 +14165,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13572
14165
|
var _Form$useForm = antd.Form.useForm(),
|
|
13573
14166
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13574
14167
|
form = _Form$useForm2[0];
|
|
13575
|
-
var _useAntdTable = ahooks.useAntdTable(getTableData$
|
|
14168
|
+
var _useAntdTable = ahooks.useAntdTable(getTableData$4, {
|
|
13576
14169
|
defaultPageSize: 10,
|
|
13577
14170
|
form: form
|
|
13578
14171
|
}),
|
|
@@ -13662,7 +14255,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13662
14255
|
active: true,
|
|
13663
14256
|
loading: loading
|
|
13664
14257
|
}, /*#__PURE__*/React__default['default'].createElement(SearchForm, {
|
|
13665
|
-
searchFormData: searchFormData$
|
|
14258
|
+
searchFormData: searchFormData$3,
|
|
13666
14259
|
form: form,
|
|
13667
14260
|
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
13668
14261
|
submit: submit,
|
|
@@ -13690,7 +14283,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13690
14283
|
type: "text"
|
|
13691
14284
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React__default['default'].createElement(icons.CaretUpOutlined, null))));
|
|
13692
14285
|
};
|
|
13693
|
-
var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$
|
|
14286
|
+
var GyGoodsList$1 = /*#__PURE__*/React.forwardRef(GoodList$4);
|
|
13694
14287
|
|
|
13695
14288
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
13696
14289
|
React.useImperativeHandle(ref, function () {
|
|
@@ -14439,6 +15032,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14439
15032
|
label: '组合装',
|
|
14440
15033
|
value: '2'
|
|
14441
15034
|
}];
|
|
15035
|
+
var typeMap = {
|
|
15036
|
+
'1': '单品',
|
|
15037
|
+
'2': '组合装'
|
|
15038
|
+
};
|
|
14442
15039
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14443
15040
|
style: {
|
|
14444
15041
|
width: 70
|
|
@@ -14448,7 +15045,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14448
15045
|
onChange: function onChange(value) {
|
|
14449
15046
|
return updateHandle(value, index, 'type');
|
|
14450
15047
|
}
|
|
14451
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
15048
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
|
|
14452
15049
|
}
|
|
14453
15050
|
}],
|
|
14454
15051
|
//旺店通换出商品信息
|
|
@@ -14560,6 +15157,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14560
15157
|
label: '组合装',
|
|
14561
15158
|
value: '2'
|
|
14562
15159
|
}];
|
|
15160
|
+
var typeMap = {
|
|
15161
|
+
'1': '单品',
|
|
15162
|
+
'2': '组合装'
|
|
15163
|
+
};
|
|
14563
15164
|
return !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
14564
15165
|
style: {
|
|
14565
15166
|
width: 70
|
|
@@ -14569,13 +15170,13 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14569
15170
|
onChange: function onChange(value) {
|
|
14570
15171
|
return updateHandle(value, index, 'type');
|
|
14571
15172
|
}
|
|
14572
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
15173
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, typeMap[val]);
|
|
14573
15174
|
}
|
|
14574
15175
|
}]
|
|
14575
15176
|
};
|
|
14576
15177
|
};
|
|
14577
15178
|
|
|
14578
|
-
var getYesOrNo = function getYesOrNo(val) {
|
|
15179
|
+
var getYesOrNo$1 = function getYesOrNo(val) {
|
|
14579
15180
|
if (kmkfUtils.isNull(val)) return null;
|
|
14580
15181
|
return val ? '是' : '否';
|
|
14581
15182
|
};
|
|
@@ -14713,7 +15314,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
14713
15314
|
label: '否',
|
|
14714
15315
|
value: false
|
|
14715
15316
|
}]
|
|
14716
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo(val));
|
|
15317
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$1(val));
|
|
14717
15318
|
},
|
|
14718
15319
|
width: 100
|
|
14719
15320
|
}]
|
|
@@ -14725,7 +15326,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
|
14725
15326
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
14726
15327
|
return false;
|
|
14727
15328
|
};
|
|
14728
|
-
var getYesOrNo$
|
|
15329
|
+
var getYesOrNo$2 = function getYesOrNo(val) {
|
|
14729
15330
|
if (kmkfUtils.isNull(val)) return null;
|
|
14730
15331
|
return val ? '是' : '否';
|
|
14731
15332
|
};
|
|
@@ -14835,7 +15436,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14835
15436
|
title: "\u662F\u5426\u53D6\u6D88",
|
|
14836
15437
|
width: 150,
|
|
14837
15438
|
render: function render(val) {
|
|
14838
|
-
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15439
|
+
return /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14839
15440
|
}
|
|
14840
15441
|
}, {
|
|
14841
15442
|
dataIndex: 'isGift',
|
|
@@ -14854,7 +15455,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14854
15455
|
label: '否',
|
|
14855
15456
|
value: 0
|
|
14856
15457
|
}]
|
|
14857
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15458
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14858
15459
|
}
|
|
14859
15460
|
}, {
|
|
14860
15461
|
dataIndex: 'skuNote',
|
|
@@ -14974,7 +15575,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14974
15575
|
label: '否',
|
|
14975
15576
|
value: 0
|
|
14976
15577
|
}]
|
|
14977
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15578
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
14978
15579
|
}
|
|
14979
15580
|
}].map(function (item) {
|
|
14980
15581
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15098,7 +15699,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15098
15699
|
label: '否',
|
|
15099
15700
|
value: 0
|
|
15100
15701
|
}]
|
|
15101
|
-
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$
|
|
15702
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, getYesOrNo$2(val));
|
|
15102
15703
|
}
|
|
15103
15704
|
}].map(function (item) {
|
|
15104
15705
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15220,7 +15821,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15220
15821
|
ellipsis: true,
|
|
15221
15822
|
align: 'center',
|
|
15222
15823
|
render: function render(val, record, index) {
|
|
15223
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
15824
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15224
15825
|
}
|
|
15225
15826
|
}, {
|
|
15226
15827
|
dataIndex: 'batchId',
|
|
@@ -15496,7 +16097,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15496
16097
|
dataIndex: 'saleAmount',
|
|
15497
16098
|
title: '总金额',
|
|
15498
16099
|
render: function render(val, record) {
|
|
15499
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16100
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15500
16101
|
}
|
|
15501
16102
|
}, {
|
|
15502
16103
|
dataIndex: 'batchId',
|
|
@@ -15605,7 +16206,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15605
16206
|
dataIndex: 'saleAmount',
|
|
15606
16207
|
title: '总金额',
|
|
15607
16208
|
render: function render(val, record) {
|
|
15608
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16209
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15609
16210
|
}
|
|
15610
16211
|
}, {
|
|
15611
16212
|
dataIndex: 'isGift',
|
|
@@ -15644,20 +16245,253 @@ var getColumns$5 = function getColumns() {
|
|
|
15644
16245
|
};
|
|
15645
16246
|
};
|
|
15646
16247
|
|
|
16248
|
+
function toNum$2(value) {
|
|
16249
|
+
if (typeof value === 'string') {
|
|
16250
|
+
return value ? +value : void 0;
|
|
16251
|
+
}
|
|
16252
|
+
if (typeof value === 'number') {
|
|
16253
|
+
return value;
|
|
16254
|
+
}
|
|
16255
|
+
return void 0;
|
|
16256
|
+
}
|
|
15647
16257
|
var getColumns$6 = function getColumns(_ref) {
|
|
15648
16258
|
var _ref$text = _ref.text,
|
|
15649
|
-
text = _ref$text === void 0 ? '' : _ref$text,
|
|
15650
16259
|
disabled = _ref.disabled,
|
|
15651
16260
|
updateHandle = _ref.updateHandle;
|
|
15652
16261
|
return {
|
|
15653
|
-
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
|
|
15660
|
-
|
|
16262
|
+
KM_GOODS: [{
|
|
16263
|
+
dataIndex: 'skuPropertiesName',
|
|
16264
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16265
|
+
width: 250
|
|
16266
|
+
}, {
|
|
16267
|
+
dataIndex: 'sysTitle',
|
|
16268
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16269
|
+
width: 150
|
|
16270
|
+
}, {
|
|
16271
|
+
dataIndex: 'title',
|
|
16272
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16273
|
+
width: 150
|
|
16274
|
+
}, {
|
|
16275
|
+
dataIndex: 'shortTitle',
|
|
16276
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16277
|
+
width: 150
|
|
16278
|
+
}, {
|
|
16279
|
+
dataIndex: 'sysOuterId',
|
|
16280
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16281
|
+
width: 150
|
|
16282
|
+
}, {
|
|
16283
|
+
dataIndex: 'skuSysId',
|
|
16284
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16285
|
+
width: 150
|
|
16286
|
+
}, {
|
|
16287
|
+
dataIndex: 'skuId',
|
|
16288
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16289
|
+
width: 170
|
|
16290
|
+
}, {
|
|
16291
|
+
dataIndex: 'itemSysId',
|
|
16292
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16293
|
+
width: 150
|
|
16294
|
+
}, {
|
|
16295
|
+
dataIndex: 'sysPicPath',
|
|
16296
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16297
|
+
width: 100,
|
|
16298
|
+
render: function render(val) {
|
|
16299
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
16300
|
+
width: 60,
|
|
16301
|
+
src: val
|
|
16302
|
+
});
|
|
16303
|
+
}
|
|
16304
|
+
}, {
|
|
16305
|
+
dataIndex: 'num',
|
|
16306
|
+
title: "\u6570\u91CF",
|
|
16307
|
+
width: 100,
|
|
16308
|
+
render: function render(val, record, index) {
|
|
16309
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16310
|
+
style: {
|
|
16311
|
+
width: 70
|
|
16312
|
+
},
|
|
16313
|
+
value: val,
|
|
16314
|
+
min: 1,
|
|
16315
|
+
precision: 0,
|
|
16316
|
+
onChange: function onChange(num) {
|
|
16317
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
|
|
16318
|
+
}
|
|
16319
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16320
|
+
}
|
|
16321
|
+
}, {
|
|
16322
|
+
dataIndex: 'payment',
|
|
16323
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16324
|
+
width: 150,
|
|
16325
|
+
render: function render(val, record, index) {
|
|
16326
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16327
|
+
style: {
|
|
16328
|
+
width: 130
|
|
16329
|
+
},
|
|
16330
|
+
value: val,
|
|
16331
|
+
min: 0,
|
|
16332
|
+
precision: 2,
|
|
16333
|
+
onChange: function onChange(num) {
|
|
16334
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16335
|
+
}
|
|
16336
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16337
|
+
}
|
|
16338
|
+
}, {
|
|
16339
|
+
dataIndex: 'price',
|
|
16340
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16341
|
+
width: 150,
|
|
16342
|
+
render: function render(val) {
|
|
16343
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16344
|
+
}
|
|
16345
|
+
}, {
|
|
16346
|
+
dataIndex: 'type',
|
|
16347
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16348
|
+
width: 150
|
|
16349
|
+
}].map(function (item) {
|
|
16350
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16351
|
+
align: 'center',
|
|
16352
|
+
ellipsis: true
|
|
16353
|
+
});
|
|
16354
|
+
}),
|
|
16355
|
+
KM_REISSUE_GOODS: [{
|
|
16356
|
+
dataIndex: 'skuPropertiesName',
|
|
16357
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16358
|
+
width: 250
|
|
16359
|
+
}, {
|
|
16360
|
+
dataIndex: 'sysTitle',
|
|
16361
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16362
|
+
width: 150
|
|
16363
|
+
}, {
|
|
16364
|
+
dataIndex: 'shortTitle',
|
|
16365
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16366
|
+
width: 150
|
|
16367
|
+
}, {
|
|
16368
|
+
dataIndex: 'title',
|
|
16369
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16370
|
+
width: 150
|
|
16371
|
+
}, {
|
|
16372
|
+
dataIndex: 'sysOuterId',
|
|
16373
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16374
|
+
width: 150
|
|
16375
|
+
}, {
|
|
16376
|
+
dataIndex: 'itemSysId',
|
|
16377
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16378
|
+
width: 150
|
|
16379
|
+
}, {
|
|
16380
|
+
dataIndex: 'skuSysId',
|
|
16381
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16382
|
+
width: 150
|
|
16383
|
+
}, {
|
|
16384
|
+
dataIndex: 'skuId',
|
|
16385
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16386
|
+
width: 170
|
|
16387
|
+
}, {
|
|
16388
|
+
dataIndex: 'realNum',
|
|
16389
|
+
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
16390
|
+
width: 100,
|
|
16391
|
+
validator: function validator(_rule, value) {
|
|
16392
|
+
var title = '';
|
|
16393
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
16394
|
+
var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
16395
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
16396
|
+
if (res) {
|
|
16397
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
16398
|
+
}
|
|
16399
|
+
return res;
|
|
16400
|
+
})) {
|
|
16401
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
16402
|
+
}
|
|
16403
|
+
},
|
|
16404
|
+
render: function render(val, record, index) {
|
|
16405
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16406
|
+
style: {
|
|
16407
|
+
width: 70
|
|
16408
|
+
},
|
|
16409
|
+
value: val,
|
|
16410
|
+
min: 1,
|
|
16411
|
+
precision: 0,
|
|
16412
|
+
onChange: function onChange(num) {
|
|
16413
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
16414
|
+
}
|
|
16415
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16416
|
+
}
|
|
16417
|
+
}, {
|
|
16418
|
+
dataIndex: 'desiredNum',
|
|
16419
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
16420
|
+
width: 100,
|
|
16421
|
+
render: function render(val, record, index) {
|
|
16422
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16423
|
+
style: {
|
|
16424
|
+
width: 70
|
|
16425
|
+
},
|
|
16426
|
+
value: val,
|
|
16427
|
+
min: 1,
|
|
16428
|
+
precision: 0,
|
|
16429
|
+
onChange: function onChange(num) {
|
|
16430
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
16431
|
+
}
|
|
16432
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val);
|
|
16433
|
+
}
|
|
16434
|
+
}, {
|
|
16435
|
+
dataIndex: 'price',
|
|
16436
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16437
|
+
width: 150,
|
|
16438
|
+
render: function render(val) {
|
|
16439
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16440
|
+
}
|
|
16441
|
+
}, {
|
|
16442
|
+
dataIndex: 'payment',
|
|
16443
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16444
|
+
width: 150,
|
|
16445
|
+
render: function render(val, record, index) {
|
|
16446
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
16447
|
+
style: {
|
|
16448
|
+
width: 130
|
|
16449
|
+
},
|
|
16450
|
+
value: val,
|
|
16451
|
+
min: 0,
|
|
16452
|
+
precision: 2,
|
|
16453
|
+
onChange: function onChange(num) {
|
|
16454
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16455
|
+
}
|
|
16456
|
+
}) : /*#__PURE__*/React__default['default'].createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16457
|
+
}
|
|
16458
|
+
}, {
|
|
16459
|
+
dataIndex: 'type',
|
|
16460
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16461
|
+
width: 150
|
|
16462
|
+
}, {
|
|
16463
|
+
dataIndex: 'sysPicPath',
|
|
16464
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16465
|
+
width: 100,
|
|
16466
|
+
render: function render(val) {
|
|
16467
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Image, {
|
|
16468
|
+
width: 60,
|
|
16469
|
+
src: val
|
|
16470
|
+
});
|
|
16471
|
+
}
|
|
16472
|
+
}].map(function (item) {
|
|
16473
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16474
|
+
align: 'center',
|
|
16475
|
+
ellipsis: true
|
|
16476
|
+
});
|
|
16477
|
+
})
|
|
16478
|
+
};
|
|
16479
|
+
};
|
|
16480
|
+
|
|
16481
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
16482
|
+
var _ref$text = _ref.text,
|
|
16483
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
16484
|
+
disabled = _ref.disabled,
|
|
16485
|
+
updateHandle = _ref.updateHandle;
|
|
16486
|
+
return {
|
|
16487
|
+
//bs商品信息
|
|
16488
|
+
default: [{
|
|
16489
|
+
dataIndex: 'mark',
|
|
16490
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
16491
|
+
align: 'center',
|
|
16492
|
+
ellipsis: true,
|
|
16493
|
+
width: 70,
|
|
16494
|
+
render: function render(val, record, index) {
|
|
15661
16495
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
15662
16496
|
options: [{
|
|
15663
16497
|
label: '是',
|
|
@@ -15757,7 +16591,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15757
16591
|
disabled = _ref.disabled,
|
|
15758
16592
|
updateHandle = _ref.updateHandle,
|
|
15759
16593
|
updateDataHandle = _ref.updateDataHandle;
|
|
15760
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16594
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
15761
16595
|
text: text,
|
|
15762
16596
|
disabled: disabled,
|
|
15763
16597
|
updateHandle: updateHandle
|
|
@@ -15782,8 +16616,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15782
16616
|
text: text,
|
|
15783
16617
|
disabled: disabled,
|
|
15784
16618
|
updateHandle: updateHandle
|
|
16619
|
+
})), getColumns$6({
|
|
16620
|
+
text: text,
|
|
16621
|
+
disabled: disabled,
|
|
16622
|
+
updateHandle: updateHandle
|
|
15785
16623
|
})), {}, {
|
|
15786
|
-
default: getColumns$
|
|
16624
|
+
default: getColumns$7({
|
|
15787
16625
|
text: text,
|
|
15788
16626
|
disabled: disabled,
|
|
15789
16627
|
updateHandle: updateHandle
|
|
@@ -15935,6 +16773,231 @@ function HoverTableRowDeleteIcon(_ref) {
|
|
|
15935
16773
|
})));
|
|
15936
16774
|
}
|
|
15937
16775
|
|
|
16776
|
+
var isErpType = {
|
|
16777
|
+
isWdt: function isWdt(type) {
|
|
16778
|
+
return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
|
|
16779
|
+
},
|
|
16780
|
+
isBsE3: function isBsE3(type) {
|
|
16781
|
+
return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
|
|
16782
|
+
},
|
|
16783
|
+
isGy: function isGy(type) {
|
|
16784
|
+
return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
|
|
16785
|
+
},
|
|
16786
|
+
isJst: function isJst(type) {
|
|
16787
|
+
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
16788
|
+
},
|
|
16789
|
+
isKm: function isKm(type) {
|
|
16790
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
16791
|
+
}
|
|
16792
|
+
};
|
|
16793
|
+
var processGoods = function processGoods(_ref) {
|
|
16794
|
+
var list = _ref.list,
|
|
16795
|
+
type = _ref.type,
|
|
16796
|
+
canUpdateNumber = _ref.canUpdateNumber;
|
|
16797
|
+
var newList = [];
|
|
16798
|
+
// 根据商品类型处理数据
|
|
16799
|
+
if (isErpType.isWdt(type)) {
|
|
16800
|
+
newList = processWdtGoods({
|
|
16801
|
+
list: list,
|
|
16802
|
+
type: type,
|
|
16803
|
+
canUpdateNumber: canUpdateNumber
|
|
16804
|
+
});
|
|
16805
|
+
} else if (isErpType.isBsE3(type)) {
|
|
16806
|
+
newList = processBsE3Goods({
|
|
16807
|
+
list: list,
|
|
16808
|
+
type: type,
|
|
16809
|
+
canUpdateNumber: canUpdateNumber
|
|
16810
|
+
});
|
|
16811
|
+
} else if (isErpType.isGy(type)) {
|
|
16812
|
+
newList = processGyGoods({
|
|
16813
|
+
list: list,
|
|
16814
|
+
type: type,
|
|
16815
|
+
canUpdateNumber: canUpdateNumber
|
|
16816
|
+
});
|
|
16817
|
+
} else if (isErpType.isJst(type)) {
|
|
16818
|
+
newList = processJstGoods({
|
|
16819
|
+
list: list,
|
|
16820
|
+
type: type,
|
|
16821
|
+
canUpdateNumber: canUpdateNumber
|
|
16822
|
+
});
|
|
16823
|
+
} else if (isErpType.isKm(type)) {
|
|
16824
|
+
newList = processKmGoods({
|
|
16825
|
+
list: list,
|
|
16826
|
+
type: type,
|
|
16827
|
+
canUpdateNumber: canUpdateNumber
|
|
16828
|
+
});
|
|
16829
|
+
} else {
|
|
16830
|
+
newList = processDefaultGoods({
|
|
16831
|
+
list: list,
|
|
16832
|
+
type: type,
|
|
16833
|
+
canUpdateNumber: canUpdateNumber
|
|
16834
|
+
});
|
|
16835
|
+
}
|
|
16836
|
+
return newList;
|
|
16837
|
+
};
|
|
16838
|
+
// 处理不同类型的商品数据
|
|
16839
|
+
var processWdtGoods = function processWdtGoods(_ref2) {
|
|
16840
|
+
var list = _ref2.list,
|
|
16841
|
+
type = _ref2.type,
|
|
16842
|
+
canUpdateNumber = _ref2.canUpdateNumber;
|
|
16843
|
+
return list.map(function (item) {
|
|
16844
|
+
var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16845
|
+
uuid: kmkfUtils.uuid(),
|
|
16846
|
+
canDelete: true,
|
|
16847
|
+
num: 1,
|
|
16848
|
+
orderPrice: 0,
|
|
16849
|
+
sharePrice: 0,
|
|
16850
|
+
canUpdateNumber: canUpdateNumber
|
|
16851
|
+
});
|
|
16852
|
+
// 特殊处理换货商品
|
|
16853
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16854
|
+
processedItem.price = item.retailPrice;
|
|
16855
|
+
processedItem.type = '1';
|
|
16856
|
+
}
|
|
16857
|
+
return processedItem;
|
|
16858
|
+
});
|
|
16859
|
+
};
|
|
16860
|
+
var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
16861
|
+
var list = _ref3.list,
|
|
16862
|
+
canUpdateNumber = _ref3.canUpdateNumber;
|
|
16863
|
+
return list.map(function (item) {
|
|
16864
|
+
var specNo = item.specNo,
|
|
16865
|
+
specId = item.specId,
|
|
16866
|
+
goodName = item.goodName,
|
|
16867
|
+
goodShortName = item.goodShortName,
|
|
16868
|
+
goodPicUrl = item.goodPicUrl,
|
|
16869
|
+
goodNo = item.goodNo,
|
|
16870
|
+
goodId = item.goodId,
|
|
16871
|
+
retailPrice = item.retailPrice;
|
|
16872
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16873
|
+
sku: specNo,
|
|
16874
|
+
skuId: specId,
|
|
16875
|
+
goodsName: goodName,
|
|
16876
|
+
goodsShortName: goodShortName,
|
|
16877
|
+
picPath: goodPicUrl,
|
|
16878
|
+
goodsSn: goodNo,
|
|
16879
|
+
goodsId: goodId,
|
|
16880
|
+
goodsPrice: retailPrice,
|
|
16881
|
+
shopPrice: retailPrice,
|
|
16882
|
+
sharePayment: '',
|
|
16883
|
+
sharePrice: '',
|
|
16884
|
+
payment: '',
|
|
16885
|
+
tcSku: '',
|
|
16886
|
+
tcGoodsNumber: '',
|
|
16887
|
+
taoCanSingleSl: '',
|
|
16888
|
+
isGift: '',
|
|
16889
|
+
uuid: kmkfUtils.uuid(),
|
|
16890
|
+
canDelete: true,
|
|
16891
|
+
canEdit: true,
|
|
16892
|
+
goodsNumber: 1,
|
|
16893
|
+
canUpdateNumber: canUpdateNumber
|
|
16894
|
+
});
|
|
16895
|
+
});
|
|
16896
|
+
};
|
|
16897
|
+
var processGyGoods = function processGyGoods(_ref4) {
|
|
16898
|
+
var list = _ref4.list;
|
|
16899
|
+
return list.map(function (item) {
|
|
16900
|
+
var goodName = item.goodName,
|
|
16901
|
+
goodShortName = item.goodShortName,
|
|
16902
|
+
goodNo = item.goodNo,
|
|
16903
|
+
specName = item.specName,
|
|
16904
|
+
specNo = item.specNo,
|
|
16905
|
+
retailPrice = item.retailPrice;
|
|
16906
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16907
|
+
uuid: kmkfUtils.uuid(),
|
|
16908
|
+
canDelete: true,
|
|
16909
|
+
canEdit: true,
|
|
16910
|
+
qty: 1,
|
|
16911
|
+
goodName: goodName,
|
|
16912
|
+
goodShortName: goodShortName,
|
|
16913
|
+
goodNo: goodNo,
|
|
16914
|
+
specName: specName,
|
|
16915
|
+
specNo: specNo,
|
|
16916
|
+
originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16917
|
+
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
16918
|
+
});
|
|
16919
|
+
});
|
|
16920
|
+
};
|
|
16921
|
+
var processJstGoods = function processJstGoods(_ref5) {
|
|
16922
|
+
var list = _ref5.list;
|
|
16923
|
+
return list.map(function (item) {
|
|
16924
|
+
return {
|
|
16925
|
+
name: item.goodName,
|
|
16926
|
+
skuId: item.goodNo,
|
|
16927
|
+
iId: item.styleCode,
|
|
16928
|
+
pic: item.goodPicUrl,
|
|
16929
|
+
propertiesValue: item.propertiesValue,
|
|
16930
|
+
saleBasePrice: item.retailPrice,
|
|
16931
|
+
salePrice: item.retailPrice,
|
|
16932
|
+
remark: '',
|
|
16933
|
+
uuid: kmkfUtils.uuid(),
|
|
16934
|
+
canDelete: true,
|
|
16935
|
+
canEdit: true,
|
|
16936
|
+
qty: 1
|
|
16937
|
+
};
|
|
16938
|
+
});
|
|
16939
|
+
};
|
|
16940
|
+
var processKmGoods = function processKmGoods(_ref6) {
|
|
16941
|
+
var list = _ref6.list,
|
|
16942
|
+
type = _ref6.type;
|
|
16943
|
+
var initParamsMap = {
|
|
16944
|
+
KM_GOODS: {
|
|
16945
|
+
num: 1
|
|
16946
|
+
},
|
|
16947
|
+
KM_REISSUE_GOODS: {
|
|
16948
|
+
realNum: 1,
|
|
16949
|
+
desiredNum: 1
|
|
16950
|
+
}
|
|
16951
|
+
};
|
|
16952
|
+
return list.map(function (item) {
|
|
16953
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16954
|
+
skuPropertiesName: item.specName,
|
|
16955
|
+
sysTitle: item.goodName,
|
|
16956
|
+
title: null,
|
|
16957
|
+
shortTitle: item.goodShortName,
|
|
16958
|
+
sysOuterId: item.goodNo,
|
|
16959
|
+
outerId: item.goodNo,
|
|
16960
|
+
skuSysId: item.specId,
|
|
16961
|
+
itemSysId: item.goodId,
|
|
16962
|
+
sysPicPath: item.goodPicUrl,
|
|
16963
|
+
payment: null,
|
|
16964
|
+
price: item.retailPrice,
|
|
16965
|
+
type: null,
|
|
16966
|
+
uuid: kmkfUtils.uuid(),
|
|
16967
|
+
canDelete: true,
|
|
16968
|
+
canEdit: true
|
|
16969
|
+
}, initParamsMap[type] || {});
|
|
16970
|
+
});
|
|
16971
|
+
};
|
|
16972
|
+
var processDefaultGoods = function processDefaultGoods(_ref7) {
|
|
16973
|
+
var list = _ref7.list,
|
|
16974
|
+
canUpdateNumber = _ref7.canUpdateNumber;
|
|
16975
|
+
return list.map(function (item) {
|
|
16976
|
+
var goodsId = item.goodsId,
|
|
16977
|
+
name = item.name,
|
|
16978
|
+
code = item.code,
|
|
16979
|
+
skuCode = item.skuCode,
|
|
16980
|
+
marketPrice = item.marketPrice,
|
|
16981
|
+
skuName = item.skuName;
|
|
16982
|
+
return {
|
|
16983
|
+
id: goodsId,
|
|
16984
|
+
mark: '是',
|
|
16985
|
+
pic: '',
|
|
16986
|
+
skuName: skuName,
|
|
16987
|
+
name: name,
|
|
16988
|
+
code: code,
|
|
16989
|
+
sku: skuCode,
|
|
16990
|
+
money: marketPrice || 0,
|
|
16991
|
+
share: marketPrice || 0,
|
|
16992
|
+
number: 1,
|
|
16993
|
+
type: '',
|
|
16994
|
+
uuid: kmkfUtils.uuid(),
|
|
16995
|
+
canDelete: true,
|
|
16996
|
+
canUpdateNumber: canUpdateNumber
|
|
16997
|
+
};
|
|
16998
|
+
});
|
|
16999
|
+
};
|
|
17000
|
+
|
|
15938
17001
|
var GoodsModalMap = {
|
|
15939
17002
|
WDT_REISSUE_GOODS: WdtGoodsModal,
|
|
15940
17003
|
WDT_GOODS: WdtGoodsModal,
|
|
@@ -15949,6 +17012,8 @@ var GoodsModalMap = {
|
|
|
15949
17012
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15950
17013
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
15951
17014
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
17015
|
+
KM_GOODS: KmGoodsModal,
|
|
17016
|
+
KM_REISSUE_GOODS: KmGoodsModal,
|
|
15952
17017
|
OTHER_GOODS: GoodsModal$2
|
|
15953
17018
|
};
|
|
15954
17019
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -15982,7 +17047,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15982
17047
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15983
17048
|
}));
|
|
15984
17049
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15985
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
17050
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15986
17051
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15987
17052
|
};
|
|
15988
17053
|
var rowSelection = {
|
|
@@ -16011,6 +17076,9 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
16011
17076
|
};
|
|
16012
17077
|
var getButtonText = function getButtonText() {
|
|
16013
17078
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
17079
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
17080
|
+
return '选择快麦ERP商品';
|
|
17081
|
+
}
|
|
16014
17082
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16015
17083
|
return '选择百胜ERP商品';
|
|
16016
17084
|
}
|
|
@@ -16154,6 +17222,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16154
17222
|
case 'JST_RETURN_GOODS':
|
|
16155
17223
|
case 'GY_REISSUE_GOODS':
|
|
16156
17224
|
case 'GY_RETURN_GOODS':
|
|
17225
|
+
case 'KM_GOODS':
|
|
17226
|
+
case 'KM_REISSUE_GOODS':
|
|
16157
17227
|
{
|
|
16158
17228
|
columns = getColumnsMap$1({
|
|
16159
17229
|
text: text,
|
|
@@ -16271,120 +17341,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16271
17341
|
}].concat(_toConsumableArray(columns));
|
|
16272
17342
|
}, []);
|
|
16273
17343
|
var onSubmit = function onSubmit(list) {
|
|
16274
|
-
var newList =
|
|
16275
|
-
|
|
16276
|
-
|
|
16277
|
-
|
|
16278
|
-
|
|
16279
|
-
item.num = 1;
|
|
16280
|
-
item.orderPrice = 0;
|
|
16281
|
-
item.sharePrice = 0;
|
|
16282
|
-
item.canUpdateNumber = canUpdateNumber;
|
|
16283
|
-
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16284
|
-
item.price = item.retailPrice;
|
|
16285
|
-
item.type = '1';
|
|
16286
|
-
}
|
|
16287
|
-
return item;
|
|
16288
|
-
});
|
|
16289
|
-
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16290
|
-
newList = list.map(function (item) {
|
|
16291
|
-
var specNo = item.specNo,
|
|
16292
|
-
specId = item.specId,
|
|
16293
|
-
goodName = item.goodName,
|
|
16294
|
-
goodShortName = item.goodShortName,
|
|
16295
|
-
goodPicUrl = item.goodPicUrl,
|
|
16296
|
-
goodNo = item.goodNo,
|
|
16297
|
-
goodId = item.goodId,
|
|
16298
|
-
retailPrice = item.retailPrice;
|
|
16299
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16300
|
-
sku: specNo,
|
|
16301
|
-
skuId: specId,
|
|
16302
|
-
goodsName: goodName,
|
|
16303
|
-
goodsShortName: goodShortName,
|
|
16304
|
-
picPath: goodPicUrl,
|
|
16305
|
-
goodsSn: goodNo,
|
|
16306
|
-
goodsId: goodId,
|
|
16307
|
-
goodsPrice: retailPrice,
|
|
16308
|
-
shopPrice: retailPrice,
|
|
16309
|
-
sharePayment: '',
|
|
16310
|
-
sharePrice: '',
|
|
16311
|
-
payment: '',
|
|
16312
|
-
tcSku: '',
|
|
16313
|
-
tcGoodsNumber: '',
|
|
16314
|
-
taoCanSingleSl: '',
|
|
16315
|
-
isGift: '',
|
|
16316
|
-
uuid: kmkfUtils.uuid(),
|
|
16317
|
-
canDelete: true,
|
|
16318
|
-
canEdit: true,
|
|
16319
|
-
goodsNumber: 1,
|
|
16320
|
-
canUpdateNumber: canUpdateNumber
|
|
16321
|
-
});
|
|
16322
|
-
});
|
|
16323
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16324
|
-
newList = list.map(function (item) {
|
|
16325
|
-
var goodName = item.goodName,
|
|
16326
|
-
goodShortName = item.goodShortName,
|
|
16327
|
-
goodNo = item.goodNo,
|
|
16328
|
-
specName = item.specName,
|
|
16329
|
-
specNo = item.specNo,
|
|
16330
|
-
retailPrice = item.retailPrice;
|
|
16331
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16332
|
-
uuid: kmkfUtils.uuid(),
|
|
16333
|
-
canDelete: true,
|
|
16334
|
-
canEdit: true,
|
|
16335
|
-
qty: 1,
|
|
16336
|
-
goodName: goodName,
|
|
16337
|
-
goodShortName: goodShortName,
|
|
16338
|
-
goodNo: goodNo,
|
|
16339
|
-
specName: specName,
|
|
16340
|
-
specNo: specNo,
|
|
16341
|
-
originPrice: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16342
|
-
originAmount: !kmkfUtils.isNull(retailPrice) ? Number(retailPrice) : null
|
|
16343
|
-
});
|
|
16344
|
-
});
|
|
16345
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
16346
|
-
newList = list.map(function (item) {
|
|
16347
|
-
return {
|
|
16348
|
-
name: item.goodName,
|
|
16349
|
-
skuId: item.goodNo,
|
|
16350
|
-
iId: item.styleCode,
|
|
16351
|
-
pic: item.goodPicUrl,
|
|
16352
|
-
propertiesValue: item.propertiesValue,
|
|
16353
|
-
saleBasePrice: item.retailPrice,
|
|
16354
|
-
salePrice: item.retailPrice,
|
|
16355
|
-
remark: '',
|
|
16356
|
-
uuid: kmkfUtils.uuid(),
|
|
16357
|
-
canDelete: true,
|
|
16358
|
-
canEdit: true,
|
|
16359
|
-
qty: 1
|
|
16360
|
-
};
|
|
16361
|
-
});
|
|
16362
|
-
} else {
|
|
16363
|
-
newList = list.map(function (item) {
|
|
16364
|
-
var goodsId = item.goodsId,
|
|
16365
|
-
name = item.name,
|
|
16366
|
-
code = item.code,
|
|
16367
|
-
skuCode = item.skuCode,
|
|
16368
|
-
marketPrice = item.marketPrice,
|
|
16369
|
-
skuName = item.skuName;
|
|
16370
|
-
return {
|
|
16371
|
-
id: goodsId,
|
|
16372
|
-
mark: '是',
|
|
16373
|
-
pic: '',
|
|
16374
|
-
skuName: skuName,
|
|
16375
|
-
name: name,
|
|
16376
|
-
code: code,
|
|
16377
|
-
sku: skuCode,
|
|
16378
|
-
money: marketPrice || 0,
|
|
16379
|
-
share: marketPrice || 0,
|
|
16380
|
-
number: 1,
|
|
16381
|
-
type: '',
|
|
16382
|
-
uuid: kmkfUtils.uuid(),
|
|
16383
|
-
canDelete: true,
|
|
16384
|
-
canUpdateNumber: canUpdateNumber
|
|
16385
|
-
};
|
|
16386
|
-
});
|
|
16387
|
-
}
|
|
17344
|
+
var newList = processGoods({
|
|
17345
|
+
list: list,
|
|
17346
|
+
canUpdateNumber: canUpdateNumber,
|
|
17347
|
+
type: type
|
|
17348
|
+
});
|
|
16388
17349
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
16389
17350
|
};
|
|
16390
17351
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -17098,10 +18059,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
17098
18059
|
var _data$data, _data$data$trades;
|
|
17099
18060
|
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) {
|
|
17100
18061
|
data.data.trades = kmkfUtils.filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
18062
|
+
var _tradeStatusMap$data$;
|
|
17101
18063
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17102
18064
|
billNo: item.tradeNo,
|
|
17103
18065
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
17104
|
-
billTag: item.tagName
|
|
18066
|
+
billTag: item.tagName,
|
|
18067
|
+
tradeStatusValue: kmkfUtils.tradeStatusMap === null || kmkfUtils.tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = kmkfUtils.tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
|
|
17105
18068
|
});
|
|
17106
18069
|
});
|
|
17107
18070
|
}
|
|
@@ -17144,6 +18107,10 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
|
17144
18107
|
data.data.orderList = kmkfUtils.filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo);
|
|
17145
18108
|
}
|
|
17146
18109
|
resolve(data.data);
|
|
18110
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18111
|
+
setTimeout(function () {
|
|
18112
|
+
singletonMap$1.delete(orderNo);
|
|
18113
|
+
}, 1000 * 10);
|
|
17147
18114
|
} else {
|
|
17148
18115
|
doReject(data);
|
|
17149
18116
|
}
|
|
@@ -17184,6 +18151,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
17184
18151
|
deliveryState: item.deliveryState,
|
|
17185
18152
|
vipCode: item.vipCode,
|
|
17186
18153
|
shopCode: item.shopCode,
|
|
18154
|
+
cancelName: item.cancel ? '是' : '否',
|
|
17187
18155
|
deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
17188
18156
|
});
|
|
17189
18157
|
});
|
|
@@ -17221,6 +18189,10 @@ var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
|
17221
18189
|
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
17222
18190
|
}, orderNo);
|
|
17223
18191
|
resolve(data.data);
|
|
18192
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18193
|
+
setTimeout(function () {
|
|
18194
|
+
singletonMap$3.delete(orderNo);
|
|
18195
|
+
}, 1000 * 10);
|
|
17224
18196
|
} else {
|
|
17225
18197
|
doReject(data);
|
|
17226
18198
|
}
|
|
@@ -17264,16 +18236,84 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
17264
18236
|
singletonMap$4.delete(orderNo);
|
|
17265
18237
|
reject(err);
|
|
17266
18238
|
};
|
|
17267
|
-
extendRequest('/qy/gdfw/order/
|
|
18239
|
+
extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
17268
18240
|
method: 'post',
|
|
17269
18241
|
data: {
|
|
17270
|
-
|
|
18242
|
+
billNo: orderNo
|
|
17271
18243
|
}
|
|
17272
18244
|
}).then(function (data) {
|
|
17273
18245
|
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
17274
|
-
|
|
17275
|
-
|
|
17276
|
-
|
|
18246
|
+
resolve(data.data);
|
|
18247
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18248
|
+
setTimeout(function () {
|
|
18249
|
+
singletonMap$4.delete(orderNo);
|
|
18250
|
+
}, 1000 * 10);
|
|
18251
|
+
} else {
|
|
18252
|
+
doReject(data);
|
|
18253
|
+
}
|
|
18254
|
+
}).catch(doReject);
|
|
18255
|
+
});
|
|
18256
|
+
singletonMap$4.set(orderNo, p);
|
|
18257
|
+
}
|
|
18258
|
+
return singletonMap$4.get(orderNo);
|
|
18259
|
+
};
|
|
18260
|
+
var wlnUtils = {
|
|
18261
|
+
getOrderListSingleton: getOrderListSingleton
|
|
18262
|
+
};
|
|
18263
|
+
|
|
18264
|
+
var singletonMap$5 = new Map();
|
|
18265
|
+
var getOrderListSingleton$1 = function getOrderListSingleton(orderNo) {
|
|
18266
|
+
if (!singletonMap$5.has(orderNo)) {
|
|
18267
|
+
var p = new Promise(function (resolve, reject) {
|
|
18268
|
+
var doReject = function doReject(err) {
|
|
18269
|
+
// 清空掉错误的请求记录
|
|
18270
|
+
singletonMap$5.delete(orderNo);
|
|
18271
|
+
reject(err);
|
|
18272
|
+
};
|
|
18273
|
+
extendRequest('/qy/gdfw/order/bsOrderDetail', {
|
|
18274
|
+
method: 'post',
|
|
18275
|
+
data: {
|
|
18276
|
+
billNo: orderNo
|
|
18277
|
+
}
|
|
18278
|
+
}).then(function (data) {
|
|
18279
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
18280
|
+
resolve(data.data);
|
|
18281
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18282
|
+
setTimeout(function () {
|
|
18283
|
+
singletonMap$5.delete(orderNo);
|
|
18284
|
+
}, 1000 * 10);
|
|
18285
|
+
} else {
|
|
18286
|
+
doReject(data);
|
|
18287
|
+
}
|
|
18288
|
+
}).catch(doReject);
|
|
18289
|
+
});
|
|
18290
|
+
singletonMap$5.set(orderNo, p);
|
|
18291
|
+
}
|
|
18292
|
+
return singletonMap$5.get(orderNo);
|
|
18293
|
+
};
|
|
18294
|
+
var bsUtils = {
|
|
18295
|
+
getOrderListSingleton: getOrderListSingleton$1
|
|
18296
|
+
};
|
|
18297
|
+
|
|
18298
|
+
var singletonMap$6 = new Map();
|
|
18299
|
+
var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
|
|
18300
|
+
if (!singletonMap$6.has(orderNo)) {
|
|
18301
|
+
var p = new Promise(function (resolve, reject) {
|
|
18302
|
+
var doReject = function doReject(err) {
|
|
18303
|
+
// 清空掉错误的请求记录
|
|
18304
|
+
singletonMap$6.delete(orderNo);
|
|
18305
|
+
reject(err);
|
|
18306
|
+
};
|
|
18307
|
+
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
18308
|
+
method: 'post',
|
|
18309
|
+
data: {
|
|
18310
|
+
tid: orderNo
|
|
18311
|
+
}
|
|
18312
|
+
}).then(function (data) {
|
|
18313
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
18314
|
+
var _data$data, _data$data$orderDetai;
|
|
18315
|
+
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderDetai = _data$data.orderDetailDtoList) === null || _data$data$orderDetai === void 0 ? void 0 : _data$data$orderDetai.length) {
|
|
18316
|
+
var list = kmkfUtils.filterKmOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
17277
18317
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17278
18318
|
billNo: item.sid,
|
|
17279
18319
|
sysStatus: item.sysStatus,
|
|
@@ -17287,22 +18327,22 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
17287
18327
|
}
|
|
17288
18328
|
// 延迟10秒清除,保证订单的时效性
|
|
17289
18329
|
setTimeout(function () {
|
|
17290
|
-
singletonMap$
|
|
18330
|
+
singletonMap$6.delete(orderNo);
|
|
17291
18331
|
}, 1000 * 10);
|
|
17292
18332
|
} else {
|
|
17293
18333
|
doReject(data);
|
|
17294
18334
|
}
|
|
17295
18335
|
}).catch(doReject);
|
|
17296
18336
|
});
|
|
17297
|
-
singletonMap$
|
|
18337
|
+
singletonMap$6.set(orderNo, p);
|
|
17298
18338
|
}
|
|
17299
|
-
return singletonMap$
|
|
18339
|
+
return singletonMap$6.get(orderNo);
|
|
17300
18340
|
};
|
|
17301
18341
|
var kmUtils = {
|
|
17302
|
-
getOrderListSingleton: getOrderListSingleton
|
|
18342
|
+
getOrderListSingleton: getOrderListSingleton$2
|
|
17303
18343
|
};
|
|
17304
18344
|
|
|
17305
|
-
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18345
|
+
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
|
|
17306
18346
|
var columnsMap = {
|
|
17307
18347
|
BS_SYSTEM_ORDER: kmkfUtils.BS_SYSTEM_ORDER_CONFIG.columns,
|
|
17308
18348
|
KM_SYSTEM_ORDER: kmkfUtils.KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -17344,7 +18384,6 @@ var index$3 = (function (props) {
|
|
|
17344
18384
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17345
18385
|
getBsE3OrderList(value.orderNo);
|
|
17346
18386
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17347
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17348
18387
|
getGyOrderList(value.orderNo);
|
|
17349
18388
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17350
18389
|
getJstOrderList(value.orderNo);
|
|
@@ -17356,22 +18395,11 @@ var index$3 = (function (props) {
|
|
|
17356
18395
|
}, [type]);
|
|
17357
18396
|
var getOrderList = /*#__PURE__*/function () {
|
|
17358
18397
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17359
|
-
var _yield$request, success, data, _valueRef$current;
|
|
17360
18398
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17361
18399
|
while (1) switch (_context.prev = _context.next) {
|
|
17362
18400
|
case 0:
|
|
17363
|
-
|
|
17364
|
-
|
|
17365
|
-
method: 'post',
|
|
17366
|
-
data: {
|
|
17367
|
-
billNo: orderNo
|
|
17368
|
-
}
|
|
17369
|
-
});
|
|
17370
|
-
case 2:
|
|
17371
|
-
_yield$request = _context.sent;
|
|
17372
|
-
success = _yield$request.success;
|
|
17373
|
-
data = _yield$request.data;
|
|
17374
|
-
if (success) {
|
|
18401
|
+
bsUtils.getOrderListSingleton(orderNo).then(function (data) {
|
|
18402
|
+
var _valueRef$current;
|
|
17375
18403
|
_onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, {
|
|
17376
18404
|
orders: (data === null || data === void 0 ? void 0 : data.orders) || [],
|
|
17377
18405
|
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
@@ -17385,10 +18413,10 @@ var index$3 = (function (props) {
|
|
|
17385
18413
|
};
|
|
17386
18414
|
})
|
|
17387
18415
|
}));
|
|
17388
|
-
}
|
|
18416
|
+
});
|
|
17389
18417
|
|
|
17390
18418
|
onceRef.current = false;
|
|
17391
|
-
case
|
|
18419
|
+
case 2:
|
|
17392
18420
|
case "end":
|
|
17393
18421
|
return _context.stop();
|
|
17394
18422
|
}
|
|
@@ -17400,22 +18428,11 @@ var index$3 = (function (props) {
|
|
|
17400
18428
|
}();
|
|
17401
18429
|
var getWlnOrderList = /*#__PURE__*/function () {
|
|
17402
18430
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
17403
|
-
var _yield$request2, success, data, _valueRef$current2;
|
|
17404
18431
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
17405
18432
|
while (1) switch (_context2.prev = _context2.next) {
|
|
17406
18433
|
case 0:
|
|
17407
|
-
|
|
17408
|
-
|
|
17409
|
-
method: 'post',
|
|
17410
|
-
data: {
|
|
17411
|
-
billCode: orderNo
|
|
17412
|
-
}
|
|
17413
|
-
});
|
|
17414
|
-
case 2:
|
|
17415
|
-
_yield$request2 = _context2.sent;
|
|
17416
|
-
success = _yield$request2.success;
|
|
17417
|
-
data = _yield$request2.data;
|
|
17418
|
-
if (success) {
|
|
18434
|
+
wlnUtils.getOrderListSingleton(orderNo).then(function (data) {
|
|
18435
|
+
var _valueRef$current2;
|
|
17419
18436
|
_onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}), {}, {
|
|
17420
18437
|
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
17421
18438
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -17432,9 +18449,9 @@ var index$3 = (function (props) {
|
|
|
17432
18449
|
};
|
|
17433
18450
|
})
|
|
17434
18451
|
}));
|
|
17435
|
-
}
|
|
18452
|
+
});
|
|
17436
18453
|
onceRef.current = false;
|
|
17437
|
-
case
|
|
18454
|
+
case 2:
|
|
17438
18455
|
case "end":
|
|
17439
18456
|
return _context2.stop();
|
|
17440
18457
|
}
|
|
@@ -17458,11 +18475,13 @@ var index$3 = (function (props) {
|
|
|
17458
18475
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17459
18476
|
var billNo = _ref4.billNo,
|
|
17460
18477
|
billType = _ref4.billType,
|
|
17461
|
-
billTag = _ref4.billTag
|
|
18478
|
+
billTag = _ref4.billTag,
|
|
18479
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17462
18480
|
return {
|
|
17463
18481
|
billNo: billNo,
|
|
17464
18482
|
billType: billType,
|
|
17465
|
-
billTag: billTag
|
|
18483
|
+
billTag: billTag,
|
|
18484
|
+
tradeStatusValue: tradeStatusValue
|
|
17466
18485
|
};
|
|
17467
18486
|
})
|
|
17468
18487
|
}));
|
|
@@ -17576,6 +18595,7 @@ var index$3 = (function (props) {
|
|
|
17576
18595
|
deliveryState = _ref10.deliveryState,
|
|
17577
18596
|
vipCode = _ref10.vipCode,
|
|
17578
18597
|
shopCode = _ref10.shopCode,
|
|
18598
|
+
cancel = _ref10.cancel,
|
|
17579
18599
|
rest = _objectWithoutProperties(_ref10, _excluded$h);
|
|
17580
18600
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17581
18601
|
billNo: billNo,
|
|
@@ -17583,6 +18603,7 @@ var index$3 = (function (props) {
|
|
|
17583
18603
|
billTag: billTag,
|
|
17584
18604
|
tradeTagName: tradeTagName,
|
|
17585
18605
|
deliveryState: deliveryState,
|
|
18606
|
+
cancelName: cancel ? '是' : '否',
|
|
17586
18607
|
deliveryStateName: kmkfUtils.GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
17587
18608
|
vipCode: vipCode,
|
|
17588
18609
|
shopCode: shopCode
|
|
@@ -17772,6 +18793,31 @@ var componentMap$1 = {
|
|
|
17772
18793
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
17773
18794
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
17774
18795
|
}
|
|
18796
|
+
},
|
|
18797
|
+
KM_GOODS: {
|
|
18798
|
+
type: 'km',
|
|
18799
|
+
key: 'kmGoods',
|
|
18800
|
+
name: '快麦',
|
|
18801
|
+
orderNo: 'tid',
|
|
18802
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
18803
|
+
eventNameMap: {
|
|
18804
|
+
// pubsub 事件
|
|
18805
|
+
type: 'kmType',
|
|
18806
|
+
updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
|
|
18807
|
+
selectListReturn: 'kmSelectListReturn',
|
|
18808
|
+
selectList: 'kmSelectList',
|
|
18809
|
+
reissueSelectList: 'kmReissueSelectList',
|
|
18810
|
+
reissueSelectListReturn: 'kmReissueSelectListReturn',
|
|
18811
|
+
reissueDeleteGood: 'kmReissueDeleteGood',
|
|
18812
|
+
changeShopCode: 'kmChangeShopCode',
|
|
18813
|
+
reissueType: 'kmReissueType',
|
|
18814
|
+
returnType: 'kmReturnType',
|
|
18815
|
+
returnSelectListReturn: 'kmReturnSelectListReturn',
|
|
18816
|
+
returnSelectList: 'kmReturnSelectList',
|
|
18817
|
+
deleteGood: 'kmDeleteGood',
|
|
18818
|
+
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18819
|
+
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18820
|
+
}
|
|
17775
18821
|
}
|
|
17776
18822
|
};
|
|
17777
18823
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17780,7 +18826,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17780
18826
|
disabled = props.disabled,
|
|
17781
18827
|
onChange = props.onChange,
|
|
17782
18828
|
compType = props.type;
|
|
17783
|
-
console.log('value?.orders', value
|
|
18829
|
+
// console.log('value?.orders', value?.orders);
|
|
17784
18830
|
// 合并单订单会包含","
|
|
17785
18831
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17786
18832
|
var _order$componentMap$c;
|
|
@@ -17933,7 +18979,9 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17933
18979
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
17934
18980
|
var mode = _ref2.mode;
|
|
17935
18981
|
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
17936
|
-
var goodDetails = updateHandle(value.orders || []
|
|
18982
|
+
var goodDetails = updateHandle(value.orders || [], {
|
|
18983
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
18984
|
+
});
|
|
17937
18985
|
var orderNo = value.orderNo;
|
|
17938
18986
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
17939
18987
|
var _componentMap$compTyp;
|
|
@@ -17987,7 +19035,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
17987
19035
|
_props$reasonList = props.reasonList,
|
|
17988
19036
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17989
19037
|
disabled = props.disabled,
|
|
17990
|
-
compType = props.type
|
|
19038
|
+
compType = props.type,
|
|
19039
|
+
isSettingConfig = props.isSettingConfig;
|
|
17991
19040
|
var valueRef = React.useRef({});
|
|
17992
19041
|
React.useEffect(function () {
|
|
17993
19042
|
var subscription = pubsub__default['default'].subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
@@ -18079,7 +19128,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18079
19128
|
var newValue = _objectSpread2({}, value);
|
|
18080
19129
|
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
18081
19130
|
newValue[componentMap$2[compType].valueKey] = [];
|
|
18082
|
-
if (['2'].includes(val[0])) {
|
|
19131
|
+
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
18083
19132
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18084
19133
|
valueRef.current = newValue;
|
|
18085
19134
|
}
|
|
@@ -18101,7 +19150,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18101
19150
|
style: {
|
|
18102
19151
|
marginBottom: '8px'
|
|
18103
19152
|
},
|
|
18104
|
-
disabled: disabled,
|
|
19153
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18105
19154
|
allowClear: false,
|
|
18106
19155
|
options: reasonList,
|
|
18107
19156
|
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
@@ -18283,7 +19332,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
18283
19332
|
})));
|
|
18284
19333
|
};
|
|
18285
19334
|
|
|
18286
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19335
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18287
19336
|
var typeMap$1 = {
|
|
18288
19337
|
WDT_REISSUE_GOODS: {
|
|
18289
19338
|
key: 'wdtReissueGoods',
|
|
@@ -18304,13 +19353,14 @@ var typeMap$1 = {
|
|
|
18304
19353
|
}
|
|
18305
19354
|
};
|
|
18306
19355
|
var wdtReissue = function wdtReissue(props) {
|
|
18307
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
19356
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18308
19357
|
var value = props.value,
|
|
18309
19358
|
onChange = props.onChange,
|
|
18310
19359
|
_props$reasonList = props.reasonList,
|
|
18311
19360
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18312
19361
|
disabled = props.disabled,
|
|
18313
19362
|
type = props.type,
|
|
19363
|
+
isSettingConfig = props.isSettingConfig,
|
|
18314
19364
|
other = _objectWithoutProperties(props, _excluded$i);
|
|
18315
19365
|
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) {
|
|
18316
19366
|
var _order$srcTid;
|
|
@@ -18374,11 +19424,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18374
19424
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18375
19425
|
var billNo = _ref2.billNo,
|
|
18376
19426
|
billType = _ref2.billType,
|
|
18377
|
-
billTag = _ref2.billTag
|
|
19427
|
+
billTag = _ref2.billTag,
|
|
19428
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18378
19429
|
return {
|
|
18379
19430
|
billNo: billNo,
|
|
18380
19431
|
billType: billType,
|
|
18381
|
-
billTag: billTag
|
|
19432
|
+
billTag: billTag,
|
|
19433
|
+
tradeStatusValue: tradeStatusValue
|
|
18382
19434
|
};
|
|
18383
19435
|
});
|
|
18384
19436
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
|
|
@@ -18461,7 +19513,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18461
19513
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18462
19514
|
};
|
|
18463
19515
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18464
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
19516
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18465
19517
|
var newValue = _objectSpread2({}, value);
|
|
18466
19518
|
// 原订单商品
|
|
18467
19519
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18472,14 +19524,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18472
19524
|
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18473
19525
|
return skuList.includes(item.uuid);
|
|
18474
19526
|
});
|
|
18475
|
-
console.log('商品发生变化', newValue[
|
|
19527
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18476
19528
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18477
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19529
|
+
}, [value === null || value === void 0 ? void 0 : value["".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)], isStrict]);
|
|
18478
19530
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18479
19531
|
var showChangeBtn = React.useMemo(function () {
|
|
18480
|
-
var _typeMap$
|
|
18481
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18482
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19532
|
+
var _typeMap$type24;
|
|
19533
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
19534
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18483
19535
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18484
19536
|
gutter: 8,
|
|
18485
19537
|
wrap: true
|
|
@@ -18493,16 +19545,17 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18493
19545
|
}
|
|
18494
19546
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
18495
19547
|
style: {
|
|
18496
|
-
marginBottom: '8px'
|
|
19548
|
+
marginBottom: '8px',
|
|
19549
|
+
width: '100%'
|
|
18497
19550
|
},
|
|
18498
19551
|
disabled: disabled,
|
|
18499
19552
|
allowClear: false,
|
|
18500
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19553
|
+
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)],
|
|
18501
19554
|
onChange: function onChange(val) {
|
|
18502
19555
|
return changeSystemOrderHandle(val);
|
|
18503
19556
|
},
|
|
18504
19557
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18505
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19558
|
+
}, ((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) {
|
|
18506
19559
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18507
19560
|
key: item.billNo,
|
|
18508
19561
|
value: item.billNo,
|
|
@@ -18518,12 +19571,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18518
19571
|
}
|
|
18519
19572
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
18520
19573
|
style: {
|
|
18521
|
-
marginBottom: '8px'
|
|
19574
|
+
marginBottom: '8px',
|
|
19575
|
+
width: '100%'
|
|
18522
19576
|
},
|
|
18523
|
-
disabled: disabled,
|
|
19577
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18524
19578
|
allowClear: false,
|
|
18525
19579
|
options: reasonList,
|
|
18526
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19580
|
+
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)],
|
|
18527
19581
|
onChange: function onChange(val) {
|
|
18528
19582
|
return changeTypeHandle(val);
|
|
18529
19583
|
}
|
|
@@ -18535,7 +19589,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18535
19589
|
canUpdateNumber: showChangeBtn,
|
|
18536
19590
|
showChangeBtn: showChangeBtn,
|
|
18537
19591
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18538
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19592
|
+
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)],
|
|
18539
19593
|
onChange: function onChange(val) {
|
|
18540
19594
|
return changeGoodHandle(val);
|
|
18541
19595
|
},
|
|
@@ -18551,7 +19605,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18551
19605
|
})));
|
|
18552
19606
|
};
|
|
18553
19607
|
|
|
18554
|
-
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19608
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18555
19609
|
var typeMap$2 = {
|
|
18556
19610
|
JST_REISSUE_GOODS: {
|
|
18557
19611
|
compType: '补发',
|
|
@@ -18566,7 +19620,9 @@ var typeMap$2 = {
|
|
|
18566
19620
|
orderTypeKey: 'orderType',
|
|
18567
19621
|
oIdKey: 'oId',
|
|
18568
19622
|
outerOiIdKey: '',
|
|
18569
|
-
goodDetailsKey: 'items'
|
|
19623
|
+
goodDetailsKey: 'items',
|
|
19624
|
+
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
19625
|
+
uniqueKey: 'uuid'
|
|
18570
19626
|
},
|
|
18571
19627
|
JST_RETURN_GOODS: {
|
|
18572
19628
|
compType: '退货',
|
|
@@ -18582,6 +19638,8 @@ var typeMap$2 = {
|
|
|
18582
19638
|
oIdKey: 'oId',
|
|
18583
19639
|
outerOiIdKey: '',
|
|
18584
19640
|
goodDetailsKey: 'items',
|
|
19641
|
+
mergeIdenticalGoods: kmkfUtils.jstMergeIdenticalGoods,
|
|
19642
|
+
uniqueKey: 'uuid',
|
|
18585
19643
|
eventNameMap: {
|
|
18586
19644
|
// pubsub 事件
|
|
18587
19645
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -18589,16 +19647,32 @@ var typeMap$2 = {
|
|
|
18589
19647
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
18590
19648
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
18591
19649
|
}
|
|
19650
|
+
},
|
|
19651
|
+
KM_REISSUE_GOODS: {
|
|
19652
|
+
compType: '补发',
|
|
19653
|
+
key: 'kmReissueGoods',
|
|
19654
|
+
typeName: 'kmReissueType',
|
|
19655
|
+
systemOrder: 'kmSystemOrder',
|
|
19656
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
19657
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
19658
|
+
updateGoodsHandle: kmkfUtils.updateKmGoodsHandle,
|
|
19659
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
19660
|
+
orderTypeKey: 'orderType',
|
|
19661
|
+
oIdKey: 'billNo',
|
|
19662
|
+
outerOiIdKey: '',
|
|
19663
|
+
goodDetailsKey: 'subOrders',
|
|
19664
|
+
uniqueKey: 'id'
|
|
18592
19665
|
}
|
|
18593
19666
|
};
|
|
18594
19667
|
var PublicReissue = function PublicReissue(props) {
|
|
18595
|
-
var _typeMap$
|
|
19668
|
+
var _typeMap$type32, _typeMap$type37, _typeMap$type38, _typeMap$type39, _typeMap$type40, _value$typeMap$type$s6, _typeMap$type41, _typeMap$type42, _typeMap$type43, _typeMap$type44, _typeMap$type45, _typeMap$type46, _typeMap$type47, _typeMap$type48;
|
|
18596
19669
|
var value = props.value,
|
|
18597
19670
|
onChange = props.onChange,
|
|
18598
19671
|
_props$reasonList = props.reasonList,
|
|
18599
19672
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18600
19673
|
disabled = props.disabled,
|
|
18601
19674
|
type = props.type,
|
|
19675
|
+
isSettingConfig = props.isSettingConfig,
|
|
18602
19676
|
other = _objectWithoutProperties(props, _excluded$j);
|
|
18603
19677
|
var getOrderFlag = React.useRef(false);
|
|
18604
19678
|
var _useState = React.useState(false),
|
|
@@ -18705,7 +19779,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18705
19779
|
}))));
|
|
18706
19780
|
};
|
|
18707
19781
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
18708
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
19782
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
|
|
18709
19783
|
var mode = _ref4.mode,
|
|
18710
19784
|
sysOrderNo = _ref4.sysOrderNo;
|
|
18711
19785
|
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type17 = typeMap$2[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
@@ -18713,63 +19787,74 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18713
19787
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18714
19788
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
18715
19789
|
});
|
|
18716
|
-
var
|
|
19790
|
+
var orderRest = undefined;
|
|
19791
|
+
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
19792
|
+
orderRest = true;
|
|
19793
|
+
} else if (type === 'KM_REISSUE_GOODS') {
|
|
19794
|
+
orderRest = {
|
|
19795
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
19796
|
+
canEdit: true
|
|
19797
|
+
};
|
|
19798
|
+
}
|
|
19799
|
+
var goodDetails = (order === null || order === void 0 ? void 0 : (_order$typeMap$type$g = order[typeMap$2[type].goodDetailsKey]) === null || _order$typeMap$type$g === void 0 ? void 0 : _order$typeMap$type$g.length) ? typeMap$2[type].mergeIdenticalGoods ? typeMap$2[type].mergeIdenticalGoods((_typeMap$type19 = typeMap$2[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.updateGoodsHandle([order], orderRest)) : (_typeMap$type20 = typeMap$2[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.updateGoodsHandle([order], orderRest) : [];
|
|
18717
19800
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
18718
|
-
|
|
19801
|
+
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
18719
19802
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
18720
19803
|
}) : goodDetails;
|
|
19804
|
+
return list;
|
|
18721
19805
|
};
|
|
18722
19806
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18723
|
-
var _typeMap$
|
|
19807
|
+
var _typeMap$type21;
|
|
18724
19808
|
var newValue = _objectSpread2({}, value);
|
|
18725
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19809
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type21 = typeMap$2[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = val || [];
|
|
18726
19810
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18727
19811
|
};
|
|
18728
19812
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18729
|
-
var _typeMap$
|
|
19813
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
|
|
18730
19814
|
var newValue = _objectSpread2({}, value);
|
|
18731
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18732
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18733
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
18734
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19815
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type22 = typeMap$2[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
|
|
19816
|
+
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type23 = typeMap$2[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderBillType) {
|
|
19817
|
+
var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
|
|
19818
|
+
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type24 = typeMap$2[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orders) || [];
|
|
18735
19819
|
var targetOrder = val && orders.find(function (oItem) {
|
|
18736
|
-
var _typeMap$
|
|
18737
|
-
return oItem[(_typeMap$
|
|
19820
|
+
var _typeMap$type25;
|
|
19821
|
+
return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
|
|
18738
19822
|
});
|
|
18739
|
-
newValue[(_typeMap$
|
|
18740
|
-
}
|
|
18741
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
18742
|
-
var _typeMap$
|
|
18743
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18744
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
18745
|
-
var _typeMap$
|
|
18746
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19823
|
+
newValue[(_typeMap$type26 = typeMap$2[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderBillType] = targetOrder === null || targetOrder === void 0 ? void 0 : targetOrder[(_typeMap$type27 = typeMap$2[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.orderTypeKey];
|
|
19824
|
+
}
|
|
19825
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type28 = typeMap$2[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
19826
|
+
var _typeMap$type29;
|
|
19827
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type29 = typeMap$2[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)] = [];
|
|
19828
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type30 = typeMap$2[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
19829
|
+
var _typeMap$type31;
|
|
19830
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type31 = typeMap$2[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)] = getGoodDetails({
|
|
18747
19831
|
mode: isStrict,
|
|
18748
19832
|
sysOrderNo: val
|
|
18749
19833
|
});
|
|
18750
19834
|
}
|
|
18751
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19835
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
18752
19836
|
};
|
|
18753
19837
|
//显示选择商品按钮
|
|
18754
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19838
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type32 = typeMap$2[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo]);
|
|
18755
19839
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
18756
|
-
var _typeMap$
|
|
19840
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
|
|
18757
19841
|
var newValue = _objectSpread2({}, value);
|
|
18758
19842
|
// 原订单商品
|
|
18759
19843
|
var originTradeGoodList = getGoodDetails({
|
|
18760
19844
|
mode: isStrict
|
|
18761
19845
|
}) || [];
|
|
18762
19846
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18763
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18764
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18765
|
-
|
|
19847
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type33 = typeMap$2[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.key)]) || [];
|
|
19848
|
+
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type34 = typeMap$2[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type35 = typeMap$2[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.uniqueKey) || 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
19849
|
+
var _typeMap$type36;
|
|
19850
|
+
return skuList.includes(item[typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type36 = typeMap$2[type]) === null || _typeMap$type36 === void 0 ? void 0 : _typeMap$type36.uniqueKey]);
|
|
18766
19851
|
});
|
|
18767
19852
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18768
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19853
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type37 = typeMap$2[type]) === null || _typeMap$type37 === void 0 ? void 0 : _typeMap$type37.key)], isStrict]);
|
|
18769
19854
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
18770
19855
|
gutter: 8,
|
|
18771
19856
|
wrap: true,
|
|
18772
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19857
|
+
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type38 = typeMap$2[type]) === null || _typeMap$type38 === void 0 ? void 0 : _typeMap$type38.key) || "".concat(Date.now())
|
|
18773
19858
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
18774
19859
|
className: "gutter-row",
|
|
18775
19860
|
xs: {
|
|
@@ -18780,16 +19865,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18780
19865
|
}
|
|
18781
19866
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
18782
19867
|
style: {
|
|
18783
|
-
marginBottom: '8px'
|
|
19868
|
+
marginBottom: '8px',
|
|
19869
|
+
width: '100%'
|
|
18784
19870
|
},
|
|
18785
19871
|
disabled: disabled,
|
|
18786
19872
|
allowClear: false,
|
|
18787
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19873
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type39 = typeMap$2[type]) === null || _typeMap$type39 === void 0 ? void 0 : _typeMap$type39.systemOrderNo)],
|
|
18788
19874
|
onChange: function onChange(val) {
|
|
18789
19875
|
return changeSystemOrderHandle(val);
|
|
18790
19876
|
},
|
|
18791
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18792
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
19877
|
+
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type40 = typeMap$2[type]) === null || _typeMap$type40 === void 0 ? void 0 : _typeMap$type40.compType) || '', "\u7CFB\u7EDF\u5355")
|
|
19878
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type41 = typeMap$2[type]) === null || _typeMap$type41 === void 0 ? void 0 : _typeMap$type41.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.showOrderInfo) || []).map(function (item) {
|
|
18793
19879
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
18794
19880
|
key: item[typeMap$2[type].oIdKey],
|
|
18795
19881
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -18805,16 +19891,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18805
19891
|
}
|
|
18806
19892
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
18807
19893
|
style: {
|
|
18808
|
-
marginBottom: '8px'
|
|
19894
|
+
marginBottom: '8px',
|
|
19895
|
+
width: '100%'
|
|
18809
19896
|
},
|
|
18810
|
-
disabled: disabled,
|
|
19897
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18811
19898
|
allowClear: false,
|
|
18812
19899
|
options: reasonList,
|
|
18813
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19900
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type42 = typeMap$2[type]) === null || _typeMap$type42 === void 0 ? void 0 : _typeMap$type42.typeName)],
|
|
18814
19901
|
onChange: function onChange(val) {
|
|
18815
19902
|
return changeTypeHandle(val);
|
|
18816
19903
|
}
|
|
18817
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19904
|
+
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type43 = typeMap$2[type]) === null || _typeMap$type43 === void 0 ? void 0 : _typeMap$type43.systemOrderBillType) && !isSettingConfig && /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
18818
19905
|
className: "gutter-row",
|
|
18819
19906
|
xs: {
|
|
18820
19907
|
span: 11
|
|
@@ -18823,7 +19910,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18823
19910
|
span: 6
|
|
18824
19911
|
}
|
|
18825
19912
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
18826
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19913
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type44 = typeMap$2[type]) === null || _typeMap$type44 === void 0 ? void 0 : _typeMap$type44.systemOrderBillType)],
|
|
18827
19914
|
disabled: disabled,
|
|
18828
19915
|
readOnly: true
|
|
18829
19916
|
}))), /*#__PURE__*/React__default['default'].createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -18833,10 +19920,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18833
19920
|
disabled: disabled,
|
|
18834
19921
|
canUpdateNumber: showChangeBtn,
|
|
18835
19922
|
showChangeBtn: showChangeBtn,
|
|
18836
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18837
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19923
|
+
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type45 = typeMap$2[type]) === null || _typeMap$type45 === void 0 ? void 0 : _typeMap$type45.alwaysShowChooseErpGoodsBtn,
|
|
19924
|
+
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type46 = typeMap$2[type]) === null || _typeMap$type46 === void 0 ? void 0 : _typeMap$type46.showErpGoodsBtn,
|
|
18838
19925
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18839
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19926
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type47 = typeMap$2[type]) === null || _typeMap$type47 === void 0 ? void 0 : _typeMap$type47.key)],
|
|
18840
19927
|
onChange: function onChange(val) {
|
|
18841
19928
|
return changeGoodHandle(val);
|
|
18842
19929
|
},
|
|
@@ -18847,6 +19934,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18847
19934
|
originDataSource: getGoodDetails({
|
|
18848
19935
|
mode: isStrict
|
|
18849
19936
|
}),
|
|
19937
|
+
uniqueKey: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$type48 = typeMap$2[type]) === null || _typeMap$type48 === void 0 ? void 0 : _typeMap$type48.uniqueKey) || 'uuid',
|
|
18850
19938
|
selectedGoodsChange: selectedGoodsChange
|
|
18851
19939
|
}
|
|
18852
19940
|
})));
|
|
@@ -19385,6 +20473,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19385
20473
|
var _props$value = props.value,
|
|
19386
20474
|
value = _props$value === void 0 ? [] : _props$value,
|
|
19387
20475
|
onChange = props.onChange,
|
|
20476
|
+
onBlur = props.onBlur,
|
|
19388
20477
|
disabled = props.disabled,
|
|
19389
20478
|
_props$type = props.type,
|
|
19390
20479
|
type = _props$type === void 0 ? 1 : _props$type;
|
|
@@ -19466,6 +20555,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19466
20555
|
onChange: function onChange(e) {
|
|
19467
20556
|
return changeInputHandle(e.target.value, 'billNo');
|
|
19468
20557
|
},
|
|
20558
|
+
onBlur: onBlur,
|
|
19469
20559
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
19470
20560
|
})) : null) : null);
|
|
19471
20561
|
};
|
|
@@ -19607,6 +20697,64 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19607
20697
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
19608
20698
|
};
|
|
19609
20699
|
|
|
20700
|
+
var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
|
|
20701
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
20702
|
+
var mode = props.mode,
|
|
20703
|
+
maxSelectCount = props.maxSelectCount,
|
|
20704
|
+
_props$showOnly = props.showOnly,
|
|
20705
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
20706
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
20707
|
+
_onChange = props.onChange,
|
|
20708
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
20709
|
+
var _React$useState = React__default['default'].useState([]),
|
|
20710
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20711
|
+
data = _React$useState2[0],
|
|
20712
|
+
setData = _React$useState2[1];
|
|
20713
|
+
React__default['default'].useEffect(function () {
|
|
20714
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
20715
|
+
setData(list);
|
|
20716
|
+
});
|
|
20717
|
+
}, []);
|
|
20718
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
20719
|
+
var getValueString = function getValueString(value) {
|
|
20720
|
+
var list = options;
|
|
20721
|
+
if (mode === 'multiple' && Array.isArray(value)) {
|
|
20722
|
+
var _list$filter$map$join;
|
|
20723
|
+
return (_list$filter$map$join = list.filter(function (item) {
|
|
20724
|
+
return value.includes(item.value);
|
|
20725
|
+
}).map(function (item) {
|
|
20726
|
+
return item.label;
|
|
20727
|
+
}).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
|
|
20728
|
+
} else {
|
|
20729
|
+
var selectedItem = list.find(function (item) {
|
|
20730
|
+
return item.value === value;
|
|
20731
|
+
});
|
|
20732
|
+
return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
|
|
20733
|
+
}
|
|
20734
|
+
};
|
|
20735
|
+
if (showOnly) {
|
|
20736
|
+
return getValueString(props.value);
|
|
20737
|
+
}
|
|
20738
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select, _objectSpread2(_objectSpread2({
|
|
20739
|
+
showArrow: true,
|
|
20740
|
+
showSearch: true,
|
|
20741
|
+
filterOption: function filterOption(input, option) {
|
|
20742
|
+
return option.label.includes(input);
|
|
20743
|
+
},
|
|
20744
|
+
notFoundContent: null
|
|
20745
|
+
}, otherProps), {}, {
|
|
20746
|
+
options: options,
|
|
20747
|
+
mode: mode,
|
|
20748
|
+
onChange: function onChange(value, option) {
|
|
20749
|
+
if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
|
|
20750
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
|
|
20751
|
+
} else {
|
|
20752
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
|
|
20753
|
+
}
|
|
20754
|
+
}
|
|
20755
|
+
}));
|
|
20756
|
+
};
|
|
20757
|
+
|
|
19610
20758
|
var CalculationInput = function CalculationInput(props) {
|
|
19611
20759
|
var _props$config = props.config,
|
|
19612
20760
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -19625,7 +20773,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
19625
20773
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
19626
20774
|
};
|
|
19627
20775
|
|
|
19628
|
-
var _excluded$
|
|
20776
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
19629
20777
|
var typeMap$3 = {
|
|
19630
20778
|
BS_E3_REISSUE_GOODS: {
|
|
19631
20779
|
key: 'bsE3ReissueGoods',
|
|
@@ -19643,7 +20791,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19643
20791
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19644
20792
|
disabled = props.disabled,
|
|
19645
20793
|
type = props.type,
|
|
19646
|
-
|
|
20794
|
+
isSettingConfig = props.isSettingConfig,
|
|
20795
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19647
20796
|
var getOrderFlag = React.useRef(false);
|
|
19648
20797
|
var valueRef = React.useRef(null);
|
|
19649
20798
|
var _useState = React.useState(false),
|
|
@@ -19803,7 +20952,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19803
20952
|
}
|
|
19804
20953
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
19805
20954
|
style: {
|
|
19806
|
-
marginBottom: '8px'
|
|
20955
|
+
marginBottom: '8px',
|
|
20956
|
+
width: '100%'
|
|
19807
20957
|
},
|
|
19808
20958
|
disabled: disabled,
|
|
19809
20959
|
allowClear: false,
|
|
@@ -19828,9 +20978,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19828
20978
|
}
|
|
19829
20979
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
19830
20980
|
style: {
|
|
19831
|
-
marginBottom: '8px'
|
|
20981
|
+
marginBottom: '8px',
|
|
20982
|
+
width: '100%'
|
|
19832
20983
|
},
|
|
19833
|
-
disabled: disabled,
|
|
20984
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19834
20985
|
allowClear: false,
|
|
19835
20986
|
options: reasonList,
|
|
19836
20987
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
@@ -19861,7 +21012,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19861
21012
|
})));
|
|
19862
21013
|
};
|
|
19863
21014
|
|
|
19864
|
-
var
|
|
21015
|
+
var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
|
|
21016
|
+
var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
|
|
21017
|
+
styleInject(css_248z$c);
|
|
21018
|
+
|
|
21019
|
+
var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
19865
21020
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19866
21021
|
var typeMap$4 = {
|
|
19867
21022
|
GY_REISSUE_GOODS: {
|
|
@@ -19883,17 +21038,19 @@ var typeMap$4 = {
|
|
|
19883
21038
|
}
|
|
19884
21039
|
};
|
|
19885
21040
|
var GyReissue = function GyReissue(props) {
|
|
19886
|
-
var _typeMap$
|
|
21041
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
19887
21042
|
var value = props.value,
|
|
19888
21043
|
onChange = props.onChange,
|
|
19889
21044
|
_props$reasonList = props.reasonList,
|
|
19890
21045
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19891
21046
|
disabled = props.disabled,
|
|
19892
21047
|
type = props.type,
|
|
19893
|
-
|
|
21048
|
+
isSettingConfig = props.isSettingConfig,
|
|
21049
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
19894
21050
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
19895
21051
|
// order?.platformCode?.includes(';'),
|
|
19896
21052
|
// );
|
|
21053
|
+
var getVipCodeFlag = React.useRef(false);
|
|
19897
21054
|
var getOrderFlag = React.useRef(false);
|
|
19898
21055
|
var valueRef = React.useRef(null);
|
|
19899
21056
|
var _useState = React.useState(false),
|
|
@@ -19901,23 +21058,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
19901
21058
|
isStrict = _useState2[0],
|
|
19902
21059
|
setIsStrict = _useState2[1];
|
|
19903
21060
|
React.useEffect(function () {
|
|
19904
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
21061
|
+
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2, _typeMap$type4, _value$typeMap$type$s5, _typeMap$type5;
|
|
19905
21062
|
valueRef.current = value;
|
|
19906
21063
|
if (!getOrderFlag.current && !(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s = value[(_typeMap$type = typeMap$4[type]) === null || _typeMap$type === void 0 ? void 0 : _typeMap$type.systemOrder]) === null || _value$typeMap$type$s === void 0 ? void 0 : (_value$typeMap$type$s2 = _value$typeMap$type$s.orders) === null || _value$typeMap$type$s2 === void 0 ? void 0 : _value$typeMap$type$s2.length) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s3 = value[(_typeMap$type2 = typeMap$4[type]) === null || _typeMap$type2 === void 0 ? void 0 : _typeMap$type2.systemOrder]) === null || _value$typeMap$type$s3 === void 0 ? void 0 : _value$typeMap$type$s3.orderNo)) {
|
|
19907
21064
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
19908
21065
|
getOrderFlag.current = true;
|
|
19909
21066
|
getOrderList(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s4 = value[(_typeMap$type3 = typeMap$4[type]) === null || _typeMap$type3 === void 0 ? void 0 : _typeMap$type3.systemOrder]) === null || _value$typeMap$type$s4 === void 0 ? void 0 : _value$typeMap$type$s4.orderNo);
|
|
21067
|
+
} else if (!getVipCodeFlag.current && (value === null || value === void 0 ? void 0 : value[(_typeMap$type4 = typeMap$4[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.systemOrderNo]) && !(value === null || value === void 0 ? void 0 : value.vipCode) && (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type5 = typeMap$4[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.orderNo)) {
|
|
21068
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
21069
|
+
getVipCodeFlag.current = true;
|
|
21070
|
+
getVipCode(value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$type6 = typeMap$4[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) === null || _value$typeMap$type$s6 === void 0 ? void 0 : _value$typeMap$type$s6.orderNo);
|
|
19910
21071
|
}
|
|
19911
21072
|
return;
|
|
19912
21073
|
}, [value]);
|
|
19913
21074
|
var getOrderList = /*#__PURE__*/function () {
|
|
19914
21075
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
19915
|
-
var _typeMap$
|
|
21076
|
+
var _typeMap$type7;
|
|
19916
21077
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19917
21078
|
while (1) switch (_context.prev = _context.next) {
|
|
19918
21079
|
case 0:
|
|
19919
|
-
(_typeMap$
|
|
19920
|
-
var _typeMap$
|
|
21080
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
21081
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
19921
21082
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19922
21083
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19923
21084
|
var billNo = _ref2.billNo,
|
|
@@ -19939,17 +21100,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19939
21100
|
shopCode: shopCode
|
|
19940
21101
|
});
|
|
19941
21102
|
});
|
|
21103
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type8 = typeMap$4[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type9 = typeMap$4[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.systemOrder]) || {}), {}, {
|
|
21104
|
+
showOrderInfo: showOrderInfo,
|
|
21105
|
+
orders: orders
|
|
21106
|
+
})), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _defineProperty(_objectSpread2$1, "vipCode", (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$2 = orders[0]) === null || _orders$2 === void 0 ? void 0 : _orders$2.vipCode)), _objectSpread2$1));
|
|
19942
21107
|
kmkfUtils.pushGyLog('getOrderList', {
|
|
19943
21108
|
before: valueRef.current,
|
|
19944
|
-
after:
|
|
19945
|
-
showOrderInfo: showOrderInfo,
|
|
19946
|
-
orders: orders
|
|
19947
|
-
})))
|
|
21109
|
+
after: newValue
|
|
19948
21110
|
});
|
|
19949
|
-
onChange(
|
|
19950
|
-
showOrderInfo: showOrderInfo,
|
|
19951
|
-
orders: orders
|
|
19952
|
-
}))));
|
|
21111
|
+
onChange(newValue);
|
|
19953
21112
|
});
|
|
19954
21113
|
case 1:
|
|
19955
21114
|
case "end":
|
|
@@ -19961,42 +21120,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
19961
21120
|
return _ref.apply(this, arguments);
|
|
19962
21121
|
};
|
|
19963
21122
|
}();
|
|
21123
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
21124
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
21125
|
+
var _typeMap$type10;
|
|
21126
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
21127
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
21128
|
+
case 0:
|
|
21129
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
21130
|
+
var _orders$3, _orders$4;
|
|
21131
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
21132
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
21133
|
+
shopCode: (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$3 = orders[0]) === null || _orders$3 === void 0 ? void 0 : _orders$3.shopCode),
|
|
21134
|
+
vipCode: (valueRef.current || {}).vipCode || (orders === null || orders === void 0 ? void 0 : (_orders$4 = orders[0]) === null || _orders$4 === void 0 ? void 0 : _orders$4.vipCode)
|
|
21135
|
+
});
|
|
21136
|
+
kmkfUtils.pushGyLog('getVipCode', {
|
|
21137
|
+
before: valueRef.current,
|
|
21138
|
+
after: newValue
|
|
21139
|
+
});
|
|
21140
|
+
onChange(newValue);
|
|
21141
|
+
}));
|
|
21142
|
+
case 1:
|
|
21143
|
+
case "end":
|
|
21144
|
+
return _context2.stop();
|
|
21145
|
+
}
|
|
21146
|
+
}, _callee2);
|
|
21147
|
+
}));
|
|
21148
|
+
return function getVipCode(_x2) {
|
|
21149
|
+
return _ref4.apply(this, arguments);
|
|
21150
|
+
};
|
|
21151
|
+
}();
|
|
19964
21152
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19965
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
21153
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
19966
21154
|
kmkfUtils.pushGyLog('beforeChangeType', valueRef.current || {});
|
|
19967
21155
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19968
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
21156
|
+
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$type11 = typeMap$4[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName]) === null || _ref5$typeMap$type$ty === void 0 ? void 0 : _ref5$typeMap$type$ty[0])) return;
|
|
19969
21157
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19970
21158
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19971
|
-
newValue[(_typeMap$
|
|
21159
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
19972
21160
|
if (typeName === '1') {
|
|
19973
|
-
var _typeMap$
|
|
19974
|
-
newValue[(_typeMap$
|
|
21161
|
+
var _typeMap$type13;
|
|
21162
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
19975
21163
|
mode: isStrict
|
|
19976
21164
|
});
|
|
19977
21165
|
} else if (typeName === '2') {
|
|
19978
|
-
var _typeMap$
|
|
21166
|
+
var _typeMap$type14;
|
|
19979
21167
|
// 切换到非原单,清空列表
|
|
19980
|
-
newValue[(_typeMap$
|
|
21168
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
19981
21169
|
}
|
|
19982
21170
|
kmkfUtils.pushGyLog('afterChangeType', newValue);
|
|
19983
21171
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19984
21172
|
};
|
|
19985
21173
|
var handleModeChange = function handleModeChange(mode) {
|
|
19986
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
19987
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
21174
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
21175
|
+
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$type15 = typeMap$4[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.typeName]) === null || _ref6$typeMap$type$ty === void 0 ? void 0 : _ref6$typeMap$type$ty[0]) === '1';
|
|
19988
21176
|
setIsStrict(mode);
|
|
19989
21177
|
if (!isOriginalOrder) return;
|
|
19990
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
21178
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type16 = typeMap$4[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.key, getGoodDetails({
|
|
19991
21179
|
mode: mode
|
|
19992
21180
|
}))));
|
|
19993
21181
|
};
|
|
19994
21182
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
19995
|
-
var _ref8, _typeMap$
|
|
21183
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
19996
21184
|
var mode = _ref7.mode,
|
|
19997
21185
|
sysOrderNo = _ref7.sysOrderNo;
|
|
19998
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
19999
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
21186
|
+
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$type17 = typeMap$4[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrder];
|
|
21187
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$type18 = typeMap$4[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.systemOrderNo];
|
|
20000
21188
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20001
21189
|
return order.code === systemOrderNo;
|
|
20002
21190
|
});
|
|
@@ -20007,29 +21195,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
20007
21195
|
}) : goodDetails;
|
|
20008
21196
|
};
|
|
20009
21197
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20010
|
-
var _typeMap$
|
|
21198
|
+
var _typeMap$type19;
|
|
20011
21199
|
kmkfUtils.pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20012
21200
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20013
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20014
|
-
var _typeMap$
|
|
20015
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20016
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21201
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type19 = typeMap$4[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = (val || []).map(function (item) {
|
|
21202
|
+
var _typeMap$type20, _typeMap$type21;
|
|
21203
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type20 = typeMap$4[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.formatDefaultField.money)] = 0;
|
|
21204
|
+
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type21 = typeMap$4[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.formatDefaultField.share)] = 0;
|
|
20017
21205
|
return item;
|
|
20018
21206
|
});
|
|
20019
21207
|
kmkfUtils.pushGyLog('afterChangeGood', newValue);
|
|
20020
21208
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20021
21209
|
};
|
|
20022
21210
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20023
|
-
var _typeMap$
|
|
21211
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20024
21212
|
kmkfUtils.pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20025
21213
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20026
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20027
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
20028
|
-
var _typeMap$type22;
|
|
20029
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = [];
|
|
20030
|
-
} else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
|
|
21214
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type22 = typeMap$4[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrderNo)] = val;
|
|
21215
|
+
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$type23 = typeMap$4[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.typeName]) === null || _ref10$typeMap$type$t === void 0 ? void 0 : _ref10$typeMap$type$t[0])) {
|
|
20031
21216
|
var _typeMap$type24;
|
|
20032
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] =
|
|
21217
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type24 = typeMap$4[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.key)] = [];
|
|
21218
|
+
} else if (['1'].includes((_ref11 = valueRef.current || {}) === null || _ref11 === void 0 ? void 0 : (_ref11$typeMap$type$t = _ref11[(_typeMap$type25 = typeMap$4[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.typeName]) === null || _ref11$typeMap$type$t === void 0 ? void 0 : _ref11$typeMap$type$t[0])) {
|
|
21219
|
+
var _typeMap$type26;
|
|
21220
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type26 = typeMap$4[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.key)] = getGoodDetails({
|
|
20033
21221
|
mode: isStrict,
|
|
20034
21222
|
sysOrderNo: val
|
|
20035
21223
|
});
|
|
@@ -20038,7 +21226,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20038
21226
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20039
21227
|
};
|
|
20040
21228
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20041
|
-
var _ref12, _typeMap$
|
|
21229
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20042
21230
|
kmkfUtils.pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20043
21231
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20044
21232
|
// 原订单商品
|
|
@@ -20046,67 +21234,66 @@ var GyReissue = function GyReissue(props) {
|
|
|
20046
21234
|
mode: isStrict
|
|
20047
21235
|
}) || [];
|
|
20048
21236
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20049
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20050
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21237
|
+
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type27 = typeMap$4[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.key)]) || [];
|
|
21238
|
+
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type28 = typeMap$4[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20051
21239
|
return skuList.includes(item.uuid);
|
|
20052
21240
|
});
|
|
20053
|
-
console.log('商品发生变化', newValue[
|
|
21241
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20054
21242
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20055
21243
|
kmkfUtils.pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20056
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21244
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type29 = typeMap$4[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)], isStrict]);
|
|
20057
21245
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20058
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20059
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21246
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type30 = typeMap$4[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.systemOrder];
|
|
21247
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type31 = typeMap$4[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.systemOrderNo]);
|
|
20060
21248
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20061
|
-
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20062
|
-
id: "TEST_GY",
|
|
20063
|
-
onClick: function onClick() {
|
|
20064
|
-
console.log('TEST_GY', value);
|
|
20065
|
-
}
|
|
20066
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
21249
|
+
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20067
21250
|
gutter: 8,
|
|
20068
21251
|
wrap: true
|
|
20069
21252
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20070
21253
|
className: "gutter-row",
|
|
20071
21254
|
xs: {
|
|
20072
|
-
span:
|
|
21255
|
+
span: 12
|
|
20073
21256
|
},
|
|
20074
21257
|
sm: {
|
|
20075
|
-
span:
|
|
21258
|
+
span: 8
|
|
20076
21259
|
}
|
|
20077
21260
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20078
21261
|
style: {
|
|
20079
|
-
marginBottom: '8px'
|
|
21262
|
+
marginBottom: '8px',
|
|
21263
|
+
width: '100%'
|
|
20080
21264
|
},
|
|
20081
21265
|
disabled: disabled,
|
|
20082
21266
|
allowClear: false,
|
|
20083
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21267
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type32 = typeMap$4[type]) === null || _typeMap$type32 === void 0 ? void 0 : _typeMap$type32.systemOrderNo)],
|
|
20084
21268
|
onChange: function onChange(val) {
|
|
20085
21269
|
return changeSystemOrderHandle(val);
|
|
20086
21270
|
},
|
|
20087
21271
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20088
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
21272
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s7 = value[(_typeMap$type33 = typeMap$4[type]) === null || _typeMap$type33 === void 0 ? void 0 : _typeMap$type33.systemOrder]) === null || _value$typeMap$type$s7 === void 0 ? void 0 : _value$typeMap$type$s7.showOrderInfo) || []).map(function (item) {
|
|
20089
21273
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
21274
|
+
className: styles$5.systemNoDisabled,
|
|
20090
21275
|
key: item.billNo,
|
|
20091
21276
|
value: item.billNo,
|
|
20092
|
-
label: item.billNo
|
|
20093
|
-
|
|
21277
|
+
label: item.billNo,
|
|
21278
|
+
disabled: item.cancel
|
|
21279
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
|
|
20094
21280
|
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20095
21281
|
className: "gutter-row",
|
|
20096
21282
|
xs: {
|
|
20097
|
-
span:
|
|
21283
|
+
span: 12
|
|
20098
21284
|
},
|
|
20099
21285
|
sm: {
|
|
20100
|
-
span:
|
|
21286
|
+
span: 4
|
|
20101
21287
|
}
|
|
20102
21288
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
20103
21289
|
style: {
|
|
20104
|
-
marginBottom: '8px'
|
|
21290
|
+
marginBottom: '8px',
|
|
21291
|
+
width: '100%'
|
|
20105
21292
|
},
|
|
20106
|
-
disabled: disabled,
|
|
21293
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20107
21294
|
allowClear: false,
|
|
20108
21295
|
options: reasonList,
|
|
20109
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21296
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type34 = typeMap$4[type]) === null || _typeMap$type34 === void 0 ? void 0 : _typeMap$type34.typeName)],
|
|
20110
21297
|
onChange: function onChange(val) {
|
|
20111
21298
|
return changeTypeHandle(val);
|
|
20112
21299
|
}
|
|
@@ -20120,7 +21307,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20120
21307
|
showErpGoodsBtn: showErpGoodsBtn,
|
|
20121
21308
|
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20122
21309
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20123
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21310
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$type35 = typeMap$4[type]) === null || _typeMap$type35 === void 0 ? void 0 : _typeMap$type35.key)],
|
|
20124
21311
|
onChange: function onChange(val) {
|
|
20125
21312
|
return changeGoodHandle(val);
|
|
20126
21313
|
},
|
|
@@ -20135,7 +21322,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20135
21322
|
})));
|
|
20136
21323
|
};
|
|
20137
21324
|
|
|
20138
|
-
var _excluded$
|
|
21325
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
20139
21326
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
20140
21327
|
var typeMap$5 = {
|
|
20141
21328
|
GY_RETURN_GOODS: {
|
|
@@ -20157,14 +21344,15 @@ var typeMap$5 = {
|
|
|
20157
21344
|
}
|
|
20158
21345
|
};
|
|
20159
21346
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20160
|
-
var _typeMap$
|
|
21347
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20161
21348
|
var value = props.value,
|
|
20162
21349
|
onChange = props.onChange,
|
|
20163
21350
|
_props$reasonList = props.reasonList,
|
|
20164
21351
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
20165
21352
|
disabled = props.disabled,
|
|
20166
21353
|
type = props.type,
|
|
20167
|
-
|
|
21354
|
+
isSettingConfig = props.isSettingConfig,
|
|
21355
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
20168
21356
|
var valueRef = React.useRef({});
|
|
20169
21357
|
var getOrderFlag = React.useRef(false);
|
|
20170
21358
|
var _useState = React.useState(false),
|
|
@@ -20227,7 +21415,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20227
21415
|
while (1) switch (_context.prev = _context.next) {
|
|
20228
21416
|
case 0:
|
|
20229
21417
|
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
20230
|
-
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
|
|
21418
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20231
21419
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20232
21420
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20233
21421
|
var billNo = _ref2.billNo,
|
|
@@ -20249,10 +21437,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20249
21437
|
shopCode: shopCode
|
|
20250
21438
|
});
|
|
20251
21439
|
});
|
|
20252
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21440
|
+
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, (_objectSpread2$1 = {}, _defineProperty(_objectSpread2$1, (_typeMap$type5 = typeMap$5[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, (_typeMap$type$systemO = (_ref3 = (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$5[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) !== null && _typeMap$type$systemO !== void 0 ? _typeMap$type$systemO : {}), {}, {
|
|
20253
21441
|
showOrderInfo: showOrderInfo,
|
|
20254
21442
|
orders: orders
|
|
20255
|
-
}))));
|
|
21443
|
+
})), _defineProperty(_objectSpread2$1, "shopCode", (valueRef.current || {}).shopCode || (orders === null || orders === void 0 ? void 0 : (_orders$ = orders[0]) === null || _orders$ === void 0 ? void 0 : _orders$.shopCode)), _objectSpread2$1)));
|
|
20256
21444
|
});
|
|
20257
21445
|
case 1:
|
|
20258
21446
|
case "end":
|
|
@@ -20265,7 +21453,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20265
21453
|
};
|
|
20266
21454
|
}();
|
|
20267
21455
|
var selectedGoodsChange = React.useCallback(function (skuList) {
|
|
20268
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
21456
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20269
21457
|
var newValue = _objectSpread2({}, value);
|
|
20270
21458
|
// 原订单商品
|
|
20271
21459
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20276,49 +21464,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20276
21464
|
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = lodash.uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20277
21465
|
return skuList.includes(item.uuid);
|
|
20278
21466
|
});
|
|
20279
|
-
console.log('商品发生变化', newValue[
|
|
21467
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20280
21468
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20281
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21469
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
|
|
20282
21470
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20283
|
-
var _value$typeMap$type$t, _typeMap$
|
|
21471
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20284
21472
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20285
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
21473
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
20286
21474
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20287
21475
|
var newValue = _objectSpread2({}, value);
|
|
20288
|
-
newValue[(_typeMap$
|
|
21476
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20289
21477
|
if (typeName === '1') {
|
|
20290
|
-
var _typeMap$
|
|
20291
|
-
newValue[(_typeMap$
|
|
21478
|
+
var _typeMap$type12;
|
|
21479
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20292
21480
|
mode: isStrict
|
|
20293
21481
|
});
|
|
20294
21482
|
} else if (typeName === '2') {
|
|
20295
|
-
var _typeMap$
|
|
21483
|
+
var _typeMap$type13;
|
|
20296
21484
|
// 切换到非原单,清空列表
|
|
20297
|
-
newValue[(_typeMap$
|
|
21485
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20298
21486
|
}
|
|
20299
21487
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20300
21488
|
};
|
|
20301
21489
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20302
|
-
var _typeMap$
|
|
21490
|
+
var _typeMap$type14;
|
|
20303
21491
|
var newValue = _objectSpread2({}, value);
|
|
20304
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20305
|
-
var _typeMap$
|
|
20306
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20307
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21492
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
|
|
21493
|
+
var _typeMap$type15, _typeMap$type16;
|
|
21494
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
|
|
21495
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
|
|
20308
21496
|
return item;
|
|
20309
21497
|
});
|
|
20310
21498
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20311
21499
|
};
|
|
20312
21500
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20313
|
-
var _typeMap$
|
|
21501
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20314
21502
|
var newValue = _objectSpread2({}, value);
|
|
20315
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20316
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20317
|
-
var _typeMap$
|
|
20318
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20319
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20320
|
-
var _typeMap$
|
|
20321
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21503
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
|
|
21504
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
21505
|
+
var _typeMap$type19;
|
|
21506
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
21507
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
21508
|
+
var _typeMap$type21;
|
|
21509
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
|
|
20322
21510
|
mode: isStrict,
|
|
20323
21511
|
sysOrderNo: val
|
|
20324
21512
|
});
|
|
@@ -20326,11 +21514,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20326
21514
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20327
21515
|
};
|
|
20328
21516
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20329
|
-
var _typeMap$
|
|
21517
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20330
21518
|
var mode = _ref4.mode,
|
|
20331
21519
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20332
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20333
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21520
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
|
|
21521
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
|
|
20334
21522
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20335
21523
|
return order.code === systemOrderNo;
|
|
20336
21524
|
});
|
|
@@ -20341,62 +21529,66 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20341
21529
|
}) : goodDetails;
|
|
20342
21530
|
};
|
|
20343
21531
|
var handleModeChange = function handleModeChange(mode) {
|
|
20344
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20345
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
21532
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
21533
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
|
|
20346
21534
|
setIsStrict(mode);
|
|
20347
21535
|
if (!isOriginalOrder) return;
|
|
20348
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
21536
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
|
|
20349
21537
|
mode: mode
|
|
20350
21538
|
}))));
|
|
20351
21539
|
};
|
|
20352
21540
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20353
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21541
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
|
|
20354
21542
|
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20355
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21543
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
20356
21544
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
20357
21545
|
gutter: 8,
|
|
20358
21546
|
wrap: true
|
|
20359
21547
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20360
21548
|
className: "gutter-row",
|
|
20361
21549
|
xs: {
|
|
20362
|
-
span:
|
|
21550
|
+
span: 12
|
|
20363
21551
|
},
|
|
20364
21552
|
sm: {
|
|
20365
|
-
span:
|
|
21553
|
+
span: 8
|
|
20366
21554
|
}
|
|
20367
21555
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
20368
21556
|
style: {
|
|
20369
|
-
marginBottom: '8px'
|
|
21557
|
+
marginBottom: '8px',
|
|
21558
|
+
width: '100%'
|
|
20370
21559
|
},
|
|
20371
21560
|
disabled: disabled,
|
|
20372
21561
|
allowClear: false,
|
|
20373
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21562
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
|
|
20374
21563
|
onChange: function onChange(val) {
|
|
20375
21564
|
return changeSystemOrderHandle(val);
|
|
20376
21565
|
},
|
|
20377
21566
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20378
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
21567
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
20379
21568
|
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
21569
|
+
className: styles$5.systemNoDisabled,
|
|
20380
21570
|
key: item.billNo,
|
|
20381
21571
|
value: item.billNo,
|
|
20382
|
-
label: item.billNo
|
|
20383
|
-
|
|
21572
|
+
label: item.billNo,
|
|
21573
|
+
disabled: item === null || item === void 0 ? void 0 : item.cancel
|
|
21574
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
|
|
20384
21575
|
}))), /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
20385
21576
|
className: "gutter-row",
|
|
20386
21577
|
xs: {
|
|
20387
|
-
span:
|
|
21578
|
+
span: 12
|
|
20388
21579
|
},
|
|
20389
21580
|
sm: {
|
|
20390
|
-
span:
|
|
21581
|
+
span: 4
|
|
20391
21582
|
}
|
|
20392
21583
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
20393
21584
|
style: {
|
|
20394
|
-
marginBottom: '8px'
|
|
21585
|
+
marginBottom: '8px',
|
|
21586
|
+
width: '100%'
|
|
20395
21587
|
},
|
|
20396
|
-
disabled: disabled,
|
|
21588
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20397
21589
|
allowClear: false,
|
|
20398
21590
|
options: reasonList,
|
|
20399
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21591
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
|
|
20400
21592
|
onChange: function onChange(val) {
|
|
20401
21593
|
return changeTypeHandle(val);
|
|
20402
21594
|
}
|
|
@@ -20408,7 +21600,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20408
21600
|
canUpdateNumber: showChangeBtn,
|
|
20409
21601
|
showChangeBtn: showChangeBtn,
|
|
20410
21602
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20411
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21603
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
|
|
20412
21604
|
onChange: function onChange(val) {
|
|
20413
21605
|
return changeGoodHandle(val);
|
|
20414
21606
|
},
|
|
@@ -20425,6 +21617,249 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20425
21617
|
})));
|
|
20426
21618
|
};
|
|
20427
21619
|
|
|
21620
|
+
var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
21621
|
+
var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
|
|
21622
|
+
styleInject(css_248z$d);
|
|
21623
|
+
|
|
21624
|
+
var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
|
|
21625
|
+
var Dragger$1 = antd.Upload.Dragger;
|
|
21626
|
+
var fn$4 = function fn() {
|
|
21627
|
+
return void 0;
|
|
21628
|
+
};
|
|
21629
|
+
var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
|
|
21630
|
+
var KmVideo = function KmVideo(_ref) {
|
|
21631
|
+
var _ref$maxCount = _ref.maxCount,
|
|
21632
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
21633
|
+
_ref$maxSize = _ref.maxSize,
|
|
21634
|
+
maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
|
|
21635
|
+
_ref$onChange = _ref.onChange,
|
|
21636
|
+
onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
|
|
21637
|
+
_ref$value = _ref.value,
|
|
21638
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
21639
|
+
_ref$disabled = _ref.disabled,
|
|
21640
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21641
|
+
_ref$hostUrl = _ref.hostUrl,
|
|
21642
|
+
hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
|
|
21643
|
+
_ref$canDownload = _ref.canDownload,
|
|
21644
|
+
canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
|
|
21645
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
21646
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
21647
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
21648
|
+
var _useState = React.useState(false),
|
|
21649
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21650
|
+
visible = _useState2[0],
|
|
21651
|
+
setVisible = _useState2[1];
|
|
21652
|
+
var _useState3 = React.useState(''),
|
|
21653
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21654
|
+
fileUrl = _useState4[0],
|
|
21655
|
+
setFileUrl = _useState4[1];
|
|
21656
|
+
var _useState5 = React.useState(''),
|
|
21657
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
21658
|
+
fileType = _useState6[0],
|
|
21659
|
+
setFileType = _useState6[1];
|
|
21660
|
+
var _useState7 = React.useState(''),
|
|
21661
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
21662
|
+
fileName = _useState8[0],
|
|
21663
|
+
setFileName = _useState8[1];
|
|
21664
|
+
var valueRef = React.useRef(value);
|
|
21665
|
+
var uploadCount = React.useRef(0);
|
|
21666
|
+
var _useState9 = React.useState(false),
|
|
21667
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
21668
|
+
uploading = _useState10[0],
|
|
21669
|
+
setUploading = _useState10[1];
|
|
21670
|
+
var fileList = React.useMemo(function () {
|
|
21671
|
+
return value.map(function (t, i) {
|
|
21672
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
21673
|
+
percent: 100,
|
|
21674
|
+
uid: i + ''
|
|
21675
|
+
});
|
|
21676
|
+
});
|
|
21677
|
+
}, [value]);
|
|
21678
|
+
React.useEffect(function () {
|
|
21679
|
+
valueRef.current = value;
|
|
21680
|
+
}, [value]);
|
|
21681
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
21682
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
21683
|
+
var formData, fileName, _yield$request, success, data;
|
|
21684
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
21685
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21686
|
+
case 0:
|
|
21687
|
+
setUploading(true);
|
|
21688
|
+
uploadCount.current++;
|
|
21689
|
+
formData = new FormData();
|
|
21690
|
+
formData.append('file', file);
|
|
21691
|
+
fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
|
|
21692
|
+
formData.append('fileName', fileName);
|
|
21693
|
+
_context.prev = 6;
|
|
21694
|
+
_context.next = 9;
|
|
21695
|
+
return request__default['default'](actionUrl, {
|
|
21696
|
+
method: 'post',
|
|
21697
|
+
body: formData
|
|
21698
|
+
});
|
|
21699
|
+
case 9:
|
|
21700
|
+
_yield$request = _context.sent;
|
|
21701
|
+
success = _yield$request.success;
|
|
21702
|
+
data = _yield$request.data;
|
|
21703
|
+
if (success) {
|
|
21704
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
21705
|
+
kmVideoName: file.name,
|
|
21706
|
+
kmVideoUrl: "".concat(hostUrl, "/").concat(data)
|
|
21707
|
+
}]));
|
|
21708
|
+
}
|
|
21709
|
+
_context.next = 18;
|
|
21710
|
+
break;
|
|
21711
|
+
case 15:
|
|
21712
|
+
_context.prev = 15;
|
|
21713
|
+
_context.t0 = _context["catch"](6);
|
|
21714
|
+
antd.message.error('文件上传失败');
|
|
21715
|
+
case 18:
|
|
21716
|
+
_context.prev = 18;
|
|
21717
|
+
uploadCount.current--;
|
|
21718
|
+
if (uploadCount.current < 1) {
|
|
21719
|
+
setUploading(false);
|
|
21720
|
+
}
|
|
21721
|
+
return _context.finish(18);
|
|
21722
|
+
case 22:
|
|
21723
|
+
case "end":
|
|
21724
|
+
return _context.stop();
|
|
21725
|
+
}
|
|
21726
|
+
}, _callee, null, [[6, 15, 18, 22]]);
|
|
21727
|
+
}));
|
|
21728
|
+
return function asyncUpload(_x) {
|
|
21729
|
+
return _ref2.apply(this, arguments);
|
|
21730
|
+
};
|
|
21731
|
+
}();
|
|
21732
|
+
var download = function download(url, name) {
|
|
21733
|
+
if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
|
|
21734
|
+
window.open(url);
|
|
21735
|
+
return;
|
|
21736
|
+
}
|
|
21737
|
+
fetch(url).then(function (res) {
|
|
21738
|
+
return res.blob();
|
|
21739
|
+
}).then(function (blob) {
|
|
21740
|
+
var a = document.createElement('a');
|
|
21741
|
+
document.body.appendChild(a);
|
|
21742
|
+
a.style.display = 'none';
|
|
21743
|
+
var url = window.URL.createObjectURL(blob);
|
|
21744
|
+
a.href = url;
|
|
21745
|
+
a.download = name;
|
|
21746
|
+
a.click();
|
|
21747
|
+
document.body.removeChild(a);
|
|
21748
|
+
window.URL.revokeObjectURL(url);
|
|
21749
|
+
});
|
|
21750
|
+
};
|
|
21751
|
+
var handleChange = function handleChange(list) {
|
|
21752
|
+
valueRef.current = list;
|
|
21753
|
+
onChange(list);
|
|
21754
|
+
};
|
|
21755
|
+
// 手动上传模式, 一直返回false
|
|
21756
|
+
var beforeUpload = function beforeUpload(file, fileList) {
|
|
21757
|
+
// console.log('beforeUpload', file);
|
|
21758
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
21759
|
+
// TODO: 批量提交的时候
|
|
21760
|
+
if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
|
|
21761
|
+
antd.message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
|
|
21762
|
+
return antd.Upload.LIST_IGNORE;
|
|
21763
|
+
}
|
|
21764
|
+
if (!size) {
|
|
21765
|
+
antd.message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
21766
|
+
return antd.Upload.LIST_IGNORE;
|
|
21767
|
+
}
|
|
21768
|
+
asyncUpload(file);
|
|
21769
|
+
return antd.Upload.LIST_IGNORE;
|
|
21770
|
+
};
|
|
21771
|
+
var onRemove = function onRemove(file) {
|
|
21772
|
+
var newValue = value.filter(function (item) {
|
|
21773
|
+
return item.kmVideoUrl !== file.kmVideoUrl;
|
|
21774
|
+
});
|
|
21775
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
21776
|
+
};
|
|
21777
|
+
var onPreview = function onPreview(file) {
|
|
21778
|
+
var _file$url;
|
|
21779
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
21780
|
+
var fileType = fileArr[fileArr.length - 1];
|
|
21781
|
+
if (videoSuffixList.includes(fileType.toLowerCase())) {
|
|
21782
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
21783
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
21784
|
+
setFileType('video');
|
|
21785
|
+
setVisible(true);
|
|
21786
|
+
} else {
|
|
21787
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
21788
|
+
}
|
|
21789
|
+
};
|
|
21790
|
+
var handleCancel = function handleCancel() {
|
|
21791
|
+
setFileUrl('');
|
|
21792
|
+
setFileName('');
|
|
21793
|
+
setVisible(false);
|
|
21794
|
+
};
|
|
21795
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
|
|
21796
|
+
spinning: uploading
|
|
21797
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
21798
|
+
className: styles$6.tips
|
|
21799
|
+
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21800
|
+
className: styles$6.imageBox
|
|
21801
|
+
}, /*#__PURE__*/React__default['default'].createElement(Dragger$1, _objectSpread2({
|
|
21802
|
+
disabled: disabled,
|
|
21803
|
+
multiple: true,
|
|
21804
|
+
name: "file",
|
|
21805
|
+
maxCount: maxCount,
|
|
21806
|
+
beforeUpload: beforeUpload,
|
|
21807
|
+
onPreview: onPreview,
|
|
21808
|
+
fileList: fileList.map(function (item) {
|
|
21809
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
21810
|
+
url: item.kmVideoUrl,
|
|
21811
|
+
name: item.kmVideoName
|
|
21812
|
+
});
|
|
21813
|
+
}),
|
|
21814
|
+
onRemove: onRemove,
|
|
21815
|
+
accept: ".".concat(videoSuffixList.join(',.')),
|
|
21816
|
+
iconRender: function iconRender(file) {
|
|
21817
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
21818
|
+
align: "center"
|
|
21819
|
+
}, /*#__PURE__*/React__default['default'].createElement(icons.VideoCameraTwoTone, {
|
|
21820
|
+
style: {
|
|
21821
|
+
fontSize: 16
|
|
21822
|
+
}
|
|
21823
|
+
}), file.kmVideoType && "".concat(file.kmVideoType));
|
|
21824
|
+
}
|
|
21825
|
+
}, resetProps), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
21826
|
+
className: styles$6.addBtn
|
|
21827
|
+
}, "+"), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
21828
|
+
className: styles$6.addBtn
|
|
21829
|
+
}, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React__default['default'].createElement(antd.Modal, {
|
|
21830
|
+
visible: visible,
|
|
21831
|
+
title: fileName,
|
|
21832
|
+
footer: null,
|
|
21833
|
+
onCancel: handleCancel
|
|
21834
|
+
}, canDownload ? /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
21835
|
+
type: "link",
|
|
21836
|
+
onClick: function onClick() {
|
|
21837
|
+
return download(fileUrl, fileName);
|
|
21838
|
+
}
|
|
21839
|
+
}, "\u4E0B\u8F7D") : /*#__PURE__*/React__default['default'].createElement(reactCopyToClipboard.CopyToClipboard, {
|
|
21840
|
+
text: fileUrl,
|
|
21841
|
+
onCopy: function onCopy() {
|
|
21842
|
+
antd.message.success('复制成功');
|
|
21843
|
+
}
|
|
21844
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
21845
|
+
type: "link"
|
|
21846
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React__default['default'].createElement("img", {
|
|
21847
|
+
alt: "example",
|
|
21848
|
+
style: {
|
|
21849
|
+
width: '100%'
|
|
21850
|
+
},
|
|
21851
|
+
src: fileUrl
|
|
21852
|
+
}) : /*#__PURE__*/React__default['default'].createElement("video", {
|
|
21853
|
+
style: {
|
|
21854
|
+
width: '100%',
|
|
21855
|
+
height: '100%'
|
|
21856
|
+
},
|
|
21857
|
+
autoPlay: true,
|
|
21858
|
+
controls: true,
|
|
21859
|
+
src: fileUrl
|
|
21860
|
+
}))));
|
|
21861
|
+
};
|
|
21862
|
+
|
|
20428
21863
|
exports.Address = ApaasAddress;
|
|
20429
21864
|
exports.AliPay = AliPay;
|
|
20430
21865
|
exports.ApaasAddress = Province;
|
|
@@ -20446,6 +21881,7 @@ exports.ApaasUpload = ApaasUpload;
|
|
|
20446
21881
|
exports.ApaasUploadAsync = index;
|
|
20447
21882
|
exports.ApaasUploadFile = ApaasUploadFile;
|
|
20448
21883
|
exports.ApaasUploadProAsync = index$1;
|
|
21884
|
+
exports.AsyncSelect = AsyncSelect;
|
|
20449
21885
|
exports.BsE3Reissue = bsE3Reissue;
|
|
20450
21886
|
exports.BsExchange = BsExchange;
|
|
20451
21887
|
exports.BsGoods = BsGoods;
|
|
@@ -20471,6 +21907,7 @@ exports.IdentifyAddress = IdentifyAddress;
|
|
|
20471
21907
|
exports.Invoice = Invoice;
|
|
20472
21908
|
exports.JstGoods = jstGoods;
|
|
20473
21909
|
exports.JstItemList = ItemList;
|
|
21910
|
+
exports.KmVideo = KmVideo;
|
|
20474
21911
|
exports.LogisticsInterception = LogisticsInterception;
|
|
20475
21912
|
exports.LogisticsMoreInterception = LogisticsMoreInterception;
|
|
20476
21913
|
exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
|
|
@@ -20497,5 +21934,6 @@ exports.erpFormValidator = erpFormValidator;
|
|
|
20497
21934
|
exports.erpModalColumnsMap = index$2;
|
|
20498
21935
|
exports.getGyColumns = getColumns$4;
|
|
20499
21936
|
exports.getJstColumns = getColumns$5;
|
|
21937
|
+
exports.getKmColumns = getColumns$6;
|
|
20500
21938
|
exports.getWdtColumns = getColumns$2;
|
|
20501
21939
|
exports.getWlnColumns = getColumns$3;
|