个税扣缴义务人页面添加报税信息栏
This commit is contained in:
parent
e11631e6ba
commit
08e2213b79
|
|
@ -112,3 +112,11 @@ export const hasIconInTax = (params) => {
|
|||
params
|
||||
);
|
||||
};
|
||||
//获取报税信息表单
|
||||
export const taxReturnGetForm = (params) => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/taxReturn/getForm",
|
||||
"GET",
|
||||
params
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,78 @@
|
|||
export const fieldList = [
|
||||
{
|
||||
key: "name",
|
||||
label: "名称",
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "dutyParagraph",
|
||||
label: "税号",
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "taxDeclarationRegion",
|
||||
label: "报税所属区域",
|
||||
type: "SELECT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "areaNumber",
|
||||
label: "行政区划代码",
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "passwordVerifyType",
|
||||
label: "密码校验类型",
|
||||
type: "RADIO",
|
||||
viewAttr: 3,
|
||||
options: [
|
||||
{
|
||||
key: "0",
|
||||
showname: "个税网报密码"
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
showname: "实名账号密码"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "realNameAccount",
|
||||
label: "实名账号",
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "realNameAccountPassword",
|
||||
label: "实名账号密码",
|
||||
type: "PASSWORD",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "taxOnlinePassword",
|
||||
label: "个税网报密码",
|
||||
type: "PASSWORD",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "registrationNo",
|
||||
label: "登记序号",
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "departmentCode",
|
||||
label: "部门编码",
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "taxInforVerifiyStatus",
|
||||
label: "报税信息验证状态",
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
}
|
||||
];
|
||||
|
|
@ -12,6 +12,7 @@ import SlideModalTitle from "../../../components/slideModalTitle";
|
|||
import { decentralizationConditions, editConditions } from "../../taxAgent/editConditions";
|
||||
import BaseSettings from "./baseSettings";
|
||||
import PersonalScope from "./personalScope";
|
||||
import TaxDeclarationInfo from "./taxDeclarationInfo";
|
||||
import * as API from "../../../apis/taxAgent";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -32,6 +33,7 @@ class TaxAgentSlide extends Component {
|
|||
loading: false,
|
||||
taxAgentId: ""
|
||||
};
|
||||
this.taxInfoRef = null;
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
|
|
@ -53,7 +55,7 @@ class TaxAgentSlide extends Component {
|
|||
if (status) {
|
||||
const { name, description, adminUserIds } = data;
|
||||
salarytaxAgentForm.updateFields({
|
||||
name: { value: name, viewAttr: 1 },
|
||||
name: { value: name },
|
||||
adminUserIds: {
|
||||
value: _.map(adminUserIds, it => it.id.toString()).join(","),
|
||||
valueSpan: _.map(adminUserIds, it => it.content).join(",")
|
||||
|
|
@ -122,6 +124,9 @@ class TaxAgentSlide extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleSaveAndVerify = () => {
|
||||
console.log(this.taxInfoRef);
|
||||
};
|
||||
renderChildren = () => {
|
||||
const { current } = this.state;
|
||||
const { decentralization } = this.props;
|
||||
|
|
@ -131,6 +136,9 @@ class TaxAgentSlide extends Component {
|
|||
case 0:
|
||||
CurrentDom = <BaseSettings decentralization={decentralization}/>;
|
||||
break;
|
||||
case 1:
|
||||
CurrentDom = <TaxDeclarationInfo ref={dom => this.taxInfoRef = dom} taxAgentId={taxAgentId}/>;
|
||||
break;
|
||||
case 2:
|
||||
CurrentDom = <PersonalScope taxAgentId={taxAgentId}/>;
|
||||
break;
|
||||
|
|
@ -154,7 +162,7 @@ class TaxAgentSlide extends Component {
|
|||
];
|
||||
break;
|
||||
case 1:
|
||||
const tmpV = [<Button type="primary">保存并验证</Button>];
|
||||
const tmpV = [<Button type="primary" onClick={this.handleSaveAndVerify}>保存并验证</Button>];
|
||||
const tmpJ = [
|
||||
<Button type="ghost">完成,跳过所有步骤</Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({ current: current + 1 })}>下一步</Button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 报税信息
|
||||
* Description:
|
||||
* Date: 2022/12/1
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaBrowser, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { fieldList } from "./constants";
|
||||
import { taxReturnGetForm } from "../../../apis/taxAgent";
|
||||
|
||||
class TaxDeclarationInfo extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fieldForm: {
|
||||
name: "",
|
||||
dutyParagraph: "",
|
||||
taxDeclarationRegion: "",
|
||||
areaNumber: "",
|
||||
passwordVerifyType: "0",
|
||||
realNameAccount: "",
|
||||
realNameAccountPassword: "",
|
||||
taxOnlinePassword: "",
|
||||
registrationNo: "",
|
||||
departmentCode: "",
|
||||
taxInforVerifiyStatus: ""
|
||||
},
|
||||
fieldItem: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.setState({
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "realNameAccount" && it.key !== "realNameAccountPassword")
|
||||
}, () => {
|
||||
this.taxReturnGetForm();
|
||||
});
|
||||
}
|
||||
|
||||
taxReturnGetForm = () => {
|
||||
const { taxAgentId } = this.props;
|
||||
taxReturnGetForm({ taxAgentId }).then((status, data) => {
|
||||
console.log(data);
|
||||
});
|
||||
};
|
||||
handleChangeValue = (key, value) => {
|
||||
const { fieldForm } = this.state;
|
||||
this.setState({
|
||||
fieldForm: {
|
||||
...fieldForm,
|
||||
[key]: value
|
||||
}
|
||||
}, () => {
|
||||
if (key === "passwordVerifyType" && this.state.fieldForm.passwordVerifyType === "2") {
|
||||
this.setState({
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "taxOnlinePassword"),
|
||||
fieldForm: { ...this.state.fieldForm, realNameAccount: "", realNameAccountPassword: "" }
|
||||
});
|
||||
} else if (key === "passwordVerifyType" && this.state.fieldForm.passwordVerifyType === "0") {
|
||||
this.setState({
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "realNameAccount" && it.key !== "realNameAccountPassword"),
|
||||
fieldForm: { ...this.state.fieldForm, taxOnlinePassword: "" }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { fieldItem, fieldForm } = this.state;
|
||||
return (
|
||||
<WeaSearchGroup col={1} needTigger showGroup center>
|
||||
{
|
||||
_.map(fieldItem, item => {
|
||||
const { key, label, type, viewAttr, options = [] } = item;
|
||||
return <WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} underline key={key}>
|
||||
{
|
||||
(type === "TEXT" || type === "PASSWORD") &&
|
||||
<WeaInput autocomplete="off" value={fieldForm[key]} type={_.lowerCase(type)} viewAttr={viewAttr}
|
||||
onChange={(v) => this.handleChangeValue(key, v)}/>
|
||||
}
|
||||
{
|
||||
type === "SELECT" &&
|
||||
<WeaBrowser value={fieldForm[key]} type={58} viewAttr={viewAttr}
|
||||
onChange={(v) => this.handleChangeValue(key, v)}/>
|
||||
}
|
||||
{
|
||||
type === "RADIO" &&
|
||||
<WeaSelect detailtype={3} value={fieldForm[key]} options={options} viewAttr={viewAttr}
|
||||
onChange={(v) => this.handleChangeValue(key, v)}/>
|
||||
}
|
||||
</WeaFormItem>;
|
||||
})
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TaxDeclarationInfo;
|
||||
Loading…
Reference in New Issue