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'],
+ },
+ ],
+}
@@ -296,6 +330,13 @@ const approvalRules = {
/>
+
+
+
+
+ 新增文案设置
+
+
@@ -375,13 +416,13 @@ const approvalRules = {
-
+
通过
-
+
@@ -392,5 +433,38 @@ const approvalRules = {
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+ 取消
+
+
+
+