kts-component-invoice-operate 1.0.89 → 1.0.93
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 +38 -53
- package/dist/index.js +38 -53
- package/package.json +1 -1
- package/src/Invoice/_test/importGoods/index.tsx +349 -63
- package/src/Invoice/_test/replaceHead/index.tsx +1 -6
- package/src/Invoice/tools/calculate/index.ts +1 -1
- package/src/Invoice/ui/GoodsList/hook/useColumns/autoFillFn/index.ts +9 -1
- package/src/Invoice/ui/GoodsList/hook/useColumns/index.tsx +2 -2
- package/src/Invoice/ui/GoodsList/hook/useColumns/ui/RowMenu/index.tsx +1 -2
- package/src/Invoice/ui/ImportGoodsDrawer/index.tsx +10 -5
package/dist/index.esm.js
CHANGED
|
@@ -2417,7 +2417,7 @@ function quantityPriceIncludeTax(quantity, priceIncludeTax) {
|
|
|
2417
2417
|
if (!priceIncludeTax && priceIncludeTax !== 0) return undefined;
|
|
2418
2418
|
quantity = format15(quantity);
|
|
2419
2419
|
priceIncludeTax = format15(priceIncludeTax);
|
|
2420
|
-
return evaluate("".concat(priceIncludeTax, " * ").concat(quantity));
|
|
2420
|
+
return parseFloat(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)).toFixed(2));
|
|
2421
2421
|
}
|
|
2422
2422
|
|
|
2423
2423
|
/** 延迟函数 */
|
|
@@ -2437,18 +2437,24 @@ var lazyFn$1 = function lazyFn(fn) {
|
|
|
2437
2437
|
}, delayed);
|
|
2438
2438
|
};
|
|
2439
2439
|
};
|
|
2440
|
-
/** 提示错误 */
|
|
2441
2440
|
|
|
2441
|
+
var promptErrV = {};
|
|
2442
|
+
/** 提示错误 */
|
|
2442
2443
|
|
|
2443
2444
|
var promptErr = function promptErr(err) {
|
|
2444
2445
|
if (!err) return false;
|
|
2445
2446
|
if (err.errors[0].message === 'lineAmountIncludeTax need to revalidate') return true;
|
|
2446
2447
|
if (err.errors[0].message === 'priceIncludeTax need to revalidate') return true;
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2448
|
+
|
|
2449
|
+
if (new Date().getTime() - promptErrV.t > 2000 || err.errors[0].message !== promptErrV.m) {
|
|
2450
|
+
promptErrV.t = new Date().getTime();
|
|
2451
|
+
promptErrV.m = err.errors[0].message;
|
|
2452
|
+
message.error({
|
|
2453
|
+
content: err.errors[0].message,
|
|
2454
|
+
duration: 2
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2452
2458
|
return true;
|
|
2453
2459
|
};
|
|
2454
2460
|
/** 数量改变了 */
|
|
@@ -3355,7 +3361,6 @@ var RowMenu = (function (props) {
|
|
|
3355
3361
|
var endowCode = useEndowCode(props.goods);
|
|
3356
3362
|
var itemList = React.useMemo(function () {
|
|
3357
3363
|
var arr = [];
|
|
3358
|
-
console.log('model ===>', model, controller);
|
|
3359
3364
|
model !== 'prefab' && addDiscount && arr.push(addDiscount); // 添加折扣行
|
|
3360
3365
|
|
|
3361
3366
|
endowCode && arr.push(endowCode); // 赋码
|
|
@@ -3784,7 +3789,7 @@ var useColumns = (function (form) {
|
|
|
3784
3789
|
switch (_context5.prev = _context5.next) {
|
|
3785
3790
|
case 0:
|
|
3786
3791
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
3787
|
-
callback('金额整数部分不能大于9位');
|
|
3792
|
+
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
3788
3793
|
}
|
|
3789
3794
|
|
|
3790
3795
|
case 1:
|
|
@@ -3846,7 +3851,7 @@ var useColumns = (function (form) {
|
|
|
3846
3851
|
switch (_context6.prev = _context6.next) {
|
|
3847
3852
|
case 0:
|
|
3848
3853
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
3849
|
-
callback('金额整数部分不能大于9位');
|
|
3854
|
+
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
3850
3855
|
}
|
|
3851
3856
|
|
|
3852
3857
|
case 1:
|
|
@@ -5111,71 +5116,51 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
5111
5116
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
5112
5117
|
while (1) {
|
|
5113
5118
|
switch (_context2.prev = _context2.next) {
|
|
5114
|
-
case 0:
|
|
5115
|
-
if (!s.goodsListState.editGood) {
|
|
5116
|
-
_context2.next = 2;
|
|
5117
|
-
break;
|
|
5118
|
-
}
|
|
5119
|
-
|
|
5120
|
-
return _context2.abrupt("return");
|
|
5121
|
-
|
|
5122
|
-
case 2:
|
|
5123
|
-
s.goodsListState.editGood = editGood;
|
|
5124
|
-
|
|
5125
|
-
case 3:
|
|
5126
|
-
case "end":
|
|
5127
|
-
return _context2.stop();
|
|
5128
|
-
}
|
|
5129
|
-
}
|
|
5130
|
-
}, _callee2);
|
|
5131
|
-
}));
|
|
5132
|
-
|
|
5133
|
-
return function (_x2) {
|
|
5134
|
-
return _ref2.apply(this, arguments);
|
|
5135
|
-
};
|
|
5136
|
-
}(), /*#__PURE__*/function () {
|
|
5137
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
|
|
5138
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
5139
|
-
while (1) {
|
|
5140
|
-
switch (_context3.prev = _context3.next) {
|
|
5141
5119
|
case 0:
|
|
5142
5120
|
Object.keys(record).filter(function (e) {
|
|
5143
5121
|
return !record[e] && record[e] !== 0;
|
|
5144
5122
|
}).forEach(function (e) {
|
|
5145
5123
|
delete record[e];
|
|
5146
5124
|
});
|
|
5147
|
-
|
|
5125
|
+
_context2.next = 3;
|
|
5148
5126
|
return s.goodsListState.importGoods.verifyFn(record);
|
|
5149
5127
|
|
|
5150
5128
|
case 3:
|
|
5151
|
-
|
|
5129
|
+
_context2.t0 = _context2.sent;
|
|
5152
5130
|
|
|
5153
|
-
if (!(
|
|
5154
|
-
|
|
5131
|
+
if (!(_context2.t0 === false)) {
|
|
5132
|
+
_context2.next = 6;
|
|
5155
5133
|
break;
|
|
5156
5134
|
}
|
|
5157
5135
|
|
|
5158
|
-
return
|
|
5136
|
+
return _context2.abrupt("return");
|
|
5159
5137
|
|
|
5160
5138
|
case 6:
|
|
5161
5139
|
if (!(!s.goodsListState.editGood || !s.goodsListState.form)) {
|
|
5162
|
-
|
|
5140
|
+
_context2.next = 8;
|
|
5163
5141
|
break;
|
|
5164
5142
|
}
|
|
5165
5143
|
|
|
5166
|
-
return
|
|
5144
|
+
return _context2.abrupt("return");
|
|
5167
5145
|
|
|
5168
5146
|
case 8:
|
|
5147
|
+
if (s.goodsListState.editGood.lineAmountExcludeTax || s.goodsListState.editGood.lineAmountIncludeTax) {
|
|
5148
|
+
record.priceExcludeTax = s.goodsListState.editGood.priceExcludeTax;
|
|
5149
|
+
record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
|
|
5150
|
+
record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
|
|
5151
|
+
record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
|
|
5152
|
+
}
|
|
5153
|
+
|
|
5169
5154
|
s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), record);
|
|
5170
5155
|
|
|
5171
5156
|
if (s.goodsListState.editGood) {
|
|
5172
|
-
|
|
5157
|
+
_context2.next = 12;
|
|
5173
5158
|
break;
|
|
5174
5159
|
}
|
|
5175
5160
|
|
|
5176
|
-
return
|
|
5161
|
+
return _context2.abrupt("return");
|
|
5177
5162
|
|
|
5178
|
-
case
|
|
5163
|
+
case 12:
|
|
5179
5164
|
if ("".concat(s.goodsListState.editGood.priceIncludeTax) === '0') {
|
|
5180
5165
|
s.goodsListState.editGood.priceIncludeTax = undefined;
|
|
5181
5166
|
s.goodsListState.editGood.priceExcludeTax = undefined;
|
|
@@ -5183,22 +5168,22 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
5183
5168
|
s.goodsListState.editGood.priceExcludeTax = getPriceExcludeTax(s.goodsListState.editGood, record);
|
|
5184
5169
|
}
|
|
5185
5170
|
|
|
5186
|
-
s.goodsListState.editGood.lineAmountIncludeTax = quantityPriceIncludeTax(s.goodsListState.editGood.quantity, s.goodsListState.editGood.priceIncludeTax);
|
|
5171
|
+
if (s.goodsListState.editGood.quantity && s.goodsListState.editGood.priceIncludeTax) s.goodsListState.editGood.lineAmountIncludeTax = quantityPriceIncludeTax(s.goodsListState.editGood.quantity, s.goodsListState.editGood.priceIncludeTax);
|
|
5187
5172
|
s.goodsListState.editGood.itemName = getItemName(record);
|
|
5188
5173
|
s.goodsListState.form.setFieldsValue(s.goodsListState.editGood);
|
|
5189
5174
|
s.goodsListState.importGoods.isVisibleDrawer = false;
|
|
5190
5175
|
s.goodsListState.isTaxIncluded ? updateUnitPriceExcludingTax(controller, s.goodsListState.form) : updateUnitPriceTax(controller, s.goodsListState.form);
|
|
5191
5176
|
|
|
5192
|
-
case
|
|
5177
|
+
case 18:
|
|
5193
5178
|
case "end":
|
|
5194
|
-
return
|
|
5179
|
+
return _context2.stop();
|
|
5195
5180
|
}
|
|
5196
5181
|
}
|
|
5197
|
-
},
|
|
5182
|
+
}, _callee2);
|
|
5198
5183
|
}));
|
|
5199
5184
|
|
|
5200
|
-
return function (
|
|
5201
|
-
return
|
|
5185
|
+
return function (_x2) {
|
|
5186
|
+
return _ref2.apply(this, arguments);
|
|
5202
5187
|
};
|
|
5203
5188
|
}())();
|
|
5204
5189
|
}
|
package/dist/index.js
CHANGED
|
@@ -2427,7 +2427,7 @@ function quantityPriceIncludeTax(quantity, priceIncludeTax) {
|
|
|
2427
2427
|
if (!priceIncludeTax && priceIncludeTax !== 0) return undefined;
|
|
2428
2428
|
quantity = format15(quantity);
|
|
2429
2429
|
priceIncludeTax = format15(priceIncludeTax);
|
|
2430
|
-
return evaluate("".concat(priceIncludeTax, " * ").concat(quantity));
|
|
2430
|
+
return parseFloat(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)).toFixed(2));
|
|
2431
2431
|
}
|
|
2432
2432
|
|
|
2433
2433
|
/** 延迟函数 */
|
|
@@ -2447,18 +2447,24 @@ var lazyFn$1 = function lazyFn(fn) {
|
|
|
2447
2447
|
}, delayed);
|
|
2448
2448
|
};
|
|
2449
2449
|
};
|
|
2450
|
-
/** 提示错误 */
|
|
2451
2450
|
|
|
2451
|
+
var promptErrV = {};
|
|
2452
|
+
/** 提示错误 */
|
|
2452
2453
|
|
|
2453
2454
|
var promptErr = function promptErr(err) {
|
|
2454
2455
|
if (!err) return false;
|
|
2455
2456
|
if (err.errors[0].message === 'lineAmountIncludeTax need to revalidate') return true;
|
|
2456
2457
|
if (err.errors[0].message === 'priceIncludeTax need to revalidate') return true;
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2458
|
+
|
|
2459
|
+
if (new Date().getTime() - promptErrV.t > 2000 || err.errors[0].message !== promptErrV.m) {
|
|
2460
|
+
promptErrV.t = new Date().getTime();
|
|
2461
|
+
promptErrV.m = err.errors[0].message;
|
|
2462
|
+
ktsComponentsAntdX3.message.error({
|
|
2463
|
+
content: err.errors[0].message,
|
|
2464
|
+
duration: 2
|
|
2465
|
+
});
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2462
2468
|
return true;
|
|
2463
2469
|
};
|
|
2464
2470
|
/** 数量改变了 */
|
|
@@ -3365,7 +3371,6 @@ var RowMenu = (function (props) {
|
|
|
3365
3371
|
var endowCode = useEndowCode(props.goods);
|
|
3366
3372
|
var itemList = React__default['default'].useMemo(function () {
|
|
3367
3373
|
var arr = [];
|
|
3368
|
-
console.log('model ===>', model, controller);
|
|
3369
3374
|
model !== 'prefab' && addDiscount && arr.push(addDiscount); // 添加折扣行
|
|
3370
3375
|
|
|
3371
3376
|
endowCode && arr.push(endowCode); // 赋码
|
|
@@ -3794,7 +3799,7 @@ var useColumns = (function (form) {
|
|
|
3794
3799
|
switch (_context5.prev = _context5.next) {
|
|
3795
3800
|
case 0:
|
|
3796
3801
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
3797
|
-
callback('金额整数部分不能大于9位');
|
|
3802
|
+
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
3798
3803
|
}
|
|
3799
3804
|
|
|
3800
3805
|
case 1:
|
|
@@ -3856,7 +3861,7 @@ var useColumns = (function (form) {
|
|
|
3856
3861
|
switch (_context6.prev = _context6.next) {
|
|
3857
3862
|
case 0:
|
|
3858
3863
|
if ("".concat(value).split('.')[0].length > 9) {
|
|
3859
|
-
callback('金额整数部分不能大于9位');
|
|
3864
|
+
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
3860
3865
|
}
|
|
3861
3866
|
|
|
3862
3867
|
case 1:
|
|
@@ -5121,71 +5126,51 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
5121
5126
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
5122
5127
|
while (1) {
|
|
5123
5128
|
switch (_context2.prev = _context2.next) {
|
|
5124
|
-
case 0:
|
|
5125
|
-
if (!s.goodsListState.editGood) {
|
|
5126
|
-
_context2.next = 2;
|
|
5127
|
-
break;
|
|
5128
|
-
}
|
|
5129
|
-
|
|
5130
|
-
return _context2.abrupt("return");
|
|
5131
|
-
|
|
5132
|
-
case 2:
|
|
5133
|
-
s.goodsListState.editGood = editGood;
|
|
5134
|
-
|
|
5135
|
-
case 3:
|
|
5136
|
-
case "end":
|
|
5137
|
-
return _context2.stop();
|
|
5138
|
-
}
|
|
5139
|
-
}
|
|
5140
|
-
}, _callee2);
|
|
5141
|
-
}));
|
|
5142
|
-
|
|
5143
|
-
return function (_x2) {
|
|
5144
|
-
return _ref2.apply(this, arguments);
|
|
5145
|
-
};
|
|
5146
|
-
}(), /*#__PURE__*/function () {
|
|
5147
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(s) {
|
|
5148
|
-
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
5149
|
-
while (1) {
|
|
5150
|
-
switch (_context3.prev = _context3.next) {
|
|
5151
5129
|
case 0:
|
|
5152
5130
|
Object.keys(record).filter(function (e) {
|
|
5153
5131
|
return !record[e] && record[e] !== 0;
|
|
5154
5132
|
}).forEach(function (e) {
|
|
5155
5133
|
delete record[e];
|
|
5156
5134
|
});
|
|
5157
|
-
|
|
5135
|
+
_context2.next = 3;
|
|
5158
5136
|
return s.goodsListState.importGoods.verifyFn(record);
|
|
5159
5137
|
|
|
5160
5138
|
case 3:
|
|
5161
|
-
|
|
5139
|
+
_context2.t0 = _context2.sent;
|
|
5162
5140
|
|
|
5163
|
-
if (!(
|
|
5164
|
-
|
|
5141
|
+
if (!(_context2.t0 === false)) {
|
|
5142
|
+
_context2.next = 6;
|
|
5165
5143
|
break;
|
|
5166
5144
|
}
|
|
5167
5145
|
|
|
5168
|
-
return
|
|
5146
|
+
return _context2.abrupt("return");
|
|
5169
5147
|
|
|
5170
5148
|
case 6:
|
|
5171
5149
|
if (!(!s.goodsListState.editGood || !s.goodsListState.form)) {
|
|
5172
|
-
|
|
5150
|
+
_context2.next = 8;
|
|
5173
5151
|
break;
|
|
5174
5152
|
}
|
|
5175
5153
|
|
|
5176
|
-
return
|
|
5154
|
+
return _context2.abrupt("return");
|
|
5177
5155
|
|
|
5178
5156
|
case 8:
|
|
5157
|
+
if (s.goodsListState.editGood.lineAmountExcludeTax || s.goodsListState.editGood.lineAmountIncludeTax) {
|
|
5158
|
+
record.priceExcludeTax = s.goodsListState.editGood.priceExcludeTax;
|
|
5159
|
+
record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
|
|
5160
|
+
record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
|
|
5161
|
+
record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
|
|
5162
|
+
}
|
|
5163
|
+
|
|
5179
5164
|
s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), record);
|
|
5180
5165
|
|
|
5181
5166
|
if (s.goodsListState.editGood) {
|
|
5182
|
-
|
|
5167
|
+
_context2.next = 12;
|
|
5183
5168
|
break;
|
|
5184
5169
|
}
|
|
5185
5170
|
|
|
5186
|
-
return
|
|
5171
|
+
return _context2.abrupt("return");
|
|
5187
5172
|
|
|
5188
|
-
case
|
|
5173
|
+
case 12:
|
|
5189
5174
|
if ("".concat(s.goodsListState.editGood.priceIncludeTax) === '0') {
|
|
5190
5175
|
s.goodsListState.editGood.priceIncludeTax = undefined;
|
|
5191
5176
|
s.goodsListState.editGood.priceExcludeTax = undefined;
|
|
@@ -5193,22 +5178,22 @@ var DrawerBody$2 = function DrawerBody() {
|
|
|
5193
5178
|
s.goodsListState.editGood.priceExcludeTax = getPriceExcludeTax(s.goodsListState.editGood, record);
|
|
5194
5179
|
}
|
|
5195
5180
|
|
|
5196
|
-
s.goodsListState.editGood.lineAmountIncludeTax = quantityPriceIncludeTax(s.goodsListState.editGood.quantity, s.goodsListState.editGood.priceIncludeTax);
|
|
5181
|
+
if (s.goodsListState.editGood.quantity && s.goodsListState.editGood.priceIncludeTax) s.goodsListState.editGood.lineAmountIncludeTax = quantityPriceIncludeTax(s.goodsListState.editGood.quantity, s.goodsListState.editGood.priceIncludeTax);
|
|
5197
5182
|
s.goodsListState.editGood.itemName = getItemName(record);
|
|
5198
5183
|
s.goodsListState.form.setFieldsValue(s.goodsListState.editGood);
|
|
5199
5184
|
s.goodsListState.importGoods.isVisibleDrawer = false;
|
|
5200
5185
|
s.goodsListState.isTaxIncluded ? updateUnitPriceExcludingTax(controller, s.goodsListState.form) : updateUnitPriceTax(controller, s.goodsListState.form);
|
|
5201
5186
|
|
|
5202
|
-
case
|
|
5187
|
+
case 18:
|
|
5203
5188
|
case "end":
|
|
5204
|
-
return
|
|
5189
|
+
return _context2.stop();
|
|
5205
5190
|
}
|
|
5206
5191
|
}
|
|
5207
|
-
},
|
|
5192
|
+
}, _callee2);
|
|
5208
5193
|
}));
|
|
5209
5194
|
|
|
5210
|
-
return function (
|
|
5211
|
-
return
|
|
5195
|
+
return function (_x2) {
|
|
5196
|
+
return _ref2.apply(this, arguments);
|
|
5212
5197
|
};
|
|
5213
5198
|
}())();
|
|
5214
5199
|
}
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Button } from 'kts-components-antd-x3/lib/radio';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { Invoice } from '../../../';
|
|
3
4
|
import { IGetBuyerListOption } from '../../../Invoice/InvoiceController/InvoiceControllerState/BuyerState';
|
|
@@ -13,7 +14,12 @@ export default () => {
|
|
|
13
14
|
s.goodsListState.importGoods.dataSource = [];
|
|
14
15
|
}), [])
|
|
15
16
|
|
|
16
|
-
return
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<Button onClick={async () => { console.log('===> 当前组件状态', await controller.validateFields()); }} >获取数据</Button>
|
|
20
|
+
<Invoice controller={controller} />
|
|
21
|
+
</>
|
|
22
|
+
);
|
|
17
23
|
};
|
|
18
24
|
|
|
19
25
|
// 重写 购买方 的数据源,实现 ‘获取 购买方 列表’ 方法
|
|
@@ -80,79 +86,239 @@ const getMok = async (current: number = 1) => {
|
|
|
80
86
|
"buyGroupCode": null,
|
|
81
87
|
"buyGroupId": null,
|
|
82
88
|
"buyGroupName": null,
|
|
83
|
-
"categoryId":
|
|
84
|
-
"categoryName": "
|
|
85
|
-
"companyId": "
|
|
86
|
-
"createTime": "
|
|
89
|
+
"categoryId": 2073,
|
|
90
|
+
"categoryName": "通用",
|
|
91
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
92
|
+
"createTime": "2021-09-10 15:45:43.0",
|
|
87
93
|
"enjoyPreferentialPolicies": 0,
|
|
88
94
|
"factoryCode": null,
|
|
89
95
|
"factoryId": null,
|
|
90
96
|
"factoryName": null,
|
|
91
|
-
"id":
|
|
97
|
+
"id": 146200,
|
|
98
|
+
"internalNumber": "发动机盖",
|
|
99
|
+
"isUalityInspection": null,
|
|
100
|
+
"name": "发动机ABC",
|
|
101
|
+
"preferentialPoliciesType": null,
|
|
102
|
+
"priceAmount": 50,
|
|
103
|
+
"procurementCycle": 0,
|
|
104
|
+
"shorthand": "发动机",
|
|
105
|
+
"specification": "abc",
|
|
106
|
+
"spuCode": "6000001738252675",
|
|
107
|
+
"status": 1,
|
|
108
|
+
"taxCategoryCode": "1090102040000000000",
|
|
109
|
+
"taxExemptionType": "",
|
|
110
|
+
"taxId": 11,
|
|
111
|
+
"taxRate": 13,
|
|
112
|
+
"unitId": 30,
|
|
113
|
+
"unitName": "件",
|
|
114
|
+
"itemType": "通用",
|
|
115
|
+
"itemNo": "6000001738252675",
|
|
116
|
+
"itemName": "发动机ABC",
|
|
117
|
+
"itemModelName": "abc",
|
|
118
|
+
"unit": "件",
|
|
119
|
+
"priceIncludeTax": 50,
|
|
120
|
+
"priceExcludeTax": 50,
|
|
121
|
+
"taxClassificationCode": "1090102040000000000"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"attributeVOList": null,
|
|
125
|
+
"brandName": "丹东一号",
|
|
126
|
+
"buyGroupCode": null,
|
|
127
|
+
"buyGroupId": null,
|
|
128
|
+
"buyGroupName": null,
|
|
129
|
+
"categoryId": 2073,
|
|
130
|
+
"categoryName": "通用",
|
|
131
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
132
|
+
"createTime": "2021-09-02 14:59:52.0",
|
|
133
|
+
"enjoyPreferentialPolicies": 0,
|
|
134
|
+
"factoryCode": null,
|
|
135
|
+
"factoryId": null,
|
|
136
|
+
"factoryName": null,
|
|
137
|
+
"id": 146199,
|
|
138
|
+
"internalNumber": null,
|
|
139
|
+
"isUalityInspection": null,
|
|
140
|
+
"name": "aaaa",
|
|
141
|
+
"preferentialPoliciesType": null,
|
|
142
|
+
"priceAmount": 0,
|
|
143
|
+
"procurementCycle": 0,
|
|
144
|
+
"shorthand": "活牲畜",
|
|
145
|
+
"specification": null,
|
|
146
|
+
"spuCode": "6000001311479375",
|
|
147
|
+
"status": 1,
|
|
148
|
+
"taxCategoryCode": "1010301010000000000",
|
|
149
|
+
"taxExemptionType": "1",
|
|
150
|
+
"taxId": 1,
|
|
151
|
+
"taxRate": 0,
|
|
152
|
+
"unitId": null,
|
|
153
|
+
"unitName": null,
|
|
154
|
+
"itemType": "通用",
|
|
155
|
+
"itemNo": "6000001311479375",
|
|
156
|
+
"itemName": "aaaa",
|
|
157
|
+
"itemModelName": null,
|
|
158
|
+
"unit": null,
|
|
159
|
+
"priceIncludeTax": 0,
|
|
160
|
+
"priceExcludeTax": 0,
|
|
161
|
+
"taxClassificationCode": "1010301010000000000"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"attributeVOList": null,
|
|
165
|
+
"brandName": "丹东一号",
|
|
166
|
+
"buyGroupCode": null,
|
|
167
|
+
"buyGroupId": null,
|
|
168
|
+
"buyGroupName": null,
|
|
169
|
+
"categoryId": 246,
|
|
170
|
+
"categoryName": "分类cc>1",
|
|
171
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
172
|
+
"createTime": "2020-12-28 18:23:55.0",
|
|
173
|
+
"enjoyPreferentialPolicies": 0,
|
|
174
|
+
"factoryCode": null,
|
|
175
|
+
"factoryId": null,
|
|
176
|
+
"factoryName": null,
|
|
177
|
+
"id": 146131,
|
|
92
178
|
"internalNumber": null,
|
|
93
179
|
"isUalityInspection": null,
|
|
94
|
-
"name": "
|
|
180
|
+
"name": "AAAA",
|
|
95
181
|
"preferentialPoliciesType": null,
|
|
96
182
|
"priceAmount": null,
|
|
97
183
|
"procurementCycle": 0,
|
|
98
184
|
"shorthand": null,
|
|
99
|
-
"specification":
|
|
100
|
-
"spuCode": "
|
|
185
|
+
"specification": "1234EFF",
|
|
186
|
+
"spuCode": "6000002120658581",
|
|
101
187
|
"status": 1,
|
|
102
188
|
"taxCategoryCode": null,
|
|
103
189
|
"taxExemptionType": null,
|
|
104
190
|
"taxId": null,
|
|
105
191
|
"taxRate": 0,
|
|
192
|
+
"unitId": 362,
|
|
193
|
+
"unitName": "年",
|
|
194
|
+
"itemType": "分类cc>1",
|
|
195
|
+
"itemNo": "6000002120658581",
|
|
196
|
+
"itemName": "AAAA",
|
|
197
|
+
"itemModelName": "1234EFF",
|
|
198
|
+
"unit": "年",
|
|
199
|
+
"priceIncludeTax": 0,
|
|
200
|
+
"priceExcludeTax": 0,
|
|
201
|
+
"taxClassificationCode": null
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"attributeVOList": null,
|
|
205
|
+
"brandName": null,
|
|
206
|
+
"buyGroupCode": null,
|
|
207
|
+
"buyGroupId": null,
|
|
208
|
+
"buyGroupName": null,
|
|
209
|
+
"categoryId": 2073,
|
|
210
|
+
"categoryName": "通用",
|
|
211
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
212
|
+
"createTime": "2020-12-15 10:14:14.0",
|
|
213
|
+
"enjoyPreferentialPolicies": 0,
|
|
214
|
+
"factoryCode": null,
|
|
215
|
+
"factoryId": null,
|
|
216
|
+
"factoryName": null,
|
|
217
|
+
"id": 146129,
|
|
218
|
+
"internalNumber": null,
|
|
219
|
+
"isUalityInspection": null,
|
|
220
|
+
"name": "服务费",
|
|
221
|
+
"preferentialPoliciesType": null,
|
|
222
|
+
"priceAmount": null,
|
|
223
|
+
"procurementCycle": 0,
|
|
224
|
+
"shorthand": "软件",
|
|
225
|
+
"specification": null,
|
|
226
|
+
"spuCode": "6000001474077629",
|
|
227
|
+
"status": 1,
|
|
228
|
+
"taxCategoryCode": "1060301020100000000",
|
|
229
|
+
"taxExemptionType": null,
|
|
230
|
+
"taxId": null,
|
|
231
|
+
"taxRate": 0,
|
|
106
232
|
"unitId": null,
|
|
107
233
|
"unitName": null,
|
|
108
|
-
"itemType": "
|
|
109
|
-
"itemNo": "
|
|
110
|
-
"itemName": "
|
|
234
|
+
"itemType": "通用",
|
|
235
|
+
"itemNo": "6000001474077629",
|
|
236
|
+
"itemName": "服务费",
|
|
111
237
|
"itemModelName": null,
|
|
112
238
|
"unit": null,
|
|
113
239
|
"priceIncludeTax": 0,
|
|
114
240
|
"priceExcludeTax": 0,
|
|
115
|
-
"taxClassificationCode":
|
|
241
|
+
"taxClassificationCode": "1060301020100000000"
|
|
116
242
|
},
|
|
117
243
|
{
|
|
118
244
|
"attributeVOList": null,
|
|
119
|
-
"brandName":
|
|
245
|
+
"brandName": "丹东一号",
|
|
120
246
|
"buyGroupCode": null,
|
|
121
247
|
"buyGroupId": null,
|
|
122
248
|
"buyGroupName": null,
|
|
123
|
-
"categoryId":
|
|
124
|
-
"categoryName": "
|
|
125
|
-
"companyId": "
|
|
126
|
-
"createTime": "2020-
|
|
249
|
+
"categoryId": 2073,
|
|
250
|
+
"categoryName": "通用",
|
|
251
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
252
|
+
"createTime": "2020-10-30 15:07:05.0",
|
|
127
253
|
"enjoyPreferentialPolicies": 0,
|
|
128
254
|
"factoryCode": null,
|
|
129
255
|
"factoryId": null,
|
|
130
256
|
"factoryName": null,
|
|
131
|
-
"id":
|
|
132
|
-
"internalNumber": "
|
|
257
|
+
"id": 145809,
|
|
258
|
+
"internalNumber": "0987",
|
|
133
259
|
"isUalityInspection": null,
|
|
134
|
-
"name": "
|
|
260
|
+
"name": "中科",
|
|
135
261
|
"preferentialPoliciesType": null,
|
|
262
|
+
"priceAmount": 1000,
|
|
263
|
+
"procurementCycle": 0,
|
|
264
|
+
"shorthand": "糖料",
|
|
265
|
+
"specification": "12",
|
|
266
|
+
"spuCode": "6000001168374126",
|
|
267
|
+
"status": 1,
|
|
268
|
+
"taxCategoryCode": "1010107010000000000",
|
|
269
|
+
"taxExemptionType": "3",
|
|
270
|
+
"taxId": 1,
|
|
271
|
+
"taxRate": 0,
|
|
272
|
+
"unitId": 32,
|
|
273
|
+
"unitName": "把",
|
|
274
|
+
"itemType": "通用",
|
|
275
|
+
"itemNo": "6000001168374126",
|
|
276
|
+
"itemName": "中科",
|
|
277
|
+
"itemModelName": "12",
|
|
278
|
+
"unit": "把",
|
|
279
|
+
"priceIncludeTax": 1000,
|
|
280
|
+
"priceExcludeTax": 1000,
|
|
281
|
+
"taxClassificationCode": "1010107010000000000"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"attributeVOList": null,
|
|
285
|
+
"brandName": null,
|
|
286
|
+
"buyGroupCode": null,
|
|
287
|
+
"buyGroupId": null,
|
|
288
|
+
"buyGroupName": null,
|
|
289
|
+
"categoryId": 1862,
|
|
290
|
+
"categoryName": "通用",
|
|
291
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
292
|
+
"createTime": "2019-03-22 11:06:53.0",
|
|
293
|
+
"enjoyPreferentialPolicies": 0,
|
|
294
|
+
"factoryCode": null,
|
|
295
|
+
"factoryId": null,
|
|
296
|
+
"factoryName": null,
|
|
297
|
+
"id": 144321,
|
|
298
|
+
"internalNumber": "4302111",
|
|
299
|
+
"isUalityInspection": 0,
|
|
300
|
+
"name": "农用化肥2",
|
|
301
|
+
"preferentialPoliciesType": "",
|
|
136
302
|
"priceAmount": 90,
|
|
137
303
|
"procurementCycle": 0,
|
|
138
|
-
"shorthand": "
|
|
139
|
-
"specification": "
|
|
140
|
-
"spuCode": "
|
|
304
|
+
"shorthand": "肥料",
|
|
305
|
+
"specification": "HLHF-211",
|
|
306
|
+
"spuCode": "1000019000000056",
|
|
141
307
|
"status": 1,
|
|
142
|
-
|
|
143
|
-
"taxExemptionType":
|
|
144
|
-
"taxId":
|
|
145
|
-
"taxRate":
|
|
146
|
-
"unitId":
|
|
147
|
-
"unitName": "
|
|
148
|
-
"itemType": "
|
|
149
|
-
"itemNo": "
|
|
150
|
-
"itemName": "
|
|
151
|
-
"itemModelName": "
|
|
152
|
-
"unit": "
|
|
308
|
+
"taxCategoryCode": "1000000000000000000",
|
|
309
|
+
"taxExemptionType": null,
|
|
310
|
+
"taxId": null,
|
|
311
|
+
"taxRate": 0,
|
|
312
|
+
"unitId": 11,
|
|
313
|
+
"unitName": "包",
|
|
314
|
+
"itemType": "通用",
|
|
315
|
+
"itemNo": "1000019000000056",
|
|
316
|
+
"itemName": "农用化肥2",
|
|
317
|
+
"itemModelName": "HLHF-211",
|
|
318
|
+
"unit": "包",
|
|
153
319
|
"priceIncludeTax": 90,
|
|
154
320
|
"priceExcludeTax": 90,
|
|
155
|
-
"taxClassificationCode": "
|
|
321
|
+
"taxClassificationCode": "1000000000000000000"
|
|
156
322
|
},
|
|
157
323
|
{
|
|
158
324
|
"attributeVOList": null,
|
|
@@ -160,39 +326,159 @@ const getMok = async (current: number = 1) => {
|
|
|
160
326
|
"buyGroupCode": null,
|
|
161
327
|
"buyGroupId": null,
|
|
162
328
|
"buyGroupName": null,
|
|
163
|
-
"categoryId":
|
|
164
|
-
"categoryName": "
|
|
165
|
-
"companyId": "
|
|
166
|
-
"createTime": "
|
|
329
|
+
"categoryId": 1862,
|
|
330
|
+
"categoryName": "通用",
|
|
331
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
332
|
+
"createTime": "2019-03-22 11:06:52.0",
|
|
167
333
|
"enjoyPreferentialPolicies": 0,
|
|
168
334
|
"factoryCode": null,
|
|
169
335
|
"factoryId": null,
|
|
170
336
|
"factoryName": null,
|
|
171
|
-
"id":
|
|
172
|
-
"internalNumber":
|
|
173
|
-
"isUalityInspection":
|
|
174
|
-
"name": "
|
|
175
|
-
"preferentialPoliciesType":
|
|
176
|
-
"priceAmount":
|
|
177
|
-
"procurementCycle":
|
|
178
|
-
"shorthand": "
|
|
179
|
-
"specification": "",
|
|
180
|
-
"spuCode": "
|
|
337
|
+
"id": 144320,
|
|
338
|
+
"internalNumber": "4302111",
|
|
339
|
+
"isUalityInspection": 0,
|
|
340
|
+
"name": "园林轻化肥",
|
|
341
|
+
"preferentialPoliciesType": "",
|
|
342
|
+
"priceAmount": null,
|
|
343
|
+
"procurementCycle": null,
|
|
344
|
+
"shorthand": "肥料",
|
|
345
|
+
"specification": "HLHF-211",
|
|
346
|
+
"spuCode": "1000019000000055",
|
|
181
347
|
"status": 1,
|
|
182
|
-
"taxCategoryCode": "
|
|
348
|
+
"taxCategoryCode": "233WD5FG00911",
|
|
183
349
|
"taxExemptionType": null,
|
|
184
|
-
"taxId":
|
|
185
|
-
"taxRate":
|
|
186
|
-
"unitId":
|
|
187
|
-
"unitName":
|
|
188
|
-
"itemType": "
|
|
189
|
-
"itemNo": "
|
|
190
|
-
"itemName": "
|
|
191
|
-
"itemModelName": "",
|
|
192
|
-
"unit":
|
|
193
|
-
"priceIncludeTax":
|
|
194
|
-
"priceExcludeTax":
|
|
195
|
-
"taxClassificationCode": "
|
|
350
|
+
"taxId": null,
|
|
351
|
+
"taxRate": 0,
|
|
352
|
+
"unitId": 11,
|
|
353
|
+
"unitName": "包",
|
|
354
|
+
"itemType": "通用",
|
|
355
|
+
"itemNo": "1000019000000055",
|
|
356
|
+
"itemName": "园林轻化肥",
|
|
357
|
+
"itemModelName": "HLHF-211",
|
|
358
|
+
"unit": "包",
|
|
359
|
+
"priceIncludeTax": 0,
|
|
360
|
+
"priceExcludeTax": 0,
|
|
361
|
+
"taxClassificationCode": "233WD5FG00911"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"attributeVOList": null,
|
|
365
|
+
"brandName": null,
|
|
366
|
+
"buyGroupCode": null,
|
|
367
|
+
"buyGroupId": null,
|
|
368
|
+
"buyGroupName": null,
|
|
369
|
+
"categoryId": 1862,
|
|
370
|
+
"categoryName": "通用",
|
|
371
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
372
|
+
"createTime": "2019-03-06 16:06:16.0",
|
|
373
|
+
"enjoyPreferentialPolicies": 0,
|
|
374
|
+
"factoryCode": null,
|
|
375
|
+
"factoryId": null,
|
|
376
|
+
"factoryName": null,
|
|
377
|
+
"id": 101211,
|
|
378
|
+
"internalNumber": "4302111",
|
|
379
|
+
"isUalityInspection": 0,
|
|
380
|
+
"name": "营养土壤",
|
|
381
|
+
"preferentialPoliciesType": "",
|
|
382
|
+
"priceAmount": null,
|
|
383
|
+
"procurementCycle": null,
|
|
384
|
+
"shorthand": "肥料",
|
|
385
|
+
"specification": "HLHF-211",
|
|
386
|
+
"spuCode": "1000019000000053",
|
|
387
|
+
"status": 1,
|
|
388
|
+
"taxCategoryCode": "233WD5FG00911",
|
|
389
|
+
"taxExemptionType": null,
|
|
390
|
+
"taxId": null,
|
|
391
|
+
"taxRate": 0,
|
|
392
|
+
"unitId": 11,
|
|
393
|
+
"unitName": "包",
|
|
394
|
+
"itemType": "通用",
|
|
395
|
+
"itemNo": "1000019000000053",
|
|
396
|
+
"itemName": "营养土壤",
|
|
397
|
+
"itemModelName": "HLHF-211",
|
|
398
|
+
"unit": "包",
|
|
399
|
+
"priceIncludeTax": 0,
|
|
400
|
+
"priceExcludeTax": 0,
|
|
401
|
+
"taxClassificationCode": "233WD5FG00911"
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"attributeVOList": null,
|
|
405
|
+
"brandName": null,
|
|
406
|
+
"buyGroupCode": null,
|
|
407
|
+
"buyGroupId": null,
|
|
408
|
+
"buyGroupName": null,
|
|
409
|
+
"categoryId": 1862,
|
|
410
|
+
"categoryName": "通用",
|
|
411
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
412
|
+
"createTime": "2019-03-06 16:06:16.0",
|
|
413
|
+
"enjoyPreferentialPolicies": 0,
|
|
414
|
+
"factoryCode": null,
|
|
415
|
+
"factoryId": null,
|
|
416
|
+
"factoryName": null,
|
|
417
|
+
"id": 101212,
|
|
418
|
+
"internalNumber": "4302111",
|
|
419
|
+
"isUalityInspection": 0,
|
|
420
|
+
"name": "植物营养液",
|
|
421
|
+
"preferentialPoliciesType": "",
|
|
422
|
+
"priceAmount": null,
|
|
423
|
+
"procurementCycle": null,
|
|
424
|
+
"shorthand": "肥料",
|
|
425
|
+
"specification": "HLHF-211",
|
|
426
|
+
"spuCode": "1000019000000054",
|
|
427
|
+
"status": 1,
|
|
428
|
+
"taxCategoryCode": "233WD5FG00911",
|
|
429
|
+
"taxExemptionType": null,
|
|
430
|
+
"taxId": null,
|
|
431
|
+
"taxRate": 0,
|
|
432
|
+
"unitId": 11,
|
|
433
|
+
"unitName": "包",
|
|
434
|
+
"itemType": "通用",
|
|
435
|
+
"itemNo": "1000019000000054",
|
|
436
|
+
"itemName": "植物营养液",
|
|
437
|
+
"itemModelName": "HLHF-211",
|
|
438
|
+
"unit": "包",
|
|
439
|
+
"priceIncludeTax": 0,
|
|
440
|
+
"priceExcludeTax": 0,
|
|
441
|
+
"taxClassificationCode": "233WD5FG00911"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"attributeVOList": null,
|
|
445
|
+
"brandName": null,
|
|
446
|
+
"buyGroupCode": null,
|
|
447
|
+
"buyGroupId": null,
|
|
448
|
+
"buyGroupName": null,
|
|
449
|
+
"categoryId": 1862,
|
|
450
|
+
"categoryName": "通用",
|
|
451
|
+
"companyId": "41daec4c-baa2-451f-b756-e26067b8657c",
|
|
452
|
+
"createTime": "2019-03-05 18:15:59.0",
|
|
453
|
+
"enjoyPreferentialPolicies": 0,
|
|
454
|
+
"factoryCode": null,
|
|
455
|
+
"factoryId": null,
|
|
456
|
+
"factoryName": null,
|
|
457
|
+
"id": 101203,
|
|
458
|
+
"internalNumber": "4353245243",
|
|
459
|
+
"isUalityInspection": 0,
|
|
460
|
+
"name": "医用棉布纱布条",
|
|
461
|
+
"preferentialPoliciesType": "",
|
|
462
|
+
"priceAmount": null,
|
|
463
|
+
"procurementCycle": null,
|
|
464
|
+
"shorthand": "布料",
|
|
465
|
+
"specification": "ZC11D-006",
|
|
466
|
+
"spuCode": "6000000804084562",
|
|
467
|
+
"status": 1,
|
|
468
|
+
"taxCategoryCode": "1234567890123456789",
|
|
469
|
+
"taxExemptionType": null,
|
|
470
|
+
"taxId": 5,
|
|
471
|
+
"taxRate": 3,
|
|
472
|
+
"unitId": 3,
|
|
473
|
+
"unitName": "米",
|
|
474
|
+
"itemType": "通用",
|
|
475
|
+
"itemNo": "6000000804084562",
|
|
476
|
+
"itemName": "医用棉布纱布条",
|
|
477
|
+
"itemModelName": "ZC11D-006",
|
|
478
|
+
"unit": "米",
|
|
479
|
+
"priceIncludeTax": 0,
|
|
480
|
+
"priceExcludeTax": 0,
|
|
481
|
+
"taxClassificationCode": "1234567890123456789"
|
|
196
482
|
}
|
|
197
483
|
]
|
|
198
484
|
}
|
|
@@ -27,5 +27,5 @@ export function quantityPriceIncludeTax(quantity?: number | string, priceInclude
|
|
|
27
27
|
quantity = format15(quantity);
|
|
28
28
|
priceIncludeTax = format15(priceIncludeTax);
|
|
29
29
|
|
|
30
|
-
return evaluate(`${priceIncludeTax} * ${quantity}`);
|
|
30
|
+
return parseFloat(evaluate(`${priceIncludeTax} * ${quantity}`).toFixed(2));
|
|
31
31
|
}
|
|
@@ -28,12 +28,20 @@ const lazyFn = (fn: Function, delayed: number = 200) => {
|
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
let promptErrV: any = {}
|
|
32
|
+
|
|
31
33
|
/** 提示错误 */
|
|
32
34
|
const promptErr = (err: any) => {
|
|
33
35
|
if (!err) return false;
|
|
34
36
|
if (err.errors[0].message === 'lineAmountIncludeTax need to revalidate') return true;
|
|
35
37
|
if (err.errors[0].message === 'priceIncludeTax need to revalidate') return true;
|
|
36
|
-
|
|
38
|
+
|
|
39
|
+
if (new Date().getTime() - promptErrV.t > 2000 || err.errors[0].message !== promptErrV.m) {
|
|
40
|
+
promptErrV.t = new Date().getTime();
|
|
41
|
+
promptErrV.m = err.errors[0].message;
|
|
42
|
+
message.error({ content: err.errors[0].message, duration: 2 });
|
|
43
|
+
}
|
|
44
|
+
|
|
37
45
|
return true;
|
|
38
46
|
}
|
|
39
47
|
|
|
@@ -295,7 +295,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
295
295
|
{
|
|
296
296
|
validator: async (_, value, callback) => {
|
|
297
297
|
if (`${value}`.split('.')[0].length > 9) {
|
|
298
|
-
callback('金额整数部分不能大于9位');
|
|
298
|
+
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
},
|
|
@@ -339,7 +339,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
339
339
|
{
|
|
340
340
|
validator: async (_, value: string, callback) => {
|
|
341
341
|
if (`${value}`.split('.')[0].length > 9) {
|
|
342
|
-
callback('金额整数部分不能大于9位');
|
|
342
|
+
callback('金额整数部分不能大于9位,小数点后最多2位');
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
},
|
|
@@ -22,8 +22,7 @@ export default (props: { goods: IGood }) => {
|
|
|
22
22
|
|
|
23
23
|
const itemList = React.useMemo(() => {
|
|
24
24
|
const arr: any[] = [];
|
|
25
|
-
|
|
26
|
-
console.log('model ===>', model, controller)
|
|
25
|
+
|
|
27
26
|
model !=='prefab' && addDiscount && arr.push(addDiscount); // 添加折扣行
|
|
28
27
|
endowCode && arr.push(endowCode); // 赋码
|
|
29
28
|
model !=='prefab' && delItem && arr.push(delItem); // 删除
|
|
@@ -71,10 +71,6 @@ const DrawerBody = () => {
|
|
|
71
71
|
return {
|
|
72
72
|
onClick: () => {
|
|
73
73
|
controller.pipeline(
|
|
74
|
-
async s => {
|
|
75
|
-
if (s.goodsListState.editGood) return;
|
|
76
|
-
s.goodsListState.editGood = editGood;
|
|
77
|
-
},
|
|
78
74
|
async s => {
|
|
79
75
|
Object.keys(record).filter(e => !record[e] && record[e] !== 0).forEach(e => { delete record[e] });
|
|
80
76
|
|
|
@@ -82,6 +78,13 @@ const DrawerBody = () => {
|
|
|
82
78
|
|
|
83
79
|
if (!s.goodsListState.editGood || !s.goodsListState.form) return;
|
|
84
80
|
|
|
81
|
+
if (s.goodsListState.editGood.lineAmountExcludeTax || s.goodsListState.editGood.lineAmountIncludeTax) {
|
|
82
|
+
record.priceExcludeTax = s.goodsListState.editGood.priceExcludeTax;
|
|
83
|
+
record.priceIncludeTax = s.goodsListState.editGood.priceIncludeTax;
|
|
84
|
+
record.lineAmountExcludeTax = s.goodsListState.editGood.lineAmountExcludeTax;
|
|
85
|
+
record.lineAmountIncludeTax = s.goodsListState.editGood.lineAmountIncludeTax;
|
|
86
|
+
}
|
|
87
|
+
|
|
85
88
|
s.goodsListState.editGood = { ...s.goodsListState.editGood, ...record };
|
|
86
89
|
if (!s.goodsListState.editGood) return;
|
|
87
90
|
|
|
@@ -92,7 +95,9 @@ const DrawerBody = () => {
|
|
|
92
95
|
s.goodsListState.editGood.priceExcludeTax = getPriceExcludeTax(s.goodsListState.editGood, record) as number;
|
|
93
96
|
}
|
|
94
97
|
|
|
95
|
-
|
|
98
|
+
if (s.goodsListState.editGood.quantity && s.goodsListState.editGood.priceIncludeTax)
|
|
99
|
+
s.goodsListState.editGood.lineAmountIncludeTax = quantityPriceIncludeTax(s.goodsListState.editGood.quantity, s.goodsListState.editGood.priceIncludeTax);
|
|
100
|
+
|
|
96
101
|
s.goodsListState.editGood.itemName = getItemName(record);
|
|
97
102
|
|
|
98
103
|
s.goodsListState.form.setFieldsValue(s.goodsListState.editGood as any);
|