更新版本库
This commit is contained in:
@ -2,6 +2,7 @@ import React, {PureComponent} from 'react';
|
||||
import {Divider,Button,Form,Card,Tabs,Table,Tooltip,Input,Select,Row,Col,message,Modal,Descriptions,Checkbox } from 'antd';
|
||||
import './index.less';
|
||||
import { connect } from "dva";
|
||||
import { history } from "umi"
|
||||
// import bookt from "../../assets/bookt.doc";
|
||||
|
||||
const FormItem=Form.Item;
|
||||
@ -16,14 +17,15 @@ class Jury extends PureComponent {
|
||||
state={
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
tpId:1111111,
|
||||
tpId:'',
|
||||
ratevisible:false,
|
||||
room:[],
|
||||
bookflag:true
|
||||
bookflag:false,
|
||||
display:false,
|
||||
}
|
||||
componentDidMount(){
|
||||
// console.log(this.props.match.params.roomType)
|
||||
this.setState({
|
||||
tpId:1111111,
|
||||
bookflag:true
|
||||
})
|
||||
const { dispatch }=this.props;
|
||||
@ -31,8 +33,8 @@ class Jury extends PureComponent {
|
||||
const params={
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
roomType:2,
|
||||
tpId:1111111,//项目id
|
||||
// roomType:this.props.match.params.roomType,
|
||||
// tpId: getProId(),//项目id
|
||||
checked:false
|
||||
}
|
||||
dispatch({
|
||||
@ -76,13 +78,31 @@ class Jury extends PureComponent {
|
||||
const params={
|
||||
roomId:record.id
|
||||
}
|
||||
const roomId={
|
||||
assessRoomId:record.id
|
||||
}
|
||||
this.props.dispatch({
|
||||
type:"bidev/getCheckedByRoomId",
|
||||
payload: {...roomId},
|
||||
callback:(response) => {
|
||||
console.log(response)
|
||||
if(response.data == false) {
|
||||
this.setState({display: true})
|
||||
} else {
|
||||
this.setState({display: false})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.props.dispatch({
|
||||
type:"bidev/fetchJuryMemInfo",
|
||||
payload:{...params},
|
||||
callback:(response,txt)=>{
|
||||
if(txt=="success"){
|
||||
sessionStorage.setItem('projectData',JSON.stringify(record))
|
||||
sessionStorage.setItem('roomId',record.id)
|
||||
this.setState({
|
||||
ratevisible:true
|
||||
ratevisible:true,
|
||||
tpId:record.tpId
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -91,13 +111,16 @@ class Jury extends PureComponent {
|
||||
// 校验验证码及修改用户信息
|
||||
onRe2ndPageOut=()=>{
|
||||
const { validateFields,getFieldValue }=formRef.current;
|
||||
const { JuryInfo,checked }=this.props;
|
||||
validateFields(['name','phone',
|
||||
// 'certificate',
|
||||
'verificationCode']).then(
|
||||
(values) => {
|
||||
console.log(values);
|
||||
const params={
|
||||
name:values.name,
|
||||
phone:values.phone
|
||||
phone:values.phone,
|
||||
id:JuryInfo.id
|
||||
}
|
||||
this.props.dispatch({
|
||||
type:"bidev/updateJuryMemInfo",
|
||||
@ -115,23 +138,43 @@ class Jury extends PureComponent {
|
||||
payload:{...paramst},
|
||||
callback:(response,txt)=>{
|
||||
if(txt=="success"){
|
||||
// message.success("完美成功!")
|
||||
const paramskt={
|
||||
// assessRoomId:room.id,
|
||||
assessRoomId:"1331563852780797952",
|
||||
// projectId:tpId,
|
||||
projectId:"4419993030303037111"
|
||||
const { display }=this.state;
|
||||
console.log(display)
|
||||
if(display == true) {
|
||||
history.push('/EvaRoom')
|
||||
this.setState({
|
||||
ratevisible:false,
|
||||
})
|
||||
} else {
|
||||
// message.success("完美成功!")
|
||||
const paramskt={
|
||||
assessRoomId:room.id,
|
||||
// assessRoomId:"1331563852780797952",
|
||||
projectId:tpId,
|
||||
// projectId:"4419993030303037111"
|
||||
}
|
||||
const params={
|
||||
roomId:room.id
|
||||
}
|
||||
this.props.dispatch({
|
||||
type:"bidev/fetchbidslist",
|
||||
payload:{...paramskt}
|
||||
})
|
||||
this.props.dispatch({
|
||||
type:"bidev/fetchJuryMemInfo",
|
||||
payload:{...params},
|
||||
callback:(response,txt)=>{
|
||||
if(txt=="success"){
|
||||
const { resetFields }=formRef.current;
|
||||
resetFields();
|
||||
this.setState({
|
||||
ratevisible:false,
|
||||
bookflag:false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
this.props.dispatch({
|
||||
type:"bidev/fetchbidslist",
|
||||
payload:{...paramskt}
|
||||
})
|
||||
const { resetFields }=formRef.current;
|
||||
resetFields();
|
||||
this.setState({
|
||||
ratevisible:false,
|
||||
bookflag:false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -156,11 +199,38 @@ class Jury extends PureComponent {
|
||||
windowopen=()=>{
|
||||
// window.open(response.data, '_blank')
|
||||
}
|
||||
handleRedirect=()=>{
|
||||
const { checked }=this.state;
|
||||
if(!checked){
|
||||
handleRedirect=(txt)=>{
|
||||
const { checked,room }=this.state;
|
||||
const { JuryInfo }=this.props;
|
||||
if(txt==1 && !checked){
|
||||
return message.warn("请您先阅读专家承诺书!")
|
||||
}
|
||||
const params={
|
||||
assessRoomId:room.id,
|
||||
attitude:txt,
|
||||
juryMemberId:JuryInfo.id,
|
||||
sectionId:room.sectionId,
|
||||
}
|
||||
this.props.dispatch({
|
||||
type:"bidev/pushRedirectRe",
|
||||
payload:{...params},
|
||||
callback:(response,t)=>{
|
||||
if(t=="success"){
|
||||
// 再跳转
|
||||
if(txt==1){
|
||||
// sessionStorage.setItem("roomId",record.id)
|
||||
// this.props.dispatch(routerRedux.push('/ProjectLayout/EvaRoom'))
|
||||
history.push('/EvaRoom')
|
||||
}else{
|
||||
this.setState({
|
||||
ratevisible:false
|
||||
})
|
||||
}
|
||||
}else{
|
||||
message.error(response.message)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
handleBack=()=>{
|
||||
this.setState({
|
||||
@ -169,7 +239,7 @@ class Jury extends PureComponent {
|
||||
}
|
||||
render(){
|
||||
const { JuryList,JurylistLoading,JuryInfo,bidslistLoading,bidslist}=this.props;
|
||||
const { pageNo,pageSize,tpId,ratevisible,bookflag,checked }=this.state;
|
||||
const { pageNo,pageSize,tpId,ratevisible,bookflag,checked,display }=this.state;
|
||||
const pagination = {
|
||||
current: pageNo,
|
||||
total: JuryList && JuryList.total ,
|
||||
@ -184,8 +254,8 @@ class Jury extends PureComponent {
|
||||
const params={
|
||||
pageNo:page,
|
||||
pageSize:pageSize,
|
||||
roomType:2,
|
||||
tpId:tpId//项目id
|
||||
// roomType:2,
|
||||
// tpId:tpId//项目id
|
||||
}
|
||||
this.props.dispatch({
|
||||
type:"bidev/fetchJuryList",
|
||||
@ -200,8 +270,8 @@ class Jury extends PureComponent {
|
||||
const params={
|
||||
pageNo:1,
|
||||
pageSize:pageSize,
|
||||
roomType:2,
|
||||
tpId:tpId//项目id
|
||||
// roomType:2,
|
||||
// tpId:tpId//项目id
|
||||
}
|
||||
this.props.dispatch({
|
||||
type:"bidev/fetchJuryList",
|
||||
@ -229,7 +299,7 @@ class Jury extends PureComponent {
|
||||
bordered
|
||||
/>
|
||||
<span style={{marginLeft:"39%",fontSize:"15px",fontWeight:"bold"}}><Checkbox onChange={this.onChange} checked={checked}></Checkbox><span style={{marginLeft:"10px"}}>我已读并同意了此承诺书</span><span style={{color:"#2D2DFF",fontSize:"20px",cursor:"pointer"}} onClick={()=>{this.windowopen()}}>《承诺书协议》</span></span><br/><br/>
|
||||
<span style={{marginLeft:"39%",marginTop:"10px"}}><Button type="danger" onClick={()=>{this.handleBack()}}>申请回避</Button><Button style={{marginLeft:"30px"}} type="danger" onClick={()=>{this.handleRedirect()}}>确定</Button></span>
|
||||
<span style={{marginLeft:"39%",marginTop:"10px"}}><Button type="danger" onClick={()=>{this.handleRedirect(2)}}>申请回避</Button><Button style={{marginLeft:"30px"}} type="danger" onClick={()=>{this.handleRedirect(1)}}>确定</Button></span>
|
||||
</div>
|
||||
}
|
||||
return <>
|
||||
@ -245,6 +315,7 @@ class Jury extends PureComponent {
|
||||
renderBookt()}
|
||||
<div className="zry">
|
||||
<Modal
|
||||
destroyOnClose
|
||||
cancelText="取消"
|
||||
okText="确定"
|
||||
onCancel={()=>{this.onRateOut()}}
|
||||
@ -258,6 +329,7 @@ class Jury extends PureComponent {
|
||||
ref={formRef}
|
||||
labelCol={{ span: 5 }}
|
||||
wrapperCol={{ span: 13 }}
|
||||
preserve={false}
|
||||
>
|
||||
<span className="zul">专家信息确认</span>
|
||||
<div className="divider"></div>
|
||||
@ -267,29 +339,29 @@ class Jury extends PureComponent {
|
||||
name="name"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
required: !this.state.display,
|
||||
message: '请输入姓名',
|
||||
},
|
||||
]}
|
||||
><Input placeholder="请输入姓名"/></FormItem>
|
||||
><Input placeholder="请输入姓名" disabled={this.state.display}/></FormItem>
|
||||
<FormItem
|
||||
label="电话"
|
||||
initialValue={JuryInfo!="" && JuryInfo.phone}
|
||||
name="phone"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
required: !this.state.display,
|
||||
message: '请输入电话',
|
||||
},
|
||||
]}
|
||||
><Input placeholder="请输入电话"/></FormItem>
|
||||
><Input placeholder="请输入电话" disabled={this.state.display}/></FormItem>
|
||||
<FormItem
|
||||
label="身份证号"
|
||||
initialValue={JuryInfo!="" && JuryInfo.certificate}
|
||||
name="certificate"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
required: !this.state.display,
|
||||
message: '请输入身份证号',
|
||||
},
|
||||
]}
|
||||
|
Reference in New Issue
Block a user