release/2.19.1.2501.01-个税
This commit is contained in:
parent
60747a5d78
commit
7fcd9afbed
|
|
@ -283,3 +283,16 @@ export const getTaxdeclarationContrastList = (params) => {
|
|||
export const exportContrast = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/taxdeclaration/exportContrast", params);
|
||||
};
|
||||
|
||||
//扣除名单确认-人员列表
|
||||
export const getDeductionAmountList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/list", params);
|
||||
};
|
||||
//扣除名单确认-增加人员
|
||||
export const addDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/add", params);
|
||||
};
|
||||
//扣除名单确认-删除人员
|
||||
export const deleteDeductionAmount = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/deductionAmount/delete", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* 扣除名单确认
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/3/26
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaButtonIcon, WeaDialog, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import DeductionListConfirmEmployeeDialog from "./deductionListConfirmEmployeeDialog";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider, { getUrlParams } = WeaTools;
|
||||
|
||||
class DeductionListConfirmDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, columns: [], dataSource: [], visible: false,
|
||||
selectedRowKeys: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getDeductionAmountList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: []
|
||||
});
|
||||
}
|
||||
|
||||
getDeductionAmountList = (props) => {
|
||||
const { pageInfo } = this.state, { id: taxAgentId } = getUrlParams(), { year } = props || this.props;
|
||||
const payload = { ...pageInfo, taxAgentId, year };
|
||||
this.setState({ loading: true });
|
||||
API.getDeductionAmountList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
columns, dataSource,
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleDelete = () => {
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "确认删除本条数据吗?"),
|
||||
onOk: () => {
|
||||
API.deleteDeductionAmount({ ids: this.state.selectedRowKeys }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.getDeductionAmountList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, columns, dataSource, pageInfo, visible, selectedRowKeys } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.getDeductionAmountList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.getDeductionAmountList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: v => this.setState({ selectedRowKeys: v })
|
||||
};
|
||||
const height = this.refs.employeeRef ? this.refs.employeeRef.state.height : 400;
|
||||
return (
|
||||
<WeaDialog {...this.props} hasScroll initLoadCss title={getLabel(111, "扣除名单确认")} ref="confirmRef"
|
||||
style={{
|
||||
width: 1150, height: 606.6, minHeight: 200, minWidth: 380, maxHeight: "90%",
|
||||
maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}}>
|
||||
<div className="confirmationDialogContent">
|
||||
<div className="tableBtns">
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.setState({ visible: true })}/>
|
||||
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")} onClick={this.handleDelete}
|
||||
disabled={_.isEmpty(selectedRowKeys)}/>
|
||||
</div>
|
||||
<WeaTable columns={columns} dataSource={dataSource} loading={loading} pagination={pagination} rowKey="id"
|
||||
rowSelection={rowSelection} scroll={{ y: `calc(${height}px - 113px)` }}/>
|
||||
<DeductionListConfirmEmployeeDialog visible={visible} onSuccess={this.getDeductionAmountList}
|
||||
year={this.props.year} payload={this.props.payload}
|
||||
onCancel={(callback) => this.setState({ visible: false }, () => callback && callback())}/>
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeductionListConfirmDialog;
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* 扣除名单确认
|
||||
* 人员添加列表
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/3/26
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import * as API from "../../../apis/declare";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider, { getUrlParams } = WeaTools;
|
||||
const columns = [{ title: getLabel(111, "姓名"), dataIndex: "employeeName" }, {
|
||||
title: getLabel(111, "分部"),
|
||||
dataIndex: "subCompanyName"
|
||||
}, { title: getLabel(111, "部门"), dataIndex: "departmentName" }, {
|
||||
title: getLabel(111, "个税扣缴义务人"),
|
||||
dataIndex: "taxAgentName"
|
||||
}, { title: getLabel(111, "工号"), dataIndex: "jobNum" }, { title: getLabel(111, "手机号码"), dataIndex: "mobile" }];
|
||||
|
||||
class DeductionListConfirmEmployeeDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: [],
|
||||
saveloading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareList(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false, dataSource: [], selectedRowKeys: []
|
||||
});
|
||||
}
|
||||
|
||||
employeedeclareList = (props) => {
|
||||
const { pageInfo } = this.state, { payload } = props || this.props;
|
||||
this.setState({ loading: true });
|
||||
API.employeedeclareList({ ...payload, ...pageInfo }).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { pageInfo: result } = data;
|
||||
const { list: dataSource, pageNum: current, pageSize, total } = result;
|
||||
this.setState({ dataSource, pageInfo: { ...pageInfo, current, pageSize, total } });
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
save = () => {
|
||||
const { selectedRowKeys: employeeDeclareIds } = this.state, { id: taxAgentId } = getUrlParams(), { year } = this.props;
|
||||
const payload = { taxAgentId, year, employeeDeclareIds };
|
||||
this.setState({ saveloading: true });
|
||||
API.addDeductionAmount(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ saveloading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, dataSource, pageInfo, selectedRowKeys, saveloading } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.employeedeclareList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.employeedeclareList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys, onChange: v => this.setState({ selectedRowKeys: v })
|
||||
};
|
||||
const height = this.refs.employeeRef ? this.refs.employeeRef.state.height : 400;
|
||||
return (<WeaDialog {...this.props} hasScroll initLoadCss title={getLabel(111, "选择人员")} ref="employeeRef"
|
||||
buttons={[<Button type="primary" disabled={_.isEmpty(selectedRowKeys)} loading={saveloading}
|
||||
onClick={this.save}>{getLabel(111, "确认")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>]}
|
||||
style={{
|
||||
width: 1150,
|
||||
height: 606.6,
|
||||
minHeight: 200,
|
||||
minWidth: 380,
|
||||
maxHeight: "90%",
|
||||
maxWidth: "90%",
|
||||
overflow: "hidden",
|
||||
transform: "translate(0px, 0px)"
|
||||
}}>
|
||||
<div className="confirmationDialogContent">
|
||||
<WeaTable columns={columns} dataSource={dataSource} loading={loading} pagination={pagination} rowKey="id"
|
||||
rowSelection={rowSelection} scroll={{ y: `calc(${height}px - 113px)` }}/>
|
||||
</div>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default DeductionListConfirmEmployeeDialog;
|
||||
|
|
@ -12,6 +12,7 @@ import { Button, Dropdown, Menu, message, Modal, Spin } from "antd";
|
|||
import BaseInfo from "./components/baseInfo";
|
||||
import EmployeeDeclareDetailSchemaEditDialog from "./components/employeeDeclareDetailSchemaEditDialog";
|
||||
import EmployeeDeclareDetailSchemaImportDialog from "./components/employeeDeclareDetailImportDialog";
|
||||
import DeductionListConfirmDialog from "./components/deductionListConfirmDialog";
|
||||
import { commonEnumList } from "../../apis/payrollFiles";
|
||||
import {
|
||||
employeedeclareDeclare,
|
||||
|
|
@ -48,6 +49,7 @@ class Index extends Component {
|
|||
taxCycle: new Date(), pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: { query: false, refresh: false, feedback: false, declare: false, exportLoading: false },
|
||||
declareEditDialog: { visible: false, id: "", title: "" },
|
||||
confirmationDialog: { visible: false, payload: {} },
|
||||
declareStatusList: [], employmentStatusList: [],
|
||||
employmentTypeList: [], adConditons: [],
|
||||
selectedRowKeys: [], exportPayload: {}
|
||||
|
|
@ -165,7 +167,7 @@ class Index extends Component {
|
|||
*/
|
||||
queryEmployeeList = () => {
|
||||
const { employeeDeclareStore: { advanceForm: form } } = this.props;
|
||||
const { pageInfo, declareStatus, taxCycle, selectedKey, selectedRowKeys } = this.state;
|
||||
const { pageInfo, declareStatus, taxCycle, selectedKey, selectedRowKeys, confirmationDialog } = this.state;
|
||||
const { departmentIds, positionIds, ...formParams } = form.getFormParams();
|
||||
const payload = {
|
||||
...formParams, ...pageInfo,
|
||||
|
|
@ -183,7 +185,8 @@ class Index extends Component {
|
|||
const { columns, list: dataSource, pageNum: current, pageSize, total } = result;
|
||||
this.baseInfoRef.getEmployeeDeclareInfo();
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
confirmationDialog: { ...confirmationDialog, payload }
|
||||
}, () => {
|
||||
const payload = {
|
||||
dataSource, selectedRowKeys, selectedKey,
|
||||
|
|
@ -402,7 +405,7 @@ class Index extends Component {
|
|||
});
|
||||
};
|
||||
handleMenuClick = ({ key }) => {
|
||||
const { selectedRowKeys } = this.state;
|
||||
const { selectedRowKeys, confirmationDialog } = this.state;
|
||||
switch (key) {
|
||||
case "1":
|
||||
if (_.isEmpty(selectedRowKeys)) {
|
||||
|
|
@ -411,6 +414,9 @@ class Index extends Component {
|
|||
}
|
||||
this.handleDeleteDeclare(selectedRowKeys);
|
||||
break;
|
||||
case"5":
|
||||
this.setState({ confirmationDialog: { ...confirmationDialog, visible: true } });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -445,7 +451,7 @@ class Index extends Component {
|
|||
render() {
|
||||
const {
|
||||
selectedKey, showSearchAd, declareStatus, declareStatusList, taxCycle, declareEditDialog, loading,
|
||||
pageInfo, adConditons, employmentTypeList, employmentStatusList
|
||||
pageInfo, adConditons, employmentTypeList, employmentStatusList, confirmationDialog
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn }, employeeDeclareStore: { advanceForm: form, declareForm } } = this.props;
|
||||
const menu = (
|
||||
|
|
@ -454,7 +460,7 @@ class Index extends Component {
|
|||
{/*<Menu.Item key="2">{getLabel(111, "批量编辑")}</Menu.Item>*/}
|
||||
{/*<Menu.Item key="3">{getLabel(81272, "导出全部")}</Menu.Item>*/}
|
||||
{/*<Menu.Item key="4">{getLabel(543715, "导出所选")}</Menu.Item>*/}
|
||||
<Menu.Item key="5">{getLabel(111, "扣除名单确认")}</Menu.Item>
|
||||
{/*<Menu.Item key="5">{getLabel(111, "扣除名单确认")}</Menu.Item>*/}
|
||||
</Menu>
|
||||
);
|
||||
const buttons = [
|
||||
|
|
@ -473,7 +479,11 @@ class Index extends Component {
|
|||
loading={loading.refresh}>{getLabel(111, "刷新数据")}</Button>,
|
||||
<Dropdown overlay={menu}>
|
||||
<Button type="ghost" icon="ellipsis" className="moreBtn"/>
|
||||
</Dropdown>
|
||||
</Dropdown>,
|
||||
<DeductionListConfirmDialog {...confirmationDialog} year={moment(taxCycle).format("YYYY")}
|
||||
onCancel={() => this.setState({
|
||||
confirmationDialog: { ...confirmationDialog, visible: false }
|
||||
})}/>
|
||||
];
|
||||
const topTab = [
|
||||
{ title: getLabel(332, "全部"), viewcondition: "list" },
|
||||
|
|
|
|||
|
|
@ -207,3 +207,22 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//扣除名单确认
|
||||
.confirmationDialogContent {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px;
|
||||
|
||||
.tableBtns {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
justify-content: end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue