diff --git a/src/military/fetch.js b/src/military/fetch.js index 99ee3d71..92fc25a2 100644 --- a/src/military/fetch.js +++ b/src/military/fetch.js @@ -5,7 +5,8 @@ import cookie from 'react-cookies'; let actionUrl = ''; if (window.location.href.indexOf(':3007') > -1) { - actionUrl = 'http://117.50.100.12:8008'; + actionUrl="https://taskapi.osredm.com"; //测试环境 + // actionUrl = 'http://117.50.100.12:8008'; // actionUrl='http://192.168.31.74:8081'; //万佳后台 } else if (window.location.href.indexOf('117.50.100.12') > -1 ) { actionUrl = "http://117.50.100.12:8008"; //测试环境 diff --git a/src/military/task.js b/src/military/task.js index b6b4053d..7aa3f4ea 100644 --- a/src/military/task.js +++ b/src/military/task.js @@ -31,50 +31,13 @@ const MyTask = Loadable({ loading: Loading, }); -const TaskManage = Loadable({ - loader: () => import("./task/taskManage"), + +const TaskAdminRouter = Loadable({ + loader: () => import("./task/taskAdminRouter"), loading: Loading, }); -const PaperManage = Loadable({ - loader: () => import("./task/paperManage"), - loading: Loading, -}); -const PaperComplain = Loadable({ - loader: () => import("./task/paperComplain"), - loading: Loading, -}); - -const ProofManage = Loadable({ - loader: () => import("./task/proofManage"), - loading: Loading, -}); - -const PublicityComplain = Loadable({ - loader: () => import("./task/publicityComplain"), - loading: Loading, -}); - -const AgreementManage = Loadable({ - loader: () => import("./task/agreementManage"), - loading: Loading, -}); - -const PayProof = Loadable({ - loader: () => import("./task/payProof"), - loading: Loading, -}); - -const TaskAdmin = Loadable({ - loader: () => import("./task/taskAdmin"), - loading: Loading, -}); - -const DelayManage = Loadable({ - loader: () => import("./task/delayManage"), - loading: Loading, -}); const Index = (propsTransmit) => { // 开发时,从代理的位置获取用户信息 @@ -126,77 +89,11 @@ const Index = (propsTransmit) => { )} > - {/* 任务管理审核 */} + {/* 管理员管理 */} ( - - - - )} - > - - {/* 成果管理审核 */} - ( - - )} - > - - {/* 成果申诉管理审核 */} - ( - - )} - > - - {/* 公示期成果申诉管理审核 */} - ( - - )} - > - - {/* 佐证管理审核 */} - ( - - )} - > - - {/* 协议审核 */} - ( - - )} - > - - {/* 管理员上传支付凭证 */} - ( - - )} - > - - {/* 管理员任务列表 */} - ( - - )} - > - - {/* 延期管理 */} - ( - + )} > @@ -208,7 +105,6 @@ const Index = (propsTransmit) => { )} > - ); diff --git a/src/military/task/agreementManage/index.js b/src/military/task/agreementManage/index.js index c7e5355d..9f84adb4 100644 --- a/src/military/task/agreementManage/index.js +++ b/src/military/task/agreementManage/index.js @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useState } from 'react'; import { Input, Button, Form, Select } from 'antd'; -import AdminRouter from '../components/adminRouter'; + import ItemAgreementManage from '../components/itemAgreementManage'; import StatusNav from '../../components/statusNav'; import { agreementArr } from '../static'; @@ -125,7 +125,7 @@ export default Form.create()(({ form, showNotification, match, history }) => { return (
- +
{helper( diff --git a/src/military/task/components/adminRouter/index.jsx b/src/military/task/components/adminRouter/index.jsx index 6d3d1568..322def91 100644 --- a/src/military/task/components/adminRouter/index.jsx +++ b/src/military/task/components/adminRouter/index.jsx @@ -94,7 +94,7 @@ export default props => { return ( -
+
项目 diff --git a/src/military/task/components/agreementModal/index.jsx b/src/military/task/components/agreementModal/index.jsx index 57e55051..21d17c6c 100644 --- a/src/military/task/components/agreementModal/index.jsx +++ b/src/military/task/components/agreementModal/index.jsx @@ -6,7 +6,7 @@ import '../../index.scss'; export default Form.create()(props => { - const { visible, setVisible, checkedItem, form, showNotification } = props; + const { visible, setVisible, checkedItem, form, showNotification ,reloadList } = props; const { getFieldDecorator, validateFields, setFieldsValue, } = form; const [fileList, setFileList] = useState([]); @@ -35,6 +35,7 @@ export default Form.create()(props => { }); setVisible(false); showNotification("上传协议成功!"); + reloadList(); } else { showNotification(res.message || "上传协议失败") } diff --git a/src/military/task/components/itemListMyTask/index.jsx b/src/military/task/components/itemListMyTask/index.jsx index 8f594f7c..8df5503f 100644 --- a/src/military/task/components/itemListMyTask/index.jsx +++ b/src/military/task/components/itemListMyTask/index.jsx @@ -221,7 +221,7 @@ export default Form.create()((props) => { } { - item.status === 4 && item.papersCount > 0 && (!item.isProofBoolean) && + item.status === 4 && item.papersCount > 0 && (!item.isProofBoolean) && (!item.isProofBoolean)&& { uploadProofs(item) }} className="line_1 color-blue">上传佐证材料 } diff --git a/src/military/task/components/itemListPaper/index.jsx b/src/military/task/components/itemListPaper/index.jsx index ac748027..2b8a8e70 100644 --- a/src/military/task/components/itemListPaper/index.jsx +++ b/src/military/task/components/itemListPaper/index.jsx @@ -144,7 +144,6 @@ export default Form.create()((props) => { { list.map(item => { - return (
@@ -152,7 +151,7 @@ export default Form.create()((props) => {
  • - { item.user.nickname === "******" ? "" : goUser(item.user.login) }}> + { item.user.nickname === "******" ? "" : goUser(item.user.login) }}> {item.user.nickname || item.user.login} {timeAgo(item.createdAt)} @@ -162,7 +161,7 @@ export default Form.create()((props) => { {((item.needComplain && detailStatus === 3) || (detailStatus === 5 && item.publicTaskComplain && item.checkStatus === 1 && item.status !== 2)) && (current_user.login === item.user.login) && { setComplainVisible(true); setCheckedItem(item) }}>申诉} - {item.status === 2 && detailStatus === 6 && (current_user.login === item.user.login) && (!item.sign) && (item.canApplicantSign||item.canApplicantSignByPlatform) && + {item.status === 2 && detailStatus === 6 && (current_user.login === item.user.login) && (!item.sign) && (item.canApplicantSign || item.canApplicantSignByPlatform) && { setAgreeVisible(true); setCheckedItem(item) }}>签订协议} {item.status === 2 && detailStatus === 7 && (current_user.login === item.user.login) && (item.task && item.task.agreementSigning === 1) && (!item.isPay) && @@ -186,7 +185,7 @@ export default Form.create()((props) => { {item.comments && item.comments.length > 0 &&
    {item.comments.map(commentsItem => { - return
    + return
    {commentsItem.user.nickname || commentsItem.user.login} {timeAgo(commentsItem.createdAt)} @@ -196,7 +195,6 @@ export default Form.create()((props) => {
    }) } - {/* */}
    } @@ -206,7 +204,7 @@ export default Form.create()((props) => { 稿件状态:{item.read ? '雇主已浏览' : '雇主未浏览'} { item.user.nickname !== "******" && - { setReportVisible(true); setCheckedItem(item) }}>举报 + {[4, 5].includes(detailStatus) && { setReportVisible(true); setCheckedItem(item) }}>举报} { commentEdit(item.id) }}>{item.comments ? item.comments.length : 0} { thumbUp(item.id) }}>{item.thumbsUp} @@ -227,6 +225,7 @@ export default Form.create()((props) => { }
    +
    ) diff --git a/src/military/task/components/itemPayProof/index.jsx b/src/military/task/components/itemPayProof/index.jsx index f2e560e9..1fe04c4e 100644 --- a/src/military/task/components/itemPayProof/index.jsx +++ b/src/military/task/components/itemPayProof/index.jsx @@ -77,34 +77,29 @@ export default Form.create()((props) => { {timeAgo(item.createdAt)} 发布方式: {item.task && item.task.publishMode === 1 ? '统筹任务' : '自主提交'} - - {/* {item.status === 2 && 已同意} */} - {/* {item.status === 0 && 已驳回} */} - - { - item.status === 1 && - { item.user && goUserMes(item.user.login) }}>私信 - - } - + { item.user && goUserMes(item.user.login) }}>私信
  • -
    +
    任务编号: - {item.task.number} {item.task.name} + 任务编号: + {item.task.number} + +
    +
    + 联系手机: {item.user.phone}
    -
    {!item.isPay && (item.status !== 8) &&
    diff --git a/src/military/task/components/itemTaskManage/index.jsx b/src/military/task/components/itemTaskManage/index.jsx index e4526d6d..f8e05bac 100644 --- a/src/military/task/components/itemTaskManage/index.jsx +++ b/src/military/task/components/itemTaskManage/index.jsx @@ -102,7 +102,25 @@ export default (props) => {
      -
      +
      + + 任务名称: + + {item.name} + + + + 任务编号: + {item.number} + + + {item.status === 1 &&
      + +
      } +
      +
      + +
      主体名称: @@ -110,24 +128,19 @@ export default (props) => { 信用代码: - 123456789123456789 + - - {item.status === 1 &&
      - -
      }
      -
      联系手机: - {item.contactPhone}(位置分析:{item.belongTo||'河北-唐山'}) + {item.contactPhone}{item.belongTo && `(位置分析:${item.belongTo})`} IP地址: - {item.ip}(位置分析:{item.belongTo||'河北-唐山'}) + {item.ip}{item.belongTo && `(位置分析:${item.belongTo})`}
      @@ -145,19 +158,7 @@ export default (props) => { 普通员工
      -
      -
      - - 任务编号: - {item.number} - - - 任务名称: - - {item.name} - - -
      +
    diff --git a/src/military/task/components/proofModal/index.jsx b/src/military/task/components/proofModal/index.jsx index 4ff7d30c..7246684b 100644 --- a/src/military/task/components/proofModal/index.jsx +++ b/src/military/task/components/proofModal/index.jsx @@ -154,6 +154,8 @@ export default Form.create()(props => { if (res && res.message === 'success') { changeVisible(false); reloadList(); + } else { + showNotification((res && res.message) || "评选提交失败"); } }); } diff --git a/src/military/task/delayManage/index.js b/src/military/task/delayManage/index.js index 6928bb16..7a189d4a 100644 --- a/src/military/task/delayManage/index.js +++ b/src/military/task/delayManage/index.js @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useState } from 'react'; import { Input, Button } from 'antd'; -import AdminRouter from '../components/adminRouter'; + import ItemDelayManage from '../components/itemDelayManage'; import StatusNav from '../../components/statusNav'; import { delayTaskArr, delayDealArr } from '../static'; @@ -69,7 +69,7 @@ export default ({ current_user, showNotification, history }) => { return (
    - +
    diff --git a/src/military/task/myTask/joinTask.jsx b/src/military/task/myTask/joinTask.jsx index ecfe4070..201834b2 100644 --- a/src/military/task/myTask/joinTask.jsx +++ b/src/military/task/myTask/joinTask.jsx @@ -130,7 +130,7 @@ export default ({ taskCategoryValueArr, showNotification }) => { } - {record.status === 2 && record.task.status === 6 && (record.task.agreementSigning === 1) && + {record.status === 2 && record.task.status === 6 && (record.task.agreementSigning === 1 || record.task.canApplicantSignByPlatform) && < Button type="primary" size="small" onClick={() => { setAgreeVisible(true); setCheckedItem(record) }}>签订协议 } @@ -153,6 +153,7 @@ export default ({ taskCategoryValueArr, showNotification }) => { confirmReceipt(paperId).then(res => { if (res && res.message === "success") { showNotification("您已确认收款!"); + reloadList(); } }) } @@ -264,6 +265,7 @@ export default ({ taskCategoryValueArr, showNotification }) => { checkedItem={checkedItem} detailStatus={checkedItem.task && checkedItem.task.status} showNotification={showNotification} + reloadList={reloadList} /> {agreeVisible && { return (
    - +
    diff --git a/src/military/task/paperManage/index.jsx b/src/military/task/paperManage/index.jsx index d17478a5..6c26eda4 100644 --- a/src/military/task/paperManage/index.jsx +++ b/src/military/task/paperManage/index.jsx @@ -1,7 +1,6 @@ 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 AdminRouter from '../components/adminRouter'; import { paperCheckStatusArr } from '../static'; import { readyCheckPapers, checkPaper, } from '../api'; import '../index.scss'; @@ -205,7 +204,6 @@ export default Form.create()(({ current_user, form, showNotification, match, his return (
    -
    {helper( diff --git a/src/military/task/payProof/index.js b/src/military/task/payProof/index.js index 82af0c3f..91f9ac56 100644 --- a/src/military/task/payProof/index.js +++ b/src/military/task/payProof/index.js @@ -1,7 +1,7 @@ import React, { useCallback, forwardRef, useEffect, useState } from 'react'; import { Input, Button, Form } from 'antd'; import ItemPayProof from '../components/itemPayProof'; -import AdminRouter from '../components/adminRouter'; + // import StatusNav from '../../components/statusNav'; import { agreementArr } from '../static'; import { uploadPayProofList } from '../api'; @@ -76,7 +76,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his return (
    - +
    diff --git a/src/military/task/proofManage/index.js b/src/military/task/proofManage/index.js index ffa05f00..c0a56899 100644 --- a/src/military/task/proofManage/index.js +++ b/src/military/task/proofManage/index.js @@ -1,6 +1,6 @@ import React, { useCallback, forwardRef, useEffect, useState } from 'react'; import { Input, Button, Form } from 'antd'; -import AdminRouter from '../components/adminRouter'; + import ItemProofManage from '../components/itemProofManage'; import StatusNav from '../../components/statusNav'; import { proofArr } from '../static'; @@ -85,7 +85,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his return (
    - +
    diff --git a/src/military/task/publicityComplain/index.js b/src/military/task/publicityComplain/index.js index 58e11b23..552466a0 100644 --- a/src/military/task/publicityComplain/index.js +++ b/src/military/task/publicityComplain/index.js @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useState } from 'react'; import { Input, Button, Form } from 'antd'; -import AdminRouter from '../components/adminRouter'; + import ItemPublicityComplain from '../components/itemPublicityComplain'; import StatusNav from '../../components/statusNav'; import { publicityArr } from '../static'; @@ -83,7 +83,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his return (
    - +
    diff --git a/src/military/task/taskAdmin/index.jsx b/src/military/task/taskAdmin/index.jsx index 7ff19cf4..df8ebeb2 100644 --- a/src/military/task/taskAdmin/index.jsx +++ b/src/military/task/taskAdmin/index.jsx @@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState, useMemo } from 'react'; import classNames from 'classnames'; import { Input, Select, Button, Form, DatePicker, Table, Pagination, } from 'antd'; import { Link } from "react-router-dom"; -import AdminRouter from '../components/adminRouter'; + import { paperCheckStatusArr, publishModeArr, taskStatusAllArr, showUserModeArr ,main_web_site_url} from '../static'; import { getTaskAdminList, changeShowUserMode } from '../api'; import '../index.scss'; @@ -238,7 +238,7 @@ export default Form.create()(({ form, showNotification, match, history }) => { return (
    - +
    {helper( "任务名称", diff --git a/src/military/task/taskAdminRouter.js b/src/military/task/taskAdminRouter.js new file mode 100644 index 00000000..5bd7498a --- /dev/null +++ b/src/military/task/taskAdminRouter.js @@ -0,0 +1,136 @@ +import React from "react"; + +import { Route, Switch } from "react-router-dom"; +import Loadable from "react-loadable"; +import Loading from "../../Loading"; +import AdminRouter from "./components/adminRouter"; + + +const TaskManage = Loadable({ + loader: () => import("./taskManage"), + loading: Loading, +}); + +const PaperManage = Loadable({ + loader: () => import("./paperManage"), + loading: Loading, +}); + +const PaperComplain = Loadable({ + loader: () => import("./paperComplain"), + loading: Loading, +}); + +const ProofManage = Loadable({ + loader: () => import("./proofManage"), + loading: Loading, +}); + +const PublicityComplain = Loadable({ + loader: () => import("./publicityComplain"), + loading: Loading, +}); + +const AgreementManage = Loadable({ + loader: () => import("./agreementManage"), + loading: Loading, +}); + +const PayProof = Loadable({ + loader: () => import("./payProof"), + loading: Loading, +}); + +const TaskAdmin = Loadable({ + loader: () => import("./taskAdmin"), + loading: Loading, +}); + +const DelayManage = Loadable({ + loader: () => import("./delayManage"), + loading: Loading, +}); + +const AdminPage = (propsF) => { + + return ( + + + + {/* 任务管理审核 */} + ( + + )} + > + + {/* 成果管理审核 */} + ( + + )} + > + + {/* 成果申诉管理审核 */} + ( + + )} + > + + {/* 公示期成果申诉管理审核 */} + ( + + )} + > + + {/* 佐证管理审核 */} + ( + + )} + > + + {/* 管理员协议审核 */} + ( + + )} + > + + {/* 管理员上传支付凭证 */} + ( + + )} + > + + {/* 管理员任务列表 */} + ( + + )} + > + + {/* 延期管理 */} + ( + + )} + > + + + ); +} +// } +export default AdminPage; diff --git a/src/military/task/taskDetail/index.jsx b/src/military/task/taskDetail/index.jsx index 8f25ce04..30b77521 100644 --- a/src/military/task/taskDetail/index.jsx +++ b/src/military/task/taskDetail/index.jsx @@ -169,13 +169,12 @@ export default Form.create()( surplusTimetext = formatDuring(surplus); } return ( - // && (![4, 5, 6, 7].includes(status) || ([4, 5, 6, 7].includes(status) && (!detailData.exceptClosedBoolean))) -
  • = status) || (status === 8 && detailData.exceptClosedBoolean) })} > +
  • = status), 'except-close': (status === 8 && detailData.exceptClosedBoolean) })} > {title} - {detailData.status !== status && days &&

    {days}天

    } + {detailData.status !== status && days ?

    {days}天

    : ''} {/* 因为有时只延期几秒或者几分钟时后端没有返回延期,所以这里加一个判断 */} - {detailData.status === status && days &&

    {surplus < 0 ? ('延期' + surplusTimetext) : ('剩余' + surplusTimetext)}

    } + {detailData.status === status && days ?

    {surplus < 0 ? ('延期' + surplusTimetext) : ('剩余' + surplusTimetext)}

    : ''}
  • ) }, [detailData]); @@ -397,7 +396,9 @@ export default Form.create()( {process('支付', 7, detailData.payingDays)} - {process('任务完成', 8)} + { + detailData.exceptClosedBoolean ? process('任务关闭', 8) : process('任务完成', 8) + }
@@ -435,7 +436,7 @@ export default Form.create()( 请先完善主体信息
} - {current_user.enterpriseCertification && detailData.status === 3 && signContent()} + {current_user.enterpriseCertification && detailData.status === 3 && (!detailData.exceptClosedBoolean) && signContent()}
交稿({dataList.length}) diff --git a/src/military/task/taskDetail/index.scss b/src/military/task/taskDetail/index.scss index 9dd1981c..c5ea1749 100644 --- a/src/military/task/taskDetail/index.scss +++ b/src/military/task/taskDetail/index.scss @@ -156,4 +156,9 @@ padding: 0px 20px; height: 50vh; overflow-y: scroll; +} + +li.except-close{ + background: #fa6400; + color: #fff; } \ No newline at end of file diff --git a/src/military/task/taskManage/index.js b/src/military/task/taskManage/index.js index 629b7d44..3213b03b 100644 --- a/src/military/task/taskManage/index.js +++ b/src/military/task/taskManage/index.js @@ -1,6 +1,5 @@ import React, { useCallback, forwardRef, useEffect, useState } from 'react'; import { Input, Button, Form } from 'antd'; -import AdminRouter from "../components/adminRouter"; import ItemTaskManage from '../components/itemTaskManage'; import StatusNav from '../../components/statusNav'; import { approveArr, main_web_site_url } from '../static'; @@ -99,7 +98,6 @@ export default Form.create()(({ current_user, form, showNotification, match, his return (
-