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 ProTable, { ActionType, ProColumns } from "@ant-design/pro-table"
|
||||||
import { Button, Card, Divider, Drawer, message, Modal, Spin, Table, Tabs } from "antd"
|
import { Button, Card, Divider, Drawer, message, Modal, Spin, Table, Tabs } from "antd"
|
||||||
import React, { useEffect, useRef, useState } from "react"
|
import React, { useEffect, useRef, useState } from "react"
|
||||||
@ -59,6 +59,7 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
|
|||||||
const [approvalVisible, setApprovalVisible] = useState<boolean>(false);//选择流程弹窗控制参数
|
const [approvalVisible, setApprovalVisible] = useState<boolean>(false);//选择流程弹窗控制参数
|
||||||
const [approvalData, setApprovalData] = useState<any[]>([]);//选择流程数据存储
|
const [approvalData, setApprovalData] = useState<any[]>([]);//选择流程数据存储
|
||||||
const { TabPane } = Tabs;
|
const { TabPane } = Tabs;
|
||||||
|
const { confirm } = Modal;
|
||||||
const columns: ProColumns<DataItem>[] = [
|
const columns: ProColumns<DataItem>[] = [
|
||||||
{
|
{
|
||||||
title: '公告名称',
|
title: '公告名称',
|
||||||
@ -290,6 +291,8 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
|
|||||||
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
|
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
|
||||||
查看审批流程
|
查看审批流程
|
||||||
</Button>
|
</Button>
|
||||||
|
{getProMethod() == "procurement_mode_4" ?
|
||||||
|
<Button hidden={btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} type="text" onClick={() => handleReleaseAgain(record)}>再次发布</Button> : null}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
let btn6 = (
|
let btn6 = (
|
||||||
@ -495,17 +498,32 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
|
|||||||
/**
|
/**
|
||||||
* 再次发布
|
* 再次发布
|
||||||
* */
|
* */
|
||||||
const handleReleaseAgain = async (record: any) => {
|
const handleReleaseAgain = (record: any) => {
|
||||||
setPageloading(true);
|
const releaseAgain = async () => {
|
||||||
await releaseNoticeAgain(record.id).then(res => {
|
setPageloading(true);
|
||||||
if (res.code == 200) {
|
await releaseNoticeAgain(record.id).then(res => {
|
||||||
message.success('发布成功');
|
if (res.code == 200) {
|
||||||
if (type == "change" || type == "changeNew") {
|
message.success('发布成功');
|
||||||
GetList(FpkId);
|
if (type == "change" || type == "changeNew") {
|
||||||
|
GetList(FpkId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
setRefresh(Math.random() + 1)
|
||||||
setRefresh(Math.random() + 1)
|
}).finally(() => setPageloading(false));
|
||||||
}).finally(() => setPageloading(false));
|
}
|
||||||
|
if (record?.hasChangeAnno) {//存在处于已发布状态的变更公告
|
||||||
|
confirm({
|
||||||
|
title: '有已发布的变更公告,是否再次发布原公告?',
|
||||||
|
icon: <ExclamationCircleOutlined />,
|
||||||
|
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);
|
setPageloading(true);
|
||||||
//获取流程列表
|
//获取流程列表
|
||||||
getApprProcessList(record.id).then(res => {
|
getApprProcessList(record.id).then(res => {
|
||||||
if(res?.code == 200) {
|
if (res?.code == 200) {
|
||||||
const data = res?.data
|
const data = res?.data
|
||||||
if(data?.approval == true) {//打开选择流程界面
|
if (data?.approval == true) {//打开选择流程界面
|
||||||
setRecordData(record)
|
setRecordData(record)
|
||||||
setApprovalData(data?.list)
|
setApprovalData(data?.list)
|
||||||
setApprovalVisible(true)
|
setApprovalVisible(true)
|
||||||
|
Reference in New Issue
Block a user