【修改】申请证书逻辑判断
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
||||
<a-button @click="searchReset" icon="reload" style="margin-left: 8px" class="reset-button">重置</a-button>
|
||||
<a-button
|
||||
v-if="$store.getters.userInfo.roleCode !== '3'"
|
||||
v-if="$store.getters.userInfo.roleCode !== '3' && showApply"
|
||||
type="primary"
|
||||
@click="applyCertificate"
|
||||
class="primary"
|
||||
@@ -255,6 +255,7 @@ export default {
|
||||
},
|
||||
description: 'VIN证书管理页面',
|
||||
roleCode: 'member',
|
||||
showApply:false, // 是否显示申请证书按钮 这里只能申请免费的证书 续费的证书 需要去组合缴费申请
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
@@ -369,6 +370,11 @@ export default {
|
||||
return `${window._CONFIG['memberURL']}/${this.url.importExcelUrl}`
|
||||
}
|
||||
},
|
||||
created(){
|
||||
// false 不显示
|
||||
this.judgeFreeCount()
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 撤回证书缴费
|
||||
@@ -435,6 +441,25 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 判断是免费的证书是否可以申请
|
||||
judgeFreeCount(){
|
||||
return new Promise(resolve => {
|
||||
getAction('/vinCertificate/vinCertificate/getFreeCount').then(res => {
|
||||
if(res.success){
|
||||
if(res.result === 0){
|
||||
this.showApply = false
|
||||
resolve(false)
|
||||
}else {
|
||||
resolve(true)
|
||||
this.showApply = true
|
||||
}
|
||||
}else {
|
||||
resolve(true)
|
||||
this.showApply = true
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 申请证书
|
||||
applyCertificate: function () {
|
||||
const that = this
|
||||
|
||||
Reference in New Issue
Block a user