|  | @@ -22,11 +22,14 @@ import SaveModal from './components/saveOtherModal';
 | 
	
		
			
				|  |  |  import CompareModal from './components/compareModal';
 | 
	
		
			
				|  |  |  import CompareCom from './components/compareCom';
 | 
	
		
			
				|  |  |  import dayjs from 'dayjs';
 | 
	
		
			
				|  |  | +import { getToken } from '@/utils/utils';
 | 
	
		
			
				|  |  |  import { exportExcel, getUUID } from '../../utils/exportExcl';
 | 
	
		
			
				|  |  | +import { stringify } from 'qs';
 | 
	
		
			
				|  |  |  const PSRDetail = () => {
 | 
	
		
			
				|  |  |    const navigate = useNavigate();
 | 
	
		
			
				|  |  |    const params = useParams();
 | 
	
		
			
				|  |  |    const location = useLocation();
 | 
	
		
			
				|  |  | +  const token = getToken();
 | 
	
		
			
				|  |  |    const { id: projectId } = params;
 | 
	
		
			
				|  |  |    const {
 | 
	
		
			
				|  |  |      state: { project_name, flow_id, node_id },
 | 
	
	
		
			
				|  | @@ -78,15 +81,15 @@ const PSRDetail = () => {
 | 
	
		
			
				|  |  |    };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    //请求投标版、签字版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 现金流
 | 
	
		
			
				|  |  |    const {
 | 
	
	
		
			
				|  | @@ -145,15 +148,31 @@ const PSRDetail = () => {
 | 
	
		
			
				|  |  |      if (key) {
 | 
	
		
			
				|  |  |        onChange(key);
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  | -      runExcel({ gridKey: node_id });
 | 
	
		
			
				|  |  | +      queryPsrExcel({ gridKey: node_id });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    }, [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) => {
 | 
	
		
			
				|  |  |      if (key == '1') {
 | 
	
		
			
				|  |  | -      runExcel({ gridKey: node_id });
 | 
	
		
			
				|  |  | +      queryPsrExcel({ gridKey: node_id });
 | 
	
		
			
				|  |  |      } else if (key == '2') {
 | 
	
		
			
				|  |  | -      runExcel({ gridKey: flow_id });
 | 
	
		
			
				|  |  | +      queryPsrExcel({ gridKey: flow_id });
 | 
	
		
			
				|  |  |      } else {
 | 
	
		
			
				|  |  |        initPsrActrual(key);
 | 
	
		
			
				|  |  |      }
 |