From 66c5f09813e13ebda3df1f988efa6d317232a625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E7=AB=A5=E5=B4=87?= <792998983@qq.com> Date: Thu, 8 Jul 2021 15:49:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=94=B3=E8=AF=89=E6=9D=90?= =?UTF-8?q?=E6=96=99=E5=AE=A1=E6=A0=B8=E5=8F=8A=E4=BF=AE=E6=94=B9=E6=88=90?= =?UTF-8?q?=E6=9E=9C=E5=AF=B9=E6=8E=A5=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/military/task.js | 22 ++ src/military/task/api.js | 69 +++++ .../task/components/itemListMyTask/index.jsx | 16 +- .../task/components/itemListPaper/index.jsx | 93 +++---- .../task/components/itemListPaper/index.scss | 4 + .../task/components/itemListTask/index.jsx | 2 +- .../task/components/itemListTask/index.scss | 9 +- .../task/components/itemProofManage/index.jsx | 25 +- .../itemPublicityComplain/index.jsx | 239 ++++++++++++++++++ .../itemPublicityComplain/index.scss | 52 ++++ .../task/components/proofModal/index.jsx | 9 +- src/military/task/image/head.png | Bin 0 -> 67646 bytes src/military/task/index.scss | 28 +- src/military/task/myTask/index.jsx | 1 + src/military/task/myTask/joinTask.jsx | 103 ++++---- src/military/task/paperComplain/index.js | 36 ++- src/military/task/paperManage/index.jsx | 55 ++-- src/military/task/publicityComplain/index.js | 129 ++++++++++ src/military/task/static.js | 12 +- src/military/task/taskDetail/index.jsx | 91 ++++--- src/military/task/taskDetail/index.scss | 8 + src/military/task/taskList/index.jsx | 5 +- 22 files changed, 822 insertions(+), 186 deletions(-) create mode 100644 src/military/task/components/itemPublicityComplain/index.jsx create mode 100644 src/military/task/components/itemPublicityComplain/index.scss create mode 100755 src/military/task/image/head.png create mode 100644 src/military/task/publicityComplain/index.js diff --git a/src/military/task.js b/src/military/task.js index 29f15168..457f79d7 100644 --- a/src/military/task.js +++ b/src/military/task.js @@ -51,6 +51,11 @@ const ProofManage = Loadable({ loading: Loading, }); +const PublicityComplain = Loadable({ + loader: () => import("./task/publicityComplain"), + loading: Loading, +}); + const Index = (propsTransmit) => { // 开发时,从代理的位置获取用户信息 const [currentUser, setCurrentUser] = useState(null); @@ -71,6 +76,7 @@ const Index = (propsTransmit) => {
+ {/* 任务详情 */} ( @@ -78,6 +84,7 @@ const Index = (propsTransmit) => { )} > + {/* 新增任务 */} ( @@ -85,6 +92,7 @@ const Index = (propsTransmit) => { )} > + {/* 编辑任务 */} ( @@ -92,6 +100,7 @@ const Index = (propsTransmit) => { )} > + {/* 我的任务 */} ( @@ -99,6 +108,7 @@ const Index = (propsTransmit) => { )} > + {/* 任务管理审核 */} ( @@ -106,6 +116,7 @@ const Index = (propsTransmit) => { )} > + {/* 成果管理审核 */} ( @@ -113,6 +124,7 @@ const Index = (propsTransmit) => { )} > + {/* 成果申诉管理审核 */} ( @@ -120,6 +132,15 @@ const Index = (propsTransmit) => { )} > + {/* 公示期成果申诉管理审核 */} + ( + + )} + > + + {/* 佐证管理审核 */} ( @@ -127,6 +148,7 @@ const Index = (propsTransmit) => { )} > + {/* 成果列表 */} ( diff --git a/src/military/task/api.js b/src/military/task/api.js index f06d9535..1e9f3d76 100644 --- a/src/military/task/api.js +++ b/src/military/task/api.js @@ -155,6 +155,40 @@ export async function getTaskPaper(params){ } } +// 审核任务成果 +export async function readyCheckPapers(params){ + let res = await fetch({ + url: '/api/paper/admin/readyCheckPapers', + method: 'get', + params, + }); + if (res.data) { + return res.data; + } else { + notification.open({ + message: "提示", + description: res.message || '请求错误', + }); + } +} + +// 我的成果 +export async function myPapers(params){ + let res = await fetch({ + url: '/api/paper/my', + method: 'get', + params, + }); + if (res.data) { + return res.data; + } else { + notification.open({ + message: "提示", + description: res.message || '请求错误', + }); + } +} + //更新成果 export function updatePaper(data) { return fetch({ @@ -331,4 +365,39 @@ export function checkProof(data){ method: 'post', data, }); +} + +// 应征者公示期申诉 +export function publicityComplain(data){ + return fetch({ + url: `/api/myTasks/applicantComplaintDuringPublicity`, + method: 'post', + data, + }); +} + +// 审核公示期申诉列表查询 +export async function publicityComplainList(params) { + let res = await fetch({ + url: '/api/tasks/backend/complaintMaterialList', + method: 'get', + params, + }); + if (res.data) { + return res.data; + } else { + notification.open({ + message: "提示", + description: res.message || '请求错误', + }); + } +} + +// 审核公示期申诉 +export function checkPublicity(data){ + return fetch({ + url: `/api/tasks/backend/adminCheck/complaintMaterialDuringPublicity`, + method: 'post', + data, + }); } \ No newline at end of file diff --git a/src/military/task/components/itemListMyTask/index.jsx b/src/military/task/components/itemListMyTask/index.jsx index 0e51924c..2a42f75a 100644 --- a/src/military/task/components/itemListMyTask/index.jsx +++ b/src/military/task/components/itemListMyTask/index.jsx @@ -13,7 +13,7 @@ for (const item of taskStatusAllArr) { statusArr[item.dicItemCode] = item.dicItemName; } export default (props) => { - const { list, curPage, total, changePage, taskCategoryValueArr, loading, publish, showNotification ,reloadList} = props; + const { list, curPage, total, changePage, taskCategoryValueArr, loading, publish, showNotification, reloadList } = props; const [page, setPage] = useState(1); const [visibleProofs, setVisibleProofs] = useState(false); @@ -36,6 +36,13 @@ export default (props) => { }) } + function proofAdvice(advice){ + Modal.info({ + title: '审核意见', + content: advice + }) + } + return ( @@ -85,10 +92,13 @@ export default (props) => { {item.status === 4 && 成果评选} { - // item.status === 4 && item.papersCount && (!item.isProofBoolean) && + item.status === 4 && item.papersCount && (!item.isProofBoolean) && { uploadProofs(item) }} className="line_1 color-blue">上传佐证材料} + { + (!item.isProofBoolean) && (item.taskResultProof && item.taskResultProof.status === 0) && + { proofAdvice(item.advice) }} className="line_1 color-blue">佐证被拒原因} - {(item.status === 9) && { repairAdvice(item.repairAdvice) }} className="line_1 color-blue">审核意见} + {(item.status === 9) && { repairAdvice(item.advice) }} className="line_1 color-blue">审核意见} {/* 支付登记 */} {/* 上传支付凭证 */} diff --git a/src/military/task/components/itemListPaper/index.jsx b/src/military/task/components/itemListPaper/index.jsx index a212ebb2..28302a90 100644 --- a/src/military/task/components/itemListPaper/index.jsx +++ b/src/military/task/components/itemListPaper/index.jsx @@ -1,35 +1,36 @@ import React, { useEffect, useState, useCallback } from 'react'; import { Pagination, Modal, Form, Input, Button } from 'antd'; import ReactWEditor from 'wangeditor-for-react'; -import { getImageUrl, timeAgo } from 'educoder'; +import { timeAgo } from 'educoder'; import Nodata from 'forge/Nodata'; import Loading from "src/Loading"; import { editorConfig } from 'military/components/config'; import Upload from 'military/components/Upload'; -import { reportPaper, thumbUpPaper, commentAdd, complainPaper } from '../../api'; +import { reportPaper, thumbUpPaper, commentAdd, complainPaper, publicityComplain } from '../../api'; import { httpUrl } from '../../../fetch'; -import winpng from '../../image/win.png'; - +import winpng from '../../image/winner.png'; +import headpng from '../../image/head.png'; import './index.scss'; const { TextArea } = Input; export default Form.create()((props) => { - const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form } = props; - const { getFieldDecorator, validateFields, } = form; + const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form, detailStatus } = props; + const { getFieldDecorator, validateFields, setFieldsValue } = form; const [page, setPage] = useState(1); const pageSize = props.pageSize || 10; const [checkedItem, setCheckedItem] = useState({}); const [reportVisible, setReportVisible] = useState(false); - const [reportValue, setReportValue] = useState(''); const [commentHtml, setCommentHtml] = useState(''); const [commentId, setCommentId] = useState(undefined); const [complainVisible, setComplainVisible] = useState(false); - const [complainValue, setComplainValue] = useState(''); const [fileList, setFileList] = useState(null); + const [loadingChild, setLoadingChild] = useState(false); + + useEffect(() => { changePage(page); }, [page]); @@ -42,6 +43,7 @@ export default Form.create()((props) => { function report() { validateFields((error, values) => { if (!error) { + setLoadingChild(true); reportPaper({ paperId: checkedItem.id, content: values.reportValue @@ -49,16 +51,22 @@ export default Form.create()((props) => { if (res.message === 'success') { showNotification('举报成功'); setReportVisible(false); - setReportValue(''); + setFieldsValue({ + reportValue: '', + complainValue: '', + }); } + setLoadingChild(false); }); } }); } function thumbUp(id) { + setLoadingChild(true); thumbUpPaper(id).then(res => { reloadList(); + setLoadingChild(false); }); } @@ -108,24 +116,38 @@ export default Form.create()((props) => { for (const item of fileList) { files.push(item.id || (item.response.data && item.response.data.id)); } - complainPaper({ - paperId: checkedItem.id, - params: { + + if (detailStatus === 5) { + publicityComplain({ content: values.complainValue, - files: files.join() - } - }).then(res => { - if (res.message === 'success') { - showNotification('申诉提交成功'); - setComplainVisible(false); - setComplainValue(''); - setFileList(null); - } - }); + files: files.join(), + paperId: checkedItem.id, + }).then(res => { + complainDeal(res); + }); + } else { + complainPaper({ + paperId: checkedItem.id, + params: { + content: values.complainValue, + files: files.join() + } + }).then(res => { + complainDeal(res); + }); + } } }); } + function complainDeal(res) { + if (res.message === 'success') { + showNotification('申诉提交成功'); + setComplainVisible(false); + setFileList(null); + } + } + // 上传附件后得到的文件数组 function UploadFunc(fileList) { setFileList(fileList); @@ -142,37 +164,30 @@ export default Form.create()((props) => { return ( - {loading ? : + {loading || loadingChild ? : { list.map(item => { return (
- 头像加载失败 + 头像加载失败
-
    + - -
    -
    +
    { @@ -286,14 +301,6 @@ export default Form.create()((props) => {

    你的申诉信息将发送给平台管理员

    请如实填写有效的申诉原由,我们将尽快完成审核

    - {/*