4.25 公共服务平台增加字段显示
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import { isEmpty } from '@/utils/CommonUtils';
|
||||
import SeleApprovalProcess from '@/utils/SeleApprovalProcess';
|
||||
import { getApprProcessList } from '@/utils/SeleApprovalProcess/service';
|
||||
import { getDicData, getProId } from '@/utils/session';
|
||||
@ -67,17 +68,17 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
methodDict == 'procurement_mode_1' || methodDict == 'procurement_mode_2'
|
||||
? '标段'
|
||||
: methodDict == 'procurement_mode_4'
|
||||
? '包件'
|
||||
: '采购包';
|
||||
? '包件'
|
||||
: '采购包';
|
||||
useEffect(() => {
|
||||
if(drawerVisible) {
|
||||
if (drawerVisible) {
|
||||
//初始化字典
|
||||
const data: any = getDicData();
|
||||
setDictData(JSON.parse(data));
|
||||
//存储项目数据
|
||||
setProjectData(values);
|
||||
}
|
||||
}, [values?.id,drawerVisible]);
|
||||
}, [values?.id, drawerVisible]);
|
||||
|
||||
const getSectionList = async (param: any, id: any) => {
|
||||
let params = {
|
||||
@ -193,15 +194,15 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
};
|
||||
//公告提交审批
|
||||
const toApproval = async (param: any) => {
|
||||
if(param.sendMessageId == null) {
|
||||
if (param.sendMessageId == null) {
|
||||
message.info("请先编辑失败公告")
|
||||
} else {
|
||||
setLoading(true);
|
||||
//获取流程列表
|
||||
getApprProcessList(param.sendMessageId).then(res => {
|
||||
if(res?.code == 200) {
|
||||
if (res?.code == 200) {
|
||||
const data = res?.data
|
||||
if(data?.approval == true) {//打开选择流程界面
|
||||
if (data?.approval == true) {//打开选择流程界面
|
||||
setRecordData(param)
|
||||
setApprovalData(data?.list)
|
||||
setApprovalVisible(true)
|
||||
@ -237,7 +238,7 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
const toApprovalFor = async (record: any) => {
|
||||
setLoading(true)
|
||||
await getApprovalFor(record.sendMessageId).then(res => {
|
||||
if(res?.code == 200 || res?.success == true) {
|
||||
if (res?.code == 200 || res?.success == true) {
|
||||
const data = res?.data;
|
||||
let durl = /http:\/\/([^\/]+)\//i;
|
||||
let d = data?.traceDetailUrl?.replace(durl, '/');
|
||||
@ -309,10 +310,10 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
//按钮逻辑判断
|
||||
record.status == 0 && record.sendMessageStatus == 7 ? ( //草稿-无需发布
|
||||
<>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
编辑
|
||||
</Button>
|
||||
<Button type="text" key="4" onClick={() => toTakeEffect(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="4" onClick={() => toTakeEffect(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
生效
|
||||
</Button>
|
||||
<Popconfirm
|
||||
@ -321,7 +322,7 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
@ -334,10 +335,10 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
(record.sendMessageStatus == 0 ||
|
||||
record.sendMessageStatus == 1) ? ( //草稿-公告未编辑-公告已编辑
|
||||
<>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
编辑
|
||||
</Button>
|
||||
<Button type="text" key="5" onClick={() => toEditNotice(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="5" onClick={() => toEditNotice(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
编辑失败公告
|
||||
</Button>
|
||||
<Popconfirm
|
||||
@ -346,24 +347,25 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="8" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="8" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
失败公告提交审批
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.sendMessageId)}>公共服务平台</a>
|
||||
<Popconfirm
|
||||
title="确定要删除吗?"
|
||||
onConfirm={() => toDelete(record)}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</>
|
||||
) : record.status == 0 && record.sendMessageStatus == 2 ? ( //草稿-公告已提交
|
||||
<>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
编辑
|
||||
</Button>
|
||||
<Button type="text" key="6" onClick={() => toViewNotice(record)}>
|
||||
@ -372,20 +374,21 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (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.sendMessageId)}>公共服务平台</a>
|
||||
<Popconfirm
|
||||
title="确定要删除吗?"
|
||||
onConfirm={() => toDelete(record)}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</>
|
||||
) : record.status == 0 && record.sendMessageStatus == 3 ? ( //草稿-公告已审批通过
|
||||
<>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
编辑
|
||||
</Button>
|
||||
<Button type="text" key="6" onClick={() => toViewNotice(record)}>
|
||||
@ -400,54 +403,56 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="7" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="7" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
发布失败公告
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.sendMessageId)}>公共服务平台</a>
|
||||
<Popconfirm
|
||||
title="确定要删除吗?"
|
||||
onConfirm={() => toDelete(record)}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</>
|
||||
) : record.status == 0 && record.sendMessageStatus == 4 ? ( //草稿-审批不通过
|
||||
<>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
编辑
|
||||
</Button>
|
||||
<Button type="text" key="5" onClick={() => toEditNotice(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
编辑失败公告
|
||||
</Button>
|
||||
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
|
||||
<>
|
||||
<Button type="text" key="1" onClick={() => toEdit(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
编辑
|
||||
</Button>
|
||||
<Button type="text" key="5" onClick={() => toEditNotice(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
编辑失败公告
|
||||
</Button>
|
||||
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
|
||||
查看审批流程
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title="确定要提交审批吗?"
|
||||
onConfirm={() => toApproval(record)}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="8" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
失败公告提交审批
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
<Popconfirm
|
||||
title="确定要删除吗?"
|
||||
onConfirm={() => toDelete(record)}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</>
|
||||
) : record.status == 0 && record.sendMessageStatus == 5 ? ( //草稿-公告已发布
|
||||
<Popconfirm
|
||||
title="确定要提交审批吗?"
|
||||
onConfirm={() => toApproval(record)}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="8" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
失败公告提交审批
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.sendMessageId)}>公共服务平台</a>
|
||||
<Popconfirm
|
||||
title="确定要删除吗?"
|
||||
onConfirm={() => toDelete(record)}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</>
|
||||
) : record.status == 0 && record.sendMessageStatus == 5 ? ( //草稿-公告已发布
|
||||
<>
|
||||
<Button type="text" key="2" onClick={() => toView(record)}>
|
||||
查看
|
||||
@ -458,9 +463,10 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
<Button type="text" key="9" onClick={() => toApprovalFor(record)}>
|
||||
查看审批流程
|
||||
</Button>
|
||||
<Button type="text" key="4" onClick={() => toTakeEffect(record)} hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="4" onClick={() => toTakeEffect(record)} hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
生效
|
||||
</Button>
|
||||
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.sendMessageId)}>公共服务平台</a>
|
||||
</>
|
||||
) : record.status == 0 && record.sendMessageStatus == 6 ? ( //草稿-公告发布失败
|
||||
<>
|
||||
@ -479,17 +485,18 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="7" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="7" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
发布失败公告
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
<a hidden={isEmpty(record.hasCtpsp) || !record.hasCtpsp} type="text" key="common" style={{ color: '#b30000', paddingLeft: 4 }} onClick={() => window.open('/PublicPlatform' + '?id=' + record.sendMessageId)}>公共服务平台</a>
|
||||
<Popconfirm
|
||||
title="确定要删除吗?"
|
||||
onConfirm={() => toDelete(record)}
|
||||
okText="确定"
|
||||
cancelText="取消"
|
||||
>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}>
|
||||
<Button type="text" key="3" hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}>
|
||||
删除
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
@ -505,6 +512,7 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (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.sendMessageId)}>公共服务平台</a>
|
||||
</>
|
||||
) : null,
|
||||
},
|
||||
@ -538,7 +546,7 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
style={{ marginBottom: 12, zIndex: 99 }}
|
||||
onClick={() => toAdd()}
|
||||
loading={addLoading}
|
||||
hidden={btnAuthority(["ebtp-agency-project-manager","ebtp-purchase"])}
|
||||
hidden={btnAuthority(["ebtp-agency-project-manager", "ebtp-purchase"])}
|
||||
>
|
||||
创建异常处理
|
||||
</Button>
|
||||
@ -560,7 +568,7 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
total: res.data.total,
|
||||
current: res.data.current,
|
||||
};
|
||||
}) : {data: [],success: false}
|
||||
}) : { data: [], success: false }
|
||||
}
|
||||
rowKey="id"
|
||||
pagination={{
|
||||
@ -634,13 +642,13 @@ const ExceptionHandling: React.FC<ExceptionHandlingProps> = (props) => {
|
||||
projectData={values}
|
||||
/>}
|
||||
{approvalVisible ? (
|
||||
<SeleApprovalProcess modalVisible={approvalVisible} onCancel={() => {
|
||||
setApprovalVisible(false)
|
||||
setApprovalData([])
|
||||
setRecordData({})
|
||||
actionRef.current?.reload?.();
|
||||
}} data={approvalData} annoId={recordData?.sendMessageId} />
|
||||
) : null}
|
||||
<SeleApprovalProcess modalVisible={approvalVisible} onCancel={() => {
|
||||
setApprovalVisible(false)
|
||||
setApprovalData([])
|
||||
setRecordData({})
|
||||
actionRef.current?.reload?.();
|
||||
}} data={approvalData} annoId={recordData?.sendMessageId} />
|
||||
) : null}
|
||||
</Drawer>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user