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