抽离证书弹窗组件

This commit is contained in:
dongwei
2022-06-16 13:41:03 +08:00
parent a43decdc2c
commit 096a3c9d6f
13 changed files with 5924 additions and 69 deletions
@@ -162,6 +162,43 @@
</div>
<vinCertificate-modal ref="modalForm" @ok="modalFormOk"></vinCertificate-modal>
<!-- 查看证书-->
<CheckCertificateModel ref="checkModalForm"></CheckCertificateModel>
<!-- 绑定会员 窗口-->
<bind-member-model ref="bindMemberModelForm" @ok="modalFormOk"></bind-member-model>
<!-- 续费 窗口-->
<renew-charge-model ref="renewChargeModelForm" @ok="modalFormOk"></renew-charge-model>
<!-- 换证 窗口-->
<replace-ment-model ref="replaceMentModelForm" @ok="modalFormOk" @affirm="handleAffirm"></replace-ment-model>
<!-- 换证确认 窗口-->
<replace-ment-affirm-model ref="replaceMentAffirmModelForm"></replace-ment-affirm-model>
<!-- 新建VIN证书申请 免费额度内 窗口-->
<free-certificate-model ref="addFreeModalForm" @ok="modalFormOk"></free-certificate-model>
<!-- 新建VIN证书申请 付费额度内 窗口-->
<charge-certificate-model ref="addChargeModalForm" @ok="modalFormOk"></charge-certificate-model>
<!-- 免费证书申请编辑 窗口-->
<free-certificate-edit-model ref="freeCertificateEditModel" @ok="modalFormOk"></free-certificate-edit-model>
<!-- 免费证书申请换证 窗口-->
<free-certificate-replace-edit-model
ref="FreeCertificateReplaceEditModel"
@ok="modalFormOk"
@affirm="handleAffirm">
</free-certificate-replace-edit-model>
<!-- 收费证书申请编辑 窗口-->
<charge-certificate-edit-model ref="ChargeCertificateEditModel" @ok="modalFormOk"></charge-certificate-edit-model>
<!-- 证书续费编辑 窗口-->
<renew-charge-edit-model ref="RenewChargeEditModel" @ok="modalFormOk"></renew-charge-edit-model>
</a-card>
</div>
</template>
@@ -179,7 +216,17 @@ 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 CheckCertificateModel from '@views/standardsAssociation/model/CheckCertificateModel'
import BindMemberModel from '@views/standardsAssociation/model/BindMemberModel'
import RenewChargeModel from '@views/standardsAssociation/model/RenewChargeModel'
import ReplaceMentModel from '@views/standardsAssociation/model/ReplaceMentModel'
import ReplaceMentAffirmModel from '@views/standardsAssociation/model/ReplaceMentAffirmModel'
import FreeCertificateModel from '@views/standardsAssociation/model/FreeCertificateModel'
import ChargeCertificateModel from '@views/standardsAssociation/model/ChargeCertificateModel'
import FreeCertificateEditModel from '@views/standardsAssociation/model/FreeCertificateEditModel'
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],
@@ -187,7 +234,18 @@ export default {
JMultiSelectTag,
JDate,
VinCertificateModal,
JDictSelectTag
JDictSelectTag,
CheckCertificateModel,
BindMemberModel,
RenewChargeModel,
ReplaceMentModel,
ReplaceMentAffirmModel,
FreeCertificateModel,
ChargeCertificateModel,
FreeCertificateEditModel,
ChargeCertificateEditModel,
RenewChargeEditModel,
FreeCertificateReplaceEditModel
},
data() {
return {
@@ -341,6 +399,11 @@ export default {
}
},
methods: {
// 显示换证确认 窗口
handleAffirm() {
this.$refs.replaceMentAffirmModelForm.title = '提交成功'
this.$refs.replaceMentAffirmModelForm.show()
},
initDictConfig() {
},
// 授权
@@ -369,19 +432,26 @@ export default {
// 可申请的免费证书的个数
let freeCount
getAction('/vinCertificate/vinCertificate/getFreeCount').then(res => {
console.log(res)
if (res.success) {
freeCount = res.result
that.$refs.modalForm.title = '新增申请'
that.$refs.modalForm.disableSubmit = false
that.$refs.modalForm.freeCount = freeCount
// that.$refs.modalForm.title = '新增申请'
// that.$refs.modalForm.disableSubmit = false
// that.$refs.modalForm.freeCount = freeCount
// freeCount 为0 打开收费证书申请窗口
if (freeCount === 0) {
that.$refs.modalForm.pageType = 6
// 弹出新增收费窗口操作
that.$refs.addChargeModalForm.title = '新增申请'
that.$refs.addChargeModalForm.add()
} else {
that.$refs.modalForm.pageType = 5
// 弹出新增免费窗口操作
// that.$refs.modalForm.pageType = 5
that.$refs.addFreeModalForm.add()
that.$refs.addFreeModalForm.title = '新增申请'
that.$refs.addFreeModalForm.freeCount = freeCount
}
// 弹窗口操作
that.$refs.modalForm.add()
// // 弹窗口操作
// that.$refs.modalForm.add()
} else {
that.$message.warning(res.message)
}
@@ -389,43 +459,55 @@ export default {
},
// 查看证书
handleDetail: function(record) {
this.$refs.modalForm.title = '查看证书'
this.$refs.modalForm.disableSubmit = true
this.$refs.modalForm.pageType = 1
this.$refs.modalForm.remainingTime = this.remainingTimeCount(record.certificateValidDate)
this.$refs.modalForm.edit(record)
this.$refs.checkModalForm.remainingTime = this.remainingTimeCount(record.certificateValidDate)
this.$refs.checkModalForm.check(record)
// this.$refs.modalForm.title = '查看证书'
// this.$refs.modalForm.disableSubmit = true
// this.$refs.modalForm.pageType = 1
// this.$refs.modalForm.remainingTime = this.remainingTimeCount(record.certificateValidDate)
// this.$refs.modalForm.edit(record)
},
// 绑定会员
bindMember: function(record) {
this.$refs.modalForm.title = '绑定会员'
this.$refs.modalForm.disableSubmit = true
// 绑定会员时使用4号窗口
this.$refs.modalForm.pageType = 4
// 证书id
this.$refs.modalForm.vinId = record.id
this.$refs.modalForm.edit(record)
this.$refs.bindMemberModelForm.vinId = record.id
this.$refs.bindMemberModelForm.edit(record)
// this.$refs.modalForm.title = '绑定会员'
// this.$refs.modalForm.disableSubmit = true
// // 绑定会员时使用4号窗口
// this.$refs.modalForm.pageType = 4
// // 证书id
// this.$refs.modalForm.vinId = record.id
// this.$refs.modalForm.edit(record)
},
// 续费
renewCharge: function(record) {
// if(!(record.chargeType != 1 && record.certificateModality == 3 && record.certificateStatus == 5)){
// return;
// }
this.$refs.modalForm.title = '续费'
this.$refs.modalForm.disableSubmit = true
// 换证显示 1是世界证书
this.$refs.modalForm.isChangeCer = record.certificateType
// 证书续费时使用7号窗口
this.$refs.modalForm.pageType = 7
this.$refs.modalForm.edit2(record)
this.$refs.renewChargeModelForm.isChangeCer = record.certificateType
this.$refs.renewChargeModelForm.edit(record)
// this.$refs.modalForm.title = '续费'
// this.$refs.modalForm.disableSubmit = true
// // 换证显示 1是世界证书
// this.$refs.modalForm.isChangeCer = record.certificateType
// // 证书续费时使用7号窗口
// this.$refs.modalForm.pageType = 7
// this.$refs.modalForm.edit2(record)
},
// 换证
replacement: function(record) {
this.$refs.modalForm.title = '换证'
this.$refs.modalForm.disableSubmit = true
// 换证的时候使用8号窗口
this.$refs.modalForm.pageType = 8
this.$refs.modalForm.edit3(record)
this.$refs.replaceMentModelForm.edit(record)
// this.$refs.modalForm.title = '换证'
// this.$refs.modalForm.disableSubmit = true
// // 换证的时候使用8号窗口
// this.$refs.modalForm.pageType = 8
// this.$refs.modalForm.edit3(record)
},
// 编辑: 包括免费证书,收费证书,续费,换证
handleEditRenew: function(record) {
@@ -435,8 +517,8 @@ export default {
// 证书是否免费 1-免费 2-付费
record.chargeType = Number(record.chargeType)
// 分为续证驳回和 非免费证书申请驳回 chargeType 1是免费证书 2是收费证书
this.$refs.modalForm.title = ''
this.$refs.modalForm.disableSubmit = true
// this.$refs.modalForm.title = ''
// this.$refs.modalForm.disableSubmit = true
// certificateStatus --证书状态-待支付
if (record.certificateStatus === CertificateStatusEnums.toPay.index) {
// 免费证书
@@ -447,55 +529,71 @@ export default {
let freeCount
getAction('/vinCertificate/vinCertificate/getFreeCount').then((res) => {
freeCount = res.result
this.$refs.modalForm.freeCountVin = freeCount + 1
this.$refs.modalForm.title = '新增申请'
this.$refs.modalForm.disableSubmit = false
this.$refs.modalForm.pageType = 10
this.$refs.modalForm.edit5(record)
this.$refs.freeCertificateEditModel.freeCountVin = freeCount + 1
this.$refs.freeCertificateEditModel.edit(record)
// this.$refs.modalForm.freeCountVin = freeCount + 1
// this.$refs.modalForm.title = '新增申请'
// this.$refs.modalForm.disableSubmit = false
// this.$refs.modalForm.pageType = 10
// this.$refs.modalForm.edit5(record)
})
return
} else if (record.certificateModality === 1) {
// 免费证书换证编辑
this.$refs.modalForm.title = '换证'
this.$refs.modalForm.disableSubmit = true
// 换证的时候使用13号窗口
this.$refs.modalForm.pageType = 13
this.$refs.modalForm.edit8(record)
this.$refs.FreeCertificateReplaceEditModel.edit(record)
// this.$refs.modalForm.title = '换证'
// this.$refs.modalForm.disableSubmit = true
// // 换证的时候使用13号窗口
// this.$refs.modalForm.pageType = 13
// this.$refs.modalForm.edit8(record)
}
} else if (record.chargeType === 2 && record.certificateModality === 4) {
// 收费证书编辑
this.$refs.modalForm.title = '新增申请'
this.$refs.modalForm.disableSubmit = false
this.$refs.modalForm.pageType = 11
this.$refs.modalForm.edit6(record)
this.$refs.ChargeCertificateEditModel.edit(record)
// this.$refs.modalForm.title = '新增申请'
// this.$refs.modalForm.disableSubmit = false
// this.$refs.modalForm.pageType = 11
// this.$refs.modalForm.edit6(record)
} else if (record.chargeType === 2 && record.certificateModality === 2) {
// 续费编辑
this.$refs.modalForm.title = '续费'
this.$refs.modalForm.disableSubmit = true
// 证书续费编辑时使用12号窗口
this.$refs.modalForm.pageType = 12
this.$refs.modalForm.edit7(record)
this.$refs.RenewChargeEditModel.edit(record)
// this.$refs.modalForm.title = '续费'
// this.$refs.modalForm.disableSubmit = true
// // 证书续费编辑时使用12号窗口
// this.$refs.modalForm.pageType = 12
// this.$refs.modalForm.edit7(record)
} else if (record.chargeType === 2 && record.certificateModality === 1) {
// 换证编辑
this.$refs.modalForm.title = '换证'
this.$refs.modalForm.disableSubmit = true
// 换证的时候使用13号窗口
this.$refs.modalForm.pageType = 13
this.$refs.modalForm.edit8(record)
// // 换证编辑
this.$refs.FreeCertificateReplaceEditModel.edit(record)
// this.$refs.modalForm.title = '换证'
// this.$refs.modalForm.disableSubmit = true
// // 换证的时候使用13号窗口
// this.$refs.modalForm.pageType = 13
// this.$refs.modalForm.edit8(record)
}
} else {
// 新增证书缴费编辑窗口
if (record.chargeType === 2 && record.certificateModality === 4 && record.certificateStatus === 6) {
this.$refs.modalForm.title = '新增申请'
this.$refs.modalForm.disableSubmit = false
this.$refs.modalForm.pageType = 11
this.$refs.modalForm.edit6(record)
this.$refs.ChargeCertificateEditModel.edit(record)
// this.$refs.modalForm.title = '新增申请'
// this.$refs.modalForm.disableSubmit = false
// this.$refs.modalForm.pageType = 11
// this.$refs.modalForm.edit6(record)
} else if (record.chargeType === 2 && record.certificateModality === 2 && record.certificateStatus === 6) {
this.$refs.modalForm.title = '续费'
this.$refs.modalForm.disableSubmit = true
// 证书续费编辑时使用12号窗口
this.$refs.modalForm.pageType = 12
this.$refs.modalForm.edit7(record)
// 续费编辑
this.$refs.RenewChargeEditModel.edit(record)
// this.$refs.modalForm.title = '续费'
// this.$refs.modalForm.disableSubmit = true
// // 证书续费编辑时使用12号窗口
// this.$refs.modalForm.pageType = 12
// this.$refs.modalForm.edit7(record)
}
}
},