{helper(
- "numberInput",
+ "number",
[{ max: 20, message: '长度不能超过20个字符' }],
{
)}
{helper(
- "author",
+ "userName",
[{ max: 20, message: '长度不能超过20个字符' }],
)}
diff --git a/src/military/task/paperComplain/index.js b/src/military/task/paperComplain/index.js
index c369be62..2439065c 100644
--- a/src/military/task/paperComplain/index.js
+++ b/src/military/task/paperComplain/index.js
@@ -3,12 +3,14 @@ import { Input, Button, Radio, Form, Table, Pagination, Modal } from 'antd';
import { Link } from "react-router-dom";
import StatusNav from '../../components/statusNav';
import { complainPaperList, checkComplain } from '../api';
-import { proofArr } from '../static';
+import { paperCheckStatusArr } from '../static';
+import { httpUrl } from 'military/fetch';
+
import '../index.scss';
const TextArea = Input.TextArea;
-const proofArrCheck = proofArr.slice(0, 2);
+const proofArrCheck = paperCheckStatusArr.slice(1);
export default Form.create()(({ current_user, form, showNotification, match, }) => {
@@ -24,12 +26,12 @@ export default Form.create()(({ current_user, form, showNotification, match, })
const [reload, setReload] = useState(0);
const [visible, setVisible] = useState(false);
const [activeId, setActiveId] = useState('');
- const [message, setMessage] = useState('');
-
+ const [status, setStatus] = useState('0');
useEffect(() => {
const params = {
...searchObj,
+ status,
curPage,
pageSize: 10,
};
@@ -42,7 +44,7 @@ export default Form.create()(({ current_user, form, showNotification, match, })
setLoading(false);
})
- }, [reload, curPage, searchObj]);
+ }, [reload, status, curPage, searchObj]);
@@ -57,7 +59,7 @@ export default Form.create()(({ current_user, form, showNotification, match, })
function onSearch() {
validateFields((err, values) => {
if (!err) {
- setSearchObj(values);
+ setSearchObj({ numberInput: values.numberInput });
}
});
}
@@ -65,8 +67,6 @@ export default Form.create()(({ current_user, form, showNotification, match, })
function clearSearch() {
setFieldsValue({
numberInput: '',
- nameInput: '',
- enterpriseNameInput: ''
});
setSearchObj({});
}
@@ -75,34 +75,53 @@ export default Form.create()(({ current_user, form, showNotification, match, })
function changeApprove(approve) {
setApprove(approve);
setCurPage(1);
- // if (approve === 1) {
- // setStatusString('1');
- // } else {
- // setStatusString('2,3,4,5,6,7,8');
- // }
+ if (approve === 1) {
+ setStatus('0');
+ } else {
+ setStatus('1,2');
+ }
}
-
+ function downFile(item) {
+ let url = httpUrl + '/busiAttachments/download/' + item.id;
+ window.open(url);
+ }
const columns = useMemo(() => {
return [
+ // {
+ // title: '来源任务',
+ // dataIndex: 'name',
+ // width: "20%",
+ // render: (text, record) => (
+ //
+ // {text}
+ //
+ // ),
+ // },
{
- title: '来源任务',
- dataIndex: 'name',
- width: "20%",
- render: (text, record) => (
-
- {text}
-
- ),
- },
- {
- title: '评论/成果内容',
+ title: '申诉内容',
dataIndex: 'content',
width: "30%",
+ },
+ {
+ title: '申诉文件',
+ dataIndex: 'materials',
+ width: "20%",
render: (text, record) => {
- return record.paperDetail ?
: ''
+ return
+ {
+ record.materials && record.materials.map(item => {
+ return
+ })
+ }
+
}
+
},
{
title: '评论/提交者',
@@ -136,7 +155,7 @@ export default Form.create()(({ current_user, form, showNotification, match, })
]
}, []);
- function checkPaperItem(paperId, pass) {
+ function checkPaperItem(paperId, pass, message) {
setLoading(true);
checkComplain({
paperId,
@@ -153,8 +172,16 @@ export default Form.create()(({ current_user, form, showNotification, match, })
});
}
+ function refuse() {
+ validateFields((err, values) => {
+ if (!err) {
+ checkPaperItem(activeId, 0, values.message);
+ }
+ });
+ }
+
const changeOptionId = useCallback((option) => {
- // setProofStatusString(option.dicItemCode.toString() || '0,1');
+ setStatus(option.dicItemCode.toString() || '1,2');
setCurPage(1);
}, []);
@@ -213,18 +240,20 @@ export default Form.create()(({ current_user, form, showNotification, match, })
{ checkPaperItem(activeId, 0) }}
+ onOk={refuse}
onCancel={() => { setVisible(false) }}
className="form-edit-modal"
>
-
)
diff --git a/src/military/task/paperManage/index.jsx b/src/military/task/paperManage/index.jsx
index 4d985aba..4c441de1 100644
--- a/src/military/task/paperManage/index.jsx
+++ b/src/military/task/paperManage/index.jsx
@@ -1,17 +1,18 @@
import React, { useCallback, useEffect, useState, useMemo } from 'react';
import { Input, Radio, Select, Button, Form, DatePicker, Table, Pagination, Modal } from 'antd';
import { Link } from "react-router-dom";
+import DelModal from 'military/components/DelModal';
import { paperCheckStatusArr } from '../static';
-import { readyCheckPapers, checkPaper } from '../api';
+import { readyCheckPapers, checkPaper, deletePaper } from '../api';
import '../index.scss';
const format = "YYYY-MM-DD HH:mm:ss";
const Option = Select.Option;
const TextArea = Input.TextArea;
-const checkStatusArr=[];
-for(const item of paperCheckStatusArr){
- checkStatusArr[item.dicItemCode]=item.dicItemName;
+const checkStatusArr = [];
+for (const item of paperCheckStatusArr) {
+ checkStatusArr[item.dicItemCode] = item.dicItemName;
}
export default Form.create()(({ current_user, form, showNotification, match, history }) => {
@@ -20,7 +21,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
const [loading, setLoading] = useState(false);
const [searchObj, setSearchObj] = useState({
- checkStatus:'0,1,2'
+ checkStatus: '0,1,2'
});
const [curPage, setCurPage] = useState(1);
const [total, setTotal] = useState(0);
@@ -29,8 +30,6 @@ export default Form.create()(({ current_user, form, showNotification, match, his
const [reload, setReload] = useState(0);
const [visible, setVisible] = useState(false);
const [activeId, setActiveId] = useState('');
- const [pass, setPass] = useState(2);
- const [message, setMessage] = useState('');
useEffect(() => {
@@ -60,14 +59,11 @@ export default Form.create()(({ current_user, form, showNotification, match, his
function onSearch() {
- validateFields((err, values) => {
- if (!err) {
- if (values.startCreatedAt) values.startCreatedAt = values.startCreatedAt.format(format);
- if (values.endCreatedAt) values.endCreatedAt = values.endCreatedAt.format(format);
- if (values.checkStatus === '0,1,2') values.checkStatus = '';
- setSearchObj(values);
- }
- });
+ let values = getFieldsValue(['checkStatus', 'endCreatedAt', 'startCreatedAt']);
+ if (values.startCreatedAt) values.startCreatedAt = values.startCreatedAt.format(format);
+ if (values.endCreatedAt) values.endCreatedAt = values.endCreatedAt.format(format);
+ if (values.checkStatus === '0,1,2') values.checkStatus = '';
+ setSearchObj(values);
}
function clearSearch() {
@@ -114,7 +110,10 @@ export default Form.create()(({ current_user, form, showNotification, match, his
title: '审核状态',
dataIndex: 'checkStatus',
render: (text, record) => {
- return checkStatusArr[text]
+ return text === 0 ?
-
{helper(
"发布时间:",
"startCreatedAt",
@@ -241,21 +258,31 @@ export default Form.create()(({ current_user, form, showNotification, match, his
onCancel={() => { setVisible(false) }}
className="form-edit-modal"
>
- { setPass(e.target.value) }}>
- 允许申诉
- 不允许申诉
-
-
)
diff --git a/src/military/task/taskDetail/index.jsx b/src/military/task/taskDetail/index.jsx
index 1399554c..efb1a403 100644
--- a/src/military/task/taskDetail/index.jsx
+++ b/src/military/task/taskDetail/index.jsx
@@ -41,6 +41,7 @@ export default Form.create()(
const [agreementCheckBox, setAgreementCheckBox] = useState(false);
const [signAgreement, setSignAgreement] = useState(false);
const [isPaper, setIsPaper] = useState(false);
+ const [paperUploadLoading, setPaperUploadLoading] = useState(false);
const [status, setStatus] = useState('');
const [curPage, setCurPage] = useState(1);
@@ -202,7 +203,9 @@ export default Form.create()(
...values,
taskId: id
}
+ setPaperUploadLoading(true);
addPaper(params).then((res) => {
+ setPaperUploadLoading(false);
if (res.message === 'success') {
showNotification('成果提交成功');
setIsPaper(true);
@@ -303,7 +306,7 @@ export default Form.create()(
validateFirst: true
})(