|
@@ -83,16 +83,18 @@ function FinanceProject(props) {
|
|
|
|
|
|
const filterRef = useRef({ pageSize: 20 });
|
|
const filterRef = useRef({ pageSize: 20 });
|
|
const onChangePage = pagination => {
|
|
const onChangePage = pagination => {
|
|
|
|
+ const { user_id } = form.getFieldsValue();
|
|
dispatch({
|
|
dispatch({
|
|
type: 'finance/queryFinanceProjReport',
|
|
type: 'finance/queryFinanceProjReport',
|
|
payload: {
|
|
payload: {
|
|
...filterRef.current,
|
|
...filterRef.current,
|
|
|
|
+ user_id,
|
|
currentPage: pagination.current,
|
|
currentPage: pagination.current,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
};
|
|
};
|
|
const handleSearch = () => {
|
|
const handleSearch = () => {
|
|
- const { time, name } = form.getFieldsValue();
|
|
|
|
|
|
+ const { time, user_id } = form.getFieldsValue();
|
|
filterRef.current.s_time = time[0] ? moment(time[0]).format('YYYY-MM-DD') : null;
|
|
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.e_time = time[1] ? moment(time[1]).format('YYYY-MM-DD') : null;
|
|
|
|
|
|
@@ -100,7 +102,7 @@ function FinanceProject(props) {
|
|
type: 'finance/queryFinanceProjReport',
|
|
type: 'finance/queryFinanceProjReport',
|
|
payload: {
|
|
payload: {
|
|
...filterRef.current,
|
|
...filterRef.current,
|
|
- user_id: name,
|
|
|
|
|
|
+ user_id,
|
|
},
|
|
},
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -122,7 +124,7 @@ function FinanceProject(props) {
|
|
<Form.Item label="时间" name="time" initialValue={initDate}>
|
|
<Form.Item label="时间" name="time" initialValue={initDate}>
|
|
<RangePicker placeholder="选择时间" allowClear={false} />
|
|
<RangePicker placeholder="选择时间" allowClear={false} />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
- <Form.Item label="填报人" name="name">
|
|
|
|
|
|
+ <Form.Item label="填报人" name="user_id">
|
|
<Select
|
|
<Select
|
|
options={userList}
|
|
options={userList}
|
|
fieldNames={{ label: 'CName', value: 'ID' }}
|
|
fieldNames={{ label: 'CName', value: 'ID' }}
|
|
@@ -143,11 +145,12 @@ function FinanceProject(props) {
|
|
|
|
|
|
const handleDownload = () => {
|
|
const handleDownload = () => {
|
|
const token = getToken();
|
|
const token = getToken();
|
|
- let s_time = time[0] ? moment(time[0]).format('YYYY-MM-DD') : null;
|
|
|
|
- let e_time = time[1] ? moment(time[1]).format('YYYY-MM-DD') : null;
|
|
|
|
|
|
+ const s_time = !filterRef.current.s_time ? '' : filterRef.current.s_time;
|
|
|
|
+ const e_time = !filterRef.current.e_time ? '' : filterRef.current.e_time;
|
|
|
|
+ const { user_id } = form.getFieldsValue();
|
|
|
|
|
|
downloadFile(
|
|
downloadFile(
|
|
- `/api/v2/workload/finance/exe/export?JWT-TOKEN=${token}&s_time=${s_time}&e_time=${e_time}`,
|
|
|
|
|
|
+ `/api/v2/workload/finance/exe/export?JWT-TOKEN=${token}&s_time=${s_time}&e_time=${e_time}&user_id=${user_id}`,
|
|
`财务报表_项目${moment().format('YYYYMMDDHHMMSS')}.xlsx`
|
|
`财务报表_项目${moment().format('YYYYMMDDHHMMSS')}.xlsx`
|
|
);
|
|
);
|
|
};
|
|
};
|