diff --git a/src/glcc/api.js b/src/glcc/api.js index 6730545c9..925fb4ec9 100644 --- a/src/glcc/api.js +++ b/src/glcc/api.js @@ -328,4 +328,13 @@ export function getExamineInfoListFor0In(params) { method: 'get', params }); +} + +// 获取结项学生个人信息 +export function getStudentInfo(params) { + return fetch({ + url: `/api/glccFinalTermStudentInfo/getMyInfo`, + method: 'get', + params + }); } \ No newline at end of file diff --git a/src/glcc/interimReview/index.scss b/src/glcc/interimReview/index.scss index c3fef0531..b9a8866c4 100644 --- a/src/glcc/interimReview/index.scss +++ b/src/glcc/interimReview/index.scss @@ -137,6 +137,20 @@ } .referItem{margin-bottom: 5px;} } + &.referBoxByFinalExamine{ + .referItem.oneLine .ant-form-item-label, .pptUpload .ant-form-item-label{ + width: 125px; + } + .referItem.isEmpower{ + margin-left: 145px; + } + .referItem.oneLine input{ + width: 82%; + } + .submitByGLCC{ + margin-left: 125px !important; + } + } } .tutorContent{ border: 1px solid #fff; @@ -286,4 +300,7 @@ } } } +} +.descriptions_glcc table{ + background: none; } \ No newline at end of file diff --git a/src/glcc/interimReview/studentSubmit.jsx b/src/glcc/interimReview/studentSubmit.jsx index cbc8dec8b..73ae4a04a 100644 --- a/src/glcc/interimReview/studentSubmit.jsx +++ b/src/glcc/interimReview/studentSubmit.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useState, Fragment } from "react"; -import { Form, Upload, Input, Icon, Button, message, Modal, Checkbox, notification} from "antd"; +import { Form, Upload, Input, Icon, Button, message, Modal, Checkbox, notification, Descriptions} from "antd"; import { Link } from "react-router-dom"; import axios from "axios"; import banner from '../img/banner-interim.png'; @@ -7,19 +7,23 @@ import banner1 from '../img/banner-interim1.png'; import img1 from '../img/img1.png'; import bg from '../img/bgPng.png'; import { httpUrl, main_site_url } from '../fetch'; -import {getMediumTermExamineInfo, submitMedium, formatParsedResult, hasFinalExam, currentRound} from '../api'; +import {getMediumTermExamineInfo, submitMedium, formatParsedResult, hasFinalExam, currentRound, getStudentInfo} from '../api'; import './index.scss'; function StudentSubmit(props){ const label = { mediumExamine1: '中期', - finalExamine1: '结项' + finalExamine1: '结项', + mediumExamine2: '中期', + finalExamine2: '结项' } const {form, checkedTaskId, studentRegId, period, glccSettings, isMediumExamineByToTutor, isFinalExamineByToTutor,history, current_user} = props; + // const period = "finalExamine1" const mediumExamine = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine1"); const mediumExamine2 = glccSettings && glccSettings.filter(item=>item.name === "mediumExamine2"); const finalExamine = glccSettings && glccSettings.filter(item=>item.name === "finalExamine1"); const finalExamine2 = glccSettings && glccSettings.filter(item=>item.name === "finalExamine2"); + const isFinal = (period === "finalExamine1" || period === "finalExamine2"); let overtime = false; if (mediumExamine2 && mediumExamine2[0] && period === "mediumExamine1") { const nowTime = new Date().getTime(); @@ -46,16 +50,25 @@ function StudentSubmit(props){ const [disabled, setDisabled] = useState(false); // 是否授权主办方 const [isAuthed, setIsAuthed] = useState(false); + const [studentInfo, setStudentInfo] = useState(undefined); useEffect(()=>{ // 查询是否已经提交考核材料 - checkedTaskId && getMediumTermExamineInfo(checkedTaskId,{round: currentRound, term: period === "mediumExamine1" ? 1 : 2}).then(res=>{ + checkedTaskId && getMediumTermExamineInfo(checkedTaskId,{round: currentRound, term: isFinal ? 2 : 1}).then(res=>{ if(res && res.message === "success"){ setDetail(res.data); } }) },[checkedTaskId, reload]) + useEffect(()=>{ + isFinal && getStudentInfo({round: currentRound}).then(res=>{ + if(res && res.message === "success"){ + setStudentInfo(res.data); + } + }) + }, [isFinal, reload]) + // 学生提交材料 function submit(e){ setDisabled(true); @@ -63,10 +76,20 @@ function StudentSubmit(props){ validateFieldsAndScroll((err, values) => { if(!err){ Modal.confirm({ + width: '515px', title: `确认提交${label[period]}考核材料?`, - content: "提交后将无法修改考核材料,请进行二次确认", + content: isFinal ?
+ 提交后将无法修改,请您再次核对以下关键信息:

+ 1. 姓名、身份证号是否与本人证件一致;
+ 2. 银行卡号、开户银行、银行预留手机号是否准确;
+ 3. 证书邮寄地址是否包含完整 “省 / 市 / 区 + 街道 / 小区 / 楼栋 / 房号”,确保可正常收件。

+ ⚠️ 若因信息填写错误导致:
+ 1. 实体证书无法寄送、丢失;
+ 2. 奖金发放失败、退回;

