kts-component-invoice-operate 3.2.78 → 3.2.80
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/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.d.ts +8 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.d.ts +2 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.d.ts +2 -0
- package/dist/Invoice/InvoiceController/InvoiceControllerState/index.d.ts +5 -0
- package/dist/TaxClassificationCodeModal/_test/easiest/index.d.ts +3 -0
- package/dist/TaxClassificationCodeModal/index.d.ts +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +379 -44
- package/dist/index.js +375 -39
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/readOnly/index.tsx +4 -3
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.tsx +15 -5
- package/src/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/IGood/index.ts +3 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/Stakeholder/index.ts +3 -0
- package/src/Invoice/InvoiceController/InvoiceControllerState/index.ts +9 -4
- package/src/Invoice/ui/default/EndowCodeDrawer/index.tsx +123 -2
- package/src/Invoice/ui/default/GoodsList/hook/useColumns/index.tsx +1 -1
- package/src/Invoice/ui/digtal/Sign/index.tsx +11 -1
- package/src/TaxClassificationCodeModal/_test/easiest/index.tsx +178 -0
- package/src/TaxClassificationCodeModal/index.less +0 -0
- package/src/TaxClassificationCodeModal/index.md +6 -0
- package/src/TaxClassificationCodeModal/index.tsx +67 -0
- package/src/index.ts +3 -0
package/dist/Invoice/InvoiceController/InvoiceControllerState/GoodsListState/EndowCode/index.d.ts
CHANGED
|
@@ -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
|
}
|
|
@@ -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,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:
|
|
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]);
|
|
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(
|
|
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,44 @@ 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
|
-
|
|
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
|
+
setTimeout(function () {
|
|
22086
|
+
form.resetFields();
|
|
22087
|
+
}, 500);
|
|
22088
|
+
}
|
|
22089
|
+
}, [form, props.open]);
|
|
22090
|
+
return React.createElement(Drawer$1, {
|
|
22091
|
+
title: "\u5546\u54C1\u548C\u670D\u52A1\u7A0E\u6536\u5206\u7C7B\u7F16\u7801",
|
|
22092
|
+
placement: "right",
|
|
22093
|
+
open: props.open,
|
|
22094
|
+
width: 503,
|
|
22095
|
+
onClose: props.onCancel
|
|
22096
|
+
}, React.createElement(Form$1, {
|
|
22097
|
+
form: form
|
|
22098
|
+
}, React.createElement(Form$1.Item, {
|
|
22099
|
+
name: 'search'
|
|
22100
|
+
}, React.createElement(Input$1, {
|
|
22101
|
+
placeholder: "\u8BF7\u8F93\u5165\u7A0E\u6536\u5206\u7C7B\u7F16\u7801\u3001\u7A0E\u6536\u5206\u7C7B\u540D\u79F0\u8FDB\u884C\u68C0\u7D22",
|
|
22102
|
+
onChange: props.onSearch
|
|
22103
|
+
})), React.createElement(Form$1.Item, {
|
|
22104
|
+
name: 'tree'
|
|
22105
|
+
}, React.createElement(Tree, {
|
|
22106
|
+
onSelect: props.onSelect,
|
|
22107
|
+
loadData: props.onLoad,
|
|
22108
|
+
treeData: props.list,
|
|
22109
|
+
switcherIcon: React.createElement(Icon$1, {
|
|
22110
|
+
type: "down"
|
|
22111
|
+
})
|
|
22112
|
+
}))));
|
|
22113
|
+
}
|
|
22114
|
+
|
|
22115
|
+
var TreeNode = Tree$1.TreeNode;
|
|
22034
22116
|
var confirm = Modal$1.confirm;
|
|
22035
22117
|
var EndowCodeDrawer = (function () {
|
|
22036
22118
|
var controller = Invoice.useInvoiceController();
|
|
@@ -22153,6 +22235,9 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22153
22235
|
var actions = React.useMemo(function () {
|
|
22154
22236
|
return createAsyncFormActions();
|
|
22155
22237
|
}, []);
|
|
22238
|
+
var taxClassificationProps = controller.useMemo(function (s) {
|
|
22239
|
+
return s.taxClassificationProps;
|
|
22240
|
+
}, []);
|
|
22156
22241
|
/** 免税类型 是否需要 */
|
|
22157
22242
|
|
|
22158
22243
|
var isTaxFreeTypeNeeded = controller.useMemo(function (s) {
|
|
@@ -22517,7 +22602,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22517
22602
|
taxCategoryCode: e.target.value
|
|
22518
22603
|
}));
|
|
22519
22604
|
}
|
|
22520
|
-
}))), list && list.length > 0 ? React.createElement(Tree, {
|
|
22605
|
+
}))), list && list.length > 0 ? React.createElement(Tree$1, {
|
|
22521
22606
|
defaultExpandAll: true,
|
|
22522
22607
|
selectedKeys: [],
|
|
22523
22608
|
onSelect: onSelect
|
|
@@ -22526,21 +22611,265 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22526
22611
|
color: '#00000073'
|
|
22527
22612
|
}
|
|
22528
22613
|
}, "\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]);
|
|
22614
|
+
}, [controller, actions]);
|
|
22615
|
+
/** 税收分类编码 选择组件3 */
|
|
22616
|
+
|
|
22617
|
+
var ShowSearch3 = React.useCallback(function (props) {
|
|
22618
|
+
var _React$useState13 = React.useState(false),
|
|
22619
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
22620
|
+
open = _React$useState14[0],
|
|
22621
|
+
setOpen = _React$useState14[1];
|
|
22622
|
+
|
|
22623
|
+
var _React$useState15 = React.useState([]),
|
|
22624
|
+
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
22625
|
+
list = _React$useState16[0],
|
|
22626
|
+
setList = _React$useState16[1];
|
|
22627
|
+
|
|
22628
|
+
var onSearch = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
22629
|
+
var value,
|
|
22630
|
+
_value$target,
|
|
22631
|
+
arr,
|
|
22632
|
+
_list,
|
|
22633
|
+
_args11 = arguments;
|
|
22634
|
+
|
|
22635
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
22636
|
+
while (1) {
|
|
22637
|
+
switch (_context11.prev = _context11.next) {
|
|
22638
|
+
case 0:
|
|
22639
|
+
value = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : null;
|
|
22640
|
+
|
|
22641
|
+
if (!value) {
|
|
22642
|
+
_context11.next = 9;
|
|
22643
|
+
break;
|
|
22644
|
+
}
|
|
22645
|
+
|
|
22646
|
+
_context11.next = 4;
|
|
22647
|
+
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);
|
|
22648
|
+
|
|
22649
|
+
case 4:
|
|
22650
|
+
arr = _context11.sent;
|
|
22651
|
+
_list = arr.map(function (item) {
|
|
22652
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22653
|
+
title: "".concat(item.productName, " ").concat(item.taxCategoryCode),
|
|
22654
|
+
key: item.taxCategoryCode,
|
|
22655
|
+
isLeaf: true
|
|
22656
|
+
});
|
|
22657
|
+
});
|
|
22658
|
+
setList(_list);
|
|
22659
|
+
_context11.next = 11;
|
|
22660
|
+
break;
|
|
22661
|
+
|
|
22662
|
+
case 9:
|
|
22663
|
+
_context11.next = 11;
|
|
22664
|
+
return onLoad();
|
|
22665
|
+
|
|
22666
|
+
case 11:
|
|
22667
|
+
case "end":
|
|
22668
|
+
return _context11.stop();
|
|
22669
|
+
}
|
|
22670
|
+
}
|
|
22671
|
+
}, _callee11);
|
|
22672
|
+
})), []);
|
|
22673
|
+
var onLoad = React.useCallback( /*#__PURE__*/function () {
|
|
22674
|
+
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(value) {
|
|
22675
|
+
var arr, data, treeData;
|
|
22676
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
22677
|
+
while (1) {
|
|
22678
|
+
switch (_context12.prev = _context12.next) {
|
|
22679
|
+
case 0:
|
|
22680
|
+
_context12.next = 2;
|
|
22681
|
+
return controller.state.goodsListState.endowCode.onLoadTaxClassificationCode(value === null || value === void 0 ? void 0 : value.taxCategoryCode);
|
|
22530
22682
|
|
|
22531
|
-
|
|
22532
|
-
|
|
22533
|
-
|
|
22534
|
-
|
|
22683
|
+
case 2:
|
|
22684
|
+
arr = _context12.sent;
|
|
22685
|
+
data = arr.map(function (item) {
|
|
22686
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22687
|
+
title: "".concat(item.productName, " ").concat(item.taxCategoryCode),
|
|
22688
|
+
key: item.taxCategoryCode
|
|
22689
|
+
});
|
|
22690
|
+
});
|
|
22691
|
+
treeData = optimizeTreeData(data);
|
|
22692
|
+
|
|
22693
|
+
if (value === null || value === void 0 ? void 0 : value.key) {
|
|
22694
|
+
setList(function (origin) {
|
|
22695
|
+
updateTreeData(origin, value.key, treeData);
|
|
22696
|
+
});
|
|
22697
|
+
} else {
|
|
22698
|
+
setList(treeData);
|
|
22699
|
+
}
|
|
22700
|
+
|
|
22701
|
+
return _context12.abrupt("return", []);
|
|
22702
|
+
|
|
22703
|
+
case 7:
|
|
22704
|
+
case "end":
|
|
22705
|
+
return _context12.stop();
|
|
22706
|
+
}
|
|
22707
|
+
}
|
|
22708
|
+
}, _callee12);
|
|
22709
|
+
}));
|
|
22710
|
+
|
|
22711
|
+
return function (_x9) {
|
|
22712
|
+
return _ref12.apply(this, arguments);
|
|
22713
|
+
};
|
|
22714
|
+
}(), []);
|
|
22715
|
+
var onClick = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
22716
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
22717
|
+
while (1) {
|
|
22718
|
+
switch (_context13.prev = _context13.next) {
|
|
22719
|
+
case 0:
|
|
22720
|
+
_context13.next = 2;
|
|
22721
|
+
return onLoad();
|
|
22722
|
+
|
|
22723
|
+
case 2:
|
|
22724
|
+
setOpen(true);
|
|
22725
|
+
|
|
22726
|
+
case 3:
|
|
22727
|
+
case "end":
|
|
22728
|
+
return _context13.stop();
|
|
22729
|
+
}
|
|
22730
|
+
}
|
|
22731
|
+
}, _callee13);
|
|
22732
|
+
})), []);
|
|
22733
|
+
var onSelect = React.useCallback(function (key, info) {
|
|
22734
|
+
actions.setFieldState('taxClassificationCode', /*#__PURE__*/function () {
|
|
22735
|
+
var _ref14 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(s) {
|
|
22736
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
22737
|
+
while (1) {
|
|
22738
|
+
switch (_context14.prev = _context14.next) {
|
|
22739
|
+
case 0:
|
|
22740
|
+
s.value = info.node.taxCategoryCode;
|
|
22741
|
+
|
|
22742
|
+
case 1:
|
|
22743
|
+
case "end":
|
|
22744
|
+
return _context14.stop();
|
|
22745
|
+
}
|
|
22746
|
+
}
|
|
22747
|
+
}, _callee14);
|
|
22748
|
+
}));
|
|
22749
|
+
|
|
22750
|
+
return function (_x10) {
|
|
22751
|
+
return _ref14.apply(this, arguments);
|
|
22752
|
+
};
|
|
22753
|
+
}());
|
|
22754
|
+
actions.setFieldState('productName', /*#__PURE__*/function () {
|
|
22755
|
+
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(s) {
|
|
22756
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
22757
|
+
while (1) {
|
|
22758
|
+
switch (_context15.prev = _context15.next) {
|
|
22759
|
+
case 0:
|
|
22760
|
+
s.value = info.node.productName;
|
|
22761
|
+
|
|
22762
|
+
case 1:
|
|
22763
|
+
case "end":
|
|
22764
|
+
return _context15.stop();
|
|
22765
|
+
}
|
|
22766
|
+
}
|
|
22767
|
+
}, _callee15);
|
|
22768
|
+
}));
|
|
22769
|
+
|
|
22770
|
+
return function (_x11) {
|
|
22771
|
+
return _ref15.apply(this, arguments);
|
|
22772
|
+
};
|
|
22773
|
+
}());
|
|
22774
|
+
actions.setFieldState('shorthand', /*#__PURE__*/function () {
|
|
22775
|
+
var _ref16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(s) {
|
|
22776
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
22777
|
+
while (1) {
|
|
22778
|
+
switch (_context16.prev = _context16.next) {
|
|
22779
|
+
case 0:
|
|
22780
|
+
s.value = info.node.shorthand;
|
|
22781
|
+
|
|
22782
|
+
case 1:
|
|
22783
|
+
case "end":
|
|
22784
|
+
return _context16.stop();
|
|
22785
|
+
}
|
|
22786
|
+
}
|
|
22787
|
+
}, _callee16);
|
|
22788
|
+
}));
|
|
22789
|
+
|
|
22790
|
+
return function (_x12) {
|
|
22791
|
+
return _ref16.apply(this, arguments);
|
|
22792
|
+
};
|
|
22793
|
+
}());
|
|
22794
|
+
actions.setFieldState('taxRate', /*#__PURE__*/function () {
|
|
22795
|
+
var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(s) {
|
|
22796
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
22797
|
+
while (1) {
|
|
22798
|
+
switch (_context17.prev = _context17.next) {
|
|
22799
|
+
case 0:
|
|
22800
|
+
s.value = info.node.taxRate;
|
|
22801
|
+
|
|
22802
|
+
case 1:
|
|
22803
|
+
case "end":
|
|
22804
|
+
return _context17.stop();
|
|
22805
|
+
}
|
|
22806
|
+
}
|
|
22807
|
+
}, _callee17);
|
|
22808
|
+
}));
|
|
22809
|
+
|
|
22810
|
+
return function (_x13) {
|
|
22811
|
+
return _ref17.apply(this, arguments);
|
|
22812
|
+
};
|
|
22813
|
+
}());
|
|
22814
|
+
setOpen(false);
|
|
22815
|
+
}, [controller, actions]);
|
|
22816
|
+
|
|
22817
|
+
var optimizeTreeData = function optimizeTreeData(data) {
|
|
22818
|
+
return data.map(function (item) {
|
|
22819
|
+
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
22820
|
+
selectable: (item === null || item === void 0 ? void 0 : item.hzx) === 'N',
|
|
22821
|
+
isLeaf: (item === null || item === void 0 ? void 0 : item.hzx) === 'N'
|
|
22822
|
+
});
|
|
22823
|
+
});
|
|
22824
|
+
};
|
|
22825
|
+
|
|
22826
|
+
var updateTreeData = function updateTreeData(list, key, children) {
|
|
22827
|
+
return list.map(function (node) {
|
|
22828
|
+
if (node.key === key) {
|
|
22829
|
+
return _objectSpread2(_objectSpread2({}, node), {}, {
|
|
22830
|
+
children: children
|
|
22831
|
+
});
|
|
22832
|
+
}
|
|
22833
|
+
|
|
22834
|
+
if (node.children) {
|
|
22835
|
+
return _objectSpread2(_objectSpread2({}, node), {}, {
|
|
22836
|
+
children: updateTreeData(node.children, key, children)
|
|
22837
|
+
});
|
|
22838
|
+
}
|
|
22839
|
+
|
|
22840
|
+
return node;
|
|
22841
|
+
});
|
|
22842
|
+
};
|
|
22843
|
+
|
|
22844
|
+
return React.createElement(React.Fragment, null, React.createElement(Input, {
|
|
22845
|
+
readOnly: true,
|
|
22846
|
+
onClick: onClick,
|
|
22847
|
+
value: props.value
|
|
22848
|
+
}), React.createElement(TaxClassificationModal, {
|
|
22849
|
+
list: list,
|
|
22850
|
+
open: open,
|
|
22851
|
+
onSelect: onSelect,
|
|
22852
|
+
onCancel: function onCancel() {
|
|
22853
|
+
setOpen(false);
|
|
22854
|
+
},
|
|
22855
|
+
onSearch: onSearch,
|
|
22856
|
+
onLoad: onLoad
|
|
22857
|
+
}));
|
|
22858
|
+
}, [controller]); // 是否享受优惠政策
|
|
22859
|
+
|
|
22860
|
+
var _React$useState17 = React.useState(0),
|
|
22861
|
+
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
22862
|
+
favouredPolicyMark = _React$useState18[0],
|
|
22863
|
+
setFavouredPolicyMark = _React$useState18[1]; // 确定
|
|
22535
22864
|
|
|
22536
22865
|
|
|
22537
22866
|
var onSubmit = React.useCallback(function (values) {
|
|
22538
22867
|
controller.pipeline( /*#__PURE__*/function () {
|
|
22539
|
-
var
|
|
22868
|
+
var _ref18 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(s) {
|
|
22540
22869
|
var endowCodeGood;
|
|
22541
|
-
return _regeneratorRuntime().wrap(function
|
|
22870
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
22542
22871
|
while (1) {
|
|
22543
|
-
switch (
|
|
22872
|
+
switch (_context18.prev = _context18.next) {
|
|
22544
22873
|
case 0:
|
|
22545
22874
|
endowCodeGood = s.goodsListState.endowCode.endowcodeGoodIndex.map(function (e) {
|
|
22546
22875
|
return s.goodsListState.goodsMap.get(e);
|
|
@@ -22567,14 +22896,14 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22567
22896
|
|
|
22568
22897
|
case 4:
|
|
22569
22898
|
case "end":
|
|
22570
|
-
return
|
|
22899
|
+
return _context18.stop();
|
|
22571
22900
|
}
|
|
22572
22901
|
}
|
|
22573
|
-
},
|
|
22902
|
+
}, _callee18);
|
|
22574
22903
|
}));
|
|
22575
22904
|
|
|
22576
|
-
return function (
|
|
22577
|
-
return
|
|
22905
|
+
return function (_x14) {
|
|
22906
|
+
return _ref18.apply(this, arguments);
|
|
22578
22907
|
};
|
|
22579
22908
|
}())();
|
|
22580
22909
|
}, [controller]);
|
|
@@ -22583,23 +22912,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22583
22912
|
FormEffectHooks.onFieldValueChange$('taxRate').subscribe(function (e) {
|
|
22584
22913
|
setTaxRate(e.value);
|
|
22585
22914
|
actions.setFieldState('taxFreeType', /*#__PURE__*/function () {
|
|
22586
|
-
var
|
|
22587
|
-
return _regeneratorRuntime().wrap(function
|
|
22915
|
+
var _ref19 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(s) {
|
|
22916
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
22588
22917
|
while (1) {
|
|
22589
|
-
switch (
|
|
22918
|
+
switch (_context19.prev = _context19.next) {
|
|
22590
22919
|
case 0:
|
|
22591
22920
|
if (e.value !== 0) s.value = undefined;
|
|
22592
22921
|
|
|
22593
22922
|
case 1:
|
|
22594
22923
|
case "end":
|
|
22595
|
-
return
|
|
22924
|
+
return _context19.stop();
|
|
22596
22925
|
}
|
|
22597
22926
|
}
|
|
22598
|
-
},
|
|
22927
|
+
}, _callee19);
|
|
22599
22928
|
}));
|
|
22600
22929
|
|
|
22601
|
-
return function (
|
|
22602
|
-
return
|
|
22930
|
+
return function (_x15) {
|
|
22931
|
+
return _ref19.apply(this, arguments);
|
|
22603
22932
|
};
|
|
22604
22933
|
}());
|
|
22605
22934
|
}); // 是否享受优惠政策
|
|
@@ -22607,23 +22936,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22607
22936
|
FormEffectHooks.onFieldValueChange$('favouredPolicyMark').subscribe(function (e) {
|
|
22608
22937
|
setFavouredPolicyMark(e.value);
|
|
22609
22938
|
actions.setFieldState('favouredPolicyName', /*#__PURE__*/function () {
|
|
22610
|
-
var
|
|
22611
|
-
return _regeneratorRuntime().wrap(function
|
|
22939
|
+
var _ref20 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(s) {
|
|
22940
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
22612
22941
|
while (1) {
|
|
22613
|
-
switch (
|
|
22942
|
+
switch (_context20.prev = _context20.next) {
|
|
22614
22943
|
case 0:
|
|
22615
22944
|
if (e.value === 0) s.value = undefined;
|
|
22616
22945
|
|
|
22617
22946
|
case 1:
|
|
22618
22947
|
case "end":
|
|
22619
|
-
return
|
|
22948
|
+
return _context20.stop();
|
|
22620
22949
|
}
|
|
22621
22950
|
}
|
|
22622
|
-
},
|
|
22951
|
+
}, _callee20);
|
|
22623
22952
|
}));
|
|
22624
22953
|
|
|
22625
|
-
return function (
|
|
22626
|
-
return
|
|
22954
|
+
return function (_x16) {
|
|
22955
|
+
return _ref20.apply(this, arguments);
|
|
22627
22956
|
};
|
|
22628
22957
|
}());
|
|
22629
22958
|
});
|
|
@@ -22636,7 +22965,7 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22636
22965
|
actions: actions,
|
|
22637
22966
|
previewPlaceholder: " ",
|
|
22638
22967
|
components: _objectSpread2(_objectSpread2({}, components), {}, {
|
|
22639
|
-
showSearch: !!controller.state.goodsListState.endowCode.
|
|
22968
|
+
showSearch: !!controller.state.goodsListState.endowCode.onLoadTaxClassificationCode() ? ShowSearch3 : ShowSearch
|
|
22640
22969
|
}),
|
|
22641
22970
|
effects: effects
|
|
22642
22971
|
}, React.createElement(FormButtonGroup, null, React.createElement(SchemaMarkupField, {
|
|
@@ -22649,6 +22978,12 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22649
22978
|
message: '请选择税收分类编码',
|
|
22650
22979
|
required: true
|
|
22651
22980
|
}]
|
|
22981
|
+
}), React.createElement(SchemaMarkupField, {
|
|
22982
|
+
name: "productName",
|
|
22983
|
+
type: "string",
|
|
22984
|
+
readOnly: true,
|
|
22985
|
+
default: defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.productName,
|
|
22986
|
+
title: "\u7A0E\u6536\u5206\u7C7B\u540D\u79F0"
|
|
22652
22987
|
}), React.createElement(SchemaMarkupField, {
|
|
22653
22988
|
name: "shorthand",
|
|
22654
22989
|
type: "string",
|
|
@@ -22723,23 +23058,23 @@ var DrawerBody$3 = function DrawerBody(props) {
|
|
|
22723
23058
|
}, "\u786E\u5B9A"), React.createElement(Button, {
|
|
22724
23059
|
onClick: function onClick() {
|
|
22725
23060
|
controller.pipeline( /*#__PURE__*/function () {
|
|
22726
|
-
var
|
|
22727
|
-
return _regeneratorRuntime().wrap(function
|
|
23061
|
+
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(s) {
|
|
23062
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
22728
23063
|
while (1) {
|
|
22729
|
-
switch (
|
|
23064
|
+
switch (_context21.prev = _context21.next) {
|
|
22730
23065
|
case 0:
|
|
22731
|
-
return
|
|
23066
|
+
return _context21.abrupt("return", s.goodsListState.endowCode.endowcodeGoodIndex = []);
|
|
22732
23067
|
|
|
22733
23068
|
case 1:
|
|
22734
23069
|
case "end":
|
|
22735
|
-
return
|
|
23070
|
+
return _context21.stop();
|
|
22736
23071
|
}
|
|
22737
23072
|
}
|
|
22738
|
-
},
|
|
23073
|
+
}, _callee21);
|
|
22739
23074
|
}));
|
|
22740
23075
|
|
|
22741
|
-
return function (
|
|
22742
|
-
return
|
|
23076
|
+
return function (_x17) {
|
|
23077
|
+
return _ref21.apply(this, arguments);
|
|
22743
23078
|
};
|
|
22744
23079
|
}())();
|
|
22745
23080
|
}
|
|
@@ -23115,4 +23450,4 @@ var Digtal = function Digtal(props) {
|
|
|
23115
23450
|
), React.createElement(ImportGoodsDrawer, null), React.createElement(EndowCodeDrawer, null));
|
|
23116
23451
|
};
|
|
23117
23452
|
|
|
23118
|
-
export { Invoice, InvoiceController, InvoiceTypeModal };
|
|
23453
|
+
export { Invoice, InvoiceController, InvoiceTypeModal, TaxClassificationModal };
|