-
+
+
-
-
-
- ข้อมูลผู้ยืม
+
+
ข้อมูลผู้ยืม
-
-
+ ]"
+ label="เลขบัตรประจำตัวประชาชน"
+ maxlength="13"
+ mask="#############"
+ @keyup="searchcardid"
+ />
-
+
@@ -256,12 +303,26 @@ const closeDialog = () => {
รายละเอียดการยืมเครื่องราชฯ
-
+
-
+
{{ year + 543 }}
@@ -269,11 +330,24 @@ const closeDialog = () => {
{{ parseInt(value + 543) }}
-
+
-
+
@@ -282,20 +356,40 @@ const closeDialog = () => {
-
+
-
-
+
รายละเอียดการคืนเครื่องราชฯ
-
+
{{ year + 543 }}
@@ -303,11 +397,24 @@ const closeDialog = () => {
{{ parseInt(value + 543) }}
-
+
-
+
@@ -316,16 +423,37 @@ const closeDialog = () => {
-
+
-
+
-
@@ -333,9 +461,11 @@ const closeDialog = () => {
-
\ No newline at end of file
+
diff --git a/src/modules/07_insignia/components/5_Borrow/Main.vue b/src/modules/07_insignia/components/5_Borrow/Main.vue
index 752fd205d..27ebd4fd1 100644
--- a/src/modules/07_insignia/components/5_Borrow/Main.vue
+++ b/src/modules/07_insignia/components/5_Borrow/Main.vue
@@ -11,17 +11,9 @@ import type { OptionDataYear } from "@/modules/07_insignia/interface/index/Main"
import type { QTableProps, QInput } from "quasar";
import { useQuasar } from "quasar";
-// const router = useRouter();
const DataStore = useBrrowDataStore();
const mixin = useCounterMixin();
-const {
- date2Thai,
- dialogConfirm,
- showLoader,
- hideLoader,
- messageError,
- success,
-} = mixin;
+const { showLoader, hideLoader, messageError } = mixin;
const $q = useQuasar();
const tab = ref
("");
@@ -31,10 +23,8 @@ const selectRoundAllOption = ref([]);
const modal = ref(false);
const action = ref("");
-const personId = ref();
const profileId = ref("");
const roundYear = ref();
-const insigniaListAll = ref([]);
const insigniaList = ref([]);
onMounted(async () => {
@@ -49,35 +39,29 @@ const fecthRound = async () => {
selectRoundAllOption.value = [
{
name: "ทั้งหมด",
- id: "00000000-0000-0000-0000-000000000000",
+ id: "0",
year: 0,
},
];
-
data.map((e: any) => {
- selectRoundOption.value = [
- ...selectRoundOption.value,
- {
- name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
- id: e.id,
- year: e.year,
- },
- ];
-
- selectRoundAllOption.value = [
- ...selectRoundAllOption.value,
- {
- name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
- id: e.id,
- year: e.year,
- },
- ];
+ selectRoundOption.value.push({
+ name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
+ id: e.id,
+ year: e.year,
+ });
+ selectRoundAllOption.value.push({
+ name: "รอบการเสนอขอพระราชทานเครื่องราชปี" + " " + (e.year + 543),
+ id: e.id,
+ year: e.year,
+ });
});
+
selectRound.value = data[0].id;
+ yearRound.value = data[0].year;
roundYear.value = data[0].year;
})
.catch((err) => {
- console.log(err);
+ messageError($q, err);
});
};
@@ -85,7 +69,6 @@ const fecthInsignia = async () => {
await http
.get(config.API.insignia)
.then((res) => {
- // console.log(res);
let data = res.data.result;
DataStore.fetchDataInsignia(data);
})
@@ -102,7 +85,6 @@ const fecthInsignia = async () => {
const fecthInsigniaType = async () => {
await http(config.API.insigniaType)
.then(async (res) => {
- // console.log(res);
let data = res.data.result;
DataStore.fetchDatainsigniaType(data);
tab.value = DataStore.insigniaType[0].name;
@@ -302,9 +284,11 @@ const selectorInsignia = async () => {
: dataCopy;
};
-// const selectorRound = (round: string) => {
-// selectRound.value = round;
-// };
+const yearRound = ref();
+const selectorRound = async (round: number) => {
+ roundYear.value = round;
+ await fecthlistInsignia();
+};
const rows = ref([]);
const fecthlistInsignia = async () => {
@@ -318,7 +302,6 @@ const fecthlistInsignia = async () => {
rows.value = DataStore.rows;
})
.catch((err) => {
- console.log(err);
messageError($q, err);
})
.finally(() => {
@@ -383,12 +366,24 @@ const resetFilter = () => {
>
-
+
+
+
{
:modal="modal"
:close="close"
:close-and-fecth="closeAndFecth"
- :round-id="
- selectRound == '00000000-0000-0000-0000-000000000000'
- ? 'all'
- : selectRound
- "
+ :round-id="selectRound == '0' ? 'all' : selectRound"
:action="action"
:profile-id="profileId"
:select-round-option="selectRoundOption"
diff --git a/src/modules/07_insignia/views/ResultPage.vue b/src/modules/07_insignia/views/ResultPage.vue
index beb1e5778..7c63bfe98 100644
--- a/src/modules/07_insignia/views/ResultPage.vue
+++ b/src/modules/07_insignia/views/ResultPage.vue
@@ -1,6 +1,5 @@