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