From cd58ad7e326757ccb1c3f9cae613b84c605d086a Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Fri, 20 May 2022 14:00:39 +0800 Subject: [PATCH] =?UTF-8?q?5.20=20=E5=A4=9A=E8=BD=AE=E6=8B=9B=E5=8B=9F?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E5=85=AC=E5=91=8A=E5=A2=9E=E5=8A=A0=E5=86=8D?= =?UTF-8?q?=E6=AC=A1=E5=8F=91=E5=B8=83=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=8E=9F?= =?UTF-8?q?=E5=85=AC=E5=91=8A=E5=86=8D=E6=AC=A1=E5=8F=91=E5=B8=83=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BiddingAnnouncementList.tsx | 46 +++++++++++++------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/src/pages/ZZhaoMu/Bid/BiddingAnnouncement/BiddingAnnouncementList.tsx b/src/pages/ZZhaoMu/Bid/BiddingAnnouncement/BiddingAnnouncementList.tsx index 865bc6c..763421e 100644 --- a/src/pages/ZZhaoMu/Bid/BiddingAnnouncement/BiddingAnnouncementList.tsx +++ b/src/pages/ZZhaoMu/Bid/BiddingAnnouncement/BiddingAnnouncementList.tsx @@ -1,4 +1,4 @@ -import { UnorderedListOutlined } from "@ant-design/icons" +import { ExclamationCircleOutlined, UnorderedListOutlined } from "@ant-design/icons" import ProTable, { ActionType, ProColumns } from "@ant-design/pro-table" import { Button, Card, Divider, Drawer, message, Modal, Spin, Table, Tabs } from "antd" import React, { useEffect, useRef, useState } from "react" @@ -59,6 +59,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => { const [approvalVisible, setApprovalVisible] = useState(false);//选择流程弹窗控制参数 const [approvalData, setApprovalData] = useState([]);//选择流程数据存储 const { TabPane } = Tabs; + const { confirm } = Modal; const columns: ProColumns[] = [ { title: '公告名称', @@ -290,6 +291,8 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => { + {getProMethod() == "procurement_mode_4" ? + : null} ); let btn6 = ( @@ -495,17 +498,32 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => { /** * 再次发布 * */ - const handleReleaseAgain = async (record: any) => { - setPageloading(true); - await releaseNoticeAgain(record.id).then(res => { - if (res.code == 200) { - message.success('发布成功'); - if (type == "change" || type == "changeNew") { - GetList(FpkId); + const handleReleaseAgain = (record: any) => { + const releaseAgain = async () => { + setPageloading(true); + await releaseNoticeAgain(record.id).then(res => { + if (res.code == 200) { + message.success('发布成功'); + if (type == "change" || type == "changeNew") { + GetList(FpkId); + } } - } - setRefresh(Math.random() + 1) - }).finally(() => setPageloading(false)); + setRefresh(Math.random() + 1) + }).finally(() => setPageloading(false)); + } + if (record?.hasChangeAnno) {//存在处于已发布状态的变更公告 + confirm({ + title: '有已发布的变更公告,是否再次发布原公告?', + icon: , + centered: true, + okText: '发布', + onOk() { + releaseAgain(); + }, + }); + } else { + releaseAgain(); + } }; /** @@ -527,13 +545,13 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => { /** * 发起审批 * */ - const handleApproval = async (record: any) => { + const handleApproval = async (record: any) => { setPageloading(true); //获取流程列表 getApprProcessList(record.id).then(res => { - if(res?.code == 200) { + if (res?.code == 200) { const data = res?.data - if(data?.approval == true) {//打开选择流程界面 + if (data?.approval == true) {//打开选择流程界面 setRecordData(record) setApprovalData(data?.list) setApprovalVisible(true)