ปรับ form เพิ่มกรรมการ
This commit is contained in:
parent
53cd8e593c
commit
7a39d4fccd
2 changed files with 8 additions and 14 deletions
|
|
@ -1,15 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useRoute } from "vue-router";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** importType*/
|
||||
import type {
|
||||
FormCommand,
|
||||
FormCommandRef,
|
||||
} from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||
import type { FormCommand } from "@/modules/12_evaluatePersonal/interface/index/evalute";
|
||||
|
||||
/** importComponents*/
|
||||
import Stepper from "@/modules/12_evaluatePersonal/components/Detail/Stepper.vue";
|
||||
|
|
|
|||
|
|
@ -67,23 +67,22 @@ watch(props.data, async () => {
|
|||
formData.position = props.data.position;
|
||||
formData.phone = props.data.phone;
|
||||
formData.email = props.data.email;
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* เพิ่มบุคลากร
|
||||
*/
|
||||
function addEmployee() {
|
||||
if (idCard.value.length === 13) {
|
||||
showLoader();
|
||||
if (idCard.value.length === 17) {
|
||||
console.log("idCard===>", idCard.value);
|
||||
showLoader();
|
||||
http
|
||||
.post(config.API.profileSearchPersonal(), {
|
||||
fieldName: "idcard",
|
||||
keyword: idCard.value,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
console.log(res);
|
||||
const dataApi = res.data.result;
|
||||
if (dataApi.length > 0) {
|
||||
const dataList = dataApi[0];
|
||||
|
|
@ -104,12 +103,9 @@ function addEmployee() {
|
|||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
if (idCard.value.length !== 13) {
|
||||
hideLoader();
|
||||
dialogMessageNotify($q, "กรุณากรอกเลขบัตรประชาชนให้ครบ 13 หลัก");
|
||||
} else {
|
||||
console.log("nodata");
|
||||
dialogMessageNotify($q, "กรุณากรอกเลขบัตรประชาชนให้ครบ 13 หลัก");
|
||||
hideLoader();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -183,6 +179,7 @@ function inputEdit(val: boolean) {
|
|||
ref="idCardRef"
|
||||
for="idCardRef"
|
||||
hide-bottom-space
|
||||
mask="#-####-#####-##-#"
|
||||
:rules="[(val: string) => !!val || `${'กรุณากรอกรหัสบัตรประชาชน'}`]"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue