[update]-授权申请页面的增加;企业端消息的增加;列表页字段显示不正确的bug
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @Description: 标协会员 因为消息 增加的api
|
||||
* @param {*}
|
||||
* @Date: 2021-09-24 fcc
|
||||
* */
|
||||
import { getAction } from '@api/memberManage'
|
||||
|
||||
// 会员缴费 -通过 会员缴费的id 获得全部的缴费信息数据
|
||||
const getPaymentInfoById = (params) => {
|
||||
return new Promise(resolve => {
|
||||
getAction('/paymentInfo/queryById', params).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
// 证书缴费 -通过 证书缴费的id 获得全部的缴费信息数据
|
||||
const getCertificatePaymentInfoById = (params) => {
|
||||
return new Promise(resolve => {
|
||||
getAction('/certificatePaymentInfo/queryById', params).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
// 证书缴费 -财务人员拒绝或驳回 在证书管理模块使用证书id获得相关信息
|
||||
const getVinCertificateById = (params) => {
|
||||
return new Promise(resolve => {
|
||||
getAction('/vinCertificate/vinCertificate/queryById', params).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
// 证书缴费 -财务人员拒绝或驳回 在证书管理模块使用证书id获得相关信息
|
||||
const getBillingInfoById = (params) => {
|
||||
return new Promise(resolve => {
|
||||
// billingInfo/billingInfo/list
|
||||
getAction('/billingInfo/billingInfo/getById', params).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
getPaymentInfoById,
|
||||
getCertificatePaymentInfoById,
|
||||
getVinCertificateById,
|
||||
getBillingInfoById
|
||||
}
|
||||
|
||||
@@ -60,6 +60,11 @@ const getCertificateById = (params) => getAction('/vinCertificate/vinCertificate
|
||||
|
||||
/****证书缴费 列表页所用接口-结束 ****/
|
||||
|
||||
// 会员申请授权
|
||||
const application = (params) => postAction('/vincertificateauthorize/tbVinCertificateAuthorize/application', params)
|
||||
// 确认和取消授权
|
||||
const determineOrCancel = (params) => postAction('/vincertificateauthorize/tbVinCertificateAuthorize/authorize', params)
|
||||
|
||||
|
||||
export {
|
||||
getMemberBaseInfo,
|
||||
@@ -78,7 +83,9 @@ export {
|
||||
getCheckInfo,
|
||||
getByMemberTime,
|
||||
downNewestNotice,
|
||||
|
||||
getCertificateById,
|
||||
|
||||
application,
|
||||
determineOrCancel
|
||||
|
||||
}
|
||||
|
||||
+28
-13
@@ -125,7 +125,7 @@ export const routerData = [
|
||||
componentName: 'BasicInfo',
|
||||
title: '基本信息'
|
||||
},
|
||||
name: 'standardsAssociation/BasicInfo',
|
||||
name: 'standardsAssociation-BasicInfo',
|
||||
path: '/standardsAssociation/BasicInfo',
|
||||
route: '1'
|
||||
}, {
|
||||
@@ -137,7 +137,7 @@ export const routerData = [
|
||||
componentName: 'MemberManagement',
|
||||
title: '会员管理'
|
||||
},
|
||||
name: 'standardsAssociation/MemberManagement',
|
||||
name: 'standardsAssociation-MemberManagement',
|
||||
path: '/standardsAssociation/MemberManagement',
|
||||
route: '1'
|
||||
}, {
|
||||
@@ -149,10 +149,25 @@ export const routerData = [
|
||||
componentName: 'CertificateManagement',
|
||||
title: '证书管理'
|
||||
},
|
||||
name: 'standardsAssociation/CertificateManagement',
|
||||
name: 'standardsAssociation-CertificateManagement',
|
||||
path: '/standardsAssociation/CertificateManagement',
|
||||
route: '1'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
component: 'standardsAssociation/vinCertificate/Authorization',
|
||||
id: '4-3-1',
|
||||
hidden: true,
|
||||
meta: {
|
||||
keepAlive: false,
|
||||
internalOrExternal: false,
|
||||
componentName: 'CertificateManagement',
|
||||
title: '授权申请'
|
||||
},
|
||||
name: 'member-vinCertificate-Authorization',
|
||||
path: '/standardsAssociation/vinCertificate/Authorization',
|
||||
route: '1'
|
||||
},
|
||||
{
|
||||
component: 'layouts/RouteView',
|
||||
id: '4-4',
|
||||
meta: {
|
||||
@@ -161,7 +176,7 @@ export const routerData = [
|
||||
componentName: 'PaymentInfo',
|
||||
title: '缴费信息'
|
||||
},
|
||||
name: 'standardsAssociation/PaymentInfo',
|
||||
name: 'standardsAssociation-PaymentInfo',
|
||||
path: '/standardsAssociation/PaymentInfo',
|
||||
route: '1',
|
||||
children: [
|
||||
@@ -174,7 +189,7 @@ export const routerData = [
|
||||
componentName: 'MemberInfo',
|
||||
title: '会员缴费'
|
||||
},
|
||||
name: 'standardsAssociation/PaymentInfo/MemberInfo',
|
||||
name: 'standardsAssociation-PaymentInfo-MemberInfo',
|
||||
path: '/standardsAssociation/PaymentInfo/MemberInfo',
|
||||
route: '1'
|
||||
}, {
|
||||
@@ -186,7 +201,7 @@ export const routerData = [
|
||||
componentName: 'CertificateInfo',
|
||||
title: '证书缴费'
|
||||
},
|
||||
name: 'standardsAssociation/PaymentInfo/CertificateInfo',
|
||||
name: 'standardsAssociation-PaymentInfo-CertificateInfo',
|
||||
path: '/standardsAssociation/PaymentInfo/CertificateInfo',
|
||||
route: '1'
|
||||
}, {
|
||||
@@ -198,7 +213,7 @@ export const routerData = [
|
||||
componentName: 'InvoiceInfo',
|
||||
title: '发票信息'
|
||||
},
|
||||
name: 'standardsAssociation/PaymentInfo/InvoiceInfo',
|
||||
name: 'standardsAssociation-PaymentInfo-InvoiceInfo',
|
||||
path: '/standardsAssociation/PaymentInfo/InvoiceInfo',
|
||||
route: '1'
|
||||
}
|
||||
@@ -212,7 +227,7 @@ export const routerData = [
|
||||
componentName: 'Council',
|
||||
title: '理事会'
|
||||
},
|
||||
name: 'standardsAssociation/Council',
|
||||
name: 'standardsAssociation-Council',
|
||||
path: '/standardsAssociation/Council',
|
||||
route: '1'
|
||||
}, {
|
||||
@@ -224,7 +239,7 @@ export const routerData = [
|
||||
componentName: 'StandardPublicizingImplementation',
|
||||
title: '标准宣贯'
|
||||
},
|
||||
name: 'standardsAssociation/StandardPublicizingImplementation',
|
||||
name: 'standardsAssociation-StandardPublicizingImplementation',
|
||||
path: '/standardsAssociation/StandardPublicizingImplementation',
|
||||
route: '1'
|
||||
}, {
|
||||
@@ -236,7 +251,7 @@ export const routerData = [
|
||||
componentName: 'InfoCommunicationMeeting',
|
||||
title: '信息交流会'
|
||||
},
|
||||
name: 'standardsAssociation/InfoCommunicationMeeting',
|
||||
name: 'standardsAssociation-InfoCommunicationMeeting',
|
||||
path: '/standardsAssociation/InfoCommunicationMeeting',
|
||||
route: '1'
|
||||
}, {
|
||||
@@ -248,7 +263,7 @@ export const routerData = [
|
||||
componentName: 'TrainingMeeting',
|
||||
title: '培训会'
|
||||
},
|
||||
name: 'standardsAssociation/TrainingMeeting',
|
||||
name: 'standardsAssociation-TrainingMeeting',
|
||||
path: '/standardsAssociation/TrainingMeeting',
|
||||
route: '1'
|
||||
}
|
||||
@@ -415,5 +430,5 @@ export const routerData = [
|
||||
},
|
||||
name: 'work-team-detail',
|
||||
id: '14'
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
</a>
|
||||
<!-- 会员 只有企业证书才 正常使用 已绑定的证书 可授权申请-->
|
||||
<a
|
||||
v-show="roleCode === 'member'&& record.certificateType === 2 && (record.certificateStatus === 4 || record.certificateStatus === 1)"
|
||||
v-show="roleCode === 'member'&& record.certificateType == 2 && (record.certificateStatus == 4 || record.certificateStatus == 1)"
|
||||
>
|
||||
<a href="javascript:;" @click="authorizationFunc(record)">授权申请</a>
|
||||
</a>
|
||||
@@ -203,7 +203,7 @@ export default {
|
||||
end: 'YYYY-MM-DD'
|
||||
},
|
||||
description: 'VIN证书管理页面',
|
||||
roleCode: Vue.ls.get(USER_INFO).roleCode,
|
||||
roleCode: 'member',
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<div>
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-12 column">
|
||||
<a-tabs @change="switchNav" :animated="false">
|
||||
<a-tabs @change="switchNav" :animated="false" :active-key="navIndex + ''">
|
||||
<a-tab-pane key="1" tab="会员信息">
|
||||
<member-info v-if="navIndex === 1" ref="memberInfoDom" :member-info="memberInfo"></member-info>
|
||||
</a-tab-pane>
|
||||
@@ -292,6 +292,7 @@ export default {
|
||||
this.remainingTime = this.remainingTimeCount(res.result.validDate)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.memberInfoDom && this.$refs.memberInfoDom.initData(res.result)
|
||||
|
||||
})
|
||||
}
|
||||
if (res.code === 510) {
|
||||
@@ -355,14 +356,12 @@ export default {
|
||||
this.pageType = this.$route.query.pageType
|
||||
// 当前默认选中的tab页
|
||||
this.navIndex = Number(this.$route.query.navIndex) || 1
|
||||
// 不是跳转第一页的时候,触发相应的点击事件
|
||||
if (this.navIndex !== 1) {
|
||||
this.switchNav(this.navIndex)
|
||||
}
|
||||
// 获得会员的相关信息
|
||||
this.getMemberInfo()
|
||||
// 获得公钥的相关信息
|
||||
this.getEncryptedStringFunc()
|
||||
// 不是跳转第一页的时候,触发相应的点击事件
|
||||
console.log('navIndex====', this.navIndex)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<component
|
||||
:is="comp"
|
||||
:formData="formData"
|
||||
ref="compModel"
|
||||
v-if="comp"
|
||||
>
|
||||
</component>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'MemberDynamicNotice',
|
||||
data() {
|
||||
return {
|
||||
compName: this.path
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
comp: function() {
|
||||
if (!this.path) {
|
||||
return null
|
||||
}
|
||||
return resolve => require([`@/views/${this.path}.vue`], resolve)
|
||||
}
|
||||
},
|
||||
props: ['path', 'formData'],
|
||||
methods: {
|
||||
detail() {
|
||||
setTimeout(async() => {
|
||||
if (this.path) {
|
||||
console.log('this.formData=======', this.formData)
|
||||
// 如果需要请求参数,代表需要请求接口
|
||||
if (this.formData.requestMethod) {
|
||||
const { result, success } = await this.formData.requestMethod(this.formData.requestParams)
|
||||
if (success) {
|
||||
this.$refs.compModel && this.formData.callback && this.formData.callback(this.$refs.compModel, result)
|
||||
}
|
||||
} else {
|
||||
// 其他情况 是模态框内部调接口
|
||||
this.$refs.compModel && this.formData.callback && this.formData.callback(this.$refs.compModel, this.formData)
|
||||
}
|
||||
}
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,223 @@
|
||||
import
|
||||
{
|
||||
getPaymentInfoById,
|
||||
getCertificatePaymentInfoById,
|
||||
getVinCertificateById,
|
||||
getBillingInfoById
|
||||
} from '@/api/memberAnnounceApi'
|
||||
|
||||
export const AnnounceEnum = {
|
||||
PAYMENT_CHECK: { name: '会员缴费-核对凭证', value: 'PAYMENT_CHECK' },
|
||||
PAYMENT_EDIT: { name: '会员缴费-编辑', value: 'PAYMENT_EDIT' },
|
||||
CERTIFICATE_PAYMENT_CHECK: { name: '证书缴费-核对凭证', value: 'CERTIFICATE_PAYMENT_CHECK' },
|
||||
CERTIFICATE_MANAGE_EDIT: { name: '证书管理-编辑', value: 'CERTIFICATE_MANAGE_EDIT' },
|
||||
CERTIFICATE_MANAGE_VIEW: { name: '证书管理-查看', value: 'CERTIFICATE_MANAGE_VIEW' },
|
||||
PAYMENT_ADD: { name: '会员缴费-新增', value: 'PAYMENT_ADD' },
|
||||
CERTIFICATE_MANAGE_CHECK: { name: '证书管理-核实', value: 'CERTIFICATE_MANAGE_CHECK' },
|
||||
BILLINGINFO_MAIL: { name: '发票管理-邮寄', value: 'BILLINGINFO_MAIL' },
|
||||
CERTIFICATE_MANAGE_AUTHORIZE: { name: '证书管理-授权', value: 'CERTIFICATE_MANAGE_AUTHORIZE' },
|
||||
COMPANY_NAME_CHECK: { name: '单位名称变更-审核', value: 'COMPANY_NAME_CHECK' },
|
||||
COMPANY_NAME_REJECT: { name: '单位名称变更-驳回', value: 'COMPANY_NAME_REJECT' },
|
||||
COMPANY_NAME_PASS: { name: '单位名称变更-通过', value: 'COMPANY_NAME_PASS' }
|
||||
}
|
||||
export const OpenTypeEnum = {
|
||||
PAGE: { name: '新标签页', value: 1 },
|
||||
COMPONENT: { name: '组件', value: 2 },
|
||||
METHODS: { name: '方法', value: 3 }
|
||||
}
|
||||
|
||||
function remainingTimeCount(date) {
|
||||
if (date === null || date === undefined || date.length === 0) {
|
||||
return 0
|
||||
}
|
||||
date = date.substring(11)
|
||||
var strArr = (date + ' 23:59:59').split(' ')
|
||||
var strDay = strArr[0].split('-')
|
||||
var strTime = strArr[1].split(':')
|
||||
var yy = strDay[0]
|
||||
var mm = strDay[1]
|
||||
var dd = strDay[2]
|
||||
var hh = strTime[0]
|
||||
var mi = strTime[1]
|
||||
var se = strTime[2]
|
||||
var date1 = new Date(Date.UTC(yy, mm - 1, dd, hh - 8, mi, se))
|
||||
var date2 = new Date()
|
||||
if (date1 <= date2) {
|
||||
return 0
|
||||
}
|
||||
// var miao = (date1.getTime() - date2.getTime()) / 1000
|
||||
var fen = ((date1.getTime() - date2.getTime()) / 1000) / 60
|
||||
return parseInt(fen / (24 * 60)) // 得出剩bai余
|
||||
}
|
||||
|
||||
// 2021-09-24 判断当前消息是否有 jumpParameter 参数,如果有的话需要跳转页面或者弹框;没有的话 就直接显示详情页
|
||||
// jumpParameter示例 :paymentInfoId:1441329411264643074,memberId:1413419593870872578,paymentType:0,window:PAYMENT_CHECK"
|
||||
export const parseJumpParameter = function(jumpParameter) {
|
||||
// 对当前的jumpParameter 进行解析
|
||||
const jumpParam = {}
|
||||
const jumpParamArr = jumpParameter.split(',')
|
||||
jumpParamArr.length > 0 && jumpParamArr.map(item => {
|
||||
const arr = item.split(':')
|
||||
if (arr.length > 0) {
|
||||
jumpParam[arr[0]] = arr[1]
|
||||
}
|
||||
})
|
||||
// 如果有跳转的方法 -- openType 打开消息的方式 openPage- 组件/路由 地址
|
||||
if (jumpParam.window) {
|
||||
switch (jumpParam.window) {
|
||||
// 会员缴费-核对凭证- 提醒人员 系统人员-财务人员,此处不需要
|
||||
case AnnounceEnum.PAYMENT_CHECK.value:
|
||||
jumpParam.openType = OpenTypeEnum.COMPONENT.value
|
||||
jumpParam.openPage = 'member/paymentInfo/modules/PaymentInfoModal'
|
||||
jumpParam.requestMethod = getPaymentInfoById
|
||||
jumpParam.requestParams = { id: jumpParam.paymentInfoId }
|
||||
// 所有操作完成后的回调方法
|
||||
jumpParam.callback = (dom, record) => {
|
||||
dom.title = '核对凭证'
|
||||
dom.handleCheck(record)
|
||||
}
|
||||
break
|
||||
// 会员缴费-编辑
|
||||
case AnnounceEnum.PAYMENT_EDIT.value:
|
||||
jumpParam.openType = OpenTypeEnum.COMPONENT.value
|
||||
// jumpParam.openPage = 'member/paymentInfo/modules/PaymentInfoModal'
|
||||
jumpParam.openPage = 'standardsAssociation/PaymentInfo/modules/PaymentInfoModal'
|
||||
jumpParam.requestMethod = getPaymentInfoById
|
||||
jumpParam.requestParams = { id: jumpParam.paymentInfoId }
|
||||
// 所有操作完成后的回调方法
|
||||
jumpParam.callback = (dom, record) => {
|
||||
dom.title = '编辑'
|
||||
dom.edit(record)
|
||||
}
|
||||
break
|
||||
// 证书缴费-核对凭证 --财务人员用,此处不需要处理
|
||||
case AnnounceEnum.CERTIFICATE_PAYMENT_CHECK.value:
|
||||
jumpParam.openType = OpenTypeEnum.COMPONENT.value
|
||||
jumpParam.openPage = 'member/certificatePaymentInfo/modules/CertificatePaymentInfoModal'
|
||||
jumpParam.requestMethod = getCertificatePaymentInfoById
|
||||
jumpParam.requestParams = { id: jumpParam.certificatePayId }
|
||||
// 所有操作完成后的回调方法
|
||||
jumpParam.callback = (dom, record) => {
|
||||
dom.title = '核对凭证'
|
||||
dom.handleCheck(record)
|
||||
}
|
||||
break
|
||||
// 证书管理-编辑--财务人员拒绝或驳回 证书缴费 -会员进行查看
|
||||
case AnnounceEnum.CERTIFICATE_MANAGE_EDIT.value:
|
||||
jumpParam.openType = OpenTypeEnum.COMPONENT.value
|
||||
// jumpParam.openPage = 'member/vinCertificate/modules/VinCertificateModal'
|
||||
jumpParam.openPage = 'standardsAssociation/memberManagementModule/VinCertificateModal'
|
||||
jumpParam.requestMethod = getVinCertificateById
|
||||
jumpParam.requestParams = { id: jumpParam.certificateId }
|
||||
// 所有操作完成后的回调方法
|
||||
jumpParam.callback = (dom, record) => {
|
||||
dom.title = '新增申请'
|
||||
dom.disableSubmit = false
|
||||
dom.pageType = 11
|
||||
dom.edit6(record)
|
||||
}
|
||||
break
|
||||
// 证书管理-查看
|
||||
case AnnounceEnum.CERTIFICATE_MANAGE_VIEW.value:
|
||||
jumpParam.openType = OpenTypeEnum.COMPONENT.value
|
||||
// jumpParam.openPage = 'member/vinCertificate/modules/VinCertificateModal'
|
||||
jumpParam.openPage = 'standardsAssociation/memberManagementModule/VinCertificateModal'
|
||||
jumpParam.requestMethod = getVinCertificateById
|
||||
jumpParam.requestParams = { id: jumpParam.certificateId }
|
||||
// 所有操作完成后的回调方法
|
||||
jumpParam.callback = (dom, record) => {
|
||||
dom.title = '查看证书'
|
||||
dom.disableSubmit = true
|
||||
dom.pageType = 1
|
||||
dom.remainingTime = remainingTimeCount(record.certificateValidDate)
|
||||
dom.edit(record)
|
||||
}
|
||||
break
|
||||
// 会员缴费-新增
|
||||
// 注册的时候 跳转到会员缴费的页面
|
||||
case AnnounceEnum.PAYMENT_ADD.value:
|
||||
jumpParam.openType = OpenTypeEnum.PAGE.value
|
||||
jumpParam.openPage = {
|
||||
name: 'standardsAssociation-PaymentInfo-MemberInfo'
|
||||
}
|
||||
break
|
||||
// 证书管理-核实 财务人员-证书缴费(续费)-核对凭证通过 流转到证书人员核实 (证书人员使用,此处不用)
|
||||
case AnnounceEnum.CERTIFICATE_MANAGE_CHECK.value:
|
||||
jumpParam.openType = OpenTypeEnum.COMPONENT.value
|
||||
jumpParam.openPage = 'member/vinCertificate/modules/VinCertificateModal'
|
||||
jumpParam.requestMethod = getVinCertificateById
|
||||
jumpParam.requestParams = { id: jumpParam.certificateId }
|
||||
// 所有操作完成后的回调方法
|
||||
jumpParam.callback = (dom, record) => {
|
||||
dom.title = '核对证书'
|
||||
dom.disableSubmit = true
|
||||
if (record.certificateModality === 1) {
|
||||
dom.pageType = 3
|
||||
} else {
|
||||
// 新增和续证使用2号核对窗口
|
||||
dom.pageType = 2
|
||||
}
|
||||
// 换证时使用3号核对窗口·
|
||||
dom.edit(record)
|
||||
}
|
||||
break
|
||||
// 发票管理-邮寄 -企业端不用
|
||||
case AnnounceEnum.BILLINGINFO_MAIL.value:
|
||||
jumpParam.openType = OpenTypeEnum.COMPONENT.value
|
||||
jumpParam.openPage = 'member/billingInfo/modules/BillingInfoModal'
|
||||
jumpParam.requestMethod = getBillingInfoById
|
||||
jumpParam.requestParams = { id: jumpParam.billingInfoId }
|
||||
// 所有操作完成后的回调方法
|
||||
jumpParam.callback = (dom, record) => {
|
||||
dom.title = '邮寄发票'
|
||||
dom.disableSubmit = true
|
||||
dom.pageType = 1
|
||||
dom.edit(record)
|
||||
}
|
||||
break
|
||||
// 证书管理-授权--需要跳转到证书详情页
|
||||
case AnnounceEnum.CERTIFICATE_MANAGE_AUTHORIZE.value:
|
||||
jumpParam.openType = OpenTypeEnum.PAGE.value
|
||||
jumpParam.openPage = {
|
||||
name: 'member-vinCertificate-Authorization',
|
||||
query: {
|
||||
id: jumpParam.certificateId
|
||||
}
|
||||
}
|
||||
break
|
||||
// 单位名称变更-审核
|
||||
case AnnounceEnum.COMPANY_NAME_CHECK.value:
|
||||
jumpParam.openType = OpenTypeEnum.COMPONENT.value
|
||||
jumpParam.openPage = 'member/memberInfo/modules/ChangeApproveModal'
|
||||
// 所有操作完成后的回调方法
|
||||
jumpParam.id = jumpParam.memberId
|
||||
jumpParam.callback = (dom, record) => {
|
||||
dom.open(record)
|
||||
}
|
||||
break
|
||||
// 单位名称变更-审核 拒絕
|
||||
case AnnounceEnum.COMPANY_NAME_REJECT.value:
|
||||
jumpParam.openType = OpenTypeEnum.PAGE.value
|
||||
jumpParam.openPage = {
|
||||
name: 'standardsAssociation-MemberManagement',
|
||||
query: {
|
||||
// 会员id
|
||||
id: jumpParam.memberId,
|
||||
// tab页签
|
||||
navIndex: 4,
|
||||
pageType: 1,
|
||||
// 会员剩余天数
|
||||
remainingTime: remainingTimeCount(jumpParam.validDate)
|
||||
}
|
||||
}
|
||||
break
|
||||
case AnnounceEnum.COMPANY_NAME_PASS.value:
|
||||
// 该情况特殊 处理,内部触发退出的方法
|
||||
jumpParam.openType = OpenTypeEnum.METHODS.value
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
return jumpParam
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<a-form :form="form">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="单位名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
v-decorator="['unitName',validatorRules.unitName]"
|
||||
placeholder="请输入单位名称"
|
||||
:disabled="isMember !== 'member'"
|
||||
:maxLength="50"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- v-has=" 'vin:application' "-->
|
||||
<a-col :span="2">
|
||||
<a-button type="primary" @click="applicationFunc" class="apply-btn">申请授权</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
</a-form>
|
||||
<a-divider orientation="left">
|
||||
授权记录
|
||||
</a-divider>
|
||||
<!-- 授权记录-->
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
class="j-table-force-nowrap"
|
||||
@change="handleTableChange">
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="cancelOrOK(record)" v-if="record.authorizeType !== 2 ">确认授权</a>
|
||||
<a @click="cancelOrOK(record)" v-else>取消授权</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<a-row class="center">
|
||||
<a-button @click="cancel">返回</a-button>
|
||||
</a-row>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAction } from '@api/memberManage'
|
||||
import { application, determineOrCancel } from '@api/standardsAssociationApi'
|
||||
|
||||
export default {
|
||||
name: 'Authorization',
|
||||
data() {
|
||||
return {
|
||||
form: this.$form.createForm(this),
|
||||
isMember: 'member',
|
||||
/* 分页参数 */
|
||||
ipagination: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + '-' + range[1] + ' 共' + total + '条'
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
/* table加载状态 */
|
||||
loading: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
// 授权历史表头
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function(t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '单位全称',
|
||||
align: 'center',
|
||||
dataIndex: 'unitName'
|
||||
},
|
||||
{
|
||||
title: '申请授权时间',
|
||||
align: 'center',
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '授权通过时间',
|
||||
align: 'center',
|
||||
dataIndex: 'updateTime'
|
||||
},
|
||||
{
|
||||
title: '授权审批人',
|
||||
align: 'center',
|
||||
dataIndex: 'updateBy'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
dataIndex: 'authorizeType_dictText'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
url: {
|
||||
list: '/vincertificateauthorize/tbVinCertificateAuthorize/list/'
|
||||
},
|
||||
validatorRules: {
|
||||
unitName: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入单位名称!' }
|
||||
],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.isMember === 'member') {
|
||||
this.columns.forEach((item, index) => {
|
||||
if (item.dataIndex === 'action') {
|
||||
this.columns.splice(index, 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
this.loadData()
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
/*
|
||||
* 申请授权
|
||||
* */
|
||||
applicationFunc() {
|
||||
const that = this
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
const formData = Object.assign({}, values)
|
||||
formData.certificateId = this.$route.query.id
|
||||
application(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData(1)
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.form.resetFields('unitName')
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/*
|
||||
* 返回
|
||||
* */
|
||||
cancel() {
|
||||
this.$router.push('/standardsAssociation/CertificateManagement')
|
||||
},
|
||||
/*
|
||||
* 获取列表数据
|
||||
* */
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
// 加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
const params = {}// 查询条件
|
||||
params.pageNo = this.ipagination.current
|
||||
params.pageSize = this.ipagination.pageSize
|
||||
params.certificateId = this.$route.query.id
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result.records || []
|
||||
if (this.isMember !== 'member' && this.dataSource.length > 0 && this.dataSource[0].unitName) {
|
||||
this.form.setFieldsValue({ 'unitName': this.dataSource[0].unitName })
|
||||
}
|
||||
this.ipagination.total = res.result.total
|
||||
}
|
||||
if (res.code === 510) {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/*
|
||||
* 确认或者取消授权 确认授权传2 取消传3
|
||||
* */
|
||||
cancelOrOK(record) {
|
||||
const params = {
|
||||
id: record.id,
|
||||
unitName: record.unitName
|
||||
}
|
||||
if (record.authorizeType !== 2) {
|
||||
params.authorizeType = 2
|
||||
determineOrCancel(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success('确认授权成功')
|
||||
this.loadData()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
params.authorizeType = 3
|
||||
determineOrCancel(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success('取消授权成功')
|
||||
this.loadData()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/*
|
||||
* 分页
|
||||
* */
|
||||
handleTableChange(pagination) {
|
||||
this.ipagination = pagination
|
||||
this.loadData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.center {
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.apply-btn {
|
||||
margin-top: 6px;
|
||||
transform: translateX(-40px);
|
||||
}
|
||||
</style>
|
||||
@@ -83,6 +83,7 @@
|
||||
</a-table>
|
||||
<show-announcement ref="ShowAnnouncement"></show-announcement>
|
||||
<dynamic-notice ref="showDynamNotice" :path="openPath" :formData="formData"/>
|
||||
<member-dynamic-notice ref="memberDynamNotice" :path="openPath" :formData="formData"/>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -90,12 +91,14 @@
|
||||
<script>
|
||||
import { getAction, putAction } from '@/api/manage'
|
||||
import ShowAnnouncement from '@/components/tools/ShowAnnouncement'
|
||||
// 会员系统的消息组件
|
||||
import MemberDynamicNotice from '../standardsAssociation/announce/MemberDynamicNotice'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import { RangeDateMixin } from '@/mixins/RangeDateMixin'
|
||||
import DynamicNotice from '../../components/tools/DynamicNotice'
|
||||
import JDate from '@comp/tools/JDate'
|
||||
import { Bus } from '@comp/tools/Bus'
|
||||
|
||||
import { parseJumpParameter, OpenTypeEnum } from '../standardsAssociation/announce/announceUtil'
|
||||
|
||||
export default {
|
||||
name: 'UserAnnouncementList',
|
||||
@@ -103,6 +106,7 @@ export default {
|
||||
components: {
|
||||
DynamicNotice,
|
||||
ShowAnnouncement,
|
||||
MemberDynamicNotice,
|
||||
JDate
|
||||
|
||||
},
|
||||
@@ -222,76 +226,110 @@ export default {
|
||||
Bus.$emit('notice-change')
|
||||
}
|
||||
})
|
||||
const param = record.busId ? JSON.parse(record.busId) : {}
|
||||
if (record.openType === 'component') {
|
||||
this.openPath = record.openPage
|
||||
// 将参数传入
|
||||
this.formData = param
|
||||
this.$refs.showDynamNotice.detail()
|
||||
} else if (record.openType === 'url') {
|
||||
console.log(record.openPage, 'url')
|
||||
const param = JSON.parse(record.busId)
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path: record.openPage,
|
||||
query: param
|
||||
})
|
||||
} else if (record.openType === 'href') {
|
||||
let url = `${ record.openPage }=${ param.id }`
|
||||
// 返回的是报名页面的链接 打开网址
|
||||
window.open(url, '_blank')
|
||||
}else if(record.openType === 'project'){
|
||||
const param = JSON.parse(record.busId)
|
||||
// 1 普通项目 2 工作组项目 4 资料网员 7分标委 8理事会
|
||||
switch (param.type){
|
||||
case '1': this.openPath = param.path
|
||||
// 将参数传入
|
||||
// delete param.path
|
||||
this.formData = param
|
||||
this.$refs.showDynamNotice.detail()
|
||||
break
|
||||
case '4':
|
||||
this.openPath = param.path
|
||||
// 将参数传入
|
||||
// delete param.path
|
||||
this.formData = param
|
||||
this.$refs.showDynamNotice.detail()
|
||||
break
|
||||
case '2':
|
||||
// 管理系统 进行相关消息的展示
|
||||
if(this.isIncomePaySystem(record)) {
|
||||
const param = record.busId ? JSON.parse(record.busId) : {}
|
||||
if (record.openType === 'component') {
|
||||
this.openPath = record.openPage
|
||||
// 将参数传入
|
||||
this.formData = param
|
||||
this.$refs.showDynamNotice.detail()
|
||||
} else if (record.openType === 'url') {
|
||||
console.log(record.openPage, 'url')
|
||||
const param = JSON.parse(record.busId)
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path: record.openPage,
|
||||
query: param
|
||||
})
|
||||
} else if (record.openType === 'href') {
|
||||
let url = `${ record.openPage }=${ param.id }`
|
||||
// 返回的是报名页面的链接 打开网址
|
||||
window.open(url, '_blank')
|
||||
}else if(record.openType === 'project'){
|
||||
const param = JSON.parse(record.busId)
|
||||
// 1 普通项目 2 工作组项目 4 资料网员 7分标委 8理事会
|
||||
switch (param.type){
|
||||
case '1': this.openPath = param.path
|
||||
// 将参数传入
|
||||
// delete param.path
|
||||
this.formData = param
|
||||
this.$refs.showDynamNotice.detail()
|
||||
break
|
||||
case '4':
|
||||
this.openPath = param.path
|
||||
// 将参数传入
|
||||
// delete param.path
|
||||
this.formData = param
|
||||
this.$refs.showDynamNotice.detail()
|
||||
break
|
||||
case '2':
|
||||
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path: param.path,
|
||||
query: {
|
||||
projectId:param.projectId,
|
||||
workingGroupId:param.workingGroupId
|
||||
}
|
||||
})
|
||||
break
|
||||
case '7':
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path: param.path,
|
||||
query: {
|
||||
projectId:param.projectId,
|
||||
workingGroupId:param.workingGroupId
|
||||
}
|
||||
})
|
||||
break
|
||||
case '7':
|
||||
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path: param.path,
|
||||
query: {
|
||||
id:param.id,
|
||||
abbreviation:param.abbreviation
|
||||
}
|
||||
})
|
||||
break
|
||||
case '8':
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path: param.path,
|
||||
query: {
|
||||
id:param.id
|
||||
}
|
||||
})
|
||||
break
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path: param.path,
|
||||
query: {
|
||||
id:param.id,
|
||||
abbreviation:param.abbreviation
|
||||
}
|
||||
})
|
||||
break
|
||||
case '8':
|
||||
// 如果是url 跳转页面
|
||||
this.$router.push({
|
||||
path: param.path,
|
||||
query: {
|
||||
id:param.id
|
||||
}
|
||||
})
|
||||
break
|
||||
}
|
||||
}else {
|
||||
this.$refs.ShowAnnouncement.detail(record)
|
||||
}
|
||||
} else {
|
||||
// 会员系统相关的消息
|
||||
|
||||
}else {
|
||||
this.$refs.ShowAnnouncement.detail(record)
|
||||
// 2021-09-24 判断当前消息是否有 jumpParameter 参数,如果有的话需要跳转页面或者弹框;没有的话 就直接显示详情页
|
||||
// jumpParameter示例 :paymentInfoId:1441329411264643074,memberId:1413419593870872578,paymentType:0,window:PAYMENT_CHECK"
|
||||
if (record.jumpParameter) {
|
||||
// 对当前的jumpParameter 进行解析
|
||||
const resultParams = parseJumpParameter(record.jumpParameter)
|
||||
// 对jumpParam 中的window进行解析判断,组件-进行模态框的显示 页面-进行路由的跳转
|
||||
if (resultParams.openType === OpenTypeEnum.COMPONENT.value) {
|
||||
this.openPath = resultParams.openPage
|
||||
this.formData = { ...resultParams }
|
||||
this.$refs.memberDynamNotice.detail()
|
||||
} else if (resultParams.openType === OpenTypeEnum.PAGE.value) {
|
||||
this.$router.push(resultParams.openPage)
|
||||
} else {
|
||||
// 最后一种情况,特殊处理,单位名称变更通过
|
||||
// this.handleLogout()
|
||||
this.$refs.ShowAnnouncement.detail(record)
|
||||
}
|
||||
} else {
|
||||
this.$refs.ShowAnnouncement.detail(record)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 判断是否是来款系统 ; 通过titile字段进行判断,目前13-19是会员系统的消息;其他是来款系统的消息
|
||||
isIncomePaySystem(record) {
|
||||
const judgeNum = Number(record.titile)
|
||||
if(judgeNum >= 13 && judgeNum <= 20) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
syncHeadNotic(anntId) {
|
||||
|
||||
Reference in New Issue
Block a user