ลูกจ้างประจำ
This commit is contained in:
parent
119a1b47e4
commit
c7bbe78fc7
7 changed files with 118 additions and 34 deletions
|
|
@ -4,7 +4,7 @@ import { useQuasar } from "quasar";
|
|||
|
||||
import { useRequestEditStore } from "@/modules/04_registryPerson/stores/RequestEdit";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
|
|
@ -22,9 +22,11 @@ import DialogStatus from "@/modules/04_registryPerson/components/requestEdit/Dia
|
|||
|
||||
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);
|
||||
//Table
|
||||
const idCard = ref<string>("");
|
||||
const profileId = ref<string>("");
|
||||
|
|
@ -125,14 +127,19 @@ const requestId = ref<string>(""); //id รายการแก้ไข
|
|||
function fetchListRequset() {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.requestEdit + `admin`, {
|
||||
params: {
|
||||
page: page.value,
|
||||
pageSize: pageSize.value,
|
||||
status: status.value,
|
||||
keyword: keyword.value,
|
||||
},
|
||||
})
|
||||
.get(
|
||||
config.API.requestEditByType(
|
||||
routerName.value == "registryNewRequestEditEMP" ? "-employee" : ""
|
||||
) + `admin`,
|
||||
{
|
||||
params: {
|
||||
page: page.value,
|
||||
pageSize: pageSize.value,
|
||||
status: status.value,
|
||||
keyword: keyword.value,
|
||||
},
|
||||
}
|
||||
)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
maxPage.value = Math.ceil(data.total / pageSize.value);
|
||||
|
|
@ -181,7 +188,11 @@ function filterOption(val: string, update: Function) {
|
|||
function onclickEdit(data: Request) {
|
||||
requestId.value = data.id;
|
||||
store.profileId = data.profileId;
|
||||
router.push(`/registry-officer/request-edit/personal/${data.id}`);
|
||||
if (routerName.value === "registryNewRequestEditEMP") {
|
||||
router.push(`/registry-employee/request-edit/personal/${data.id}`);
|
||||
} else {
|
||||
router.push(`/registry-officer/request-edit/personal/${data.id}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue