kts-component-invoice-operate 1.2.11 → 1.2.13

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
@@ -5936,10 +5936,8 @@ var DrawerBody$3 = function DrawerBody(props) {
5936
5936
  return s.goodsListState.endowCode.favouredPolicyNameList;
5937
5937
  }, []);
5938
5938
  /** 优惠政策类型列表 */
5939
+ // const getTaxCategoryCodeTree = controller.useMemo(s => s.goodsListState.endowCode.getTaxCategoryCodeTree, []);
5939
5940
 
5940
- var getTaxCategoryCodeTree = controller.useMemo(function (s) {
5941
- return s.goodsListState.endowCode.getTaxCategoryCodeTree;
5942
- }, []);
5943
5941
  /** 税率 */
5944
5942
 
5945
5943
  var _React$useState3 = React.useState(0),
@@ -6182,41 +6180,40 @@ var DrawerBody$3 = function DrawerBody(props) {
6182
6180
  }());
6183
6181
  setVisible(false);
6184
6182
  }, [list, actions, readOnlyTaxRate]);
6185
- var getTaxCategoryCodeTree = controller.useMemo(function (s) {
6186
- return s.goodsListState.endowCode.getTaxCategoryCodeTree || function () {
6187
- return [];
6188
- };
6189
- }, []);
6190
6183
  React.useEffect(function () {
6191
- _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
6192
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
6184
+ _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
6185
+ var fn, list;
6186
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
6193
6187
  while (1) {
6194
- switch (_context9.prev = _context9.next) {
6188
+ switch (_context10.prev = _context10.next) {
6195
6189
  case 0:
6196
- _context9.t0 = setList;
6197
- _context9.next = 3;
6198
- return getTaxCategoryCodeTree(filter === null || filter === void 0 ? void 0 : filter.taxCategoryCode, filter === null || filter === void 0 ? void 0 : filter.val);
6199
-
6200
- case 3:
6201
- _context9.t1 = _context9.sent;
6202
-
6203
- if (_context9.t1) {
6204
- _context9.next = 6;
6205
- break;
6206
- }
6190
+ fn = controller.state.goodsListState.endowCode.getTaxCategoryCodeTree || /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
6191
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
6192
+ while (1) {
6193
+ switch (_context9.prev = _context9.next) {
6194
+ case 0:
6195
+ return _context9.abrupt("return", []);
6207
6196
 
6208
- _context9.t1 = [];
6197
+ case 1:
6198
+ case "end":
6199
+ return _context9.stop();
6200
+ }
6201
+ }
6202
+ }, _callee9);
6203
+ }));
6204
+ _context10.next = 3;
6205
+ return fn(filter === null || filter === void 0 ? void 0 : filter.taxCategoryCode, filter === null || filter === void 0 ? void 0 : filter.val);
6209
6206
 
6210
- case 6:
6211
- _context9.t2 = _context9.t1;
6212
- (0, _context9.t0)(_context9.t2);
6207
+ case 3:
6208
+ list = _context10.sent;
6209
+ setList(list || []);
6213
6210
 
6214
- case 8:
6211
+ case 5:
6215
6212
  case "end":
6216
- return _context9.stop();
6213
+ return _context10.stop();
6217
6214
  }
6218
6215
  }
6219
- }, _callee9);
6216
+ }, _callee10);
6220
6217
  }))();
6221
6218
  }, [filter]);
6222
6219
  React.useEffect(function () {
@@ -6278,11 +6275,11 @@ var DrawerBody$3 = function DrawerBody(props) {
6278
6275
 
6279
6276
  var onSubmit = React.useCallback(function (values) {
6280
6277
  controller.pipeline( /*#__PURE__*/function () {
6281
- var _ref10 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(s) {
6278
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(s) {
6282
6279
  var endowCodeGood;
6283
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
6280
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
6284
6281
  while (1) {
6285
- switch (_context10.prev = _context10.next) {
6282
+ switch (_context11.prev = _context11.next) {
6286
6283
  case 0:
6287
6284
  endowCodeGood = s.goodsListState.endowCode.endowcodeGoodIndex.map(function (e) {
6288
6285
  return s.goodsListState.goodsMap.get(e);
@@ -6318,11 +6315,11 @@ var DrawerBody$3 = function DrawerBody(props) {
6318
6315
  if (!endowCodeGood.some(function (e) {
6319
6316
  return bytesLnegth((e === null || e === void 0 ? void 0 : e.itemName) || '') > 92;
6320
6317
  })) {
6321
- _context10.next = 5;
6318
+ _context11.next = 5;
6322
6319
  break;
6323
6320
  }
6324
6321
 
6325
- _context10.next = 5;
6322
+ _context11.next = 5;
6326
6323
  return function () {
6327
6324
  return new Promise(function (resolve) {
6328
6325
  confirm({
@@ -6352,14 +6349,14 @@ var DrawerBody$3 = function DrawerBody(props) {
6352
6349
 
6353
6350
  case 7:
6354
6351
  case "end":
6355
- return _context10.stop();
6352
+ return _context11.stop();
6356
6353
  }
6357
6354
  }
6358
- }, _callee10);
6355
+ }, _callee11);
6359
6356
  }));
6360
6357
 
6361
6358
  return function (_x9) {
6362
- return _ref10.apply(this, arguments);
6359
+ return _ref11.apply(this, arguments);
6363
6360
  };
6364
6361
  }())();
6365
6362
  }, [controller]);
@@ -6368,23 +6365,23 @@ var DrawerBody$3 = function DrawerBody(props) {
6368
6365
  FormEffectHooks.onFieldValueChange$('taxRate').subscribe(function (e) {
6369
6366
  setTaxRate(e.value);
6370
6367
  actions.setFieldState('taxFreeType', /*#__PURE__*/function () {
6371
- var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(s) {
6372
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
6368
+ var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(s) {
6369
+ return regeneratorRuntime.wrap(function _callee12$(_context12) {
6373
6370
  while (1) {
6374
- switch (_context11.prev = _context11.next) {
6371
+ switch (_context12.prev = _context12.next) {
6375
6372
  case 0:
6376
6373
  if (e.value !== 0) s.value = undefined;
6377
6374
 
6378
6375
  case 1:
6379
6376
  case "end":
6380
- return _context11.stop();
6377
+ return _context12.stop();
6381
6378
  }
6382
6379
  }
6383
- }, _callee11);
6380
+ }, _callee12);
6384
6381
  }));
6385
6382
 
6386
6383
  return function (_x10) {
6387
- return _ref11.apply(this, arguments);
6384
+ return _ref12.apply(this, arguments);
6388
6385
  };
6389
6386
  }());
6390
6387
  }); // 是否享受优惠政策
@@ -6392,23 +6389,23 @@ var DrawerBody$3 = function DrawerBody(props) {
6392
6389
  FormEffectHooks.onFieldValueChange$('favouredPolicyMark').subscribe(function (e) {
6393
6390
  setFavouredPolicyMark(e.value);
6394
6391
  actions.setFieldState('favouredPolicyName', /*#__PURE__*/function () {
6395
- var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(s) {
6396
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
6392
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(s) {
6393
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
6397
6394
  while (1) {
6398
- switch (_context12.prev = _context12.next) {
6395
+ switch (_context13.prev = _context13.next) {
6399
6396
  case 0:
6400
6397
  if (e.value === 0) s.value = undefined;
6401
6398
 
6402
6399
  case 1:
6403
6400
  case "end":
6404
- return _context12.stop();
6401
+ return _context13.stop();
6405
6402
  }
6406
6403
  }
6407
- }, _callee12);
6404
+ }, _callee13);
6408
6405
  }));
6409
6406
 
6410
6407
  return function (_x11) {
6411
- return _ref12.apply(this, arguments);
6408
+ return _ref13.apply(this, arguments);
6412
6409
  };
6413
6410
  }());
6414
6411
  });
@@ -6420,7 +6417,7 @@ var DrawerBody$3 = function DrawerBody(props) {
6420
6417
  return /*#__PURE__*/React.createElement(SchemaForm, {
6421
6418
  actions: actions,
6422
6419
  components: _objectSpread2(_objectSpread2({}, components), {}, {
6423
- showSearch: !!getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch
6420
+ showSearch: !!controller.state.goodsListState.endowCode.getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch
6424
6421
  }),
6425
6422
  effects: effects
6426
6423
  }, /*#__PURE__*/React.createElement(FormButtonGroup, null, /*#__PURE__*/React.createElement(SchemaMarkupField, {
@@ -6497,23 +6494,23 @@ var DrawerBody$3 = function DrawerBody(props) {
6497
6494
  }, "\u786E\u5B9A"), /*#__PURE__*/React.createElement(Button, {
6498
6495
  onClick: function onClick() {
6499
6496
  controller.pipeline( /*#__PURE__*/function () {
6500
- var _ref13 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(s) {
6501
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
6497
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(s) {
6498
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
6502
6499
  while (1) {
6503
- switch (_context13.prev = _context13.next) {
6500
+ switch (_context14.prev = _context14.next) {
6504
6501
  case 0:
6505
- return _context13.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
6502
+ return _context14.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
6506
6503
 
6507
6504
  case 1:
6508
6505
  case "end":
6509
- return _context13.stop();
6506
+ return _context14.stop();
6510
6507
  }
6511
6508
  }
6512
- }, _callee13);
6509
+ }, _callee14);
6513
6510
  }));
6514
6511
 
6515
6512
  return function (_x12) {
6516
- return _ref13.apply(this, arguments);
6513
+ return _ref14.apply(this, arguments);
6517
6514
  };
6518
6515
  }())();
6519
6516
  }
package/dist/index.js CHANGED
@@ -5946,10 +5946,8 @@ var DrawerBody$3 = function DrawerBody(props) {
5946
5946
  return s.goodsListState.endowCode.favouredPolicyNameList;
5947
5947
  }, []);
5948
5948
  /** 优惠政策类型列表 */
5949
+ // const getTaxCategoryCodeTree = controller.useMemo(s => s.goodsListState.endowCode.getTaxCategoryCodeTree, []);
5949
5950
 
5950
- var getTaxCategoryCodeTree = controller.useMemo(function (s) {
5951
- return s.goodsListState.endowCode.getTaxCategoryCodeTree;
5952
- }, []);
5953
5951
  /** 税率 */
5954
5952
 
5955
5953
  var _React$useState3 = React__default['default'].useState(0),
@@ -6192,41 +6190,40 @@ var DrawerBody$3 = function DrawerBody(props) {
6192
6190
  }());
6193
6191
  setVisible(false);
6194
6192
  }, [list, actions, readOnlyTaxRate]);
6195
- var getTaxCategoryCodeTree = controller.useMemo(function (s) {
6196
- return s.goodsListState.endowCode.getTaxCategoryCodeTree || function () {
6197
- return [];
6198
- };
6199
- }, []);
6200
6193
  React__default['default'].useEffect(function () {
6201
- _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
6202
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
6194
+ _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
6195
+ var fn, list;
6196
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
6203
6197
  while (1) {
6204
- switch (_context9.prev = _context9.next) {
6198
+ switch (_context10.prev = _context10.next) {
6205
6199
  case 0:
6206
- _context9.t0 = setList;
6207
- _context9.next = 3;
6208
- return getTaxCategoryCodeTree(filter === null || filter === void 0 ? void 0 : filter.taxCategoryCode, filter === null || filter === void 0 ? void 0 : filter.val);
6209
-
6210
- case 3:
6211
- _context9.t1 = _context9.sent;
6212
-
6213
- if (_context9.t1) {
6214
- _context9.next = 6;
6215
- break;
6216
- }
6200
+ fn = controller.state.goodsListState.endowCode.getTaxCategoryCodeTree || /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
6201
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
6202
+ while (1) {
6203
+ switch (_context9.prev = _context9.next) {
6204
+ case 0:
6205
+ return _context9.abrupt("return", []);
6217
6206
 
6218
- _context9.t1 = [];
6207
+ case 1:
6208
+ case "end":
6209
+ return _context9.stop();
6210
+ }
6211
+ }
6212
+ }, _callee9);
6213
+ }));
6214
+ _context10.next = 3;
6215
+ return fn(filter === null || filter === void 0 ? void 0 : filter.taxCategoryCode, filter === null || filter === void 0 ? void 0 : filter.val);
6219
6216
 
6220
- case 6:
6221
- _context9.t2 = _context9.t1;
6222
- (0, _context9.t0)(_context9.t2);
6217
+ case 3:
6218
+ list = _context10.sent;
6219
+ setList(list || []);
6223
6220
 
6224
- case 8:
6221
+ case 5:
6225
6222
  case "end":
6226
- return _context9.stop();
6223
+ return _context10.stop();
6227
6224
  }
6228
6225
  }
6229
- }, _callee9);
6226
+ }, _callee10);
6230
6227
  }))();
6231
6228
  }, [filter]);
6232
6229
  React__default['default'].useEffect(function () {
@@ -6288,11 +6285,11 @@ var DrawerBody$3 = function DrawerBody(props) {
6288
6285
 
6289
6286
  var onSubmit = React__default['default'].useCallback(function (values) {
6290
6287
  controller.pipeline( /*#__PURE__*/function () {
6291
- var _ref10 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(s) {
6288
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(s) {
6292
6289
  var endowCodeGood;
6293
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
6290
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
6294
6291
  while (1) {
6295
- switch (_context10.prev = _context10.next) {
6292
+ switch (_context11.prev = _context11.next) {
6296
6293
  case 0:
6297
6294
  endowCodeGood = s.goodsListState.endowCode.endowcodeGoodIndex.map(function (e) {
6298
6295
  return s.goodsListState.goodsMap.get(e);
@@ -6328,11 +6325,11 @@ var DrawerBody$3 = function DrawerBody(props) {
6328
6325
  if (!endowCodeGood.some(function (e) {
6329
6326
  return bytesLnegth((e === null || e === void 0 ? void 0 : e.itemName) || '') > 92;
6330
6327
  })) {
6331
- _context10.next = 5;
6328
+ _context11.next = 5;
6332
6329
  break;
6333
6330
  }
6334
6331
 
6335
- _context10.next = 5;
6332
+ _context11.next = 5;
6336
6333
  return function () {
6337
6334
  return new Promise(function (resolve) {
6338
6335
  confirm({
@@ -6362,14 +6359,14 @@ var DrawerBody$3 = function DrawerBody(props) {
6362
6359
 
6363
6360
  case 7:
6364
6361
  case "end":
6365
- return _context10.stop();
6362
+ return _context11.stop();
6366
6363
  }
6367
6364
  }
6368
- }, _callee10);
6365
+ }, _callee11);
6369
6366
  }));
6370
6367
 
6371
6368
  return function (_x9) {
6372
- return _ref10.apply(this, arguments);
6369
+ return _ref11.apply(this, arguments);
6373
6370
  };
6374
6371
  }())();
6375
6372
  }, [controller]);
@@ -6378,23 +6375,23 @@ var DrawerBody$3 = function DrawerBody(props) {
6378
6375
  antd.FormEffectHooks.onFieldValueChange$('taxRate').subscribe(function (e) {
6379
6376
  setTaxRate(e.value);
6380
6377
  actions.setFieldState('taxFreeType', /*#__PURE__*/function () {
6381
- var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(s) {
6382
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
6378
+ var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(s) {
6379
+ return regeneratorRuntime.wrap(function _callee12$(_context12) {
6383
6380
  while (1) {
6384
- switch (_context11.prev = _context11.next) {
6381
+ switch (_context12.prev = _context12.next) {
6385
6382
  case 0:
6386
6383
  if (e.value !== 0) s.value = undefined;
6387
6384
 
6388
6385
  case 1:
6389
6386
  case "end":
6390
- return _context11.stop();
6387
+ return _context12.stop();
6391
6388
  }
6392
6389
  }
6393
- }, _callee11);
6390
+ }, _callee12);
6394
6391
  }));
6395
6392
 
6396
6393
  return function (_x10) {
6397
- return _ref11.apply(this, arguments);
6394
+ return _ref12.apply(this, arguments);
6398
6395
  };
6399
6396
  }());
6400
6397
  }); // 是否享受优惠政策
@@ -6402,23 +6399,23 @@ var DrawerBody$3 = function DrawerBody(props) {
6402
6399
  antd.FormEffectHooks.onFieldValueChange$('favouredPolicyMark').subscribe(function (e) {
6403
6400
  setFavouredPolicyMark(e.value);
6404
6401
  actions.setFieldState('favouredPolicyName', /*#__PURE__*/function () {
6405
- var _ref12 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(s) {
6406
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
6402
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(s) {
6403
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
6407
6404
  while (1) {
6408
- switch (_context12.prev = _context12.next) {
6405
+ switch (_context13.prev = _context13.next) {
6409
6406
  case 0:
6410
6407
  if (e.value === 0) s.value = undefined;
6411
6408
 
6412
6409
  case 1:
6413
6410
  case "end":
6414
- return _context12.stop();
6411
+ return _context13.stop();
6415
6412
  }
6416
6413
  }
6417
- }, _callee12);
6414
+ }, _callee13);
6418
6415
  }));
6419
6416
 
6420
6417
  return function (_x11) {
6421
- return _ref12.apply(this, arguments);
6418
+ return _ref13.apply(this, arguments);
6422
6419
  };
6423
6420
  }());
6424
6421
  });
@@ -6430,7 +6427,7 @@ var DrawerBody$3 = function DrawerBody(props) {
6430
6427
  return /*#__PURE__*/React__default['default'].createElement(antd.SchemaForm, {
6431
6428
  actions: actions,
6432
6429
  components: _objectSpread2(_objectSpread2({}, components), {}, {
6433
- showSearch: !!getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch
6430
+ showSearch: !!controller.state.goodsListState.endowCode.getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch
6434
6431
  }),
6435
6432
  effects: effects
6436
6433
  }, /*#__PURE__*/React__default['default'].createElement(antd.FormButtonGroup, null, /*#__PURE__*/React__default['default'].createElement(antd.SchemaMarkupField, {
@@ -6507,23 +6504,23 @@ var DrawerBody$3 = function DrawerBody(props) {
6507
6504
  }, "\u786E\u5B9A"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Button, {
6508
6505
  onClick: function onClick() {
6509
6506
  controller.pipeline( /*#__PURE__*/function () {
6510
- var _ref13 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(s) {
6511
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
6507
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(s) {
6508
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
6512
6509
  while (1) {
6513
- switch (_context13.prev = _context13.next) {
6510
+ switch (_context14.prev = _context14.next) {
6514
6511
  case 0:
6515
- return _context13.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
6512
+ return _context14.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
6516
6513
 
6517
6514
  case 1:
6518
6515
  case "end":
6519
- return _context13.stop();
6516
+ return _context14.stop();
6520
6517
  }
6521
6518
  }
6522
- }, _callee13);
6519
+ }, _callee14);
6523
6520
  }));
6524
6521
 
6525
6522
  return function (_x12) {
6526
- return _ref13.apply(this, arguments);
6523
+ return _ref14.apply(this, arguments);
6527
6524
  };
6528
6525
  }())();
6529
6526
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -28,7 +28,7 @@
28
28
  "@formily/antd-components": "^1.3.17",
29
29
  "@types/uuid": "^8.3.0",
30
30
  "classnames": "^2.3.1",
31
- "grey-react-box": "^0.2.17",
31
+ "grey-react-box": "^0.2.20",
32
32
  "kts-components-antd-x3": "^3.26.20-5",
33
33
  "mathjs": "^9.4.2",
34
34
  "next": "^11.0.1",
@@ -63,8 +63,8 @@ class MyController1 extends Invoice.InvoiceController {
63
63
 
64
64
  getTaxCategoryCodeList = this.pipeline(async (s) => {
65
65
  console.log('===> 准备赋码的货物索引列表', s.goodsListState.endowCode.endowcodeGoodIndex);
66
-
67
- s.goodsListState.endowCode.getTaxCategoryCodeTree = async (value) => {
66
+ s.goodsListState.endowCode.getTaxCategoryCodeTree = async (taxCategoryCode?: string | undefined, val?: string | undefined) => {
67
+ if(! taxCategoryCode && !val) return [];
68
68
  return moke.map(e => {
69
69
  return {
70
70
  label: `${e.taxCategoryCode}-${e.shorthand}`,
@@ -73,7 +73,7 @@ class MyController1 extends Invoice.InvoiceController {
73
73
  pid: e.pid
74
74
  }
75
75
  })
76
- };
76
+ };;
77
77
  });
78
78
  }
79
79
 
@@ -105,7 +105,7 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
105
105
  const favouredPolicyNameList = controller.useMemo(s => s.goodsListState.endowCode.favouredPolicyNameList, []);
106
106
 
107
107
  /** 优惠政策类型列表 */
108
- const getTaxCategoryCodeTree = controller.useMemo(s => s.goodsListState.endowCode.getTaxCategoryCodeTree, []);
108
+ // const getTaxCategoryCodeTree = controller.useMemo(s => s.goodsListState.endowCode.getTaxCategoryCodeTree, []);
109
109
 
110
110
  /** 税率 */
111
111
  const [taxRate, setTaxRate] = React.useState<number>(0);
@@ -229,11 +229,11 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
229
229
  setVisible(false);
230
230
  }, [list, actions, readOnlyTaxRate])
231
231
 
232
- const getTaxCategoryCodeTree = controller.useMemo(s => s.goodsListState.endowCode.getTaxCategoryCodeTree || (() => []), []);
233
-
234
232
  React.useEffect(() => {
235
233
  (async () => {
236
- setList(await getTaxCategoryCodeTree(filter?.taxCategoryCode, filter?.val) || []);
234
+ const fn = controller.state.goodsListState.endowCode.getTaxCategoryCodeTree || (async () => []);
235
+ const list = await fn(filter?.taxCategoryCode, filter?.val);
236
+ setList(list || []);
237
237
  })()
238
238
  }, [filter])
239
239
 
@@ -371,7 +371,7 @@ const DrawerBody = (props: { defaultValue: IGood }) => {
371
371
  }, [controller]);
372
372
 
373
373
  return (
374
- <SchemaForm actions={actions} components={{ ...components, showSearch: !!getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch }} effects={effects}>
374
+ <SchemaForm actions={actions} components={{ ...components, showSearch: !!controller.state.goodsListState.endowCode.getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch }} effects={effects}>
375
375
  <FormButtonGroup>
376
376
  <Field
377
377
  name="taxClassificationCode"