资审招标--资审公告去掉开标大厅选项;删除添加删除提示

This commit is contained in:
sunyu
2025-08-01 14:55:26 +08:00
parent 5fd601fa68
commit 9c9bc9ce1e
2 changed files with 141 additions and 101 deletions

View File

@ -444,46 +444,82 @@ const BiddingAnnouncementList: React.FC<{}> = (props) => {
* @param selectedRows
*/
const handleRemove = async (record: any) => {
// 显示确认对话框
Modal.confirm({
title: '确认删除',
content: '您确定要删除这条数据吗?此操作不可撤销。',
okText: '确认',
cancelText: '取消',
onOk: async () => {
// 用户确认后执行删除操作
setPageloading(true);
removeNotice(record.id).then(res => {
if (res.code == 200) {
try {
const res = await removeNotice(record.id);
if (res.code === 200) {
message.success('删除成功');
if (type == "change" || type == "changeNew") {
if (type === "change" || type === "changeNew") {
GetList(FpkId);
} else {
setRefresh(Math.random() + 1)
setRefresh(Math.random() + 1);
}
}
setRefresh(Math.random() + 1)
} catch (error) {
message.error('删除失败,请稍后重试');
console.error('删除出错:', error);
} finally {
setRefresh(Math.random() + 1);
setPageloading(false);
}
},
onCancel: () => {
// 用户取消删除,不执行任何操作
console.log('用户取消了删除操作');
}
});
};
/**
* 批量删除
* */
const handleRemoveMore = async () => {
if (selectedRowsState.length != 0) {
if (selectedRowsState.length !== 0) {
// 显示确认对话框
Modal.confirm({
title: '确认删除',
content: `您确定要删除选中的 ${selectedRowsState.length} 条数据吗?此操作不可撤销。`,
okText: '确认',
cancelText: '取消',
onOk: async () => {
// 用户确认后执行删除操作
setPageloading(true);
let param = []
for (const item of selectedRowsState) {
param.push(item.id);
}
removeNotice(param).then(res => {
if (res.code == 200) {
const param = selectedRowsState.map(item => item.id);
try {
const res = await removeNotice(param);
if (res.code === 200) {
message.success('删除成功');
if (type == "change" || type == "changeNew") {
if (type === "change" || type === "changeNew") {
GetList(FpkId);
} else {
setRefresh(Math.random() + 1)
setRefresh(Math.random() + 1);
}
;
}
setRefresh(Math.random() + 1)
} catch (error) {
message.error('删除失败,请稍后重试');
console.error('删除出错:', error);
} finally {
setRefresh(Math.random() + 1);
setPageloading(false);
}
},
onCancel: () => {
// 用户取消删除,不执行任何操作
console.log('用户取消了删除操作');
}
});
}
};
/**
* 发布
* */

View File

@ -171,7 +171,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
"replyEndTime": moment(data.replyEndTime, 'yyyy-MM-DD HH:mm:ss'),
"openingTime": moment(data.openingTime, 'yyyy-MM-DD HH:mm:ss'),
"docEndTime": moment(data.docEndTime, 'yyyy-MM-DD HH:mm:ss'),
"openhallIdTime": data.openhallTitle,//开标大厅 时间段
// "openhallIdTime": data.openhallTitle,//开标大厅 时间段
"openhallId": data.openhallId,
"annoTitle": data.annoTitle,
"medias": data.medias,
@ -212,7 +212,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
"replyEndTime": moment(data.replyEndTime, 'yyyy-MM-DD HH:mm:ss'),
"openingTime": moment(data.openingTime, 'yyyy-MM-DD HH:mm:ss'),
"docEndTime": moment(data.docEndTime, 'yyyy-MM-DD HH:mm:ss'),
"openhallIdTime": data.openhallTitle,//开标大厅 时间段
// "openhallIdTime": data.openhallTitle,//开标大厅 时间段
"openhallId": data.openhallId,
"annoTitle": data.annoTitle,
"medias": data.medias,
@ -248,7 +248,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
"replyEndTime": moment(data.replyEndTime, 'yyyy-MM-DD HH:mm:ss'),
"openingTime": moment(data.openingTime, 'yyyy-MM-DD HH:mm:ss'),
"docEndTime": moment(data.docEndTime, 'yyyy-MM-DD HH:mm:ss'),
"openhallIdTime": data.openhallTitle,//开标大厅 时间段
// "openhallIdTime": data.openhallTitle,//开标大厅 时间段
"openhallId": data.openhallId,
"annoTitle": data.annoTitle,
"medias": data.medias,
@ -292,7 +292,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
"replyEndTime": moment(data.replyEndTime, 'yyyy-MM-DD HH:mm:ss'),
"openingTime": moment(data.openingTime, 'yyyy-MM-DD HH:mm:ss'),
"docEndTime": moment(data.docEndTime, 'yyyy-MM-DD HH:mm:ss'),
"openhallIdTime": data.openhallTitle,//开标大厅 时间段
// "openhallIdTime": data.openhallTitle,//开标大厅 时间段
"openhallId": data.openhallId,
"annoTitle": data.annoTitle,
"medias": data.medias,
@ -397,7 +397,7 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
"tpId": tpId,
"csAnnoId": pkId,
"attDatasetId": form.getFieldValue("attDatasetId"),
"openhallTitle": form.getFieldValue("openhallIdTime"),//开标大厅 时间段
// "openhallTitle": form.getFieldValue("openhallIdTime"),//开标大厅 时间段
"contentWithStyle": braftRef.current.getHtml().replace(/<table border="0"/, '<table border="1"'),//正文
"contentText": "",//内容文本 file id
"openingPlace": "开标地点",
@ -448,9 +448,11 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
message.warn('资审投标截止时间需与资审文件获取截止时间间隔不少于5天');
} else if (moment(form.getFieldValue("openingTime")).diff(moment(form.getFieldValue("replyEndTime")), "minutes") != 0) {
message.warn('资审开标时间(' + form.getFieldValue("openingTime").format("yyyy-MM-DD HH:mm") + ')需与资审投标截止时间(' + form.getFieldValue("replyEndTime").format("yyyy-MM-DD HH:mm") + ')相同');
} else if (form.getFieldValue("openhallIdTime").substring(0, 10) != moment(form.getFieldValue("openingTime")).format('YYYY-MM-DD')) {
message.warn('开标大厅时间需与资审开标时间相同');
} else {
}
// else if (form.getFieldValue("openhallIdTime").substring(0, 10) != moment(form.getFieldValue("openingTime")).format('YYYY-MM-DD')) {
// message.warn('开标大厅时间需与资审开标时间相同');
// }
else {
msg = "true"
}
/**比选一阶段 资格预审 */
@ -463,9 +465,11 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
message.warn('资审应答截止时间需与资审文件获取开始时间间隔不少于8天');
} else if (form.getFieldValue("openingTime").format('YYYY-MM-DD HH:mm:ss') < form.getFieldValue("replyEndTime").format('YYYY-MM-DD HH:mm:ss')) {
message.warn('资审开启时间需晚于或等于资审应答截止时间');
} else if (form.getFieldValue("openhallIdTime").substring(0, 10) != moment(form.getFieldValue("openingTime")).format('YYYY-MM-DD')) {
message.warn('开启大厅时间需与资审开启时间相同');
} else {
}
// else if (form.getFieldValue("openhallIdTime").substring(0, 10) != moment(form.getFieldValue("openingTime")).format('YYYY-MM-DD')) {
// message.warn('开启大厅时间需与资审开启时间相同');
// }
else {
msg = "true"
}
} else {
@ -694,69 +698,69 @@ const BiddingAnnouncement: React.FC<BiddingAnnouncementProps> = (props) => {
<Form.Item name="openhallId" hidden={true}>
<Input style={{ width: "60%", display: "none" }} />
</Form.Item>
<Form.Item
label={`${openText}大厅`}
>
<Row>
<Col span={20}>
<Form.Item
name="openhallIdTime"
rules={[
{
required: true,
message: '当前项不可为空',
},
]}
>
<Input style={{ width: "60%" }} disabled={true} />
</Form.Item>
</Col>
<Col span={4}>
<Button type="primary" disabled={editInformation} style={{ marginLeft: "8px" }}
onClick={() => getChooseRoomList()}></Button>
</Col>
</Row>
<Modal
visible={choiceHallType}
destroyOnClose
title={`选择${openText}大厅`}
width={800}
bodyStyle={{ padding: '32px 40px 48px', overflowY: 'auto' }}
centered={true}
closable={false}
footer={(
<>
<Button onClick={() => setChoiceHallType(false)}></Button>
</>
)}
>
<p style={{ color: 'red', marginLeft: 12, fontSize: 16 }}>~</p>
<List
grid={{
gutter: 16,
xs: 3,
sm: 3,
md: 3,
lg: 3,
xl: 3,
xxl: 3,
}}
style={{ padding: 12 }}
dataSource={choiceHallData}
renderItem={(item: any) => (
<List.Item onClick={() => confirmChooseRoom(item)}>
<div className='card-onmouse' style={{ textAlign: 'center', position: 'relative', cursor: 'pointer', height: 113.42 }}>
<Image width='100%' src={Dating} preview={false} />
<div className='text-css'>
<div>{item.openDate}</div>
<div>{item.num}/{item.max}</div>
</div>
</div>
</List.Item>
)}
/>
</Modal>
</Form.Item>
{/*<Form.Item*/}
{/* label={`${openText}大厅`}*/}
{/*>*/}
{/* <Row>*/}
{/* <Col span={20}>*/}
{/* <Form.Item*/}
{/* name="openhallIdTime"*/}
{/* rules={[*/}
{/* {*/}
{/* required: true,*/}
{/* message: '当前项不可为空',*/}
{/* },*/}
{/* ]}*/}
{/* >*/}
{/* <Input style={{ width: "60%" }} disabled={true} />*/}
{/* </Form.Item>*/}
{/* </Col>*/}
{/* <Col span={4}>*/}
{/* <Button type="primary" disabled={editInformation} style={{ marginLeft: "8px" }}*/}
{/* onClick={() => getChooseRoomList()}>选择</Button>*/}
{/* </Col>*/}
{/* </Row>*/}
{/* <Modal*/}
{/* visible={choiceHallType}*/}
{/* destroyOnClose*/}
{/* title={`选择${openText}大厅`}*/}
{/* width={800}*/}
{/* bodyStyle={{ padding: '32px 40px 48px', overflowY: 'auto' }}*/}
{/* centered={true}*/}
{/* closable={false}*/}
{/* footer={(*/}
{/* <>*/}
{/* <Button onClick={() => setChoiceHallType(false)}>取消</Button>*/}
{/* </>*/}
{/* )}*/}
{/* >*/}
{/* <p style={{ color: 'red', marginLeft: 12, fontSize: 16 }}>温馨提示:如当天所有大厅预约已满,请联系系统客服帮您处理~</p>*/}
{/* <List*/}
{/* grid={{*/}
{/* gutter: 16,*/}
{/* xs: 3,*/}
{/* sm: 3,*/}
{/* md: 3,*/}
{/* lg: 3,*/}
{/* xl: 3,*/}
{/* xxl: 3,*/}
{/* }}*/}
{/* style={{ padding: 12 }}*/}
{/* dataSource={choiceHallData}*/}
{/* renderItem={(item: any) => (*/}
{/* <List.Item onClick={() => confirmChooseRoom(item)}>*/}
{/* <div className='card-onmouse' style={{ textAlign: 'center', position: 'relative', cursor: 'pointer', height: 113.42 }}>*/}
{/* <Image width='100%' src={Dating} preview={false} />*/}
{/* <div className='text-css'>*/}
{/* <div>{item.openDate}</div>*/}
{/* <div>已预约:{item.num}/{item.max}</div>*/}
{/* </div>*/}
{/* </div>*/}
{/* </List.Item>*/}
{/* )}*/}
{/* />*/}
{/* </Modal>*/}
{/*</Form.Item>*/}
<Form.Item
label={`关联${packageText}`}
name="sectionIds"