release/2.9.9.2312.02-个税

This commit is contained in:
黎永顺 2023-12-18 14:56:18 +08:00
parent 8cd49ed05b
commit 1a57f4e392
1 changed files with 29 additions and 11 deletions

View File

@ -48,7 +48,7 @@ class Index extends Component {
declareEditDialog: { visible: false, id: "", title: "" },
declareStatusList: [], employmentStatusList: [],
employmentTypeList: [], adConditons: [],
selectedRowKeys: [], exportPaylaod: {}
selectedRowKeys: [], exportPayload: {}
};
this.baseInfoRef = null;
this.timer = null;
@ -110,7 +110,7 @@ class Index extends Component {
};
componentWillUnmount() {
this.setState({ exportPaylaod: {} });
this.setState({ exportPayload: {} });
window.removeEventListener("message", this.handleReceive, false);
}
@ -169,7 +169,7 @@ class Index extends Component {
departmentIds: departmentIds ? departmentIds.split(",") : [],
positionIds: positionIds ? positionIds.split(",") : []
};
this.setState({ exportPaylaod: payload, loading: { ...this.state.loading, query: true } });
this.setState({ exportPayload: payload, loading: { ...this.state.loading, query: true } });
API[selectedKey](payload).then(({ status, data }) => {
this.setState({ loading: { ...this.state.loading, query: false } });
if (status) {
@ -386,9 +386,17 @@ class Index extends Component {
break;
}
};
handleEmployeedeclareExport = async () => {
handleEmployeedeclareExport = async ({ key }) => {
const { selectedRowKeys, exportPayload } = this.state;
if (key === "selected" && _.isEmpty(selectedRowKeys)) {
message.warning(getLabel(111, "请先选择需要导出的人员!"));
return;
}
this.setState({ loading: { ...this.state.loading, exportLoading: true } });
const promise = await employeedeclareExport(_.omit(this.state.exportPaylaod, ["current", "total", "pageSize"]));
const promise = await employeedeclareExport(_.omit({
...exportPayload,
ids: selectedRowKeys
}, ["current", "total", "pageSize"]));
this.setState({ loading: { ...this.state.loading, exportLoading: false } });
};
@ -431,16 +439,26 @@ class Index extends Component {
{ title: getLabel(111, "本月信息变动"), viewcondition: "list4Update" }
];
const tabBtns = [
<Button type="ghost" onClick={this.handleAdd}>{getLabel(1421, "新增")}</Button>,
// <Dropdown.Button
// onClick={this.handleAdd}
// overlay={
// <Menu>
// {/*<Menu.Item key="1">{getLabel(32935, "导入")}</Menu.Item>*/}
// </Menu>
// }
// type="primary">{getLabel(1421, "新增")}</Dropdown.Button>,
<Dropdown.Button
onClick={this.handleAdd}
onClick={() => this.handleEmployeedeclareExport({ key: "all" })}
loading={loading.exportLoading}
overlay={
<Menu>
{/*<Menu.Item key="1">{getLabel(32935, "导入")}</Menu.Item>*/}
<Menu onClick={this.handleEmployeedeclareExport}>
<Menu.Item key="selected">{getLabel(543715, "导出所选")}</Menu.Item>
</Menu>
}
type="primary">{getLabel(1421, "新增")}</Dropdown.Button>,
<Button type="ghost" onClick={this.handleEmployeedeclareExport}
loading={loading.exportLoading}>{getLabel(17416, "导出")}</Button>,
type="primary">{getLabel(17416, "导出全部")}</Dropdown.Button>,
// <Button type="ghost" onClick={this.handleEmployeedeclareExport}
// loading={loading.exportLoading}>{getLabel(17416, "导出")}</Button>,
<WeaSelect
value={declareStatus}
style={{ width: 150 }}