|  | @@ -22,11 +22,14 @@ import SaveModal from './components/saveOtherModal';
 | 
											
												
													
														|  |  import CompareModal from './components/compareModal';
 |  |  import CompareModal from './components/compareModal';
 | 
											
												
													
														|  |  import CompareCom from './components/compareCom';
 |  |  import CompareCom from './components/compareCom';
 | 
											
												
													
														|  |  import dayjs from 'dayjs';
 |  |  import dayjs from 'dayjs';
 | 
											
												
													
														|  | 
 |  | +import { getToken } from '@/utils/utils';
 | 
											
												
													
														|  |  import { exportExcel, getUUID } from '../../utils/exportExcl';
 |  |  import { exportExcel, getUUID } from '../../utils/exportExcl';
 | 
											
												
													
														|  | 
 |  | +import { stringify } from 'qs';
 | 
											
												
													
														|  |  const PSRDetail = () => {
 |  |  const PSRDetail = () => {
 | 
											
												
													
														|  |    const navigate = useNavigate();
 |  |    const navigate = useNavigate();
 | 
											
												
													
														|  |    const params = useParams();
 |  |    const params = useParams();
 | 
											
												
													
														|  |    const location = useLocation();
 |  |    const location = useLocation();
 | 
											
												
													
														|  | 
 |  | +  const token = getToken();
 | 
											
												
													
														|  |    const { id: projectId } = params;
 |  |    const { id: projectId } = params;
 | 
											
												
													
														|  |    const {
 |  |    const {
 | 
											
												
													
														|  |      state: { project_name, flow_id, node_id },
 |  |      state: { project_name, flow_id, node_id },
 | 
											
										
											
												
													
														|  | @@ -78,15 +81,15 @@ const PSRDetail = () => {
 | 
											
												
													
														|  |    };
 |  |    };
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    //请求投标版、签字版psr excel
 |  |    //请求投标版、签字版psr excel
 | 
											
												
													
														|  | -  const { run: runExcel } = useRequest(queryPsrExcel, {
 |  | 
 | 
											
												
													
														|  | -    manual: true,
 |  | 
 | 
											
												
													
														|  | -    formatResult: (res) => {
 |  | 
 | 
											
												
													
														|  | -      if (res) {
 |  | 
 | 
											
												
													
														|  | -        const jsonData = JSON.parse(res);
 |  | 
 | 
											
												
													
														|  | -        renderSheet(jsonData);
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | -    },
 |  | 
 | 
											
												
													
														|  | -  });
 |  | 
 | 
											
												
													
														|  | 
 |  | +  // const { run: runExcel } = useRequest(queryPsrExcel, {
 | 
											
												
													
														|  | 
 |  | +  //   manual: true,
 | 
											
												
													
														|  | 
 |  | +  //   formatResult: (res) => {
 | 
											
												
													
														|  | 
 |  | +  //     if (res) {
 | 
											
												
													
														|  | 
 |  | +  //       const jsonData = JSON.parse(res);
 | 
											
												
													
														|  | 
 |  | +  //       renderSheet(jsonData);
 | 
											
												
													
														|  | 
 |  | +  //     }
 | 
											
												
													
														|  | 
 |  | +  //   },
 | 
											
												
													
														|  | 
 |  | +  // });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    //请求月度psr和现金流列表 data_type 1 psr 2 现金流
 |  |    //请求月度psr和现金流列表 data_type 1 psr 2 现金流
 | 
											
												
													
														|  |    const {
 |  |    const {
 | 
											
										
											
												
													
														|  | @@ -145,15 +148,31 @@ const PSRDetail = () => {
 | 
											
												
													
														|  |      if (key) {
 |  |      if (key) {
 | 
											
												
													
														|  |        onChange(key);
 |  |        onChange(key);
 | 
											
												
													
														|  |      } else {
 |  |      } else {
 | 
											
												
													
														|  | -      runExcel({ gridKey: node_id });
 |  | 
 | 
											
												
													
														|  | 
 |  | +      queryPsrExcel({ gridKey: node_id });
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    }, [key]);
 |  |    }, [key]);
 | 
											
												
													
														|  | 
 |  | +  //请求投标版、签字版psr excel
 | 
											
												
													
														|  | 
 |  | +  const queryPsrExcel = (data) => {
 | 
											
												
													
														|  | 
 |  | +    axios({
 | 
											
												
													
														|  | 
 |  | +      url: `/api/v1/purchase/record/sheet?${stringify(data)}`,
 | 
											
												
													
														|  | 
 |  | +      method: 'POST',
 | 
											
												
													
														|  | 
 |  | +      data,
 | 
											
												
													
														|  | 
 |  | +      headers: {
 | 
											
												
													
														|  | 
 |  | +        'JWT-TOKEN': token,
 | 
											
												
													
														|  | 
 |  | +      },
 | 
											
												
													
														|  | 
 |  | +    }).then((req) => {
 | 
											
												
													
														|  | 
 |  | +      if (req.status == 200) {
 | 
											
												
													
														|  | 
 |  | +        const jsonData = JSON.parse(req.data);
 | 
											
												
													
														|  | 
 |  | +        renderSheet(jsonData);
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +    });
 | 
											
												
													
														|  | 
 |  | +  };
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    const onChange = (key) => {
 |  |    const onChange = (key) => {
 | 
											
												
													
														|  |      if (key == '1') {
 |  |      if (key == '1') {
 | 
											
												
													
														|  | -      runExcel({ gridKey: node_id });
 |  | 
 | 
											
												
													
														|  | 
 |  | +      queryPsrExcel({ gridKey: node_id });
 | 
											
												
													
														|  |      } else if (key == '2') {
 |  |      } else if (key == '2') {
 | 
											
												
													
														|  | -      runExcel({ gridKey: flow_id });
 |  | 
 | 
											
												
													
														|  | 
 |  | +      queryPsrExcel({ gridKey: flow_id });
 | 
											
												
													
														|  |      } else {
 |  |      } else {
 | 
											
												
													
														|  |        initPsrActrual(key);
 |  |        initPsrActrual(key);
 | 
											
												
													
														|  |      }
 |  |      }
 |