เเก้ไข เพิ่ม api questionnair
This commit is contained in:
parent
1e510c768a
commit
18a0e91c9d
3 changed files with 6 additions and 4 deletions
|
|
@ -7,4 +7,5 @@ export default {
|
|||
listResign: () => `${retirementResign}/resign`,
|
||||
resingByid: (id: string) => `${retirementResign}/resign/${id}`,
|
||||
questionnaireByid: (id: string) => `${retirementResign}/resign/questionnaire/${id}`,
|
||||
listquestionnaire: () => `${retirementResign}/resign/questionnaire`,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,7 +365,8 @@ const fecthDataTransfer = async (id: string) => {
|
|||
// console.log(data);
|
||||
tranferOrg.value = data.organization
|
||||
noteReason.value = data.reason
|
||||
files.value = data.file
|
||||
files.value = data.docs
|
||||
console.log(files.value)
|
||||
})
|
||||
.catch((e: any) => {
|
||||
messageError($q, e)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const leaveReason = ref("")
|
|||
const id = ref<string>("")
|
||||
const noteReason = ref("")
|
||||
const routeName = router.currentRoute.value.name
|
||||
const questionId = route.params.id.toString()
|
||||
const dataId = route.params.id.toString()
|
||||
|
||||
const saveForm = () => {
|
||||
$q.dialog({
|
||||
|
|
@ -35,14 +35,14 @@ const saveForm = () => {
|
|||
.onDismiss(() => {})
|
||||
}
|
||||
|
||||
const createResult = async (questionId: string) => {
|
||||
const createResult = async () => {
|
||||
const formData = new FormData()
|
||||
console.log(formData)
|
||||
|
||||
formData.append("Location", leaveReason.value)
|
||||
formData.append("SendDate", noteReason.value)
|
||||
await http
|
||||
.post(config.API.questionnaireByid(questionId), formData)
|
||||
.post(config.API.questionnaireByid(dataId), formData)
|
||||
.then((res: any) => {
|
||||
// console.log(res);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue