เพิ่ม 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue