kts-component-invoice-operate 3.2.196 → 3.2.198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +233 -113
- package/dist/index.js +233 -113
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/easiest/index.tsx +3 -1
- package/src/Invoice/index.tsx +8 -1
- package/src/Invoice/ui/digtal/FreightList/ui/AddRowButton/index.tsx +16 -6
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/autoFillFn/index.ts +32 -22
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +3 -2
- package/src/Invoice/ui/digtal/GoodsList/ui/AddRowButton/index.tsx +16 -6
- package/src/Invoice/ui/digtal/GoodsList/ui/Search/index.tsx +14 -4
package/dist/index.js
CHANGED
|
@@ -19143,53 +19143,82 @@ function addGood$2(_x) {
|
|
|
19143
19143
|
|
|
19144
19144
|
|
|
19145
19145
|
function _addGood$1() {
|
|
19146
|
-
_addGood$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
19147
|
-
return _regeneratorRuntime().wrap(function
|
|
19146
|
+
_addGood$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
|
|
19147
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
19148
19148
|
while (1) {
|
|
19149
|
-
switch (
|
|
19149
|
+
switch (_context4.prev = _context4.next) {
|
|
19150
19150
|
case 0:
|
|
19151
|
-
|
|
19151
|
+
_context4.next = 2;
|
|
19152
19152
|
return controller.saveEditGood();
|
|
19153
19153
|
|
|
19154
19154
|
case 2:
|
|
19155
|
-
|
|
19155
|
+
_context4.next = 4;
|
|
19156
19156
|
return controller.wait();
|
|
19157
19157
|
|
|
19158
19158
|
case 4:
|
|
19159
|
-
|
|
19159
|
+
_context4.next = 6;
|
|
19160
19160
|
return controller.run( /*#__PURE__*/function () {
|
|
19161
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
19162
|
-
|
|
19161
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
19162
|
+
var _controller$state$goo;
|
|
19163
|
+
|
|
19164
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
19163
19165
|
while (1) {
|
|
19164
|
-
switch (
|
|
19166
|
+
switch (_context3.prev = _context3.next) {
|
|
19165
19167
|
case 0:
|
|
19166
19168
|
if (!s.goodsListState.editGood) {
|
|
19167
|
-
|
|
19169
|
+
_context3.next = 3;
|
|
19168
19170
|
break;
|
|
19169
19171
|
}
|
|
19170
19172
|
|
|
19171
|
-
|
|
19172
|
-
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19173
|
+
_context3.next = 3;
|
|
19174
|
+
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
19175
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
19176
|
+
var firstError;
|
|
19177
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
19178
|
+
while (1) {
|
|
19179
|
+
switch (_context2.prev = _context2.next) {
|
|
19180
|
+
case 0:
|
|
19181
|
+
if (!err) {
|
|
19182
|
+
_context2.next = 4;
|
|
19183
|
+
break;
|
|
19184
|
+
}
|
|
19185
|
+
|
|
19186
|
+
firstError = Object.values(err)[0];
|
|
19187
|
+
ktsXui.message.error({
|
|
19188
|
+
content: firstError.errors[0].message,
|
|
19189
|
+
key: '你正在编辑一个货物'
|
|
19190
|
+
});
|
|
19191
|
+
return _context2.abrupt("return");
|
|
19192
|
+
|
|
19193
|
+
case 4:
|
|
19194
|
+
case "end":
|
|
19195
|
+
return _context2.stop();
|
|
19196
|
+
}
|
|
19197
|
+
}
|
|
19198
|
+
}, _callee2);
|
|
19199
|
+
}));
|
|
19200
|
+
|
|
19201
|
+
return function (_x5, _x6) {
|
|
19202
|
+
return _ref3.apply(this, arguments);
|
|
19203
|
+
};
|
|
19204
|
+
}());
|
|
19176
19205
|
|
|
19177
19206
|
case 3:
|
|
19178
|
-
|
|
19207
|
+
_context3.next = 5;
|
|
19179
19208
|
return controller.addGood({
|
|
19180
19209
|
taxRate: s.goodsListState.defaultRate,
|
|
19181
19210
|
lineAttribute: LineAttributeType$1.正常
|
|
19182
19211
|
});
|
|
19183
19212
|
|
|
19184
19213
|
case 5:
|
|
19185
|
-
s.goodsListState.editGood =
|
|
19214
|
+
s.goodsListState.editGood = _context3.sent;
|
|
19186
19215
|
|
|
19187
19216
|
case 6:
|
|
19188
19217
|
case "end":
|
|
19189
|
-
return
|
|
19218
|
+
return _context3.stop();
|
|
19190
19219
|
}
|
|
19191
19220
|
}
|
|
19192
|
-
},
|
|
19221
|
+
}, _callee3);
|
|
19193
19222
|
}));
|
|
19194
19223
|
|
|
19195
19224
|
return function (_x4) {
|
|
@@ -19199,10 +19228,10 @@ function _addGood$1() {
|
|
|
19199
19228
|
|
|
19200
19229
|
case 6:
|
|
19201
19230
|
case "end":
|
|
19202
|
-
return
|
|
19231
|
+
return _context4.stop();
|
|
19203
19232
|
}
|
|
19204
19233
|
}
|
|
19205
|
-
},
|
|
19234
|
+
}, _callee4);
|
|
19206
19235
|
}));
|
|
19207
19236
|
return _addGood$1.apply(this, arguments);
|
|
19208
19237
|
}
|
|
@@ -19212,34 +19241,34 @@ function rollBottom$1(_x2, _x3) {
|
|
|
19212
19241
|
}
|
|
19213
19242
|
|
|
19214
19243
|
function _rollBottom$1() {
|
|
19215
|
-
_rollBottom$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
19244
|
+
_rollBottom$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
|
|
19216
19245
|
var cont;
|
|
19217
|
-
return _regeneratorRuntime().wrap(function
|
|
19246
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
19218
19247
|
while (1) {
|
|
19219
|
-
switch (
|
|
19248
|
+
switch (_context5.prev = _context5.next) {
|
|
19220
19249
|
case 0:
|
|
19221
|
-
|
|
19250
|
+
_context5.next = 2;
|
|
19222
19251
|
return controller.wait();
|
|
19223
19252
|
|
|
19224
19253
|
case 2:
|
|
19225
19254
|
cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
|
|
19226
19255
|
|
|
19227
19256
|
if (cont) {
|
|
19228
|
-
|
|
19257
|
+
_context5.next = 5;
|
|
19229
19258
|
break;
|
|
19230
19259
|
}
|
|
19231
19260
|
|
|
19232
|
-
return
|
|
19261
|
+
return _context5.abrupt("return");
|
|
19233
19262
|
|
|
19234
19263
|
case 5:
|
|
19235
19264
|
cont.scrollTop = cont.scrollHeight;
|
|
19236
19265
|
|
|
19237
19266
|
case 6:
|
|
19238
19267
|
case "end":
|
|
19239
|
-
return
|
|
19268
|
+
return _context5.stop();
|
|
19240
19269
|
}
|
|
19241
19270
|
}
|
|
19242
|
-
},
|
|
19271
|
+
}, _callee5);
|
|
19243
19272
|
}));
|
|
19244
19273
|
return _rollBottom$1.apply(this, arguments);
|
|
19245
19274
|
}
|
|
@@ -19369,7 +19398,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19369
19398
|
|
|
19370
19399
|
case 11:
|
|
19371
19400
|
calculatingDigits = controller.state.calculatingDigits;
|
|
19372
|
-
quantity =
|
|
19401
|
+
quantity = values.quantity;
|
|
19373
19402
|
_context3.next = 16;
|
|
19374
19403
|
return controller.setEditGood({
|
|
19375
19404
|
quantity: quantity
|
|
@@ -19391,7 +19420,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19391
19420
|
}
|
|
19392
19421
|
|
|
19393
19422
|
// 可以找到 单价(含税)
|
|
19394
|
-
priceIncludeTax =
|
|
19423
|
+
priceIncludeTax = values.priceIncludeTax;
|
|
19395
19424
|
lineAmountIncludeTax = format2(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)));
|
|
19396
19425
|
form.setFieldsValue({
|
|
19397
19426
|
lineAmountIncludeTax: lineAmountIncludeTax
|
|
@@ -19413,7 +19442,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19413
19442
|
|
|
19414
19443
|
// 可以找到 金额(含税)
|
|
19415
19444
|
_lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
|
|
19416
|
-
_priceIncludeTax =
|
|
19445
|
+
_priceIncludeTax = evaluate("".concat(_lineAmountIncludeTax, " / ").concat(quantity));
|
|
19417
19446
|
form.setFieldsValue({
|
|
19418
19447
|
priceIncludeTax: _priceIncludeTax
|
|
19419
19448
|
});
|
|
@@ -19437,7 +19466,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19437
19466
|
}
|
|
19438
19467
|
|
|
19439
19468
|
// 可以找到 单价(不含税)
|
|
19440
|
-
priceExcludeTax =
|
|
19469
|
+
priceExcludeTax = values.priceExcludeTax;
|
|
19441
19470
|
lineAmountExcludeTax = format2(evaluate("".concat(quantity, " * ").concat(priceExcludeTax)));
|
|
19442
19471
|
form.setFieldsValue({
|
|
19443
19472
|
lineAmountExcludeTax: lineAmountExcludeTax
|
|
@@ -19460,7 +19489,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19460
19489
|
|
|
19461
19490
|
// 可以找到 金额(不含税)
|
|
19462
19491
|
_lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
|
|
19463
|
-
_priceExcludeTax =
|
|
19492
|
+
_priceExcludeTax = evaluate("".concat(_lineAmountExcludeTax, " / ").concat(quantity));
|
|
19464
19493
|
form.setFieldsValue({
|
|
19465
19494
|
priceExcludeTax: _priceExcludeTax
|
|
19466
19495
|
});
|
|
@@ -19536,7 +19565,7 @@ var onChangePriceIncludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19536
19565
|
|
|
19537
19566
|
case 11:
|
|
19538
19567
|
calculatingDigits = controller.state.calculatingDigits;
|
|
19539
|
-
priceIncludeTax =
|
|
19568
|
+
priceIncludeTax = values.priceIncludeTax;
|
|
19540
19569
|
_context4.next = 15;
|
|
19541
19570
|
return controller.setEditGood({
|
|
19542
19571
|
priceIncludeTax: priceIncludeTax
|
|
@@ -19552,7 +19581,7 @@ var onChangePriceIncludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19552
19581
|
break;
|
|
19553
19582
|
}
|
|
19554
19583
|
|
|
19555
|
-
quantity =
|
|
19584
|
+
quantity = values.quantity;
|
|
19556
19585
|
lineAmountIncludeTax = format2(evaluate("".concat(quantity, " * ").concat(priceIncludeTax)));
|
|
19557
19586
|
form.setFieldsValue({
|
|
19558
19587
|
lineAmountIncludeTax: lineAmountIncludeTax
|
|
@@ -19573,7 +19602,7 @@ var onChangePriceIncludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19573
19602
|
}
|
|
19574
19603
|
|
|
19575
19604
|
_lineAmountIncludeTax2 = format2(values.lineAmountIncludeTax);
|
|
19576
|
-
_quantity =
|
|
19605
|
+
_quantity = evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(priceIncludeTax));
|
|
19577
19606
|
form.setFieldsValue({
|
|
19578
19607
|
quantity: _quantity
|
|
19579
19608
|
});
|
|
@@ -19648,7 +19677,7 @@ var onChangePriceExcludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19648
19677
|
|
|
19649
19678
|
case 11:
|
|
19650
19679
|
calculatingDigits = controller.state.calculatingDigits;
|
|
19651
|
-
priceExcludeTax =
|
|
19680
|
+
priceExcludeTax = values.priceExcludeTax;
|
|
19652
19681
|
_context5.next = 15;
|
|
19653
19682
|
return controller.setEditGood({
|
|
19654
19683
|
priceExcludeTax: priceExcludeTax
|
|
@@ -19664,7 +19693,7 @@ var onChangePriceExcludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19664
19693
|
break;
|
|
19665
19694
|
}
|
|
19666
19695
|
|
|
19667
|
-
quantity =
|
|
19696
|
+
quantity = values.quantity;
|
|
19668
19697
|
lineAmountExcludeTax = format2(evaluate("".concat(quantity, " * ").concat(priceExcludeTax)));
|
|
19669
19698
|
form.setFieldsValue({
|
|
19670
19699
|
lineAmountExcludeTax: lineAmountExcludeTax
|
|
@@ -19685,7 +19714,7 @@ var onChangePriceExcludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19685
19714
|
}
|
|
19686
19715
|
|
|
19687
19716
|
_lineAmountExcludeTax2 = format2(values.lineAmountExcludeTax);
|
|
19688
|
-
_quantity2 =
|
|
19717
|
+
_quantity2 = evaluate("".concat(_lineAmountExcludeTax2, " / ").concat(priceExcludeTax));
|
|
19689
19718
|
form.setFieldsValue({
|
|
19690
19719
|
quantity: _quantity2
|
|
19691
19720
|
});
|
|
@@ -20370,14 +20399,14 @@ var onChangeItemName$1 = /*#__PURE__*/function () {
|
|
|
20370
20399
|
/** 修改了含税开关 重新计算 */
|
|
20371
20400
|
|
|
20372
20401
|
var onChangeSwitchTax$1 = /*#__PURE__*/function () {
|
|
20373
|
-
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
20402
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(controller, isTaxIncluded) {
|
|
20374
20403
|
var calculatingDigits;
|
|
20375
|
-
return _regeneratorRuntime().wrap(function
|
|
20404
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
20376
20405
|
while (1) {
|
|
20377
|
-
switch (
|
|
20406
|
+
switch (_context22.prev = _context22.next) {
|
|
20378
20407
|
case 0:
|
|
20379
20408
|
if (controller.state.goodsListState.isRecalculateWhenSwitchTax) {
|
|
20380
|
-
|
|
20409
|
+
_context22.next = 3;
|
|
20381
20410
|
break;
|
|
20382
20411
|
}
|
|
20383
20412
|
|
|
@@ -20403,37 +20432,64 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
|
|
|
20403
20432
|
return _ref20.apply(this, arguments);
|
|
20404
20433
|
};
|
|
20405
20434
|
}())();
|
|
20406
|
-
return
|
|
20435
|
+
return _context22.abrupt("return");
|
|
20407
20436
|
|
|
20408
20437
|
case 3:
|
|
20409
20438
|
calculatingDigits = controller.state.calculatingDigits;
|
|
20410
|
-
|
|
20439
|
+
_context22.next = 6;
|
|
20411
20440
|
return controller.saveEditGood();
|
|
20412
20441
|
|
|
20413
20442
|
case 6:
|
|
20414
|
-
|
|
20443
|
+
_context22.next = 8;
|
|
20415
20444
|
return controller.wait();
|
|
20416
20445
|
|
|
20417
20446
|
case 8:
|
|
20418
|
-
|
|
20447
|
+
_context22.next = 10;
|
|
20419
20448
|
return controller.run( /*#__PURE__*/function () {
|
|
20420
|
-
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
20421
|
-
var _s$goodsListState, needRefresh, newGoodsList;
|
|
20449
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(s) {
|
|
20450
|
+
var _controller$state$goo, _s$goodsListState, needRefresh, newGoodsList;
|
|
20422
20451
|
|
|
20423
|
-
return _regeneratorRuntime().wrap(function
|
|
20452
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
20424
20453
|
while (1) {
|
|
20425
|
-
switch (
|
|
20454
|
+
switch (_context21.prev = _context21.next) {
|
|
20426
20455
|
case 0:
|
|
20427
20456
|
if (!s.goodsListState.editGood) {
|
|
20428
|
-
|
|
20457
|
+
_context21.next = 3;
|
|
20429
20458
|
break;
|
|
20430
20459
|
}
|
|
20431
20460
|
|
|
20432
|
-
|
|
20433
|
-
|
|
20434
|
-
|
|
20435
|
-
|
|
20436
|
-
|
|
20461
|
+
_context21.next = 3;
|
|
20462
|
+
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
20463
|
+
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(err, values) {
|
|
20464
|
+
var firstError;
|
|
20465
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
20466
|
+
while (1) {
|
|
20467
|
+
switch (_context20.prev = _context20.next) {
|
|
20468
|
+
case 0:
|
|
20469
|
+
if (!err) {
|
|
20470
|
+
_context20.next = 4;
|
|
20471
|
+
break;
|
|
20472
|
+
}
|
|
20473
|
+
|
|
20474
|
+
firstError = Object.values(err)[0];
|
|
20475
|
+
ktsComponentsAntdX3.message.error({
|
|
20476
|
+
content: firstError.errors[0].message,
|
|
20477
|
+
key: '你正在编辑一个货物'
|
|
20478
|
+
});
|
|
20479
|
+
return _context20.abrupt("return");
|
|
20480
|
+
|
|
20481
|
+
case 4:
|
|
20482
|
+
case "end":
|
|
20483
|
+
return _context20.stop();
|
|
20484
|
+
}
|
|
20485
|
+
}
|
|
20486
|
+
}, _callee20);
|
|
20487
|
+
}));
|
|
20488
|
+
|
|
20489
|
+
return function (_x40, _x41) {
|
|
20490
|
+
return _ref22.apply(this, arguments);
|
|
20491
|
+
};
|
|
20492
|
+
}());
|
|
20437
20493
|
|
|
20438
20494
|
case 3:
|
|
20439
20495
|
s.goodsListState.isTaxIncluded = isTaxIncluded;
|
|
@@ -20515,10 +20571,10 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
|
|
|
20515
20571
|
|
|
20516
20572
|
case 5:
|
|
20517
20573
|
case "end":
|
|
20518
|
-
return
|
|
20574
|
+
return _context21.stop();
|
|
20519
20575
|
}
|
|
20520
20576
|
}
|
|
20521
|
-
},
|
|
20577
|
+
}, _callee21);
|
|
20522
20578
|
}));
|
|
20523
20579
|
|
|
20524
20580
|
return function (_x39) {
|
|
@@ -20528,10 +20584,10 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
|
|
|
20528
20584
|
|
|
20529
20585
|
case 10:
|
|
20530
20586
|
case "end":
|
|
20531
|
-
return
|
|
20587
|
+
return _context22.stop();
|
|
20532
20588
|
}
|
|
20533
20589
|
}
|
|
20534
|
-
},
|
|
20590
|
+
}, _callee22);
|
|
20535
20591
|
}));
|
|
20536
20592
|
|
|
20537
20593
|
return function onChangeSwitchTax(_x36, _x37) {
|
|
@@ -20618,56 +20674,85 @@ function Search$1() {
|
|
|
20618
20674
|
var isTaxIncluded = controller.useMemo(function (s) {
|
|
20619
20675
|
return s.goodsListState.isTaxIncluded;
|
|
20620
20676
|
}, []);
|
|
20621
|
-
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
20622
|
-
|
|
20677
|
+
var onClick = React__default['default'].useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
20678
|
+
var _controller$state$goo;
|
|
20679
|
+
|
|
20680
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20623
20681
|
while (1) {
|
|
20624
|
-
switch (
|
|
20682
|
+
switch (_context2.prev = _context2.next) {
|
|
20625
20683
|
case 0:
|
|
20626
|
-
|
|
20684
|
+
_context2.next = 2;
|
|
20627
20685
|
return controller.saveEditGood();
|
|
20628
20686
|
|
|
20629
20687
|
case 2:
|
|
20630
|
-
|
|
20688
|
+
_context2.next = 4;
|
|
20631
20689
|
return controller.wait();
|
|
20632
20690
|
|
|
20633
20691
|
case 4:
|
|
20634
20692
|
if (!controller.state.goodsListState.editGood) {
|
|
20635
|
-
|
|
20693
|
+
_context2.next = 7;
|
|
20636
20694
|
break;
|
|
20637
20695
|
}
|
|
20638
20696
|
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20697
|
+
_context2.next = 7;
|
|
20698
|
+
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
20699
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err, values) {
|
|
20700
|
+
var firstError;
|
|
20701
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20702
|
+
while (1) {
|
|
20703
|
+
switch (_context.prev = _context.next) {
|
|
20704
|
+
case 0:
|
|
20705
|
+
if (!err) {
|
|
20706
|
+
_context.next = 4;
|
|
20707
|
+
break;
|
|
20708
|
+
}
|
|
20709
|
+
|
|
20710
|
+
firstError = Object.values(err)[0];
|
|
20711
|
+
ktsXui.message.error({
|
|
20712
|
+
content: firstError.errors[0].message,
|
|
20713
|
+
key: '你正在编辑一个货物'
|
|
20714
|
+
});
|
|
20715
|
+
return _context.abrupt("return");
|
|
20716
|
+
|
|
20717
|
+
case 4:
|
|
20718
|
+
case "end":
|
|
20719
|
+
return _context.stop();
|
|
20720
|
+
}
|
|
20721
|
+
}
|
|
20722
|
+
}, _callee);
|
|
20723
|
+
}));
|
|
20724
|
+
|
|
20725
|
+
return function (_x, _x2) {
|
|
20726
|
+
return _ref2.apply(this, arguments);
|
|
20727
|
+
};
|
|
20728
|
+
}());
|
|
20644
20729
|
|
|
20645
20730
|
case 7:
|
|
20646
20731
|
case "end":
|
|
20647
|
-
return
|
|
20732
|
+
return _context2.stop();
|
|
20648
20733
|
}
|
|
20649
20734
|
}
|
|
20650
|
-
},
|
|
20735
|
+
}, _callee2);
|
|
20651
20736
|
})), []);
|
|
20652
20737
|
React__default['default'].useEffect(function () {
|
|
20653
20738
|
controller.run( /*#__PURE__*/function () {
|
|
20654
|
-
var
|
|
20655
|
-
return _regeneratorRuntime().wrap(function
|
|
20739
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
20740
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
20656
20741
|
while (1) {
|
|
20657
|
-
switch (
|
|
20742
|
+
switch (_context3.prev = _context3.next) {
|
|
20658
20743
|
case 0:
|
|
20659
20744
|
s.goodsListState.searchValue = value.trim();
|
|
20660
20745
|
|
|
20661
20746
|
case 1:
|
|
20662
20747
|
case "end":
|
|
20663
|
-
return
|
|
20748
|
+
return _context3.stop();
|
|
20664
20749
|
}
|
|
20665
20750
|
}
|
|
20666
|
-
},
|
|
20751
|
+
}, _callee3);
|
|
20667
20752
|
}));
|
|
20668
20753
|
|
|
20669
|
-
return function (
|
|
20670
|
-
return
|
|
20754
|
+
return function (_x3) {
|
|
20755
|
+
return _ref3.apply(this, arguments);
|
|
20671
20756
|
};
|
|
20672
20757
|
}());
|
|
20673
20758
|
}, [value, controller]);
|
|
@@ -21987,7 +22072,7 @@ var useColumns$1 = (function (form) {
|
|
|
21987
22072
|
message: '金额不能为空'
|
|
21988
22073
|
}, {
|
|
21989
22074
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
21990
|
-
message: '
|
|
22075
|
+
message: '金额错误,请重新输入'
|
|
21991
22076
|
}, {
|
|
21992
22077
|
validator: function () {
|
|
21993
22078
|
var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
|
|
@@ -22043,6 +22128,7 @@ var useColumns$1 = (function (form) {
|
|
|
22043
22128
|
style: {
|
|
22044
22129
|
textAlign: 'right'
|
|
22045
22130
|
},
|
|
22131
|
+
max: 99999999999999999999,
|
|
22046
22132
|
loading: isCipher$1(changeField, 'lineAmountIncludeTax'),
|
|
22047
22133
|
onChange: function onChange() {
|
|
22048
22134
|
setChangeField('lineAmountIncludeTax');
|
|
@@ -22075,7 +22161,7 @@ var useColumns$1 = (function (form) {
|
|
|
22075
22161
|
message: '金额不能为空'
|
|
22076
22162
|
}, {
|
|
22077
22163
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
22078
|
-
message: '
|
|
22164
|
+
message: '金额错误,请重新输入'
|
|
22079
22165
|
}, {
|
|
22080
22166
|
validator: function () {
|
|
22081
22167
|
var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
|
|
@@ -24825,50 +24911,79 @@ function addGood$3(_x) {
|
|
|
24825
24911
|
|
|
24826
24912
|
|
|
24827
24913
|
function _addGood$2() {
|
|
24828
|
-
_addGood$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24829
|
-
return _regeneratorRuntime().wrap(function
|
|
24914
|
+
_addGood$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
|
|
24915
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
24830
24916
|
while (1) {
|
|
24831
|
-
switch (
|
|
24917
|
+
switch (_context4.prev = _context4.next) {
|
|
24832
24918
|
case 0:
|
|
24833
|
-
|
|
24919
|
+
_context4.next = 2;
|
|
24834
24920
|
return controller.saveEditFreight();
|
|
24835
24921
|
|
|
24836
24922
|
case 2:
|
|
24837
|
-
|
|
24923
|
+
_context4.next = 4;
|
|
24838
24924
|
return controller.wait();
|
|
24839
24925
|
|
|
24840
24926
|
case 4:
|
|
24841
|
-
|
|
24927
|
+
_context4.next = 6;
|
|
24842
24928
|
return controller.run( /*#__PURE__*/function () {
|
|
24843
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24844
|
-
|
|
24929
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
24930
|
+
var _controller$state$goo;
|
|
24931
|
+
|
|
24932
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
24845
24933
|
while (1) {
|
|
24846
|
-
switch (
|
|
24934
|
+
switch (_context3.prev = _context3.next) {
|
|
24847
24935
|
case 0:
|
|
24848
24936
|
if (!s.freightListState.editGood) {
|
|
24849
|
-
|
|
24937
|
+
_context3.next = 3;
|
|
24850
24938
|
break;
|
|
24851
24939
|
}
|
|
24852
24940
|
|
|
24853
|
-
|
|
24854
|
-
|
|
24855
|
-
|
|
24856
|
-
|
|
24857
|
-
|
|
24941
|
+
_context3.next = 3;
|
|
24942
|
+
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
24943
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
24944
|
+
var firstError;
|
|
24945
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
24946
|
+
while (1) {
|
|
24947
|
+
switch (_context2.prev = _context2.next) {
|
|
24948
|
+
case 0:
|
|
24949
|
+
if (!err) {
|
|
24950
|
+
_context2.next = 4;
|
|
24951
|
+
break;
|
|
24952
|
+
}
|
|
24953
|
+
|
|
24954
|
+
firstError = Object.values(err)[0];
|
|
24955
|
+
ktsXui.message.error({
|
|
24956
|
+
content: firstError.errors[0].message,
|
|
24957
|
+
key: '你正在编辑一个货物'
|
|
24958
|
+
});
|
|
24959
|
+
return _context2.abrupt("return");
|
|
24960
|
+
|
|
24961
|
+
case 4:
|
|
24962
|
+
case "end":
|
|
24963
|
+
return _context2.stop();
|
|
24964
|
+
}
|
|
24965
|
+
}
|
|
24966
|
+
}, _callee2);
|
|
24967
|
+
}));
|
|
24968
|
+
|
|
24969
|
+
return function (_x5, _x6) {
|
|
24970
|
+
return _ref3.apply(this, arguments);
|
|
24971
|
+
};
|
|
24972
|
+
}());
|
|
24858
24973
|
|
|
24859
24974
|
case 3:
|
|
24860
|
-
|
|
24975
|
+
_context3.next = 5;
|
|
24861
24976
|
return controller.addFreight({});
|
|
24862
24977
|
|
|
24863
24978
|
case 5:
|
|
24864
|
-
s.freightListState.editGood =
|
|
24979
|
+
s.freightListState.editGood = _context3.sent;
|
|
24865
24980
|
|
|
24866
24981
|
case 6:
|
|
24867
24982
|
case "end":
|
|
24868
|
-
return
|
|
24983
|
+
return _context3.stop();
|
|
24869
24984
|
}
|
|
24870
24985
|
}
|
|
24871
|
-
},
|
|
24986
|
+
}, _callee3);
|
|
24872
24987
|
}));
|
|
24873
24988
|
|
|
24874
24989
|
return function (_x4) {
|
|
@@ -24878,10 +24993,10 @@ function _addGood$2() {
|
|
|
24878
24993
|
|
|
24879
24994
|
case 6:
|
|
24880
24995
|
case "end":
|
|
24881
|
-
return
|
|
24996
|
+
return _context4.stop();
|
|
24882
24997
|
}
|
|
24883
24998
|
}
|
|
24884
|
-
},
|
|
24999
|
+
}, _callee4);
|
|
24885
25000
|
}));
|
|
24886
25001
|
return _addGood$2.apply(this, arguments);
|
|
24887
25002
|
}
|
|
@@ -24891,34 +25006,34 @@ function rollBottom$2(_x2, _x3) {
|
|
|
24891
25006
|
}
|
|
24892
25007
|
|
|
24893
25008
|
function _rollBottom$2() {
|
|
24894
|
-
_rollBottom$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
25009
|
+
_rollBottom$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
|
|
24895
25010
|
var cont;
|
|
24896
|
-
return _regeneratorRuntime().wrap(function
|
|
25011
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
24897
25012
|
while (1) {
|
|
24898
|
-
switch (
|
|
25013
|
+
switch (_context5.prev = _context5.next) {
|
|
24899
25014
|
case 0:
|
|
24900
|
-
|
|
25015
|
+
_context5.next = 2;
|
|
24901
25016
|
return controller.wait();
|
|
24902
25017
|
|
|
24903
25018
|
case 2:
|
|
24904
25019
|
cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
|
|
24905
25020
|
|
|
24906
25021
|
if (cont) {
|
|
24907
|
-
|
|
25022
|
+
_context5.next = 5;
|
|
24908
25023
|
break;
|
|
24909
25024
|
}
|
|
24910
25025
|
|
|
24911
|
-
return
|
|
25026
|
+
return _context5.abrupt("return");
|
|
24912
25027
|
|
|
24913
25028
|
case 5:
|
|
24914
25029
|
cont.scrollTop = cont.scrollHeight;
|
|
24915
25030
|
|
|
24916
25031
|
case 6:
|
|
24917
25032
|
case "end":
|
|
24918
|
-
return
|
|
25033
|
+
return _context5.stop();
|
|
24919
25034
|
}
|
|
24920
25035
|
}
|
|
24921
|
-
},
|
|
25036
|
+
}, _callee5);
|
|
24922
25037
|
}));
|
|
24923
25038
|
return _rollBottom$2.apply(this, arguments);
|
|
24924
25039
|
}
|
|
@@ -27650,6 +27765,11 @@ function AddComparisonDrawer() {
|
|
|
27650
27765
|
// })
|
|
27651
27766
|
// }
|
|
27652
27767
|
|
|
27768
|
+
var config = {
|
|
27769
|
+
number: 'BigNumber',
|
|
27770
|
+
precision: 64
|
|
27771
|
+
};
|
|
27772
|
+
mathjs.create(mathjs.all, config);
|
|
27653
27773
|
/** 发票组件的上下文 */
|
|
27654
27774
|
|
|
27655
27775
|
var InvoiceContext = /*#__PURE__*/React__default['default'].createContext(undefined);
|