From 67ea8a7f9afef3761bac1c0ceaeabfc05f2f5bc7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 17 Jan 2024 10:59:48 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=88=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=84=E0=B9=89=E0=B8=99=E0=B8=AB=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B8=A3=E0=B8=A3=E0=B8=A1=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Director/Form.vue | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/modules/12_evaluatePersonal/components/Director/Form.vue b/src/modules/12_evaluatePersonal/components/Director/Form.vue index 8379ecb03..4bfd6193f 100644 --- a/src/modules/12_evaluatePersonal/components/Director/Form.vue +++ b/src/modules/12_evaluatePersonal/components/Director/Form.vue @@ -74,12 +74,12 @@ watch(props.data, async () => { */ function addEmployee() { showLoader(); - if (idCard.value.length === 17) { - console.log("idCard===>", idCard.value); + const idCardNew = idCard.value.replace(/-/g, ""); + if (idCardNew.length === 13) { http .post(config.API.profileSearchPersonal(), { fieldName: "idcard", - keyword: idCard.value, + keyword: idCardNew, }) .then((res) => { console.log(res); @@ -95,6 +95,13 @@ function addEmployee() { formData.email = dataList.email; } else { dialogMessageNotify($q, "ไม่มีข้อมูลบุคคลากรที่ต้องการค้นหา"); + formData.personalId = ""; + formData.prefix = ""; + formData.firstname = ""; + formData.lastname = ""; + formData.position = ""; + formData.phone = ""; + formData.email = ""; } }) .catch((e) => { @@ -208,6 +215,7 @@ function inputEdit(val: boolean) { for="prefixRef" hide-bottom-space :rules="[(val: string) => val !== null && val !== '' || `${'กรุณากรอกคำนำหน้า'}`]" + lazy-rules />
@@ -221,6 +229,7 @@ function inputEdit(val: boolean) { for="firstnameRef" hide-bottom-space :rules="[(val: string) => val !== null && val !== '' || `${'กรุณากรอกชื่อ'}`]" + lazy-rules />
@@ -234,6 +243,7 @@ function inputEdit(val: boolean) { for="lastnameRef" hide-bottom-space :rules="[(val: string) => !!val || `${'กรุณากรอกนามสกุล'}`]" + lazy-rules />
@@ -247,6 +257,7 @@ function inputEdit(val: boolean) { for="positionRef" hide-bottom-space :rules="[(val: string) => !!val || `${'กรุณากรอกตำแหน่ง'}`]" + lazy-rules />
@@ -261,7 +272,6 @@ function inputEdit(val: boolean) { type="tel" mask="##########" hide-bottom-space - :rules="[(val: string) => !!val || `${'กรุณากรอกเบอร์โทร'}`]" />
@@ -274,7 +284,6 @@ function inputEdit(val: boolean) { ref="emailRef" hide-bottom-space for="emailRef" - :rules="[(val: string) => !!val || `${'กรุณากรอกอีเมล'}`]" />
@@ -287,7 +296,7 @@ function inputEdit(val: boolean) { id="formSubmit" color="secondary" label="บันทึก" - type="submit" + @click.stop="onValidate" >บับทึกข้อมูล