fix bug ==> เครื่องราช

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-26 14:15:00 +07:00
parent d9ff26ac4a
commit 305677587c
7 changed files with 14 additions and 11 deletions

View file

@ -1384,7 +1384,7 @@ onMounted(async () => {
:outlined="true"
:hide-dropdown-icon="false"
:rules="[
(val) => !!val || `กรุณาเลือกประเภทเครื่องราช`,
(val:string) => !!val || `กรุณาเลือกประเภทเครื่องราช`,
]"
/>
</div>
@ -1396,7 +1396,7 @@ onMounted(async () => {
outlined
dense
lazy-rules
:rules="[(val) => !!val || `กรุณากรอกหมายเหตุ`]"
:rules="[(val:string) => !!val || `กรุณากรอกหมายเหตุ`]"
v-model="reason"
:label="`หมายเหตุ`"
/>

View file

@ -70,7 +70,7 @@ function backHistory() {
async function fecthlistRound() {
showLoader();
await http
.get(config.API.listRoundInsignia())
.get(config.API.listRoundInsignia(), { params: { path: "REPORT" } })
.then((res: any) => {
optionsList.value = res.data.result.map((e: ResponsePeriod) => ({
id: e.period_id,

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, useAttrs, onMounted } from "vue";
import { ref, onMounted } from "vue";
import { useQuasar } from "quasar";
import { checkPermission } from "@/utils/permissions";
@ -14,8 +14,6 @@ import type { FormProprsalsRound2 } from "@/modules/07_insignia/interface/reques
import DialogDetail from "@/modules/07_insignia/components/1_Round/DialogDetail.vue";
/** import Store*/
/** use */
const $q = useQuasar(); // noti quasar
const storeInsignia = useInsigniaDataStore();
@ -109,7 +107,7 @@ const roundId = ref<string>(""); //id ที่ต้องการ ดูร
async function fetchData() {
showLoader();
await http
.get(config.API.listRoundInsignia())
.get(config.API.listRoundInsignia(), { params: { path: "ROUND" } })
.then(async (res) => {
const data = res.data.result;
rows.value = await data.map((e: FormProprsalsRound2) => ({

View file

@ -65,7 +65,7 @@ const modalbackInsignia2Role = ref<boolean>(false); // popup หมายเห
*/
async function fecthlistRound() {
await http
.get(config.API.listRoundInsignia())
.get(config.API.listRoundInsignia(), { params: { path: "MANAGE" } })
.then(async (res) => {
optionRound.value = res.data.result.map((e: ResponsePeriod) => ({
id: e.period_id,

View file

@ -245,7 +245,7 @@ const visibleColumns = ref<String[]>([
async function fecthRound() {
showLoader();
await http
.get(config.API.noteround())
.get(config.API.noteround(), { params: { path: "RECORD" } })
.then(async (res) => {
let data = res.data.result;
if (data.length !== 0) {

View file

@ -111,7 +111,7 @@ const pagination = ref({
async function fecthRound() {
showLoader();
await http
.get(config.API.noteround())
.get(config.API.noteround(), { params: { path: "ALLOCATE" } })
.then(async (res) => {
let data = res.data.result;
if (data.length !== 0) {
@ -135,6 +135,8 @@ async function fecthRound() {
} else {
hideLoader();
}
} else {
hideLoader();
}
})
.catch((err) => {

View file

@ -267,7 +267,7 @@ const employeeClassOps = ref<any>(DataStore.employeeClassOps);
async function fecthRound() {
showLoader();
await http
.get(config.API.noteround())
.get(config.API.noteround(), { params: { path: "BORROW" } })
.then(async (res) => {
let data = res.data.result;
if (data.length !== 0) {
@ -295,11 +295,14 @@ async function fecthRound() {
filterSelectRoundOption.value = selectRoundOption.value;
yearRound.value = data[0].year;
roundYear.value = data[0].year;
if (roundYear.value) {
await fecthInsigniaType();
} else {
hideLoader();
}
} else {
hideLoader();
}
})
.catch((err) => {