|
@@ -1,4 +1,4 @@
|
|
|
-import React, { useCallback, useState } from 'react'
|
|
|
+import React, { useCallback, useEffect, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
import TopCom from '@/components/TopCom'
|
|
|
import classNames from 'classnames'
|
|
@@ -7,6 +7,11 @@ import succImg from '@/assets/img/my/succ.png'
|
|
|
import errImg from '@/assets/img/my/err.png'
|
|
|
import succImg2 from '@/assets/img/my/succ2.png'
|
|
|
import errImg2 from '@/assets/img/my/err2.png'
|
|
|
+import { A6_APIcancelAuth, A6_APIgetListRenZheng } from '@/store/action/all'
|
|
|
+import { A6tableType2 } from './type'
|
|
|
+import { FileType } from '@/types'
|
|
|
+import { baseURL } from '@/utils/http'
|
|
|
+import { MessageFu } from '@/utils/message'
|
|
|
|
|
|
const list1 = [
|
|
|
{
|
|
@@ -64,82 +69,42 @@ const list1 = [
|
|
|
}
|
|
|
]
|
|
|
|
|
|
-const list2 = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- title: '横琴粤澳深度合作区民生事务局',
|
|
|
- name: '撒大苏打水水',
|
|
|
- done: 1,
|
|
|
- phone: '18702025050',
|
|
|
- danwei:
|
|
|
- '为哇饿啊为为哇饿啊为为哇饿啊为为哇饿啊为为哇饿啊为为哇饿啊为为哇饿啊为为哇饿啊为为哇饿啊为为哇饿啊为',
|
|
|
- file: [
|
|
|
- {
|
|
|
- id: 1.1,
|
|
|
- name: 'xxxxxxxxxxxxxx啊实打实大撒大苏打撒旦苏打xxxx.pdf',
|
|
|
- src: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 1.2,
|
|
|
- name: '666.jpg',
|
|
|
- src: ''
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- title: '澳门街坊会联合总会广东办事处',
|
|
|
- name: '撒大苏',
|
|
|
- done: 2,
|
|
|
- phone: '18702025050',
|
|
|
- danwei: '为哇饿啊为为',
|
|
|
- file: [
|
|
|
- {
|
|
|
- id: 2.1,
|
|
|
- name: 'xxxxxxxxxxxxxx啊实打实大苏打xxxx.pdf',
|
|
|
- src: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: 3,
|
|
|
- title: '澳门街坊会联合总会广东办事处',
|
|
|
- name: '撒大苏',
|
|
|
- done: 3,
|
|
|
- phone: '18702025050',
|
|
|
- danwei: '为哇饿啊为为',
|
|
|
- file: [
|
|
|
- {
|
|
|
- id: 3.1,
|
|
|
- name: 'xxxxxxxxxxxxxx啊实打实大苏打xxxx.pdf',
|
|
|
- src: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- id: 4,
|
|
|
- title: '澳门街坊会联合总会广东办事处',
|
|
|
- name: '撒大苏',
|
|
|
- done: 0,
|
|
|
- phone: '18702025050',
|
|
|
- danwei: '为哇饿啊为为',
|
|
|
- file: [
|
|
|
- {
|
|
|
- id: 3.1,
|
|
|
- name: 'xxxxxxxxxxxxxx啊实打实大苏打xxxx.pdf',
|
|
|
- src: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
-]
|
|
|
+// 待完善
|
|
|
|
|
|
function A6my() {
|
|
|
const [topAc, setTopAc] = useState(
|
|
|
window.location.hash.includes('?m=1') ? '认证申请' : '预约申请'
|
|
|
)
|
|
|
|
|
|
- // 点击撤回
|
|
|
- const recallFu = useCallback((id: number) => {}, [])
|
|
|
+ const [list2, setList2] = useState<A6tableType2[]>([])
|
|
|
+ const [loding2, setLoding2] = useState(false)
|
|
|
+
|
|
|
+ // 获取认证申请
|
|
|
+ const getList2 = useCallback(async () => {
|
|
|
+ const res = await A6_APIgetListRenZheng()
|
|
|
+ if (res.code === 0) {
|
|
|
+ setLoding2(true)
|
|
|
+ setList2(res.data)
|
|
|
+ }
|
|
|
+ }, [])
|
|
|
+
|
|
|
+ useEffect(() => {
|
|
|
+ getList2()
|
|
|
+ }, [getList2])
|
|
|
+
|
|
|
+ // 点击撤回 待完善
|
|
|
+ const recallFu = useCallback(
|
|
|
+ async (id: number, type: 'apply' | 'auth') => {
|
|
|
+ const res = await A6_APIcancelAuth(id, type)
|
|
|
+ if (res.code === 0) {
|
|
|
+ MessageFu.success('撤回申请成功!')
|
|
|
+ if (type === 'apply') {
|
|
|
+ // 待完善
|
|
|
+ } else getList2()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ [getList2]
|
|
|
+ )
|
|
|
|
|
|
return (
|
|
|
<div className={styles.A6my}>
|
|
@@ -233,7 +198,7 @@ function A6my() {
|
|
|
<div className={classNames('A6row3', item.done !== 1 ? 'A6row3No' : '')}>
|
|
|
<MyPopconfirm
|
|
|
txtK='撤回'
|
|
|
- onConfirm={() => recallFu(item.id)}
|
|
|
+ onConfirm={() => recallFu(item.id, 'apply')}
|
|
|
Dom={<div>撤回申请</div>}
|
|
|
/>
|
|
|
</div>
|
|
@@ -253,20 +218,24 @@ function A6my() {
|
|
|
<div className='A6_2row' key={item.id}>
|
|
|
<div className='A6_2Top'>
|
|
|
<p>认证单位</p>
|
|
|
- <div>{item.title}</div>
|
|
|
+ <div>
|
|
|
+ {item.type === 'neighbour'
|
|
|
+ ? '澳门街坊会联合总会广东办事处'
|
|
|
+ : '横琴粤澳深度合作区民生事务局'}
|
|
|
+ </div>
|
|
|
|
|
|
- {[0, 1].includes(item.done) ? (
|
|
|
+ {[3, 0].includes(item.status) ? (
|
|
|
<div
|
|
|
className='A6row1_1'
|
|
|
style={{
|
|
|
- borderColor: item.done === 0 ? '#aeaeae' : '#fff',
|
|
|
- backgroundColor: item.done === 0 ? '#aeaeae' : ''
|
|
|
+ borderColor: item.status === 3 ? '#aeaeae' : '#fff',
|
|
|
+ backgroundColor: item.status === 3 ? '#aeaeae' : ''
|
|
|
}}
|
|
|
>
|
|
|
- {item.done === 0 ? '已失效' : '待审核'}
|
|
|
+ {item.status === 3 ? '已失效' : '待审核'}
|
|
|
</div>
|
|
|
) : (
|
|
|
- <img src={item.done === 2 ? succImg2 : errImg2} alt='' />
|
|
|
+ <img src={item.status === 1 ? succImg2 : errImg2} alt='' />
|
|
|
)}
|
|
|
</div>
|
|
|
|
|
@@ -282,17 +251,21 @@ function A6my() {
|
|
|
</p>
|
|
|
<div>
|
|
|
<span>单位名称:</span>
|
|
|
- <p>{item.danwei}</p>
|
|
|
+ <p>{item.unit}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div className='A6_2file'>
|
|
|
<div className='A6_2file1'>
|
|
|
<div className='A6_2file1_1'>授权或同意文件:</div>
|
|
|
- {item.file.map(item2 => (
|
|
|
+ {item.file.map((item2: FileType) => (
|
|
|
<div key={item2.id} className='A6_2fileRow'>
|
|
|
- <div className='A6_2filell'>{item2.name}</div>
|
|
|
- <a href={item2.src} className='A6_2filerr' download={item2.name}>
|
|
|
+ <div className='A6_2filell'>{item2.fileName}</div>
|
|
|
+ <a
|
|
|
+ href={baseURL + item2.filePath}
|
|
|
+ className='A6_2filerr'
|
|
|
+ download={item2.fileName}
|
|
|
+ >
|
|
|
下载
|
|
|
</a>
|
|
|
</div>
|
|
@@ -300,10 +273,10 @@ function A6my() {
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div className={classNames('A6_2btn', item.done !== 1 ? 'A6_2btnNo' : '')}>
|
|
|
+ <div className={classNames('A6_2btn', item.status !== 0 ? 'A6_2btnNo' : '')}>
|
|
|
<MyPopconfirm
|
|
|
txtK='撤回'
|
|
|
- onConfirm={() => recallFu(item.id)}
|
|
|
+ onConfirm={() => recallFu(item.id, 'auth')}
|
|
|
Dom={<div>撤回申请</div>}
|
|
|
/>
|
|
|
</div>
|
|
@@ -311,7 +284,9 @@ function A6my() {
|
|
|
))}
|
|
|
</>
|
|
|
) : (
|
|
|
- <div className='A6No'>暂无认证申请</div>
|
|
|
+ <div className='A6No' hidden={!loding2}>
|
|
|
+ 暂无认证申请
|
|
|
+ </div>
|
|
|
)}
|
|
|
</div>
|
|
|
</div>
|