12-23-上传master
This commit is contained in:
7
src/pages/Evaluation/BidEnd/BidEndSummary/data.d.ts
vendored
Normal file
7
src/pages/Evaluation/BidEnd/BidEndSummary/data.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
//需要包含筛选里的字段 筛选才能生效
|
||||
export interface TableListItem {
|
||||
key?: string;
|
||||
round?: string;
|
||||
enclosure?: string;
|
||||
time?: string;
|
||||
}
|
137
src/pages/Evaluation/BidEnd/BidEndSummary/index.tsx
Normal file
137
src/pages/Evaluation/BidEnd/BidEndSummary/index.tsx
Normal file
@ -0,0 +1,137 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Table, Button, Space, Modal, Form, Select, Upload, Input } from 'antd';
|
||||
import { TableListItem } from './data';
|
||||
import '@/assets/ld_style.less'
|
||||
|
||||
const { Option } = Select;
|
||||
const { TextArea } = Input;
|
||||
|
||||
const formItemLayout = {
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 14 },
|
||||
};
|
||||
|
||||
const dataSource: TableListItem[] = [
|
||||
{
|
||||
key: '1',
|
||||
round: '第一轮次谈判',
|
||||
enclosure: '——',
|
||||
time: '2019-09-23 10:11:12',
|
||||
},
|
||||
];
|
||||
|
||||
const Index: React.FC<{}> = () => {
|
||||
const [dateList] = useState(dataSource);
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
|
||||
const columns: any[] = [ // 列表数据
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'key',
|
||||
key: 'key',
|
||||
},
|
||||
{
|
||||
title: '谈判轮次',
|
||||
dataIndex: 'round',
|
||||
key: 'round',
|
||||
},
|
||||
{
|
||||
title: '附件',
|
||||
dataIndex: 'enclosure',
|
||||
key: 'enclosure',
|
||||
},
|
||||
{
|
||||
title: '编辑时间',
|
||||
dataIndex: 'time',
|
||||
key: 'time',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
key: 'action',
|
||||
render: (text: any, record: any) => (
|
||||
<Space>
|
||||
<Button type="link" danger>查看</Button>
|
||||
<Button onClick={() => setVisible(true)} type="link" danger>编辑</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const normFile = (e: any) => { // 上传附件
|
||||
console.log('Upload event:', e);
|
||||
if (Array.isArray(e)) {
|
||||
return e;
|
||||
}
|
||||
return e && e.fileList;
|
||||
};
|
||||
|
||||
const onFinish = (values: any) => { // 表单完成
|
||||
console.log('Received values of form: ', values);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="bidContent">
|
||||
<div className="titName">
|
||||
<span className="f16">谈判纪要</span>
|
||||
<Space className="fr">
|
||||
<Button type="primary" danger size="small" className="fr">新增</Button>
|
||||
</Space>
|
||||
</div>
|
||||
<Table bordered pagination={false} columns={columns} dataSource={dateList} />
|
||||
<Modal
|
||||
title="编辑谈判纪要"
|
||||
width={800}
|
||||
visible={visible}
|
||||
onOk={() => setVisible(false)}
|
||||
onCancel={() => setVisible(false)}
|
||||
>
|
||||
<Form
|
||||
name="validate_other"
|
||||
{...formItemLayout}
|
||||
onFinish={onFinish}
|
||||
>
|
||||
<Form.Item
|
||||
name="select"
|
||||
label="谈判轮次"
|
||||
hasFeedback
|
||||
rules={[{ required: true, message: '请选择谈判轮次!' }]}
|
||||
>
|
||||
<Select placeholder="请选择谈判轮次">
|
||||
<Option value="1">第一轮谈判</Option>
|
||||
<Option value="2">第二轮谈判</Option>
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item label="谈判项目名称">
|
||||
<span className="ant-form-text">测试重新评审0813-3-包1</span>
|
||||
</Form.Item>
|
||||
<Form.Item label="参与供应商">
|
||||
<span className="ant-form-text">中兴通讯有限公司,华为股份有限公司</span>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="upload"
|
||||
label="附件"
|
||||
valuePropName="fileList"
|
||||
getValueFromEvent={normFile}
|
||||
// extra="longgggggggggggggggggggggggggggggggggg"
|
||||
>
|
||||
<Upload name="logo" action="/upload.do" listType="picture">
|
||||
<Button type="primary" danger>上传文件</Button>
|
||||
<span className="ml5">最多上传一个文件,每个最大500MB,允许类型为rar,zip,pdf,doc,docx,xls,xlsx,png,jpeg格式</span>
|
||||
</Upload>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="textarea"
|
||||
label="主要内容"
|
||||
rules={[{ required: true, message: '请输入主要内容!' }]}
|
||||
>
|
||||
<TextArea rows={4} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default Index
|
Reference in New Issue
Block a user