import { Form, Modal, Row, Col, Input, DatePicker, Upload, Button, Divider, Steps, } from 'antd'; import ModuleTitle from '../../../components/ModuleTitle/moduleTitle'; import { CloudUploadOutlined } from '@ant-design/icons'; import moment from 'moment'; const ContractModal = (props) => { const Type = { add: 0, //新增 detail: 1, //详情 cancel: 2, //作废 }; const FORMAT = 'YYYY-MM-DD'; const { title, type, visible, handleOk, handleCancel } = props; const [form] = Form.useForm(); const data = { company_name: 'hdhdhdh', name: 'kkkk', effect_on: moment('2020-02-02'), party_a: 'aaaaa', party_b: 'bbbbbb', party_c: 'ccccc', created_dep: 'fffff', dep_id: '1111', code: '132456', amount: '1111111111777', project_code: '444444', deal_by: 'hhhhh', perform: 'dnjfndjfnjdnfjd', created_by: '77777', created_on: moment().format(FORMAT), }; const UploadProps = { action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', onChange({ file, fileList }) { if (file.status !== 'uploading') { console.log(file, fileList); } }, defaultFileList: [ { uid: '1', name: 'xxx.png', status: 'uploading', url: 'http://www.baidu.com/xxx.png', percent: 33, }, { uid: '2', name: 'yyy.png', status: 'done', url: 'http://www.baidu.com/yyy.png', }, { uid: '3', name: 'zzz.png', status: 'error', response: 'Server Error 500', // custom error message to show url: 'http://www.baidu.com/zzz.png', }, ], }; const handleSubmit = () => { form.validateFields().then((values) => { console.log(values); let timeObj = { effect_on: moment(values.effect_on).format(FORMAT), created_on: values.created_on || moment().format(FORMAT), }; handleOk({ ...values, ...timeObj }); }); }; return (
万元
{type == Type.detail && ( <> )} {type == Type.cancel && ( <> )}
); }; export default ContractModal;