เพิ่ม comment ระบบลาออกและขอโอน
This commit is contained in:
parent
6621dfd7f0
commit
3f5687f0aa
15 changed files with 1529 additions and 1889 deletions
|
|
@ -12,16 +12,21 @@ const $q = useQuasar()
|
|||
const mixin = useCounterMixin()
|
||||
const myform = ref<QForm | null>(null)
|
||||
const { fails, 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 nameFile = ref<string>("")
|
||||
|
||||
const routeName = router.currentRoute.value.name
|
||||
|
||||
/**
|
||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||
*/
|
||||
onMounted(() => {
|
||||
if (route.params.id !== undefined) {
|
||||
id.value = route.params.id.toString()
|
||||
|
|
@ -29,10 +34,6 @@ onMounted(() => {
|
|||
}
|
||||
})
|
||||
|
||||
const filesNull = () => {
|
||||
files.value = null
|
||||
}
|
||||
|
||||
const saveData = async () => {
|
||||
if (myform.value != null) {
|
||||
await myform.value.validate().then(async (saveDataTest: Boolean) => {
|
||||
|
|
@ -65,6 +66,9 @@ const saveTransfer = () => {
|
|||
.onDismiss(() => {})
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นสร้างขอโอน
|
||||
*/
|
||||
const createTransfer = async () => {
|
||||
const formData = new FormData()
|
||||
|
||||
|
|
@ -86,6 +90,10 @@ const createTransfer = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นเรียกข้อมูลจาก Api
|
||||
* @param id ไอดีของข้อมูล
|
||||
*/
|
||||
const fecthDataTransfer = async (id: string) => {
|
||||
showLoader()
|
||||
await http
|
||||
|
|
@ -104,6 +112,14 @@ const fecthDataTransfer = async (id: string) => {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นดาว์โหลดอัพโหลดไฟล์
|
||||
*/
|
||||
const fileDocDataUpload = ref<File[]>([])
|
||||
const filesNull = () => {
|
||||
files.value = null
|
||||
}
|
||||
//อัพโหลดไฟล์
|
||||
const fileUploadDoc = async (file: any) => {
|
||||
fileDocDataUpload.value.push(file)
|
||||
nameFile.value = file[0].name
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { useCounterMixin } from "@/stores/mixin"
|
|||
import { useTransferDataStore } from "@/modules/02_transfer/store"
|
||||
import http from "@/plugins/http"
|
||||
import config from "@/app.config"
|
||||
import Table from "@/components/Table.vue"
|
||||
|
||||
const transferData = useTransferDataStore()
|
||||
const { statusText } = transferData
|
||||
|
|
@ -14,15 +15,20 @@ const router = useRouter()
|
|||
const $q = useQuasar()
|
||||
const mixin = useCounterMixin()
|
||||
const { date2Thai, messageError, showLoader, hideLoader } = mixin
|
||||
import Table from "@/components/Table.vue"
|
||||
|
||||
const filter = ref<string>("")
|
||||
const rows = ref<any>([])
|
||||
/**
|
||||
* ตั้งค่า pagination
|
||||
*/
|
||||
const initialPagination = ref({
|
||||
rowsPerPage: 0,
|
||||
})
|
||||
const visibleColumns = ref<String[]>(["no", "date", "position", "noPos", "level", "salary", "transfer", "statustext"])
|
||||
|
||||
/**
|
||||
* เพิ่มหัวข้อตาราง
|
||||
*/
|
||||
const filter = ref<string>("")
|
||||
const rows = ref<any>([])
|
||||
const visibleColumns = ref<String[]>(["no", "date", "position", "noPos", "level", "salary", "transfer", "statustext"])
|
||||
const columns = ref<QTableProps["columns"]>([
|
||||
{
|
||||
name: "no",
|
||||
|
|
@ -98,6 +104,9 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
])
|
||||
|
||||
/**
|
||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||
*/
|
||||
onMounted(async () => {
|
||||
await fecthListTransfer()
|
||||
})
|
||||
|
|
@ -129,10 +138,16 @@ const fecthListTransfer = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์ชั่นกดเพิ่มไปหน้าเพิ่มขอโอน
|
||||
*/
|
||||
const clickAdd = async () => {
|
||||
router.push(`/transfer/add`)
|
||||
}
|
||||
|
||||
/**
|
||||
* กดเพื่อย้อนกลับ
|
||||
*/
|
||||
const clickBack = () => {
|
||||
router.push(`/`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue