kts-component-invoice-operate 3.2.78 → 3.2.79

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.
Files changed (23) hide show
  1. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.d.ts +8 -0
  2. package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.d.ts +2 -0
  3. package/dist/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.d.ts +2 -0
  4. package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +5 -0
  5. package/dist/TaxClassificationCodeModal/_test/easiest/index.d.ts +3 -0
  6. package/dist/TaxClassificationCodeModal/index.d.ts +16 -0
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.esm.js +365 -44
  9. package/dist/index.js +361 -39
  10. package/package.json +1 -1
  11. package/src/Invoice/Invoice-digtal/_test/readOnly/index.tsx +4 -3
  12. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.tsx +15 -5
  13. package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +3 -0
  14. package/src/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.ts +3 -0
  15. package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +9 -4
  16. package/src/Invoice/ui/default/EndowCodeDrawer/index.tsx +112 -2
  17. package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +1 -1
  18. package/src/Invoice/ui/digtal/Sign/index.tsx +11 -1
  19. package/src/TaxClassificationCodeModal/_test/easiest/index.tsx +176 -0
  20. package/src/TaxClassificationCodeModal/index.less +0 -0
  21. package/src/TaxClassificationCodeModal/index.md +6 -0
  22. package/src/TaxClassificationCodeModal/index.tsx +63 -0
  23. package/src/index.ts +3 -0
@@ -47,4 +47,12 @@ export default class EndowCode {
47
47
  cache: {
48
48
  [key: string]: any;
49
49
  };
50
+ /**
51
+ * 打开侧边栏
52
+ * */
53
+ onSearchTaxClassificationCode: (value?: any) => Promise<any[]>;
54
+ /**
55
+ * 动态加载
56
+ * */
57
+ onLoadTaxClassificationCode: (value?: any) => Promise<any[]>;
50
58
  }
@@ -48,4 +48,6 @@ export default interface IGood {
48
48
  favouredPolicyMark?: number;
49
49
  /** 优惠政策类型 */
50
50
  favouredPolicyName?: string;
51
+ /** 税收分类名称 */
52
+ productName?: string;
51
53
  }
@@ -3,6 +3,8 @@ import { ValidationRule } from "kts-components-antd-x3/lib/form";
3
3
  export default class Stakeholder {
4
4
  /** 禁用字段 */
5
5
  disableds?: string[];
6
+ /** 启用字段 */
7
+ enables?: string[];
6
8
  /** 字段字段规则 */
7
9
  rulesMap?: {
8
10
  [key: string]: ValidationRule[] | undefined;
@@ -2,6 +2,7 @@ import GoodsListState from './GoodsListState';
2
2
  import BuyerState from './BuyerState';
3
3
  import Stakeholder from './Stakeholder';
4
4
  import { IInvoiceTypeModalProps } from '../../../InvoiceTypeModal';
5
+ import { TaxClassificationProps } from '../../../TaxClassificationCodeModal';
5
6
  import AutoComplete from './AutoComplete';
6
7
  export default class InvoiceControllerState {
7
8
  /**
@@ -44,4 +45,8 @@ export default class InvoiceControllerState {
44
45
  typeModalProps?: IInvoiceTypeModalProps;
45
46
  /** 自动补全 */
46
47
  autoComplete: AutoComplete;
48
+ /**
49
+ * 商品税收分类编码窗口
50
+ * */
51
+ taxClassificationProps?: TaxClassificationProps;
47
52
  }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export interface TaxClassificationProps {
3
+ /** 是否开启 */
4
+ open?: boolean;
5
+ /** 数据 */
6
+ list?: any[];
7
+ /** 点击了取消 */
8
+ onCancel?: () => void;
9
+ /** 点击了选择 */
10
+ onSelect?: (key: any, info: any) => void;
11
+ /** 点击了加载 */
12
+ onLoad: (value: any) => Promise<any[]>;
13
+ /** 点击了搜索 */
14
+ onSearch?: (value?: any) => void;
15
+ }
16
+ export default function TaxClassificationModal(props: TaxClassificationProps): JSX.Element;
package/dist/index.d.ts CHANGED
@@ -4,3 +4,5 @@ export { default as InvoiceController } from './Invoice/InvoiceController';
4
4
  export type { default as IGood } from './Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood';
5
5
  export { default as InvoiceTypeModal } from './InvoiceTypeModal';
6
6
  export type { IInvoiceTypeModalProps } from './InvoiceTypeModal';
7
+ export { default as TaxClassificationModal } from './TaxClassificationCodeModal';
8
+ export type { TaxClassificationProps } from './TaxClassificationCodeModal';
package/dist/index.esm.js CHANGED
@@ -2,9 +2,9 @@ import 'kts-components-antd-x3/dist/kts-components-antd-x3.css';
2
2
  import React, { createElement, createContext, useContext, useEffect, forwardRef, Children, isValidElement } from 'react';
3
3
  import GreyReactBox, { decorator } from 'grey-react-box';
4
4
  import { chain as chain$1, bignumber, create, all } from 'mathjs';
5
- import { message, Form, Input, Icon as Icon$1, Tag as Tag$1, Select, Button, Tooltip, Switch as Switch$1, Typography, Menu, Dropdown, AutoComplete as AutoComplete$2, Spin, Checkbox, Drawer, Descriptions, Empty, Divider, Popover as Popover$1, Table as Table$1, Tree, Modal as Modal$1, Row as Row$1, Col as Col$1 } from 'kts-components-antd-x3';
5
+ import { message, Form, Input, Icon as Icon$1, Tag as Tag$1, Select, Button, Tooltip, Switch as Switch$1, Typography, Menu, Dropdown, AutoComplete as AutoComplete$2, Spin, Checkbox, Drawer, Descriptions, Empty, Divider, Popover as Popover$1, Table as Table$1, Tree as Tree$1, Modal as Modal$1, Row as Row$1, Col as Col$1 } from 'kts-components-antd-x3';
6
6
  import { v4 } from 'uuid';
7
- import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Dropdown as Dropdown$1, Row, Col, Button as Button$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal } from 'kts-xui';
7
+ import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete$1, Popover, Dropdown as Dropdown$1, Row, Col, Button as Button$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, Input as Input$1, Select as Select$1, Spin as Spin$1, Menu as Menu$1, Form as Form$1, Drawer as Drawer$1, Space, Radio, InputNumber, Popconfirm, Modal, Tree } from 'kts-xui';
8
8
  import classNames from 'classnames';
9
9
  import { Table } from 'kts-components-antd-x4-v4';
10
10
  import { render } from 'react-dom';
@@ -1018,10 +1018,38 @@ var EndowCode = /*#__PURE__*/_createClass(function EndowCode() {
1018
1018
  value: 3
1019
1019
  }];
1020
1020
  this.cache = {};
1021
+ this.onSearchTaxClassificationCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1022
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1023
+ while (1) {
1024
+ switch (_context2.prev = _context2.next) {
1025
+ case 0:
1026
+ return _context2.abrupt("return", []);
1027
+
1028
+ case 1:
1029
+ case "end":
1030
+ return _context2.stop();
1031
+ }
1032
+ }
1033
+ }, _callee2);
1034
+ }));
1035
+ this.onLoadTaxClassificationCode = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1036
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1037
+ while (1) {
1038
+ switch (_context3.prev = _context3.next) {
1039
+ case 0:
1040
+ return _context3.abrupt("return", []);
1041
+
1042
+ case 1:
1043
+ case "end":
1044
+ return _context3.stop();
1045
+ }
1046
+ }
1047
+ }, _callee3);
1048
+ }));
1021
1049
  });
1022
1050
 
1023
1051
  function draft(value) {
1024
- if (!value) return true; // isDiscount
1052
+ if (!value) return true; // isDiscount
1025
1053
 
1026
1054
  var goods = value.endowCode.endowcodeGoodIndex.map(function (e) {
1027
1055
  return value.goodsMap.get(e);
@@ -1152,6 +1180,7 @@ var Stakeholder = /*#__PURE__*/_createClass(function Stakeholder() {
1152
1180
  _classCallCheck(this, Stakeholder);
1153
1181
 
1154
1182
  this.disableds = void 0;
1183
+ this.enables = void 0;
1155
1184
  this.rulesMap = void 0;
1156
1185
  });
1157
1186
 
@@ -1180,6 +1209,7 @@ var InvoiceControllerState = /*#__PURE__*/_createClass(function InvoiceControlle
1180
1209
  this.rootElement = null;
1181
1210
  this.typeModalProps = void 0;
1182
1211
  this.autoComplete = new AutoComplete();
1212
+ this.taxClassificationProps = void 0;
1183
1213
  });
1184
1214
 
1185
1215
  /**
@@ -13166,7 +13196,7 @@ var useColumns = (function (form) {
13166
13196
  dataIndex: 'taxRate',
13167
13197
  key: 'taxRate',
13168
13198
  align: 'right',
13169
- width: 70,
13199
+ width: 75,
13170
13200
  render: function render(value, record) {
13171
13201
  if ((editGood === null || editGood === void 0 ? void 0 : editGood.$index) === record.$index) {
13172
13202
  return React.createElement(Form.Item, null, getFieldDecorator('taxRate', {
@@ -16642,15 +16672,25 @@ var SignDigtal = decorator(Form.create())(function (props) {
16642
16672
  var model = controller.useMemo(function (s) {
16643
16673
  return s.model;
16644
16674
  }, []);
16675
+ /** 禁用字段 */
16676
+
16645
16677
  var disableds = controller.useMemo(function (s) {
16646
16678
  return s.stakeholder.disableds || [];
16647
16679
  }, []);
16680
+ /** 启用字段 */
16681
+
16682
+ var enables = controller.useMemo(function (s) {
16683
+ return s.stakeholder.enables || [];
16684
+ }, []);
16648
16685
  var readOnly = React.useMemo(function () {
16649
16686
  return model === 'readOnly';
16650
16687
  }, [model]);
16651
16688
  var isReadOnly = React.useCallback(function (field) {
16652
16689
  return disableds.indexOf(field) >= 0;
16653
- }, [disableds]); // 注册 form
16690
+ }, [disableds]);
16691
+ var isEnables = React.useCallback(function (field) {
16692
+ return enables.indexOf(field) >= 0;
16693
+ }, [enables]); // 注册 form
16654
16694
 
16655
16695
  controller.useForm('sign', form);
16656
16696
 
@@ -16661,7 +16701,12 @@ var SignDigtal = decorator(Form.create())(function (props) {
16661
16701
  className: 'sign-digtal-readOnly-cont'
16662
16702
  }, React.createElement("div", null, React.createElement("span", null, "\u5907"), React.createElement("span", null, "\u6CE8")), React.createElement("div", null, getFieldDecorator('remarks', {
16663
16703
  initialValue: props.defaultRemark
16664
- })(React.createElement(MyDiv$1, null)))), React.createElement(Form, {
16704
+ })(isEnables('remarks') ? React.createElement(Input$1.TextArea, {
16705
+ placeholder: "\u8BF7\u8F93\u5165",
16706
+ style: {
16707
+ height: '100%'
16708
+ }
16709
+ }) : React.createElement(MyDiv$1, null)))), React.createElement(Form, {
16665
16710
  layout: 'inline',
16666
16711
  className: 'digtal-readOnly-form'
16667
16712
  }, React.createElement(Form.Item, {
@@ -22030,7 +22075,40 @@ var getItemCode = function getItemCode(record, editGood) {
22030
22075
  var css_248z$q = ".kts-invoice-operate-goods-endow-code-button-list {\n display: flex;\n flex-direction: column;\n}\n.kts-invoice-operate-goods-endow-code-button-list > button {\n margin-bottom: 10px;\n}\n";
22031
22076
  styleInject(css_248z$q);
22032
22077
 
22033
- var TreeNode = Tree.TreeNode;
22078
+ function TaxClassificationModal(props) {
22079
+ var _Form$useForm = Form$1.useForm(),
22080
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
22081
+ form = _Form$useForm2[0];
22082
+
22083
+ React.useEffect(function () {
22084
+ if (!props.open) {
22085
+ form.resetFields();
22086
+ }
22087
+ }, [form, props.open]);
22088
+ return React.createElement(Drawer$1, {
22089
+ title: "\u5546\u54C1\u548C\u670D\u52A1\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
22090
+ placement: "right",
22091
+ open: props.open,
22092
+ width: 503,
22093
+ onClose: props.onCancel
22094
+ }, React.createElement(Form$1, {
22095
+ form: form
22096
+ }, React.createElement(Form$1.Item, {
22097
+ name: 'search'
22098
+ }, React.createElement(Input$1, {
22099
+ placeholder: "\u8BF7\u8F93\u5165\u7A0E\u6536\u5206\u7C7B\u7F16\u7801\u3001\u7A0E\u6536\u5206\u7C7B\u540D\u79F0\u8FDB\u884C\u68C0\u7D22",
22100
+ onChange: props.onSearch
22101
+ })), React.createElement(Tree, {
22102
+ onSelect: props.onSelect,
22103
+ loadData: props.onLoad,
22104
+ treeData: props.list,
22105
+ switcherIcon: React.createElement(Icon$1, {
22106
+ type: "down"
22107
+ })
22108
+ })));
22109
+ }
22110
+
22111
+ var TreeNode = Tree$1.TreeNode;
22034
22112
  var confirm = Modal$1.confirm;
22035
22113
  var EndowCodeDrawer = (function () {
22036
22114
  var controller = Invoice.useInvoiceController();
@@ -22153,6 +22231,9 @@ var DrawerBody$3 = function DrawerBody(props) {
22153
22231
  var actions = React.useMemo(function () {
22154
22232
  return createAsyncFormActions();
22155
22233
  }, []);
22234
+ var taxClassificationProps = controller.useMemo(function (s) {
22235
+ return s.taxClassificationProps;
22236
+ }, []);
22156
22237
  /** 免税类型 是否需要 */
22157
22238
 
22158
22239
  var isTaxFreeTypeNeeded = controller.useMemo(function (s) {
@@ -22517,7 +22598,7 @@ var DrawerBody$3 = function DrawerBody(props) {
22517
22598
  taxCategoryCode: e.target.value
22518
22599
  }));
22519
22600
  }
22520
- }))), list && list.length > 0 ? React.createElement(Tree, {
22601
+ }))), list && list.length > 0 ? React.createElement(Tree$1, {
22521
22602
  defaultExpandAll: true,
22522
22603
  selectedKeys: [],
22523
22604
  onSelect: onSelect
@@ -22526,21 +22607,255 @@ var DrawerBody$3 = function DrawerBody(props) {
22526
22607
  color: '#00000073'
22527
22608
  }
22528
22609
  }, "\u8BF7\u8F93\u5165\u201C\u4EA7\u54C1\u6216\u670D\u52A1\u7B80\u79F0\u201D\u6216\u201C\u7A0E\u6536\u5206\u7C7B\u7F16\u7801\u201D\u67E5\u627E\u6570\u636E\u3002")));
22529
- }, [controller, actions]); // 是否享受优惠政策
22610
+ }, [controller, actions]);
22611
+ /** 税收分类编码 选择组件3 */
22612
+
22613
+ var ShowSearch3 = React.useCallback(function (props) {
22614
+ var _React$useState13 = React.useState(false),
22615
+ _React$useState14 = _slicedToArray(_React$useState13, 2),
22616
+ open = _React$useState14[0],
22617
+ setOpen = _React$useState14[1];
22618
+
22619
+ var _React$useState15 = React.useState([]),
22620
+ _React$useState16 = _slicedToArray(_React$useState15, 2),
22621
+ list = _React$useState16[0],
22622
+ setList = _React$useState16[1];
22623
+
22624
+ var onSearch = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
22625
+ var _value$target;
22626
+
22627
+ var value,
22628
+ arr,
22629
+ list,
22630
+ _args11 = arguments;
22631
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
22632
+ while (1) {
22633
+ switch (_context11.prev = _context11.next) {
22634
+ case 0:
22635
+ value = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : null;
22636
+ _context11.next = 3;
22637
+ return controller.state.goodsListState.endowCode.onSearchTaxClassificationCode(value === null || value === void 0 ? void 0 : (_value$target = value.target) === null || _value$target === void 0 ? void 0 : _value$target.value);
22638
+
22639
+ case 3:
22640
+ arr = _context11.sent;
22641
+ list = arr.map(function (item) {
22642
+ var _value$target2;
22643
+
22644
+ var data = _objectSpread2(_objectSpread2({}, item), {}, {
22645
+ title: "".concat(item.productName, " ").concat(item.taxCategoryCode),
22646
+ key: item.taxCategoryCode
22647
+ });
22648
+
22649
+ if (value === null || value === void 0 ? void 0 : (_value$target2 = value.target) === null || _value$target2 === void 0 ? void 0 : _value$target2.value) {
22650
+ data.isLeaf = true;
22651
+ } else {
22652
+ data.selectable = false;
22653
+ }
22530
22654
 
22531
- var _React$useState13 = React.useState(0),
22532
- _React$useState14 = _slicedToArray(_React$useState13, 2),
22533
- favouredPolicyMark = _React$useState14[0],
22534
- setFavouredPolicyMark = _React$useState14[1]; // 确定
22655
+ return data;
22656
+ });
22657
+ setList(list);
22658
+
22659
+ case 6:
22660
+ case "end":
22661
+ return _context11.stop();
22662
+ }
22663
+ }
22664
+ }, _callee11);
22665
+ })), []);
22666
+ var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
22667
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
22668
+ while (1) {
22669
+ switch (_context12.prev = _context12.next) {
22670
+ case 0:
22671
+ _context12.next = 2;
22672
+ return onSearch();
22673
+
22674
+ case 2:
22675
+ setOpen(true);
22676
+
22677
+ case 3:
22678
+ case "end":
22679
+ return _context12.stop();
22680
+ }
22681
+ }
22682
+ }, _callee12);
22683
+ })), []);
22684
+ var onSelect = React.useCallback(function (key, info) {
22685
+ actions.setFieldState('taxClassificationCode', /*#__PURE__*/function () {
22686
+ var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(s) {
22687
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
22688
+ while (1) {
22689
+ switch (_context13.prev = _context13.next) {
22690
+ case 0:
22691
+ s.value = info.node.taxCategoryCode;
22692
+
22693
+ case 1:
22694
+ case "end":
22695
+ return _context13.stop();
22696
+ }
22697
+ }
22698
+ }, _callee13);
22699
+ }));
22700
+
22701
+ return function (_x9) {
22702
+ return _ref13.apply(this, arguments);
22703
+ };
22704
+ }());
22705
+ actions.setFieldState('productName', /*#__PURE__*/function () {
22706
+ var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
22707
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
22708
+ while (1) {
22709
+ switch (_context14.prev = _context14.next) {
22710
+ case 0:
22711
+ s.value = info.node.productName;
22712
+
22713
+ case 1:
22714
+ case "end":
22715
+ return _context14.stop();
22716
+ }
22717
+ }
22718
+ }, _callee14);
22719
+ }));
22720
+
22721
+ return function (_x10) {
22722
+ return _ref14.apply(this, arguments);
22723
+ };
22724
+ }());
22725
+ actions.setFieldState('shorthand', /*#__PURE__*/function () {
22726
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(s) {
22727
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
22728
+ while (1) {
22729
+ switch (_context15.prev = _context15.next) {
22730
+ case 0:
22731
+ s.value = info.node.shorthand;
22732
+
22733
+ case 1:
22734
+ case "end":
22735
+ return _context15.stop();
22736
+ }
22737
+ }
22738
+ }, _callee15);
22739
+ }));
22740
+
22741
+ return function (_x11) {
22742
+ return _ref15.apply(this, arguments);
22743
+ };
22744
+ }());
22745
+ actions.setFieldState('taxRate', /*#__PURE__*/function () {
22746
+ var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(s) {
22747
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
22748
+ while (1) {
22749
+ switch (_context16.prev = _context16.next) {
22750
+ case 0:
22751
+ s.value = info.node.taxRate;
22752
+
22753
+ case 1:
22754
+ case "end":
22755
+ return _context16.stop();
22756
+ }
22757
+ }
22758
+ }, _callee16);
22759
+ }));
22760
+
22761
+ return function (_x12) {
22762
+ return _ref16.apply(this, arguments);
22763
+ };
22764
+ }());
22765
+ setOpen(false);
22766
+ }, [controller, actions]);
22767
+
22768
+ var updateTreeData = function updateTreeData(list, key, children) {
22769
+ var demo = list.map(function (node) {
22770
+ if (node.key === key) {
22771
+ return _objectSpread2(_objectSpread2({}, node), {}, {
22772
+ children: children
22773
+ });
22774
+ }
22775
+
22776
+ if (node.children) {
22777
+ return _objectSpread2(_objectSpread2({}, node), {}, {
22778
+ children: updateTreeData(node.children, key, children)
22779
+ });
22780
+ }
22781
+
22782
+ return node;
22783
+ });
22784
+ setList(demo);
22785
+ };
22786
+
22787
+ var onLoad = React.useCallback( /*#__PURE__*/function () {
22788
+ var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(value) {
22789
+ var arr, data;
22790
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
22791
+ while (1) {
22792
+ switch (_context17.prev = _context17.next) {
22793
+ case 0:
22794
+ if (!value.children) {
22795
+ _context17.next = 2;
22796
+ break;
22797
+ }
22798
+
22799
+ return _context17.abrupt("return", []);
22800
+
22801
+ case 2:
22802
+ _context17.next = 4;
22803
+ return controller.state.goodsListState.endowCode.onLoadTaxClassificationCode(value.taxCategoryCode);
22804
+
22805
+ case 4:
22806
+ arr = _context17.sent;
22807
+ data = arr.map(function (item) {
22808
+ return _objectSpread2(_objectSpread2({}, item), {}, {
22809
+ title: "".concat(item.productName, " ").concat(item.taxCategoryCode),
22810
+ key: item.taxCategoryCode
22811
+ });
22812
+ });
22813
+ setList(function (origin) {
22814
+ updateTreeData(origin, value.key, data);
22815
+ });
22816
+ return _context17.abrupt("return", []);
22817
+
22818
+ case 8:
22819
+ case "end":
22820
+ return _context17.stop();
22821
+ }
22822
+ }
22823
+ }, _callee17);
22824
+ }));
22825
+
22826
+ return function (_x13) {
22827
+ return _ref17.apply(this, arguments);
22828
+ };
22829
+ }(), []);
22830
+ return React.createElement(React.Fragment, null, React.createElement(Input, {
22831
+ readOnly: true,
22832
+ onClick: onClick,
22833
+ value: props.value
22834
+ }), React.createElement(TaxClassificationModal, {
22835
+ list: list,
22836
+ open: open,
22837
+ onSelect: onSelect,
22838
+ onCancel: function onCancel() {
22839
+ setOpen(false);
22840
+ },
22841
+ onSearch: onSearch,
22842
+ onLoad: onLoad
22843
+ }));
22844
+ }, [controller]); // 是否享受优惠政策
22845
+
22846
+ var _React$useState17 = React.useState(0),
22847
+ _React$useState18 = _slicedToArray(_React$useState17, 2),
22848
+ favouredPolicyMark = _React$useState18[0],
22849
+ setFavouredPolicyMark = _React$useState18[1]; // 确定
22535
22850
 
22536
22851
 
22537
22852
  var onSubmit = React.useCallback(function (values) {
22538
22853
  controller.pipeline( /*#__PURE__*/function () {
22539
- var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(s) {
22854
+ var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(s) {
22540
22855
  var endowCodeGood;
22541
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
22856
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
22542
22857
  while (1) {
22543
- switch (_context11.prev = _context11.next) {
22858
+ switch (_context18.prev = _context18.next) {
22544
22859
  case 0:
22545
22860
  endowCodeGood = s.goodsListState.endowCode.endowcodeGoodIndex.map(function (e) {
22546
22861
  return s.goodsListState.goodsMap.get(e);
@@ -22567,14 +22882,14 @@ var DrawerBody$3 = function DrawerBody(props) {
22567
22882
 
22568
22883
  case 4:
22569
22884
  case "end":
22570
- return _context11.stop();
22885
+ return _context18.stop();
22571
22886
  }
22572
22887
  }
22573
- }, _callee11);
22888
+ }, _callee18);
22574
22889
  }));
22575
22890
 
22576
- return function (_x9) {
22577
- return _ref11.apply(this, arguments);
22891
+ return function (_x14) {
22892
+ return _ref18.apply(this, arguments);
22578
22893
  };
22579
22894
  }())();
22580
22895
  }, [controller]);
