@kmkf-fe-packages/basic-components 2.0.68 → 2.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +512 -361
- package/dist/index.js +510 -359
- package/dist/src/common/Goods/RichItem.d.ts +3 -0
- package/dist/src/common/Goods/goodModel.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.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
|
}
|
|
@@ -20598,7 +20717,7 @@ var typeMap$4 = {
|
|
|
20598
20717
|
}
|
|
20599
20718
|
};
|
|
20600
20719
|
var GyReissue = function GyReissue(props) {
|
|
20601
|
-
var _typeMap$
|
|
20720
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
20602
20721
|
var value = props.value,
|
|
20603
20722
|
onChange = props.onChange,
|
|
20604
20723
|
_props$reasonList = props.reasonList,
|
|
@@ -20610,6 +20729,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20610
20729
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
20611
20730
|
// order?.platformCode?.includes(';'),
|
|
20612
20731
|
// );
|
|
20732
|
+
var getVipCodeFlag = useRef(false);
|
|
20613
20733
|
var getOrderFlag = useRef(false);
|
|
20614
20734
|
var valueRef = useRef(null);
|
|
20615
20735
|
var _useState = useState(false),
|
|
@@ -20617,23 +20737,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
20617
20737
|
isStrict = _useState2[0],
|
|
20618
20738
|
setIsStrict = _useState2[1];
|
|
20619
20739
|
useEffect(function () {
|
|
20620
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
20740
|
+
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
20741
|
valueRef.current = value;
|
|
20622
20742
|
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
20743
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
20624
20744
|
getOrderFlag.current = true;
|
|
20625
20745
|
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);
|
|
20746
|
+
} 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)) {
|
|
20747
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
20748
|
+
getVipCodeFlag.current = true;
|
|
20749
|
+
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
20750
|
}
|
|
20627
20751
|
return;
|
|
20628
20752
|
}, [value]);
|
|
20629
20753
|
var getOrderList = /*#__PURE__*/function () {
|
|
20630
20754
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
20631
|
-
var _typeMap$
|
|
20755
|
+
var _typeMap$type7;
|
|
20632
20756
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20633
20757
|
while (1) switch (_context.prev = _context.next) {
|
|
20634
20758
|
case 0:
|
|
20635
|
-
(_typeMap$
|
|
20636
|
-
var _typeMap$
|
|
20759
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
20760
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
20637
20761
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20638
20762
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20639
20763
|
var billNo = _ref2.billNo,
|
|
@@ -20655,17 +20779,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
20655
20779
|
shopCode: shopCode
|
|
20656
20780
|
});
|
|
20657
20781
|
});
|
|
20782
|
+
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]) || {}), {}, {
|
|
20783
|
+
showOrderInfo: showOrderInfo,
|
|
20784
|
+
orders: orders
|
|
20785
|
+
})), _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
20786
|
pushGyLog('getOrderList', {
|
|
20659
20787
|
before: valueRef.current,
|
|
20660
|
-
after:
|
|
20661
|
-
showOrderInfo: showOrderInfo,
|
|
20662
|
-
orders: orders
|
|
20663
|
-
})))
|
|
20788
|
+
after: newValue
|
|
20664
20789
|
});
|
|
20665
|
-
onChange(
|
|
20666
|
-
showOrderInfo: showOrderInfo,
|
|
20667
|
-
orders: orders
|
|
20668
|
-
}))));
|
|
20790
|
+
onChange(newValue);
|
|
20669
20791
|
});
|
|
20670
20792
|
case 1:
|
|
20671
20793
|
case "end":
|
|
@@ -20677,42 +20799,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
20677
20799
|
return _ref.apply(this, arguments);
|
|
20678
20800
|
};
|
|
20679
20801
|
}();
|
|
20802
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
20803
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
20804
|
+
var _typeMap$type10;
|
|
20805
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20806
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
20807
|
+
case 0:
|
|
20808
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
20809
|
+
var _orders$3, _orders$4;
|
|
20810
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20811
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
20812
|
+
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),
|
|
20813
|
+
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)
|
|
20814
|
+
});
|
|
20815
|
+
pushGyLog('getVipCode', {
|
|
20816
|
+
before: valueRef.current,
|
|
20817
|
+
after: newValue
|
|
20818
|
+
});
|
|
20819
|
+
onChange(newValue);
|
|
20820
|
+
}));
|
|
20821
|
+
case 1:
|
|
20822
|
+
case "end":
|
|
20823
|
+
return _context2.stop();
|
|
20824
|
+
}
|
|
20825
|
+
}, _callee2);
|
|
20826
|
+
}));
|
|
20827
|
+
return function getVipCode(_x2) {
|
|
20828
|
+
return _ref4.apply(this, arguments);
|
|
20829
|
+
};
|
|
20830
|
+
}();
|
|
20680
20831
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20681
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
20832
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
20682
20833
|
pushGyLog('beforeChangeType', valueRef.current || {});
|
|
20683
20834
|
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$
|
|
20835
|
+
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
20836
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20686
20837
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20687
|
-
newValue[(_typeMap$
|
|
20838
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
20688
20839
|
if (typeName === '1') {
|
|
20689
|
-
var _typeMap$
|
|
20690
|
-
newValue[(_typeMap$
|
|
20840
|
+
var _typeMap$type13;
|
|
20841
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
20691
20842
|
mode: isStrict
|
|
20692
20843
|
});
|
|
20693
20844
|
} else if (typeName === '2') {
|
|
20694
|
-
var _typeMap$
|
|
20845
|
+
var _typeMap$type14;
|
|
20695
20846
|
// 切换到非原单,清空列表
|
|
20696
|
-
newValue[(_typeMap$
|
|
20847
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
20697
20848
|
}
|
|
20698
20849
|
pushGyLog('afterChangeType', newValue);
|
|
20699
20850
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20700
20851
|
};
|
|
20701
20852
|
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$
|
|
20853
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
20854
|
+
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
20855
|
setIsStrict(mode);
|
|
20705
20856
|
if (!isOriginalOrder) return;
|
|
20706
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
20857
|
+
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
20858
|
mode: mode
|
|
20708
20859
|
}))));
|
|
20709
20860
|
};
|
|
20710
20861
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
20711
|
-
var _ref8, _typeMap$
|
|
20862
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
20712
20863
|
var mode = _ref7.mode,
|
|
20713
20864
|
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$
|
|
20865
|
+
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];
|
|
20866
|
+
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
20867
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20717
20868
|
return order.code === systemOrderNo;
|
|
20718
20869
|
});
|
|
@@ -20723,29 +20874,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
20723
20874
|
}) : goodDetails;
|
|
20724
20875
|
};
|
|
20725
20876
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20726
|
-
var _typeMap$
|
|
20877
|
+
var _typeMap$type19;
|
|
20727
20878
|
pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20728
20879
|
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$
|
|
20880
|
+
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) {
|
|
20881
|
+
var _typeMap$type20, _typeMap$type21;
|
|
20882
|
+
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;
|
|
20883
|
+
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
20884
|
return item;
|
|
20734
20885
|
});
|
|
20735
20886
|
pushGyLog('afterChangeGood', newValue);
|
|
20736
20887
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20737
20888
|
};
|
|
20738
20889
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20739
|
-
var _typeMap$
|
|
20890
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20740
20891
|
pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20741
20892
|
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])) {
|
|
20893
|
+
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;
|
|
20894
|
+
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
20895
|
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)] =
|
|
20896
|
+
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)] = [];
|
|
20897
|
+
} 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])) {
|
|
20898
|
+
var _typeMap$type26;
|
|
20899
|
+
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
20900
|
mode: isStrict,
|
|
20750
20901
|
sysOrderNo: val
|
|
20751
20902
|
});
|
|
@@ -20754,7 +20905,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20754
20905
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20755
20906
|
};
|
|
20756
20907
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20757
|
-
var _ref12, _typeMap$
|
|
20908
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20758
20909
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20759
20910
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20760
20911
|
// 原订单商品
|
|
@@ -20762,17 +20913,17 @@ var GyReissue = function GyReissue(props) {
|
|
|
20762
20913
|
mode: isStrict
|
|
20763
20914
|
}) || [];
|
|
20764
20915
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
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$
|
|
20916
|
+
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)]) || [];
|
|
20917
|
+
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
20918
|
return skuList.includes(item.uuid);
|
|
20768
20919
|
});
|
|
20769
20920
|
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20770
20921
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20771
20922
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20772
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20923
|
+
}, [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
20924
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20774
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20775
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20925
|
+
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];
|
|
20926
|
+
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
20927
|
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
20928
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
20778
20929
|
gutter: 8,
|
|
@@ -20792,12 +20943,12 @@ var GyReissue = function GyReissue(props) {
|
|
|
20792
20943
|
},
|
|
20793
20944
|
disabled: disabled,
|
|
20794
20945
|
allowClear: false,
|
|
20795
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20946
|
+
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
20947
|
onChange: function onChange(val) {
|
|
20797
20948
|
return changeSystemOrderHandle(val);
|
|
20798
20949
|
},
|
|
20799
20950
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20800
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
20951
|
+
}, ((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
20952
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
20802
20953
|
key: item.billNo,
|
|
20803
20954
|
value: item.billNo,
|
|
@@ -20819,7 +20970,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20819
20970
|
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20820
20971
|
allowClear: false,
|
|
20821
20972
|
options: reasonList,
|
|
20822
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20973
|
+
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
20974
|
onChange: function onChange(val) {
|
|
20824
20975
|
return changeTypeHandle(val);
|
|
20825
20976
|
}
|
|
@@ -20833,7 +20984,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20833
20984
|
showErpGoodsBtn: showErpGoodsBtn,
|
|
20834
20985
|
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20835
20986
|
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$
|
|
20987
|
+
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
20988
|
onChange: function onChange(val) {
|
|
20838
20989
|
return changeGoodHandle(val);
|
|
20839
20990
|
},
|
|
@@ -20941,7 +21092,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20941
21092
|
while (1) switch (_context.prev = _context.next) {
|
|
20942
21093
|
case 0:
|
|
20943
21094
|
(_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;
|
|
21095
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20945
21096
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20946
21097
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20947
21098
|
var billNo = _ref2.billNo,
|
|
@@ -20963,10 +21114,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20963
21114
|
shopCode: shopCode
|
|
20964
21115
|
});
|
|
20965
21116
|
});
|
|
20966
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21117
|
+
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
21118
|
showOrderInfo: showOrderInfo,
|
|
20968
21119
|
orders: orders
|
|
20969
|
-
}))));
|
|
21120
|
+
})), _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
21121
|
});
|
|
20971
21122
|
case 1:
|
|
20972
21123
|
case "end":
|