kts-component-invoice-operate 3.2.93 → 3.2.95

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
@@ -1633,6 +1633,7 @@ var addGoodDiscountV2 = /*#__PURE__*/(function () {
1633
1633
  taxRate: good.taxRate,
1634
1634
  itemName: good.itemName,
1635
1635
  shorthand: good.shorthand,
1636
+ taxClassificationCode: good.taxClassificationCode,
1636
1637
  taxAmount: -1 * taxAmount,
1637
1638
  lineAmountExcludeTax: -1 * lineAmountExcludeTax,
1638
1639
  lineAmountIncludeTax: -1 * e.discolineAmountunt,
@@ -17657,6 +17658,7 @@ function ItemNameInput$1(props) {
17657
17658
  }, [options, controller]);
17658
17659
  var onSearch = React.useCallback( /*#__PURE__*/function () {
17659
17660
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
17661
+ var list;
17660
17662
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17661
17663
  while (1) {
17662
17664
  switch (_context.prev = _context.next) {
@@ -17664,40 +17666,43 @@ function ItemNameInput$1(props) {
17664
17666
  _context.prev = 0;
17665
17667
 
17666
17668
  if (!autoComplete.onItemNameSearch) {
17667
- _context.next = 7;
17669
+ _context.next = 9;
17668
17670
  break;
17669
17671
  }
17670
17672
 
17671
- _context.t0 = setOptions;
17673
+ _context.t0 = _toConsumableArray;
17672
17674
  _context.next = 5;
17673
17675
  return autoComplete.onItemNameSearch(searchText);
17674
17676
 
17675
17677
  case 5:
17676
17678
  _context.t1 = _context.sent;
17677
- (0, _context.t0)(_context.t1);
17679
+ list = (0, _context.t0)(_context.t1);
17680
+ console.log('===> list', list);
17681
+ setOptions(list);
17678
17682
 
17679
- case 7:
17680
- _context.next = 13;
17683
+ case 9:
17684
+ _context.next = 15;
17681
17685
  break;
17682
17686
 
17683
- case 9:
17684
- _context.prev = 9;
17687
+ case 11:
17688
+ _context.prev = 11;
17685
17689
  _context.t2 = _context["catch"](0);
17686
17690
  setOptions([]);
17687
17691
  throw _context.t2;
17688
17692
 
17689
- case 13:
17693
+ case 15:
17690
17694
  case "end":
17691
17695
  return _context.stop();
17692
17696
  }
17693
17697
  }
17694
- }, _callee, null, [[0, 9]]);
17698
+ }, _callee, null, [[0, 11]]);
17695
17699
  }));
17696
17700
 
17697
17701
  return function (_x) {
17698
17702
  return _ref.apply(this, arguments);
17699
17703
  };
17700
17704
  }(), [autoComplete.onItemNameSearch]);
17705
+ console.log('===> options', options);
17701
17706
  return React.createElement("div", {
17702
17707
  className: 'kts-invoice-operate-goods-list-itemName-input'
17703
17708
  }, props.shorthand && React.createElement("span", {
package/dist/index.js CHANGED
@@ -1643,6 +1643,7 @@ var addGoodDiscountV2 = /*#__PURE__*/(function () {
1643
1643
  taxRate: good.taxRate,
1644
1644
  itemName: good.itemName,
1645
1645
  shorthand: good.shorthand,
1646
+ taxClassificationCode: good.taxClassificationCode,
1646
1647
  taxAmount: -1 * taxAmount,
1647
1648
  lineAmountExcludeTax: -1 * lineAmountExcludeTax,
1648
1649
  lineAmountIncludeTax: -1 * e.discolineAmountunt,
@@ -17667,6 +17668,7 @@ function ItemNameInput$1(props) {
17667
17668
  }, [options, controller]);
17668
17669
  var onSearch = React__default['default'].useCallback( /*#__PURE__*/function () {
17669
17670
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
17671
+ var list;
17670
17672
  return _regeneratorRuntime().wrap(function _callee$(_context) {
17671
17673
  while (1) {
17672
17674
  switch (_context.prev = _context.next) {
@@ -17674,40 +17676,43 @@ function ItemNameInput$1(props) {
17674
17676
  _context.prev = 0;
17675
17677
 
17676
17678
  if (!autoComplete.onItemNameSearch) {
17677
- _context.next = 7;
17679
+ _context.next = 9;
17678
17680
  break;
17679
17681
  }
17680
17682
 
17681
- _context.t0 = setOptions;
17683
+ _context.t0 = _toConsumableArray;
17682
17684
  _context.next = 5;
17683
17685
  return autoComplete.onItemNameSearch(searchText);
17684
17686
 
17685
17687
  case 5:
17686
17688
  _context.t1 = _context.sent;
17687
- (0, _context.t0)(_context.t1);
17689
+ list = (0, _context.t0)(_context.t1);
17690
+ console.log('===> list', list);
17691
+ setOptions(list);
17688
17692
 
17689
- case 7:
17690
- _context.next = 13;
17693
+ case 9:
17694
+ _context.next = 15;
17691
17695
  break;
17692
17696
 
17693
- case 9:
17694
- _context.prev = 9;
17697
+ case 11:
17698
+ _context.prev = 11;
17695
17699
  _context.t2 = _context["catch"](0);
17696
17700
  setOptions([]);
17697
17701
  throw _context.t2;
17698
17702
 
17699
- case 13:
17703
+ case 15:
17700
17704
  case "end":
17701
17705
  return _context.stop();
17702
17706
  }
17703
17707
  }
17704
- }, _callee, null, [[0, 9]]);
17708
+ }, _callee, null, [[0, 11]]);
17705
17709
  }));
17706
17710
 
17707
17711
  return function (_x) {
17708
17712
  return _ref.apply(this, arguments);
17709
17713
  };
17710
17714
  }(), [autoComplete.onItemNameSearch]);
