|
@@ -1,7 +1,7 @@
|
1
|
1
|
import React, { useState, useEffect } from 'react';
|
2
|
2
|
import { Card, Form, Button, Image } from 'antd';
|
3
|
3
|
import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
4
|
|
-import { getCardDetail,getCardQRCode } from '@/services/card'
|
|
4
|
+import { getCardDetail, getCardQRCode } from '@/services/card'
|
5
|
5
|
import { history } from 'umi';
|
6
|
6
|
|
7
|
7
|
const FormItem = Form.Item;
|
|
@@ -13,11 +13,11 @@ export default (props) => {
|
13
|
13
|
const { location } = props;
|
14
|
14
|
const { id } = location.query;
|
15
|
15
|
const [card, setCard] = useState({});
|
16
|
|
- const [qrcode,setQrcode]=useState();
|
|
16
|
+ const [qrcode, setQrcode] = useState();
|
17
|
17
|
useEffect(() => {
|
18
|
18
|
getCardDetail(id).then((res) => {
|
19
|
19
|
setCard(res)
|
20
|
|
- getCardQRCode(res.cardNo).then((res2)=>{
|
|
20
|
+ getCardQRCode(res.cardNo).then((res2) => {
|
21
|
21
|
setQrcode(res2.qrImage)
|
22
|
22
|
})
|
23
|
23
|
}).catch((err) => {
|
|
@@ -41,6 +41,12 @@ export default (props) => {
|
41
|
41
|
<FormItem label="犬主">
|
42
|
42
|
{card?.personName}
|
43
|
43
|
</FormItem>
|
|
44
|
+ {
|
|
45
|
+ card?.isOrg &&
|
|
46
|
+ <FormItem label="企业">
|
|
47
|
+ {card?.orgName}
|
|
48
|
+ </FormItem>
|
|
49
|
+ }
|
44
|
50
|
<FormItem label="电话">
|
45
|
51
|
{card?.phone}
|
46
|
52
|
</FormItem>
|
|
@@ -68,10 +74,22 @@ export default (props) => {
|
68
|
74
|
<FormItem label="狗证有效期">
|
69
|
75
|
{card?.startDate + '~' + card?.expireDate}
|
70
|
76
|
</FormItem>
|
|
77
|
+ {
|
|
78
|
+ card?.criminalInfo &&
|
|
79
|
+ <FormItem label="伤人信息">
|
|
80
|
+ <Image src={card.criminalInfo} width={100} />
|
|
81
|
+ </FormItem>
|
|
82
|
+ }
|
|
83
|
+ {
|
|
84
|
+ card?.penaltyInfo &&
|
|
85
|
+ <FormItem label="处罚信息">
|
|
86
|
+ <Image src={card.penaltyInfo} width={100} />
|
|
87
|
+ </FormItem>
|
|
88
|
+ }
|
71
|
89
|
<FormItem label="小程序码">
|
72
|
90
|
{
|
73
|
|
- qrcode&&<Image src={qrcode} width={100} />
|
74
|
|
- }
|
|
91
|
+ qrcode && <Image src={qrcode} width={100} />
|
|
92
|
+ }
|
75
|
93
|
</FormItem>
|
76
|
94
|
<FormItem label=" " colon={false}>
|
77
|
95
|
<Button type="default" onClick={() => goBack()}>
|