ลบ ตรวจสอบเลขบัตรประจำตัวประชาชนซ้ำ
This commit is contained in:
parent
e23b08556b
commit
2f1637a6b3
1 changed files with 0 additions and 36 deletions
|
|
@ -162,41 +162,6 @@ function addNewImage() {
|
||||||
inputImage.value.click();
|
inputImage.value.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชันตรวจสอบเลขบัตรประจำตัวประชาชน
|
|
||||||
* @param value เลขบัตรประจำตัวประชาชน
|
|
||||||
*/
|
|
||||||
async function changeCardID(value: string | number | null) {
|
|
||||||
if (value != null && typeof value == "string") {
|
|
||||||
if (value.length == 13 && value != defaultCitizenData.value) {
|
|
||||||
await checkCitizen(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังก์ชันยิง API ตรวจสอบเลขบัตรประจำตัวประชาชนซ้ำ
|
|
||||||
* @param value เลขบัตรประจำตัวประชาชน
|
|
||||||
*/
|
|
||||||
async function checkCitizen(id: string) {
|
|
||||||
showLoader();
|
|
||||||
await http
|
|
||||||
.put(config.API.profileNewCitizenId(id), {
|
|
||||||
citizenId: id,
|
|
||||||
})
|
|
||||||
.then(() => {})
|
|
||||||
.catch((err) => {
|
|
||||||
if (err.response.data.status === 500) {
|
|
||||||
dialogMessageNotify($q, err.response.data.message);
|
|
||||||
} else {
|
|
||||||
messageError($q, err);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันค้นหาข้อมูลในรายการตัวเลือก
|
* ฟังก์ชันค้นหาข้อมูลในรายการตัวเลือก
|
||||||
* @param val คำค้นหา
|
* @param val คำค้นหา
|
||||||
|
|
@ -465,7 +430,6 @@ onMounted(async () => {
|
||||||
maxlength="13"
|
maxlength="13"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
mask="#############"
|
mask="#############"
|
||||||
@update:model-value="changeCardID"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue