api edit detail ขอโอน
This commit is contained in:
parent
c413719d48
commit
5640c9bd68
3 changed files with 46 additions and 31 deletions
|
|
@ -5,5 +5,5 @@ const placementTransfer = `${env.API_URI}/placement`
|
|||
export default {
|
||||
listUserTransfer: () => `${placementTransfer}/transfer/user`,
|
||||
listtransfer: () => `${placementTransfer}/transfer`,
|
||||
// transferByid: (id: string) => `${placementTransfer}/transfer/${id}`,
|
||||
transferByid: (id: string) => `${placementTransfer}/transfer/${id}`,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,17 +46,6 @@
|
|||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
<!-- <div class="col-xs-12 col-sm-4 row">
|
||||
<q-card bordered flat>
|
||||
<div class="q-pa-xs bg-grey-2 row items-center q-py-sm q-px-md justify-center text-bold">ข้อมูลการศึกษา</div>
|
||||
<q-separator />
|
||||
<div class="col-12 row q-pa-sm q-col-gutter-sm">
|
||||
<q-input class="col-12" dense outlined v-model="edu" label="คุณวุฒิทางการศึกษา" :readonly="routeName != 'addTransfer'" />
|
||||
<q-input class="col-12" dense outlined v-model="highEdu" label="คุณวุฒิทางการศึกษาสูงสุด" :readonly="routeName != 'addTransfer'" />
|
||||
<q-input class="col-12" dense outlined v-model="eduEtc" label="คุณวุฒิทางการศึกษาอื่นๆหรือประกาศนียบัตรอื่นๆ" :readonly="routeName != 'addTransfer'" />
|
||||
</div>
|
||||
</q-card>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- <div class="col-12 row q-col-gutter-md q-pa-md">
|
||||
<div class="col-xs-12 col-sm-8 row">
|
||||
|
|
@ -307,17 +296,24 @@ import config from "@/app.config"
|
|||
|
||||
const router = useRouter()
|
||||
const $q = useQuasar()
|
||||
|
||||
const mixin = useCounterMixin()
|
||||
const { date2Thai, dateToISO, success, messageError, showLoader, hideLoader } = mixin
|
||||
const fileDocDataUpload = ref<File[]>([])
|
||||
const route = useRoute()
|
||||
const files = ref<any>()
|
||||
const tranferOrg = ref("")
|
||||
const noteReason = ref("")
|
||||
const id = ref<string>("")
|
||||
|
||||
const routeName = router.currentRoute.value.name
|
||||
|
||||
onMounted(() => {})
|
||||
onMounted(() => {
|
||||
if (route.params.id !== undefined) {
|
||||
id.value = route.params.id.toString()
|
||||
fecthDataTransfer(id.value)
|
||||
}
|
||||
})
|
||||
|
||||
const saveTransfer = () => {
|
||||
$q.dialog({
|
||||
title: "ยืนยันการยื่นข้อมูลลาออก",
|
||||
|
|
@ -354,6 +350,25 @@ const createTransfer = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const fecthDataTransfer = async (id: string) => {
|
||||
showLoader()
|
||||
await http
|
||||
.get(config.API.transferByid(id))
|
||||
.then((res: any) => {
|
||||
let data = res.data.result
|
||||
// console.log(data);
|
||||
tranferOrg.value = data.organization
|
||||
noteReason.value = data.reason
|
||||
files.value = data.file
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e)
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader()
|
||||
})
|
||||
}
|
||||
|
||||
const fileUploadDoc = async (files: any) => {
|
||||
fileDocDataUpload.value.push(files)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,30 +106,30 @@ onMounted(async () => {
|
|||
const fecthListTransfer = async () => {
|
||||
console.log(config.API.listUserTransfer())
|
||||
|
||||
//showLoader()
|
||||
showLoader()
|
||||
await http
|
||||
.get(config.API.listUserTransfer())
|
||||
.then((res: any) => {
|
||||
// console.log(res);
|
||||
// let data = res.data.result
|
||||
// console.log(data)
|
||||
// rows.value = data.map((e: any) => ({
|
||||
// id: e.id,
|
||||
// date: date2Thai(e.date),
|
||||
// status: e.status,
|
||||
// position: e.organizationPositionOld,
|
||||
// noPos: e.posNo,
|
||||
// level: e.positionLevel,
|
||||
// salary: e.salary,
|
||||
// transfer: e.organization,
|
||||
// }))
|
||||
let data = res.data.result
|
||||
console.log(data)
|
||||
rows.value = data.map((e: any) => ({
|
||||
id: e.id,
|
||||
date: date2Thai(e.createdAt),
|
||||
status: e.status,
|
||||
position: e.organizationPositionOld,
|
||||
noPos: e.posNo,
|
||||
level: e.positionLevel,
|
||||
salary: e.salary,
|
||||
transfer: e.organization,
|
||||
}))
|
||||
})
|
||||
.catch((e: any) => {
|
||||
console.log("e")
|
||||
//messageError($q, e)
|
||||
messageError($q, e)
|
||||
})
|
||||
.finally(() => {
|
||||
//hideLoader()
|
||||
hideLoader()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -160,13 +160,13 @@ const clickAdd = async () => {
|
|||
:titleText="''"
|
||||
>
|
||||
<template #columns="props">
|
||||
<q-tr :props="props" class="cursor-pointer" @click="router.push(`/transfer/1`)">
|
||||
<q-tr :props="props" class="cursor-pointer" @click="router.push(`/transfer/` + props.row.id)">
|
||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else-if="col.name == 'status'">
|
||||
<q-icon size="20px" v-if="props.row.status == 'รอดำเนินการ'" name="mdi-timer-sand" color="deep-orange">
|
||||
<q-icon size="20px" v-if="props.row.status == 'WAITTING'" name="mdi-timer-sand" color="deep-orange">
|
||||
<q-tooltip>รอดำเนินการ</q-tooltip>
|
||||
</q-icon>
|
||||
<q-icon size="20px" v-else name="mdi-check" color="teal">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue