Merge branch '20220520-常态化招募项目再次发布无法发布最新公告' into 'master-20220527'
5.27 常态化招募项目再次发布无法发布最新公告 See merge request eshop/fe_service_ebtp_frontend!82
This commit is contained in:
@ -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<boolean>(false);//选择流程弹窗控制参数
|
||||
const [approvalData, setApprovalData] = useState<any[]>([]);//选择流程数据存储
|
||||
const { TabPane } = Tabs;
|
||||
const { confirm } = Modal;
|
||||
const columns: ProColumns<DataItem>[] = [
|
||||
{
|
||||
title: '公告名称',
|
||||
@ -290,6 +291,8 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
|
||||
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
|
||||
查看审批流程
|
||||
</Button>
|
||||
{getProMethod() == "procurement_mode_4" ?
|
||||
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleReleaseAgain(record)}>再次发布</Button> : null}
|
||||
</>
|
||||
);
|
||||
let btn6 = (
|
||||
@ -495,7 +498,8 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
|
||||
/**
|
||||
* 再次发布
|
||||
* */
|
||||
const handleReleaseAgain = async (record: any) => {
|
||||
const handleReleaseAgain = (record: any) => {
|
||||
const releaseAgain = async () => {
|
||||
setPageloading(true);
|
||||
await releaseNoticeAgain(record.id).then(res => {
|
||||
if (res.code == 200) {
|
||||
@ -506,6 +510,20 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
|
||||
}
|
||||
setRefresh(Math.random() + 1)
|
||||
}).finally(() => setPageloading(false));
|
||||
}
|
||||
if (record?.hasChangeAnno) {//存在处于已发布状态的变更公告
|
||||
confirm({
|
||||
title: '有已发布的变更公告,是否再次发布原公告?',
|
||||
icon: <ExclamationCircleOutlined />,
|
||||
centered: true,
|
||||
okText: '发布',
|
||||
onOk() {
|
||||
releaseAgain();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
releaseAgain();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user