Merge branch 'develop' into dev-tee
This commit is contained in:
commit
b4869280da
6 changed files with 367 additions and 81 deletions
|
|
@ -26,7 +26,7 @@ export default {
|
|||
insigniaDashboard: (insigniaPeriodId: string) => `${insignia}/request/dashboard/${insigniaPeriodId}`,
|
||||
// record
|
||||
noteround: () => `${insignia}/request/note`,
|
||||
requestDocNote: (id:string) => `${insignia}/request/note/doc/${id}`,
|
||||
requestDocNote: (id: string) => `${insignia}/request/note/doc/${id}`,
|
||||
noteSearch: () => `${insignia}/request/note/search`,
|
||||
noteAdd: (insigniaId: string) => `${insignia}/request/note/${insigniaId}`,
|
||||
noteByid: (id: string) => `${insignia}/request/note/${id}`,
|
||||
|
|
@ -35,4 +35,9 @@ export default {
|
|||
insigniaSendToDirector: (roundId: string, ocId: string) => `${insignia}/request/officer/approve/${roundId}/${ocId}`,
|
||||
insigniaDirectorBackToEdit: (roundId: string, ocId: string) => `${insignia}/request/director/reject/${roundId}/${ocId}`,
|
||||
insigniaDirectorApproved: (roundId: string, ocId: string) => `${insignia}/request/director/approve/${roundId}/${ocId}`,
|
||||
|
||||
// uploadfile
|
||||
uploadfilereceice: (noteId: string) => `${insignia}/request/import/receice/${noteId}`,
|
||||
uploadfileinvoice: (noteId: string) => `${insignia}/request/import/invoice/${noteId}`,
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const router = useRouter();
|
||||
import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||
|
||||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
const {
|
||||
dialogRemove,
|
||||
|
|
@ -23,8 +24,11 @@ const $q = useQuasar();
|
|||
const DataStore = useInsigniaDataStore();
|
||||
|
||||
const modalNote = ref<boolean>(false);
|
||||
const modelPopupReject = ref<boolean>(false);
|
||||
const modelPopupDelete = ref<boolean>(false);
|
||||
const modalAdd = ref<boolean>(false);
|
||||
const modalEdit = ref<boolean>(false);
|
||||
const rowid = ref<string>("");
|
||||
const organization = ref<string>("");
|
||||
const organizationOptions = ref<any>([{ id: "1", name: "ทั้งหมด" }]);
|
||||
const visibleColumns = ref<string[]>([
|
||||
|
|
@ -197,7 +201,9 @@ onMounted(async () => {
|
|||
// // organization.value = DataStore.optionsTypeOc[2].id;
|
||||
// DataStore.typeOc = organization.value;
|
||||
// } else organization.value = DataStore.typeOc;
|
||||
organization.value = await (DataStore.agency != null ? DataStore.agency : DataStore.typeOc);
|
||||
organization.value = await (DataStore.agency != null
|
||||
? DataStore.agency
|
||||
: DataStore.typeOc);
|
||||
organizationOptions.value = await DataStore.optionsTypeOc;
|
||||
if (organization.value !== "" || organization.value !== undefined) {
|
||||
if (props.fecthInsigniaByOc) {
|
||||
|
|
@ -372,20 +378,27 @@ const listEdit = async (profileId: string) => {
|
|||
});
|
||||
};
|
||||
|
||||
const clickReject = (profileId: string) => {
|
||||
const clickReject = (id: string) => {
|
||||
modelPopupReject.value = true;
|
||||
rowid.value = id;
|
||||
};
|
||||
const savaReasonReject = (reason: string) => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await listreject(profileId);
|
||||
await listreject(rowid.value, reason);
|
||||
},
|
||||
"ยืนยันการย้ายข้อมูล",
|
||||
"ต้องการยืนยันการย้ายข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
const closemodelPopupReject = () => {
|
||||
modelPopupReject.value = false;
|
||||
};
|
||||
|
||||
const listreject = async (profileId: string) => {
|
||||
const listreject = async (profileId: string, reason: string) => {
|
||||
await http
|
||||
.get(config.API.insigniaReject(profileId))
|
||||
.put(config.API.insigniaReject(profileId), { reason: reason })
|
||||
.then(() => {
|
||||
success($q, "ย้ายข้อมูลสำเร็จ");
|
||||
})
|
||||
|
|
@ -401,23 +414,31 @@ const listreject = async (profileId: string) => {
|
|||
props.tab
|
||||
);
|
||||
}
|
||||
await closemodelPopupReject();
|
||||
});
|
||||
};
|
||||
|
||||
const clickDelete = (profileId: string) => {
|
||||
dialogRemove(
|
||||
const clickDelete = (id: string) => {
|
||||
modelPopupDelete.value = true;
|
||||
rowid.value = id;
|
||||
};
|
||||
const closemodelPopupDelete = () => {
|
||||
modelPopupDelete.value = false;
|
||||
};
|
||||
const savaReasonDelete = (reason: string) => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
await listdelete(profileId);
|
||||
await listdelete(rowid.value, reason);
|
||||
},
|
||||
"ยืนยันการลบออกข้ออมูล",
|
||||
"ต้องการยืนยันการลบข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
};
|
||||
|
||||
const listdelete = async (profileId: string) => {
|
||||
const listdelete = async (id: string, reason: string) => {
|
||||
await http
|
||||
.get(config.API.insigniaDelete(profileId))
|
||||
.put(config.API.insigniaDelete(id), { reason: reason })
|
||||
.then(() => {
|
||||
success($q, "ลบข้อมูลสำเร็จ");
|
||||
})
|
||||
|
|
@ -433,6 +454,7 @@ const listdelete = async (profileId: string) => {
|
|||
props.tab
|
||||
);
|
||||
}
|
||||
await closemodelPopupDelete();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -500,40 +522,113 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
<div class="row col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<!-- {{ DataStore.typeinsigniaOptions }} -->
|
||||
<q-select v-if="props.roleUser == 'admin'" v-model="organization" label="หน่วยงาน" dense emit-value map-options
|
||||
:options="organizationOptions" option-value="id" option-label="name" lazy-rules hide-bottom-space
|
||||
:readonly="false" :borderless="false" :outlined="true" :hide-dropdown-icon="false" style="min-width: 150px"
|
||||
@update:model-value="changtypeOc" />
|
||||
<q-select v-model="DataStore.typeinsignia" label="ปรเภทเครื่องราชฯ" dense emit-value map-options
|
||||
:options="DataStore.typeinsigniaOptions" option-value="id" option-label="name" lazy-rules hide-bottom-space
|
||||
:readonly="false" :borderless="false" :outlined="true" :hide-dropdown-icon="false" style="min-width: 150px"
|
||||
@update:model-value="DataStore.searchFilterTable" />
|
||||
<q-select
|
||||
v-if="props.roleUser == 'admin'"
|
||||
v-model="organization"
|
||||
label="หน่วยงาน"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="organizationOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="changtypeOc"
|
||||
/>
|
||||
<q-select
|
||||
v-model="DataStore.typeinsignia"
|
||||
label="ปรเภทเครื่องราชฯ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="DataStore.typeinsigniaOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
@update:model-value="DataStore.searchFilterTable"
|
||||
/>
|
||||
<div>
|
||||
<q-btn size="md" icon="mdi-download" flat round color="primary">
|
||||
<q-tooltip>ดาวน์โหลด</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn size="12px" flat round color="add" icon="mdi-plus" @click="clickmodalAdd">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
icon="mdi-plus"
|
||||
@click="clickmodalAdd"
|
||||
>
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-space />
|
||||
|
||||
<q-input class="col-xs-12 col-sm-3 col-md-2" standout dense v-model="filterKeyword" ref="filterRef" outlined
|
||||
debounce="300" placeholder="ค้นหา">
|
||||
<q-input
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
standout
|
||||
dense
|
||||
v-model="filterKeyword"
|
||||
ref="filterRef"
|
||||
outlined
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon v-if="filterKeyword !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-select v-model="visibleColumns" multiple outlined dense options-dense :display-value="$q.lang.table.columns"
|
||||
emit-value map-options :options="columns" option-value="name" options-cover style="min-width: 150px"
|
||||
class="col-xs-12 col-sm-3 col-md-2" />
|
||||
<q-select
|
||||
v-model="visibleColumns"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columns"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 q-pt-sm">
|
||||
<q-table ref="table" :columns="columns" :rows="DataStore.rows" :filter="filterKeyword" row-key="name" flat
|
||||
bordered :paging="true" dense class="custom-header-table" :visible-columns="visibleColumns"
|
||||
:pagination-label="paginationLabel" v-model:pagination="pagination">
|
||||
<q-table
|
||||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="DataStore.rows"
|
||||
:filter="filterKeyword"
|
||||
row-key="name"
|
||||
flat
|
||||
bordered
|
||||
:paging="true"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:visible-columns="visibleColumns"
|
||||
:pagination-label="paginationLabel"
|
||||
v-model:pagination="pagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
|
|
@ -543,7 +638,11 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer" @click.stop="nextPage(props.row.profileId)">
|
||||
<q-tr
|
||||
:props="props"
|
||||
class="cursor-pointer"
|
||||
@click.stop="nextPage(props.row.profileId)"
|
||||
>
|
||||
<q-td key="no" :props="props">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</q-td>
|
||||
|
|
@ -575,25 +674,63 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
{{ props.row.dateSend }}
|
||||
</q-td>
|
||||
<q-td auto-width>
|
||||
<q-btn icon="mdi-dots-vertical" size="12px" color="grey-7" flat round dense @click.stop>
|
||||
<q-btn
|
||||
icon="mdi-dots-vertical"
|
||||
size="12px"
|
||||
color="grey-7"
|
||||
flat
|
||||
round
|
||||
dense
|
||||
@click.stop
|
||||
>
|
||||
<q-menu transition-show="jump-down" transition-hide="jump-up">
|
||||
<q-list dense style="min-width: 250px">
|
||||
<q-item clickable v-close-popup @click.stop="clickmodalEdit(props.row)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="clickmodalEdit(props.row)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-tooltip>แก้ไขเครื่องราชฯ ที่ยื่นขอ</q-tooltip>
|
||||
<q-icon color="primary" size="xs" name="mdi-pencil" />
|
||||
</q-item-section>
|
||||
<q-item-section>แก้ไขเครื่องราชฯ ที่ยื่นขอ</q-item-section>
|
||||
<q-item-section
|
||||
>แก้ไขเครื่องราชฯ ที่ยื่นขอ</q-item-section
|
||||
>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click.stop="clickReject(props.row.profileId)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="clickReject(props.row.id)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-tooltip>ไม่ยื่นขอ</q-tooltip>
|
||||
<q-icon color="blue" size="xs" name="mdi-alert-circle-outline" />
|
||||
<q-icon
|
||||
color="blue"
|
||||
size="xs"
|
||||
name="mdi-alert-circle-outline"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>ไม่ยื่นขอ</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-close-popup @click.stop="clickDelete(props.row.profileId)">
|
||||
<q-item-section style="min-width: 0px" avatar class="q-py-sm">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="clickDelete(props.row.id)"
|
||||
>
|
||||
<q-item-section
|
||||
style="min-width: 0px"
|
||||
avatar
|
||||
class="q-py-sm"
|
||||
>
|
||||
<q-tooltip>ลบออก</q-tooltip>
|
||||
<q-icon color="red" size="xs" name="mdi-delete" />
|
||||
</q-item-section>
|
||||
|
|
@ -606,11 +743,18 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination v-model="pagination.page" active-color="primary" color="primary" :max="scope.pagesNumber"
|
||||
:max-pages="5" size="sm" boundary-links direction-links></q-pagination>
|
||||
<q-pagination
|
||||
v-model="pagination.page"
|
||||
active-color="primary"
|
||||
color="primary"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -620,21 +764,44 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
<q-card style="width: 850px; max-width: 80vw" class="q-pb-md">
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="text-h6">เพิ่มรายชื่อ </q-toolbar-title>
|
||||
<q-btn icon="close" unelevated round dense @click="modalAdd = false"
|
||||
style="color: #ff8080; background-color: #ffdede" />
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="modalAdd = false"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
<div class="q-pa-md">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input borderless outlined dense debounce="300" placeholder="ค้นหา" style="width: 850px; max-width: auto"
|
||||
v-model="filterKeyword2">
|
||||
<q-input
|
||||
borderless
|
||||
outlined
|
||||
dense
|
||||
debounce="300"
|
||||
placeholder="ค้นหา"
|
||||
style="width: 850px; max-width: auto"
|
||||
v-model="filterKeyword2"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
</q-toolbar>
|
||||
<q-table flat bordered dense :rows="rows2" :columns="columns2" :filter="filterKeyword2" row-key="name"
|
||||
class="custom-header-table" :pagination-label="paginationLabel2" v-model:pagination="pagination2">
|
||||
<q-table
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
:rows="rows2"
|
||||
:columns="columns2"
|
||||
:filter="filterKeyword2"
|
||||
row-key="name"
|
||||
class="custom-header-table"
|
||||
:pagination-label="paginationLabel2"
|
||||
v-model:pagination="pagination2"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th v-for="col in props.cols" :key="col.name" :props="props">
|
||||
|
|
@ -660,14 +827,27 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
{{ props.row.organizationOrganization }}
|
||||
</q-td>
|
||||
<q-td>
|
||||
<q-btn outline :props="props" label="เพิ่ม" class="text-teal-5" @click="clickAdd(props.row.id)" />
|
||||
<q-btn
|
||||
outline
|
||||
:props="props"
|
||||
label="เพิ่ม"
|
||||
class="text-teal-5"
|
||||
@click="clickAdd(props.row.id)"
|
||||
/>
|
||||
<q-tooltip>เพิ่ม</q-tooltip>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination v-model="pagination2.page" color="primary" :max="scope.pagesNumber" :max-pages="5" size="sm"
|
||||
boundary-links direction-links></q-pagination>
|
||||
<q-pagination
|
||||
v-model="pagination2.page"
|
||||
color="primary"
|
||||
:max="scope.pagesNumber"
|
||||
:max-pages="5"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
|
|
@ -678,18 +858,39 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
<q-dialog v-model="modalEdit" persistent>
|
||||
<q-card style="width: 450px; max-width: 80vw" class="q-pb-md">
|
||||
<q-toolbar class="q-py-md">
|
||||
<q-toolbar-title class="text-h6">แก้ไขเครื่องราชฯ ที่ยื่นขอ
|
||||
<q-toolbar-title class="text-h6"
|
||||
>แก้ไขเครื่องราชฯ ที่ยื่นขอ
|
||||
</q-toolbar-title>
|
||||
<q-btn icon="close" unelevated round dense @click="modalEdit = false"
|
||||
style="color: #ff8080; background-color: #ffdede" />
|
||||
<q-btn
|
||||
icon="close"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
@click="modalEdit = false"
|
||||
style="color: #ff8080; background-color: #ffdede"
|
||||
/>
|
||||
</q-toolbar>
|
||||
<q-separator />
|
||||
<div class="q-pa-md">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col">
|
||||
<q-select v-model="insignia" label="ชื่อเครื่องราชฯ" dense emit-value map-options :options="insigniaOptions"
|
||||
option-value="id" option-label="name" lazy-rules hide-bottom-space :readonly="false" :borderless="false"
|
||||
:outlined="true" :hide-dropdown-icon="false" style="min-width: 150px" />
|
||||
<q-select
|
||||
v-model="insignia"
|
||||
label="ชื่อเครื่องราชฯ"
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
:options="insigniaOptions"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
:readonly="false"
|
||||
:borderless="false"
|
||||
:outlined="true"
|
||||
:hide-dropdown-icon="false"
|
||||
style="min-width: 150px"
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="col">
|
||||
<q-select
|
||||
|
|
@ -721,6 +922,21 @@ const paginationLabel2 = (start: number, end: number, total: number) => {
|
|||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<DialogPopupReason
|
||||
:modal="modelPopupReject"
|
||||
title="เหตุผลไม่ยื่นของ"
|
||||
label="หมายเหตุ"
|
||||
:click-close="closemodelPopupReject"
|
||||
:savaForm="savaReasonReject"
|
||||
/>
|
||||
<DialogPopupReason
|
||||
:modal="modelPopupDelete"
|
||||
title="เหตุผลที่ลบออก"
|
||||
label="หมายเหตุ"
|
||||
:click-close="closemodelPopupDelete"
|
||||
:savaForm="savaReasonDelete"
|
||||
/>
|
||||
|
||||
<!-- note -->
|
||||
<!-- <q-dialog v-model="modalNote" persistent>
|
||||
<q-card style="min-width: 350px">
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ const closeReson = () => {
|
|||
{{ props.row.level }}
|
||||
</q-td>
|
||||
<q-td key="salary" :props="props">
|
||||
{{ props.row.salary }}
|
||||
{{ Number(props.row.salary).toLocaleString() }}
|
||||
</q-td>
|
||||
|
||||
<q-td key="insigniaType" :props="props">
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
const dialogNote = ref<boolean>(false);
|
||||
const showNote = (requestNote: string) => {
|
||||
dialogNote.value = true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="col-12 row q-pa-md">
|
||||
|
|
@ -315,7 +315,7 @@ const showNote = (requestNote: string) => {
|
|||
{{ props.row.level }}
|
||||
</q-td>
|
||||
<q-td key="salary" :props="props">
|
||||
{{ props.row.salary }}
|
||||
{{ Number(props.row.salary).toLocaleString() }}
|
||||
</q-td>
|
||||
|
||||
<q-td key="insigniaType" :props="props">
|
||||
|
|
@ -328,7 +328,16 @@ const showNote = (requestNote: string) => {
|
|||
{{ props.row.insigniaLevel }}
|
||||
</q-td>
|
||||
<q-td v-if="props.row.requestNote != ''" auto-width>
|
||||
<q-btn dense size="12px" flat round color="blue" @click.stop @click="showNote(props.row.requestNote)" icon="mdi-information-outline">
|
||||
<q-btn
|
||||
dense
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="blue"
|
||||
@click.stop
|
||||
@click="showNote(props.row.requestNote)"
|
||||
icon="mdi-information-outline"
|
||||
>
|
||||
<q-tooltip>เหตุผลการลบ</q-tooltip>
|
||||
</q-btn>
|
||||
</q-td>
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ const fectDataByid = async (id: string) => {
|
|||
Advertise.value = data.number;
|
||||
brand.value = data.requestInsigniaId;
|
||||
receivedate.value = data.dateReceive;
|
||||
issue.value = "";
|
||||
issue.value = data.issue;
|
||||
affiliationRequest.value = data.organizationOrganizationSend;
|
||||
affiliationReceived.value = data.organizationOrganizationReceive;
|
||||
announceDate.value = data.date;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,14 @@ import { useQuasar } from "quasar";
|
|||
// const router = useRouter();
|
||||
const DataStore = useResultDataStore();
|
||||
const mixin = useCounterMixin();
|
||||
const { date2Thai, dialogConfirm, showLoader, hideLoader, messageError } =
|
||||
mixin;
|
||||
const {
|
||||
date2Thai,
|
||||
dialogConfirm,
|
||||
showLoader,
|
||||
hideLoader,
|
||||
messageError,
|
||||
success,
|
||||
} = mixin;
|
||||
const $q = useQuasar();
|
||||
const tab = ref<string>("");
|
||||
|
||||
|
|
@ -205,18 +211,6 @@ const rows = ref<any>([
|
|||
// typepay: null,
|
||||
// address: "เลขที่ 2/3 หมู่ที่ 14 ถนนบ...",
|
||||
// },
|
||||
// {
|
||||
// no: "2",
|
||||
// status: "บันทึกลง ก.พ. 7 แล้ว",
|
||||
// name: "นางสาวภาพรรณ ลออ",
|
||||
// type: "ทั้งหมด",
|
||||
// page: "12",
|
||||
// number: "11",
|
||||
// vatnumber: "1122345",
|
||||
// datepay: null,
|
||||
// typepay: null,
|
||||
// address: "เลขที่ 2/3 หมู่ที่ 14 ถนนบ...",
|
||||
// },
|
||||
]);
|
||||
watch(tab, () => {
|
||||
if (tab.value !== "doc") {
|
||||
|
|
@ -272,6 +266,43 @@ const fecthlistInsignia = async () => {
|
|||
hideLoader();
|
||||
});
|
||||
};
|
||||
const uploadFile = async (event: any, action: string) => {
|
||||
console.log(selectRound.value);
|
||||
if (selectRound.value !== undefined) {
|
||||
let id = selectRound.value.toString();
|
||||
if (action === "result") {
|
||||
const formdata = new FormData();
|
||||
formdata.append("file", event);
|
||||
await http
|
||||
.put(config.API.uploadfilereceice(id), formdata)
|
||||
.then(() => {
|
||||
success($q, "อัพโหลดไฟล์สำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fecthlistInsignia();
|
||||
fileResult.value = null;
|
||||
});
|
||||
} else if (action === "invoice") {
|
||||
const formdata = new FormData();
|
||||
formdata.append("file", event);
|
||||
await http
|
||||
.put(config.API.uploadfileinvoice(id), formdata)
|
||||
.then(() => {
|
||||
success($q, "อัพโหลดไฟล์สำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
.finally(async () => {
|
||||
await fecthlistInsignia();
|
||||
fileinvoice.value = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const filterRef = ref<QInput>();
|
||||
const filter = ref<string>("");
|
||||
|
|
@ -285,9 +316,7 @@ const addData = () => {
|
|||
action.value = "addData";
|
||||
};
|
||||
|
||||
const editData = (data) => {
|
||||
console.log(data);
|
||||
|
||||
const editData = (data: any) => {
|
||||
personId.value = data.id;
|
||||
profileType.value = data.profileType;
|
||||
action.value = "editData";
|
||||
|
|
@ -398,6 +427,7 @@ const resetFilter = () => {
|
|||
v-model="fileResult"
|
||||
label="บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์"
|
||||
style="min-width: auto"
|
||||
accept=".xlsx"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -428,6 +458,20 @@ const resetFilter = () => {
|
|||
</q-menu>
|
||||
</q-btn> -->
|
||||
</div>
|
||||
<div v-if="fileResult !== null">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile(fileResult, 'result')"
|
||||
>
|
||||
<q-tooltip
|
||||
>อัพโหลดไฟล์บันทึกผลการได้รับพระราชทานเครื่องราชย์อิสริยสภรณ์</q-tooltip
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
<q-file
|
||||
dense
|
||||
|
|
@ -436,7 +480,7 @@ const resetFilter = () => {
|
|||
v-model="fileinvoice"
|
||||
label="บันทึกผลการจ่ายใบกำกับ"
|
||||
style="min-width: auto"
|
||||
accept=".pdf"
|
||||
accept=".xlsx"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="attach_file" />
|
||||
|
|
@ -444,6 +488,18 @@ const resetFilter = () => {
|
|||
<q-tooltip>อัพโหลดไฟล์บันทึกผลการจ่ายใบกำกับ</q-tooltip>
|
||||
</q-file>
|
||||
</div>
|
||||
<div v-if="fileinvoice !== null">
|
||||
<q-btn
|
||||
size="12px"
|
||||
flat
|
||||
round
|
||||
color="add"
|
||||
icon="mdi-upload"
|
||||
@click="uploadFile(fileinvoice, 'invoice')"
|
||||
>
|
||||
<q-tooltip>อัพโหลดไฟล์บันทึกผลการจ่ายใบกำกับ</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<q-space />
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue