เงินเดือน => ผังบัญชีค่าจ้างลูกจ้างประจำ
This commit is contained in:
parent
ff13fb1345
commit
6bf2247962
3 changed files with 41 additions and 24 deletions
|
|
@ -1,24 +1,22 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import { ref, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** importComponents*/
|
||||
import Header from "@/components/DialogHeader.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
/**use*/
|
||||
const $q = useQuasar();
|
||||
const {
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
dialogRemove,
|
||||
} = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError, success, dialogRemove } =
|
||||
useCounterMixin();
|
||||
|
||||
/**props*/
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const props = defineProps({
|
||||
id: {
|
||||
|
|
@ -32,10 +30,13 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const salaryId = ref<string>("");
|
||||
|
||||
const documentFile = ref<any>(null);
|
||||
const itemsDocument = ref<any>([]);
|
||||
|
||||
/**
|
||||
* function fetch ข้อมูลรายการ ไฟล์
|
||||
* @param id
|
||||
*/
|
||||
async function fetchDocumentFile(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -50,22 +51,12 @@ async function fetchDocumentFile(id: string) {
|
|||
});
|
||||
}
|
||||
|
||||
watch(
|
||||
() => modal.value,
|
||||
async () => {
|
||||
if (modal.value) {
|
||||
if (props.id) {
|
||||
salaryId.value = props.id;
|
||||
await fetchDocumentFile(props.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
/** function ปืด Dialog*/
|
||||
function closeDialog() {
|
||||
modal.value = !modal.value;
|
||||
}
|
||||
|
||||
/** function เรียก path อัปโหลดไฟล์*/
|
||||
async function uploadDocumentFile() {
|
||||
const fileName = documentFile.value.name.replace(/\.(xlsx|docx|pdf)$/, "");
|
||||
showLoader();
|
||||
|
|
@ -117,6 +108,10 @@ function fileUpLoad(url: string) {
|
|||
.finally(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
* function ลบข้อมูลรายการไฟล์
|
||||
* @param fileName ชื่่อไฟล์
|
||||
*/
|
||||
function onClickDeleteFile(fileName: string) {
|
||||
dialogRemove($q, async () => {
|
||||
showLoader();
|
||||
|
|
@ -139,6 +134,10 @@ function onClickDeleteFile(fileName: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function โหลดข้อมูลไฟล์
|
||||
* @param fileName ชื่่อไฟล์
|
||||
*/
|
||||
async function onClickDonwload(fileName: string) {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -182,6 +181,19 @@ async function downloadFile(url: string, type: string, fileName: string) {
|
|||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** callbackFunction ทำการ fetch ข้อมูลไฟล์เมื่อเปิด Dialog*/
|
||||
watch(
|
||||
() => modal.value,
|
||||
async () => {
|
||||
if (modal.value) {
|
||||
if (props.id) {
|
||||
salaryId.value = props.id;
|
||||
await fetchDocumentFile(props.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
|||
|
|
@ -4,21 +4,23 @@ import { useQuasar } from "quasar";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
/** importType*/
|
||||
import type {
|
||||
DataOptions,
|
||||
DataListOptions,
|
||||
} from "@/modules/13_salary/interface/index/EmployeeChart";
|
||||
|
||||
/** importComponents*/
|
||||
import Header from "@/components/DialogHeader.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const $q = useQuasar();
|
||||
const { dialogConfirm, showLoader, hideLoader, messageError, success } =
|
||||
useCounterMixin();
|
||||
|
||||
// const salaryEmployeeId = ref<string>(route.params.id.toString());
|
||||
|
||||
/** props*/
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const isEdit = defineModel<boolean>("isStatusEdit", { required: true });
|
||||
const props = defineProps({
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
/** importComponents*/
|
||||
import TabStructure from "@/modules/13_salary/components/salaryEmployeeChart/TabStructure.vue";
|
||||
import TabCriteris from "@/modules/13_salary/components/salaryEmployeeChart/TabCriteria.vue";
|
||||
|
||||
/** importStore*/
|
||||
import { useSalaryEmployeeChartDataStore } from "@/modules/13_salary/store/SalaryEmployeeChart";
|
||||
|
||||
/** use*/
|
||||
const store = useSalaryEmployeeChartDataStore();
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue