4.25 公共服务平台增加字段显示
This commit is contained in:
@ -18,6 +18,7 @@ import { history } from "umi";
|
||||
import { btnAuthority } from "@/utils/authority";
|
||||
import { getApprProcessList } from "@/utils/SeleApprovalProcess/service"
|
||||
import SeleApprovalProcess from "@/utils/SeleApprovalProcess"
|
||||
import { isEmpty } from "@/utils/CommonUtils"
|
||||
|
||||
/*
|
||||
* 招标公告开始
|
||||
@ -157,6 +158,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>
|
||||
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleRemove(record)}>删除</Button>
|
||||
</>
|
||||
);
|
||||
@ -166,6 +168,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>
|
||||
</>
|
||||
);
|
||||
let btn3 = (
|
||||
@ -175,6 +178,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>
|
||||
</>
|
||||
);
|
||||
let btn4 = (
|
||||
@ -184,6 +188,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>
|
||||
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleRemove(record)}>删除</Button>
|
||||
</>
|
||||
);
|
||||
@ -193,6 +198,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>
|
||||
<Button type="text" onClick={() => toChange(record)}>变更</Button>
|
||||
</>
|
||||
);
|
||||
@ -204,6 +210,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>
|
||||
</>
|
||||
);
|
||||
|
||||
@ -271,6 +278,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>
|
||||
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleRemove(record)}>删除</Button>
|
||||
</>
|
||||
);
|
||||
@ -280,6 +288,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>
|
||||
</>
|
||||
);
|
||||
let btn3 = (
|
||||
@ -289,6 +298,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>
|
||||
</>
|
||||
);
|
||||
let btn4 = (
|
||||
@ -298,6 +308,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>
|
||||
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleRemove(record)}>删除</Button>
|
||||
</>
|
||||
);
|
||||
@ -307,6 +318,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>
|
||||
</>
|
||||
);
|
||||
let btn6 = (
|
||||
@ -316,6 +328,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>
|
||||
</>
|
||||
);
|
||||
|
||||
|
@ -5,9 +5,10 @@ import './style.less';
|
||||
import { Anchor, BackTop, Button, Collapse, Descriptions, Form, Input, message, PageHeader, Space, Spin, Typography } from 'antd';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import { ArrowUpOutlined, CaretRightOutlined } from '@ant-design/icons';
|
||||
import { isNotEmpty } from '@/utils/CommonUtils';
|
||||
import { getURLInformation, isNotEmpty, returnDictVal } from '@/utils/CommonUtils';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
import { getPublicData, savePublicData } from '../service';
|
||||
import { getDicData } from '@/utils/session';
|
||||
|
||||
const layout = {
|
||||
labelCol: {
|
||||
@ -33,6 +34,11 @@ const PublicPlatform: React.FC<{}> = () => {
|
||||
const [readOnly, setReadOnly] = useState<boolean>(true);
|
||||
//公示or公告 true-公示 false-公告
|
||||
const [annoType, setAnnoType] = useState<boolean>(false);
|
||||
//annoId
|
||||
const annoId = getURLInformation("id");
|
||||
//获取字典
|
||||
const getDict: any = getDicData();
|
||||
const dictData = JSON.parse(getDict);
|
||||
|
||||
const { TextArea } = Input;
|
||||
const { Panel } = Collapse;
|
||||
@ -89,7 +95,7 @@ const PublicPlatform: React.FC<{}> = () => {
|
||||
rules={rules}
|
||||
extra={extra}
|
||||
>
|
||||
<ExtendUpload bid={initialValue} btnName="上传文件" uploadProps={{ disabled: readonly }} />
|
||||
<ExtendUpload bid={initialValue} btnName="上传文件" uploadProps={{ disabled: readonly, accept: ".pdf" }} />
|
||||
</Form.Item>
|
||||
)
|
||||
}
|
||||
@ -142,13 +148,20 @@ const PublicPlatform: React.FC<{}> = () => {
|
||||
return null;
|
||||
}
|
||||
//项目信息
|
||||
const projectRender = (project: any, tenderer: any, readonly: boolean) => {
|
||||
if (isNotEmpty(project) && isNotEmpty(tenderer)) {
|
||||
const projectRender = (project: any, tenderer: any, agency: any, projectRecord: any, readonly: boolean) => {
|
||||
if (isNotEmpty(project) && isNotEmpty(tenderer) && isNotEmpty(agency) && isNotEmpty(projectRecord)) {
|
||||
const rel: boolean = readonly || project.readonly;
|
||||
return (
|
||||
<>
|
||||
{returnInput("name", "纳税人名称", rel, tenderer.name, [{ required: !rel }], "纳税人名称")}
|
||||
{returnInput("code", "纳税人识别号", rel, tenderer.code, [{ required: !rel }], "纳税人识别号")}
|
||||
{returnInput("tenderProjectCode", "项目编号", true, project.tenderProjectCode)}
|
||||
{returnArea("projectName", "项目名称", true, projectRecord.projectName)}
|
||||
{returnInput("agencyCode", "招标代理机构代码", true, agency.code)}
|
||||
{returnInput("agencyCompanyName", "招标代理机构名称", true, agency.companyName)}
|
||||
{returnInput("bidOrgDict", "招标组织形式", true, returnDictVal(dictData['organization=entrust'], projectRecord.bidOrgDict))}
|
||||
{returnInput("constant", "招标代理机构联系人", true, agency.constant)}
|
||||
{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("tenderContent", "招标内容与范围及招标方案说明", rel, project.tenderContent, [{ required: !rel }], "招标内容与范围及招标方案说明")}
|
||||
</>
|
||||
@ -228,20 +241,24 @@ const PublicPlatform: React.FC<{}> = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
//获取公共服务平台数据
|
||||
getPublicData('1516966126268026880').then(res => {
|
||||
if (res?.code == 200) {
|
||||
const data = res?.data;
|
||||
setInitialData(data);
|
||||
if (isNotEmpty(data.anno)) {
|
||||
setAnnoType(data.anno.annoNature === 201);
|
||||
setReadOnly(data.anno.status != 1 && data.anno.status != 4);
|
||||
if (isNotEmpty(annoId)) {
|
||||
setLoading(true);
|
||||
//获取公共服务平台数据
|
||||
getPublicData(annoId).then(res => {
|
||||
if (res?.code == 200) {
|
||||
const data = res?.data;
|
||||
setInitialData(data);
|
||||
if (isNotEmpty(data.anno)) {
|
||||
setAnnoType(data.anno.annoNature === 201);
|
||||
setReadOnly(data.anno.status != 1 && data.anno.status != 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
}).finally(() => {
|
||||
setLoading(false);
|
||||
})
|
||||
} else {
|
||||
message.error('获取公共服务平台数据失败,请联系管理员');
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
@ -278,7 +295,7 @@ const PublicPlatform: React.FC<{}> = () => {
|
||||
id="panel1"
|
||||
key="1"
|
||||
>
|
||||
{projectRender(initialData?.project, initialData?.tenderer, readOnly)}
|
||||
{projectRender(initialData?.project, initialData?.tenderer, initialData?.agency, initialData?.projectRecord, readOnly)}
|
||||
</Panel>
|
||||
{annoType && <Panel
|
||||
header={<Text strong>中标候选人信息</Text>}
|
||||
|
Reference in New Issue
Block a user