Merge branch '20220406-zjl-项目管理列表添加开标时间字段' into 'master-0422-合并'

4.22 项目管理列表添加开标时间字段

See merge request eshop/fe_service_ebtp_frontend!22
This commit is contained in:
周建龙
2022-04-22 20:54:30 +08:00
2 changed files with 46 additions and 8 deletions

View File

@ -57,6 +57,8 @@ const ProjectDocumentation: React.FC = () => {
render: (_: any, record: any) => { render: (_: any, record: any) => {
//标段信息 //标段信息
let sectionFirst = record?.sectionFirst; let sectionFirst = record?.sectionFirst;
//获取字段名称
let openingName = openingTimeText(record?.bidMethodDict, record?.examinationMethodDict);
return ( return (
<> <>
<Row> <Row>
@ -73,7 +75,10 @@ const ProjectDocumentation: React.FC = () => {
<div> <div>
<h4 style={{ marginBottom: '0px' }}>{sectionFirst.bidSectName}</h4> <h4 style={{ marginBottom: '0px' }}>{sectionFirst.bidSectName}</h4>
</div> </div>
{createSection(record)} {createSection(record, openingName)}
<div>
<text style={{ marginBottom: '0px' }}>{openingName}{isEmpty(sectionFirst.sectionOpenTime) ? '-' : sectionFirst.sectionOpenTime}</text>
</div>
</> </>
) )
} }
@ -154,7 +159,7 @@ const ProjectDocumentation: React.FC = () => {
* @param record * @param record
* @returns * @returns
*/ */
const createSection = (record: any) => { const createSection = (record: any, openingName: string) => {
//标段信息 //标段信息
let sectionFirst = record?.sectionFirst; let sectionFirst = record?.sectionFirst;
//是否异常 //是否异常
@ -222,7 +227,7 @@ const ProjectDocumentation: React.FC = () => {
sectionFirst.sectionCount > 1 && ( sectionFirst.sectionCount > 1 && (
<Popover <Popover
content={( content={(
<ProjectSectionInfo projectId={record.id} bidMethodDict={record.bidMethodDict} /> <ProjectSectionInfo projectId={record.id} bidMethodDict={record.bidMethodDict} openingName={openingName} />
)} )}
trigger="hover" trigger="hover"
overlayStyle={{ width: "45%" }} overlayStyle={{ width: "45%" }}
@ -236,7 +241,36 @@ const ProjectDocumentation: React.FC = () => {
</div> </div>
) )
} }
/**
* 开标时间,评审开始时间字段显示
* @param bidMethod
* @param examinationMethod
*/
const openingTimeText = (bidMethod: string, examinationMethod: string | null) => {
const bid = '开标';
const bid_pre = '资审开标';
const comparison = '开启';
const comparison_pre = '资审开启';
const negotiation = '谈判开始';
const review = '评审开始';
if (bidMethod == 'procurement_mode_1' || bidMethod == 'procurement_mode_2') {
if (examinationMethod == 'examination_method_1') { //预审
return bid_pre;
} else {
return bid;
}
} else if (bidMethod == 'procurement_mode_5' || bidMethod == 'procurement_mode_6') {
return negotiation;
} else if (bidMethod == 'procurement_mode_3') {
if (examinationMethod == 'examination_method_1') { //预审
return comparison_pre;
} else {
return comparison;
}
} else {
return review;
}
};
/** /**
* 项目跟进 * 项目跟进

View File

@ -8,14 +8,15 @@ import { getBusinessModuleName, getSectionBybidMethodDict, getTagColor } from ".
interface ProjectSectionInfoItem { interface ProjectSectionInfoItem {
projectId: string, projectId: string,
bidMethodDict: string bidMethodDict: string,
openingName: string,
} }
//进度条长度 //进度条长度
const progressWidth = { const progressWidth = {
width: '180px' width: '180px'
} }
const ProjectSectionInfo: React.FC<ProjectSectionInfoItem> = (props) => { const ProjectSectionInfo: React.FC<ProjectSectionInfoItem> = (props) => {
const { projectId, bidMethodDict } = props; const { projectId, bidMethodDict, openingName } = props;
const [listData, setListData] = useState<any[]>([]); const [listData, setListData] = useState<any[]>([]);
const [loading, setLoading] = useState<boolean>(false); const [loading, setLoading] = useState<boolean>(false);
//获取字典 //获取字典
@ -48,6 +49,9 @@ const ProjectSectionInfo: React.FC<ProjectSectionInfoItem> = (props) => {
</Col> </Col>
<Col span={14}> <Col span={14}>
{createSection(record)} {createSection(record)}
<div>
<text style={{ marginBottom: '0px' }}>{openingName}{isEmpty(record.sectionOpenTime) ? '-' : record.sectionOpenTime}</text>
</div>
</Col> </Col>
</Row> </Row>
) )