增加回执状态查询详情
This commit is contained in:
parent
9c6b1670f1
commit
fad98a3bd0
|
|
@ -17,6 +17,28 @@
|
|||
<!-- 第二层详情弹框 - 显示每个人的发送记录 -->
|
||||
<ComDialog :dialog-config="detailDialogConfig" @closeDialogOuter="onCloseDetailDialog">
|
||||
<template #outerContent>
|
||||
<el-form :model="detailFormData" ref="detailFormRef" :inline="true">
|
||||
<el-form-item label="回执状态" prop="sendStatus">
|
||||
<el-select
|
||||
clearable
|
||||
style="width: 180px"
|
||||
placeholder="请选择回执状态"
|
||||
v-model="detailFormData.sendStatus"
|
||||
>
|
||||
<el-option label="发送成功" value="发送成功" />
|
||||
<el-option label="发送失败" value="发送失败" />
|
||||
<el-option label="未返回" value="未返回" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="onHandleSearch">
|
||||
搜索
|
||||
</el-button>
|
||||
<el-button plain type="warning" icon="Refresh" @click="onHandleReset">
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="detailLoading"
|
||||
:data="detailList"
|
||||
|
|
@ -110,6 +132,12 @@ const detailLoading = ref(false)
|
|||
const detailList = ref([])
|
||||
const currentLoopId = ref(null) // 当前查看的 loopId
|
||||
const currentId = ref(null) // 当前查看的 id
|
||||
const detailFormRef = ref(null)
|
||||
const detailFormData = ref({
|
||||
sendStatus: '',
|
||||
loopId: '',
|
||||
id: '',
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
sendDetailsId: {
|
||||
|
|
@ -215,9 +243,11 @@ const handleViewDetail = async (row) => {
|
|||
detailList.value = []
|
||||
currentLoopId.value = row.loopId // 保存当前 loopId
|
||||
currentId.value = row.id // 保存当前 id
|
||||
detailFormData.value.loopId = row.loopId
|
||||
detailFormData.value.id = row.id
|
||||
|
||||
try {
|
||||
const result = await getLoopSendRecordDetailsAPI({ loopId: row.loopId, id: row.id })
|
||||
const result = await getLoopSendRecordDetailsAPI(detailFormData.value)
|
||||
if (result.code === 200) {
|
||||
detailList.value = result.data || result.rows || []
|
||||
} else {
|
||||
|
|
@ -249,10 +279,7 @@ const handleResend = async (row) => {
|
|||
proxy.$modal.msgSuccess('重新发送成功')
|
||||
// 重新获取详情数据以刷新列表
|
||||
if (currentLoopId.value) {
|
||||
const detailResult = await getLoopSendRecordDetailsAPI({
|
||||
loopId: currentLoopId.value,
|
||||
id: currentId.value,
|
||||
})
|
||||
const detailResult = await getLoopSendRecordDetailsAPI(detailFormData.value)
|
||||
if (detailResult.code === 200) {
|
||||
detailList.value = detailResult.data || detailResult.rows || []
|
||||
}
|
||||
|
|
@ -268,6 +295,22 @@ const handleResend = async (row) => {
|
|||
}
|
||||
}
|
||||
|
||||
// 搜索
|
||||
const onHandleSearch = async () => {
|
||||
const result = await getLoopSendRecordDetailsAPI(detailFormData.value)
|
||||
if (result.code === 200) {
|
||||
detailList.value = result.data || result.rows || []
|
||||
} else {
|
||||
proxy.$modal.msgError(result.msg || '获取详情失败')
|
||||
}
|
||||
}
|
||||
|
||||
// 重置
|
||||
const onHandleReset = () => {
|
||||
detailFormRef.value?.resetFields()
|
||||
onHandleSearch()
|
||||
}
|
||||
|
||||
// 暴露刷新方法
|
||||
defineExpose({
|
||||
refresh: () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue