3.10 工程代码同步master
This commit is contained in:
@ -2,7 +2,10 @@ import React, {PureComponent} from 'react';
|
||||
import {Divider,Button,Form,Card,Tabs,Table,Tooltip,Input,Select,Row,Col,message} from 'antd';
|
||||
import './index.less';
|
||||
import { connect } from "dva";
|
||||
import { getProId } from '@/utils/session';
|
||||
import { getProId,getProMethod,getDefId, getQuotationMethodById } from '@/utils/session';
|
||||
import { routerRedux } from 'dva/router';
|
||||
import { getURLInformation } from '@/utils/CommonUtils';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
@connect(({ bidev,loading }) => ({
|
||||
...bidev,
|
||||
supplierlistLoading:loading.effects['bidev/fetchSupplierList'],
|
||||
@ -11,9 +14,31 @@ class supplier extends PureComponent {
|
||||
state={
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
tpId: getProId()
|
||||
tpId: getProId(),
|
||||
sectionName:"采购包",
|
||||
sectionType:"评审",
|
||||
defId: getDefId(),
|
||||
loading: false,
|
||||
}
|
||||
componentDidMount(){
|
||||
//确定显示字段名称
|
||||
let sectionName = "采购包";
|
||||
let sectionType = "评审";
|
||||
let proMethod = getProMethod();
|
||||
if(proMethod == "procurement_mode_1" || proMethod == "procurement_mode_2") {
|
||||
sectionName= "标段";
|
||||
sectionType= "评标";
|
||||
} else if(proMethod == "procurement_mode_5" || proMethod == "procurement_mode_6") {
|
||||
sectionName= "采购包";
|
||||
sectionType= "谈判";
|
||||
} else if(proMethod == "procurement_mode_4") {
|
||||
sectionName= "包件";
|
||||
}
|
||||
this.setState({
|
||||
sectionName,
|
||||
sectionType
|
||||
})
|
||||
|
||||
this.setState({
|
||||
tpId: getProId()
|
||||
})
|
||||
@ -22,7 +47,8 @@ class supplier extends PureComponent {
|
||||
const params={
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
roomType:this.props.match.params.roomType,
|
||||
// roomType:this.props.match.params.roomType,
|
||||
roomType: getURLInformation('roomType'),
|
||||
tpId:getProId()//项目id
|
||||
}
|
||||
dispatch({
|
||||
@ -30,39 +56,21 @@ class supplier extends PureComponent {
|
||||
payload:{...params}
|
||||
})
|
||||
}
|
||||
columns=[
|
||||
{ title: '序号', dataIndex: 'id', width: '10%',
|
||||
render:(text, record, index)=>{
|
||||
return (index+1)
|
||||
}},
|
||||
{ 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: 'status', width: '10%',
|
||||
render:(text, record, index)=>{
|
||||
let txt="准备评标"
|
||||
switch(text){
|
||||
case '2': txt="正在评标"
|
||||
case '3': txt="评标结束"
|
||||
}
|
||||
return txt
|
||||
}},
|
||||
{ title: '操作', dataIndex: 'operation', width: '10%',
|
||||
render:(text, record, index)=>{
|
||||
return <><a className="buttont" onClick={()=>{this.handleRedirect()}}>进入评审室</a></>
|
||||
}}
|
||||
]
|
||||
handleRedirect=()=>{
|
||||
|
||||
handleRedirect=async(record)=>{
|
||||
sessionStorage.setItem("roomId",record.id)
|
||||
this.props.dispatch(routerRedux.push('/ProjectLayout/EvaRoom'))
|
||||
sessionStorage.setItem("roomStatus",record.status)
|
||||
sessionStorage.setItem("groupId",record.chatGroupId)
|
||||
sessionStorage.setItem("expertGroupId",record.expertChatGroupId)
|
||||
this.setState({loading: true})
|
||||
await getQuotationMethodById(record.id)
|
||||
this.setState({loading: false})
|
||||
// this.props.dispatch(routerRedux.push('/ProjectLayout/EvaRoom'))
|
||||
window.open('/EvaRoom')
|
||||
}
|
||||
render(){
|
||||
const { supplierList,supplierlistLoading}=this.props;
|
||||
const { pageNo,pageSize,tpId }=this.state;
|
||||
const { pageNo,pageSize,tpId ,sectionType,sectionName,defId,loading}=this.state;
|
||||
const pagination = {
|
||||
current: pageNo,
|
||||
total: supplierList && supplierList.total ,
|
||||
@ -77,7 +85,8 @@ class supplier extends PureComponent {
|
||||
const params={
|
||||
pageNo:page,
|
||||
pageSize:pageSize,
|
||||
roomType:this.props.match.params.roomType,
|
||||
// roomType:this.props.match.params.roomType,
|
||||
roomType: getURLInformation('roomType'),
|
||||
tpId:tpId//项目id
|
||||
}
|
||||
this.props.dispatch({
|
||||
@ -93,7 +102,8 @@ class supplier extends PureComponent {
|
||||
const params={
|
||||
pageNo:1,
|
||||
pageSize:pageSize,
|
||||
roomType:this.props.match.params.roomType,
|
||||
// roomType:this.props.match.params.roomType,
|
||||
roomType: getURLInformation('roomType'),
|
||||
tpId:tpId//项目id
|
||||
}
|
||||
this.props.dispatch({
|
||||
@ -102,14 +112,37 @@ class supplier extends PureComponent {
|
||||
})
|
||||
}
|
||||
}
|
||||
const columns=[
|
||||
{ title: '序号', dataIndex: 'id', width: '10%',
|
||||
render:(text, record, index)=>{
|
||||
return (index+1)
|
||||
}},
|
||||
{ title: `${sectionName}名称`, dataIndex: 'sectionName', width: '10%'},
|
||||
{ title: `${sectionName}编号`, dataIndex: 'sectionNum', width: '10%'},
|
||||
{ title: `${sectionType}次数`, dataIndex: 'roomSort', width: '10%',
|
||||
render:(text, record, index)=>{
|
||||
return defId == "recruit_multi" ? <>第{text}轮</> : record.reviewMark == 1 ? <>第{text + record.reviewSort}次{sectionType}</> : <>第{text}次{sectionType}</>
|
||||
}},
|
||||
{ title: `${sectionType}开始时间`, dataIndex: 'openTime', width: '10%'},
|
||||
{ title: '状态', dataIndex: 'status', width: '10%',
|
||||
render:(text, record, index)=>{
|
||||
let txt = record.status
|
||||
return txt == 0 || txt == 1 ? `准备${sectionType}` : (txt == 2 ? `正在${sectionType}` : (txt == 3 ? `${sectionType}结束`: null))
|
||||
}},
|
||||
{ title: '操作', dataIndex: 'operation', width: '10%',
|
||||
render:(text, record, index)=>{
|
||||
return <><Button type="text" onClick={()=>{this.handleRedirect(record)}} hidden={btnAuthority(["ebtp-supplier"])}>进入{sectionType}室</Button></>
|
||||
}}
|
||||
]
|
||||
|
||||
return <>
|
||||
<Card title="评审室">
|
||||
<Card bodyStyle={{ padding: '24px 24px 0px' }} style={{ borderRadius: 6 }} bordered={false}>
|
||||
<Table
|
||||
loading={supplierlistLoading}
|
||||
columns={this.columns}
|
||||
loading={supplierlistLoading || loading}
|
||||
columns={columns}
|
||||
dataSource={supplierList!="" && supplierList.records}
|
||||
pagination={pagination}
|
||||
bordered
|
||||
size="small"
|
||||
/>
|
||||
</Card>
|
||||
</>
|
||||
|
Reference in New Issue
Block a user