+ 组委会将视为您自动放弃相关权益,不予补发证书、重发奖金。 +
: "提交后将无法修改考核材料,请进行二次确认", onOk: ()=>{ - const {pptAttachment, defenceVideoUrl, codeOrPrUrl} = values; + const {pptAttachment, defenceVideoUrl, codeOrPrUrl, fullName, schoolName, phoneNumber, email, certificateAddress, idCardNumber, bankAccountNumber, bankName, bankReservedPhone } = values; const pptAttachmentId = pptAttachment.file && pptAttachment.file.response && pptAttachment.file.response.data.id; const params = { pptAttachmentId, @@ -76,7 +99,13 @@ function StudentSubmit(props){ studentRegId: studentRegId, round: currentRound, isAuthed, - term: period === "mediumExamine1" ? 1 : 2 + term: isFinal ? 2 : 1 + } + if(isFinal){ + params.finalTermStudentInfo = { + studentRegId: studentRegId, + fullName, schoolName, phoneNumber, email, certificateAddress, idCardNumber, bankAccountNumber, bankName, bankReservedPhone + } } submitMedium(params).then(res=>{ if(res && res.message === "success"){ @@ -89,6 +118,8 @@ function StudentSubmit(props){ }else{ setDisabled(false); } + }).finally(()=>{ + setDisabled(false); }) }, onCancel:()=>{ @@ -139,7 +170,7 @@ function StudentSubmit(props){ params: { url: value, task: checkedTaskId, - term: period === "mediumExamine1" ? 1 : 2, + term: isFinal ? 2 : 1, }, }) .then((response) => { @@ -167,6 +198,57 @@ function StudentSubmit(props){ callback("请输入pr地址"); } } + + const finalExamineFields = ()=>{ + return + + {getFieldDecorator('fullName', { + rules: [{ required: true, message: '请输入真实姓名!' }], + })()} + + + {getFieldDecorator('schoolName', { + rules: [{ required: true, message: '请输入学校官方完整名称!' }], + })()} + + + {getFieldDecorator('phoneNumber', { + rules: [{ required: true, message: '请输入联系电话!' }, { pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请正确输入联系电话!' }], + })()} + + + {getFieldDecorator('email', { + rules: [{ required: true, message: '请输入邮箱!' }], + })()} + + + {getFieldDecorator('certificateAddress', { + rules: [{ required: true, message: '请输入证书邮寄地址!' }], + })()} + + + {getFieldDecorator('idCardNumber', { + rules: [{ required: true, message: '请输入身份证号!' }, { pattern: /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}([0-9]|X)$/, message: "请输入正确的中国大陆身份证号码"}], + })()} + + + {getFieldDecorator('bankAccountNumber', { + rules: [{ required: true, message: '请输入银行账号!' }], + })()} + + + {getFieldDecorator('bankName', { + rules: [{ required: true, message: '请输入开户银行!' }], + })()} + + + {getFieldDecorator('bankReservedPhone', { + rules: [{ required: true, message: '请输入银行预留手机号!' }, { pattern: /^[1][3,4,5,6,7,8,9][0-9]{9}$/, message: '请正确输入手机号!' }], + })()} + + + } + return
@@ -184,7 +266,8 @@ function StudentSubmit(props){ {label[period]}考核
- {(period === "mediumExamine1" || period === "finalExamine1") && !detail ?
+ {(period === "mediumExamine1" || period === "finalExamine1") && !detail ? + {isFinal && finalExamineFields()} { period === "mediumExamine1" || period === "finalExamine1" ? @@ -203,6 +286,7 @@ function StudentSubmit(props){ rules: [ { required: true, + message: '请输入pr地址!' // validator: (rule, value, callback) => { // checkPrLink(rule, value, callback, checkedTaskId); // }, @@ -225,12 +309,12 @@ function StudentSubmit(props){ {getFieldDecorator('codeOrPrUrl', { - rules: [{pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}], + rules: [{ required: true, message: '请输入代码/pr地址!'},{pattern: /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,message: "请正确输入链接"}], })()} } - + {getFieldDecorator('pptAttachment', { rules: [{ required: true, message: '请上传PPT附件!' }], })( @@ -245,15 +329,28 @@ function StudentSubmit(props){ )} - + :
-
-
  答辩视频{detail && detail.defenceVideoUrl}
-
授权主办方进行下载和剪辑,用作比赛宣传
-
代码/pr地址{detail && detail.codeOrPrUrl}
-
   PPT附件{detail && }{detail ? {`${detail.pptAttachment.fileName}`} : }{detail && detail.pptAttachment && detail.pptAttachment.fileSizeString}
-
+ + {studentInfo && + {studentInfo.fullName} + {studentInfo.schoolName} + {studentInfo.phoneNumber} + {studentInfo.email} + {studentInfo.idCardNumber} + {studentInfo.certificateAddress} + {studentInfo.bankAccountNumber} + {studentInfo.bankName} + {studentInfo.bankReservedPhone} + } + {detail && + {detail && detail.defenceVideoUrl} + 授权主办方进行下载和剪辑,用作比赛宣传 + {detail && detail.codeOrPrUrl} + {detail.pptAttachment && {`${detail.pptAttachment.fileName}`}{detail.pptAttachment.fileSizeString}} + } + {!detail &&
很遗憾,您在指定时间内未提交考核材料
} {detail && (isMediumExamineByToTutor || isFinalExamineByToTutor) && !detail.glccTutorEvaluation &&
您的课题导师暂未评分,请提醒导师尽快提交结项考核评分
} {detail && overtime && !detail.glccTutorEvaluation && isFinalExamineByToTutor &&
很遗憾,您的导师尚未评分,您未通过结项考核
}