提交
This commit is contained in:
1 parent
8e2dd8b9f0
commit
e5ba8f097a
7 files changed
+353
-14
No files matched your search
@@ -318,6 +318,65 @@
|
||||
</div>
|
||||
<el-empty v-else description="暂无缴费明细" :image-size="48" />
|
||||
</div>
|
||||
|
||||
<div v-if="showAuditHistory" id="view-section-audit" class="form-tab-pane">
|
||||
<h3 class="detail-section-title">审核记录</h3>
|
||||
<el-table
|
||||
v-loading="auditLoading"
|
||||
class="list-table sub-view-table"
|
||||
:data="auditRecords"
|
||||
stripe
|
||||
empty-text="暂无审核记录"
|
||||
>
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
width="68"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="审核时间"
|
||||
min-width="170"
|
||||
align="center"
|
||||
header-align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="auditStatus"
|
||||
label="审核状态"
|
||||
width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span
|
||||
class="tag"
|
||||
:class="String(row.auditStatus) === 'shtg' ? 'success' : 'warning'"
|
||||
>
|
||||
{{ auditStatusLabel(String(row.auditStatus || '')) }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="auditRemark"
|
||||
label="审核备注"
|
||||
min-width="200"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="auditorUserName"
|
||||
label="审核人"
|
||||
min-width="120"
|
||||
align="center"
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">{{ auditorDisplay(row) }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
@@ -352,6 +411,7 @@
|
||||
import { Close } from '@element-plus/icons-vue'
|
||||
import ProtocolAttachmentReadonly from './ProtocolAttachmentReadonly.vue'
|
||||
import {
|
||||
fetchCollectionProtocolAuditList,
|
||||
fetchCollectionProtocolDetail,
|
||||
type CollectionProtocolRow
|
||||
} from '@/api/collection-protocol'
|
||||
@@ -365,17 +425,22 @@
|
||||
fetchUserList
|
||||
} from '@/api/admin'
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: boolean
|
||||
protocolId: string | null
|
||||
listRow?: CollectionProtocolRow | null
|
||||
}>()
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
modelValue: boolean
|
||||
protocolId: string | null
|
||||
listRow?: CollectionProtocolRow | null
|
||||
/** 展示审核记录 Tab(采集协议单审核页) */
|
||||
showAuditHistory?: boolean
|
||||
}>(),
|
||||
{ showAuditHistory: false }
|
||||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', val: boolean): void
|
||||
}>()
|
||||
|
||||
const formTabs = [
|
||||
const baseFormTabs = [
|
||||
{ key: 'basic', label: '基本信息' },
|
||||
{ key: 'party', label: '客户信息' },
|
||||
{ key: 'collection', label: '采集信息' },
|
||||
@@ -383,8 +448,18 @@
|
||||
{ key: 'payment', label: '缴费信息' }
|
||||
] as const
|
||||
|
||||
const formTabs = computed(() => {
|
||||
const tabs: Array<{ key: string; label: string }> = [...baseFormTabs]
|
||||
if (props.showAuditHistory) {
|
||||
tabs.push({ key: 'audit', label: '审核记录' })
|
||||
}
|
||||
return tabs
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const auditLoading = ref(false)
|
||||
const bundle = ref<Record<string, any> | null>(null)
|
||||
const auditRecords = ref<Array<Record<string, unknown>>>([])
|
||||
const activeTab = ref('basic')
|
||||
|
||||
const sampleTypeOptions = ref<Array<{ id: string; typeName: string }>>([])
|
||||
@@ -476,6 +551,18 @@
|
||||
return m[s] || s || '—'
|
||||
}
|
||||
|
||||
function auditStatusLabel(s: string) {
|
||||
if (s === 'shtg') return '审核通过'
|
||||
if (s === 'shth') return '审核退回'
|
||||
return s || '—'
|
||||
}
|
||||
|
||||
function auditorDisplay(row: Record<string, unknown>) {
|
||||
const name = String(row.auditorUserName || '').trim()
|
||||
if (name) return name
|
||||
return dash(row.auditorUserId)
|
||||
}
|
||||
|
||||
function payModeLabel(s: string) {
|
||||
if (s === 'dj') return '趸交'
|
||||
if (s === 'fq') return '分期'
|
||||
@@ -643,14 +730,39 @@
|
||||
await Promise.all(tasks)
|
||||
}
|
||||
|
||||
async function loadAuditRecords() {
|
||||
if (!props.showAuditHistory || !props.protocolId) {
|
||||
auditRecords.value = []
|
||||
return
|
||||
}
|
||||
auditLoading.value = true
|
||||
try {
|
||||
const pno =
|
||||
String(protocol.value?.protocolNo || props.listRow?.protocolNo || '').trim() || undefined
|
||||
const res = await fetchCollectionProtocolAuditList({
|
||||
page: 1,
|
||||
pageSize: 100,
|
||||
keyword: pno
|
||||
})
|
||||
const pid = props.protocolId
|
||||
auditRecords.value = (res.list || []).filter(
|
||||
(row) => String(row.collectionProtocolId || '') === pid
|
||||
)
|
||||
} finally {
|
||||
auditLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function loadDetail() {
|
||||
if (!props.protocolId) return
|
||||
loading.value = true
|
||||
bundle.value = null
|
||||
auditRecords.value = []
|
||||
try {
|
||||
const data = await fetchCollectionProtocolDetail(props.protocolId)
|
||||
bundle.value = data as Record<string, any>
|
||||
await loadLookups(data as Record<string, any>)
|
||||
await loadAuditRecords()
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
@@ -667,6 +779,7 @@
|
||||
|
||||
function handleClosed() {
|
||||
bundle.value = null
|
||||
auditRecords.value = []
|
||||
activeTab.value = 'basic'
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user