kts-component-invoice-operate 3.2.214 → 3.3.1
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/ui/digtal/Architecture/index.d.ts +5 -0
- package/dist/index.esm.js +88 -5
- package/dist/index.js +87 -4
- package/package.json +1 -1
- package/src/Invoice/Invoice-digtal/_test/architecture/index.tsx +33 -7
- package/src/Invoice/Invoice-digtal/_test/easiest/index.tsx +9 -7
- package/src/Invoice/Invoice-digtal/index.md +4 -4
- package/src/Invoice/ui/digtal/Architecture/index.tsx +76 -11
- package/src/Invoice/ui/digtal/Architecture/svg/arrowDown.svg +3 -0
- package/src/Invoice/ui/digtal/Architecture/svg/arrowUp.svg +3 -0
- package/src/Invoice/ui/digtal/Architecture/svg/plus.svg +12 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import './index.less';
|
|
3
|
+
import InvoiceController from "../../../InvoiceController";
|
|
3
4
|
export interface RealEstateInfoProps {
|
|
4
5
|
/**
|
|
5
6
|
* 建筑服务地址数据
|
|
@@ -9,6 +10,10 @@ export interface RealEstateInfoProps {
|
|
|
9
10
|
* 建筑服务地址数据字段名
|
|
10
11
|
*/
|
|
11
12
|
fieldNames?: any;
|
|
13
|
+
onRegionalSelect?: (value: boolean) => void;
|
|
14
|
+
/** 点击了 */
|
|
15
|
+
onClickImportButton?: (e: InvoiceController) => void;
|
|
16
|
+
demo?: boolean;
|
|
12
17
|
}
|
|
13
18
|
/** 特殊信息-建筑服务 */
|
|
14
19
|
declare const _default: React.FunctionComponent<RealEstateInfoProps>;
|
package/dist/index.esm.js
CHANGED
|
@@ -8,7 +8,7 @@ import { message as message$1, TableManual, Switch, AutoComplete as AutoComplete
|
|
|
8
8
|
import classnames from 'classnames';
|
|
9
9
|
import { Table } from 'kts-components-antd-x4-v4';
|
|
10
10
|
import { render } from 'react-dom';
|
|
11
|
-
import { DatePicker, Row as Row$1, Col as Col$1, Cascader, Input as Input$2, Select as Select$2 } from 'kts-components-antd-x4';
|
|
11
|
+
import { DatePicker, Row as Row$1, Col as Col$1, Cascader, Input as Input$2, Select as Select$2, Button as Button$2 } from 'kts-components-antd-x4';
|
|
12
12
|
import { Input as Input$3, NumberPicker } from '@formily/antd-components';
|
|
13
13
|
import { createAsyncFormActions, FormEffectHooks, SchemaForm, FormButtonGroup, SchemaMarkupField } from '@formily/antd';
|
|
14
14
|
|
|
@@ -24529,21 +24529,59 @@ var MyNY = /*#__PURE__*/function (_React$Component4) {
|
|
|
24529
24529
|
var css_248z$s = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-real-estate-info-digtal .break-word {\n word-break: break-word;\n}\n";
|
|
24530
24530
|
styleInject(css_248z$s);
|
|
24531
24531
|
|
|
24532
|
+
var _g$4, _defs$6;
|
|
24533
|
+
|
|
24534
|
+
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
24535
|
+
|
|
24536
|
+
function SvgPlus$3(props) {
|
|
24537
|
+
return /*#__PURE__*/createElement("svg", _extends$e({
|
|
24538
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24539
|
+
width: 16,
|
|
24540
|
+
height: 15,
|
|
24541
|
+
fill: "none"
|
|
24542
|
+
}, props), _g$4 || (_g$4 = /*#__PURE__*/createElement("g", {
|
|
24543
|
+
clipPath: "url(#plus_svg__clip0_715_360)"
|
|
24544
|
+
}, /*#__PURE__*/createElement("path", {
|
|
24545
|
+
d: "M8 14.531A7.031 7.031 0 118 .468a7.031 7.031 0 010 14.063zm0-.937A6.094 6.094 0 108 1.406a6.094 6.094 0 000 12.188z"
|
|
24546
|
+
}), /*#__PURE__*/createElement("path", {
|
|
24547
|
+
d: "M4.25 7.969a.469.469 0 010-.938h7.5a.47.47 0 010 .938h-7.5z"
|
|
24548
|
+
}), /*#__PURE__*/createElement("path", {
|
|
24549
|
+
d: "M7.531 3.75a.469.469 0 01.938 0v7.5a.47.47 0 01-.938 0v-7.5z"
|
|
24550
|
+
}))), _defs$6 || (_defs$6 = /*#__PURE__*/createElement("defs", null, /*#__PURE__*/createElement("clipPath", {
|
|
24551
|
+
id: "plus_svg__clip0_715_360"
|
|
24552
|
+
}, /*#__PURE__*/createElement("path", {
|
|
24553
|
+
transform: "translate(.5)",
|
|
24554
|
+
d: "M0 0h15v15H0z"
|
|
24555
|
+
})))));
|
|
24556
|
+
}
|
|
24557
|
+
|
|
24532
24558
|
/** 特殊信息-建筑服务 */
|
|
24533
24559
|
|
|
24534
24560
|
var Architecture = decorator(Form.create())(function (props) {
|
|
24535
24561
|
/** 控制器 */
|
|
24536
24562
|
var controller = Invoice.useInvoiceController();
|
|
24537
|
-
var form = props.form
|
|
24563
|
+
var form = props.form,
|
|
24564
|
+
onClickImportButton = props.onClickImportButton;
|
|
24538
24565
|
var getFieldDecorator = form.getFieldDecorator;
|
|
24539
24566
|
var model = controller.useMemo(function (s) {
|
|
24540
24567
|
return s.model;
|
|
24541
24568
|
}, []);
|
|
24542
24569
|
var readOnly = React.useMemo(function () {
|
|
24543
24570
|
return model === 'readOnly';
|
|
24544
|
-
}, [model]);
|
|
24571
|
+
}, [model]);
|
|
24572
|
+
|
|
24573
|
+
var _React$useState = React.useState(false),
|
|
24574
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24575
|
+
region = _React$useState2[0],
|
|
24576
|
+
setRegion = _React$useState2[1]; // 注册 form
|
|
24577
|
+
|
|
24545
24578
|
|
|
24546
24579
|
controller.useForm('serviceDataDtoInfo', form);
|
|
24580
|
+
|
|
24581
|
+
var onSelectChange = function onSelectChange(value) {
|
|
24582
|
+
setRegion(value === 'Y' ? true : false); // props.onRegionalSelect && props.onRegionalSelect(value);
|
|
24583
|
+
};
|
|
24584
|
+
|
|
24547
24585
|
return /*#__PURE__*/React.createElement("div", {
|
|
24548
24586
|
className: "kts-invoice-operate-real-estate-info-digtal"
|
|
24549
24587
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -24610,6 +24648,7 @@ var Architecture = decorator(Form.create())(function (props) {
|
|
|
24610
24648
|
message: '请选择跨地(市)标志'
|
|
24611
24649
|
}]
|
|
24612
24650
|
})(readOnly ? /*#__PURE__*/React.createElement(MyNY$1, null) : /*#__PURE__*/React.createElement(Select$2, {
|
|
24651
|
+
onChange: onSelectChange,
|
|
24613
24652
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
24614
24653
|
style: {
|
|
24615
24654
|
width: '100%'
|
|
@@ -24618,7 +24657,45 @@ var Architecture = decorator(Form.create())(function (props) {
|
|
|
24618
24657
|
value: 'Y'
|
|
24619
24658
|
}, "\u662F"), /*#__PURE__*/React.createElement(Select$2.Option, {
|
|
24620
24659
|
value: 'N'
|
|
24621
|
-
}, "\u5426"))))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24660
|
+
}, "\u5426"))))), props.demo && region && /*#__PURE__*/React.createElement(Col$1, {
|
|
24661
|
+
span: 6
|
|
24662
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24663
|
+
label: "\u6D89\u7A0E\u4E8B\u9879\u7F16\u53F7",
|
|
24664
|
+
colon: false
|
|
24665
|
+
}, getFieldDecorator('taxMatterNo', {
|
|
24666
|
+
rules: readOnly ? [] : [{
|
|
24667
|
+
required: true,
|
|
24668
|
+
message: '请选择'
|
|
24669
|
+
}, {
|
|
24670
|
+
validator: function validator(_, value, callback) {
|
|
24671
|
+
var constructAddress = form.getFieldValue('constructAddress');
|
|
24672
|
+
console.log(constructAddress.join(''), value);
|
|
24673
|
+
|
|
24674
|
+
if (constructAddress.join('') === value) {
|
|
24675
|
+
callback();
|
|
24676
|
+
} else {
|
|
24677
|
+
callback('建筑服务发生地与税务事项地址不一致');
|
|
24678
|
+
}
|
|
24679
|
+
}
|
|
24680
|
+
}]
|
|
24681
|
+
})(readOnly ? /*#__PURE__*/React.createElement(MyDiv$4, null) : /*#__PURE__*/React.createElement(Input$2, {
|
|
24682
|
+
autoComplete: "off",
|
|
24683
|
+
disabled: true,
|
|
24684
|
+
suffix: /*#__PURE__*/React.createElement(Button$2, {
|
|
24685
|
+
type: 'link',
|
|
24686
|
+
style: {
|
|
24687
|
+
padding: 0,
|
|
24688
|
+
width: 20,
|
|
24689
|
+
height: '100%'
|
|
24690
|
+
},
|
|
24691
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
24692
|
+
component: SvgPlus$3
|
|
24693
|
+
}),
|
|
24694
|
+
onClick: function onClick() {
|
|
24695
|
+
onClickImportButton && onClickImportButton(controller);
|
|
24696
|
+
}
|
|
24697
|
+
})
|
|
24698
|
+
})))), /*#__PURE__*/React.createElement(Col$1, {
|
|
24622
24699
|
span: 6
|
|
24623
24700
|
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
24624
24701
|
label: "\u5EFA\u7B51\u9879\u76EE\u540D\u79F0"
|
|
@@ -24737,7 +24814,13 @@ var MyNY$1 = /*#__PURE__*/function (_React$Component4) {
|
|
|
24737
24814
|
}]);
|
|
24738
24815
|
|
|
24739
24816
|
return MyNY;
|
|
24740
|
-
}(React.Component);
|
|
24817
|
+
}(React.Component); // function BuyerNameInput(props: InputProps & { fieldName: string; myform: WrappedFormUtils<any> }) {
|
|
24818
|
+
// const { fieldName, myform: form } = props;
|
|
24819
|
+
// if (props.readOnly) return <span className='digtal-stakeholder-form-text'>{props.value}</span>;
|
|
24820
|
+
// return (
|
|
24821
|
+
// <Input disabled={true} {...props} style={{ width: '100%', ...props.style }} />
|
|
24822
|
+
// )
|
|
24823
|
+
// }
|
|
24741
24824
|
|
|
24742
24825
|
var css_248z$t = ".kts-invoice-operate-goods-table-virtual .ktsAntX-table-body {\n height: 280px;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table.ktsAntX-table-bordered > .ktsAntX-table-container > .ktsAntX-table-header > table > thead > tr > th {\n padding: 0 10px;\n height: 32px;\n background: #f4f4f4;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table.ktsAntX-table-bordered > .ktsAntX-table-container > .ktsAntX-table-body > table > tbody > tr > td {\n padding: 0;\n height: 32px;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-body {\n position: relative;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-body > table {\n position: absolute;\n left: 0;\n top: 0;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody {\n position: relative;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-checkbox-wrapper .ktsAntX-checkbox-inner {\n width: 16px;\n height: 16px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n top: 1px;\n}\n";
|
|
24743
24826
|
styleInject(css_248z$t);
|
package/dist/index.js
CHANGED
|
@@ -24539,21 +24539,59 @@ var MyNY = /*#__PURE__*/function (_React$Component4) {
|
|
|
24539
24539
|
var css_248z$s = ".kts-invoice-operate-real-estate-info-digtal {\n padding: 20px;\n border-bottom: 2px solid #9F613E;\n border-left: 2px solid #9F613E;\n border-right: 2px solid #9F613E;\n}\n.kts-invoice-operate-real-estate-info-digtal .real-estate-info-digtal-label {\n color: #9F613E;\n font-weight: bold;\n}\n.kts-invoice-operate-real-estate-info-digtal .ktsAnt3x-row.ktsAnt3x-form-item {\n margin-bottom: 0;\n}\n.kts-invoice-operate-real-estate-info-digtal .break-word {\n word-break: break-word;\n}\n";
|
|
24540
24540
|
styleInject(css_248z$s);
|
|
24541
24541
|
|
|
24542
|
+
var _g$4, _defs$6;
|
|
24543
|
+
|
|
24544
|
+
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
24545
|
+
|
|
24546
|
+
function SvgPlus$3(props) {
|
|
24547
|
+
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
|
24548
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
24549
|
+
width: 16,
|
|
24550
|
+
height: 15,
|
|
24551
|
+
fill: "none"
|
|
24552
|
+
}, props), _g$4 || (_g$4 = /*#__PURE__*/React.createElement("g", {
|
|
24553
|
+
clipPath: "url(#plus_svg__clip0_715_360)"
|
|
24554
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
24555
|
+
d: "M8 14.531A7.031 7.031 0 118 .468a7.031 7.031 0 010 14.063zm0-.937A6.094 6.094 0 108 1.406a6.094 6.094 0 000 12.188z"
|
|
24556
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24557
|
+
d: "M4.25 7.969a.469.469 0 010-.938h7.5a.47.47 0 010 .938h-7.5z"
|
|
24558
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24559
|
+
d: "M7.531 3.75a.469.469 0 01.938 0v7.5a.47.47 0 01-.938 0v-7.5z"
|
|
24560
|
+
}))), _defs$6 || (_defs$6 = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
24561
|
+
id: "plus_svg__clip0_715_360"
|
|
24562
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
24563
|
+
transform: "translate(.5)",
|
|
24564
|
+
d: "M0 0h15v15H0z"
|
|
24565
|
+
})))));
|
|
24566
|
+
}
|
|
24567
|
+
|
|
24542
24568
|
/** 特殊信息-建筑服务 */
|
|
24543
24569
|
|
|
24544
24570
|
var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function (props) {
|
|
24545
24571
|
/** 控制器 */
|
|
24546
24572
|
var controller = Invoice.useInvoiceController();
|
|
24547
|
-
var form = props.form
|
|
24573
|
+
var form = props.form,
|
|
24574
|
+
onClickImportButton = props.onClickImportButton;
|
|
24548
24575
|
var getFieldDecorator = form.getFieldDecorator;
|
|
24549
24576
|
var model = controller.useMemo(function (s) {
|
|
24550
24577
|
return s.model;
|
|
24551
24578
|
}, []);
|
|
24552
24579
|
var readOnly = React__default['default'].useMemo(function () {
|
|
24553
24580
|
return model === 'readOnly';
|
|
24554
|
-
}, [model]);
|
|
24581
|
+
}, [model]);
|
|
24582
|
+
|
|
24583
|
+
var _React$useState = React__default['default'].useState(false),
|
|
24584
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24585
|
+
region = _React$useState2[0],
|
|
24586
|
+
setRegion = _React$useState2[1]; // 注册 form
|
|
24587
|
+
|
|
24555
24588
|
|
|
24556
24589
|
controller.useForm('serviceDataDtoInfo', form);
|
|
24590
|
+
|
|
24591
|
+
var onSelectChange = function onSelectChange(value) {
|
|
24592
|
+
setRegion(value === 'Y' ? true : false); // props.onRegionalSelect && props.onRegionalSelect(value);
|
|
24593
|
+
};
|
|
24594
|
+
|
|
24557
24595
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
24558
24596
|
className: "kts-invoice-operate-real-estate-info-digtal"
|
|
24559
24597
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -24620,6 +24658,7 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
|
|
|
24620
24658
|
message: '请选择跨地(市)标志'
|
|
24621
24659
|
}]
|
|
24622
24660
|
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyNY$1, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select, {
|
|
24661
|
+
onChange: onSelectChange,
|
|
24623
24662
|
placeholder: "\u8BF7\u9009\u62E9",
|
|
24624
24663
|
style: {
|
|
24625
24664
|
width: '100%'
|
|
@@ -24628,7 +24667,45 @@ var Architecture = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(fun
|
|
|
24628
24667
|
value: 'Y'
|
|
24629
24668
|
}, "\u662F"), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Select.Option, {
|
|
24630
24669
|
value: 'N'
|
|
24631
|
-
}, "\u5426"))))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24670
|
+
}, "\u5426"))))), props.demo && region && /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24671
|
+
span: 6
|
|
24672
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24673
|
+
label: "\u6D89\u7A0E\u4E8B\u9879\u7F16\u53F7",
|
|
24674
|
+
colon: false
|
|
24675
|
+
}, getFieldDecorator('taxMatterNo', {
|
|
24676
|
+
rules: readOnly ? [] : [{
|
|
24677
|
+
required: true,
|
|
24678
|
+
message: '请选择'
|
|
24679
|
+
}, {
|
|
24680
|
+
validator: function validator(_, value, callback) {
|
|
24681
|
+
var constructAddress = form.getFieldValue('constructAddress');
|
|
24682
|
+
console.log(constructAddress.join(''), value);
|
|
24683
|
+
|
|
24684
|
+
if (constructAddress.join('') === value) {
|
|
24685
|
+
callback();
|
|
24686
|
+
} else {
|
|
24687
|
+
callback('建筑服务发生地与税务事项地址不一致');
|
|
24688
|
+
}
|
|
24689
|
+
}
|
|
24690
|
+
}]
|
|
24691
|
+
})(readOnly ? /*#__PURE__*/React__default['default'].createElement(MyDiv$4, null) : /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Input, {
|
|
24692
|
+
autoComplete: "off",
|
|
24693
|
+
disabled: true,
|
|
24694
|
+
suffix: /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Button, {
|
|
24695
|
+
type: 'link',
|
|
24696
|
+
style: {
|
|
24697
|
+
padding: 0,
|
|
24698
|
+
width: 20,
|
|
24699
|
+
height: '100%'
|
|
24700
|
+
},
|
|
24701
|
+
icon: /*#__PURE__*/React__default['default'].createElement(Icon, {
|
|
24702
|
+
component: SvgPlus$3
|
|
24703
|
+
}),
|
|
24704
|
+
onClick: function onClick() {
|
|
24705
|
+
onClickImportButton && onClickImportButton(controller);
|
|
24706
|
+
}
|
|
24707
|
+
})
|
|
24708
|
+
})))), /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX4.Col, {
|
|
24632
24709
|
span: 6
|
|
24633
24710
|
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, {
|
|
24634
24711
|
label: "\u5EFA\u7B51\u9879\u76EE\u540D\u79F0"
|
|
@@ -24747,7 +24824,13 @@ var MyNY$1 = /*#__PURE__*/function (_React$Component4) {
|
|
|
24747
24824
|
}]);
|
|
24748
24825
|
|
|
24749
24826
|
return MyNY;
|
|
24750
|
-
}(React__default['default'].Component);
|
|
24827
|
+
}(React__default['default'].Component); // function BuyerNameInput(props: InputProps & { fieldName: string; myform: WrappedFormUtils<any> }) {
|
|
24828
|
+
// const { fieldName, myform: form } = props;
|
|
24829
|
+
// if (props.readOnly) return <span className='digtal-stakeholder-form-text'>{props.value}</span>;
|
|
24830
|
+
// return (
|
|
24831
|
+
// <Input disabled={true} {...props} style={{ width: '100%', ...props.style }} />
|
|
24832
|
+
// )
|
|
24833
|
+
// }
|
|
24751
24834
|
|
|
24752
24835
|
var css_248z$t = ".kts-invoice-operate-goods-table-virtual .ktsAntX-table-body {\n height: 280px;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table.ktsAntX-table-bordered > .ktsAntX-table-container > .ktsAntX-table-header > table > thead > tr > th {\n padding: 0 10px;\n height: 32px;\n background: #f4f4f4;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table.ktsAntX-table-bordered > .ktsAntX-table-container > .ktsAntX-table-body > table > tbody > tr > td {\n padding: 0;\n height: 32px;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-body {\n position: relative;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-body > table {\n position: absolute;\n left: 0;\n top: 0;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-table .ktsAntX-table-tbody {\n position: relative;\n}\n.kts-invoice-operate-goods-table-virtual .ktsAntX-checkbox-wrapper .ktsAntX-checkbox-inner {\n width: 16px;\n height: 16px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n top: 1px;\n}\n";
|
|
24753
24836
|
styleInject(css_248z$t);
|
package/package.json
CHANGED
|
@@ -2,21 +2,47 @@ import React from 'react';
|
|
|
2
2
|
import Invoice from '../../..';
|
|
3
3
|
import moment from 'moment';
|
|
4
4
|
import 'antd/dist/antd.css';
|
|
5
|
-
|
|
5
|
+
import { Button } from 'antd'
|
|
6
6
|
export default () => {
|
|
7
7
|
|
|
8
8
|
const controller = React.useMemo(() => new Invoice.InvoiceController(), []);
|
|
9
|
+
const [showDrawer, setShowDrawer] = React.useState(false);
|
|
9
10
|
|
|
10
11
|
React.useEffect(() => {
|
|
11
12
|
controller.run(async s => {
|
|
13
|
+
if (showDrawer) {
|
|
14
|
+
window.setTimeout(() => {
|
|
15
|
+
controller.formList.get('serviceDataDtoInfo')?.setFieldsValue({
|
|
16
|
+
taxMatterNo: ['北京','上海'][Math.round(Math.random())],
|
|
17
|
+
})
|
|
18
|
+
setShowDrawer(false)
|
|
19
|
+
}, 1000)
|
|
20
|
+
}
|
|
12
21
|
})
|
|
13
|
-
}, [])
|
|
22
|
+
}, [showDrawer])
|
|
23
|
+
const onSave = async () => {
|
|
24
|
+
const formValues = await controller.validateFields();
|
|
25
|
+
console.log(formValues)
|
|
26
|
+
}
|
|
14
27
|
|
|
15
28
|
return (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
<>
|
|
30
|
+
<Button onClick={onSave}>输出表单内容</Button>
|
|
31
|
+
<Invoice
|
|
32
|
+
invoiceType='digtal'
|
|
33
|
+
controller={controller}
|
|
34
|
+
|
|
35
|
+
specialInfor={
|
|
36
|
+
<Invoice.Architecture
|
|
37
|
+
addressOptions={[{ name: '北京' }]}
|
|
38
|
+
demo={true}
|
|
39
|
+
fieldNames={{
|
|
40
|
+
label: 'name',
|
|
41
|
+
value: 'name',
|
|
42
|
+
children: 'children'
|
|
43
|
+
}} onClickImportButton={() => setShowDrawer(true)} />
|
|
44
|
+
}
|
|
45
|
+
/>
|
|
46
|
+
</>
|
|
21
47
|
)
|
|
22
48
|
};
|
|
@@ -122,14 +122,16 @@ export default () => {
|
|
|
122
122
|
}
|
|
123
123
|
React.useEffect(() => {
|
|
124
124
|
controller.run(async s => {
|
|
125
|
-
s.
|
|
126
|
-
s.priceIntegerDigit = 25;
|
|
127
|
-
s.calculatingDigits = 25;
|
|
125
|
+
s.goodsListState.isRecalculateWhenSwitchTax = true;
|
|
128
126
|
s.goodsListState.isTaxIncluded = false;
|
|
129
|
-
s.
|
|
130
|
-
s.
|
|
131
|
-
s.
|
|
132
|
-
s.goodsListState.
|
|
127
|
+
// s.stakeholder.enables = ['taxAmount'];
|
|
128
|
+
// s.priceIntegerDigit = 25;
|
|
129
|
+
// s.calculatingDigits = 25;
|
|
130
|
+
// s.goodsListState.isTaxIncluded = false;
|
|
131
|
+
// s.goodsListState.amountExcludeTax = parseFloat(data?.invoiceAmount) || undefined;
|
|
132
|
+
// s.goodsListState.amountIncludeTax = parseFloat(data?.totalAmount) || undefined;
|
|
133
|
+
// s.goodsListState.amountTax = parseFloat(data?.taxAmount) || undefined;
|
|
134
|
+
// s.goodsListState.goodsList = data?.detailList?.map(e => sToCi(e)) ?? [];
|
|
133
135
|
})
|
|
134
136
|
}, [controller])
|
|
135
137
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 数电
|
|
2
2
|
|
|
3
|
-
## 简单用法
|
|
4
|
-
<code src="./_test/easiest/index.tsx"></code>
|
|
3
|
+
<!-- ## 简单用法
|
|
4
|
+
<code src="./_test/easiest/index.tsx"></code> -->
|
|
5
5
|
|
|
6
6
|
## 建筑服务
|
|
7
7
|
<code src="./_test/architecture/index.tsx"></code>
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
|
|
39
39
|
-->
|
|
40
40
|
|
|
41
|
-
## 货物运输服务
|
|
42
|
-
<code src="./_test/freight/index.tsx"></code>
|
|
41
|
+
<!-- ## 货物运输服务
|
|
42
|
+
<code src="./_test/freight/index.tsx"></code> -->
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { decorator } from 'grey-react-box';
|
|
4
|
-
import { Form } from 'kts-components-antd-x3';
|
|
4
|
+
import { Form, } from 'kts-components-antd-x3';
|
|
5
5
|
import { FormComponentProps } from 'kts-components-antd-x3/lib/form';
|
|
6
6
|
import Invoice from '../../..';
|
|
7
7
|
import './index.less';
|
|
8
|
-
import {
|
|
8
|
+
import { ReactComponent as PlusSvg } from './svg/plus.svg'
|
|
9
|
+
import { Cascader, Col, Input, Row, Select, Button, } from "kts-components-antd-x4";
|
|
9
10
|
import moment from "moment";
|
|
10
|
-
|
|
11
|
+
import Icon from '@ant-design/icons';
|
|
12
|
+
// import { WrappedFormUtils } from 'kts-components-antd-x3/lib/form/Form';
|
|
13
|
+
import InvoiceController from "../../../InvoiceController";
|
|
11
14
|
|
|
12
15
|
export interface RealEstateInfoProps {
|
|
13
16
|
/**
|
|
@@ -19,6 +22,13 @@ export interface RealEstateInfoProps {
|
|
|
19
22
|
* 建筑服务地址数据字段名
|
|
20
23
|
*/
|
|
21
24
|
fieldNames?: any;
|
|
25
|
+
|
|
26
|
+
onRegionalSelect?: (value: boolean) => void;
|
|
27
|
+
|
|
28
|
+
/** 点击了 */
|
|
29
|
+
onClickImportButton?: (e: InvoiceController) => void;
|
|
30
|
+
//专门针对poc增加的参数,防止项目自动升级导致问题
|
|
31
|
+
demo?: boolean
|
|
22
32
|
}
|
|
23
33
|
|
|
24
34
|
/** 特殊信息-建筑服务 */
|
|
@@ -27,17 +37,20 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
27
37
|
/** 控制器 */
|
|
28
38
|
const controller = Invoice.useInvoiceController();
|
|
29
39
|
|
|
30
|
-
const { form } = props;
|
|
40
|
+
const { form, onClickImportButton } = props;
|
|
31
41
|
|
|
32
42
|
const { getFieldDecorator } = form;
|
|
33
43
|
|
|
34
44
|
const model = controller.useMemo(s => s.model, []);
|
|
35
45
|
|
|
36
46
|
const readOnly = React.useMemo(() => model === 'readOnly', [model]);
|
|
37
|
-
|
|
47
|
+
const [region, setRegion] = React.useState(false);
|
|
38
48
|
// 注册 form
|
|
39
49
|
controller.useForm('serviceDataDtoInfo', form);
|
|
40
|
-
|
|
50
|
+
const onSelectChange = (value: string) => {
|
|
51
|
+
setRegion(value === 'Y' ? true : false);
|
|
52
|
+
// props.onRegionalSelect && props.onRegionalSelect(value);
|
|
53
|
+
}
|
|
41
54
|
return (
|
|
42
55
|
<div className="kts-invoice-operate-real-estate-info-digtal">
|
|
43
56
|
<div className='real-estate-info-digtal-label' >特殊信息-建筑服务</div>
|
|
@@ -45,7 +58,7 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
45
58
|
<Col span={6} >
|
|
46
59
|
<Form.Item label='土地增值税项目编号' >
|
|
47
60
|
{getFieldDecorator('landNumber', {
|
|
48
|
-
|
|
61
|
+
rules: [
|
|
49
62
|
{ max: 16, message: '最多16个字符' },
|
|
50
63
|
]
|
|
51
64
|
})(
|
|
@@ -55,7 +68,7 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
55
68
|
)}
|
|
56
69
|
</Form.Item>
|
|
57
70
|
</Col>
|
|
58
|
-
|
|
71
|
+
|
|
59
72
|
|
|
60
73
|
<Col span={6} >
|
|
61
74
|
<Form.Item label='建筑服务发生地' >
|
|
@@ -102,19 +115,59 @@ export default decorator<RealEstateInfoProps, FormComponentProps & RealEstateInf
|
|
|
102
115
|
})(
|
|
103
116
|
readOnly
|
|
104
117
|
? <MyNY />
|
|
105
|
-
: <Select placeholder='请选择' style={{ width: '100%' }} >
|
|
118
|
+
: <Select onChange={onSelectChange} placeholder='请选择' style={{ width: '100%' }} >
|
|
106
119
|
<Select.Option value='Y'>是</Select.Option>
|
|
107
120
|
<Select.Option value='N'>否</Select.Option>
|
|
108
121
|
</Select>
|
|
109
122
|
)}
|
|
110
123
|
</Form.Item>
|
|
111
124
|
</Col>
|
|
125
|
+
{props.demo && region && <Col span={6} >
|
|
126
|
+
<Form.Item label='涉税事项编号' colon={false}>
|
|
127
|
+
{getFieldDecorator('taxMatterNo', {
|
|
128
|
+
rules: readOnly ? [] : [
|
|
129
|
+
{ required: true, message: '请选择' },
|
|
130
|
+
{
|
|
131
|
+
validator: (_, value, callback) => {
|
|
132
|
+
const constructAddress: string[] = form.getFieldValue('constructAddress');
|
|
133
|
+
console.log(constructAddress.join(''), value)
|
|
134
|
+
if (constructAddress.join('') === value) {
|
|
135
|
+
callback();
|
|
136
|
+
} else {
|
|
137
|
+
callback('建筑服务发生地与税务事项地址不一致')
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
})(
|
|
144
|
+
readOnly
|
|
145
|
+
? <MyDiv />
|
|
146
|
+
: <Input
|
|
147
|
+
autoComplete="off"
|
|
148
|
+
disabled={true}
|
|
149
|
+
suffix={
|
|
150
|
+
<Button
|
|
151
|
+
type='link'
|
|
152
|
+
style={{ padding: 0, width: 20, height: '100%' }}
|
|
153
|
+
icon={<Icon component={PlusSvg} />}
|
|
154
|
+
onClick={() => { onClickImportButton && onClickImportButton(controller) }}
|
|
155
|
+
/>
|
|
156
|
+
}
|
|
157
|
+
/>
|
|
158
|
+
|
|
159
|
+
)}
|
|
160
|
+
</Form.Item>
|
|
161
|
+
</Col>
|
|
162
|
+
}
|
|
163
|
+
|
|
112
164
|
<Col span={6} >
|
|
113
165
|
<Form.Item label='建筑项目名称' >
|
|
114
|
-
{getFieldDecorator('constructName', {
|
|
166
|
+
{getFieldDecorator('constructName', {
|
|
167
|
+
rules: readOnly ? [] : [
|
|
115
168
|
{ required: true, message: '请输入建筑项目名称' },
|
|
116
169
|
{ max: 200, message: '建筑项目名称最多200个字符' },
|
|
117
|
-
|
|
170
|
+
|
|
118
171
|
]
|
|
119
172
|
})(
|
|
120
173
|
readOnly
|
|
@@ -175,3 +228,15 @@ class MyNY extends React.Component<{ value?: 'Y' | 'N', style?: React.CSSPropert
|
|
|
175
228
|
}
|
|
176
229
|
}
|
|
177
230
|
|
|
231
|
+
// function BuyerNameInput(props: InputProps & { fieldName: string; myform: WrappedFormUtils<any> }) {
|
|
232
|
+
|
|
233
|
+
// const { fieldName, myform: form } = props;
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
// if (props.readOnly) return <span className='digtal-stakeholder-form-text'>{props.value}</span>;
|
|
237
|
+
|
|
238
|
+
// return (
|
|
239
|
+
|
|
240
|
+
// <Input disabled={true} {...props} style={{ width: '100%', ...props.style }} />
|
|
241
|
+
// )
|
|
242
|
+
// }
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="13" viewBox="0 0 12 13" fill="none">
|
|
2
|
+
<path d="M2.94338 4.42663C3.03458 4.42662 3.12571 4.46481 3.19459 4.54096L5.99164 7.6327L8.78868 4.54096C8.92463 4.39067 9.14733 4.38824 9.28606 4.53554C9.4248 4.68285 9.42705 4.92408 9.29107 5.07437L6.24283 8.44378C6.17667 8.5169 6.08613 8.55811 5.99164 8.55811C5.89714 8.55811 5.80659 8.5169 5.74044 8.44378L2.69221 5.07437C2.55623 4.92408 2.55849 4.68285 2.69722 4.53554C2.76567 4.46287 2.85455 4.42665 2.94338 4.42663Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13" fill="none">
|
|
2
|
+
<path d="M9.55662 8.57337C9.46542 8.57338 9.37429 8.53519 9.30541 8.45904L6.50836 5.3673L3.71132 8.45904C3.57537 8.60933 3.35267 8.61176 3.21394 8.46446C3.0752 8.31715 3.07295 8.07592 3.20893 7.92563L6.25717 4.55622C6.32333 4.4831 6.41387 4.44189 6.50836 4.44189C6.60286 4.44189 6.69341 4.4831 6.75956 4.55622L9.80779 7.92563C9.94377 8.07592 9.94151 8.31715 9.80278 8.46446C9.73433 8.53713 9.64545 8.57335 9.55662 8.57337Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="15" viewBox="0 0 16 15" fill="none">
|
|
2
|
+
<g clip-path="url(#clip0_715_360)">
|
|
3
|
+
<path d="M8 14.5312C4.11687 14.5312 0.96875 11.3831 0.96875 7.5C0.96875 3.61687 4.11687 0.46875 8 0.46875C11.8831 0.46875 15.0312 3.61687 15.0312 7.5C15.0312 11.3831 11.8831 14.5312 8 14.5312ZM8 13.5938C11.3656 13.5938 14.0938 10.8656 14.0938 7.5C14.0938 4.13438 11.3656 1.40625 8 1.40625C4.63438 1.40625 1.90625 4.13438 1.90625 7.5C1.90625 10.8656 4.63438 13.5938 8 13.5938Z"/>
|
|
4
|
+
<path d="M4.25 7.96875C4.12568 7.96875 4.00645 7.91936 3.91854 7.83146C3.83064 7.74355 3.78125 7.62432 3.78125 7.5C3.78125 7.37568 3.83064 7.25645 3.91854 7.16854C4.00645 7.08064 4.12568 7.03125 4.25 7.03125H11.75C11.8743 7.03125 11.9935 7.08064 12.0815 7.16854C12.1694 7.25645 12.2188 7.37568 12.2188 7.5C12.2188 7.62432 12.1694 7.74355 12.0815 7.83146C11.9935 7.91936 11.8743 7.96875 11.75 7.96875H4.25Z"/>
|
|
5
|
+
<path d="M7.53125 3.75C7.53125 3.62568 7.58064 3.50645 7.66854 3.41854C7.75645 3.33064 7.87568 3.28125 8 3.28125C8.12432 3.28125 8.24355 3.33064 8.33146 3.41854C8.41936 3.50645 8.46875 3.62568 8.46875 3.75V11.25C8.46875 11.3743 8.41936 11.4935 8.33146 11.5815C8.24355 11.6694 8.12432 11.7188 8 11.7188C7.87568 11.7188 7.75645 11.6694 7.66854 11.5815C7.58064 11.4935 7.53125 11.3743 7.53125 11.25V3.75Z"/>
|
|
6
|
+
</g>
|
|
7
|
+
<defs>
|
|
8
|
+
<clipPath id="clip0_715_360">
|
|
9
|
+
<rect width="15" height="15" transform="translate(0.5)"/>
|
|
10
|
+
</clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>
|