@@ -22583,23 +22898,23 @@ var DrawerBody$3 = function DrawerBody(props) {
22583
22898
  FormEffectHooks.onFieldValueChange$('taxRate').subscribe(function (e) {
22584
22899
  setTaxRate(e.value);
22585
22900
  actions.setFieldState('taxFreeType', /*#__PURE__*/function () {
22586
- var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(s) {
22587
- return _regeneratorRuntime().wrap(function _callee12$(_context12) {
22901
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(s) {
22902
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
22588
22903
  while (1) {
22589
- switch (_context12.prev = _context12.next) {
22904
+ switch (_context19.prev = _context19.next) {
22590
22905
  case 0:
22591
22906
  if (e.value !== 0) s.value = undefined;
22592
22907
 
22593
22908
  case 1:
22594
22909
  case "end":
22595
- return _context12.stop();
22910
+ return _context19.stop();
22596
22911
  }
22597
22912
  }
22598
- }, _callee12);
22913
+ }, _callee19);
22599
22914
  }));
22600
22915
 
22601
- return function (_x10) {
22602
- return _ref12.apply(this, arguments);
22916
+ return function (_x15) {
22917
+ return _ref19.apply(this, arguments);
22603
22918
  };
22604
22919
  }());
22605
22920
  }); // 是否享受优惠政策
