Merge branch 'pre_dev_military' of http://106.75.45.236:3000/tongChong/forgeplus-react into feature_achieve

This commit is contained in:
何童崇 2022-12-12 15:35:04 +08:00
commit fcff9f8a30
3 changed files with 30 additions and 9 deletions

View File

@ -402,6 +402,13 @@ export function checkPaper(data) {
});
}
export function agreeNoPassAPI(paperId){
return fetch({
url: `/api/paper/updatePaperCheckStatus/${paperId}`,
method: 'put',
});
}
// 成果申诉
export function complainPaper(data) {
return fetch({

View File

@ -76,7 +76,7 @@ export default Form.create()(props => {
onCancel={() => { setVisible(false) }}
className="form-edit-modal"
>
{checkedItem.checkStatus == 2 && detailStatus === 3 && <p className=" mb10 color-orange task_tip">审核意见{checkedItem.auditing.message}</p>}
{checkedItem.checkStatus == 0 && detailStatus === 3 && <p className=" mb10 color-orange task_tip">审核意见{checkedItem.auditing.message}</p>}
<p className="edu-txt-center lineh-20 mb10">你的申诉信息将发送给平台管理员</p>
<p className="edu-txt-center lineh-20">请如实填写有效的申诉原由我们将尽快完成审核</p>
{

View File

@ -3,7 +3,7 @@ import { Input, Radio, Select, Button, Form, DatePicker, Table, Pagination, Moda
import { Link } from "react-router-dom";
import { Confirm } from '../../components/ModalFun';
import { paperCheckStatusArr,taskStatusAllArr } from '../static';
import { readyCheckPapers, checkPaper,deletePaper } from '../api';
import { readyCheckPapers, checkPaper,deletePaper,agreeNoPassAPI } from '../api';
import '../index.scss';
import './index.scss';
const format = "YYYY-MM-DD HH:mm:ss";
@ -180,10 +180,12 @@ export default Form.create()(({ current_user, form, showNotification, match, his
title: '审核状态',
dataIndex: 'checkStatus',
render: (text, record) => {
return text === 2 ? <React.Fragment>
<Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}>通过</Button>
<Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}>不通过</Button>
</React.Fragment> : checkStatusArr[text]
return checkStatusArr[text]
// text === 2 ? <React.Fragment>
// <Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}></Button>
// <Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}></Button>
// </React.Fragment> :
}
},
{
@ -191,16 +193,28 @@ export default Form.create()(({ current_user, form, showNotification, match, his
key: 'action',
render: (text, record) => (
<React.Fragment>
<Link className="mr5 line_1 color-grey3" to={`/task/taskDetail/${record.taskId}`}>查看</Link>
{record.task&&record.task.status==3&&<a className="mr5 line_1 color-grey3" onClick={() => { deleteItem(record.id) }}>删除</a>}
{record.checkStatus ===2&&<Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}>通过</Button>}
{record.checkStatus ===0&&<Button className="mr5 font-12" type="primary" size="small" onClick={() => { agreeNoPass(record.id) }}>通过</Button>}
{record.checkStatus !==0&&<Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}>不通过</Button>}
{record.task&&record.task.status==3&&<Button type="danger" size="small" className="mr5 font-12" onClick={() => { deleteItem(record.id) }}>删除</Button>}
{/* {record.task&&record.task.status==3&&<Button className=" font-12" type="danger" size="small" onClick={() => { deleteItem(record.id) }}>删除</Button>} */}
</React.Fragment>
),
},
]
}, []);
function agreeNoPass(paperId){
setLoading(true);
agreeNoPassAPI(paperId).then(res => {
setLoading(false);
if (res && res.message === 'success') {
setReload(Math.random());
}
});
}
//
function disagree(item) {
if (!item.parentId) {