diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 2f44fd188..f80d1d0e3 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -35,7 +35,7 @@ const { } = mixin; //ฟังก์ชันกลางที่ใช้ในหน้านี้ const router = useRouter(); -const filterRef = ref(); +const filterRef = ref(null); const filter = ref(""); const id = ref(""); @@ -241,8 +241,8 @@ const checkNull = (text: string) => text == null ? "" : text == "00000000-0000-0000-0000-000000000000" - ? "" - : text; + ? "" + : text; // คลิก icon ส่งไปออกคำสั่ง (เปิด dialog) const modaladdOrder = ref(false); // dialog ส่งไปออกคำสั่ง @@ -255,10 +255,22 @@ const clickCloseSendModal = () => { modaladdOrder.value = false; }; +const emit = defineEmits(["update:filterKeyword2", "update:selected"]); + +//รีเซ็ตค่าในช่องค้นหา +const Reset = () => { + emit("update:filterKeyword2", ""); +}; + +const updateInput = (value: any) => { + emit("update:filterKeyword2", value); +}; + const resetFilter = () => { // reset ค่าที่ค้นหาเมื่อกดปุ่ม X ในกล่องค้นหา filter.value = ""; filterRef.value!.focus(); + filterKeyword2.value = ""; }; // เพิ่มข้อมูลลูกจ้าง @@ -298,6 +310,7 @@ const deleteData = async (id: string) => { // **** เริ่มในส่วนของการเลือกตำแหน่ง ***// const rowsPosition = ref([]); // รายการข้อมูลในตารางกำหนดตำแหน่ง const filters = ref([]); +const filterKeyword2 = ref(""); const modal = ref(false); // เปิด-ปิด dialod กำหนดตำแหน่ง const selectedPosition = ref([]); // เก็บตำแหน่งที่เลือก @@ -425,10 +438,7 @@ const checkSave = () => { // เช็คข้อมูลก่อนบันทึกการกำหนดตำแหน่ง const saveData = async () => { if (selectedPosition.value.length == 0) { - dialogMessageNotify( - $q, - "ไม่สามารถบันทึกข้อมูลได้ กรุณาเลือกตำแหน่ง" - ); + dialogMessageNotify($q, "ไม่สามารถบันทึกข้อมูลได้ กรุณาเลือกตำแหน่ง"); return; } else { await savePosition(); @@ -550,7 +560,7 @@ const getPosition = async (id: string) => { }); }; -// ดึงข้อมูลตำแหน่ง (root tree) +// ดึงข้อมูลตำแหน่ง (root tree) const selected = ref([]); const nodeTree = async () => { showLoader(); @@ -577,14 +587,16 @@ const rows = ref([]); const showEmployeeTemp = async () => { showLoader(); - let cirteria = [{ - criteriaType: "employee_class", - criteriaValue: "temp", - }, - { - criteriaType: "is_retire", - criteriaValue: "false", - }]; + let cirteria = [ + { + criteriaType: "employee_class", + criteriaValue: "temp", + }, + { + criteriaType: "is_retire", + criteriaValue: "false", + }, + ]; if (selected.value == null) return; await http @@ -652,28 +664,64 @@ const showEmployeeTemp = async () => { เพิ่มข้อมูล - + ส่งรายชื่อไปออกคำสั่ง
- + - +
- + \ No newline at end of file + +