4.27 新增字段及样式修改

This commit is contained in:
jl-zhoujl2
2022-04-27 09:07:48 +08:00
parent d89fe1fe11
commit 606e45a92f
3 changed files with 89 additions and 45 deletions

View File

@ -8,7 +8,8 @@ import { ArrowUpOutlined, CaretRightOutlined } from '@ant-design/icons';
import { getURLInformation, isNotEmpty, returnDictVal } from '@/utils/CommonUtils';
import ExtendUpload from '@/utils/ExtendUpload';
import { getPublicData, savePublicData } from '../service';
import { getDicData } from '@/utils/session';
import { getDefId, getDicData, getProMethod } from '@/utils/session';
import { getAllFlowNameByRoomType } from '@/utils/FlowUtils';
const layout = {
labelCol: {
@ -34,8 +35,16 @@ const PublicPlatform: React.FC<{}> = () => {
const [readOnly, setReadOnly] = useState<boolean>(true);
//公示or公告 true-公示 false-公告
const [annoType, setAnnoType] = useState<boolean>(false);
//annoId
//annoId 公告公示id
const annoId = getURLInformation("id");
//资审流程所处阶段 (roomType 2是后审1是预审)
const roomType = getURLInformation('roomType') === null ? '2' : getURLInformation('roomType');
//采购方式
const proMethod = getProMethod();
//所有流程名
const flowName = getAllFlowNameByRoomType(proMethod, roomType);
//流程id
const defId = getDefId();
//获取字典
const getDict: any = getDicData();
const dictData = JSON.parse(getDict);
@ -67,7 +76,7 @@ const PublicPlatform: React.FC<{}> = () => {
)
}
//TextArea
function returnArea(name: string | string[], label: string, readonly: boolean, initialValue: string | null, rules?: any[], placeholder?: string, extra?: React.ReactNode) {
function returnArea(name: string | string[], label: string, readonly: boolean, initialValue: string | null, rules?: any[], placeholder?: string, extra?: React.ReactNode, maxLength?: number) {
return (
<Form.Item
name={name}
@ -78,7 +87,9 @@ const PublicPlatform: React.FC<{}> = () => {
>
<TextArea
bordered={!readonly}
showCount={!readonly}
readOnly={readonly}
maxLength={maxLength ? maxLength : 2000}
rows={3}
autoSize={readonly}
placeholder={placeholder}
@ -95,7 +106,7 @@ const PublicPlatform: React.FC<{}> = () => {
rules={rules}
extra={extra}
>
<ExtendUpload bid={initialValue} btnName="上传文件" uploadProps={{ disabled: readonly, accept: ".pdf" }} />
<ExtendUpload bid={initialValue} btnName="上传文件" maxCount={1} uploadProps={{ disabled: readonly, accept: ".pdf" }} />
</Form.Item>
)
}
@ -140,8 +151,8 @@ const PublicPlatform: React.FC<{}> = () => {
{returnArea([item.sectionId, item.id, 'pmCeritficates'], "项目负责人相关证书和编号", readonly, item.pmCeritficates, [{ required: !readonly }], "项目负责人相关证书和编号")}
{returnArea([item.sectionId, item.id, 'quality'], "质量", readonly, item.quality, [{ required: !readonly }], "质量")}
{returnArea([item.sectionId, item.id, 'evaluationStatus'], "评标情况", readonly, item.evaluationStatus, [{ required: !readonly }], "评标情况")}
{returnArea([item.sectionId, item.id, 'winCandidateQualification'], "中标候选人响应招标文件的资格能力条件", readonly, item.winCandidateQualification, [{ required: !readonly }], "中标候选人响应招标文件的资格能力条件")}
{returnInput([item.sectionId, item.id, 'timeLimit'], "工期/交货期/服务期", readonly, item.timeLimit, [{ required: !readonly }], "工期/交货期/服务期", null, 200, "number", "天")}
{returnArea([item.sectionId, item.id, 'winCandidateQualification'], "资格能力条件", readonly, item.winCandidateQualification, [{ required: !readonly }], "中标候选人响应招标文件的资格能力条件")}
{returnInput([item.sectionId, item.id, 'timeLimit'], "工期/交货期/服务期", readonly, readonly ? item.timeLimit + "天" : item.timeLimit, [{ required: !readonly }], "天数", null, 100, readonly ? void 0 : "number", readonly ? null : "天")}
</Panel>
))
}
@ -162,7 +173,7 @@ const PublicPlatform: React.FC<{}> = () => {
{returnInput("tel", "招标代理机构联系电话", true, agency.tel)}
{returnInput("name", "招标人名称", rel, tenderer.name, [{ required: !rel }], "招标人名称")}
{returnInput("code", "招标人代码", rel, tenderer.code, [{ required: !rel }], "统一社会信用代码")}
{returnArea("projectScale", "项目规模", rel, project.projectScale, [{ required: !rel }], "项目规模")}
{returnArea("projectScale", "项目规模", rel, project.projectScale, [{ required: !rel }], "项目规模", null, 500)}
{returnArea("tenderContent", "招标内容与范围及招标方案说明", rel, project.tenderContent, [{ required: !rel }], "招标内容与范围及招标方案说明")}
</>
)
@ -172,7 +183,37 @@ const PublicPlatform: React.FC<{}> = () => {
//公告&公示信息
const annoRender = (anno: any, readonly: boolean) => {
if (isNotEmpty(anno)) {
return returnUpload("ctpspFileId", "PDF公示文件", readonly, anno.ctpspFileId, [{ required: !readonly }])
if (anno.annoNature === 1 || anno.annoNature === 7 || anno.annoNature === 8) {//公告&变更公告&再次发布
return (
<>
{returnArea("annoTitle", "公告名称", true, anno.annoTitle)}
{returnInput("docStartTime", flowName['fileName'] + "文件获取开始时间", true, anno.docStartTime)}
{returnInput("docEndTime", flowName['fileName'] + "文件获取截止时间", true, anno.docEndTime)}
{returnInput("replyEndTime", flowName['response'] + "截止时间", true, anno.replyEndTime)}
{defId != "recruit_multi" && returnInput("openingTime", flowName['review'] + "时间", true, anno.openingTime)}
{returnUpload("ctpspFileId", "PDF公告文件", readonly, anno.ctpspFileId, [{ required: !readonly, message: '请上传' }])}
</>
)
} else if (anno.annoNature === 4) {//失败公告
return (
<>
{returnArea("annoTitle", "失败公告名称", true, anno.annoTitle)}
{returnInput("annoStartTime", "失败公告发布时间", true, anno.annoStartTime)}
{returnInput("annoEndTime", "失败公告结束时间", true, anno.annoEndTime)}
{returnUpload("ctpspFileId", "PDF公告文件", readonly, anno.ctpspFileId, [{ required: !readonly, message: '请上传' }])}
</>
)
} else if (anno.annoNature === 201) {//公示
return (
<>
{returnArea("annoTitle", "公示名称", true, anno.annoTitle)}
{returnInput("docStartTime", "公示开始时间", true, anno.docStartTime)}
{returnInput("docEndTime", "公示结束时间", true, anno.docEndTime)}
{returnUpload("ctpspFileId", "PDF公示文件", readonly, anno.ctpspFileId, [{ required: !readonly, message: '请上传' }])}
</>
)
}
return
}
return null;
}
@ -203,7 +244,7 @@ const PublicPlatform: React.FC<{}> = () => {
for (const item of data?.sections) {
if (isNotEmpty(item.suppliers)) {
for (const val of item.suppliers) {
const formData: any = form.getFieldValue(val.id);
const formData: any = form.getFieldValue([item.id, val.id]);
val.pmName = formData.pmName;
val.pmCode = formData.pmCode;
val.pmCeritficates = formData.pmCeritficates;
@ -273,7 +314,7 @@ const PublicPlatform: React.FC<{}> = () => {
<PageHeader
title={
<Space>
<Button type='primary' key='save' hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} onClick={() => onSave()}></Button>
{!readOnly && <Button type='primary' key='save' hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} onClick={() => onSave()}></Button>}
<Button key='close' onClick={() => window.close()}></Button>
</Space>
}
@ -282,9 +323,9 @@ const PublicPlatform: React.FC<{}> = () => {
<div style={{ padding: '0px 24px' }}>
<div style={{ width: '85%', float: 'left', borderRadius: '8px', }}>
<PageHeader
title={<Text strong></Text>}
title={<Text strong></Text>}
/>
<div style={{ height: innerHeight - 180, overflowY: 'auto' }} ref={setContainer}>
<div style={{ height: innerHeight - 180, overflowY: 'auto' }} className="public-platform" ref={setContainer}>
<Form {...layout} form={form} scrollToFirstError name="public-platform" validateMessages={validateMessages}>
<Collapse
defaultActiveKey={['1', '2', '3', '4']}

View File

@ -1,25 +1,25 @@
@import '~antd/lib/style/themes/default.less';
.card-onmouse{
// margin:auto;
.ant-image{
position: absolute;
left: 0px;
z-index: 1,
}
.text-css{
width:100%;
text-align: center;
font-size: 20px;
position: absolute;
z-index: 99;
color: white;
top: 50%;
transform: translateY(-50%);
}
.card-onmouse {
// margin:auto;
.ant-image {
position: absolute;
left: 0px;
z-index: 1;
}
.text-css {
position: absolute;
top: 50%;
z-index: 99;
width: 100%;
color: white;
font-size: 20px;
text-align: center;
transform: translateY(-50%);
}
}
.card-onmouse:hover{
box-shadow: 8px 8px 5px #9e9e9e;/*设置阴影,可以自定义参数*/
.card-onmouse:hover {
box-shadow: 8px 8px 5px #9e9e9e; /*设置阴影,可以自定义参数*/
}
.header {
display: flex;
@ -70,16 +70,19 @@
color: rgb(255, 255, 255);
}
.ant-affix {
top: 134px !important;
top: 135px !important;
}
}
.backtop {
width: 40px;
height: 40px;
color: #fff;
font-size: 14px;
line-height: 40px;
text-align: center;
background-color: rgb(179, 0, 0);
border-radius: 4px;
font-size: 14px;
}
.public-platform .ant-form-item {
margin-bottom: 22px;
}

View File

@ -127,7 +127,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => toEdit(record)}></Button>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" disabled={pageloading} onClick={() => handleApproval(record)}></Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleRemove(record)}></Button>
</>
);
@ -137,7 +137,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
</>
);
let btn3 = (
@ -147,7 +147,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
</>
);
let btn4 = (
@ -157,7 +157,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleRemove(record)}></Button>
</>
);
@ -167,7 +167,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
<Button type="text" onClick={() => toChange(record)}></Button>
</>
);
@ -179,7 +179,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
</>
);
@ -247,7 +247,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => toEdit4Change(record)}></Button>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" disabled={pageloading} onClick={() => handleApproval(record)}></Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleRemove(record)}></Button>
</>
);
@ -257,7 +257,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
</>
);
let btn3 = (
@ -267,7 +267,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
</>
);
let btn4 = (
@ -277,7 +277,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleRemove(record)}></Button>
</>
);
@ -287,7 +287,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
</>
);
let btn6 = (
@ -297,7 +297,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
</Button>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id)}></a>
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.id + '&roomType=1')}></a>
</>
);