Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-01-17 11:24:31 +07:00
commit 6bb938637b
4 changed files with 73 additions and 61 deletions

View file

@ -1,70 +1,69 @@
interface FormData {
personalId: string
prefix: string;
firstname: string;
lastname: string;
position: string;
phone: string;
email: string;
qualification: string
personalId: string;
prefix: string;
firstname: string;
lastname: string;
position: string;
phone: string;
email: string;
}
interface FormDataPost {
personalId: string
prefix: string;
firstname: string;
lastname: string;
position: string;
phone: string;
email: string;
qualification: string;
personalId: string;
prefix: string;
firstname: string;
lastname: string;
position: string;
phone: string;
email: string;
qualification: string;
}
interface FormRef {
prefix: object | null;
firstname: object | null;
lastname: object | null;
position: object | null;
// phone: object | null;
// email: object | null;
[key: string]: any;
prefix: object | null;
firstname: object | null;
lastname: object | null;
position: object | null;
// phone: object | null;
// email: object | null;
[key: string]: any;
}
interface typeOp {
id: string
name: string
id: string;
name: string;
}
interface ResponsePreson {
personId: string; //id อ้างอิง profile
idcard: string; //รหัสบัตรประชาชน
prefix: string; //คำนำหน้า
firstName: string; //ชื่อ
lastName: string; //นามสกุล
posNo: string; //เลขที่ตำแหน่ง
position: string; //ตำแหน่ง
positionLevel: string; //ระดับ
salaries: number; //เงินเดือน
organization: string; //สังกัด
email: string; //อีเมล
phone: string; //เบอร์โทรศัพท์
personId: string; //id อ้างอิง profile
idcard: string; //รหัสบัตรประชาชน
prefix: string; //คำนำหน้า
firstName: string; //ชื่อ
lastName: string; //นามสกุล
posNo: string; //เลขที่ตำแหน่ง
position: string; //ตำแหน่ง
positionLevel: string; //ระดับ
salaries: number; //เงินเดือน
organization: string; //สังกัด
email: string; //อีเมล
phone: string; //เบอร์โทรศัพท์
}
interface tableType {
personId: string;
idcard: string;
prefix: string;
firstName: string;
lastName: string;
position: string;
positionLevel: string;
organization: string;
salary: string;
name: string;
personId: string;
idcard: string;
prefix: string;
firstName: string;
lastName: string;
position: string;
positionLevel: string;
organization: string;
salary: string;
name: string;
}
export type {
FormData,
FormRef,
FormDataPost,
typeOp,
ResponsePreson,
tableType
};
FormData,
FormRef,
FormDataPost,
typeOp,
ResponsePreson,
tableType,
};

View file

@ -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
/>
</div>
<div class="col-3">
@ -221,6 +229,7 @@ function inputEdit(val: boolean) {
for="firstnameRef"
hide-bottom-space
:rules="[(val: string) => val !== null && val !== '' || `${'กรุณากรอกชื่อ'}`]"
lazy-rules
/>
</div>
<div class="col-3">
@ -234,6 +243,7 @@ function inputEdit(val: boolean) {
for="lastnameRef"
hide-bottom-space
:rules="[(val: string) => !!val || `${'กรุณากรอกนามสกุล'}`]"
lazy-rules
/>
</div>
<div class="col-3">
@ -247,6 +257,7 @@ function inputEdit(val: boolean) {
for="positionRef"
hide-bottom-space
:rules="[(val: string) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
lazy-rules
/>
</div>
<div class="col-3">
@ -261,7 +272,6 @@ function inputEdit(val: boolean) {
type="tel"
mask="##########"
hide-bottom-space
:rules="[(val: string) => !!val || `${'กรุณากรอกเบอร์โทร'}`]"
/>
</div>
<div class="col-3">
@ -274,7 +284,6 @@ function inputEdit(val: boolean) {
ref="emailRef"
hide-bottom-space
for="emailRef"
:rules="[(val: string) => !!val || `${'กรุณากรอกอีเมล'}`]"
/>
</div>
</div>
@ -287,7 +296,7 @@ function inputEdit(val: boolean) {
id="formSubmit"
color="secondary"
label="บันทึก"
type="submit"
@click.stop="onValidate"
><q-tooltip>บทกขอม</q-tooltip></q-btn
>
</div>

View file

@ -338,7 +338,7 @@ onMounted(() => {
ref="titleRef"
for="titleRef"
hide-bottom-space
:rules="[(val: string) => !!val || `${'กรุณากรอกชื่อการประชุม'}`]"
:rules="[(val: string) => !!val || `${'กรุณากรอกหัวข้อการประชุม'}`]"
/>
</div>
<div class="col-12">

View file

@ -289,6 +289,10 @@ onMounted(async () => {
<div v-if="col.name == 'no'">
{{ (page - 1) * pageSize + props.rowIndex + 1 }}
</div>
<div v-else-if="col.name === 'agency'">
<div class="table_ellipsis">{{ props.row.agency }}</div>
</div>
<div v-else>
{{ col.value }}
</div>