From d8c071952c44bca0c0ca5524fc6b93906ceaed08 Mon Sep 17 00:00:00 2001 From: zx Date: Tue, 10 Feb 2026 11:18:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E8=AE=A1=E5=88=92=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=95=B0=E9=87=8F=E5=90=8C=E6=AD=A5=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=80=BB=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/plan/jh/index.vue | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/views/plan/jh/index.vue b/src/views/plan/jh/index.vue index 13c9808..7dd35cf 100644 --- a/src/views/plan/jh/index.vue +++ b/src/views/plan/jh/index.vue @@ -294,7 +294,7 @@ - + @@ -309,7 +309,7 @@ - + @@ -805,14 +805,26 @@ function handlePrint(){ // showContent.value = false; } // 合同金额改变 -function htDjChange(e) { - console.log(e,form.value,'e===>'); +function htDjChange(e,name) { + console.log(e,form.value,name,'e===>'); if(e){ const htDj = form.value?.htDj const jhQty = form.value?.jhQty const jhAmt = (Number(htDj) * Number(jhQty)* 100*10000) / ( 100*10000) console.log(jhAmt,'jhAmt==>'); - form.value.jhAmt=jhAmt + if(!(/^-?\d+(\.\d+)?$/.test(e))){ + if(name == 'htDj'){ + proxy.$modal.msgError("合同单价请输入数字"); + return; + } + if(name == 'jhQty'){ + proxy.$modal.msgError("计划交货数量请输入数字"); + return; + } + form.value.jhAmt='' + }else{ + form.value.jhAmt=jhAmt + } } }