import React, { useState, useEffect } from 'react'; import { Card, Form, Button, Input, Image } from 'antd'; import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { getApplicationDetail } from '@/services/application' import { history } from 'umi'; const { TextArea } = Input; const FormItem = Form.Item; const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } }; const goBack = () => { history.goBack(); }; export default (props) => { const { location } = props; const { id } = location.query; const [application, setApplication] = useState({}); const [orderStatus, setOrderStatus] = useState(); //已发证有快递 1 //已发证无快递 2 //审核驳回 3 //待发证 4 //待审核 5 //待支付 6 useEffect(() => { getApplicationDetail(id).then((res) => { setApplication(res) if (res?.status == 3) { if (res?.applyMethod == 2) { setOrderStatus(1) } else { setOrderStatus(2) } } else if (res.status == 2) { if (res?.verifyStatus == 2) { setOrderStatus(3) } else if (res?.verifyStatus == 1) { setOrderStatus(4) } } else if (res?.status == 0) { setOrderStatus(6) } else if (res?.status == 1) { setOrderStatus(5) } }).catch((err) => { console.log(err.message) }); }, [id]) return (
{application?.personName} { application?.isOrg && <> {application?.orgName} } {application?.phone} {application?.petName} { application?.petSex == 1 ? '雄' : application?.petSex == 2 ? '雌' : '未说明性别' } {application?.petType} {application?.petColor} {application?.address} {application?.immunizationCode} {application?.immunizationDate} { application?.applyType == 'first' ? '办证' : application?.applyType == 'reissue' ? '补办' : application?.applyType == 'renewal' ? '续期' : '' } { application?.applyType !== 'renewal' && { application?.applyMethod == '1' ? '上门自取' : application?.applyMethod == '2' ? '快递到家' : '' } } { application?.criminalInfo && } { application?.penaltyInfo && } { (orderStatus === 1 || orderStatus === 2) ? '已发证' : orderStatus === 3 ? '审核驳回' : orderStatus === 4 ? '待发证' : orderStatus === 5 ? '待审核' : '待支付' } { (orderStatus == 1 || orderStatus == 2) && {application.originCardNo} } { orderStatus == 1 && <> {application.trackingType} {application.trackingNo} } { orderStatus == 3 &&