@kmkf-fe-packages/basic-components 1.0.9 → 1.0.10-beta.11
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/README.md +1 -1
- package/dist/index.esm.js +623 -288
- package/dist/index.js +621 -285
- 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 +4 -4
package/dist/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var icons = require('@ant-design/icons');
|
|
|
8
8
|
var request = require('umi-request');
|
|
9
9
|
var reactCopyToClipboard = require('react-copy-to-clipboard');
|
|
10
10
|
var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
|
|
11
|
-
var zhCN = require('antd/lib/locale/zh_CN');
|
|
12
11
|
var lodash = require('lodash');
|
|
12
|
+
var zhCN = require('antd/lib/locale/zh_CN');
|
|
13
13
|
var ahooks = require('ahooks');
|
|
14
14
|
var pubsub = require('pubsub-js');
|
|
15
15
|
var BigNumber = require('bignumber.js');
|
|
@@ -22,363 +22,377 @@ var zhCN__default = /*#__PURE__*/_interopDefaultLegacy(zhCN);
|
|
|
22
22
|
var pubsub__default = /*#__PURE__*/_interopDefaultLegacy(pubsub);
|
|
23
23
|
var BigNumber__default = /*#__PURE__*/_interopDefaultLegacy(BigNumber);
|
|
24
24
|
|
|
25
|
-
function _iterableToArrayLimit(
|
|
26
|
-
var
|
|
27
|
-
if (null !=
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
function _iterableToArrayLimit(r, l) {
|
|
26
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
27
|
+
if (null != t) {
|
|
28
|
+
var e,
|
|
29
|
+
n,
|
|
30
|
+
i,
|
|
31
|
+
u,
|
|
32
|
+
a = [],
|
|
33
|
+
f = !0,
|
|
34
|
+
o = !1;
|
|
35
35
|
try {
|
|
36
|
-
if (
|
|
37
|
-
if (Object(
|
|
38
|
-
|
|
39
|
-
} else for (; !(
|
|
40
|
-
} catch (
|
|
41
|
-
|
|
36
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
37
|
+
if (Object(t) !== t) return;
|
|
38
|
+
f = !1;
|
|
39
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
40
|
+
} catch (r) {
|
|
41
|
+
o = !0, n = r;
|
|
42
42
|
} finally {
|
|
43
43
|
try {
|
|
44
|
-
if (!
|
|
44
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
45
45
|
} finally {
|
|
46
|
-
if (
|
|
46
|
+
if (o) throw n;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
return
|
|
49
|
+
return a;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function ownKeys(
|
|
53
|
-
var
|
|
52
|
+
function ownKeys(e, r) {
|
|
53
|
+
var t = Object.keys(e);
|
|
54
54
|
if (Object.getOwnPropertySymbols) {
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
return Object.getOwnPropertyDescriptor(
|
|
58
|
-
})),
|
|
55
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
56
|
+
r && (o = o.filter(function (r) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
58
|
+
})), t.push.apply(t, o);
|
|
59
59
|
}
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
function _objectSpread2(
|
|
63
|
-
for (var
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
_defineProperty(
|
|
67
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
68
|
-
Object.defineProperty(
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
function _objectSpread2(e) {
|
|
63
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
64
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
65
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
66
|
+
_defineProperty(e, r, t[r]);
|
|
67
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
68
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return e;
|
|
72
72
|
}
|
|
73
73
|
function _regeneratorRuntime() {
|
|
74
74
|
_regeneratorRuntime = function () {
|
|
75
|
-
return
|
|
76
|
-
};
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
return e;
|
|
76
|
+
};
|
|
77
|
+
var t,
|
|
78
|
+
e = {},
|
|
79
|
+
r = Object.prototype,
|
|
80
|
+
n = r.hasOwnProperty,
|
|
81
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
82
|
+
t[e] = r.value;
|
|
82
83
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
function define(
|
|
88
|
-
return Object.defineProperty(
|
|
89
|
-
value:
|
|
84
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
85
|
+
a = i.iterator || "@@iterator",
|
|
86
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
87
|
+
u = i.toStringTag || "@@toStringTag";
|
|
88
|
+
function define(t, e, r) {
|
|
89
|
+
return Object.defineProperty(t, e, {
|
|
90
|
+
value: r,
|
|
90
91
|
enumerable: !0,
|
|
91
92
|
configurable: !0,
|
|
92
93
|
writable: !0
|
|
93
|
-
}),
|
|
94
|
+
}), t[e];
|
|
94
95
|
}
|
|
95
96
|
try {
|
|
96
97
|
define({}, "");
|
|
97
|
-
} catch (
|
|
98
|
-
define = function (
|
|
99
|
-
return
|
|
98
|
+
} catch (t) {
|
|
99
|
+
define = function (t, e, r) {
|
|
100
|
+
return t[e] = r;
|
|
100
101
|
};
|
|
101
102
|
}
|
|
102
|
-
function wrap(
|
|
103
|
-
var
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return
|
|
107
|
-
value: makeInvokeMethod(
|
|
108
|
-
}),
|
|
103
|
+
function wrap(t, e, r, n) {
|
|
104
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
105
|
+
a = Object.create(i.prototype),
|
|
106
|
+
c = new Context(n || []);
|
|
107
|
+
return o(a, "_invoke", {
|
|
108
|
+
value: makeInvokeMethod(t, r, c)
|
|
109
|
+
}), a;
|
|
109
110
|
}
|
|
110
|
-
function tryCatch(
|
|
111
|
+
function tryCatch(t, e, r) {
|
|
111
112
|
try {
|
|
112
113
|
return {
|
|
113
114
|
type: "normal",
|
|
114
|
-
arg:
|
|
115
|
+
arg: t.call(e, r)
|
|
115
116
|
};
|
|
116
|
-
} catch (
|
|
117
|
+
} catch (t) {
|
|
117
118
|
return {
|
|
118
119
|
type: "throw",
|
|
119
|
-
arg:
|
|
120
|
+
arg: t
|
|
120
121
|
};
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
-
var
|
|
124
|
+
e.wrap = wrap;
|
|
125
|
+
var h = "suspendedStart",
|
|
126
|
+
l = "suspendedYield",
|
|
127
|
+
f = "executing",
|
|
128
|
+
s = "completed",
|
|
129
|
+
y = {};
|
|
125
130
|
function Generator() {}
|
|
126
131
|
function GeneratorFunction() {}
|
|
127
132
|
function GeneratorFunctionPrototype() {}
|
|
128
|
-
var
|
|
129
|
-
define(
|
|
133
|
+
var p = {};
|
|
134
|
+
define(p, a, function () {
|
|
130
135
|
return this;
|
|
131
136
|
});
|
|
132
|
-
var
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
var
|
|
136
|
-
function defineIteratorMethods(
|
|
137
|
-
["next", "throw", "return"].forEach(function (
|
|
138
|
-
define(
|
|
139
|
-
return this._invoke(
|
|
137
|
+
var d = Object.getPrototypeOf,
|
|
138
|
+
v = d && d(d(values([])));
|
|
139
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
140
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
141
|
+
function defineIteratorMethods(t) {
|
|
142
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
143
|
+
define(t, e, function (t) {
|
|
144
|
+
return this._invoke(e, t);
|
|
140
145
|
});
|
|
141
146
|
});
|
|
142
147
|
}
|
|
143
|
-
function AsyncIterator(
|
|
144
|
-
function invoke(
|
|
145
|
-
var
|
|
146
|
-
if ("throw" !==
|
|
147
|
-
var
|
|
148
|
-
|
|
149
|
-
return
|
|
150
|
-
invoke("next",
|
|
151
|
-
}, function (
|
|
152
|
-
invoke("throw",
|
|
153
|
-
}) :
|
|
154
|
-
|
|
155
|
-
}, function (
|
|
156
|
-
return invoke("throw",
|
|
148
|
+
function AsyncIterator(t, e) {
|
|
149
|
+
function invoke(r, o, i, a) {
|
|
150
|
+
var c = tryCatch(t[r], t, o);
|
|
151
|
+
if ("throw" !== c.type) {
|
|
152
|
+
var u = c.arg,
|
|
153
|
+
h = u.value;
|
|
154
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
155
|
+
invoke("next", t, i, a);
|
|
156
|
+
}, function (t) {
|
|
157
|
+
invoke("throw", t, i, a);
|
|
158
|
+
}) : e.resolve(h).then(function (t) {
|
|
159
|
+
u.value = t, i(u);
|
|
160
|
+
}, function (t) {
|
|
161
|
+
return invoke("throw", t, i, a);
|
|
157
162
|
});
|
|
158
163
|
}
|
|
159
|
-
|
|
164
|
+
a(c.arg);
|
|
160
165
|
}
|
|
161
|
-
var
|
|
162
|
-
|
|
163
|
-
value: function (
|
|
166
|
+
var r;
|
|
167
|
+
o(this, "_invoke", {
|
|
168
|
+
value: function (t, n) {
|
|
164
169
|
function callInvokeWithMethodAndArg() {
|
|
165
|
-
return new
|
|
166
|
-
invoke(
|
|
170
|
+
return new e(function (e, r) {
|
|
171
|
+
invoke(t, n, e, r);
|
|
167
172
|
});
|
|
168
173
|
}
|
|
169
|
-
return
|
|
174
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
170
175
|
}
|
|
171
176
|
});
|
|
172
177
|
}
|
|
173
|
-
function makeInvokeMethod(
|
|
174
|
-
var
|
|
175
|
-
return function (
|
|
176
|
-
if (
|
|
177
|
-
if (
|
|
178
|
-
if ("throw" ===
|
|
179
|
-
return
|
|
178
|
+
function makeInvokeMethod(e, r, n) {
|
|
179
|
+
var o = h;
|
|
180
|
+
return function (i, a) {
|
|
181
|
+
if (o === f) throw new Error("Generator is already running");
|
|
182
|
+
if (o === s) {
|
|
183
|
+
if ("throw" === i) throw a;
|
|
184
|
+
return {
|
|
185
|
+
value: t,
|
|
186
|
+
done: !0
|
|
187
|
+
};
|
|
180
188
|
}
|
|
181
|
-
for (
|
|
182
|
-
var
|
|
183
|
-
if (
|
|
184
|
-
var
|
|
185
|
-
if (
|
|
186
|
-
if (
|
|
187
|
-
return
|
|
189
|
+
for (n.method = i, n.arg = a;;) {
|
|
190
|
+
var c = n.delegate;
|
|
191
|
+
if (c) {
|
|
192
|
+
var u = maybeInvokeDelegate(c, n);
|
|
193
|
+
if (u) {
|
|
194
|
+
if (u === y) continue;
|
|
195
|
+
return u;
|
|
188
196
|
}
|
|
189
197
|
}
|
|
190
|
-
if ("next" ===
|
|
191
|
-
if (
|
|
192
|
-
|
|
193
|
-
} else "return" ===
|
|
194
|
-
|
|
195
|
-
var
|
|
196
|
-
if ("normal" ===
|
|
197
|
-
if (
|
|
198
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
199
|
+
if (o === h) throw o = s, n.arg;
|
|
200
|
+
n.dispatchException(n.arg);
|
|
201
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
202
|
+
o = f;
|
|
203
|
+
var p = tryCatch(e, r, n);
|
|
204
|
+
if ("normal" === p.type) {
|
|
205
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
198
206
|
return {
|
|
199
|
-
value:
|
|
200
|
-
done:
|
|
207
|
+
value: p.arg,
|
|
208
|
+
done: n.done
|
|
201
209
|
};
|
|
202
210
|
}
|
|
203
|
-
"throw" ===
|
|
211
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
204
212
|
}
|
|
205
213
|
};
|
|
206
214
|
}
|
|
207
|
-
function maybeInvokeDelegate(
|
|
208
|
-
var
|
|
209
|
-
|
|
210
|
-
if (
|
|
211
|
-
var
|
|
212
|
-
if ("throw" ===
|
|
213
|
-
var
|
|
214
|
-
return
|
|
215
|
+
function maybeInvokeDelegate(e, r) {
|
|
216
|
+
var n = r.method,
|
|
217
|
+
o = e.iterator[n];
|
|
218
|
+
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;
|
|
219
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
220
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
221
|
+
var a = i.arg;
|
|
222
|
+
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);
|
|
215
223
|
}
|
|
216
|
-
function pushTryEntry(
|
|
217
|
-
var
|
|
218
|
-
tryLoc:
|
|
224
|
+
function pushTryEntry(t) {
|
|
225
|
+
var e = {
|
|
226
|
+
tryLoc: t[0]
|
|
219
227
|
};
|
|
220
|
-
1 in
|
|
228
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
221
229
|
}
|
|
222
|
-
function resetTryEntry(
|
|
223
|
-
var
|
|
224
|
-
|
|
230
|
+
function resetTryEntry(t) {
|
|
231
|
+
var e = t.completion || {};
|
|
232
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
225
233
|
}
|
|
226
|
-
function Context(
|
|
234
|
+
function Context(t) {
|
|
227
235
|
this.tryEntries = [{
|
|
228
236
|
tryLoc: "root"
|
|
229
|
-
}],
|
|
237
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
230
238
|
}
|
|
231
|
-
function values(
|
|
232
|
-
if (
|
|
233
|
-
var
|
|
234
|
-
if (
|
|
235
|
-
if ("function" == typeof
|
|
236
|
-
if (!isNaN(
|
|
237
|
-
var
|
|
238
|
-
|
|
239
|
-
for (; ++
|
|
240
|
-
return next.value =
|
|
239
|
+
function values(e) {
|
|
240
|
+
if (e || "" === e) {
|
|
241
|
+
var r = e[a];
|
|
242
|
+
if (r) return r.call(e);
|
|
243
|
+
if ("function" == typeof e.next) return e;
|
|
244
|
+
if (!isNaN(e.length)) {
|
|
245
|
+
var o = -1,
|
|
246
|
+
i = function next() {
|
|
247
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
248
|
+
return next.value = t, next.done = !0, next;
|
|
241
249
|
};
|
|
242
|
-
return
|
|
250
|
+
return i.next = i;
|
|
243
251
|
}
|
|
244
252
|
}
|
|
245
|
-
|
|
246
|
-
next: doneResult
|
|
247
|
-
};
|
|
253
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
248
254
|
}
|
|
249
|
-
|
|
250
|
-
return {
|
|
251
|
-
value: undefined,
|
|
252
|
-
done: !0
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
255
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
256
256
|
value: GeneratorFunctionPrototype,
|
|
257
257
|
configurable: !0
|
|
258
|
-
}),
|
|
258
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
259
259
|
value: GeneratorFunction,
|
|
260
260
|
configurable: !0
|
|
261
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
262
|
-
var
|
|
263
|
-
return !!
|
|
264
|
-
},
|
|
265
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
266
|
-
},
|
|
261
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
262
|
+
var e = "function" == typeof t && t.constructor;
|
|
263
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
264
|
+
}, e.mark = function (t) {
|
|
265
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
266
|
+
}, e.awrap = function (t) {
|
|
267
267
|
return {
|
|
268
|
-
__await:
|
|
268
|
+
__await: t
|
|
269
269
|
};
|
|
270
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
270
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
271
271
|
return this;
|
|
272
|
-
}),
|
|
273
|
-
void 0 ===
|
|
274
|
-
var
|
|
275
|
-
return
|
|
276
|
-
return
|
|
272
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
273
|
+
void 0 === i && (i = Promise);
|
|
274
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
275
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
276
|
+
return t.done ? t.value : a.next();
|
|
277
277
|
});
|
|
278
|
-
}, defineIteratorMethods(
|
|
278
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
279
279
|
return this;
|
|
280
|
-
}), define(
|
|
280
|
+
}), define(g, "toString", function () {
|
|
281
281
|
return "[object Generator]";
|
|
282
|
-
}),
|
|
283
|
-
var
|
|
284
|
-
|
|
285
|
-
for (var
|
|
286
|
-
return
|
|
287
|
-
for (;
|
|
288
|
-
var
|
|
289
|
-
if (
|
|
282
|
+
}), e.keys = function (t) {
|
|
283
|
+
var e = Object(t),
|
|
284
|
+
r = [];
|
|
285
|
+
for (var n in e) r.push(n);
|
|
286
|
+
return r.reverse(), function next() {
|
|
287
|
+
for (; r.length;) {
|
|
288
|
+
var t = r.pop();
|
|
289
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
290
290
|
}
|
|
291
291
|
return next.done = !0, next;
|
|
292
292
|
};
|
|
293
|
-
},
|
|
293
|
+
}, e.values = values, Context.prototype = {
|
|
294
294
|
constructor: Context,
|
|
295
|
-
reset: function (
|
|
296
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
295
|
+
reset: function (e) {
|
|
296
|
+
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);
|
|
297
297
|
},
|
|
298
298
|
stop: function () {
|
|
299
299
|
this.done = !0;
|
|
300
|
-
var
|
|
301
|
-
if ("throw" ===
|
|
300
|
+
var t = this.tryEntries[0].completion;
|
|
301
|
+
if ("throw" === t.type) throw t.arg;
|
|
302
302
|
return this.rval;
|
|
303
303
|
},
|
|
304
|
-
dispatchException: function (
|
|
305
|
-
if (this.done) throw
|
|
306
|
-
var
|
|
307
|
-
function handle(
|
|
308
|
-
return
|
|
304
|
+
dispatchException: function (e) {
|
|
305
|
+
if (this.done) throw e;
|
|
306
|
+
var r = this;
|
|
307
|
+
function handle(n, o) {
|
|
308
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
309
309
|
}
|
|
310
|
-
for (var
|
|
311
|
-
var
|
|
312
|
-
|
|
313
|
-
if ("root" ===
|
|
314
|
-
if (
|
|
315
|
-
var
|
|
316
|
-
|
|
317
|
-
if (
|
|
318
|
-
if (this.prev <
|
|
319
|
-
if (this.prev <
|
|
320
|
-
} else if (
|
|
321
|
-
if (this.prev <
|
|
310
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
311
|
+
var i = this.tryEntries[o],
|
|
312
|
+
a = i.completion;
|
|
313
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
314
|
+
if (i.tryLoc <= this.prev) {
|
|
315
|
+
var c = n.call(i, "catchLoc"),
|
|
316
|
+
u = n.call(i, "finallyLoc");
|
|
317
|
+
if (c && u) {
|
|
318
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
319
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
320
|
+
} else if (c) {
|
|
321
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
322
322
|
} else {
|
|
323
|
-
if (!
|
|
324
|
-
if (this.prev <
|
|
323
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
324
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
|
-
abrupt: function (
|
|
330
|
-
for (var
|
|
331
|
-
var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
329
|
+
abrupt: function (t, e) {
|
|
330
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
331
|
+
var o = this.tryEntries[r];
|
|
332
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
333
|
+
var i = o;
|
|
334
334
|
break;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
|
|
338
|
-
var
|
|
339
|
-
return
|
|
337
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
338
|
+
var a = i ? i.completion : {};
|
|
339
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
340
340
|
},
|
|
341
|
-
complete: function (
|
|
342
|
-
if ("throw" ===
|
|
343
|
-
return "break" ===
|
|
341
|
+
complete: function (t, e) {
|
|
342
|
+
if ("throw" === t.type) throw t.arg;
|
|
343
|
+
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;
|
|
344
344
|
},
|
|
345
|
-
finish: function (
|
|
346
|
-
for (var
|
|
347
|
-
var
|
|
348
|
-
if (
|
|
345
|
+
finish: function (t) {
|
|
346
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
347
|
+
var r = this.tryEntries[e];
|
|
348
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
349
349
|
}
|
|
350
350
|
},
|
|
351
|
-
catch: function (
|
|
352
|
-
for (var
|
|
353
|
-
var
|
|
354
|
-
if (
|
|
355
|
-
var
|
|
356
|
-
if ("throw" ===
|
|
357
|
-
var
|
|
358
|
-
resetTryEntry(
|
|
351
|
+
catch: function (t) {
|
|
352
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
353
|
+
var r = this.tryEntries[e];
|
|
354
|
+
if (r.tryLoc === t) {
|
|
355
|
+
var n = r.completion;
|
|
356
|
+
if ("throw" === n.type) {
|
|
357
|
+
var o = n.arg;
|
|
358
|
+
resetTryEntry(r);
|
|
359
359
|
}
|
|
360
|
-
return
|
|
360
|
+
return o;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
throw new Error("illegal catch attempt");
|
|
364
364
|
},
|
|
365
|
-
delegateYield: function (
|
|
365
|
+
delegateYield: function (e, r, n) {
|
|
366
366
|
return this.delegate = {
|
|
367
|
-
iterator: values(
|
|
368
|
-
resultName:
|
|
369
|
-
nextLoc:
|
|
370
|
-
}, "next" === this.method && (this.arg =
|
|
371
|
-
}
|
|
372
|
-
},
|
|
367
|
+
iterator: values(e),
|
|
368
|
+
resultName: r,
|
|
369
|
+
nextLoc: n
|
|
370
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
371
|
+
}
|
|
372
|
+
}, e;
|
|
373
|
+
}
|
|
374
|
+
function _toPrimitive(t, r) {
|
|
375
|
+
if ("object" != typeof t || !t) return t;
|
|
376
|
+
var e = t[Symbol.toPrimitive];
|
|
377
|
+
if (void 0 !== e) {
|
|
378
|
+
var i = e.call(t, r || "default");
|
|
379
|
+
if ("object" != typeof i) return i;
|
|
380
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
381
|
+
}
|
|
382
|
+
return ("string" === r ? String : Number)(t);
|
|
383
|
+
}
|
|
384
|
+
function _toPropertyKey(t) {
|
|
385
|
+
var i = _toPrimitive(t, "string");
|
|
386
|
+
return "symbol" == typeof i ? i : String(i);
|
|
373
387
|
}
|
|
374
|
-
function _typeof(
|
|
388
|
+
function _typeof(o) {
|
|
375
389
|
"@babel/helpers - typeof";
|
|
376
390
|
|
|
377
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
378
|
-
return typeof
|
|
379
|
-
} : function (
|
|
380
|
-
return
|
|
381
|
-
}, _typeof(
|
|
391
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
392
|
+
return typeof o;
|
|
393
|
+
} : function (o) {
|
|
394
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
395
|
+
}, _typeof(o);
|
|
382
396
|
}
|
|
383
397
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
384
398
|
try {
|
|
@@ -485,20 +499,6 @@ function _nonIterableSpread() {
|
|
|
485
499
|
function _nonIterableRest() {
|
|
486
500
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
487
501
|
}
|
|
488
|
-
function _toPrimitive(input, hint) {
|
|
489
|
-
if (typeof input !== "object" || input === null) return input;
|
|
490
|
-
var prim = input[Symbol.toPrimitive];
|
|
491
|
-
if (prim !== undefined) {
|
|
492
|
-
var res = prim.call(input, hint || "default");
|
|
493
|
-
if (typeof res !== "object") return res;
|
|
494
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
495
|
-
}
|
|
496
|
-
return (hint === "string" ? String : Number)(input);
|
|
497
|
-
}
|
|
498
|
-
function _toPropertyKey(arg) {
|
|
499
|
-
var key = _toPrimitive(arg, "string");
|
|
500
|
-
return typeof key === "symbol" ? key : String(key);
|
|
501
|
-
}
|
|
502
502
|
|
|
503
503
|
function ApaasCascader(props) {
|
|
504
504
|
return /*#__PURE__*/React__default['default'].createElement(antd.Cascader, _objectSpread2({
|
|
@@ -523,11 +523,12 @@ var ApaasDate = function ApaasDate(props) {
|
|
|
523
523
|
}, otherProps));
|
|
524
524
|
};
|
|
525
525
|
|
|
526
|
-
var _excluded$1 = ["isNumber", "replaceWarn"];
|
|
526
|
+
var _excluded$1 = ["isNumber", "replaceWarn", "precision"];
|
|
527
527
|
function ApaasInput(props) {
|
|
528
528
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
529
529
|
var isNumber = props.isNumber,
|
|
530
530
|
replaceWarn = props.replaceWarn,
|
|
531
|
+
precision = props.precision,
|
|
531
532
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
532
533
|
var handleBlur = function handleBlur(e) {
|
|
533
534
|
// 去除头尾空格
|
|
@@ -537,8 +538,12 @@ function ApaasInput(props) {
|
|
|
537
538
|
typeof onChange === 'function' && onChange(e);
|
|
538
539
|
typeof onBlur === 'function' && onBlur(e);
|
|
539
540
|
};
|
|
541
|
+
return isNumber ?
|
|
542
|
+
/*#__PURE__*/
|
|
540
543
|
// @ts-ignore
|
|
541
|
-
|
|
544
|
+
React__default['default'].createElement(antd.InputNumber, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
545
|
+
precision: precision === 'limit' ? undefined : precision
|
|
546
|
+
})) : /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
542
547
|
onBlur: handleBlur
|
|
543
548
|
}));
|
|
544
549
|
}
|
|
@@ -7639,6 +7644,329 @@ function withFormItem(WrappedComponent) {
|
|
|
7639
7644
|
};
|
|
7640
7645
|
}
|
|
7641
7646
|
|
|
7647
|
+
/*
|
|
7648
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7649
|
+
* @Date: 2022-09-13 11:06:09
|
|
7650
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7651
|
+
* @LastEditTime: 2022-11-04 15:55:10
|
|
7652
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7653
|
+
* @Description:
|
|
7654
|
+
*
|
|
7655
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7656
|
+
*/
|
|
7657
|
+
var extendRequest = request.extend({});
|
|
7658
|
+
|
|
7659
|
+
var WidgetMap = {
|
|
7660
|
+
INPUT: 'input',
|
|
7661
|
+
TEXTAREA: 'textarea'
|
|
7662
|
+
};
|
|
7663
|
+
var pageSize = 10;
|
|
7664
|
+
var SubForm = function SubForm(props) {
|
|
7665
|
+
var _selectOptions$;
|
|
7666
|
+
var value = props.value,
|
|
7667
|
+
onChange = props.onChange,
|
|
7668
|
+
needFilterShopByPermission = props.needFilterShopByPermission,
|
|
7669
|
+
_props$subConfig = props.subConfig,
|
|
7670
|
+
config = _props$subConfig.config,
|
|
7671
|
+
flowStatus = _props$subConfig.flowStatus,
|
|
7672
|
+
flowTemplateKey = _props$subConfig.flowTemplateKey,
|
|
7673
|
+
nodeId = _props$subConfig.nodeId,
|
|
7674
|
+
workOrderTemplateId = _props$subConfig.workOrderTemplateId;
|
|
7675
|
+
var ref = React.useRef(null);
|
|
7676
|
+
var _useState = React.useState(false),
|
|
7677
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7678
|
+
open = _useState2[0],
|
|
7679
|
+
setOpen = _useState2[1];
|
|
7680
|
+
var _useState3 = React.useState(''),
|
|
7681
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
7682
|
+
selectKey = _useState4[0],
|
|
7683
|
+
setSelectKey = _useState4[1];
|
|
7684
|
+
var _useState5 = React.useState(''),
|
|
7685
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
7686
|
+
inputValue = _useState6[0],
|
|
7687
|
+
setInputValue = _useState6[1];
|
|
7688
|
+
var _useState7 = React.useState([]),
|
|
7689
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
7690
|
+
list = _useState8[0],
|
|
7691
|
+
setList = _useState8[1];
|
|
7692
|
+
var _useState9 = React.useState(1),
|
|
7693
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
7694
|
+
pageNo = _useState10[0],
|
|
7695
|
+
setPageNo = _useState10[1];
|
|
7696
|
+
var _useState11 = React.useState(true),
|
|
7697
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
7698
|
+
hasMore = _useState12[0],
|
|
7699
|
+
setHasMore = _useState12[1];
|
|
7700
|
+
var updateHandle = function updateHandle(val, index, type) {
|
|
7701
|
+
if (value === null || value === void 0 ? void 0 : value.length) {
|
|
7702
|
+
var newValue = JSON.parse(JSON.stringify(value));
|
|
7703
|
+
newValue[index][type] = val;
|
|
7704
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_toConsumableArray(newValue));
|
|
7705
|
+
}
|
|
7706
|
+
};
|
|
7707
|
+
var column = [{
|
|
7708
|
+
dataIndex: 'index',
|
|
7709
|
+
title: '序号',
|
|
7710
|
+
width: 70,
|
|
7711
|
+
render: function render(val, record, index) {
|
|
7712
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7713
|
+
style: {
|
|
7714
|
+
width: 25
|
|
7715
|
+
}
|
|
7716
|
+
}, index + 1);
|
|
7717
|
+
}
|
|
7718
|
+
}].concat(_toConsumableArray(config.filter(function (t) {
|
|
7719
|
+
return t.isShow;
|
|
7720
|
+
}).map(function (t) {
|
|
7721
|
+
return {
|
|
7722
|
+
dataIndex: t.key,
|
|
7723
|
+
title: /*#__PURE__*/React__default['default'].createElement("div", null, t.isRequired ? /*#__PURE__*/React__default['default'].createElement("span", {
|
|
7724
|
+
style: {
|
|
7725
|
+
color: 'red'
|
|
7726
|
+
}
|
|
7727
|
+
}, "*") : null, t.name),
|
|
7728
|
+
width: 120,
|
|
7729
|
+
render: function render(val, record, index) {
|
|
7730
|
+
// @ts-ignore
|
|
7731
|
+
var precisionValue = t.precision === 'limit' ? undefined : t.precision;
|
|
7732
|
+
return !t.isEdit ? t.isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, {
|
|
7733
|
+
value: val,
|
|
7734
|
+
precision: precisionValue,
|
|
7735
|
+
onChange: function onChange(e) {
|
|
7736
|
+
return updateHandle(e, index, t.key);
|
|
7737
|
+
}
|
|
7738
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
7739
|
+
value: val,
|
|
7740
|
+
onChange: function onChange(e) {
|
|
7741
|
+
var _e$target;
|
|
7742
|
+
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);
|
|
7743
|
+
}
|
|
7744
|
+
}) : /*#__PURE__*/React__default['default'].createElement("div", null, val);
|
|
7745
|
+
}
|
|
7746
|
+
};
|
|
7747
|
+
})), [{
|
|
7748
|
+
dataIndex: 'operation',
|
|
7749
|
+
title: '操作',
|
|
7750
|
+
width: 70,
|
|
7751
|
+
fixed: 'right',
|
|
7752
|
+
render: function render(val, record, index) {
|
|
7753
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
7754
|
+
type: "link",
|
|
7755
|
+
onClick: function onClick() {
|
|
7756
|
+
return deleteHandle(record.uuid);
|
|
7757
|
+
}
|
|
7758
|
+
}, "\u5220\u9664");
|
|
7759
|
+
}
|
|
7760
|
+
}]);
|
|
7761
|
+
var columsSearch = React.useMemo(function () {
|
|
7762
|
+
return [{
|
|
7763
|
+
dataIndex: 'index',
|
|
7764
|
+
title: '序号',
|
|
7765
|
+
render: function render(val, record, index) {
|
|
7766
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7767
|
+
style: {
|
|
7768
|
+
width: 25
|
|
7769
|
+
}
|
|
7770
|
+
}, index + 1);
|
|
7771
|
+
}
|
|
7772
|
+
}].concat(_toConsumableArray(config.map(function (t) {
|
|
7773
|
+
return {
|
|
7774
|
+
dataIndex: t.key,
|
|
7775
|
+
title: t.name
|
|
7776
|
+
};
|
|
7777
|
+
})));
|
|
7778
|
+
}, [config]);
|
|
7779
|
+
var valueMap = React.useMemo(function () {
|
|
7780
|
+
return config.reduce(function (prv, next) {
|
|
7781
|
+
prv["".concat(next.key, "_").concat(WidgetMap[next.workOrderComponentType])] = next.key;
|
|
7782
|
+
return prv;
|
|
7783
|
+
}, {});
|
|
7784
|
+
}, [config]);
|
|
7785
|
+
var selectOptions = React.useMemo(function () {
|
|
7786
|
+
var _options$;
|
|
7787
|
+
var options = config.filter(function (t) {
|
|
7788
|
+
return t.isShow;
|
|
7789
|
+
}).map(function (item) {
|
|
7790
|
+
return {
|
|
7791
|
+
label: item.name,
|
|
7792
|
+
value: "".concat(item.key, "_").concat(WidgetMap[item.workOrderComponentType])
|
|
7793
|
+
};
|
|
7794
|
+
});
|
|
7795
|
+
setSelectKey(options === null || options === void 0 ? void 0 : (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value);
|
|
7796
|
+
return options;
|
|
7797
|
+
}, [config]);
|
|
7798
|
+
var deleteHandle = function deleteHandle(uuid) {
|
|
7799
|
+
var newList = value.filter(function (item) {
|
|
7800
|
+
return item.uuid !== uuid;
|
|
7801
|
+
});
|
|
7802
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
7803
|
+
};
|
|
7804
|
+
var onScrollCapture = function onScrollCapture(e) {
|
|
7805
|
+
if (e.target.scrollTop + e.target.clientHeight >= e.target.scrollHeight) {
|
|
7806
|
+
if (hasMore) {
|
|
7807
|
+
getWorkOrderList({
|
|
7808
|
+
pageNo: pageNo + 1
|
|
7809
|
+
});
|
|
7810
|
+
setPageNo(pageNo + 1);
|
|
7811
|
+
}
|
|
7812
|
+
}
|
|
7813
|
+
};
|
|
7814
|
+
var getWorkOrderList = /*#__PURE__*/function () {
|
|
7815
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7816
|
+
var _ref2,
|
|
7817
|
+
_ref2$pageNo,
|
|
7818
|
+
pageNo,
|
|
7819
|
+
params,
|
|
7820
|
+
res,
|
|
7821
|
+
data,
|
|
7822
|
+
success,
|
|
7823
|
+
newList,
|
|
7824
|
+
_args = arguments;
|
|
7825
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7826
|
+
while (1) switch (_context.prev = _context.next) {
|
|
7827
|
+
case 0:
|
|
7828
|
+
_ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$pageNo = _ref2.pageNo, pageNo = _ref2$pageNo === void 0 ? 1 : _ref2$pageNo;
|
|
7829
|
+
params = {
|
|
7830
|
+
flowNodeId: nodeId,
|
|
7831
|
+
flowTemplateKey: flowTemplateKey === null || flowTemplateKey === void 0 ? void 0 : flowTemplateKey[1],
|
|
7832
|
+
pageNo: pageNo,
|
|
7833
|
+
pageSize: pageSize,
|
|
7834
|
+
templateKey: workOrderTemplateId,
|
|
7835
|
+
needReturnRepeatValue: true,
|
|
7836
|
+
needFilterShopByPermission: needFilterShopByPermission,
|
|
7837
|
+
queryComponents: [{
|
|
7838
|
+
key: 'flowStatus',
|
|
7839
|
+
symbol: 'in',
|
|
7840
|
+
value: flowStatus
|
|
7841
|
+
}]
|
|
7842
|
+
};
|
|
7843
|
+
if (selectKey && inputValue) {
|
|
7844
|
+
params.queryComponents = [{
|
|
7845
|
+
key: 'flowStatus',
|
|
7846
|
+
symbol: 'in',
|
|
7847
|
+
value: flowStatus
|
|
7848
|
+
}, {
|
|
7849
|
+
key: selectKey,
|
|
7850
|
+
symbol: 'in',
|
|
7851
|
+
value: [inputValue]
|
|
7852
|
+
}];
|
|
7853
|
+
}
|
|
7854
|
+
_context.next = 5;
|
|
7855
|
+
return extendRequest('/qy/view/workOrderList', {
|
|
7856
|
+
method: 'post',
|
|
7857
|
+
data: params
|
|
7858
|
+
});
|
|
7859
|
+
case 5:
|
|
7860
|
+
res = _context.sent;
|
|
7861
|
+
data = res.data, success = res.success;
|
|
7862
|
+
if (success) {
|
|
7863
|
+
newList = ((data === null || data === void 0 ? void 0 : data.list) || []).map(function (item) {
|
|
7864
|
+
var params = {};
|
|
7865
|
+
Object.keys(item.jsonMap).forEach(function (key) {
|
|
7866
|
+
if (valueMap[key]) {
|
|
7867
|
+
params[valueMap[key]] = item.jsonMap[key];
|
|
7868
|
+
}
|
|
7869
|
+
});
|
|
7870
|
+
return params;
|
|
7871
|
+
});
|
|
7872
|
+
if (pageNo === 1) {
|
|
7873
|
+
setList(newList);
|
|
7874
|
+
} else {
|
|
7875
|
+
setList([].concat(_toConsumableArray(list), _toConsumableArray(newList)));
|
|
7876
|
+
setHasMore((data === null || data === void 0 ? void 0 : data.list.length) === pageSize);
|
|
7877
|
+
}
|
|
7878
|
+
}
|
|
7879
|
+
case 8:
|
|
7880
|
+
case "end":
|
|
7881
|
+
return _context.stop();
|
|
7882
|
+
}
|
|
7883
|
+
}, _callee);
|
|
7884
|
+
}));
|
|
7885
|
+
return function getWorkOrderList() {
|
|
7886
|
+
return _ref.apply(this, arguments);
|
|
7887
|
+
};
|
|
7888
|
+
}();
|
|
7889
|
+
React.useEffect(function () {
|
|
7890
|
+
setPageNo(1);
|
|
7891
|
+
getWorkOrderList({
|
|
7892
|
+
pageNo: 1
|
|
7893
|
+
});
|
|
7894
|
+
}, []);
|
|
7895
|
+
React.useEffect(function () {
|
|
7896
|
+
getWorkOrderList({
|
|
7897
|
+
pageNo: 1
|
|
7898
|
+
});
|
|
7899
|
+
}, [inputValue]);
|
|
7900
|
+
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
7901
|
+
setOpen(newOpen);
|
|
7902
|
+
};
|
|
7903
|
+
var onChangeInput = React.useCallback(lodash.debounce(function (val) {
|
|
7904
|
+
setInputValue(val);
|
|
7905
|
+
}, 1000), []);
|
|
7906
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
7907
|
+
style: {
|
|
7908
|
+
width: '100px'
|
|
7909
|
+
},
|
|
7910
|
+
options: selectOptions,
|
|
7911
|
+
defaultValue: selectOptions === null || selectOptions === void 0 ? void 0 : (_selectOptions$ = selectOptions[0]) === null || _selectOptions$ === void 0 ? void 0 : _selectOptions$.value,
|
|
7912
|
+
value: selectKey,
|
|
7913
|
+
onChange: setSelectKey
|
|
7914
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
7915
|
+
content: /*#__PURE__*/React__default['default'].createElement("div", {
|
|
7916
|
+
ref: ref,
|
|
7917
|
+
onScrollCapture: onScrollCapture,
|
|
7918
|
+
style: {
|
|
7919
|
+
height: 320,
|
|
7920
|
+
overflowY: 'scroll',
|
|
7921
|
+
overflowX: 'auto'
|
|
7922
|
+
}
|
|
7923
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
7924
|
+
columns: columsSearch,
|
|
7925
|
+
dataSource: list,
|
|
7926
|
+
rowKey: 'index',
|
|
7927
|
+
size: "small",
|
|
7928
|
+
pagination: false,
|
|
7929
|
+
scroll: {
|
|
7930
|
+
x: '100%'
|
|
7931
|
+
},
|
|
7932
|
+
locale: {
|
|
7933
|
+
emptyText: '暂无数据'
|
|
7934
|
+
},
|
|
7935
|
+
onRow: function onRow(record) {
|
|
7936
|
+
return {
|
|
7937
|
+
onClick: function onClick() {
|
|
7938
|
+
onChange === null || onChange === void 0 ? void 0 : onChange([].concat(_toConsumableArray(value), [_objectSpread2(_objectSpread2({}, record), {}, {
|
|
7939
|
+
uuid: kmkfUtils.uuid()
|
|
7940
|
+
})]));
|
|
7941
|
+
setOpen(false);
|
|
7942
|
+
}
|
|
7943
|
+
};
|
|
7944
|
+
}
|
|
7945
|
+
})),
|
|
7946
|
+
trigger: "click",
|
|
7947
|
+
placement: "bottom",
|
|
7948
|
+
open: open,
|
|
7949
|
+
onOpenChange: handleOpenChange
|
|
7950
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
7951
|
+
allowClear: true,
|
|
7952
|
+
onChange: function onChange(e) {
|
|
7953
|
+
onChangeInput(e.target.value);
|
|
7954
|
+
}
|
|
7955
|
+
}))), /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
7956
|
+
columns: column,
|
|
7957
|
+
dataSource: value,
|
|
7958
|
+
rowKey: 'uuid',
|
|
7959
|
+
size: "small",
|
|
7960
|
+
pagination: false,
|
|
7961
|
+
scroll: {
|
|
7962
|
+
x: '100%'
|
|
7963
|
+
},
|
|
7964
|
+
locale: {
|
|
7965
|
+
emptyText: '暂无数据'
|
|
7966
|
+
}
|
|
7967
|
+
}));
|
|
7968
|
+
};
|
|
7969
|
+
|
|
7642
7970
|
var BuyerNick = function BuyerNick(props) {
|
|
7643
7971
|
var _props$value = props.value,
|
|
7644
7972
|
value = _props$value === void 0 ? {} : _props$value,
|
|
@@ -7923,18 +8251,6 @@ var AliPay = function AliPay(props) {
|
|
|
7923
8251
|
})));
|
|
7924
8252
|
};
|
|
7925
8253
|
|
|
7926
|
-
/*
|
|
7927
|
-
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
7928
|
-
* @Date: 2022-09-13 11:06:09
|
|
7929
|
-
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
7930
|
-
* @LastEditTime: 2022-11-04 15:55:10
|
|
7931
|
-
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
7932
|
-
* @Description:
|
|
7933
|
-
*
|
|
7934
|
-
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
7935
|
-
*/
|
|
7936
|
-
var extendRequest = request.extend({});
|
|
7937
|
-
|
|
7938
8254
|
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";
|
|
7939
8255
|
styleInject(css_248z$5);
|
|
7940
8256
|
|
|
@@ -10483,6 +10799,9 @@ var jstGoods = function jstGoods(props) {
|
|
|
10483
10799
|
var changeOrderInfo = _objectSpread2({}, value[changeIndex]);
|
|
10484
10800
|
changeOrderInfo[type] = val;
|
|
10485
10801
|
changeOrderInfo['sendId'] = option.value;
|
|
10802
|
+
if (platformType === 'wdt' && type === 'sendName') {
|
|
10803
|
+
changeOrderInfo['sendSnapshotName'] = option.label;
|
|
10804
|
+
}
|
|
10486
10805
|
var newList = _toConsumableArray(value);
|
|
10487
10806
|
newList[changeIndex] = changeOrderInfo;
|
|
10488
10807
|
onChange === null || onChange === void 0 ? void 0 : onChange(newList);
|
|
@@ -12931,9 +13250,11 @@ var index$1 = (function (props) {
|
|
|
12931
13250
|
_onChange = props.onChange,
|
|
12932
13251
|
disabled = props.disabled,
|
|
12933
13252
|
type = props.type;
|
|
13253
|
+
var onceRef = React.useRef(false);
|
|
12934
13254
|
React.useEffect(function () {
|
|
12935
13255
|
var _value$orders, _value$showOrderInfo;
|
|
12936
|
-
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)) {
|
|
13256
|
+
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) {
|
|
13257
|
+
onceRef.current = true;
|
|
12937
13258
|
if (type === 'BS_SYSTEM_ORDER') {
|
|
12938
13259
|
getOrderList(value.orderNo);
|
|
12939
13260
|
} else if (type === 'WLN_SYSTEM_ORDER') {
|
|
@@ -12942,7 +13263,7 @@ var index$1 = (function (props) {
|
|
|
12942
13263
|
getWdtOrderList(value.orderNo);
|
|
12943
13264
|
}
|
|
12944
13265
|
}
|
|
12945
|
-
}, [value
|
|
13266
|
+
}, [value, type]);
|
|
12946
13267
|
var columns = React.useMemo(function () {
|
|
12947
13268
|
var _columnsNameMap$type, _columnsNameMap$type2;
|
|
12948
13269
|
return [{
|
|
@@ -12985,7 +13306,8 @@ var index$1 = (function (props) {
|
|
|
12985
13306
|
})
|
|
12986
13307
|
}));
|
|
12987
13308
|
}
|
|
12988
|
-
|
|
13309
|
+
onceRef.current = false;
|
|
13310
|
+
case 7:
|
|
12989
13311
|
case "end":
|
|
12990
13312
|
return _context.stop();
|
|
12991
13313
|
}
|
|
@@ -13030,7 +13352,8 @@ var index$1 = (function (props) {
|
|
|
13030
13352
|
})
|
|
13031
13353
|
}));
|
|
13032
13354
|
}
|
|
13033
|
-
|
|
13355
|
+
onceRef.current = false;
|
|
13356
|
+
case 7:
|
|
13034
13357
|
case "end":
|
|
13035
13358
|
return _context2.stop();
|
|
13036
13359
|
}
|
|
@@ -13042,7 +13365,7 @@ var index$1 = (function (props) {
|
|
|
13042
13365
|
}();
|
|
13043
13366
|
var getWdtOrderList = /*#__PURE__*/function () {
|
|
13044
13367
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(orderNo) {
|
|
13045
|
-
var _yield$request3, success, data;
|
|
13368
|
+
var _yield$request3, success, data, trades;
|
|
13046
13369
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
13047
13370
|
while (1) switch (_context3.prev = _context3.next) {
|
|
13048
13371
|
case 0:
|
|
@@ -13058,15 +13381,25 @@ var index$1 = (function (props) {
|
|
|
13058
13381
|
success = _yield$request3.success;
|
|
13059
13382
|
data = _yield$request3.data;
|
|
13060
13383
|
if (success) {
|
|
13384
|
+
trades = ((data === null || data === void 0 ? void 0 : data.trades) || []).filter(function (item) {
|
|
13385
|
+
return (item.srcTid || '').split(',').includes(orderNo);
|
|
13386
|
+
}).map(function (item) {
|
|
13387
|
+
if (Array.isArray(item.goodDetails)) {
|
|
13388
|
+
item.goodDetails = item.goodDetails.filter(function (good) {
|
|
13389
|
+
return good.srcTid === orderNo;
|
|
13390
|
+
});
|
|
13391
|
+
}
|
|
13392
|
+
return item;
|
|
13393
|
+
});
|
|
13061
13394
|
_onChange(_objectSpread2(_objectSpread2({}, value), {}, {
|
|
13062
|
-
orders:
|
|
13395
|
+
orders: trades.map(function (item) {
|
|
13063
13396
|
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
13064
13397
|
billNo: item.tradeNo,
|
|
13065
13398
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
13066
13399
|
billTag: item.tagName
|
|
13067
13400
|
});
|
|
13068
13401
|
}),
|
|
13069
|
-
showOrderInfo:
|
|
13402
|
+
showOrderInfo: trades.map(function (item) {
|
|
13070
13403
|
return {
|
|
13071
13404
|
billNo: item.tradeNo,
|
|
13072
13405
|
billType: kmkfUtils.WDT_ORDER_TYPE_MAP[item.tradeType],
|
|
@@ -13075,7 +13408,8 @@ var index$1 = (function (props) {
|
|
|
13075
13408
|
})
|
|
13076
13409
|
}));
|
|
13077
13410
|
}
|
|
13078
|
-
|
|
13411
|
+
onceRef.current = false;
|
|
13412
|
+
case 7:
|
|
13079
13413
|
case "end":
|
|
13080
13414
|
return _context3.stop();
|
|
13081
13415
|
}
|
|
@@ -13742,9 +14076,7 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13742
14076
|
var _typeMap$type25;
|
|
13743
14077
|
return !!(value === null || value === void 0 ? void 0 : value[(_typeMap$type25 = typeMap$1[type]) === null || _typeMap$type25 === void 0 ? void 0 : _typeMap$type25.wdtSystemOrderNo]);
|
|
13744
14078
|
}, [value === null || value === void 0 ? void 0 : value[(_typeMap$type26 = typeMap$1[type]) === null || _typeMap$type26 === void 0 ? void 0 : _typeMap$type26.wdtSystemOrderNo]]);
|
|
13745
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, {
|
|
13746
|
-
gutter: 8
|
|
13747
|
-
}, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
14079
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Row, null, /*#__PURE__*/React__default['default'].createElement(antd.Col, {
|
|
13748
14080
|
className: "gutter-row",
|
|
13749
14081
|
xs: {
|
|
13750
14082
|
span: 11
|
|
@@ -13776,6 +14108,9 @@ var wdtReissue = function wdtReissue(props) {
|
|
|
13776
14108
|
},
|
|
13777
14109
|
md: {
|
|
13778
14110
|
span: 6
|
|
14111
|
+
},
|
|
14112
|
+
style: {
|
|
14113
|
+
marginLeft: '8px'
|
|
13779
14114
|
}
|
|
13780
14115
|
}, /*#__PURE__*/React__default['default'].createElement(antd.Cascader, {
|
|
13781
14116
|
style: {
|
|
@@ -14622,6 +14957,7 @@ exports.Remark = RemarkInput;
|
|
|
14622
14957
|
exports.ReturnLogistics = ExpressLogistics;
|
|
14623
14958
|
exports.ShopName = ShopNameSelect;
|
|
14624
14959
|
exports.Status = Status;
|
|
14960
|
+
exports.SubForm = SubForm;
|
|
14625
14961
|
exports.Supplier = Supplier;
|
|
14626
14962
|
exports.TBGoodId = TBGoodId;
|
|
14627
14963
|
exports.TBGoodSerial = TBGoodSerial;
|