From 5d0fa3c16a8db61ffb7dcfc3e8b5743bfcff750f Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Tue, 18 Nov 2025 11:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=82=B9=E5=87=BB=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/moneyManage/receiveDetail/receiveService.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/views/moneyManage/receiveDetail/receiveService.vue b/src/views/moneyManage/receiveDetail/receiveService.vue index 958212b..256cc30 100644 --- a/src/views/moneyManage/receiveDetail/receiveService.vue +++ b/src/views/moneyManage/receiveDetail/receiveService.vue @@ -267,9 +267,9 @@ 取消 确定 + type="primary" @click="throttledhandleAddForm" :disabled="ifAddDone">确定 编辑 + type="primary" @click="throttledhandleEditForm" :disabled="ifReAddDone">编辑 @@ -428,6 +428,10 @@ const total = ref(0) // 总条数 const pageInfo = ref({ pageSize: 10, pageNum: 1 }) // 分页信息 const numUnitList = ref(['年', '月']) +//防止重复点击状态管理 +const ifAddDone = ref(false) +const ifReAddDone = ref(false) + // 角色标识:固定为客服(删除财务、总部财务、超级管理员标识) const kefu = ref(true) const caiwu = ref(false) @@ -683,6 +687,7 @@ const handleAddForm = async () => { if (addFormData.value.payTime) { addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss') } + ifAddDone.value = true const result = await request({ url: '/cashCollection/add', data: { @@ -702,9 +707,11 @@ const handleAddForm = async () => { getlist() closeAddForm() } + ifAddDone.value = false } catch (error) { console.log('新增报错:', error); ElMessage.error('请完善表单信息后提交'); + ifAddDone.value = false } } @@ -732,6 +739,7 @@ const handleEditForm = async () => { if (addFormData.value.payTime) { addFormData.value.payTime = moment(addFormData.value.payTime).format('YYYY-MM-DD HH:mm:ss') } + ifReAddDone.value = true const result = await request({ url: '/cashCollection/reSubmit', data: { @@ -751,8 +759,10 @@ const handleEditForm = async () => { getlist() closeAddForm() } + ifReAddDone.value = false } catch (error) { console.log(error); + ifReAddDone.value = false } }