From bd76792ec9590633cd7999c219a22eed934d0bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=5F=E4=BD=B3?= Date: Thu, 13 Nov 2025 17:53:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BC=B0=E5=80=BC=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/valuation/audit/index.vue | 130 +++++++++++++++++++----- 1 file changed, 102 insertions(+), 28 deletions(-) diff --git a/web/src/views/valuation/audit/index.vue b/web/src/views/valuation/audit/index.vue index 16a8432..be4324c 100644 --- a/web/src/views/valuation/audit/index.vue +++ b/web/src/views/valuation/audit/index.vue @@ -34,7 +34,6 @@ const statusOptions = [ { label: '全部', value: '' }, { label: '待审核', value: 'pending' }, { label: '已完成', value: 'approved' }, - { label: '已拒绝', value: 'rejected' }, ] const { @@ -67,6 +66,13 @@ const approvalForm = ref({ }) const approvalFormRef = ref(null) +// 文案设置弹窗 +const contentModalVisible = ref(false) +const contentForm = ref({ + content: '', +}) +const contentFormRef = ref(null) + onMounted(() => { $table.value?.handleSearch() }) @@ -76,7 +82,6 @@ const renderStatus = (status) => { const statusMap = { pending: { type: 'warning', text: '待审核' }, approved: { type: 'success', text: '已完成' }, - rejected: { type: 'error', text: '已拒绝' }, } const config = statusMap[status] || { type: 'default', text: '未知' } return h(NTag, { type: config.type }, { default: () => config.text }) @@ -148,28 +153,25 @@ const columns = [ { title: '操作', key: 'actions', - width: 150, + width: 120, align: 'center', fixed: 'right', render(row) { - return [ - // 审核按钮 - 仅待审核状态显示 - row.status === 'pending' && - h( - NButton, - { - size: 'small', - type: 'primary', - style: 'margin-right: 8px;', - onClick: () => handleApprove(row), - }, - { - default: () => '审核', - icon: renderIcon('mdi:check-circle-outline', { size: 16 }), - } - ), - // 查看按钮 - h( + if (row.status === 'pending') { + return h( + NButton, + { + size: 'small', + type: 'primary', + onClick: () => handleApprove(row), + }, + { + default: () => '审核', + icon: renderIcon('mdi:check-circle-outline', { size: 16 }), + } + ) + } else if (row.status === 'approved') { + return h( NButton, { size: 'small', @@ -180,8 +182,9 @@ const columns = [ default: () => '查看', icon: renderIcon('mdi:eye-outline', { size: 16 }), } - ), - ] + ) + } + return null }, }, ] @@ -199,12 +202,33 @@ function handleApprove(row) { // 查看详情 function handleView(row) { - handleEdit(row) + console.log('查看详情', row) } -// 提交审核 -async function submitApproval(action) { +// 打开文案设置弹窗 +function handleAddContent() { + contentForm.value = { + content: '', + } + contentModalVisible.value = true +} + +// 保存文案设置 +function handleContentSave() { + contentFormRef.value?.validate((errors) => { + if (!errors) { + console.log('保存文案设置', contentForm.value) + // 这里可以调用API保存文案 + contentModalVisible.value = false + $message.success('文案设置保存成功') + } + }) +} + +// 审核处理 +async function handleApprovalSubmit(action) { try { + approvalForm.value.action = action await approvalFormRef.value?.validate() const apiCall = action === 'approve' ? api.approveValuation : api.rejectValuation @@ -233,6 +257,16 @@ const approvalRules = { }, ], } + +const contentRules = { + content: [ + { + required: true, + message: '请输入文案内容', + trigger: ['input', 'blur'], + }, + ], +} + + @@ -375,13 +416,13 @@ const approvalRules = { - + 通过 - + @@ -392,5 +433,38 @@ const approvalRules = { + + + + + + + + + + + 保存 + + 取消 + + + +