From a6416d85d1cb3189a36961d2f961be1be757bdf2 Mon Sep 17 00:00:00 2001 From: admin <> Date: Wed, 24 Jul 2024 17:04:28 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=89=80=E6=9C=89=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=E5=A4=B1=E5=8E=BB=E7=84=A6=E7=82=B9=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialog/CarNoDialog.vue | 1 - src/pagesApp/components/addSupplier.vue | 11 ++++++++++- src/pagesApp/shipmentSpl.vue | 16 ++++++++++------ src/pagesShipment/form/shipmentForm.vue | 10 ++++++++++ 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/components/Dialog/CarNoDialog.vue b/src/components/Dialog/CarNoDialog.vue index ed97cfa..db1b696 100644 --- a/src/components/Dialog/CarNoDialog.vue +++ b/src/components/Dialog/CarNoDialog.vue @@ -18,7 +18,6 @@ import plateInput from "@/components/uni-plate-input/uni-plate-input.vue"; const props = defineProps<{ show: boolean; - isShipment: boolean; }>(); const emit = defineEmits(["handleDialog", "changeCarNo"]); const statePlate = reactive({ diff --git a/src/pagesApp/components/addSupplier.vue b/src/pagesApp/components/addSupplier.vue index 79068d9..7705f0d 100644 --- a/src/pagesApp/components/addSupplier.vue +++ b/src/pagesApp/components/addSupplier.vue @@ -32,6 +32,7 @@ :customStyle="{}" border="none" @change="(e:any) => {handleInput(e, item)}" + @blur="(e:any) => {handleBlur(e, item)}" :disabled="item.type === 'select'" :disabledColor=" ['卡号', '供应商分类'].indexOf(item.name) > -1 @@ -108,6 +109,14 @@ const handleInput = (e: any, item: any) => { }, 10); } }; +const handleBlur = (e: any, item: any) => { + if (item.key === "phone") { + if (!valid.mobile.pattern.test(model1.formData.phone)) { + uni.showToast({ icon: "none", title: "请输入正确的手机号" }); + return; + } + } +}; const model1 = reactive({ formData: {}, }); @@ -413,7 +422,7 @@ onLoad((option: any) => { border-radius: 13rpx 13rpx 0rpx 0rpx; padding: 25rpx 50rpx; position: fixed; -width: calc(100vw - 100rpx); + width: calc(100vw - 100rpx); bottom: 0rpx; z-index: 999; ::v-deep button { diff --git a/src/pagesApp/shipmentSpl.vue b/src/pagesApp/shipmentSpl.vue index 1ddb0ed..a8a3f2f 100644 --- a/src/pagesApp/shipmentSpl.vue +++ b/src/pagesApp/shipmentSpl.vue @@ -37,8 +37,9 @@ ? '#ffffff' : '#f5f7fa' " - @blur="(e:any) => {handleInput(e, item)}" + @change="(e:any) => {handleInput(e, item)}" @clear="handleClear(item)" + @blur="(e:any) => {handleBlur(e, item)}" >