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 +14 -9
- package/dist/index.js +14 -9
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/importGoods/index.tsx +1 -1
- package/src/Invoice/InvoiceController/fns/addGoodDiscountV2.ts +1 -0
- package/src/Invoice/_test/endowCode/index.tsx +1 -0
- package/src/Invoice/ui/digtal/GoodsList/hook/useColumns/ui/ItemNameInput/index.tsx +6 -2
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 =
|
|
17669
|
+
_context.next = 9;
|
|
17668
17670
|
break;
|
|
17669
17671
|
}
|
|
17670
17672
|
|
|
17671
|
-
_context.t0 =
|
|
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
|
|
17680
|
-
_context.next =
|
|
17683
|
+
case 9:
|
|
17684
|
+
_context.next = 15;
|
|
17681
17685
|
break;
|
|
17682
17686
|
|
|
17683
|
-
case
|
|
17684
|
-
_context.prev =
|
|
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
|
|
17693
|
+
case 15:
|
|
17690
17694
|
case "end":
|
|
17691
17695
|
return _context.stop();
|
|
17692
17696
|
}
|
|
17693
17697
|
}
|
|
17694
|
-
}, _callee, null, [[0,
|
|
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 =
|
|
17679
|
+
_context.next = 9;
|
|
17678
17680
|
break;
|
|
17679
17681
|
}
|
|
17680
17682
|
|
|
17681
|
-
_context.t0 =
|
|
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
|
|
17690
|
-
_context.next =
|
|
17693
|
+
case 9:
|
|
17694
|
+
_context.next = 15;
|
|
17691
17695
|
break;
|
|
17692
17696
|
|
|
17693
|
-
case
|
|
17694
|
-
_context.prev =
|
|
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
|
|
17703
|
+
case 15:
|
|
17700
17704
|
case "end":
|
|
17701
17705
|
return _context.stop();
|
|
17702
17706
|
}
|
|
17703
17707
|
}
|
|
17704
|
-
}, _callee, null, [[0,
|
|
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
|
@@ -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,
|
|
@@ -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
|
-
|
|
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%' }}
|
|
50
|
+
<Input style={{ height: '100%' }} onChange={onChange} suffix={props.suffix} />
|
|
47
51
|
</AutoComplete>
|
|
48
52
|
</div>
|
|
49
53
|
)
|