Merge branch 'nice' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-05-08 10:36:29 +07:00
commit bef4b48cd5
2 changed files with 24 additions and 10 deletions

View file

@ -219,6 +219,7 @@ function closeDialog() {
keyword.value = "";
}
/** function ค้นหาข้อมูลใน Table*/
function serchDataTable() {
rows.value = onSearchDataTable(
keyword.value,

View file

@ -209,20 +209,21 @@ const visibleColumns = ref<string[]>([
"reclaimReason",
]);
const isInsigniaRound = ref<boolean>(false);
const isInsigniaRound = ref<boolean>(false); //
const roundOps = ref<DataRound[]>(roundData.value);
const insigniaTypeOps = ref<OptionData[]>(insigniaTypeData.value);
const employeeClassOps = ref<OptionData[]>(employeeClassData.value);
const roundOps = ref<DataRound[]>(roundData.value); //
const insigniaTypeOps = ref<OptionData[]>(insigniaTypeData.value); //
const employeeClassOps = ref<OptionData[]>(employeeClassData.value); //
const modalForm = ref<boolean>(false); // modal
const isEdit = ref<boolean>(false); //
const insigniaReclaimId = ref<string>(""); // ID
const insigniaReclaimData = ref<DataReclaim>(); //
const modalForm = ref<boolean>(false);
const isEdit = ref<boolean>(false);
const insigniaReclaimId = ref<string>("");
const insigniaReclaimData = ref<DataReclaim>();
const yearRound = ref<number>(); //
const insigniaType = ref<string>("all");
const employeeType = ref<string>("all");
const insigniaType = ref<string>("all"); //
const employeeType = ref<string>("all"); //
/** function เรียกรอบการเสนอขอพระราชทานเครื่องราชฯ*/
async function fetchInsigniaRound() {
@ -262,6 +263,7 @@ async function fetchInsigniaType() {
});
}
/** function เรียกข้อมูลรายการเรียกคืนเครื่องราชฯ*/
async function fetchDataReclaim() {
await http
.post(config.API.insigniaReclaim + `-list`, {
@ -278,6 +280,11 @@ async function fetchDataReclaim() {
});
}
/**
* function เป Dialog นทกการเรยกคนเครองราชฯ
* @param actions สถานะการแกไข
* @param data อมลของรายการทองการแกไข
*/
function onOpenDialogForm(
actions: boolean,
data: DataReclaim = {} as DataReclaim
@ -288,6 +295,10 @@ function onOpenDialogForm(
modalForm.value = true;
}
/**
* function นยนการลบขอมลรายการเรยกคนเครองราชฯ
* @param id องการลบ
*/
function onDeleteDataReclaim(id: string) {
dialogRemove($q, async () => {
showLoader();
@ -306,6 +317,7 @@ function onDeleteDataReclaim(id: string) {
});
}
/** function ค้นหาข้อมูลใน Table*/
function onSearchDataReclaim() {
if (insigniaType.value !== "all" && employeeType.value !== "all") {
const data = rowsMain.value.filter(
@ -372,6 +384,7 @@ function filterSelector(val: string, update: Function, name: string) {
});
}
/** function เรียกข้อมูลรายการเรียกคืนเครื่องราชฯใหม่เมื่อเปลี่ยนรอบ*/
async function fetchNewData() {
showLoader();
await fetchDataReclaim();