Merge branch 'develop' into devTee
This commit is contained in:
commit
e0b3f385a9
7 changed files with 27 additions and 98 deletions
|
|
@ -26,11 +26,11 @@ const formData = reactive<changeRoundEdit>({
|
||||||
const roundOp = ref([
|
const roundOp = ref([
|
||||||
{
|
{
|
||||||
id: "1",
|
id: "1",
|
||||||
name: "รอบ 1",
|
name: "08:30 - 17:00",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "2",
|
id: "2",
|
||||||
name: "รอบ 2",
|
name: "08:00 - 16:30",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
const objectRoundChange: MyObjectRoundChangeRef = {
|
const objectRoundChange: MyObjectRoundChangeRef = {
|
||||||
|
|
@ -94,19 +94,16 @@ watch(
|
||||||
<q-card style="min-width: 800px">
|
<q-card style="min-width: 800px">
|
||||||
<form @submit.prevent="validateForm">
|
<form @submit.prevent="validateForm">
|
||||||
<q-toolbar>
|
<q-toolbar>
|
||||||
<q-toolbar-title
|
<q-toolbar-title class="text-subtitle1 text-bold">
|
||||||
v-if="props.editCheck === 'edit'"
|
{{
|
||||||
class="text-subtitle1 text-bold"
|
props.editCheck === "edit"
|
||||||
>เปลี่ยนรอบการลาของ
|
? "เปลี่ยนรอบการปฏิบัติงาน"
|
||||||
|
: "ประวัติการเปลี่ยนรอบการปฏิบัติงาน"
|
||||||
|
}}
|
||||||
<span class="text-teal-6">{{
|
<span class="text-teal-6">{{
|
||||||
props.DataRow ? props.DataRow.fullName : ""
|
props.DataRow ? props.DataRow.fullName : ""
|
||||||
}}</span></q-toolbar-title
|
}}</span></q-toolbar-title
|
||||||
>
|
>
|
||||||
<q-toolbar-title
|
|
||||||
v-if="props.editCheck === 'history'"
|
|
||||||
class="text-subtitle1 text-bold"
|
|
||||||
>ประวัติการเปลี่ยนรอบการลงเวลา
|
|
||||||
</q-toolbar-title>
|
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="close"
|
icon="close"
|
||||||
unelevated
|
unelevated
|
||||||
|
|
@ -176,7 +173,7 @@ watch(
|
||||||
ref="effectiveDateRef"
|
ref="effectiveDateRef"
|
||||||
dense
|
dense
|
||||||
style="width: 23.5rem"
|
style="width: 23.5rem"
|
||||||
class="datepicker "
|
class="datepicker"
|
||||||
:model-value="
|
:model-value="
|
||||||
formData.effectiveDate != null
|
formData.effectiveDate != null
|
||||||
? date2Thai(formData.effectiveDate)
|
? date2Thai(formData.effectiveDate)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import Modal from "@/modules/05_placement/components/AppointEmployee/Modal.vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, date2Thai ,dialogMessageNotify} = mixin;
|
const { dialogConfirm, date2Thai, dialogMessageNotify } = mixin;
|
||||||
const dataStore = useChangeRoundDataStore();
|
const dataStore = useChangeRoundDataStore();
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const editCheck = ref<string>("");
|
const editCheck = ref<string>("");
|
||||||
|
|
@ -25,50 +25,16 @@ function Openmodal(check: string, detail: any) {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
editCheck.value = check;
|
editCheck.value = check;
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
}
|
}
|
||||||
async function searchcardid(type:string) {
|
|
||||||
// if (type === "card") {
|
function searchData() {
|
||||||
// // const data = await dataStore.dataList.find(
|
if (formData.cardId || formData.firstName || formData.lastName) {
|
||||||
// // (e) => e.cardId === formData.cardId
|
dataStore.fetchDataForCardId(formData, "click");
|
||||||
// // );
|
} else {
|
||||||
// // if (data) {
|
dialogMessageNotify($q, "กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง");
|
||||||
// // formData.firstName = data.firstName;
|
|
||||||
// // formData.lastName = data.lastName;
|
|
||||||
// // } else if (!data) {
|
|
||||||
// formData.firstName = "";
|
|
||||||
// formData.lastName = "";
|
|
||||||
// // }
|
|
||||||
// } else if (type === "firstName") {
|
|
||||||
// // const data = await dataStore.dataList.find(
|
|
||||||
// // (e) => e.firstName === formData.firstName
|
|
||||||
// // );
|
|
||||||
// // if (data) {
|
|
||||||
// // formData.cardId = data.cardId;
|
|
||||||
// // formData.lastName = data.lastName;
|
|
||||||
// // } else if (!data) {
|
|
||||||
// formData.cardId = "";
|
|
||||||
// formData.lastName = "";
|
|
||||||
// // }
|
|
||||||
// } else if (type === "lastName") {
|
|
||||||
// // const data = await dataStore.dataList.find(
|
|
||||||
// // (e) => e.lastName === formData.lastName
|
|
||||||
// // );
|
|
||||||
// // if (data) {
|
|
||||||
// // formData.firstName = data.firstName;
|
|
||||||
// // formData.cardId = data.cardId;
|
|
||||||
// // } else if (!data) {
|
|
||||||
// formData.firstName = "";
|
|
||||||
// formData.cardId = "";
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
function searchData(){
|
|
||||||
if(formData.cardId||formData.firstName||formData.lastName){
|
|
||||||
dataStore.fetchDataForCardId(formData, 'click')
|
|
||||||
}else{
|
|
||||||
dialogMessageNotify($q,'กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
@ -105,29 +71,26 @@ onMounted(() => {
|
||||||
v-model="formData.cardId"
|
v-model="formData.cardId"
|
||||||
outlined
|
outlined
|
||||||
label="เลขบัตรประชาชน"
|
label="เลขบัตรประชาชน"
|
||||||
class=" col-6 col-md-4 inputgreen"
|
class="col-6 col-md-4 inputgreen"
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
maxlength="13"
|
maxlength="13"
|
||||||
@keyup="searchcardid('card')"
|
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
v-model="formData.firstName"
|
v-model="formData.firstName"
|
||||||
outlined
|
outlined
|
||||||
label="ชื่อ"
|
label="ชื่อ"
|
||||||
class=" col-5 col-md-3 inputgreen"
|
class="col-5 col-md-3 inputgreen"
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
@keyup="searchcardid('firstName')"
|
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
v-model="formData.lastName"
|
v-model="formData.lastName"
|
||||||
outlined
|
outlined
|
||||||
label="นามสกุล"
|
label="นามสกุล"
|
||||||
class=" col-6 col-md-3 inputgreen"
|
class="col-6 col-md-3 inputgreen"
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
@keyup="searchcardid('lastName')"
|
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
@click="searchData"
|
@click="searchData"
|
||||||
|
|
@ -136,7 +99,8 @@ onMounted(() => {
|
||||||
unelevated
|
unelevated
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-px-sm col-5 col-md-1"
|
class="q-px-sm col-5 col-md-1"
|
||||||
style="max-height: 40px;">ค้นหา</q-btn
|
style="max-height: 40px"
|
||||||
|
>ค้นหา</q-btn
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ const formData = reactive<FormData>({
|
||||||
lastname: "",
|
lastname: "",
|
||||||
position: "",
|
position: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
responsibilities: "",
|
|
||||||
email: "",
|
email: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -39,7 +38,6 @@ watch(props.data, async () => {
|
||||||
formData.lastname = props.data.lastname;
|
formData.lastname = props.data.lastname;
|
||||||
formData.position = props.data.position;
|
formData.position = props.data.position;
|
||||||
formData.phone = props.data.phone;
|
formData.phone = props.data.phone;
|
||||||
formData.responsibilities = props.data.responsibilities;
|
|
||||||
formData.email = props.data.email;
|
formData.email = props.data.email;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -56,7 +54,6 @@ const firstnameRef = ref<object | null>(null);
|
||||||
const lastnameRef = ref<object | null>(null);
|
const lastnameRef = ref<object | null>(null);
|
||||||
const positionRef = ref<object | null>(null);
|
const positionRef = ref<object | null>(null);
|
||||||
const phoneRef = ref<object | null>(null);
|
const phoneRef = ref<object | null>(null);
|
||||||
const responsibilitiesRef = ref<object | null>(null);
|
|
||||||
const emailRef = ref<object | null>(null);
|
const emailRef = ref<object | null>(null);
|
||||||
const formRef: FormRef = {
|
const formRef: FormRef = {
|
||||||
prefix: prefixRef,
|
prefix: prefixRef,
|
||||||
|
|
@ -64,7 +61,6 @@ const formRef: FormRef = {
|
||||||
lastname: lastnameRef,
|
lastname: lastnameRef,
|
||||||
position: positionRef,
|
position: positionRef,
|
||||||
phone: phoneRef,
|
phone: phoneRef,
|
||||||
responsibilities: responsibilitiesRef,
|
|
||||||
email: emailRef,
|
email: emailRef,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -172,17 +168,6 @@ function onValidate() {
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอกเบอร์โทร'}`]"
|
:rules="[(val: string) => !!val || `${'กรุณากรอกเบอร์โทร'}`]"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
|
||||||
<q-input
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
v-model="formData.responsibilities"
|
|
||||||
label="หน้าที่"
|
|
||||||
ref="responsibilitiesRef"
|
|
||||||
for="responsibilitiesRef"
|
|
||||||
:rules="[(val: string) => !!val || `${'กรุณากรอกหน้าที่'}`]"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-input
|
<q-input
|
||||||
dense
|
dense
|
||||||
|
|
@ -200,15 +185,13 @@ function onValidate() {
|
||||||
<div class="row col-12 q-pa-sm">
|
<div class="row col-12 q-pa-sm">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
<q-btn
|
||||||
type="submit"
|
for="ButtonOnSubmit"
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="public"
|
|
||||||
icon="mdi-content-save-outline"
|
|
||||||
id="formSubmit"
|
id="formSubmit"
|
||||||
|
color="secondary"
|
||||||
|
label="บันทึก"
|
||||||
|
type="submit"
|
||||||
|
><q-tooltip>บับทึกข้อมูล</q-tooltip></q-btn
|
||||||
>
|
>
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,12 @@ onMounted(() => {
|
||||||
{
|
{
|
||||||
name: "นางเกสินี เจียรสุมัย",
|
name: "นางเกสินี เจียรสุมัย",
|
||||||
position: "ครู",
|
position: "ครู",
|
||||||
responsibilities: "ประธาน",
|
|
||||||
email: "e@email.com",
|
email: "e@email.com",
|
||||||
phone: "0800808080",
|
phone: "0800808080",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "นายสรวิชญ์ พลสิทธิ์",
|
name: "นายสรวิชญ์ พลสิทธิ์",
|
||||||
position: "ทดลองงาน",
|
position: "ทดลองงาน",
|
||||||
responsibilities: "เลขานุการ",
|
|
||||||
email: "g@gmail.com",
|
email: "g@gmail.com",
|
||||||
phone: "0614565145",
|
phone: "0614565145",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ interface FormData {
|
||||||
lastname: string;
|
lastname: string;
|
||||||
position: string;
|
position: string;
|
||||||
phone: string;
|
phone: string;
|
||||||
responsibilities: string;
|
|
||||||
email: string;
|
email: string;
|
||||||
}
|
}
|
||||||
interface FormRef {
|
interface FormRef {
|
||||||
|
|
@ -13,7 +12,6 @@ interface FormRef {
|
||||||
lastname: object | null;
|
lastname: object | null;
|
||||||
position: object | null;
|
position: object | null;
|
||||||
phone: object | null;
|
phone: object | null;
|
||||||
responsibilities: object | null;
|
|
||||||
email: object | null;
|
email: object | null;
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
interface DirectorRows {
|
interface DirectorRows {
|
||||||
name: string;
|
name: string;
|
||||||
position: string;
|
position: string;
|
||||||
responsibilities: string;
|
|
||||||
email: string;
|
email: string;
|
||||||
phone: string;
|
phone: string;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ export const useDisciplineDirectorDataStore = defineStore(
|
||||||
"no",
|
"no",
|
||||||
"name",
|
"name",
|
||||||
"position",
|
"position",
|
||||||
"responsibilities",
|
|
||||||
"email",
|
"email",
|
||||||
"phone",
|
"phone",
|
||||||
]);
|
]);
|
||||||
|
|
@ -46,15 +45,6 @@ export const useDisciplineDirectorDataStore = defineStore(
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "responsibilities",
|
|
||||||
align: "left",
|
|
||||||
label: "หน้าที่",
|
|
||||||
sortable: true,
|
|
||||||
field: "responsibilities",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "email",
|
name: "email",
|
||||||
align: "left",
|
align: "left",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue