init
This commit is contained in:
parent
6a84a0ca64
commit
23a352be27
File diff suppressed because it is too large
Load Diff
|
|
@ -2357,7 +2357,7 @@ input::-ms-clear {
|
|||
|
||||
.newContainer {
|
||||
min-height: 100%;
|
||||
height: auto !important;
|
||||
/* height: auto !important; */
|
||||
height: 100%;
|
||||
/*IE6不识别min-height*/
|
||||
position: relative;
|
||||
|
|
|
|||
20
src/App.js
20
src/App.js
|
|
@ -160,8 +160,13 @@ const Managements = Loadable({
|
|||
// loading: Loading,
|
||||
// })
|
||||
|
||||
const Iframe = Loadable({
|
||||
loader: () => import('./military/iframe'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
|
||||
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder","task","notice","achievement","managements","expert","competition","administration", "needs"];
|
||||
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder","task","notice","achievement","managements","expert","competition","administration", "needs", "iframe"];
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -409,6 +414,19 @@ class App extends Component {
|
|||
<Route path="/competition/myFocus" component={MyFocusCompetitions} />
|
||||
{/*启智2022*/}
|
||||
<Route path="/competition/:competitionId" component={Competition} />
|
||||
|
||||
{/* iframe页面 */}
|
||||
<Route path="/iframe"
|
||||
render={
|
||||
(props) => (<Iframe {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
<Route path="/managements/iframe"
|
||||
render={
|
||||
(props) => (<Iframe {...this.props} {...props} {...this.state} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
<Route exact path="/explore/all"
|
||||
render={
|
||||
|
|
|
|||
|
|
@ -49,6 +49,22 @@ const AgreementManage = Loadable({
|
|||
loading: Loading,
|
||||
});
|
||||
|
||||
const AgreementManageNew = Loadable({
|
||||
loader: () => import("../military/task/agreementManageNew"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
const AgreementSign = Loadable({
|
||||
loader: () => import("../military/task/agreementSign"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
const AgreementList = Loadable({
|
||||
loader: () => import("../military/task/agreementList"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
|
||||
const PayProof = Loadable({
|
||||
loader: () => import("../military/task/payProof"),
|
||||
loading: Loading,
|
||||
|
|
@ -222,6 +238,31 @@ const Managements = (propsF) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
|
||||
{/* 管理员协议审核(在线协议签订) */}
|
||||
<Route
|
||||
path="/managements/task/agreementManageNew"
|
||||
render={(props) => (
|
||||
<AgreementManageNew {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
|
||||
{/* 签订表签字 */}
|
||||
<Route
|
||||
path="/managements/task/agreementSign"
|
||||
render={(props) => (
|
||||
<AgreementSign {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
|
||||
{/* 签订表列表 */}
|
||||
<Route
|
||||
path="/managements/task/agreementList"
|
||||
render={(props) => (
|
||||
<AgreementList {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
|
||||
{/* 管理员上传支付凭证 */}
|
||||
<Route
|
||||
path="/managements/task/payProof"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Upload, Button } from 'antd';
|
|||
import { appendFileSizeToUploadFileAll } from 'educoder';
|
||||
import { httpUrl } from '../task/fetch';
|
||||
|
||||
function Uploads({ className, size, actionUrl, fileList, showNotification, load,btnText }) {
|
||||
function Uploads({ className, size, actionUrl, fileList, showNotification, load,btnText, uploadUrl = null }) {
|
||||
const [files, setFiles] = useState(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -48,7 +48,6 @@ function Uploads({ className, size, actionUrl, fileList, showNotification, load,
|
|||
|
||||
|
||||
function handleChange(info) {
|
||||
console.log(info);
|
||||
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
|
||||
let fileList = info.fileList;
|
||||
setFiles(appendFileSizeToUploadFileAll(fileList));
|
||||
|
|
@ -75,13 +74,15 @@ function Uploads({ className, size, actionUrl, fileList, showNotification, load,
|
|||
return isLt100M;
|
||||
}
|
||||
|
||||
|
||||
const upload = {
|
||||
name: 'file',
|
||||
fileList: files,
|
||||
action: (httpUrl || actionUrl) + `/busiAttachments/upload`,
|
||||
action: (httpUrl || actionUrl) + (uploadUrl ? uploadUrl : `/busiAttachments/upload`),
|
||||
onChange: handleChange,
|
||||
onRemove: onAttachmentRemove,
|
||||
beforeUpload: beforeUpload,
|
||||
withCredentials: true
|
||||
};
|
||||
return (
|
||||
<Upload {...upload} className={className}>
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ export default props => {
|
|||
<Menu.Item title="approver" key={"paperComplain"}><Link to="/managements/task/paperComplain">成果上传申诉审批</Link></Menu.Item>
|
||||
<Menu.Item title="approver" key={"publicityComplain"}><Link to="/managements/task/publicityComplain">公示期成果申诉审批</Link></Menu.Item>
|
||||
<Menu.Item title="approver" key={"agreementManage"}><Link to="/managements/task/agreementManage">协议审批</Link></Menu.Item>
|
||||
<Menu.Item title="approver" key={"agreementManageNew"}><Link to="/managements/task/agreementManageNew">协议审批(新)</Link></Menu.Item>
|
||||
<Menu.Item ><a rel="noopener noreferrer" href={`${main_web_site_url}/admin/tasks/report_result_tasks`}>成果举报申诉</a></Menu.Item>
|
||||
<Menu.Item title="approver" key={"proofManage"}><Link to="/managements/task/proofManage">评选佐证材料</Link></Menu.Item>
|
||||
</Menu>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { withRouter } from "react-router";
|
||||
import { SnackbarHOC } from "educoder";
|
||||
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
|
||||
|
||||
|
||||
const Iframe = (props) => {
|
||||
|
||||
console.log(props)
|
||||
|
||||
function iframeLoad() {
|
||||
console.log(1111)
|
||||
let myIframe = document.getElementById("iframe");
|
||||
myIframe.height = `${document.documentElement.clientHeight - 300}px`
|
||||
}
|
||||
|
||||
return <iframe
|
||||
id="iframe"
|
||||
width="100%"
|
||||
src="https://cn.bing.com/?FORM=Z9FD1"
|
||||
onLoad={iframeLoad}
|
||||
></iframe>
|
||||
}
|
||||
|
||||
export default withRouter(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Iframe))));
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
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 { Confirm } from '../../components/ModalFun';
|
||||
import { paperCheckStatusArr,taskStatusAllArr } from '../static';
|
||||
import { readyCheckPapers, checkPaper, } from '../api';
|
||||
import '../index.scss';
|
||||
import './index.scss';
|
||||
const format = "YYYY-MM-DD HH:mm:ss";
|
||||
const Option = Select.Option;
|
||||
const TextArea = Input.TextArea;
|
||||
|
||||
const statusArr = [];
|
||||
for (const item of taskStatusAllArr) {
|
||||
statusArr[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 }) => {
|
||||
|
||||
|
||||
const { getFieldDecorator, setFieldsValue, getFieldsValue } = form;
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [searchObj, setSearchObj] = useState({
|
||||
checkStatus: '2',
|
||||
parentId: 0,
|
||||
});
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
|
||||
const [reload, setReload] = useState(0);
|
||||
const [currentImg, setCurrentImg] = useState(undefined);
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
curPage,
|
||||
pageSize: 10,
|
||||
...searchObj,
|
||||
};
|
||||
setLoading(true);
|
||||
readyCheckPapers(params).then(data => {
|
||||
if (data) {
|
||||
if((data.rows && data.rows.length<=0) && curPage>1){
|
||||
setCurPage(curPage-1);
|
||||
}
|
||||
setTaskList(data.rows);
|
||||
setTotal(data.total);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
}, [reload, curPage, searchObj]);
|
||||
|
||||
|
||||
const helper = useCallback(
|
||||
(label, name, rules, widget, initialValue) => (
|
||||
<Form.Item label={label}>
|
||||
{getFieldDecorator(name, { rules, initialValue, validateFirst: true, })(widget)}
|
||||
</Form.Item>
|
||||
), []);
|
||||
|
||||
|
||||
function onSearch() {
|
||||
let values = getFieldsValue(['checkStatus', 'endCreatedAt', 'startCreatedAt', 'parentId','number']);
|
||||
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() {
|
||||
setFieldsValue({
|
||||
startCreatedAt: '',
|
||||
endCreatedAt: '',
|
||||
checkStatus: '0,1,2',
|
||||
number:''
|
||||
});
|
||||
setSearchObj({});
|
||||
}
|
||||
|
||||
function previewImage() {
|
||||
setCurrentImg('https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png')
|
||||
setVisible(true)
|
||||
}
|
||||
|
||||
const columns = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
render: (text, record, index) => {
|
||||
return <div style={{ textAlign: 'center' }}>{index + 1}</div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '任务编号',
|
||||
dataIndex: 'number',
|
||||
},
|
||||
{
|
||||
title: '任务名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '发布时间',
|
||||
dataIndex: 'createdAt',
|
||||
},
|
||||
{
|
||||
title: '胜出者姓名',
|
||||
dataIndex: 'user',
|
||||
render: (text, record) => {
|
||||
return record.user.nickname || record.user.login
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '协议',
|
||||
dataIndex: 'content',
|
||||
render: (text, record) => {
|
||||
return <img
|
||||
style={{ width: '100px' , cursor: 'pointer' }}
|
||||
onClick={ previewImage }
|
||||
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
|
||||
/>
|
||||
}
|
||||
},
|
||||
]
|
||||
}, []);
|
||||
|
||||
function changeType(e) {
|
||||
setSearchObj({
|
||||
...searchObj,
|
||||
parentId: e,
|
||||
});
|
||||
setCurPage(1);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="task-manage paper-manage">
|
||||
<div className="center-screen clearfix" >
|
||||
<div className="center-left-but">
|
||||
|
||||
{helper(
|
||||
"任务编号",
|
||||
"number",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="请输入任务编号"
|
||||
/>
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"任务名称",
|
||||
"number",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="请输入任务名称"
|
||||
/>
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"胜出者姓名",
|
||||
"number",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="请输入胜出者姓名"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="center-right-but">
|
||||
{helper(
|
||||
"发布时间:",
|
||||
"startCreatedAt",
|
||||
[],
|
||||
<DatePicker
|
||||
showTime
|
||||
format={format}
|
||||
placeholder="请选择开始时间"
|
||||
/>
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"",
|
||||
"endCreatedAt",
|
||||
[],
|
||||
<DatePicker
|
||||
showTime
|
||||
format={format}
|
||||
placeholder="请选择结束时间"
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
<Button className="mr10" type="primary" onClick={onSearch}>搜索</Button>
|
||||
<Button className="mr10" type="" onClick={clearSearch}>清除</Button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="center-content">
|
||||
|
||||
<Table
|
||||
loading={loading}
|
||||
rowKey={(row) => row.id}
|
||||
dataSource={taskList}
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
className="mt10"
|
||||
/>
|
||||
{total > 10 &&
|
||||
<Pagination
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
current={curPage}
|
||||
total={total}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
<Modal
|
||||
visible={visible}
|
||||
footer={null}
|
||||
className="form-edit-modal"
|
||||
width={'1000px'}
|
||||
onCancel={() => { setVisible(false)}}
|
||||
>
|
||||
<img style={{ width: '95%', margin: 'auto' }} src={ currentImg } alt="" />
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
.paper-manage{
|
||||
.center-screen{
|
||||
display: block;
|
||||
|
||||
.center-left-but,.center-right-but{
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
.center-left-but{
|
||||
width: 100%;
|
||||
.ant-form-item{
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
.center-right-but{
|
||||
width: 100%;
|
||||
}
|
||||
.line_1{
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.ant-modal-body {
|
||||
display: flex;
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
import React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||
import { Input, Button, Form, Select } from 'antd';
|
||||
|
||||
import ItemAgreementManage from '../components/itemAgreementManage';
|
||||
import StatusNav from '../../components/statusNav';
|
||||
import { agreementArr } from '../static';
|
||||
import { agreementListNew } from '../api';
|
||||
import '../index.scss';
|
||||
const Option = Select.Option;
|
||||
|
||||
const agreementOptionArr = agreementArr.slice(0, 2);
|
||||
export default Form.create()(({ form, showNotification, match, history }) => {
|
||||
|
||||
|
||||
const { getFieldDecorator, validateFields, setFieldsValue, } = form;
|
||||
|
||||
const [approve, setApprove] = useState(1);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [searchObj, setSearchObj] = useState({});
|
||||
const [status, setStatus] = useState('2');
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
|
||||
const [reload, setReload] = useState(0);
|
||||
const iframe = useRef()
|
||||
|
||||
|
||||
// 加载审核协议列表
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
...searchObj,
|
||||
status,
|
||||
currentPage: curPage,
|
||||
pageSize: 10,
|
||||
};
|
||||
setLoading(true);
|
||||
agreementListNew(params).then(data => {
|
||||
data = data.data
|
||||
if (data) {
|
||||
if((data.rows && data.rows.length<=0) && curPage>1){
|
||||
setCurPage(curPage-1);
|
||||
}
|
||||
setTaskList(data.rows);
|
||||
setTotal(data.total);
|
||||
}
|
||||
setLoading(false);
|
||||
});
|
||||
}, [reload, status, curPage, searchObj]);
|
||||
|
||||
useEffect(() => {
|
||||
if (iframe.current) {
|
||||
if (!iframe.current.onload) {
|
||||
iframe.current.onload = (e) => {
|
||||
console.log(iframe.current)
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [iframe])
|
||||
|
||||
// form表单公共处理函数
|
||||
const helper = useCallback(
|
||||
(name, rules, widget, initialValue) => (
|
||||
<Form.Item>
|
||||
{getFieldDecorator(name, { rules, initialValue, validateFirst: true, })(widget)}
|
||||
</Form.Item>
|
||||
), []);
|
||||
|
||||
|
||||
function onSearch() {
|
||||
validateFields((err, values) => {
|
||||
if (!err) {
|
||||
setSearchObj(values);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 修改选项
|
||||
const changeOptionId = useCallback((option) => {
|
||||
setStatus(option.dicItemCode.toString() || '0,1');
|
||||
setCurPage(1);
|
||||
}, []);
|
||||
|
||||
// 修改状态
|
||||
function changeApprove(approve) {
|
||||
setApprove(approve);
|
||||
setCurPage(1);
|
||||
if (approve === 1) {
|
||||
setStatus('2');
|
||||
} else {
|
||||
setStatus('0,1');
|
||||
}
|
||||
}
|
||||
|
||||
// 清除查询内容
|
||||
function clearSearch() {
|
||||
setFieldsValue({
|
||||
taskNumber: '',
|
||||
taskName: '',
|
||||
userName: ''
|
||||
});
|
||||
setSearchObj({});
|
||||
}
|
||||
|
||||
// 刷新数据
|
||||
const reloadList = useCallback(() => {
|
||||
setReload(Math.random());
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
<div className="centerbox task-manage">
|
||||
<div className="center-screen" >
|
||||
<div className="center-left-but">
|
||||
<Button className="circle-button" type={approve === 1 ? 'primary' : ''} onClick={() => { changeApprove(1) }}>待审批</Button>
|
||||
<Button className="circle-button" type={approve === 2 ? 'primary' : ''} onClick={() => { changeApprove(2) }}>已审批</Button>
|
||||
</div>
|
||||
|
||||
<div className="center-right-but">
|
||||
{helper(
|
||||
"taskNumber",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="输入任务编号进行检索"
|
||||
/>
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"taskName",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="输入任务名称进行检索"
|
||||
/>
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"userName",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="输入发布人名称进行检索"
|
||||
/>
|
||||
)}
|
||||
|
||||
<Button className="mr10" type="primary" onClick={onSearch}>搜索</Button>
|
||||
<Button className="mr10" type="" onClick={clearSearch}>清除</Button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="center-content">
|
||||
|
||||
{
|
||||
approve === 2 && <StatusNav
|
||||
key={'status'}
|
||||
type={'status'}
|
||||
options={agreementOptionArr}
|
||||
changeOptionId={changeOptionId}
|
||||
/>
|
||||
}
|
||||
<ItemAgreementManage
|
||||
list={taskList}
|
||||
curPage={curPage}
|
||||
total={total}
|
||||
changePage={(page) => { setCurPage(page) }}
|
||||
loading={loading}
|
||||
showNotification={showNotification}
|
||||
reloadList={reloadList}
|
||||
newFlag={ true }
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
@ -0,0 +1,223 @@
|
|||
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 { Confirm } from '../../components/ModalFun';
|
||||
import { paperCheckStatusArr,taskStatusAllArr } from '../static';
|
||||
import { readyCheckPapers, checkPaper, } from '../api';
|
||||
import '../index.scss';
|
||||
import './index.scss';
|
||||
const format = "YYYY-MM-DD HH:mm:ss";
|
||||
const Option = Select.Option;
|
||||
const TextArea = Input.TextArea;
|
||||
|
||||
const statusArr = [];
|
||||
for (const item of taskStatusAllArr) {
|
||||
statusArr[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 }) => {
|
||||
|
||||
|
||||
const { getFieldDecorator, setFieldsValue, getFieldsValue } = form;
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [searchObj, setSearchObj] = useState({
|
||||
checkStatus: '2',
|
||||
parentId: 0,
|
||||
});
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
|
||||
const [reload, setReload] = useState(0);
|
||||
const [activeId, setActiveId] = useState('');
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
curPage,
|
||||
pageSize: 10,
|
||||
...searchObj,
|
||||
};
|
||||
setLoading(true);
|
||||
readyCheckPapers(params).then(data => {
|
||||
if (data) {
|
||||
if((data.rows && data.rows.length<=0) && curPage>1){
|
||||
setCurPage(curPage-1);
|
||||
}
|
||||
setTaskList(data.rows);
|
||||
setTotal(data.total);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
}, [reload, curPage, searchObj]);
|
||||
|
||||
|
||||
const helper = useCallback(
|
||||
(label, name, rules, widget, initialValue) => (
|
||||
<Form.Item label={label}>
|
||||
{getFieldDecorator(name, { rules, initialValue, validateFirst: true, })(widget)}
|
||||
</Form.Item>
|
||||
), []);
|
||||
|
||||
|
||||
function onSearch() {
|
||||
let values = getFieldsValue(['checkStatus', 'endCreatedAt', 'startCreatedAt', 'parentId','number']);
|
||||
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() {
|
||||
setFieldsValue({
|
||||
startCreatedAt: '',
|
||||
endCreatedAt: '',
|
||||
checkStatus: '0,1,2',
|
||||
number:''
|
||||
});
|
||||
setSearchObj({});
|
||||
}
|
||||
|
||||
function getSignUrl() {
|
||||
|
||||
}
|
||||
|
||||
const columns = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
render: (text, record, index) => {
|
||||
return <div style={{ textAlign: 'center' }}>{index + 1}</div>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '任务名称',
|
||||
dataIndex: 'number',
|
||||
},
|
||||
{
|
||||
title: '发布主体',
|
||||
dataIndex: 'user',
|
||||
render: (text, record) => {
|
||||
return record.user.nickname || record.user.login
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '发布时间',
|
||||
dataIndex: 'createdAt',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
render: (text, record) => (
|
||||
<React.Fragment>
|
||||
<Button className="mr5 font-12" type="primary" size="small" onClick={() => { getSignUrl() }}>签订表签字</Button>
|
||||
</React.Fragment>
|
||||
),
|
||||
},
|
||||
]
|
||||
}, []);
|
||||
|
||||
function changeType(e) {
|
||||
setSearchObj({
|
||||
...searchObj,
|
||||
parentId: e,
|
||||
});
|
||||
setCurPage(1);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="task-manage paper-manage">
|
||||
<div className="center-screen clearfix" >
|
||||
<div className="center-left-but">
|
||||
{helper(
|
||||
"签订状态",
|
||||
"parentId",
|
||||
[],
|
||||
<Select
|
||||
showArrow
|
||||
placeholder="请选择签订状态"
|
||||
onChange={changeType}
|
||||
>
|
||||
<Option key={0} value={0}>未签订</Option>
|
||||
<Option key={1} value={1}>已签订</Option>
|
||||
</Select>,
|
||||
0
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"任务名称",
|
||||
"number",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="请输入任务名称"
|
||||
/>
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"发布主体",
|
||||
"number",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="请输入发布主体"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="center-right-but">
|
||||
{helper(
|
||||
"发布时间:",
|
||||
"startCreatedAt",
|
||||
[],
|
||||
<DatePicker
|
||||
showTime
|
||||
format={format}
|
||||
placeholder="请选择开始时间"
|
||||
/>
|
||||
)}
|
||||
|
||||
{helper(
|
||||
"",
|
||||
"endCreatedAt",
|
||||
[],
|
||||
<DatePicker
|
||||
showTime
|
||||
format={format}
|
||||
placeholder="请选择结束时间"
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
<Button className="mr10" type="primary" onClick={onSearch}>搜索</Button>
|
||||
<Button className="mr10" type="" onClick={clearSearch}>清除</Button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="center-content">
|
||||
|
||||
<Table
|
||||
loading={loading}
|
||||
rowKey={(row) => row.id}
|
||||
dataSource={taskList}
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
className="mt10"
|
||||
/>
|
||||
{total > 10 &&
|
||||
<Pagination
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
current={curPage}
|
||||
total={total}
|
||||
/>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
.paper-manage{
|
||||
.center-screen{
|
||||
display: block;
|
||||
|
||||
.center-left-but,.center-right-but{
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
.center-left-but{
|
||||
width: 100%;
|
||||
.ant-form-item{
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
.center-right-but{
|
||||
width: 100%;
|
||||
}
|
||||
.line_1{
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
|
@ -732,4 +732,58 @@ export function changePinnedTaskSort(data){
|
|||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 签订表+协议审核列表
|
||||
export function agreementListNew(params) {
|
||||
return fetch({
|
||||
url: `/api/taskOnlineSign/firstDraft/list`,
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 审核签订表+协议
|
||||
export function adminCheckAgreementNew(data) {
|
||||
return fetch({
|
||||
url: `/api/taskOnlineSign/admin/firstDraft/check/${data.taskOnlineSignId}`,
|
||||
method: 'post',
|
||||
data: data.params
|
||||
});
|
||||
}
|
||||
|
||||
// 签订表签署列表
|
||||
export function agreementSignList(params) {
|
||||
return fetch({
|
||||
url: `/api/taskOnlineSign/admin/signatureForm/list`,
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 获取签订表签署链接
|
||||
export function getSignUrl(params) {
|
||||
return fetch({
|
||||
url: `/api/taskOnlineSign/admin/signatureForm/get-url`,
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// 上传协议
|
||||
export function uploadAgreement(data) {
|
||||
return fetch({
|
||||
url: `/api/taskOnlineSign/admin/agreement/upload`,
|
||||
method: 'post',
|
||||
data: data.params
|
||||
});
|
||||
}
|
||||
|
||||
// 上传签订表
|
||||
export function uploadSignForm(data) {
|
||||
return fetch({
|
||||
url: `/api/taskOnlineSign/admin/signatureForm/upload`,
|
||||
method: 'post',
|
||||
data: data.params
|
||||
});
|
||||
}
|
||||
|
|
@ -3,16 +3,17 @@ import { Modal, Form, Input, } from 'antd';
|
|||
import RenderHtml from 'src/components/render-html';
|
||||
import Upload from 'military/components/Upload';
|
||||
import ExportWord from 'military/components/ExportWord';
|
||||
import { uploadAgreePaper,getAgreement } from "../../api";
|
||||
import { uploadAgreement, uploadSignForm,getAgreement } from "../../api";
|
||||
|
||||
import '../../index.scss';
|
||||
|
||||
|
||||
export default Form.create()(props => {
|
||||
const { visible, setVisible, checkedItem, form, showNotification ,reloadList } = props;
|
||||
const { visible, setVisible, checkedItem, form, showNotification ,reloadList, paperId } = props;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue, } = form;
|
||||
|
||||
const [fileList, setFileList] = useState([]);
|
||||
const [fileList1, setFileList1] = useState([]);
|
||||
const [content,setContent]=useState('');
|
||||
|
||||
useEffect(()=>{
|
||||
|
|
@ -25,20 +26,36 @@ export default Form.create()(props => {
|
|||
|
||||
|
||||
// 上传附件后得到的文件数组
|
||||
function uploadFunc(fileList, files) {
|
||||
setFileList(fileList);
|
||||
setFieldsValue({
|
||||
files,
|
||||
});
|
||||
|
||||
function uploadFuncAgree(fileList, files) {
|
||||
uploadFunc(fileList, files, false)
|
||||
}
|
||||
function uploadFuncSign(fileList, files) {
|
||||
uploadFunc(fileList, files, true)
|
||||
}
|
||||
|
||||
function uploadFunc(fileList, files, isSign) {
|
||||
if (isSign) {
|
||||
setFileList1(fileList);
|
||||
setFieldsValue({
|
||||
files1: files,
|
||||
});
|
||||
} else {
|
||||
setFileList(fileList);
|
||||
setFieldsValue({
|
||||
files: files,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function uploadAgree() {
|
||||
validateFields((err, values) => {
|
||||
console.log(values)
|
||||
if (!err) {
|
||||
uploadAgreePaper({
|
||||
paperId: checkedItem.id,
|
||||
uploadAgreement({
|
||||
params: {
|
||||
files: values.files,
|
||||
taskOnlineSignId: paperId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.message === 'success') {
|
||||
|
|
@ -76,7 +93,7 @@ export default Form.create()(props => {
|
|||
|
||||
<Form.Item className="upload-form" label="协议上传" required={true}>
|
||||
<Upload
|
||||
load={uploadFunc}
|
||||
load={uploadFuncAgree}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={fileList}
|
||||
|
|
@ -86,6 +103,18 @@ export default Form.create()(props => {
|
|||
validateFirst: true
|
||||
})(<Input style={{ display: 'none' }} />)}
|
||||
</Form.Item>
|
||||
<Form.Item className="upload-form" label="签订表上传" required={true}>
|
||||
<Upload
|
||||
load={uploadFuncSign}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
fileList={fileList1}
|
||||
/>
|
||||
{getFieldDecorator('files1', {
|
||||
rules: [{ required: visible, message: "请上传文件" }],
|
||||
validateFirst: true
|
||||
})(<Input style={{ display: 'none' }} />)}
|
||||
</Form.Item>
|
||||
<div id="wordExpert" style={{display:'none'}} >
|
||||
<RenderHtml className="break_word_comments imageLayerParent" value={content} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,19 +4,19 @@ import { Link } from "react-router-dom";
|
|||
import Nodata from 'forge/Nodata';
|
||||
import Loading from "src/Loading";
|
||||
import { timeAgo, getImageUrl,goUser,goUserMes } from 'educoder';
|
||||
import { adminCheckAgreement } from '../../api';
|
||||
import { adminCheckAgreement, adminCheckAgreementNew } from '../../api';
|
||||
import { httpUrl } from '../../fetch';
|
||||
import './index.scss';
|
||||
|
||||
const { TextArea } = Input;
|
||||
export default Form.create()((props) => {
|
||||
const { form, list, curPage, total, changePage, loading, showNotification, reloadList } = props;
|
||||
const { form, list, curPage, total, changePage, loading, showNotification, reloadList, newFlag = false } = props;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
const [checkedItem, setCheckedItem] = useState({});
|
||||
const [visible, setVisible] = useState(false);
|
||||
const pageSize = props.pageSize || 10;
|
||||
|
||||
|
||||
const checkFunction = newFlag ? adminCheckAgreementNew : adminCheckAgreement
|
||||
|
||||
function refuseClick(item) {
|
||||
setCheckedItem(item);
|
||||
|
|
@ -26,8 +26,9 @@ export default Form.create()((props) => {
|
|||
function dealAction() {
|
||||
validateFields((error, values) => {
|
||||
if (!error) {
|
||||
adminCheckAgreement({
|
||||
checkFunction({
|
||||
agreementId: checkedItem.id,
|
||||
taskOnlineSignId: checkedItem.id,
|
||||
type: checkedItem.type,
|
||||
params: {
|
||||
pass: 0,
|
||||
|
|
@ -51,8 +52,9 @@ export default Form.create()((props) => {
|
|||
Modal.confirm({
|
||||
title: '确认审批通过?',
|
||||
onOk() {
|
||||
adminCheckAgreement({
|
||||
checkFunction({
|
||||
agreementId: item.id,
|
||||
taskOnlineSignId: item.id,
|
||||
type: item.type,
|
||||
params: {
|
||||
pass: 1,
|
||||
|
|
@ -146,6 +148,20 @@ export default Form.create()((props) => {
|
|||
})
|
||||
}
|
||||
</div>
|
||||
{
|
||||
newFlag && <div className="width100 lineh-35 clearfix">
|
||||
<span className="color-grey-9 fl">签订表文件:</span>
|
||||
{
|
||||
item.busiAttachments && item.busiAttachments.map(fileItem => {
|
||||
return <span className="file-list-prof " key={fileItem.id}>
|
||||
<a onClick={() => { downFile(fileItem) }}><i className="iconfont icon-fujian color-green font-14 mr3"></i>
|
||||
{fileItem.fileName} </a>
|
||||
<span className="ml10 color-grey-9">({fileItem.fileSizeString})</span>
|
||||
</span>
|
||||
})
|
||||
}
|
||||
</div>
|
||||
}
|
||||
{/* <div className="width100 lineh-35">
|
||||
<span className="color-grey-9 fl">驳回原因:</span>
|
||||
<span className="infos_item">{item.content}</span>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ for (const item of paperCheckStatusArr) {
|
|||
}
|
||||
|
||||
export default Form.create()((props) => {
|
||||
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form, detailStatus, expertReview ,mygetHelmetapi} = props;
|
||||
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form, detailStatus, expertReview ,mygetHelmetapi, taskLimit} = props;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
const [page, setPage] = useState(1);
|
||||
const pageSize = props.pageSize || 10;
|
||||
|
|
@ -146,17 +146,8 @@ export default Form.create()((props) => {
|
|||
);
|
||||
|
||||
function certificationCheck(item) {
|
||||
if (current_user.bankCertification) {
|
||||
setAgreeVisible(true);
|
||||
setCheckedItem(item);
|
||||
} else {
|
||||
Modal.confirm({
|
||||
content: "签订协议前请先完成财务认证,是否前往认证?",
|
||||
onOk() {
|
||||
window.location.href=`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`;
|
||||
}
|
||||
})
|
||||
}
|
||||
setAgreeVisible(true);
|
||||
setCheckedItem(item);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
@ -181,14 +172,13 @@ export default Form.create()((props) => {
|
|||
{winReview && i ==0 && <span className='winReview'><img src={win1}/>第一名</span>}
|
||||
{winReview && i ==1 && <span className='winReview'><img src={win2}/>第二名</span>}
|
||||
{winReview && i ==2 && <span className='winReview'><img src={win3}/>第三名</span>}
|
||||
{item.status === 2 && detailStatus === 6 && taskLimit &&
|
||||
<a className="right-button" onClick={() => {certificationCheck(item); }}>签订协议</a>}
|
||||
</li>
|
||||
<li className="fr">
|
||||
{((item.needComplain && detailStatus === 3) || (detailStatus === 5 && item.publicTaskComplain && item.checkStatus === 1 && item.status !== 2)) && (current_user.login === item.user.login) &&
|
||||
<a className="base_smallBtn blue_line_btn fl" onClick={() => { setComplainVisible(true); setCheckedItem(item) }}>申诉</a>}
|
||||
|
||||
{item.status === 2 && detailStatus === 6 && (current_user.login === item.user.login) && (!item.sign) && (item.canApplicantSign || item.canApplicantSignByPlatform) &&
|
||||
<a className="base_smallBtn blue_line_btn fl" onClick={() => {certificationCheck(item); }}>签订协议</a>}
|
||||
|
||||
{item.status === 2 && detailStatus === 7 && (current_user.login === item.user.login) && (item.task && item.task.agreementSigning === 1) && (!item.isPay) &&
|
||||
<a className="base_smallBtn blue_line_btn fl" onClick={() => { confirmReceiptModal(item.id) }}>确认收款</a>}
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,21 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.right-button {
|
||||
width:81px;
|
||||
height:34px;
|
||||
border:1px solid;
|
||||
border-color:#4154f1;
|
||||
border-radius:2px;
|
||||
color:#4154f1;
|
||||
font-size:15px;
|
||||
line-height: 34px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
.fileComments{
|
||||
.icon-dianzan_icon{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ export default Form.create()(
|
|||
// !current_user.login&&showLoginDialog();
|
||||
// },[current_user.login]);
|
||||
|
||||
console.log(current_user);
|
||||
|
||||
// 获取任务领域配置数据
|
||||
useEffect(() => {
|
||||
|
|
@ -569,6 +568,11 @@ export default Form.create()(
|
|||
}
|
||||
{(!current_user.login || (current_user.enterpriseCertification || current_user.authentication) && detailData.status === 3 && (!detailData.exceptClosedBoolean)) && signContent()}
|
||||
|
||||
{/* {
|
||||
|
||||
current_user.login && detailData.status === 6 &&
|
||||
} */}
|
||||
|
||||
<div className="applyList edu-back-white padding30 mt20">
|
||||
<div className="font-16 font-bd">交稿
|
||||
{/* 此功能暂时去掉 */}
|
||||
|
|
@ -609,6 +613,7 @@ export default Form.create()(
|
|||
|
||||
<ItemListPaper
|
||||
current_user={current_user}
|
||||
taskLimit={taskLimit}
|
||||
list={dataList}
|
||||
itemClick={dataList}
|
||||
curPage={curPage}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ const Search = Input.Search;
|
|||
|
||||
|
||||
export default ({ history, current_user, showLoginDialog, location, mygetHelmetapi }) => {
|
||||
console.log(current_user);
|
||||
let initType = getUrlToken('type', location.search) || '';
|
||||
let taskParams = sessionStorage.getItem("taskParams") ? JSON.parse(sessionStorage.getItem("taskParams")) : {};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue