李志伟 2 years ago
parent
commit
f089643d9f

+ 6
- 0
src/pages/certificateIssuance/issuance.jsx View File

@@ -137,6 +137,12 @@ export default (props) => {
137 137
               </Button>
138 138
             }
139 139
           </FormItem>
140
+          {
141
+            application?.makeStatus != 0 &&
142
+            <FormItem label="证件有效期">
143
+              {application?.makeDate}
144
+            </FormItem>
145
+          }
140 146
           {
141 147
             application.applyMethod == 2 && <>
142 148
               <FormItem label="快递公司">

+ 17
- 4
src/pages/examine/detail.jsx View File

@@ -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('请输入处理结果');

+ 8
- 0
src/services/application.js View File

@@ -48,3 +48,11 @@ export const getApplicationDetail = (id) => request(`/application/${id}`);
48 48
  * @returns
49 49
  */
50 50
  export const getCardNo = () => request('/card/next');
51
+
52
+ /**
53
+ * 查询狗证ID
54
+ * @param {*} params
55
+ * @returns
56
+ */
57
+export const getPetCardNo = (id) => request(`/pet/${id}/card`);
58
+