【开发】增加会员缴费与证书缴费撤回

This commit is contained in:
fengachen
2022-07-13 17:53:13 +08:00
parent 298f3996ed
commit 48522a2601
4 changed files with 96 additions and 35 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ export function httpAction(url,parameter,method) {
export function putAction(url,parameter) { export function putAction(url,parameter) {
return axios({ return axios({
url: url, url: url,
method:'post', method:'put',
data: parameter data: parameter
}) })
} }
+7 -1
View File
@@ -3,7 +3,7 @@ import Vue from 'vue'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import { getAction as incomeGetAction, postAction as incomePostAction } from '@api/manage' import { getAction as incomeGetAction, postAction as incomePostAction } from '@api/manage'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import { getAction, postAction } from '@api/memberManage' import { getAction, postAction,putAction } from '@api/memberManage'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
@@ -63,6 +63,8 @@ const getCertificateByMemberId = (params) => getAction('/vinCertificate/vinCerti
const getMemberInfoById = (params) => getAction('/memberInfo/memberInfo/queryById', params) const getMemberInfoById = (params) => getAction('/memberInfo/memberInfo/queryById', params)
const getCheckInfo = (params) => getAction('/paymentInfo/paymentCheckinfo/queryByPaymentId', params) const getCheckInfo = (params) => getAction('/paymentInfo/paymentCheckinfo/queryByPaymentId', params)
const getByMemberTime = (params) => getAction('/threshold/thresholdSetting/getByMemberTime', params) const getByMemberTime = (params) => getAction('/threshold/thresholdSetting/getByMemberTime', params)
// 撤回会员缴费
const withDrawPayment = (params) => putAction('/paymentInfo/withdraw', params)
// 判断会员是否有未审核的缴费 // 判断会员是否有未审核的缴费
const judgeMemberNotApprove = (params) => getAction('/paymentInfo/existNotApproved', params) const judgeMemberNotApprove = (params) => getAction('/paymentInfo/existNotApproved', params)
// 会员下载缴费通知单 // 会员下载缴费通知单
@@ -71,6 +73,8 @@ const downNewestNotice = (params) => getAction('/approvalDocumentNumber/approval
/****证书缴费 列表页所用接口-开始 ****/ /****证书缴费 列表页所用接口-开始 ****/
// 证书缴费 // 证书缴费
const getCertificateById = (params) => getAction('/vinCertificate/vinCertificate/getCertificateById', params) const getCertificateById = (params) => getAction('/vinCertificate/vinCertificate/getCertificateById', params)
// 撤回收费证书
const withDrawChargeCertificate = (params) => postAction('/vinCertificate/vinCertificate/withdrawChargeCertificate', params)
/****证书缴费 列表页所用接口-结束 ****/ /****证书缴费 列表页所用接口-结束 ****/
@@ -92,6 +96,7 @@ export {
ajaxGetDictItems, ajaxGetDictItems,
getLastPaymentByMemberId, getLastPaymentByMemberId,
getCertificateByMemberId, getCertificateByMemberId,
withDrawPayment,
getMemberInfoById, getMemberInfoById,
getCheckInfo, getCheckInfo,
@@ -99,6 +104,7 @@ export {
judgeMemberNotApprove, judgeMemberNotApprove,
downNewestNotice, downNewestNotice,
getCertificateById, getCertificateById,
withDrawChargeCertificate,
application, application,
determineOrCancel, determineOrCancel,
@@ -12,7 +12,7 @@
placeholder="请选择证书类型" placeholder="请选择证书类型"
v-model="queryParam.certificateType" v-model="queryParam.certificateType"
:title="queryParam.certificateType" :title="queryParam.certificateType"
dictCode="certificate_type" /> dictCode="certificate_type"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -93,7 +93,7 @@
:src="getImgView(text)" :src="getImgView(text)"
height="25px" height="25px"
alt="" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;" /> style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template> </template>
<template slot="fileSlot" slot-scope="text"> <template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@@ -109,6 +109,8 @@
</template> </template>
<span slot="action" class="action-span-cell" slot-scope="text, record"> <span slot="action" class="action-span-cell" slot-scope="text, record">
<!-- 待支付 不显示 -->
<a v-if="record.certificateStatus !== '0' " @click="handleWithdraw(record)">撤回</a>
<a @click="handleDetail(record)">查看</a> <a @click="handleDetail(record)">查看</a>
<a v-show="record.certificateStatus == 4"> <a v-show="record.certificateStatus == 4">
<a href="javascript:;" @click="(record.certificateStatus == 4) && bindMember(record)">绑定会员</a> <a href="javascript:;" @click="(record.certificateStatus == 4) && bindMember(record)">绑定会员</a>
@@ -205,17 +207,18 @@
<script> <script>
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin' import {mixinDevice} from '@/utils/mixin'
import { JeroListMixin } from '@/mixins/JeroListMixin' import {JeroListMixin} from '@/mixins/JeroListMixin'
import { StandardListMixin } from '@/mixins/StandardListMixin' import {StandardListMixin} from '@/mixins/StandardListMixin'
import VinCertificateModal from './memberManagementModule/VinCertificateModal' import VinCertificateModal from './memberManagementModule/VinCertificateModal'
import JDate from '../../components/tools/JDate' import JDate from '../../components/tools/JDate'
import JMultiSelectTag from '@comp/standardsAssociation/JMultiSelectTag' import JMultiSelectTag from '@comp/standardsAssociation/JMultiSelectTag'
import { RangeDateMixin } from '@/mixins/RangeDateMixin' import {RangeDateMixin} from '@/mixins/RangeDateMixin'
import JDictSelectTag from '../../components/standardsAssociation/JDictSelectTag' import JDictSelectTag from '../../components/standardsAssociation/JDictSelectTag'
// eslint-disable-next-line no-unused-vars // eslint-disable-next-line no-unused-vars
import { downloadFile, getAction, getFileAccessHttpUrl } from '@/api/memberManage' import {downloadFile, getAction, getFileAccessHttpUrl} from '@/api/memberManage'
import { CertificateModalityEnums, CertificateStatusEnums, ChargeTypeEnums } from '../../enums/memberEnums' import {withDrawChargeCertificate} from '@api/standardsAssociationApi'
import {CertificateModalityEnums, CertificateStatusEnums, ChargeTypeEnums} from '../../enums/memberEnums'
import CheckCertificateModel from '@views/standardsAssociation/model/CheckCertificateModel' import CheckCertificateModel from '@views/standardsAssociation/model/CheckCertificateModel'
import BindMemberModel from '@views/standardsAssociation/model/BindMemberModel' import BindMemberModel from '@views/standardsAssociation/model/BindMemberModel'
import RenewChargeModel from '@views/standardsAssociation/model/RenewChargeModel' import RenewChargeModel from '@views/standardsAssociation/model/RenewChargeModel'
@@ -227,6 +230,7 @@ import FreeCertificateEditModel from '@views/standardsAssociation/model/FreeCert
import ChargeCertificateEditModel from '@views/standardsAssociation/model/ChargeCertificateEditModel' import ChargeCertificateEditModel from '@views/standardsAssociation/model/ChargeCertificateEditModel'
import RenewChargeEditModel from '@views/standardsAssociation/model/RenewChargeEditModel' import RenewChargeEditModel from '@views/standardsAssociation/model/RenewChargeEditModel'
import FreeCertificateReplaceEditModel from '@views/standardsAssociation/model/FreeCertificateReplaceEditModel' import FreeCertificateReplaceEditModel from '@views/standardsAssociation/model/FreeCertificateReplaceEditModel'
export default { export default {
name: 'CertificateManagement', name: 'CertificateManagement',
mixins: [JeroListMixin, mixinDevice, RangeDateMixin, StandardListMixin], mixins: [JeroListMixin, mixinDevice, RangeDateMixin, StandardListMixin],
@@ -267,7 +271,7 @@ export default {
width: 60, width: 60,
align: 'center', align: 'center',
fixed: 'left', fixed: 'left',
customRender: function(t, r, index) { customRender: function (t, r, index) {
return parseInt(index) + 1 return parseInt(index) + 1
} }
}, },
@@ -276,14 +280,14 @@ export default {
align: 'center', align: 'center',
width: 160, width: 160,
dataIndex: 'companyName', dataIndex: 'companyName',
fixed:'left' fixed: 'left'
}, },
{ {
title: '证书类型', title: '证书类型',
align: 'center', align: 'center',
width: 260, width: 260,
dataIndex: 'certificateType', dataIndex: 'certificateType',
customRender: function(text) { customRender: function (text) {
if (text === 1) { if (text === 1) {
return '世界制造厂识别代号(WMI)证书' return '世界制造厂识别代号(WMI)证书'
} else if (text === 2) { } else if (text === 2) {
@@ -296,7 +300,7 @@ export default {
align: 'center', align: 'center',
dataIndex: 'code', dataIndex: 'code',
width: 140, width: 140,
scopedSlots: { customRender: 'codeState' } scopedSlots: {customRender: 'codeState'}
}, },
{ {
title: '发证时间', title: '发证时间',
@@ -309,7 +313,7 @@ export default {
align: 'center', align: 'center',
width: 170, width: 170,
dataIndex: 'effectDate', dataIndex: 'effectDate',
customRender: function(text) { customRender: function (text) {
return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
} }
}, },
@@ -318,7 +322,7 @@ export default {
align: 'center', align: 'center',
dataIndex: 'invalidDate', dataIndex: 'invalidDate',
width: 160, width: 160,
customRender: function(text) { customRender: function (text) {
return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
} }
}, },
@@ -327,7 +331,7 @@ export default {
align: 'center', align: 'center',
dataIndex: 'noticeOfFiling', dataIndex: 'noticeOfFiling',
width: 120, width: 120,
customRender: function(text) { customRender: function (text) {
if (text === 1) { if (text === 1) {
return '是' return '是'
} else if (text === 0) { } else if (text === 0) {
@@ -342,14 +346,14 @@ export default {
align: 'center', align: 'center',
width: 140, width: 140,
dataIndex: 'certificateStatus', dataIndex: 'certificateStatus',
scopedSlots: { customRender: 'customRenderStatus' } scopedSlots: {customRender: 'customRenderStatus'}
}, },
{ {
title: '证书形式', title: '证书形式',
align: 'center', align: 'center',
width: 120, width: 120,
dataIndex: 'certificateModality', dataIndex: 'certificateModality',
customRender: function(text) { customRender: function (text) {
if (text === 1) { if (text === 1) {
return '换证' return '换证'
} else if (text === 2) { } else if (text === 2) {
@@ -365,18 +369,18 @@ export default {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
align: 'center', align: 'center',
fixed:'right', fixed: 'right',
width: 147, width: 147,
scopedSlots: { customRender: 'action' } scopedSlots: {customRender: 'action'}
} }
], ],
labelCol: { labelCol: {
xs: { span: 24 }, xs: {span: 24},
sm: { span: 5 } sm: {span: 5}
}, },
wrapperCol: { wrapperCol: {
xs: { span: 24 }, xs: {span: 24},
sm: { span: 16 } sm: {span: 16}
}, },
url: { url: {
list: '/vinCertificate/vinCertificate/getMyVinCertificate', list: '/vinCertificate/vinCertificate/getMyVinCertificate',
@@ -394,11 +398,36 @@ export default {
} }
}, },
computed: { computed: {
importExcelUrl: function() { importExcelUrl: function () {
return `${window._CONFIG['memberURL']}/${this.url.importExcelUrl}` return `${window._CONFIG['memberURL']}/${this.url.importExcelUrl}`
} }
}, },
methods: { methods: {
/**
* 撤回证书缴费
* */
handleWithdraw(record) {
const that = this
this.$confirm({
title: '确定撤回',
onOk() {
const param = {
id: record.id,
memberId: record.memberId,
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)
}
})
}
})
},
// 显示换证确认 窗口 // 显示换证确认 窗口
handleAffirm() { handleAffirm() {
this.$refs.replaceMentAffirmModelForm.title = '提交成功' this.$refs.replaceMentAffirmModelForm.title = '提交成功'
@@ -427,7 +456,7 @@ export default {
}) })
}, },
// 申请证书 // 申请证书
applyCertificate: function() { applyCertificate: function () {
const that = this const that = this
// 可申请的免费证书的个数 // 可申请的免费证书的个数
let freeCount let freeCount
@@ -458,7 +487,7 @@ export default {
}) })
}, },
// 查看证书 // 查看证书
handleDetail: function(record) { handleDetail: function (record) {
this.$refs.checkModalForm.remainingTime = this.remainingTimeCount(record.certificateValidDate) this.$refs.checkModalForm.remainingTime = this.remainingTimeCount(record.certificateValidDate)
this.$refs.checkModalForm.check(record) this.$refs.checkModalForm.check(record)
@@ -470,7 +499,7 @@ export default {
}, },
// 绑定会员 // 绑定会员
bindMember: function(record) { bindMember: function (record) {
// 证书id // 证书id
this.$refs.bindMemberModelForm.vinId = record.id this.$refs.bindMemberModelForm.vinId = record.id
this.$refs.bindMemberModelForm.edit(record) this.$refs.bindMemberModelForm.edit(record)
@@ -484,7 +513,7 @@ export default {
// this.$refs.modalForm.edit(record) // this.$refs.modalForm.edit(record)
}, },
// 续费 // 续费
renewCharge: function(record) { renewCharge: function (record) {
// if(!(record.chargeType != 1 && record.certificateModality == 3 && record.certificateStatus == 5)){ // if(!(record.chargeType != 1 && record.certificateModality == 3 && record.certificateStatus == 5)){
// return; // return;
// } // }
@@ -500,7 +529,7 @@ export default {
// this.$refs.modalForm.edit2(record) // this.$refs.modalForm.edit2(record)
}, },
// 换证 // 换证
replacement: function(record) { replacement: function (record) {
this.$refs.replaceMentModelForm.edit(record) this.$refs.replaceMentModelForm.edit(record)
// this.$refs.modalForm.title = '换证' // this.$refs.modalForm.title = '换证'
@@ -510,7 +539,7 @@ export default {
// this.$refs.modalForm.edit3(record) // this.$refs.modalForm.edit3(record)
}, },
// 编辑: 包括免费证书,收费证书,续费,换证 // 编辑: 包括免费证书,收费证书,续费,换证
handleEditRenew: function(record) { handleEditRenew: function (record) {
console.log(record) console.log(record)
record.certificateModality = Number(record.certificateModality) // 证书形式 record.certificateModality = Number(record.certificateModality) // 证书形式
record.certificateStatus = Number(record.certificateStatus) // 证书的处理状态 record.certificateStatus = Number(record.certificateStatus) // 证书的处理状态
@@ -597,7 +626,7 @@ export default {
} }
} }
}, },
remainingTimeCount: function(date) { remainingTimeCount: function (date) {
if (date === null || date === undefined || date.length === 0) { if (date === null || date === undefined || date.length === 0) {
return 0 return 0
} }
@@ -104,6 +104,8 @@
</template> </template>
<span slot="action" class="action-span-cell" slot-scope="text, record"> <span slot="action" class="action-span-cell" slot-scope="text, record">
<!--已支付显示 撤回-->
<a v-if="record.paymentStatus === 1 " @click="handleWithdraw(record)">撤回</a>
<a v-show="record.paymentStatus<1 ||record.paymentStatus==2" <a v-show="record.paymentStatus<1 ||record.paymentStatus==2"
@click="(record.paymentStatus<1 ||record.paymentStatus==2) && handleEdit(record)">编辑</a> @click="(record.paymentStatus<1 ||record.paymentStatus==2) && handleEdit(record)">编辑</a>
<a v-show="record.paymentStatus<1||record.paymentStatus==2"> <a v-show="record.paymentStatus<1||record.paymentStatus==2">
@@ -134,7 +136,7 @@ import PaymentInfoModal from './modules/PaymentInfoModal'
import JDictSelectTag from '@/components/standardsAssociation/JDictSelectTag.vue' import JDictSelectTag from '@/components/standardsAssociation/JDictSelectTag.vue'
import JDate from '@/components/tools/JDate.vue' import JDate from '@/components/tools/JDate.vue'
import { getMemberInfoById } from '@/api/standardsAssociationApi' import { getMemberInfoById,withDrawPayment } from '@/api/standardsAssociationApi'
import { RangeDateMixin } from '@/mixins/RangeDateMixin' import { RangeDateMixin } from '@/mixins/RangeDateMixin'
import { getAction, getFileAccessHttpUrl } from '@/api/memberManage' import { getAction, getFileAccessHttpUrl } from '@/api/memberManage'
@@ -188,6 +190,30 @@ export default {
methods: { methods: {
initDictConfig() { initDictConfig() {
}, },
/**
* 撤回会员缴费
* */
handleWithdraw(record) {
const that = this
this.$confirm({
title: '确定撤回',
onOk() {
const param = {
id: record.id,
memberId: record.memberId,
paymentStatus: '1'
}
withDrawPayment(param).then(res => {
if (res.success) {
that.$message.success(res.message)
that.loadData()
} else {
that.$message.warning(res.message)
}
})
}
})
},
// 根据会员id获取会员信息 // 根据会员id获取会员信息
loadMember() { loadMember() {
getMemberInfoById({ id: this.userId }).then((res) => { getMemberInfoById({ id: this.userId }).then((res) => {