fix เครื่องราช

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-10-29 13:51:58 +07:00
parent 2bcbbe8c9f
commit 8f3926994a
4 changed files with 62 additions and 31 deletions

View file

@ -10,7 +10,8 @@ import config from "@/app.config";
/**
* import Type
*/
import type { DataOption } from "@/modules/04_registry/components/profileType";
// import type { DataOption } from "@/modules/04_registry/components/profileType";
import type { OptionData } from "@/modules/07_insignia/interface/index/Main";
import DialogHeader from "@/components/DialogHeader.vue";
@ -76,10 +77,10 @@ const affiliationReceived = ref<string>(""); //สังกัด ณ วัน
const receivedate = ref<Date | null>(); //
const announceDate = ref<Date | null>(); //
const invoiceDate = ref<Date | null>(null); //
const filterinsigniaOp2 = ref<DataOption[]>([]); //
const filterinsigniaOp2 = ref<OptionData[]>([]); //
const employeeClass = ref<string>(""); //./
// ./
const employeeClassOps = ref<DataOption[]>([
const employeeClassOps = ref<OptionData[]>([
{ id: "officer", name: "ข้าราชการ กทม.สามัญ" },
{ id: "employee", name: "ลูกจ้างประจำ" },
]);
@ -267,7 +268,7 @@ function filterSelector(val: string, update: Function, name: string) {
if (name === "insigniaOp2") {
brand.value = val ? "" : brand.value;
filterinsigniaOp2.value = DataStore.insigniaOp2.filter(
(v: DataOption) => v.name.toLowerCase().indexOf(needle) > -1
(v: OptionData) => v.name.toLowerCase().indexOf(needle) > -1
);
}
});
@ -486,6 +487,14 @@ watch(props, () => {
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
color="primary"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
@ -578,6 +587,14 @@ watch(props, () => {
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
color="primary"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
@ -651,6 +668,7 @@ watch(props, () => {
borderless
:enableTimePicker="false"
week-start="0"
:readonly="disbleStatus"
>
<template #year="{ year }">
{{ year + 543 }}

View file

@ -61,9 +61,9 @@ interface ResponseInsigniaType {
interface ResponseRecordLists {
address: string;
citizenId: string;
date: string | Date;
datePayment: string | Date;
dateReceive: string | Date;
date: Date;
datePayment: Date;
dateReceive: Date;
dateReceiveInsignia: string;
dateReturnInsignia: string;
docReceiveInsignia: string;

View file

@ -93,7 +93,7 @@ export const useResultDataStore = defineStore("insigniaResult", () => {
prefix: e.prefix,
position: e.position,
status: status(e.status) ?? "",
dateReceive: e.dateReceive ?? date2Thai(e.dateReceive),
dateReceive: date2Thai(e.dateReceive),
name: e.fullName,
type: `${e.requestInsignia} (${
type.value.find((item) => item.name === e.requestInsignia)?.shortName ||
@ -103,13 +103,13 @@ export const useResultDataStore = defineStore("insigniaResult", () => {
e.profileType === "" ? "officer" : e.profileType
),
profileType: e.profileType === "" ? "officer" : e.profileType,
date: e.date ?? date2Thai(e.date),
date: date2Thai(e.date),
volumeNo: e.volumeNo,
section: e.section,
page: e.page,
number: e.no,
vatnumber: e.number,
datepay: e.datePayment ?? date2Thai(e.datePayment),
datepay: date2Thai(e.datePayment),
typepay: e.typePayment,
address: e.address,
dateReceiveInsignia: e.dateReceiveInsignia,

View file

@ -69,12 +69,12 @@ const dataModal = ref<DataPerson>(); //ช้อมูลที่ต้อง
const filterRef = ref<QInput>();
const filter = ref<string>("");
const columns = ref<QTableProps["columns"]>([
{
name: "action",
align: "left",
label: "",
field: "",
},
// {
// name: "action",
// align: "left",
// label: "",
// field: "",
// },
{
name: "no",
align: "left",
@ -403,7 +403,7 @@ function editData(data: DataPerson) {
* อม ไฟล
*/
const modelPerview = ref<boolean>(false);
const rowspreview = ref<any>([]);
const rowspreview = ref<any[]>([]);
const typepreview = ref<string>("");
const fileInsignia = ref<any>(null);
@ -560,6 +560,7 @@ onMounted(() => {
<div class="toptitle text-dark col-12 row items-center">
นทกผลการไดบพระราชทานเครองราชอสรยาภรณ/การจายใบกำก
</div>
<q-card
flat
bordered
@ -879,13 +880,17 @@ onMounted(() => {
:pagination-label="paginationLabel"
v-model:pagination="pagination"
>
<template v-slot:body-cell="props">
<q-td :props="props">
<div v-if="props.col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="props.col.name == 'action'">
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props">
<q-td auto-width>
<q-btn
v-if="
checkPermission($route)?.attrIsGet &&
@ -915,11 +920,18 @@ onMounted(() => {
>
<q-tooltip> -นเครองราชฯ</q-tooltip>
</q-btn>
</div>
<div v-else>
{{ props.value }}
</div>
</q-td>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</div>
@ -929,6 +941,7 @@ onMounted(() => {
</q-tab-panel>
</q-tab-panels>
</q-card>
<q-card v-else>
<div class="q-pa-md q-gutter-sm">
<q-banner inline-actions rounded class="bg-grey-1 text-center">
@ -961,7 +974,7 @@ onMounted(() => {
<!-- นยนรายการขอม -->
<q-dialog v-model="modelPerview">
<q-card style="width: 850px; max-width: 80vw">
<q-card style="min-width: 80vw">
<DialogHeader tittle="ยืนยันรายการข้อมูล" :close="closeDialogPerview" />
<q-card-section class="q-pt-none">
<d-table
@ -977,7 +990,7 @@ onMounted(() => {
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ props.value ? props.value: "-" }}
{{ props.value ? props.value : "-" }}
</div>
</q-td>
</template>