个税扣缴义务人添加同步人员范围的功能
This commit is contained in:
parent
04a368c731
commit
c468ff35ff
|
|
@ -12,6 +12,17 @@ export const getTaxAgentList = (params) => {
|
|||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//同步人员范围
|
||||
export const taxAgentRangeSync = (params) => {
|
||||
return fetch("/api/bs/hrmsalary/taxAgent/range/sync", {
|
||||
method: "POST",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
// 系统管理员权限
|
||||
export const getPermission = (params) => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Col, message, Modal, Row, Switch } from "antd";
|
||||
import { Button, Col, message, Modal, Row, Switch } from "antd";
|
||||
import { WeaFormItem, WeaRightMenu, WeaSearchGroup, WeaTable, WeaTop } from "ecCom";
|
||||
import { renderNoright } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import EditModal from "./editModal";
|
||||
|
|
@ -28,7 +28,8 @@ export default class TaxAgent extends React.Component {
|
|||
devolutionStatus: 0,
|
||||
conditions: editConditions,
|
||||
decentralizationConditions: decentralizationConditions,
|
||||
permission: {}
|
||||
permission: {},
|
||||
syncLoading: false
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -120,7 +121,7 @@ export default class TaxAgent extends React.Component {
|
|||
this.setState(
|
||||
{
|
||||
conditions: [{ defaultshow: true, items: conditionMap }],
|
||||
decentralizationConditions: [{ defaultshow: true, items: conditionMap }],
|
||||
decentralizationConditions: [{ defaultshow: true, items: conditionMap }]
|
||||
},
|
||||
() => {
|
||||
devolutionStatus === 1 ? getCondition(this.state.conditions) : getFormDecentralizationCondition(this.state.decentralizationConditions);
|
||||
|
|
@ -268,6 +269,19 @@ export default class TaxAgent extends React.Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
taxAgentRangeSync = () => {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { taxAgentRangeSync, getTaxAgentList } = taxAgentStore;
|
||||
this.setState({ syncLoading: true });
|
||||
taxAgentRangeSync({}).then(({ status, data }) => {
|
||||
this.setState({ syncLoading: false });
|
||||
if (status) {
|
||||
message.success(data || "操作成功");
|
||||
getTaxAgentList();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const { taxAgentStore } = this.props;
|
||||
|
|
@ -277,7 +291,8 @@ export default class TaxAgent extends React.Component {
|
|||
devolutionStatus,
|
||||
conditions,
|
||||
decentralizationConditions,
|
||||
permission
|
||||
permission,
|
||||
syncLoading
|
||||
} = this.state;
|
||||
const {
|
||||
loading,
|
||||
|
|
@ -293,6 +308,9 @@ export default class TaxAgent extends React.Component {
|
|||
return renderNoright();
|
||||
}
|
||||
|
||||
const btns = [
|
||||
<Button type="primary" onClick={this.taxAgentRangeSync} loading={syncLoading}>同步人员范围</Button>
|
||||
];
|
||||
const renderTipsLabel = () => {
|
||||
const tipList = [
|
||||
"1、个税扣缴义务人与档案中的个税扣缴义务人匹配,修改个税扣缴义务人名称,薪资档案的个税扣缴义务人数据同步更新;",
|
||||
|
|
@ -376,6 +394,7 @@ export default class TaxAgent extends React.Component {
|
|||
title="个税扣缴义务人" // 文字
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
buttons={btns}
|
||||
showDropIcon={true}>
|
||||
<Row
|
||||
gutter={16}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { WeaForm, WeaTableNew } from "comsMobx";
|
|||
|
||||
import * as API from "../apis/taxAgent"; // 引入API接口文件
|
||||
import { decentralizationConditions, editConditions } from "../pages/taxAgent/editConditions";
|
||||
import { hasIconInTax } from "../apis/taxAgent";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
|
|
@ -85,6 +84,11 @@ export class TaxAgentStore {
|
|||
|
||||
@action setShowSearchAd = bool => (this.showSearchAd = bool);
|
||||
|
||||
@action("同步人员范围")
|
||||
taxAgentRangeSync = params => {
|
||||
return API.taxAgentRangeSync(params);
|
||||
};
|
||||
|
||||
// 高级搜索 - 搜索
|
||||
@action
|
||||
doSearch = name => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue