@kmkf-fe-packages/basic-components 2.2.3-rc.0 → 2.2.3-rc.2
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 +767 -310
- package/dist/index.js +767 -306
- package/dist/src/apaas/SubForm/index.d.ts +2 -0
- package/dist/src/constants/index.d.ts +1 -0
- package/dist/src/constants/skx.d.ts +3 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/jst/Goods/index.d.ts +1 -0
- package/dist/src/skx/Goods/index.d.ts +6 -0
- package/dist/src/skx/IdInputSelect/index.d.ts +13 -0
- package/dist/src/skx/common/index.d.ts +6 -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
|
-
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,
|
|
2
|
+
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Tooltip, Popover, Table, Tabs, ConfigProvider, Pagination, Typography, Skeleton, Tag } from 'antd';
|
|
3
|
+
import { EyeOutlined, DeleteOutlined, CloseOutlined, MinusCircleFilled, PlusCircleFilled, CopyOutlined, CloseCircleOutlined, CaretUpOutlined, 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, 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, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog } from '@kmkf-fe-packages/kmkf-utils';
|
|
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, updateWlnGoodsHandle, updateWdtGoodsHandle, updateBsE3GoodsHandle, updateGyGoodsHandle, updateJstGoodsHandle, updateKmGoodsHandle, jstMergeIdenticalGoods, msgTypeCh, pushGyLog, skxSystemOrderBackValues, updateSkxGoodsHandle } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
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
|
|
64
|
-
};
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
t[e] = r.value;
|
|
63
|
+
return exports;
|
|
64
|
+
};
|
|
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
|
+
};
|
|
242
236
|
}
|
|
243
|
-
|
|
237
|
+
function doneResult() {
|
|
238
|
+
return {
|
|
239
|
+
value: undefined,
|
|
240
|
+
done: !0
|
|
241
|
+
};
|
|
242
|
+
}
|
|
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({
|
|
@@ -8044,6 +8044,29 @@ function withFormItem(WrappedComponent) {
|
|
|
8044
8044
|
*/
|
|
8045
8045
|
var extendRequest = extend$1({});
|
|
8046
8046
|
|
|
8047
|
+
function HoverTableRowDeleteIcon(_ref) {
|
|
8048
|
+
var index = _ref.index,
|
|
8049
|
+
hoveredRowIndex = _ref.hoveredRowIndex,
|
|
8050
|
+
handleClick = _ref.handleClick;
|
|
8051
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
8052
|
+
style: {
|
|
8053
|
+
display: hoveredRowIndex === index ? 'none' : 'inline'
|
|
8054
|
+
}
|
|
8055
|
+
}, index + 1), /*#__PURE__*/React.createElement("span", {
|
|
8056
|
+
style: {
|
|
8057
|
+
cursor: 'pointer'
|
|
8058
|
+
},
|
|
8059
|
+
onClick: handleClick,
|
|
8060
|
+
title: "\u5220\u9664"
|
|
8061
|
+
}, /*#__PURE__*/React.createElement(MinusCircleFilled, {
|
|
8062
|
+
style: {
|
|
8063
|
+
fontSize: 18,
|
|
8064
|
+
color: '#1890ff',
|
|
8065
|
+
display: hoveredRowIndex === index ? 'inline' : 'none'
|
|
8066
|
+
}
|
|
8067
|
+
})));
|
|
8068
|
+
}
|
|
8069
|
+
|
|
8047
8070
|
var WidgetMap = {
|
|
8048
8071
|
INPUT: 'input',
|
|
8049
8072
|
TEXTAREA: 'textarea'
|
|
@@ -8063,7 +8086,9 @@ var SubForm = function SubForm(props) {
|
|
|
8063
8086
|
correlationList = _props$subConfig.correlationList,
|
|
8064
8087
|
tableHeader = props.tableHeader,
|
|
8065
8088
|
disabled = props.disabled,
|
|
8066
|
-
platform = props.platform
|
|
8089
|
+
platform = props.platform,
|
|
8090
|
+
manual = props.manual,
|
|
8091
|
+
maxCount = props.maxCount;
|
|
8067
8092
|
var ref = useRef(null);
|
|
8068
8093
|
var isRequest = useRef(false);
|
|
8069
8094
|
var _useState = useState(false),
|
|
@@ -8090,6 +8115,10 @@ var SubForm = function SubForm(props) {
|
|
|
8090
8115
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
8091
8116
|
hasMore = _useState12[0],
|
|
8092
8117
|
setHasMore = _useState12[1];
|
|
8118
|
+
var _useState13 = useState(null),
|
|
8119
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
8120
|
+
hoveredRowIndex = _useState14[0],
|
|
8121
|
+
setHoveredRowIndex = _useState14[1];
|
|
8093
8122
|
var updateHandle = function updateHandle(val, index, type) {
|
|
8094
8123
|
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
8095
8124
|
var valueItem = tableHeader.find(function (t) {
|
|
@@ -8123,11 +8152,14 @@ var SubForm = function SubForm(props) {
|
|
|
8123
8152
|
title: '序号',
|
|
8124
8153
|
width: 50,
|
|
8125
8154
|
render: function render(val, record, index) {
|
|
8126
|
-
return /*#__PURE__*/React.createElement(
|
|
8127
|
-
|
|
8128
|
-
|
|
8155
|
+
return /*#__PURE__*/React.createElement(HoverTableRowDeleteIcon, {
|
|
8156
|
+
index: index,
|
|
8157
|
+
hoveredRowIndex: hoveredRowIndex,
|
|
8158
|
+
handleClick: function handleClick() {
|
|
8159
|
+
return deleteHandle(record.uuid);
|
|
8129
8160
|
}
|
|
8130
|
-
}
|
|
8161
|
+
});
|
|
8162
|
+
// return <div style={{ width: 25 }}>{index + 1}</div>;
|
|
8131
8163
|
}
|
|
8132
8164
|
}].concat(_toConsumableArray(newTableHeader.map(function (t) {
|
|
8133
8165
|
return {
|
|
@@ -8168,13 +8200,28 @@ var SubForm = function SubForm(props) {
|
|
|
8168
8200
|
dataIndex: 'operation',
|
|
8169
8201
|
title: '操作',
|
|
8170
8202
|
width: 70,
|
|
8203
|
+
fixed: 'right',
|
|
8171
8204
|
render: function render(val, record, index) {
|
|
8172
|
-
return /*#__PURE__*/React.createElement(
|
|
8173
|
-
|
|
8205
|
+
return /*#__PURE__*/React.createElement(Space, null, manual && /*#__PURE__*/React.createElement(Tooltip, {
|
|
8206
|
+
title: "\u6DFB\u52A0"
|
|
8207
|
+
}, /*#__PURE__*/React.createElement(PlusCircleFilled, {
|
|
8208
|
+
style: {
|
|
8209
|
+
fontSize: 18,
|
|
8210
|
+
color: '#1890ff'
|
|
8211
|
+
},
|
|
8212
|
+
onClick: function onClick() {
|
|
8213
|
+
return addHandle(index + 1);
|
|
8214
|
+
}
|
|
8215
|
+
})), /*#__PURE__*/React.createElement(Tooltip, {
|
|
8216
|
+
title: "\u5220\u9664"
|
|
8217
|
+
}, /*#__PURE__*/React.createElement(MinusCircleFilled, {
|
|
8218
|
+
style: {
|
|
8219
|
+
fontSize: 18
|
|
8220
|
+
},
|
|
8174
8221
|
onClick: function onClick() {
|
|
8175
8222
|
return deleteHandle(record.uuid);
|
|
8176
8223
|
}
|
|
8177
|
-
}
|
|
8224
|
+
})));
|
|
8178
8225
|
}
|
|
8179
8226
|
}]);
|
|
8180
8227
|
var columsSearch = useMemo(function () {
|
|
@@ -8200,6 +8247,12 @@ var SubForm = function SubForm(props) {
|
|
|
8200
8247
|
return prv;
|
|
8201
8248
|
}, {});
|
|
8202
8249
|
}, [newTableHeader]);
|
|
8250
|
+
var defaultValueMap = useMemo(function () {
|
|
8251
|
+
return Object.keys(valueMap).reduce(function (prv, next) {
|
|
8252
|
+
prv["".concat(valueMap[next])] = '';
|
|
8253
|
+
return prv;
|
|
8254
|
+
}, {});
|
|
8255
|
+
}, [valueMap]);
|
|
8203
8256
|
var selectOptions = useMemo(function () {
|
|
8204
8257
|
var _options$;
|
|
8205
8258
|
var options = newTableHeader.map(function (item) {
|
|
@@ -8217,6 +8270,17 @@ var SubForm = function SubForm(props) {
|
|
|
8217
8270
|
});
|
|
8218
8271
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
8219
8272
|
};
|
|
8273
|
+
var addHandle = function addHandle(index) {
|
|
8274
|
+
if (maxCount && (value === null || value === void 0 ? void 0 : value.length) >= maxCount) {
|
|
8275
|
+
message.error("\u8BE5\u5B50\u8868\u5355\u6700\u591A\u6DFB\u52A0".concat(maxCount, "\u6761"));
|
|
8276
|
+
return;
|
|
8277
|
+
}
|
|
8278
|
+
var newValue = _toConsumableArray(value || []);
|
|
8279
|
+
newValue.splice(index, 0, _objectSpread2(_objectSpread2({}, defaultValueMap), {}, {
|
|
8280
|
+
uuid: uuid()
|
|
8281
|
+
}));
|
|
8282
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
8283
|
+
};
|
|
8220
8284
|
var onScrollCapture = function onScrollCapture(e) {
|
|
8221
8285
|
if (e.target.scrollTop + e.target.clientHeight >= e.target.scrollHeight - 20) {
|
|
8222
8286
|
if (hasMore && !isRequest.current) {
|
|
@@ -8424,7 +8488,22 @@ var SubForm = function SubForm(props) {
|
|
|
8424
8488
|
x: '100%'
|
|
8425
8489
|
},
|
|
8426
8490
|
locale: {
|
|
8427
|
-
emptyText:
|
|
8491
|
+
emptyText: !disabled && manual ? /*#__PURE__*/React.createElement("span", null, "\u6682\u65E0\u6570\u636E,", /*#__PURE__*/React.createElement(Button, {
|
|
8492
|
+
type: "link",
|
|
8493
|
+
onClick: function onClick() {
|
|
8494
|
+
return addHandle(0);
|
|
8495
|
+
}
|
|
8496
|
+
}, "\u70B9\u51FB\u6DFB\u52A0")) : '暂无数据'
|
|
8497
|
+
},
|
|
8498
|
+
onRow: function onRow(_, index) {
|
|
8499
|
+
return {
|
|
8500
|
+
onMouseEnter: function onMouseEnter() {
|
|
8501
|
+
return setHoveredRowIndex(index !== null && index !== void 0 ? index : null);
|
|
8502
|
+
},
|
|
8503
|
+
onMouseLeave: function onMouseLeave() {
|
|
8504
|
+
return setHoveredRowIndex(null);
|
|
8505
|
+
}
|
|
8506
|
+
};
|
|
8428
8507
|
}
|
|
8429
8508
|
}));
|
|
8430
8509
|
};
|
|
@@ -11721,7 +11800,7 @@ var typeInitValueMap = {
|
|
|
11721
11800
|
}]
|
|
11722
11801
|
};
|
|
11723
11802
|
var jstGoods = function jstGoods(props) {
|
|
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;
|
|
11803
|
+
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, _value$changeIndex13;
|
|
11725
11804
|
var _props$value = props.value,
|
|
11726
11805
|
value = _props$value === void 0 ? [] : _props$value,
|
|
11727
11806
|
onChange = props.onChange,
|
|
@@ -11732,7 +11811,8 @@ var jstGoods = function jstGoods(props) {
|
|
|
11732
11811
|
showField = _props$showField === void 0 ? '' : _props$showField,
|
|
11733
11812
|
_props$platformType = props.platformType,
|
|
11734
11813
|
platformType = _props$platformType === void 0 ? 'default' : _props$platformType,
|
|
11735
|
-
onlyShowFieldSelect = props.onlyShowFieldSelect
|
|
11814
|
+
onlyShowFieldSelect = props.onlyShowFieldSelect,
|
|
11815
|
+
logisticsCompanyFormType = props.logisticsCompanyFormType;
|
|
11736
11816
|
var _useState = useState(0),
|
|
11737
11817
|
_useState2 = _slicedToArray(_useState, 2),
|
|
11738
11818
|
changeIndex = _useState2[0],
|
|
@@ -11823,13 +11903,20 @@ var jstGoods = function jstGoods(props) {
|
|
|
11823
11903
|
return setChangeIndex(index);
|
|
11824
11904
|
}
|
|
11825
11905
|
}, "\u5305\u88F9".concat(index + 1)));
|
|
11826
|
-
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(
|
|
11906
|
+
}))) : null, value.length || type === 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, type === 1 ? /*#__PURE__*/React.createElement(Space, null, !showField || showField === 'logisticsCompany' ? /*#__PURE__*/React.createElement(React.Fragment, null, logisticsCompanyFormType === 'input' ? /*#__PURE__*/React.createElement(Input, {
|
|
11907
|
+
disabled: disabled,
|
|
11908
|
+
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
11909
|
+
onChange: function onChange(e) {
|
|
11910
|
+
return changeInputHandle(e.target.value, 'logisticsCompany');
|
|
11911
|
+
},
|
|
11912
|
+
value: (_value$changeIndex = value[changeIndex]) === null || _value$changeIndex === void 0 ? void 0 : _value$changeIndex.logisticsCompany
|
|
11913
|
+
}) : /*#__PURE__*/React.createElement(ApaasLogistics, {
|
|
11827
11914
|
disabled: disabled,
|
|
11828
11915
|
placeholder: "\u7269\u6D41\u516C\u53F8",
|
|
11829
11916
|
onChange: function onChange(val) {
|
|
11830
11917
|
changeInputHandle(val, 'logisticsCompany');
|
|
11831
11918
|
},
|
|
11832
|
-
value: platformType === 'gy' ? expressDateInstance.getExpressNameByCode((_value$
|
|
11919
|
+
value: platformType === 'gy' ? (expressDateInstance === null || expressDateInstance === void 0 ? void 0 : expressDateInstance.getExpressNameByCode((_value$changeIndex2 = value[changeIndex]) === null || _value$changeIndex2 === void 0 ? void 0 : _value$changeIndex2['logisticsCompany'], false)) ? (_value$changeIndex3 = value[changeIndex]) === null || _value$changeIndex3 === void 0 ? void 0 : _value$changeIndex3['logisticsCompany'] : (_value$changeIndex4 = value[changeIndex]) === null || _value$changeIndex4 === void 0 ? void 0 : _value$changeIndex4['logisticsCompanyName'] : (_value$changeIndex5 = value[changeIndex]) === null || _value$changeIndex5 === void 0 ? void 0 : _value$changeIndex5['logisticsCompany'],
|
|
11833
11920
|
showSearch: true,
|
|
11834
11921
|
dropdownMatchSelectWidth: false,
|
|
11835
11922
|
filterOption: function filterOption(input, option) {
|
|
@@ -11840,34 +11927,34 @@ var jstGoods = function jstGoods(props) {
|
|
|
11840
11927
|
maxWidth: '180px'
|
|
11841
11928
|
},
|
|
11842
11929
|
platformType: platformType
|
|
11843
|
-
}) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
11930
|
+
})) : null, !showField || showField === 'logisticsCode' ? /*#__PURE__*/React.createElement(Input, {
|
|
11844
11931
|
disabled: disabled,
|
|
11845
11932
|
placeholder: "\u7269\u6D41\u5355\u53F7",
|
|
11846
11933
|
onChange: function onChange(e) {
|
|
11847
11934
|
return changeInputHandle(e.target.value, 'logisticsCode');
|
|
11848
11935
|
},
|
|
11849
|
-
value: (_value$
|
|
11936
|
+
value: (_value$changeIndex6 = value[changeIndex]) === null || _value$changeIndex6 === void 0 ? void 0 : _value$changeIndex6.logisticsCode
|
|
11850
11937
|
}) : null) : null, type === 2 ? /*#__PURE__*/React.createElement(Space, null, ['supplyId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11851
11938
|
disabled: disabled,
|
|
11852
11939
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u7F16\u7801",
|
|
11853
11940
|
onChange: function onChange(e) {
|
|
11854
11941
|
return changeInputHandle(e.target.value, 'supplyId');
|
|
11855
11942
|
},
|
|
11856
|
-
value: (_value$
|
|
11943
|
+
value: (_value$changeIndex7 = value[changeIndex]) === null || _value$changeIndex7 === void 0 ? void 0 : _value$changeIndex7.supplyId
|
|
11857
11944
|
}), ['supplyName', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11858
11945
|
disabled: disabled,
|
|
11859
11946
|
placeholder: "\u8BF7\u8F93\u5165\u4F9B\u9500\u5546\u540D\u79F0",
|
|
11860
11947
|
onChange: function onChange(e) {
|
|
11861
11948
|
return changeInputHandle(e.target.value, 'supplyName');
|
|
11862
11949
|
},
|
|
11863
|
-
value: (_value$
|
|
11950
|
+
value: (_value$changeIndex8 = value[changeIndex]) === null || _value$changeIndex8 === void 0 ? void 0 : _value$changeIndex8.supplyName
|
|
11864
11951
|
})) : null, type === 3 ? /*#__PURE__*/React.createElement(Space, null, ['sendId', 'all'].includes(showField) && /*#__PURE__*/React.createElement(Input, {
|
|
11865
11952
|
disabled: disabled,
|
|
11866
11953
|
placeholder: "\u8BF7\u8F93\u5165\u53D1\u8D27\u4ED3\u7F16\u7801",
|
|
11867
11954
|
onChange: function onChange(e) {
|
|
11868
11955
|
return changeInputHandle(e.target.value, 'sendId');
|
|
11869
11956
|
},
|
|
11870
|
-
value: (_value$
|
|
11957
|
+
value: (_value$changeIndex9 = value[changeIndex]) === null || _value$changeIndex9 === void 0 ? void 0 : _value$changeIndex9.sendId
|
|
11871
11958
|
}), ['sendName', 'all'].includes(showField) && (isSelectName ? /*#__PURE__*/React.createElement(Select, {
|
|
11872
11959
|
style: {
|
|
11873
11960
|
minWidth: '100px',
|
|
@@ -11878,7 +11965,7 @@ var jstGoods = function jstGoods(props) {
|
|
|
11878
11965
|
showSearch: true,
|
|
11879
11966
|
options: sendOptions,
|
|
11880
11967
|
filterOption: filterOption,
|
|
11881
|
-
value: ((_value$
|
|
11968
|
+
value: ((_value$changeIndex10 = value[changeIndex]) === null || _value$changeIndex10 === void 0 ? void 0 : _value$changeIndex10.sendSnapshotId) || ((_value$changeIndex11 = value[changeIndex]) === null || _value$changeIndex11 === void 0 ? void 0 : _value$changeIndex11.sendName) || null,
|
|
11882
11969
|
onChange: function onChange(value, option) {
|
|
11883
11970
|
return handleSelected(value, 'sendName', option, onlyShowFieldSelect);
|
|
11884
11971
|
}
|
|
@@ -11888,14 +11975,14 @@ var jstGoods = function jstGoods(props) {
|
|
|
11888
11975
|
onChange: function onChange(e) {
|
|
11889
11976
|
return changeInputHandle(e.target.value, 'sendName');
|
|
11890
11977
|
},
|
|
11891
|
-
value: (_value$
|
|
11978
|
+
value: (_value$changeIndex12 = value[changeIndex]) === null || _value$changeIndex12 === void 0 ? void 0 : _value$changeIndex12.sendName
|
|
11892
11979
|
}))) : null, type === 4 ? /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
|
|
11893
11980
|
disabled: disabled,
|
|
11894
11981
|
placeholder: "\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u7F16\u53F7",
|
|
11895
11982
|
onChange: function onChange(e) {
|
|
11896
11983
|
return changeInputHandle(e.target.value, 'deliveryNo');
|
|
11897
11984
|
},
|
|
11898
|
-
value: (_value$
|
|
11985
|
+
value: (_value$changeIndex13 = value[changeIndex]) === null || _value$changeIndex13 === void 0 ? void 0 : _value$changeIndex13.sendName
|
|
11899
11986
|
})) : null) : null);
|
|
11900
11987
|
};
|
|
11901
11988
|
|
|
@@ -16559,6 +16646,34 @@ var getColumns$6 = function getColumns(_ref) {
|
|
|
16559
16646
|
};
|
|
16560
16647
|
|
|
16561
16648
|
var getColumns$7 = function getColumns(_ref) {
|
|
16649
|
+
var _ref$text = _ref.text,
|
|
16650
|
+
disabled = _ref.disabled,
|
|
16651
|
+
updateHandle = _ref.updateHandle,
|
|
16652
|
+
updateDataHandle = _ref.updateDataHandle;
|
|
16653
|
+
return {
|
|
16654
|
+
//[SKX]商品信息(ON)
|
|
16655
|
+
SKX_GOODS: [{
|
|
16656
|
+
dataIndex: 'skuEcode',
|
|
16657
|
+
title: "[SKX]\u53D1\u8D27\u5355\u660E\u7EC6-skuEcode",
|
|
16658
|
+
width: 200
|
|
16659
|
+
}, {
|
|
16660
|
+
dataIndex: 'subOrderId',
|
|
16661
|
+
title: "[SKX]\u53D1\u8D27\u5355-\u5B50\u8BA2\u5355\u53F7",
|
|
16662
|
+
width: 300
|
|
16663
|
+
}, {
|
|
16664
|
+
dataIndex: 'onBillNo',
|
|
16665
|
+
title: "[SKX]ON\u51FA\u5E93\u901A\u77E5\u5355\u53F7",
|
|
16666
|
+
width: 200
|
|
16667
|
+
}].map(function (item) {
|
|
16668
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
16669
|
+
align: 'center',
|
|
16670
|
+
ellipsis: true
|
|
16671
|
+
});
|
|
16672
|
+
})
|
|
16673
|
+
};
|
|
16674
|
+
};
|
|
16675
|
+
|
|
16676
|
+
var getColumns$8 = function getColumns(_ref) {
|
|
16562
16677
|
var _ref$text = _ref.text,
|
|
16563
16678
|
text = _ref$text === void 0 ? '' : _ref$text,
|
|
16564
16679
|
disabled = _ref.disabled,
|
|
@@ -16671,7 +16786,7 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
16671
16786
|
disabled = _ref.disabled,
|
|
16672
16787
|
updateHandle = _ref.updateHandle,
|
|
16673
16788
|
updateDataHandle = _ref.updateDataHandle;
|
|
16674
|
-
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16789
|
+
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, getColumns$1({
|
|
16675
16790
|
text: text,
|
|
16676
16791
|
disabled: disabled,
|
|
16677
16792
|
updateHandle: updateHandle
|
|
@@ -16700,8 +16815,12 @@ var getColumnsMap$1 = function getColumnsMap(args) {
|
|
|
16700
16815
|
text: text,
|
|
16701
16816
|
disabled: disabled,
|
|
16702
16817
|
updateHandle: updateHandle
|
|
16818
|
+
})), getColumns$7({
|
|
16819
|
+
text: text,
|
|
16820
|
+
disabled: disabled,
|
|
16821
|
+
updateHandle: updateHandle
|
|
16703
16822
|
})), {}, {
|
|
16704
|
-
default: getColumns$
|
|
16823
|
+
default: getColumns$8({
|
|
16705
16824
|
text: text,
|
|
16706
16825
|
disabled: disabled,
|
|
16707
16826
|
updateHandle: updateHandle
|
|
@@ -16830,29 +16949,6 @@ var getBsE3ReissueGoodColumns = function getBsE3ReissueGoodColumns(_ref4) {
|
|
|
16830
16949
|
});
|
|
16831
16950
|
};
|
|
16832
16951
|
|
|
16833
|
-
function HoverTableRowDeleteIcon(_ref) {
|
|
16834
|
-
var index = _ref.index,
|
|
16835
|
-
hoveredRowIndex = _ref.hoveredRowIndex,
|
|
16836
|
-
handleClick = _ref.handleClick;
|
|
16837
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
16838
|
-
style: {
|
|
16839
|
-
display: hoveredRowIndex === index ? 'none' : 'inline'
|
|
16840
|
-
}
|
|
16841
|
-
}, index + 1), /*#__PURE__*/React.createElement("span", {
|
|
16842
|
-
style: {
|
|
16843
|
-
cursor: 'pointer'
|
|
16844
|
-
},
|
|
16845
|
-
onClick: handleClick,
|
|
16846
|
-
title: "\u5220\u9664"
|
|
16847
|
-
}, /*#__PURE__*/React.createElement(MinusCircleFilled, {
|
|
16848
|
-
style: {
|
|
16849
|
-
fontSize: 18,
|
|
16850
|
-
color: '#1890ff',
|
|
16851
|
-
display: hoveredRowIndex === index ? 'inline' : 'none'
|
|
16852
|
-
}
|
|
16853
|
-
})));
|
|
16854
|
-
}
|
|
16855
|
-
|
|
16856
16952
|
var isErpType = {
|
|
16857
16953
|
isWdt: function isWdt(type) {
|
|
16858
16954
|
return ['WDT_REISSUE_GOODS', 'WDT_GOODS', 'WDT_EXCHANGE_GOODS'].includes(type);
|
|
@@ -17167,10 +17263,13 @@ var SelectTradeGoods = function SelectTradeGoods(_ref) {
|
|
|
17167
17263
|
fixed: true,
|
|
17168
17264
|
onChange: handleChangeSelectedKeys
|
|
17169
17265
|
};
|
|
17266
|
+
var buttonTextMapping = {
|
|
17267
|
+
SKX_GOODS: '选择发货单商品'
|
|
17268
|
+
};
|
|
17170
17269
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
|
|
17171
17270
|
type: "link",
|
|
17172
17271
|
onClick: openModal
|
|
17173
|
-
},
|
|
17272
|
+
}, buttonTextMapping[type] || '选择订单商品'), /*#__PURE__*/React.createElement(Modal, {
|
|
17174
17273
|
title: "\u8BA2\u5355\u5546\u54C1",
|
|
17175
17274
|
visible: tradeGoodsVisible,
|
|
17176
17275
|
footer: null,
|
|
@@ -17367,6 +17466,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
17367
17466
|
case 'GY_RETURN_GOODS':
|
|
17368
17467
|
case 'KM_GOODS':
|
|
17369
17468
|
case 'KM_REISSUE_GOODS':
|
|
17469
|
+
case 'SKX_GOODS':
|
|
17370
17470
|
{
|
|
17371
17471
|
columns = getColumnsMap$1({
|
|
17372
17472
|
text: text,
|
|
@@ -22213,4 +22313,361 @@ var KmVideo = function KmVideo(_ref) {
|
|
|
22213
22313
|
}))));
|
|
22214
22314
|
};
|
|
22215
22315
|
|
|
22216
|
-
|
|
22316
|
+
var singletonMap$7 = new Map();
|
|
22317
|
+
var getAllGoods = function getAllGoods(params, setLoading) {
|
|
22318
|
+
var id = params.tid || params.onBillNo || '';
|
|
22319
|
+
if (!singletonMap$7.has(id)) {
|
|
22320
|
+
setLoading && setLoading(true);
|
|
22321
|
+
var p = new Promise(function (resolve, reject) {
|
|
22322
|
+
var doReject = function doReject(err) {
|
|
22323
|
+
// 清空掉错误的请求记录
|
|
22324
|
+
singletonMap$7.delete(id);
|
|
22325
|
+
reject(err);
|
|
22326
|
+
};
|
|
22327
|
+
extendRequest('/qy/gdfw/order/skxOrderDetail', {
|
|
22328
|
+
method: 'post',
|
|
22329
|
+
data: params
|
|
22330
|
+
}).then(function (res) {
|
|
22331
|
+
if (res === null || res === void 0 ? void 0 : res.success) {
|
|
22332
|
+
var _res$data, _res$data$orderDetail;
|
|
22333
|
+
if (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$orderDetail = _res$data.orderDetailInfoList) === null || _res$data$orderDetail === void 0 ? void 0 : _res$data$orderDetail.length) {
|
|
22334
|
+
var orderDetailInfoList = res === null || res === void 0 ? void 0 : res.data.orderDetailInfoList;
|
|
22335
|
+
res.data.trades = orderDetailInfoList[0].subOrderList.map(function (subItem) {
|
|
22336
|
+
return {
|
|
22337
|
+
onBillNo: orderDetailInfoList[0].onBillNo,
|
|
22338
|
+
skuEcode: subItem.skuEcode,
|
|
22339
|
+
subOrderId: subItem.subOrderId
|
|
22340
|
+
};
|
|
22341
|
+
});
|
|
22342
|
+
}
|
|
22343
|
+
resolve(res.data);
|
|
22344
|
+
// 延迟10秒清除,保证订单的时效性
|
|
22345
|
+
setTimeout(function () {
|
|
22346
|
+
singletonMap$7.delete(id);
|
|
22347
|
+
}, 1000 * 10);
|
|
22348
|
+
} else {
|
|
22349
|
+
doReject(res);
|
|
22350
|
+
}
|
|
22351
|
+
}).catch(doReject).finally(function () {
|
|
22352
|
+
setLoading && setLoading(false);
|
|
22353
|
+
});
|
|
22354
|
+
});
|
|
22355
|
+
singletonMap$7.set(id, p);
|
|
22356
|
+
}
|
|
22357
|
+
return singletonMap$7.get(id);
|
|
22358
|
+
};
|
|
22359
|
+
var skxUtils = {
|
|
22360
|
+
getAllGoods: getAllGoods
|
|
22361
|
+
};
|
|
22362
|
+
|
|
22363
|
+
var typeMap$6 = {
|
|
22364
|
+
SKX_OUTBOUND_NOTICE_NO: {
|
|
22365
|
+
key: 'onBillNo',
|
|
22366
|
+
notDataText: '未获取到出库通知单号',
|
|
22367
|
+
placeholder: '请点击按钮选择或者输入ON出库通知单号',
|
|
22368
|
+
buttonText: '选择ON出库通知单号',
|
|
22369
|
+
columnHeaders: {
|
|
22370
|
+
title: '出库通知单号',
|
|
22371
|
+
subListName: 'subOrderList',
|
|
22372
|
+
leftColumn: {
|
|
22373
|
+
label: '[SKX]发货单明细-skuEcode',
|
|
22374
|
+
value: 'skuEcode'
|
|
22375
|
+
},
|
|
22376
|
+
rightColumn: {
|
|
22377
|
+
label: '[SKX]发货单—子订单号',
|
|
22378
|
+
value: 'subOrderId'
|
|
22379
|
+
}
|
|
22380
|
+
},
|
|
22381
|
+
asyncGetData: function () {
|
|
22382
|
+
var _asyncGetData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(tradeId) {
|
|
22383
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
22384
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22385
|
+
case 0:
|
|
22386
|
+
return _context.abrupt("return", skxUtils.getAllGoods({
|
|
22387
|
+
tid: tradeId
|
|
22388
|
+
}).then(function (data) {
|
|
22389
|
+
var orderDetailInfoList = data.orderDetailInfoList || [];
|
|
22390
|
+
return orderDetailInfoList;
|
|
22391
|
+
}));
|
|
22392
|
+
case 1:
|
|
22393
|
+
case "end":
|
|
22394
|
+
return _context.stop();
|
|
22395
|
+
}
|
|
22396
|
+
}, _callee);
|
|
22397
|
+
}));
|
|
22398
|
+
function asyncGetData(_x) {
|
|
22399
|
+
return _asyncGetData.apply(this, arguments);
|
|
22400
|
+
}
|
|
22401
|
+
return asyncGetData;
|
|
22402
|
+
}()
|
|
22403
|
+
}
|
|
22404
|
+
};
|
|
22405
|
+
var IdInputSelect = function IdInputSelect(props) {
|
|
22406
|
+
var value = props.value,
|
|
22407
|
+
onChange = props.onChange,
|
|
22408
|
+
_onBlur = props.onBlur,
|
|
22409
|
+
disabled = props.disabled,
|
|
22410
|
+
form = props.form,
|
|
22411
|
+
templateDetail = props.templateDetail,
|
|
22412
|
+
type = props.type;
|
|
22413
|
+
var _useState = useState(value),
|
|
22414
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22415
|
+
inputValue = _useState2[0],
|
|
22416
|
+
setInputValue = _useState2[1];
|
|
22417
|
+
// 控制Popover显示状态
|
|
22418
|
+
var _useState3 = useState(false),
|
|
22419
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
22420
|
+
popoverVisible = _useState4[0],
|
|
22421
|
+
setPopoverVisible = _useState4[1];
|
|
22422
|
+
var _useState5 = useState(false),
|
|
22423
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
22424
|
+
spinning = _useState6[0],
|
|
22425
|
+
setSpinning = _useState6[1];
|
|
22426
|
+
var divRef = useRef(null);
|
|
22427
|
+
var _useState7 = useState(340),
|
|
22428
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
22429
|
+
width = _useState8[0],
|
|
22430
|
+
setWidth = _useState8[1];
|
|
22431
|
+
var tradeIdRef = useRef('');
|
|
22432
|
+
var _useState9 = useState([]),
|
|
22433
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
22434
|
+
dataSource = _useState10[0],
|
|
22435
|
+
setDataSource = _useState10[1];
|
|
22436
|
+
useEffect(function () {
|
|
22437
|
+
if (!divRef.current) return;
|
|
22438
|
+
var measuredWidth = divRef.current.offsetWidth;
|
|
22439
|
+
setWidth(measuredWidth);
|
|
22440
|
+
}, []);
|
|
22441
|
+
//当外部数据源变化时更新内部状态;
|
|
22442
|
+
useEffect(function () {
|
|
22443
|
+
if (popoverVisible) {
|
|
22444
|
+
asyncQueryData();
|
|
22445
|
+
}
|
|
22446
|
+
}, [popoverVisible]);
|
|
22447
|
+
useEffect(function () {
|
|
22448
|
+
setInputValue(value);
|
|
22449
|
+
}, [value]);
|
|
22450
|
+
var asyncQueryData = /*#__PURE__*/function () {
|
|
22451
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
22452
|
+
var tradeId;
|
|
22453
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
22454
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
22455
|
+
case 0:
|
|
22456
|
+
tradeId = form.getFieldValue('m3ap1EvEyd');
|
|
22457
|
+
console.log('asyncQueryData---', {
|
|
22458
|
+
tradeId: tradeId,
|
|
22459
|
+
tradeIdRef: tradeIdRef.current,
|
|
22460
|
+
form: form
|
|
22461
|
+
});
|
|
22462
|
+
if (tradeId) {
|
|
22463
|
+
_context2.next = 5;
|
|
22464
|
+
break;
|
|
22465
|
+
}
|
|
22466
|
+
setDataSource([]);
|
|
22467
|
+
return _context2.abrupt("return");
|
|
22468
|
+
case 5:
|
|
22469
|
+
setSpinning(true);
|
|
22470
|
+
typeMap$6[type].asyncGetData(tradeId).then(function (data) {
|
|
22471
|
+
setDataSource(data);
|
|
22472
|
+
}).catch(function () {
|
|
22473
|
+
setDataSource([]);
|
|
22474
|
+
}).finally(function () {
|
|
22475
|
+
setSpinning(false);
|
|
22476
|
+
});
|
|
22477
|
+
case 7:
|
|
22478
|
+
case "end":
|
|
22479
|
+
return _context2.stop();
|
|
22480
|
+
}
|
|
22481
|
+
}, _callee2);
|
|
22482
|
+
}));
|
|
22483
|
+
return function asyncQueryData() {
|
|
22484
|
+
return _ref.apply(this, arguments);
|
|
22485
|
+
};
|
|
22486
|
+
}();
|
|
22487
|
+
// 渲染Popover内容
|
|
22488
|
+
var RenderPopoverContent = function RenderPopoverContent() {
|
|
22489
|
+
return /*#__PURE__*/React.createElement(Spin, {
|
|
22490
|
+
spinning: spinning
|
|
22491
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
22492
|
+
style: {
|
|
22493
|
+
width: typeof width === 'number' ? width - 30 : 320,
|
|
22494
|
+
maxHeight: 400,
|
|
22495
|
+
minHeight: 36,
|
|
22496
|
+
overflow: 'auto'
|
|
22497
|
+
}
|
|
22498
|
+
}, !spinning && (!dataSource || dataSource.length === 0) && /*#__PURE__*/React.createElement("div", {
|
|
22499
|
+
style: {
|
|
22500
|
+
textAlign: 'center',
|
|
22501
|
+
color: '#858585',
|
|
22502
|
+
padding: 10
|
|
22503
|
+
}
|
|
22504
|
+
}, typeMap$6[type].notDataText), dataSource && dataSource.length > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
22505
|
+
style: {
|
|
22506
|
+
display: 'flex',
|
|
22507
|
+
padding: '8px 12px',
|
|
22508
|
+
fontWeight: 500,
|
|
22509
|
+
color: '#333'
|
|
22510
|
+
}
|
|
22511
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
22512
|
+
style: {
|
|
22513
|
+
flex: 1
|
|
22514
|
+
}
|
|
22515
|
+
}, typeMap$6[type].columnHeaders.leftColumn.label), /*#__PURE__*/React.createElement("div", {
|
|
22516
|
+
style: {
|
|
22517
|
+
flex: 1
|
|
22518
|
+
}
|
|
22519
|
+
}, typeMap$6[type].columnHeaders.rightColumn.label)), dataSource.map(function (group) {
|
|
22520
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22521
|
+
key: group[typeMap$6[type].key]
|
|
22522
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
22523
|
+
style: {
|
|
22524
|
+
display: 'flex',
|
|
22525
|
+
alignItems: 'center',
|
|
22526
|
+
padding: '8px 12px',
|
|
22527
|
+
backgroundColor: '#f5f5f4'
|
|
22528
|
+
}
|
|
22529
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
22530
|
+
checked: value === group[typeMap$6[type].key],
|
|
22531
|
+
onChange: function onChange() {
|
|
22532
|
+
if (value !== group[typeMap$6[type].key]) {
|
|
22533
|
+
handleChange(group[typeMap$6[type].key]);
|
|
22534
|
+
skxSystemOrderBackValues({
|
|
22535
|
+
templateList: templateDetail,
|
|
22536
|
+
value: {
|
|
22537
|
+
allOrders: [group]
|
|
22538
|
+
},
|
|
22539
|
+
form: form
|
|
22540
|
+
});
|
|
22541
|
+
}
|
|
22542
|
+
},
|
|
22543
|
+
style: {
|
|
22544
|
+
marginRight: 12
|
|
22545
|
+
}
|
|
22546
|
+
}), /*#__PURE__*/React.createElement("span", null, typeMap$6[type].columnHeaders.title, ":", group[typeMap$6[type].key])), (group[typeMap$6[type].columnHeaders.subListName] || []).map(function (item, itemIndex) {
|
|
22547
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22548
|
+
key: "".concat(group[typeMap$6[type].key], "-").concat(itemIndex),
|
|
22549
|
+
style: {
|
|
22550
|
+
padding: '8px 12px',
|
|
22551
|
+
display: 'flex'
|
|
22552
|
+
}
|
|
22553
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
22554
|
+
style: {
|
|
22555
|
+
flex: 1,
|
|
22556
|
+
wordBreak: 'break-all'
|
|
22557
|
+
}
|
|
22558
|
+
}, item[typeMap$6[type].columnHeaders.leftColumn.value]), /*#__PURE__*/React.createElement("div", {
|
|
22559
|
+
style: {
|
|
22560
|
+
flex: 1,
|
|
22561
|
+
wordBreak: 'break-all'
|
|
22562
|
+
}
|
|
22563
|
+
}, item[typeMap$6[type].columnHeaders.rightColumn.value]));
|
|
22564
|
+
}));
|
|
22565
|
+
}))));
|
|
22566
|
+
};
|
|
22567
|
+
var handleChange = function handleChange(val, isInput) {
|
|
22568
|
+
console.log('handleChange---', {
|
|
22569
|
+
val: val,
|
|
22570
|
+
value: value,
|
|
22571
|
+
isInput: isInput
|
|
22572
|
+
});
|
|
22573
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(val, value !== val && !!isInput);
|
|
22574
|
+
// 关闭浮窗
|
|
22575
|
+
setPopoverVisible(false);
|
|
22576
|
+
};
|
|
22577
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22578
|
+
ref: divRef
|
|
22579
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
22580
|
+
placeholder: typeMap$6[type].placeholder,
|
|
22581
|
+
disabled: disabled,
|
|
22582
|
+
value: inputValue,
|
|
22583
|
+
onBlur: function onBlur(e) {
|
|
22584
|
+
handleChange(e.target.value, true);
|
|
22585
|
+
_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(e);
|
|
22586
|
+
},
|
|
22587
|
+
onChange: function onChange(e) {
|
|
22588
|
+
setInputValue(e.target.value);
|
|
22589
|
+
}
|
|
22590
|
+
}), !disabled && /*#__PURE__*/React.createElement(Popover, {
|
|
22591
|
+
content: /*#__PURE__*/React.createElement(RenderPopoverContent, null),
|
|
22592
|
+
trigger: "click",
|
|
22593
|
+
visible: popoverVisible,
|
|
22594
|
+
onVisibleChange: setPopoverVisible
|
|
22595
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
22596
|
+
color: "processing",
|
|
22597
|
+
style: {
|
|
22598
|
+
padding: '3px 8px',
|
|
22599
|
+
marginTop: 8,
|
|
22600
|
+
cursor: 'pointer'
|
|
22601
|
+
}
|
|
22602
|
+
}, typeMap$6[type].buttonText)));
|
|
22603
|
+
};
|
|
22604
|
+
|
|
22605
|
+
var typeMap$7 = {
|
|
22606
|
+
SKX_GOODS: {
|
|
22607
|
+
key: 'skxGoods',
|
|
22608
|
+
uniqueKey: 'skuEcode',
|
|
22609
|
+
requestParams: {
|
|
22610
|
+
key: 'onBillNo',
|
|
22611
|
+
sourceUniqueKey: '78CADF2951',
|
|
22612
|
+
request: skxUtils.getAllGoods
|
|
22613
|
+
},
|
|
22614
|
+
updateHandle: updateSkxGoodsHandle
|
|
22615
|
+
}
|
|
22616
|
+
};
|
|
22617
|
+
var SkxGoods = function SkxGoods(props) {
|
|
22618
|
+
var value = props.value,
|
|
22619
|
+
disabled = props.disabled,
|
|
22620
|
+
onChange = props.onChange,
|
|
22621
|
+
form = props.form,
|
|
22622
|
+
type = props.type;
|
|
22623
|
+
var changeHandle = function changeHandle(list) {
|
|
22624
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, typeMap$7[type].key, list)));
|
|
22625
|
+
};
|
|
22626
|
+
// 找到该订单号下所有商品
|
|
22627
|
+
var getAllTradeGoodsDetails = function getAllTradeGoodsDetails() {
|
|
22628
|
+
var goodDetails = typeMap$7[type].updateHandle((value === null || value === void 0 ? void 0 : value.allGoods) || []);
|
|
22629
|
+
return goodDetails;
|
|
22630
|
+
};
|
|
22631
|
+
var selectedGoodsChange = useCallback(function (skuList) {
|
|
22632
|
+
var _uniqBy;
|
|
22633
|
+
var newValue = _objectSpread2({}, value);
|
|
22634
|
+
// 原订单商品
|
|
22635
|
+
var originTradeGoodList = getAllTradeGoodsDetails() || [];
|
|
22636
|
+
// 当前选中的所有商品【包含了原订单+商品库】
|
|
22637
|
+
var currentSelectGoodList = (value === null || value === void 0 ? void 0 : value[typeMap$7[type].key]) || [];
|
|
22638
|
+
newValue[typeMap$7[type].key] = (_uniqBy = uniqBy(originTradeGoodList.concat(currentSelectGoodList), typeMap$7[type].uniqueKey)) === null || _uniqBy === void 0 ? void 0 : _uniqBy.filter(function (item) {
|
|
22639
|
+
return skuList.includes(item[typeMap$7[type].uniqueKey]);
|
|
22640
|
+
});
|
|
22641
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
22642
|
+
}, [value === null || value === void 0 ? void 0 : value[typeMap$7[type].key]]);
|
|
22643
|
+
// 商品信息组件暂存后 重新编辑,此时需要重新获取on单号下所有商品信息
|
|
22644
|
+
var getDataSourceAsync = function getDataSourceAsync() {
|
|
22645
|
+
var businessNo = form.getFieldValue(typeMap$7[type].requestParams.sourceUniqueKey);
|
|
22646
|
+
if (!businessNo) {
|
|
22647
|
+
return Promise.resolve([]);
|
|
22648
|
+
}
|
|
22649
|
+
return typeMap$7[type].requestParams.request(_defineProperty({}, typeMap$7[type].requestParams.key, businessNo)).then(function (data) {
|
|
22650
|
+
onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
22651
|
+
allGoods: (data === null || data === void 0 ? void 0 : data.trades) || []
|
|
22652
|
+
}));
|
|
22653
|
+
});
|
|
22654
|
+
};
|
|
22655
|
+
return /*#__PURE__*/React.createElement(GoodItem$1, _objectSpread2(_objectSpread2({
|
|
22656
|
+
key: typeMap$7[type].key
|
|
22657
|
+
}, props), {}, {
|
|
22658
|
+
disabled: disabled,
|
|
22659
|
+
value: value === null || value === void 0 ? void 0 : value[typeMap$7[type].key],
|
|
22660
|
+
onChange: function onChange(val) {
|
|
22661
|
+
return changeHandle(val);
|
|
22662
|
+
},
|
|
22663
|
+
showModeBtn: false,
|
|
22664
|
+
tradeGoods: {
|
|
22665
|
+
uniqueKey: typeMap$7[type].uniqueKey,
|
|
22666
|
+
originDataSource: getAllTradeGoodsDetails(),
|
|
22667
|
+
getDataSourceAsync: getDataSourceAsync,
|
|
22668
|
+
selectedGoodsChange: selectedGoodsChange
|
|
22669
|
+
}
|
|
22670
|
+
}));
|
|
22671
|
+
};
|
|
22672
|
+
|
|
22673
|
+
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, SkxGoods, IdInputSelect as SkxIdInputSelect, 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$7 as getSkxColumns, getColumns$2 as getWdtColumns, getColumns$3 as getWlnColumns, skxUtils };
|