kts-component-invoice-operate 3.2.159 → 3.2.160

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.
@@ -8,6 +8,10 @@ export default class AutoComplete {
8
8
  onBuyerNameSearch?: (searchText: string) => Promise<any[]>;
9
9
  /** 统一社会信用代码/纳税人识别号 */
10
10
  onBuyerTaxIdSearch?: (searchText: string) => Promise<any[]>;
11
+ /** 销售方名称自动补全 */
12
+ onSupplierNameSearch?: (searchText: string) => Promise<any[]>;
13
+ /** 统一社会信用代码/纳税人识别号 */
14
+ onSupplierTaxIdSearch?: (searchText: string) => Promise<any[]>;
11
15
  /** 商品编码自动补全 */
12
16
  onItemCodeSearch?: (searchText: string, itemName: any) => Promise<any[]>;
13
17
  }
package/dist/index.esm.js CHANGED
@@ -1200,6 +1200,8 @@ var AutoComplete = /*#__PURE__*/_createClass(function AutoComplete() {
1200
1200
  this.onItemNameBlur = void 0;
1201
1201
  this.onBuyerNameSearch = void 0;
1202
1202
  this.onBuyerTaxIdSearch = void 0;
1203
+ this.onSupplierNameSearch = void 0;
1204
+ this.onSupplierTaxIdSearch = void 0;
1203
1205
  this.onItemCodeSearch = void 0;
1204
1206
  });
1205
1207
 
@@ -18089,7 +18091,7 @@ function BuyerNameInput$2(props) {
18089
18091
  case 2:
18090
18092
  _context.prev = 2;
18091
18093
 
18092
- if (!(fieldName === 'buyerName' || fieldName === 'supplierName')) {
18094
+ if (!(fieldName === 'buyerName')) {
18093
18095
  _context.next = 12;
18094
18096
  break;
18095
18097
  }
@@ -18108,12 +18110,12 @@ function BuyerNameInput$2(props) {
18108
18110
  (0, _context.t0)(_context.t1);
18109
18111
 
18110
18112
  case 10:
18111
- _context.next = 19;
18113
+ _context.next = 37;
18112
18114
  break;
18113
18115
 
18114
18116
  case 12:
18115
- if (!(fieldName === 'buyerTaxId' || fieldName === 'supplierTaxId')) {
18116
- _context.next = 19;
18117
+ if (!(fieldName === 'buyerTaxId')) {
18118
+ _context.next = 21;
18117
18119
  break;
18118
18120
  }
18119
18121
 
@@ -18131,21 +18133,67 @@ function BuyerNameInput$2(props) {
18131
18133
  (0, _context.t2)(_context.t3);
18132
18134
 
18133
18135
  case 19:
18134
- _context.next = 25;
18136
+ _context.next = 37;
18135
18137
  break;
18136
18138
 
18137
18139
  case 21:
18138
- _context.prev = 21;
18139
- _context.t4 = _context["catch"](2);
18140
+ if (!(fieldName === 'supplierName')) {
18141
+ _context.next = 30;
18142
+ break;
18143
+ }
18144
+
18145
+ if (!autoComplete.onSupplierNameSearch) {
18146
+ _context.next = 28;
18147
+ break;
18148
+ }
18149
+
18150
+ _context.t4 = setOptions;
18151
+ _context.next = 26;
18152
+ return autoComplete.onSupplierNameSearch(searchText);
18153
+
18154
+ case 26:
18155
+ _context.t5 = _context.sent;
18156
+ (0, _context.t4)(_context.t5);
18157
+
18158
+ case 28:
18159
+ _context.next = 37;
18160
+ break;
18161
+
18162
+ case 30:
18163
+ if (!(fieldName === 'supplierTaxId')) {
18164
+ _context.next = 37;
18165
+ break;
18166
+ }
18167
+
18168
+ if (!autoComplete.onSupplierTaxIdSearch) {
18169
+ _context.next = 37;
18170
+ break;
18171
+ }
18172
+
18173
+ _context.t6 = setOptions;
18174
+ _context.next = 35;
18175
+ return autoComplete.onSupplierTaxIdSearch(searchText);
18176
+
18177
+ case 35:
18178
+ _context.t7 = _context.sent;
18179
+ (0, _context.t6)(_context.t7);
18180
+
18181
+ case 37:
18182
+ _context.next = 43;
18183
+ break;
18184
+
18185
+ case 39:
18186
+ _context.prev = 39;
18187
+ _context.t8 = _context["catch"](2);
18140
18188
  setOptions([]);
18141
- throw _context.t4;
18189
+ throw _context.t8;
18142
18190
 
18143
- case 25:
18191
+ case 43:
18144
18192
  case "end":
18145
18193
  return _context.stop();
18146
18194
  }
18147
18195
  }
18148
- }, _callee, null, [[2, 21]]);
18196
+ }, _callee, null, [[2, 39]]);
18149
18197
  }));
18150
18198
 
