kts-component-invoice-operate 3.2.123 → 3.2.125

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
@@ -19287,7 +19287,8 @@ function ItemNameInput$1(props) {
19287
19287
  }, []);
19288
19288
  var onBlur = React.useCallback( /*#__PURE__*/function () {
19289
19289
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
19290
- var taxCategoryData, params;
19290
+ var _searchText$target, taxCategoryData, params;
19291
+
19291
19292
  return _regeneratorRuntime().wrap(function _callee$(_context) {
19292
19293
  while (1) {
19293
19294
  switch (_context.prev = _context.next) {
@@ -19299,7 +19300,7 @@ function ItemNameInput$1(props) {
19299
19300
  break;
19300
19301
  }
19301
19302
 
19302
- if (selectLine === null || selectLine === void 0 ? void 0 : selectLine.shorthand) {
19303
+ if (!(!(selectLine === null || selectLine === void 0 ? void 0 : selectLine.shorthand) && !!(searchText === null || searchText === void 0 ? void 0 : (_searchText$target = searchText.target) === null || _searchText$target === void 0 ? void 0 : _searchText$target.value))) {
19303
19304
  _context.next = 7;
19304
19305
  break;
19305
19306
  }
@@ -22085,8 +22086,10 @@ var useEmptyRefill = (function () {
22085
22086
  case 0:
22086
22087
  s.goodsListState.goodsList = [];
22087
22088
  s.goodsListState.goodsMap = new Map();
22089
+ s.goodsListState.selectedGoodIndex = [];
22090
+ s.goodsListState.discountGoodIndex = [];
22088
22091
 
22089
- case 2:
22092
+ case 4:
22090
22093
  case "end":
22091
22094
  return _context.stop();
22092
22095
  }
package/dist/index.js CHANGED
@@ -19297,7 +19297,8 @@ function ItemNameInput$1(props) {
19297
19297
  }, []);
19298
19298
  var onBlur = React__default['default'].useCallback( /*#__PURE__*/function () {
19299
19299
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(searchText) {
19300
- var taxCategoryData, params;
19300
+ var _searchText$target, taxCategoryData, params;
19301
+
19301
19302
  return _regeneratorRuntime().wrap(function _callee$(_context) {
19302
19303
  while (1) {
19303
19304
  switch (_context.prev = _context.next) {
@@ -19309,7 +19310,7 @@ function ItemNameInput$1(props) {
19309
19310
  break;
19310
19311
  }
19311
19312
 
19312
- if (selectLine === null || selectLine === void 0 ? void 0 : selectLine.shorthand) {
19313
+ if (!(!(selectLine === null || selectLine === void 0 ? void 0 : selectLine.shorthand) && !!(searchText === null || searchText === void 0 ? void 0 : (_searchText$target = searchText.target) === null || _searchText$target === void 0 ? void 0 : _searchText$target.value))) {
19313
19314
  _context.next = 7;
19314
19315
  break;
19315
19316
  }
@@ -22095,8 +22096,10 @@ var useEmptyRefill = (function () {
22095
22096
  case 0:
22096
22097
  s.goodsListState.goodsList = [];
22097
22098
  s.goodsListState.goodsMap = new Map();
22099
+ s.goodsListState.selectedGoodIndex = [];
22100
+ s.goodsListState.discountGoodIndex = [];
22098
22101
 
22099
- case 2:
22102
+ case 4:
22100
22103
  case "end":
22101
22104
  return _context.stop();
22102
22105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.123",
3
+ "version": "3.2.125",
4
4
  "scripts": {
5
5
  "dev": "dumi dev",
6
6
  "start": "dumi dev",
@@ -28,7 +28,7 @@ export default function ItemNameInput(props: {
28
28
  const onBlur = React.useCallback(async (searchText: any) => {
29
29
  try {
30
30
  if (autoComplete.onItemNameBlur) {
31
- if (!selectLine?.shorthand) {
31
+ if (!selectLine?.shorthand && !!searchText?.target?.value) {
32
32
  const taxCategoryData: any = await autoComplete.onItemNameBlur(searchText);
33
33
  if (taxCategoryData && taxCategoryData[0]) {
34
34
  const params = {
@@ -14,6 +14,8 @@ export default () => {
14
14
  controller.run(async s => {
15
15
  s.goodsListState.goodsList = [];
16
16
  s.goodsListState.goodsMap = new Map();
17
+ s.goodsListState.selectedGoodIndex = [];
18
+ s.goodsListState.discountGoodIndex = [];
17
19
  })
18
20
  }, [controller])
19
21