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.esm.js
CHANGED
|
@@ -19133,53 +19133,82 @@ function addGood$2(_x) {
|
|
|
19133
19133
|
|
|
19134
19134
|
|
|
19135
19135
|
function _addGood$1() {
|
|
19136
|
-
_addGood$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
19137
|
-
return _regeneratorRuntime().wrap(function
|
|
19136
|
+
_addGood$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
|
|
19137
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
19138
19138
|
while (1) {
|
|
19139
|
-
switch (
|
|
19139
|
+
switch (_context4.prev = _context4.next) {
|
|
19140
19140
|
case 0:
|
|
19141
|
-
|
|
19141
|
+
_context4.next = 2;
|
|
19142
19142
|
return controller.saveEditGood();
|
|
19143
19143
|
|
|
19144
19144
|
case 2:
|
|
19145
|
-
|
|
19145
|
+
_context4.next = 4;
|
|
19146
19146
|
return controller.wait();
|
|
19147
19147
|
|
|
19148
19148
|
case 4:
|
|
19149
|
-
|
|
19149
|
+
_context4.next = 6;
|
|
19150
19150
|
return controller.run( /*#__PURE__*/function () {
|
|
19151
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
19152
|
-
|
|
19151
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
19152
|
+
var _controller$state$goo;
|
|
19153
|
+
|
|
19154
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
19153
19155
|
while (1) {
|
|
19154
|
-
switch (
|
|
19156
|
+
switch (_context3.prev = _context3.next) {
|
|
19155
19157
|
case 0:
|
|
19156
19158
|
if (!s.goodsListState.editGood) {
|
|
19157
|
-
|
|
19159
|
+
_context3.next = 3;
|
|
19158
19160
|
break;
|
|
19159
19161
|
}
|
|
19160
19162
|
|
|
19161
|
-
|
|
19162
|
-
|
|
19163
|
-
|
|
19164
|
-
|
|
19165
|
-
|
|
19163
|
+
_context3.next = 3;
|
|
19164
|
+
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
19165
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
19166
|
+
var firstError;
|
|
19167
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
19168
|
+
while (1) {
|
|
19169
|
+
switch (_context2.prev = _context2.next) {
|
|
19170
|
+
case 0:
|
|
19171
|
+
if (!err) {
|
|
19172
|
+
_context2.next = 4;
|
|
19173
|
+
break;
|
|
19174
|
+
}
|
|
19175
|
+
|
|
19176
|
+
firstError = Object.values(err)[0];
|
|
19177
|
+
message$1.error({
|
|
19178
|
+
content: firstError.errors[0].message,
|
|
19179
|
+
key: '你正在编辑一个货物'
|
|
19180
|
+
});
|
|
19181
|
+
return _context2.abrupt("return");
|
|
19182
|
+
|
|
19183
|
+
case 4:
|
|
19184
|
+
case "end":
|
|
19185
|
+
return _context2.stop();
|
|
19186
|
+
}
|
|
19187
|
+
}
|
|
19188
|
+
}, _callee2);
|
|
19189
|
+
}));
|
|
19190
|
+
|
|
19191
|
+
return function (_x5, _x6) {
|
|
19192
|
+
return _ref3.apply(this, arguments);
|
|
19193
|
+
};
|
|
19194
|
+
}());
|
|
19166
19195
|
|
|
19167
19196
|
case 3:
|
|
19168
|
-
|
|
19197
|
+
_context3.next = 5;
|
|
19169
19198
|
return controller.addGood({
|
|
19170
19199
|
taxRate: s.goodsListState.defaultRate,
|
|
19171
19200
|
lineAttribute: LineAttributeType$1.正常
|
|
19172
19201
|
});
|
|
19173
19202
|
|
|
19174
19203
|
case 5:
|
|
19175
|
-
s.goodsListState.editGood =
|
|
19204
|
+
s.goodsListState.editGood = _context3.sent;
|
|
19176
19205
|
|
|
19177
19206
|
case 6:
|
|
19178
19207
|
case "end":
|
|
19179
|
-
return
|
|
19208
|
+
return _context3.stop();
|
|
19180
19209
|
}
|
|
19181
19210
|
}
|
|
19182
|
-
},
|
|
19211
|
+
}, _callee3);
|
|
19183
19212
|
}));
|
|
19184
19213
|
|
|
19185
19214
|
return function (_x4) {
|
|
@@ -19189,10 +19218,10 @@ function _addGood$1() {
|
|
|
19189
19218
|
|
|
19190
19219
|
case 6:
|
|
19191
19220
|
case "end":
|
|
19192
|
-
return
|
|
19221
|
+
return _context4.stop();
|
|
19193
19222
|
}
|
|
19194
19223
|
}
|
|
19195
|
-
},
|
|
19224
|
+
}, _callee4);
|
|
19196
19225
|
}));
|
|
19197
19226
|
return _addGood$1.apply(this, arguments);
|
|
19198
19227
|
}
|
|
@@ -19202,34 +19231,34 @@ function rollBottom$1(_x2, _x3) {
|
|
|
19202
19231
|
}
|
|
19203
19232
|
|
|
19204
19233
|
function _rollBottom$1() {
|
|
19205
|
-
_rollBottom$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
19234
|
+
_rollBottom$1 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
|
|
19206
19235
|
var cont;
|
|
19207
|
-
return _regeneratorRuntime().wrap(function
|
|
19236
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
19208
19237
|
while (1) {
|
|
19209
|
-
switch (
|
|
19238
|
+
switch (_context5.prev = _context5.next) {
|
|
19210
19239
|
case 0:
|
|
19211
|
-
|
|
19240
|
+
_context5.next = 2;
|
|
19212
19241
|
return controller.wait();
|
|
19213
19242
|
|
|
19214
19243
|
case 2:
|
|
19215
19244
|
cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
|
|
19216
19245
|
|
|
19217
19246
|
if (cont) {
|
|
19218
|
-
|
|
19247
|
+
_context5.next = 5;
|
|
19219
19248
|
break;
|
|
19220
19249
|
}
|
|
19221
19250
|
|
|
19222
|
-
return
|
|
19251
|
+
return _context5.abrupt("return");
|
|
19223
19252
|
|
|
19224
19253
|
case 5:
|
|
19225
19254
|
cont.scrollTop = cont.scrollHeight;
|
|
19226
19255
|
|
|
19227
19256
|
case 6:
|
|
19228
19257
|
case "end":
|
|
19229
|
-
return
|
|
19258
|
+
return _context5.stop();
|
|
19230
19259
|
}
|
|
19231
19260
|
}
|
|
19232
|
-
},
|
|
19261
|
+
}, _callee5);
|
|
19233
19262
|
}));
|
|
19234
19263
|
return _rollBottom$1.apply(this, arguments);
|
|
19235
19264
|
}
|
|
@@ -19359,7 +19388,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19359
19388
|
|
|
19360
19389
|
case 11:
|
|
19361
19390
|
calculatingDigits = controller.state.calculatingDigits;
|
|
19362
|
-
quantity =
|
|
19391
|
+
quantity = values.quantity;
|
|
19363
19392
|
_context3.next = 16;
|
|
19364
19393
|
return controller.setEditGood({
|
|
19365
19394
|
quantity: quantity
|
|
@@ -19381,7 +19410,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19381
19410
|
}
|
|
19382
19411
|
|
|
19383
19412
|
// 可以找到 单价(含税)
|
|
19384
|
-
priceIncludeTax =
|
|
19413
|
+
priceIncludeTax = values.priceIncludeTax;
|
|
19385
19414
|
lineAmountIncludeTax = format2(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)));
|
|
19386
19415
|
form.setFieldsValue({
|
|
19387
19416
|
lineAmountIncludeTax: lineAmountIncludeTax
|
|
@@ -19403,7 +19432,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19403
19432
|
|
|
19404
19433
|
// 可以找到 金额(含税)
|
|
19405
19434
|
_lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
|
|
19406
|
-
_priceIncludeTax =
|
|
19435
|
+
_priceIncludeTax = evaluate("".concat(_lineAmountIncludeTax, " / ").concat(quantity));
|
|
19407
19436
|
form.setFieldsValue({
|
|
19408
19437
|
priceIncludeTax: _priceIncludeTax
|
|
19409
19438
|
});
|
|
@@ -19427,7 +19456,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19427
19456
|
}
|
|
19428
19457
|
|
|
19429
19458
|
// 可以找到 单价(不含税)
|
|
19430
|
-
priceExcludeTax =
|
|
19459
|
+
priceExcludeTax = values.priceExcludeTax;
|
|
19431
19460
|
lineAmountExcludeTax = format2(evaluate("".concat(quantity, " * ").concat(priceExcludeTax)));
|
|
19432
19461
|
form.setFieldsValue({
|
|
19433
19462
|
lineAmountExcludeTax: lineAmountExcludeTax
|
|
@@ -19450,7 +19479,7 @@ var onChangeQuantity$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19450
19479
|
|
|
19451
19480
|
// 可以找到 金额(不含税)
|
|
19452
19481
|
_lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
|
|
19453
|
-
_priceExcludeTax =
|
|
19482
|
+
_priceExcludeTax = evaluate("".concat(_lineAmountExcludeTax, " / ").concat(quantity));
|
|
19454
19483
|
form.setFieldsValue({
|
|
19455
19484
|
priceExcludeTax: _priceExcludeTax
|
|
19456
19485
|
});
|
|
@@ -19526,7 +19555,7 @@ var onChangePriceIncludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19526
19555
|
|
|
19527
19556
|
case 11:
|
|
19528
19557
|
calculatingDigits = controller.state.calculatingDigits;
|
|
19529
|
-
priceIncludeTax =
|
|
19558
|
+
priceIncludeTax = values.priceIncludeTax;
|
|
19530
19559
|
_context4.next = 15;
|
|
19531
19560
|
return controller.setEditGood({
|
|
19532
19561
|
priceIncludeTax: priceIncludeTax
|
|
@@ -19542,7 +19571,7 @@ var onChangePriceIncludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19542
19571
|
break;
|
|
19543
19572
|
}
|
|
19544
19573
|
|
|
19545
|
-
quantity =
|
|
19574
|
+
quantity = values.quantity;
|
|
19546
19575
|
lineAmountIncludeTax = format2(evaluate("".concat(quantity, " * ").concat(priceIncludeTax)));
|
|
19547
19576
|
form.setFieldsValue({
|
|
19548
19577
|
lineAmountIncludeTax: lineAmountIncludeTax
|
|
@@ -19563,7 +19592,7 @@ var onChangePriceIncludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19563
19592
|
}
|
|
19564
19593
|
|
|
19565
19594
|
_lineAmountIncludeTax2 = format2(values.lineAmountIncludeTax);
|
|
19566
|
-
_quantity =
|
|
19595
|
+
_quantity = evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(priceIncludeTax));
|
|
19567
19596
|
form.setFieldsValue({
|
|
19568
19597
|
quantity: _quantity
|
|
19569
19598
|
});
|
|
@@ -19638,7 +19667,7 @@ var onChangePriceExcludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19638
19667
|
|
|
19639
19668
|
case 11:
|
|
19640
19669
|
calculatingDigits = controller.state.calculatingDigits;
|
|
19641
|
-
priceExcludeTax =
|
|
19670
|
+
priceExcludeTax = values.priceExcludeTax;
|
|
19642
19671
|
_context5.next = 15;
|
|
19643
19672
|
return controller.setEditGood({
|
|
19644
19673
|
priceExcludeTax: priceExcludeTax
|
|
@@ -19654,7 +19683,7 @@ var onChangePriceExcludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19654
19683
|
break;
|
|
19655
19684
|
}
|
|
19656
19685
|
|
|
19657
|
-
quantity =
|
|
19686
|
+
quantity = values.quantity;
|
|
19658
19687
|
lineAmountExcludeTax = format2(evaluate("".concat(quantity, " * ").concat(priceExcludeTax)));
|
|
19659
19688
|
form.setFieldsValue({
|
|
19660
19689
|
lineAmountExcludeTax: lineAmountExcludeTax
|
|
@@ -19675,7 +19704,7 @@ var onChangePriceExcludeTax$1 = lazyFn$2(function (controller, form, record) {
|
|
|
19675
19704
|
}
|
|
19676
19705
|
|
|
19677
19706
|
_lineAmountExcludeTax2 = format2(values.lineAmountExcludeTax);
|
|
19678
|
-
_quantity2 =
|
|
19707
|
+
_quantity2 = evaluate("".concat(_lineAmountExcludeTax2, " / ").concat(priceExcludeTax));
|
|
19679
19708
|
form.setFieldsValue({
|
|
19680
19709
|
quantity: _quantity2
|
|
19681
19710
|
});
|
|
@@ -20360,14 +20389,14 @@ var onChangeItemName$1 = /*#__PURE__*/function () {
|
|
|
20360
20389
|
/** 修改了含税开关 重新计算 */
|
|
20361
20390
|
|
|
20362
20391
|
var onChangeSwitchTax$1 = /*#__PURE__*/function () {
|
|
20363
|
-
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
20392
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(controller, isTaxIncluded) {
|
|
20364
20393
|
var calculatingDigits;
|
|
20365
|
-
return _regeneratorRuntime().wrap(function
|
|
20394
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
20366
20395
|
while (1) {
|
|
20367
|
-
switch (
|
|
20396
|
+
switch (_context22.prev = _context22.next) {
|
|
20368
20397
|
case 0:
|
|
20369
20398
|
if (controller.state.goodsListState.isRecalculateWhenSwitchTax) {
|
|
20370
|
-
|
|
20399
|
+
_context22.next = 3;
|
|
20371
20400
|
break;
|
|
20372
20401
|
}
|
|
20373
20402
|
|
|
@@ -20393,37 +20422,64 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
|
|
|
20393
20422
|
return _ref20.apply(this, arguments);
|
|
20394
20423
|
};
|
|
20395
20424
|
}())();
|
|
20396
|
-
return
|
|
20425
|
+
return _context22.abrupt("return");
|
|
20397
20426
|
|
|
20398
20427
|
case 3:
|
|
20399
20428
|
calculatingDigits = controller.state.calculatingDigits;
|
|
20400
|
-
|
|
20429
|
+
_context22.next = 6;
|
|
20401
20430
|
return controller.saveEditGood();
|
|
20402
20431
|
|
|
20403
20432
|
case 6:
|
|
20404
|
-
|
|
20433
|
+
_context22.next = 8;
|
|
20405
20434
|
return controller.wait();
|
|
20406
20435
|
|
|
20407
20436
|
case 8:
|
|
20408
|
-
|
|
20437
|
+
_context22.next = 10;
|
|
20409
20438
|
return controller.run( /*#__PURE__*/function () {
|
|
20410
|
-
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
20411
|
-
var _s$goodsListState, needRefresh, newGoodsList;
|
|
20439
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(s) {
|
|
20440
|
+
var _controller$state$goo, _s$goodsListState, needRefresh, newGoodsList;
|
|
20412
20441
|
|
|
20413
|
-
return _regeneratorRuntime().wrap(function
|
|
20442
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
20414
20443
|
while (1) {
|
|
20415
|
-
switch (
|
|
20444
|
+
switch (_context21.prev = _context21.next) {
|
|
20416
20445
|
case 0:
|
|
20417
20446
|
if (!s.goodsListState.editGood) {
|
|
20418
|
-
|
|
20447
|
+
_context21.next = 3;
|
|
20419
20448
|
break;
|
|
20420
20449
|
}
|
|
20421
20450
|
|
|
20422
|
-
|
|
20423
|
-
|
|
20424
|
-
|
|
20425
|
-
|
|
20426
|
-
|
|
20451
|
+
_context21.next = 3;
|
|
20452
|
+
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
20453
|
+
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(err, values) {
|
|
20454
|
+
var firstError;
|
|
20455
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
20456
|
+
while (1) {
|
|
20457
|
+
switch (_context20.prev = _context20.next) {
|
|
20458
|
+
case 0:
|
|
20459
|
+
if (!err) {
|
|
20460
|
+
_context20.next = 4;
|
|
20461
|
+
break;
|
|
20462
|
+
}
|
|
20463
|
+
|
|
20464
|
+
firstError = Object.values(err)[0];
|
|
20465
|
+
message.error({
|
|
20466
|
+
content: firstError.errors[0].message,
|
|
20467
|
+
key: '你正在编辑一个货物'
|
|
20468
|
+
});
|
|
20469
|
+
return _context20.abrupt("return");
|
|
20470
|
+
|
|
20471
|
+
case 4:
|
|
20472
|
+
case "end":
|
|
20473
|
+
return _context20.stop();
|
|
20474
|
+
}
|
|
20475
|
+
}
|
|
20476
|
+
}, _callee20);
|
|
20477
|
+
}));
|
|
20478
|
+
|
|
20479
|
+
return function (_x40, _x41) {
|
|
20480
|
+
return _ref22.apply(this, arguments);
|
|
20481
|
+
};
|
|
20482
|
+
}());
|
|
20427
20483
|
|
|
20428
20484
|
case 3:
|
|
20429
20485
|
s.goodsListState.isTaxIncluded = isTaxIncluded;
|
|
@@ -20505,10 +20561,10 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
|
|
|
20505
20561
|
|
|
20506
20562
|
case 5:
|
|
20507
20563
|
case "end":
|
|
20508
|
-
return
|
|
20564
|
+
return _context21.stop();
|
|
20509
20565
|
}
|
|
20510
20566
|
}
|
|
20511
|
-
},
|
|
20567
|
+
}, _callee21);
|
|
20512
20568
|
}));
|
|
20513
20569
|
|
|
20514
20570
|
return function (_x39) {
|
|
@@ -20518,10 +20574,10 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
|
|
|
20518
20574
|
|
|
20519
20575
|
case 10:
|
|
20520
20576
|
case "end":
|
|
20521
|
-
return
|
|
20577
|
+
return _context22.stop();
|
|
20522
20578
|
}
|
|
20523
20579
|
}
|
|
20524
|
-
},
|
|
20580
|
+
}, _callee22);
|
|
20525
20581
|
}));
|
|
20526
20582
|
|
|
20527
20583
|
return function onChangeSwitchTax(_x36, _x37) {
|
|
@@ -20608,56 +20664,85 @@ function Search$1() {
|
|
|
20608
20664
|
var isTaxIncluded = controller.useMemo(function (s) {
|
|
20609
20665
|
return s.goodsListState.isTaxIncluded;
|
|
20610
20666
|
}, []);
|
|
20611
|
-
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
20612
|
-
|
|
20667
|
+
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
20668
|
+
var _controller$state$goo;
|
|
20669
|
+
|
|
20670
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
20613
20671
|
while (1) {
|
|
20614
|
-
switch (
|
|
20672
|
+
switch (_context2.prev = _context2.next) {
|
|
20615
20673
|
case 0:
|
|
20616
|
-
|
|
20674
|
+
_context2.next = 2;
|
|
20617
20675
|
return controller.saveEditGood();
|
|
20618
20676
|
|
|
20619
20677
|
case 2:
|
|
20620
|
-
|
|
20678
|
+
_context2.next = 4;
|
|
20621
20679
|
return controller.wait();
|
|
20622
20680
|
|
|
20623
20681
|
case 4:
|
|
20624
20682
|
if (!controller.state.goodsListState.editGood) {
|
|
20625
|
-
|
|
20683
|
+
_context2.next = 7;
|
|
20626
20684
|
break;
|
|
20627
20685
|
}
|
|
20628
20686
|
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20687
|
+
_context2.next = 7;
|
|
20688
|
+
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
20689
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(err, values) {
|
|
20690
|
+
var firstError;
|
|
20691
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
20692
|
+
while (1) {
|
|
20693
|
+
switch (_context.prev = _context.next) {
|
|
20694
|
+
case 0:
|
|
20695
|
+
if (!err) {
|
|
20696
|
+
_context.next = 4;
|
|
20697
|
+
break;
|
|
20698
|
+
}
|
|
20699
|
+
|
|
20700
|
+
firstError = Object.values(err)[0];
|
|
20701
|
+
message$1.error({
|
|
20702
|
+
content: firstError.errors[0].message,
|
|
20703
|
+
key: '你正在编辑一个货物'
|
|
20704
|
+
});
|
|
20705
|
+
return _context.abrupt("return");
|
|
20706
|
+
|
|
20707
|
+
case 4:
|
|
20708
|
+
case "end":
|
|
20709
|
+
return _context.stop();
|
|
20710
|
+
}
|
|
20711
|
+
}
|
|
20712
|
+
}, _callee);
|
|
20713
|
+
}));
|
|
20714
|
+
|
|
20715
|
+
return function (_x, _x2) {
|
|
20716
|
+
return _ref2.apply(this, arguments);
|
|
20717
|
+
};
|
|
20718
|
+
}());
|
|
20634
20719
|
|
|
20635
20720
|
case 7:
|
|
20636
20721
|
case "end":
|
|
20637
|
-
return
|
|
20722
|
+
return _context2.stop();
|
|
20638
20723
|
}
|
|
20639
20724
|
}
|
|
20640
|
-
},
|
|
20725
|
+
}, _callee2);
|
|
20641
20726
|
})), []);
|
|
20642
20727
|
React.useEffect(function () {
|
|
20643
20728
|
controller.run( /*#__PURE__*/function () {
|
|
20644
|
-
var
|
|
20645
|
-
return _regeneratorRuntime().wrap(function
|
|
20729
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
20730
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
20646
20731
|
while (1) {
|
|
20647
|
-
switch (
|
|
20732
|
+
switch (_context3.prev = _context3.next) {
|
|
20648
20733
|
case 0:
|
|
20649
20734
|
s.goodsListState.searchValue = value.trim();
|
|
20650
20735
|
|
|
20651
20736
|
case 1:
|
|
20652
20737
|
case "end":
|
|
20653
|
-
return
|
|
20738
|
+
return _context3.stop();
|
|
20654
20739
|
}
|
|
20655
20740
|
}
|
|
20656
|
-
},
|
|
20741
|
+
}, _callee3);
|
|
20657
20742
|
}));
|
|
20658
20743
|
|
|
20659
|
-
return function (
|
|
20660
|
-
return
|
|
20744
|
+
return function (_x3) {
|
|
20745
|
+
return _ref3.apply(this, arguments);
|
|
20661
20746
|
};
|
|
20662
20747
|
}());
|
|
20663
20748
|
}, [value, controller]);
|
|
@@ -21977,7 +22062,7 @@ var useColumns$1 = (function (form) {
|
|
|
21977
22062
|
message: '金额不能为空'
|
|
21978
22063
|
}, {
|
|
21979
22064
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
21980
|
-
message: '
|
|
22065
|
+
message: '金额错误,请重新输入'
|
|
21981
22066
|
}, {
|
|
21982
22067
|
validator: function () {
|
|
21983
22068
|
var _validator5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
|
|
@@ -22033,6 +22118,7 @@ var useColumns$1 = (function (form) {
|
|
|
22033
22118
|
style: {
|
|
22034
22119
|
textAlign: 'right'
|
|
22035
22120
|
},
|
|
22121
|
+
max: 99999999999999999999,
|
|
22036
22122
|
loading: isCipher$1(changeField, 'lineAmountIncludeTax'),
|
|
22037
22123
|
onChange: function onChange() {
|
|
22038
22124
|
setChangeField('lineAmountIncludeTax');
|
|
@@ -22065,7 +22151,7 @@ var useColumns$1 = (function (form) {
|
|
|
22065
22151
|
message: '金额不能为空'
|
|
22066
22152
|
}, {
|
|
22067
22153
|
pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
|
|
22068
|
-
message: '
|
|
22154
|
+
message: '金额错误,请重新输入'
|
|
22069
22155
|
}, {
|
|
22070
22156
|
validator: function () {
|
|
22071
22157
|
var _validator7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(_, value, callback) {
|
|
@@ -24815,50 +24901,79 @@ function addGood$3(_x) {
|
|
|
24815
24901
|
|
|
24816
24902
|
|
|
24817
24903
|
function _addGood$2() {
|
|
24818
|
-
_addGood$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24819
|
-
return _regeneratorRuntime().wrap(function
|
|
24904
|
+
_addGood$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(controller) {
|
|
24905
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
24820
24906
|
while (1) {
|
|
24821
|
-
switch (
|
|
24907
|
+
switch (_context4.prev = _context4.next) {
|
|
24822
24908
|
case 0:
|
|
24823
|
-
|
|
24909
|
+
_context4.next = 2;
|
|
24824
24910
|
return controller.saveEditFreight();
|
|
24825
24911
|
|
|
24826
24912
|
case 2:
|
|
24827
|
-
|
|
24913
|
+
_context4.next = 4;
|
|
24828
24914
|
return controller.wait();
|
|
24829
24915
|
|
|
24830
24916
|
case 4:
|
|
24831
|
-
|
|
24917
|
+
_context4.next = 6;
|
|
24832
24918
|
return controller.run( /*#__PURE__*/function () {
|
|
24833
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24834
|
-
|
|
24919
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(s) {
|
|
24920
|
+
var _controller$state$goo;
|
|
24921
|
+
|
|
24922
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
24835
24923
|
while (1) {
|
|
24836
|
-
switch (
|
|
24924
|
+
switch (_context3.prev = _context3.next) {
|
|
24837
24925
|
case 0:
|
|
24838
24926
|
if (!s.freightListState.editGood) {
|
|
24839
|
-
|
|
24927
|
+
_context3.next = 3;
|
|
24840
24928
|
break;
|
|
24841
24929
|
}
|
|
24842
24930
|
|
|
24843
|
-
|
|
24844
|
-
|
|
24845
|
-
|
|
24846
|
-
|
|
24847
|
-
|
|
24931
|
+
_context3.next = 3;
|
|
24932
|
+
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
24933
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(err, values) {
|
|
24934
|
+
var firstError;
|
|
24935
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
24936
|
+
while (1) {
|
|
24937
|
+
switch (_context2.prev = _context2.next) {
|
|
24938
|
+
case 0:
|
|
24939
|
+
if (!err) {
|
|
24940
|
+
_context2.next = 4;
|
|
24941
|
+
break;
|
|
24942
|
+
}
|
|
24943
|
+
|
|
24944
|
+
firstError = Object.values(err)[0];
|
|
24945
|
+
message$1.error({
|
|
24946
|
+
content: firstError.errors[0].message,
|
|
24947
|
+
key: '你正在编辑一个货物'
|
|
24948
|
+
});
|
|
24949
|
+
return _context2.abrupt("return");
|
|
24950
|
+
|
|
24951
|
+
case 4:
|
|
24952
|
+
case "end":
|
|
24953
|
+
return _context2.stop();
|
|
24954
|
+
}
|
|
24955
|
+
}
|
|
24956
|
+
}, _callee2);
|
|
24957
|
+
}));
|
|
24958
|
+
|
|
24959
|
+
return function (_x5, _x6) {
|
|
24960
|
+
return _ref3.apply(this, arguments);
|
|
24961
|
+
};
|
|
24962
|
+
}());
|
|
24848
24963
|
|
|
24849
24964
|
case 3:
|
|
24850
|
-
|
|
24965
|
+
_context3.next = 5;
|
|
24851
24966
|
return controller.addFreight({});
|
|
24852
24967
|
|
|
24853
24968
|
case 5:
|
|
24854
|
-
s.freightListState.editGood =
|
|
24969
|
+
s.freightListState.editGood = _context3.sent;
|
|
24855
24970
|
|
|
24856
24971
|
case 6:
|
|
24857
24972
|
case "end":
|
|
24858
|
-
return
|
|
24973
|
+
return _context3.stop();
|
|
24859
24974
|
}
|
|
24860
24975
|
}
|
|
24861
|
-
},
|
|
24976
|
+
}, _callee3);
|
|
24862
24977
|
}));
|
|
24863
24978
|
|
|
24864
24979
|
return function (_x4) {
|
|
@@ -24868,10 +24983,10 @@ function _addGood$2() {
|
|
|
24868
24983
|
|
|
24869
24984
|
case 6:
|
|
24870
24985
|
case "end":
|
|
24871
|
-
return
|
|
24986
|
+
return _context4.stop();
|
|
24872
24987
|
}
|
|
24873
24988
|
}
|
|
24874
|
-
},
|
|
24989
|
+
}, _callee4);
|
|
24875
24990
|
}));
|
|
24876
24991
|
return _addGood$2.apply(this, arguments);
|
|
24877
24992
|
}
|
|
@@ -24881,34 +24996,34 @@ function rollBottom$2(_x2, _x3) {
|
|
|
24881
24996
|
}
|
|
24882
24997
|
|
|
24883
24998
|
function _rollBottom$2() {
|
|
24884
|
-
_rollBottom$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
24999
|
+
_rollBottom$2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(controller, rootElement) {
|
|
24885
25000
|
var cont;
|
|
24886
|
-
return _regeneratorRuntime().wrap(function
|
|
25001
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
24887
25002
|
while (1) {
|
|
24888
|
-
switch (
|
|
25003
|
+
switch (_context5.prev = _context5.next) {
|
|
24889
25004
|
case 0:
|
|
24890
|
-
|
|
25005
|
+
_context5.next = 2;
|
|
24891
25006
|
return controller.wait();
|
|
24892
25007
|
|
|
24893
25008
|
case 2:
|
|
24894
25009
|
cont = rootElement === null || rootElement === void 0 ? void 0 : rootElement.querySelector('.ktsAntX-table-body');
|
|
24895
25010
|
|
|
24896
25011
|
if (cont) {
|
|
24897
|
-
|
|
25012
|
+
_context5.next = 5;
|
|
24898
25013
|
break;
|
|
24899
25014
|
}
|
|
24900
25015
|
|
|
24901
|
-
return
|
|
25016
|
+
return _context5.abrupt("return");
|
|
24902
25017
|
|
|
24903
25018
|
case 5:
|
|
24904
25019
|
cont.scrollTop = cont.scrollHeight;
|
|
24905
25020
|
|
|
24906
25021
|
case 6:
|
|
24907
25022
|
case "end":
|
|
24908
|
-
return
|
|
25023
|
+
return _context5.stop();
|
|
24909
25024
|
}
|
|
24910
25025
|
}
|
|
24911
|
-
},
|
|
25026
|
+
}, _callee5);
|
|
24912
25027
|
}));
|
|
24913
25028
|
return _rollBottom$2.apply(this, arguments);
|
|
24914
25029
|
}
|
|
@@ -27640,6 +27755,11 @@ function AddComparisonDrawer() {
|
|
|
27640
27755
|
// })
|
|
27641
27756
|
// }
|
|
27642
27757
|
|
|
27758
|
+
var config = {
|
|
27759
|
+
number: 'BigNumber',
|
|
27760
|
+
precision: 64
|
|
27761
|
+
};
|
|
27762
|
+
create(all, config);
|
|
27643
27763
|
/** 发票组件的上下文 */
|
|
27644
27764
|
|
|
27645
27765
|
var InvoiceContext = /*#__PURE__*/React.createContext(undefined);
|