4.1 同步发版内容到天梯
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import {Button, Checkbox, Form, Input, Modal, Spin} from "antd"
|
||||
import React, {useEffect, useState} from "react"
|
||||
import { Button, Checkbox, Form, Input, Modal, Spin } from "antd"
|
||||
import React, { useEffect, useState } from "react"
|
||||
|
||||
import { GetfileMsg, GetfileMsgEnclosure} from "../service";
|
||||
import {downloadAttachmentPathOId} from "@/utils/DownloadUtils";
|
||||
import {isEmpty} from "@/utils/CommonUtils";
|
||||
import { GetfileMsg, GetfileMsgEnclosure } from "../service";
|
||||
import { downloadFile } from "@/utils/DownloadUtils";
|
||||
import { isEmpty } from "@/utils/CommonUtils";
|
||||
|
||||
interface BiddingDocumentProps {
|
||||
modalVisible: boolean;
|
||||
@ -16,12 +16,12 @@ interface BiddingDocumentProps {
|
||||
}
|
||||
|
||||
const layout = {
|
||||
labelCol: {span: 7},
|
||||
wrapperCol: {span: 10},
|
||||
labelCol: { span: 7 },
|
||||
wrapperCol: { span: 10 },
|
||||
};
|
||||
const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
|
||||
const {titleName, modalVisible, onCancel, type, pkId} = props;
|
||||
const { titleName, modalVisible, onCancel, type, pkId } = props;
|
||||
const [TpPackageId, setTpPackageId] = useState<any[]>([]); //标包信息
|
||||
const [spinning, setSping] = useState<boolean>();//加载遮罩
|
||||
const [editInformation, setEditInformation] = useState<boolean>(false);//是否可编
|
||||
@ -37,8 +37,8 @@ const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
for (const item of arr) {
|
||||
data.push(
|
||||
<>
|
||||
<a key={item.fileId} href={downloadAttachmentPathOId + item.fileId}>{item.fileName}</a>
|
||||
<br/>
|
||||
<a key={item.fileId} href='javascript:void(0);' onClick={() => downloadFile({ uid: item.fileId })}>{item.fileName}</a>
|
||||
<br />
|
||||
</>
|
||||
)
|
||||
}
|
||||
@ -56,14 +56,14 @@ const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
let thisData1 = [];
|
||||
let defPak = [];
|
||||
for (const item of data.sections) {
|
||||
thisData1.push({"label": item.bsName, "value": item.bsId})
|
||||
thisData1.push({ "label": item.bsName, "value": item.bsId })
|
||||
defPak.push(item.bsId);
|
||||
}
|
||||
GetfileMsgEnclosure(defPak[0]).then(res2 => {
|
||||
if (res2.code == 200) {
|
||||
let data = res2.data;
|
||||
setEnquiryForm(
|
||||
<Form labelCol={{span: 9}}>
|
||||
<Form labelCol={{ span: 9 }}>
|
||||
<Form.Item label="询价文件" className="item-margin-top">
|
||||
{disposeEnquiryForm(data['1'])}
|
||||
</Form.Item>
|
||||
@ -79,10 +79,10 @@ const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
})
|
||||
setTpPackageId(thisData1);
|
||||
form.setFieldsValue({
|
||||
"documentName": data.documentName,
|
||||
"documentSetId": data.documentSetId,
|
||||
"sectionIds": defPak,
|
||||
},
|
||||
"documentName": data.documentName,
|
||||
"documentSetId": data.documentSetId,
|
||||
"sectionIds": defPak,
|
||||
},
|
||||
)
|
||||
|
||||
setSping(false);
|
||||
@ -103,8 +103,8 @@ const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
onCancel={() => onCancel()}
|
||||
className="返回"
|
||||
width={"60%"}
|
||||
style={{top: "2%", height: "96%", overflowY: "auto"}}
|
||||
bodyStyle={{paddingTop: "16px"}}
|
||||
style={{ top: "2%", height: "96%", overflowY: "auto" }}
|
||||
bodyStyle={{ paddingTop: "16px" }}
|
||||
footer={<Button onClick={onCancel}>确认</Button>}
|
||||
>
|
||||
<Spin spinning={spinning}>
|
||||
@ -123,7 +123,7 @@ const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input readOnly={editInformation}/>
|
||||
<Input readOnly={editInformation} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="关联采购包"
|
||||
@ -138,7 +138,7 @@ const BiddingDocument: React.FC<BiddingDocumentProps> = (props) => {
|
||||
<Checkbox.Group
|
||||
|
||||
options={TpPackageId}
|
||||
style={{width: '100%'}}
|
||||
style={{ width: '100%' }}
|
||||
disabled={editInformation}
|
||||
>
|
||||
</Checkbox.Group>
|
||||
|
Reference in New Issue
Block a user