17715
+ console.log('===> options', options);
17711
17716
  return React__default['default'].createElement("div", {
17712
17717
  className: 'kts-invoice-operate-goods-list-itemName-input'
17713
17718
  }, props.shorthand && React__default['default'].createElement("span", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.93",
3
+ "version": "3.2.95",
4
4
  "scripts": {
5
5
  "dev": "dumi dev",
6
6
  "start": "dumi dev",
@@ -465,7 +465,7 @@ const getMok = async (current: number = 1) => {
465
465
  "unit": "米",
466
466
  "priceIncludeTax": 0,
467
467
  "priceExcludeTax": 0,
468
- "taxClassificationCode": "1234567890123456789"
468
+ "taxClassificationCode": "1234567890123456789",
469
469
  }
470
470
  ]
471
471
  }
@@ -42,6 +42,7 @@ export default async (state: InvoiceControllerState, options?: IOptions[]) => {
42
42
  taxRate: good.taxRate,
43
43
  itemName: good.itemName,
44
44
  shorthand: good.shorthand,
45
+ taxClassificationCode: good.taxClassificationCode,
45
46
 
46
47
  taxAmount: -1 * taxAmount,
47
48
  lineAmountExcludeTax: -1 * lineAmountExcludeTax,
@@ -287,6 +287,7 @@ const lines: any[] = [
287
287
  "zeroTaxRateFlag": null,
288
288
  "referenceLines": null,
289
289
  "version": 0,
290
+ "shorthand": "布料",
290
291
  taxAmount:1
291
292
  }
292
293
  ]
@@ -31,7 +31,9 @@ export default function ItemNameInput(props: {
31
31
  const onSearch = React.useCallback(async (searchText: string) => {
32
32
  try {
33
33
  if (autoComplete.onItemNameSearch) {
34
- setOptions(await autoComplete.onItemNameSearch(searchText));
34
+ const list = [...await autoComplete.onItemNameSearch(searchText)];
35
+ console.log('===> list', list);
36
+ setOptions(list);
35
37
  }
36
38
  } catch (error) {
37
39
  setOptions([]);
@@ -39,11 +41,13 @@ export default function ItemNameInput(props: {
39
41
  }
40
42
  }, [autoComplete.onItemNameSearch])
41
43
 
44
+ console.log('===> options', options);
45
+
42
46
  return (
43
47
  <div className='kts-invoice-operate-goods-list-itemName-input'>
44
48
  {props.shorthand && <span style={{ alignSelf: 'center', fontSize: 12 }} >*{props.shorthand}*</span>}
45
49
  <AutoComplete onSearch={onSearch} value={props.value} options={options.map(e => ({ value: e.itemName }))} onSelect={onChangeAutoComplete} >
46
- <Input style={{ height: '100%' }} onChange={onChange} suffix={props.suffix} />
50
+ <Input style={{ height: '100%' }} onChange={onChange} suffix={props.suffix} />
47
51
  </AutoComplete>
48
52
  </div>
49
53
  )