产品-对接e10个税扣缴义务人设置
This commit is contained in:
parent
c2eb4400c4
commit
2c8ce14def
|
|
@ -5,6 +5,10 @@ import { postFetch } from "../util/request";
|
|||
export const apiflowBillingConfigGet = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/get", "GET", params);
|
||||
};
|
||||
//智能算薪-查询计费配置开关状态
|
||||
export const apiflowBillingConfigStatus = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/status", "GET", params);
|
||||
};
|
||||
//智能算薪-计费配置保存
|
||||
export const apiflowBillingConfigSave = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/save", params);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { formPost, postFetch } from "../util/request";
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
//个税扣缴义务人列表
|
||||
export const getTaxAgentList = (params) => {
|
||||
|
|
@ -7,9 +7,9 @@ export const getTaxAgentList = (params) => {
|
|||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//同步人员范围
|
||||
|
|
@ -18,9 +18,9 @@ export const taxAgentRangeSync = (params) => {
|
|||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
|
@ -122,9 +122,5 @@ export const hasIconInTax = (params) => {
|
|||
};
|
||||
//获取报税信息表单
|
||||
export const taxReturnGetForm = (params) => {
|
||||
return WeaTools.callApi(
|
||||
"/api/bs/hrmsalary/taxReturn/getForm",
|
||||
"GET",
|
||||
params
|
||||
);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxReturn/getForm", "GET", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,58 +2,68 @@ export const fieldList = [
|
|||
{
|
||||
key: "name",
|
||||
label: "名称",
|
||||
lanId: 33439,
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "dutyParagraph",
|
||||
key: "taxCode",
|
||||
label: "税号",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "taxDeclarationRegion",
|
||||
key: "city",
|
||||
label: "报税所属区域",
|
||||
lanId: 111,
|
||||
type: "SELECT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "areaNumber",
|
||||
key: "areaCode",
|
||||
label: "行政区划代码",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "passwordVerifyType",
|
||||
key: "passwordType",
|
||||
label: "密码校验类型",
|
||||
lanId: 111,
|
||||
type: "RADIO",
|
||||
viewAttr: 3,
|
||||
options: [
|
||||
{
|
||||
key: "0",
|
||||
showname: "个税网报密码"
|
||||
key: "TAX_NET_PASSWORD",
|
||||
showname: "个税网报密码",
|
||||
lanId: 111,
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
showname: "实名账号密码"
|
||||
key: "REAL_NAME_PASSWORD",
|
||||
showname: "实名账号密码",
|
||||
lanId: 111,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: "realNameAccount",
|
||||
key: "account",
|
||||
label: "实名账号",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "realNameAccountPassword",
|
||||
key: "realNamePassword",
|
||||
label: "实名账号密码",
|
||||
lanId: 111,
|
||||
type: "PASSWORD",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
key: "taxOnlinePassword",
|
||||
key: "netPassword",
|
||||
label: "个税网报密码",
|
||||
lanId: 111,
|
||||
type: "PASSWORD",
|
||||
viewAttr: 3
|
||||
},
|
||||
|
|
@ -61,17 +71,20 @@ export const fieldList = [
|
|||
key: "registrationNo",
|
||||
label: "登记序号",
|
||||
type: "TEXT",
|
||||
lanId: 111,
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "departmentCode",
|
||||
label: "部门编码",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
},
|
||||
{
|
||||
key: "taxInforVerifiyStatus",
|
||||
label: "报税信息验证状态",
|
||||
lanId: 111,
|
||||
type: "TEXT",
|
||||
viewAttr: 1
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,11 +18,6 @@ import "./index.less";
|
|||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
const Step = WeaSteps.Step;
|
||||
const tabs = [
|
||||
{ key: 0, title: getLabel(82751, "基础设置") },
|
||||
{ key: 1, title: getLabel(111, "报税信息") },
|
||||
{ key: 2, title: getLabel(124810, "人员范围") }
|
||||
];
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -74,7 +69,7 @@ class TaxAgentSlide extends Component {
|
|||
* Date: 2022/12/1
|
||||
*/
|
||||
saveTaxAgent = (payload) => {
|
||||
const { onOk } = this.props;
|
||||
const { onOk, salaryOn } = this.props;
|
||||
const { current } = this.state;
|
||||
this.setState({ loading: true });
|
||||
API.saveTaxAgent(payload).then(({ status, data, errormsg }) => {
|
||||
|
|
@ -82,7 +77,7 @@ class TaxAgentSlide extends Component {
|
|||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功"));
|
||||
this.setState({
|
||||
current: true ? current + 2 : current + 1,
|
||||
current: !salaryOn ? current + 2 : current + 1,
|
||||
taxAgentId: data
|
||||
}, () => onOk());
|
||||
} else {
|
||||
|
|
@ -189,9 +184,14 @@ class TaxAgentSlide extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { isEdit, title, visible, onCancel, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const tabs = [
|
||||
{ key: 0, title: getLabel(82751, "基础设置") },
|
||||
{ key: 1, title: getLabel(544342, "报税信息") },
|
||||
{ key: 2, title: getLabel(124810, "人员范围") }
|
||||
];
|
||||
const { isEdit, title, visible, onCancel, salaryOn, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { current, taxAgentId } = this.state;
|
||||
const tabData = true && _.filter(tabs, it => it.key !== 1);
|
||||
const tabData = !salaryOn ? _.filter(tabs, it => it.key !== 1) : tabs;
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
|
|
|
|||
|
|
@ -5,23 +5,25 @@
|
|||
* Date: 2022/12/1
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaBrowser, WeaFormItem, WeaInput, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { WeaBrowser, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { fieldList } from "./constants";
|
||||
import { taxReturnGetForm } from "../../../apis/taxAgent";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
class TaxDeclarationInfo extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
fieldForm: {
|
||||
name: "",
|
||||
dutyParagraph: "",
|
||||
taxDeclarationRegion: "",
|
||||
areaNumber: "",
|
||||
passwordVerifyType: "0",
|
||||
realNameAccount: "",
|
||||
realNameAccountPassword: "",
|
||||
taxOnlinePassword: "",
|
||||
taxCode: "",
|
||||
city: "",
|
||||
areaCode: "",
|
||||
passwordType: "TAX_NET_PASSWORD",
|
||||
account: "",
|
||||
realNamePassword: "",
|
||||
netPassword: "",
|
||||
registrationNo: "",
|
||||
departmentCode: "",
|
||||
taxInforVerifiyStatus: ""
|
||||
|
|
@ -32,7 +34,10 @@ class TaxDeclarationInfo extends Component {
|
|||
|
||||
componentDidMount() {
|
||||
this.setState({
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "realNameAccount" && it.key !== "realNameAccountPassword")
|
||||
fieldItem: _.filter(_.map(fieldList, item => ({
|
||||
...item,
|
||||
label: getLabel(item.lanId, item.label)
|
||||
})), it => it.key !== "account" && it.key !== "realNamePassword")
|
||||
}, () => {
|
||||
this.taxReturnGetForm();
|
||||
});
|
||||
|
|
@ -52,14 +57,14 @@ class TaxDeclarationInfo extends Component {
|
|||
[key]: value
|
||||
}
|
||||
}, () => {
|
||||
if (key === "passwordVerifyType" && this.state.fieldForm.passwordVerifyType === "2") {
|
||||
if (key === "passwordType" && this.state.fieldForm.passwordType === "REAL_NAME_PASSWORD") {
|
||||
this.setState({
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "taxOnlinePassword"),
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "netPassword"),
|
||||
fieldForm: { ...this.state.fieldForm, realNameAccount: "", realNameAccountPassword: "" }
|
||||
});
|
||||
} else if (key === "passwordVerifyType" && this.state.fieldForm.passwordVerifyType === "0") {
|
||||
} else if (key === "passwordType" && this.state.fieldForm.passwordType === "TAX_NET_PASSWORD") {
|
||||
this.setState({
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "realNameAccount" && it.key !== "realNameAccountPassword"),
|
||||
fieldItem: _.filter(fieldList, it => it.key !== "account" && it.key !== "realNamePassword"),
|
||||
fieldForm: { ...this.state.fieldForm, taxOnlinePassword: "" }
|
||||
});
|
||||
}
|
||||
|
|
@ -87,7 +92,9 @@ class TaxDeclarationInfo extends Component {
|
|||
}
|
||||
{
|
||||
type === "RADIO" &&
|
||||
<WeaSelect detailtype={3} value={fieldForm[key]} options={options} viewAttr={viewAttr}
|
||||
<WeaSelect detailtype={3} value={fieldForm[key]}
|
||||
options={_.map(options, it => ({ ...it, showname: getLabel(it.lanId, it.showname) }))}
|
||||
viewAttr={viewAttr}
|
||||
onChange={(v) => this.handleChangeValue(key, v)}/>
|
||||
}
|
||||
</WeaFormItem>;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import React, { Component } from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaCheckbox, WeaFormItem, WeaInputSearch, WeaLocaleProvider, WeaSearchGroup, WeaTop } from "ecCom";
|
||||
import { apiflowBillingConfigStatus } from "../../apis/intelligentCalculateSalarySettings";
|
||||
import ComHint from "./components/comHint";
|
||||
import TaxAgentTable from "./components/taxAgentTable";
|
||||
import TaxAgentSlide from "./components/taxAgentSlide";
|
||||
|
|
@ -21,11 +22,8 @@ class TaxAgent extends Component {
|
|||
decentralization: "0", //启用分权
|
||||
permission: {},
|
||||
taxAgentSlideProps: {
|
||||
isEdit: false,
|
||||
visible: false,
|
||||
title: getLabel(543629, "新增个税扣缴义务人"),
|
||||
taxAgentId: "",
|
||||
current: 0
|
||||
isEdit: false, visible: false, title: getLabel(543629, "新增个税扣缴义务人"),
|
||||
taxAgentId: "", current: 0, salaryOn: true
|
||||
}
|
||||
};
|
||||
this.taxAgentTableRef = null;
|
||||
|
|
@ -34,6 +32,7 @@ class TaxAgent extends Component {
|
|||
componentDidMount() {
|
||||
this.getTaxAgentBaseForm();
|
||||
this.getPermission();
|
||||
this.apiflowBillingConfigStatus();
|
||||
}
|
||||
|
||||
getTaxAgentBaseForm = () => {
|
||||
|
|
@ -52,6 +51,12 @@ class TaxAgent extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
apiflowBillingConfigStatus = () => {
|
||||
const { taxAgentSlideProps } = this.state;
|
||||
apiflowBillingConfigStatus().then(({ status, data }) => {
|
||||
if (status) this.setState({ taxAgentSlideProps: { ...taxAgentSlideProps, salaryOn: data } });
|
||||
});
|
||||
};
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:开启关闭个税扣缴义务人开关
|
||||
|
|
|
|||
Loading…
Reference in New Issue