From 27e618eb1705e111cd057e3a842cece9de99f3d2 Mon Sep 17 00:00:00 2001 From: dingtalk_umvbsp Date: Thu, 16 Feb 2023 18:35:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=85=A5=E5=BA=93=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=A1=A8=E5=8D=95=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/stock/list.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/stock/list.vue b/pages/stock/list.vue index 20537dd..752701f 100644 --- a/pages/stock/list.vue +++ b/pages/stock/list.vue @@ -192,8 +192,8 @@ export default{ if(!val)call(new Error(`${({in:'入',out:'出'})[this.mode]}库批次号必填!`)); else call() }}, - number:{required:true,validator(rule,val,call){ - if(!val)call(new Error(`请输入${({in:'入',out:'出'})[this.mode]}库数量!`)); + number:{required:true,validator:(rule,val,call)=>{ + if(!(val>0))call(new Error(`请输入${({in:'入',out:'出'})[this.mode]}库数量!`)); else if(this.mode=='out' && val>this.detail.equivalentInventory)call(new Error(`${({in:'入',out:'出'})[this.mode]}库数量不能大于库存数量!`)); else call() },type:"number"},