Refactoring code module 09_scholarship
This commit is contained in:
parent
e9f9690c51
commit
59393536f7
4 changed files with 39 additions and 29 deletions
|
|
@ -1,16 +1,17 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
const id = ref<string>(route.params.id.toLocaleString());
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
date2Thai,
|
||||
|
|
@ -23,14 +24,14 @@ const {
|
|||
} = mixin;
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
|
||||
const governmentDate = ref<any>(null);
|
||||
const graduatedDate = ref<any>(null);
|
||||
const isGraduated = ref<any>(null);
|
||||
const governmentDate = ref<Date | null>(null);
|
||||
const graduatedDate = ref<Date | null>(null);
|
||||
const isGraduated = ref<string | null>(null);
|
||||
const graduatedReason = ref<string>("");
|
||||
|
||||
const bookNumber = ref<string>("");
|
||||
const bookDate = ref<any>(null);
|
||||
const governmentEndDate = ref<any>(null);
|
||||
const bookDate = ref<Date | null>(null);
|
||||
const governmentEndDate = ref<Date | null>(null);
|
||||
|
||||
function close() {
|
||||
modal.value = false;
|
||||
|
|
|
|||
|
|
@ -3,4 +3,11 @@ interface DataOptions {
|
|||
name: string;
|
||||
}
|
||||
|
||||
export type { DataOptions };
|
||||
interface Scholarship {
|
||||
id: string;
|
||||
scholarshipYear: number;
|
||||
scholarshipType: string;
|
||||
fundType: string;
|
||||
}
|
||||
|
||||
export type { DataOptions,Scholarship };
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
import { onMounted, reactive, ref } from "vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import axios from "axios";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import type { DataOptions } from "@/modules/09_scholarship/interface/index/Main";
|
||||
import type {
|
||||
|
|
@ -17,12 +17,9 @@ import type {
|
|||
import DialogReturn from "@/modules/09_scholarship/components/Dialog/DialogReturn.vue";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
const isGuarantor = ref<boolean>(false);
|
||||
const isGov = ref<boolean>(false);
|
||||
const isStatus = ref<string>("");
|
||||
const fileList = ref<any[]>();
|
||||
const route = useRoute();
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
showLoader,
|
||||
|
|
@ -33,7 +30,11 @@ const {
|
|||
dialogConfirm,
|
||||
success,
|
||||
} = mixin;
|
||||
const router = useRouter();
|
||||
|
||||
const isGuarantor = ref<boolean>(false);
|
||||
const isGov = ref<boolean>(false);
|
||||
const isStatus = ref<string>("");
|
||||
const fileList = ref<any[]>();
|
||||
|
||||
const dialogReturn = ref<boolean>(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,26 +3,27 @@ import { ref, onMounted, watch } from "vue";
|
|||
import { useRouter } from "vue-router";
|
||||
import { useQuasar, type QTableProps } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type { DataOptions } from "@/modules/09_scholarship/interface/index/Main";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type {
|
||||
DataOptions,
|
||||
Scholarship,
|
||||
} from "@/modules/09_scholarship/interface/index/Main";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, showLoader, hideLoader, messageError } = mixin;
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const router = useRouter();
|
||||
|
||||
const $q = useQuasar();
|
||||
const filterKeyword = ref<string>("");
|
||||
|
||||
const profilId = ref<string>("");
|
||||
const currentPage = ref<number>(1);
|
||||
const maxPage = ref<number>(1);
|
||||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
|
||||
const rows = ref<any>();
|
||||
const rows = ref<Scholarship[]>([]);
|
||||
const year = ref<number>(0);
|
||||
const type = ref<string>("DOMESTICE");
|
||||
const scholarshipTypeOp = ref<DataOptions[]>([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue