【开发】工作组收费通知邮件发送失败提醒

This commit is contained in:
fengachen
2021-12-30 14:35:01 +08:00
parent 114d02635b
commit 546c2c957f
2 changed files with 56 additions and 1 deletions
@@ -0,0 +1,43 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
@cancel="handleCancel"
cancelText="关闭">
<div v-for="(item,index) of msgList" :key="index">
{{item}}
</div>
<template slot="footer">
<a-button @click="handleCancel">关闭</a-button>
</template>
</j-modal>
</template>
<script>
export default {
name: 'EmailErrorMsgModal',
desc:'邮件发送失败的提示弹框',
data(){
return {
title:'邮箱失败提醒',
msgList:[],// 要显示的消息提醒数组
visible:false,
width:400
}
},
methods:{
open(){
this.visible = true
},
handleCancel(){
this.msgList = []
this.visible = false
}
}
}
</script>
<style scoped>
</style>
@@ -66,6 +66,7 @@
</a-row>
</a-form>
</a-spin>
<email-error-msg-modal ref="emailError"></email-error-msg-modal>
<template slot="footer">
<a-button @click="handleCancel">关闭</a-button>
<a-button @click="handleOk" type="primary" v-preventclick>确定</a-button>
@@ -78,10 +79,12 @@ import pick from 'lodash.pick'
import JUpload from '@/components/jero/JUpload'
import { postAction } from '@/api/manage'
import { addZero } from '../../../utils/util'
// import {msgWarn} from '@comp/_util/MessageClose'
import EmailErrorMsgModal from '@views/projectManagement/modules/EmailErrorMsgModal'
export default {
name: 'WorkingGroupMemberSetChargeNotice',
components: { JUpload },
components: { JUpload ,EmailErrorMsgModal},
data() {
return {
title: '设置收费通知',
@@ -120,6 +123,7 @@ export default {
this.visible = true
},
handleOk() {
const that = this
// 触发表单验证
this.form.validateFields((err, values) => {
if (!err) {
@@ -130,6 +134,14 @@ export default {
postAction(this.url.setCharge, formData).then(res => {
if (res.success) {
this.$message.success(res.message)
// 是否有邮件发送失败 有就给出提示信息
if(Array.isArray(res.result) && res.result.length > 0){
// msgWarn(this,res.result,0)
that.$refs.emailError.open()
that.$refs.emailError.msgList = res.result
console.log(that.$refs.emailError.msgList ,'that.$refs.emailError.msgList ')
}
this.$emit('ok')
this.close()
} else {