diff --git a/src/api/standardsAssociationApi.js b/src/api/standardsAssociationApi.js index 419d85b..3c0796e 100644 --- a/src/api/standardsAssociationApi.js +++ b/src/api/standardsAssociationApi.js @@ -76,6 +76,9 @@ const getCertificateById = (params) => getAction('/vinCertificate/vinCertificate // 撤回收费证书 const withDrawChargeCertificate = (params) => postAction('/vinCertificate/vinCertificate/withdrawChargeCertificate', params) +// 撤回免费证书 +const withDrawFreeCertificate = (params) => postAction('/vinCertificate/vinCertificate/withdrawFreeCertificate', params) + /****证书缴费 列表页所用接口-结束 ****/ // 会员申请授权 @@ -105,6 +108,7 @@ export { downNewestNotice, getCertificateById, withDrawChargeCertificate, + withDrawFreeCertificate, application, determineOrCancel, diff --git a/src/views/standardsAssociation/CertificateManagement.vue b/src/views/standardsAssociation/CertificateManagement.vue index ef15ab1..f970235 100644 --- a/src/views/standardsAssociation/CertificateManagement.vue +++ b/src/views/standardsAssociation/CertificateManagement.vue @@ -226,7 +226,7 @@ import {RangeDateMixin} from '@/mixins/RangeDateMixin' import JDictSelectTag from '../../components/standardsAssociation/JDictSelectTag' // eslint-disable-next-line no-unused-vars import {downloadFile, getAction, getFileAccessHttpUrl} from '@/api/memberManage' -import {withDrawChargeCertificate} from '@api/standardsAssociationApi' +import {withDrawChargeCertificate,withDrawFreeCertificate} from '@api/standardsAssociationApi' import {CertificateModalityEnums, CertificateStatusEnums, ChargeTypeEnums} from '../../enums/memberEnums' import CheckCertificateModel from '@views/standardsAssociation/model/CheckCertificateModel' import BindMemberModel from '@views/standardsAssociation/model/BindMemberModel' @@ -426,14 +426,26 @@ export default { certificateStatus: '2', code: record.code } - withDrawChargeCertificate(param).then(res => { - if (res.success) { - that.$message.success(res.message) - that.loadData() - } else { - that.$message.warning(res.message) - } - }) + if(record.chargeType === 1){ + withDrawFreeCertificate(param).then(res => { + if (res.success) { + that.$message.success(res.message) + that.loadData() + } else { + that.$message.warning(res.message) + } + }) + }else { + withDrawChargeCertificate(param).then(res => { + if (res.success) { + that.$message.success(res.message) + that.loadData() + } else { + that.$message.warning(res.message) + } + }) + } + } }) },