【fix-bug】-1、发邮件提示语的问题 2、页面卡死的问题

This commit is contained in:
fengchenchen
2023-07-28 09:00:02 +08:00
parent 75fcfbd781
commit c928646d49
4 changed files with 53 additions and 42 deletions
@@ -105,6 +105,8 @@ export default {
if(record) {
params.guestsUploadFileFlag = record.guestsUploadFileFlag || 0
this.selectedIds = [record.id]
} else {
params.guestsUploadFileFlag = 0
}
this.visible = true
this.$nextTick(() => {
@@ -132,7 +132,7 @@
<span slot="action" class="action-span-cell" slot-scope="text, record">
<a @click="incomePayment(record)" :disabled="Number(record.receivableAmount) === 0"
v-has="'packProject:incomePayment'">来款</a>
<a @click="cancelPack(record.id)" v-has="'packProject:cancelPack'">取消打包</a>
<a @click="cancelPack(record.id)" :disabled="Number(record.receivableAmount) === 0" v-has="'packProject:cancelPack'">取消打包</a>
<a @click="invoicing(record)" :disabled="record.needInvoice === 0 || Number(record.receivableAmount) === 0"
v-has="'packProject:invoicing'">开票</a>
<a v-has="'packProject:confirmPayment'" @click="confirmPayment(record)" :disabled="Number(record.receivableAmount) === 0">确认收入</a>
@@ -279,23 +279,6 @@ export default {
this.confirmLoading = false
return
}
if(this.needMail) {
this.$confirm({
title: '消息确认',
content: '确认要向选择的成员发送邮件吗?',
cancelText: '不发送',
okText: '确认发送',
onOk: function () {
callbackFunc(1)
},
onCancel: function() {
callbackFunc(0)
}
})
} else {
// 若全局没有配置则不发送邮件信息
callbackFunc(0)
}
// 定义请求成功的方法 sendEmailFlag 0-不发送 1-发送
const callbackFunc = (sendEmailFlag) => {
// TODO 分标委、理事会是否需要验证 再定
@@ -319,10 +302,12 @@ export default {
}
requestFun(param).then(res => {
if (res.success) {
if (Array.isArray(res.result) && res.result.length > 0) {
if (sendEmailFlag && Array.isArray(res.result) && res.result.length > 0) {
this.$refs.emailError.open()
this.$refs.emailError.msgList = res.result
console.log(this.$refs.emailError.msgList, 'this.$refs.emailError.msgList ')
} else {
this.$message.success(res.message)
}
this.$emit('ok')
this.confirmLoading = false
@@ -337,6 +322,25 @@ export default {
})
}
if(this.needMail) {
this.$confirm({
title: '消息确认',
content: '确认要向选择的成员发送邮件吗?',
cancelText: '不发送',
okText: '确认发送',
onOk: function () {
callbackFunc(1)
},
onCancel: function() {
callbackFunc(0)
}
})
} else {
// 若全局没有配置则不发送邮件信息
callbackFunc(0)
}
},
handleCancel() {
this.close()
@@ -263,6 +263,10 @@ export default {
projectId: this.projectId,
projectType: this.projectType
}
// 非批量上传的时候传当前选中的文件id
if(!this.isBatch) {
param.fileId = this.recordId
}
distributeMemberList(param).then(res => {
if (res.success) {
this.dataSourceInit = res.result || []
@@ -365,23 +369,6 @@ export default {
this.confirmLoading = false
return
}
if(this.needMail) {
this.$confirm({
title: '消息确认',
content: '确认要向选择的成员发送邮件吗?',
cancelText: '不发送',
okText: '确认发送',
onOk: function () {
callbackFunc(1)
},
onCancel: function() {
callbackFunc(0)
}
})
} else {
// 若全局没有配置则不发送邮件信息
callbackFunc(0)
}
// 定义请求成功的方法 sendEmailFlag 0-不发送 1-发送
const callbackFunc = (sendEmailFlag) => {
if (this.isBatch) {
@@ -396,13 +383,14 @@ export default {
}
batchDistribute(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
// 是否有邮件发送失败 有就给出提示信息
if (Array.isArray(res.result) && res.result.length > 0) {
// 发送邮件的时候才提醒 是否有邮件发送失败 有就给出提示信息
if (sendEmailFlag && Array.isArray(res.result) && res.result.length > 0) {
// msgWarn(this,res.result,0)
this.$refs.emailError.open()
this.$refs.emailError.msgList = res.result
console.log(this.$refs.emailError.msgList, 'this.$refs.emailError.msgList ')
} else {
this.$message.success(res.message)
}
this.close()
this.$emit('ok')
@@ -425,12 +413,13 @@ export default {
}
distribute(formData).then(res => {
if (res.success) {
this.$message.success(res.message)
if (Array.isArray(res.result) && res.result.length > 0) {
if (sendEmailFlag && Array.isArray(res.result) && res.result.length > 0) {
// msgWarn(this,res.result,0)
this.$refs.emailError.open()
this.$refs.emailError.msgList = res.result
console.log(this.$refs.emailError.msgList, 'this.$refs.emailError.msgList ')
} else {
this.$message.success(res.message)
}
this.close()
this.$emit('ok')
@@ -444,7 +433,23 @@ export default {
})
}
}
if(this.needMail) {
this.$confirm({
title: '消息确认',
content: '确认要向选择的成员发送邮件吗?',
cancelText: '不发送',
okText: '确认发送',
onOk: function () {
callbackFunc(1)
},
onCancel: function() {
callbackFunc(0)
}
})
} else {
// 若全局没有配置则不发送邮件信息
callbackFunc(0)
}
},
handleCancel() {