kts-component-invoice-operate 3.2.47 → 3.2.48

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
@@ -2061,6 +2061,8 @@ function checkSameNumber(_x12) {
2061
2061
 
2062
2062
  function _checkSameNumber() {
2063
2063
  _checkSameNumber = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(good) {
2064
+ var content, _content;
2065
+
2064
2066
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2065
2067
  while (1) {
2066
2068
  switch (_context9.prev = _context9.next) {
@@ -2074,26 +2076,34 @@ function _checkSameNumber() {
2074
2076
 
2075
2077
  case 2:
2076
2078
  if (!(!good.lineAmountExcludeTax && good.lineAmountExcludeTax !== 0)) {
2077
- _context9.next = 5;
2079
+ _context9.next = 6;
2078
2080
  break;
2079
2081
  }
2080
2082
 
2081
- message$1.error('金额不能为空');
2082
- throw new Error('金额不能为空');
2083
+ content = '金额不能为空';
2084
+ message$1.error({
2085
+ content: content,
2086
+ key: content
2087
+ });
2088
+ throw new Error(content);
2083
2089
 
2084
- case 5:
2090
+ case 6:
2085
2091
  if (!(good.quantity >= 0 && good.lineAmountExcludeTax >= 0 || good.lineAmountExcludeTax === 0 || good.quantity < 0 && good.lineAmountExcludeTax < 0)) {
2086
- _context9.next = 9;
2092
+ _context9.next = 10;
2087
2093
  break;
2088
2094
  }
2089
2095
 
2090
2096
  return _context9.abrupt("return");
2091
2097
 
2092
- case 9:
2093
- message$1.error('合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。');
2094
- throw new Error('合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。');
2098
+ case 10:
2099
+ _content = '合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。';
2100
+ message$1.error({
2101
+ content: _content,
2102
+ key: _content
2103
+ });
2104
+ throw new Error(_content);
2095
2105
 
2096
- case 11:
2106
+ case 13:
2097
2107
  case "end":
2098
2108
  return _context9.stop();
2099
2109
  }
package/dist/index.js CHANGED
@@ -2071,6 +2071,8 @@ function checkSameNumber(_x12) {
2071
2071
 
2072
2072
  function _checkSameNumber() {
2073
2073
  _checkSameNumber = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(good) {
2074
+ var content, _content;
2075
+
2074
2076
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2075
2077
  while (1) {
2076
2078
  switch (_context9.prev = _context9.next) {
@@ -2084,26 +2086,34 @@ function _checkSameNumber() {
2084
2086
 
2085
2087
  case 2:
2086
2088
  if (!(!good.lineAmountExcludeTax && good.lineAmountExcludeTax !== 0)) {
2087
- _context9.next = 5;
2089
+ _context9.next = 6;
2088
2090
  break;
2089
2091
  }
2090
2092
 
2091
- ktsXui.message.error('金额不能为空');
2092
- throw new Error('金额不能为空');
2093
+ content = '金额不能为空';
2094
+ ktsXui.message.error({
2095
+ content: content,
2096
+ key: content
2097
+ });
2098
+ throw new Error(content);
2093
2099
 
2094
- case 5:
2100
+ case 6:
2095
2101
  if (!(good.quantity >= 0 && good.lineAmountExcludeTax >= 0 || good.lineAmountExcludeTax === 0 || good.quantity < 0 && good.lineAmountExcludeTax < 0)) {
2096
- _context9.next = 9;
2102
+ _context9.next = 10;
2097
2103
  break;
2098
2104
  }
2099
2105
 
2100
2106
  return _context9.abrupt("return");
2101
2107
 
2102
- case 9:
2103
- ktsXui.message.error('合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。');
2104
- throw new Error('合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。');
2108
+ case 10:
2109
+ _content = '合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。';
2110
+ ktsXui.message.error({
2111
+ content: _content,
2112
+ key: _content
2113
+ });
2114
+ throw new Error(_content);
2105
2115
 
2106
- case 11:
2116
+ case 13:
2107
2117
  case "end":
2108
2118
  return _context9.stop();
2109
2119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.47",
3
+ "version": "3.2.48",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -120,8 +120,9 @@ async function checkSameNumber(good: IGood) {
120
120
  if (!good.quantity) return;
121
121
 
122
122
  if (!good.lineAmountExcludeTax && good.lineAmountExcludeTax !== 0) {
123
- message.error('金额不能为空');
124
- throw new Error('金额不能为空');
123
+ const content = '金额不能为空';
124
+ message.error({ content, key: content });
125
+ throw new Error(content);
125
126
  }
126
127
 
127
128
  if (
@@ -131,8 +132,9 @@ async function checkSameNumber(good: IGood) {
131
132
  ) {
132
133
  return;
133
134
  } else {
134
- message.error('合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。');
135
- throw new Error('合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。');
135
+ const content = '合并失败,合并后“数量”和“金额”必须同时为正数或同时为负数。';
136
+ message.error({ content, key: content });
137
+ throw new Error(content);
136
138
  }
137
139
  }
138
140