18151
18199
  return function (_x) {
package/dist/index.js CHANGED
@@ -1210,6 +1210,8 @@ var AutoComplete = /*#__PURE__*/_createClass(function AutoComplete() {
1210
1210
  this.onItemNameBlur = void 0;
1211
1211
  this.onBuyerNameSearch = void 0;
1212
1212
  this.onBuyerTaxIdSearch = void 0;
1213
+ this.onSupplierNameSearch = void 0;
1214
+ this.onSupplierTaxIdSearch = void 0;
1213
1215
  this.onItemCodeSearch = void 0;
1214
1216
  });
1215
1217
 
@@ -18099,7 +18101,7 @@ function BuyerNameInput$2(props) {
18099
18101
  case 2:
18100
18102
  _context.prev = 2;
18101
18103
 
18102
- if (!(fieldName === 'buyerName' || fieldName === 'supplierName')) {
18104
+ if (!(fieldName === 'buyerName')) {
18103
18105
  _context.next = 12;
18104
18106
  break;
18105
18107
  }
@@ -18118,12 +18120,12 @@ function BuyerNameInput$2(props) {
18118
18120
  (0, _context.t0)(_context.t1);
18119
18121
 
18120
18122
  case 10:
18121
- _context.next = 19;
18123
+ _context.next = 37;
18122
18124
  break;
18123
18125
 
18124
18126
  case 12:
18125
- if (!(fieldName === 'buyerTaxId' || fieldName === 'supplierTaxId')) {
18126
- _context.next = 19;
18127
+ if (!(fieldName === 'buyerTaxId')) {
18128
+ _context.next = 21;
18127
18129
  break;
18128
18130
  }
18129
18131
 
@@ -18141,21 +18143,67 @@ function BuyerNameInput$2(props) {
18141
18143
  (0, _context.t2)(_context.t3);
18142
18144
 
18143
18145
  case 19:
18144
- _context.next = 25;
18146
+ _context.next = 37;
18145
18147
  break;
18146
18148
 
18147
18149
  case 21:
18148
- _context.prev = 21;
18149
- _context.t4 = _context["catch"](2);
18150
+ if (!(fieldName === 'supplierName')) {
18151
+ _context.next = 30;
18152
+ break;
18153
+ }
18154
+
18155
+ if (!autoComplete.onSupplierNameSearch) {
18156
+ _context.next = 28;
18157
+ break;
18158
+ }
18159
+
18160
+ _context.t4 = setOptions;
18161
+ _context.next = 26;
18162
+ return autoComplete.onSupplierNameSearch(searchText);
18163
+
18164
+ case 26:
18165
+ _context.t5 = _context.sent;
18166
+ (0, _context.t4)(_context.t5);
18167
+
18168
+ case 28:
18169
+ _context.next = 37;
18170
+ break;
18171
+
18172
+ case 30:
18173
+ if (!(fieldName === 'supplierTaxId')) {
18174
+ _context.next = 37;
18175
+ break;
18176
+ }
18177
+
18178
+ if (!autoComplete.onSupplierTaxIdSearch) {
18179
+ _context.next = 37;
18180
+ break;
18181
+ }
18182
+
18183
+ _context.t6 = setOptions;
18184
+ _context.next = 35;
18185
+ return autoComplete.onSupplierTaxIdSearch(searchText);
18186
+
18187
+ case 35:
18188
+ _context.t7 = _context.sent;
18189
+ (0, _context.t6)(_context.t7);
18190
+
18191
+ case 37:
18192
+ _context.next = 43;
18193
+ break;
18194
+
18195
+ case 39:
18196
+ _context.prev = 39;
18197
+ _context.t8 = _context["catch"](2);
18150
18198
  setOptions([]);
18151
- throw _context.t4;
18199
+ throw _context.t8;
18152
18200
 
18153
- case 25:
18201
+ case 43:
18154
18202
  case "end":
18155
18203
  return _context.stop();
18156
18204
  }
18157
18205
  }
18158
- }, _callee, null, [[2, 21]]);
18206
+ }, _callee, null, [[2, 39]]);
18159
18207
  }));
18160
18208
 
18161
18209
  return function (_x) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.159",
3
+ "version": "3.2.160",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -15,6 +15,12 @@ export default class AutoComplete {
15
15
  /** 统一社会信用代码/纳税人识别号 */
16
16
  onBuyerTaxIdSearch?: (searchText: string) => Promise<any[]>;
17
17
 
18
+ /** 销售方名称自动补全 */
19
+ onSupplierNameSearch?: (searchText: string) => Promise<any[]>;
20
+
21
+ /** 统一社会信用代码/纳税人识别号 */
22
+ onSupplierTaxIdSearch?: (searchText: string) => Promise<any[]>;
23
+
18
24
  /** 商品编码自动补全 */
19
25
  onItemCodeSearch?: (searchText: string, itemName: any) => Promise<any[]>;
20
26
  }
@@ -372,14 +372,22 @@ function BuyerNameInput(props: InputProps & { fieldName: string; myform: Wrapped
372
372
  const onSearch = React.useCallback(async (searchText: string) => {
373
373
  await Discontinue.start();
374
374
  try {
375
- if (fieldName === 'buyerName' || fieldName === 'supplierName') {
375
+ if (fieldName === 'buyerName' ) {
376
376
  if (autoComplete.onBuyerNameSearch) {
377
377
  setOptions(await autoComplete.onBuyerNameSearch(searchText));
378
378
  }
379
- } else if (fieldName === 'buyerTaxId' || fieldName === 'supplierTaxId') {
379
+ } else if (fieldName === 'buyerTaxId' ) {
380
380
  if (autoComplete.onBuyerTaxIdSearch) {
381
381
  setOptions(await autoComplete.onBuyerTaxIdSearch(searchText));
382
382
  }
383
+ }else if(fieldName === 'supplierName'){
384
+ if (autoComplete.onSupplierNameSearch) {
385
+ setOptions(await autoComplete.onSupplierNameSearch(searchText));
386
+ }
387
+ }else if(fieldName === 'supplierTaxId'){
388
+ if (autoComplete.onSupplierTaxIdSearch) {
389
+ setOptions(await autoComplete.onSupplierTaxIdSearch(searchText));
390
+ }
383
391
  }
384
392
 
385
393
  } catch (error) {