李志伟 3 lat temu
rodzic
commit
d631b7ec76

+ 1
- 1
src/components/SettingRow/index.jsx Wyświetl plik

@@ -26,7 +26,7 @@ const SettingRow = (props) => {
26 26
   };
27 27
   return (
28 28
     <div style={{ marginBottom:'16px' }}>
29
-      {value.title}:
29
+      <span style={{width:'120px', display:'inline-block', textAlign:'right'}}>{value.title}</span>
30 30
       <Input style={{ width: '200px',marginRight:value.desc?'16px':'0' }} value={val} onChange={handleChange} onInput={handleInput} />
31 31
       {value.desc?'('+value.desc+')':''}
32 32
       <Button

+ 3
- 4
src/pages/cardNoList/index.jsx Wyświetl plik

@@ -1,4 +1,3 @@
1
-import { history } from 'umi';
2 1
 import { useRef,useState } from 'react';
3 2
 import { Button, Modal, message, Image,Form,Input, InputNumber } from 'antd';
4 3
 import { PlusOutlined } from '@ant-design/icons';
@@ -83,10 +82,10 @@ export default (props) => {
83 82
       >
84 83
         <Form {...formItemLayout} onFinish={Submit} form={form}>
85 84
           <FormItem label="卡号前缀" name="prefix" rules={[{ required: true, message: '请输入' }]}>
86
-            <Input placeholder="请输入" />
85
+            <Input placeholder="请输入卡号前缀" />
87 86
           </FormItem>
88
-          <FormItem label="生成数量" name="num" tooltip='生成数建议至多1000' rules={[{ required: true, message: '请输入正整数' }]}>
89
-            <InputNumber style={{width:'100%'}} min={1} placeholder="请输入" />
87
+          <FormItem label="生成数量" name="num" tooltip='生成数建议1~1000' rules={[{ required: true, message: '请输入正整数' }]}>
88
+            <InputNumber style={{width:'100%'}} min={1} max={1000} placeholder="请输入制卡数量1~1000" />
90 89
           </FormItem>
91 90
           <FormItem label=" " colon={false}>
92 91
             <Button type="default" onClick={onCancel}>

+ 34
- 17
src/pages/examine/detail.jsx Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useEffect } from 'react';
2
-import { Card, Form, Button, Image, Input, message } from 'antd';
2
+import { Card, Form, Button, Image, Input, message, Radio, Modal } from 'antd';
3 3
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
4 4
 import { getApplicationDetail, updateAudit, getPetCardNo } from '@/services/application'
5 5
 import { history } from 'umi';
@@ -15,6 +15,7 @@ export default (props) => {
15 15
   const { id } = location.query;
16 16
   const [application, setApplication] = useState({});
17 17
   const [rejectReason, setRejectReason] = useState();
18
+  const [examineType, SetExamineType] = useState(1);
18 19
   const [loading, setLoading] = useState(false)
19 20
 
20 21
   const getAudit = (val) => {
@@ -28,29 +29,44 @@ export default (props) => {
28 29
       setLoading(false)
29 30
     })
30 31
   }
31
-  const handleAudit = (val) => {
32
-    if ((val == 2 && rejectReason) || val == 1) {
33
-      if (val == 1 && application.applyType == 'first') {
32
+  const handleAudit = () => {
33
+    if ((examineType == 2 && rejectReason) || examineType == 1) {
34
+      if (examineType == 1 && application.applyType == 'first') {
34 35
         getPetCardNo(application.petId).then((res) => {
35 36
           if (!res) {
36
-            getAudit(val);
37
+            getAudit(examineType);
37 38
           } else {
38
-            message.info('该宠物已有犬证,请驳回犬主申请');
39
+            message.info('该宠物已有犬证,请拒绝犬主办证申请');
39 40
           }
40 41
         })
41 42
       } else {
42
-        getAudit(val);
43
+        getAudit(examineType);
43 44
       }
44 45
     }
45 46
     else {
46 47
       message.success('请输入处理结果');
47 48
     }
48 49
   }
50
+  //列表切换通知状态方法
51
+  const handleOK = (record, data) => {
52
+    const title = examineType == 1
53
+      ? '您确定要通过该申请吗'
54
+      : '您确定要拒绝该申请吗';
55
+    Modal.confirm({
56
+      title: title,
57
+      okText: '确认',
58
+      cancelText: '取消',
59
+      onOk() {
60
+        handleAudit()
61
+      },
62
+    });
63
+  };
49 64
 
50 65
   useEffect(() => {
51 66
     getApplicationDetail(id).then((res) => {
52 67
       setApplication(res)
53 68
       setRejectReason(res.rejectReason)
69
+      if (res.verifyStatus == 2) { SetExamineType(2) }
54 70
     }).catch((err) => {
55 71
       console.log(err.message)
56 72
     });
@@ -121,8 +137,14 @@ export default (props) => {
121 137
                     ? '已支付' : ''
122 138
             }
123 139
           </FormItem>
140
+          <FormItem label="审核意见">
141
+            <Radio.Group onChange={e =>{if(application.verifyStatus==0)SetExamineType(e.target.value)}} value={examineType}>
142
+              <Radio value={1}>同意</Radio>
143
+              <Radio value={2}>拒绝</Radio>
144
+            </Radio.Group>
145
+          </FormItem>
124 146
           {
125
-            application.verifyStatus != 1 &&
147
+            application.verifyStatus != 1 && 
126 148
             <FormItem label="驳回原因">
127 149
               <TextArea placeholder='请输入驳回原因' rows='3'
128 150
                 style={{ width: '350px' }}
@@ -135,16 +157,11 @@ export default (props) => {
135 157
           <FormItem label=" " colon={false}>
136 158
             {
137 159
               application.verifyStatus == 0 &&
138
-              <>
139
-                <Button type="primary" loading={loading} style={{ marginRight: '16px' }} onClick={() => handleAudit(1)}>
140
-                  同意
141
-                </Button>
142
-                <Button type="primary" loading={loading} style={{ marginRight: '16px' }} onClick={() => handleAudit(2)}>
143
-                  拒绝
144
-                </Button>
145
-              </>
160
+              <Button type="primary" loading={loading} style={{ marginRight: '16px' }} onClick={handleOK}>
161
+                确定
162
+              </Button>
146 163
             }
147
-            <Button type="default" onClick={() => goBack()}>
164
+            <Button type="default" onClick={goBack}>
148 165
               返回
149 166
             </Button>
150 167
           </FormItem>