kts-component-invoice-operate 3.2.220 → 3.2.221
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
CHANGED
|
@@ -19224,18 +19224,30 @@ function _addGood$1() {
|
|
|
19224
19224
|
_context5.next = 8;
|
|
19225
19225
|
return controller.run( /*#__PURE__*/function () {
|
|
19226
19226
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
19227
|
-
var _controller$state$goo;
|
|
19227
|
+
var isValidateGood, _controller$state$goo;
|
|
19228
19228
|
|
|
19229
19229
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
19230
19230
|
while (1) {
|
|
19231
19231
|
switch (_context4.prev = _context4.next) {
|
|
19232
19232
|
case 0:
|
|
19233
19233
|
if (!s.goodsListState.editGood) {
|
|
19234
|
-
_context4.next =
|
|
19234
|
+
_context4.next = 5;
|
|
19235
19235
|
break;
|
|
19236
19236
|
}
|
|
19237
19237
|
|
|
19238
|
-
|
|
19238
|
+
// message.error({
|
|
19239
|
+
// content: '你正在编辑一个货物',
|
|
19240
|
+
// key: '你正在编辑一个货物',
|
|
19241
|
+
// });
|
|
19242
|
+
// return;
|
|
19243
|
+
isValidateGood = controller.state.goodsListState.isValidateGood;
|
|
19244
|
+
|
|
19245
|
+
if (!isValidateGood) {
|
|
19246
|
+
_context4.next = 5;
|
|
19247
|
+
break;
|
|
19248
|
+
}
|
|
19249
|
+
|
|
19250
|
+
_context4.next = 5;
|
|
19239
19251
|
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
19240
19252
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err, values) {
|
|
19241
19253
|
var firstError;
|
|
@@ -19268,17 +19280,17 @@ function _addGood$1() {
|
|
|
19268
19280
|
};
|
|
19269
19281
|
}());
|
|
19270
19282
|
|
|
19271
|
-
case
|
|
19272
|
-
_context4.next =
|
|
19283
|
+
case 5:
|
|
19284
|
+
_context4.next = 7;
|
|
19273
19285
|
return controller.addGood({
|
|
19274
19286
|
taxRate: s.goodsListState.defaultRate,
|
|
19275
19287
|
lineAttribute: LineAttributeType$1.正常
|
|
19276
19288
|
});
|
|
19277
19289
|
|
|
19278
|
-
case
|
|
19290
|
+
case 7:
|
|
19279
19291
|
s.goodsListState.editGood = _context4.sent;
|
|
19280
19292
|
|
|
19281
|
-
case
|
|
19293
|
+
case 8:
|
|
19282
19294
|
case "end":
|
|
19283
19295
|
return _context4.stop();
|
|
19284
19296
|
}
|
package/dist/index.js
CHANGED
|
@@ -19234,18 +19234,30 @@ function _addGood$1() {
|
|
|
19234
19234
|
_context5.next = 8;
|
|
19235
19235
|
return controller.run( /*#__PURE__*/function () {
|
|
19236
19236
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(s) {
|
|
19237
|
-
var _controller$state$goo;
|
|
19237
|
+
var isValidateGood, _controller$state$goo;
|
|
19238
19238
|
|
|
19239
19239
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
19240
19240
|
while (1) {
|
|
19241
19241
|
switch (_context4.prev = _context4.next) {
|
|
19242
19242
|
case 0:
|
|
19243
19243
|
if (!s.goodsListState.editGood) {
|
|
19244
|
-
_context4.next =
|
|
19244
|
+
_context4.next = 5;
|
|
19245
19245
|
break;
|
|
19246
19246
|
}
|
|
19247
19247
|
|
|
19248
|
-
|
|
19248
|
+
// message.error({
|
|
19249
|
+
// content: '你正在编辑一个货物',
|
|
19250
|
+
// key: '你正在编辑一个货物',
|
|
19251
|
+
// });
|
|
19252
|
+
// return;
|
|
19253
|
+
isValidateGood = controller.state.goodsListState.isValidateGood;
|
|
19254
|
+
|
|
19255
|
+
if (!isValidateGood) {
|
|
19256
|
+
_context4.next = 5;
|
|
19257
|
+
break;
|
|
19258
|
+
}
|
|
19259
|
+
|
|
19260
|
+
_context4.next = 5;
|
|
19249
19261
|
return (_controller$state$goo = controller.state.goodsListState.form) === null || _controller$state$goo === void 0 ? void 0 : _controller$state$goo.validateFields( /*#__PURE__*/function () {
|
|
19250
19262
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err, values) {
|
|
19251
19263
|
var firstError;
|
|
@@ -19278,17 +19290,17 @@ function _addGood$1() {
|
|
|
19278
19290
|
};
|
|
19279
19291
|
}());
|
|
19280
19292
|
|
|
19281
|
-
case
|
|
19282
|
-
_context4.next =
|
|
19293
|
+
case 5:
|
|
19294
|
+
_context4.next = 7;
|
|
19283
19295
|
return controller.addGood({
|
|
19284
19296
|
taxRate: s.goodsListState.defaultRate,
|
|
19285
19297
|
lineAttribute: LineAttributeType$1.正常
|
|
19286
19298
|
});
|
|
19287
19299
|
|
|
19288
|
-
case
|
|
19300
|
+
case 7:
|
|
19289
19301
|
s.goodsListState.editGood = _context4.sent;
|
|
19290
19302
|
|
|
19291
|
-
case
|
|
19303
|
+
case 8:
|
|
19292
19304
|
case "end":
|
|
19293
19305
|
return _context4.stop();
|
|
19294
19306
|
}
|
package/package.json
CHANGED
|
@@ -468,7 +468,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
468
468
|
key: 'taxRate',
|
|
469
469
|
align: 'right',
|
|
470
470
|
width: 70,
|
|
471
|
-
render: (value: string, record: IGood) => {
|
|
471
|
+
render: (value: string|number, record: IGood) => {
|
|
472
472
|
if (editGood?.$index === record.$index && !disableds.includes('taxRate') && !(model === 'prefab' && calculateType === '3')) {
|
|
473
473
|
return (
|
|
474
474
|
<Form.Item>
|
|
@@ -61,17 +61,19 @@ async function addGood(controller: InvoiceController) {
|
|
|
61
61
|
// key: '你正在编辑一个货物',
|
|
62
62
|
// });
|
|
63
63
|
// return;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
const isValidateGood = controller.state.goodsListState.isValidateGood;
|
|
65
|
+
if (isValidateGood) {
|
|
66
|
+
await controller.state.goodsListState.form?.validateFields(async (err: any, values: any) => {
|
|
67
|
+
if (err) {
|
|
68
|
+
const firstError: any = Object.values(err)[0];
|
|
69
|
+
message.error({
|
|
70
|
+
content: firstError.errors[0].message,
|
|
71
|
+
key: '你正在编辑一个货物',
|
|
72
|
+
});
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
75
77
|
}
|
|
76
78
|
s.goodsListState.editGood = await controller.addGood({ taxRate: s.goodsListState.defaultRate, lineAttribute: LineAttributeType.正常 });
|
|
77
79
|
});
|