|
@@ -151,210 +151,210 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- checkPassAuth,
|
|
|
- checkRejectAuth,
|
|
|
- getAllHandledAuthInfo,
|
|
|
- getAllHandlingAuthInfo,
|
|
|
- getCurrentAgencyAuthInfo,
|
|
|
- getCurrentEnterpriseAuthInfo,
|
|
|
- getCurrentIndividualAuthenInfo,
|
|
|
- getFormalTimeFromDate
|
|
|
-} from '@/js/index'
|
|
|
-import {notify} from '@/constants/index'
|
|
|
+ import {
|
|
|
+ checkPassAuth,
|
|
|
+ checkRejectAuth,
|
|
|
+ getAllHandledAuthInfo,
|
|
|
+ getAllHandlingAuthInfo,
|
|
|
+ getCurrentAgencyAuthInfo,
|
|
|
+ getCurrentEnterpriseAuthInfo,
|
|
|
+ getCurrentIndividualAuthenInfo,
|
|
|
+ getFormalTimeFromDate
|
|
|
+ } from '@/js/index'
|
|
|
+ import {notify} from '@/constants/index'
|
|
|
|
|
|
-export default {
|
|
|
- name: 'AuthenticationManage',
|
|
|
- data () {
|
|
|
- return {
|
|
|
- currentPage: 1,
|
|
|
- loading: false,
|
|
|
- showDialog: false,
|
|
|
- authenticationStatusUntreated: '审核中',
|
|
|
- authenticationStatusPass: '审核通过',
|
|
|
- authenticationStatusReject: '审核未通过',
|
|
|
- handlingAuthList: [],
|
|
|
- handledAuthList: [],
|
|
|
- authInfoDetail: {
|
|
|
- userId: '',
|
|
|
- type: '',
|
|
|
- realName: '',
|
|
|
- IDCard: '',
|
|
|
- IDCardPhoto: '',
|
|
|
- bankAccount: '',
|
|
|
- address: '',
|
|
|
- applyTime: '',
|
|
|
+ export default {
|
|
|
+ name: 'AuthenticationManage',
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ currentPage: 1,
|
|
|
+ loading: false,
|
|
|
+ showDialog: false,
|
|
|
+ authenticationStatusUntreated: '审核中',
|
|
|
+ authenticationStatusPass: '审核通过',
|
|
|
+ authenticationStatusReject: '审核未通过',
|
|
|
+ handlingAuthList: [],
|
|
|
+ handledAuthList: [],
|
|
|
+ authInfoDetail: {
|
|
|
+ userId: '',
|
|
|
+ type: '',
|
|
|
+ realName: '',
|
|
|
+ IDCard: '',
|
|
|
+ IDCardPhoto: '',
|
|
|
+ bankAccount: '',
|
|
|
+ address: '',
|
|
|
+ applyTime: '',
|
|
|
|
|
|
- enterpriseName: '',
|
|
|
- legalPersonName: '',
|
|
|
- businessLicensePhoto: '',
|
|
|
- unifiedSocialCreditCode: '',
|
|
|
+ enterpriseName: '',
|
|
|
+ legalPersonName: '',
|
|
|
+ businessLicensePhoto: '',
|
|
|
+ unifiedSocialCreditCode: '',
|
|
|
|
|
|
- evaluationAgencyName: '',
|
|
|
- evaluationAgencyAbilityList: [],
|
|
|
- evaluationAgencyResourceList: [],
|
|
|
- agencyPhoto: '',
|
|
|
- updateTime: '',
|
|
|
- expireTime: ''
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.init()
|
|
|
- })
|
|
|
- },
|
|
|
- methods: {
|
|
|
- init () {
|
|
|
- this.getHandlingAuthList()
|
|
|
- this.getHandledAuthList()
|
|
|
- },
|
|
|
- //获取所有未认证信息
|
|
|
- getHandlingAuthList () {
|
|
|
- this.showLoading()
|
|
|
- getAllHandlingAuthInfo(this.getHandlingAuthListSuccess, this.getHandlingAuthListFail)
|
|
|
- },
|
|
|
- //获取所有已认证信息
|
|
|
- getHandlingAuthListSuccess (res) {
|
|
|
- this.handlingAuthList = res
|
|
|
- this.hideLoading()
|
|
|
- },
|
|
|
- getHandlingAuthListFail (error) {
|
|
|
- this.hideLoading()
|
|
|
- notify('error', '获取认证信息失败:' + error.data)
|
|
|
- },
|
|
|
- getHandledAuthList () {
|
|
|
- this.showLoading()
|
|
|
- getAllHandledAuthInfo(this.getHandledAuthListSuccess, this.getHandledAuthListFail)
|
|
|
- },
|
|
|
- getHandledAuthListSuccess (res) {
|
|
|
- this.handledAuthList = res
|
|
|
- this.hideLoading()
|
|
|
- },
|
|
|
- getHandledAuthListFail (error) {
|
|
|
- this.hideLoading()
|
|
|
- notify('error', '获取已认证信息失败:' + error.data)
|
|
|
- },
|
|
|
- handleCurrentChange (param) {
|
|
|
- console.log(param)
|
|
|
- },
|
|
|
- handleAuthenticationPass (userId, type) {
|
|
|
- this.showLoading()
|
|
|
- checkPassAuth(type, userId, this.handleAuthenticationPassSuccess, this.handleAuthenticationPassFail)
|
|
|
- // item.status = this.authenticationStatusPass
|
|
|
- // console.log('通过')
|
|
|
- },
|
|
|
- handleAuthenticationPassSuccess (res) {
|
|
|
- this.hideLoading()
|
|
|
- this.getHandlingAuthList()
|
|
|
- console.log(res)
|
|
|
- },
|
|
|
- handleAuthenticationPassFail (error) {
|
|
|
- this.hideLoading()
|
|
|
- console.log(error)
|
|
|
- notify('error', '通过失败:' + error.data)
|
|
|
- },
|
|
|
- handleAuthenticationReject (userId, type) {
|
|
|
- this.$prompt('请输入驳回本申请的原因', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- }).then((event) => {
|
|
|
- const explain = event.value
|
|
|
- console.log(explain)
|
|
|
- this.showLoading()
|
|
|
- const data = {
|
|
|
- explain: event.value
|
|
|
- }
|
|
|
- checkRejectAuth(type, userId, data, this.handleAuthenticationRejectSuccess, this.handleAuthenticationRejectFail)
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
- },
|
|
|
- handleAuthenticationRejectSuccess (res) {
|
|
|
- this.hideLoading()
|
|
|
- this.getHandlingAuthList()
|
|
|
- notify('success', '驳回成功')
|
|
|
- console.log(res)
|
|
|
- },
|
|
|
- handleAuthenticationRejectFail (error) {
|
|
|
- this.hideLoading()
|
|
|
- console.log(error)
|
|
|
- notify('error', '拒绝失败:' + error.data)
|
|
|
- },
|
|
|
- handleAuthDetail (userId, type) {
|
|
|
- this.authInfoDetail.userId = userId
|
|
|
- this.authInfoDetail.type = type
|
|
|
- this.getAuthInfo(userId, type)
|
|
|
- },
|
|
|
- showLoading () {
|
|
|
- this.loading = true
|
|
|
- },
|
|
|
- hideLoading () {
|
|
|
- this.loading = false
|
|
|
- },
|
|
|
- reformTime (date) {
|
|
|
- return getFormalTimeFromDate(date)
|
|
|
- },
|
|
|
- rowClassName ({row, rowIndex}) {
|
|
|
- //把每一行的索引放进row.id
|
|
|
- row.id = rowIndex + 1
|
|
|
- },
|
|
|
- showAuthDialog () {
|
|
|
- this.showDialog = true
|
|
|
- },
|
|
|
- hideAuthDialog () {
|
|
|
- this.showDialog = false
|
|
|
- },
|
|
|
- getAuthInfo (userId, type) {
|
|
|
- this.showLoading()
|
|
|
- if (type == 'personal') {
|
|
|
- getCurrentIndividualAuthenInfo(userId, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail)
|
|
|
- } else if (type == 'enterprise') {
|
|
|
- getCurrentEnterpriseAuthInfo(userId, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail)
|
|
|
- } else if (type == 'agency') {
|
|
|
- getCurrentAgencyAuthInfo(userId, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail)
|
|
|
- }
|
|
|
- },
|
|
|
- getCurrentIndividualAuthenInfoSuccess (res) {
|
|
|
- this.hideLoading()
|
|
|
- console.log(res)
|
|
|
- this.authInfoDetail.realName = res.realName
|
|
|
- this.authInfoDetail.IDCard = res.idcard
|
|
|
- this.authInfoDetail.IDCardPhoto = res.idcardPhoto
|
|
|
- this.authInfoDetail.bankAccount = res.bankAccount
|
|
|
- this.authInfoDetail.address = res.address
|
|
|
- this.authInfoDetail.applyTime = res.applyTime
|
|
|
- this.showAuthDialog()
|
|
|
- console.log(res)
|
|
|
+ evaluationAgencyName: '',
|
|
|
+ evaluationAgencyAbilityList: [],
|
|
|
+ evaluationAgencyResourceList: [],
|
|
|
+ agencyPhoto: '',
|
|
|
+ updateTime: '',
|
|
|
+ expireTime: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.init()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init () {
|
|
|
+ this.getHandlingAuthList()
|
|
|
+ this.getHandledAuthList()
|
|
|
+ },
|
|
|
+ //获取所有未认证信息
|
|
|
+ getHandlingAuthList () {
|
|
|
+ this.showLoading()
|
|
|
+ getAllHandlingAuthInfo(this.getHandlingAuthListSuccess, this.getHandlingAuthListFail)
|
|
|
+ },
|
|
|
+ //获取所有已认证信息
|
|
|
+ getHandlingAuthListSuccess (res) {
|
|
|
+ this.handlingAuthList = res
|
|
|
+ this.hideLoading()
|
|
|
+ },
|
|
|
+ getHandlingAuthListFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '获取认证信息失败:' + error.data)
|
|
|
+ },
|
|
|
+ getHandledAuthList () {
|
|
|
+ this.showLoading()
|
|
|
+ getAllHandledAuthInfo(this.getHandledAuthListSuccess, this.getHandledAuthListFail)
|
|
|
+ },
|
|
|
+ getHandledAuthListSuccess (res) {
|
|
|
+ this.handledAuthList = res
|
|
|
+ this.hideLoading()
|
|
|
+ },
|
|
|
+ getHandledAuthListFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '获取已认证信息失败:' + error.data)
|
|
|
+ },
|
|
|
+ handleCurrentChange (param) {
|
|
|
+ console.log(param)
|
|
|
+ },
|
|
|
+ handleAuthenticationPass (userId, type) {
|
|
|
+ this.showLoading()
|
|
|
+ checkPassAuth(type, userId, this.handleAuthenticationPassSuccess, this.handleAuthenticationPassFail)
|
|
|
+ // item.status = this.authenticationStatusPass
|
|
|
+ // console.log('通过')
|
|
|
+ },
|
|
|
+ handleAuthenticationPassSuccess (res) {
|
|
|
+ this.hideLoading()
|
|
|
+ this.getHandlingAuthList()
|
|
|
+ console.log(res)
|
|
|
+ },
|
|
|
+ handleAuthenticationPassFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ console.log(error)
|
|
|
+ notify('error', '通过失败:' + error.data)
|
|
|
+ },
|
|
|
+ handleAuthenticationReject (userId, type) {
|
|
|
+ this.$prompt('请输入驳回本申请的原因', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ }).then((event) => {
|
|
|
+ const explain = event.value
|
|
|
+ console.log(explain)
|
|
|
+ this.showLoading()
|
|
|
+ const data = {
|
|
|
+ explain: event.value
|
|
|
+ }
|
|
|
+ checkRejectAuth(type, userId, data, this.handleAuthenticationRejectSuccess, this.handleAuthenticationRejectFail)
|
|
|
+ }).catch(() => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleAuthenticationRejectSuccess (res) {
|
|
|
+ this.hideLoading()
|
|
|
+ this.getHandlingAuthList()
|
|
|
+ notify('success', '驳回成功')
|
|
|
+ console.log(res)
|
|
|
+ },
|
|
|
+ handleAuthenticationRejectFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ console.log(error)
|
|
|
+ notify('error', '拒绝失败:' + error.data)
|
|
|
+ },
|
|
|
+ handleAuthDetail (userId, type) {
|
|
|
+ this.authInfoDetail.userId = userId
|
|
|
+ this.authInfoDetail.type = type
|
|
|
+ this.getAuthInfo(userId, type)
|
|
|
+ },
|
|
|
+ showLoading () {
|
|
|
+ this.loading = true
|
|
|
+ },
|
|
|
+ hideLoading () {
|
|
|
+ this.loading = false
|
|
|
+ },
|
|
|
+ reformTime (date) {
|
|
|
+ return getFormalTimeFromDate(date)
|
|
|
+ },
|
|
|
+ rowClassName ({row, rowIndex}) {
|
|
|
+ //把每一行的索引放进row.id
|
|
|
+ row.id = rowIndex + 1
|
|
|
+ },
|
|
|
+ showAuthDialog () {
|
|
|
+ this.showDialog = true
|
|
|
+ },
|
|
|
+ hideAuthDialog () {
|
|
|
+ this.showDialog = false
|
|
|
+ },
|
|
|
+ getAuthInfo (userId, type) {
|
|
|
+ this.showLoading()
|
|
|
+ if (type == 'personal') {
|
|
|
+ getCurrentIndividualAuthenInfo(userId, this.getCurrentIndividualAuthenInfoSuccess, this.getCurrentIndividualAuthenInfoFail)
|
|
|
+ } else if (type == 'enterprise') {
|
|
|
+ getCurrentEnterpriseAuthInfo(userId, this.getCurrentEnterpriseAuthInfoSuccess, this.getCurrentEnterpriseAuthInfoFail)
|
|
|
+ } else if (type == 'agency') {
|
|
|
+ getCurrentAgencyAuthInfo(userId, this.getCurrentAgencyAuthInfoSuccess, this.getCurrentAgencyAuthInfoFail)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getCurrentIndividualAuthenInfoSuccess (res) {
|
|
|
+ this.hideLoading()
|
|
|
+ console.log(res)
|
|
|
+ this.authInfoDetail.realName = res.realName
|
|
|
+ this.authInfoDetail.IDCard = res.idcard
|
|
|
+ this.authInfoDetail.IDCardPhoto = res.idcardPhoto
|
|
|
+ this.authInfoDetail.bankAccount = res.bankAccount
|
|
|
+ this.authInfoDetail.address = res.address
|
|
|
+ this.authInfoDetail.applyTime = res.applyTime
|
|
|
+ this.showAuthDialog()
|
|
|
+ console.log(res)
|
|
|
|
|
|
- },
|
|
|
- getCurrentIndividualAuthenInfoFail (error) {
|
|
|
- this.hideLoading()
|
|
|
- notify('error', '获取个人认证信息出错:' + error.data)
|
|
|
- },
|
|
|
- getCurrentEnterpriseAuthInfoSuccess () {
|
|
|
- this.hideLoading()
|
|
|
- this.authInfoDetail.enterpriseName = res.enterpriseName
|
|
|
- this.authInfoDetail.legalPersonName = res.legalPersonName
|
|
|
- this.authInfoDetail.businessLicensePhoto = res.businessLicensePhoto
|
|
|
- },
|
|
|
- getCurrentEnterpriseAuthInfoFail () {
|
|
|
- this.hideLoading()
|
|
|
- notify('error', '获取企业认证信息出错:' + error.data)
|
|
|
- },
|
|
|
- getCurrentAgencyAuthInfoSuccess () {
|
|
|
- this.hideLoading()
|
|
|
- this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName
|
|
|
- this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList
|
|
|
- this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList
|
|
|
- this.authInfoDetail.agencyPhoto = res.agencyPhoto
|
|
|
- this.authInfoDetail.updateTime = res.updateTime
|
|
|
- },
|
|
|
- getCurrentAgencyAuthInfoFail () {
|
|
|
- this.hideLoading()
|
|
|
- notify('error', '获取机构认证信息出错:' + error.data)
|
|
|
+ },
|
|
|
+ getCurrentIndividualAuthenInfoFail (error) {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '获取个人认证信息出错:' + error.data)
|
|
|
+ },
|
|
|
+ getCurrentEnterpriseAuthInfoSuccess () {
|
|
|
+ this.hideLoading()
|
|
|
+ this.authInfoDetail.enterpriseName = res.enterpriseName
|
|
|
+ this.authInfoDetail.legalPersonName = res.legalPersonName
|
|
|
+ this.authInfoDetail.businessLicensePhoto = res.businessLicensePhoto
|
|
|
+ },
|
|
|
+ getCurrentEnterpriseAuthInfoFail () {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '获取企业认证信息出错:' + error.data)
|
|
|
+ },
|
|
|
+ getCurrentAgencyAuthInfoSuccess () {
|
|
|
+ this.hideLoading()
|
|
|
+ this.authInfoDetail.evaluationAgencyName = res.evaluationAgencyName
|
|
|
+ this.authInfoDetail.evaluationAgencyAbilityList = res.evaluationAgencyAbilityList
|
|
|
+ this.authInfoDetail.evaluationAgencyResourceList = res.evaluationAgencyResourceList
|
|
|
+ this.authInfoDetail.agencyPhoto = res.agencyPhoto
|
|
|
+ this.authInfoDetail.updateTime = res.updateTime
|
|
|
+ },
|
|
|
+ getCurrentAgencyAuthInfoFail () {
|
|
|
+ this.hideLoading()
|
|
|
+ notify('error', '获取机构认证信息出错:' + error.data)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|