interface main ออกคำสั่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-22 11:29:16 +07:00
parent 7d3c48142c
commit 9f73050a64
3 changed files with 64 additions and 10 deletions

View file

@ -6,6 +6,11 @@ import type { QForm } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import {
history,
ColumnData,
DataOptionInsigniaType,
} from "../interface/index/Main.ts";
const myForm = ref<QForm>();
const mixin = useCounterMixin();
@ -17,7 +22,7 @@ const props = defineProps({
OrderTypeOption: Object,
});
const OrderTypeOption = ref<any>([]);
const OrderTypeOption = ref<DataOptionInsigniaType[]>([]);
const modal = ref<boolean>(false);
const employeeClass = ref<string>("");
@ -25,7 +30,7 @@ const reportType = ref<string>("");
const reportYear = ref<number | null>();
const reportNo = ref<string>("");
const columns = ref<any["columns"]>([
const columns = ref<ColumnData[]>([
{
name: "no",
label: "ลำดับ",
@ -67,14 +72,14 @@ const columns = ref<any["columns"]>([
style: "font-size: 14px",
},
]);
const rows = ref<any>([]);
const rows = ref<history[]>([]);
// popup
const clickOpenpopup = () => {
modal.value = true;
employeeClass.value = "";
if (props.OrderTypeOption != undefined) {
OrderTypeOption.value = props.OrderTypeOption.filter(
(e: any) => e.name !== "ทั้งหมด"
(e: DataOptionInsigniaType) => e.name !== "ทั้งหมด"
);
reportType.value = OrderTypeOption.value[0].name;
let currentDate = new Date();
@ -99,7 +104,7 @@ const clickSearch = async () => {
.then((res) => {
let data = res.data.result;
if (data.length !== 0) {
rows.value = data.map((e: any) => ({
rows.value = data.map((e: history) => ({
id: e.id,
citizenId: e.citizenId,
name: e.fullName,