@@ -22607,23 +22922,23 @@ var DrawerBody$3 = function DrawerBody(props) {
22607
22922
  FormEffectHooks.onFieldValueChange$('favouredPolicyMark').subscribe(function (e) {
22608
22923
  setFavouredPolicyMark(e.value);
22609
22924
  actions.setFieldState('favouredPolicyName', /*#__PURE__*/function () {
22610
- var _ref13 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(s) {
22611
- return _regeneratorRuntime().wrap(function _callee13$(_context13) {
22925
+ var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(s) {
22926
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
22612
22927
  while (1) {
22613
- switch (_context13.prev = _context13.next) {
22928
+ switch (_context20.prev = _context20.next) {
22614
22929
  case 0:
22615
22930
  if (e.value === 0) s.value = undefined;
22616
22931
 
22617
22932
  case 1:
22618
22933
  case "end":
22619
- return _context13.stop();
22934
+ return _context20.stop();
22620
22935
  }
22621
22936
  }
22622
- }, _callee13);
22937
+ }, _callee20);
22623
22938
  }));
22624
22939
 
22625
- return function (_x11) {
22626
- return _ref13.apply(this, arguments);
22940
+ return function (_x16) {
22941
+ return _ref20.apply(this, arguments);
22627
22942
  };
22628
22943
  }());
22629
22944
  });
@@ -22636,7 +22951,7 @@ var DrawerBody$3 = function DrawerBody(props) {
22636
22951
  actions: actions,
22637
22952
  previewPlaceholder: " ",
22638
22953
  components: _objectSpread2(_objectSpread2({}, components), {}, {
22639
- showSearch: !!controller.state.goodsListState.endowCode.getTaxCategoryCodeTree ? ShowSearch2 : ShowSearch
22954
+ showSearch: !!controller.state.goodsListState.endowCode.onSearchTaxClassificationCode() ? ShowSearch3 : ShowSearch
22640
22955
  }),
22641
22956
  effects: effects
22642
22957
  }, React.createElement(FormButtonGroup, null, React.createElement(SchemaMarkupField, {
@@ -22649,6 +22964,12 @@ var DrawerBody$3 = function DrawerBody(props) {
22649
22964
  message: '请选择税收分类编码',
22650
22965
  required: true
22651
22966
  }]
22967
+ }), React.createElement(SchemaMarkupField, {
22968
+ name: "productName",
22969
+ type: "string",
22970
+ readOnly: true,
22971
+ default: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.productName,
22972
+ title: "\u7A0E\u6536\u5206\u7C7B\u540D\u79F0"
22652
22973
  }), React.createElement(SchemaMarkupField, {
22653
22974
  name: "shorthand",
22654
22975
  type: "string",
@@ -22723,23 +23044,23 @@ var DrawerBody$3 = function DrawerBody(props) {
22723
23044
  }, "\u786E\u5B9A"), React.createElement(Button, {
22724
23045
  onClick: function onClick() {
22725
23046
  controller.pipeline( /*#__PURE__*/function () {
22726
- var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
22727
- return _regeneratorRuntime().wrap(function _callee14$(_context14) {
23047
+ var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(s) {
23048
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
22728
23049
  while (1) {
22729
- switch (_context14.prev = _context14.next) {
23050
+ switch (_context21.prev = _context21.next) {
22730
23051
  case 0:
22731
- return _context14.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
23052
+ return _context21.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
22732
23053
 
22733
23054
  case 1:
22734
23055
  case "end":
22735
- return _context14.stop();
23056
+ return _context21.stop();
22736
23057
  }
22737
23058
  }
22738
- }, _callee14);
23059
+ }, _callee21);
22739
23060
  }));
22740
23061
 
22741
- return function (_x12) {
22742
- return _ref14.apply(this, arguments);
23062
+ return function (_x17) {
23063
+ return _ref21.apply(this, arguments);
22743
23064
  };
22744
23065
  }())();
22745
23066
  }
@@ -23115,4 +23436,4 @@ var Digtal = function Digtal(props) {
23115
23436
  ), React.createElement(ImportGoodsDrawer, null), React.createElement(EndowCodeDrawer, null));
23116
23437
  };
23117
23438
 
23118
- export { Invoice, InvoiceController, InvoiceTypeModal };
23439
+ export { Invoice, InvoiceController, InvoiceTypeModal, TaxClassificationModal };