@kmkf-fe-packages/basic-components 2.0.68 → 2.0.70
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 +731 -410
- package/dist/index.js +729 -408
- package/dist/src/common/Goods/RichItem.d.ts +3 -0
- package/dist/src/common/Goods/goodModel.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -3,384 +3,370 @@ import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, messag
|
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
|
|
4
4
|
import request, { extend as extend$1 } from 'umi-request';
|
|
5
5
|
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
|
6
|
-
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING,
|
|
7
|
-
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject, isEmpty, intersection
|
|
6
|
+
import { AddressData, BsAddressData, WdtAddressData, GyAddressData, request as request$1, ExpressData, uuid, servers, columnsGoodsList, LogisticsAddressData, SendDataCenter, BS_E3_BOOLEAN_STATUS_MAP, isNull, filterWdtOrders, WDT_ORDER_TYPE_MAP, tradeStatusMap, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING, filterJstOrders, filterKmOrders, getIsPlatformCodesIncludeOrderNos, BS_SYSTEM_ORDER_CONFIG, KM_SYSTEM_ORDER_CONFIG, WLN_SYSTEM_ORDER_CONFIG, WDT_SYSTEM_ORDER_CONFIG, BS_E3_SYSTEM_ORDER_CONFIG, GY_SYSTEM_ORDER_CONFIG, JST_SYSTEM_ORDER_CONFIG, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, uniqBy, cloneDeep, difference, differenceWith, isBoolean, isEqual, takeRight, reject, isEmpty, intersection } from 'lodash';
|
|
8
8
|
import { useUpdateEffect, useDebounceEffect, useAntdTable } from 'ahooks';
|
|
9
9
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
10
10
|
import pubsub from 'pubsub-js';
|
|
11
11
|
import BigNumber from 'bignumber.js';
|
|
12
12
|
|
|
13
|
-
function _iterableToArrayLimit(
|
|
14
|
-
var
|
|
15
|
-
if (null !=
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
function _iterableToArrayLimit(arr, i) {
|
|
14
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
15
|
+
if (null != _i) {
|
|
16
|
+
var _s,
|
|
17
|
+
_e,
|
|
18
|
+
_x,
|
|
19
|
+
_r,
|
|
20
|
+
_arr = [],
|
|
21
|
+
_n = !0,
|
|
22
|
+
_d = !1;
|
|
23
23
|
try {
|
|
24
|
-
if (
|
|
25
|
-
if (Object(
|
|
26
|
-
|
|
27
|
-
} else for (; !(
|
|
28
|
-
} catch (
|
|
29
|
-
|
|
24
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
25
|
+
if (Object(_i) !== _i) return;
|
|
26
|
+
_n = !1;
|
|
27
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
28
|
+
} catch (err) {
|
|
29
|
+
_d = !0, _e = err;
|
|
30
30
|
} finally {
|
|
31
31
|
try {
|
|
32
|
-
if (!
|
|
32
|
+
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
33
33
|
} finally {
|
|
34
|
-
if (
|
|
34
|
+
if (_d) throw _e;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return _arr;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function ownKeys(
|
|
41
|
-
var
|
|
40
|
+
function ownKeys(object, enumerableOnly) {
|
|
41
|
+
var keys = Object.keys(object);
|
|
42
42
|
if (Object.getOwnPropertySymbols) {
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
return Object.getOwnPropertyDescriptor(
|
|
46
|
-
})),
|
|
43
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
44
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
45
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
46
|
+
})), keys.push.apply(keys, symbols);
|
|
47
47
|
}
|
|
48
|
-
return
|
|
49
|
-
}
|
|
50
|
-
function _objectSpread2(
|
|
51
|
-
for (var
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
_defineProperty(
|
|
55
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
56
|
-
Object.defineProperty(
|
|
48
|
+
return keys;
|
|
49
|
+
}
|
|
50
|
+
function _objectSpread2(target) {
|
|
51
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
52
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
53
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
54
|
+
_defineProperty(target, key, source[key]);
|
|
55
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
56
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return target;
|
|
60
60
|
}
|
|
61
61
|
function _regeneratorRuntime() {
|
|
62
62
|
_regeneratorRuntime = function () {
|
|
63
|
-
return
|
|
63
|
+
return exports;
|
|
64
64
|
};
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
t[e] = r.value;
|
|
65
|
+
var exports = {},
|
|
66
|
+
Op = Object.prototype,
|
|
67
|
+
hasOwn = Op.hasOwnProperty,
|
|
68
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
69
|
+
obj[key] = desc.value;
|
|
71
70
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
function define(
|
|
77
|
-
return Object.defineProperty(
|
|
78
|
-
value:
|
|
71
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
72
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
73
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
74
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
75
|
+
function define(obj, key, value) {
|
|
76
|
+
return Object.defineProperty(obj, key, {
|
|
77
|
+
value: value,
|
|
79
78
|
enumerable: !0,
|
|
80
79
|
configurable: !0,
|
|
81
80
|
writable: !0
|
|
82
|
-
}),
|
|
81
|
+
}), obj[key];
|
|
83
82
|
}
|
|
84
83
|
try {
|
|
85
84
|
define({}, "");
|
|
86
|
-
} catch (
|
|
87
|
-
define = function (
|
|
88
|
-
return
|
|
85
|
+
} catch (err) {
|
|
86
|
+
define = function (obj, key, value) {
|
|
87
|
+
return obj[key] = value;
|
|
89
88
|
};
|
|
90
89
|
}
|
|
91
|
-
function wrap(
|
|
92
|
-
var
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return
|
|
96
|
-
value: makeInvokeMethod(
|
|
97
|
-
}),
|
|
90
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
91
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
92
|
+
generator = Object.create(protoGenerator.prototype),
|
|
93
|
+
context = new Context(tryLocsList || []);
|
|
94
|
+
return defineProperty(generator, "_invoke", {
|
|
95
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
96
|
+
}), generator;
|
|
98
97
|
}
|
|
99
|
-
function tryCatch(
|
|
98
|
+
function tryCatch(fn, obj, arg) {
|
|
100
99
|
try {
|
|
101
100
|
return {
|
|
102
101
|
type: "normal",
|
|
103
|
-
arg:
|
|
102
|
+
arg: fn.call(obj, arg)
|
|
104
103
|
};
|
|
105
|
-
} catch (
|
|
104
|
+
} catch (err) {
|
|
106
105
|
return {
|
|
107
106
|
type: "throw",
|
|
108
|
-
arg:
|
|
107
|
+
arg: err
|
|
109
108
|
};
|
|
110
109
|
}
|
|
111
110
|
}
|
|
112
|
-
|
|
113
|
-
var
|
|
114
|
-
l = "suspendedYield",
|
|
115
|
-
f = "executing",
|
|
116
|
-
s = "completed",
|
|
117
|
-
y = {};
|
|
111
|
+
exports.wrap = wrap;
|
|
112
|
+
var ContinueSentinel = {};
|
|
118
113
|
function Generator() {}
|
|
119
114
|
function GeneratorFunction() {}
|
|
120
115
|
function GeneratorFunctionPrototype() {}
|
|
121
|
-
var
|
|
122
|
-
define(
|
|
116
|
+
var IteratorPrototype = {};
|
|
117
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
123
118
|
return this;
|
|
124
119
|
});
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
var
|
|
129
|
-
function defineIteratorMethods(
|
|
130
|
-
["next", "throw", "return"].forEach(function (
|
|
131
|
-
define(
|
|
132
|
-
return this._invoke(
|
|
120
|
+
var getProto = Object.getPrototypeOf,
|
|
121
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
122
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
123
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
124
|
+
function defineIteratorMethods(prototype) {
|
|
125
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
126
|
+
define(prototype, method, function (arg) {
|
|
127
|
+
return this._invoke(method, arg);
|
|
133
128
|
});
|
|
134
129
|
});
|
|
135
130
|
}
|
|
136
|
-
function AsyncIterator(
|
|
137
|
-
function invoke(
|
|
138
|
-
var
|
|
139
|
-
if ("throw" !==
|
|
140
|
-
var
|
|
141
|
-
|
|
142
|
-
return
|
|
143
|
-
invoke("next",
|
|
144
|
-
}, function (
|
|
145
|
-
invoke("throw",
|
|
146
|
-
}) :
|
|
147
|
-
|
|
148
|
-
}, function (
|
|
149
|
-
return invoke("throw",
|
|
131
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
132
|
+
function invoke(method, arg, resolve, reject) {
|
|
133
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
134
|
+
if ("throw" !== record.type) {
|
|
135
|
+
var result = record.arg,
|
|
136
|
+
value = result.value;
|
|
137
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
138
|
+
invoke("next", value, resolve, reject);
|
|
139
|
+
}, function (err) {
|
|
140
|
+
invoke("throw", err, resolve, reject);
|
|
141
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
142
|
+
result.value = unwrapped, resolve(result);
|
|
143
|
+
}, function (error) {
|
|
144
|
+
return invoke("throw", error, resolve, reject);
|
|
150
145
|
});
|
|
151
146
|
}
|
|
152
|
-
|
|
147
|
+
reject(record.arg);
|
|
153
148
|
}
|
|
154
|
-
var
|
|
155
|
-
|
|
156
|
-
value: function (
|
|
149
|
+
var previousPromise;
|
|
150
|
+
defineProperty(this, "_invoke", {
|
|
151
|
+
value: function (method, arg) {
|
|
157
152
|
function callInvokeWithMethodAndArg() {
|
|
158
|
-
return new
|
|
159
|
-
invoke(
|
|
153
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
154
|
+
invoke(method, arg, resolve, reject);
|
|
160
155
|
});
|
|
161
156
|
}
|
|
162
|
-
return
|
|
157
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
163
158
|
}
|
|
164
159
|
});
|
|
165
160
|
}
|
|
166
|
-
function makeInvokeMethod(
|
|
167
|
-
var
|
|
168
|
-
return function (
|
|
169
|
-
if (
|
|
170
|
-
if (
|
|
171
|
-
if ("throw" ===
|
|
172
|
-
return
|
|
173
|
-
value: t,
|
|
174
|
-
done: !0
|
|
175
|
-
};
|
|
161
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
162
|
+
var state = "suspendedStart";
|
|
163
|
+
return function (method, arg) {
|
|
164
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
165
|
+
if ("completed" === state) {
|
|
166
|
+
if ("throw" === method) throw arg;
|
|
167
|
+
return doneResult();
|
|
176
168
|
}
|
|
177
|
-
for (
|
|
178
|
-
var
|
|
179
|
-
if (
|
|
180
|
-
var
|
|
181
|
-
if (
|
|
182
|
-
if (
|
|
183
|
-
return
|
|
169
|
+
for (context.method = method, context.arg = arg;;) {
|
|
170
|
+
var delegate = context.delegate;
|
|
171
|
+
if (delegate) {
|
|
172
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
173
|
+
if (delegateResult) {
|
|
174
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
175
|
+
return delegateResult;
|
|
184
176
|
}
|
|
185
177
|
}
|
|
186
|
-
if ("next" ===
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
} else "return" ===
|
|
190
|
-
|
|
191
|
-
var
|
|
192
|
-
if ("normal" ===
|
|
193
|
-
if (
|
|
178
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
179
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
180
|
+
context.dispatchException(context.arg);
|
|
181
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
182
|
+
state = "executing";
|
|
183
|
+
var record = tryCatch(innerFn, self, context);
|
|
184
|
+
if ("normal" === record.type) {
|
|
185
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
194
186
|
return {
|
|
195
|
-
value:
|
|
196
|
-
done:
|
|
187
|
+
value: record.arg,
|
|
188
|
+
done: context.done
|
|
197
189
|
};
|
|
198
190
|
}
|
|
199
|
-
"throw" ===
|
|
191
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
200
192
|
}
|
|
201
193
|
};
|
|
202
194
|
}
|
|
203
|
-
function maybeInvokeDelegate(
|
|
204
|
-
var
|
|
205
|
-
|
|
206
|
-
if (
|
|
207
|
-
var
|
|
208
|
-
if ("throw" ===
|
|
209
|
-
var
|
|
210
|
-
return
|
|
195
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
196
|
+
var methodName = context.method,
|
|
197
|
+
method = delegate.iterator[methodName];
|
|
198
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
199
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
200
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
201
|
+
var info = record.arg;
|
|
202
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
211
203
|
}
|
|
212
|
-
function pushTryEntry(
|
|
213
|
-
var
|
|
214
|
-
tryLoc:
|
|
204
|
+
function pushTryEntry(locs) {
|
|
205
|
+
var entry = {
|
|
206
|
+
tryLoc: locs[0]
|
|
215
207
|
};
|
|
216
|
-
1 in
|
|
208
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
217
209
|
}
|
|
218
|
-
function resetTryEntry(
|
|
219
|
-
var
|
|
220
|
-
|
|
210
|
+
function resetTryEntry(entry) {
|
|
211
|
+
var record = entry.completion || {};
|
|
212
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
221
213
|
}
|
|
222
|
-
function Context(
|
|
214
|
+
function Context(tryLocsList) {
|
|
223
215
|
this.tryEntries = [{
|
|
224
216
|
tryLoc: "root"
|
|
225
|
-
}],
|
|
217
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
226
218
|
}
|
|
227
|
-
function values(
|
|
228
|
-
if (
|
|
229
|
-
var
|
|
230
|
-
if (
|
|
231
|
-
if ("function" == typeof
|
|
232
|
-
if (!isNaN(
|
|
233
|
-
var
|
|
234
|
-
|
|
235
|
-
for (; ++
|
|
236
|
-
return next.value =
|
|
219
|
+
function values(iterable) {
|
|
220
|
+
if (iterable) {
|
|
221
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
222
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
223
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
224
|
+
if (!isNaN(iterable.length)) {
|
|
225
|
+
var i = -1,
|
|
226
|
+
next = function next() {
|
|
227
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
228
|
+
return next.value = undefined, next.done = !0, next;
|
|
237
229
|
};
|
|
238
|
-
return
|
|
230
|
+
return next.next = next;
|
|
239
231
|
}
|
|
240
232
|
}
|
|
241
|
-
|
|
233
|
+
return {
|
|
234
|
+
next: doneResult
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function doneResult() {
|
|
238
|
+
return {
|
|
239
|
+
value: undefined,
|
|
240
|
+
done: !0
|
|
241
|
+
};
|
|
242
242
|
}
|
|
243
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
243
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
244
244
|
value: GeneratorFunctionPrototype,
|
|
245
245
|
configurable: !0
|
|
246
|
-
}),
|
|
246
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
247
247
|
value: GeneratorFunction,
|
|
248
248
|
configurable: !0
|
|
249
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
250
|
-
var
|
|
251
|
-
return !!
|
|
252
|
-
},
|
|
253
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
254
|
-
},
|
|
249
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
250
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
251
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
252
|
+
}, exports.mark = function (genFun) {
|
|
253
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
254
|
+
}, exports.awrap = function (arg) {
|
|
255
255
|
return {
|
|
256
|
-
__await:
|
|
256
|
+
__await: arg
|
|
257
257
|
};
|
|
258
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
258
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
259
259
|
return this;
|
|
260
|
-
}),
|
|
261
|
-
void 0 ===
|
|
262
|
-
var
|
|
263
|
-
return
|
|
264
|
-
return
|
|
260
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
261
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
262
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
263
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
264
|
+
return result.done ? result.value : iter.next();
|
|
265
265
|
});
|
|
266
|
-
}, defineIteratorMethods(
|
|
266
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
267
267
|
return this;
|
|
268
|
-
}), define(
|
|
268
|
+
}), define(Gp, "toString", function () {
|
|
269
269
|
return "[object Generator]";
|
|
270
|
-
}),
|
|
271
|
-
var
|
|
272
|
-
|
|
273
|
-
for (var
|
|
274
|
-
return
|
|
275
|
-
for (;
|
|
276
|
-
var
|
|
277
|
-
if (
|
|
270
|
+
}), exports.keys = function (val) {
|
|
271
|
+
var object = Object(val),
|
|
272
|
+
keys = [];
|
|
273
|
+
for (var key in object) keys.push(key);
|
|
274
|
+
return keys.reverse(), function next() {
|
|
275
|
+
for (; keys.length;) {
|
|
276
|
+
var key = keys.pop();
|
|
277
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
278
278
|
}
|
|
279
279
|
return next.done = !0, next;
|
|
280
280
|
};
|
|
281
|
-
},
|
|
281
|
+
}, exports.values = values, Context.prototype = {
|
|
282
282
|
constructor: Context,
|
|
283
|
-
reset: function (
|
|
284
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
283
|
+
reset: function (skipTempReset) {
|
|
284
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
285
285
|
},
|
|
286
286
|
stop: function () {
|
|
287
287
|
this.done = !0;
|
|
288
|
-
var
|
|
289
|
-
if ("throw" ===
|
|
288
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
289
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
290
290
|
return this.rval;
|
|
291
291
|
},
|
|
292
|
-
dispatchException: function (
|
|
293
|
-
if (this.done) throw
|
|
294
|
-
var
|
|
295
|
-
function handle(
|
|
296
|
-
return
|
|
292
|
+
dispatchException: function (exception) {
|
|
293
|
+
if (this.done) throw exception;
|
|
294
|
+
var context = this;
|
|
295
|
+
function handle(loc, caught) {
|
|
296
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
297
297
|
}
|
|
298
|
-
for (var
|
|
299
|
-
var
|
|
300
|
-
|
|
301
|
-
if ("root" ===
|
|
302
|
-
if (
|
|
303
|
-
var
|
|
304
|
-
|
|
305
|
-
if (
|
|
306
|
-
if (this.prev <
|
|
307
|
-
if (this.prev <
|
|
308
|
-
} else if (
|
|
309
|
-
if (this.prev <
|
|
298
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
299
|
+
var entry = this.tryEntries[i],
|
|
300
|
+
record = entry.completion;
|
|
301
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
302
|
+
if (entry.tryLoc <= this.prev) {
|
|
303
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
304
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
305
|
+
if (hasCatch && hasFinally) {
|
|
306
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
307
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
308
|
+
} else if (hasCatch) {
|
|
309
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
310
310
|
} else {
|
|
311
|
-
if (!
|
|
312
|
-
if (this.prev <
|
|
311
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
312
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
},
|
|
317
|
-
abrupt: function (
|
|
318
|
-
for (var
|
|
319
|
-
var
|
|
320
|
-
if (
|
|
321
|
-
var
|
|
317
|
+
abrupt: function (type, arg) {
|
|
318
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
319
|
+
var entry = this.tryEntries[i];
|
|
320
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
321
|
+
var finallyEntry = entry;
|
|
322
322
|
break;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
|
|
326
|
-
var
|
|
327
|
-
return
|
|
325
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
326
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
327
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
328
328
|
},
|
|
329
|
-
complete: function (
|
|
330
|
-
if ("throw" ===
|
|
331
|
-
return "break" ===
|
|
329
|
+
complete: function (record, afterLoc) {
|
|
330
|
+
if ("throw" === record.type) throw record.arg;
|
|
331
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
332
332
|
},
|
|
333
|
-
finish: function (
|
|
334
|
-
for (var
|
|
335
|
-
var
|
|
336
|
-
if (
|
|
333
|
+
finish: function (finallyLoc) {
|
|
334
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
335
|
+
var entry = this.tryEntries[i];
|
|
336
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
337
337
|
}
|
|
338
338
|
},
|
|
339
|
-
catch: function (
|
|
340
|
-
for (var
|
|
341
|
-
var
|
|
342
|
-
if (
|
|
343
|
-
var
|
|
344
|
-
if ("throw" ===
|
|
345
|
-
var
|
|
346
|
-
resetTryEntry(
|
|
339
|
+
catch: function (tryLoc) {
|
|
340
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
341
|
+
var entry = this.tryEntries[i];
|
|
342
|
+
if (entry.tryLoc === tryLoc) {
|
|
343
|
+
var record = entry.completion;
|
|
344
|
+
if ("throw" === record.type) {
|
|
345
|
+
var thrown = record.arg;
|
|
346
|
+
resetTryEntry(entry);
|
|
347
347
|
}
|
|
348
|
-
return
|
|
348
|
+
return thrown;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
throw new Error("illegal catch attempt");
|
|
352
352
|
},
|
|
353
|
-
delegateYield: function (
|
|
353
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
354
354
|
return this.delegate = {
|
|
355
|
-
iterator: values(
|
|
356
|
-
resultName:
|
|
357
|
-
nextLoc:
|
|
358
|
-
}, "next" === this.method && (this.arg =
|
|
359
|
-
}
|
|
360
|
-
},
|
|
361
|
-
}
|
|
362
|
-
function _toPrimitive(t, r) {
|
|
363
|
-
if ("object" != typeof t || !t) return t;
|
|
364
|
-
var e = t[Symbol.toPrimitive];
|
|
365
|
-
if (void 0 !== e) {
|
|
366
|
-
var i = e.call(t, r || "default");
|
|
367
|
-
if ("object" != typeof i) return i;
|
|
368
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
369
|
-
}
|
|
370
|
-
return ("string" === r ? String : Number)(t);
|
|
371
|
-
}
|
|
372
|
-
function _toPropertyKey(t) {
|
|
373
|
-
var i = _toPrimitive(t, "string");
|
|
374
|
-
return "symbol" == typeof i ? i : String(i);
|
|
355
|
+
iterator: values(iterable),
|
|
356
|
+
resultName: resultName,
|
|
357
|
+
nextLoc: nextLoc
|
|
358
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
359
|
+
}
|
|
360
|
+
}, exports;
|
|
375
361
|
}
|
|
376
|
-
function _typeof(
|
|
362
|
+
function _typeof(obj) {
|
|
377
363
|
"@babel/helpers - typeof";
|
|
378
364
|
|
|
379
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
380
|
-
return typeof
|
|
381
|
-
} : function (
|
|
382
|
-
return
|
|
383
|
-
}, _typeof(
|
|
365
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
366
|
+
return typeof obj;
|
|
367
|
+
} : function (obj) {
|
|
368
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
369
|
+
}, _typeof(obj);
|
|
384
370
|
}
|
|
385
371
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
386
372
|
try {
|
|
@@ -538,6 +524,20 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
|
538
524
|
}
|
|
539
525
|
};
|
|
540
526
|
}
|
|
527
|
+
function _toPrimitive(input, hint) {
|
|
528
|
+
if (typeof input !== "object" || input === null) return input;
|
|
529
|
+
var prim = input[Symbol.toPrimitive];
|
|
530
|
+
if (prim !== undefined) {
|
|
531
|
+
var res = prim.call(input, hint || "default");
|
|
532
|
+
if (typeof res !== "object") return res;
|
|
533
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
534
|
+
}
|
|
535
|
+
return (hint === "string" ? String : Number)(input);
|
|
536
|
+
}
|
|
537
|
+
function _toPropertyKey(arg) {
|
|
538
|
+
var key = _toPrimitive(arg, "string");
|
|
539
|
+
return typeof key === "symbol" ? key : String(key);
|
|
540
|
+
}
|
|
541
541
|
|
|
542
542
|
function ApaasCascader(props) {
|
|
543
543
|
return /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
|
|
@@ -8131,17 +8131,16 @@ var SubForm = function SubForm(props) {
|
|
|
8131
8131
|
return [{
|
|
8132
8132
|
dataIndex: 'index',
|
|
8133
8133
|
title: '序号',
|
|
8134
|
+
fixed: 'left',
|
|
8135
|
+
width: 20,
|
|
8134
8136
|
render: function render(val, record, index) {
|
|
8135
|
-
return
|
|
8136
|
-
style: {
|
|
8137
|
-
width: 25
|
|
8138
|
-
}
|
|
8139
|
-
}, index + 1);
|
|
8137
|
+
return index + 1;
|
|
8140
8138
|
}
|
|
8141
8139
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8142
8140
|
return {
|
|
8143
8141
|
dataIndex: t.key,
|
|
8144
|
-
title: t.name
|
|
8142
|
+
title: t.name,
|
|
8143
|
+
width: 90
|
|
8145
8144
|
};
|
|
8146
8145
|
})));
|
|
8147
8146
|
}, [newTableHeader]);
|
|
@@ -8329,7 +8328,7 @@ var SubForm = function SubForm(props) {
|
|
|
8329
8328
|
onScrollCapture: onScrollCapture,
|
|
8330
8329
|
style: {
|
|
8331
8330
|
height: 320,
|
|
8332
|
-
maxWidth: platform !== 'pc' ? '325px' : '
|
|
8331
|
+
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8333
8332
|
overflowY: 'scroll',
|
|
8334
8333
|
overflowX: 'auto'
|
|
8335
8334
|
}
|
|
@@ -8340,7 +8339,7 @@ var SubForm = function SubForm(props) {
|
|
|
8340
8339
|
size: "small",
|
|
8341
8340
|
pagination: false,
|
|
8342
8341
|
scroll: {
|
|
8343
|
-
x: '
|
|
8342
|
+
x: 'max-content'
|
|
8344
8343
|
},
|
|
8345
8344
|
locale: {
|
|
8346
8345
|
emptyText: '暂无数据'
|
|
@@ -8713,7 +8712,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8713
8712
|
changeSku = props.changeSku,
|
|
8714
8713
|
width = props.width,
|
|
8715
8714
|
_props$numIidType = props.numIidType,
|
|
8716
|
-
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType
|
|
8715
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
|
|
8716
|
+
form = props.form,
|
|
8717
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
8717
8718
|
var _useState = useState([]),
|
|
8718
8719
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8719
8720
|
selectList = _useState2[0],
|
|
@@ -8726,10 +8727,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8726
8727
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8727
8728
|
goodList = _useState6[0],
|
|
8728
8729
|
setGoodList = _useState6[1];
|
|
8729
|
-
var _useState7 = useState(
|
|
8730
|
+
var _useState7 = useState([]),
|
|
8730
8731
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
8731
|
-
|
|
8732
|
-
|
|
8732
|
+
orderNoItems = _useState8[0],
|
|
8733
|
+
setOrderNoItems = _useState8[1];
|
|
8734
|
+
var _useState9 = useState(false),
|
|
8735
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8736
|
+
loading = _useState10[0],
|
|
8737
|
+
setLoading = _useState10[1];
|
|
8733
8738
|
var transformIdType = function transformIdType(id) {
|
|
8734
8739
|
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
8735
8740
|
return numIidType === 'string' ? id + '' : +id;
|
|
@@ -8749,7 +8754,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8749
8754
|
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8750
8755
|
return setGoodList(list.map(transformType));
|
|
8751
8756
|
};
|
|
8752
|
-
var
|
|
8757
|
+
var _useState11 = useState({
|
|
8753
8758
|
apiName: 'queryItems',
|
|
8754
8759
|
desc: true,
|
|
8755
8760
|
numIids: '',
|
|
@@ -8761,30 +8766,30 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8761
8766
|
cids: '',
|
|
8762
8767
|
title: ''
|
|
8763
8768
|
}),
|
|
8764
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8765
|
-
searchParams = _useState10[0],
|
|
8766
|
-
setSearch = _useState10[1];
|
|
8767
|
-
var _useState11 = useState(0),
|
|
8768
8769
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
var _useState13 = useState(
|
|
8770
|
+
searchParams = _useState12[0],
|
|
8771
|
+
setSearch = _useState12[1];
|
|
8772
|
+
var _useState13 = useState(0),
|
|
8772
8773
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
var _useState15 = useState(
|
|
8774
|
+
total = _useState14[0],
|
|
8775
|
+
setTotal = _useState14[1];
|
|
8776
|
+
var _useState15 = useState(''),
|
|
8776
8777
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
var _useState17 = useState(
|
|
8778
|
+
platform = _useState16[0],
|
|
8779
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
8780
|
+
var _useState17 = useState({}),
|
|
8780
8781
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
var _useState19 = useState(
|
|
8782
|
+
shopInfo = _useState18[0],
|
|
8783
|
+
setShopInfo = _useState18[1]; //店铺信息
|
|
8784
|
+
var _useState19 = useState(true),
|
|
8784
8785
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
var _useState21 = useState([
|
|
8786
|
+
canSearch = _useState20[0],
|
|
8787
|
+
setCanSearch = _useState20[1];
|
|
8788
|
+
var _useState21 = useState([null]),
|
|
8789
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8790
|
+
nextKeyList = _useState22[0],
|
|
8791
|
+
setNextKeyList = _useState22[1];
|
|
8792
|
+
var _useState23 = useState([{
|
|
8788
8793
|
tab: '出售中',
|
|
8789
8794
|
key: 'onSale'
|
|
8790
8795
|
}, {
|
|
@@ -8794,10 +8799,10 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8794
8799
|
tab: '已选择',
|
|
8795
8800
|
key: 'select'
|
|
8796
8801
|
}]),
|
|
8797
|
-
|
|
8798
|
-
tabs =
|
|
8799
|
-
setTabs =
|
|
8800
|
-
var
|
|
8802
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
8803
|
+
tabs = _useState24[0],
|
|
8804
|
+
setTabs = _useState24[1];
|
|
8805
|
+
var _useState25 = useState([{
|
|
8801
8806
|
name: '上架时间',
|
|
8802
8807
|
value: 'list_time'
|
|
8803
8808
|
}, {
|
|
@@ -8807,13 +8812,13 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8807
8812
|
name: '按价格',
|
|
8808
8813
|
value: 'price'
|
|
8809
8814
|
}]),
|
|
8810
|
-
|
|
8811
|
-
goodSort =
|
|
8815
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
8816
|
+
goodSort = _useState26[0];
|
|
8812
8817
|
//宝贝分类
|
|
8813
|
-
var
|
|
8814
|
-
|
|
8815
|
-
shell =
|
|
8816
|
-
setShell =
|
|
8818
|
+
var _useState27 = useState([]),
|
|
8819
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
8820
|
+
shell = _useState28[0],
|
|
8821
|
+
setShell = _useState28[1];
|
|
8817
8822
|
var clickOrder = function clickOrder(sort) {
|
|
8818
8823
|
if (sort.value === searchParams.orderBy) {
|
|
8819
8824
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9086,8 +9091,112 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9086
9091
|
}
|
|
9087
9092
|
}, [platform]);
|
|
9088
9093
|
useEffect(function () {
|
|
9089
|
-
platform && canSearch
|
|
9094
|
+
if (platform && canSearch) {
|
|
9095
|
+
if (searchParams.type === 'orderProduct') {
|
|
9096
|
+
getOrderProductItem(searchParams);
|
|
9097
|
+
} else {
|
|
9098
|
+
getItem(searchParams, platform);
|
|
9099
|
+
}
|
|
9100
|
+
}
|
|
9090
9101
|
}, [searchParams, platform]);
|
|
9102
|
+
useEffect(function () {
|
|
9103
|
+
if (visible && platform !== 'fxg') {
|
|
9104
|
+
var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9105
|
+
var orderNo = val['m3ap1EvEyd'];
|
|
9106
|
+
if (orderNo) {
|
|
9107
|
+
setTabs(function (prev) {
|
|
9108
|
+
return uniqBy([{
|
|
9109
|
+
tab: '订单商品',
|
|
9110
|
+
key: 'orderProduct'
|
|
9111
|
+
}].concat(_toConsumableArray(prev)), 'key');
|
|
9112
|
+
});
|
|
9113
|
+
if (isPriorityDisplayOfOrderNo) {
|
|
9114
|
+
setSearch(function (prev) {
|
|
9115
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
9116
|
+
type: 'orderProduct'
|
|
9117
|
+
});
|
|
9118
|
+
});
|
|
9119
|
+
}
|
|
9120
|
+
}
|
|
9121
|
+
}
|
|
9122
|
+
if (!visible) {
|
|
9123
|
+
setOrderNoItems([]);
|
|
9124
|
+
}
|
|
9125
|
+
}, [visible]);
|
|
9126
|
+
var getOrderProductItem = /*#__PURE__*/function () {
|
|
9127
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
9128
|
+
var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
|
|
9129
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9130
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9131
|
+
case 0:
|
|
9132
|
+
val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9133
|
+
orderNo = val.m3ap1EvEyd, shopId = val.shopId;
|
|
9134
|
+
if (orderNo) {
|
|
9135
|
+
_context2.next = 4;
|
|
9136
|
+
break;
|
|
9137
|
+
}
|
|
9138
|
+
return _context2.abrupt("return", handleSetGoodList([]));
|
|
9139
|
+
case 4:
|
|
9140
|
+
if (orderNoItems.length) {
|
|
9141
|
+
_context2.next = 20;
|
|
9142
|
+
break;
|
|
9143
|
+
}
|
|
9144
|
+
_context2.prev = 5;
|
|
9145
|
+
setLoading(true);
|
|
9146
|
+
_context2.next = 9;
|
|
9147
|
+
return servers.orderDetail({
|
|
9148
|
+
shopId: shopId,
|
|
9149
|
+
orderNo: orderNo
|
|
9150
|
+
});
|
|
9151
|
+
case 9:
|
|
9152
|
+
res = _context2.sent;
|
|
9153
|
+
if (res.success) {
|
|
9154
|
+
_context2.next = 14;
|
|
9155
|
+
break;
|
|
9156
|
+
}
|
|
9157
|
+
handleSetGoodList([]);
|
|
9158
|
+
message.warn(res.message);
|
|
9159
|
+
return _context2.abrupt("return");
|
|
9160
|
+
case 14:
|
|
9161
|
+
if (res.data && res.data.itemList && res.data.itemList.length) {
|
|
9162
|
+
items = res.data.itemList;
|
|
9163
|
+
totalCount = items.length;
|
|
9164
|
+
items.forEach(function (item) {
|
|
9165
|
+
item.platform = platform;
|
|
9166
|
+
});
|
|
9167
|
+
setOrderNoItems(items);
|
|
9168
|
+
pageNo = params.pageNo, pageSize = params.pageSize;
|
|
9169
|
+
handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
|
|
9170
|
+
setTotal(totalCount);
|
|
9171
|
+
}
|
|
9172
|
+
case 15:
|
|
9173
|
+
_context2.prev = 15;
|
|
9174
|
+
setLoading(false);
|
|
9175
|
+
return _context2.finish(15);
|
|
9176
|
+
case 18:
|
|
9177
|
+
_context2.next = 26;
|
|
9178
|
+
break;
|
|
9179
|
+
case 20:
|
|
9180
|
+
_pageNo = params.pageNo, _pageSize = params.pageSize;
|
|
9181
|
+
title = params.title;
|
|
9182
|
+
if (platform !== 'taobao') {
|
|
9183
|
+
title = params.numIids;
|
|
9184
|
+
}
|
|
9185
|
+
_items = title ? orderNoItems.filter(function (item) {
|
|
9186
|
+
return item.title.includes(title.trim());
|
|
9187
|
+
}) : orderNoItems;
|
|
9188
|
+
handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
|
|
9189
|
+
setTotal(_items.length);
|
|
9190
|
+
case 26:
|
|
9191
|
+
case "end":
|
|
9192
|
+
return _context2.stop();
|
|
9193
|
+
}
|
|
9194
|
+
}, _callee2, null, [[5,, 15, 18]]);
|
|
9195
|
+
}));
|
|
9196
|
+
return function getOrderProductItem(_x2) {
|
|
9197
|
+
return _ref4.apply(this, arguments);
|
|
9198
|
+
};
|
|
9199
|
+
}();
|
|
9091
9200
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
9092
9201
|
title: '选择宝贝',
|
|
9093
9202
|
okText: '确认',
|
|
@@ -9121,7 +9230,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9121
9230
|
style: {
|
|
9122
9231
|
display: searchParams.type === 'select' ? 'none' : ''
|
|
9123
9232
|
}
|
|
9124
|
-
}, platform === 'taobao' && /*#__PURE__*/React.createElement(Radio.Group, {
|
|
9233
|
+
}, /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Radio.Group, {
|
|
9125
9234
|
value: searchParams.orderBy,
|
|
9126
9235
|
onChange: function onChange(e) {
|
|
9127
9236
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9137,7 +9246,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9137
9246
|
},
|
|
9138
9247
|
key: sort.value
|
|
9139
9248
|
}, sort.name, sort.value === searchParams.orderBy ? searchParams.desc ? /*#__PURE__*/React.createElement("span", null, "\u21BE") : /*#__PURE__*/React.createElement("span", null, "\u21C2") : /*#__PURE__*/React.createElement("span", null, "\u21C5"));
|
|
9140
|
-
})), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && /*#__PURE__*/React.createElement(Select, {
|
|
9249
|
+
}))), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Select, {
|
|
9141
9250
|
className: "classify",
|
|
9142
9251
|
value: searchParams.cids,
|
|
9143
9252
|
onChange: function onChange(value) {
|
|
@@ -9152,7 +9261,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9152
9261
|
key: item.value
|
|
9153
9262
|
}, item.label);
|
|
9154
9263
|
})), /*#__PURE__*/React.createElement(Search, {
|
|
9155
|
-
placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
|
|
9264
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
|
|
9156
9265
|
// enterButton="搜索"
|
|
9157
9266
|
className: "search",
|
|
9158
9267
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -9775,7 +9884,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9775
9884
|
userNick = props.userNick,
|
|
9776
9885
|
disabled = props.disabled,
|
|
9777
9886
|
changeSku = props.changeSku,
|
|
9778
|
-
width = props.width
|
|
9887
|
+
width = props.width,
|
|
9888
|
+
form = props.form,
|
|
9889
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
9779
9890
|
var shopId = value.shopId,
|
|
9780
9891
|
imgList = value.imgList;
|
|
9781
9892
|
var _useState = useState(false),
|
|
@@ -9866,7 +9977,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9866
9977
|
var onSubmit = /*#__PURE__*/function () {
|
|
9867
9978
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9868
9979
|
var _list$;
|
|
9869
|
-
var newList, newImgList;
|
|
9980
|
+
var newList, newImgList, _list$2;
|
|
9870
9981
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9871
9982
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9872
9983
|
case 0:
|
|
@@ -9888,7 +9999,11 @@ var GoodItem = function GoodItem(props) {
|
|
|
9888
9999
|
// if (type === 1) {
|
|
9889
10000
|
// params.outerId = item.outerId; //编码
|
|
9890
10001
|
// }
|
|
9891
|
-
|
|
10002
|
+
//返填商品属性 && 为订单商品
|
|
10003
|
+
if (changeSku && item.skuInfoDTO) {
|
|
10004
|
+
params.outerSkuId = item.skuInfoDTO.outerSkuId;
|
|
10005
|
+
params.propertiesName = item.skuInfoDTO.propertiesName;
|
|
10006
|
+
} else if (changeSku) {
|
|
9892
10007
|
params.propertiesName = '';
|
|
9893
10008
|
}
|
|
9894
10009
|
// if (type === 4) {
|
|
@@ -9907,7 +10022,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9907
10022
|
imgList: newImgList
|
|
9908
10023
|
});
|
|
9909
10024
|
setVisible(false);
|
|
9910
|
-
|
|
10025
|
+
if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
|
|
10026
|
+
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);
|
|
10027
|
+
}
|
|
9911
10028
|
case 5:
|
|
9912
10029
|
case "end":
|
|
9913
10030
|
return _context2.stop();
|
|
@@ -10164,6 +10281,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
10164
10281
|
shopId: shopId,
|
|
10165
10282
|
maxLength: maxLength,
|
|
10166
10283
|
changeSku: changeSku,
|
|
10284
|
+
form: form,
|
|
10285
|
+
isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
|
|
10167
10286
|
onCancel: function onCancel() {
|
|
10168
10287
|
setVisible(false);
|
|
10169
10288
|
}
|
|
@@ -16063,6 +16182,15 @@ var getColumns$5 = function getColumns() {
|
|
|
16063
16182
|
};
|
|
16064
16183
|
};
|
|
16065
16184
|
|
|
16185
|
+
function toNum$2(value) {
|
|
16186
|
+
if (typeof value === 'string') {
|
|
16187
|
+
return value ? +value : void 0;
|
|
16188
|
+
}
|
|
16189
|
+
if (typeof value === 'number') {
|
|
16190
|
+
return value;
|
|
16191
|
+
}
|
|
16192
|
+
return void 0;
|
|
16193
|
+
}
|
|
16066
16194
|
var getColumns$6 = function getColumns(_ref) {
|
|
16067
16195
|
var _ref$text = _ref.text,
|
|
16068
16196
|
disabled = _ref.disabled,
|
|
@@ -16088,10 +16216,6 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
16088
16216
|
dataIndex: 'sysOuterId',
|
|
16089
16217
|
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16090
16218
|
width: 150
|
|
16091
|
-
}, {
|
|
16092
|
-
dataIndex: 'outerId',
|
|
16093
|
-
title: "\u5546\u5BB6\u7F16\u7801",
|
|
16094
|
-
width: 150
|
|
16095
16219
|
}, {
|
|
16096
16220
|
dataIndex: 'skuSysId',
|
|
16097
16221
|
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
@@ -16164,6 +16288,129 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
16164
16288
|
align: 'center',
|
|
16165
16289
|
ellipsis: true
|
|
16166
16290
|
});
|
|
16291
|
+
}),
|
|
16292
|
+
KM_REISSUE_GOODS: [{
|
|
16293
|
+
dataIndex: 'skuPropertiesName',
|
|
16294
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16295
|
+
width: 250
|
|
16296
|
+
}, {
|
|
16297
|
+
dataIndex: 'sysTitle',
|
|
16298
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16299
|
+
width: 150
|
|
16300
|
+
}, {
|
|
16301
|
+
dataIndex: 'shortTitle',
|
|
16302
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16303
|
+
width: 150
|
|
16304
|
+
}, {
|
|
16305
|
+
dataIndex: 'title',
|
|
16306
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16307
|
+
width: 150
|
|
16308
|
+
}, {
|
|
16309
|
+
dataIndex: 'sysOuterId',
|
|
16310
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16311
|
+
width: 150
|
|
16312
|
+
}, {
|
|
16313
|
+
dataIndex: 'itemSysId',
|
|
16314
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16315
|
+
width: 150
|
|
16316
|
+
}, {
|
|
16317
|
+
dataIndex: 'skuSysId',
|
|
16318
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16319
|
+
width: 150
|
|
16320
|
+
}, {
|
|
16321
|
+
dataIndex: 'skuId',
|
|
16322
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16323
|
+
width: 170
|
|
16324
|
+
}, {
|
|
16325
|
+
dataIndex: 'realNum',
|
|
16326
|
+
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
16327
|
+
width: 100,
|
|
16328
|
+
validator: function validator(_rule, value) {
|
|
16329
|
+
var title = '';
|
|
16330
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
16331
|
+
var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
16332
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
16333
|
+
if (res) {
|
|
16334
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
16335
|
+
}
|
|
16336
|
+
return res;
|
|
16337
|
+
})) {
|
|
16338
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
16339
|
+
}
|
|
16340
|
+
},
|
|
16341
|
+
render: function render(val, record, index) {
|
|
16342
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16343
|
+
style: {
|
|
16344
|
+
width: 70
|
|
16345
|
+
},
|
|
16346
|
+
value: val,
|
|
16347
|
+
min: 1,
|
|
16348
|
+
precision: 0,
|
|
16349
|
+
onChange: function onChange(num) {
|
|
16350
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
16351
|
+
}
|
|
16352
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16353
|
+
}
|
|
16354
|
+
}, {
|
|
16355
|
+
dataIndex: 'desiredNum',
|
|
16356
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
16357
|
+
width: 100,
|
|
16358
|
+
render: function render(val, record, index) {
|
|
16359
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16360
|
+
style: {
|
|
16361
|
+
width: 70
|
|
16362
|
+
},
|
|
16363
|
+
value: val,
|
|
16364
|
+
min: 1,
|
|
16365
|
+
precision: 0,
|
|
16366
|
+
onChange: function onChange(num) {
|
|
16367
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
16368
|
+
}
|
|
16369
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16370
|
+
}
|
|
16371
|
+
}, {
|
|
16372
|
+
dataIndex: 'price',
|
|
16373
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16374
|
+
width: 150,
|
|
16375
|
+
render: function render(val) {
|
|
16376
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16377
|
+
}
|
|
16378
|
+
}, {
|
|
16379
|
+
dataIndex: 'payment',
|
|
16380
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16381
|
+
width: 150,
|
|
16382
|
+
render: function render(val, record, index) {
|
|
16383
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16384
|
+
style: {
|
|
16385
|
+
width: 130
|
|
16386
|
+
},
|
|
16387
|
+
value: val,
|
|
16388
|
+
min: 0,
|
|
16389
|
+
precision: 2,
|
|
16390
|
+
onChange: function onChange(num) {
|
|
16391
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16392
|
+
}
|
|
16393
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16394
|
+
}
|
|
16395
|
+
}, {
|
|
16396
|
+
dataIndex: 'type',
|
|
16397
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16398
|
+
width: 150
|
|
16399
|
+
}, {
|
|
16400
|
+
dataIndex: 'sysPicPath',
|
|
16401
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16402
|
+
width: 100,
|
|
16403
|
+
render: function render(val) {
|
|
16404
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
16405
|
+
width: 60,
|
|
16406
|
+
src: val
|
|
16407
|
+
});
|
|
16408
|
+
}
|
|
16409
|
+
}].map(function (item) {
|
|
16410
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16411
|
+
align: 'center',
|
|
16412
|
+
ellipsis: true
|
|
16413
|
+
});
|
|
16167
16414
|
})
|
|
16168
16415
|
};
|
|
16169
16416
|
};
|
|
@@ -16477,7 +16724,7 @@ var isErpType = {
|
|
|
16477
16724
|
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
16478
16725
|
},
|
|
16479
16726
|
isKm: function isKm(type) {
|
|
16480
|
-
return ['KM_GOODS'].includes(type);
|
|
16727
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
16481
16728
|
}
|
|
16482
16729
|
};
|
|
16483
16730
|
var processGoods = function processGoods(_ref) {
|
|
@@ -16628,10 +16875,20 @@ var processJstGoods = function processJstGoods(_ref5) {
|
|
|
16628
16875
|
});
|
|
16629
16876
|
};
|
|
16630
16877
|
var processKmGoods = function processKmGoods(_ref6) {
|
|
16631
|
-
var list = _ref6.list
|
|
16878
|
+
var list = _ref6.list,
|
|
16879
|
+
type = _ref6.type;
|
|
16880
|
+
var initParamsMap = {
|
|
16881
|
+
KM_GOODS: {
|
|
16882
|
+
num: 1
|
|
16883
|
+
},
|
|
16884
|
+
KM_REISSUE_GOODS: {
|
|
16885
|
+
realNum: 1,
|
|
16886
|
+
desiredNum: 1
|
|
16887
|
+
}
|
|
16888
|
+
};
|
|
16632
16889
|
return list.map(function (item) {
|
|
16633
16890
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16634
|
-
|
|
16891
|
+
skuPropertiesName: item.specName,
|
|
16635
16892
|
sysTitle: item.goodName,
|
|
16636
16893
|
title: null,
|
|
16637
16894
|
shortTitle: item.goodShortName,
|
|
@@ -16645,9 +16902,8 @@ var processKmGoods = function processKmGoods(_ref6) {
|
|
|
16645
16902
|
type: null,
|
|
16646
16903
|
uuid: uuid(),
|
|
16647
16904
|
canDelete: true,
|
|
16648
|
-
canEdit: true
|
|
16649
|
-
|
|
16650
|
-
});
|
|
16905
|
+
canEdit: true
|
|
16906
|
+
}, initParamsMap[type] || {});
|
|
16651
16907
|
});
|
|
16652
16908
|
};
|
|
16653
16909
|
var processDefaultGoods = function processDefaultGoods(_ref7) {
|
|
@@ -16694,6 +16950,7 @@ var GoodsModalMap = {
|
|
|
16694
16950
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
16695
16951
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
16696
16952
|
KM_GOODS: KmGoodsModal,
|
|
16953
|
+
KM_REISSUE_GOODS: KmGoodsModal,
|
|
16697
16954
|
OTHER_GOODS: GoodsModal$2
|
|
16698
16955
|
};
|
|
16699
16956
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -16756,7 +17013,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
16756
17013
|
};
|
|
16757
17014
|
var getButtonText = function getButtonText() {
|
|
16758
17015
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
16759
|
-
if (['KM_GOODS'].includes(type)) {
|
|
17016
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
16760
17017
|
return '选择快麦ERP商品';
|
|
16761
17018
|
}
|
|
16762
17019
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
@@ -16903,6 +17160,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16903
17160
|
case 'GY_REISSUE_GOODS':
|
|
16904
17161
|
case 'GY_RETURN_GOODS':
|
|
16905
17162
|
case 'KM_GOODS':
|
|
17163
|
+
case 'KM_REISSUE_GOODS':
|
|
16906
17164
|
{
|
|
16907
17165
|
columns = getColumnsMap$1({
|
|
16908
17166
|
text: text,
|
|
@@ -19242,7 +19500,9 @@ var typeMap$2 = {
|
|
|
19242
19500
|
orderTypeKey: 'orderType',
|
|
19243
19501
|
oIdKey: 'oId',
|
|
19244
19502
|
outerOiIdKey: '',
|
|
19245
|
-
goodDetailsKey: 'items'
|
|
19503
|
+
goodDetailsKey: 'items',
|
|
19504
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19505
|
+
uniqueKey: 'uuid'
|
|
19246
19506
|
},
|
|
19247
19507
|
JST_RETURN_GOODS: {
|
|
19248
19508
|
compType: '退货',
|
|
@@ -19258,6 +19518,8 @@ var typeMap$2 = {
|
|
|
19258
19518
|
oIdKey: 'oId',
|
|
19259
19519
|
outerOiIdKey: '',
|
|
19260
19520
|
goodDetailsKey: 'items',
|
|
19521
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19522
|
+
uniqueKey: 'uuid',
|
|
19261
19523
|
eventNameMap: {
|
|
19262
19524
|
// pubsub 事件
|
|
19263
19525
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -19265,10 +19527,25 @@ var typeMap$2 = {
|
|
|
19265
19527
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
19266
19528
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
19267
19529
|
}
|
|
19530
|
+
},
|
|
19531
|
+
KM_REISSUE_GOODS: {
|
|
19532
|
+
compType: '补发',
|
|
19533
|
+
key: 'kmReissueGoods',
|
|
19534
|
+
typeName: 'kmReissueType',
|
|
19535
|
+
systemOrder: 'kmSystemOrder',
|
|
19536
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
19537
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
19538
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
19539
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
19540
|
+
orderTypeKey: 'orderType',
|
|
19541
|
+
oIdKey: 'billNo',
|
|
19542
|
+
outerOiIdKey: '',
|
|
19543
|
+
goodDetailsKey: 'subOrders',
|
|
19544
|
+
uniqueKey: 'id'
|
|
19268
19545
|
}
|
|
19269
19546
|
};
|
|
19270
19547
|
var PublicReissue = function PublicReissue(props) {
|
|
19271
|
-
var _typeMap$
|
|
19548
|
+
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;
|
|
19272
19549
|
var value = props.value,
|
|
19273
19550
|
onChange = props.onChange,
|
|
19274
19551
|
_props$reasonList = props.reasonList,
|
|
@@ -19382,7 +19659,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
19382
19659
|
}))));
|
|
19383
19660
|
};
|
|
19384
19661
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
19385
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
19662
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
|
|
19386
19663
|
var mode = _ref4.mode,
|
|
19387
19664
|
sysOrderNo = _ref4.sysOrderNo;
|
|
19388
19665
|
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];
|
|
@@ -19390,37 +19667,47 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
19390
19667
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19391
19668
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
19392
19669
|
});
|
|
19393
|
-
var
|
|
19670
|
+
var orderRest = undefined;
|
|
19671
|
+
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
19672
|
+
orderRest = true;
|
|
19673
|
+
} else if (type === 'KM_REISSUE_GOODS') {
|
|
19674
|
+
orderRest = {
|
|
19675
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
19676
|
+
canEdit: true
|
|
19677
|
+
};
|
|
19678
|
+
}
|
|
19679
|
+
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) : [];
|
|
19394
19680
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
19395
|
-
|
|
19681
|
+
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
19396
19682
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
19397
19683
|
}) : goodDetails;
|
|
19684
|
+
return list;
|
|
19398
19685
|
};
|
|
19399
19686
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19400
|
-
var _typeMap$
|
|
19687
|
+
var _typeMap$type21;
|
|
19401
19688
|
var newValue = _objectSpread2({}, value);
|
|
19402
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19689
|
+
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 || [];
|
|
19403
19690
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19404
19691
|
};
|
|
19405
19692
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
19406
|
-
var _typeMap$
|
|
19693
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
|
|
19407
19694
|
var newValue = _objectSpread2({}, value);
|
|
19408
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19409
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19410
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
19411
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19695
|
+
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;
|
|
19696
|
+
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) {
|
|
19697
|
+
var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
|
|
19698
|
+
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) || [];
|
|
19412
19699
|
var targetOrder = val && orders.find(function (oItem) {
|
|
19413
|
-
var _typeMap$
|
|
19414
|
-
return oItem[(_typeMap$
|
|
19700
|
+
var _typeMap$type25;
|
|
19701
|
+
return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
|
|
19415
19702
|
});
|
|
19416
|
-
newValue[(_typeMap$
|
|
19417
|
-
}
|
|
19418
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
19419
|
-
var _typeMap$
|
|
19420
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19421
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
19422
|
-
var _typeMap$
|
|
19423
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19703
|
+
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];
|
|
19704
|
+
}
|
|
19705
|
+
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])) {
|
|
19706
|
+
var _typeMap$type29;
|
|
19707
|
+
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)] = [];
|
|
19708
|
+
} 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])) {
|
|
19709
|
+
var _typeMap$type31;
|
|
19710
|
+
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({
|
|
19424
19711
|
mode: isStrict,
|
|
19425
19712
|
sysOrderNo: val
|
|
19426
19713
|
});
|
|
@@ -19428,25 +19715,26 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
19428
19715
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19429
19716
|
};
|
|
19430
19717
|
//显示选择商品按钮
|
|
19431
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19718
|
+
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]);
|
|
19432
19719
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
19433
|
-
var _typeMap$
|
|
19720
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
|
|
19434
19721
|
var newValue = _objectSpread2({}, value);
|
|
19435
19722
|
// 原订单商品
|
|
19436
19723
|
var originTradeGoodList = getGoodDetails({
|
|
19437
19724
|
mode: isStrict
|
|
19438
19725
|
}) || [];
|
|
19439
19726
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
19440
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19441
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19442
|
-
|
|
19727
|
+
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)]) || [];
|
|
19728
|
+
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 = 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) {
|
|
19729
|
+
var _typeMap$type36;
|
|
19730
|
+
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]);
|
|
19443
19731
|
});
|
|
19444
19732
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19445
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19733
|
+
}, [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]);
|
|
19446
19734
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
19447
19735
|
gutter: 8,
|
|
19448
19736
|
wrap: true,
|
|
19449
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19737
|
+
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())
|
|
19450
19738
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
19451
19739
|
className: "gutter-row",
|
|
19452
19740
|
xs: {
|
|
@@ -19462,12 +19750,12 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
19462
19750
|
},
|
|
19463
19751
|
disabled: disabled,
|
|
19464
19752
|
allowClear: false,
|
|
19465
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19753
|
+
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)],
|
|
19466
19754
|
onChange: function onChange(val) {
|
|
19467
19755
|
return changeSystemOrderHandle(val);
|
|
19468
19756
|
},
|
|
19469
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19470
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
19757
|
+
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")
|
|
19758
|
+
}, ((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) {
|
|
19471
19759
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
19472
19760
|
key: item[typeMap$2[type].oIdKey],
|
|
19473
19761
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -19489,11 +19777,11 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
19489
19777
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19490
19778
|
allowClear: false,
|
|
19491
19779
|
options: reasonList,
|
|
19492
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19780
|
+
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)],
|
|
19493
19781
|
onChange: function onChange(val) {
|
|
19494
19782
|
return changeTypeHandle(val);
|
|
19495
19783
|
}
|
|
19496
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19784
|
+
})), (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.createElement(Col, {
|
|
19497
19785
|
className: "gutter-row",
|
|
19498
19786
|
xs: {
|
|
19499
19787
|
span: 11
|
|
@@ -19502,7 +19790,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
19502
19790
|
span: 6
|
|
19503
19791
|
}
|
|
19504
19792
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
19505
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19793
|
+
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)],
|
|
19506
19794
|
disabled: disabled,
|
|
19507
19795
|
readOnly: true
|
|
19508
19796
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -19512,10 +19800,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
19512
19800
|
disabled: disabled,
|
|
19513
19801
|
canUpdateNumber: showChangeBtn,
|
|
19514
19802
|
showChangeBtn: showChangeBtn,
|
|
19515
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19516
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19803
|
+
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,
|
|
19804
|
+
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,
|
|
19517
19805
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
19518
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19806
|
+
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)],
|
|
19519
19807
|
onChange: function onChange(val) {
|
|
19520
19808
|
return changeGoodHandle(val);
|
|
19521
19809
|
},
|
|
@@ -19526,6 +19814,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
19526
19814
|
originDataSource: getGoodDetails({
|
|
19527
19815
|
mode: isStrict
|
|
19528
19816
|
}),
|
|
19817
|
+
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',
|
|
19529
19818
|
selectedGoodsChange: selectedGoodsChange
|
|
19530
19819
|
}
|
|
19531
19820
|
})));
|
|
@@ -20598,7 +20887,7 @@ var typeMap$4 = {
|
|
|
20598
20887
|
}
|
|
20599
20888
|
};
|
|
20600
20889
|
var GyReissue = function GyReissue(props) {
|
|
20601
|
-
var _typeMap$
|
|
20890
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
20602
20891
|
var value = props.value,
|
|
20603
20892
|
onChange = props.onChange,
|
|
20604
20893
|
_props$reasonList = props.reasonList,
|
|
@@ -20610,6 +20899,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20610
20899
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
20611
20900
|
// order?.platformCode?.includes(';'),
|
|
20612
20901
|
// );
|
|
20902
|
+
var getVipCodeFlag = useRef(false);
|
|
20613
20903
|
var getOrderFlag = useRef(false);
|
|
20614
20904
|
var valueRef = useRef(null);
|
|
20615
20905
|
var _useState = useState(false),
|
|
@@ -20617,23 +20907,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
20617
20907
|
isStrict = _useState2[0],
|
|
20618
20908
|
setIsStrict = _useState2[1];
|
|
20619
20909
|
useEffect(function () {
|
|
20620
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
20910
|
+
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;
|
|
20621
20911
|
valueRef.current = value;
|
|
20622
20912
|
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)) {
|
|
20623
20913
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
20624
20914
|
getOrderFlag.current = true;
|
|
20625
20915
|
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);
|
|
20916
|
+
} 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)) {
|
|
20917
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
20918
|
+
getVipCodeFlag.current = true;
|
|
20919
|
+
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);
|
|
20626
20920
|
}
|
|
20627
20921
|
return;
|
|
20628
20922
|
}, [value]);
|
|
20629
20923
|
var getOrderList = /*#__PURE__*/function () {
|
|
20630
20924
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
20631
|
-
var _typeMap$
|
|
20925
|
+
var _typeMap$type7;
|
|
20632
20926
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20633
20927
|
while (1) switch (_context.prev = _context.next) {
|
|
20634
20928
|
case 0:
|
|
20635
|
-
(_typeMap$
|
|
20636
|
-
var _typeMap$
|
|
20929
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
20930
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
20637
20931
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20638
20932
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20639
20933
|
var billNo = _ref2.billNo,
|
|
@@ -20655,17 +20949,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
20655
20949
|
shopCode: shopCode
|
|
20656
20950
|
});
|
|
20657
20951
|
});
|
|
20952
|
+
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]) || {}), {}, {
|
|
20953
|
+
showOrderInfo: showOrderInfo,
|
|
20954
|
+
orders: orders
|
|
20955
|
+
})), _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));
|
|
20658
20956
|
pushGyLog('getOrderList', {
|
|
20659
20957
|
before: valueRef.current,
|
|
20660
|
-
after:
|
|
20661
|
-
showOrderInfo: showOrderInfo,
|
|
20662
|
-
orders: orders
|
|
20663
|
-
})))
|
|
20958
|
+
after: newValue
|
|
20664
20959
|
});
|
|
20665
|
-
onChange(
|
|
20666
|
-
showOrderInfo: showOrderInfo,
|
|
20667
|
-
orders: orders
|
|
20668
|
-
}))));
|
|
20960
|
+
onChange(newValue);
|
|
20669
20961
|
});
|
|
20670
20962
|
case 1:
|
|
20671
20963
|
case "end":
|
|
@@ -20677,42 +20969,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
20677
20969
|
return _ref.apply(this, arguments);
|
|
20678
20970
|
};
|
|
20679
20971
|
}();
|
|
20972
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
20973
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
20974
|
+
var _typeMap$type10;
|
|
20975
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20976
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
20977
|
+
case 0:
|
|
20978
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
20979
|
+
var _orders$3, _orders$4;
|
|
20980
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20981
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
20982
|
+
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),
|
|
20983
|
+
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)
|
|
20984
|
+
});
|
|
20985
|
+
pushGyLog('getVipCode', {
|
|
20986
|
+
before: valueRef.current,
|
|
20987
|
+
after: newValue
|
|
20988
|
+
});
|
|
20989
|
+
onChange(newValue);
|
|
20990
|
+
}));
|
|
20991
|
+
case 1:
|
|
20992
|
+
case "end":
|
|
20993
|
+
return _context2.stop();
|
|
20994
|
+
}
|
|
20995
|
+
}, _callee2);
|
|
20996
|
+
}));
|
|
20997
|
+
return function getVipCode(_x2) {
|
|
20998
|
+
return _ref4.apply(this, arguments);
|
|
20999
|
+
};
|
|
21000
|
+
}();
|
|
20680
21001
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20681
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
21002
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
20682
21003
|
pushGyLog('beforeChangeType', valueRef.current || {});
|
|
20683
21004
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20684
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
21005
|
+
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;
|
|
20685
21006
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20686
21007
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20687
|
-
newValue[(_typeMap$
|
|
21008
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
20688
21009
|
if (typeName === '1') {
|
|
20689
|
-
var _typeMap$
|
|
20690
|
-
newValue[(_typeMap$
|
|
21010
|
+
var _typeMap$type13;
|
|
21011
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
20691
21012
|
mode: isStrict
|
|
20692
21013
|
});
|
|
20693
21014
|
} else if (typeName === '2') {
|
|
20694
|
-
var _typeMap$
|
|
21015
|
+
var _typeMap$type14;
|
|
20695
21016
|
// 切换到非原单,清空列表
|
|
20696
|
-
newValue[(_typeMap$
|
|
21017
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
20697
21018
|
}
|
|
20698
21019
|
pushGyLog('afterChangeType', newValue);
|
|
20699
21020
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20700
21021
|
};
|
|
20701
21022
|
var handleModeChange = function handleModeChange(mode) {
|
|
20702
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
20703
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
21023
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
21024
|
+
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';
|
|
20704
21025
|
setIsStrict(mode);
|
|
20705
21026
|
if (!isOriginalOrder) return;
|
|
20706
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
21027
|
+
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({
|
|
20707
21028
|
mode: mode
|
|
20708
21029
|
}))));
|
|
20709
21030
|
};
|
|
20710
21031
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
20711
|
-
var _ref8, _typeMap$
|
|
21032
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
20712
21033
|
var mode = _ref7.mode,
|
|
20713
21034
|
sysOrderNo = _ref7.sysOrderNo;
|
|
20714
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
20715
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
21035
|
+
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];
|
|
21036
|
+
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];
|
|
20716
21037
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20717
21038
|
return order.code === systemOrderNo;
|
|
20718
21039
|
});
|
|
@@ -20723,29 +21044,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
20723
21044
|
}) : goodDetails;
|
|
20724
21045
|
};
|
|
20725
21046
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20726
|
-
var _typeMap$
|
|
21047
|
+
var _typeMap$type19;
|
|
20727
21048
|
pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20728
21049
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20729
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20730
|
-
var _typeMap$
|
|
20731
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20732
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21050
|
+
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) {
|
|
21051
|
+
var _typeMap$type20, _typeMap$type21;
|
|
21052
|
+
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;
|
|
21053
|
+
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;
|
|
20733
21054
|
return item;
|
|
20734
21055
|
});
|
|
20735
21056
|
pushGyLog('afterChangeGood', newValue);
|
|
20736
21057
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20737
21058
|
};
|
|
20738
21059
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20739
|
-
var _typeMap$
|
|
21060
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20740
21061
|
pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20741
21062
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20742
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20743
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
20744
|
-
var _typeMap$type22;
|
|
20745
|
-
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)] = [];
|
|
20746
|
-
} 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])) {
|
|
21063
|
+
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;
|
|
21064
|
+
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])) {
|
|
20747
21065
|
var _typeMap$type24;
|
|
20748
|
-
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)] =
|
|
21066
|
+
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)] = [];
|
|
21067
|
+
} 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])) {
|
|
21068
|
+
var _typeMap$type26;
|
|
21069
|
+
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({
|
|
20749
21070
|
mode: isStrict,
|
|
20750
21071
|
sysOrderNo: val
|
|
20751
21072
|
});
|
|
@@ -20754,7 +21075,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20754
21075
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20755
21076
|
};
|
|
20756
21077
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20757
|
-
var _ref12, _typeMap$
|
|
21078
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20758
21079
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20759
21080
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20760
21081
|
// 原订单商品
|
|
@@ -20762,17 +21083,17 @@ var GyReissue = function GyReissue(props) {
|
|
|
20762
21083
|
mode: isStrict
|
|
20763
21084
|
}) || [];
|
|
20764
21085
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20765
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20766
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21086
|
+
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)]) || [];
|
|
21087
|
+
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 = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20767
21088
|
return skuList.includes(item.uuid);
|
|
20768
21089
|
});
|
|
20769
21090
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20770
21091
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20771
21092
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20772
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21093
|
+
}, [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]);
|
|
20773
21094
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20774
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20775
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21095
|
+
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];
|
|
21096
|
+
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]);
|
|
20776
21097
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20777
21098
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
20778
21099
|
gutter: 8,
|
|
@@ -20792,12 +21113,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
20792
21113
|
},
|
|
20793
21114
|
disabled: disabled,
|
|
20794
21115
|
allowClear: false,
|
|
20795
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21116
|
+
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)],
|
|
20796
21117
|
onChange: function onChange(val) {
|
|
20797
21118
|
return changeSystemOrderHandle(val);
|
|
20798
21119
|
},
|
|
20799
21120
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20800
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
21121
|
+
}, ((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) {
|
|
20801
21122
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
20802
21123
|
key: item.billNo,
|
|
20803
21124
|
value: item.billNo,
|
|
@@ -20819,7 +21140,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20819
21140
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20820
21141
|
allowClear: false,
|
|
20821
21142
|
options: reasonList,
|
|
20822
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21143
|
+
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)],
|
|
20823
21144
|
onChange: function onChange(val) {
|
|
20824
21145
|
return changeTypeHandle(val);
|
|
20825
21146
|
}
|
|
@@ -20833,7 +21154,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20833
21154
|
showErpGoodsBtn: showErpGoodsBtn,
|
|
20834
21155
|
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20835
21156
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20836
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21157
|
+
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)],
|
|
20837
21158
|
onChange: function onChange(val) {
|
|
20838
21159
|
return changeGoodHandle(val);
|
|
20839
21160
|
},
|
|
@@ -20941,7 +21262,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20941
21262
|
while (1) switch (_context.prev = _context.next) {
|
|
20942
21263
|
case 0:
|
|
20943
21264
|
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
20944
|
-
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
|
|
21265
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20945
21266
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20946
21267
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20947
21268
|
var billNo = _ref2.billNo,
|
|
@@ -20963,10 +21284,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20963
21284
|
shopCode: shopCode
|
|
20964
21285
|
});
|
|
20965
21286
|
});
|
|
20966
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21287
|
+
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 : {}), {}, {
|
|
20967
21288
|
showOrderInfo: showOrderInfo,
|
|
20968
21289
|
orders: orders
|
|
20969
|
-
}))));
|
|
21290
|
+
})), _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)));
|
|
20970
21291
|
});
|
|
20971
21292
|
case 1:
|
|
20972
21293
|
case "end":
|