|
@@ -1,7 +1,7 @@
|
1
|
1
|
import React, { useState, useEffect } from 'react';
|
2
|
2
|
import { Card, Form, Button, Image, Input, message } from 'antd';
|
3
|
3
|
import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
4
|
|
-import { getApplicationDetail, updateAudit } from '@/services/application'
|
|
4
|
+import { getApplicationDetail, updateAudit,getPetCardNo } from '@/services/application'
|
5
|
5
|
import { history } from 'umi';
|
6
|
6
|
|
7
|
7
|
const { TextArea } = Input;
|
|
@@ -17,9 +17,8 @@ export default (props) => {
|
17
|
17
|
const [rejectReason, setRejectReason] = useState();
|
18
|
18
|
const [loading, setLoading] = useState(false)
|
19
|
19
|
|
20
|
|
- const handleAudit = (val) => {
|
21
|
|
- if ((val == 2 && rejectReason) || val == 1) {
|
22
|
|
- setLoading(true)
|
|
20
|
+ const getAudit=(val)=>{
|
|
21
|
+ setLoading(true)
|
23
|
22
|
updateAudit(id, { rejectReason: rejectReason, verifyStatus: val }).then(() => {
|
24
|
23
|
message.success('操作成功');
|
25
|
24
|
goBack()
|
|
@@ -28,6 +27,20 @@ export default (props) => {
|
28
|
27
|
console.log(err.message)
|
29
|
28
|
setLoading(false)
|
30
|
29
|
})
|
|
30
|
+ }
|
|
31
|
+ const handleAudit = (val) => {
|
|
32
|
+ if ((val == 2 && rejectReason) || val == 1) {
|
|
33
|
+ if (val==1&&application.applyType == 'first') {
|
|
34
|
+ getPetCardNo(application.petId).then((res)=>{
|
|
35
|
+ if(!res){
|
|
36
|
+ getAudit(val);
|
|
37
|
+ }else{
|
|
38
|
+ message.info('该宠物已有犬证,请驳回犬主申请');
|
|
39
|
+ }
|
|
40
|
+ })
|
|
41
|
+ }else{
|
|
42
|
+ getAudit(val);
|
|
43
|
+ }
|
31
|
44
|
}
|
32
|
45
|
else {
|
33
|
46
|
message.success('请输入处理结果');
|