|
@@ -104,8 +104,8 @@ function Department(props) {
|
|
|
];
|
|
|
const handleSearch = () => {
|
|
|
const { time } = form.getFieldsValue();
|
|
|
- filterRef.current.s_time = time[0] ? moment(time[0]).format('YYYY-MM-DD') : null;
|
|
|
- filterRef.current.e_time = time[1] ? moment(time[1]).format('YYYY-MM-DD') : null;
|
|
|
+ filterRef.current.s_time = time[0] ? moment(time[0]).format('YYYY-MM-DD') : '';
|
|
|
+ filterRef.current.e_time = time[1] ? moment(time[1]).format('YYYY-MM-DD') : '';
|
|
|
|
|
|
//重置图表部门选择
|
|
|
setLoadedDepKey([]);
|
|
@@ -124,16 +124,12 @@ function Department(props) {
|
|
|
const s_time = !filterRef.current.s_time ? '' : filterRef.current.s_time;
|
|
|
const e_time = !filterRef.current.e_time ? '' : filterRef.current.e_time;
|
|
|
|
|
|
- console.log(s_time, e_time);
|
|
|
-
|
|
|
- if (finance) {
|
|
|
- console.log(1);
|
|
|
+ if (finance)
|
|
|
downloadFile(
|
|
|
`/api/v2/workload/finance/people/export?JWT-TOKEN=${token}&s_time=${s_time}&e_time=${e_time}`,
|
|
|
`财务报表_部门${moment().format('YYYYMMDDHHMMSS')}.xlsx`
|
|
|
);
|
|
|
- console.log(2);
|
|
|
- } else
|
|
|
+ else
|
|
|
downloadFile(
|
|
|
`/api/v2/workload/rpt/dep/export2excel?JWT-TOKEN=${token}&s_time=${s_time}&e_time=${e_time}`,
|
|
|
`部门报表${moment().format('YYYYMMDDHHMMSS')}.xlsx`
|