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

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) {
return axios({
url: url,
method:'post',
method:'put',
data: parameter
})
}
+7 -1
View File
@@ -3,7 +3,7 @@ import Vue from 'vue'
// eslint-disable-next-line no-unused-vars
import { getAction as incomeGetAction, postAction as incomePostAction } from '@api/manage'
// 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'
@@ -63,6 +63,8 @@ const getCertificateByMemberId = (params) => getAction('/vinCertificate/vinCerti
const getMemberInfoById = (params) => getAction('/memberInfo/memberInfo/queryById', params)
const getCheckInfo = (params) => getAction('/paymentInfo/paymentCheckinfo/queryByPaymentId', params)
const getByMemberTime = (params) => getAction('/threshold/thresholdSetting/getByMemberTime', params)
// 撤回会员缴费
const withDrawPayment = (params) => putAction('/paymentInfo/withdraw', 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 withDrawChargeCertificate = (params) => postAction('/vinCertificate/vinCertificate/withdrawChargeCertificate', params)
/****证书缴费 列表页所用接口-结束 ****/
@@ -92,6 +96,7 @@ export {
ajaxGetDictItems,
getLastPaymentByMemberId,
getCertificateByMemberId,
withDrawPayment,
getMemberInfoById,
getCheckInfo,
@@ -99,6 +104,7 @@ export {
judgeMemberNotApprove,
downNewestNotice,
getCertificateById,
withDrawChargeCertificate,
application,
determineOrCancel,
@@ -12,7 +12,7 @@
placeholder="请选择证书类型"
v-model="queryParam.certificateType"
:title="queryParam.certificateType"
dictCode="certificate_type" />
dictCode="certificate_type"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -55,7 +55,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<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 @click="searchReset" icon="reload" style="margin-left: 8px" class="reset-button">重置</a-button>
<a-button
type="primary"
@click="applyCertificate"
@@ -93,7 +93,7 @@
:src="getImgView(text)"
height="25px"
alt=""
style="max-width:80px;font-size: 12px;font-style: italic;" />
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@@ -109,6 +109,8 @@
</template>
<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 v-show="record.certificateStatus == 4">
<a href="javascript:;" @click="(record.certificateStatus == 4) && bindMember(record)">绑定会员</a>
@@ -205,17 +207,18 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { StandardListMixin } from '@/mixins/StandardListMixin'
import {mixinDevice} from '@/utils/mixin'
import {JeroListMixin} from '@/mixins/JeroListMixin'
import {StandardListMixin} from '@/mixins/StandardListMixin'
import VinCertificateModal from './memberManagementModule/VinCertificateModal'
import JDate from '../../components/tools/JDate'
import JMultiSelectTag from '@comp/standardsAssociation/JMultiSelectTag'
import { RangeDateMixin } from '@/mixins/RangeDateMixin'
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 { CertificateModalityEnums, CertificateStatusEnums, ChargeTypeEnums } from '../../enums/memberEnums'
import {downloadFile, getAction, getFileAccessHttpUrl} from '@/api/memberManage'
import {withDrawChargeCertificate} from '@api/standardsAssociationApi'
import {CertificateModalityEnums, CertificateStatusEnums, ChargeTypeEnums} from '../../enums/memberEnums'
import CheckCertificateModel from '@views/standardsAssociation/model/CheckCertificateModel'
import BindMemberModel from '@views/standardsAssociation/model/BindMemberModel'
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 RenewChargeEditModel from '@views/standardsAssociation/model/RenewChargeEditModel'
import FreeCertificateReplaceEditModel from '@views/standardsAssociation/model/FreeCertificateReplaceEditModel'
export default {
name: 'CertificateManagement',
mixins: [JeroListMixin, mixinDevice, RangeDateMixin, StandardListMixin],
@@ -267,7 +271,7 @@ export default {
width: 60,
align: 'center',
fixed: 'left',
customRender: function(t, r, index) {
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
@@ -276,14 +280,14 @@ export default {
align: 'center',
width: 160,
dataIndex: 'companyName',
fixed:'left'
fixed: 'left'
},
{
title: '证书类型',
align: 'center',
width: 260,
dataIndex: 'certificateType',
customRender: function(text) {
customRender: function (text) {
if (text === 1) {
return '世界制造厂识别代号(WMI)证书'
} else if (text === 2) {
@@ -296,7 +300,7 @@ export default {
align: 'center',
dataIndex: 'code',
width: 140,
scopedSlots: { customRender: 'codeState' }
scopedSlots: {customRender: 'codeState'}
},
{
title: '发证时间',
@@ -309,7 +313,7 @@ export default {
align: 'center',
width: 170,
dataIndex: 'effectDate',
customRender: function(text) {
customRender: function (text) {
return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
}
},
@@ -318,7 +322,7 @@ export default {
align: 'center',
dataIndex: 'invalidDate',
width: 160,
customRender: function(text) {
customRender: function (text) {
return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
}
},
@@ -327,7 +331,7 @@ export default {
align: 'center',
dataIndex: 'noticeOfFiling',
width: 120,
customRender: function(text) {
customRender: function (text) {
if (text === 1) {
return '是'
} else if (text === 0) {
@@ -342,14 +346,14 @@ export default {
align: 'center',
width: 140,
dataIndex: 'certificateStatus',
scopedSlots: { customRender: 'customRenderStatus' }
scopedSlots: {customRender: 'customRenderStatus'}
},
{
title: '证书形式',
align: 'center',
width: 120,
dataIndex: 'certificateModality',
customRender: function(text) {
customRender: function (text) {
if (text === 1) {
return '换证'
} else if (text === 2) {
@@ -365,18 +369,18 @@ export default {
title: '操作',
dataIndex: 'action',
align: 'center',
fixed:'right',
fixed: 'right',
width: 147,
scopedSlots: { customRender: 'action' }
scopedSlots: {customRender: 'action'}
}
],
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
xs: {span: 24},
sm: {span: 5}
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
xs: {span: 24},
sm: {span: 16}
},
url: {
list: '/vinCertificate/vinCertificate/getMyVinCertificate',
@@ -394,11 +398,36 @@ export default {
}
},
computed: {
importExcelUrl: function() {
importExcelUrl: function () {
return `${window._CONFIG['memberURL']}/${this.url.importExcelUrl}`
}
},
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() {
this.$refs.replaceMentAffirmModelForm.title = '提交成功'
@@ -427,7 +456,7 @@ export default {
})
},
// 申请证书
applyCertificate: function() {
applyCertificate: function () {
const that = this
// 可申请的免费证书的个数
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.check(record)
@@ -470,7 +499,7 @@ export default {
},
// 绑定会员
bindMember: function(record) {
bindMember: function (record) {
// 证书id
this.$refs.bindMemberModelForm.vinId = record.id
this.$refs.bindMemberModelForm.edit(record)
@@ -484,7 +513,7 @@ export default {
// this.$refs.modalForm.edit(record)
},
// 续费
renewCharge: function(record) {
renewCharge: function (record) {
// if(!(record.chargeType != 1 && record.certificateModality == 3 && record.certificateStatus == 5)){
// return;
// }
@@ -500,7 +529,7 @@ export default {
// this.$refs.modalForm.edit2(record)
},
// 换证
replacement: function(record) {
replacement: function (record) {
this.$refs.replaceMentModelForm.edit(record)
// this.$refs.modalForm.title = '换证'
@@ -510,7 +539,7 @@ export default {
// this.$refs.modalForm.edit3(record)
},
// 编辑: 包括免费证书,收费证书,续费,换证
handleEditRenew: function(record) {
handleEditRenew: function (record) {
console.log(record)
record.certificateModality = Number(record.certificateModality) // 证书形式
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) {
return 0
}
@@ -104,6 +104,8 @@
</template>
<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"
@click="(record.paymentStatus<1 ||record.paymentStatus==2) && handleEdit(record)">编辑</a>
<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 JDate from '@/components/tools/JDate.vue'
import { getMemberInfoById } from '@/api/standardsAssociationApi'
import { getMemberInfoById,withDrawPayment } from '@/api/standardsAssociationApi'
import { RangeDateMixin } from '@/mixins/RangeDateMixin'
import { getAction, getFileAccessHttpUrl } from '@/api/memberManage'
@@ -188,6 +190,30 @@ export default {
methods: {
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获取会员信息
loadMember() {
getMemberInfoById({ id: this.userId }).then((res) => {