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