interface main ออกคำสั่ง
This commit is contained in:
parent
7d3c48142c
commit
9f73050a64
3 changed files with 64 additions and 10 deletions
|
|
@ -5,6 +5,7 @@ import type { FormOrderPlacementMainData } from "@/modules/10_order/interface/re
|
|||
import type {
|
||||
DataOption,
|
||||
DataOption1,
|
||||
OrderResult,
|
||||
} from "@/modules/10_order/interface/index/Main";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useOrderPlacementDataStore } from "@/modules/10_order/store";
|
||||
|
|
@ -139,8 +140,8 @@ const OriginalDataFetch = async () => {
|
|||
showLoader();
|
||||
await http
|
||||
.get(config.API.listOrder())
|
||||
.then((res: any) => {
|
||||
rows.value = res.data.result.map((e: any) => ({
|
||||
.then((res) => {
|
||||
rows.value = res.data.result.map((e: OrderResult) => ({
|
||||
orderId: e.orderId,
|
||||
Order: e.orderName,
|
||||
OrderNum:
|
||||
|
|
@ -155,7 +156,7 @@ const OriginalDataFetch = async () => {
|
|||
orderTypeValue: e.orderTypeValue,
|
||||
}));
|
||||
})
|
||||
.catch((e: any) => {
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
|
|
@ -240,13 +241,13 @@ const OrderStatusFilter = async () => {
|
|||
};
|
||||
// ค้นหาในตาราง
|
||||
const filterKeyword = ref<string>("");
|
||||
const filterRef = ref<any>(null);
|
||||
const filterRef = ref<HTMLInputElement | null>(null);
|
||||
const resetFilter = () => {
|
||||
filterKeyword.value = "";
|
||||
filterRef.value.focus();
|
||||
};
|
||||
|
||||
const attrs = ref<any>(useAttrs());
|
||||
const attrs = ref<string | null>(useAttrs());
|
||||
// ค้นหาประเภท และ สถานะ
|
||||
const searchFilterTable = async () => {
|
||||
if (OrderType.value == "ทั้งหมด") {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue