From 2e6b58a2b6f23c16ae515bd986ec6a1b485c722b Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Wed, 24 Jul 2024 13:51:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=90=88=E5=90=8C=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E9=87=91=E9=A2=9D=E5=85=88=E6=89=A3=E9=99=A4=E5=8E=9F?= =?UTF-8?q?=E6=9C=89=E5=A1=AB=E5=86=99=E7=9A=84=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contract/components/editorContract.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/contract/components/editorContract.vue b/src/views/contract/components/editorContract.vue index 6eb2726..844e2cb 100644 --- a/src/views/contract/components/editorContract.vue +++ b/src/views/contract/components/editorContract.vue @@ -694,16 +694,16 @@ import { listdeptNoAuth } from '@/api/system/department' row.useMoney = 0 return } - if ((parseFloat(e) + parseFloat(row.has_money_total)) > (parseFloat(row.update_money) || parseFloat(row.money))) { + let findPlan = this.plan.find(i => i.value.plan_id === row.id) + console.log(findPlan,(parseFloat(e) + parseFloat(row.has_money_total) - parseFloat(findPlan?.value?.use_money||0)),(parseFloat(row.update_money) || parseFloat(row.money))) + if ((parseFloat(e) + parseFloat(row.has_money_total) - parseFloat(findPlan?.value?.use_money||0)) > (parseFloat(row.update_money) || parseFloat(row.money))) { this.$message.warning("使用金额不能大于计划金额"); row.useMoney = 0 return } - let findPlan = this.plan.find(i => i.value.plan_id === row.id) if (findPlan) { findPlan.value.use_money = e; } - console.log(this.plan,row) row.useMoney = e }, //确认计划选择