Compare commits
No commits in common. "dev" and "v1.1.43" have entirely different histories.
3 changed files with 22 additions and 37 deletions
|
|
@ -354,11 +354,6 @@ function onClose() {
|
|||
|
||||
<div class="col-12">
|
||||
<div class="row col-12 q-col-gutter-sm">
|
||||
<div class="col-12">
|
||||
<div class="text-caption text-grey-8">
|
||||
ผู้ดูแลระบบจะติดต่อกลับผ่านทางอีเมลที่ท่านระบุ กรุณาตรวจสอบอีเมลของท่านเป็นระยะ
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 col-lg-6">
|
||||
<q-input
|
||||
dense
|
||||
|
|
@ -368,11 +363,10 @@ function onClose() {
|
|||
class="inputgreen"
|
||||
hide-bottom-space
|
||||
:rules="[
|
||||
(val: string) => !!val || 'กรุณากรอกที่อยู่อีเมล',
|
||||
(val: string) => {
|
||||
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
return emailPattern.test(val) || 'กรุณากรอกที่อยู่อีเมลในรูปแบบที่ถูกต้อง';
|
||||
}
|
||||
() =>
|
||||
!!formData.email ||
|
||||
!!formData.phone ||
|
||||
'กรุณากรอกอีเมลหรือเบอร์โทรติดต่อกลับ',
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -384,6 +378,12 @@ function onClose() {
|
|||
v-model="formData.phone"
|
||||
class="inputgreen"
|
||||
hide-bottom-space
|
||||
:rules="[
|
||||
() =>
|
||||
!!formData.email ||
|
||||
!!formData.phone ||
|
||||
'กรุณากรอกอีเมลหรือเบอร์โทรติดต่อกลับ',
|
||||
]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -706,7 +706,6 @@ function classInput(val: boolean) {
|
|||
hide-bottom-space
|
||||
autocomplete="on"
|
||||
name="organization"
|
||||
:label="`${'หน่วยงาน'}`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -370,32 +370,18 @@ async function uploadFile(event: any, date: any) {
|
|||
*/
|
||||
async function downloadAttachment(type: string, id: string) {
|
||||
showLoader();
|
||||
try {
|
||||
const response = await http.get(
|
||||
config.API.retirementReport + `/${type}/${id}`,
|
||||
{
|
||||
headers: {
|
||||
accept:
|
||||
type === "pdf"
|
||||
? "application/pdf"
|
||||
: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"content-Type": "application/json",
|
||||
},
|
||||
responseType: "blob",
|
||||
}
|
||||
);
|
||||
const blob = response.data;
|
||||
const url = URL.createObjectURL(blob);
|
||||
const link = document.createElement("a");
|
||||
link.href = url;
|
||||
link.download = `รายชื่อผู้เกษียณอายุราชการ.${type}`;
|
||||
link.click();
|
||||
URL.revokeObjectURL(url);
|
||||
} catch (e) {
|
||||
messageError($q, e);
|
||||
} finally {
|
||||
hideLoader();
|
||||
}
|
||||
await http
|
||||
.get(config.API.reportRetireList(type, id))
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
await genReport(data, `รายชื่อผู้เกษียณอายุราชการ`, type);
|
||||
})
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
// ยืนยันการแก้ไขข้อมูล
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue