@bit-sun/business-component 2.0.4 → 2.0.7
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/components/Functional/BillEntry/index.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +776 -375
- package/dist/index.js +774 -372
- package/dist/utils/CheckOneUser/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Business/AddSelectBusiness/index.tsx +3 -1
- package/src/components/Business/SearchSelect/BusinessUtils.ts +1 -0
- package/src/components/Functional/AddSelect/index.less +69 -1
- package/src/components/Functional/AddSelect/index.md +3 -1
- package/src/components/Functional/BillEntry/index.less +371 -0
- package/src/components/Functional/BillEntry/index.md +37 -0
- package/src/components/Functional/BillEntry/index.tsx +556 -0
- package/src/components/Functional/DataValidation/index.tsx +1 -0
- package/src/index.ts +2 -1
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var axios = require('axios');
|
|
6
|
+
require('antd/dist/antd.css');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var antd = require('antd');
|
|
8
9
|
var reactBeautifulDnd = require('react-beautiful-dnd');
|
|
@@ -44,351 +45,6 @@ function _objectSpread2(target) {
|
|
|
44
45
|
return target;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
function _regeneratorRuntime() {
|
|
48
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
49
|
-
|
|
50
|
-
_regeneratorRuntime = function () {
|
|
51
|
-
return exports;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
var exports = {},
|
|
55
|
-
Op = Object.prototype,
|
|
56
|
-
hasOwn = Op.hasOwnProperty,
|
|
57
|
-
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
58
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
59
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
60
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
61
|
-
|
|
62
|
-
function define(obj, key, value) {
|
|
63
|
-
return Object.defineProperty(obj, key, {
|
|
64
|
-
value: value,
|
|
65
|
-
enumerable: !0,
|
|
66
|
-
configurable: !0,
|
|
67
|
-
writable: !0
|
|
68
|
-
}), obj[key];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
try {
|
|
72
|
-
define({}, "");
|
|
73
|
-
} catch (err) {
|
|
74
|
-
define = function (obj, key, value) {
|
|
75
|
-
return obj[key] = value;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
80
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
81
|
-
generator = Object.create(protoGenerator.prototype),
|
|
82
|
-
context = new Context(tryLocsList || []);
|
|
83
|
-
return generator._invoke = function (innerFn, self, context) {
|
|
84
|
-
var state = "suspendedStart";
|
|
85
|
-
return function (method, arg) {
|
|
86
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
87
|
-
|
|
88
|
-
if ("completed" === state) {
|
|
89
|
-
if ("throw" === method) throw arg;
|
|
90
|
-
return doneResult();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
for (context.method = method, context.arg = arg;;) {
|
|
94
|
-
var delegate = context.delegate;
|
|
95
|
-
|
|
96
|
-
if (delegate) {
|
|
97
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
98
|
-
|
|
99
|
-
if (delegateResult) {
|
|
100
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
101
|
-
return delegateResult;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
106
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
107
|
-
context.dispatchException(context.arg);
|
|
108
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
109
|
-
state = "executing";
|
|
110
|
-
var record = tryCatch(innerFn, self, context);
|
|
111
|
-
|
|
112
|
-
if ("normal" === record.type) {
|
|
113
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
114
|
-
return {
|
|
115
|
-
value: record.arg,
|
|
116
|
-
done: context.done
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
}(innerFn, self, context), generator;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function tryCatch(fn, obj, arg) {
|
|
127
|
-
try {
|
|
128
|
-
return {
|
|
129
|
-
type: "normal",
|
|
130
|
-
arg: fn.call(obj, arg)
|
|
131
|
-
};
|
|
132
|
-
} catch (err) {
|
|
133
|
-
return {
|
|
134
|
-
type: "throw",
|
|
135
|
-
arg: err
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
exports.wrap = wrap;
|
|
141
|
-
var ContinueSentinel = {};
|
|
142
|
-
|
|
143
|
-
function Generator() {}
|
|
144
|
-
|
|
145
|
-
function GeneratorFunction() {}
|
|
146
|
-
|
|
147
|
-
function GeneratorFunctionPrototype() {}
|
|
148
|
-
|
|
149
|
-
var IteratorPrototype = {};
|
|
150
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
151
|
-
return this;
|
|
152
|
-
});
|
|
153
|
-
var getProto = Object.getPrototypeOf,
|
|
154
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
155
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
156
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
157
|
-
|
|
158
|
-
function defineIteratorMethods(prototype) {
|
|
159
|
-
["next", "throw", "return"].forEach(function (method) {
|
|
160
|
-
define(prototype, method, function (arg) {
|
|
161
|
-
return this._invoke(method, arg);
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
167
|
-
function invoke(method, arg, resolve, reject) {
|
|
168
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
169
|
-
|
|
170
|
-
if ("throw" !== record.type) {
|
|
171
|
-
var result = record.arg,
|
|
172
|
-
value = result.value;
|
|
173
|
-
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
174
|
-
invoke("next", value, resolve, reject);
|
|
175
|
-
}, function (err) {
|
|
176
|
-
invoke("throw", err, resolve, reject);
|
|
177
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
178
|
-
result.value = unwrapped, resolve(result);
|
|
179
|
-
}, function (error) {
|
|
180
|
-
return invoke("throw", error, resolve, reject);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
reject(record.arg);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
var previousPromise;
|
|
188
|
-
|
|
189
|
-
this._invoke = function (method, arg) {
|
|
190
|
-
function callInvokeWithMethodAndArg() {
|
|
191
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
192
|
-
invoke(method, arg, resolve, reject);
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
201
|
-
var method = delegate.iterator[context.method];
|
|
202
|
-
|
|
203
|
-
if (undefined === method) {
|
|
204
|
-
if (context.delegate = null, "throw" === context.method) {
|
|
205
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
206
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return ContinueSentinel;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
213
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
214
|
-
var info = record.arg;
|
|
215
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
function pushTryEntry(locs) {
|
|
219
|
-
var entry = {
|
|
220
|
-
tryLoc: locs[0]
|
|
221
|
-
};
|
|
222
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
function resetTryEntry(entry) {
|
|
226
|
-
var record = entry.completion || {};
|
|
227
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function Context(tryLocsList) {
|
|
231
|
-
this.tryEntries = [{
|
|
232
|
-
tryLoc: "root"
|
|
233
|
-
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function values(iterable) {
|
|
237
|
-
if (iterable) {
|
|
238
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
239
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
240
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
241
|
-
|
|
242
|
-
if (!isNaN(iterable.length)) {
|
|
243
|
-
var i = -1,
|
|
244
|
-
next = function next() {
|
|
245
|
-
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
246
|
-
|
|
247
|
-
return next.value = undefined, next.done = !0, next;
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
return next.next = next;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
return {
|
|
255
|
-
next: doneResult
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
function doneResult() {
|
|
260
|
-
return {
|
|
261
|
-
value: undefined,
|
|
262
|
-
done: !0
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
267
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
268
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
269
|
-
}, exports.mark = function (genFun) {
|
|
270
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
271
|
-
}, exports.awrap = function (arg) {
|
|
272
|
-
return {
|
|
273
|
-
__await: arg
|
|
274
|
-
};
|
|
275
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
276
|
-
return this;
|
|
277
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
278
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
279
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
280
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
281
|
-
return result.done ? result.value : iter.next();
|
|
282
|
-
});
|
|
283
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
284
|
-
return this;
|
|
285
|
-
}), define(Gp, "toString", function () {
|
|
286
|
-
return "[object Generator]";
|
|
287
|
-
}), exports.keys = function (object) {
|
|
288
|
-
var keys = [];
|
|
289
|
-
|
|
290
|
-
for (var key in object) keys.push(key);
|
|
291
|
-
|
|
292
|
-
return keys.reverse(), function next() {
|
|
293
|
-
for (; keys.length;) {
|
|
294
|
-
var key = keys.pop();
|
|
295
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
return next.done = !0, next;
|
|
299
|
-
};
|
|
300
|
-
}, exports.values = values, Context.prototype = {
|
|
301
|
-
constructor: Context,
|
|
302
|
-
reset: function (skipTempReset) {
|
|
303
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
304
|
-
},
|
|
305
|
-
stop: function () {
|
|
306
|
-
this.done = !0;
|
|
307
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
308
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
309
|
-
return this.rval;
|
|
310
|
-
},
|
|
311
|
-
dispatchException: function (exception) {
|
|
312
|
-
if (this.done) throw exception;
|
|
313
|
-
var context = this;
|
|
314
|
-
|
|
315
|
-
function handle(loc, caught) {
|
|
316
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
320
|
-
var entry = this.tryEntries[i],
|
|
321
|
-
record = entry.completion;
|
|
322
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
323
|
-
|
|
324
|
-
if (entry.tryLoc <= this.prev) {
|
|
325
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
326
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
327
|
-
|
|
328
|
-
if (hasCatch && hasFinally) {
|
|
329
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
330
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
331
|
-
} else if (hasCatch) {
|
|
332
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
333
|
-
} else {
|
|
334
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
335
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
abrupt: function (type, arg) {
|
|
341
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
342
|
-
var entry = this.tryEntries[i];
|
|
343
|
-
|
|
344
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
345
|
-
var finallyEntry = entry;
|
|
346
|
-
break;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
351
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
352
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
353
|
-
},
|
|
354
|
-
complete: function (record, afterLoc) {
|
|
355
|
-
if ("throw" === record.type) throw record.arg;
|
|
356
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
357
|
-
},
|
|
358
|
-
finish: function (finallyLoc) {
|
|
359
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
360
|
-
var entry = this.tryEntries[i];
|
|
361
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
catch: function (tryLoc) {
|
|
365
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
366
|
-
var entry = this.tryEntries[i];
|
|
367
|
-
|
|
368
|
-
if (entry.tryLoc === tryLoc) {
|
|
369
|
-
var record = entry.completion;
|
|
370
|
-
|
|
371
|
-
if ("throw" === record.type) {
|
|
372
|
-
var thrown = record.arg;
|
|
373
|
-
resetTryEntry(entry);
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
return thrown;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
throw new Error("illegal catch attempt");
|
|
381
|
-
},
|
|
382
|
-
delegateYield: function (iterable, resultName, nextLoc) {
|
|
383
|
-
return this.delegate = {
|
|
384
|
-
iterator: values(iterable),
|
|
385
|
-
resultName: resultName,
|
|
386
|
-
nextLoc: nextLoc
|
|
387
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
388
|
-
}
|
|
389
|
-
}, exports;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
48
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
393
49
|
try {
|
|
394
50
|
var info = gen[key](arg);
|
|
@@ -484,17 +140,18 @@ function _inherits(subClass, superClass) {
|
|
|
484
140
|
}
|
|
485
141
|
|
|
486
142
|
function _getPrototypeOf(o) {
|
|
487
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf
|
|
143
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
488
144
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
489
145
|
};
|
|
490
146
|
return _getPrototypeOf(o);
|
|
491
147
|
}
|
|
492
148
|
|
|
493
149
|
function _setPrototypeOf(o, p) {
|
|
494
|
-
_setPrototypeOf = Object.setPrototypeOf
|
|
150
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
495
151
|
o.__proto__ = p;
|
|
496
152
|
return o;
|
|
497
153
|
};
|
|
154
|
+
|
|
498
155
|
return _setPrototypeOf(o, p);
|
|
499
156
|
}
|
|
500
157
|
|
|
@@ -685,9 +342,10 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
685
342
|
|
|
686
343
|
if (Object.getOwnPropertySymbols) {
|
|
687
344
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
688
|
-
enumerableOnly
|
|
345
|
+
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
689
346
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
690
|
-
})
|
|
347
|
+
});
|
|
348
|
+
keys.push.apply(keys, symbols);
|
|
691
349
|
}
|
|
692
350
|
|
|
693
351
|
return keys;
|
|
@@ -695,12 +353,19 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
695
353
|
|
|
696
354
|
function _objectSpread2$1(target) {
|
|
697
355
|
for (var i = 1; i < arguments.length; i++) {
|
|
698
|
-
var source =
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
356
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
357
|
+
|
|
358
|
+
if (i % 2) {
|
|
359
|
+
ownKeys$1(Object(source), true).forEach(function (key) {
|
|
360
|
+
_defineProperty$1(target, key, source[key]);
|
|
361
|
+
});
|
|
362
|
+
} else if (Object.getOwnPropertyDescriptors) {
|
|
363
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
364
|
+
} else {
|
|
365
|
+
ownKeys$1(Object(source)).forEach(function (key) {
|
|
366
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
367
|
+
});
|
|
368
|
+
}
|
|
704
369
|
}
|
|
705
370
|
|
|
706
371
|
return target;
|
|
@@ -711,17 +376,14 @@ function _arrayWithHoles$1(arr) {
|
|
|
711
376
|
}
|
|
712
377
|
|
|
713
378
|
function _iterableToArrayLimit$1(arr, i) {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
if (_i == null) return;
|
|
379
|
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
717
380
|
var _arr = [];
|
|
718
381
|
var _n = true;
|
|
719
382
|
var _d = false;
|
|
720
|
-
|
|
721
|
-
var _s, _e;
|
|
383
|
+
var _e = undefined;
|
|
722
384
|
|
|
723
385
|
try {
|
|
724
|
-
for (_i =
|
|
386
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
725
387
|
_arr.push(_s.value);
|
|
726
388
|
|
|
727
389
|
if (i && _arr.length === i) break;
|
|
@@ -804,11 +466,17 @@ function _objectWithoutProperties$1(source, excluded) {
|
|
|
804
466
|
function _typeof(obj) {
|
|
805
467
|
"@babel/helpers - typeof";
|
|
806
468
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
}
|
|
469
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
470
|
+
_typeof = function _typeof(obj) {
|
|
471
|
+
return typeof obj;
|
|
472
|
+
};
|
|
473
|
+
} else {
|
|
474
|
+
_typeof = function _typeof(obj) {
|
|
475
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
return _typeof(obj);
|
|
812
480
|
}
|
|
813
481
|
|
|
814
482
|
/**
|
|
@@ -2063,7 +1731,7 @@ var luckysheet; // const mapping = [
|
|
|
2063
1731
|
// { "key": "price", "name": "单价", "rule": "price" }
|
|
2064
1732
|
// ]
|
|
2065
1733
|
|
|
2066
|
-
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注']]); // for dnd
|
|
1734
|
+
var mapping = new Map([['skuCode', 'SKU编码'], ['quantity', '数量'], ['price', '单价'], ['regionCode', '库区'], ['checkQuantity', '实盘数量'], ['shareRatio', '共享比例'], ['lotNumberCode', '批号'], ['warehouseCode', '仓库编码'], ['regionCode', '库区'], ['locationCode', '货位'], ['rowNumber', '货位排数'], ['layerNumber', '货位层数'], ['gridNumber', '货位格号'], ['oldUniqueCode', '原始唯一码'], ['newUniqueCode', '新唯一码'], ['relationRecordCode', '单据编码'], ['remark', '备注'], ['externalCode', 'JDE商品编码']]); // for dnd
|
|
2067
1735
|
|
|
2068
1736
|
|
|
2069
1737
|
var reorder = function reorder(list, startIndex, endIndex) {
|
|
@@ -3552,6 +3220,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
3552
3220
|
} // 防抖函数 待定
|
|
3553
3221
|
|
|
3554
3222
|
|
|
3223
|
+
// 防抖函数 待定
|
|
3555
3224
|
getData(searchParams);
|
|
3556
3225
|
}, {
|
|
3557
3226
|
wait: 1000
|
|
@@ -4406,7 +4075,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
4406
4075
|
}), " \u5168\u9009\u6240\u6709\u9875\u9762") : '')))));
|
|
4407
4076
|
};
|
|
4408
4077
|
|
|
4409
|
-
var css_248z$4 = ".add_select_show {\n display: flex;\n}\n.add_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.add_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.add_select_header {\n border-bottom: 1px solid #D9D9D9;\n height: 24px;\n height: 40px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 40px;\n margin-bottom: 10px;\n padding-left: 10px;\n}\n.add_select_header > span {\n margin-left: 20px;\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 40px;\n}\n.add_select_header > span > span {\n color: #ff0000;\n}\n.add_select_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_wrapper {\n position: relative;\n display: flex;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n margin: 5px 10px;\n}\n.add_select_wrapper .ant-table-pagination.ant-pagination {\n margin: 5px;\n padding-right: 5px;\n}\n.add_select_wrapper .ant-checkbox-wrapper {\n justify-content: center;\n}\n.add_select_wrapper .ant-form-item-label {\n padding: 0PX;\n line-height: 23px !important;\n}\n.add_select_wrapper .ant-form-item-label > label {\n font-size: 12px;\n}\n.add_select_wrapper .ant-table-thead th {\n height: 20px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper .row-class {\n height: 24px;\n}\n.add_select_wrapper .row-class td {\n font-size: 12px !important;\n height: 24px !important;\n padding: 0px 8px !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select_wrapper .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.add_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_left {\n flex-basis: 298px;\n width: 298px;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-right: 10px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.add_select_wrapper_right {\n width: 872px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_right1 {\n width: 100%;\n margin-left: 10px;\n}\n.add_select_wrapper_right,\n.add_select_wrapper_right1 {\n overflow-x: auto;\n}\n.add_select_wrapper .select_list_columns {\n height: 272px;\n overflow-y: auto;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.add_select_wrapper .select_list_columns_formItems {\n padding: 7px 10px;\n}\n.add_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px;\n justify-content: flex-end;\n}\n.add_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.add_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 5px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n.add_select_wrapper_select {\n margin-top: 4px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n margin: 5px 10px;\n}\n.add_select_wrapper_select .ant-table-pagination.ant-pagination {\n margin: 9px;\n padding-right: 5px;\n}\n.add_select_wrapper_select .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper_select .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper_select .ant-table-thead th {\n height: 23px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-modal-close-x {\n height: 30px;\n}\n.add_select_wrapper_select .row-class {\n height: 30px;\n}\n.add_select_wrapper_select .row-class td {\n font-size: 12px !important;\n height: 30px !important;\n padding: 4px 8px !important;\n}\n.add_select_wrapper_select .ant-table-body {\n height: 200px;\n overflow-y: auto !important;\n}\n.add_select_wrapper_select .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_select .ant-input-number-input {\n height: auto;\n}\n.add_select_wrapper_select .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 3px;\n border-bottom: 1px solid #D9D9D9;\n}\n";
|
|
4078
|
+
var css_248z$4 = ".add_select_show {\n display: flex;\n}\n.add_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.add_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.add_select_header {\n border-bottom: 1px solid #D9D9D9;\n height: 24px;\n height: 40px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 40px;\n margin-bottom: 10px;\n padding-left: 10px;\n}\n.add_select_header > span {\n margin-left: 20px;\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 40px;\n}\n.add_select_header > span > span {\n color: #ff0000;\n}\n.add_select_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_quick_header {\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.add_select_quick_header_title {\n display: flex;\n justify-content: space-between;\n}\n.add_select_quick_header > span {\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 20px;\n}\n.add_select_quick_header > span > span {\n color: #ff0000;\n}\n.add_select_quick_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_wrapper {\n position: relative;\n display: flex;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n margin: 5px 10px;\n}\n.add_select_wrapper .ant-table-pagination.ant-pagination {\n margin: 5px;\n padding-right: 5px;\n}\n.add_select_wrapper .ant-checkbox-wrapper {\n justify-content: center;\n}\n.add_select_wrapper .ant-form-item-label {\n padding: 0PX;\n line-height: 23px !important;\n}\n.add_select_wrapper .ant-form-item-label > label {\n font-size: 12px;\n}\n.add_select_wrapper .ant-table-thead th {\n height: 20px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper .row-class {\n height: 24px;\n}\n.add_select_wrapper .row-class td {\n font-size: 12px !important;\n height: 24px !important;\n padding: 0px 8px !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select_wrapper .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.add_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_left {\n flex-basis: 298px;\n width: 298px;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-right: 10px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.add_select_wrapper_right {\n width: 872px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_right1 {\n width: 100%;\n margin-left: 10px;\n}\n.add_select_wrapper_right,\n.add_select_wrapper_right1 {\n overflow-x: auto;\n}\n.add_select_wrapper .select_list_columns {\n height: 272px;\n overflow-y: auto;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.add_select_wrapper .select_list_columns_formItems {\n padding: 7px 10px;\n}\n.add_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px;\n justify-content: flex-end;\n}\n.add_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.add_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 5px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n.add_select_wrapper_select {\n margin-top: 4px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n margin: 5px 10px;\n}\n.add_select_wrapper_select .ant-table-pagination.ant-pagination {\n margin: 9px;\n padding-right: 5px;\n}\n.add_select_wrapper_select .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper_select .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper_select .ant-table-thead th {\n height: 23px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-modal-close-x {\n height: 30px;\n}\n.add_select_wrapper_select .row-class {\n height: 30px;\n}\n.add_select_wrapper_select .row-class td {\n font-size: 12px !important;\n height: 30px !important;\n padding: 4px 8px !important;\n}\n.add_select_wrapper_select .ant-table-body {\n height: 200px;\n overflow-y: auto !important;\n}\n.add_select_wrapper_select .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_select .ant-input-number-input,\n.add_select_wrapper_select .ant-input {\n height: auto;\n height: 22px;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select-selection-search-input {\n height: auto;\n height: 22px !important;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select .ant-select-arrow {\n top: 13px;\n}\n.add_select_wrapper_select .ant-select-selector {\n position: relative;\n top: 1px;\n height: 23px !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-select-selector .ant-select-selection-item,\n.add_select_wrapper_select .ant-select-selector ant-select-selection-search {\n height: 23px !important;\n line-height: 23px !important;\n font-size: 12px;\n}\n.add_select_wrapper_select .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 3px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper_select_quick {\n margin: 0;\n}\n";
|
|
4410
4079
|
styleInject(css_248z$4);
|
|
4411
4080
|
|
|
4412
4081
|
var loadSelectSource = function loadSelectSource(url, params) {
|
|
@@ -4584,6 +4253,7 @@ var AddSelect = function AddSelect(props) {
|
|
|
4584
4253
|
} // 防抖函数 待定
|
|
4585
4254
|
|
|
4586
4255
|
|
|
4256
|
+
// 防抖函数 待定
|
|
4587
4257
|
getData(searchParams);
|
|
4588
4258
|
}, {
|
|
4589
4259
|
wait: 1000
|
|
@@ -5446,6 +5116,735 @@ var AddSelect = function AddSelect(props) {
|
|
|
5446
5116
|
})))));
|
|
5447
5117
|
};
|
|
5448
5118
|
|
|
5119
|
+
var css_248z$5 = ".add_select_show {\n display: flex;\n}\n.add_select_expand_button {\n position: relative;\n width: 30px;\n color: #ffffff;\n cursor: pointer;\n}\n.add_select_expand_button span {\n position: absolute;\n height: 20px;\n line-height: 14px;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n}\n.add_select_header {\n border-bottom: 1px solid #D9D9D9;\n height: 24px;\n height: 40px;\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n line-height: 40px;\n margin-bottom: 10px;\n padding-left: 10px;\n}\n.add_select_header > span {\n margin-left: 20px;\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 40px;\n}\n.add_select_header > span > span {\n color: #ff0000;\n}\n.add_select_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_quick_header {\n font-family: PingFangSC-Medium;\n font-weight: 500;\n font-size: 18px;\n color: #000000;\n letter-spacing: 0;\n}\n.add_select_quick_header_title {\n display: flex;\n justify-content: space-between;\n}\n.add_select_quick_header > span {\n font-weight: 400;\n font-size: 12px;\n color: #666666;\n letter-spacing: 0;\n line-height: 20px;\n}\n.add_select_quick_header > span > span {\n color: #ff0000;\n}\n.add_select_quick_header_close span {\n position: absolute;\n color: black !important;\n right: 10px;\n top: 10px;\n}\n.add_select_wrapper {\n position: relative;\n display: flex;\n max-height: 60vh;\n overflow: hidden;\n font-size: 14px;\n margin: 5px 10px;\n}\n.add_select_wrapper .ant-table-pagination.ant-pagination {\n margin: 5px;\n padding-right: 5px;\n}\n.add_select_wrapper .ant-checkbox-wrapper {\n justify-content: center;\n}\n.add_select_wrapper .ant-form-item-label {\n padding: 0PX;\n line-height: 23px !important;\n}\n.add_select_wrapper .ant-form-item-label > label {\n font-size: 12px;\n}\n.add_select_wrapper .ant-table-thead th {\n height: 20px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper .row-class {\n height: 24px;\n}\n.add_select_wrapper .row-class td {\n font-size: 12px !important;\n height: 24px !important;\n padding: 0px 8px !important;\n line-height: 20px !important;\n}\n.add_select_wrapper .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select_wrapper .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_click_flag {\n position: absolute;\n z-index: 10;\n}\n.add_select_wrapper_click_flag_arrow {\n transform: rotate(0deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_click_flag_arrow_1 {\n transform: rotate(-180deg);\n transition: transform 0.5s;\n}\n.add_select_wrapper_left {\n flex-basis: 298px;\n width: 298px;\n overflow-y: hidden;\n transition: all 0.3s;\n margin-right: 10px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_left1 {\n width: 0;\n height: 0;\n transition: all 0.3s;\n display: none;\n}\n.add_select_wrapper_right {\n width: 872px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n}\n.add_select_wrapper_right1 {\n width: 100%;\n margin-left: 10px;\n}\n.add_select_wrapper_right,\n.add_select_wrapper_right1 {\n overflow-x: auto;\n}\n.add_select_wrapper .select_list_columns {\n height: 272px;\n overflow-y: auto;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_columns_tips {\n background: #eee;\n padding: 6px 20px;\n margin-bottom: 10px;\n}\n.add_select_wrapper .select_list_columns_formItems {\n padding: 7px 10px;\n}\n.add_select_wrapper .select_list_searchButton {\n display: flex;\n margin: 10px;\n justify-content: flex-end;\n}\n.add_select_wrapper .select_list_button_space {\n margin-right: 10px;\n}\n.add_select_wrapper .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 5px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select_wrapper .select_list_selectAll {\n position: relative;\n top: -40px;\n left: 20px;\n width: 160px;\n}\n.add_select_wrapper_select {\n margin-top: 4px;\n border: 1px solid #D9D9D9;\n border-radius: 5px;\n margin: 5px 10px;\n}\n.add_select_wrapper_select .ant-table-pagination.ant-pagination {\n margin: 9px;\n padding-right: 5px;\n}\n.add_select_wrapper_select .ant-modal-body {\n padding: 10px;\n}\n.add_select_wrapper_select .ant-table-wrapper {\n padding: 0px !important;\n}\n.add_select_wrapper_select .ant-table-thead th {\n height: 23px !important;\n padding: 0px 8px !important;\n font-size: 12px !important;\n font-weight: 600 !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-modal-close-x {\n height: 30px;\n}\n.add_select_wrapper_select .row-class {\n height: 30px;\n}\n.add_select_wrapper_select .row-class td {\n font-size: 12px !important;\n height: 30px !important;\n padding: 4px 8px !important;\n}\n.add_select_wrapper_select .ant-table-body {\n height: 200px;\n overflow-y: auto !important;\n}\n.add_select_wrapper_select .ant-row.ant-form-item {\n margin-bottom: 10px;\n}\n.add_select_wrapper_select .ant-input-number-input,\n.add_select_wrapper_select .ant-input {\n height: auto;\n height: 22px;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select-selection-search-input {\n height: auto;\n height: 22px !important;\n padding: 0px 10px;\n font-size: 12px;\n}\n.add_select_wrapper_select .ant-select .ant-select-arrow {\n top: 13px;\n}\n.add_select_wrapper_select .ant-select-selector {\n position: relative;\n top: 1px;\n height: 23px !important;\n line-height: 23px !important;\n}\n.add_select_wrapper_select .ant-select-selector .ant-select-selection-item,\n.add_select_wrapper_select .ant-select-selector ant-select-selection-search {\n height: 23px !important;\n line-height: 23px !important;\n font-size: 12px;\n}\n.add_select_wrapper_select .select_list_selectTips {\n display: flex;\n justify-content: space-between;\n height: 24px;\n font-size: 12px;\n line-height: 24px;\n background: #F7F8FB;\n padding: 0 3px;\n border-bottom: 1px solid #D9D9D9;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick {\n margin: 0;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .ant-table-body {\n height: 240px;\n overflow-y: auto !important;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .table_base {\n background: #fff;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .table_odd {\n background: #f7f8fb;\n}\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .ant-table-cell-fix-left,\n.add_select div.add_select_wrapper_select.add_select_wrapper_select_quick .ant-table-cell-fix-right {\n background: #FFFFFF !important;\n}\n";
|
|
5120
|
+
styleInject(css_248z$5);
|
|
5121
|
+
|
|
5122
|
+
var _this = undefined;
|
|
5123
|
+
|
|
5124
|
+
var InputElement = function InputElement(_ref) {
|
|
5125
|
+
var record = _ref.record,
|
|
5126
|
+
text = _ref.text,
|
|
5127
|
+
currentIndex = _ref.currentIndex,
|
|
5128
|
+
inputLength = _ref.inputLength,
|
|
5129
|
+
index = _ref.index,
|
|
5130
|
+
setData = _ref.setData,
|
|
5131
|
+
data = _ref.data,
|
|
5132
|
+
item = _ref.item,
|
|
5133
|
+
callSelectItem = _ref.callSelectItem;
|
|
5134
|
+
|
|
5135
|
+
var _useState = React.useState(false),
|
|
5136
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5137
|
+
hoverVisibled = _useState2[0],
|
|
5138
|
+
updateHoverVisibled = _useState2[1];
|
|
5139
|
+
|
|
5140
|
+
var _useState3 = React.useState([]),
|
|
5141
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
5142
|
+
searchData = _useState4[0],
|
|
5143
|
+
updateSearchData = _useState4[1];
|
|
5144
|
+
|
|
5145
|
+
var tableRef = React.useRef(null);
|
|
5146
|
+
|
|
5147
|
+
var _useState5 = React.useState(text),
|
|
5148
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
5149
|
+
value = _useState6[0],
|
|
5150
|
+
setValue = _useState6[1];
|
|
5151
|
+
|
|
5152
|
+
var inputRef = React.useRef(false);
|
|
5153
|
+
|
|
5154
|
+
var onSerchdata = function onSerchdata(name) {
|
|
5155
|
+
axios__default['default'].get("/items/sku/pager/v2?".concat(querystring.stringify({
|
|
5156
|
+
'skuCodeAndSkuName': name,
|
|
5157
|
+
'pageSize': 100
|
|
5158
|
+
}))).then(function (_ref2) {
|
|
5159
|
+
var data = _ref2.data,
|
|
5160
|
+
status = _ref2.status;
|
|
5161
|
+
|
|
5162
|
+
if (status === 200) {
|
|
5163
|
+
if (data.status === '0') {
|
|
5164
|
+
updateSearchData(data.data.items.map(function (item, index) {
|
|
5165
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
5166
|
+
index: index
|
|
5167
|
+
});
|
|
5168
|
+
}));
|
|
5169
|
+
} else {
|
|
5170
|
+
updateSearchData([]);
|
|
5171
|
+
}
|
|
5172
|
+
}
|
|
5173
|
+
});
|
|
5174
|
+
};
|
|
5175
|
+
|
|
5176
|
+
var onCallback = function onCallback(itemData) {
|
|
5177
|
+
updateHoverVisibled(false);
|
|
5178
|
+
|
|
5179
|
+
if (itemData) {
|
|
5180
|
+
callSelectItem(_objectSpread2(_objectSpread2({}, itemData), {}, {
|
|
5181
|
+
needFocus: true
|
|
5182
|
+
}));
|
|
5183
|
+
setValue(itemData[item.dataIndex]);
|
|
5184
|
+
} else {
|
|
5185
|
+
callSelectItem(null);
|
|
5186
|
+
}
|
|
5187
|
+
};
|
|
5188
|
+
|
|
5189
|
+
var SearchDataTable = function SearchDataTable(hoverVisibled) {
|
|
5190
|
+
var _useState7 = React.useState(0),
|
|
5191
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
5192
|
+
selectIndex = _useState8[0],
|
|
5193
|
+
setSelectIndex = _useState8[1];
|
|
5194
|
+
|
|
5195
|
+
var inputRef = React.useRef(null);
|
|
5196
|
+
React.useEffect(function () {
|
|
5197
|
+
if (searchData.length && hoverVisibled) {
|
|
5198
|
+
var _tableRef$current;
|
|
5199
|
+
|
|
5200
|
+
var dom = tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[0];
|
|
5201
|
+
|
|
5202
|
+
if (dom) {
|
|
5203
|
+
dom.style.background = '#005CFF30';
|
|
5204
|
+
}
|
|
5205
|
+
}
|
|
5206
|
+
}, [hoverVisibled, tableRef === null || tableRef === void 0 ? void 0 : tableRef.current]);
|
|
5207
|
+
React.useEffect(function () {
|
|
5208
|
+
var inter = setInterval(function () {
|
|
5209
|
+
if (inputRef.current) {
|
|
5210
|
+
inputRef.current.focus();
|
|
5211
|
+
}
|
|
5212
|
+
}, 500);
|
|
5213
|
+
return function () {
|
|
5214
|
+
clearInterval(inter);
|
|
5215
|
+
};
|
|
5216
|
+
});
|
|
5217
|
+
if (!hoverVisibled) return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null);
|
|
5218
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5219
|
+
className: 'add_select_wrapper_select',
|
|
5220
|
+
style: {
|
|
5221
|
+
width: '800px',
|
|
5222
|
+
height: '400px',
|
|
5223
|
+
overflow: 'auto',
|
|
5224
|
+
position: 'relative'
|
|
5225
|
+
}
|
|
5226
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
5227
|
+
placeholder: "\u8BF7\u8F93\u5165skucode\u6216\u8005sku\u540D\u79F0",
|
|
5228
|
+
ref: inputRef,
|
|
5229
|
+
style: {
|
|
5230
|
+
position: 'absolute',
|
|
5231
|
+
zIndex: '-100',
|
|
5232
|
+
height: '22px'
|
|
5233
|
+
},
|
|
5234
|
+
onKeyDown: function onKeyDown(e) {
|
|
5235
|
+
var currentIndex = selectIndex;
|
|
5236
|
+
|
|
5237
|
+
if (e.keyCode === 27) {
|
|
5238
|
+
e.stopPropagation();
|
|
5239
|
+
e.preventDefault();
|
|
5240
|
+
setSelectIndex(0);
|
|
5241
|
+
onCallback(null);
|
|
5242
|
+
}
|
|
5243
|
+
|
|
5244
|
+
if (e.keyCode === 13) {
|
|
5245
|
+
// enter
|
|
5246
|
+
onCallback(searchData[currentIndex]);
|
|
5247
|
+
setSelectIndex(0);
|
|
5248
|
+
}
|
|
5249
|
+
|
|
5250
|
+
if (e.keyCode === 40) {
|
|
5251
|
+
// 向下
|
|
5252
|
+
var dom = tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex + 1];
|
|
5253
|
+
|
|
5254
|
+
if (dom) {
|
|
5255
|
+
tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex].style.background = '';
|
|
5256
|
+
setSelectIndex(currentIndex + 1);
|
|
5257
|
+
dom.style.background = '#005CFF30';
|
|
5258
|
+
dom.scrollIntoViewIfNeeded(false);
|
|
5259
|
+
}
|
|
5260
|
+
} else if (e.keyCode === 38) {
|
|
5261
|
+
var _dom = tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex - 1];
|
|
5262
|
+
|
|
5263
|
+
if (_dom) {
|
|
5264
|
+
tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[currentIndex].style.background = '';
|
|
5265
|
+
setSelectIndex(currentIndex - 1);
|
|
5266
|
+
_dom.style.background = '#005CFF30';
|
|
5267
|
+
|
|
5268
|
+
_dom.scrollIntoViewIfNeeded(false);
|
|
5269
|
+
}
|
|
5270
|
+
}
|
|
5271
|
+
}
|
|
5272
|
+
}), /*#__PURE__*/React__default['default'].createElement(antd.Table, {
|
|
5273
|
+
ref: tableRef,
|
|
5274
|
+
pagination: false,
|
|
5275
|
+
// components={
|
|
5276
|
+
// {
|
|
5277
|
+
// body: {
|
|
5278
|
+
// cell: ({index, record, ...props}) => {
|
|
5279
|
+
// debugger
|
|
5280
|
+
// return <td {...props} style={selectIndex === record?.index ? {background: '#005CFF30'} : {} } />
|
|
5281
|
+
// }
|
|
5282
|
+
// }
|
|
5283
|
+
// }
|
|
5284
|
+
// }
|
|
5285
|
+
onRow: function onRow(record, index) {
|
|
5286
|
+
return {
|
|
5287
|
+
onClick: function (record, index, event) {
|
|
5288
|
+
var dom = tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[index];
|
|
5289
|
+
|
|
5290
|
+
if (dom) {
|
|
5291
|
+
_toConsumableArray(tableRef.current.getElementsByTagName('tbody')[0].getElementsByTagName('tr')).map(function (item) {
|
|
5292
|
+
item.style.background = '';
|
|
5293
|
+
});
|
|
5294
|
+
|
|
5295
|
+
dom.style.background = '#005CFF30';
|
|
5296
|
+
dom.scrollIntoViewIfNeeded(false);
|
|
5297
|
+
}
|
|
5298
|
+
|
|
5299
|
+
setSelectIndex(index);
|
|
5300
|
+
}.bind(_this, record, index) // 点击行
|
|
5301
|
+
|
|
5302
|
+
};
|
|
5303
|
+
},
|
|
5304
|
+
rowClassName: 'row-class',
|
|
5305
|
+
columns: [{
|
|
5306
|
+
title: 'SKU编码',
|
|
5307
|
+
width: 150,
|
|
5308
|
+
dataIndex: 'skuCode'
|
|
5309
|
+
}, {
|
|
5310
|
+
title: 'SKU名称',
|
|
5311
|
+
width: 200,
|
|
5312
|
+
ellipsis: {
|
|
5313
|
+
showTitle: false
|
|
5314
|
+
},
|
|
5315
|
+
render: function render(text) {
|
|
5316
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
5317
|
+
placement: "topLeft",
|
|
5318
|
+
title: text
|
|
5319
|
+
}, text);
|
|
5320
|
+
},
|
|
5321
|
+
dataIndex: 'name'
|
|
5322
|
+
}, {
|
|
5323
|
+
title: '国际条码',
|
|
5324
|
+
width: 100,
|
|
5325
|
+
ellipsis: {
|
|
5326
|
+
showTitle: false
|
|
5327
|
+
},
|
|
5328
|
+
dataIndex: 'barCode',
|
|
5329
|
+
render: function render(text) {
|
|
5330
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
5331
|
+
placement: "topLeft",
|
|
5332
|
+
title: text
|
|
5333
|
+
}, text);
|
|
5334
|
+
}
|
|
5335
|
+
}, {
|
|
5336
|
+
title: '所属SPU名称',
|
|
5337
|
+
width: 100,
|
|
5338
|
+
ellipsis: {
|
|
5339
|
+
showTitle: false
|
|
5340
|
+
},
|
|
5341
|
+
dataIndex: 'itemName',
|
|
5342
|
+
render: function render(text) {
|
|
5343
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
5344
|
+
placement: "topLeft",
|
|
5345
|
+
title: text
|
|
5346
|
+
}, text);
|
|
5347
|
+
}
|
|
5348
|
+
}, {
|
|
5349
|
+
title: '所属SPU编码',
|
|
5350
|
+
width: 100,
|
|
5351
|
+
ellipsis: {
|
|
5352
|
+
showTitle: false
|
|
5353
|
+
},
|
|
5354
|
+
dataIndex: 'itemCode',
|
|
5355
|
+
render: function render(text) {
|
|
5356
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
5357
|
+
placement: "topLeft",
|
|
5358
|
+
title: text
|
|
5359
|
+
}, text);
|
|
5360
|
+
}
|
|
5361
|
+
}, {
|
|
5362
|
+
title: '外部编码',
|
|
5363
|
+
width: 100,
|
|
5364
|
+
ellipsis: {
|
|
5365
|
+
showTitle: false
|
|
5366
|
+
},
|
|
5367
|
+
render: function render(text) {
|
|
5368
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
5369
|
+
placement: "topLeft",
|
|
5370
|
+
title: text
|
|
5371
|
+
}, text);
|
|
5372
|
+
},
|
|
5373
|
+
dataIndex: 'externalCode'
|
|
5374
|
+
}],
|
|
5375
|
+
dataSource: searchData
|
|
5376
|
+
}));
|
|
5377
|
+
};
|
|
5378
|
+
|
|
5379
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Popover, {
|
|
5380
|
+
placement: "bottomLeft",
|
|
5381
|
+
destroyTooltipOnHide: {
|
|
5382
|
+
keepParent: false
|
|
5383
|
+
},
|
|
5384
|
+
title: "",
|
|
5385
|
+
trigger: "",
|
|
5386
|
+
content: SearchDataTable(hoverVisibled),
|
|
5387
|
+
visible: hoverVisibled,
|
|
5388
|
+
onVisibleChange: function onVisibleChange(disabled) {
|
|
5389
|
+
updateHoverVisibled(disabled);
|
|
5390
|
+
}
|
|
5391
|
+
}, item.isPrimaryInput ? /*#__PURE__*/React__default['default'].createElement(antd.Input, {
|
|
5392
|
+
value: value,
|
|
5393
|
+
ref: inputRef,
|
|
5394
|
+
placeholder: "skucode / sku\u540D\u79F0",
|
|
5395
|
+
keyboard: false,
|
|
5396
|
+
autoFocus: record.autoFocus,
|
|
5397
|
+
onChange: function onChange(value) {
|
|
5398
|
+
record[item.dataIndex] = value.currentTarget.value;
|
|
5399
|
+
setValue(value.currentTarget.value); // setData(data);
|
|
5400
|
+
},
|
|
5401
|
+
// onFocus={(e)=> {
|
|
5402
|
+
// let dom1 = e.currentTarget;
|
|
5403
|
+
// dom1.setSelectionRange(100, 0);
|
|
5404
|
+
// dom1.select(text);
|
|
5405
|
+
// }}
|
|
5406
|
+
onKeyDown: function onKeyDown(e) {
|
|
5407
|
+
// if (e.keyCode === 13 && e.ctrlKey) {
|
|
5408
|
+
// handleOk(true)
|
|
5409
|
+
// document.getElementById("first-query")?.focus()
|
|
5410
|
+
// }
|
|
5411
|
+
if (e.keyCode === 8 && e.ctrlKey && index) {
|
|
5412
|
+
var _e$nativeEvent$path$;
|
|
5413
|
+
|
|
5414
|
+
antd.message.success('删除当前行');
|
|
5415
|
+
e.stopPropagation();
|
|
5416
|
+
e.preventDefault();
|
|
5417
|
+
var dom = (_e$nativeEvent$path$ = e.nativeEvent.path[3].children[index - 1]) === null || _e$nativeEvent$path$ === void 0 ? void 0 : _e$nativeEvent$path$.getElementsByTagName('input')[currentIndex];
|
|
5418
|
+
|
|
5419
|
+
if (dom) {
|
|
5420
|
+
dom.select();
|
|
5421
|
+
dom.focus();
|
|
5422
|
+
dom.scrollIntoView(false);
|
|
5423
|
+
}
|
|
5424
|
+
|
|
5425
|
+
dom = null;
|
|
5426
|
+
setData(data.filter(function (item, innerIndex) {
|
|
5427
|
+
return innerIndex !== index;
|
|
5428
|
+
}));
|
|
5429
|
+
}
|
|
5430
|
+
|
|
5431
|
+
if (e.keyCode === 13) {
|
|
5432
|
+
// enter
|
|
5433
|
+
if (item.isPrimaryInput) {
|
|
5434
|
+
if (e.currentTarget.value.length < 2) {
|
|
5435
|
+
antd.message.warning('至少输入两个字符');
|
|
5436
|
+
} else {
|
|
5437
|
+
updateHoverVisibled(true);
|
|
5438
|
+
onSerchdata(e.currentTarget.value);
|
|
5439
|
+
}
|
|
5440
|
+
}
|
|
5441
|
+
}
|
|
5442
|
+
|
|
5443
|
+
if (e.keyCode === 37 && e.shiftKey) {
|
|
5444
|
+
var _e$nativeEvent$path$2;
|
|
5445
|
+
|
|
5446
|
+
// 左滑动
|
|
5447
|
+
e.stopPropagation();
|
|
5448
|
+
e.preventDefault();
|
|
5449
|
+
|
|
5450
|
+
var _dom2 = (_e$nativeEvent$path$2 = e.nativeEvent.path[3].children[index]) === null || _e$nativeEvent$path$2 === void 0 ? void 0 : _e$nativeEvent$path$2.getElementsByTagName('input')[currentIndex - 1];
|
|
5451
|
+
|
|
5452
|
+
if (_dom2) {
|
|
5453
|
+
_dom2.select();
|
|
5454
|
+
|
|
5455
|
+
_dom2.focus();
|
|
5456
|
+
|
|
5457
|
+
_dom2.scrollIntoView(false);
|
|
5458
|
+
}
|
|
5459
|
+
|
|
5460
|
+
_dom2 = null;
|
|
5461
|
+
}
|
|
5462
|
+
|
|
5463
|
+
if (e.keyCode === 39 && e.shiftKey) {
|
|
5464
|
+
var _e$nativeEvent$path$3;
|
|
5465
|
+
|
|
5466
|
+
// 右滑
|
|
5467
|
+
e.stopPropagation();
|
|
5468
|
+
e.preventDefault();
|
|
5469
|
+
|
|
5470
|
+
var _dom3 = (_e$nativeEvent$path$3 = e.nativeEvent.path[3].children[index]) === null || _e$nativeEvent$path$3 === void 0 ? void 0 : _e$nativeEvent$path$3.getElementsByTagName('input')[currentIndex + 1];
|
|
5471
|
+
|
|
5472
|
+
if (_dom3) {
|
|
5473
|
+
_dom3.select();
|
|
5474
|
+
|
|
5475
|
+
_dom3.focus();
|
|
5476
|
+
|
|
5477
|
+
_dom3.scrollIntoView(false);
|
|
5478
|
+
}
|
|
5479
|
+
|
|
5480
|
+
_dom3 = null;
|
|
5481
|
+
}
|
|
5482
|
+
|
|
5483
|
+
if (e.keyCode === 40) {
|
|
5484
|
+
var _e$nativeEvent$path$4;
|
|
5485
|
+
|
|
5486
|
+
// 向下
|
|
5487
|
+
e.stopPropagation();
|
|
5488
|
+
e.preventDefault();
|
|
5489
|
+
|
|
5490
|
+
var _dom4 = (_e$nativeEvent$path$4 = e.nativeEvent.path[3].children[index + 1]) === null || _e$nativeEvent$path$4 === void 0 ? void 0 : _e$nativeEvent$path$4.getElementsByTagName('input')[currentIndex];
|
|
5491
|
+
|
|
5492
|
+
if (_dom4) {
|
|
5493
|
+
_dom4.select();
|
|
5494
|
+
|
|
5495
|
+
_dom4.focus();
|
|
5496
|
+
|
|
5497
|
+
_dom4.scrollIntoView(false);
|
|
5498
|
+
}
|
|
5499
|
+
|
|
5500
|
+
_dom4 = null;
|
|
5501
|
+
} else if (e.keyCode === 38) {
|
|
5502
|
+
var _e$nativeEvent$path$5;
|
|
5503
|
+
|
|
5504
|
+
e.stopPropagation();
|
|
5505
|
+
e.preventDefault();
|
|
5506
|
+
var dom1 = (_e$nativeEvent$path$5 = e.nativeEvent.path[3].children[index - 1]) === null || _e$nativeEvent$path$5 === void 0 ? void 0 : _e$nativeEvent$path$5.getElementsByTagName('input')[currentIndex];
|
|
5507
|
+
|
|
5508
|
+
if (dom1) {
|
|
5509
|
+
// dom1.value=""
|
|
5510
|
+
// dom1.setSelectionRange(100, 0);
|
|
5511
|
+
dom1.select();
|
|
5512
|
+
dom1.focus();
|
|
5513
|
+
dom1.scrollIntoViewIfNeeded(false); // dom1.value=record['count']
|
|
5514
|
+
}
|
|
5515
|
+
|
|
5516
|
+
dom1 = null;
|
|
5517
|
+
} else if (e.keyCode === 9 && currentIndex === inputLength - 1 && index === data.length - 1) {
|
|
5518
|
+
setData([].concat(_toConsumableArray(data), [{}]));
|
|
5519
|
+
}
|
|
5520
|
+
}
|
|
5521
|
+
}) : /*#__PURE__*/React__default['default'].createElement(antd.InputNumber // onBlur={() => {updateHoverVisibled(false)}}
|
|
5522
|
+
, {
|
|
5523
|
+
// onBlur={() => {updateHoverVisibled(false)}}
|
|
5524
|
+
defaultValue: text || 0,
|
|
5525
|
+
min: 0,
|
|
5526
|
+
keyboard: false,
|
|
5527
|
+
onChange: function onChange(value) {
|
|
5528
|
+
record[item.dataIndex] = value;
|
|
5529
|
+
},
|
|
5530
|
+
onKeyDown: function onKeyDown(e) {
|
|
5531
|
+
// if (e.keyCode === 13 && e.ctrlKey) {
|
|
5532
|
+
// handleOk(true)
|
|
5533
|
+
// document.getElementById("first-query")?.focus()
|
|
5534
|
+
// }
|
|
5535
|
+
if (e.keyCode === 8 && e.ctrlKey && index) {
|
|
5536
|
+
var _e$nativeEvent$path$6;
|
|
5537
|
+
|
|
5538
|
+
antd.message.success('删除当前行');
|
|
5539
|
+
e.stopPropagation();
|
|
5540
|
+
e.preventDefault();
|
|
5541
|
+
var dom = (_e$nativeEvent$path$6 = e.nativeEvent.path[5].children[index - 1]) === null || _e$nativeEvent$path$6 === void 0 ? void 0 : _e$nativeEvent$path$6.getElementsByTagName('input')[currentIndex];
|
|
5542
|
+
|
|
5543
|
+
if (dom) {
|
|
5544
|
+
dom.select();
|
|
5545
|
+
dom.focus();
|
|
5546
|
+
dom.scrollIntoView(false);
|
|
5547
|
+
}
|
|
5548
|
+
|
|
5549
|
+
dom = null;
|
|
5550
|
+
setData(data.filter(function (item, innerIndex) {
|
|
5551
|
+
return innerIndex !== index;
|
|
5552
|
+
}));
|
|
5553
|
+
}
|
|
5554
|
+
|
|
5555
|
+
if (e.keyCode === 37 && e.shiftKey) {
|
|
5556
|
+
var _e$nativeEvent$path$7;
|
|
5557
|
+
|
|
5558
|
+
// 左滑动
|
|
5559
|
+
e.stopPropagation();
|
|
5560
|
+
e.preventDefault();
|
|
5561
|
+
|
|
5562
|
+
var _dom5 = (_e$nativeEvent$path$7 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$7 === void 0 ? void 0 : _e$nativeEvent$path$7.getElementsByTagName('input')[currentIndex - 1];
|
|
5563
|
+
|
|
5564
|
+
if (_dom5) {
|
|
5565
|
+
_dom5.select();
|
|
5566
|
+
|
|
5567
|
+
_dom5.focus();
|
|
5568
|
+
|
|
5569
|
+
_dom5.scrollIntoView(false);
|
|
5570
|
+
}
|
|
5571
|
+
|
|
5572
|
+
_dom5 = null;
|
|
5573
|
+
}
|
|
5574
|
+
|
|
5575
|
+
if (e.keyCode === 39 && e.shiftKey) {
|
|
5576
|
+
var _e$nativeEvent$path$8;
|
|
5577
|
+
|
|
5578
|
+
// 右滑
|
|
5579
|
+
e.stopPropagation();
|
|
5580
|
+
e.preventDefault();
|
|
5581
|
+
|
|
5582
|
+
var _dom6 = (_e$nativeEvent$path$8 = e.nativeEvent.path[5].children[index]) === null || _e$nativeEvent$path$8 === void 0 ? void 0 : _e$nativeEvent$path$8.getElementsByTagName('input')[currentIndex + 1];
|
|
5583
|
+
|
|
5584
|
+
if (_dom6) {
|
|
5585
|
+
_dom6.select();
|
|
5586
|
+
|
|
5587
|
+
_dom6.focus();
|
|
5588
|
+
|
|
5589
|
+
_dom6.scrollIntoView(false);
|
|
5590
|
+
}
|
|
5591
|
+
|
|
5592
|
+
_dom6 = null;
|
|
5593
|
+
}
|
|
5594
|
+
|
|
5595
|
+
if (e.keyCode === 40) {
|
|
5596
|
+
var _e$nativeEvent$path$9;
|
|
5597
|
+
|
|
5598
|
+
// 向下
|
|
5599
|
+
e.stopPropagation();
|
|
5600
|
+
e.preventDefault();
|
|
5601
|
+
|
|
5602
|
+
var _dom7 = (_e$nativeEvent$path$9 = e.nativeEvent.path[5].children[index + 1]) === null || _e$nativeEvent$path$9 === void 0 ? void 0 : _e$nativeEvent$path$9.getElementsByTagName('input')[currentIndex];
|
|
5603
|
+
|
|
5604
|
+
if (_dom7) {
|
|
5605
|
+
_dom7.select();
|
|
5606
|
+
|
|
5607
|
+
_dom7.focus();
|
|
5608
|
+
|
|
5609
|
+
_dom7.scrollIntoView(false);
|
|
5610
|
+
}
|
|
5611
|
+
|
|
5612
|
+
_dom7 = null;
|
|
5613
|
+
} else if (e.keyCode === 38) {
|
|
5614
|
+
var _e$nativeEvent$path$10;
|
|
5615
|
+
|
|
5616
|
+
e.stopPropagation();
|
|
5617
|
+
e.preventDefault();
|
|
5618
|
+
var dom1 = (_e$nativeEvent$path$10 = e.nativeEvent.path[5].children[index - 1]) === null || _e$nativeEvent$path$10 === void 0 ? void 0 : _e$nativeEvent$path$10.getElementsByTagName('input')[currentIndex];
|
|
5619
|
+
|
|
5620
|
+
if (dom1) {
|
|
5621
|
+
// dom1.value=""
|
|
5622
|
+
// dom1.setSelectionRange(100, 0);
|
|
5623
|
+
dom1.select();
|
|
5624
|
+
dom1.focus();
|
|
5625
|
+
dom1.scrollIntoViewIfNeeded(false); // dom1.value=record['count']
|
|
5626
|
+
}
|
|
5627
|
+
|
|
5628
|
+
dom1 = null;
|
|
5629
|
+
} else if (e.keyCode === 9 && currentIndex === inputLength - 1 && index === data.length - 1) {
|
|
5630
|
+
e.stopPropagation();
|
|
5631
|
+
e.preventDefault();
|
|
5632
|
+
} else if (e.keyCode === 13 && currentIndex === inputLength - 1 && index === data.length - 1 && record['skuCode']) {
|
|
5633
|
+
setData([].concat(_toConsumableArray(data), [{
|
|
5634
|
+
autoFocus: true
|
|
5635
|
+
}]));
|
|
5636
|
+
}
|
|
5637
|
+
}
|
|
5638
|
+
}));
|
|
5639
|
+
};
|
|
5640
|
+
|
|
5641
|
+
var BillEntry = function BillEntry(_ref3) {
|
|
5642
|
+
var onSaveCallback = _ref3.onSaveCallback;
|
|
5643
|
+
var columns = [{
|
|
5644
|
+
title: 'SKU编码',
|
|
5645
|
+
width: 150,
|
|
5646
|
+
dataIndex: 'skuCode',
|
|
5647
|
+
isInputItem: true,
|
|
5648
|
+
isPrimaryInput: true
|
|
5649
|
+
}, {
|
|
5650
|
+
title: 'SKU名称',
|
|
5651
|
+
width: 200,
|
|
5652
|
+
ellipsis: {
|
|
5653
|
+
showTitle: false
|
|
5654
|
+
},
|
|
5655
|
+
render: function render(text) {
|
|
5656
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
5657
|
+
placement: "topLeft",
|
|
5658
|
+
title: text
|
|
5659
|
+
}, text);
|
|
5660
|
+
},
|
|
5661
|
+
dataIndex: 'name'
|
|
5662
|
+
}, {
|
|
5663
|
+
title: '单位',
|
|
5664
|
+
dataIndex: 'selectUnitCode',
|
|
5665
|
+
width: 100,
|
|
5666
|
+
isSelectItem: true,
|
|
5667
|
+
render: function render(text, record) {
|
|
5668
|
+
var baseUnitCode = '';
|
|
5669
|
+
|
|
5670
|
+
if (record === null || record === void 0 ? void 0 : record.packingUnitList) {
|
|
5671
|
+
var base = record.packingUnitList.filter(function (item) {
|
|
5672
|
+
return item.unitCode;
|
|
5673
|
+
});
|
|
5674
|
+
|
|
5675
|
+
if (base.length) {
|
|
5676
|
+
baseUnitCode = base[0].unitCode;
|
|
5677
|
+
record.selectUnitCode = base[0].unitCode;
|
|
5678
|
+
}
|
|
5679
|
+
}
|
|
5680
|
+
|
|
5681
|
+
record.packingUnitList = record.packingUnitList || [];
|
|
5682
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
|
|
5683
|
+
value: record.selectUnitCode,
|
|
5684
|
+
onChange: function onChange(value) {
|
|
5685
|
+
record.selectUnitCode = value;
|
|
5686
|
+
},
|
|
5687
|
+
style: {
|
|
5688
|
+
width: '60px',
|
|
5689
|
+
height: '22px',
|
|
5690
|
+
lineHight: '22px'
|
|
5691
|
+
}
|
|
5692
|
+
}, record.packingUnitList && record.packingUnitList.map(function (item) {
|
|
5693
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Select.Option, {
|
|
5694
|
+
value: item.unitCode
|
|
5695
|
+
}, item.name);
|
|
5696
|
+
})));
|
|
5697
|
+
}
|
|
5698
|
+
}, {
|
|
5699
|
+
title: '数量',
|
|
5700
|
+
width: 100,
|
|
5701
|
+
isInputItem: true,
|
|
5702
|
+
dataIndex: 'count'
|
|
5703
|
+
}, {
|
|
5704
|
+
title: '所属SPU编码',
|
|
5705
|
+
width: 100,
|
|
5706
|
+
ellipsis: {
|
|
5707
|
+
showTitle: false
|
|
5708
|
+
},
|
|
5709
|
+
dataIndex: 'itemCode',
|
|
5710
|
+
render: function render(text) {
|
|
5711
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
5712
|
+
placement: "topLeft",
|
|
5713
|
+
title: text
|
|
5714
|
+
}, text);
|
|
5715
|
+
}
|
|
5716
|
+
}, {
|
|
5717
|
+
title: '规格',
|
|
5718
|
+
width: 200,
|
|
5719
|
+
ellipsis: {
|
|
5720
|
+
showTitle: false
|
|
5721
|
+
},
|
|
5722
|
+
render: function render(text) {
|
|
5723
|
+
return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
|
|
5724
|
+
placement: "topLeft",
|
|
5725
|
+
title: text
|
|
5726
|
+
}, text);
|
|
5727
|
+
},
|
|
5728
|
+
dataIndex: 'propertyNameAndValue'
|
|
5729
|
+
}];
|
|
5730
|
+
|
|
5731
|
+
var _useState9 = React.useState(false),
|
|
5732
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
5733
|
+
isModalVisible = _useState10[0],
|
|
5734
|
+
setIsModalVisible = _useState10[1];
|
|
5735
|
+
|
|
5736
|
+
var _useState11 = React.useState([{
|
|
5737
|
+
hovered: false
|
|
5738
|
+
}]),
|
|
5739
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
5740
|
+
data = _useState12[0],
|
|
5741
|
+
setData = _useState12[1];
|
|
5742
|
+
|
|
5743
|
+
var tableRef = React.useRef(null);
|
|
5744
|
+
|
|
5745
|
+
var callSelectItem = function callSelectItem(index, item) {
|
|
5746
|
+
var _tableRef$current2;
|
|
5747
|
+
|
|
5748
|
+
if (item) {
|
|
5749
|
+
var newData = [].concat(data);
|
|
5750
|
+
newData[index] = _objectSpread2(_objectSpread2({}, data[index]), item);
|
|
5751
|
+
setData(newData);
|
|
5752
|
+
}
|
|
5753
|
+
|
|
5754
|
+
var dom = tableRef === null || tableRef === void 0 ? void 0 : (_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : _tableRef$current2.getElementsByTagName('tbody')[0].getElementsByTagName('tr')[index + 1];
|
|
5755
|
+
|
|
5756
|
+
if (dom) {
|
|
5757
|
+
setTimeout(function () {
|
|
5758
|
+
var _dom$getElementsByTag, _dom$getElementsByTag2;
|
|
5759
|
+
|
|
5760
|
+
(_dom$getElementsByTag = dom.getElementsByTagName('input')[item ? 1 : 0]) === null || _dom$getElementsByTag === void 0 ? void 0 : _dom$getElementsByTag.select();
|
|
5761
|
+
(_dom$getElementsByTag2 = dom.getElementsByTagName('input')[item ? 1 : 0]) === null || _dom$getElementsByTag2 === void 0 ? void 0 : _dom$getElementsByTag2.focus();
|
|
5762
|
+
}, 200);
|
|
5763
|
+
}
|
|
5764
|
+
};
|
|
5765
|
+
|
|
5766
|
+
var deleteRecord = function deleteRecord(record) {
|
|
5767
|
+
setData(data.filter(function (item) {
|
|
5768
|
+
return item.skuCode !== record.skuCode;
|
|
5769
|
+
}));
|
|
5770
|
+
};
|
|
5771
|
+
|
|
5772
|
+
var inputIndex = 0;
|
|
5773
|
+
var selectColumns = [].concat(_toConsumableArray(columns.map(function (item) {
|
|
5774
|
+
var inputLength = columns.filter(function (item) {
|
|
5775
|
+
return item.isInputItem || item.isSelectItem;
|
|
5776
|
+
}).length;
|
|
5777
|
+
var currentIndex = inputIndex;
|
|
5778
|
+
|
|
5779
|
+
if (item.isInputItem) {
|
|
5780
|
+
inputIndex++;
|
|
5781
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
5782
|
+
render: function render(text, record, index) {
|
|
5783
|
+
return /*#__PURE__*/React__default['default'].createElement(InputElement, {
|
|
5784
|
+
setData: setData,
|
|
5785
|
+
callSelectItem: callSelectItem.bind(_this, index),
|
|
5786
|
+
item: item,
|
|
5787
|
+
isPrimaryInput: item.isPrimaryInput,
|
|
5788
|
+
record: record,
|
|
5789
|
+
text: text,
|
|
5790
|
+
data: data,
|
|
5791
|
+
index: index,
|
|
5792
|
+
inputLength: inputLength,
|
|
5793
|
+
currentIndex: currentIndex
|
|
5794
|
+
});
|
|
5795
|
+
}
|
|
5796
|
+
});
|
|
5797
|
+
} else if (item.isSelectItem) {
|
|
5798
|
+
inputIndex++;
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5801
|
+
return item;
|
|
5802
|
+
})), [{
|
|
5803
|
+
title: '操作',
|
|
5804
|
+
width: 50,
|
|
5805
|
+
fixed: 'right',
|
|
5806
|
+
render: function render(text, record, index) {
|
|
5807
|
+
if (index !== 0) {
|
|
5808
|
+
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
5809
|
+
style: {
|
|
5810
|
+
cursor: 'pointer',
|
|
5811
|
+
color: '#005CFF'
|
|
5812
|
+
},
|
|
5813
|
+
onClick: function onClick() {
|
|
5814
|
+
deleteRecord(record);
|
|
5815
|
+
}
|
|
5816
|
+
}, "\u5220\u9664");
|
|
5817
|
+
}
|
|
5818
|
+
}
|
|
5819
|
+
}]);
|
|
5820
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5821
|
+
className: 'add_select'
|
|
5822
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5823
|
+
className: 'add_select_quick_header'
|
|
5824
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5825
|
+
className: 'add_select_quick_header_title'
|
|
5826
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", null, "\u5FEB\u901F\u5F55\u5165"), /*#__PURE__*/React__default['default'].createElement(antd.Button, {
|
|
5827
|
+
type: "primary",
|
|
5828
|
+
onClick: function onClick() {
|
|
5829
|
+
onSaveCallback(data);
|
|
5830
|
+
}
|
|
5831
|
+
}, "\u63D0\u4EA4")), /*#__PURE__*/React__default['default'].createElement("span", null, /*#__PURE__*/React__default['default'].createElement("span", null, "*"), " \xA0\u5FEB\u6377\u952E\uFF1A\u3010Tab\u3011-\u8DF3\u683C\u5207\u6362\uFF1B\u3010Shift+\u2190\u3001\u2192\u3011-\u5F53\u524D\u884C\u5DE6\u3001\u53F3\u79FB\u52A8\uFF1B\u3010 \u2191\u3001\u2193\u3011-\u5F53\u524D\u5217\u4E0A\u3001\u4E0B\u79FB\u52A8\uFF1B\u3010ctrl+Delete\u3011-\u5220\u9664\u5F53\u524D\u884C\uFF1B")), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5832
|
+
className: 'add_select_wrapper_select add_select_wrapper_select_quick'
|
|
5833
|
+
}, /*#__PURE__*/React__default['default'].createElement(antd.Table, _defineProperty({
|
|
5834
|
+
size: 'small',
|
|
5835
|
+
scroll: {
|
|
5836
|
+
y: 240
|
|
5837
|
+
},
|
|
5838
|
+
ref: tableRef,
|
|
5839
|
+
dataSource: data,
|
|
5840
|
+
columns: selectColumns,
|
|
5841
|
+
pagination: false,
|
|
5842
|
+
rowClassName: 'row-class'
|
|
5843
|
+
}, "rowClassName", function rowClassName(record, index) {
|
|
5844
|
+
return index % 2 === 0 ? 'table_base row-class' : 'table_odd row-class';
|
|
5845
|
+
}))));
|
|
5846
|
+
};
|
|
5847
|
+
|
|
5449
5848
|
var shopFileType = [{
|
|
5450
5849
|
text: "线上",
|
|
5451
5850
|
value: 'online'
|
|
@@ -5863,6 +6262,7 @@ function commonFun(type, prefixUrl, requestConfigProp, modalTableBusProps) {
|
|
|
5863
6262
|
mappingValueField: 'skuCode',
|
|
5864
6263
|
mappingTextShowTextField: ['name', 'propertyNameAndValue'],
|
|
5865
6264
|
otherParams: {
|
|
6265
|
+
'qp-combination-eq': false,
|
|
5866
6266
|
'qp-approveStatus-eq': 1,
|
|
5867
6267
|
// 'qp-type-eq': 10, // 查唯一国际条码【有些项目不需要必须要有国际条码,故注释,需要的项目自己定义otherParams补充上这个条件】
|
|
5868
6268
|
sorter: 'desc-id'
|
|
@@ -7244,7 +7644,9 @@ var AddSkuSelect = function AddSkuSelect(parProps) {
|
|
|
7244
7644
|
requestConfig: {
|
|
7245
7645
|
url: "/items/sku/pager/v2",
|
|
7246
7646
|
filter: 'qp-name-like',
|
|
7247
|
-
otherParams: {
|
|
7647
|
+
otherParams: {
|
|
7648
|
+
'qp-combination-eq': false
|
|
7649
|
+
},
|
|
7248
7650
|
mappingTextField: 'name',
|
|
7249
7651
|
mappingValueField: 'skuCode'
|
|
7250
7652
|
},
|
|
@@ -7755,11 +8157,11 @@ var TreeSearchSelect = function TreeSearchSelect(props) {
|
|
|
7755
8157
|
var paramsData = _objectSpread2(_defineProperty({}, "".concat(paramsKey), q), initialParams);
|
|
7756
8158
|
|
|
7757
8159
|
axios__default['default'].get("".concat(url, "?").concat(querystring.stringify(paramsData))).then( /*#__PURE__*/function () {
|
|
7758
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
8160
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(res) {
|
|
7759
8161
|
var _ctx$form;
|
|
7760
8162
|
|
|
7761
8163
|
var resData, coverData, data, dataList;
|
|
7762
|
-
return
|
|
8164
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
7763
8165
|
while (1) {
|
|
7764
8166
|
switch (_context.prev = _context.next) {
|
|
7765
8167
|
case 0:
|
|
@@ -8000,7 +8402,6 @@ var index$1 = /*#__PURE__*/React__default['default'].memo(BusinessTreeSearchSele
|
|
|
8000
8402
|
* @LastEditTime: 2022-01-14 16:10:27
|
|
8001
8403
|
* @LastEditors: rodchen
|
|
8002
8404
|
*/
|
|
8003
|
-
|
|
8004
8405
|
var resposne = JSON.parse(localStorage.getItem('userInfo') || '{}');
|
|
8005
8406
|
axios__default['default'].defaults.headers.common['sso-sessionid'] = (resposne === null || resposne === void 0 ? void 0 : resposne.sessionId) || '';
|
|
8006
8407
|
axios__default['default'].defaults.headers.common['x-tenant-id'] = (resposne === null || resposne === void 0 ? void 0 : resposne.tenantId) || '1';
|
|
@@ -8012,6 +8413,7 @@ if (localStorage.getItem('x-user-auth-context')) {
|
|
|
8012
8413
|
|
|
8013
8414
|
exports.AddSelect = AddSelect;
|
|
8014
8415
|
exports.AddSkuSelect = AddSkuSelect;
|
|
8416
|
+
exports.BillEntry = BillEntry;
|
|
8015
8417
|
exports.BusinessSearchSelect = BusinessSearchSelect$1;
|
|
8016
8418
|
exports.BusinessTreeSearchSelect = index$1;
|
|
8017
8419
|
exports.CheckOneUser = index;
|