From 5dc25d14809121b62d40d95caeca030d07540b23 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Thu, 18 Jul 2024 17:48:56 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E9=A1=B9=E7=9B=AE=E5=AE=9E=E6=96=BD?= =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../implementation/account.vue | 3 +-- .../implementation/uploadFee.vue | 24 +++++++++++++++---- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/views/project-management/implementation/account.vue b/src/views/project-management/implementation/account.vue index 40eeb5d..5da2814 100644 --- a/src/views/project-management/implementation/account.vue +++ b/src/views/project-management/implementation/account.vue @@ -306,8 +306,7 @@ const search = (val) => { tableIns.value.refresh() } onActivated(()=>{ - search() - // tableIns.value.refresh() + init() }) diff --git a/src/views/project-management/implementation/uploadFee.vue b/src/views/project-management/implementation/uploadFee.vue index fa30900..006bfc0 100644 --- a/src/views/project-management/implementation/uploadFee.vue +++ b/src/views/project-management/implementation/uploadFee.vue @@ -133,7 +133,7 @@ const rules = reactive({ digest: [{required: true, message: '请输入摘要', trigger: 'blur'}], afterTax: [{required: true, message: '请输入税后余额', trigger: 'blur'}] }) -const tableForm = reactive({ +const tableForm = ref({ tableData: [ { projectId: route.query.id, @@ -164,10 +164,10 @@ const handleAdd = () => { digest: '', afterTax: null } - tableForm.tableData.push(row) + tableForm.value.tableData.push(row) } const handleDelete = (index) => { - tableForm.tableData.splice(index, 1) + tableForm.value.tableData.splice(index, 1) } const handleSubmit = (instance) => { if (!instance) return @@ -181,10 +181,10 @@ const handleSubmit = (instance) => { return; } instance.clearValidate() - tableForm.tableData.forEach(item => { + tableForm.value.tableData.forEach(item => { item.projectName = projectName.value }) - const res = await addLedger(tableForm.tableData) + const res = await addLedger(tableForm.value.tableData) ElNotification({ title: '提示', message: res.msg, @@ -204,6 +204,20 @@ const handleSubmit = (instance) => { const handleBack = () => { history.back() } +onActivated(()=>{ + tableForm.value = { + tableData: [ + { + projectId: route.query.id, + time: '', + projectCost: '', + researchStage: '', + digest: '', + afterTax: null + } + ] + } +})