单一来源软控显示确认按钮
This commit is contained in:
@ -26,7 +26,7 @@ import {
|
|||||||
creatNotice,
|
creatNotice,
|
||||||
getChooseRoom,
|
getChooseRoom,
|
||||||
getPackageAndSupplierList,
|
getPackageAndSupplierList,
|
||||||
chooseSupplier, deleteSupplier, updateSupplierUser, checkConflict
|
chooseSupplier, deleteSupplier, updateSupplierUser, saveAnno
|
||||||
} from '../service'
|
} from '../service'
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import TabPane from "@ant-design/pro-card/lib/components/TabPane";
|
import TabPane from "@ant-design/pro-card/lib/components/TabPane";
|
||||||
@ -467,10 +467,11 @@ const BiddingInvitation: React.FC<BiddingInvitation> = (props) => {
|
|||||||
"reasonMemo": form.getFieldValue("reasonMemo")
|
"reasonMemo": form.getFieldValue("reasonMemo")
|
||||||
}
|
}
|
||||||
creatNotice(type, fromData).then(res => {
|
creatNotice(type, fromData).then(res => {
|
||||||
// creatNotice(type, fromData).then(res => {
|
|
||||||
if (res?.code == 4004 && res?.success == false) { //2021.9.7 zhoujianlong 新增和修改邀请函增加风控
|
if (res?.code == 4004 && res?.success == false) { //2021.9.7 zhoujianlong 新增和修改邀请函增加风控
|
||||||
const data = res?.data?.result == undefined ? [] : res?.data?.result
|
const data = res?.data== undefined ? [] : res?.data
|
||||||
setRiskData(data)
|
let thisData = [];
|
||||||
|
thisData.push(data);
|
||||||
|
setRiskData(thisData)
|
||||||
setRiskVisible(true)
|
setRiskVisible(true)
|
||||||
}
|
}
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -481,6 +482,48 @@ const BiddingInvitation: React.FC<BiddingInvitation> = (props) => {
|
|||||||
setTimeout(() => setSping(false), 1000)
|
setTimeout(() => setSping(false), 1000)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const saveAfterRisk = () => {
|
||||||
|
const packageMsg = [];
|
||||||
|
for (const item of TpPackageId) {//包数据
|
||||||
|
for (const item1 of form.getFieldValue("sectionIds")) {
|
||||||
|
if (item.value == item1) {
|
||||||
|
packageMsg.push({ "bsId": item.value, "bsName": item.label })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setSping(true);
|
||||||
|
const fromData = {
|
||||||
|
"id": pkId,
|
||||||
|
"annoNature": 101,//邀请函
|
||||||
|
"tpId": tpId,
|
||||||
|
"csAnnoId": pkId,
|
||||||
|
"attDatasetId": form.getFieldValue("attDatasetId"),
|
||||||
|
"openhallTitle": form.getFieldValue("openhallIdTime"),//开标大厅 时间段
|
||||||
|
"source": 21,//来源(1:预审公告;2:预审公示;11:资审公告;12资审公示;21:邀请函)
|
||||||
|
"annoTitle": form.getFieldValue("annoTitle"),
|
||||||
|
"contentWithStyle": braftRef.current.getHtml().replace(/<table border="0"/, '<table border="1"'),//富文本正文
|
||||||
|
"docStartTime": form.getFieldValue("docStartTime").format("yyyy-MM-DD HH:mm:ss"),
|
||||||
|
"replyEndTime": form.getFieldValue("replyEndTime").format("yyyy-MM-DD HH:mm:ss"),
|
||||||
|
"openingTime": form.getFieldValue("openingTime").format("yyyy-MM-DD HH:mm:ss"),
|
||||||
|
"docEndTime": form.getFieldValue("docEndTime").format("yyyy-MM-DD HH:mm:ss"),
|
||||||
|
"openhallId": form.getFieldValue("openhallId"),
|
||||||
|
// "contentFileId": WebofficeRef.current!.DocfileCode,//office id
|
||||||
|
// "contentHtmlId": WebofficeRef.current!.HTMLfileCode,//html id
|
||||||
|
"sections": packageMsg,
|
||||||
|
"medias": "9",
|
||||||
|
"roomType": "2",
|
||||||
|
"reasonMemoAttrId": form.getFieldValue("reasonMemoAttrId"),
|
||||||
|
"reasonMemo": form.getFieldValue("reasonMemo")
|
||||||
|
}
|
||||||
|
saveAnno(fromData).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
setAnnoId(res?.data);
|
||||||
|
message.success("成功");
|
||||||
|
setTabsKeys("2");
|
||||||
|
}
|
||||||
|
setTimeout(() => setSping(false), 1000)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const columns1: ProColumns<{}>[] = [
|
const columns1: ProColumns<{}>[] = [
|
||||||
@ -954,7 +997,7 @@ const BiddingInvitation: React.FC<BiddingInvitation> = (props) => {
|
|||||||
setRiskData([])
|
setRiskData([])
|
||||||
}}
|
}}
|
||||||
data={riskData}
|
data={riskData}
|
||||||
onSubmit={() => submit()}
|
onSubmit={() => saveAfterRisk()}
|
||||||
/>}
|
/>}
|
||||||
|
|
||||||
</Spin>
|
</Spin>
|
||||||
|
@ -61,7 +61,7 @@ const Index: React.FC<Props> = (props) => {
|
|||||||
"reasonMemoAttrId": form.getFieldValue("reasonMemoAttrId"),
|
"reasonMemoAttrId": form.getFieldValue("reasonMemoAttrId"),
|
||||||
"reasonMemo": form.getFieldValue("reasonMemo")
|
"reasonMemo": form.getFieldValue("reasonMemo")
|
||||||
}
|
}
|
||||||
updateMemo(type, fromData).then(res => {
|
updateMemo(fromData).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
message.success("成功");
|
message.success("成功");
|
||||||
onCancel();
|
onCancel();
|
||||||
|
@ -224,7 +224,7 @@ export async function savePublicData(params: any) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
/*修改说明*/
|
/*修改说明*/
|
||||||
export async function updateMemo(type: any, params?: any) {
|
export async function updateMemo(params?: any) {
|
||||||
return request("/api/biz-service-ebtp-bid/v1/anno/updateMemo", {
|
return request("/api/biz-service-ebtp-bid/v1/anno/updateMemo", {
|
||||||
method: "post",
|
method: "post",
|
||||||
data: {
|
data: {
|
||||||
@ -232,3 +232,12 @@ export async function updateMemo(type: any, params?: any) {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/*风控后的保存公告*/
|
||||||
|
export async function saveAnno(params?: any) {
|
||||||
|
return request("/api/biz-service-ebtp-bid/v1/anno/saveAnno", {
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
...params
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
@ -21,7 +21,7 @@ const modalHeight = window.innerHeight * 96 / 100;
|
|||||||
*/
|
*/
|
||||||
const RiskPreventionSoft: React.FC<RiskPreventionSoftProps> = (props) => {
|
const RiskPreventionSoft: React.FC<RiskPreventionSoftProps> = (props) => {
|
||||||
const { modalVisible, onCancel, onSubmit, data } = props;
|
const { modalVisible, onCancel, onSubmit, data } = props;
|
||||||
const [spinning, setSping] = useState<boolean>(false);//加载遮罩
|
const [confirmButtonVisible, setConfirmButtonVisible] = useState<boolean>(true);//是否显示确定按钮
|
||||||
|
|
||||||
const columns: ProColumns<any[]>[] = [
|
const columns: ProColumns<any[]>[] = [
|
||||||
{
|
{
|
||||||
@ -55,11 +55,23 @@ const RiskPreventionSoft: React.FC<RiskPreventionSoftProps> = (props) => {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
for (const iterator of data) {
|
setConfirmButtonVisible(getButtonVisible());
|
||||||
|
|
||||||
}
|
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
|
const getButtonVisible = () => {
|
||||||
|
console.log(data);
|
||||||
|
for (const risk of data) {
|
||||||
|
for (const result of risk.result) {
|
||||||
|
for (const regulationData of result.regulationData) {
|
||||||
|
if(regulationData.regulationStrategy=="hard"){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
destroyOnClose
|
destroyOnClose
|
||||||
@ -70,7 +82,7 @@ const RiskPreventionSoft: React.FC<RiskPreventionSoftProps> = (props) => {
|
|||||||
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto', padding: '8px 24px 16px' }}
|
bodyStyle={{ maxHeight: modalHeight - 107, overflowY: 'auto', padding: '8px 24px 16px' }}
|
||||||
centered
|
centered
|
||||||
onCancel={() => onCancel()}
|
onCancel={() => onCancel()}
|
||||||
okButtonProps={{hidden: true}}
|
okButtonProps={{hidden: confirmButtonVisible}}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
onSubmit();
|
onSubmit();
|
||||||
onCancel();
|
onCancel();
|
||||||
|
Reference in New Issue
Block a user