Merge branch 'develop' into working / ปรับ ui เกษียณ

This commit is contained in:
Tanyalak 2023-07-27 18:14:09 +07:00
commit fef791f4b8
81 changed files with 20864 additions and 2272 deletions

View file

@ -468,6 +468,7 @@ const saveData = async () => {
messageError($q, e);
})
.finally(async () => {
modal.value = false;
await fetchData();
});
};
@ -493,6 +494,7 @@ const editData = async () => {
messageError($q, e);
})
.finally(async () => {
modal.value = false;
await fetchData();
});
};

View file

@ -497,6 +497,7 @@ const saveData = async () => {
messageError($q, e);
})
.finally(async () => {
modal.value = false;
await fetchData();
});
};

View file

@ -58,6 +58,17 @@
</q-list>
</q-menu>
</q-btn>
<q-btn
size="md"
icon="mdi-content-save-move-outline"
round
flat
color="indigo"
v-if="statusPayment && setSeat == true"
@click="candidateToPlacement"
>
<q-tooltip>บรรจานการคดเลอก</q-tooltip>
</q-btn>
<q-space />
<div class="items-center" style="display: flex">
<!-- นหาขอความใน table -->
@ -137,7 +148,7 @@
</template>
<script setup lang="ts">
import { ref, useAttrs } from "vue";
import { useRoute } from "vue-router";
import { useRoute, useRouter } from "vue-router";
import { useDataStore } from "@/stores/data";
import { useCounterMixin } from "@/stores/mixin";
import http from "@/plugins/http";
@ -145,6 +156,7 @@ import config from "@/app.config";
import { useQuasar } from "quasar";
const route = useRoute();
const router = useRouter();
const dataStore = useDataStore();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
@ -277,6 +289,34 @@ const uploadFile = async () => {
}
};
const candidateToPlacement = async () => {
$q.dialog({
title: "ยืนยันการนำผู้ผ่านคัดเลือกเข้าสู่ระบบบรรจุ",
message: "ต้องการนำผู้ผ่านคัดเลือกเข้าสู่ระบบบรรจุใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
})
.onOk(async () => {
await http
.get(config.API.periodExamToPlacement(examId.value))
.then((res) => {
success($q, "นำผู้ผ่านคัดเลือกเข้าสู่ระบบบรรจุ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
router.go(-1);
});
})
.onCancel(() => {})
.onDismiss(() => {});
};
const uploadDataSeat = async () => {
loaderPage(true);
const formData = new FormData();

View file

@ -13,6 +13,17 @@
/>
รายชอผสมครสอบแขงข {{ name }} ครงท {{ round }}/{{ year }}
<q-space />
<q-btn
size="md"
icon="mdi-content-save-move-outline"
round
flat
color="indigo"
v-if="rows.length > 0"
@click="candidateToPlacement"
>
<q-tooltip>บรรจานการคดเลอกผการ</q-tooltip>
</q-btn>
<q-btn class="bg-teal-1" icon="mdi-download" round color="primary" flat>
<q-tooltip>ดาวนโหลดไฟล</q-tooltip>
<q-menu>
@ -122,7 +133,7 @@ const router = useRouter();
const route = useRoute();
const { loaderPage } = dataStore;
const mixin = useCounterMixin();
const { messageError } = mixin;
const { messageError, success } = mixin;
const year = ref<string>("");
const round = ref<string>("");
const name = ref<string>("");
@ -440,10 +451,12 @@ const fetchData = async () => {
notpass.value = header.notpass;
// period information
name.value = period.name;
round.value = period.order as string;
year.value =
period.year >= 2500 ? period.year : ((period.year + 543) as string);
if (period != null) {
name.value = period.name;
round.value = period.order;
year.value =
period.year >= 2500 ? period.year : ((period.year + 543) as string);
}
const data = res.data.result.data;
if (data.length > 0) {
@ -464,6 +477,35 @@ const fetchData = async () => {
loaderPage(false);
});
};
const candidateToPlacement = async () => {
$q.dialog({
title: "ยืนยันการนำผู้ผ่านสอบแข่งขันเข้าสู่ระบบบรรจุ",
message: "ต้องการนำผู้ผ่านสอบแข่งขันเข้าสู่ระบบบรรจุใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
})
.onOk(async () => {
loaderPage(true);
await http
.get(config.API.periodRecruitToPlacement(importId.value))
.then((res) => {
success($q, "นำผู้ผ่านสอบแข่งขันเข้าสู่ระบบบรรจุ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
router.go(-1);
});
})
.onCancel(() => {})
.onDismiss(() => {});
};
</script>
<style></style>

View file

@ -13,6 +13,17 @@
/>
รายชอผสมครสอบรอบ {{ name }} ครงท {{ round }}/{{ year }}
<q-space />
<q-btn
size="md"
icon="mdi-content-save-move-outline"
round
flat
color="indigo"
v-if="rows.length > 0"
@click="candidateToPlacement"
>
<q-tooltip>บรรจานการคดเลอกผการ</q-tooltip>
</q-btn>
<q-btn class="bg-teal-1" icon="mdi-download" round color="primary" flat>
<q-tooltip>ดาวนโหลดไฟล</q-tooltip>
<q-menu>
@ -129,7 +140,7 @@ const pass = ref<number>(0);
const notpass = ref<number>(0);
const importId = ref<string>(route.params.id as string); // Period Import Id
const mixin = useCounterMixin();
const { messageError } = mixin;
const { messageError, success } = mixin;
const filter = ref<string>(""); //search data table
const visibleColumns = ref<String[]>([
"examID",
@ -419,6 +430,35 @@ const fetchData = async () => {
loaderPage(false);
});
};
const candidateToPlacement = async () => {
$q.dialog({
title: "ยืนยันการนำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ",
message: "ต้องการนำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
})
.onOk(async () => {
loaderPage(true);
await http
.get(config.API.periodDisableToPlacement(importId.value))
.then((res) => {
success($q, "นำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
loaderPage(false);
router.go(-1);
});
})
.onCancel(() => {})
.onDismiss(() => {});
};
</script>
<style></style>

View file

@ -456,7 +456,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "registerDate",
align: "left",
label: "วันและเวลาที่สมัคร",
label: "วันและเวลาที่สมัคร",
sortable: true,
field: "registerDate",
headerStyle: "font-size: 14px; min-width: 200px",
@ -515,7 +515,7 @@ const fetchData = async () => {
avatar: r.profileImg != null ? r.profileImg.detail : "",
citizenId: r.citizenId,
number: r.number,
registerDate: r.registerDate,
registerDate: date2Thai(r.registerDate),
examIdenNumber: r.examIdenNumber,
seatNumber: r.seatNumber,
resultC: r.resultC,