release/2.19.1.2501.01-个税

This commit is contained in:
lys 2025-01-06 10:39:25 +08:00
parent ac40faa79a
commit 23d32f627b
3 changed files with 55 additions and 22 deletions

View File

@ -42,9 +42,9 @@ class TaxSetDialog extends Component {
}
getList = (props) => {
const { id, dataType } = props || this.props, { pageInfo, detailSettingsDialog } = this.state;
const { id, dataType, viewParams = {} } = props || this.props, { pageInfo, detailSettingsDialog } = this.state;
this.setState({ loading: true });
postFetch(`/api/bs/hrmsalary/otherDeduction/${dataType}List`, { ...pageInfo, id })
postFetch(`/api/bs/hrmsalary/otherDeduction/${dataType}List`, { ...pageInfo, ...viewParams, id })
.then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
@ -86,6 +86,7 @@ class TaxSetDialog extends Component {
render() {
const { pageInfo, dataSource, loading, columns, selectedRowKeys, detailSettingsDialog } = this.state;
const { viewParams } = this.props;
const pagination = {
...pageInfo,
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
@ -110,21 +111,24 @@ class TaxSetDialog extends Component {
}}>
<div className="sys-item-table-box">
<Spin spinning={loading && pageInfo.total === 0}>
<div className="sys-item-table-opts">
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
onClick={() => this.setState({
detailSettingsDialog: { ...detailSettingsDialog, visible: true }
})}/>
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")}
disabled={_.isEmpty(selectedRowKeys)} onClick={() => {
if (_.isEmpty(selectedRowKeys)) {
message.warning(getLabel(111, "请选择要删除的数据!"));
return;
}
this.handleDelete(selectedRowKeys);
}}/>
</div>
<WeaTable columns={columns} dataSource={dataSource} pagination={pagination} bordered
{
_.isEmpty(viewParams) && <div className="sys-item-table-opts">
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
onClick={() => this.setState({
detailSettingsDialog: { ...detailSettingsDialog, visible: true }
})}/>
<WeaButtonIcon buttonType="del" type="primary" title={getLabel(111, "删除")}
disabled={_.isEmpty(selectedRowKeys)} onClick={() => {
if (_.isEmpty(selectedRowKeys)) {
message.warning(getLabel(111, "请选择要删除的数据!"));
return;
}
this.handleDelete(selectedRowKeys);
}}/>
</div>
}
<WeaTable columns={!_.isEmpty(viewParams) ? _.filter(columns, o => o.dataIndex !== "operate") : columns}
dataSource={dataSource} pagination={pagination} bordered
rowSelection={rowSelection} loading={loading} rowKey="id"
scroll={{ y: this.taxSetRef ? this.taxSetRef.state.height - 164 : 600 }}/>
<DetailSettingsDialog {...detailSettingsDialog} onCancel={(callback) => this.setState({

View File

@ -169,3 +169,13 @@ export const taxTabConditions = [
title: ""
}
];
// 查看附表对应字段
export const appendixFields = [
{ dataIndex: "taxFreeIncome", dataType: "freeIncome" },
{ dataIndex: "commercialHealthInsurance", dataType: "healthInsurance" },
{ dataIndex: "taxDeferredEndowmentInsurance", dataType: "endowmentInsurance" },
{ dataIndex: "allowedDonation", dataType: "grantDonation" },
{ dataIndex: "taxDeduction", dataType: "derateDeduction" },
{ dataIndex: "other", dataType: "otherDerateDeduction" },
{ dataIndex: "", dataType: "personalPension" }
];

View File

@ -33,7 +33,9 @@ import TaxDeclareDetailImportDialog from "./components/taxDeclareDetailImportDia
import TabEditDialog from "./components/tabEditDialog";
import LeftTab from "./components/leftTab";
import { confirmDialog } from "./confirm";
import { appendixFields } from "./components/constants";
import "./index.less";
import TaxSetDialog from "../dataAcquisition/otherDeduct/taxSetDialog";
const { getLabel } = WeaLocaleProvider;
@ -61,7 +63,8 @@ class Index extends Component {
},
intelCalcSalaryStatus: false, //智能算薪 总开关是否开启
declareInfo: {}, pageInfo: { current: 0, pageSize: 10, total: 0 },
reportType: "", showLeft: false
reportType: "", showLeft: false,
taxSetDialog: { visible: false, dataType: "", viewParams: {} }//查看附表
};
this.timer = null;
this.taxDeclareRef = null;
@ -143,6 +146,15 @@ class Index extends Component {
});
}
});
} else if (id === "APPENDIX") {
const { taxAgentId, taxCycle } = this.state.declareInfo;
this.setState({
taxSetDialog: {
visible: true, viewParams: { employeeId: params.employeeId, taxAgentId, taxCycle: taxCycle + "-01" },
dataType: _.find(appendixFields, o => o.dataIndex === params.dataIndex).dataType,
label: params.title
}
});
}
}
};
@ -151,7 +163,8 @@ class Index extends Component {
const i18n = {
"总计": getLabel(523, "总计"), "编辑": getLabel(501169, "编辑"),
"操作": getLabel(30585, "操作"), "共": getLabel(83698, "共"),
"条": getLabel(18256, "条"), "删除": getLabel(535052, "删除")
"条": getLabel(18256, "条"), "删除": getLabel(535052, "删除"),
"查看附表": getLabel(111, "查看附表")
};
const declareStatus = intelCalcSalaryStatus ? declareInfo.declareStatus : "";
const childFrameObj = document.getElementById("atdTable");
@ -175,7 +188,10 @@ class Index extends Component {
if (idx <= 1) {
return { ...it, width: 150, fixed: "left", ellipsis: true };
}
return { ...it, width: 150, ellipsis: true };
return {
...it, width: 150, ellipsis: true,
isAppendix: _.findIndex(appendixFields, o => o.dataIndex === it.dataIndex) !== -1
};
})
}, () => {
const payload = {
@ -346,7 +362,7 @@ class Index extends Component {
render() {
const {
tabs, selectedKey, loading, declareInfo, intelCalcSalaryStatus, taxDecPersonSlide,
editTabVisible, reportType, showLeft
editTabVisible, reportType, showLeft, taxSetDialog
} = this.state;
const [__, taxDeclarationId] = selectedKey.split("%%");
let btns = [
@ -387,7 +403,7 @@ class Index extends Component {
onClick={() => confirmDialog("correct", () => this.handleOperateDeclare("correct", { reportType }))}>{getLabel(111, "更正申报")}</Button>,
<Button type="ghost"
loading={loading.cancel}
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>,
onClick={() => confirmDialog("cancel", () => this.handleOperateDeclare("cancel", { reportType }))}>{getLabel(111, "作废申报")}</Button>
// <Button type="ghost"
// loading={loading.refreshingPay}
// onClick={this.taxPaymentVoucherStatusSync}>{getLabel(111, "刷新缴款状态")}</Button>
@ -453,6 +469,9 @@ class Index extends Component {
<TabEditDialog visible={editTabVisible}
onCancel={(isRefresh) => this.setState({ editTabVisible: false }, () => isRefresh && this.init(false))}/>
</div>
{/*查看附表*/}
<TaxSetDialog {...taxSetDialog}
onCancel={() => this.setState({ taxSetDialog: { ...taxSetDialog, visible: false } })}/>
<div className="declareDetail-layout-table-content">
<Spin spinning={loading.query}>
<iframe