From 11388470f2cdb2dfbc972065a30a4c4c7ce09b52 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 22 Jan 2024 16:02:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=93=81=E5=8F=91=E8=B4=A7=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=94=AF=E6=8C=81=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/deliver/coms/comDeliverRequestPopup.vue | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/pages/deliver/coms/comDeliverRequestPopup.vue b/pages/deliver/coms/comDeliverRequestPopup.vue index f1d4db60..8e16f7f3 100644 --- a/pages/deliver/coms/comDeliverRequestPopup.vue +++ b/pages/deliver/coms/comDeliverRequestPopup.vue @@ -42,10 +42,13 @@ 数量 : - - + + + @@ -109,7 +112,9 @@ isModifiedPosition: true, customerList: [], customerName: "请选择客户", - customerCode:"" + customerCode:"", + maxlength:10, + stdPackInfo:undefined } }, props: { @@ -119,6 +124,21 @@ }, }, methods: { + checkNum(e) { + let value = e.detail.value; + let dot = value.indexOf('.'); //包含小数点 + let reg = /^[0-9]+$/; //正整数 + if (dot > -1) { + this.maxlength = dot + 7; //长度是小数点后两位 + if (value.length > dot + 7) { + + } + } + if (reg.test(value)) { //如果是正整数不包含小数点 + this.maxlength = 10; + } + this.change(value) + }, openRequestPopup(editPosition) { if (this.customerList.length == 0) { getBasicCustomerList().then(res => {