kts-component-invoice-operate 3.2.221-chinaship → 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 +29 -107
- package/dist/index.js +29 -107
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/index.md +3 -0
- package/src/Invoice/InvoiceController/fns/saveEditGood.ts +2 -2
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/index.tsx +13 -18
- package/src/Invoice/ui/digtal/GoodsList/ui/TableVirtual/index.tsx +6 -11
- package/src/Invoice/ui/digtal/StakeFarmerholder/index.tsx +15 -29
- package/src/Invoice/ui/digtal/Stakeholder/index.tsx +4 -22
package/dist/index.esm.js
CHANGED
|
@@ -1995,7 +1995,7 @@ var saveEditGood = /*#__PURE__*/(function () {
|
|
|
1995
1995
|
switch (_context.prev = _context.next) {
|
|
1996
1996
|
case 0:
|
|
1997
1997
|
editGood = state.goodsListState.editGood;
|
|
1998
|
-
form = state.goodsListState.form;
|
|
1998
|
+
form = state.goodsListState.form;
|
|
1999
1999
|
|
|
2000
2000
|
if (!(!editGood || !form || state.goodsListState.importGoods.isVisibleDrawer || state.calculatingField)) {
|
|
2001
2001
|
_context.next = 4;
|
|
@@ -17640,7 +17640,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
17640
17640
|
placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
|
|
17641
17641
|
autoComplete: "off"
|
|
17642
17642
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
17643
|
-
span: 10 +
|
|
17643
|
+
span: 10 + riskspanW,
|
|
17644
17644
|
style: {
|
|
17645
17645
|
display: isExpand ? undefined : 'none'
|
|
17646
17646
|
}
|
|
@@ -17657,7 +17657,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
17657
17657
|
placeholder: "\u8BF7\u8F93\u5165\u8D2D\u4E70\u65B9\u5730\u5740",
|
|
17658
17658
|
autoComplete: "off"
|
|
17659
17659
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
17660
|
-
span: 10 +
|
|
17660
|
+
span: 10 + riskspanW,
|
|
17661
17661
|
style: {
|
|
17662
17662
|
display: isExpand ? undefined : 'none'
|
|
17663
17663
|
}
|
|
@@ -17671,22 +17671,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
17671
17671
|
readOnly: isReadOnly('buyerPhone'),
|
|
17672
17672
|
placeholder: "\u8BF7\u8F93\u5165\u7535\u8BDD",
|
|
17673
17673
|
autoComplete: "off"
|
|
17674
|
-
})))),
|
|
17675
|
-
span: 4,
|
|
17676
|
-
style: {
|
|
17677
|
-
display: isExpand ? undefined : 'none'
|
|
17678
|
-
}
|
|
17679
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
17680
|
-
colon: false
|
|
17681
|
-
}, getFieldDecorator('buyerAddressPhoneFlag', {
|
|
17682
|
-
valuePropName: 'checked'
|
|
17683
|
-
})( /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
17684
|
-
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
17685
|
-
disabled: isReadOnly('buyerAddressPhoneFlag'),
|
|
17686
|
-
style: {
|
|
17687
|
-
whiteSpace: 'nowrap'
|
|
17688
|
-
}
|
|
17689
|
-
}, "\u662F\u5426\u5C55\u793A")))), /*#__PURE__*/React.createElement(Col, {
|
|
17674
|
+
})))), /*#__PURE__*/React.createElement(Col, {
|
|
17690
17675
|
span: 10 + leqispanW,
|
|
17691
17676
|
style: {
|
|
17692
17677
|
display: isExpand ? undefined : 'none'
|
|
@@ -17778,7 +17763,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
17778
17763
|
placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
|
|
17779
17764
|
autoComplete: "off"
|
|
17780
17765
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
17781
|
-
span: 10 +
|
|
17766
|
+
span: 10 + riskspanW,
|
|
17782
17767
|
style: {
|
|
17783
17768
|
display: isExpand ? undefined : 'none'
|
|
17784
17769
|
}
|
|
@@ -17795,7 +17780,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
17795
17780
|
placeholder: "\u8BF7\u8F93\u5165\u9500\u552E\u65B9\u5730\u5740",
|
|
17796
17781
|
autoComplete: "off"
|
|
17797
17782
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
17798
|
-
span: 10 +
|
|
17783
|
+
span: 10 + riskspanW,
|
|
17799
17784
|
style: {
|
|
17800
17785
|
display: isExpand ? undefined : 'none'
|
|
17801
17786
|
}
|
|
@@ -17809,22 +17794,7 @@ var Stakeholder$1 = decorator(Form.create())(function (props) {
|
|
|
17809
17794
|
readOnly: isReadOnly('sellerPhone'),
|
|
17810
17795
|
placeholder: "\u8BF7\u8F93\u5165\u7535\u8BDD",
|
|
17811
17796
|
autoComplete: "off"
|
|
17812
|
-
})))),
|
|
17813
|
-
span: 4,
|
|
17814
|
-
style: {
|
|
17815
|
-
display: isExpand ? undefined : 'none'
|
|
17816
|
-
}
|
|
17817
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
17818
|
-
colon: false
|
|
17819
|
-
}, getFieldDecorator('sellerAddressPhoneFlag', {
|
|
17820
|
-
valuePropName: 'checked'
|
|
17821
|
-
})( /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
17822
|
-
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
17823
|
-
disabled: isReadOnly('sellerAddressPhoneFlag'),
|
|
17824
|
-
style: {
|
|
17825
|
-
whiteSpace: 'nowrap'
|
|
17826
|
-
}
|
|
17827
|
-
}, "\u662F\u5426\u5C55\u793A")))), /*#__PURE__*/React.createElement(Col, {
|
|
17797
|
+
})))), /*#__PURE__*/React.createElement(Col, {
|
|
17828
17798
|
span: 10 + leqispanW,
|
|
17829
17799
|
style: {
|
|
17830
17800
|
display: isExpand ? undefined : 'none'
|
|
@@ -18311,7 +18281,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
|
|
|
18311
18281
|
placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
|
|
18312
18282
|
autoComplete: "off"
|
|
18313
18283
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
18314
|
-
span: 10 +
|
|
18284
|
+
span: 10 + riskspanW,
|
|
18315
18285
|
style: {
|
|
18316
18286
|
display: isExpand ? undefined : 'none'
|
|
18317
18287
|
}
|
|
@@ -18328,7 +18298,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
|
|
|
18328
18298
|
placeholder: "\u8BF7\u8F93\u5165\u9500\u552E\u65B9\u5730\u5740",
|
|
18329
18299
|
autoComplete: "off"
|
|
18330
18300
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
18331
|
-
span: 10 +
|
|
18301
|
+
span: 10 + riskspanW,
|
|
18332
18302
|
style: {
|
|
18333
18303
|
display: isExpand ? undefined : 'none'
|
|
18334
18304
|
}
|
|
@@ -18356,22 +18326,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
|
|
|
18356
18326
|
readOnly: isReadOnly('sellerBank'),
|
|
18357
18327
|
placeholder: "\u8BF7\u8F93\u5165\u9500\u552E\u65B9\u5F00\u6237\u94F6\u884C",
|
|
18358
18328
|
autoComplete: "off"
|
|
18359
|
-
})))),
|
|
18360
|
-
span: 4,
|
|
18361
|
-
style: {
|
|
18362
|
-
display: isExpand ? undefined : 'none'
|
|
18363
|
-
}
|
|
18364
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
18365
|
-
colon: false
|
|
18366
|
-
}, getFieldDecorator('sellerAddressPhoneFlag', {
|
|
18367
|
-
valuePropName: 'checked'
|
|
18368
|
-
})( /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
18369
|
-
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
18370
|
-
disabled: isReadOnly('sellerAddressPhoneFlag'),
|
|
18371
|
-
style: {
|
|
18372
|
-
whiteSpace: 'nowrap'
|
|
18373
|
-
}
|
|
18374
|
-
}, "\u662F\u5426\u5C55\u793A")))), /*#__PURE__*/React.createElement(Col, {
|
|
18329
|
+
})))), /*#__PURE__*/React.createElement(Col, {
|
|
18375
18330
|
span: 10 + leqispanW,
|
|
18376
18331
|
style: {
|
|
18377
18332
|
display: isExpand ? undefined : 'none'
|
|
@@ -18466,7 +18421,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
|
|
|
18466
18421
|
placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
|
|
18467
18422
|
autoComplete: "off"
|
|
18468
18423
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
18469
|
-
span: 10 +
|
|
18424
|
+
span: 10 + riskspanW,
|
|
18470
18425
|
style: {
|
|
18471
18426
|
display: isExpand ? undefined : 'none'
|
|
18472
18427
|
}
|
|
@@ -18483,7 +18438,7 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
|
|
|
18483
18438
|
placeholder: "\u8BF7\u8F93\u5165\u8D2D\u4E70\u65B9\u5730\u5740",
|
|
18484
18439
|
autoComplete: "off"
|
|
18485
18440
|
})))), /*#__PURE__*/React.createElement(Col, {
|
|
18486
|
-
span: 10 +
|
|
18441
|
+
span: 10 + riskspanW,
|
|
18487
18442
|
style: {
|
|
18488
18443
|
display: isExpand ? undefined : 'none'
|
|
18489
18444
|
}
|
|
@@ -18516,20 +18471,6 @@ var StakeFarmerholder = decorator(Form.create())(function (props) {
|
|
|
18516
18471
|
style: {
|
|
18517
18472
|
display: isExpand ? undefined : 'none'
|
|
18518
18473
|
}
|
|
18519
|
-
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
18520
|
-
label: "\u8D2D\u4E70\u65B9\u5F00\u6237\u94F6\u884C",
|
|
18521
|
-
colon: false
|
|
18522
|
-
}, getFieldDecorator('buyerBank', {
|
|
18523
|
-
rules: getRules('buyerBank', RULES$1.bankName('购买方开户银行'))
|
|
18524
|
-
})( /*#__PURE__*/React.createElement(MyInput$2, {
|
|
18525
|
-
readOnly: isReadOnly('buyerBank'),
|
|
18526
|
-
placeholder: "\u8BF7\u8F93\u5165\u8D2D\u4E70\u65B9\u5F00\u6237\u94F6\u884C",
|
|
18527
|
-
autoComplete: "off"
|
|
18528
|
-
})))), /*#__PURE__*/React.createElement(Col, {
|
|
18529
|
-
span: 10 + leqispanW,
|
|
18530
|
-
style: {
|
|
18531
|
-
display: isExpand ? undefined : 'none'
|
|
18532
|
-
}
|
|
18533
18474
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
18534
18475
|
label: "\u94F6\u884C\u8D26\u53F7",
|
|
18535
18476
|
colon: false
|
|
@@ -18904,7 +18845,7 @@ var css_248z$j = ".kts-invoice-operate-goods-table-virtual .ktsAntX-table-body {
|
|
|
18904
18845
|
styleInject(css_248z$j);
|
|
18905
18846
|
|
|
18906
18847
|
function TableVirtual$1 (props) {
|
|
18907
|
-
var _props$
|
|
18848
|
+
var _props$dataSource2;
|
|
18908
18849
|
|
|
18909
18850
|
var _React$useState = React.useState(null),
|
|
18910
18851
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -18946,10 +18887,8 @@ function TableVirtual$1 (props) {
|
|
|
18946
18887
|
}, [self, tableBody]); // 设置占位dom的搞
|
|
18947
18888
|
|
|
18948
18889
|
var placeholderHeight = React.useMemo(function () {
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
if (!self || !rowHeight || !dataSource || !placeholder) return;
|
|
18952
|
-
var placeholderHeight = rowHeight * dataSource.length;
|
|
18890
|
+
if (!self || !rowHeight || !props.dataSource || !placeholder) return;
|
|
18891
|
+
var placeholderHeight = rowHeight * props.dataSource.length;
|
|
18953
18892
|
placeholder.style.height = "".concat(placeholderHeight, "px");
|
|
18954
18893
|
return placeholderHeight;
|
|
18955
18894
|
}, [self, rowHeight, props.dataSource, placeholder]);
|
|
@@ -18961,12 +18900,12 @@ function TableVirtual$1 (props) {
|
|
|
18961
18900
|
}, [tableBody, rowHeight, placeholderHeight]); // 计算渲染的行
|
|
18962
18901
|
|
|
18963
18902
|
var dataSource = React.useMemo(function () {
|
|
18964
|
-
var _props$
|
|
18903
|
+
var _props$dataSource;
|
|
18965
18904
|
|
|
18966
18905
|
if (!props.dataSource) return [];
|
|
18967
18906
|
if (props.dataSource.length < 10) return props.dataSource;
|
|
18968
18907
|
if (!rowSize) return [props.dataSource[0]];
|
|
18969
|
-
return (_props$
|
|
18908
|
+
return (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.slice(pointer, pointer + 2 * rowSize);
|
|
18970
18909
|
}, [props.dataSource, pointer, rowSize]); // 监听滚动
|
|
18971
18910
|
|
|
18972
18911
|
React.useEffect(function () {
|
|
@@ -18985,24 +18924,17 @@ function TableVirtual$1 (props) {
|
|
|
18985
18924
|
}, [self, placeholder, props.dataSource, rowHeight, rowSize]); // 移动列表
|
|
18986
18925
|
|
|
18987
18926
|
React.useEffect(function () {
|
|
18988
|
-
var _props$dataSource3;
|
|
18989
|
-
|
|
18990
18927
|
if (!self) return;
|
|
18991
18928
|
var table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table');
|
|
18992
18929
|
if (!table) return;
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
table.style.top = '0px';
|
|
18996
|
-
} else {
|
|
18997
|
-
table.style.top = "".concat(pointer * rowHeight, "px");
|
|
18998
|
-
}
|
|
18999
|
-
}, [pointer, self, rowHeight, (_props$dataSource4 = props.dataSource) === null || _props$dataSource4 === void 0 ? void 0 : _props$dataSource4.length]);
|
|
18930
|
+
table.style.top = "".concat(pointer * rowHeight, "px");
|
|
18931
|
+
}, [pointer, self, rowHeight]);
|
|
19000
18932
|
React.useEffect(function () {
|
|
19001
18933
|
if (!self) return;
|
|
19002
18934
|
var cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
|
|
19003
18935
|
if (!cont) return;
|
|
19004
18936
|
cont.scrollTop = 0;
|
|
19005
|
-
}, [(_props$
|
|
18937
|
+
}, [(_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.length]);
|
|
19006
18938
|
return /*#__PURE__*/React.createElement("span", {
|
|
19007
18939
|
className: "kts-invoice-operate-goods-table-virtual",
|
|
19008
18940
|
ref: function ref(e) {
|
|
@@ -21994,34 +21926,24 @@ var useColumns$1 = (function (form) {
|
|
|
21994
21926
|
while (1) {
|
|
21995
21927
|
switch (_context6.prev = _context6.next) {
|
|
21996
21928
|
case 0:
|
|
21997
|
-
|
|
21998
|
-
_context6.next = 10;
|
|
21999
|
-
break;
|
|
22000
|
-
}
|
|
22001
|
-
|
|
22002
|
-
_context6.next = 3;
|
|
21929
|
+
_context6.next = 2;
|
|
22003
21930
|
return controller.wait();
|
|
22004
21931
|
|
|
22005
|
-
case
|
|
21932
|
+
case 2:
|
|
22006
21933
|
isvalue = !!value || value === 0;
|
|
22007
21934
|
isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
|
|
22008
21935
|
|
|
22009
21936
|
if (!(isvalue || isPrice === isvalue)) {
|
|
22010
|
-
_context6.next =
|
|
21937
|
+
_context6.next = 6;
|
|
22011
21938
|
break;
|
|
22012
21939
|
}
|
|
22013
21940
|
|
|
22014
21941
|
return _context6.abrupt("return");
|
|
22015
21942
|
|
|
22016
|
-
case
|
|
21943
|
+
case 6:
|
|
22017
21944
|
callback('请输入数量');
|
|
22018
|
-
_context6.next = 11;
|
|
22019
|
-
break;
|
|
22020
|
-
|
|
22021
|
-
case 10:
|
|
22022
|
-
callback();
|
|
22023
21945
|
|
|
22024
|
-
case
|
|
21946
|
+
case 7:
|
|
22025
21947
|
case "end":
|
|
22026
21948
|
return _context6.stop();
|
|
22027
21949
|
}
|
|
@@ -22310,7 +22232,7 @@ var useColumns$1 = (function (form) {
|
|
|
22310
22232
|
style: {
|
|
22311
22233
|
padding: '0 10px'
|
|
22312
22234
|
}
|
|
22313
|
-
},
|
|
22235
|
+
}, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22314
22236
|
}
|
|
22315
22237
|
}
|
|
22316
22238
|
}, {
|
|
@@ -22373,7 +22295,7 @@ var useColumns$1 = (function (form) {
|
|
|
22373
22295
|
style: {
|
|
22374
22296
|
padding: '0 10px'
|
|
22375
22297
|
}
|
|
22376
|
-
},
|
|
22298
|
+
}, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22377
22299
|
}
|
|
22378
22300
|
}
|
|
22379
22301
|
}, {
|
|
@@ -22416,7 +22338,7 @@ var useColumns$1 = (function (form) {
|
|
|
22416
22338
|
}, e, "%");
|
|
22417
22339
|
}))));
|
|
22418
22340
|
} else {
|
|
22419
|
-
if (value || value === '0'
|
|
22341
|
+
if (value || value === '0') {
|
|
22420
22342
|
return /*#__PURE__*/React.createElement("span", {
|
|
22421
22343
|
style: {
|
|
22422
22344
|
padding: '0 10px'
|
|
@@ -22485,7 +22407,7 @@ var useColumns$1 = (function (form) {
|
|
|
22485
22407
|
style: {
|
|
22486
22408
|
padding: '0 10px'
|
|
22487
22409
|
}
|
|
22488
|
-
}, isDutyFree$1(record) ? '***' :
|
|
22410
|
+
}, isDutyFree$1(record) ? '***' : parseFloat(value).toFixed(2));
|
|
22489
22411
|
}
|
|
22490
22412
|
}
|
|
22491
22413
|
}] // 含税不含税
|
package/dist/index.js
CHANGED
|
@@ -2005,7 +2005,7 @@ var saveEditGood = /*#__PURE__*/(function () {
|
|
|
2005
2005
|
switch (_context.prev = _context.next) {
|
|
2006
2006
|
case 0:
|
|
2007
2007
|
editGood = state.goodsListState.editGood;
|
|
2008
|
-
form = state.goodsListState.form;
|
|
2008
|
+
form = state.goodsListState.form;
|
|
2009
2009
|
|
|
2010
2010
|
if (!(!editGood || !form || state.goodsListState.importGoods.isVisibleDrawer || state.calculatingField)) {
|
|
2011
2011
|
_context.next = 4;
|
|
@@ -17650,7 +17650,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
17650
17650
|
placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
|
|
17651
17651
|
autoComplete: "off"
|
|
17652
17652
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
17653
|
-
span: 10 +
|
|
17653
|
+
span: 10 + riskspanW,
|
|
17654
17654
|
style: {
|
|
17655
17655
|
display: isExpand ? undefined : 'none'
|
|
17656
17656
|
}
|
|
@@ -17667,7 +17667,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
17667
17667
|
placeholder: "\u8BF7\u8F93\u5165\u8D2D\u4E70\u65B9\u5730\u5740",
|
|
17668
17668
|
autoComplete: "off"
|
|
17669
17669
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
17670
|
-
span: 10 +
|
|
17670
|
+
span: 10 + riskspanW,
|
|
17671
17671
|
style: {
|
|
17672
17672
|
display: isExpand ? undefined : 'none'
|
|
17673
17673
|
}
|
|
@@ -17681,22 +17681,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
17681
17681
|
readOnly: isReadOnly('buyerPhone'),
|
|
17682
17682
|
placeholder: "\u8BF7\u8F93\u5165\u7535\u8BDD",
|
|
17683
17683
|
autoComplete: "off"
|
|
17684
|
-
})))),
|
|
17685
|
-
span: 4,
|
|
17686
|
-
style: {
|
|
17687
|
-
display: isExpand ? undefined : 'none'
|
|
17688
|
-
}
|
|
17689
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
17690
|
-
colon: false
|
|
17691
|
-
}, getFieldDecorator('buyerAddressPhoneFlag', {
|
|
17692
|
-
valuePropName: 'checked'
|
|
17693
|
-
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
|
|
17694
|
-
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
17695
|
-
disabled: isReadOnly('buyerAddressPhoneFlag'),
|
|
17696
|
-
style: {
|
|
17697
|
-
whiteSpace: 'nowrap'
|
|
17698
|
-
}
|
|
17699
|
-
}, "\u662F\u5426\u5C55\u793A")))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
17684
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
17700
17685
|
span: 10 + leqispanW,
|
|
17701
17686
|
style: {
|
|
17702
17687
|
display: isExpand ? undefined : 'none'
|
|
@@ -17788,7 +17773,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
17788
17773
|
placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
|
|
17789
17774
|
autoComplete: "off"
|
|
17790
17775
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
17791
|
-
span: 10 +
|
|
17776
|
+
span: 10 + riskspanW,
|
|
17792
17777
|
style: {
|
|
17793
17778
|
display: isExpand ? undefined : 'none'
|
|
17794
17779
|
}
|
|
@@ -17805,7 +17790,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
17805
17790
|
placeholder: "\u8BF7\u8F93\u5165\u9500\u552E\u65B9\u5730\u5740",
|
|
17806
17791
|
autoComplete: "off"
|
|
17807
17792
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
17808
|
-
span: 10 +
|
|
17793
|
+
span: 10 + riskspanW,
|
|
17809
17794
|
style: {
|
|
17810
17795
|
display: isExpand ? undefined : 'none'
|
|
17811
17796
|
}
|
|
@@ -17819,22 +17804,7 @@ var Stakeholder$1 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fu
|
|
|
17819
17804
|
readOnly: isReadOnly('sellerPhone'),
|
|
17820
17805
|
placeholder: "\u8BF7\u8F93\u5165\u7535\u8BDD",
|
|
17821
17806
|
autoComplete: "off"
|
|
17822
|
-
})))),
|
|
17823
|
-
span: 4,
|
|
17824
|
-
style: {
|
|
17825
|
-
display: isExpand ? undefined : 'none'
|
|
17826
|
-
}
|
|
17827
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
17828
|
-
colon: false
|
|
17829
|
-
}, getFieldDecorator('sellerAddressPhoneFlag', {
|
|
17830
|
-
valuePropName: 'checked'
|
|
17831
|
-
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
|
|
17832
|
-
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
17833
|
-
disabled: isReadOnly('sellerAddressPhoneFlag'),
|
|
17834
|
-
style: {
|
|
17835
|
-
whiteSpace: 'nowrap'
|
|
17836
|
-
}
|
|
17837
|
-
}, "\u662F\u5426\u5C55\u793A")))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
17807
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
17838
17808
|
span: 10 + leqispanW,
|
|
17839
17809
|
style: {
|
|
17840
17810
|
display: isExpand ? undefined : 'none'
|
|
@@ -18321,7 +18291,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
18321
18291
|
placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
|
|
18322
18292
|
autoComplete: "off"
|
|
18323
18293
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
18324
|
-
span: 10 +
|
|
18294
|
+
span: 10 + riskspanW,
|
|
18325
18295
|
style: {
|
|
18326
18296
|
display: isExpand ? undefined : 'none'
|
|
18327
18297
|
}
|
|
@@ -18338,7 +18308,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
18338
18308
|
placeholder: "\u8BF7\u8F93\u5165\u9500\u552E\u65B9\u5730\u5740",
|
|
18339
18309
|
autoComplete: "off"
|
|
18340
18310
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
18341
|
-
span: 10 +
|
|
18311
|
+
span: 10 + riskspanW,
|
|
18342
18312
|
style: {
|
|
18343
18313
|
display: isExpand ? undefined : 'none'
|
|
18344
18314
|
}
|
|
@@ -18366,22 +18336,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
18366
18336
|
readOnly: isReadOnly('sellerBank'),
|
|
18367
18337
|
placeholder: "\u8BF7\u8F93\u5165\u9500\u552E\u65B9\u5F00\u6237\u94F6\u884C",
|
|
18368
18338
|
autoComplete: "off"
|
|
18369
|
-
})))),
|
|
18370
|
-
span: 4,
|
|
18371
|
-
style: {
|
|
18372
|
-
display: isExpand ? undefined : 'none'
|
|
18373
|
-
}
|
|
18374
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
18375
|
-
colon: false
|
|
18376
|
-
}, getFieldDecorator('sellerAddressPhoneFlag', {
|
|
18377
|
-
valuePropName: 'checked'
|
|
18378
|
-
})( /*#__PURE__*/React__default['default'].createElement(ktsXui.Checkbox, {
|
|
18379
|
-
onChange: props === null || props === void 0 ? void 0 : props.invoiceMarkCallback,
|
|
18380
|
-
disabled: isReadOnly('sellerAddressPhoneFlag'),
|
|
18381
|
-
style: {
|
|
18382
|
-
whiteSpace: 'nowrap'
|
|
18383
|
-
}
|
|
18384
|
-
}, "\u662F\u5426\u5C55\u793A")))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
18339
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
18385
18340
|
span: 10 + leqispanW,
|
|
18386
18341
|
style: {
|
|
18387
18342
|
display: isExpand ? undefined : 'none'
|
|
@@ -18476,7 +18431,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
18476
18431
|
placeholder: "\u8BF7\u8F93\u5165\u7EDF\u4E00\u793E\u4F1A\u4FE1\u7528\u4EE3\u7801/\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",
|
|
18477
18432
|
autoComplete: "off"
|
|
18478
18433
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
18479
|
-
span: 10 +
|
|
18434
|
+
span: 10 + riskspanW,
|
|
18480
18435
|
style: {
|
|
18481
18436
|
display: isExpand ? undefined : 'none'
|
|
18482
18437
|
}
|
|
@@ -18493,7 +18448,7 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
18493
18448
|
placeholder: "\u8BF7\u8F93\u5165\u8D2D\u4E70\u65B9\u5730\u5740",
|
|
18494
18449
|
autoComplete: "off"
|
|
18495
18450
|
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
18496
|
-
span: 10 +
|
|
18451
|
+
span: 10 + riskspanW,
|
|
18497
18452
|
style: {
|
|
18498
18453
|
display: isExpand ? undefined : 'none'
|
|
18499
18454
|
}
|
|
@@ -18526,20 +18481,6 @@ var StakeFarmerholder = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create()
|
|
|
18526
18481
|
style: {
|
|
18527
18482
|
display: isExpand ? undefined : 'none'
|
|
18528
18483
|
}
|
|
18529
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
18530
|
-
label: "\u8D2D\u4E70\u65B9\u5F00\u6237\u94F6\u884C",
|
|
18531
|
-
colon: false
|
|
18532
|
-
}, getFieldDecorator('buyerBank', {
|
|
18533
|
-
rules: getRules('buyerBank', RULES$1.bankName('购买方开户银行'))
|
|
18534
|
-
})( /*#__PURE__*/React__default['default'].createElement(MyInput$2, {
|
|
18535
|
-
readOnly: isReadOnly('buyerBank'),
|
|
18536
|
-
placeholder: "\u8BF7\u8F93\u5165\u8D2D\u4E70\u65B9\u5F00\u6237\u94F6\u884C",
|
|
18537
|
-
autoComplete: "off"
|
|
18538
|
-
})))), /*#__PURE__*/React__default['default'].createElement(ktsXui.Col, {
|
|
18539
|
-
span: 10 + leqispanW,
|
|
18540
|
-
style: {
|
|
18541
|
-
display: isExpand ? undefined : 'none'
|
|
18542
|
-
}
|
|
18543
18484
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
18544
18485
|
label: "\u94F6\u884C\u8D26\u53F7",
|
|
18545
18486
|
colon: false
|
|
@@ -18914,7 +18855,7 @@ var css_248z$j = ".kts-invoice-operate-goods-table-virtual .ktsAntX-table-body {
|
|
|
18914
18855
|
styleInject(css_248z$j);
|
|
18915
18856
|
|
|
18916
18857
|
function TableVirtual$1 (props) {
|
|
18917
|
-
var _props$
|
|
18858
|
+
var _props$dataSource2;
|
|
18918
18859
|
|
|
18919
18860
|
var _React$useState = React__default['default'].useState(null),
|
|
18920
18861
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -18956,10 +18897,8 @@ function TableVirtual$1 (props) {
|
|
|
18956
18897
|
}, [self, tableBody]); // 设置占位dom的搞
|
|
18957
18898
|
|
|
18958
18899
|
var placeholderHeight = React__default['default'].useMemo(function () {
|
|
18959
|
-
|
|
18960
|
-
|
|
18961
|
-
if (!self || !rowHeight || !dataSource || !placeholder) return;
|
|
18962
|
-
var placeholderHeight = rowHeight * dataSource.length;
|
|
18900
|
+
if (!self || !rowHeight || !props.dataSource || !placeholder) return;
|
|
18901
|
+
var placeholderHeight = rowHeight * props.dataSource.length;
|
|
18963
18902
|
placeholder.style.height = "".concat(placeholderHeight, "px");
|
|
18964
18903
|
return placeholderHeight;
|
|
18965
18904
|
}, [self, rowHeight, props.dataSource, placeholder]);
|
|
@@ -18971,12 +18910,12 @@ function TableVirtual$1 (props) {
|
|
|
18971
18910
|
}, [tableBody, rowHeight, placeholderHeight]); // 计算渲染的行
|
|
18972
18911
|
|
|
18973
18912
|
var dataSource = React__default['default'].useMemo(function () {
|
|
18974
|
-
var _props$
|
|
18913
|
+
var _props$dataSource;
|
|
18975
18914
|
|
|
18976
18915
|
if (!props.dataSource) return [];
|
|
18977
18916
|
if (props.dataSource.length < 10) return props.dataSource;
|
|
18978
18917
|
if (!rowSize) return [props.dataSource[0]];
|
|
18979
|
-
return (_props$
|
|
18918
|
+
return (_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.slice(pointer, pointer + 2 * rowSize);
|
|
18980
18919
|
}, [props.dataSource, pointer, rowSize]); // 监听滚动
|
|
18981
18920
|
|
|
18982
18921
|
React__default['default'].useEffect(function () {
|
|
@@ -18995,24 +18934,17 @@ function TableVirtual$1 (props) {
|
|
|
18995
18934
|
}, [self, placeholder, props.dataSource, rowHeight, rowSize]); // 移动列表
|
|
18996
18935
|
|
|
18997
18936
|
React__default['default'].useEffect(function () {
|
|
18998
|
-
var _props$dataSource3;
|
|
18999
|
-
|
|
19000
18937
|
if (!self) return;
|
|
19001
18938
|
var table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table');
|
|
19002
18939
|
if (!table) return;
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
table.style.top = '0px';
|
|
19006
|
-
} else {
|
|
19007
|
-
table.style.top = "".concat(pointer * rowHeight, "px");
|
|
19008
|
-
}
|
|
19009
|
-
}, [pointer, self, rowHeight, (_props$dataSource4 = props.dataSource) === null || _props$dataSource4 === void 0 ? void 0 : _props$dataSource4.length]);
|
|
18940
|
+
table.style.top = "".concat(pointer * rowHeight, "px");
|
|
18941
|
+
}, [pointer, self, rowHeight]);
|
|
19010
18942
|
React__default['default'].useEffect(function () {
|
|
19011
18943
|
if (!self) return;
|
|
19012
18944
|
var cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
|
|
19013
18945
|
if (!cont) return;
|
|
19014
18946
|
cont.scrollTop = 0;
|
|
19015
|
-
}, [(_props$
|
|
18947
|
+
}, [(_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.length]);
|
|
19016
18948
|
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
19017
18949
|
className: "kts-invoice-operate-goods-table-virtual",
|
|
19018
18950
|
ref: function ref(e) {
|
|
@@ -22004,34 +21936,24 @@ var useColumns$1 = (function (form) {
|
|
|
22004
21936
|
while (1) {
|
|
22005
21937
|
switch (_context6.prev = _context6.next) {
|
|
22006
21938
|
case 0:
|
|
22007
|
-
|
|
22008
|
-
_context6.next = 10;
|
|
22009
|
-
break;
|
|
22010
|
-
}
|
|
22011
|
-
|
|
22012
|
-
_context6.next = 3;
|
|
21939
|
+
_context6.next = 2;
|
|
22013
21940
|
return controller.wait();
|
|
22014
21941
|
|
|
22015
|
-
case
|
|
21942
|
+
case 2:
|
|
22016
21943
|
isvalue = !!value || value === 0;
|
|
22017
21944
|
isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
|
|
22018
21945
|
|
|
22019
21946
|
if (!(isvalue || isPrice === isvalue)) {
|
|
22020
|
-
_context6.next =
|
|
21947
|
+
_context6.next = 6;
|
|
22021
21948
|
break;
|
|
22022
21949
|
}
|
|
22023
21950
|
|
|
22024
21951
|
return _context6.abrupt("return");
|
|
22025
21952
|
|
|
22026
|
-
case
|
|
21953
|
+
case 6:
|
|
22027
21954
|
callback('请输入数量');
|
|
22028
|
-
_context6.next = 11;
|
|
22029
|
-
break;
|
|
22030
|
-
|
|
22031
|
-
case 10:
|
|
22032
|
-
callback();
|
|
22033
21955
|
|
|
22034
|
-
case
|
|
21956
|
+
case 7:
|
|
22035
21957
|
case "end":
|
|
22036
21958
|
return _context6.stop();
|
|
22037
21959
|
}
|
|
@@ -22320,7 +22242,7 @@ var useColumns$1 = (function (form) {
|
|
|
22320
22242
|
style: {
|
|
22321
22243
|
padding: '0 10px'
|
|
22322
22244
|
}
|
|
22323
|
-
},
|
|
22245
|
+
}, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22324
22246
|
}
|
|
22325
22247
|
}
|
|
22326
22248
|
}, {
|
|
@@ -22383,7 +22305,7 @@ var useColumns$1 = (function (form) {
|
|
|
22383
22305
|
style: {
|
|
22384
22306
|
padding: '0 10px'
|
|
22385
22307
|
}
|
|
22386
|
-
},
|
|
22308
|
+
}, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
|
|
22387
22309
|
}
|
|
22388
22310
|
}
|
|
22389
22311
|
}, {
|
|
@@ -22426,7 +22348,7 @@ var useColumns$1 = (function (form) {
|
|
|
22426
22348
|
}, e, "%");
|
|
22427
22349
|
}))));
|
|
22428
22350
|
} else {
|
|
22429
|
-
if (value || value === '0'
|
|
22351
|
+
if (value || value === '0') {
|
|
22430
22352
|
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
22431
22353
|
style: {
|
|
22432
22354
|
padding: '0 10px'
|
|
@@ -22495,7 +22417,7 @@ var useColumns$1 = (function (form) {
|
|
|
22495
22417
|
style: {
|
|
22496
22418
|
padding: '0 10px'
|
|
22497
22419
|
}
|
|
22498
|
-
}, isDutyFree$1(record) ? '***' :
|
|
22420
|
+
}, isDutyFree$1(record) ? '***' : parseFloat(value).toFixed(2));
|
|
22499
22421
|
}
|
|
22500
22422
|
}
|
|
22501
22423
|
}] // 含税不含税
|
package/package.json
CHANGED
|
@@ -4,10 +4,10 @@ import { InvoiceControllerState } from '../';
|
|
|
4
4
|
* 保存正在编辑的货物
|
|
5
5
|
*/
|
|
6
6
|
export default async (state: InvoiceControllerState) => {
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
const editGood = state.goodsListState.editGood;
|
|
9
9
|
const form = state.goodsListState.form;
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
if (!editGood || !form || state.goodsListState.importGoods.isVisibleDrawer || state.calculatingField) return;
|
|
12
12
|
if ((await validateFields(form)).err) return;
|
|
13
13
|
|
|
@@ -257,16 +257,11 @@ export default (form: WrappedFormUtils) => {
|
|
|
257
257
|
{ pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '数量必须为数字' },
|
|
258
258
|
{
|
|
259
259
|
validator: async (_, value, callback) => {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (isvalue || isPrice === isvalue) return;
|
|
266
|
-
callback('请输入数量');
|
|
267
|
-
} else {
|
|
268
|
-
callback();
|
|
269
|
-
}
|
|
260
|
+
await controller.wait();
|
|
261
|
+
const isvalue = !!value || value === 0;
|
|
262
|
+
const isPrice = !!getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') || getFieldValue(isTaxIncluded ? 'priceIncludeTax' : 'priceExcludeTax') === 0;
|
|
263
|
+
if (isvalue || isPrice === isvalue) return;
|
|
264
|
+
callback('请输入数量');
|
|
270
265
|
}
|
|
271
266
|
}
|
|
272
267
|
],
|
|
@@ -421,7 +416,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
421
416
|
</Form.Item>
|
|
422
417
|
);
|
|
423
418
|
} else {
|
|
424
|
-
return <span style={{ padding: '0 10px' }}>{
|
|
419
|
+
return <span style={{ padding: '0 10px' }}>{formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
425
420
|
}
|
|
426
421
|
},
|
|
427
422
|
},
|
|
@@ -463,7 +458,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
463
458
|
</Form.Item>
|
|
464
459
|
);
|
|
465
460
|
} else {
|
|
466
|
-
return <span style={{ padding: '0 10px' }}>{
|
|
461
|
+
return <span style={{ padding: '0 10px' }}>{formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
|
|
467
462
|
}
|
|
468
463
|
},
|
|
469
464
|
},
|
|
@@ -508,7 +503,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
508
503
|
</Form.Item>
|
|
509
504
|
);
|
|
510
505
|
} else {
|
|
511
|
-
if (value || value === '0'
|
|
506
|
+
if (value || value === '0') {
|
|
512
507
|
return <span style={{ padding: '0 10px' }}>{isDutyFree(record) ? '免税' : `${value}%`}</span>;
|
|
513
508
|
} else {
|
|
514
509
|
return ''
|
|
@@ -523,7 +518,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
523
518
|
align: 'right',
|
|
524
519
|
width: 119,
|
|
525
520
|
render: (value: string, record: IGood) => {
|
|
526
|
-
if (editGood?.$index === record.$index && !disableds.includes('taxAmount')
|
|
521
|
+
if (editGood?.$index === record.$index && !disableds.includes('taxAmount')&& model !== 'prefab') {
|
|
527
522
|
return (
|
|
528
523
|
<Form.Item>
|
|
529
524
|
{getFieldDecorator('taxAmount', {
|
|
@@ -537,13 +532,13 @@ export default (form: WrappedFormUtils) => {
|
|
|
537
532
|
const lineAmountIncludeTax = editGood?.lineAmountIncludeTax || 0;
|
|
538
533
|
//不含税金额
|
|
539
534
|
// const lineAmountExcludeTax = lineAmountIncludeTax-value;
|
|
540
|
-
const lineAmountExcludeTax = chain(bignumber(lineAmountIncludeTax
|
|
535
|
+
const lineAmountExcludeTax = chain(bignumber(lineAmountIncludeTax||0)).subtract(bignumber(value||0));
|
|
541
536
|
const taxRate = editGood?.taxRate;
|
|
542
537
|
if (lineAmountExcludeTax && taxRate && lineAmountIncludeTax) {
|
|
543
538
|
// const total = bignumber(lineAmountExcludeTax * taxRate / 100);
|
|
544
|
-
const total = lineAmountExcludeTax.multiply(bignumber(taxRate
|
|
539
|
+
const total = lineAmountExcludeTax.multiply(bignumber(taxRate||0)).divide(bignumber(100));
|
|
545
540
|
// if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
|
|
546
|
-
if (Math.abs(total.subtract(bignumber(value
|
|
541
|
+
if (Math.abs(total.subtract(bignumber(value||0)).done().toNumber()) <= 0.01) {
|
|
547
542
|
callback();
|
|
548
543
|
} else {
|
|
549
544
|
callback('税额填写错误,请重新输入')
|
|
@@ -573,7 +568,7 @@ export default (form: WrappedFormUtils) => {
|
|
|
573
568
|
</Form.Item>
|
|
574
569
|
)
|
|
575
570
|
} else {
|
|
576
|
-
return <span style={{ padding: '0 10px' }}>{isDutyFree(record) ? '***' :
|
|
571
|
+
return <span style={{ padding: '0 10px' }}>{isDutyFree(record) ? '***' : parseFloat(value).toFixed(2)}</span>;
|
|
577
572
|
}
|
|
578
573
|
},
|
|
579
574
|
},
|
|
@@ -40,9 +40,8 @@ export default function <T extends object = any>(props: TableProps<T>) {
|
|
|
40
40
|
|
|
41
41
|
// 设置占位dom的搞
|
|
42
42
|
const placeholderHeight = React.useMemo(() => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const placeholderHeight = rowHeight * dataSource.length;
|
|
43
|
+
if (!self || !rowHeight || !props.dataSource || !placeholder) return;
|
|
44
|
+
const placeholderHeight = rowHeight * props.dataSource.length;
|
|
46
45
|
placeholder.style.height = `${placeholderHeight}px`;
|
|
47
46
|
return placeholderHeight;
|
|
48
47
|
}, [self, rowHeight, props.dataSource, placeholder]);
|
|
@@ -81,23 +80,19 @@ export default function <T extends object = any>(props: TableProps<T>) {
|
|
|
81
80
|
|
|
82
81
|
// 移动列表
|
|
83
82
|
React.useEffect(() => {
|
|
84
|
-
if (!self) return
|
|
83
|
+
if (!self) return;
|
|
85
84
|
|
|
86
85
|
const table = self.querySelector('.ktsAntX-table .ktsAntX-table-body>table') as HTMLDivElement;
|
|
87
|
-
|
|
88
86
|
if (!table) return;
|
|
89
|
-
if ((props.dataSource?.length || 0) < 10) {
|
|
90
|
-
table.style.top = '0px';
|
|
91
|
-
} else {
|
|
92
|
-
table.style.top = `${pointer * rowHeight}px`;
|
|
93
|
-
}
|
|
94
87
|
|
|
95
|
-
|
|
88
|
+
table.style.top = `${pointer * rowHeight}px`;
|
|
89
|
+
}, [pointer, self, rowHeight]);
|
|
96
90
|
|
|
97
91
|
React.useEffect(() => {
|
|
98
92
|
if (!self) return;
|
|
99
93
|
const cont = self.querySelector('.kts-invoice-operate-goods-table-virtual .ktsAntX-table-body');
|
|
100
94
|
if (!cont) return;
|
|
95
|
+
|
|
101
96
|
cont.scrollTop = 0;
|
|
102
97
|
}, [props.dataSource?.length])
|
|
103
98
|
|
|
@@ -30,7 +30,7 @@ const RULES = {
|
|
|
30
30
|
{ pattern: /^[0-9\s\-\+]+$/g, message: `${label}仅能数字、空格、-、+` }
|
|
31
31
|
],
|
|
32
32
|
sellerTelPhone: (label: string) => [
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
{ max: 100, message: `${label}内容超长` },
|
|
35
35
|
{ pattern: /^[0-9\s\-\+]+$/g, message: `${label}仅能数字、空格、-、+` }
|
|
36
36
|
],
|
|
@@ -206,7 +206,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
206
206
|
</Form.Item>
|
|
207
207
|
</Col>
|
|
208
208
|
|
|
209
|
-
<Col span={10
|
|
209
|
+
<Col span={10+riskspanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
210
210
|
<Form.Item label='销售方地址' colon={false}>
|
|
211
211
|
{getFieldDecorator('sellerAddress', {
|
|
212
212
|
rules: getRules('sellerAddress', [{ max: 300, message: '销售方地址内容超长' }])
|
|
@@ -214,7 +214,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
214
214
|
</Form.Item>
|
|
215
215
|
</Col>
|
|
216
216
|
|
|
217
|
-
<Col span={10
|
|
217
|
+
<Col span={10+riskspanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
218
218
|
<Form.Item label='电话' colon={false} className='telephone' >
|
|
219
219
|
{getFieldDecorator('sellerPhone', {
|
|
220
220
|
rules: getRules('sellerPhone', RULES.sellerTelPhone('销售方电话'))
|
|
@@ -229,15 +229,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
229
229
|
})(<MyInput readOnly={isReadOnly('sellerBank')} placeholder="请输入销售方开户银行" autoComplete="off" />)}
|
|
230
230
|
</Form.Item>
|
|
231
231
|
</Col>
|
|
232
|
-
|
|
233
|
-
<Col span={4} style={{ display: isExpand ? undefined : 'none' }}>
|
|
234
|
-
<Form.Item colon={false}>
|
|
235
|
-
{getFieldDecorator('sellerAddressPhoneFlag', {
|
|
236
|
-
valuePropName: 'checked',
|
|
237
|
-
})(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('sellerAddressPhoneFlag')} style={{ whiteSpace: 'nowrap' }}>是否展示</Checkbox>)}
|
|
238
|
-
</Form.Item>
|
|
239
|
-
</Col>
|
|
240
|
-
}
|
|
232
|
+
|
|
241
233
|
<Col span={10 + leqispanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
242
234
|
<Form.Item label='银行账号' colon={false}>
|
|
243
235
|
{getFieldDecorator('sellerAccount', {
|
|
@@ -249,8 +241,8 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
249
241
|
<Col span={4} style={{ display: isExpand ? undefined : 'none' }}>
|
|
250
242
|
<Form.Item colon={false}>
|
|
251
243
|
{getFieldDecorator('sellerBankAccountFlag', {
|
|
252
|
-
|
|
253
|
-
})(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('sellerBankAccountFlag')} style={{
|
|
244
|
+
valuePropName: 'checked',
|
|
245
|
+
})(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('sellerBankAccountFlag')} style={{whiteSpace:'nowrap'}}>是否展示</Checkbox>)}
|
|
254
246
|
</Form.Item>
|
|
255
247
|
</Col>
|
|
256
248
|
}
|
|
@@ -321,7 +313,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
321
313
|
</Form.Item>
|
|
322
314
|
</Col>
|
|
323
315
|
|
|
324
|
-
<Col span={10
|
|
316
|
+
<Col span={10+riskspanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
325
317
|
<Form.Item label='购买方地址' colon={false}>
|
|
326
318
|
{getFieldDecorator('buyerAddress', {
|
|
327
319
|
rules: getRules('buyerAddress', [{ max: 100, message: '购买方地址内容超长' }])
|
|
@@ -329,20 +321,14 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
329
321
|
</Form.Item>
|
|
330
322
|
</Col>
|
|
331
323
|
|
|
332
|
-
<Col span={10
|
|
324
|
+
<Col span={10+riskspanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
333
325
|
<Form.Item label='电话' colon={false} className='telephone'>
|
|
334
326
|
{getFieldDecorator('buyerPhone', {
|
|
335
327
|
rules: getRules('buyerPhone', RULES.buyerTelPhone('购买方电话'))
|
|
336
328
|
})(<MyInput readOnly={isReadOnly('buyerPhone')} placeholder="请输入电话" autoComplete="off" />)}
|
|
337
329
|
</Form.Item>
|
|
338
330
|
</Col>
|
|
339
|
-
|
|
340
|
-
<Form.Item label='购买方开户银行' colon={false}>
|
|
341
|
-
{getFieldDecorator('buyerBank', {
|
|
342
|
-
rules: getRules('buyerBank', RULES.bankName('购买方开户银行'))
|
|
343
|
-
})(<MyInput readOnly={isReadOnly('buyerBank')} placeholder="请输入购买方开户银行" autoComplete="off" />)}
|
|
344
|
-
</Form.Item>
|
|
345
|
-
</Col>
|
|
331
|
+
|
|
346
332
|
<Col span={10 + leqispanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
347
333
|
<Form.Item label='购买方开户银行' colon={false}>
|
|
348
334
|
{getFieldDecorator('buyerBank', {
|
|
@@ -360,10 +346,10 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
360
346
|
</Col>
|
|
361
347
|
{(props.leqi || props.riskData?.code === 'success') &&
|
|
362
348
|
<Col span={4} style={{ display: isExpand ? undefined : 'none' }}>
|
|
363
|
-
<Form.Item
|
|
349
|
+
<Form.Item colon={false}>
|
|
364
350
|
{getFieldDecorator('buyerBankAccountFlag', {
|
|
365
351
|
valuePropName: 'checked',
|
|
366
|
-
})(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('buyerBankAccountFlag')}
|
|
352
|
+
})(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('buyerBankAccountFlag')} style={{whiteSpace:'nowrap'}}>是否展示</Checkbox>)}
|
|
367
353
|
</Form.Item>
|
|
368
354
|
</Col>
|
|
369
355
|
}
|
|
@@ -428,19 +414,19 @@ function BuyerNameInput(props: InputProps & { fieldName: string; myform: Wrapped
|
|
|
428
414
|
const onSearch = React.useCallback(async (searchText: string) => {
|
|
429
415
|
await Discontinue.start();
|
|
430
416
|
try {
|
|
431
|
-
if (fieldName === 'buyerName') {
|
|
417
|
+
if (fieldName === 'buyerName' ) {
|
|
432
418
|
if (autoComplete.onBuyerNameSearch) {
|
|
433
419
|
setOptions(await autoComplete.onBuyerNameSearch(searchText));
|
|
434
420
|
}
|
|
435
|
-
} else if (fieldName === 'buyerTaxId') {
|
|
421
|
+
} else if (fieldName === 'buyerTaxId' ) {
|
|
436
422
|
if (autoComplete.onBuyerTaxIdSearch) {
|
|
437
423
|
setOptions(await autoComplete.onBuyerTaxIdSearch(searchText));
|
|
438
424
|
}
|
|
439
|
-
}
|
|
425
|
+
}else if(fieldName === 'supplierName'){
|
|
440
426
|
if (autoComplete.onSupplierNameSearch) {
|
|
441
427
|
setOptions(await autoComplete.onSupplierNameSearch(searchText));
|
|
442
428
|
}
|
|
443
|
-
}
|
|
429
|
+
}else if(fieldName === 'supplierTaxId'){
|
|
444
430
|
if (autoComplete.onSupplierTaxIdSearch) {
|
|
445
431
|
setOptions(await autoComplete.onSupplierTaxIdSearch(searchText));
|
|
446
432
|
}
|
|
@@ -200,7 +200,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
200
200
|
</Form.Item>
|
|
201
201
|
</Col>
|
|
202
202
|
|
|
203
|
-
<Col span={10+
|
|
203
|
+
<Col span={10+riskspanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
204
204
|
<Form.Item label='购买方地址' colon={false}>
|
|
205
205
|
{getFieldDecorator('buyerAddress', {
|
|
206
206
|
rules: getRules('buyerAddress', [{ max: 100, message: '购买方地址内容超长' }])
|
|
@@ -208,22 +208,13 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
208
208
|
</Form.Item>
|
|
209
209
|
</Col>
|
|
210
210
|
|
|
211
|
-
<Col span={10+
|
|
211
|
+
<Col span={10+riskspanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
212
212
|
<Form.Item label='电话' colon={false} className='telephone'>
|
|
213
213
|
{getFieldDecorator('buyerPhone', {
|
|
214
214
|
rules: getRules('buyerPhone', RULES.buyerTelPhone('购买方电话'))
|
|
215
215
|
})(<MyInput readOnly={isReadOnly('buyerPhone')} placeholder="请输入电话" autoComplete="off" />)}
|
|
216
216
|
</Form.Item>
|
|
217
217
|
</Col>
|
|
218
|
-
{(props.leqi) &&
|
|
219
|
-
<Col span={4} style={{ display: isExpand ? undefined : 'none' }}>
|
|
220
|
-
<Form.Item colon={false}>
|
|
221
|
-
{getFieldDecorator('buyerAddressPhoneFlag', {
|
|
222
|
-
valuePropName: 'checked',
|
|
223
|
-
})(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('buyerAddressPhoneFlag')} style={{whiteSpace:'nowrap'}}>是否展示</Checkbox>)}
|
|
224
|
-
</Form.Item>
|
|
225
|
-
</Col>
|
|
226
|
-
}
|
|
227
218
|
<Col span={10 + leqispanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
228
219
|
<Form.Item label='购买方开户银行' colon={false}>
|
|
229
220
|
{getFieldDecorator('buyerBank', {
|
|
@@ -290,7 +281,7 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
290
281
|
</Form.Item>
|
|
291
282
|
</Col>
|
|
292
283
|
|
|
293
|
-
<Col span={10+
|
|
284
|
+
<Col span={10+riskspanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
294
285
|
<Form.Item label='销售方地址' colon={false}>
|
|
295
286
|
{getFieldDecorator('sellerAddress', {
|
|
296
287
|
rules: getRules('sellerAddress', [{ max: 300, message: '销售方地址内容超长' }])
|
|
@@ -298,22 +289,13 @@ export default decorator<IStakeholder, IStakeholder & FormComponentProps>(Form.c
|
|
|
298
289
|
</Form.Item>
|
|
299
290
|
</Col>
|
|
300
291
|
|
|
301
|
-
<Col span={10+
|
|
292
|
+
<Col span={10+riskspanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
302
293
|
<Form.Item label='电话' colon={false} className='telephone' >
|
|
303
294
|
{getFieldDecorator('sellerPhone', {
|
|
304
295
|
rules: getRules('sellerPhone', RULES.sellerTelPhone('销售方电话'))
|
|
305
296
|
})(<MyInput readOnly={isReadOnly('sellerPhone')} placeholder="请输入电话" autoComplete="off" />)}
|
|
306
297
|
</Form.Item>
|
|
307
298
|
</Col>
|
|
308
|
-
{(props.leqi) &&
|
|
309
|
-
<Col span={4} style={{ display: isExpand ? undefined : 'none' }}>
|
|
310
|
-
<Form.Item colon={false}>
|
|
311
|
-
{getFieldDecorator('sellerAddressPhoneFlag', {
|
|
312
|
-
valuePropName: 'checked',
|
|
313
|
-
})(<Checkbox onChange={props?.invoiceMarkCallback} disabled={isReadOnly('sellerAddressPhoneFlag')} style={{whiteSpace:'nowrap'}}>是否展示</Checkbox>)}
|
|
314
|
-
</Form.Item>
|
|
315
|
-
</Col>
|
|
316
|
-
}
|
|
317
299
|
<Col span={10 + leqispanW} style={{ display: isExpand ? undefined : 'none' }} >
|
|
318
300
|
<Form.Item label='销售方开户银行' colon={false}>
|
|
319
301
|
{getFieldDecorator('sellerBank', {
|