结构化公告配置:通用、信誉、其他要求,监督部门
This commit is contained in:
@ -25,8 +25,8 @@ const formFileWrapperCol = { wrapperCol: { span: 9 }, };
|
||||
const { Link } = Anchor;
|
||||
/**
|
||||
* 采购复盘-回填表
|
||||
* @param props
|
||||
* @returns
|
||||
* @param props
|
||||
* @returns
|
||||
*/
|
||||
|
||||
const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
@ -36,7 +36,7 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
const annoId = props?.location?.state?.annoId;
|
||||
const editInformation = props?.location?.state?.editStatus;
|
||||
// const annoId = "1732282646482624512";
|
||||
// 取查询条件
|
||||
// 取查询条件
|
||||
const stucturalId = "1";
|
||||
// 结构化信息
|
||||
const [annoStructureData, setAnnoStructureData] = useState<any>([]);
|
||||
@ -71,7 +71,7 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
const [form] = Form.useForm();
|
||||
/**
|
||||
* 折叠面板选择
|
||||
* @param key
|
||||
* @param key
|
||||
*/
|
||||
const onCollapseChange = (key: string | string[]) => {
|
||||
setActiveKey(key as string[]);
|
||||
@ -88,7 +88,7 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
|
||||
/**
|
||||
* 获取公告结构化信息
|
||||
* @param id
|
||||
* @param id
|
||||
*/
|
||||
const getStructuralList = async (id: any) => {
|
||||
try {
|
||||
@ -156,7 +156,7 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
const item = annoStructureData?.groupVoList[i];
|
||||
for (let j = 0, jlength = item?.assemblyVoList?.length; j < jlength; j++) {
|
||||
const jitem = item?.assemblyVoList[j];
|
||||
if (isEmpty(values?.[jitem?.code])) { // 空值或者类型为表格无需返回数据 || jitem?.type === 6 else
|
||||
if (isEmpty(values?.[jitem?.code])) { // 空值或者类型为表格无需返回数据 || jitem?.type === 6 else
|
||||
if (jitem?.code === "annoNature") {
|
||||
structuralDataList.push({
|
||||
assemblyId: jitem?.id,
|
||||
@ -254,10 +254,10 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
|
||||
useEffect(() => {
|
||||
const selectData = sectionSelectData.filter((item: any) => sectionSelectIds.indexOf(item?.sectionId) !== -1);
|
||||
const amountSelectData = expenses1AmountSectionData.filter((item: any) => sectionSelectIds.indexOf(item?.sectionId) !== -1);
|
||||
// const amountSelectData = expenses1AmountSectionData.filter((item: any) => sectionSelectIds.indexOf(item?.sectionId) !== -1);
|
||||
const tenderAskProjectData = tenderAskData.filter((item: any) => sectionSelectIds.indexOf(item?.sectionId) !== -1);
|
||||
form.setFieldsValue({ "sectionExpeses": selectData })
|
||||
form.setFieldsValue({ "expenses1Amount": amountSelectData })
|
||||
// form.setFieldsValue({ "expenses1Amount": amountSelectData })
|
||||
form.setFieldsValue({ "tenderAskProject": tenderAskProjectData })
|
||||
form.setFieldsValue({ "sectionNumber": sectionSelectIds.length })
|
||||
}, [sectionSelectIds])
|
||||
@ -444,6 +444,159 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
],
|
||||
},
|
||||
];
|
||||
//投标人资格能力要求-通用要求-表格
|
||||
const TenderCommonRequirementColumns: ProColumns<any>[] = [
|
||||
{
|
||||
title: '序号',
|
||||
editable: false,
|
||||
valueType: 'index',
|
||||
width: "5%",
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: '资格条件',
|
||||
dataIndex: 'condition',
|
||||
key: 'condition',
|
||||
width: "60%",
|
||||
formItemProps: () => {
|
||||
return {
|
||||
rules: [{ required: true, message: '此项为必填项' }],
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
width: 200,
|
||||
render: (text, record, _, action) => [
|
||||
<a
|
||||
key="editable"
|
||||
hidden={editInformation}
|
||||
onClick={() => {
|
||||
action?.startEditable?.(record.id);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</a>,
|
||||
<a
|
||||
key="delete"
|
||||
hidden={editInformation}
|
||||
onClick={() => {
|
||||
const tableDataSource = form?.getFieldValue(
|
||||
'tenderAsk'
|
||||
);
|
||||
form?.setFieldsValue({
|
||||
tenderAsk: tableDataSource.filter((item: any) => item.id !== record.id),
|
||||
});
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</a>,
|
||||
],
|
||||
},
|
||||
];
|
||||
//投标人资格能力要求-通用要求-表格
|
||||
const TenderCreditRequirementColumns: ProColumns<any>[] = [
|
||||
{
|
||||
title: '序号',
|
||||
editable: false,
|
||||
valueType: 'index',
|
||||
width: "5%",
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: '资格条件',
|
||||
dataIndex: 'condition',
|
||||
key: 'condition',
|
||||
width: "60%",
|
||||
formItemProps: () => {
|
||||
return {
|
||||
rules: [{ required: true, message: '此项为必填项' }],
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
width: 200,
|
||||
render: (text, record, _, action) => [
|
||||
<a
|
||||
key="editable"
|
||||
hidden={editInformation}
|
||||
onClick={() => {
|
||||
action?.startEditable?.(record.id);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</a>,
|
||||
<a
|
||||
key="delete"
|
||||
hidden={editInformation}
|
||||
onClick={() => {
|
||||
const tableDataSource = form?.getFieldValue(
|
||||
'tenderAsk'
|
||||
);
|
||||
form?.setFieldsValue({
|
||||
tenderAsk: tableDataSource.filter((item: any) => item.id !== record.id),
|
||||
});
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</a>,
|
||||
],
|
||||
},
|
||||
];
|
||||
//投标人资格能力要求-通用要求-表格
|
||||
const TenderOtherRequirementColumns: ProColumns<any>[] = [
|
||||
{
|
||||
title: '序号',
|
||||
editable: false,
|
||||
valueType: 'index',
|
||||
width: "5%",
|
||||
fixed: 'left',
|
||||
},
|
||||
{
|
||||
title: '资格条件',
|
||||
dataIndex: 'condition',
|
||||
key: 'condition',
|
||||
width: "60%",
|
||||
formItemProps: () => {
|
||||
return {
|
||||
rules: [{ required: true, message: '此项为必填项' }],
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
valueType: 'option',
|
||||
width: 200,
|
||||
render: (text, record, _, action) => [
|
||||
<a
|
||||
key="editable"
|
||||
hidden={editInformation}
|
||||
onClick={() => {
|
||||
action?.startEditable?.(record.id);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</a>,
|
||||
<a
|
||||
key="delete"
|
||||
hidden={editInformation}
|
||||
onClick={() => {
|
||||
const tableDataSource = form?.getFieldValue(
|
||||
'tenderAsk'
|
||||
);
|
||||
form?.setFieldsValue({
|
||||
tenderAsk: tableDataSource.filter((item: any) => item.id !== record.id),
|
||||
});
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</a>,
|
||||
],
|
||||
},
|
||||
];
|
||||
//投标格式能力要求-投标格式能力要求-表格类型定义
|
||||
type DataSourceType = {
|
||||
id: number;
|
||||
@ -483,6 +636,108 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
/>
|
||||
)
|
||||
}
|
||||
//投标人资格能力要求-通用要求-表格
|
||||
const TenderCommonRequirementTableItem = (field: any) => {
|
||||
const { value, onChange } = field;
|
||||
//处理列头
|
||||
return (
|
||||
<EditableProTable<DataSourceType>
|
||||
rowKey="id"
|
||||
style={{ width: "90%" }}
|
||||
recordCreatorProps={{
|
||||
newRecordType: 'dataSource',
|
||||
hidden: editInformation,
|
||||
creatorButtonText: '新增',
|
||||
record: () => ({
|
||||
id: Date.now(),
|
||||
condition: "",
|
||||
}),
|
||||
}}
|
||||
columns={TenderCommonRequirementColumns}
|
||||
value={value ? value : []}
|
||||
editable={{
|
||||
type: 'multiple',
|
||||
onValuesChange: (record, recordList) => {
|
||||
onChange(recordList)
|
||||
},
|
||||
actionRender: (row, config, defaultDom) => {
|
||||
return [
|
||||
defaultDom.save,
|
||||
defaultDom.delete || defaultDom.cancel
|
||||
];
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
//投标人资格能力要求-信誉要求-表格
|
||||
const TenderCreditRequirementTableItem = (field: any) => {
|
||||
const { value, onChange } = field;
|
||||
//处理列头
|
||||
return (
|
||||
<EditableProTable<DataSourceType>
|
||||
rowKey="id"
|
||||
style={{ width: "90%" }}
|
||||
recordCreatorProps={{
|
||||
newRecordType: 'dataSource',
|
||||
hidden: editInformation,
|
||||
creatorButtonText: '新增',
|
||||
record: () => ({
|
||||
id: Date.now(),
|
||||
condition: "",
|
||||
}),
|
||||
}}
|
||||
columns={TenderCreditRequirementColumns}
|
||||
value={value ? value : []}
|
||||
editable={{
|
||||
type: 'multiple',
|
||||
onValuesChange: (record, recordList) => {
|
||||
onChange(recordList)
|
||||
},
|
||||
actionRender: (row, config, defaultDom) => {
|
||||
return [
|
||||
defaultDom.save,
|
||||
defaultDom.delete || defaultDom.cancel
|
||||
];
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
//投标人资格能力要求-其他要求-表格
|
||||
const TenderOtherRequirementTableItem = (field: any) => {
|
||||
const { value, onChange } = field;
|
||||
//处理列头
|
||||
return (
|
||||
<EditableProTable<DataSourceType>
|
||||
rowKey="id"
|
||||
style={{ width: "90%" }}
|
||||
recordCreatorProps={{
|
||||
newRecordType: 'dataSource',
|
||||
hidden: editInformation,
|
||||
creatorButtonText: '新增',
|
||||
record: () => ({
|
||||
id: Date.now(),
|
||||
condition: "",
|
||||
}),
|
||||
}}
|
||||
columns={TenderOtherRequirementColumns}
|
||||
value={value ? value : []}
|
||||
editable={{
|
||||
type: 'multiple',
|
||||
onValuesChange: (record, recordList) => {
|
||||
onChange(recordList)
|
||||
},
|
||||
actionRender: (row, config, defaultDom) => {
|
||||
return [
|
||||
defaultDom.save,
|
||||
defaultDom.delete || defaultDom.cancel
|
||||
];
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
//投标格式能力要求-投标格式能力要求-表格
|
||||
const TenderAskProjectColumns: any[] = [
|
||||
@ -754,7 +1009,7 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
return <RadioItem {...assemblyVo} disabled={editInformation} />
|
||||
} else if (groupVo.code === "anno" || assemblyVo?.code === "sections") { // 关联标段
|
||||
return <SectionCheckDom {...assemblyVo} />
|
||||
} else if (assemblyVo?.type === "3") { // 3:复选
|
||||
} else if (assemblyVo?.type === "3") { // 3:复选
|
||||
return <CheckboxItem {...assemblyVo} disabled={editInformation} />
|
||||
} else if (assemblyVo?.type === "31") { // 31:换行复选
|
||||
return <Medias
|
||||
@ -798,7 +1053,17 @@ const BiddingAnnoStructureForm: React.FC<{}> = (props: any) => {
|
||||
return <SectionExpesesTableItem {...assemblyVo} />
|
||||
} else if (assemblyVo?.type === "9" && assemblyVo?.code === "tenderAsk") { // 表格-补充资格能力要求
|
||||
return <TenderAskTableItem {...assemblyVo} />
|
||||
} else if (assemblyVo?.type === "9" && assemblyVo?.code === "tenderAskProject") { // 表格-投标格式能力要求
|
||||
}
|
||||
else if (assemblyVo?.type === "9" && assemblyVo?.code === "tenderCommonRequirement") { // 表格-投标人资格能力要求--通用要求
|
||||
return <TenderCommonRequirementTableItem {...assemblyVo} />
|
||||
}
|
||||
else if (assemblyVo?.type === "9" && assemblyVo?.code === "tenderCreditRequirement") { // 表格-投标人资格能力要求--信誉要求
|
||||
return <TenderCreditRequirementTableItem {...assemblyVo} />
|
||||
}
|
||||
else if (assemblyVo?.type === "9" && assemblyVo?.code === "tenderOtherRequirement") { // 表格-投标人资格能力要求--其他要求
|
||||
return <TenderOtherRequirementTableItem {...assemblyVo} />
|
||||
}
|
||||
else if (assemblyVo?.type === "9" && assemblyVo?.code === "tenderAskProject") { // 表格-投标格式能力要求
|
||||
return <TenderAskProjectTableItem {...assemblyVo} />
|
||||
} else if (assemblyVo?.type === "9" && assemblyVo?.code === "expenses1Amount") { // 表格-招标文件费用
|
||||
return <Expenses1AmountTableItem {...assemblyVo} />
|
||||
|
Reference in New Issue
Block a user