个税对接-薪资账套个税申报字段对应

This commit is contained in:
黎永顺 2023-08-16 14:03:43 +08:00
parent 2509bfe8f7
commit 4af19efa31
3 changed files with 45 additions and 18 deletions

View File

@ -172,7 +172,7 @@ export const getLedgerItemGroupForm = params => {
//保存薪资帐套薪资项目
export const saveLedgerItem = params => {
const { itemGroups, items, ...extra } = params;
const { itemGroups, items, ...extra } = params;
const payload = {
itemGroups: _.map(itemGroups, item => {
return {
@ -330,9 +330,13 @@ export const getAggregate = params => {
export const getBackitemForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/backitem/getForm", "GET", params);
};
//查询个税映射规则
export const getMappingFields = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/tax/getMappingFields", "GET", params);
//薪资账套下的个税申报表规则的详情
export const taxreportruleGetForm = params => {
return WeaTools.callApi("/api/bs/hrmsalary/salarysob/taxreportrule/getForm", "GET", params);
};
//保存薪资账套下的个税申报表规则
export const taxreportruleSave = params => {
return postFetch("/api/bs/hrmsalary/salarysob/taxreportrule/save", params);
};
//保存回算薪资项目详情
export const salarysobBackitemSave = params => {

View File

@ -5,8 +5,10 @@
* Date: 2023/2/16
*/
import React, { Component } from "react";
import { WeaSearchGroup } from "ecCom";
import { getMappingFields } from "../../../apis/ledger";
import { WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { taxreportruleGetForm } from "../../../apis/ledger";
const { getLabel } = WeaLocaleProvider;
class IncomeTaxFields extends Component {
constructor(props) {
@ -15,13 +17,12 @@ class IncomeTaxFields extends Component {
}
componentDidMount() {
this.getMappingFields();
this.taxreportruleGetForm();
}
getMappingFields = () => {
const { editId: salarySobId } = this.props;
const payload = { salarySobId };
getMappingFields(payload).then(({ status, data }) => {
taxreportruleGetForm = () => {
const { editId, saveSalarySobId } = this.props;
taxreportruleGetForm({ id: saveSalarySobId || editId }).then(({ status, data }) => {
if (status) {
console.log(data);
}
@ -30,7 +31,7 @@ class IncomeTaxFields extends Component {
render() {
return (
<WeaSearchGroup title={"title"} showGroup needTigger={false}>
<WeaSearchGroup title={<h1>个税申报字段对应</h1>} showGroup needTigger={false}>
</WeaSearchGroup>
);

View File

@ -24,8 +24,9 @@ const tabs = [
{ key: 1, title: "关联人员" },
{ key: 2, title: "薪资项目" },
{ key: 3, title: "回算薪资项目" },
{ key: 4, title: "个税申报字段对应" },
{ key: 5, title: "调薪计薪规则" }
{ key: 4, title: "累计字段对应" },
{ key: 5, title: "个税申报字段对应" },
{ key: 6, title: "调薪计薪规则" }
];
@inject("taxAgentStore")
@ -186,9 +187,12 @@ class LedgerSlide extends Component {
CurrentDom = <LedgerBackCalculatedSalaryItem {...this.props} saveSalarySobId={saveSalarySobId}/>;
break;
case 4:
CurrentDom = <IncomeTaxFields {...this.props} saveSalarySobId={saveSalarySobId}/>;
CurrentDom = null;
break;
case 5:
CurrentDom = <IncomeTaxFields {...this.props} saveSalarySobId={saveSalarySobId}/>;
break;
case 6:
CurrentDom =
<LedgerSalaryAdjustmentRules {...this.props} saveSalarySobId={saveSalarySobId}
onSaveParams={(adjustRules) => this.setState({ adjustRules })}/>;
@ -257,15 +261,33 @@ class LedgerSlide extends Component {
loading={loading}
onClick={() => {
this.setState({ current: current + 1 }, () => {
console.log("个税申报")
console.log("累计字段对应");
});
}}
>保存并进入下一步</Button>
] : [
<Button type="primary" loading={loading} onClick={()=>console.log("个税申报")}>保存</Button>
<Button type="primary" loading={loading} onClick={() => console.log("累计字段对应")}>保存</Button>
];
break;
case 5:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={this.handleClose}>完成跳过所有步骤</Button>,
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
<Button
type="primary"
loading={loading}
onClick={() => {
this.setState({ current: current + 1 }, () => {
console.log("个税申报字段对应");
});
}}
>保存并进入下一步</Button>
] : [
<Button type="primary" loading={loading} onClick={() => console.log("个税申报字段对应")}>保存</Button>
];
break;
case 6:
CurrentDom = !editId ?
[
<Button type="ghost" onClick={() => this.setState({ current: current - 1 })}>上一步</Button>,
@ -289,7 +311,7 @@ class LedgerSlide extends Component {
className="slideOuterWrapper"
visible={visible}
top={0}
width={65}
width={100}
height={100}
direction="right"
measure="%"