ลบ ตรวจสอบเลขบัตรประจำตัวประชาชนซ้ำ
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันตรวจสอบเลขบัตรประจำตัวประชาชน
|
||||
* @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 คำค้นหา
|
||||
|
|
@ -465,7 +430,6 @@ onMounted(async () => {
|
|||
maxlength="13"
|
||||
hide-bottom-space
|
||||
mask="#############"
|
||||
@update:model-value="changeCardID"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue