From 4503e1b1764113acb7da696de46bc77c7558ab39 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, 15 Jul 2021 14:33:14 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/military/index.scss | 7 --
src/military/task/agreementManage/index.js | 2 +-
.../task/components/itemListMyTask/index.jsx | 66 ++++++++++++-------
.../task/components/itemListPaper/index.jsx | 2 +-
.../task/components/itemPayProof/index.jsx | 2 +-
src/military/task/myTask/index.scss | 7 ++
src/military/task/myTask/joinTask.jsx | 23 ++++---
src/military/task/paperComplain/index.js | 4 +-
src/military/task/paperManage/index.jsx | 46 +++++++++----
src/military/task/publicityComplain/index.js | 12 ++--
src/military/task/taskAdmin/index.jsx | 9 +--
src/military/task/taskDetail/index.jsx | 6 +-
src/military/task/taskDetail/index.scss | 13 +++-
src/military/task/taskList/index.jsx | 8 ++-
14 files changed, 132 insertions(+), 75 deletions(-)
diff --git a/src/military/index.scss b/src/military/index.scss
index 6361b569..3dae0f66 100644
--- a/src/military/index.scss
+++ b/src/military/index.scss
@@ -227,13 +227,6 @@
}
}
-.ant-modal-body{
- .ant-form-item-control-wrapper{
- max-width: 80%;
- }
-}
-
-
@media screen and (max-width: 1200px){
diff --git a/src/military/task/agreementManage/index.js b/src/military/task/agreementManage/index.js
index 11401c11..d25bb8ec 100644
--- a/src/military/task/agreementManage/index.js
+++ b/src/military/task/agreementManage/index.js
@@ -101,7 +101,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
placeholder="请选择协议"
onChange={(type) => { setType(type) }}
>
-
+
,
type
diff --git a/src/military/task/components/itemListMyTask/index.jsx b/src/military/task/components/itemListMyTask/index.jsx
index d0c2a933..c8f736a6 100644
--- a/src/military/task/components/itemListMyTask/index.jsx
+++ b/src/military/task/components/itemListMyTask/index.jsx
@@ -15,7 +15,7 @@ for (const item of taskStatusAllArr) {
statusArr[item.dicItemCode] = item.dicItemName;
}
export default Form.create()((props) => {
- const { form, list, curPage, total, changePage, taskCategoryValueArr, loading, publish, showNotification, reloadList } = props;
+ const { form, list, curPage, total, changePage, taskCategoryValueArr, loading, publish, showNotification, reloadList, joinTask } = props;
const { getFieldDecorator, validateFields, setFieldsValue, } = form;
const [page, setPage] = useState(1);
@@ -61,17 +61,17 @@ export default Form.create()((props) => {
if (!err) {
signMethod({
taskId,
- method:values.method,
+ method: values.method,
}).then(res => {
if (res && res.message === 'success') {
- showNotification('选择签订方式成功');
+ showNotification('选择协议签订方式成功');
setVisibleMethod(false);
setFieldsValue({
method: ''
});
reloadList();
} else {
- showNotification((res && res.message) || '提交失败');
+ showNotification((res && res.message) || '操作失败');
}
})
}
@@ -140,8 +140,15 @@ export default Form.create()((props) => {
diff --git a/src/military/task/components/itemListPaper/index.jsx b/src/military/task/components/itemListPaper/index.jsx
index 7bb91dff..adc7b8a9 100644
--- a/src/military/task/components/itemListPaper/index.jsx
+++ b/src/military/task/components/itemListPaper/index.jsx
@@ -163,7 +163,7 @@ export default Form.create()((props) => {
{item.status === 2 && detailStatus === 6 && (current_user.login === item.user.login) &&
{ setAgreeVisible(true); setCheckedItem(item) }}>签订协议}
- {item.status === 2 && detailStatus === 7 && (current_user.login === item.user.login) &&
+ {item.status === 2 && detailStatus === 7 && (current_user.login === item.user.login) && item.isPay &&
{ confirmReceiptModal(item.id) }}>确认收款}
diff --git a/src/military/task/components/itemPayProof/index.jsx b/src/military/task/components/itemPayProof/index.jsx
index 1b184922..7c8c03ca 100644
--- a/src/military/task/components/itemPayProof/index.jsx
+++ b/src/military/task/components/itemPayProof/index.jsx
@@ -94,7 +94,7 @@ export default Form.create()((props) => {
任务编号:
{item.task.number}
- {item.task.name}
+ {item.task.name}
diff --git a/src/military/task/myTask/index.scss b/src/military/task/myTask/index.scss
index 8ada1aca..e8f5e560 100644
--- a/src/military/task/myTask/index.scss
+++ b/src/military/task/myTask/index.scss
@@ -52,4 +52,11 @@
font-size: 1rem;
}
}
+ .action-td{
+ // display: flex;
+ // flex-flow: column nowrap;
+ .ant-btn{
+ margin:.25rem;
+ }
+ }
}
diff --git a/src/military/task/myTask/joinTask.jsx b/src/military/task/myTask/joinTask.jsx
index b5af405b..f1cf2c7e 100644
--- a/src/military/task/myTask/joinTask.jsx
+++ b/src/military/task/myTask/joinTask.jsx
@@ -1,5 +1,5 @@
import React, { useCallback, useEffect, useState, useMemo } from 'react';
-import { Tabs, Input, Table, Pagination, Modal } from 'antd';
+import { Tabs, Input, Table, Pagination, Modal, Button } from 'antd';
import { Link } from "react-router-dom";
import ChooseNav from '../../components/chooseNav';
import ItemListMyTask from '../components/itemListMyTask';
@@ -103,7 +103,7 @@ export default ({ taskCategoryValueArr, showNotification }) => {
title: '上传文件',
dataIndex: 'files',
render: (text) => {
- return text || 0
+ return text ? text.split(',').length : 0
}
},
{
@@ -120,18 +120,24 @@ export default ({ taskCategoryValueArr, showNotification }) => {
{
title: '操作',
key: 'action',
+ className: 'action-td',
render: (text, record) => (
-
- 查看详情
+
+ {/* 查看详情 */}
+
+
{((record.needComplain && record.task.status === 3) || (record.task.status === 5 && record.status !== 2)) &&
- { setComplainVisible(true); setCheckedItem(record) }}>申诉}
+
+ }
{record.status === 2 && record.task.status === 6 &&
- { setAgreeVisible(true); setCheckedItem(record) }}>签订协议}
+
+ }
{record.status === 2 && record.task.status === 7 &&
- { confirmReceiptModal(record.id) }}>确认收款}
-
+
+ }
+
),
},
];
@@ -215,6 +221,7 @@ export default ({ taskCategoryValueArr, showNotification }) => {
taskCategoryValueArr={taskCategoryValueArr}
changePage={(page) => { setCurPage(page) }}
loading={loading}
+ joinTask={true}
/>
diff --git a/src/military/task/paperComplain/index.js b/src/military/task/paperComplain/index.js
index 0703bc6a..98f318a3 100644
--- a/src/military/task/paperComplain/index.js
+++ b/src/military/task/paperComplain/index.js
@@ -194,7 +194,7 @@ export default Form.create()(({ current_user, form, showNotification, match, })
-
+ {/*
{helper(
"numberInput",
[{ max: 20, message: '长度不能超过20个字符' }],
@@ -206,7 +206,7 @@ export default Form.create()(({ current_user, form, showNotification, match, })
-
+
*/}
diff --git a/src/military/task/paperManage/index.jsx b/src/military/task/paperManage/index.jsx
index e930ba7a..3ffc5814 100644
--- a/src/military/task/paperManage/index.jsx
+++ b/src/military/task/paperManage/index.jsx
@@ -21,7 +21,8 @@ export default Form.create()(({ current_user, form, showNotification, match, his
const [loading, setLoading] = useState(false);
const [searchObj, setSearchObj] = useState({
- checkStatus: '0'
+ checkStatus: '0',
+ parentId: 0,
});
const [curPage, setCurPage] = useState(1);
const [total, setTotal] = useState(0);
@@ -34,10 +35,9 @@ export default Form.create()(({ current_user, form, showNotification, match, his
useEffect(() => {
const params = {
- ...searchObj,
- // orderBy: 'createdAtDesc',
curPage,
pageSize: 10,
+ ...searchObj,
};
setLoading(true);
readyCheckPapers(params).then(data => {
@@ -59,7 +59,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
function onSearch() {
- let values = getFieldsValue(['checkStatus', 'endCreatedAt', 'startCreatedAt']);
+ let values = getFieldsValue(['checkStatus', 'endCreatedAt', 'startCreatedAt', 'parentId']);
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 = '';
@@ -80,8 +80,8 @@ export default Form.create()(({ current_user, form, showNotification, match, his
{
title: '序号',
dataIndex: 'index',
- render:(text,record,index)=>{
- return {index+1}
+ render: (text, record, index) => {
+ return {index + 1}
}
},
{
@@ -165,14 +165,13 @@ export default Form.create()(({ current_user, form, showNotification, match, his
setReload(reload + 1);
setVisible(false);
setFieldsValue({
- pass:'',
- message:'',
+ pass: '',
+ message: '',
})
}
});
}
});
-
}
function changeStatus(e) {
@@ -183,6 +182,14 @@ export default Form.create()(({ current_user, form, showNotification, match, his
setCurPage(1);
}
+ function changeType(e) {
+ setSearchObj({
+ ...searchObj,
+ parentId: e,
+ });
+ setCurPage(1);
+ }
+
return (
@@ -197,7 +204,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
placeholder="请选择审核状态"
onChange={changeStatus}
>
-
+
{
paperCheckStatusArr.map(item => {
return
@@ -206,6 +213,21 @@ export default Form.create()(({ current_user, form, showNotification, match, his
,
'0'
)}
+
+ {helper(
+ "",
+ "parentId",
+ [],
+ ,
+ 0
+ )}
@@ -268,7 +290,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
{helper(
"",
"pass",
- [{required:visible,message:'请选择是否允许申诉'}],
+ [{ required: visible, message: '请选择是否允许申诉' }],
@@ -281,7 +303,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
{helper(
"",
"message",
- [{required:visible,message:'请输入拒绝的原因'}],
+ [{ required: visible, message: '请输入拒绝的原因' }],