Refactoring code module 15_development
This commit is contained in:
parent
895bfe98f2
commit
32ff7bdc96
25 changed files with 271 additions and 1440 deletions
|
|
@ -2,26 +2,25 @@
|
|||
import { ref, reactive, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import type {
|
||||
DataOption,
|
||||
DataPerson,
|
||||
PersonData
|
||||
} from "@/modules/15_development/interface/index/Main";
|
||||
import type { FormsSholarship } from "@/modules/15_development/interface/request/Scholarship";
|
||||
import type { DataSholarship } from "@/modules/15_development/interface/response/Scholarship";
|
||||
|
||||
import DialogGov from "@/modules/15_development/components/history/DialogGov.vue";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const fileBackReceived = ref<string>("");
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const checkRouteDetail = ref<boolean>(
|
||||
route.name == "developmentScholarshipidDetail"
|
||||
);
|
||||
const {
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
|
|
@ -32,12 +31,17 @@ const {
|
|||
calculateDurationYmd,
|
||||
} = useCounterMixin();
|
||||
|
||||
const title = ref<string>(route.params.id ? "แก้ไข" : "เพิ่ม");
|
||||
const checkRouteDetail = ref<boolean>(
|
||||
route.name == "developmentScholarshipidDetail"
|
||||
); // check ชือ route
|
||||
|
||||
const title = ref<string>(route.params.id ? "แก้ไข" : "เพิ่ม"); //หัวข้อหน้า
|
||||
const scholarshipId = ref<string | null>(
|
||||
route.params.id ? route.params.id.toLocaleString() : null
|
||||
);
|
||||
const isStatus = ref<string>("");
|
||||
const modalDialogGov = ref<boolean>(false);
|
||||
); // เก็บ id route.
|
||||
|
||||
const isStatus = ref<string>(""); // สถานะ
|
||||
const modalDialogGov = ref<boolean>(false); // popup เลือกข้าราชการ ฯ
|
||||
|
||||
const budgetSourceOp = ref<DataOption[]>([
|
||||
{ id: "BKK", name: "งบประมาณ กทม." },
|
||||
|
|
@ -74,10 +78,11 @@ const fundTypeOp = ref<DataOption[]>([
|
|||
{ id: "FUND5", name: "ทุนส่วนตัว" },
|
||||
]);
|
||||
|
||||
const isGov = ref<boolean>(false);
|
||||
const isGuarantor = ref<boolean>(false);
|
||||
const isSelectGov = ref<boolean>(false);
|
||||
const dataPerson = reactive({
|
||||
const isGov = ref<boolean>(false); // เก็บเช็คข้าราชการ ถ้ามี เลข ปชช. true/false
|
||||
const isGuarantor = ref<boolean>(false); // ข้อมูลผู้ค้ำประกัน มี/ไม่มี
|
||||
const isSelectGov = ref<boolean>(false); // เลือกข้าราชการ
|
||||
|
||||
const dataPerson = reactive<PersonData>({
|
||||
id: "",
|
||||
citizenId: "",
|
||||
name: "",
|
||||
|
|
@ -87,7 +92,8 @@ const dataPerson = reactive({
|
|||
positionSide: "",
|
||||
org: "-",
|
||||
});
|
||||
const dataGuarantor = reactive({
|
||||
|
||||
const dataGuarantor = reactive<PersonData>({
|
||||
id: "",
|
||||
citizenId: "",
|
||||
name: "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue