AuthenticationManage.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. <template>
  2. <div class="create-container" v-loading="loading">
  3. <div class="create-body">
  4. <div class="title">审核认证信息</div>
  5. <el-table
  6. :data="handlingAuthList"
  7. :row-class-name="rowClassName"
  8. stripe
  9. style="width: 100%">
  10. <el-table-column prop="id" label="编号">
  11. <template slot-scope="scope">
  12. <span>{{scope.row.id}}</span>
  13. </template>
  14. </el-table-column>
  15. <el-table-column prop="userInfo" label="用户信息">
  16. <template slot-scope="scope">
  17. <span style="cursor: pointer">
  18. <el-link type="primary">{{scope.row.userName}}</el-link>
  19. </span>
  20. </template>
  21. </el-table-column>
  22. <el-table-column prop="type" label="认证类型">
  23. <template slot-scope="scope">
  24. <span>
  25. <el-tag v-if="scope.row.type=='personal'" type="success">个人</el-tag>
  26. <el-tag v-if="scope.row.type=='agency'">机构</el-tag>
  27. <el-tag v-if="scope.row.type=='enterprise'" type="warning">企业</el-tag>
  28. </span>
  29. </template>
  30. </el-table-column>
  31. <el-table-column prop="detail" label="认证详情">
  32. <template slot-scope="scope">
  33. <el-link type="primary" @click="handleAuthDetail(scope.row.userId,scope.row.type)">认证详情</el-link>
  34. </template>
  35. </el-table-column>
  36. <el-table-column prop="status" label="认证状态">
  37. <template slot-scope="scope">
  38. <span>
  39. <el-tag :type="scope.row.authStatus.style">{{scope.row.authStatus.text}}</el-tag>
  40. </span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column prop="date" label="申请时间" width="180">
  44. <template slot-scope="scope">
  45. <span>{{reformTime(new Date(scope.row.applytime))}}</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="操作" width="180">
  49. <template slot-scope="scope">
  50. <el-button type="primary" size="mini" @click="handleAuthenticationPass(scope.row.userId,scope.row.type)">
  51. 通过
  52. </el-button>
  53. <el-button type="danger" size="mini" @click="handleAuthenticationReject(scope.row.userId,scope.row.type)">
  54. 驳回
  55. </el-button>
  56. </template>
  57. </el-table-column>
  58. </el-table>
  59. <el-dialog title="认证详情" :visible.sync="showDialog" center width="40%">
  60. <el-form :model="authInfoDetail" label-width="150px" label-position="right">
  61. <el-form-item label="类型:">
  62. <span>
  63. <el-tag v-if="authInfoDetail.type=='personal'" type="success">个人</el-tag>
  64. <el-tag v-if="authInfoDetail.type=='agency'">机构</el-tag>
  65. <el-tag v-if="authInfoDetail.type=='enterprise'" type="warning">企业</el-tag>
  66. </span>
  67. </el-form-item>
  68. <el-form-item label="姓名:" v-if="authInfoDetail.type == 'personal'">
  69. <span>{{authInfoDetail.realName}}</span>
  70. </el-form-item>
  71. <el-form-item label="性别:" v-if="authInfoDetail.type == 'personal'">
  72. <span>{{authInfoDetail.gender}}</span>
  73. </el-form-item>
  74. <el-form-item label="身份证号:" v-if="authInfoDetail.type == 'personal'">
  75. <span>{{authInfoDetail.idCard}}</span>
  76. </el-form-item>
  77. <el-form-item label="身份证正面照:" v-if="authInfoDetail.type == 'personal'">
  78. <span>
  79. <el-image
  80. style="width: 100px;"
  81. :src="authInfoDetail.idCardPositivePhoto"
  82. fit="scale-down"></el-image>
  83. </span>
  84. </el-form-item>
  85. <el-form-item label="身份证反面照:" v-if="authInfoDetail.type == 'personal'">
  86. <span>
  87. <el-image
  88. style="width: 100px;"
  89. :src="authInfoDetail.idCardBackPhoto"
  90. fit="scale-down"></el-image>
  91. </span>
  92. </el-form-item>
  93. <el-form-item label="身份证截止时间:" v-if="authInfoDetail.type == 'personal'">
  94. <span>{{authInfoDetail.idCardDeadTime}}</span>
  95. </el-form-item>
  96. <el-form-item label="地址:">
  97. <span>{{authInfoDetail.address}}</span>
  98. </el-form-item>
  99. <el-form-item label="角色:" v-if="authInfoDetail.type == 'personal'">
  100. <el-checkbox-group v-model="authInfoDetail.roleList" disabled>
  101. <el-checkbox :label="1">发包</el-checkbox>
  102. <el-checkbox :label="0">接包</el-checkbox>
  103. </el-checkbox-group>
  104. <!-- <span>{{authInfoDetail.roleList}}</span>-->
  105. </el-form-item>
  106. <el-form-item label="申请时间:">
  107. <span>{{reformTime(new Date(authInfoDetail.applyTime))}}</span>
  108. </el-form-item>
  109. <!-- <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'enterprise'">-->
  110. <!-- <span>{{authInfoDetail.enterpriseName}}</span>-->
  111. <!-- </el-form-item>-->
  112. <!-- <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'enterprise'">-->
  113. <!-- <span>{{authInfoDetail.legalPersonName}}</span>-->
  114. <!-- </el-form-item>-->
  115. <!-- <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'enterprise'">-->
  116. <!-- <span>-->
  117. <!-- <el-image-->
  118. <!-- style="width: 100px;"-->
  119. <!-- :src="authInfoDetail.businessLicensePhoto"-->
  120. <!-- fit="scale-down"></el-image>-->
  121. <!-- </span>-->
  122. <!-- </el-form-item>-->
  123. <!-- <el-form-item label="统一信用代码:" v-if="authInfoDetail.type == 'enterprise'">-->
  124. <!-- <span>{{authInfoDetail.unifiedSocialCreditCode}}</span>-->
  125. <!-- </el-form-item>-->
  126. <el-form-item label="企业名称:" v-if="authInfoDetail.type == 'agency'">
  127. <span>{{authInfoDetail.evaluationAgencyName}}</span>
  128. </el-form-item>
  129. <el-form-item label="营业执照:" v-if="authInfoDetail.type == 'agency'">
  130. <span>
  131. <el-image
  132. style="width: 100px;"
  133. :src="authInfoDetail.businessLicensePhoto"
  134. fit="scale-down"></el-image>
  135. </span>
  136. </el-form-item>
  137. <el-form-item label="企业地址:">
  138. <span>{{authInfoDetail.address}}</span>
  139. </el-form-item>
  140. <el-form-item label="企业Logo:" v-if="authInfoDetail.type == 'agency'">
  141. <span>
  142. <el-image
  143. style="width: 100px;"
  144. :src="authInfoDetail.agencyPhoto"
  145. fit="scale-down"></el-image>
  146. </span>
  147. </el-form-item>
  148. <el-form-item label="法人姓名:" v-if="authInfoDetail.type == 'agency'">
  149. <span>{{authInfoDetail.legalPersonName}}</span>
  150. </el-form-item>
  151. <el-form-item label="法人性别:" v-if="authInfoDetail.type == 'agency'">
  152. <span>{{authInfoDetail.gender}}</span>
  153. </el-form-item>
  154. <el-form-item label="法人身份证号:" v-if="authInfoDetail.type == 'agency'">
  155. <span>{{authInfoDetail.idCardNum}}</span>
  156. </el-form-item>
  157. <el-form-item label="法人身份证正面照:" v-if="authInfoDetail.type == 'agency'">
  158. <span>
  159. <el-image
  160. style="width: 100px;"
  161. :src="authInfoDetail.idCardPositivePhoto"
  162. fit="scale-down"></el-image>
  163. </span>
  164. </el-form-item>
  165. <el-form-item label="法人身份证反面照:" v-if="authInfoDetail.type == 'agency'">
  166. <span>
  167. <el-image
  168. style="width: 100px;"
  169. :src="authInfoDetail.idCardBackPhoto"
  170. fit="scale-down"></el-image>
  171. </span>
  172. </el-form-item>
  173. <el-form-item label="身份证截止时间:" v-if="authInfoDetail.type == 'agency'">
  174. <span>{{authInfoDetail.idCardDeadTime}}</span>
  175. </el-form-item>
  176. <!-- <el-form-item label="企业角色:" v-if="authInfoDetail.type == 'agency'">-->
  177. <!-- <span>{{authInfoDetail.roleList}}</span>-->
  178. <!-- </el-form-item>-->
  179. <el-form-item label="企业角色:" v-if="authInfoDetail.type == 'agency'">
  180. <el-checkbox-group v-model="authInfoDetail.roleList" disabled>
  181. <el-checkbox :label="1">发包</el-checkbox>
  182. <el-checkbox :label="0">接包</el-checkbox>
  183. </el-checkbox-group>
  184. <!-- <span>{{authInfoDetail.roleList}}</span>-->
  185. </el-form-item>
  186. <!-- <el-form-item label="机构能力:" v-if="authInfoDetail.type == 'agency'">-->
  187. <!-- <span v-for="item in authInfoDetail.evaluationAgencyAbilityList"> <el-tag>{{item}}</el-tag>-->
  188. <!-- </span>-->
  189. <!-- </el-form-item>-->
  190. <!-- <el-form-item label="机构资源:" v-if="authInfoDetail.type == 'agency'">-->
  191. <!-- <span v-for="item in authInfoDetail.evaluationAgencyResourceList"> <el-tag>{{item.type}} ( {{item.name}} ) :&nbsp; [总数:{{item.totalNum}} ,可用数量:{{item.availableNum}}]</el-tag>-->
  192. <!-- </span>-->
  193. <!-- </el-form-item>-->
  194. </el-form>
  195. <div slot="footer" class="dialog-footer">
  196. <el-button type="info" size="mini" @click="hideAuthDialog()">返回</el-button>
  197. <el-button type="danger" size="mini"
  198. @click="handleAuthenticationReject(authInfoDetail.userId,authInfoDetail.type)">驳回
  199. </el-button>
  200. <el-button type="primary" size="mini"
  201. @click="handleAuthenticationPass(authInfoDetail.userId,authInfoDetail.type)">通过
  202. </el-button>
  203. </div>
  204. </el-dialog>
  205. <!--<el-pagination-->
  206. <!--:page-size="20"-->
  207. <!--hide-on-single-page-->
  208. <!--:pager-count="5"-->
  209. <!--:current-page.sync="currentPage"-->
  210. <!--layout="prev, pager, next"-->
  211. <!--@current-change="handleCurrentChange"-->
  212. <!--:total="100">-->
  213. <!--</el-pagination>-->
  214. </div>
  215. </div>
  216. </template>
  217. <script>
  218. import {
  219. checkPassAuth,
  220. checkRejectAuth,
  221. getAllHandledAuthInfo,
  222. getAllHandlingAuthInfo,
  223. getCurrentAgencyAuthInfo,
  224. getCurrentEnterpriseAuthInfo,
  225. getCurrentIndividualAuthenInfo,
  226. getFormalTimeFromDate
  227. } from '@/js/index'
  228. import {notify} from '@/constants/index'
  229. export default {
  230. name: 'AuthenticationManage',
  231. data () {
  232. return {
  233. currentPage: 1,
  234. loading: false,
  235. showDialog: false,
  236. authenticationStatusUntreated: '审核中',
  237. authenticationStatusPass: '审核通过',
  238. authenticationStatusReject: '审核未通过',
  239. handlingAuthList: [],
  240. handledAuthList: [],
  241. authInfoDetail: {
  242. userId: '',
  243. realName: "",
  244. applyTime: "",
  245. checkTime: "",
  246. explain: "",
  247. gender: "",
  248. idCard: "",
  249. idCardBackPhoto: "",
  250. idCardDeadTime: "",
  251. idCardPositivePhoto: "",
  252. isAuthentication: 0,
  253. isDeleted: 0,
  254. roleList: [],
  255. address: "",
  256. type: '',
  257. bankAccount: '',
  258. enterpriseName: '',
  259. legalPersonName: '',
  260. businessLicensePhoto: '',
  261. unifiedSocialCreditCode: '',
  262. agencyPhoto: "",
  263. evaluationAgencyName: "",
  264. expireTime: '',
  265. idCardNum: "",
  266. evaluationAgencyAbilityList: [],
  267. evaluationAgencyResourceList: [],
  268. updateTime: '',
  269. }
  270. }
  271. },
  272. mounted () {
  273. this.$nextTick(() => {
  274. this.init()
  275. })
  276. },
  277. methods: {
  278. init () {
  279. this.getHandlingAuthList()
  280. this.getHandledAuthList()
  281. },
  282. //获取所有未认证信息
  283. getHandlingAuthList () {
  284. this.showLoading()
  285. getAllHandlingAuthInfo(this.getHandlingAuthListSuccess, this.getHandlingAuthListFail)
  286. },
  287. //获取所有已认证信息
  288. getHandlingAuthListSuccess (res) {
  289. this.handlingAuthList = res
  290. this.hideLoading()
  291. },
  292. getHandlingAuthListFail (error) {
  293. this.hideLoading()
  294. notify('error', '获取认证信息失败:' + error.data)
  295. },
  296. getHandledAuthList () {
  297. this.showLoading()
  298. getAllHandledAuthInfo(this.getHandledAuthListSuccess, this.getHandledAuthListFail)
  299. },
  300. getHandledAuthListSuccess (res) {
  301. this.handledAuthList = res
  302. this.hideLoading()
  303. },
  304. getHandledAuthListFail (error) {
  305. this.hideLoading()
  306. notify('error', '获取已认证信息失败:' + error.data)
  307. },
  308. handleCurrentChange (param) {
  309. console.log(param)
  310. },
  311. handleAuthenticationPass (userId, type) {
  312. this.showLoading()
  313. checkPassAuth(type, userId, this.handleAuthenticationPassSuccess, this.handleAuthenticationPassFail)
  314. this.showDialog = false
  315. // item.status = this.authenticationStatusPass
  316. // console.log('通过')
  317. },
  318. handleAuthenticationPassSuccess (res) {
  319. this.hideLoading()
  320. this.getHandlingAuthList()
  321. console.log(res)
  322. },
  323. handleAuthenticationPassFail (error) {
  324. this.hideLoading()
  325. console.log(error)
  326. notify('error', '通过失败:' + error.data)
  327. },
  328. handleAuthenticationReject (userId, type) {
  329. this.$prompt('请输入驳回本申请的原因', '提示', {
  330. confirmButtonText: '确定',
  331. cancelButtonText: '取消',
  332. }).then((event) => {
  333. const explain = event.value
  334. console.log(explain)
  335. this.showLoading()
  336. const data = {
  337. explain: event.value
  338. }
  339. checkRejectAuth(type, userId, data, this.handleAuthenticationRejectSuccess, this.handleAuthenticationRejectFail)
  340. }).catch(() => {
  341. })
  342. },
  343. handleAuthenticationRejectSuccess (res) {
  344. this.hideLoading()
  345. this.getHandlingAuthList()
  346. notify('success', '驳回成功')
  347. this.hideAuthDialog()
  348. console.log(res)
  349. },
  350. handleAuthenticationRejectFail (error) {
  351. this.hideLoading()
  352. console.log(error)
  353. notify('error', '拒绝失败:' + error.data)
  354. },
  355. handleAuthDetail (userId, type) {
  356. this.authInfoDetail.userId = userId
  357. this.authInfoDetail.type = type
  358. this.getAuthInfo(userId, type)
  359. },
  360. showLoading () {
  361. this.loading = true
  362. },
  363. hideLoading () {
  364. this.loading = false
  365. },
  366. reformTime (date) {
  367. return getFormalTimeFromDate(date)
  368. },
  369. rowClassName ({row, rowIndex}) {
  370. //把每一行的索引放进row.id
  371. row.id = rowIndex + 1
  372. },
  373. showAuthDialog () {
  374. this.showDialog = true
  375. },
  376. hideAuthDialog () {
  377. this.showDialog = false
  378. },
  379. getAuthInfo (userId, type) {
  380. this.showLoading()
  381. if (type == 'personal') {
  382. getCurrentIndividualAuthenInfo(userId, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail)
  383. } else if (type == 'enterprise') {
  384. getCurrentEnterpriseAuthInfo(userId, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail)
  385. } else if (type == 'agency') {
  386. getCurrentAgencyAuthInfo(userId, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail)
  387. }
  388. },
  389. getCurrentIndividualAuthenInfoSuccess (res) {
  390. this.hideLoading()
  391. console.log(res)
  392. this.authInfoDetail.realName = res.realName
  393. this.authInfoDetail.applyTime = res.applyTime
  394. this.authInfoDetail.checkTime = res.checkTime
  395. this.authInfoDetail.explain = res.explain
  396. this.authInfoDetail.gender = res.gender
  397. this.authInfoDetail.idCard = res.idCard
  398. this.authInfoDetail.idCardBackPhoto = res.idCardBackPhoto
  399. this.authInfoDetail.idCardDeadTime = res.idCardDeadTime
  400. this.authInfoDetail.idCardPositivePhoto = res.idCardPositivePhoto
  401. this.authInfoDetail.isAuthentication = res.isAuthentication
  402. this.authInfoDetail.isDeleted = res.isDeleted
  403. this.authInfoDetail.roleList = res.roleList
  404. this.authInfoDetail.address = res.address
  405. this.showAuthDialog()
  406. console.log(res)
  407. },
  408. getCurrentIndividualAuthenInfoFail (error) {
  409. this.hideLoading()
  410. notify('error', '获取个人认证信息出错:' + error.data)
  411. },
  412. getCurrentEnterpriseAuthInfoSuccess (res) {
  413. this.hideLoading()
  414. this.authInfoDetail.enterpriseName = res.enterpriseName
  415. this.authInfoDetail.legalPersonName = res.legalPersonName
  416. this.authInfoDetail.businessLicensePhoto = res.businessLicensePhoto
  417. this.authInfoDetail.bankAccount = res.bankAccount
  418. this.authInfoDetail.address = res.address
  419. this.authInfoDetail.applyTime = res.applyTime
  420. this.authInfoDetail.unifiedSocialCreditCode = res.unifiedSocialCreditCode
  421. this.showAuthDialog()
  422. },
  423. getCurrentEnterpriseAuthInfoFail (error) {
  424. this.hideLoading()
  425. notify('error', '获取企业认证信息出错:' + error.data)
  426. },
  427. getCurrentAgencyAuthInfoSuccess (res) {
  428. this.hideLoading()
  429. this.authInfoDetail.bankAccount = res.data.bankAccount
  430. this.authInfoDetail.legalPersonName = res.data.legalPersonName
  431. this.authInfoDetail.businessLicensePhoto = res.data.businessLicensePhoto
  432. this.authInfoDetail.address = res.data.address
  433. this.authInfoDetail.applyTime = res.data.applyTime
  434. this.authInfoDetail.evaluationAgencyName = res.data.evaluationAgencyName
  435. this.authInfoDetail.evaluationAgencyAbilityList = res.data.evaluationAgencyAbilityList
  436. this.authInfoDetail.evaluationAgencyResourceList = res.data.evaluationAgencyResourceList
  437. this.authInfoDetail.agencyPhoto = res.data.agencyPhoto
  438. this.authInfoDetail.updateTime = res.data.updateTime
  439. this.authInfoDetail.checkTime = res.data.checkTime
  440. this.authInfoDetail.explain = res.data.explain
  441. this.authInfoDetail.gender = res.data.gender
  442. this.authInfoDetail.idCardNum = res.data.idCardNum
  443. this.authInfoDetail.idCardBackPhoto = res.data.idCardBackPhoto
  444. this.authInfoDetail.idCardDeadTime = res.data.idCardDeadTime
  445. this.authInfoDetail.idCardPositivePhoto = res.data.idCardPositivePhoto
  446. this.authInfoDetail.isAuthentication = res.data.isAuthentication
  447. this.authInfoDetail.isDeleted = res.data.isDeleted
  448. this.authInfoDetail.roleList = res.data.roleList
  449. this.showAuthDialog()
  450. },
  451. getCurrentAgencyAuthInfoFail (error) {
  452. this.hideLoading()
  453. notify('error', '获取机构认证信息出错:' + error.data)
  454. }
  455. }
  456. }
  457. </script>
  458. <style scoped>
  459. </style>