ลูกจ้างประจำ
This commit is contained in:
parent
119a1b47e4
commit
c7bbe78fc7
7 changed files with 118 additions and 34 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -17,9 +17,10 @@ import type { DataListsIDP } from "@/modules/04_registryPerson/interface/respons
|
|||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useRequestEditStore();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
||||
|
||||
const routerName = ref<string>(route.name as string);
|
||||
//ตัวแปร
|
||||
const status = ref<string>("PENDING"); //ค้นหาตามสถานะ
|
||||
const keyword = ref<string>(""); //คำค้นหา
|
||||
|
|
@ -143,14 +144,19 @@ const visibleColumns = ref<string[]>([
|
|||
async function fetchData() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.requestDevelopmentEdit + `admin`, {
|
||||
params: {
|
||||
page: page.value,
|
||||
pageSize: pageSize.value,
|
||||
status: status.value ? status.value : "",
|
||||
keyword: keyword.value,
|
||||
},
|
||||
})
|
||||
.get(
|
||||
config.API.requestDevelopmentEditByType(
|
||||
routerName.value == "registryNewRequestEditEMP" ? "-employee" : ""
|
||||
) + `admin`,
|
||||
{
|
||||
params: {
|
||||
page: page.value,
|
||||
pageSize: pageSize.value,
|
||||
status: status.value ? status.value : "",
|
||||
keyword: keyword.value,
|
||||
},
|
||||
}
|
||||
)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result;
|
||||
maxPage.value = Math.ceil(data.total / pageSize.value);
|
||||
|
|
@ -206,7 +212,11 @@ function updatePageSizePagination(newPagination: Pagination) {
|
|||
* @param id รายการคำร้อง
|
||||
*/
|
||||
function onclickEdit(id: string) {
|
||||
router.push(`/registry-officer/request-edit-page/${id}`);
|
||||
if (routerName.value === "registryNewRequestEditEMP") {
|
||||
router.push(`/registry-employee/request-edit-page/${id}`);
|
||||
} else {
|
||||
router.push(`/registry-officer/request-edit-page/${id}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue