kts-component-invoice-operate 3.2.254 → 3.2.256

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
@@ -14865,7 +14865,7 @@ var useColumns = (function (form) {
14865
14865
 
14866
14866
  if (lineAmountExcludeTax && (taxRate || taxRate === 0) && lineAmountIncludeTax) {
14867
14867
  // const total = bignumber(lineAmountExcludeTax * taxRate / 100);
14868
- var total = chain$1(bignumber(lineAmountExcludeTax)).multiply(bignumber(taxRate || 0)).divide(bignumber(100)); // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
14868
+ var total = chain$1(bignumber(lineAmountExcludeTax)).multiply(bignumber(taxRate || 0)).divide(bignumber(100)); // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
14869
14869
 
14870
14870
  if (Math.abs(total.subtract(bignumber(value || 0)).done().toNumber()) <= 0.06) {
14871
14871
  callback();
@@ -24174,7 +24174,7 @@ var useColumns$1 = (function (form) {
24174
24174
 
24175
24175
  if (lineAmountExcludeTax && (taxRate || taxRate === 0) && lineAmountIncludeTax) {
24176
24176
  // const total = bignumber(lineAmountExcludeTax * taxRate / 100);
24177
- var total = chain$1(bignumber(lineAmountExcludeTax)).multiply(bignumber(taxRate || 0)).divide(bignumber(100)); // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
24177
+ var total = chain$1(bignumber(lineAmountExcludeTax)).multiply(bignumber(taxRate || 0)).divide(bignumber(100)); // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
24178
24178
 
24179
24179
  if (Math.abs(total.subtract(bignumber(value || 0)).done().toNumber()) <= 0.06) {
24180
24180
  callback();
@@ -26198,6 +26198,9 @@ var RangePicker = DatePicker.RangePicker;
26198
26198
  var RealEstateInfo = decorator(Form.create())(function (props) {
26199
26199
  /** 控制器 */
26200
26200
  var controller = Invoice.useInvoiceController();
26201
+ var editGood = controller.useMemo(function (s) {
26202
+ return s.goodsListState.editGood;
26203
+ }, []);
26201
26204
  var form = props.form;
26202
26205
  var getFieldDecorator = form.getFieldDecorator;
26203
26206
  var model = controller.useMemo(function (s) {
@@ -26268,7 +26271,7 @@ var RealEstateInfo = decorator(Form.create())(function (props) {
26268
26271
  return item.lineAttribute !== 1;
26269
26272
  }).map(function (item, index) {
26270
26273
  if (item.lineAttribute !== 1) {
26271
- var isParkFeeItem = isParkFee(item.taxClassificationCode);
26274
+ var isParkFeeItem = (editGood === null || editGood === void 0 ? void 0 : editGood.$index) === item.$index ? isParkFee(editGood.taxClassificationCode) : isParkFee(item.taxClassificationCode);
26272
26275
  return /*#__PURE__*/React.createElement(Row$1, {
26273
26276
  gutter: [17, 0]
26274
26277
  }, /*#__PURE__*/React.createElement(Col$1, {
package/dist/index.js CHANGED
@@ -14875,7 +14875,7 @@ var useColumns = (function (form) {
14875
14875
 
14876
14876
  if (lineAmountExcludeTax && (taxRate || taxRate === 0) && lineAmountIncludeTax) {
14877
14877
  // const total = bignumber(lineAmountExcludeTax * taxRate / 100);
14878
- var total = mathjs.chain(mathjs.bignumber(lineAmountExcludeTax)).multiply(mathjs.bignumber(taxRate || 0)).divide(mathjs.bignumber(100)); // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
14878
+ var total = mathjs.chain(mathjs.bignumber(lineAmountExcludeTax)).multiply(mathjs.bignumber(taxRate || 0)).divide(mathjs.bignumber(100)); // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
14879
14879
 
14880
14880
  if (Math.abs(total.subtract(mathjs.bignumber(value || 0)).done().toNumber()) <= 0.06) {
14881
14881
  callback();
@@ -24184,7 +24184,7 @@ var useColumns$1 = (function (form) {
24184
24184
 
24185
24185
  if (lineAmountExcludeTax && (taxRate || taxRate === 0) && lineAmountIncludeTax) {
24186
24186
  // const total = bignumber(lineAmountExcludeTax * taxRate / 100);
24187
- var total = mathjs.chain(mathjs.bignumber(lineAmountExcludeTax)).multiply(mathjs.bignumber(taxRate || 0)).divide(mathjs.bignumber(100)); // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
24187
+ var total = mathjs.chain(mathjs.bignumber(lineAmountExcludeTax)).multiply(mathjs.bignumber(taxRate || 0)).divide(mathjs.bignumber(100)); // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
24188
24188
 
24189
24189
  if (Math.abs(total.subtract(mathjs.bignumber(value || 0)).done().toNumber()) <= 0.06) {
24190
24190
  callback();
@@ -26208,6 +26208,9 @@ var RangePicker = ktsComponentsAntdX4.DatePicker.RangePicker;
26208
26208
  var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
26209
26209
  /** 控制器 */
26210
26210
  var controller = Invoice.useInvoiceController();
26211
+ var editGood = controller.useMemo(function (s) {
26212
+ return s.goodsListState.editGood;
26213
+ }, []);
26211
26214
  var form = props.form;
26212
26215
  var getFieldDecorator = form.getFieldDecorator;
26213
26216
  var model = controller.useMemo(function (s) {
@@ -26278,7 +26281,7 @@ var RealEstateInfo = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(f
26278
26281
  return item.lineAttribute !== 1;
26279
26282
  }).map(function (item, index) {
26280
26283
  if (item.lineAttribute !== 1) {
26281
- var isParkFeeItem = isParkFee(item.taxClassificationCode);
26284
+ var isParkFeeItem = (editGood === null || editGood === void 0 ? void 0 : editGood.$index) === item.$index ? isParkFee(editGood.taxClassificationCode) : isParkFee(item.taxClassificationCode);
26282
26285
  return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Row, {
26283
26286
  gutter: [17, 0]
26284
26287
  }, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.254",
3
+ "version": "3.2.256",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -22,7 +22,7 @@ import {
22
22
  } from './autoFillFn';
23
23
  import { getItemNameWithShorthand } from '../../../../../tools/itemName';
24
24
  import Drag from './ui/Drag';
25
- import { nonScientificNotation } from '../../../../../tools/calculate';
25
+ import { format2, nonScientificNotation } from '../../../../../tools/calculate';
26
26
  import Expand from './ui/Expand';
27
27
  import { render } from 'react-dom';
28
28
 
@@ -574,8 +574,8 @@ export default (form: WrappedFormUtils) => {
574
574
  const taxRate = editGood?.taxRate;
575
575
  if (lineAmountExcludeTax && (taxRate || taxRate === 0) && lineAmountIncludeTax) {
576
576
  // const total = bignumber(lineAmountExcludeTax * taxRate / 100);
577
- const total = chain(bignumber(lineAmountExcludeTax)).multiply(bignumber(taxRate || 0)).divide(bignumber(100));
578
- // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
577
+ const total =chain(bignumber(lineAmountExcludeTax)).multiply(bignumber(taxRate || 0)).divide(bignumber(100));
578
+ // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
579
579
  if (Math.abs(total.subtract(bignumber(value || 0)).done().toNumber()) <= 0.06) {
580
580
  callback();
581
581
  } else {
@@ -22,7 +22,7 @@ import {
22
22
  onChangeTaxAmount,
23
23
  } from './autoFillFn';
24
24
  import Drag from './ui/Drag';
25
- import { nonScientificNotation } from '../../../../../tools/calculate';
25
+ import { format2, nonScientificNotation } from '../../../../../tools/calculate';
26
26
 
27
27
  export default (form: WrappedFormUtils) => {
28
28
  const { getFieldDecorator, getFieldValue } = form;
@@ -542,7 +542,7 @@ export default (form: WrappedFormUtils) => {
542
542
  if (lineAmountExcludeTax && (taxRate || taxRate === 0) && lineAmountIncludeTax) {
543
543
  // const total = bignumber(lineAmountExcludeTax * taxRate / 100);
544
544
  const total = chain(bignumber(lineAmountExcludeTax)).multiply(bignumber(taxRate || 0)).divide(bignumber(100));
545
- // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
545
+ // if (Number(Math.abs(Number(total) - Number(value)).toFixed(4)) <= 0.01) {
546
546
  if (Math.abs(total.subtract(bignumber(value || 0)).done().toNumber()) <= 0.06) {
547
547
  callback();
548
548
  } else {
@@ -27,7 +27,7 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
27
27
 
28
28
  /** 控制器 */
29
29
  const controller = Invoice.useInvoiceController();
30
-
30
+ const editGood = controller.useMemo(s => s.goodsListState.editGood, []);
31
31
  const { form } = props;
32
32
 
33
33
  const { getFieldDecorator } = form;
@@ -86,7 +86,7 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
86
86
  }
87
87
  return goodsList.filter(item => item.lineAttribute !== 1).map((item, index) => {
88
88
  if (item.lineAttribute !== 1) {
89
- const isParkFeeItem = isParkFee(item.taxClassificationCode)
89
+ const isParkFeeItem = editGood?.$index === item.$index ? isParkFee(editGood.taxClassificationCode) : isParkFee(item.taxClassificationCode)
90
90
  return <Row gutter={[17, 0]} >
91
91
  <Col span={6} >
92
92
  <Form.Item style={{ display: 'none' }}>
@@ -336,7 +336,7 @@ const LicensePlateNumber: React.FC<PriceInputProps> = (props) => {
336
336
  const onAdd = () => {
337
337
  if (value.length < licenceLimit) {
338
338
  setVal([...value, '']);
339
- }else{
339
+ } else {
340
340
  message.warn('最多支持填写3个车牌号')
341
341
  }
342
342
  }