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 bookt from "../../assets/bookt.doc"; const FormItem=Form.Item; const formRef = React.createRef(); const DescriptionsItem=Descriptions.Item; @connect(({ bidev,loading }) => ({ ...bidev, JurylistLoading:loading.effects['bidev/fetchJuryList'], bidslistLoading:loading.effects['bidev/fetchbidslist'], })) class Jury extends PureComponent { state={ pageNo:1, pageSize:10, tpId:1111111, ratevisible:false, room:[], bookflag:true } componentDidMount(){ this.setState({ tpId:1111111, bookflag:true }) const { dispatch }=this.props; // const {pageNo,pageSize}=this.state; const params={ pageNo:1, pageSize:10, roomType:2, tpId:1111111,//项目id checked:false } dispatch({ type:"bidev/fetchJuryList", payload:{...params} }) } columns=[ { title: '序号', dataIndex: 'id', width: '10%', render:(text, record, index)=>{ return (index+1) }}, { title: '项目名称', dataIndex: 'projectName', width: '10%'}, { title: '标段名称', dataIndex: 'sectionName', width: '10%'}, { title: '标段编号', dataIndex: 'sectionNum', width: '10%'}, { title: '评标次数', dataIndex: 'roomSort', width: '10%', render:(text, record, index)=>{ return <>第{text}次评标> }}, { title: '评标开始时间', dataIndex: 'openTime', width: '10%'}, { title: '操作', dataIndex: 'operation', width: '10%', render:(text, record, index)=>{ return <>{this.onRateShow(record)}}>进入评审室> }} ] bidscolumns=[ { title: '序号', dataIndex: 'id', width: '10%', align:"center", render:(text, record, index)=>{ return (index+1) }}, { title: '投标人名称', dataIndex: 'bidUserName',align:"center", width: '90%'} ] onRateShow=(record)=>{ this.setState({ room:record }) const params={ roomId:record.id } this.props.dispatch({ type:"bidev/fetchJuryMemInfo", payload:{...params}, callback:(response,txt)=>{ if(txt=="success"){ this.setState({ ratevisible:true }) } } }) } // 校验验证码及修改用户信息 onRe2ndPageOut=()=>{ const { validateFields,getFieldValue }=formRef.current; validateFields(['name','phone', // 'certificate', 'verificationCode']).then( (values) => { const params={ name:values.name, phone:values.phone } this.props.dispatch({ type:"bidev/updateJuryMemInfo", payload:{...params}, callback:(response,txt)=>{ if(txt=="success"){ const { room,tpId }=this.state; const paramst={ id:room.id, verificationCode:values.verificationCode } // 校验验证码 this.props.dispatch({ type:"bidev/validateVerificationCode", payload:{...paramst}, callback:(response,txt)=>{ if(txt=="success"){ // message.success("完美成功!") const paramskt={ // assessRoomId:room.id, assessRoomId:"1331563852780797952", // projectId:tpId, projectId:"4419993030303037111" } this.props.dispatch({ type:"bidev/fetchbidslist", payload:{...paramskt} }) const { resetFields }=formRef.current; resetFields(); this.setState({ ratevisible:false, bookflag:false }) } } }) } } }) } ) } onRateOut(){ const { resetFields }=formRef.current; resetFields(); this.setState({ ratevisible:false }) } onChange=(e)=>{ this.setState({ checked:e.target.checked }) } windowopen=()=>{ // window.open(response.data, '_blank') } handleRedirect=()=>{ const { checked }=this.state; if(!checked){ return message.warn("请您先阅读专家承诺书!") } } handleBack=()=>{ this.setState({ bookflag:true }) } render(){ const { JuryList,JurylistLoading,JuryInfo,bidslistLoading,bidslist}=this.props; const { pageNo,pageSize,tpId,ratevisible,bookflag,checked }=this.state; const pagination = { current: pageNo, total: JuryList && JuryList.total , // showSizeChanger: true, showQuickJumper:true, showTotal: (total,range) => `共 ${total} 条记录,第${range.slice(',')[0]}-${range.slice(',')[1]}条`, onChange:(page, pageSize)=>{ this.setState({ pageNo:page, pageSize:pageSize, }); const params={ pageNo:page, pageSize:pageSize, roomType:2, tpId:tpId//项目id } this.props.dispatch({ type:"bidev/fetchJuryList", payload:{...params} }) }, onShowSizeChange: (current, pageSize) => { this.setState({ pageNo:1, pageSize:pageSize, }); const params={ pageNo:1, pageSize:pageSize, roomType:2, tpId:tpId//项目id } this.props.dispatch({ type:"bidev/fetchJuryList", payload:{...params} }) } } const formItemLayout = { labelCol: { span: 5 }, wrapperCol: { span: 13 } }; const renderBookt=()=>{ return