Refactoring code module 08_registryEmployee
This commit is contained in:
parent
bd33093d3e
commit
7091eaaeb9
31 changed files with 169 additions and 24405 deletions
|
|
@ -1,8 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch, reactive } from "vue";
|
||||
import { ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRegistryEmp } from "@/modules/08_registryEmployee/stores/registry-employee";
|
||||
|
||||
/** importType*/
|
||||
import type { QTableProps } from "quasar";
|
||||
|
|
@ -11,10 +14,6 @@ import type { DataEmployee } from "@/modules/08_registryEmployee/interface/respo
|
|||
/** importComponents*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/** inportStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRegistryEmp } from "@/modules/08_registryEmployee/stores/registry-employee";
|
||||
|
||||
const $q = useQuasar();
|
||||
const {
|
||||
success,
|
||||
|
|
@ -36,9 +35,9 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const filter = ref<string>("");
|
||||
const rows = ref<DataEmployee[]>([]);
|
||||
const selected = ref<DataEmployee[]>([]);
|
||||
const filter = ref<string>(""); //ค้นหารายชื่อไปออกคำสั่ง
|
||||
const rows = ref<DataEmployee[]>([]); //รายชื่อไปออกคำสั่ง
|
||||
const selected = ref<DataEmployee[]>([]); //รายชื่อที่เลือกไปออกคำสั่ง
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -165,6 +164,9 @@ const visibleColumns = ref<String[]>([
|
|||
"statustext",
|
||||
]);
|
||||
|
||||
/**
|
||||
* ฟังก์ชันยืนยันการส่งออกคำสั่ง
|
||||
*/
|
||||
function onClickSendOrder() {
|
||||
if (selected.value.length == 0) {
|
||||
dialogMessageNotify($q, "กรุณาเลือกคนออกคำสั่ง");
|
||||
|
|
@ -200,6 +202,9 @@ function onClickSendOrder() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันดึงข้อมูลราชชื่อส่งออกคำสั่ง
|
||||
*/
|
||||
function fetchList() {
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -215,11 +220,19 @@ function fetchList() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชันปิด Popup
|
||||
*/
|
||||
function closeDialog() {
|
||||
modal.value = false;
|
||||
selected.value = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* ทำเมื่อ modal เป็น true
|
||||
*
|
||||
* ทำการเรียก fetchList เพื่อข้อมูลราชชื่อส่งออกคำสั่ง
|
||||
*/
|
||||
watch(
|
||||
() => modal.value,
|
||||
() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue