อัตรากำลังลูกจ้างประจำ ฯ => refactor code
This commit is contained in:
parent
7e2350eef8
commit
81e0a82b0e
18 changed files with 377 additions and 188 deletions
|
|
@ -4,6 +4,9 @@ import { useQuasar } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/**
|
||||
* importType
|
||||
*/
|
||||
import type { QTableProps } from "quasar";
|
||||
import type {
|
||||
OrgTree,
|
||||
|
|
@ -15,11 +18,20 @@ import type {
|
|||
} from "@/modules/16_positionEmployee/interface/request/organizational";
|
||||
import type { DataTree } from "@/modules/16_positionEmployee/interface/index/organizational";
|
||||
|
||||
/**
|
||||
* importCompoonents
|
||||
*/
|
||||
import HeaderDialog from "@/components/DialogHeader.vue";
|
||||
|
||||
/**
|
||||
* import*Store
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
const $q = useQuasar();
|
||||
const store = usePositionEmp();
|
||||
const {
|
||||
|
|
@ -31,13 +43,15 @@ const {
|
|||
success,
|
||||
} = useCounterMixin();
|
||||
|
||||
/**
|
||||
* props
|
||||
*/
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const reqMaster = defineModel<FilterMaster>("reqMaster", { required: true });
|
||||
const totalPage = defineModel<number>("totalPage", { required: true });
|
||||
const nodeTree = defineModel<OrgTree[]>("nodeTree", { required: true });
|
||||
const columns = defineModel<QTableProps[]>("columns", {});
|
||||
const rows = defineModel<PosMaster2[]>("rows", { required: true });
|
||||
|
||||
const props = defineProps({
|
||||
fetchDataTree: {
|
||||
type: Function,
|
||||
|
|
@ -66,11 +80,17 @@ const levelTree = ref<number>(0);
|
|||
const filterTable = ref<string>("");
|
||||
const selectedFilter = ref<PosMaster2[]>([]);
|
||||
|
||||
/**
|
||||
* function รีเช็ด filter
|
||||
*/
|
||||
function resetFilter() {
|
||||
filterTree.value = "";
|
||||
filterRef.value.focus();
|
||||
}
|
||||
|
||||
/**
|
||||
* function เลือกข้อมูลหน่วยงาน
|
||||
*/
|
||||
function updateSelected(data: DataTree) {
|
||||
levelTree.value = data.orgLevel;
|
||||
selectedTree.value = data.orgTreeId;
|
||||
|
|
@ -82,6 +102,9 @@ const isDisable = computed(() => {
|
|||
} else return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* function ยืนยันการย้ายแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน
|
||||
*/
|
||||
function onClickMovePos() {
|
||||
if (selectedTree.value === "" || selectedTree.value === null) {
|
||||
dialogMessageNotify($q, "กรุณาเลือกหน่วยงานที่จะย้ายไป");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue