kts-component-invoice-operate 3.2.209 → 3.2.210

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
@@ -19054,7 +19054,7 @@ var Statistics$1 = (function () {
19054
19054
  fontWeight: 'bold',
19055
19055
  marginLeft: 4
19056
19056
  }
19057
- }, toStringChinese(lineAmountIncludeTax))), /*#__PURE__*/React.createElement("div", {
19057
+ }, lineAmountIncludeTax === null ? '' : toStringChinese(lineAmountIncludeTax))), /*#__PURE__*/React.createElement("div", {
19058
19058
  style: {
19059
19059
  flex: 1
19060
19060
  }
@@ -19068,7 +19068,7 @@ var Statistics$1 = (function () {
19068
19068
  minWidth: 119,
19069
19069
  maxWidth: 300
19070
19070
  }
19071
- }, "\xA5", parseFloat(lineAmountIncludeTax).toFixed(2))));
19071
+ }, "\xA5", lineAmountIncludeTax === null ? '' : parseFloat(lineAmountIncludeTax).toFixed(2))));
19072
19072
  });
19073
19073
 
19074
19074
  var AddRowButton$1 = (function () {
@@ -22201,7 +22201,7 @@ var useColumns$1 = (function (form) {
22201
22201
  style: {
22202
22202
  padding: '0 10px'
22203
22203
  }
22204
- }, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
22204
+ }, value === null ? '' : formatSearch$1(parseFloat(value).toFixed(2), searchValue));
22205
22205
  }
22206
22206
  }
22207
22207
  }, {
package/dist/index.js CHANGED
@@ -19064,7 +19064,7 @@ var Statistics$1 = (function () {
19064
19064
  fontWeight: 'bold',
19065
19065
  marginLeft: 4
19066
19066
  }
19067
- }, toStringChinese(lineAmountIncludeTax))), /*#__PURE__*/React__default['default'].createElement("div", {
19067
+ }, lineAmountIncludeTax === null ? '' : toStringChinese(lineAmountIncludeTax))), /*#__PURE__*/React__default['default'].createElement("div", {
19068
19068
  style: {
19069
19069
  flex: 1
19070
19070
  }
@@ -19078,7 +19078,7 @@ var Statistics$1 = (function () {
19078
19078
  minWidth: 119,
19079
19079
  maxWidth: 300
19080
19080
  }
19081
- }, "\xA5", parseFloat(lineAmountIncludeTax).toFixed(2))));
19081
+ }, "\xA5", lineAmountIncludeTax === null ? '' : parseFloat(lineAmountIncludeTax).toFixed(2))));
19082
19082
  });
19083
19083
 
19084
19084
  var AddRowButton$1 = (function () {
@@ -22211,7 +22211,7 @@ var useColumns$1 = (function (form) {
22211
22211
  style: {
22212
22212
  padding: '0 10px'
22213
22213
  }
22214
- }, formatSearch$1(parseFloat(value).toFixed(2), searchValue));
22214
+ }, value === null ? '' : formatSearch$1(parseFloat(value).toFixed(2), searchValue));
22215
22215
  }
22216
22216
  }
22217
22217
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.209",
3
+ "version": "3.2.210",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -1,14 +1,16 @@
1
1
  import React from 'react';
2
2
  import Invoice from '../../..';
3
3
  import 'antd/dist/antd.css';
4
+ import { Money } from '../../../tools/utils';
4
5
  import { chain, bignumber } from 'mathjs';
5
6
  export default () => {
6
7
  const callback = (e: any) => {
7
8
  console.log(e.target.checked)
8
9
  }
9
- console.log(chain(bignumber(null)))
10
- console.log(chain(bignumber(5.01)).multiply(bignumber(5)).divide(bignumber(100)).done().toNumber())
11
- console.log(Math.abs(chain(bignumber(5.01)).multiply(bignumber(5)).divide(bignumber(100)).subtract(bignumber(0.24)).done().toNumber()))
10
+ console.log(Money.toStringChinese(0))
11
+ // console.log(chain(bignumber(null)))
12
+ // console.log(chain(bignumber(5.01)).multiply(bignumber(5)).divide(bignumber(100)).done().toNumber())
13
+ // console.log(Math.abs(chain(bignumber(5.01)).multiply(bignumber(5)).divide(bignumber(100)).subtract(bignumber(0.24)).done().toNumber()))
12
14
  const controller = React.useMemo(() => new Invoice.InvoiceController(), [])
13
15
 
14
16
  React.useEffect(() => {
@@ -453,7 +453,7 @@ export default (form: WrappedFormUtils) => {
453
453
  </Form.Item>
454
454
  );
455
455
  } else {
456
- return <span style={{ padding: '0 10px' }}>{formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
456
+ return <span style={{ padding: '0 10px' }}>{value === null ? '' :formatSearch(parseFloat(value).toFixed(2), searchValue)}</span>;
457
457
  }
458
458
  },
459
459
  },
@@ -87,11 +87,11 @@ export default () => {
87
87
  <div>价税合计(大写)</div>
88
88
  <div style={{ paddingLeft: 30 }} >
89
89
  <Icon style={{fontSize: 16}} component={ForkSvg} />
90
- <span style={{ fontWeight: 'bold', marginLeft: 4 }} >{Money.toStringChinese(lineAmountIncludeTax)}</span>
90
+ <span style={{ fontWeight: 'bold', marginLeft: 4 }} >{lineAmountIncludeTax === null ? '' :Money.toStringChinese(lineAmountIncludeTax)}</span>
91
91
  </div>
92
92
  <div style={{ flex: 1 }} />
93
93
  <div style={{ width: 90, color: '#9F613E' }} >(小写)</div>
94
- <div style={{ minWidth: 119, maxWidth: 300 }} >¥{parseFloat(lineAmountIncludeTax).toFixed(2)}</div>
94
+ <div style={{ minWidth: 119, maxWidth: 300 }} >¥{lineAmountIncludeTax === null ? '' :parseFloat(lineAmountIncludeTax).toFixed(2)}</div>
95
95
  </div>
96
96
  </div >
97
97
  );