@kmkf-fe-packages/basic-components 2.0.54-beta.10 → 2.0.54-beta.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +2164 -729
- package/dist/index.js +2163 -725
- package/dist/src/apaas/ApaasAddress/index.d.ts +1 -1
- package/dist/src/bs/common/index.d.ts +3 -0
- package/dist/src/bs/component/GoodItem/constants/bsE3ReissueGoodsColumns.d.ts +1 -1
- package/dist/src/bs/component/GoodItem/constants/index.d.ts +5 -0
- package/dist/src/bs/component/GoodItem/constants/wdtReissueGoodsColumns.d.ts +2 -2
- package/dist/src/bs/component/model/Columns/Erp/km.d.ts +27 -0
- package/dist/src/bs/component/model/JstGoodsModal/index.d.ts +2 -10
- package/dist/src/bs/component/model/KmGoodsModal/GoodsList.d.ts +25 -0
- package/dist/src/bs/component/model/KmGoodsModal/index.d.ts +5 -0
- package/dist/src/bs/component/model/type.d.ts +9 -0
- package/dist/src/common/AsyncSelect/index.d.ts +9 -0
- package/dist/src/common/CommonSystemOrder/index.d.ts +2 -1
- package/dist/src/common/Goods/RichItem.d.ts +3 -0
- package/dist/src/common/Goods/goodModel.d.ts +3 -0
- package/dist/src/common/IdentifyAddress/index.d.ts +1 -1
- package/dist/src/constants/columnsBaseInfoMap.d.ts +1 -1
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/km.d.ts +3 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/km/KmVideo/index.d.ts +20 -0
- package/dist/src/wln/common/index.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,386 +1,372 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo, useCallback } from 'react';
|
|
2
2
|
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton } from 'antd';
|
|
3
|
-
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled } from '@ant-design/icons';
|
|
3
|
+
import { EyeOutlined, DeleteOutlined, CloseOutlined, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, MinusCircleFilled, VideoCameraTwoTone } 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, filterBsE3Orders, filterGyOrders, GY_DELIVERY_STATE_MAPPING,
|
|
7
|
-
import { debounce, isNaN as isNaN$1, isNumber as isNumber$1, cloneDeep, difference, differenceWith, 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({
|
|
@@ -7722,7 +7722,8 @@ var Province = function Province(props) {
|
|
|
7722
7722
|
workOrder: AddressData.getInstance(),
|
|
7723
7723
|
bs: BsAddressData.getInstance(),
|
|
7724
7724
|
wdt: WdtAddressData.getInstance(),
|
|
7725
|
-
gy: GyAddressData.getInstance()
|
|
7725
|
+
gy: GyAddressData.getInstance(),
|
|
7726
|
+
km: AddressData.getInstance()
|
|
7726
7727
|
};
|
|
7727
7728
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Cascader, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
7728
7729
|
options: ((_mapping$type = mapping[type]) === null || _mapping$type === void 0 ? void 0 : _mapping$type.addressOptions) || [],
|
|
@@ -7736,8 +7737,7 @@ var Province = function Province(props) {
|
|
|
7736
7737
|
var TextArea$1 = Input.TextArea;
|
|
7737
7738
|
var ParseLogistics = function ParseLogistics(props) {
|
|
7738
7739
|
var onChange = props.onChange,
|
|
7739
|
-
_props$selfCalibratio = props.selfCalibration
|
|
7740
|
-
selfCalibration = _props$selfCalibratio === void 0 ? false : _props$selfCalibratio;
|
|
7740
|
+
_props$selfCalibratio = props.selfCalibration;
|
|
7741
7741
|
var _useState = useState(''),
|
|
7742
7742
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7743
7743
|
value = _useState2[0],
|
|
@@ -7746,29 +7746,70 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7746
7746
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
7747
7747
|
isCopy = _useState4[0],
|
|
7748
7748
|
setIsCopy = _useState4[1];
|
|
7749
|
-
var
|
|
7749
|
+
var _useState5 = useState(false),
|
|
7750
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7751
|
+
loading = _useState6[0],
|
|
7752
|
+
setLoading = _useState6[1];
|
|
7753
|
+
var _useState7 = useState(false),
|
|
7754
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7755
|
+
aiLoading = _useState8[0],
|
|
7756
|
+
setAiLoading = _useState8[1];
|
|
7757
|
+
var handleIdentify = function handleIdentify() {
|
|
7758
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7750
7759
|
if (!value && !val) {
|
|
7751
7760
|
return;
|
|
7752
7761
|
}
|
|
7762
|
+
setLoading(true);
|
|
7753
7763
|
var fullAddress = value || val;
|
|
7754
|
-
|
|
7764
|
+
// const needCalibration = selfCalibration && !/1\d{10}/.test(fullAddress);
|
|
7755
7765
|
setIsCopy(false);
|
|
7756
7766
|
request$1({
|
|
7757
7767
|
url: '/qy/logistics/addressAnalysis',
|
|
7758
7768
|
method: 'post',
|
|
7759
7769
|
data: {
|
|
7760
|
-
fullAddress:
|
|
7770
|
+
fullAddress: fullAddress
|
|
7771
|
+
// fullAddress: needCalibration
|
|
7772
|
+
// ? `${fullAddress} 张三 18888888888`
|
|
7773
|
+
// : fullAddress,
|
|
7761
7774
|
}
|
|
7762
7775
|
}).then(function (res) {
|
|
7763
7776
|
var data = res.data;
|
|
7764
7777
|
// 如果是通过内部校准添加的姓名和手机号,则去除
|
|
7765
|
-
if (needCalibration) {
|
|
7766
|
-
|
|
7767
|
-
|
|
7778
|
+
// if (needCalibration) {
|
|
7779
|
+
// data.name = '';
|
|
7780
|
+
// data.phone = '';
|
|
7781
|
+
// }
|
|
7782
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7783
|
+
}).catch(function (e) {
|
|
7784
|
+
handleAIIdentify(fullAddress);
|
|
7785
|
+
console.log(e);
|
|
7786
|
+
}).finally(function () {
|
|
7787
|
+
setLoading(false);
|
|
7788
|
+
});
|
|
7789
|
+
};
|
|
7790
|
+
var handleAIIdentify = function handleAIIdentify() {
|
|
7791
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
7792
|
+
if (!value && !val) {
|
|
7793
|
+
return;
|
|
7794
|
+
}
|
|
7795
|
+
setAiLoading(true);
|
|
7796
|
+
var fullAddress = value || val;
|
|
7797
|
+
setIsCopy(false);
|
|
7798
|
+
request$1({
|
|
7799
|
+
url: '/qy/logistics/addressAnalysis',
|
|
7800
|
+
method: 'post',
|
|
7801
|
+
data: {
|
|
7802
|
+
fullAddress: fullAddress,
|
|
7803
|
+
isAiParse: true
|
|
7768
7804
|
}
|
|
7805
|
+
}).then(function (res) {
|
|
7806
|
+
var data = res.data;
|
|
7769
7807
|
onChange === null || onChange === void 0 ? void 0 : onChange(data);
|
|
7770
7808
|
}).catch(function (e) {
|
|
7771
7809
|
console.log(e);
|
|
7810
|
+
message.error('识别失败,请输入正确的信息');
|
|
7811
|
+
}).finally(function () {
|
|
7812
|
+
setAiLoading(false);
|
|
7772
7813
|
});
|
|
7773
7814
|
};
|
|
7774
7815
|
var _onKeyDown = function onKeyDown(e) {
|
|
@@ -7795,10 +7836,18 @@ var ParseLogistics = function ParseLogistics(props) {
|
|
|
7795
7836
|
}), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
7796
7837
|
size: "small",
|
|
7797
7838
|
type: "primary",
|
|
7839
|
+
loading: loading,
|
|
7840
|
+
onClick: function onClick() {
|
|
7841
|
+
return handleIdentify();
|
|
7842
|
+
}
|
|
7843
|
+
}, "\u4E00\u952E\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
|
|
7844
|
+
size: "small",
|
|
7845
|
+
type: "primary",
|
|
7846
|
+
loading: aiLoading,
|
|
7798
7847
|
onClick: function onClick() {
|
|
7799
|
-
return
|
|
7848
|
+
return handleAIIdentify();
|
|
7800
7849
|
}
|
|
7801
|
-
}, "\
|
|
7850
|
+
}, "AI\u8BC6\u522B"), /*#__PURE__*/React.createElement(Button, {
|
|
7802
7851
|
size: "small",
|
|
7803
7852
|
onClick: function onClick() {
|
|
7804
7853
|
return setValue('');
|
|
@@ -7828,6 +7877,7 @@ var IdentifyAddress = function IdentifyAddress(props) {
|
|
|
7828
7877
|
bs: BsAddressData,
|
|
7829
7878
|
wdt: WdtAddressData,
|
|
7830
7879
|
gy: GyAddressData,
|
|
7880
|
+
km: AddressData,
|
|
7831
7881
|
workOrder: AddressData
|
|
7832
7882
|
}[type] || AddressData).getInstance();
|
|
7833
7883
|
if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
|
|
@@ -8131,17 +8181,16 @@ var SubForm = function SubForm(props) {
|
|
|
8131
8181
|
return [{
|
|
8132
8182
|
dataIndex: 'index',
|
|
8133
8183
|
title: '序号',
|
|
8184
|
+
fixed: 'left',
|
|
8185
|
+
width: 20,
|
|
8134
8186
|
render: function render(val, record, index) {
|
|
8135
|
-
return
|
|
8136
|
-
style: {
|
|
8137
|
-
width: 25
|
|
8138
|
-
}
|
|
8139
|
-
}, index + 1);
|
|
8187
|
+
return index + 1;
|
|
8140
8188
|
}
|
|
8141
8189
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8142
8190
|
return {
|
|
8143
8191
|
dataIndex: t.key,
|
|
8144
|
-
title: t.name
|
|
8192
|
+
title: t.name,
|
|
8193
|
+
width: 90
|
|
8145
8194
|
};
|
|
8146
8195
|
})));
|
|
8147
8196
|
}, [newTableHeader]);
|
|
@@ -8329,7 +8378,7 @@ var SubForm = function SubForm(props) {
|
|
|
8329
8378
|
onScrollCapture: onScrollCapture,
|
|
8330
8379
|
style: {
|
|
8331
8380
|
height: 320,
|
|
8332
|
-
maxWidth: platform !== 'pc' ? '325px' : '
|
|
8381
|
+
maxWidth: platform !== 'pc' ? '325px' : '700px',
|
|
8333
8382
|
overflowY: 'scroll',
|
|
8334
8383
|
overflowX: 'auto'
|
|
8335
8384
|
}
|
|
@@ -8340,7 +8389,7 @@ var SubForm = function SubForm(props) {
|
|
|
8340
8389
|
size: "small",
|
|
8341
8390
|
pagination: false,
|
|
8342
8391
|
scroll: {
|
|
8343
|
-
x: '
|
|
8392
|
+
x: 'max-content'
|
|
8344
8393
|
},
|
|
8345
8394
|
locale: {
|
|
8346
8395
|
emptyText: '暂无数据'
|
|
@@ -8713,7 +8762,9 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8713
8762
|
changeSku = props.changeSku,
|
|
8714
8763
|
width = props.width,
|
|
8715
8764
|
_props$numIidType = props.numIidType,
|
|
8716
|
-
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType
|
|
8765
|
+
numIidType = _props$numIidType === void 0 ? 'string' : _props$numIidType,
|
|
8766
|
+
form = props.form,
|
|
8767
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
8717
8768
|
var _useState = useState([]),
|
|
8718
8769
|
_useState2 = _slicedToArray(_useState, 2),
|
|
8719
8770
|
selectList = _useState2[0],
|
|
@@ -8726,10 +8777,14 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8726
8777
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8727
8778
|
goodList = _useState6[0],
|
|
8728
8779
|
setGoodList = _useState6[1];
|
|
8729
|
-
var _useState7 = useState(
|
|
8780
|
+
var _useState7 = useState([]),
|
|
8730
8781
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
8731
|
-
|
|
8732
|
-
|
|
8782
|
+
orderNoItems = _useState8[0],
|
|
8783
|
+
setOrderNoItems = _useState8[1];
|
|
8784
|
+
var _useState9 = useState(false),
|
|
8785
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
8786
|
+
loading = _useState10[0],
|
|
8787
|
+
setLoading = _useState10[1];
|
|
8733
8788
|
var transformIdType = function transformIdType(id) {
|
|
8734
8789
|
if (!['string', 'number'].includes(_typeof(id))) return id;
|
|
8735
8790
|
return numIidType === 'string' ? id + '' : +id;
|
|
@@ -8749,7 +8804,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8749
8804
|
var handleSetGoodList = function handleSetGoodList(list) {
|
|
8750
8805
|
return setGoodList(list.map(transformType));
|
|
8751
8806
|
};
|
|
8752
|
-
var
|
|
8807
|
+
var _useState11 = useState({
|
|
8753
8808
|
apiName: 'queryItems',
|
|
8754
8809
|
desc: true,
|
|
8755
8810
|
numIids: '',
|
|
@@ -8761,30 +8816,30 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8761
8816
|
cids: '',
|
|
8762
8817
|
title: ''
|
|
8763
8818
|
}),
|
|
8764
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
8765
|
-
searchParams = _useState10[0],
|
|
8766
|
-
setSearch = _useState10[1];
|
|
8767
|
-
var _useState11 = useState(0),
|
|
8768
8819
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
var _useState13 = useState(
|
|
8820
|
+
searchParams = _useState12[0],
|
|
8821
|
+
setSearch = _useState12[1];
|
|
8822
|
+
var _useState13 = useState(0),
|
|
8772
8823
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
var _useState15 = useState(
|
|
8824
|
+
total = _useState14[0],
|
|
8825
|
+
setTotal = _useState14[1];
|
|
8826
|
+
var _useState15 = useState(''),
|
|
8776
8827
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
var _useState17 = useState(
|
|
8828
|
+
platform = _useState16[0],
|
|
8829
|
+
setPlatform = _useState16[1]; //平台 taobao=淘宝 fxg=抖音 pdd=拼多多 sph=微信视屏号
|
|
8830
|
+
var _useState17 = useState({}),
|
|
8780
8831
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
var _useState19 = useState(
|
|
8832
|
+
shopInfo = _useState18[0],
|
|
8833
|
+
setShopInfo = _useState18[1]; //店铺信息
|
|
8834
|
+
var _useState19 = useState(true),
|
|
8784
8835
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
var _useState21 = useState([
|
|
8836
|
+
canSearch = _useState20[0],
|
|
8837
|
+
setCanSearch = _useState20[1];
|
|
8838
|
+
var _useState21 = useState([null]),
|
|
8839
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
8840
|
+
nextKeyList = _useState22[0],
|
|
8841
|
+
setNextKeyList = _useState22[1];
|
|
8842
|
+
var _useState23 = useState([{
|
|
8788
8843
|
tab: '出售中',
|
|
8789
8844
|
key: 'onSale'
|
|
8790
8845
|
}, {
|
|
@@ -8794,10 +8849,10 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8794
8849
|
tab: '已选择',
|
|
8795
8850
|
key: 'select'
|
|
8796
8851
|
}]),
|
|
8797
|
-
|
|
8798
|
-
tabs =
|
|
8799
|
-
setTabs =
|
|
8800
|
-
var
|
|
8852
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
8853
|
+
tabs = _useState24[0],
|
|
8854
|
+
setTabs = _useState24[1];
|
|
8855
|
+
var _useState25 = useState([{
|
|
8801
8856
|
name: '上架时间',
|
|
8802
8857
|
value: 'list_time'
|
|
8803
8858
|
}, {
|
|
@@ -8807,13 +8862,13 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
8807
8862
|
name: '按价格',
|
|
8808
8863
|
value: 'price'
|
|
8809
8864
|
}]),
|
|
8810
|
-
|
|
8811
|
-
goodSort =
|
|
8865
|
+
_useState26 = _slicedToArray(_useState25, 1),
|
|
8866
|
+
goodSort = _useState26[0];
|
|
8812
8867
|
//宝贝分类
|
|
8813
|
-
var
|
|
8814
|
-
|
|
8815
|
-
shell =
|
|
8816
|
-
setShell =
|
|
8868
|
+
var _useState27 = useState([]),
|
|
8869
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
8870
|
+
shell = _useState28[0],
|
|
8871
|
+
setShell = _useState28[1];
|
|
8817
8872
|
var clickOrder = function clickOrder(sort) {
|
|
8818
8873
|
if (sort.value === searchParams.orderBy) {
|
|
8819
8874
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9086,8 +9141,112 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9086
9141
|
}
|
|
9087
9142
|
}, [platform]);
|
|
9088
9143
|
useEffect(function () {
|
|
9089
|
-
platform && canSearch
|
|
9144
|
+
if (platform && canSearch) {
|
|
9145
|
+
if (searchParams.type === 'orderProduct') {
|
|
9146
|
+
getOrderProductItem(searchParams);
|
|
9147
|
+
} else {
|
|
9148
|
+
getItem(searchParams, platform);
|
|
9149
|
+
}
|
|
9150
|
+
}
|
|
9090
9151
|
}, [searchParams, platform]);
|
|
9152
|
+
useEffect(function () {
|
|
9153
|
+
if (visible && platform !== 'fxg') {
|
|
9154
|
+
var val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9155
|
+
var orderNo = val['m3ap1EvEyd'];
|
|
9156
|
+
if (orderNo) {
|
|
9157
|
+
setTabs(function (prev) {
|
|
9158
|
+
return uniqBy([{
|
|
9159
|
+
tab: '订单商品',
|
|
9160
|
+
key: 'orderProduct'
|
|
9161
|
+
}].concat(_toConsumableArray(prev)), 'key');
|
|
9162
|
+
});
|
|
9163
|
+
if (isPriorityDisplayOfOrderNo) {
|
|
9164
|
+
setSearch(function (prev) {
|
|
9165
|
+
return _objectSpread2(_objectSpread2({}, prev), {}, {
|
|
9166
|
+
type: 'orderProduct'
|
|
9167
|
+
});
|
|
9168
|
+
});
|
|
9169
|
+
}
|
|
9170
|
+
}
|
|
9171
|
+
}
|
|
9172
|
+
if (!visible) {
|
|
9173
|
+
setOrderNoItems([]);
|
|
9174
|
+
}
|
|
9175
|
+
}, [visible]);
|
|
9176
|
+
var getOrderProductItem = /*#__PURE__*/function () {
|
|
9177
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
|
|
9178
|
+
var val, orderNo, shopId, res, items, totalCount, pageNo, pageSize, _pageNo, _pageSize, title, _items;
|
|
9179
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9180
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
9181
|
+
case 0:
|
|
9182
|
+
val = (form === null || form === void 0 ? void 0 : form.getFieldsValue()) || {};
|
|
9183
|
+
orderNo = val.m3ap1EvEyd, shopId = val.shopId;
|
|
9184
|
+
if (orderNo) {
|
|
9185
|
+
_context2.next = 4;
|
|
9186
|
+
break;
|
|
9187
|
+
}
|
|
9188
|
+
return _context2.abrupt("return", handleSetGoodList([]));
|
|
9189
|
+
case 4:
|
|
9190
|
+
if (orderNoItems.length) {
|
|
9191
|
+
_context2.next = 20;
|
|
9192
|
+
break;
|
|
9193
|
+
}
|
|
9194
|
+
_context2.prev = 5;
|
|
9195
|
+
setLoading(true);
|
|
9196
|
+
_context2.next = 9;
|
|
9197
|
+
return servers.orderDetail({
|
|
9198
|
+
shopId: shopId,
|
|
9199
|
+
orderNo: orderNo
|
|
9200
|
+
});
|
|
9201
|
+
case 9:
|
|
9202
|
+
res = _context2.sent;
|
|
9203
|
+
if (res.success) {
|
|
9204
|
+
_context2.next = 14;
|
|
9205
|
+
break;
|
|
9206
|
+
}
|
|
9207
|
+
handleSetGoodList([]);
|
|
9208
|
+
message.warn(res.message);
|
|
9209
|
+
return _context2.abrupt("return");
|
|
9210
|
+
case 14:
|
|
9211
|
+
if (res.data && res.data.itemList && res.data.itemList.length) {
|
|
9212
|
+
items = res.data.itemList;
|
|
9213
|
+
totalCount = items.length;
|
|
9214
|
+
items.forEach(function (item) {
|
|
9215
|
+
item.platform = platform;
|
|
9216
|
+
});
|
|
9217
|
+
setOrderNoItems(items);
|
|
9218
|
+
pageNo = params.pageNo, pageSize = params.pageSize;
|
|
9219
|
+
handleSetGoodList(_toConsumableArray(items.slice((pageNo - 1) * pageSize, pageNo * pageSize)));
|
|
9220
|
+
setTotal(totalCount);
|
|
9221
|
+
}
|
|
9222
|
+
case 15:
|
|
9223
|
+
_context2.prev = 15;
|
|
9224
|
+
setLoading(false);
|
|
9225
|
+
return _context2.finish(15);
|
|
9226
|
+
case 18:
|
|
9227
|
+
_context2.next = 26;
|
|
9228
|
+
break;
|
|
9229
|
+
case 20:
|
|
9230
|
+
_pageNo = params.pageNo, _pageSize = params.pageSize;
|
|
9231
|
+
title = params.title;
|
|
9232
|
+
if (platform !== 'taobao') {
|
|
9233
|
+
title = params.numIids;
|
|
9234
|
+
}
|
|
9235
|
+
_items = title ? orderNoItems.filter(function (item) {
|
|
9236
|
+
return item.title.includes(title.trim());
|
|
9237
|
+
}) : orderNoItems;
|
|
9238
|
+
handleSetGoodList(_toConsumableArray(_items.slice((_pageNo - 1) * _pageSize, _pageNo * _pageSize)));
|
|
9239
|
+
setTotal(_items.length);
|
|
9240
|
+
case 26:
|
|
9241
|
+
case "end":
|
|
9242
|
+
return _context2.stop();
|
|
9243
|
+
}
|
|
9244
|
+
}, _callee2, null, [[5,, 15, 18]]);
|
|
9245
|
+
}));
|
|
9246
|
+
return function getOrderProductItem(_x2) {
|
|
9247
|
+
return _ref4.apply(this, arguments);
|
|
9248
|
+
};
|
|
9249
|
+
}();
|
|
9091
9250
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
9092
9251
|
title: '选择宝贝',
|
|
9093
9252
|
okText: '确认',
|
|
@@ -9121,7 +9280,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9121
9280
|
style: {
|
|
9122
9281
|
display: searchParams.type === 'select' ? 'none' : ''
|
|
9123
9282
|
}
|
|
9124
|
-
}, platform === 'taobao' && /*#__PURE__*/React.createElement(Radio.Group, {
|
|
9283
|
+
}, /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Radio.Group, {
|
|
9125
9284
|
value: searchParams.orderBy,
|
|
9126
9285
|
onChange: function onChange(e) {
|
|
9127
9286
|
setSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, {
|
|
@@ -9137,7 +9296,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9137
9296
|
},
|
|
9138
9297
|
key: sort.value
|
|
9139
9298
|
}, 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, {
|
|
9299
|
+
}))), /*#__PURE__*/React.createElement("div", null, platform === 'taobao' && searchParams.type !== 'orderProduct' && /*#__PURE__*/React.createElement(Select, {
|
|
9141
9300
|
className: "classify",
|
|
9142
9301
|
value: searchParams.cids,
|
|
9143
9302
|
onChange: function onChange(value) {
|
|
@@ -9152,7 +9311,7 @@ var GoodsModal = function GoodsModal(props) {
|
|
|
9152
9311
|
key: item.value
|
|
9153
9312
|
}, item.label);
|
|
9154
9313
|
})), /*#__PURE__*/React.createElement(Search, {
|
|
9155
|
-
placeholder: platform === 'taobao' ? '宝贝链接,标题' : '商品ID',
|
|
9314
|
+
placeholder: searchParams.type !== 'orderProduct' ? platform === 'taobao' ? '宝贝链接,标题' : '商品ID' : '宝贝标题',
|
|
9156
9315
|
// enterButton="搜索"
|
|
9157
9316
|
className: "search",
|
|
9158
9317
|
value: platform === 'taobao' ? searchParams.title : searchParams.numIids,
|
|
@@ -9775,7 +9934,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9775
9934
|
userNick = props.userNick,
|
|
9776
9935
|
disabled = props.disabled,
|
|
9777
9936
|
changeSku = props.changeSku,
|
|
9778
|
-
width = props.width
|
|
9937
|
+
width = props.width,
|
|
9938
|
+
form = props.form,
|
|
9939
|
+
isPriorityDisplayOfOrderNo = props.isPriorityDisplayOfOrderNo;
|
|
9779
9940
|
var shopId = value.shopId,
|
|
9780
9941
|
imgList = value.imgList;
|
|
9781
9942
|
var _useState = useState(false),
|
|
@@ -9866,7 +10027,7 @@ var GoodItem = function GoodItem(props) {
|
|
|
9866
10027
|
var onSubmit = /*#__PURE__*/function () {
|
|
9867
10028
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(list) {
|
|
9868
10029
|
var _list$;
|
|
9869
|
-
var newList, newImgList;
|
|
10030
|
+
var newList, newImgList, _list$2;
|
|
9870
10031
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9871
10032
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9872
10033
|
case 0:
|
|
@@ -9888,7 +10049,11 @@ var GoodItem = function GoodItem(props) {
|
|
|
9888
10049
|
// if (type === 1) {
|
|
9889
10050
|
// params.outerId = item.outerId; //编码
|
|
9890
10051
|
// }
|
|
9891
|
-
|
|
10052
|
+
//返填商品属性 && 为订单商品
|
|
10053
|
+
if (changeSku && item.skuInfoDTO) {
|
|
10054
|
+
params.outerSkuId = item.skuInfoDTO.outerSkuId;
|
|
10055
|
+
params.propertiesName = item.skuInfoDTO.propertiesName;
|
|
10056
|
+
} else if (changeSku) {
|
|
9892
10057
|
params.propertiesName = '';
|
|
9893
10058
|
}
|
|
9894
10059
|
// if (type === 4) {
|
|
@@ -9907,7 +10072,9 @@ var GoodItem = function GoodItem(props) {
|
|
|
9907
10072
|
imgList: newImgList
|
|
9908
10073
|
});
|
|
9909
10074
|
setVisible(false);
|
|
9910
|
-
|
|
10075
|
+
if (!(list === null || list === void 0 ? void 0 : (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.skuInfoDTO)) {
|
|
10076
|
+
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);
|
|
10077
|
+
}
|
|
9911
10078
|
case 5:
|
|
9912
10079
|
case "end":
|
|
9913
10080
|
return _context2.stop();
|
|
@@ -10164,6 +10331,8 @@ var GoodItem = function GoodItem(props) {
|
|
|
10164
10331
|
shopId: shopId,
|
|
10165
10332
|
maxLength: maxLength,
|
|
10166
10333
|
changeSku: changeSku,
|
|
10334
|
+
form: form,
|
|
10335
|
+
isPriorityDisplayOfOrderNo: isPriorityDisplayOfOrderNo,
|
|
10167
10336
|
onCancel: function onCancel() {
|
|
10168
10337
|
setVisible(false);
|
|
10169
10338
|
}
|
|
@@ -10962,7 +11131,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10962
11131
|
}
|
|
10963
11132
|
})), /*#__PURE__*/React.createElement(Item, {
|
|
10964
11133
|
label: '发件人手机号',
|
|
10965
|
-
required
|
|
11134
|
+
// required={true}
|
|
10966
11135
|
key: 'interceptSenderMobile',
|
|
10967
11136
|
hidden: !showSenderMobile
|
|
10968
11137
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -10991,7 +11160,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10991
11160
|
value: item.uk
|
|
10992
11161
|
}, "".concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.province) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.city) || '').concat(address.getNameByCode(item === null || item === void 0 ? void 0 : item.district) || '').concat(item.detail, " ").concat(item === null || item === void 0 ? void 0 : item.userName, ":").concat(item === null || item === void 0 ? void 0 : item.mobile));
|
|
10993
11162
|
}))), /*#__PURE__*/React.createElement(Item, {
|
|
10994
|
-
label: '
|
|
11163
|
+
label: '修改后派送地址',
|
|
10995
11164
|
required: true,
|
|
10996
11165
|
key: 'newAddress',
|
|
10997
11166
|
hidden: !showNewAddress
|
|
@@ -11142,7 +11311,11 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11142
11311
|
_props$value = props.value,
|
|
11143
11312
|
value = _props$value === void 0 ? {} : _props$value,
|
|
11144
11313
|
disabled = props.disabled,
|
|
11145
|
-
onChange = props.onChange
|
|
11314
|
+
onChange = props.onChange,
|
|
11315
|
+
_props$isSingle = props.isSingle,
|
|
11316
|
+
isSingle = _props$isSingle === void 0 ? true : _props$isSingle,
|
|
11317
|
+
_props$trajectoryApiS = props.trajectoryApiStatus,
|
|
11318
|
+
trajectoryApiStatus = _props$trajectoryApiS === void 0 ? false : _props$trajectoryApiS;
|
|
11146
11319
|
var handleInputChange = function handleInputChange(e, type) {
|
|
11147
11320
|
var val = e.target.value;
|
|
11148
11321
|
typeof onChange === 'function' && onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val)));
|
|
@@ -11153,13 +11326,23 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11153
11326
|
}));
|
|
11154
11327
|
handleSearchSnapshot(val);
|
|
11155
11328
|
};
|
|
11329
|
+
var handleStatusChange = function handleStatusChange(val) {
|
|
11330
|
+
var _value$trajectoryApiS;
|
|
11331
|
+
var newVal = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11332
|
+
trajectoryApiStatus: {
|
|
11333
|
+
status: val,
|
|
11334
|
+
reason: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS = value.trajectoryApiStatus) === null || _value$trajectoryApiS === void 0 ? void 0 : _value$trajectoryApiS.reason) || ''
|
|
11335
|
+
}
|
|
11336
|
+
});
|
|
11337
|
+
onChange(newVal);
|
|
11338
|
+
};
|
|
11156
11339
|
var handleSearchSnapshot = function handleSearchSnapshot(company) {
|
|
11157
11340
|
var trajectoryCompany = value.trajectoryCompany,
|
|
11158
11341
|
trajectoryCode = value.trajectoryCode,
|
|
11159
11342
|
trajectoryPhone = value.trajectoryPhone;
|
|
11160
11343
|
var newCompany = company ? company : trajectoryCompany;
|
|
11161
11344
|
//不展示拦截状态不请求
|
|
11162
|
-
if (!(showField && showField.includes('snapshot'))) {
|
|
11345
|
+
if (!(showField && showField.includes('snapshot')) && !trajectoryApiStatus) {
|
|
11163
11346
|
return;
|
|
11164
11347
|
}
|
|
11165
11348
|
if (disabled) {
|
|
@@ -11184,13 +11367,19 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11184
11367
|
data = res.data,
|
|
11185
11368
|
msg = res.message;
|
|
11186
11369
|
if (result === 100 || success) {
|
|
11187
|
-
|
|
11188
|
-
trajectorySnapshot: data === null || data === void 0 ? void 0 : data.logisticsStatusDesc,
|
|
11370
|
+
var newValue = _objectSpread2(_objectSpread2({}, value), {}, {
|
|
11189
11371
|
trajectoryCompany: newCompany
|
|
11190
|
-
})
|
|
11372
|
+
});
|
|
11373
|
+
if (trajectoryApiStatus) newValue.trajectoryApiStatus = data === null || data === void 0 ? void 0 : data.apiStatusObject;
|
|
11374
|
+
if (showField && showField.includes('snapshot')) newValue.trajectorySnapshot = data === null || data === void 0 ? void 0 : data.logisticsStatusDesc;
|
|
11375
|
+
onChange(newValue);
|
|
11191
11376
|
} else {
|
|
11192
11377
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11193
11378
|
trajectorySnapshot: '',
|
|
11379
|
+
trajectoryApiStatus: {
|
|
11380
|
+
reason: '',
|
|
11381
|
+
status: ''
|
|
11382
|
+
},
|
|
11194
11383
|
trajectoryCompany: newCompany
|
|
11195
11384
|
}));
|
|
11196
11385
|
msg && message.error(msg);
|
|
@@ -11199,6 +11388,10 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11199
11388
|
} catch (err) {
|
|
11200
11389
|
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
11201
11390
|
trajectorySnapshot: '',
|
|
11391
|
+
trajectoryApiStatus: {
|
|
11392
|
+
reason: '',
|
|
11393
|
+
status: ''
|
|
11394
|
+
},
|
|
11202
11395
|
trajectoryCompany: newCompany
|
|
11203
11396
|
}));
|
|
11204
11397
|
(err === null || err === void 0 ? void 0 : err.message) && message.error(err === null || err === void 0 ? void 0 : err.message);
|
|
@@ -11252,6 +11445,31 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11252
11445
|
}
|
|
11253
11446
|
});
|
|
11254
11447
|
};
|
|
11448
|
+
// 接口状态
|
|
11449
|
+
var LogisticsApiStatus = function LogisticsApiStatus() {
|
|
11450
|
+
var _value$trajectoryApiS2, _value$trajectoryApiS3, _value$trajectoryApiS4;
|
|
11451
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
|
|
11452
|
+
value: (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS2 = value.trajectoryApiStatus) === null || _value$trajectoryApiS2 === void 0 ? void 0 : _value$trajectoryApiS2.status) || null,
|
|
11453
|
+
disabled: true,
|
|
11454
|
+
style: {
|
|
11455
|
+
width: '100%',
|
|
11456
|
+
marginTop: '8px'
|
|
11457
|
+
},
|
|
11458
|
+
placeholder: "\u63A5\u53E3\u72B6\u6001",
|
|
11459
|
+
onChange: handleStatusChange,
|
|
11460
|
+
options: [{
|
|
11461
|
+
label: '成功',
|
|
11462
|
+
value: '成功'
|
|
11463
|
+
}, {
|
|
11464
|
+
label: '失败',
|
|
11465
|
+
value: '失败'
|
|
11466
|
+
}]
|
|
11467
|
+
}), (value === null || value === void 0 ? void 0 : (_value$trajectoryApiS3 = value.trajectoryApiStatus) === null || _value$trajectoryApiS3 === void 0 ? void 0 : _value$trajectoryApiS3.reason) ? /*#__PURE__*/React.createElement("div", {
|
|
11468
|
+
style: {
|
|
11469
|
+
color: 'red'
|
|
11470
|
+
}
|
|
11471
|
+
}, "\u5931\u8D25\u539F\u56E0\uFF1A", value === null || value === void 0 ? void 0 : (_value$trajectoryApiS4 = value.trajectoryApiStatus) === null || _value$trajectoryApiS4 === void 0 ? void 0 : _value$trajectoryApiS4.reason) : null);
|
|
11472
|
+
};
|
|
11255
11473
|
//物流快照
|
|
11256
11474
|
var LogisticsSnapshot = function LogisticsSnapshot() {
|
|
11257
11475
|
return /*#__PURE__*/React.createElement(Input, {
|
|
@@ -11266,7 +11484,7 @@ var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
|
11266
11484
|
value: value === null || value === void 0 ? void 0 : value.trajectorySnapshot
|
|
11267
11485
|
});
|
|
11268
11486
|
};
|
|
11269
|
-
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
11487
|
+
return /*#__PURE__*/React.createElement("div", null, LogisticsCompany(), LogisticsCode(), (value === null || value === void 0 ? void 0 : value.trajectoryCompany) === 'SF' ? LogisticsPhone() : null, trajectoryApiStatus && isSingle && LogisticsApiStatus(), showField && showField.includes('snapshot') ? /*#__PURE__*/React.createElement(LogisticsSnapshot, null) : null);
|
|
11270
11488
|
};
|
|
11271
11489
|
|
|
11272
11490
|
var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
@@ -11479,7 +11697,8 @@ var LogisticsMoreTrajectory = function LogisticsMoreTrajectory(props) {
|
|
|
11479
11697
|
disabled: disabled,
|
|
11480
11698
|
onChange: function onChange(val) {
|
|
11481
11699
|
return handleChange(val, changeIndex);
|
|
11482
|
-
}
|
|
11700
|
+
},
|
|
11701
|
+
isSingle: false
|
|
11483
11702
|
}));
|
|
11484
11703
|
};
|
|
11485
11704
|
|
|
@@ -11502,7 +11721,7 @@ var typeInitValueMap = {
|
|
|
11502
11721
|
}]
|
|
11503
11722
|
};
|
|
11504
11723
|
var jstGoods = function jstGoods(props) {
|
|
11505
|
-
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11;
|
|
11724
|
+
var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6, _value$changeIndex7, _value$changeIndex8, _value$changeIndex9, _value$changeIndex10, _value$changeIndex11, _value$changeIndex12;
|
|
11506
11725
|
var _props$value = props.value,
|
|
11507
11726
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11508
11727
|
onChange = props.onChange,
|
|
@@ -11610,7 +11829,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11610
11829
|
onChange: function onChange(val) {
|
|
11611
11830
|
changeInputHandle(val, 'logisticsCompany');
|
|
11612
11831
|
},
|
|
11613
|
-
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false)
|
|
11832
|
+
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex['logisticsCompany'], false) ? (_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'] : (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompanyName'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompany'],
|
|
11614
11833
|
showSearch: true,
|
|
11615
11834
|
dropdownMatchSelectWidth: false,
|
|
11616
11835
|
filterOption: function filterOption(input, option) {
|
|
@@ -11627,28 +11846,28 @@ var jstGoods = function jstGoods(props) {
|
|
|
11627
11846
|
onChange: function onChange(e) {
|
|
11628
11847
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11629
11848
|
},
|
|
11630
|
-
value: (_value$
|
|
11849
|
+
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.logisticsCode
|
|
11631
11850
|
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11632
11851
|
disabled: disabled,
|
|
11633
11852
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11634
11853
|
onChange: function onChange(e) {
|
|
11635
11854
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11636
11855
|
},
|
|
11637
|
-
value: (_value$
|
|
11856
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.supplyId
|
|
11638
11857
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11639
11858
|
disabled: disabled,
|
|
11640
11859
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11641
11860
|
onChange: function onChange(e) {
|
|
11642
11861
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11643
11862
|
},
|
|
11644
|
-
value: (_value$
|
|
11863
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyName
|
|
11645
11864
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11646
11865
|
disabled: disabled,
|
|
11647
11866
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11648
11867
|
onChange: function onChange(e) {
|
|
11649
11868
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11650
11869
|
},
|
|
11651
|
-
value: (_value$
|
|
11870
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.sendId
|
|
11652
11871
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
|
|
11653
11872
|
style: {
|
|
11654
11873
|
minWidth: '100px',
|
|
@@ -11659,7 +11878,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11659
11878
|
showSearch: true,
|
|
11660
11879
|
options: sendOptions,
|
|
11661
11880
|
filterOption: filterOption,
|
|
11662
|
-
value: ((_value$
|
|
11881
|
+
value: ((_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendSnapshotId) || ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendName) || null,
|
|
11663
11882
|
onChange: function onChange(value, option) {
|
|
11664
11883
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11665
11884
|
}
|
|
@@ -11669,14 +11888,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11669
11888
|
onChange: function onChange(e) {
|
|
11670
11889
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11671
11890
|
},
|
|
11672
|
-
value: (_value$
|
|
11891
|
+
value: (_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName
|
|
11673
11892
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11674
11893
|
disabled: disabled,
|
|
11675
11894
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11676
11895
|
onChange: function onChange(e) {
|
|
11677
11896
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11678
11897
|
},
|
|
11679
|
-
value: (_value$
|
|
11898
|
+
value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
|
|
11680
11899
|
})) : null) : null);
|
|
11681
11900
|
};
|
|
11682
11901
|
|
|
@@ -12243,7 +12462,7 @@ var gyColumns = [{
|
|
|
12243
12462
|
}, {
|
|
12244
12463
|
dataIndex: 'specNo',
|
|
12245
12464
|
title: 'SKU编码',
|
|
12246
|
-
width:
|
|
12465
|
+
width: 150,
|
|
12247
12466
|
ellipsis: true
|
|
12248
12467
|
}, {
|
|
12249
12468
|
dataIndex: 'goodName',
|
|
@@ -12254,11 +12473,11 @@ var gyColumns = [{
|
|
|
12254
12473
|
dataIndex: 'goodShortName',
|
|
12255
12474
|
title: "\u5546\u54C1\u7B80\u79F0",
|
|
12256
12475
|
ellipsis: true,
|
|
12257
|
-
width:
|
|
12476
|
+
width: 150
|
|
12258
12477
|
}, {
|
|
12259
12478
|
dataIndex: 'goodNo',
|
|
12260
12479
|
title: '商品编码',
|
|
12261
|
-
width:
|
|
12480
|
+
width: 150,
|
|
12262
12481
|
ellipsis: true
|
|
12263
12482
|
}, {
|
|
12264
12483
|
dataIndex: 'goodPicUrl',
|
|
@@ -12531,12 +12750,144 @@ var bse3Columns = [{
|
|
|
12531
12750
|
width: 100
|
|
12532
12751
|
}];
|
|
12533
12752
|
|
|
12753
|
+
var getYesOrNo = function getYesOrNo(val) {
|
|
12754
|
+
if (!isBoolean(val)) return null;
|
|
12755
|
+
return val ? '是' : '否';
|
|
12756
|
+
};
|
|
12757
|
+
var kmColumns = [{
|
|
12758
|
+
dataIndex: 'goodName',
|
|
12759
|
+
title: '商品名称',
|
|
12760
|
+
width: 250,
|
|
12761
|
+
ellipsis: true
|
|
12762
|
+
}, {
|
|
12763
|
+
dataIndex: 'goodNo',
|
|
12764
|
+
title: '商品编码',
|
|
12765
|
+
width: 150,
|
|
12766
|
+
ellipsis: true
|
|
12767
|
+
}, {
|
|
12768
|
+
dataIndex: 'goodId',
|
|
12769
|
+
title: '商品ID',
|
|
12770
|
+
width: 200,
|
|
12771
|
+
ellipsis: true
|
|
12772
|
+
}, {
|
|
12773
|
+
dataIndex: 'goodPicUrl',
|
|
12774
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
12775
|
+
width: 150,
|
|
12776
|
+
render: function render(val) {
|
|
12777
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12778
|
+
width: 60,
|
|
12779
|
+
src: val
|
|
12780
|
+
});
|
|
12781
|
+
}
|
|
12782
|
+
}, {
|
|
12783
|
+
dataIndex: 'goodShortName',
|
|
12784
|
+
title: '商品简称',
|
|
12785
|
+
width: 200,
|
|
12786
|
+
ellipsis: true
|
|
12787
|
+
}, {
|
|
12788
|
+
dataIndex: 'goodBarcode',
|
|
12789
|
+
title: '商品条码',
|
|
12790
|
+
width: 200,
|
|
12791
|
+
ellipsis: true
|
|
12792
|
+
}, {
|
|
12793
|
+
dataIndex: 'brandName',
|
|
12794
|
+
title: "\u54C1\u724C\u540D\u79F0",
|
|
12795
|
+
ellipsis: true,
|
|
12796
|
+
width: 150
|
|
12797
|
+
}, {
|
|
12798
|
+
dataIndex: 'skuType',
|
|
12799
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
12800
|
+
ellipsis: true,
|
|
12801
|
+
width: 150
|
|
12802
|
+
}, {
|
|
12803
|
+
dataIndex: 'specName',
|
|
12804
|
+
title: "SKU\u540D\u79F0",
|
|
12805
|
+
ellipsis: true,
|
|
12806
|
+
width: 150
|
|
12807
|
+
}, {
|
|
12808
|
+
dataIndex: 'specNo',
|
|
12809
|
+
title: "SKU\u7F16\u7801",
|
|
12810
|
+
ellipsis: true,
|
|
12811
|
+
width: 150
|
|
12812
|
+
}, {
|
|
12813
|
+
dataIndex: 'specId',
|
|
12814
|
+
title: "SKU ID",
|
|
12815
|
+
ellipsis: true,
|
|
12816
|
+
width: 150
|
|
12817
|
+
}, {
|
|
12818
|
+
dataIndex: 'propertiesValue',
|
|
12819
|
+
title: "\u89C4\u683C\u503C",
|
|
12820
|
+
ellipsis: true,
|
|
12821
|
+
width: 150
|
|
12822
|
+
}, {
|
|
12823
|
+
dataIndex: 'skuShortTitle',
|
|
12824
|
+
title: "\u89C4\u683C\u7B80\u79F0",
|
|
12825
|
+
ellipsis: true,
|
|
12826
|
+
width: 150
|
|
12827
|
+
}, {
|
|
12828
|
+
dataIndex: 'specBarcode',
|
|
12829
|
+
title: "\u89C4\u683C\u6761\u7801",
|
|
12830
|
+
ellipsis: true,
|
|
12831
|
+
width: 150
|
|
12832
|
+
}, {
|
|
12833
|
+
dataIndex: 'specImgUrl',
|
|
12834
|
+
title: "SKU \u56FE\u7247",
|
|
12835
|
+
ellipsis: true,
|
|
12836
|
+
width: 150,
|
|
12837
|
+
render: function render(val) {
|
|
12838
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
12839
|
+
width: 60,
|
|
12840
|
+
src: val
|
|
12841
|
+
});
|
|
12842
|
+
}
|
|
12843
|
+
}, {
|
|
12844
|
+
dataIndex: 'isGift',
|
|
12845
|
+
title: "\u662F\u5426\u8D60\u54C1",
|
|
12846
|
+
ellipsis: true,
|
|
12847
|
+
width: 150,
|
|
12848
|
+
render: function render(val) {
|
|
12849
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12850
|
+
}
|
|
12851
|
+
}, {
|
|
12852
|
+
dataIndex: 'isVirtual',
|
|
12853
|
+
title: "\u662F\u5426\u865A\u62DF\u5546\u54C1",
|
|
12854
|
+
ellipsis: true,
|
|
12855
|
+
width: 150,
|
|
12856
|
+
render: function render(val) {
|
|
12857
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12858
|
+
}
|
|
12859
|
+
}, {
|
|
12860
|
+
dataIndex: 'isSkuItem',
|
|
12861
|
+
title: "\u662F\u5426\u542B\u6709SKU",
|
|
12862
|
+
ellipsis: true,
|
|
12863
|
+
width: 150,
|
|
12864
|
+
render: function render(val) {
|
|
12865
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
12866
|
+
}
|
|
12867
|
+
}, {
|
|
12868
|
+
dataIndex: 'marketPrice',
|
|
12869
|
+
title: "\u5E02\u573A\u4EF7",
|
|
12870
|
+
ellipsis: true,
|
|
12871
|
+
width: 150
|
|
12872
|
+
}, {
|
|
12873
|
+
dataIndex: 'retailPrice',
|
|
12874
|
+
title: "\u96F6\u552E\u4EF7",
|
|
12875
|
+
ellipsis: true,
|
|
12876
|
+
width: 150
|
|
12877
|
+
}, {
|
|
12878
|
+
dataIndex: 'costPrice',
|
|
12879
|
+
title: "\u6210\u672C\u4EF7",
|
|
12880
|
+
ellipsis: true,
|
|
12881
|
+
width: 150
|
|
12882
|
+
}];
|
|
12883
|
+
|
|
12534
12884
|
var getColumnsMap = function getColumnsMap() {
|
|
12535
12885
|
return cloneDeep({
|
|
12536
12886
|
gy: gyColumns,
|
|
12537
12887
|
jst: jstColumns,
|
|
12538
12888
|
wdt: wdtColumns,
|
|
12539
|
-
bse3: bse3Columns
|
|
12889
|
+
bse3: bse3Columns,
|
|
12890
|
+
km: kmColumns
|
|
12540
12891
|
});
|
|
12541
12892
|
};
|
|
12542
12893
|
var getColumnsBaseInfo = function getColumnsBaseInfo() {
|
|
@@ -13486,23 +13837,17 @@ var GoodsModal$4 = function GoodsModal(props, ref) {
|
|
|
13486
13837
|
};
|
|
13487
13838
|
var BsE3GoodsModal = /*#__PURE__*/forwardRef(GoodsModal$4);
|
|
13488
13839
|
|
|
13840
|
+
var rowCheckKey = 'id';
|
|
13489
13841
|
var getTableData$3 = function getTableData(_ref, formData) {
|
|
13490
13842
|
var current = _ref.current,
|
|
13491
13843
|
pageSize = _ref.pageSize;
|
|
13492
|
-
var data = {
|
|
13493
|
-
goodShortName: formData.goodShortName || null,
|
|
13494
|
-
skuName: formData.skuName || null,
|
|
13495
|
-
skuCode: formData.skuCode || null,
|
|
13496
|
-
goodName: formData.goodName || null,
|
|
13497
|
-
goodNo: formData.goodNo || null
|
|
13498
|
-
};
|
|
13499
13844
|
return extendRequest('/qy/gdfw/product/product/page', {
|
|
13500
13845
|
method: 'post',
|
|
13501
13846
|
data: _objectSpread2({
|
|
13502
13847
|
pageSize: pageSize,
|
|
13503
13848
|
pageNo: current,
|
|
13504
|
-
platform: '
|
|
13505
|
-
},
|
|
13849
|
+
platform: 'KM_ERP'
|
|
13850
|
+
}, formData)
|
|
13506
13851
|
}).then(function (res) {
|
|
13507
13852
|
var _res$data = res.data,
|
|
13508
13853
|
_res$data$productSkuL = _res$data.productSkuList,
|
|
@@ -13519,9 +13864,257 @@ var getTableData$3 = function getTableData(_ref, formData) {
|
|
|
13519
13864
|
});
|
|
13520
13865
|
};
|
|
13521
13866
|
var searchFormData$2 = [{
|
|
13522
|
-
label: '
|
|
13523
|
-
name: '
|
|
13524
|
-
}, {
|
|
13867
|
+
label: '商品名称',
|
|
13868
|
+
name: 'goodName'
|
|
13869
|
+
}, {
|
|
13870
|
+
label: '商品编码',
|
|
13871
|
+
name: 'goodNo'
|
|
13872
|
+
}, {
|
|
13873
|
+
label: 'SKU名称',
|
|
13874
|
+
name: 'skuName',
|
|
13875
|
+
dataIndex: 'specName'
|
|
13876
|
+
}, {
|
|
13877
|
+
label: 'SKU编码',
|
|
13878
|
+
name: 'skuCode',
|
|
13879
|
+
dataIndex: 'specNo'
|
|
13880
|
+
}];
|
|
13881
|
+
var GoodList$3 = function GoodList(props, ref) {
|
|
13882
|
+
var _useState = useState([]),
|
|
13883
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
13884
|
+
selectList = _useState2[0],
|
|
13885
|
+
setSelect = _useState2[1];
|
|
13886
|
+
var _useState3 = useState([]),
|
|
13887
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
13888
|
+
selectIds = _useState4[0],
|
|
13889
|
+
setSelectIds = _useState4[1];
|
|
13890
|
+
var _useGetColumns = useGetColumns('km'),
|
|
13891
|
+
_useGetColumns2 = _slicedToArray(_useGetColumns, 3),
|
|
13892
|
+
columns = _useGetColumns2[0],
|
|
13893
|
+
showColumnsDataIndexList = _useGetColumns2[1],
|
|
13894
|
+
loading = _useGetColumns2[2];
|
|
13895
|
+
useImperativeHandle(ref, function () {
|
|
13896
|
+
return {
|
|
13897
|
+
getSelectGoodList: function getSelectGoodList() {
|
|
13898
|
+
return selectList;
|
|
13899
|
+
}
|
|
13900
|
+
};
|
|
13901
|
+
});
|
|
13902
|
+
var _Form$useForm = Form.useForm(),
|
|
13903
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13904
|
+
form = _Form$useForm2[0];
|
|
13905
|
+
var _useAntdTable = useAntdTable(getTableData$3, {
|
|
13906
|
+
defaultPageSize: 10,
|
|
13907
|
+
form: form
|
|
13908
|
+
}),
|
|
13909
|
+
tableProps = _useAntdTable.tableProps,
|
|
13910
|
+
search = _useAntdTable.search,
|
|
13911
|
+
params = _useAntdTable.params;
|
|
13912
|
+
var submit = search.submit,
|
|
13913
|
+
reset = search.reset;
|
|
13914
|
+
var rowSelection = {
|
|
13915
|
+
selectedRowKeys: selectIds,
|
|
13916
|
+
fixed: true,
|
|
13917
|
+
onSelect: function onSelect(record, selected) {
|
|
13918
|
+
if (selected) {
|
|
13919
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), [record[rowCheckKey]]));
|
|
13920
|
+
setSelect([].concat(_toConsumableArray(selectList), [record]));
|
|
13921
|
+
} else {
|
|
13922
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13923
|
+
return t !== record[rowCheckKey];
|
|
13924
|
+
}));
|
|
13925
|
+
setSelect(selectList.filter(function (t) {
|
|
13926
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13927
|
+
}));
|
|
13928
|
+
}
|
|
13929
|
+
},
|
|
13930
|
+
onSelectAll: function onSelectAll(selected, selectedRows, changeRows) {
|
|
13931
|
+
if (selected) {
|
|
13932
|
+
setSelectIds([].concat(_toConsumableArray(selectIds), _toConsumableArray(changeRows.map(function (t) {
|
|
13933
|
+
return t[rowCheckKey];
|
|
13934
|
+
}))));
|
|
13935
|
+
setSelect([].concat(_toConsumableArray(selectList), _toConsumableArray(changeRows)));
|
|
13936
|
+
} else {
|
|
13937
|
+
setSelectIds(difference(selectIds, changeRows.map(function (t) {
|
|
13938
|
+
return t[rowCheckKey];
|
|
13939
|
+
})));
|
|
13940
|
+
var list = differenceWith(selectList, changeRows, function (arrVal, othVal) {
|
|
13941
|
+
return arrVal[rowCheckKey] !== othVal[rowCheckKey];
|
|
13942
|
+
});
|
|
13943
|
+
setSelect(list);
|
|
13944
|
+
}
|
|
13945
|
+
},
|
|
13946
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
13947
|
+
var options = {
|
|
13948
|
+
disabled: (props.selectedRows || []).map(function (row) {
|
|
13949
|
+
return row[rowCheckKey] || row.skuId;
|
|
13950
|
+
}).includes(record[rowCheckKey] || record.skuId),
|
|
13951
|
+
name: record[rowCheckKey]
|
|
13952
|
+
};
|
|
13953
|
+
return options;
|
|
13954
|
+
}
|
|
13955
|
+
};
|
|
13956
|
+
var showTable = function showTable() {
|
|
13957
|
+
var handleDelete = function handleDelete(record) {
|
|
13958
|
+
setSelectIds(selectIds.filter(function (t) {
|
|
13959
|
+
return t !== record[rowCheckKey];
|
|
13960
|
+
}));
|
|
13961
|
+
setSelect(selectList.filter(function (t) {
|
|
13962
|
+
return t[rowCheckKey] !== record[rowCheckKey];
|
|
13963
|
+
}));
|
|
13964
|
+
};
|
|
13965
|
+
var showColumns = [{
|
|
13966
|
+
dataIndex: '',
|
|
13967
|
+
title: "\u64CD\u4F5C",
|
|
13968
|
+
ellipsis: true,
|
|
13969
|
+
width: 100,
|
|
13970
|
+
render: function render(val, record) {
|
|
13971
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
13972
|
+
type: "link",
|
|
13973
|
+
onClick: function onClick() {
|
|
13974
|
+
return handleDelete(record);
|
|
13975
|
+
}
|
|
13976
|
+
}, "\u5220\u9664");
|
|
13977
|
+
}
|
|
13978
|
+
}].concat(takeRight(columns, columns.length - 1));
|
|
13979
|
+
return selectList.length ? /*#__PURE__*/React.createElement("div", {
|
|
13980
|
+
style: {
|
|
13981
|
+
width: '100%',
|
|
13982
|
+
maxWidth: '387px'
|
|
13983
|
+
}
|
|
13984
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
13985
|
+
columns: showColumns,
|
|
13986
|
+
rowKey: rowCheckKey,
|
|
13987
|
+
dataSource: selectList,
|
|
13988
|
+
scroll: {
|
|
13989
|
+
x: '100%',
|
|
13990
|
+
y: 250
|
|
13991
|
+
},
|
|
13992
|
+
pagination: {
|
|
13993
|
+
size: 'small',
|
|
13994
|
+
total: selectIds.length,
|
|
13995
|
+
pageSize: 10,
|
|
13996
|
+
showSizeChanger: false
|
|
13997
|
+
}
|
|
13998
|
+
})) : null;
|
|
13999
|
+
};
|
|
14000
|
+
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
14001
|
+
active: true,
|
|
14002
|
+
loading: loading
|
|
14003
|
+
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
14004
|
+
searchFormData: searchFormData$2,
|
|
14005
|
+
form: form,
|
|
14006
|
+
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
14007
|
+
submit: submit,
|
|
14008
|
+
reset: reset
|
|
14009
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
14010
|
+
style: {
|
|
14011
|
+
marginTop: '4px'
|
|
14012
|
+
}
|
|
14013
|
+
}, /*#__PURE__*/React.createElement(Table, _objectSpread2({
|
|
14014
|
+
rowSelection: rowSelection,
|
|
14015
|
+
rowKey: rowCheckKey,
|
|
14016
|
+
columns: columns,
|
|
14017
|
+
scroll: {
|
|
14018
|
+
x: '100%',
|
|
14019
|
+
y: 250
|
|
14020
|
+
}
|
|
14021
|
+
}, tableProps))), /*#__PURE__*/React.createElement(Popover, {
|
|
14022
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
14023
|
+
return triggerNode.parentElement;
|
|
14024
|
+
},
|
|
14025
|
+
content: showTable(),
|
|
14026
|
+
title: "\u5DF2\u9009\u62E9".concat(selectList.length, "\u4E2A\u5546\u54C1")
|
|
14027
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
14028
|
+
danger: true,
|
|
14029
|
+
type: "text"
|
|
14030
|
+
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
14031
|
+
};
|
|
14032
|
+
var ErpGoodsList = /*#__PURE__*/forwardRef(GoodList$3);
|
|
14033
|
+
|
|
14034
|
+
var ErpGoodsModal = function ErpGoodsModal(props, ref) {
|
|
14035
|
+
useImperativeHandle(ref, function () {
|
|
14036
|
+
return {
|
|
14037
|
+
open: function open(shopCode) {
|
|
14038
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
14039
|
+
setVisible(true);
|
|
14040
|
+
setSelectedRows(options.value || []);
|
|
14041
|
+
}
|
|
14042
|
+
};
|
|
14043
|
+
});
|
|
14044
|
+
var onSubmit = props.onSubmit,
|
|
14045
|
+
width = props.width;
|
|
14046
|
+
var _useState = useState(false),
|
|
14047
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
14048
|
+
visible = _useState2[0],
|
|
14049
|
+
setVisible = _useState2[1];
|
|
14050
|
+
var _useState3 = useState([]),
|
|
14051
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
14052
|
+
selectedRows = _useState4[0],
|
|
14053
|
+
setSelectedRows = _useState4[1];
|
|
14054
|
+
var erpGoodsListRef = useRef(null);
|
|
14055
|
+
var _onCancel = function onCancel() {
|
|
14056
|
+
setVisible(false);
|
|
14057
|
+
};
|
|
14058
|
+
var onOk = function onOk() {
|
|
14059
|
+
var _erpGoodsListRef$curr;
|
|
14060
|
+
var selectedList = ((_erpGoodsListRef$curr = erpGoodsListRef.current) === null || _erpGoodsListRef$curr === void 0 ? void 0 : _erpGoodsListRef$curr.getSelectGoodList()) || [];
|
|
14061
|
+
onSubmit(selectedList);
|
|
14062
|
+
_onCancel();
|
|
14063
|
+
};
|
|
14064
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, visible && /*#__PURE__*/React.createElement(Modal, {
|
|
14065
|
+
title: '选择商品',
|
|
14066
|
+
okText: '确认',
|
|
14067
|
+
cancelText: '取消',
|
|
14068
|
+
visible: visible,
|
|
14069
|
+
width: width || 850,
|
|
14070
|
+
onCancel: function onCancel() {
|
|
14071
|
+
_onCancel();
|
|
14072
|
+
},
|
|
14073
|
+
onOk: onOk,
|
|
14074
|
+
wrapClassName: "goodModal"
|
|
14075
|
+
}, /*#__PURE__*/React.createElement(ErpGoodsList, {
|
|
14076
|
+
ref: erpGoodsListRef,
|
|
14077
|
+
selectedRows: selectedRows
|
|
14078
|
+
})));
|
|
14079
|
+
};
|
|
14080
|
+
var KmGoodsModal = /*#__PURE__*/forwardRef(ErpGoodsModal);
|
|
14081
|
+
|
|
14082
|
+
var getTableData$4 = function getTableData(_ref, formData) {
|
|
14083
|
+
var current = _ref.current,
|
|
14084
|
+
pageSize = _ref.pageSize;
|
|
14085
|
+
var data = {
|
|
14086
|
+
goodShortName: formData.goodShortName || null,
|
|
14087
|
+
skuName: formData.skuName || null,
|
|
14088
|
+
skuCode: formData.skuCode || null,
|
|
14089
|
+
goodName: formData.goodName || null,
|
|
14090
|
+
goodNo: formData.goodNo || null
|
|
14091
|
+
};
|
|
14092
|
+
return extendRequest('/qy/gdfw/product/product/page', {
|
|
14093
|
+
method: 'post',
|
|
14094
|
+
data: _objectSpread2({
|
|
14095
|
+
pageSize: pageSize,
|
|
14096
|
+
pageNo: current,
|
|
14097
|
+
platform: 'GY_ERP'
|
|
14098
|
+
}, data)
|
|
14099
|
+
}).then(function (res) {
|
|
14100
|
+
var _res$data = res.data,
|
|
14101
|
+
_res$data$productSkuL = _res$data.productSkuList,
|
|
14102
|
+
productSkuList = _res$data$productSkuL === void 0 ? [] : _res$data$productSkuL,
|
|
14103
|
+
_res$data$total = _res$data.total,
|
|
14104
|
+
total = _res$data$total === void 0 ? 0 : _res$data$total;
|
|
14105
|
+
var newProducts = productSkuList.map(function (item, index) {
|
|
14106
|
+
return _objectSpread2({}, item);
|
|
14107
|
+
});
|
|
14108
|
+
return {
|
|
14109
|
+
total: total,
|
|
14110
|
+
list: newProducts
|
|
14111
|
+
};
|
|
14112
|
+
});
|
|
14113
|
+
};
|
|
14114
|
+
var searchFormData$3 = [{
|
|
14115
|
+
label: '商品简称',
|
|
14116
|
+
name: 'goodShortName'
|
|
14117
|
+
}, {
|
|
13525
14118
|
label: '商品sku名称',
|
|
13526
14119
|
name: 'skuName',
|
|
13527
14120
|
dataIndex: 'specName'
|
|
@@ -13536,7 +14129,7 @@ var searchFormData$2 = [{
|
|
|
13536
14129
|
label: '商品编码',
|
|
13537
14130
|
name: 'goodNo'
|
|
13538
14131
|
}];
|
|
13539
|
-
var GoodList$
|
|
14132
|
+
var GoodList$4 = function GoodList(props, ref) {
|
|
13540
14133
|
var _useState = useState([]),
|
|
13541
14134
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13542
14135
|
selectList = _useState2[0],
|
|
@@ -13560,7 +14153,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13560
14153
|
var _Form$useForm = Form.useForm(),
|
|
13561
14154
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
13562
14155
|
form = _Form$useForm2[0];
|
|
13563
|
-
var _useAntdTable = useAntdTable(getTableData$
|
|
14156
|
+
var _useAntdTable = useAntdTable(getTableData$4, {
|
|
13564
14157
|
defaultPageSize: 10,
|
|
13565
14158
|
form: form
|
|
13566
14159
|
}),
|
|
@@ -13650,7 +14243,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13650
14243
|
active: true,
|
|
13651
14244
|
loading: loading
|
|
13652
14245
|
}, /*#__PURE__*/React.createElement(SearchForm, {
|
|
13653
|
-
searchFormData: searchFormData$
|
|
14246
|
+
searchFormData: searchFormData$3,
|
|
13654
14247
|
form: form,
|
|
13655
14248
|
showColumnsDataIndexList: showColumnsDataIndexList,
|
|
13656
14249
|
submit: submit,
|
|
@@ -13678,7 +14271,7 @@ var GoodList$3 = function GoodList(props, ref) {
|
|
|
13678
14271
|
type: "text"
|
|
13679
14272
|
}, "\u5DF2\u9009".concat(selectList.length > 99 ? '99+' : selectList.length, "\u4E2A\u5546\u54C1"), /*#__PURE__*/React.createElement(CaretUpOutlined, null))));
|
|
13680
14273
|
};
|
|
13681
|
-
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$
|
|
14274
|
+
var GyGoodsList$1 = /*#__PURE__*/forwardRef(GoodList$4);
|
|
13682
14275
|
|
|
13683
14276
|
var GyGoodsModal$1 = function GyGoodsModal(props, ref) {
|
|
13684
14277
|
useImperativeHandle(ref, function () {
|
|
@@ -14427,6 +15020,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14427
15020
|
label: '组合装',
|
|
14428
15021
|
value: '2'
|
|
14429
15022
|
}];
|
|
15023
|
+
var typeMap = {
|
|
15024
|
+
'1': '单品',
|
|
15025
|
+
'2': '组合装'
|
|
15026
|
+
};
|
|
14430
15027
|
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14431
15028
|
style: {
|
|
14432
15029
|
width: 70
|
|
@@ -14436,7 +15033,7 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14436
15033
|
onChange: function onChange(value) {
|
|
14437
15034
|
return updateHandle(value, index, 'type');
|
|
14438
15035
|
}
|
|
14439
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
15036
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
14440
15037
|
}
|
|
14441
15038
|
}],
|
|
14442
15039
|
//旺店通换出商品信息
|
|
@@ -14548,6 +15145,10 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14548
15145
|
label: '组合装',
|
|
14549
15146
|
value: '2'
|
|
14550
15147
|
}];
|
|
15148
|
+
var typeMap = {
|
|
15149
|
+
'1': '单品',
|
|
15150
|
+
'2': '组合装'
|
|
15151
|
+
};
|
|
14551
15152
|
return !disabled ? /*#__PURE__*/React.createElement(Select, {
|
|
14552
15153
|
style: {
|
|
14553
15154
|
width: 70
|
|
@@ -14557,13 +15158,13 @@ var getColumns$2 = function getColumns(_ref) {
|
|
|
14557
15158
|
onChange: function onChange(value) {
|
|
14558
15159
|
return updateHandle(value, index, 'type');
|
|
14559
15160
|
}
|
|
14560
|
-
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
15161
|
+
}) : /*#__PURE__*/React.createElement("span", null, typeMap[val]);
|
|
14561
15162
|
}
|
|
14562
15163
|
}]
|
|
14563
15164
|
};
|
|
14564
15165
|
};
|
|
14565
15166
|
|
|
14566
|
-
var getYesOrNo = function getYesOrNo(val) {
|
|
15167
|
+
var getYesOrNo$1 = function getYesOrNo(val) {
|
|
14567
15168
|
if (isNull(val)) return null;
|
|
14568
15169
|
return val ? '是' : '否';
|
|
14569
15170
|
};
|
|
@@ -14701,7 +15302,7 @@ var getColumns$3 = function getColumns(_ref) {
|
|
|
14701
15302
|
label: '否',
|
|
14702
15303
|
value: false
|
|
14703
15304
|
}]
|
|
14704
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo(val));
|
|
15305
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$1(val));
|
|
14705
15306
|
},
|
|
14706
15307
|
width: 100
|
|
14707
15308
|
}]
|
|
@@ -14713,7 +15314,7 @@ var isNumberOrNumberString = function isNumberOrNumberString(value) {
|
|
|
14713
15314
|
if (typeof value === 'string' && !isNaN(Number(value)) && value.trim() !== '') return true;
|
|
14714
15315
|
return false;
|
|
14715
15316
|
};
|
|
14716
|
-
var getYesOrNo$
|
|
15317
|
+
var getYesOrNo$2 = function getYesOrNo(val) {
|
|
14717
15318
|
if (isNull(val)) return null;
|
|
14718
15319
|
return val ? '是' : '否';
|
|
14719
15320
|
};
|
|
@@ -14823,7 +15424,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14823
15424
|
title: "\u662F\u5426\u53D6\u6D88",
|
|
14824
15425
|
width: 150,
|
|
14825
15426
|
render: function render(val) {
|
|
14826
|
-
return /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15427
|
+
return /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14827
15428
|
}
|
|
14828
15429
|
}, {
|
|
14829
15430
|
dataIndex: 'isGift',
|
|
@@ -14842,7 +15443,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14842
15443
|
label: '否',
|
|
14843
15444
|
value: 0
|
|
14844
15445
|
}]
|
|
14845
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15446
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14846
15447
|
}
|
|
14847
15448
|
}, {
|
|
14848
15449
|
dataIndex: 'skuNote',
|
|
@@ -14962,7 +15563,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
14962
15563
|
label: '否',
|
|
14963
15564
|
value: 0
|
|
14964
15565
|
}]
|
|
14965
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15566
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
14966
15567
|
}
|
|
14967
15568
|
}].map(function (item) {
|
|
14968
15569
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15086,7 +15687,7 @@ var getColumns$4 = function getColumns(_ref) {
|
|
|
15086
15687
|
label: '否',
|
|
15087
15688
|
value: 0
|
|
15088
15689
|
}]
|
|
15089
|
-
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$
|
|
15690
|
+
}) : /*#__PURE__*/React.createElement("span", null, getYesOrNo$2(val));
|
|
15090
15691
|
}
|
|
15091
15692
|
}].map(function (item) {
|
|
15092
15693
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -15208,7 +15809,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15208
15809
|
ellipsis: true,
|
|
15209
15810
|
align: 'center',
|
|
15210
15811
|
render: function render(val, record, index) {
|
|
15211
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
15812
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15212
15813
|
}
|
|
15213
15814
|
}, {
|
|
15214
15815
|
dataIndex: 'batchId',
|
|
@@ -15484,7 +16085,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15484
16085
|
dataIndex: 'saleAmount',
|
|
15485
16086
|
title: '总金额',
|
|
15486
16087
|
render: function render(val, record) {
|
|
15487
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16088
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15488
16089
|
}
|
|
15489
16090
|
}, {
|
|
15490
16091
|
dataIndex: 'batchId',
|
|
@@ -15593,7 +16194,7 @@ var getColumns$5 = function getColumns() {
|
|
|
15593
16194
|
dataIndex: 'saleAmount',
|
|
15594
16195
|
title: '总金额',
|
|
15595
16196
|
render: function render(val, record) {
|
|
15596
|
-
return (record.qty || 0) * (+record.salePrice || 0);
|
|
16197
|
+
return ((record.qty || 0) * (+record.salePrice || 0)).toFixed(2);
|
|
15597
16198
|
}
|
|
15598
16199
|
}, {
|
|
15599
16200
|
dataIndex: 'isGift',
|
|
@@ -15632,20 +16233,253 @@ var getColumns$5 = function getColumns() {
|
|
|
15632
16233
|
};
|
|
15633
16234
|
};
|
|
15634
16235
|
|
|
16236
|
+
function toNum$2(value) {
|
|
16237
|
+
if (typeof value === 'string') {
|
|
16238
|
+
return value ? +value : void 0;
|
|
16239
|
+
}
|
|
16240
|
+
if (typeof value === 'number') {
|
|
16241
|
+
return value;
|
|
16242
|
+
}
|
|
16243
|
+
return void 0;
|
|
16244
|
+
}
|
|
15635
16245
|
var getColumns$6 = function getColumns(_ref) {
|
|
15636
16246
|
var _ref$text = _ref.text,
|
|
15637
|
-
text = _ref$text === void 0 ? '' : _ref$text,
|
|
15638
16247
|
disabled = _ref.disabled,
|
|
15639
16248
|
updateHandle = _ref.updateHandle;
|
|
15640
16249
|
return {
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15645
|
-
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
16250
|
+
KM_GOODS: [{
|
|
16251
|
+
dataIndex: 'skuPropertiesName',
|
|
16252
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16253
|
+
width: 250
|
|
16254
|
+
}, {
|
|
16255
|
+
dataIndex: 'sysTitle',
|
|
16256
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16257
|
+
width: 150
|
|
16258
|
+
}, {
|
|
16259
|
+
dataIndex: 'title',
|
|
16260
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16261
|
+
width: 150
|
|
16262
|
+
}, {
|
|
16263
|
+
dataIndex: 'shortTitle',
|
|
16264
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16265
|
+
width: 150
|
|
16266
|
+
}, {
|
|
16267
|
+
dataIndex: 'sysOuterId',
|
|
16268
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16269
|
+
width: 150
|
|
16270
|
+
}, {
|
|
16271
|
+
dataIndex: 'skuSysId',
|
|
16272
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16273
|
+
width: 150
|
|
16274
|
+
}, {
|
|
16275
|
+
dataIndex: 'skuId',
|
|
16276
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16277
|
+
width: 170
|
|
16278
|
+
}, {
|
|
16279
|
+
dataIndex: 'itemSysId',
|
|
16280
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16281
|
+
width: 150
|
|
16282
|
+
}, {
|
|
16283
|
+
dataIndex: 'sysPicPath',
|
|
16284
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16285
|
+
width: 100,
|
|
16286
|
+
render: function render(val) {
|
|
16287
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
16288
|
+
width: 60,
|
|
16289
|
+
src: val
|
|
16290
|
+
});
|
|
16291
|
+
}
|
|
16292
|
+
}, {
|
|
16293
|
+
dataIndex: 'num',
|
|
16294
|
+
title: "\u6570\u91CF",
|
|
16295
|
+
width: 100,
|
|
16296
|
+
render: function render(val, record, index) {
|
|
16297
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16298
|
+
style: {
|
|
16299
|
+
width: 70
|
|
16300
|
+
},
|
|
16301
|
+
value: val,
|
|
16302
|
+
min: 1,
|
|
16303
|
+
precision: 0,
|
|
16304
|
+
onChange: function onChange(num) {
|
|
16305
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'num');
|
|
16306
|
+
}
|
|
16307
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16308
|
+
}
|
|
16309
|
+
}, {
|
|
16310
|
+
dataIndex: 'payment',
|
|
16311
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16312
|
+
width: 150,
|
|
16313
|
+
render: function render(val, record, index) {
|
|
16314
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16315
|
+
style: {
|
|
16316
|
+
width: 130
|
|
16317
|
+
},
|
|
16318
|
+
value: val,
|
|
16319
|
+
min: 0,
|
|
16320
|
+
precision: 2,
|
|
16321
|
+
onChange: function onChange(num) {
|
|
16322
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16323
|
+
}
|
|
16324
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16325
|
+
}
|
|
16326
|
+
}, {
|
|
16327
|
+
dataIndex: 'price',
|
|
16328
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16329
|
+
width: 150,
|
|
16330
|
+
render: function render(val) {
|
|
16331
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16332
|
+
}
|
|
16333
|
+
}, {
|
|
16334
|
+
dataIndex: 'type',
|
|
16335
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16336
|
+
width: 150
|
|
16337
|
+
}].map(function (item) {
|
|
16338
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16339
|
+
align: 'center',
|
|
16340
|
+
ellipsis: true
|
|
16341
|
+
});
|
|
16342
|
+
}),
|
|
16343
|
+
KM_REISSUE_GOODS: [{
|
|
16344
|
+
dataIndex: 'skuPropertiesName',
|
|
16345
|
+
title: "\u89C4\u683C\u540D\u79F0",
|
|
16346
|
+
width: 250
|
|
16347
|
+
}, {
|
|
16348
|
+
dataIndex: 'sysTitle',
|
|
16349
|
+
title: "\u7CFB\u7EDF\u5546\u54C1\u540D\u79F0",
|
|
16350
|
+
width: 150
|
|
16351
|
+
}, {
|
|
16352
|
+
dataIndex: 'shortTitle',
|
|
16353
|
+
title: "\u5546\u54C1\u7B80\u79F0",
|
|
16354
|
+
width: 150
|
|
16355
|
+
}, {
|
|
16356
|
+
dataIndex: 'title',
|
|
16357
|
+
title: "\u5E73\u53F0\u5546\u54C1\u540D\u79F0",
|
|
16358
|
+
width: 150
|
|
16359
|
+
}, {
|
|
16360
|
+
dataIndex: 'sysOuterId',
|
|
16361
|
+
title: "\u7CFB\u7EDF\u5546\u5BB6\u7F16\u7801",
|
|
16362
|
+
width: 150
|
|
16363
|
+
}, {
|
|
16364
|
+
dataIndex: 'itemSysId',
|
|
16365
|
+
title: "\u7CFB\u7EDF\u5546\u54C1ID",
|
|
16366
|
+
width: 150
|
|
16367
|
+
}, {
|
|
16368
|
+
dataIndex: 'skuSysId',
|
|
16369
|
+
title: "\u7CFB\u7EDF\u89C4\u683CID",
|
|
16370
|
+
width: 150
|
|
16371
|
+
}, {
|
|
16372
|
+
dataIndex: 'skuId',
|
|
16373
|
+
title: "\u5E73\u53F0\u89C4\u683C\u7F16\u53F7",
|
|
16374
|
+
width: 170
|
|
16375
|
+
}, {
|
|
16376
|
+
dataIndex: 'realNum',
|
|
16377
|
+
title: "\u5B9E\u9645\u8865\u53D1\u6570\u91CF",
|
|
16378
|
+
width: 100,
|
|
16379
|
+
validator: function validator(_rule, value) {
|
|
16380
|
+
var title = '';
|
|
16381
|
+
if (((value === null || value === void 0 ? void 0 : value.kmReissueGoods) || []).some(function (goods) {
|
|
16382
|
+
var realNum = toNum$2(goods === null || goods === void 0 ? void 0 : goods.realNum);
|
|
16383
|
+
var res = typeof realNum === 'number' ? realNum < 1 : true;
|
|
16384
|
+
if (res) {
|
|
16385
|
+
title = (goods === null || goods === void 0 ? void 0 : goods.goodName) ? "[".concat(goods === null || goods === void 0 ? void 0 : goods.goodName, "]") : '';
|
|
16386
|
+
}
|
|
16387
|
+
return res;
|
|
16388
|
+
})) {
|
|
16389
|
+
return Promise.reject("".concat(title, "\u5B9E\u9645\u8865\u53D1\u6570\u91CF\u5FC5\u987B\u5927\u4E8E0"));
|
|
16390
|
+
}
|
|
16391
|
+
},
|
|
16392
|
+
render: function render(val, record, index) {
|
|
16393
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16394
|
+
style: {
|
|
16395
|
+
width: 70
|
|
16396
|
+
},
|
|
16397
|
+
value: val,
|
|
16398
|
+
min: 1,
|
|
16399
|
+
precision: 0,
|
|
16400
|
+
onChange: function onChange(num) {
|
|
16401
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'realNum');
|
|
16402
|
+
}
|
|
16403
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16404
|
+
}
|
|
16405
|
+
}, {
|
|
16406
|
+
dataIndex: 'desiredNum',
|
|
16407
|
+
title: "\u5E94\u8865\u53D1\u6570\u91CF",
|
|
16408
|
+
width: 100,
|
|
16409
|
+
render: function render(val, record, index) {
|
|
16410
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16411
|
+
style: {
|
|
16412
|
+
width: 70
|
|
16413
|
+
},
|
|
16414
|
+
value: val,
|
|
16415
|
+
min: 1,
|
|
16416
|
+
precision: 0,
|
|
16417
|
+
onChange: function onChange(num) {
|
|
16418
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'desiredNum');
|
|
16419
|
+
}
|
|
16420
|
+
}) : /*#__PURE__*/React.createElement("span", null, val);
|
|
16421
|
+
}
|
|
16422
|
+
}, {
|
|
16423
|
+
dataIndex: 'price',
|
|
16424
|
+
title: "\u5546\u54C1\u9500\u552E\u4EF7",
|
|
16425
|
+
width: 150,
|
|
16426
|
+
render: function render(val) {
|
|
16427
|
+
return val || val === 0 ? Number(val).toFixed(2) : '';
|
|
16428
|
+
}
|
|
16429
|
+
}, {
|
|
16430
|
+
dataIndex: 'payment',
|
|
16431
|
+
title: "\u5B9E\u4ED8\u91D1\u989D",
|
|
16432
|
+
width: 150,
|
|
16433
|
+
render: function render(val, record, index) {
|
|
16434
|
+
return record.canEdit && !disabled ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
16435
|
+
style: {
|
|
16436
|
+
width: 130
|
|
16437
|
+
},
|
|
16438
|
+
value: val,
|
|
16439
|
+
min: 0,
|
|
16440
|
+
precision: 2,
|
|
16441
|
+
onChange: function onChange(num) {
|
|
16442
|
+
return updateHandle === null || updateHandle === void 0 ? void 0 : updateHandle(num, index, 'payment');
|
|
16443
|
+
}
|
|
16444
|
+
}) : /*#__PURE__*/React.createElement("span", null, val || val === 0 ? Number(val).toFixed(2) : '');
|
|
16445
|
+
}
|
|
16446
|
+
}, {
|
|
16447
|
+
dataIndex: 'type',
|
|
16448
|
+
title: "\u5546\u54C1\u7C7B\u578B",
|
|
16449
|
+
width: 150
|
|
16450
|
+
}, {
|
|
16451
|
+
dataIndex: 'sysPicPath',
|
|
16452
|
+
title: "\u5546\u54C1\u56FE\u7247",
|
|
16453
|
+
width: 100,
|
|
16454
|
+
render: function render(val) {
|
|
16455
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
16456
|
+
width: 60,
|
|
16457
|
+
src: val
|
|
16458
|
+
});
|
|
16459
|
+
}
|
|
16460
|
+
}].map(function (item) {
|
|
16461
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16462
|
+
align: 'center',
|
|
16463
|
+
ellipsis: true
|
|
16464
|
+
});
|
|
16465
|
+
})
|
|
16466
|
+
};
|
|
16467
|
+
};
|
|
16468
|
+
|
|
16469
|
+
var getColumns$7 = function getColumns(_ref) {
|
|
16470
|
+
var _ref$text = _ref.text,
|
|
16471
|
+
text = _ref$text === void 0 ? '' : _ref$text,
|
|
16472
|
+
disabled = _ref.disabled,
|
|
16473
|
+
updateHandle = _ref.updateHandle;
|
|
16474
|
+
return {
|
|
16475
|
+
//bs商品信息
|
|
16476
|
+
default: [{
|
|
16477
|
+
dataIndex: 'mark',
|
|
16478
|
+
title: "\u5546\u54C1\u6807\u8BB0",
|
|
16479
|
+
align: 'center',
|
|
16480
|
+
ellipsis: true,
|
|
16481
|
+
width: 70,
|
|
16482
|
+
render: function render(val, record, index) {
|
|
15649
16483
|
return /*#__PURE__*/React.createElement(Select, {
|
|
15650
16484
|
options: [{
|
|
15651
16485
|
label: '是',
|
|
@@ -15745,7 +16579,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15745
16579
|
disabled = _ref.disabled,
|
|
15746
16580
|
updateHandle = _ref.updateHandle,
|
|
15747
16581
|
updateDataHandle = _ref.updateDataHandle;
|
|
15748
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16582
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
15749
16583
|
text: text,
|
|
15750
16584
|
disabled: disabled,
|
|
15751
16585
|
updateHandle: updateHandle
|
|
@@ -15770,8 +16604,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
15770
16604
|
text: text,
|
|
15771
16605
|
disabled: disabled,
|
|
15772
16606
|
updateHandle: updateHandle
|
|
16607
|
+
})), getColumns$6({
|
|
16608
|
+
text: text,
|
|
16609
|
+
disabled: disabled,
|
|
16610
|
+
updateHandle: updateHandle
|
|
15773
16611
|
})), {}, {
|
|
15774
|
-
default: getColumns$
|
|
16612
|
+
default: getColumns$7({
|
|
15775
16613
|
text: text,
|
|
15776
16614
|
disabled: disabled,
|
|
15777
16615
|
updateHandle: updateHandle
|
|
@@ -15923,6 +16761,231 @@ function HoverTableRowDeleteIcon(_ref) {
|
|
|
15923
16761
|
})));
|
|
15924
16762
|
}
|
|
15925
16763
|
|
|
16764
|
+
var isErpType = {
|
|
16765
|
+
isWdt: function isWdt(type) {
|
|
16766
|
+
return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
|
|
16767
|
+
},
|
|
16768
|
+
isBsE3: function isBsE3(type) {
|
|
16769
|
+
return ['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type);
|
|
16770
|
+
},
|
|
16771
|
+
isGy: function isGy(type) {
|
|
16772
|
+
return ['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type);
|
|
16773
|
+
},
|
|
16774
|
+
isJst: function isJst(type) {
|
|
16775
|
+
return ['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type);
|
|
16776
|
+
},
|
|
16777
|
+
isKm: function isKm(type) {
|
|
16778
|
+
return ['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type);
|
|
16779
|
+
}
|
|
16780
|
+
};
|
|
16781
|
+
var processGoods = function processGoods(_ref) {
|
|
16782
|
+
var list = _ref.list,
|
|
16783
|
+
type = _ref.type,
|
|
16784
|
+
canUpdateNumber = _ref.canUpdateNumber;
|
|
16785
|
+
var newList = [];
|
|
16786
|
+
// 根据商品类型处理数据
|
|
16787
|
+
if (isErpType.isWdt(type)) {
|
|
16788
|
+
newList = processWdtGoods({
|
|
16789
|
+
list: list,
|
|
16790
|
+
type: type,
|
|
16791
|
+
canUpdateNumber: canUpdateNumber
|
|
16792
|
+
});
|
|
16793
|
+
} else if (isErpType.isBsE3(type)) {
|
|
16794
|
+
newList = processBsE3Goods({
|
|
16795
|
+
list: list,
|
|
16796
|
+
type: type,
|
|
16797
|
+
canUpdateNumber: canUpdateNumber
|
|
16798
|
+
});
|
|
16799
|
+
} else if (isErpType.isGy(type)) {
|
|
16800
|
+
newList = processGyGoods({
|
|
16801
|
+
list: list,
|
|
16802
|
+
type: type,
|
|
16803
|
+
canUpdateNumber: canUpdateNumber
|
|
16804
|
+
});
|
|
16805
|
+
} else if (isErpType.isJst(type)) {
|
|
16806
|
+
newList = processJstGoods({
|
|
16807
|
+
list: list,
|
|
16808
|
+
type: type,
|
|
16809
|
+
canUpdateNumber: canUpdateNumber
|
|
16810
|
+
});
|
|
16811
|
+
} else if (isErpType.isKm(type)) {
|
|
16812
|
+
newList = processKmGoods({
|
|
16813
|
+
list: list,
|
|
16814
|
+
type: type,
|
|
16815
|
+
canUpdateNumber: canUpdateNumber
|
|
16816
|
+
});
|
|
16817
|
+
} else {
|
|
16818
|
+
newList = processDefaultGoods({
|
|
16819
|
+
list: list,
|
|
16820
|
+
type: type,
|
|
16821
|
+
canUpdateNumber: canUpdateNumber
|
|
16822
|
+
});
|
|
16823
|
+
}
|
|
16824
|
+
return newList;
|
|
16825
|
+
};
|
|
16826
|
+
// 处理不同类型的商品数据
|
|
16827
|
+
var processWdtGoods = function processWdtGoods(_ref2) {
|
|
16828
|
+
var list = _ref2.list,
|
|
16829
|
+
type = _ref2.type,
|
|
16830
|
+
canUpdateNumber = _ref2.canUpdateNumber;
|
|
16831
|
+
return list.map(function (item) {
|
|
16832
|
+
var processedItem = _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16833
|
+
uuid: uuid(),
|
|
16834
|
+
canDelete: true,
|
|
16835
|
+
num: 1,
|
|
16836
|
+
orderPrice: 0,
|
|
16837
|
+
sharePrice: 0,
|
|
16838
|
+
canUpdateNumber: canUpdateNumber
|
|
16839
|
+
});
|
|
16840
|
+
// 特殊处理换货商品
|
|
16841
|
+
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16842
|
+
processedItem.price = item.retailPrice;
|
|
16843
|
+
processedItem.type = '1';
|
|
16844
|
+
}
|
|
16845
|
+
return processedItem;
|
|
16846
|
+
});
|
|
16847
|
+
};
|
|
16848
|
+
var processBsE3Goods = function processBsE3Goods(_ref3) {
|
|
16849
|
+
var list = _ref3.list,
|
|
16850
|
+
canUpdateNumber = _ref3.canUpdateNumber;
|
|
16851
|
+
return list.map(function (item) {
|
|
16852
|
+
var specNo = item.specNo,
|
|
16853
|
+
specId = item.specId,
|
|
16854
|
+
goodName = item.goodName,
|
|
16855
|
+
goodShortName = item.goodShortName,
|
|
16856
|
+
goodPicUrl = item.goodPicUrl,
|
|
16857
|
+
goodNo = item.goodNo,
|
|
16858
|
+
goodId = item.goodId,
|
|
16859
|
+
retailPrice = item.retailPrice;
|
|
16860
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16861
|
+
sku: specNo,
|
|
16862
|
+
skuId: specId,
|
|
16863
|
+
goodsName: goodName,
|
|
16864
|
+
goodsShortName: goodShortName,
|
|
16865
|
+
picPath: goodPicUrl,
|
|
16866
|
+
goodsSn: goodNo,
|
|
16867
|
+
goodsId: goodId,
|
|
16868
|
+
goodsPrice: retailPrice,
|
|
16869
|
+
shopPrice: retailPrice,
|
|
16870
|
+
sharePayment: '',
|
|
16871
|
+
sharePrice: '',
|
|
16872
|
+
payment: '',
|
|
16873
|
+
tcSku: '',
|
|
16874
|
+
tcGoodsNumber: '',
|
|
16875
|
+
taoCanSingleSl: '',
|
|
16876
|
+
isGift: '',
|
|
16877
|
+
uuid: uuid(),
|
|
16878
|
+
canDelete: true,
|
|
16879
|
+
canEdit: true,
|
|
16880
|
+
goodsNumber: 1,
|
|
16881
|
+
canUpdateNumber: canUpdateNumber
|
|
16882
|
+
});
|
|
16883
|
+
});
|
|
16884
|
+
};
|
|
16885
|
+
var processGyGoods = function processGyGoods(_ref4) {
|
|
16886
|
+
var list = _ref4.list;
|
|
16887
|
+
return list.map(function (item) {
|
|
16888
|
+
var goodName = item.goodName,
|
|
16889
|
+
goodShortName = item.goodShortName,
|
|
16890
|
+
goodNo = item.goodNo,
|
|
16891
|
+
specName = item.specName,
|
|
16892
|
+
specNo = item.specNo,
|
|
16893
|
+
retailPrice = item.retailPrice;
|
|
16894
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16895
|
+
uuid: uuid(),
|
|
16896
|
+
canDelete: true,
|
|
16897
|
+
canEdit: true,
|
|
16898
|
+
qty: 1,
|
|
16899
|
+
goodName: goodName,
|
|
16900
|
+
goodShortName: goodShortName,
|
|
16901
|
+
goodNo: goodNo,
|
|
16902
|
+
specName: specName,
|
|
16903
|
+
specNo: specNo,
|
|
16904
|
+
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16905
|
+
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16906
|
+
});
|
|
16907
|
+
});
|
|
16908
|
+
};
|
|
16909
|
+
var processJstGoods = function processJstGoods(_ref5) {
|
|
16910
|
+
var list = _ref5.list;
|
|
16911
|
+
return list.map(function (item) {
|
|
16912
|
+
return {
|
|
16913
|
+
name: item.goodName,
|
|
16914
|
+
skuId: item.goodNo,
|
|
16915
|
+
iId: item.styleCode,
|
|
16916
|
+
pic: item.goodPicUrl,
|
|
16917
|
+
propertiesValue: item.propertiesValue,
|
|
16918
|
+
saleBasePrice: item.retailPrice,
|
|
16919
|
+
salePrice: item.retailPrice,
|
|
16920
|
+
remark: '',
|
|
16921
|
+
uuid: uuid(),
|
|
16922
|
+
canDelete: true,
|
|
16923
|
+
canEdit: true,
|
|
16924
|
+
qty: 1
|
|
16925
|
+
};
|
|
16926
|
+
});
|
|
16927
|
+
};
|
|
16928
|
+
var processKmGoods = function processKmGoods(_ref6) {
|
|
16929
|
+
var list = _ref6.list,
|
|
16930
|
+
type = _ref6.type;
|
|
16931
|
+
var initParamsMap = {
|
|
16932
|
+
KM_GOODS: {
|
|
16933
|
+
num: 1
|
|
16934
|
+
},
|
|
16935
|
+
KM_REISSUE_GOODS: {
|
|
16936
|
+
realNum: 1,
|
|
16937
|
+
desiredNum: 1
|
|
16938
|
+
}
|
|
16939
|
+
};
|
|
16940
|
+
return list.map(function (item) {
|
|
16941
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16942
|
+
skuPropertiesName: item.specName,
|
|
16943
|
+
sysTitle: item.goodName,
|
|
16944
|
+
title: null,
|
|
16945
|
+
shortTitle: item.goodShortName,
|
|
16946
|
+
sysOuterId: item.goodNo,
|
|
16947
|
+
outerId: item.goodNo,
|
|
16948
|
+
skuSysId: item.specId,
|
|
16949
|
+
itemSysId: item.goodId,
|
|
16950
|
+
sysPicPath: item.goodPicUrl,
|
|
16951
|
+
payment: null,
|
|
16952
|
+
price: item.retailPrice,
|
|
16953
|
+
type: null,
|
|
16954
|
+
uuid: uuid(),
|
|
16955
|
+
canDelete: true,
|
|
16956
|
+
canEdit: true
|
|
16957
|
+
}, initParamsMap[type] || {});
|
|
16958
|
+
});
|
|
16959
|
+
};
|
|
16960
|
+
var processDefaultGoods = function processDefaultGoods(_ref7) {
|
|
16961
|
+
var list = _ref7.list,
|
|
16962
|
+
canUpdateNumber = _ref7.canUpdateNumber;
|
|
16963
|
+
return list.map(function (item) {
|
|
16964
|
+
var goodsId = item.goodsId,
|
|
16965
|
+
name = item.name,
|
|
16966
|
+
code = item.code,
|
|
16967
|
+
skuCode = item.skuCode,
|
|
16968
|
+
marketPrice = item.marketPrice,
|
|
16969
|
+
skuName = item.skuName;
|
|
16970
|
+
return {
|
|
16971
|
+
id: goodsId,
|
|
16972
|
+
mark: '是',
|
|
16973
|
+
pic: '',
|
|
16974
|
+
skuName: skuName,
|
|
16975
|
+
name: name,
|
|
16976
|
+
code: code,
|
|
16977
|
+
sku: skuCode,
|
|
16978
|
+
money: marketPrice || 0,
|
|
16979
|
+
share: marketPrice || 0,
|
|
16980
|
+
number: 1,
|
|
16981
|
+
type: '',
|
|
16982
|
+
uuid: uuid(),
|
|
16983
|
+
canDelete: true,
|
|
16984
|
+
canUpdateNumber: canUpdateNumber
|
|
16985
|
+
};
|
|
16986
|
+
});
|
|
16987
|
+
};
|
|
16988
|
+
|
|
15926
16989
|
var GoodsModalMap = {
|
|
15927
16990
|
WDT_REISSUE_GOODS: WdtGoodsModal,
|
|
15928
16991
|
WDT_GOODS: WdtGoodsModal,
|
|
@@ -15937,6 +17000,8 @@ var GoodsModalMap = {
|
|
|
15937
17000
|
JST_REISSUE_GOODS: JstGoodsModal,
|
|
15938
17001
|
JST_RETURN_GOODS: JstGoodsModal,
|
|
15939
17002
|
JST_EXCHANGE_GOODS: JstGoodsModal,
|
|
17003
|
+
KM_GOODS: KmGoodsModal,
|
|
17004
|
+
KM_REISSUE_GOODS: KmGoodsModal,
|
|
15940
17005
|
OTHER_GOODS: GoodsModal$2
|
|
15941
17006
|
};
|
|
15942
17007
|
var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
@@ -15970,7 +17035,7 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15970
17035
|
return item === null || item === void 0 ? void 0 : item[uniqueKey];
|
|
15971
17036
|
}));
|
|
15972
17037
|
var handleChangeSelectedKeys = function handleChangeSelectedKeys(keys) {
|
|
15973
|
-
console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
17038
|
+
// console.log('handleChangeSelectedKeys', keys, unCurrentTradeOriginGoods);
|
|
15974
17039
|
onChangeSelectedKeys(keys.concat(unCurrentTradeOriginGoods));
|
|
15975
17040
|
};
|
|
15976
17041
|
var rowSelection = {
|
|
@@ -15999,6 +17064,9 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
15999
17064
|
};
|
|
16000
17065
|
var getButtonText = function getButtonText() {
|
|
16001
17066
|
var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
17067
|
+
if (['KM_GOODS', 'KM_REISSUE_GOODS'].includes(type)) {
|
|
17068
|
+
return '选择快麦ERP商品';
|
|
17069
|
+
}
|
|
16002
17070
|
if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16003
17071
|
return '选择百胜ERP商品';
|
|
16004
17072
|
}
|
|
@@ -16142,6 +17210,8 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16142
17210
|
case 'JST_RETURN_GOODS':
|
|
16143
17211
|
case 'GY_REISSUE_GOODS':
|
|
16144
17212
|
case 'GY_RETURN_GOODS':
|
|
17213
|
+
case 'KM_GOODS':
|
|
17214
|
+
case 'KM_REISSUE_GOODS':
|
|
16145
17215
|
{
|
|
16146
17216
|
columns = getColumnsMap$1({
|
|
16147
17217
|
text: text,
|
|
@@ -16259,120 +17329,11 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
16259
17329
|
}].concat(_toConsumableArray(columns));
|
|
16260
17330
|
}, []);
|
|
16261
17331
|
var onSubmit = function onSubmit(list) {
|
|
16262
|
-
var newList =
|
|
16263
|
-
|
|
16264
|
-
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
item.num = 1;
|
|
16268
|
-
item.orderPrice = 0;
|
|
16269
|
-
item.sharePrice = 0;
|
|
16270
|
-
item.canUpdateNumber = canUpdateNumber;
|
|
16271
|
-
if (type === 'WDT_EXCHANGE_GOODS') {
|
|
16272
|
-
item.price = item.retailPrice;
|
|
16273
|
-
item.type = '1';
|
|
16274
|
-
}
|
|
16275
|
-
return item;
|
|
16276
|
-
});
|
|
16277
|
-
} else if (['BS_E3_GOODS', 'BS_E3_REISSUE_GOODS', 'BS_E3_EXCHANGE_GOODS'].includes(type)) {
|
|
16278
|
-
newList = list.map(function (item) {
|
|
16279
|
-
var specNo = item.specNo,
|
|
16280
|
-
specId = item.specId,
|
|
16281
|
-
goodName = item.goodName,
|
|
16282
|
-
goodShortName = item.goodShortName,
|
|
16283
|
-
goodPicUrl = item.goodPicUrl,
|
|
16284
|
-
goodNo = item.goodNo,
|
|
16285
|
-
goodId = item.goodId,
|
|
16286
|
-
retailPrice = item.retailPrice;
|
|
16287
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16288
|
-
sku: specNo,
|
|
16289
|
-
skuId: specId,
|
|
16290
|
-
goodsName: goodName,
|
|
16291
|
-
goodsShortName: goodShortName,
|
|
16292
|
-
picPath: goodPicUrl,
|
|
16293
|
-
goodsSn: goodNo,
|
|
16294
|
-
goodsId: goodId,
|
|
16295
|
-
goodsPrice: retailPrice,
|
|
16296
|
-
shopPrice: retailPrice,
|
|
16297
|
-
sharePayment: '',
|
|
16298
|
-
sharePrice: '',
|
|
16299
|
-
payment: '',
|
|
16300
|
-
tcSku: '',
|
|
16301
|
-
tcGoodsNumber: '',
|
|
16302
|
-
taoCanSingleSl: '',
|
|
16303
|
-
isGift: '',
|
|
16304
|
-
uuid: uuid(),
|
|
16305
|
-
canDelete: true,
|
|
16306
|
-
canEdit: true,
|
|
16307
|
-
goodsNumber: 1,
|
|
16308
|
-
canUpdateNumber: canUpdateNumber
|
|
16309
|
-
});
|
|
16310
|
-
});
|
|
16311
|
-
} else if (['GY_GOODS', 'GY_REISSUE_GOODS', 'GY_RETURN_GOODS'].includes(type)) {
|
|
16312
|
-
newList = list.map(function (item) {
|
|
16313
|
-
var goodName = item.goodName,
|
|
16314
|
-
goodShortName = item.goodShortName,
|
|
16315
|
-
goodNo = item.goodNo,
|
|
16316
|
-
specName = item.specName,
|
|
16317
|
-
specNo = item.specNo,
|
|
16318
|
-
retailPrice = item.retailPrice;
|
|
16319
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16320
|
-
uuid: uuid(),
|
|
16321
|
-
canDelete: true,
|
|
16322
|
-
canEdit: true,
|
|
16323
|
-
qty: 1,
|
|
16324
|
-
goodName: goodName,
|
|
16325
|
-
goodShortName: goodShortName,
|
|
16326
|
-
goodNo: goodNo,
|
|
16327
|
-
specName: specName,
|
|
16328
|
-
specNo: specNo,
|
|
16329
|
-
originPrice: !isNull(retailPrice) ? Number(retailPrice) : null,
|
|
16330
|
-
originAmount: !isNull(retailPrice) ? Number(retailPrice) : null
|
|
16331
|
-
});
|
|
16332
|
-
});
|
|
16333
|
-
} else if (['JST_GOODS', 'JST_REISSUE_GOODS', 'JST_RETURN_GOODS', 'JST_EXCHANGE_GOODS'].includes(type)) {
|
|
16334
|
-
newList = list.map(function (item) {
|
|
16335
|
-
return {
|
|
16336
|
-
name: item.goodName,
|
|
16337
|
-
skuId: item.goodNo,
|
|
16338
|
-
iId: item.styleCode,
|
|
16339
|
-
pic: item.goodPicUrl,
|
|
16340
|
-
propertiesValue: item.propertiesValue,
|
|
16341
|
-
saleBasePrice: item.retailPrice,
|
|
16342
|
-
salePrice: item.retailPrice,
|
|
16343
|
-
remark: '',
|
|
16344
|
-
uuid: uuid(),
|
|
16345
|
-
canDelete: true,
|
|
16346
|
-
canEdit: true,
|
|
16347
|
-
qty: 1
|
|
16348
|
-
};
|
|
16349
|
-
});
|
|
16350
|
-
} else {
|
|
16351
|
-
newList = list.map(function (item) {
|
|
16352
|
-
var goodsId = item.goodsId,
|
|
16353
|
-
name = item.name,
|
|
16354
|
-
code = item.code,
|
|
16355
|
-
skuCode = item.skuCode,
|
|
16356
|
-
marketPrice = item.marketPrice,
|
|
16357
|
-
skuName = item.skuName;
|
|
16358
|
-
return {
|
|
16359
|
-
id: goodsId,
|
|
16360
|
-
mark: '是',
|
|
16361
|
-
pic: '',
|
|
16362
|
-
skuName: skuName,
|
|
16363
|
-
name: name,
|
|
16364
|
-
code: code,
|
|
16365
|
-
sku: skuCode,
|
|
16366
|
-
money: marketPrice || 0,
|
|
16367
|
-
share: marketPrice || 0,
|
|
16368
|
-
number: 1,
|
|
16369
|
-
type: '',
|
|
16370
|
-
uuid: uuid(),
|
|
16371
|
-
canDelete: true,
|
|
16372
|
-
canUpdateNumber: canUpdateNumber
|
|
16373
|
-
};
|
|
16374
|
-
});
|
|
16375
|
-
}
|
|
17332
|
+
var newList = processGoods({
|
|
17333
|
+
list: list,
|
|
17334
|
+
canUpdateNumber: canUpdateNumber,
|
|
17335
|
+
type: type
|
|
17336
|
+
});
|
|
16376
17337
|
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), _toConsumableArray(newList)));
|
|
16377
17338
|
};
|
|
16378
17339
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
@@ -17086,10 +18047,12 @@ var getWdtOrderListSingleton = function getWdtOrderListSingleton(orderNo) {
|
|
|
17086
18047
|
var _data$data, _data$data$trades;
|
|
17087
18048
|
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$trades = _data$data.trades) === null || _data$data$trades === void 0 ? void 0 : _data$data$trades.length) {
|
|
17088
18049
|
data.data.trades = filterWdtOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
18050
|
+
var _tradeStatusMap$data$;
|
|
17089
18051
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17090
18052
|
billNo: item.tradeNo,
|
|
17091
18053
|
billType: WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
17092
|
-
billTag: item.tagName
|
|
18054
|
+
billTag: item.tagName,
|
|
18055
|
+
tradeStatusValue: tradeStatusMap === null || tradeStatusMap === void 0 ? void 0 : (_tradeStatusMap$data$ = tradeStatusMap[data.data.version]) === null || _tradeStatusMap$data$ === void 0 ? void 0 : _tradeStatusMap$data$[item.tradeStatus]
|
|
17093
18056
|
});
|
|
17094
18057
|
});
|
|
17095
18058
|
}
|
|
@@ -17132,6 +18095,10 @@ var getBsE3OrderListSingleton = function getBsE3OrderListSingleton(orderNo) {
|
|
|
17132
18095
|
data.data.orderList = filterBsE3Orders(data === null || data === void 0 ? void 0 : data.data, orderNo);
|
|
17133
18096
|
}
|
|
17134
18097
|
resolve(data.data);
|
|
18098
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18099
|
+
setTimeout(function () {
|
|
18100
|
+
singletonMap$1.delete(orderNo);
|
|
18101
|
+
}, 1000 * 10);
|
|
17135
18102
|
} else {
|
|
17136
18103
|
doReject(data);
|
|
17137
18104
|
}
|
|
@@ -17172,6 +18139,7 @@ var getGyOrderListSingleton = function getGyOrderListSingleton(orderNo) {
|
|
|
17172
18139
|
deliveryState: item.deliveryState,
|
|
17173
18140
|
vipCode: item.vipCode,
|
|
17174
18141
|
shopCode: item.shopCode,
|
|
18142
|
+
cancelName: item.cancel ? '是' : '否',
|
|
17175
18143
|
deliveryStateName: GY_DELIVERY_STATE_MAPPING[item.deliveryState]
|
|
17176
18144
|
});
|
|
17177
18145
|
});
|
|
@@ -17209,6 +18177,10 @@ var getJstOrderListSingleton = function getJstOrderListSingleton(orderNo) {
|
|
|
17209
18177
|
orderList: (data === null || data === void 0 ? void 0 : data.data) || []
|
|
17210
18178
|
}, orderNo);
|
|
17211
18179
|
resolve(data.data);
|
|
18180
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18181
|
+
setTimeout(function () {
|
|
18182
|
+
singletonMap$3.delete(orderNo);
|
|
18183
|
+
}, 1000 * 10);
|
|
17212
18184
|
} else {
|
|
17213
18185
|
doReject(data);
|
|
17214
18186
|
}
|
|
@@ -17252,16 +18224,84 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
17252
18224
|
singletonMap$4.delete(orderNo);
|
|
17253
18225
|
reject(err);
|
|
17254
18226
|
};
|
|
17255
|
-
extendRequest('/qy/gdfw/order/
|
|
18227
|
+
extendRequest('/qy/gdfw/order/wlnOrderList', {
|
|
17256
18228
|
method: 'post',
|
|
17257
18229
|
data: {
|
|
17258
|
-
|
|
18230
|
+
billNo: orderNo
|
|
17259
18231
|
}
|
|
17260
18232
|
}).then(function (data) {
|
|
17261
18233
|
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
17262
|
-
|
|
17263
|
-
|
|
17264
|
-
|
|
18234
|
+
resolve(data.data);
|
|
18235
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18236
|
+
setTimeout(function () {
|
|
18237
|
+
singletonMap$4.delete(orderNo);
|
|
18238
|
+
}, 1000 * 10);
|
|
18239
|
+
} else {
|
|
18240
|
+
doReject(data);
|
|
18241
|
+
}
|
|
18242
|
+
}).catch(doReject);
|
|
18243
|
+
});
|
|
18244
|
+
singletonMap$4.set(orderNo, p);
|
|
18245
|
+
}
|
|
18246
|
+
return singletonMap$4.get(orderNo);
|
|
18247
|
+
};
|
|
18248
|
+
var wlnUtils = {
|
|
18249
|
+
getOrderListSingleton: getOrderListSingleton
|
|
18250
|
+
};
|
|
18251
|
+
|
|
18252
|
+
var singletonMap$5 = new Map();
|
|
18253
|
+
var getOrderListSingleton$1 = function getOrderListSingleton(orderNo) {
|
|
18254
|
+
if (!singletonMap$5.has(orderNo)) {
|
|
18255
|
+
var p = new Promise(function (resolve, reject) {
|
|
18256
|
+
var doReject = function doReject(err) {
|
|
18257
|
+
// 清空掉错误的请求记录
|
|
18258
|
+
singletonMap$5.delete(orderNo);
|
|
18259
|
+
reject(err);
|
|
18260
|
+
};
|
|
18261
|
+
extendRequest('/qy/gdfw/order/bsOrderDetail', {
|
|
18262
|
+
method: 'post',
|
|
18263
|
+
data: {
|
|
18264
|
+
billNo: orderNo
|
|
18265
|
+
}
|
|
18266
|
+
}).then(function (data) {
|
|
18267
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
18268
|
+
resolve(data.data);
|
|
18269
|
+
// 延迟10秒清除,保证订单的时效性
|
|
18270
|
+
setTimeout(function () {
|
|
18271
|
+
singletonMap$5.delete(orderNo);
|
|
18272
|
+
}, 1000 * 10);
|
|
18273
|
+
} else {
|
|
18274
|
+
doReject(data);
|
|
18275
|
+
}
|
|
18276
|
+
}).catch(doReject);
|
|
18277
|
+
});
|
|
18278
|
+
singletonMap$5.set(orderNo, p);
|
|
18279
|
+
}
|
|
18280
|
+
return singletonMap$5.get(orderNo);
|
|
18281
|
+
};
|
|
18282
|
+
var bsUtils = {
|
|
18283
|
+
getOrderListSingleton: getOrderListSingleton$1
|
|
18284
|
+
};
|
|
18285
|
+
|
|
18286
|
+
var singletonMap$6 = new Map();
|
|
18287
|
+
var getOrderListSingleton$2 = function getOrderListSingleton(orderNo) {
|
|
18288
|
+
if (!singletonMap$6.has(orderNo)) {
|
|
18289
|
+
var p = new Promise(function (resolve, reject) {
|
|
18290
|
+
var doReject = function doReject(err) {
|
|
18291
|
+
// 清空掉错误的请求记录
|
|
18292
|
+
singletonMap$6.delete(orderNo);
|
|
18293
|
+
reject(err);
|
|
18294
|
+
};
|
|
18295
|
+
extendRequest('/qy/gdfw/order/kmErpOrderDetail', {
|
|
18296
|
+
method: 'post',
|
|
18297
|
+
data: {
|
|
18298
|
+
tid: orderNo
|
|
18299
|
+
}
|
|
18300
|
+
}).then(function (data) {
|
|
18301
|
+
if (data === null || data === void 0 ? void 0 : data.success) {
|
|
18302
|
+
var _data$data, _data$data$orderDetai;
|
|
18303
|
+
if (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$orderDetai = _data$data.orderDetailDtoList) === null || _data$data$orderDetai === void 0 ? void 0 : _data$data$orderDetai.length) {
|
|
18304
|
+
var list = filterKmOrders(data === null || data === void 0 ? void 0 : data.data, orderNo).map(function (item) {
|
|
17265
18305
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
17266
18306
|
billNo: item.sid,
|
|
17267
18307
|
sysStatus: item.sysStatus,
|
|
@@ -17275,22 +18315,22 @@ var getOrderListSingleton = function getOrderListSingleton(orderNo) {
|
|
|
17275
18315
|
}
|
|
17276
18316
|
// 延迟10秒清除,保证订单的时效性
|
|
17277
18317
|
setTimeout(function () {
|
|
17278
|
-
singletonMap$
|
|
18318
|
+
singletonMap$6.delete(orderNo);
|
|
17279
18319
|
}, 1000 * 10);
|
|
17280
18320
|
} else {
|
|
17281
18321
|
doReject(data);
|
|
17282
18322
|
}
|
|
17283
18323
|
}).catch(doReject);
|
|
17284
18324
|
});
|
|
17285
|
-
singletonMap$
|
|
18325
|
+
singletonMap$6.set(orderNo, p);
|
|
17286
18326
|
}
|
|
17287
|
-
return singletonMap$
|
|
18327
|
+
return singletonMap$6.get(orderNo);
|
|
17288
18328
|
};
|
|
17289
18329
|
var kmUtils = {
|
|
17290
|
-
getOrderListSingleton: getOrderListSingleton
|
|
18330
|
+
getOrderListSingleton: getOrderListSingleton$2
|
|
17291
18331
|
};
|
|
17292
18332
|
|
|
17293
|
-
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
18333
|
+
var _excluded$h = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode", "cancel"];
|
|
17294
18334
|
var columnsMap = {
|
|
17295
18335
|
BS_SYSTEM_ORDER: BS_SYSTEM_ORDER_CONFIG.columns,
|
|
17296
18336
|
KM_SYSTEM_ORDER: KM_SYSTEM_ORDER_CONFIG.columns,
|
|
@@ -17332,7 +18372,6 @@ var index$3 = (function (props) {
|
|
|
17332
18372
|
} else if (type === 'BS_E3_SYSTEM_ORDER') {
|
|
17333
18373
|
getBsE3OrderList(value.orderNo);
|
|
17334
18374
|
} else if (type === 'GY_SYSTEM_ORDER') {
|
|
17335
|
-
console.log('触发gy--getGyOrderList--1');
|
|
17336
18375
|
getGyOrderList(value.orderNo);
|
|
17337
18376
|
} else if (type === 'JST_SYSTEM_ORDER') {
|
|
17338
18377
|
getJstOrderList(value.orderNo);
|
|
@@ -17344,22 +18383,11 @@ var index$3 = (function (props) {
|
|
|
17344
18383
|
}, [type]);
|
|
17345
18384
|
var getOrderList = /*#__PURE__*/function () {
|
|
17346
18385
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
17347
|
-
var _yield$request, success, data, _valueRef$current;
|
|
17348
18386
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17349
18387
|
while (1) switch (_context.prev = _context.next) {
|
|
17350
18388
|
case 0:
|
|
17351
|
-
|
|
17352
|
-
|
|
17353
|
-
method: 'post',
|
|
17354
|
-
data: {
|
|
17355
|
-
billNo: orderNo
|
|
17356
|
-
}
|
|
17357
|
-
});
|
|
17358
|
-
case 2:
|
|
17359
|
-
_yield$request = _context.sent;
|
|
17360
|
-
success = _yield$request.success;
|
|
17361
|
-
data = _yield$request.data;
|
|
17362
|
-
if (success) {
|
|
18389
|
+
bsUtils.getOrderListSingleton(orderNo).then(function (data) {
|
|
18390
|
+
var _valueRef$current;
|
|
17363
18391
|
_onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {}, {
|
|
17364
18392
|
orders: (data === null || data === void 0 ? void 0 : data.orders) || [],
|
|
17365
18393
|
showOrderInfo: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
@@ -17373,10 +18401,10 @@ var index$3 = (function (props) {
|
|
|
17373
18401
|
};
|
|
17374
18402
|
})
|
|
17375
18403
|
}));
|
|
17376
|
-
}
|
|
18404
|
+
});
|
|
17377
18405
|
|
|
17378
18406
|
onceRef.current = false;
|
|
17379
|
-
case
|
|
18407
|
+
case 2:
|
|
17380
18408
|
case "end":
|
|
17381
18409
|
return _context.stop();
|
|
17382
18410
|
}
|
|
@@ -17388,22 +18416,11 @@ var index$3 = (function (props) {
|
|
|
17388
18416
|
}();
|
|
17389
18417
|
var getWlnOrderList = /*#__PURE__*/function () {
|
|
17390
18418
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
17391
|
-
var _yield$request2, success, data, _valueRef$current2;
|
|
17392
18419
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
17393
18420
|
while (1) switch (_context2.prev = _context2.next) {
|
|
17394
18421
|
case 0:
|
|
17395
|
-
|
|
17396
|
-
|
|
17397
|
-
method: 'post',
|
|
17398
|
-
data: {
|
|
17399
|
-
billCode: orderNo
|
|
17400
|
-
}
|
|
17401
|
-
});
|
|
17402
|
-
case 2:
|
|
17403
|
-
_yield$request2 = _context2.sent;
|
|
17404
|
-
success = _yield$request2.success;
|
|
17405
|
-
data = _yield$request2.data;
|
|
17406
|
-
if (success) {
|
|
18422
|
+
wlnUtils.getOrderListSingleton(orderNo).then(function (data) {
|
|
18423
|
+
var _valueRef$current2;
|
|
17407
18424
|
_onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current2 = valueRef.current) !== null && _valueRef$current2 !== void 0 ? _valueRef$current2 : {}), {}, {
|
|
17408
18425
|
orders: data === null || data === void 0 ? void 0 : data.orders.map(function (item) {
|
|
17409
18426
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
@@ -17420,9 +18437,9 @@ var index$3 = (function (props) {
|
|
|
17420
18437
|
};
|
|
17421
18438
|
})
|
|
17422
18439
|
}));
|
|
17423
|
-
}
|
|
18440
|
+
});
|
|
17424
18441
|
onceRef.current = false;
|
|
17425
|
-
case
|
|
18442
|
+
case 2:
|
|
17426
18443
|
case "end":
|
|
17427
18444
|
return _context2.stop();
|
|
17428
18445
|
}
|
|
@@ -17446,11 +18463,13 @@ var index$3 = (function (props) {
|
|
|
17446
18463
|
showOrderInfo: trades.map(function (_ref4) {
|
|
17447
18464
|
var billNo = _ref4.billNo,
|
|
17448
18465
|
billType = _ref4.billType,
|
|
17449
|
-
billTag = _ref4.billTag
|
|
18466
|
+
billTag = _ref4.billTag,
|
|
18467
|
+
tradeStatusValue = _ref4.tradeStatusValue;
|
|
17450
18468
|
return {
|
|
17451
18469
|
billNo: billNo,
|
|
17452
18470
|
billType: billType,
|
|
17453
|
-
billTag: billTag
|
|
18471
|
+
billTag: billTag,
|
|
18472
|
+
tradeStatusValue: tradeStatusValue
|
|
17454
18473
|
};
|
|
17455
18474
|
})
|
|
17456
18475
|
}));
|
|
@@ -17564,6 +18583,7 @@ var index$3 = (function (props) {
|
|
|
17564
18583
|
deliveryState = _ref10.deliveryState,
|
|
17565
18584
|
vipCode = _ref10.vipCode,
|
|
17566
18585
|
shopCode = _ref10.shopCode,
|
|
18586
|
+
cancel = _ref10.cancel,
|
|
17567
18587
|
rest = _objectWithoutProperties(_ref10, _excluded$h);
|
|
17568
18588
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
17569
18589
|
billNo: billNo,
|
|
@@ -17571,6 +18591,7 @@ var index$3 = (function (props) {
|
|
|
17571
18591
|
billTag: billTag,
|
|
17572
18592
|
tradeTagName: tradeTagName,
|
|
17573
18593
|
deliveryState: deliveryState,
|
|
18594
|
+
cancelName: cancel ? '是' : '否',
|
|
17574
18595
|
deliveryStateName: GY_DELIVERY_STATE_MAPPING[deliveryState],
|
|
17575
18596
|
vipCode: vipCode,
|
|
17576
18597
|
shopCode: shopCode
|
|
@@ -17760,6 +18781,31 @@ var componentMap$1 = {
|
|
|
17760
18781
|
returnDeleteGood: 'jstReturnDeleteGood',
|
|
17761
18782
|
exchangeDeleteGood: 'jstExchangeDeleteGood'
|
|
17762
18783
|
}
|
|
18784
|
+
},
|
|
18785
|
+
KM_GOODS: {
|
|
18786
|
+
type: 'km',
|
|
18787
|
+
key: 'kmGoods',
|
|
18788
|
+
name: '快麦',
|
|
18789
|
+
orderNo: 'tid',
|
|
18790
|
+
goodDetailOrderNo: 'originalDealCode',
|
|
18791
|
+
eventNameMap: {
|
|
18792
|
+
// pubsub 事件
|
|
18793
|
+
type: 'kmType',
|
|
18794
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
18795
|
+
selectListReturn: 'kmSelectListReturn',
|
|
18796
|
+
selectList: 'kmSelectList',
|
|
18797
|
+
reissueSelectList: 'kmReissueSelectList',
|
|
18798
|
+
reissueSelectListReturn: 'kmReissueSelectListReturn',
|
|
18799
|
+
reissueDeleteGood: 'kmReissueDeleteGood',
|
|
18800
|
+
changeShopCode: 'kmChangeShopCode',
|
|
18801
|
+
reissueType: 'kmReissueType',
|
|
18802
|
+
returnType: 'kmReturnType',
|
|
18803
|
+
returnSelectListReturn: 'kmReturnSelectListReturn',
|
|
18804
|
+
returnSelectList: 'kmReturnSelectList',
|
|
18805
|
+
deleteGood: 'kmDeleteGood',
|
|
18806
|
+
returnDeleteGood: 'kmReturnDeleteGood',
|
|
18807
|
+
exchangeDeleteGood: 'kmExchangeDeleteGood'
|
|
18808
|
+
}
|
|
17763
18809
|
}
|
|
17764
18810
|
};
|
|
17765
18811
|
var CommonGoods = function CommonGoods(props) {
|
|
@@ -17768,7 +18814,7 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17768
18814
|
disabled = props.disabled,
|
|
17769
18815
|
onChange = props.onChange,
|
|
17770
18816
|
compType = props.type;
|
|
17771
|
-
console.log('value?.orders', value
|
|
18817
|
+
// console.log('value?.orders', value?.orders);
|
|
17772
18818
|
// 合并单订单会包含","
|
|
17773
18819
|
var showModeBtn = !['BS_E3_GOODS'].includes(compType) && ((value === null || value === void 0 ? void 0 : value.orders) || []).some(function (order) {
|
|
17774
18820
|
var _order$componentMap$c;
|
|
@@ -17921,7 +18967,9 @@ var CommonGoods = function CommonGoods(props) {
|
|
|
17921
18967
|
var getGoodDetails = function getGoodDetails(_ref2) {
|
|
17922
18968
|
var mode = _ref2.mode;
|
|
17923
18969
|
var updateHandle = componentMap$1[compType].eventNameMap['updateGoodsHandle'];
|
|
17924
|
-
var goodDetails = updateHandle(value.orders || []
|
|
18970
|
+
var goodDetails = updateHandle(value.orders || [], {
|
|
18971
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel
|
|
18972
|
+
});
|
|
17925
18973
|
var orderNo = value.orderNo;
|
|
17926
18974
|
return mode ? goodDetails.filter(function (goodItem) {
|
|
17927
18975
|
var _componentMap$compTyp;
|
|
@@ -17975,7 +19023,8 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
17975
19023
|
_props$reasonList = props.reasonList,
|
|
17976
19024
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
17977
19025
|
disabled = props.disabled,
|
|
17978
|
-
compType = props.type
|
|
19026
|
+
compType = props.type,
|
|
19027
|
+
isSettingConfig = props.isSettingConfig;
|
|
17979
19028
|
var valueRef = useRef({});
|
|
17980
19029
|
useEffect(function () {
|
|
17981
19030
|
var subscription = pubsub.subscribe(componentMap$2[compType].eventNameMap.exchangeCopyGood, function () {
|
|
@@ -18067,7 +19116,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18067
19116
|
var newValue = _objectSpread2({}, value);
|
|
18068
19117
|
newValue[componentMap$2[compType].returnTypeKey] = val;
|
|
18069
19118
|
newValue[componentMap$2[compType].valueKey] = [];
|
|
18070
|
-
if (['2'].includes(val[0])) {
|
|
19119
|
+
if (isSettingConfig || ['2'].includes(val[0])) {
|
|
18071
19120
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18072
19121
|
valueRef.current = newValue;
|
|
18073
19122
|
}
|
|
@@ -18089,7 +19138,7 @@ var CommonReturnGoods = function CommonReturnGoods(props) {
|
|
|
18089
19138
|
style: {
|
|
18090
19139
|
marginBottom: '8px'
|
|
18091
19140
|
},
|
|
18092
|
-
disabled: disabled,
|
|
19141
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18093
19142
|
allowClear: false,
|
|
18094
19143
|
options: reasonList,
|
|
18095
19144
|
value: value === null || value === void 0 ? void 0 : value[componentMap$2[compType].returnTypeKey],
|
|
@@ -18271,7 +19320,7 @@ var CommonExchangeGoods = function CommonExchangeGoods(props) {
|
|
|
18271
19320
|
})));
|
|
18272
19321
|
};
|
|
18273
19322
|
|
|
18274
|
-
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19323
|
+
var _excluded$i = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18275
19324
|
var typeMap$1 = {
|
|
18276
19325
|
WDT_REISSUE_GOODS: {
|
|
18277
19326
|
key: 'wdtReissueGoods',
|
|
@@ -18292,13 +19341,14 @@ var typeMap$1 = {
|
|
|
18292
19341
|
}
|
|
18293
19342
|
};
|
|
18294
19343
|
var wdtReissue = function wdtReissue(props) {
|
|
18295
|
-
var _value$wdtSystemOrder, _typeMap$
|
|
19344
|
+
var _value$wdtSystemOrder, _typeMap$type23, _typeMap$type25, _typeMap$type26, _value$typeMap$type$s5, _typeMap$type27, _typeMap$type28, _typeMap$type29;
|
|
18296
19345
|
var value = props.value,
|
|
18297
19346
|
onChange = props.onChange,
|
|
18298
19347
|
_props$reasonList = props.reasonList,
|
|
18299
19348
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18300
19349
|
disabled = props.disabled,
|
|
18301
19350
|
type = props.type,
|
|
19351
|
+
isSettingConfig = props.isSettingConfig,
|
|
18302
19352
|
other = _objectWithoutProperties(props, _excluded$i);
|
|
18303
19353
|
var showModeBtn = ((value === null || value === void 0 ? void 0 : (_value$wdtSystemOrder = value.wdtSystemOrder) === null || _value$wdtSystemOrder === void 0 ? void 0 : _value$wdtSystemOrder.orders) || []).some(function (order) {
|
|
18304
19354
|
var _order$srcTid;
|
|
@@ -18362,11 +19412,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18362
19412
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
18363
19413
|
var billNo = _ref2.billNo,
|
|
18364
19414
|
billType = _ref2.billType,
|
|
18365
|
-
billTag = _ref2.billTag
|
|
19415
|
+
billTag = _ref2.billTag,
|
|
19416
|
+
tradeStatusValue = _ref2.tradeStatusValue;
|
|
18366
19417
|
return {
|
|
18367
19418
|
billNo: billNo,
|
|
18368
19419
|
billType: billType,
|
|
18369
|
-
billTag: billTag
|
|
19420
|
+
billTag: billTag,
|
|
19421
|
+
tradeStatusValue: tradeStatusValue
|
|
18370
19422
|
};
|
|
18371
19423
|
});
|
|
18372
19424
|
onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$type5 = typeMap$1[type]) === null || _typeMap$type5 === void 0 ? void 0 : _typeMap$type5.systemOrder, _objectSpread2(_objectSpread2({}, ((_ref3 = valueRef.current || {}) === null || _ref3 === void 0 ? void 0 : _ref3[(_typeMap$type6 = typeMap$1[type]) === null || _typeMap$type6 === void 0 ? void 0 : _typeMap$type6.systemOrder]) || {}), {}, {
|
|
@@ -18449,7 +19501,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18449
19501
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18450
19502
|
};
|
|
18451
19503
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18452
|
-
var _typeMap$type21, _typeMap$type22, _uniqBy
|
|
19504
|
+
var _typeMap$type21, _typeMap$type22, _uniqBy;
|
|
18453
19505
|
var newValue = _objectSpread2({}, value);
|
|
18454
19506
|
// 原订单商品
|
|
18455
19507
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -18460,14 +19512,14 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18460
19512
|
newValue["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type22 = typeMap$1[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
18461
19513
|
return skuList.includes(item.uuid);
|
|
18462
19514
|
});
|
|
18463
|
-
console.log('商品发生变化', newValue[
|
|
19515
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
18464
19516
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18465
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19517
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type23 = typeMap$1[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.key)], isStrict]);
|
|
18466
19518
|
//显示选择商品按钮 原单换不显示选择商品
|
|
18467
19519
|
var showChangeBtn = useMemo(function () {
|
|
18468
|
-
var _typeMap$
|
|
18469
|
-
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
18470
|
-
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19520
|
+
var _typeMap$type24;
|
|
19521
|
+
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type24 = typeMap$1[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.systemOrderNo]);
|
|
19522
|
+
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.systemOrderNo]]);
|
|
18471
19523
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18472
19524
|
gutter: 8,
|
|
18473
19525
|
wrap: true
|
|
@@ -18481,16 +19533,17 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18481
19533
|
}
|
|
18482
19534
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
18483
19535
|
style: {
|
|
18484
|
-
marginBottom: '8px'
|
|
19536
|
+
marginBottom: '8px',
|
|
19537
|
+
width: '100%'
|
|
18485
19538
|
},
|
|
18486
19539
|
disabled: disabled,
|
|
18487
19540
|
allowClear: false,
|
|
18488
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19541
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrderNo)],
|
|
18489
19542
|
onChange: function onChange(val) {
|
|
18490
19543
|
return changeSystemOrderHandle(val);
|
|
18491
19544
|
},
|
|
18492
19545
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
18493
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19546
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type27 = typeMap$1[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
18494
19547
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18495
19548
|
key: item.billNo,
|
|
18496
19549
|
value: item.billNo,
|
|
@@ -18506,12 +19559,13 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18506
19559
|
}
|
|
18507
19560
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
18508
19561
|
style: {
|
|
18509
|
-
marginBottom: '8px'
|
|
19562
|
+
marginBottom: '8px',
|
|
19563
|
+
width: '100%'
|
|
18510
19564
|
},
|
|
18511
|
-
disabled: disabled,
|
|
19565
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18512
19566
|
allowClear: false,
|
|
18513
19567
|
options: reasonList,
|
|
18514
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19568
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type28 = typeMap$1[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.typeName)],
|
|
18515
19569
|
onChange: function onChange(val) {
|
|
18516
19570
|
return changeTypeHandle(val);
|
|
18517
19571
|
}
|
|
@@ -18523,7 +19577,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18523
19577
|
canUpdateNumber: showChangeBtn,
|
|
18524
19578
|
showChangeBtn: showChangeBtn,
|
|
18525
19579
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18526
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$
|
|
19580
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$1 === null || typeMap$1 === void 0 ? void 0 : (_typeMap$type29 = typeMap$1[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.key)],
|
|
18527
19581
|
onChange: function onChange(val) {
|
|
18528
19582
|
return changeGoodHandle(val);
|
|
18529
19583
|
},
|
|
@@ -18539,7 +19593,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
18539
19593
|
})));
|
|
18540
19594
|
};
|
|
18541
19595
|
|
|
18542
|
-
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type"];
|
|
19596
|
+
var _excluded$j = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
18543
19597
|
var typeMap$2 = {
|
|
18544
19598
|
JST_REISSUE_GOODS: {
|
|
18545
19599
|
compType: '补发',
|
|
@@ -18554,7 +19608,9 @@ var typeMap$2 = {
|
|
|
18554
19608
|
orderTypeKey: 'orderType',
|
|
18555
19609
|
oIdKey: 'oId',
|
|
18556
19610
|
outerOiIdKey: '',
|
|
18557
|
-
goodDetailsKey: 'items'
|
|
19611
|
+
goodDetailsKey: 'items',
|
|
19612
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19613
|
+
uniqueKey: 'uuid'
|
|
18558
19614
|
},
|
|
18559
19615
|
JST_RETURN_GOODS: {
|
|
18560
19616
|
compType: '退货',
|
|
@@ -18570,6 +19626,8 @@ var typeMap$2 = {
|
|
|
18570
19626
|
oIdKey: 'oId',
|
|
18571
19627
|
outerOiIdKey: '',
|
|
18572
19628
|
goodDetailsKey: 'items',
|
|
19629
|
+
mergeIdenticalGoods: jstMergeIdenticalGoods,
|
|
19630
|
+
uniqueKey: 'uuid',
|
|
18573
19631
|
eventNameMap: {
|
|
18574
19632
|
// pubsub 事件
|
|
18575
19633
|
exchangeCopyGood: 'jstExchangeCopyGood',
|
|
@@ -18577,16 +19635,32 @@ var typeMap$2 = {
|
|
|
18577
19635
|
returnGoodsSysorder: 'jstReturnGoodsSysorder',
|
|
18578
19636
|
returnGoodsSysorderBack: 'jstReturnGoodsSysorderBack'
|
|
18579
19637
|
}
|
|
19638
|
+
},
|
|
19639
|
+
KM_REISSUE_GOODS: {
|
|
19640
|
+
compType: '补发',
|
|
19641
|
+
key: 'kmReissueGoods',
|
|
19642
|
+
typeName: 'kmReissueType',
|
|
19643
|
+
systemOrder: 'kmSystemOrder',
|
|
19644
|
+
systemOrderNo: 'kmSystemOrderNo',
|
|
19645
|
+
getOrderList: kmUtils.getOrderListSingleton,
|
|
19646
|
+
updateGoodsHandle: updateKmGoodsHandle,
|
|
19647
|
+
alwaysShowChooseErpGoodsBtn: true,
|
|
19648
|
+
orderTypeKey: 'orderType',
|
|
19649
|
+
oIdKey: 'billNo',
|
|
19650
|
+
outerOiIdKey: '',
|
|
19651
|
+
goodDetailsKey: 'subOrders',
|
|
19652
|
+
uniqueKey: 'id'
|
|
18580
19653
|
}
|
|
18581
19654
|
};
|
|
18582
19655
|
var PublicReissue = function PublicReissue(props) {
|
|
18583
|
-
var _typeMap$
|
|
19656
|
+
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;
|
|
18584
19657
|
var value = props.value,
|
|
18585
19658
|
onChange = props.onChange,
|
|
18586
19659
|
_props$reasonList = props.reasonList,
|
|
18587
19660
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
18588
19661
|
disabled = props.disabled,
|
|
18589
19662
|
type = props.type,
|
|
19663
|
+
isSettingConfig = props.isSettingConfig,
|
|
18590
19664
|
other = _objectWithoutProperties(props, _excluded$j);
|
|
18591
19665
|
var getOrderFlag = useRef(false);
|
|
18592
19666
|
var _useState = useState(false),
|
|
@@ -18693,7 +19767,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18693
19767
|
}))));
|
|
18694
19768
|
};
|
|
18695
19769
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
18696
|
-
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19;
|
|
19770
|
+
var _typeMap$type17, _typeMap$type18, _order$typeMap$type$g, _typeMap$type19, _typeMap$type20;
|
|
18697
19771
|
var mode = _ref4.mode,
|
|
18698
19772
|
sysOrderNo = _ref4.sysOrderNo;
|
|
18699
19773
|
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];
|
|
@@ -18701,63 +19775,74 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18701
19775
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
18702
19776
|
return order[typeMap$2[type].oIdKey] === systemOrderNo;
|
|
18703
19777
|
});
|
|
18704
|
-
var
|
|
19778
|
+
var orderRest = undefined;
|
|
19779
|
+
if (['JST_REISSUE_GOODS', 'JST_RETURN_GOODS'].includes(type)) {
|
|
19780
|
+
orderRest = true;
|
|
19781
|
+
} else if (type === 'KM_REISSUE_GOODS') {
|
|
19782
|
+
orderRest = {
|
|
19783
|
+
orderBackGoodsLevel: props.orderBackGoodsLevel,
|
|
19784
|
+
canEdit: true
|
|
19785
|
+
};
|
|
19786
|
+
}
|
|
19787
|
+
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) : [];
|
|
18705
19788
|
var orderNo = systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orderNo;
|
|
18706
|
-
|
|
19789
|
+
var list = mode ? goodDetails.filter(function (goodItem) {
|
|
18707
19790
|
return !orderNo || goodItem[typeMap$2[type].outerOiIdKey] === orderNo;
|
|
18708
19791
|
}) : goodDetails;
|
|
19792
|
+
return list;
|
|
18709
19793
|
};
|
|
18710
19794
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
18711
|
-
var _typeMap$
|
|
19795
|
+
var _typeMap$type21;
|
|
18712
19796
|
var newValue = _objectSpread2({}, value);
|
|
18713
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19797
|
+
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 || [];
|
|
18714
19798
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18715
19799
|
};
|
|
18716
19800
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
18717
|
-
var _typeMap$
|
|
19801
|
+
var _typeMap$type22, _typeMap$type23, _value$typeMap$type$t2, _typeMap$type28, _value$typeMap$type$t3, _typeMap$type30;
|
|
18718
19802
|
var newValue = _objectSpread2({}, value);
|
|
18719
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18720
|
-
if (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18721
|
-
var _value$typeMap$type$s5, _typeMap$
|
|
18722
|
-
var orders = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
19803
|
+
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;
|
|
19804
|
+
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) {
|
|
19805
|
+
var _value$typeMap$type$s5, _typeMap$type24, _typeMap$type26, _typeMap$type27;
|
|
19806
|
+
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) || [];
|
|
18723
19807
|
var targetOrder = val && orders.find(function (oItem) {
|
|
18724
|
-
var _typeMap$
|
|
18725
|
-
return oItem[(_typeMap$
|
|
19808
|
+
var _typeMap$type25;
|
|
19809
|
+
return oItem[(_typeMap$type25 = typeMap$2[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.oIdKey] === val;
|
|
18726
19810
|
});
|
|
18727
|
-
newValue[(_typeMap$
|
|
18728
|
-
}
|
|
18729
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
18730
|
-
var _typeMap$
|
|
18731
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18732
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
18733
|
-
var _typeMap$
|
|
18734
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19811
|
+
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];
|
|
19812
|
+
}
|
|
19813
|
+
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])) {
|
|
19814
|
+
var _typeMap$type29;
|
|
19815
|
+
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)] = [];
|
|
19816
|
+
} 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])) {
|
|
19817
|
+
var _typeMap$type31;
|
|
19818
|
+
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({
|
|
18735
19819
|
mode: isStrict,
|
|
18736
19820
|
sysOrderNo: val
|
|
18737
19821
|
});
|
|
18738
19822
|
}
|
|
18739
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19823
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue, 'systemOrder');
|
|
18740
19824
|
};
|
|
18741
19825
|
//显示选择商品按钮
|
|
18742
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
19826
|
+
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]);
|
|
18743
19827
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
18744
|
-
var _typeMap$
|
|
19828
|
+
var _typeMap$type33, _typeMap$type34, _uniqBy, _typeMap$type35;
|
|
18745
19829
|
var newValue = _objectSpread2({}, value);
|
|
18746
19830
|
// 原订单商品
|
|
18747
19831
|
var originTradeGoodList = getGoodDetails({
|
|
18748
19832
|
mode: isStrict
|
|
18749
19833
|
}) || [];
|
|
18750
19834
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
18751
|
-
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18752
|
-
newValue["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18753
|
-
|
|
19835
|
+
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)]) || [];
|
|
19836
|
+
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) {
|
|
19837
|
+
var _typeMap$type36;
|
|
19838
|
+
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]);
|
|
18754
19839
|
});
|
|
18755
19840
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
18756
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19841
|
+
}, [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]);
|
|
18757
19842
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
18758
19843
|
gutter: 8,
|
|
18759
19844
|
wrap: true,
|
|
18760
|
-
id: (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19845
|
+
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())
|
|
18761
19846
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
18762
19847
|
className: "gutter-row",
|
|
18763
19848
|
xs: {
|
|
@@ -18768,16 +19853,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18768
19853
|
}
|
|
18769
19854
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
18770
19855
|
style: {
|
|
18771
|
-
marginBottom: '8px'
|
|
19856
|
+
marginBottom: '8px',
|
|
19857
|
+
width: '100%'
|
|
18772
19858
|
},
|
|
18773
19859
|
disabled: disabled,
|
|
18774
19860
|
allowClear: false,
|
|
18775
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19861
|
+
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)],
|
|
18776
19862
|
onChange: function onChange(val) {
|
|
18777
19863
|
return changeSystemOrderHandle(val);
|
|
18778
19864
|
},
|
|
18779
|
-
placeholder: "\u9009\u62E9".concat((typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18780
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s6 = value[(_typeMap$
|
|
19865
|
+
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")
|
|
19866
|
+
}, ((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) {
|
|
18781
19867
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
18782
19868
|
key: item[typeMap$2[type].oIdKey],
|
|
18783
19869
|
value: item[typeMap$2[type].oIdKey],
|
|
@@ -18793,16 +19879,17 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18793
19879
|
}
|
|
18794
19880
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
18795
19881
|
style: {
|
|
18796
|
-
marginBottom: '8px'
|
|
19882
|
+
marginBottom: '8px',
|
|
19883
|
+
width: '100%'
|
|
18797
19884
|
},
|
|
18798
|
-
disabled: disabled,
|
|
19885
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
18799
19886
|
allowClear: false,
|
|
18800
19887
|
options: reasonList,
|
|
18801
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19888
|
+
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)],
|
|
18802
19889
|
onChange: function onChange(val) {
|
|
18803
19890
|
return changeTypeHandle(val);
|
|
18804
19891
|
}
|
|
18805
|
-
})), (typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19892
|
+
})), (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, {
|
|
18806
19893
|
className: "gutter-row",
|
|
18807
19894
|
xs: {
|
|
18808
19895
|
span: 11
|
|
@@ -18811,7 +19898,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18811
19898
|
span: 6
|
|
18812
19899
|
}
|
|
18813
19900
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
18814
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19901
|
+
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)],
|
|
18815
19902
|
disabled: disabled,
|
|
18816
19903
|
readOnly: true
|
|
18817
19904
|
}))), /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
@@ -18821,10 +19908,10 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18821
19908
|
disabled: disabled,
|
|
18822
19909
|
canUpdateNumber: showChangeBtn,
|
|
18823
19910
|
showChangeBtn: showChangeBtn,
|
|
18824
|
-
alwaysShowChooseErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
18825
|
-
showErpGoodsBtn: typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19911
|
+
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,
|
|
19912
|
+
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,
|
|
18826
19913
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
18827
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$2 === null || typeMap$2 === void 0 ? void 0 : (_typeMap$
|
|
19914
|
+
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)],
|
|
18828
19915
|
onChange: function onChange(val) {
|
|
18829
19916
|
return changeGoodHandle(val);
|
|
18830
19917
|
},
|
|
@@ -18835,6 +19922,7 @@ var PublicReissue = function PublicReissue(props) {
|
|
|
18835
19922
|
originDataSource: getGoodDetails({
|
|
18836
19923
|
mode: isStrict
|
|
18837
19924
|
}),
|
|
19925
|
+
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',
|
|
18838
19926
|
selectedGoodsChange: selectedGoodsChange
|
|
18839
19927
|
}
|
|
18840
19928
|
})));
|
|
@@ -19373,6 +20461,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19373
20461
|
var _props$value = props.value,
|
|
19374
20462
|
value = _props$value === void 0 ? [] : _props$value,
|
|
19375
20463
|
onChange = props.onChange,
|
|
20464
|
+
onBlur = props.onBlur,
|
|
19376
20465
|
disabled = props.disabled,
|
|
19377
20466
|
_props$type = props.type,
|
|
19378
20467
|
type = _props$type === void 0 ? 1 : _props$type;
|
|
@@ -19454,6 +20543,7 @@ var CommonSystemOrder = function CommonSystemOrder(props) {
|
|
|
19454
20543
|
onChange: function onChange(e) {
|
|
19455
20544
|
return changeInputHandle(e.target.value, 'billNo');
|
|
19456
20545
|
},
|
|
20546
|
+
onBlur: onBlur,
|
|
19457
20547
|
value: (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5.billNo
|
|
19458
20548
|
})) : null) : null);
|
|
19459
20549
|
};
|
|
@@ -19595,6 +20685,64 @@ var MsgStatus = function MsgStatus(props) {
|
|
|
19595
20685
|
}, "\u5931\u8D25\u539F\u56E0\uFF1A", (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3.reason) : null) : null);
|
|
19596
20686
|
};
|
|
19597
20687
|
|
|
20688
|
+
var _excluded$n = ["mode", "maxSelectCount", "showOnly", "getOptionsAsync", "onChange"];
|
|
20689
|
+
var AsyncSelect = function AsyncSelect(props) {
|
|
20690
|
+
var mode = props.mode,
|
|
20691
|
+
maxSelectCount = props.maxSelectCount,
|
|
20692
|
+
_props$showOnly = props.showOnly,
|
|
20693
|
+
showOnly = _props$showOnly === void 0 ? false : _props$showOnly,
|
|
20694
|
+
getOptionsAsync = props.getOptionsAsync,
|
|
20695
|
+
_onChange = props.onChange,
|
|
20696
|
+
otherProps = _objectWithoutProperties(props, _excluded$n);
|
|
20697
|
+
var _React$useState = React.useState([]),
|
|
20698
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
20699
|
+
data = _React$useState2[0],
|
|
20700
|
+
setData = _React$useState2[1];
|
|
20701
|
+
React.useEffect(function () {
|
|
20702
|
+
getOptionsAsync === null || getOptionsAsync === void 0 ? void 0 : getOptionsAsync().then(function (list) {
|
|
20703
|
+
setData(list);
|
|
20704
|
+
});
|
|
20705
|
+
}, []);
|
|
20706
|
+
var options = [].concat(_toConsumableArray(props.options || []), _toConsumableArray(data || []));
|
|
20707
|
+
var getValueString = function getValueString(value) {
|
|
20708
|
+
var list = options;
|
|
20709
|
+
if (mode === 'multiple' && Array.isArray(value)) {
|
|
20710
|
+
var _list$filter$map$join;
|
|
20711
|
+
return (_list$filter$map$join = list.filter(function (item) {
|
|
20712
|
+
return value.includes(item.value);
|
|
20713
|
+
}).map(function (item) {
|
|
20714
|
+
return item.label;
|
|
20715
|
+
}).join(',')) !== null && _list$filter$map$join !== void 0 ? _list$filter$map$join : '--';
|
|
20716
|
+
} else {
|
|
20717
|
+
var selectedItem = list.find(function (item) {
|
|
20718
|
+
return item.value === value;
|
|
20719
|
+
});
|
|
20720
|
+
return selectedItem ? selectedItem.label : value !== null && value !== void 0 ? value : '--';
|
|
20721
|
+
}
|
|
20722
|
+
};
|
|
20723
|
+
if (showOnly) {
|
|
20724
|
+
return getValueString(props.value);
|
|
20725
|
+
}
|
|
20726
|
+
return /*#__PURE__*/React.createElement(Select, _objectSpread2(_objectSpread2({
|
|
20727
|
+
showArrow: true,
|
|
20728
|
+
showSearch: true,
|
|
20729
|
+
filterOption: function filterOption(input, option) {
|
|
20730
|
+
return option.label.includes(input);
|
|
20731
|
+
},
|
|
20732
|
+
notFoundContent: null
|
|
20733
|
+
}, otherProps), {}, {
|
|
20734
|
+
options: options,
|
|
20735
|
+
mode: mode,
|
|
20736
|
+
onChange: function onChange(value, option) {
|
|
20737
|
+
if (mode === 'multiple' && maxSelectCount && maxSelectCount < value.length) {
|
|
20738
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value.slice(-maxSelectCount), option);
|
|
20739
|
+
} else {
|
|
20740
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value, option);
|
|
20741
|
+
}
|
|
20742
|
+
}
|
|
20743
|
+
}));
|
|
20744
|
+
};
|
|
20745
|
+
|
|
19598
20746
|
var CalculationInput = function CalculationInput(props) {
|
|
19599
20747
|
var _props$config = props.config,
|
|
19600
20748
|
config = _props$config === void 0 ? {} : _props$config;
|
|
@@ -19613,7 +20761,7 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
19613
20761
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
19614
20762
|
};
|
|
19615
20763
|
|
|
19616
|
-
var _excluded$
|
|
20764
|
+
var _excluded$o = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"];
|
|
19617
20765
|
var typeMap$3 = {
|
|
19618
20766
|
BS_E3_REISSUE_GOODS: {
|
|
19619
20767
|
key: 'bsE3ReissueGoods',
|
|
@@ -19631,7 +20779,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19631
20779
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19632
20780
|
disabled = props.disabled,
|
|
19633
20781
|
type = props.type,
|
|
19634
|
-
|
|
20782
|
+
isSettingConfig = props.isSettingConfig,
|
|
20783
|
+
other = _objectWithoutProperties(props, _excluded$o);
|
|
19635
20784
|
var getOrderFlag = useRef(false);
|
|
19636
20785
|
var valueRef = useRef(null);
|
|
19637
20786
|
var _useState = useState(false),
|
|
@@ -19791,7 +20940,8 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19791
20940
|
}
|
|
19792
20941
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
19793
20942
|
style: {
|
|
19794
|
-
marginBottom: '8px'
|
|
20943
|
+
marginBottom: '8px',
|
|
20944
|
+
width: '100%'
|
|
19795
20945
|
},
|
|
19796
20946
|
disabled: disabled,
|
|
19797
20947
|
allowClear: false,
|
|
@@ -19816,9 +20966,10 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19816
20966
|
}
|
|
19817
20967
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
19818
20968
|
style: {
|
|
19819
|
-
marginBottom: '8px'
|
|
20969
|
+
marginBottom: '8px',
|
|
20970
|
+
width: '100%'
|
|
19820
20971
|
},
|
|
19821
|
-
disabled: disabled,
|
|
20972
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
19822
20973
|
allowClear: false,
|
|
19823
20974
|
options: reasonList,
|
|
19824
20975
|
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$3 === null || typeMap$3 === void 0 ? void 0 : (_typeMap$type27 = typeMap$3[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.typeName)],
|
|
@@ -19849,7 +21000,11 @@ var bsE3Reissue = function bsE3Reissue(props) {
|
|
|
19849
21000
|
})));
|
|
19850
21001
|
};
|
|
19851
21002
|
|
|
19852
|
-
var
|
|
21003
|
+
var css_248z$c = ".index-module_systemNoDisabled__1s7aJ.ant-select-item-option-disabled {\n color: #dadada !important;\n}\n";
|
|
21004
|
+
var styles$5 = {"systemNoDisabled":"index-module_systemNoDisabled__1s7aJ"};
|
|
21005
|
+
styleInject(css_248z$c);
|
|
21006
|
+
|
|
21007
|
+
var _excluded$p = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
19853
21008
|
_excluded2 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
19854
21009
|
var typeMap$4 = {
|
|
19855
21010
|
GY_REISSUE_GOODS: {
|
|
@@ -19871,17 +21026,19 @@ var typeMap$4 = {
|
|
|
19871
21026
|
}
|
|
19872
21027
|
};
|
|
19873
21028
|
var GyReissue = function GyReissue(props) {
|
|
19874
|
-
var _typeMap$
|
|
21029
|
+
var _typeMap$type29, _typeMap$type30, _typeMap$type31, _systemOrder$orders, _typeMap$type32, _value$typeMap$type$s7, _typeMap$type33, _typeMap$type34, _typeMap$type35;
|
|
19875
21030
|
var value = props.value,
|
|
19876
21031
|
onChange = props.onChange,
|
|
19877
21032
|
_props$reasonList = props.reasonList,
|
|
19878
21033
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
19879
21034
|
disabled = props.disabled,
|
|
19880
21035
|
type = props.type,
|
|
19881
|
-
|
|
21036
|
+
isSettingConfig = props.isSettingConfig,
|
|
21037
|
+
other = _objectWithoutProperties(props, _excluded$p);
|
|
19882
21038
|
// const showModeBtn = (value?.gySystemOrder?.orders || []).some((order: any) =>
|
|
19883
21039
|
// order?.platformCode?.includes(';'),
|
|
19884
21040
|
// );
|
|
21041
|
+
var getVipCodeFlag = useRef(false);
|
|
19885
21042
|
var getOrderFlag = useRef(false);
|
|
19886
21043
|
var valueRef = useRef(null);
|
|
19887
21044
|
var _useState = useState(false),
|
|
@@ -19889,23 +21046,27 @@ var GyReissue = function GyReissue(props) {
|
|
|
19889
21046
|
isStrict = _useState2[0],
|
|
19890
21047
|
setIsStrict = _useState2[1];
|
|
19891
21048
|
useEffect(function () {
|
|
19892
|
-
var _value$typeMap$type$s, _value$typeMap$type$s2, _typeMap$type, _value$typeMap$type$s3, _typeMap$type2;
|
|
21049
|
+
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;
|
|
19893
21050
|
valueRef.current = value;
|
|
19894
21051
|
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)) {
|
|
19895
21052
|
var _value$typeMap$type$s4, _typeMap$type3;
|
|
19896
21053
|
getOrderFlag.current = true;
|
|
19897
21054
|
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);
|
|
21055
|
+
} 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)) {
|
|
21056
|
+
var _value$typeMap$type$s6, _typeMap$type6;
|
|
21057
|
+
getVipCodeFlag.current = true;
|
|
21058
|
+
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);
|
|
19898
21059
|
}
|
|
19899
21060
|
return;
|
|
19900
21061
|
}, [value]);
|
|
19901
21062
|
var getOrderList = /*#__PURE__*/function () {
|
|
19902
21063
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(orderNo) {
|
|
19903
|
-
var _typeMap$
|
|
21064
|
+
var _typeMap$type7;
|
|
19904
21065
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19905
21066
|
while (1) switch (_context.prev = _context.next) {
|
|
19906
21067
|
case 0:
|
|
19907
|
-
(_typeMap$
|
|
19908
|
-
var _typeMap$
|
|
21068
|
+
(_typeMap$type7 = typeMap$4[type]) === null || _typeMap$type7 === void 0 ? void 0 : _typeMap$type7.getOrderList(orderNo).then(function (data) {
|
|
21069
|
+
var _typeMap$type8, _ref3, _typeMap$type9, _orders$, _orders$2, _objectSpread2$1;
|
|
19909
21070
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
19910
21071
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
19911
21072
|
var billNo = _ref2.billNo,
|
|
@@ -19927,17 +21088,15 @@ var GyReissue = function GyReissue(props) {
|
|
|
19927
21088
|
shopCode: shopCode
|
|
19928
21089
|
});
|
|
19929
21090
|
});
|
|
21091
|
+
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]) || {}), {}, {
|
|
21092
|
+
showOrderInfo: showOrderInfo,
|
|
21093
|
+
orders: orders
|
|
21094
|
+
})), _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));
|
|
19930
21095
|
pushGyLog('getOrderList', {
|
|
19931
21096
|
before: valueRef.current,
|
|
19932
|
-
after:
|
|
19933
|
-
showOrderInfo: showOrderInfo,
|
|
19934
|
-
orders: orders
|
|
19935
|
-
})))
|
|
21097
|
+
after: newValue
|
|
19936
21098
|
});
|
|
19937
|
-
onChange(
|
|
19938
|
-
showOrderInfo: showOrderInfo,
|
|
19939
|
-
orders: orders
|
|
19940
|
-
}))));
|
|
21099
|
+
onChange(newValue);
|
|
19941
21100
|
});
|
|
19942
21101
|
case 1:
|
|
19943
21102
|
case "end":
|
|
@@ -19949,42 +21108,71 @@ var GyReissue = function GyReissue(props) {
|
|
|
19949
21108
|
return _ref.apply(this, arguments);
|
|
19950
21109
|
};
|
|
19951
21110
|
}();
|
|
21111
|
+
var getVipCode = /*#__PURE__*/function () {
|
|
21112
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(orderNo) {
|
|
21113
|
+
var _typeMap$type10;
|
|
21114
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
21115
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
21116
|
+
case 0:
|
|
21117
|
+
return _context2.abrupt("return", (_typeMap$type10 = typeMap$4[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.getOrderList(orderNo).then(function (data) {
|
|
21118
|
+
var _orders$3, _orders$4;
|
|
21119
|
+
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
21120
|
+
var newValue = _objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, {
|
|
21121
|
+
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),
|
|
21122
|
+
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)
|
|
21123
|
+
});
|
|
21124
|
+
pushGyLog('getVipCode', {
|
|
21125
|
+
before: valueRef.current,
|
|
21126
|
+
after: newValue
|
|
21127
|
+
});
|
|
21128
|
+
onChange(newValue);
|
|
21129
|
+
}));
|
|
21130
|
+
case 1:
|
|
21131
|
+
case "end":
|
|
21132
|
+
return _context2.stop();
|
|
21133
|
+
}
|
|
21134
|
+
}, _callee2);
|
|
21135
|
+
}));
|
|
21136
|
+
return function getVipCode(_x2) {
|
|
21137
|
+
return _ref4.apply(this, arguments);
|
|
21138
|
+
};
|
|
21139
|
+
}();
|
|
19952
21140
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
19953
|
-
var _ref5, _ref5$typeMap$type$ty, _typeMap$
|
|
21141
|
+
var _ref5, _ref5$typeMap$type$ty, _typeMap$type11, _typeMap$type12;
|
|
19954
21142
|
pushGyLog('beforeChangeType', valueRef.current || {});
|
|
19955
21143
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
19956
|
-
if (typeName === ((_ref5 = valueRef.current || {}) === null || _ref5 === void 0 ? void 0 : (_ref5$typeMap$type$ty = _ref5[(_typeMap$
|
|
21144
|
+
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;
|
|
19957
21145
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
19958
21146
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
19959
|
-
newValue[(_typeMap$
|
|
21147
|
+
newValue[(_typeMap$type12 = typeMap$4[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.typeName] = val;
|
|
19960
21148
|
if (typeName === '1') {
|
|
19961
|
-
var _typeMap$
|
|
19962
|
-
newValue[(_typeMap$
|
|
21149
|
+
var _typeMap$type13;
|
|
21150
|
+
newValue[(_typeMap$type13 = typeMap$4[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = getGoodDetails({
|
|
19963
21151
|
mode: isStrict
|
|
19964
21152
|
});
|
|
19965
21153
|
} else if (typeName === '2') {
|
|
19966
|
-
var _typeMap$
|
|
21154
|
+
var _typeMap$type14;
|
|
19967
21155
|
// 切换到非原单,清空列表
|
|
19968
|
-
newValue[(_typeMap$
|
|
21156
|
+
newValue[(_typeMap$type14 = typeMap$4[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key] = [];
|
|
19969
21157
|
}
|
|
19970
21158
|
pushGyLog('afterChangeType', newValue);
|
|
19971
21159
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
19972
21160
|
};
|
|
19973
21161
|
var handleModeChange = function handleModeChange(mode) {
|
|
19974
|
-
var _ref6, _ref6$typeMap$type$ty, _typeMap$
|
|
19975
|
-
var isOriginalOrder = ((_ref6 = valueRef.current || {}) === null || _ref6 === void 0 ? void 0 : (_ref6$typeMap$type$ty = _ref6[(_typeMap$
|
|
21162
|
+
var _ref6, _ref6$typeMap$type$ty, _typeMap$type15, _typeMap$type16;
|
|
21163
|
+
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';
|
|
19976
21164
|
setIsStrict(mode);
|
|
19977
21165
|
if (!isOriginalOrder) return;
|
|
19978
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, valueRef.current || {}), {}, _defineProperty({}, (_typeMap$
|
|
21166
|
+
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({
|
|
19979
21167
|
mode: mode
|
|
19980
21168
|
}))));
|
|
19981
21169
|
};
|
|
19982
21170
|
var getGoodDetails = function getGoodDetails(_ref7) {
|
|
19983
|
-
var _ref8, _typeMap$
|
|
21171
|
+
var _ref8, _typeMap$type17, _ref9, _typeMap$type18, _order$details;
|
|
19984
21172
|
var mode = _ref7.mode,
|
|
19985
21173
|
sysOrderNo = _ref7.sysOrderNo;
|
|
19986
|
-
var systemOrder = (_ref8 = valueRef.current || {}) === null || _ref8 === void 0 ? void 0 : _ref8[(_typeMap$
|
|
19987
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : (_ref9 = valueRef.current || {}) === null || _ref9 === void 0 ? void 0 : _ref9[(_typeMap$
|
|
21174
|
+
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];
|
|
21175
|
+
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];
|
|
19988
21176
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
19989
21177
|
return order.code === systemOrderNo;
|
|
19990
21178
|
});
|
|
@@ -19995,29 +21183,29 @@ var GyReissue = function GyReissue(props) {
|
|
|
19995
21183
|
}) : goodDetails;
|
|
19996
21184
|
};
|
|
19997
21185
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
19998
|
-
var _typeMap$
|
|
21186
|
+
var _typeMap$type19;
|
|
19999
21187
|
pushGyLog('beforeChangeGood', valueRef.current || {});
|
|
20000
21188
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20001
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20002
|
-
var _typeMap$
|
|
20003
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20004
|
-
item["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21189
|
+
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) {
|
|
21190
|
+
var _typeMap$type20, _typeMap$type21;
|
|
21191
|
+
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;
|
|
21192
|
+
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;
|
|
20005
21193
|
return item;
|
|
20006
21194
|
});
|
|
20007
21195
|
pushGyLog('afterChangeGood', newValue);
|
|
20008
21196
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20009
21197
|
};
|
|
20010
21198
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20011
|
-
var _typeMap$
|
|
21199
|
+
var _typeMap$type22, _ref10, _ref10$typeMap$type$t, _typeMap$type23, _ref11, _ref11$typeMap$type$t, _typeMap$type25;
|
|
20012
21200
|
pushGyLog('beforeChangeSystemOrder', valueRef.current || {});
|
|
20013
21201
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20014
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20015
|
-
if (['2'].includes((_ref10 = valueRef.current || {}) === null || _ref10 === void 0 ? void 0 : (_ref10$typeMap$type$t = _ref10[(_typeMap$
|
|
20016
|
-
var _typeMap$type22;
|
|
20017
|
-
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)] = [];
|
|
20018
|
-
} 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])) {
|
|
21202
|
+
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;
|
|
21203
|
+
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])) {
|
|
20019
21204
|
var _typeMap$type24;
|
|
20020
|
-
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)] =
|
|
21205
|
+
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)] = [];
|
|
21206
|
+
} 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])) {
|
|
21207
|
+
var _typeMap$type26;
|
|
21208
|
+
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({
|
|
20021
21209
|
mode: isStrict,
|
|
20022
21210
|
sysOrderNo: val
|
|
20023
21211
|
});
|
|
@@ -20026,7 +21214,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20026
21214
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20027
21215
|
};
|
|
20028
21216
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20029
|
-
var _ref12, _typeMap$
|
|
21217
|
+
var _ref12, _typeMap$type27, _typeMap$type28, _uniqBy;
|
|
20030
21218
|
pushGyLog('beforeSelectedGoodsChange', valueRef.current || {});
|
|
20031
21219
|
var newValue = _objectSpread2({}, valueRef.current || {});
|
|
20032
21220
|
// 原订单商品
|
|
@@ -20034,67 +21222,66 @@ var GyReissue = function GyReissue(props) {
|
|
|
20034
21222
|
mode: isStrict
|
|
20035
21223
|
}) || [];
|
|
20036
21224
|
// 当前选中的所有商品【包含了原订单+商品库】
|
|
20037
|
-
var currentSelectGoodList = ((_ref12 = valueRef.current || {}) === null || _ref12 === void 0 ? void 0 : _ref12["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
20038
|
-
newValue["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21225
|
+
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)]) || [];
|
|
21226
|
+
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) {
|
|
20039
21227
|
return skuList.includes(item.uuid);
|
|
20040
21228
|
});
|
|
20041
|
-
console.log('商品发生变化', newValue[
|
|
21229
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20042
21230
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20043
21231
|
pushGyLog('afterSelectedGoodsChange', newValue);
|
|
20044
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21232
|
+
}, [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]);
|
|
20045
21233
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20046
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20047
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21234
|
+
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];
|
|
21235
|
+
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]);
|
|
20048
21236
|
var showErpGoodsBtn = showChangeBtn || type === 'GY_REISSUE_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20049
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
20050
|
-
id: "TEST_GY",
|
|
20051
|
-
onClick: function onClick() {
|
|
20052
|
-
console.log('TEST_GY', value);
|
|
20053
|
-
}
|
|
20054
|
-
}, /*#__PURE__*/React.createElement(Row, {
|
|
21237
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
|
|
20055
21238
|
gutter: 8,
|
|
20056
21239
|
wrap: true
|
|
20057
21240
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
20058
21241
|
className: "gutter-row",
|
|
20059
21242
|
xs: {
|
|
20060
|
-
span:
|
|
21243
|
+
span: 12
|
|
20061
21244
|
},
|
|
20062
21245
|
sm: {
|
|
20063
|
-
span:
|
|
21246
|
+
span: 8
|
|
20064
21247
|
}
|
|
20065
21248
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
20066
21249
|
style: {
|
|
20067
|
-
marginBottom: '8px'
|
|
21250
|
+
marginBottom: '8px',
|
|
21251
|
+
width: '100%'
|
|
20068
21252
|
},
|
|
20069
21253
|
disabled: disabled,
|
|
20070
21254
|
allowClear: false,
|
|
20071
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21255
|
+
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)],
|
|
20072
21256
|
onChange: function onChange(val) {
|
|
20073
21257
|
return changeSystemOrderHandle(val);
|
|
20074
21258
|
},
|
|
20075
21259
|
placeholder: "\u9009\u62E9\u8865\u53D1\u7CFB\u7EDF\u5355"
|
|
20076
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$
|
|
21260
|
+
}, ((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) {
|
|
20077
21261
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
21262
|
+
className: styles$5.systemNoDisabled,
|
|
20078
21263
|
key: item.billNo,
|
|
20079
21264
|
value: item.billNo,
|
|
20080
|
-
label: item.billNo
|
|
20081
|
-
|
|
21265
|
+
label: item.billNo,
|
|
21266
|
+
disabled: item.cancel
|
|
21267
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', item.billNo);
|
|
20082
21268
|
}))), /*#__PURE__*/React.createElement(Col, {
|
|
20083
21269
|
className: "gutter-row",
|
|
20084
21270
|
xs: {
|
|
20085
|
-
span:
|
|
21271
|
+
span: 12
|
|
20086
21272
|
},
|
|
20087
21273
|
sm: {
|
|
20088
|
-
span:
|
|
21274
|
+
span: 4
|
|
20089
21275
|
}
|
|
20090
21276
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
20091
21277
|
style: {
|
|
20092
|
-
marginBottom: '8px'
|
|
21278
|
+
marginBottom: '8px',
|
|
21279
|
+
width: '100%'
|
|
20093
21280
|
},
|
|
20094
|
-
disabled: disabled,
|
|
21281
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20095
21282
|
allowClear: false,
|
|
20096
21283
|
options: reasonList,
|
|
20097
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21284
|
+
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)],
|
|
20098
21285
|
onChange: function onChange(val) {
|
|
20099
21286
|
return changeTypeHandle(val);
|
|
20100
21287
|
}
|
|
@@ -20108,7 +21295,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20108
21295
|
showErpGoodsBtn: showErpGoodsBtn,
|
|
20109
21296
|
alwaysShowChooseErpGoodsBtn: showErpGoodsBtn,
|
|
20110
21297
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20111
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$4 === null || typeMap$4 === void 0 ? void 0 : (_typeMap$
|
|
21298
|
+
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)],
|
|
20112
21299
|
onChange: function onChange(val) {
|
|
20113
21300
|
return changeGoodHandle(val);
|
|
20114
21301
|
},
|
|
@@ -20123,7 +21310,7 @@ var GyReissue = function GyReissue(props) {
|
|
|
20123
21310
|
})));
|
|
20124
21311
|
};
|
|
20125
21312
|
|
|
20126
|
-
var _excluded$
|
|
21313
|
+
var _excluded$q = ["value", "onChange", "reasonList", "disabled", "type", "isSettingConfig"],
|
|
20127
21314
|
_excluded2$1 = ["billNo", "billType", "billTag", "tradeTagName", "deliveryState", "vipCode", "shopCode"];
|
|
20128
21315
|
var typeMap$5 = {
|
|
20129
21316
|
GY_RETURN_GOODS: {
|
|
@@ -20145,14 +21332,15 @@ var typeMap$5 = {
|
|
|
20145
21332
|
}
|
|
20146
21333
|
};
|
|
20147
21334
|
var GyReturnGoods = function GyReturnGoods(props) {
|
|
20148
|
-
var _typeMap$
|
|
21335
|
+
var _typeMap$type9, _typeMap$type26, _systemOrder$orders, _typeMap$type27, _typeMap$type28, _value$typeMap$type$s5, _typeMap$type29, _typeMap$type30, _typeMap$type31;
|
|
20149
21336
|
var value = props.value,
|
|
20150
21337
|
onChange = props.onChange,
|
|
20151
21338
|
_props$reasonList = props.reasonList,
|
|
20152
21339
|
reasonList = _props$reasonList === void 0 ? [] : _props$reasonList,
|
|
20153
21340
|
disabled = props.disabled,
|
|
20154
21341
|
type = props.type,
|
|
20155
|
-
|
|
21342
|
+
isSettingConfig = props.isSettingConfig,
|
|
21343
|
+
other = _objectWithoutProperties(props, _excluded$q);
|
|
20156
21344
|
var valueRef = useRef({});
|
|
20157
21345
|
var getOrderFlag = useRef(false);
|
|
20158
21346
|
var _useState = useState(false),
|
|
@@ -20215,7 +21403,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20215
21403
|
while (1) switch (_context.prev = _context.next) {
|
|
20216
21404
|
case 0:
|
|
20217
21405
|
(_typeMap$type4 = typeMap$5[type]) === null || _typeMap$type4 === void 0 ? void 0 : _typeMap$type4.getOrderList(orderNo).then(function (data) {
|
|
20218
|
-
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6;
|
|
21406
|
+
var _valueRef$current, _typeMap$type5, _typeMap$type$systemO, _ref3, _valueRef$current2, _typeMap$type6, _orders$, _objectSpread2$1;
|
|
20219
21407
|
var orders = (data === null || data === void 0 ? void 0 : data.trades) || [];
|
|
20220
21408
|
var showOrderInfo = orders.map(function (_ref2) {
|
|
20221
21409
|
var billNo = _ref2.billNo,
|
|
@@ -20237,10 +21425,10 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20237
21425
|
shopCode: shopCode
|
|
20238
21426
|
});
|
|
20239
21427
|
});
|
|
20240
|
-
onChange(_objectSpread2(_objectSpread2({}, (_valueRef$current = valueRef.current) !== null && _valueRef$current !== void 0 ? _valueRef$current : {}), {},
|
|
21428
|
+
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 : {}), {}, {
|
|
20241
21429
|
showOrderInfo: showOrderInfo,
|
|
20242
21430
|
orders: orders
|
|
20243
|
-
}))));
|
|
21431
|
+
})), _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)));
|
|
20244
21432
|
});
|
|
20245
21433
|
case 1:
|
|
20246
21434
|
case "end":
|
|
@@ -20253,7 +21441,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20253
21441
|
};
|
|
20254
21442
|
}();
|
|
20255
21443
|
var selectedGoodsChange = useCallback(function (skuList) {
|
|
20256
|
-
var _typeMap$type7, _typeMap$type8, _uniqBy
|
|
21444
|
+
var _typeMap$type7, _typeMap$type8, _uniqBy;
|
|
20257
21445
|
var newValue = _objectSpread2({}, value);
|
|
20258
21446
|
// 原订单商品
|
|
20259
21447
|
var originTradeGoodList = getGoodDetails({
|
|
@@ -20264,49 +21452,49 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20264
21452
|
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type8 = typeMap$5[type]) === null || _typeMap$type8 === void 0 ? void 0 : _typeMap$type8.key)] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), 'uuid')) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
20265
21453
|
return skuList.includes(item.uuid);
|
|
20266
21454
|
});
|
|
20267
|
-
console.log('商品发生变化', newValue[
|
|
21455
|
+
// console.log('商品发生变化', newValue[`${typeMap?.[type]?.key}`]);
|
|
20268
21456
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20269
|
-
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21457
|
+
}, [value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type9 = typeMap$5[type]) === null || _typeMap$type9 === void 0 ? void 0 : _typeMap$type9.key)], isStrict]);
|
|
20270
21458
|
var changeTypeHandle = function changeTypeHandle(val) {
|
|
20271
|
-
var _value$typeMap$type$t, _typeMap$
|
|
21459
|
+
var _value$typeMap$type$t, _typeMap$type10, _typeMap$type11;
|
|
20272
21460
|
var typeName = val === null || val === void 0 ? void 0 : val[0];
|
|
20273
|
-
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$
|
|
21461
|
+
if (typeName === (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t = value[(_typeMap$type10 = typeMap$5[type]) === null || _typeMap$type10 === void 0 ? void 0 : _typeMap$type10.typeName]) === null || _value$typeMap$type$t === void 0 ? void 0 : _value$typeMap$type$t[0])) return;
|
|
20274
21462
|
// const systemOrderNo = value?.[typeMap[type]?.systemOrderNo];
|
|
20275
21463
|
var newValue = _objectSpread2({}, value);
|
|
20276
|
-
newValue[(_typeMap$
|
|
21464
|
+
newValue[(_typeMap$type11 = typeMap$5[type]) === null || _typeMap$type11 === void 0 ? void 0 : _typeMap$type11.typeName] = val;
|
|
20277
21465
|
if (typeName === '1') {
|
|
20278
|
-
var _typeMap$
|
|
20279
|
-
newValue[(_typeMap$
|
|
21466
|
+
var _typeMap$type12;
|
|
21467
|
+
newValue[(_typeMap$type12 = typeMap$5[type]) === null || _typeMap$type12 === void 0 ? void 0 : _typeMap$type12.key] = getGoodDetails({
|
|
20280
21468
|
mode: isStrict
|
|
20281
21469
|
});
|
|
20282
21470
|
} else if (typeName === '2') {
|
|
20283
|
-
var _typeMap$
|
|
21471
|
+
var _typeMap$type13;
|
|
20284
21472
|
// 切换到非原单,清空列表
|
|
20285
|
-
newValue[(_typeMap$
|
|
21473
|
+
newValue[(_typeMap$type13 = typeMap$5[type]) === null || _typeMap$type13 === void 0 ? void 0 : _typeMap$type13.key] = [];
|
|
20286
21474
|
}
|
|
20287
21475
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20288
21476
|
};
|
|
20289
21477
|
var changeGoodHandle = function changeGoodHandle(val) {
|
|
20290
|
-
var _typeMap$
|
|
21478
|
+
var _typeMap$type14;
|
|
20291
21479
|
var newValue = _objectSpread2({}, value);
|
|
20292
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20293
|
-
var _typeMap$
|
|
20294
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20295
|
-
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21480
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type14 = typeMap$5[type]) === null || _typeMap$type14 === void 0 ? void 0 : _typeMap$type14.key)] = (val || []).map(function (item) {
|
|
21481
|
+
var _typeMap$type15, _typeMap$type16;
|
|
21482
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type15 = typeMap$5[type]) === null || _typeMap$type15 === void 0 ? void 0 : _typeMap$type15.formatDefaultField.money)] = 0;
|
|
21483
|
+
item["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type16 = typeMap$5[type]) === null || _typeMap$type16 === void 0 ? void 0 : _typeMap$type16.formatDefaultField.share)] = 0;
|
|
20296
21484
|
return item;
|
|
20297
21485
|
});
|
|
20298
21486
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20299
21487
|
};
|
|
20300
21488
|
var changeSystemOrderHandle = function changeSystemOrderHandle(val) {
|
|
20301
|
-
var _typeMap$
|
|
21489
|
+
var _typeMap$type17, _value$typeMap$type$t2, _typeMap$type18, _value$typeMap$type$t3, _typeMap$type20;
|
|
20302
21490
|
var newValue = _objectSpread2({}, value);
|
|
20303
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20304
|
-
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$
|
|
20305
|
-
var _typeMap$
|
|
20306
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
20307
|
-
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$
|
|
20308
|
-
var _typeMap$
|
|
20309
|
-
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21491
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type17 = typeMap$5[type]) === null || _typeMap$type17 === void 0 ? void 0 : _typeMap$type17.systemOrderNo)] = val;
|
|
21492
|
+
if (['2'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t2 = value[(_typeMap$type18 = typeMap$5[type]) === null || _typeMap$type18 === void 0 ? void 0 : _typeMap$type18.typeName]) === null || _value$typeMap$type$t2 === void 0 ? void 0 : _value$typeMap$type$t2[0])) {
|
|
21493
|
+
var _typeMap$type19;
|
|
21494
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type19 = typeMap$5[type]) === null || _typeMap$type19 === void 0 ? void 0 : _typeMap$type19.key)] = [];
|
|
21495
|
+
} else if (['1'].includes(value === null || value === void 0 ? void 0 : (_value$typeMap$type$t3 = value[(_typeMap$type20 = typeMap$5[type]) === null || _typeMap$type20 === void 0 ? void 0 : _typeMap$type20.typeName]) === null || _value$typeMap$type$t3 === void 0 ? void 0 : _value$typeMap$type$t3[0])) {
|
|
21496
|
+
var _typeMap$type21;
|
|
21497
|
+
newValue["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type21 = typeMap$5[type]) === null || _typeMap$type21 === void 0 ? void 0 : _typeMap$type21.key)] = getGoodDetails({
|
|
20310
21498
|
mode: isStrict,
|
|
20311
21499
|
sysOrderNo: val
|
|
20312
21500
|
});
|
|
@@ -20314,11 +21502,11 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20314
21502
|
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
20315
21503
|
};
|
|
20316
21504
|
var getGoodDetails = function getGoodDetails(_ref4) {
|
|
20317
|
-
var _typeMap$
|
|
21505
|
+
var _typeMap$type22, _typeMap$type23, _order$details;
|
|
20318
21506
|
var mode = _ref4.mode,
|
|
20319
21507
|
sysOrderNo = _ref4.sysOrderNo;
|
|
20320
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
20321
|
-
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21508
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type22 = typeMap$5[type]) === null || _typeMap$type22 === void 0 ? void 0 : _typeMap$type22.systemOrder];
|
|
21509
|
+
var systemOrderNo = sysOrderNo !== null && sysOrderNo !== void 0 ? sysOrderNo : value === null || value === void 0 ? void 0 : value[(_typeMap$type23 = typeMap$5[type]) === null || _typeMap$type23 === void 0 ? void 0 : _typeMap$type23.systemOrderNo];
|
|
20322
21510
|
var order = systemOrderNo && ((systemOrder === null || systemOrder === void 0 ? void 0 : systemOrder.orders) || []).find(function (order) {
|
|
20323
21511
|
return order.code === systemOrderNo;
|
|
20324
21512
|
});
|
|
@@ -20329,62 +21517,66 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20329
21517
|
}) : goodDetails;
|
|
20330
21518
|
};
|
|
20331
21519
|
var handleModeChange = function handleModeChange(mode) {
|
|
20332
|
-
var _value$typeMap$type$t4, _typeMap$
|
|
20333
|
-
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$
|
|
21520
|
+
var _value$typeMap$type$t4, _typeMap$type24, _typeMap$type25;
|
|
21521
|
+
var isOriginalOrder = (value === null || value === void 0 ? void 0 : (_value$typeMap$type$t4 = value[(_typeMap$type24 = typeMap$5[type]) === null || _typeMap$type24 === void 0 ? void 0 : _typeMap$type24.typeName]) === null || _value$typeMap$type$t4 === void 0 ? void 0 : _value$typeMap$type$t4[0]) === '1';
|
|
20334
21522
|
setIsStrict(mode);
|
|
20335
21523
|
if (!isOriginalOrder) return;
|
|
20336
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$
|
|
21524
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, (_typeMap$type25 = typeMap$5[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.key, getGoodDetails({
|
|
20337
21525
|
mode: mode
|
|
20338
21526
|
}))));
|
|
20339
21527
|
};
|
|
20340
21528
|
//系统单选择后展示选择商品按钮,系统单未选择的时候不展示
|
|
20341
|
-
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21529
|
+
var systemOrder = value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$5[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.systemOrder];
|
|
20342
21530
|
var showErpGoodsBtn = type === 'GY_RETURN_GOODS' && systemOrder && systemOrder.orderNo && !((_systemOrder$orders = systemOrder.orders) === null || _systemOrder$orders === void 0 ? void 0 : _systemOrder$orders.length);
|
|
20343
|
-
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$
|
|
21531
|
+
var showChangeBtn = !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type27 = typeMap$5[type]) === null || _typeMap$type27 === void 0 ? void 0 : _typeMap$type27.systemOrderNo]);
|
|
20344
21532
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
20345
21533
|
gutter: 8,
|
|
20346
21534
|
wrap: true
|
|
20347
21535
|
}, /*#__PURE__*/React.createElement(Col, {
|
|
20348
21536
|
className: "gutter-row",
|
|
20349
21537
|
xs: {
|
|
20350
|
-
span:
|
|
21538
|
+
span: 12
|
|
20351
21539
|
},
|
|
20352
21540
|
sm: {
|
|
20353
|
-
span:
|
|
21541
|
+
span: 8
|
|
20354
21542
|
}
|
|
20355
21543
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
20356
21544
|
style: {
|
|
20357
|
-
marginBottom: '8px'
|
|
21545
|
+
marginBottom: '8px',
|
|
21546
|
+
width: '100%'
|
|
20358
21547
|
},
|
|
20359
21548
|
disabled: disabled,
|
|
20360
21549
|
allowClear: false,
|
|
20361
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21550
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type28 = typeMap$5[type]) === null || _typeMap$type28 === void 0 ? void 0 : _typeMap$type28.systemOrderNo)],
|
|
20362
21551
|
onChange: function onChange(val) {
|
|
20363
21552
|
return changeSystemOrderHandle(val);
|
|
20364
21553
|
},
|
|
20365
21554
|
placeholder: "\u9009\u62E9\u9000\u8D27\u7684\u7CFB\u7EDF\u5355"
|
|
20366
|
-
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$
|
|
21555
|
+
}, ((value === null || value === void 0 ? void 0 : (_value$typeMap$type$s5 = value[(_typeMap$type29 = typeMap$5[type]) === null || _typeMap$type29 === void 0 ? void 0 : _typeMap$type29.systemOrder]) === null || _value$typeMap$type$s5 === void 0 ? void 0 : _value$typeMap$type$s5.showOrderInfo) || []).map(function (item) {
|
|
20367
21556
|
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
21557
|
+
className: styles$5.systemNoDisabled,
|
|
20368
21558
|
key: item.billNo,
|
|
20369
21559
|
value: item.billNo,
|
|
20370
|
-
label: item.billNo
|
|
20371
|
-
|
|
21560
|
+
label: item.billNo,
|
|
21561
|
+
disabled: item === null || item === void 0 ? void 0 : item.cancel
|
|
21562
|
+
}, (item === null || item === void 0 ? void 0 : item.cancel) ? '[已取消]' : '', " ", item.billNo);
|
|
20372
21563
|
}))), /*#__PURE__*/React.createElement(Col, {
|
|
20373
21564
|
className: "gutter-row",
|
|
20374
21565
|
xs: {
|
|
20375
|
-
span:
|
|
21566
|
+
span: 12
|
|
20376
21567
|
},
|
|
20377
21568
|
sm: {
|
|
20378
|
-
span:
|
|
21569
|
+
span: 4
|
|
20379
21570
|
}
|
|
20380
21571
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
20381
21572
|
style: {
|
|
20382
|
-
marginBottom: '8px'
|
|
21573
|
+
marginBottom: '8px',
|
|
21574
|
+
width: '100%'
|
|
20383
21575
|
},
|
|
20384
|
-
disabled: disabled,
|
|
21576
|
+
disabled: isSettingConfig ? !isSettingConfig : disabled,
|
|
20385
21577
|
allowClear: false,
|
|
20386
21578
|
options: reasonList,
|
|
20387
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21579
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type30 = typeMap$5[type]) === null || _typeMap$type30 === void 0 ? void 0 : _typeMap$type30.typeName)],
|
|
20388
21580
|
onChange: function onChange(val) {
|
|
20389
21581
|
return changeTypeHandle(val);
|
|
20390
21582
|
}
|
|
@@ -20396,7 +21588,7 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20396
21588
|
canUpdateNumber: showChangeBtn,
|
|
20397
21589
|
showChangeBtn: showChangeBtn,
|
|
20398
21590
|
shopCode: value === null || value === void 0 ? void 0 : value.shopCode,
|
|
20399
|
-
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$
|
|
21591
|
+
value: value === null || value === void 0 ? void 0 : value["".concat(typeMap$5 === null || typeMap$5 === void 0 ? void 0 : (_typeMap$type31 = typeMap$5[type]) === null || _typeMap$type31 === void 0 ? void 0 : _typeMap$type31.key)],
|
|
20400
21592
|
onChange: function onChange(val) {
|
|
20401
21593
|
return changeGoodHandle(val);
|
|
20402
21594
|
},
|
|
@@ -20413,4 +21605,247 @@ var GyReturnGoods = function GyReturnGoods(props) {
|
|
|
20413
21605
|
})));
|
|
20414
21606
|
};
|
|
20415
21607
|
|
|
20416
|
-
|
|
21608
|
+
var css_248z$d = ".index-module_imageBox__1f2AI {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1f2AI .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI .ant-upload .index-module_addBtn__1DY59 {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1f2AI > span {\n max-width: 100%;\n}\n.index-module_tips__1XQjf {\n color: #4E5969;\n font-size: 12px;\n}\n";
|
|
21609
|
+
var styles$6 = {"imageBox":"index-module_imageBox__1f2AI","addBtn":"index-module_addBtn__1DY59","tips":"index-module_tips__1XQjf"};
|
|
21610
|
+
styleInject(css_248z$d);
|
|
21611
|
+
|
|
21612
|
+
var _excluded$r = ["maxCount", "maxSize", "onChange", "value", "disabled", "hostUrl", "canDownload", "actionUrl"];
|
|
21613
|
+
var Dragger$1 = Upload.Dragger;
|
|
21614
|
+
var fn$4 = function fn() {
|
|
21615
|
+
return void 0;
|
|
21616
|
+
};
|
|
21617
|
+
var videoSuffixList = ['mp4', 'avi', 'mpeg', 'asf', 'mov', '3gp', 'wmv', 'rmvb'];
|
|
21618
|
+
var KmVideo = function KmVideo(_ref) {
|
|
21619
|
+
var _ref$maxCount = _ref.maxCount,
|
|
21620
|
+
maxCount = _ref$maxCount === void 0 ? 20 : _ref$maxCount,
|
|
21621
|
+
_ref$maxSize = _ref.maxSize,
|
|
21622
|
+
maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
|
|
21623
|
+
_ref$onChange = _ref.onChange,
|
|
21624
|
+
onChange = _ref$onChange === void 0 ? fn$4 : _ref$onChange,
|
|
21625
|
+
_ref$value = _ref.value,
|
|
21626
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
21627
|
+
_ref$disabled = _ref.disabled,
|
|
21628
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
21629
|
+
_ref$hostUrl = _ref.hostUrl,
|
|
21630
|
+
hostUrl = _ref$hostUrl === void 0 ? '' : _ref$hostUrl,
|
|
21631
|
+
_ref$canDownload = _ref.canDownload,
|
|
21632
|
+
canDownload = _ref$canDownload === void 0 ? false : _ref$canDownload,
|
|
21633
|
+
_ref$actionUrl = _ref.actionUrl,
|
|
21634
|
+
actionUrl = _ref$actionUrl === void 0 ? '/qy/common/uploadWorkOrderImg' : _ref$actionUrl,
|
|
21635
|
+
resetProps = _objectWithoutProperties(_ref, _excluded$r);
|
|
21636
|
+
var _useState = useState(false),
|
|
21637
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21638
|
+
visible = _useState2[0],
|
|
21639
|
+
setVisible = _useState2[1];
|
|
21640
|
+
var _useState3 = useState(''),
|
|
21641
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
21642
|
+
fileUrl = _useState4[0],
|
|
21643
|
+
setFileUrl = _useState4[1];
|
|
21644
|
+
var _useState5 = useState(''),
|
|
21645
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
21646
|
+
fileType = _useState6[0],
|
|
21647
|
+
setFileType = _useState6[1];
|
|
21648
|
+
var _useState7 = useState(''),
|
|
21649
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
21650
|
+
fileName = _useState8[0],
|
|
21651
|
+
setFileName = _useState8[1];
|
|
21652
|
+
var valueRef = useRef(value);
|
|
21653
|
+
var uploadCount = useRef(0);
|
|
21654
|
+
var _useState9 = useState(false),
|
|
21655
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
21656
|
+
uploading = _useState10[0],
|
|
21657
|
+
setUploading = _useState10[1];
|
|
21658
|
+
var fileList = useMemo(function () {
|
|
21659
|
+
return value.map(function (t, i) {
|
|
21660
|
+
return _objectSpread2(_objectSpread2({}, t), {}, {
|
|
21661
|
+
percent: 100,
|
|
21662
|
+
uid: i + ''
|
|
21663
|
+
});
|
|
21664
|
+
});
|
|
21665
|
+
}, [value]);
|
|
21666
|
+
useEffect(function () {
|
|
21667
|
+
valueRef.current = value;
|
|
21668
|
+
}, [value]);
|
|
21669
|
+
var asyncUpload = /*#__PURE__*/function () {
|
|
21670
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
|
|
21671
|
+
var formData, fileName, _yield$request, success, data;
|
|
21672
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
21673
|
+
while (1) switch (_context.prev = _context.next) {
|
|
21674
|
+
case 0:
|
|
21675
|
+
setUploading(true);
|
|
21676
|
+
uploadCount.current++;
|
|
21677
|
+
formData = new FormData();
|
|
21678
|
+
formData.append('file', file);
|
|
21679
|
+
fileName = "".concat(hooks(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss'), "_").concat(file.name);
|
|
21680
|
+
formData.append('fileName', fileName);
|
|
21681
|
+
_context.prev = 6;
|
|
21682
|
+
_context.next = 9;
|
|
21683
|
+
return request(actionUrl, {
|
|
21684
|
+
method: 'post',
|
|
21685
|
+
body: formData
|
|
21686
|
+
});
|
|
21687
|
+
case 9:
|
|
21688
|
+
_yield$request = _context.sent;
|
|
21689
|
+
success = _yield$request.success;
|
|
21690
|
+
data = _yield$request.data;
|
|
21691
|
+
if (success) {
|
|
21692
|
+
handleChange([].concat(_toConsumableArray(valueRef.current), [{
|
|
21693
|
+
kmVideoName: file.name,
|
|
21694
|
+
kmVideoUrl: "".concat(hostUrl, "/").concat(data)
|
|
21695
|
+
}]));
|
|
21696
|
+
}
|
|
21697
|
+
_context.next = 18;
|
|
21698
|
+
break;
|
|
21699
|
+
case 15:
|
|
21700
|
+
_context.prev = 15;
|
|
21701
|
+
_context.t0 = _context["catch"](6);
|
|
21702
|
+
message.error('文件上传失败');
|
|
21703
|
+
case 18:
|
|
21704
|
+
_context.prev = 18;
|
|
21705
|
+
uploadCount.current--;
|
|
21706
|
+
if (uploadCount.current < 1) {
|
|
21707
|
+
setUploading(false);
|
|
21708
|
+
}
|
|
21709
|
+
return _context.finish(18);
|
|
21710
|
+
case 22:
|
|
21711
|
+
case "end":
|
|
21712
|
+
return _context.stop();
|
|
21713
|
+
}
|
|
21714
|
+
}, _callee, null, [[6, 15, 18, 22]]);
|
|
21715
|
+
}));
|
|
21716
|
+
return function asyncUpload(_x) {
|
|
21717
|
+
return _ref2.apply(this, arguments);
|
|
21718
|
+
};
|
|
21719
|
+
}();
|
|
21720
|
+
var download = function download(url, name) {
|
|
21721
|
+
if (url === null || url === void 0 ? void 0 : url.startsWith('https://erp-storage-video.oss-cn-beijing.aliyuncs.com')) {
|
|
21722
|
+
window.open(url);
|
|
21723
|
+
return;
|
|
21724
|
+
}
|
|
21725
|
+
fetch(url).then(function (res) {
|
|
21726
|
+
return res.blob();
|
|
21727
|
+
}).then(function (blob) {
|
|
21728
|
+
var a = document.createElement('a');
|
|
21729
|
+
document.body.appendChild(a);
|
|
21730
|
+
a.style.display = 'none';
|
|
21731
|
+
var url = window.URL.createObjectURL(blob);
|
|
21732
|
+
a.href = url;
|
|
21733
|
+
a.download = name;
|
|
21734
|
+
a.click();
|
|
21735
|
+
document.body.removeChild(a);
|
|
21736
|
+
window.URL.revokeObjectURL(url);
|
|
21737
|
+
});
|
|
21738
|
+
};
|
|
21739
|
+
var handleChange = function handleChange(list) {
|
|
21740
|
+
valueRef.current = list;
|
|
21741
|
+
onChange(list);
|
|
21742
|
+
};
|
|
21743
|
+
// 手动上传模式, 一直返回false
|
|
21744
|
+
var beforeUpload = function beforeUpload(file, fileList) {
|
|
21745
|
+
// console.log('beforeUpload', file);
|
|
21746
|
+
var size = file.size / 1024 / 1024 < maxSize;
|
|
21747
|
+
// TODO: 批量提交的时候
|
|
21748
|
+
if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) + value.length > maxCount) {
|
|
21749
|
+
message.error("\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u4E2A\u6587\u4EF6\uFF01"));
|
|
21750
|
+
return Upload.LIST_IGNORE;
|
|
21751
|
+
}
|
|
21752
|
+
if (!size) {
|
|
21753
|
+
message.error("\u6587\u4EF6\u4E0D\u80FD\u5927\u4E8E".concat(maxSize, "MB"));
|
|
21754
|
+
return Upload.LIST_IGNORE;
|
|
21755
|
+
}
|
|
21756
|
+
asyncUpload(file);
|
|
21757
|
+
return Upload.LIST_IGNORE;
|
|
21758
|
+
};
|
|
21759
|
+
var onRemove = function onRemove(file) {
|
|
21760
|
+
var newValue = value.filter(function (item) {
|
|
21761
|
+
return item.kmVideoUrl !== file.kmVideoUrl;
|
|
21762
|
+
});
|
|
21763
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
21764
|
+
};
|
|
21765
|
+
var onPreview = function onPreview(file) {
|
|
21766
|
+
var _file$url;
|
|
21767
|
+
var fileArr = file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('.');
|
|
21768
|
+
var fileType = fileArr[fileArr.length - 1];
|
|
21769
|
+
if (videoSuffixList.includes(fileType.toLowerCase())) {
|
|
21770
|
+
setFileUrl(file === null || file === void 0 ? void 0 : file.url);
|
|
21771
|
+
setFileName(file === null || file === void 0 ? void 0 : file.name);
|
|
21772
|
+
setFileType('video');
|
|
21773
|
+
setVisible(true);
|
|
21774
|
+
} else {
|
|
21775
|
+
window.open(file === null || file === void 0 ? void 0 : file.url);
|
|
21776
|
+
}
|
|
21777
|
+
};
|
|
21778
|
+
var handleCancel = function handleCancel() {
|
|
21779
|
+
setFileUrl('');
|
|
21780
|
+
setFileName('');
|
|
21781
|
+
setVisible(false);
|
|
21782
|
+
};
|
|
21783
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
21784
|
+
spinning: uploading
|
|
21785
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
21786
|
+
className: styles$6.tips
|
|
21787
|
+
}, "\u5141\u8BB8\u4E0A\u4F20", maxCount, "\u4E2A\u6587\u4EF6\uFF0C\u652F\u6301", videoSuffixList.join('/'), "\u683C\u5F0F\u6587\u4EF6"), /*#__PURE__*/React.createElement("div", {
|
|
21788
|
+
className: styles$6.imageBox
|
|
21789
|
+
}, /*#__PURE__*/React.createElement(Dragger$1, _objectSpread2({
|
|
21790
|
+
disabled: disabled,
|
|
21791
|
+
multiple: true,
|
|
21792
|
+
name: "file",
|
|
21793
|
+
maxCount: maxCount,
|
|
21794
|
+
beforeUpload: beforeUpload,
|
|
21795
|
+
onPreview: onPreview,
|
|
21796
|
+
fileList: fileList.map(function (item) {
|
|
21797
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
21798
|
+
url: item.kmVideoUrl,
|
|
21799
|
+
name: item.kmVideoName
|
|
21800
|
+
});
|
|
21801
|
+
}),
|
|
21802
|
+
onRemove: onRemove,
|
|
21803
|
+
accept: ".".concat(videoSuffixList.join(',.')),
|
|
21804
|
+
iconRender: function iconRender(file) {
|
|
21805
|
+
return /*#__PURE__*/React.createElement(Space, {
|
|
21806
|
+
align: "center"
|
|
21807
|
+
}, /*#__PURE__*/React.createElement(VideoCameraTwoTone, {
|
|
21808
|
+
style: {
|
|
21809
|
+
fontSize: 16
|
|
21810
|
+
}
|
|
21811
|
+
}), file.kmVideoType && "".concat(file.kmVideoType));
|
|
21812
|
+
}
|
|
21813
|
+
}, resetProps), /*#__PURE__*/React.createElement("span", {
|
|
21814
|
+
className: styles$6.addBtn
|
|
21815
|
+
}, "+"), /*#__PURE__*/React.createElement("p", {
|
|
21816
|
+
className: styles$6.addBtn
|
|
21817
|
+
}, "\u9009\u62E9\u6587\u4EF6")), /*#__PURE__*/React.createElement(Modal, {
|
|
21818
|
+
visible: visible,
|
|
21819
|
+
title: fileName,
|
|
21820
|
+
footer: null,
|
|
21821
|
+
onCancel: handleCancel
|
|
21822
|
+
}, canDownload ? /*#__PURE__*/React.createElement(Button, {
|
|
21823
|
+
type: "link",
|
|
21824
|
+
onClick: function onClick() {
|
|
21825
|
+
return download(fileUrl, fileName);
|
|
21826
|
+
}
|
|
21827
|
+
}, "\u4E0B\u8F7D") : /*#__PURE__*/React.createElement(CopyToClipboard, {
|
|
21828
|
+
text: fileUrl,
|
|
21829
|
+
onCopy: function onCopy() {
|
|
21830
|
+
message.success('复制成功');
|
|
21831
|
+
}
|
|
21832
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
21833
|
+
type: "link"
|
|
21834
|
+
}, "\u4E0B\u8F7D\u5730\u5740")), fileType === 'pic' ? /*#__PURE__*/React.createElement("img", {
|
|
21835
|
+
alt: "example",
|
|
21836
|
+
style: {
|
|
21837
|
+
width: '100%'
|
|
21838
|
+
},
|
|
21839
|
+
src: fileUrl
|
|
21840
|
+
}) : /*#__PURE__*/React.createElement("video", {
|
|
21841
|
+
style: {
|
|
21842
|
+
width: '100%',
|
|
21843
|
+
height: '100%'
|
|
21844
|
+
},
|
|
21845
|
+
autoPlay: true,
|
|
21846
|
+
controls: true,
|
|
21847
|
+
src: fileUrl
|
|
21848
|
+
}))));
|
|
21849
|
+
};
|
|
21850
|
+
|
|
21851
|
+
export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, index$1 as ApaasUploadProAsync, AsyncSelect, bsE3Reissue as BsE3Reissue, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$3 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, CopyTextIcon, ExpressLogistics, Goods, index$4 as GoodsTable, GyReissue, GyReturnGoods as GyReturn, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, KmVideo, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, PublicReissue, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods, columnsBaseInfoMap, erpColumnsMap, erpFormValidator, index$2 as erpModalColumnsMap, getColumns$4 as getGyColumns, getColumns$5 as getJstColumns, getColumns$6 as getKmColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns };
|