提交报名信息二级确认框

This commit is contained in:
谢思 2022-04-13 17:21:59 +08:00
parent cbf0f827dd
commit 13a54a3e29
1 changed files with 19 additions and 11 deletions

View File

@ -10,7 +10,7 @@ const Option = Select.Option;
function Apply(props) { function Apply(props) {
const {form, current_user, showNotification, isGlccApplyDate} = props; const {form, current_user, showNotification, isGlccApplyDate} = props;
// //
// current_user && (current_user.user_id = 1) // current_user && (current_user.user_id = 6)
// current_user && (current_user.userName = "使") // current_user && (current_user.userName = "使")
const {getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form; const {getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form;
const [reload, setReload] = useState(undefined); const [reload, setReload] = useState(undefined);
@ -29,6 +29,8 @@ function Apply(props) {
); );
useEffect(()=>{ useEffect(()=>{
//
window.scrollTo(0,0);
if(!isGlccApplyDate){ if(!isGlccApplyDate){
// //
window.location.href="/glcc"; window.location.href="/glcc";
@ -72,6 +74,10 @@ function Apply(props) {
e.preventDefault(); e.preventDefault();
validateFieldsAndScroll((err, values) => { validateFieldsAndScroll((err, values) => {
if (!err) { if (!err) {
Modal.confirm({
title: "报名",
content: "确定提交报名信息,提交后报名信息将无法修改",
onOk: ()=>{
const params ={ const params ={
...values, ...values,
projectLogoId: values.logo.file.response.data.id, projectLogoId: values.logo.file.response.data.id,
@ -83,6 +89,8 @@ function Apply(props) {
showNotification("报名成功"); showNotification("报名成功");
setReload(Math.random()); setReload(Math.random());
} }
})
}
})} })}
}); });
}; };