@kmkf-fe-packages/basic-components 1.0.10-beta.12 → 1.0.10-beta.14
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 +627 -300
- package/dist/index.js +625 -297
- package/dist/src/apaas/ApaasInput/index.d.ts +1 -0
- package/dist/src/apaas/SubForm/index.d.ts +26 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,372 +1,386 @@
|
|
|
1
|
-
import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo } from 'react';
|
|
2
|
-
import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form,
|
|
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 } from 'antd';
|
|
3
3
|
import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } 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
6
|
import { AddressData, BsAddressData, WdtAddressData, request as request$1, ExpressData, uuid, LogisticsAddressData, WdtSendData, WDT_ORDER_TYPE_MAP } from '@kmkf-fe-packages/kmkf-utils';
|
|
7
|
+
import { debounce, cloneDeep, difference, differenceWith } from 'lodash';
|
|
7
8
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
8
|
-
import { cloneDeep, difference, differenceWith } from 'lodash';
|
|
9
9
|
import { useDebounceEffect } from 'ahooks';
|
|
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(r, l) {
|
|
14
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
15
|
+
if (null != t) {
|
|
16
|
+
var e,
|
|
17
|
+
n,
|
|
18
|
+
i,
|
|
19
|
+
u,
|
|
20
|
+
a = [],
|
|
21
|
+
f = !0,
|
|
22
|
+
o = !1;
|
|
23
23
|
try {
|
|
24
|
-
if (
|
|
25
|
-
if (Object(
|
|
26
|
-
|
|
27
|
-
} else for (; !(
|
|
28
|
-
} catch (
|
|
29
|
-
|
|
24
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
25
|
+
if (Object(t) !== t) return;
|
|
26
|
+
f = !1;
|
|
27
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
28
|
+
} catch (r) {
|
|
29
|
+
o = !0, n = r;
|
|
30
30
|
} finally {
|
|
31
31
|
try {
|
|
32
|
-
if (!
|
|
32
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
33
33
|
} finally {
|
|
34
|
-
if (
|
|
34
|
+
if (o) throw n;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return a;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function ownKeys(
|
|
41
|
-
var
|
|
40
|
+
function ownKeys(e, r) {
|
|
41
|
+
var t = Object.keys(e);
|
|
42
42
|
if (Object.getOwnPropertySymbols) {
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
return Object.getOwnPropertyDescriptor(
|
|
46
|
-
})),
|
|
43
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
44
|
+
r && (o = o.filter(function (r) {
|
|
45
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
46
|
+
})), t.push.apply(t, o);
|
|
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 t;
|
|
49
|
+
}
|
|
50
|
+
function _objectSpread2(e) {
|
|
51
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
52
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
53
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
54
|
+
_defineProperty(e, r, t[r]);
|
|
55
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
56
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return e;
|
|
60
60
|
}
|
|
61
61
|
function _regeneratorRuntime() {
|
|
62
62
|
_regeneratorRuntime = function () {
|
|
63
|
-
return
|
|
64
|
-
};
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
return e;
|
|
64
|
+
};
|
|
65
|
+
var t,
|
|
66
|
+
e = {},
|
|
67
|
+
r = Object.prototype,
|
|
68
|
+
n = r.hasOwnProperty,
|
|
69
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
70
|
+
t[e] = r.value;
|
|
70
71
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
function define(
|
|
76
|
-
return Object.defineProperty(
|
|
77
|
-
value:
|
|
72
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
73
|
+
a = i.iterator || "@@iterator",
|
|
74
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
75
|
+
u = i.toStringTag || "@@toStringTag";
|
|
76
|
+
function define(t, e, r) {
|
|
77
|
+
return Object.defineProperty(t, e, {
|
|
78
|
+
value: r,
|
|
78
79
|
enumerable: !0,
|
|
79
80
|
configurable: !0,
|
|
80
81
|
writable: !0
|
|
81
|
-
}),
|
|
82
|
+
}), t[e];
|
|
82
83
|
}
|
|
83
84
|
try {
|
|
84
85
|
define({}, "");
|
|
85
|
-
} catch (
|
|
86
|
-
define = function (
|
|
87
|
-
return
|
|
86
|
+
} catch (t) {
|
|
87
|
+
define = function (t, e, r) {
|
|
88
|
+
return t[e] = r;
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
|
-
function wrap(
|
|
91
|
-
var
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return
|
|
95
|
-
value: makeInvokeMethod(
|
|
96
|
-
}),
|
|
91
|
+
function wrap(t, e, r, n) {
|
|
92
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
93
|
+
a = Object.create(i.prototype),
|
|
94
|
+
c = new Context(n || []);
|
|
95
|
+
return o(a, "_invoke", {
|
|
96
|
+
value: makeInvokeMethod(t, r, c)
|
|
97
|
+
}), a;
|
|
97
98
|
}
|
|
98
|
-
function tryCatch(
|
|
99
|
+
function tryCatch(t, e, r) {
|
|
99
100
|
try {
|
|
100
101
|
return {
|
|
101
102
|
type: "normal",
|
|
102
|
-
arg:
|
|
103
|
+
arg: t.call(e, r)
|
|
103
104
|
};
|
|
104
|
-
} catch (
|
|
105
|
+
} catch (t) {
|
|
105
106
|
return {
|
|
106
107
|
type: "throw",
|
|
107
|
-
arg:
|
|
108
|
+
arg: t
|
|
108
109
|
};
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
|
|
112
|
-
var
|
|
112
|
+
e.wrap = wrap;
|
|
113
|
+
var h = "suspendedStart",
|
|
114
|
+
l = "suspendedYield",
|
|
115
|
+
f = "executing",
|
|
116
|
+
s = "completed",
|
|
117
|
+
y = {};
|
|
113
118
|
function Generator() {}
|
|
114
119
|
function GeneratorFunction() {}
|
|
115
120
|
function GeneratorFunctionPrototype() {}
|
|
116
|
-
var
|
|
117
|
-
define(
|
|
121
|
+
var p = {};
|
|
122
|
+
define(p, a, function () {
|
|
118
123
|
return this;
|
|
119
124
|
});
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
var
|
|
124
|
-
function defineIteratorMethods(
|
|
125
|
-
["next", "throw", "return"].forEach(function (
|
|
126
|
-
define(
|
|
127
|
-
return this._invoke(
|
|
125
|
+
var d = Object.getPrototypeOf,
|
|
126
|
+
v = d && d(d(values([])));
|
|
127
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
128
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
129
|
+
function defineIteratorMethods(t) {
|
|
130
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
131
|
+
define(t, e, function (t) {
|
|
132
|
+
return this._invoke(e, t);
|
|
128
133
|
});
|
|
129
134
|
});
|
|
130
135
|
}
|
|
131
|
-
function AsyncIterator(
|
|
132
|
-
function invoke(
|
|
133
|
-
var
|
|
134
|
-
if ("throw" !==
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
return
|
|
138
|
-
invoke("next",
|
|
139
|
-
}, function (
|
|
140
|
-
invoke("throw",
|
|
141
|
-
}) :
|
|
142
|
-
|
|
143
|
-
}, function (
|
|
144
|
-
return invoke("throw",
|
|
136
|
+
function AsyncIterator(t, e) {
|
|
137
|
+
function invoke(r, o, i, a) {
|
|
138
|
+
var c = tryCatch(t[r], t, o);
|
|
139
|
+
if ("throw" !== c.type) {
|
|
140
|
+
var u = c.arg,
|
|
141
|
+
h = u.value;
|
|
142
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
143
|
+
invoke("next", t, i, a);
|
|
144
|
+
}, function (t) {
|
|
145
|
+
invoke("throw", t, i, a);
|
|
146
|
+
}) : e.resolve(h).then(function (t) {
|
|
147
|
+
u.value = t, i(u);
|
|
148
|
+
}, function (t) {
|
|
149
|
+
return invoke("throw", t, i, a);
|
|
145
150
|
});
|
|
146
151
|
}
|
|
147
|
-
|
|
152
|
+
a(c.arg);
|
|
148
153
|
}
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
value: function (
|
|
154
|
+
var r;
|
|
155
|
+
o(this, "_invoke", {
|
|
156
|
+
value: function (t, n) {
|
|
152
157
|
function callInvokeWithMethodAndArg() {
|
|
153
|
-
return new
|
|
154
|
-
invoke(
|
|
158
|
+
return new e(function (e, r) {
|
|
159
|
+
invoke(t, n, e, r);
|
|
155
160
|
});
|
|
156
161
|
}
|
|
157
|
-
return
|
|
162
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
158
163
|
}
|
|
159
164
|
});
|
|
160
165
|
}
|
|
161
|
-
function makeInvokeMethod(
|
|
162
|
-
var
|
|
163
|
-
return function (
|
|
164
|
-
if (
|
|
165
|
-
if (
|
|
166
|
-
if ("throw" ===
|
|
167
|
-
return
|
|
166
|
+
function makeInvokeMethod(e, r, n) {
|
|
167
|
+
var o = h;
|
|
168
|
+
return function (i, a) {
|
|
169
|
+
if (o === f) throw new Error("Generator is already running");
|
|
170
|
+
if (o === s) {
|
|
171
|
+
if ("throw" === i) throw a;
|
|
172
|
+
return {
|
|
173
|
+
value: t,
|
|
174
|
+
done: !0
|
|
175
|
+
};
|
|
168
176
|
}
|
|
169
|
-
for (
|
|
170
|
-
var
|
|
171
|
-
if (
|
|
172
|
-
var
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
return
|
|
177
|
+
for (n.method = i, n.arg = a;;) {
|
|
178
|
+
var c = n.delegate;
|
|
179
|
+
if (c) {
|
|
180
|
+
var u = maybeInvokeDelegate(c, n);
|
|
181
|
+
if (u) {
|
|
182
|
+
if (u === y) continue;
|
|
183
|
+
return u;
|
|
176
184
|
}
|
|
177
185
|
}
|
|
178
|
-
if ("next" ===
|
|
179
|
-
if (
|
|
180
|
-
|
|
181
|
-
} else "return" ===
|
|
182
|
-
|
|
183
|
-
var
|
|
184
|
-
if ("normal" ===
|
|
185
|
-
if (
|
|
186
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
187
|
+
if (o === h) throw o = s, n.arg;
|
|
188
|
+
n.dispatchException(n.arg);
|
|
189
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
190
|
+
o = f;
|
|
191
|
+
var p = tryCatch(e, r, n);
|
|
192
|
+
if ("normal" === p.type) {
|
|
193
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
186
194
|
return {
|
|
187
|
-
value:
|
|
188
|
-
done:
|
|
195
|
+
value: p.arg,
|
|
196
|
+
done: n.done
|
|
189
197
|
};
|
|
190
198
|
}
|
|
191
|
-
"throw" ===
|
|
199
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
192
200
|
}
|
|
193
201
|
};
|
|
194
202
|
}
|
|
195
|
-
function maybeInvokeDelegate(
|
|
196
|
-
var
|
|
197
|
-
|
|
198
|
-
if (
|
|
199
|
-
var
|
|
200
|
-
if ("throw" ===
|
|
201
|
-
var
|
|
202
|
-
return
|
|
203
|
+
function maybeInvokeDelegate(e, r) {
|
|
204
|
+
var n = r.method,
|
|
205
|
+
o = e.iterator[n];
|
|
206
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
207
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
208
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
209
|
+
var a = i.arg;
|
|
210
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
203
211
|
}
|
|
204
|
-
function pushTryEntry(
|
|
205
|
-
var
|
|
206
|
-
tryLoc:
|
|
212
|
+
function pushTryEntry(t) {
|
|
213
|
+
var e = {
|
|
214
|
+
tryLoc: t[0]
|
|
207
215
|
};
|
|
208
|
-
1 in
|
|
216
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
209
217
|
}
|
|
210
|
-
function resetTryEntry(
|
|
211
|
-
var
|
|
212
|
-
|
|
218
|
+
function resetTryEntry(t) {
|
|
219
|
+
var e = t.completion || {};
|
|
220
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
213
221
|
}
|
|
214
|
-
function Context(
|
|
222
|
+
function Context(t) {
|
|
215
223
|
this.tryEntries = [{
|
|
216
224
|
tryLoc: "root"
|
|
217
|
-
}],
|
|
225
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
218
226
|
}
|
|
219
|
-
function values(
|
|
220
|
-
if (
|
|
221
|
-
var
|
|
222
|
-
if (
|
|
223
|
-
if ("function" == typeof
|
|
224
|
-
if (!isNaN(
|
|
225
|
-
var
|
|
226
|
-
|
|
227
|
-
for (; ++
|
|
228
|
-
return next.value =
|
|
227
|
+
function values(e) {
|
|
228
|
+
if (e || "" === e) {
|
|
229
|
+
var r = e[a];
|
|
230
|
+
if (r) return r.call(e);
|
|
231
|
+
if ("function" == typeof e.next) return e;
|
|
232
|
+
if (!isNaN(e.length)) {
|
|
233
|
+
var o = -1,
|
|
234
|
+
i = function next() {
|
|
235
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
236
|
+
return next.value = t, next.done = !0, next;
|
|
229
237
|
};
|
|
230
|
-
return
|
|
238
|
+
return i.next = i;
|
|
231
239
|
}
|
|
232
240
|
}
|
|
233
|
-
|
|
234
|
-
next: doneResult
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
function doneResult() {
|
|
238
|
-
return {
|
|
239
|
-
value: undefined,
|
|
240
|
-
done: !0
|
|
241
|
-
};
|
|
241
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
242
242
|
}
|
|
243
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
243
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
244
244
|
value: GeneratorFunctionPrototype,
|
|
245
245
|
configurable: !0
|
|
246
|
-
}),
|
|
246
|
+
}), o(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, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
250
|
+
var e = "function" == typeof t && t.constructor;
|
|
251
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
252
|
+
}, e.mark = function (t) {
|
|
253
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
254
|
+
}, e.awrap = function (t) {
|
|
255
255
|
return {
|
|
256
|
-
__await:
|
|
256
|
+
__await: t
|
|
257
257
|
};
|
|
258
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
258
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
259
259
|
return this;
|
|
260
|
-
}),
|
|
261
|
-
void 0 ===
|
|
262
|
-
var
|
|
263
|
-
return
|
|
264
|
-
return
|
|
260
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
261
|
+
void 0 === i && (i = Promise);
|
|
262
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
263
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
264
|
+
return t.done ? t.value : a.next();
|
|
265
265
|
});
|
|
266
|
-
}, defineIteratorMethods(
|
|
266
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
267
267
|
return this;
|
|
268
|
-
}), define(
|
|
268
|
+
}), define(g, "toString", function () {
|
|
269
269
|
return "[object Generator]";
|
|
270
|
-
}),
|
|
271
|
-
var
|
|
272
|
-
|
|
273
|
-
for (var
|
|
274
|
-
return
|
|
275
|
-
for (;
|
|
276
|
-
var
|
|
277
|
-
if (
|
|
270
|
+
}), e.keys = function (t) {
|
|
271
|
+
var e = Object(t),
|
|
272
|
+
r = [];
|
|
273
|
+
for (var n in e) r.push(n);
|
|
274
|
+
return r.reverse(), function next() {
|
|
275
|
+
for (; r.length;) {
|
|
276
|
+
var t = r.pop();
|
|
277
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
278
278
|
}
|
|
279
279
|
return next.done = !0, next;
|
|
280
280
|
};
|
|
281
|
-
},
|
|
281
|
+
}, e.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 (e) {
|
|
284
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
285
285
|
},
|
|
286
286
|
stop: function () {
|
|
287
287
|
this.done = !0;
|
|
288
|
-
var
|
|
289
|
-
if ("throw" ===
|
|
288
|
+
var t = this.tryEntries[0].completion;
|
|
289
|
+
if ("throw" === t.type) throw t.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 (e) {
|
|
293
|
+
if (this.done) throw e;
|
|
294
|
+
var r = this;
|
|
295
|
+
function handle(n, o) {
|
|
296
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
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 o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
299
|
+
var i = this.tryEntries[o],
|
|
300
|
+
a = i.completion;
|
|
301
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
302
|
+
if (i.tryLoc <= this.prev) {
|
|
303
|
+
var c = n.call(i, "catchLoc"),
|
|
304
|
+
u = n.call(i, "finallyLoc");
|
|
305
|
+
if (c && u) {
|
|
306
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
307
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
308
|
+
} else if (c) {
|
|
309
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
310
310
|
} else {
|
|
311
|
-
if (!
|
|
312
|
-
if (this.prev <
|
|
311
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
312
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
},
|
|
317
|
-
abrupt: function (
|
|
318
|
-
for (var
|
|
319
|
-
var
|
|
320
|
-
if (
|
|
321
|
-
var
|
|
317
|
+
abrupt: function (t, e) {
|
|
318
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
319
|
+
var o = this.tryEntries[r];
|
|
320
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
321
|
+
var i = o;
|
|
322
322
|
break;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
|
|
326
|
-
var
|
|
327
|
-
return
|
|
325
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
326
|
+
var a = i ? i.completion : {};
|
|
327
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
328
328
|
},
|
|
329
|
-
complete: function (
|
|
330
|
-
if ("throw" ===
|
|
331
|
-
return "break" ===
|
|
329
|
+
complete: function (t, e) {
|
|
330
|
+
if ("throw" === t.type) throw t.arg;
|
|
331
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
332
332
|
},
|
|
333
|
-
finish: function (
|
|
334
|
-
for (var
|
|
335
|
-
var
|
|
336
|
-
if (
|
|
333
|
+
finish: function (t) {
|
|
334
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
335
|
+
var r = this.tryEntries[e];
|
|
336
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
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 (t) {
|
|
340
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
341
|
+
var r = this.tryEntries[e];
|
|
342
|
+
if (r.tryLoc === t) {
|
|
343
|
+
var n = r.completion;
|
|
344
|
+
if ("throw" === n.type) {
|
|
345
|
+
var o = n.arg;
|
|
346
|
+
resetTryEntry(r);
|
|
347
347
|
}
|
|
348
|
-
return
|
|
348
|
+
return o;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
throw new Error("illegal catch attempt");
|
|
352
352
|
},
|
|
353
|
-
delegateYield: function (
|
|
353
|
+
delegateYield: function (e, r, n) {
|
|
354
354
|
return this.delegate = {
|
|
355
|
-
iterator: values(
|
|
356
|
-
resultName:
|
|
357
|
-
nextLoc:
|
|
358
|
-
}, "next" === this.method && (this.arg =
|
|
359
|
-
}
|
|
360
|
-
},
|
|
355
|
+
iterator: values(e),
|
|
356
|
+
resultName: r,
|
|
357
|
+
nextLoc: n
|
|
358
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
359
|
+
}
|
|
360
|
+
}, e;
|
|
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);
|
|
361
375
|
}
|
|
362
|
-
function _typeof(
|
|
376
|
+
function _typeof(o) {
|
|
363
377
|
"@babel/helpers - typeof";
|
|
364
378
|
|
|
365
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
366
|
-
return typeof
|
|
367
|
-
} : function (
|
|
368
|
-
return
|
|
369
|
-
}, _typeof(
|
|
379
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
380
|
+
return typeof o;
|
|
381
|
+
} : function (o) {
|
|
382
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
383
|
+
}, _typeof(o);
|
|
370
384
|
}
|
|
371
385
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
372
386
|
try {
|
|
@@ -473,20 +487,6 @@ function _nonIterableSpread() {
|
|
|
473
487
|
function _nonIterableRest() {
|
|
474
488
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
475
489
|
}
|
|
476
|
-
function _toPrimitive(input, hint) {
|
|
477
|
-
if (typeof input !== "object" || input === null) return input;
|
|
478
|
-
var prim = input[Symbol.toPrimitive];
|
|
479
|
-
if (prim !== undefined) {
|
|
480
|
-
var res = prim.call(input, hint || "default");
|
|
481
|
-
if (typeof res !== "object") return res;
|
|
482
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
483
|
-
}
|
|
484
|
-
return (hint === "string" ? String : Number)(input);
|
|
485
|
-
}
|
|
486
|
-
function _toPropertyKey(arg) {
|
|
487
|
-
var key = _toPrimitive(arg, "string");
|
|
488
|
-
return typeof key === "symbol" ? key : String(key);
|
|
489
|
-
}
|
|
490
490
|
|
|
491
491
|
function ApaasCascader(props) {
|
|
492
492
|
return /*#__PURE__*/React.createElement(Cascader, _objectSpread2({
|
|
@@ -511,11 +511,12 @@ var ApaasDate = function ApaasDate(props) {
|
|
|
511
511
|
}, otherProps));
|
|
512
512
|
};
|
|
513
513
|
|
|
514
|
-
var _excluded$1 = ["isNumber", "replaceWarn"];
|
|
514
|
+
var _excluded$1 = ["isNumber", "replaceWarn", "precision"];
|
|
515
515
|
function ApaasInput(props) {
|
|
516
516
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
517
517
|
var isNumber = props.isNumber,
|
|
518
518
|
replaceWarn = props.replaceWarn,
|
|
519
|
+
precision = props.precision,
|
|
519
520
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
520
521
|
var handleBlur = function handleBlur(e) {
|
|
521
522
|
// 去除头尾空格
|
|
@@ -525,8 +526,12 @@ function ApaasInput(props) {
|
|
|
525
526
|
typeof onChange === 'function' && onChange(e);
|
|
526
527
|
typeof onBlur === 'function' && onBlur(e);
|
|
527
528
|
};
|
|
529
|
+
return isNumber ?
|
|
530
|
+
/*#__PURE__*/
|
|
528
531
|
// @ts-ignore
|
|
529
|
-
|
|
532
|
+
React.createElement(InputNumber, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
533
|
+
precision: precision === 'limit' ? undefined : precision
|
|
534
|
+
})) : /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
530
535
|
onBlur: handleBlur
|
|
531
536
|
}));
|
|
532
537
|
}
|
|
@@ -7627,6 +7632,329 @@ function withFormItem(WrappedComponent) {
|
|
|
7627
7632
|
};
|
|
7628
7633
|
}
|
|
7629
7634
|
|
|
7635
|
+
/*
|
|
7636
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7637
|
+
* @Date: 2022-09-13 11:06:09
|
|
7638
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7639
|
+
* @LastEditTime: 2022-11-04 15:55:10
|
|
7640
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7641
|
+
* @Description:
|
|
7642
|
+
*
|
|
7643
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7644
|
+
*/
|
|
7645
|
+
var extendRequest = extend$1({});
|
|
7646
|
+
|
|
7647
|
+
var WidgetMap = {
|
|
7648
|
+
INPUT: 'input',
|
|
7649
|
+
TEXTAREA: 'textarea'
|
|
7650
|
+
};
|
|
7651
|
+
var pageSize = 10;
|
|
7652
|
+
var SubForm = function SubForm(props) {
|
|
7653
|
+
var _selectOptions$;
|
|
7654
|
+
var value = props.value,
|
|
7655
|
+
onChange = props.onChange,
|
|
7656
|
+
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
7657
|
+
_props$subConfig = props.subConfig,
|
|
7658
|
+
config = _props$subConfig.config,
|
|
7659
|
+
flowStatus = _props$subConfig.flowStatus,
|
|
7660
|
+
flowTemplateKey = _props$subConfig.flowTemplateKey,
|
|
7661
|
+
nodeId = _props$subConfig.nodeId,
|
|
7662
|
+
workOrderTemplateId = _props$subConfig.workOrderTemplateId;
|
|
7663
|
+
var ref = useRef(null);
|
|
7664
|
+
var _useState = useState(false),
|
|
7665
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7666
|
+
open = _useState2[0],
|
|
7667
|
+
setOpen = _useState2[1];
|
|
7668
|
+
var _useState3 = useState(''),
|
|
7669
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7670
|
+
selectKey = _useState4[0],
|
|
7671
|
+
setSelectKey = _useState4[1];
|
|
7672
|
+
var _useState5 = useState(''),
|
|
7673
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7674
|
+
inputValue = _useState6[0],
|
|
7675
|
+
setInputValue = _useState6[1];
|
|
7676
|
+
var _useState7 = useState([]),
|
|
7677
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7678
|
+
list = _useState8[0],
|
|
7679
|
+
setList = _useState8[1];
|
|
7680
|
+
var _useState9 = useState(1),
|
|
7681
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
7682
|
+
pageNo = _useState10[0],
|
|
7683
|
+
setPageNo = _useState10[1];
|
|
7684
|
+
var _useState11 = useState(true),
|
|
7685
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
7686
|
+
hasMore = _useState12[0],
|
|
7687
|
+
setHasMore = _useState12[1];
|
|
7688
|
+
var updateHandle = function updateHandle(val, index, type) {
|
|
7689
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
7690
|
+
var newValue = JSON.parse(JSON.stringify(value));
|
|
7691
|
+
newValue[index][type] = val;
|
|
7692
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newValue));
|
|
7693
|
+
}
|
|
7694
|
+
};
|
|
7695
|
+
var column = [{
|
|
7696
|
+
dataIndex: 'index',
|
|
7697
|
+
title: '序号',
|
|
7698
|
+
width: 70,
|
|
7699
|
+
render: function render(val, record, index) {
|
|
7700
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7701
|
+
style: {
|
|
7702
|
+
width: 25
|
|
7703
|
+
}
|
|
7704
|
+
}, index + 1);
|
|
7705
|
+
}
|
|
7706
|
+
}].concat(_toConsumableArray(config.filter(function (t) {
|
|
7707
|
+
return t.isShow;
|
|
7708
|
+
}).map(function (t) {
|
|
7709
|
+
return {
|
|
7710
|
+
dataIndex: t.key,
|
|
7711
|
+
title: /*#__PURE__*/React.createElement("div", null, t.isRequired ? /*#__PURE__*/React.createElement("span", {
|
|
7712
|
+
style: {
|
|
7713
|
+
color: 'red'
|
|
7714
|
+
}
|
|
7715
|
+
}, "*") : null, t.name),
|
|
7716
|
+
width: 120,
|
|
7717
|
+
render: function render(val, record, index) {
|
|
7718
|
+
// @ts-ignore
|
|
7719
|
+
var precisionValue = t.precision === 'limit' ? undefined : t.precision;
|
|
7720
|
+
return !t.isEdit ? t.isNumber ? /*#__PURE__*/React.createElement(InputNumber, {
|
|
7721
|
+
value: val,
|
|
7722
|
+
precision: precisionValue,
|
|
7723
|
+
onChange: function onChange(e) {
|
|
7724
|
+
return updateHandle(e, index, t.key);
|
|
7725
|
+
}
|
|
7726
|
+
}) : /*#__PURE__*/React.createElement(Input, {
|
|
7727
|
+
value: val,
|
|
7728
|
+
onChange: function onChange(e) {
|
|
7729
|
+
var _e$target;
|
|
7730
|
+
return updateHandle(e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value, index, t.key);
|
|
7731
|
+
}
|
|
7732
|
+
}) : /*#__PURE__*/React.createElement("div", null, val);
|
|
7733
|
+
}
|
|
7734
|
+
};
|
|
7735
|
+
})), [{
|
|
7736
|
+
dataIndex: 'operation',
|
|
7737
|
+
title: '操作',
|
|
7738
|
+
width: 70,
|
|
7739
|
+
fixed: 'right',
|
|
7740
|
+
render: function render(val, record, index) {
|
|
7741
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
7742
|
+
type: "link",
|
|
7743
|
+
onClick: function onClick() {
|
|
7744
|
+
return deleteHandle(record.uuid);
|
|
7745
|
+
}
|
|
7746
|
+
}, "\u5220\u9664");
|
|
7747
|
+
}
|
|
7748
|
+
}]);
|
|
7749
|
+
var columsSearch = useMemo(function () {
|
|
7750
|
+
return [{
|
|
7751
|
+
dataIndex: 'index',
|
|
7752
|
+
title: '序号',
|
|
7753
|
+
render: function render(val, record, index) {
|
|
7754
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
7755
|
+
style: {
|
|
7756
|
+
width: 25
|
|
7757
|
+
}
|
|
7758
|
+
}, index + 1);
|
|
7759
|
+
}
|
|
7760
|
+
}].concat(_toConsumableArray(config.map(function (t) {
|
|
7761
|
+
return {
|
|
7762
|
+
dataIndex: t.key,
|
|
7763
|
+
title: t.name
|
|
7764
|
+
};
|
|
7765
|
+
})));
|
|
7766
|
+
}, [config]);
|
|
7767
|
+
var valueMap = useMemo(function () {
|
|
7768
|
+
return config.reduce(function (prv, next) {
|
|
7769
|
+
prv["".concat(next.key, "_").concat(WidgetMap[next.workOrderComponentType])] = next.key;
|
|
7770
|
+
return prv;
|
|
7771
|
+
}, {});
|
|
7772
|
+
}, [config]);
|
|
7773
|
+
var selectOptions = useMemo(function () {
|
|
7774
|
+
var _options$;
|
|
7775
|
+
var options = config.filter(function (t) {
|
|
7776
|
+
return t.isShow;
|
|
7777
|
+
}).map(function (item) {
|
|
7778
|
+
return {
|
|
7779
|
+
label: item.name,
|
|
7780
|
+
value: "".concat(item.key, "_").concat(WidgetMap[item.workOrderComponentType])
|
|
7781
|
+
};
|
|
7782
|
+
});
|
|
7783
|
+
setSelectKey(options === null || options === void 0 ? void 0 : (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value);
|
|
7784
|
+
return options;
|
|
7785
|
+
}, [config]);
|
|
7786
|
+
var deleteHandle = function deleteHandle(uuid) {
|
|
7787
|
+
var newList = value.filter(function (item) {
|
|
7788
|
+
return item.uuid !== uuid;
|
|
7789
|
+
});
|
|
7790
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
7791
|
+
};
|
|
7792
|
+
var onScrollCapture = function onScrollCapture(e) {
|
|
7793
|
+
if (e.target.scrollTop + e.target.clientHeight >= e.target.scrollHeight) {
|
|
7794
|
+
if (hasMore) {
|
|
7795
|
+
getWorkOrderList({
|
|
7796
|
+
pageNo: pageNo + 1
|
|
7797
|
+
});
|
|
7798
|
+
setPageNo(pageNo + 1);
|
|
7799
|
+
}
|
|
7800
|
+
}
|
|
7801
|
+
};
|
|
7802
|
+
var getWorkOrderList = /*#__PURE__*/function () {
|
|
7803
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7804
|
+
var _ref2,
|
|
7805
|
+
_ref2$pageNo,
|
|
7806
|
+
pageNo,
|
|
7807
|
+
params,
|
|
7808
|
+
res,
|
|
7809
|
+
data,
|
|
7810
|
+
success,
|
|
7811
|
+
newList,
|
|
7812
|
+
_args = arguments;
|
|
7813
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7814
|
+
while (1) switch (_context.prev = _context.next) {
|
|
7815
|
+
case 0:
|
|
7816
|
+
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo;
|
|
7817
|
+
params = {
|
|
7818
|
+
flowNodeId: nodeId,
|
|
7819
|
+
flowTemplateKey: flowTemplateKey === null || flowTemplateKey === void 0 ? void 0 : flowTemplateKey[1],
|
|
7820
|
+
pageNo: pageNo,
|
|
7821
|
+
pageSize: pageSize,
|
|
7822
|
+
templateKey: workOrderTemplateId,
|
|
7823
|
+
needReturnRepeatValue: true,
|
|
7824
|
+
needFilterShopByPermission: needFilterShopByPermission,
|
|
7825
|
+
queryComponents: [{
|
|
7826
|
+
key: 'flowStatus',
|
|
7827
|
+
symbol: 'in',
|
|
7828
|
+
value: flowStatus
|
|
7829
|
+
}]
|
|
7830
|
+
};
|
|
7831
|
+
if (selectKey && inputValue) {
|
|
7832
|
+
params.queryComponents = [{
|
|
7833
|
+
key: 'flowStatus',
|
|
7834
|
+
symbol: 'in',
|
|
7835
|
+
value: flowStatus
|
|
7836
|
+
}, {
|
|
7837
|
+
key: selectKey,
|
|
7838
|
+
symbol: 'in',
|
|
7839
|
+
value: [inputValue]
|
|
7840
|
+
}];
|
|
7841
|
+
}
|
|
7842
|
+
_context.next = 5;
|
|
7843
|
+
return extendRequest('/qy/view/workOrderList', {
|
|
7844
|
+
method: 'post',
|
|
7845
|
+
data: params
|
|
7846
|
+
});
|
|
7847
|
+
case 5:
|
|
7848
|
+
res = _context.sent;
|
|
7849
|
+
data = res.data, success = res.success;
|
|
7850
|
+
if (success) {
|
|
7851
|
+
newList = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
7852
|
+
var params = {};
|
|
7853
|
+
Object.keys(item.jsonMap).forEach(function (key) {
|
|
7854
|
+
if (valueMap[key]) {
|
|
7855
|
+
params[valueMap[key]] = item.jsonMap[key];
|
|
7856
|
+
}
|
|
7857
|
+
});
|
|
7858
|
+
return params;
|
|
7859
|
+
});
|
|
7860
|
+
if (pageNo === 1) {
|
|
7861
|
+
setList(newList);
|
|
7862
|
+
} else {
|
|
7863
|
+
setList([].concat(_toConsumableArray(list), _toConsumableArray(newList)));
|
|
7864
|
+
setHasMore((data === null || data === void 0 ? void 0 : data.list.length) === pageSize);
|
|
7865
|
+
}
|
|
7866
|
+
}
|
|
7867
|
+
case 8:
|
|
7868
|
+
case "end":
|
|
7869
|
+
return _context.stop();
|
|
7870
|
+
}
|
|
7871
|
+
}, _callee);
|
|
7872
|
+
}));
|
|
7873
|
+
return function getWorkOrderList() {
|
|
7874
|
+
return _ref.apply(this, arguments);
|
|
7875
|
+
};
|
|
7876
|
+
}();
|
|
7877
|
+
useEffect(function () {
|
|
7878
|
+
setPageNo(1);
|
|
7879
|
+
getWorkOrderList({
|
|
7880
|
+
pageNo: 1
|
|
7881
|
+
});
|
|
7882
|
+
}, []);
|
|
7883
|
+
useEffect(function () {
|
|
7884
|
+
getWorkOrderList({
|
|
7885
|
+
pageNo: 1
|
|
7886
|
+
});
|
|
7887
|
+
}, [inputValue]);
|
|
7888
|
+
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
7889
|
+
setOpen(newOpen);
|
|
7890
|
+
};
|
|
7891
|
+
var onChangeInput = useCallback(debounce(function (val) {
|
|
7892
|
+
setInputValue(val);
|
|
7893
|
+
}, 1000), []);
|
|
7894
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, {
|
|
7895
|
+
style: {
|
|
7896
|
+
width: '100px'
|
|
7897
|
+
},
|
|
7898
|
+
options: selectOptions,
|
|
7899
|
+
defaultValue: selectOptions === null || selectOptions === void 0 ? void 0 : (_selectOptions$ = selectOptions[0]) === null || _selectOptions$ === void 0 ? void 0 : _selectOptions$.value,
|
|
7900
|
+
value: selectKey,
|
|
7901
|
+
onChange: setSelectKey
|
|
7902
|
+
}), /*#__PURE__*/React.createElement(Popover, {
|
|
7903
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
7904
|
+
ref: ref,
|
|
7905
|
+
onScrollCapture: onScrollCapture,
|
|
7906
|
+
style: {
|
|
7907
|
+
height: 320,
|
|
7908
|
+
overflowY: 'scroll',
|
|
7909
|
+
overflowX: 'auto'
|
|
7910
|
+
}
|
|
7911
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
7912
|
+
columns: columsSearch,
|
|
7913
|
+
dataSource: list,
|
|
7914
|
+
rowKey: 'index',
|
|
7915
|
+
size: "small",
|
|
7916
|
+
pagination: false,
|
|
7917
|
+
scroll: {
|
|
7918
|
+
x: '100%'
|
|
7919
|
+
},
|
|
7920
|
+
locale: {
|
|
7921
|
+
emptyText: '暂无数据'
|
|
7922
|
+
},
|
|
7923
|
+
onRow: function onRow(record) {
|
|
7924
|
+
return {
|
|
7925
|
+
onClick: function onClick() {
|
|
7926
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, record), {}, {
|
|
7927
|
+
uuid: uuid()
|
|
7928
|
+
})]));
|
|
7929
|
+
setOpen(false);
|
|
7930
|
+
}
|
|
7931
|
+
};
|
|
7932
|
+
}
|
|
7933
|
+
})),
|
|
7934
|
+
trigger: "click",
|
|
7935
|
+
placement: "bottom",
|
|
7936
|
+
open: open,
|
|
7937
|
+
onOpenChange: handleOpenChange
|
|
7938
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
7939
|
+
allowClear: true,
|
|
7940
|
+
onChange: function onChange(e) {
|
|
7941
|
+
onChangeInput(e.target.value);
|
|
7942
|
+
}
|
|
7943
|
+
}))), /*#__PURE__*/React.createElement(Table, {
|
|
7944
|
+
columns: column,
|
|
7945
|
+
dataSource: value,
|
|
7946
|
+
rowKey: 'uuid',
|
|
7947
|
+
size: "small",
|
|
7948
|
+
pagination: false,
|
|
7949
|
+
scroll: {
|
|
7950
|
+
x: '100%'
|
|
7951
|
+
},
|
|
7952
|
+
locale: {
|
|
7953
|
+
emptyText: '暂无数据'
|
|
7954
|
+
}
|
|
7955
|
+
}));
|
|
7956
|
+
};
|
|
7957
|
+
|
|
7630
7958
|
var BuyerNick = function BuyerNick(props) {
|
|
7631
7959
|
var _props$value = props.value,
|
|
7632
7960
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -7638,19 +7966,21 @@ var BuyerNick = function BuyerNick(props) {
|
|
|
7638
7966
|
var changeValue = function changeValue(e, type) {
|
|
7639
7967
|
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, e.target.value)));
|
|
7640
7968
|
};
|
|
7641
|
-
useEffect(
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
}
|
|
7969
|
+
// useEffect(() => {
|
|
7970
|
+
// //淘宝平台和抖音平台需要展示买家id
|
|
7971
|
+
// const platformList = ['TAOBAO', 'FXG'];
|
|
7972
|
+
// const showBuyerId = (shopList || []).some(
|
|
7973
|
+
// (item) =>
|
|
7974
|
+
// item.shopId == shopId && platformList.includes(item.shopSourceStr),
|
|
7975
|
+
// );
|
|
7976
|
+
// //如果不是淘宝店铺 旺旺id为空
|
|
7977
|
+
// if (!showBuyerId) {
|
|
7978
|
+
// onChange?.({
|
|
7979
|
+
// ...value,
|
|
7980
|
+
// buyerOpenUid: '',
|
|
7981
|
+
// });
|
|
7982
|
+
// }
|
|
7983
|
+
// }, [shopId, shopList]);
|
|
7654
7984
|
return /*#__PURE__*/React.createElement(Input, {
|
|
7655
7985
|
disabled: disabled,
|
|
7656
7986
|
placeholder: "\u8BF7\u8F93\u5165\u4E70\u5BB6\u6635\u79F0",
|
|
@@ -7911,18 +8241,6 @@ var AliPay = function AliPay(props) {
|
|
|
7911
8241
|
})));
|
|
7912
8242
|
};
|
|
7913
8243
|
|
|
7914
|
-
/*
|
|
7915
|
-
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7916
|
-
* @Date: 2022-09-13 11:06:09
|
|
7917
|
-
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7918
|
-
* @LastEditTime: 2022-11-04 15:55:10
|
|
7919
|
-
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7920
|
-
* @Description:
|
|
7921
|
-
*
|
|
7922
|
-
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7923
|
-
*/
|
|
7924
|
-
var extendRequest = extend$1({});
|
|
7925
|
-
|
|
7926
8244
|
var css_248z$5 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.goodsBox .right-context {\n font-size: 12px;\n}\n.goodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.goodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.goodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.goods-imgBox .add-btn {\n color: #86909c;\n}\n.goods-imgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
7927
8245
|
styleInject(css_248z$5);
|
|
7928
8246
|
|
|
@@ -10471,6 +10789,9 @@ var jstGoods = function jstGoods(props) {
|
|
|
10471
10789
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10472
10790
|
changeOrderInfo[type] = val;
|
|
10473
10791
|
changeOrderInfo['sendId'] = option.value;
|
|
10792
|
+
if (platformType === 'wdt' && type === 'sendName') {
|
|
10793
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
10794
|
+
}
|
|
10474
10795
|
var newList = _toConsumableArray(value);
|
|
10475
10796
|
newList[changeIndex] = changeOrderInfo;
|
|
10476
10797
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
@@ -11755,7 +12076,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
11755
12076
|
width: 70
|
|
11756
12077
|
},
|
|
11757
12078
|
value: val,
|
|
11758
|
-
min:
|
|
12079
|
+
min: 1,
|
|
11759
12080
|
precision: 0,
|
|
11760
12081
|
onChange: function onChange(num) {
|
|
11761
12082
|
return updateHandle(num, index, 'num');
|
|
@@ -12127,7 +12448,7 @@ var GoodItem$1 = function GoodItem(props) {
|
|
|
12127
12448
|
width: 70
|
|
12128
12449
|
},
|
|
12129
12450
|
value: val,
|
|
12130
|
-
min:
|
|
12451
|
+
min: 1,
|
|
12131
12452
|
precision: 0,
|
|
12132
12453
|
onChange: function onChange(num) {
|
|
12133
12454
|
return updateHandle(num, index, 'number');
|
|
@@ -12919,9 +13240,11 @@ var index$1 = (function (props) {
|
|
|
12919
13240
|
_onChange = props.onChange,
|
|
12920
13241
|
disabled = props.disabled,
|
|
12921
13242
|
type = props.type;
|
|
13243
|
+
var onceRef = useRef(false);
|
|
12922
13244
|
useEffect(function () {
|
|
12923
13245
|
var _value$orders, _value$showOrderInfo;
|
|
12924
|
-
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length)) {
|
|
13246
|
+
if (!(value === null || value === void 0 ? void 0 : (_value$orders = value.orders) === null || _value$orders === void 0 ? void 0 : _value$orders.length) && (value === null || value === void 0 ? void 0 : value.orderNo) && (value === null || value === void 0 ? void 0 : (_value$showOrderInfo = value.showOrderInfo) === null || _value$showOrderInfo === void 0 ? void 0 : _value$showOrderInfo.length) && !onceRef.current) {
|
|
13247
|
+
onceRef.current = true;
|
|
12925
13248
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
12926
13249
|
getOrderList(value.orderNo);
|
|
12927
13250
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
@@ -12930,7 +13253,7 @@ var index$1 = (function (props) {
|
|
|
12930
13253
|
getWdtOrderList(value.orderNo);
|
|
12931
13254
|
}
|
|
12932
13255
|
}
|
|
12933
|
-
}, [value
|
|
13256
|
+
}, [value, type]);
|
|
12934
13257
|
var columns = useMemo(function () {
|
|
12935
13258
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12936
13259
|
return [{
|
|
@@ -12973,7 +13296,8 @@ var index$1 = (function (props) {
|
|
|
12973
13296
|
})
|
|
12974
13297
|
}));
|
|
12975
13298
|
}
|
|
12976
|
-
|
|
13299
|
+
onceRef.current = false;
|
|
13300
|
+
case 7:
|
|
12977
13301
|
case "end":
|
|
12978
13302
|
return _context.stop();
|
|
12979
13303
|
}
|
|
@@ -13018,7 +13342,8 @@ var index$1 = (function (props) {
|
|
|
13018
13342
|
})
|
|
13019
13343
|
}));
|
|
13020
13344
|
}
|
|
13021
|
-
|
|
13345
|
+
onceRef.current = false;
|
|
13346
|
+
case 7:
|
|
13022
13347
|
case "end":
|
|
13023
13348
|
return _context2.stop();
|
|
13024
13349
|
}
|
|
@@ -13073,7 +13398,8 @@ var index$1 = (function (props) {
|
|
|
13073
13398
|
})
|
|
13074
13399
|
}));
|
|
13075
13400
|
}
|
|
13076
|
-
|
|
13401
|
+
onceRef.current = false;
|
|
13402
|
+
case 7:
|
|
13077
13403
|
case "end":
|
|
13078
13404
|
return _context3.stop();
|
|
13079
13405
|
}
|
|
@@ -13740,9 +14066,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13740
14066
|
var _typeMap$type25;
|
|
13741
14067
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
|
|
13742
14068
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
|
|
13743
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
13744
|
-
gutter: 8
|
|
13745
|
-
}, /*#__PURE__*/React.createElement(Col, {
|
|
14069
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(Col, {
|
|
13746
14070
|
className: "gutter-row",
|
|
13747
14071
|
xs: {
|
|
13748
14072
|
span: 11
|
|
@@ -13774,6 +14098,9 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13774
14098
|
},
|
|
13775
14099
|
md: {
|
|
13776
14100
|
span: 6
|
|
14101
|
+
},
|
|
14102
|
+
style: {
|
|
14103
|
+
marginLeft: '8px'
|
|
13777
14104
|
}
|
|
13778
14105
|
}, /*#__PURE__*/React.createElement(Cascader, {
|
|
13779
14106
|
style: {
|
|
@@ -14568,4 +14895,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
14568
14895
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
14569
14896
|
};
|
|
14570
14897
|
|
|
14571
|
-
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, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|
|
14898
|
+
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, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonExchangeGoods, CommonGoods, CommonSystemOrder$1 as CommonMultiStatus, CommonReturnGoods, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, SubForm, Supplier, TBGoodId, TBGoodSerial, TradeId, WdtGoodList, wdtReissue as WdtReissue, WlnGoods };
|