kts-component-invoice-operate 3.2.181-16 → 3.2.181-17

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
@@ -9796,7 +9796,7 @@ var onChangeSwitchTax = /*#__PURE__*/function () {
9796
9796
  var lineAmountIncludeTax = format2(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)));
9797
9797
  var taxAmount = countTaxAmount(lineAmountIncludeTax, controller.state.goodsListState.deduction, taxRate);
9798
9798
  var lineAmountExcludeTax = countAmountExcludeTax(lineAmountIncludeTax, taxAmount);
9799
- var priceExcludeTax = countPrice(lineAmountExcludeTax, quantity, 6);
9799
+ var priceExcludeTax = countPrice(lineAmountExcludeTax, quantity, 8);
9800
9800
  return _objectSpread2(_objectSpread2({}, good), {}, {
9801
9801
  lineAmountExcludeTax: lineAmountExcludeTax,
9802
9802
  lineAmountIncludeTax: lineAmountIncludeTax,
@@ -14013,13 +14013,13 @@ var useColumns = (function (form) {
14013
14013
  render: function render(value, record) {
14014
14014
  if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
14015
14015
  return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('priceIncludeTax', {
14016
- initialValue: nonScientificNotation(editGood.priceIncludeTax, 6),
14016
+ initialValue: nonScientificNotation(editGood.priceIncludeTax, 8),
14017
14017
  getValueFromEvent: onNumberValueChange,
14018
14018
  rules: [].concat(_toConsumableArray(getReplenishRules('priceIncludeTax')), [// { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '单价必须为数字' },
14019
14019
  // { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '金额必须为数字' },
14020
14020
  {
14021
- pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,6})?$/,
14022
- message: '单价必须为数字且最多保留6位小数'
14021
+ pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,8})?$/,
14022
+ message: '单价必须为数字且最多保留8位小数'
14023
14023
  }, {
14024
14024
  validator: function () {
14025
14025
  var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
@@ -14095,7 +14095,7 @@ var useColumns = (function (form) {
14095
14095
  style: {
14096
14096
  padding: '0 10px'
14097
14097
  }
14098
- }, nonScientificNotation(value, 6));
14098
+ }, nonScientificNotation(value, 8));
14099
14099
  }
14100
14100
  }
14101
14101
  }, {
@@ -14109,12 +14109,12 @@ var useColumns = (function (form) {
14109
14109
  render: function render(value, record) {
14110
14110
  if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
14111
14111
  return /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator('priceExcludeTax', {
14112
- initialValue: nonScientificNotation(editGood.priceExcludeTax, 6),
14112
+ initialValue: nonScientificNotation(editGood.priceExcludeTax, 8),
14113
14113
  getValueFromEvent: onNumberValueChange,
14114
14114
  rules: [].concat(_toConsumableArray(getReplenishRules('priceExcludeTax')), [// { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '单价必须为数字' },
14115
14115
  {
14116
- pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,6})?$/,
14117
- message: '单价必须为数字且最多保留6位小数'
14116
+ pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,8})?$/,
14117
+ message: '单价必须为数字且最多保留8位小数'
14118
14118
  }, {
14119
14119
  validator: function () {
14120
14120
  var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
@@ -14190,7 +14190,7 @@ var useColumns = (function (form) {
14190
14190
  style: {
14191
14191
  padding: '0 10px'
14192
14192
  }
14193
- }, nonScientificNotation(value, 6));
14193
+ }, nonScientificNotation(value, 8));
14194
14194
  }
14195
14195
  }
14196
14196
  }, {
@@ -27022,7 +27022,7 @@ var DrawerBody$1 = function DrawerBody() {
27022
27022
  editGood.priceIncludeTax = undefined;
27023
27023
  editGood.priceExcludeTax = undefined;
27024
27024
  } else {
27025
- editGood.priceExcludeTax = editGood.priceExcludeTax || getPriceExcludeTax$1(editGood, record, 6);
27025
+ editGood.priceExcludeTax = editGood.priceExcludeTax || getPriceExcludeTax$1(editGood, record, 8);
27026
27026
  }
27027
27027
 
27028
27028
  if (editGood.quantity && editGood.priceIncludeTax) {
package/dist/index.js CHANGED
@@ -9806,7 +9806,7 @@ var onChangeSwitchTax = /*#__PURE__*/function () {
9806
9806
  var lineAmountIncludeTax = format2(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)));
9807
9807
  var taxAmount = countTaxAmount(lineAmountIncludeTax, controller.state.goodsListState.deduction, taxRate);
9808
9808
  var lineAmountExcludeTax = countAmountExcludeTax(lineAmountIncludeTax, taxAmount);
9809
- var priceExcludeTax = countPrice(lineAmountExcludeTax, quantity, 6);
9809
+ var priceExcludeTax = countPrice(lineAmountExcludeTax, quantity, 8);
9810
9810
  return _objectSpread2(_objectSpread2({}, good), {}, {
9811
9811
  lineAmountExcludeTax: lineAmountExcludeTax,
9812
9812
  lineAmountIncludeTax: lineAmountIncludeTax,
@@ -14023,13 +14023,13 @@ var useColumns = (function (form) {
14023
14023
  render: function render(value, record) {
14024
14024
  if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
14025
14025
  return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('priceIncludeTax', {
14026
- initialValue: nonScientificNotation(editGood.priceIncludeTax, 6),
14026
+ initialValue: nonScientificNotation(editGood.priceIncludeTax, 8),
14027
14027
  getValueFromEvent: onNumberValueChange,
14028
14028
  rules: [].concat(_toConsumableArray(getReplenishRules('priceIncludeTax')), [// { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '单价必须为数字' },
14029
14029
  // { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '金额必须为数字' },
14030
14030
  {
14031
- pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,6})?$/,
14032
- message: '单价必须为数字且最多保留6位小数'
14031
+ pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,8})?$/,
14032
+ message: '单价必须为数字且最多保留8位小数'
14033
14033
  }, {
14034
14034
  validator: function () {
14035
14035
  var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
@@ -14105,7 +14105,7 @@ var useColumns = (function (form) {
14105
14105
  style: {
14106
14106
  padding: '0 10px'
14107
14107
  }
14108
- }, nonScientificNotation(value, 6));
14108
+ }, nonScientificNotation(value, 8));
14109
14109
  }
14110
14110
  }
14111
14111
  }, {
@@ -14119,12 +14119,12 @@ var useColumns = (function (form) {
14119
14119
  render: function render(value, record) {
14120
14120
  if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index && model !== 'prefab') {
14121
14121
  return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator('priceExcludeTax', {
14122
- initialValue: nonScientificNotation(editGood.priceExcludeTax, 6),
14122
+ initialValue: nonScientificNotation(editGood.priceExcludeTax, 8),
14123
14123
  getValueFromEvent: onNumberValueChange,
14124
14124
  rules: [].concat(_toConsumableArray(getReplenishRules('priceExcludeTax')), [// { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '单价必须为数字' },
14125
14125
  {
14126
- pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,6})?$/,
14127
- message: '单价必须为数字且最多保留6位小数'
14126
+ pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,8})?$/,
14127
+ message: '单价必须为数字且最多保留8位小数'
14128
14128
  }, {
14129
14129
  validator: function () {
14130
14130
  var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(_, value, callback) {
@@ -14200,7 +14200,7 @@ var useColumns = (function (form) {
14200
14200
  style: {
14201
14201
  padding: '0 10px'
14202
14202
  }
14203
- }, nonScientificNotation(value, 6));
14203
+ }, nonScientificNotation(value, 8));
14204
14204
  }
14205
14205
  }
14206
14206
  }, {
@@ -27032,7 +27032,7 @@ var DrawerBody$1 = function DrawerBody() {
27032
27032
  editGood.priceIncludeTax = undefined;
27033
27033
  editGood.priceExcludeTax = undefined;
27034
27034
  } else {
27035
- editGood.priceExcludeTax = editGood.priceExcludeTax || getPriceExcludeTax$1(editGood, record, 6);
27035
+ editGood.priceExcludeTax = editGood.priceExcludeTax || getPriceExcludeTax$1(editGood, record, 8);
27036
27036
  }
27037
27037
 
27038
27038
  if (editGood.quantity && editGood.priceIncludeTax) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.181-16",
3
+ "version": "3.2.181-17",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -654,7 +654,7 @@ export const onChangeSwitchTax = async (controller: InvoiceController, isTaxIncl
654
654
  const lineAmountIncludeTax: any = format2(evaluate(`${priceIncludeTax} * ${quantity}`));
655
655
  const taxAmount: any = countTaxAmount(lineAmountIncludeTax, controller.state.goodsListState.deduction, taxRate as any);
656
656
  const lineAmountExcludeTax: any = countAmountExcludeTax(lineAmountIncludeTax, taxAmount);
657
- const priceExcludeTax: any = countPrice(lineAmountExcludeTax, quantity, 6);
657
+ const priceExcludeTax: any = countPrice(lineAmountExcludeTax, quantity, 8);
658
658
 
659
659
  return {
660
660
  ...good,
@@ -320,15 +320,15 @@ export default (form: WrappedFormUtils) => {
320
320
  return (
321
321
  <Form.Item>
322
322
  {getFieldDecorator('priceIncludeTax', {
323
- initialValue: nonScientificNotation(editGood.priceIncludeTax, 6),
323
+ initialValue: nonScientificNotation(editGood.priceIncludeTax, 8),
324
324
  getValueFromEvent: onNumberValueChange,
325
325
  rules: [
326
326
  ...getReplenishRules('priceIncludeTax'),
327
327
  // { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '单价必须为数字' },
328
328
  // { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '金额必须为数字' },
329
329
  {
330
- pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,6})?$/,
331
- message: '单价必须为数字且最多保留6位小数'
330
+ pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,8})?$/,
331
+ message: '单价必须为数字且最多保留8位小数'
332
332
  },
333
333
  {
334
334
  validator: async (_, value, callback) => {
@@ -364,7 +364,7 @@ export default (form: WrappedFormUtils) => {
364
364
  </Form.Item>
365
365
  );
366
366
  } else {
367
- return <span style={{ padding: '0 10px' }}>{nonScientificNotation(value, 6)}</span>;
367
+ return <span style={{ padding: '0 10px' }}>{nonScientificNotation(value, 8)}</span>;
368
368
  }
369
369
  },
370
370
  },
@@ -379,14 +379,14 @@ export default (form: WrappedFormUtils) => {
379
379
  return (
380
380
  <Form.Item>
381
381
  {getFieldDecorator('priceExcludeTax', {
382
- initialValue: nonScientificNotation(editGood.priceExcludeTax, 6),
382
+ initialValue: nonScientificNotation(editGood.priceExcludeTax, 8),
383
383
  getValueFromEvent: onNumberValueChange,
384
384
  rules: [
385
385
  ...getReplenishRules('priceExcludeTax'),
386
386
  // { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '单价必须为数字' },
387
387
  {
388
- pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,6})?$/,
389
- message: '单价必须为数字且最多保留6位小数'
388
+ pattern: /^[+-]?(0|([1-9]\d*))(\.\d{1,8})?$/,
389
+ message: '单价必须为数字且最多保留8位小数'
390
390
  },
391
391
  {
392
392
  validator: async (_, value, callback) => {
@@ -422,7 +422,7 @@ export default (form: WrappedFormUtils) => {
422
422
  </Form.Item>
423
423
  );
424
424
  } else {
425
- return <span style={{ padding: '0 10px' }}>{nonScientificNotation(value, 6)}</span>;
425
+ return <span style={{ padding: '0 10px' }}>{nonScientificNotation(value, 8)}</span>;
426
426
  }
427
427
  },
428
428
  },
@@ -112,7 +112,7 @@ const DrawerBody = () => {
112
112
  editGood.priceIncludeTax = undefined;
113
113
  editGood.priceExcludeTax = undefined;
114
114
  } else {
115
- editGood.priceExcludeTax = editGood.priceExcludeTax || getPriceExcludeTax(editGood, record, 6) as number;
115
+ editGood.priceExcludeTax = editGood.priceExcludeTax || getPriceExcludeTax(editGood, record, 8) as number;
116
116
  }
117
117
 
118
118
  if (editGood.quantity && editGood.priceIncludeTax) {