This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-01-16 16:00:24 +07:00
parent 6aa8a61b40
commit 99cba9f3bd
5 changed files with 37 additions and 9 deletions

View file

@ -20,6 +20,8 @@ const { showLoader, hideLoader, messageError, success } = useCounterMixin();
//props
const modal = defineModel<boolean>("modal", { required: true });
const profileId = ref<string>(route.params.id?.toString() ?? ""); //ProfileId
const form = reactive({
tranferOrg: "",
noteReason: "",
@ -30,14 +32,16 @@ async function onSubmit() {
try {
showLoader();
const formData = new FormData();
formData.append("ProfileId", profileId.value);
formData.append("Organization", form.tranferOrg);
formData.append("Reason", form.noteReason);
if (form.files) {
formData.append("file", form.files);
}
// await http.post(config.API.listtransfer(), formData);
// success($q, "");
await http.post(config.API.transferAdmin, formData);
router.push({ name: "transfer" });
success($q, "บันทึกข้อมูลสำเร็จ");
} catch (error) {
messageError($q, error);
} finally {