UNPKG

app-base-web

Version:
201 lines (200 loc) 6.56 kB
import React, { Suspense, lazy } from 'react'; import { Layout, Table, Form, Modal, Row, Col, Button, Input,Switch, message } from 'antd'; import api from '../../../library/util-axios'; import File from '../../../library/file'; // 维权信息 const title = "维权信息"; const url = "Safeinfo/"; export default class FormEdit extends React.Component { constructor(props) { super(props); this.state = { ...props.values }; } onSave = (values) => { let me = this; values.id = this.state.id; api.post(url + "save", values).then(function (rs) { if (rs.success) { message.info(rs.msg); me.props.onSave(values); } else { message.error(rs.msg); } }); } render() { return ( <Form onFinish={this.onSave} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }} className="form-edit" > <div className="form-title"> <i> {title} - {this.state.id ? "编辑" : "录入"}</i> {this.state.id ? <span><Button className="btn-return" onClick={this.props.onEditReturn}><i className="iconfont icon-return"></i>返回</Button></span> : ""} </div> <div className="form-content" style={{ height: this.props.height }}> <Row> <Col xs={24}> <Form.Item name="outId" label="请求人名称" initialValue={this.state.outId}> <Input /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="applicantName" label="请求人姓名" initialValue={this.state.applicantName}> <Input /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="applicant" label="请求人信息" initialValue={this.state.applicant}> <Input /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="ano" label="专利号" initialValue={this.state.ano}> <Input /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="defendantId" label="被申请人用户" initialValue={this.state.defendantId}> <Input /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="defendant" label="被请求人信息" initialValue={this.state.defendant}> <Input /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="identity" label="有效证件" initialValue={this.state.identity}> <Input /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="file1" label="请求人申请调解请求书" valuePropName="fileList" initialValue={this.state.file1} > <File cls="simpleFile" fileList={this.state.file1} hide="true" /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="file2" label="营业执照" valuePropName="fileList" initialValue={this.state.file2}> <File cls="simpleFile" fileList={this.state.file2} hide="true" /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="file3" label="身份证复印件" valuePropName="fileList" initialValue={this.state.file3}> <File cls="simpleFile" fileList={this.state.file3} hide="true" /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="file4" label="委托授权书" valuePropName="fileList" initialValue={this.state.file4}> <File cls="simpleFile" fileList={this.state.file4} hide="true" /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="file5" label="被委托人身份证复印件" valuePropName="fileList" initialValue={this.state.file5}> <File cls="simpleFile" fileList={this.state.file5} hide="true" /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="file6" label="法定代表人身份证复印件" valuePropName="fileList" initialValue={this.state.file6}> <File cls="simpleFile" fileList={this.state.file6} hide="true" /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="file7" label="案件相关的图片材料" valuePropName="fileList" initialValue={this.state.file7}> <File cls="simpleFile" fileList={this.state.file7} hide="true" /> </Form.Item> </Col> </Row> <Row> <Col xs={24}> <Form.Item name="file8" label="案件相关的文件材料" valuePropName="fileList" initialValue={this.state.file8}> <File cls="simpleFile" fileList={this.state.file8} hide="true" /> </Form.Item> </Col> </Row> </div> <div className="form-toolbar"> <Button className="btn-cancel" onClick={this.props.onCancel}><i className="iconfont icon-cancel"></i>取消</Button> <Button className="btn-submit" htmlType="submit"><i className="iconfont icon-submit"></i>提交</Button> </div> </Form> ); } }