parent
a8ce369ce6
commit
49ade22f26
|
|
@ -1,5 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
import { postExportFetch, postFetch } from "../util/request";
|
||||
|
||||
//个税申报表-个税申报表列表
|
||||
export const getDeclareList = params => {
|
||||
|
|
@ -238,4 +238,7 @@ export const taxdeclarationUpdateIcon = (params) => {
|
|||
return postFetch("/api/bs/hrmsalary/taxdeclaration/updateIcon", params);
|
||||
};
|
||||
|
||||
export const employeedeclareExport = params => {
|
||||
return postExportFetch("/api/bs/hrmsalary/employeedeclare/export", params);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import EmployeeDeclareDetailSchemaEditDialog from "./components/employeeDeclareD
|
|||
import { commonEnumList } from "../../apis/payrollFiles";
|
||||
import {
|
||||
employeedeclareDeclare,
|
||||
employeedeclareExport,
|
||||
employeedeclareGetRate,
|
||||
employeedeclareList,
|
||||
employeedeclareList4Add,
|
||||
|
|
@ -42,12 +43,12 @@ class Index extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "list", showSearchAd: false, declareStatus: "ALL",
|
||||
taxCycle: new Date(), loading: { query: false, refresh: false, feedback: false, declare: false },
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
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: "" },
|
||||
declareStatusList: [], employmentStatusList: [],
|
||||
employmentTypeList: [], adConditons: [],
|
||||
selectedRowKeys: []
|
||||
selectedRowKeys: [], exportPaylaod: {}
|
||||
};
|
||||
this.baseInfoRef = null;
|
||||
this.timer = null;
|
||||
|
|
@ -109,6 +110,7 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
this.setState({ exportPaylaod: {} });
|
||||
window.removeEventListener("message", this.handleReceive, false);
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +169,7 @@ class Index extends Component {
|
|||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
positionIds: positionIds ? positionIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: { ...this.state.loading, query: true } });
|
||||
this.setState({ exportPaylaod: payload, loading: { ...this.state.loading, query: true } });
|
||||
API[selectedKey](payload).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...this.state.loading, query: false } });
|
||||
if (status) {
|
||||
|
|
@ -384,6 +386,11 @@ class Index extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
handleEmployeedeclareExport = async () => {
|
||||
this.setState({ loading: { ...this.state.loading, exportLoading: true } });
|
||||
const promise = await employeedeclareExport(_.omit(this.state.exportPaylaod, ["current", "total", "pageSize"]));
|
||||
this.setState({ loading: { ...this.state.loading, exportLoading: false } });
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
|
|
@ -432,6 +439,8 @@ class Index extends Component {
|
|||
</Menu>
|
||||
}
|
||||
type="primary">{getLabel(1421, "新增")}</Dropdown.Button>,
|
||||
<Button type="ghost" onClick={this.handleEmployeedeclareExport}
|
||||
loading={loading.exportLoading}>{getLabel(17416, "导出")}</Button>,
|
||||
<WeaSelect
|
||||
value={declareStatus}
|
||||
style={{ width: 150 }}
|
||||
|
|
@ -453,6 +462,7 @@ class Index extends Component {
|
|||
];
|
||||
// !showOperateBtn && tabBtns.shift();
|
||||
selectedKey !== "list" && tabBtns.shift();
|
||||
selectedKey !== "list" && tabBtns.shift();
|
||||
return (
|
||||
<WeaTop
|
||||
title={getLabel(544289, "人员信息报送")} iconBgcolor="#F14A2D"
|
||||
|
|
|
|||
Loading…
Reference in New Issue