Merge branch 'develop' of https://github.com/Frappet/BMA-EHR-USER into develop
This commit is contained in:
commit
cc31b97dec
5 changed files with 93 additions and 20 deletions
|
|
@ -8,5 +8,7 @@ export default {
|
||||||
appealMainList:(status: string, type: string, year: number, page: number, pageSize: number, keyword: string)=>`${appeal}/user?status=${status}&type=${type}&year=${year}&page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
appealMainList:(status: string, type: string, year: number, page: number, pageSize: number, keyword: string)=>`${appeal}/user?status=${status}&type=${type}&year=${year}&page=${page}&pageSize=${pageSize}&keyword=${keyword}`,
|
||||||
appealAdd:()=>`${appeal}`,
|
appealAdd:()=>`${appeal}`,
|
||||||
|
|
||||||
appealByID:(id:string)=>`${appeal}/${id}`
|
appealByID:(id:string)=>`${appeal}/${id}`,
|
||||||
|
|
||||||
|
appealByPrintReport:(id:string)=>`${appeal}/report/${id}`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ export const useAppealComplainStore = defineStore("appealComplainStore", () => {
|
||||||
type: typeConvert(e.type),
|
type: typeConvert(e.type),
|
||||||
title: e.title,
|
title: e.title,
|
||||||
description: e.description,
|
description: e.description,
|
||||||
year: e.year,
|
year: e.year + 543,
|
||||||
fullname: e.fullname,
|
fullname: e.fullname,
|
||||||
citizenId: e.citizenId,
|
citizenId: e.citizenId,
|
||||||
caseType: e.caseType,
|
caseType: e.caseType,
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ function getProFile() {
|
||||||
formProfile.profileId = data.id;
|
formProfile.profileId = data.id;
|
||||||
formProfile.fullname = `${data.prefix}${data.firstName} ${data.lastName}`;
|
formProfile.fullname = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||||
formProfile.citizenId = data.citizenId;
|
formProfile.citizenId = data.citizenId;
|
||||||
|
formProfile.oc = data.oc;
|
||||||
|
formProfile.position = data.position;
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -45,10 +47,12 @@ function onSubmit(data: any) {
|
||||||
formData.append("title", data.title);
|
formData.append("title", data.title);
|
||||||
formData.append("description", data.description);
|
formData.append("description", data.description);
|
||||||
formData.append("type", data.type);
|
formData.append("type", data.type);
|
||||||
formData.append("year", data.year);
|
formData.append("year", '');
|
||||||
formData.append("caseType", data.caseType);
|
formData.append("caseType", '');
|
||||||
formData.append("caseNumber", data.caseNumber);
|
formData.append("caseNumber", '');
|
||||||
formData.append("file", data.files);
|
formData.append("file", data.files);
|
||||||
|
formData.append("oc", data.oc);
|
||||||
|
formData.append("position", data.position);
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
http
|
||||||
.post(config.API.appealAdd(), formData)
|
.post(config.API.appealAdd(), formData)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import { ref, onMounted, reactive } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import genReport from "@/plugins/genreport";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
|
|
@ -54,7 +55,6 @@ function getData() {
|
||||||
http
|
http
|
||||||
.get(config.API.appealByID(id.value))
|
.get(config.API.appealByID(id.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
|
||||||
const dataList = res.data.result;
|
const dataList = res.data.result;
|
||||||
data.id = dataList.id;
|
data.id = dataList.id;
|
||||||
data.title = dataList.title;
|
data.title = dataList.title;
|
||||||
|
|
@ -80,6 +80,23 @@ function getData() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getReport(fileName: string) {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.appealByPrintReport(id.value))
|
||||||
|
.then(async (res) => {
|
||||||
|
console.log(res.data.result.data);
|
||||||
|
const data = res.data.result
|
||||||
|
await genReport(data, fileName);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
|
|
@ -101,7 +118,7 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
แก้ไขอุทธรณ์/ร้องทุกข์
|
แก้ไขอุทธรณ์/ร้องทุกข์
|
||||||
</div>
|
</div>
|
||||||
<Form :data="data" />
|
<Form :data="data" :get-report="getReport" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,17 @@ import type {
|
||||||
HistoryStatusType,
|
HistoryStatusType,
|
||||||
FileObType,
|
FileObType,
|
||||||
} from "@/modules/07_appealComplain/interface/response/mainType";
|
} from "@/modules/07_appealComplain/interface/response/mainType";
|
||||||
|
|
||||||
|
import http from "@/plugins/http";
|
||||||
|
import config from "@/app.config";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
const isReadOnly = ref<boolean>(false);
|
const isReadOnly = ref<boolean>(false);
|
||||||
const printForm = ref<string>("");
|
const printForm = ref<string>("");
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm, modalWarning } = mixin;
|
const { dialogConfirm, modalWarning, showLoader, hideLoader, messageError } =
|
||||||
|
mixin;
|
||||||
const dataStore = useAppealComplainStore();
|
const dataStore = useAppealComplainStore();
|
||||||
|
|
||||||
const historyStatusOb = reactive<HistoryStatusType>({
|
const historyStatusOb = reactive<HistoryStatusType>({
|
||||||
|
|
@ -38,6 +43,8 @@ const formData = reactive<any>({
|
||||||
fullname: "",
|
fullname: "",
|
||||||
profileId: "",
|
profileId: "",
|
||||||
citizenId: "",
|
citizenId: "",
|
||||||
|
oc: "",
|
||||||
|
position: "",
|
||||||
disciplineComplaint_Appeal_Docs: [fileOb],
|
disciplineComplaint_Appeal_Docs: [fileOb],
|
||||||
historyStatus: [historyStatusOb],
|
historyStatus: [historyStatusOb],
|
||||||
});
|
});
|
||||||
|
|
@ -55,6 +62,10 @@ const props = defineProps({
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => "",
|
default: () => "",
|
||||||
},
|
},
|
||||||
|
getReport: {
|
||||||
|
type: Function,
|
||||||
|
default: () => "",
|
||||||
|
},
|
||||||
getData: {
|
getData: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => "",
|
default: () => "",
|
||||||
|
|
@ -105,6 +116,8 @@ watch(props.formProfile, () => {
|
||||||
formData.fullname = props.formProfile.fullname;
|
formData.fullname = props.formProfile.fullname;
|
||||||
formData.profileId = props.formProfile.profileId;
|
formData.profileId = props.formProfile.profileId;
|
||||||
formData.citizenId = props.formProfile.citizenId;
|
formData.citizenId = props.formProfile.citizenId;
|
||||||
|
formData.oc = props.formProfile.oc;
|
||||||
|
formData.position = props.formProfile.position;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -134,9 +147,6 @@ watch(props.data, () => {
|
||||||
// },
|
// },
|
||||||
// ]);
|
// ]);
|
||||||
});
|
});
|
||||||
function filePrint() {
|
|
||||||
console.log("print");
|
|
||||||
}
|
|
||||||
|
|
||||||
function inputEdit(val: boolean) {
|
function inputEdit(val: boolean) {
|
||||||
return {
|
return {
|
||||||
|
|
@ -148,6 +158,11 @@ function inputEdit(val: boolean) {
|
||||||
function downLoadFile(path: string) {
|
function downLoadFile(path: string) {
|
||||||
window.open(path, "_blank");
|
window.open(path, "_blank");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filePrintDownload(fileName: string) {
|
||||||
|
props.getReport(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
function onSubmit(data: any) {
|
function onSubmit(data: any) {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
|
|
@ -172,21 +187,22 @@ function onSubmit(data: any) {
|
||||||
v-model="printForm"
|
v-model="printForm"
|
||||||
color="blue"
|
color="blue"
|
||||||
label="พิมพ์แบบฟอร์มคำร้อง"
|
label="พิมพ์แบบฟอร์มคำร้อง"
|
||||||
@click="filePrint"
|
@click="filePrintDownload('แบบฟอร์มคำร้อง')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="q-gutter-sm" v-if="isReadOnly">
|
||||||
class="q-gutter-sm"
|
|
||||||
v-if="formData.status === 'NEW'"
|
|
||||||
>
|
|
||||||
<q-banner
|
<q-banner
|
||||||
inline-actions
|
inline-actions
|
||||||
bordered
|
bordered
|
||||||
class="bg-red-1 text-red border-red q-pa-md"
|
:class="
|
||||||
|
formData.status === 'NEW'
|
||||||
|
? 'bg-red-1 text-red border-red q-pa-md'
|
||||||
|
: 'bg-blue-1 text-blue border-blue q-pa-md'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-icon name="mdi-information-outline" size="20px" />
|
<q-icon name="mdi-information-outline" size="20px" />
|
||||||
คำอุทธรณ์/ร้องทุกข์นี้จะยังไม่สมบูรณ์
|
คำอุทธรณ์/ร้องทุกข์นี้จะยังไม่สมบูรณ์
|
||||||
จนกว่าผู้อุทธรณ์/ร้องทุกข์ จะ “Print แบบฟอร์มคำร้อง” จากระบบ
|
จนกว่าผู้อุทธรณ์/ร้องทุกข์ จะ “พิมพ์ แบบฟอร์มคำร้อง” จากระบบ
|
||||||
พร้อม เอกสารหลักฐานทั้งหมดเป็น Hard Copy <br />
|
พร้อม เอกสารหลักฐานทั้งหมดเป็น Hard Copy <br />
|
||||||
แล้วส่งไปรษณีย์ให้ กพค. หรือ
|
แล้วส่งไปรษณีย์ให้ กพค. หรือ
|
||||||
นำเอกสารทั้งหมดไปส่งด้วยตนเองที่ชั้น 14 อาคารศรีจุลทรัพย์
|
นำเอกสารทั้งหมดไปส่งด้วยตนเองที่ชั้น 14 อาคารศรีจุลทรัพย์
|
||||||
|
|
@ -249,7 +265,41 @@ function onSubmit(data: any) {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-gutter-x-sm">
|
|
||||||
|
|
||||||
|
<!-- <div class="row q-col-gutter-x-sm">
|
||||||
|
<div class="col-6">
|
||||||
|
<q-input
|
||||||
|
:class="inputEdit(isReadOnly)"
|
||||||
|
:readonly="isReadOnly"
|
||||||
|
ref="ocRef"
|
||||||
|
v-model="formData.oc"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
:rules="[(val) => !!val || 'กรุณากรอกสังกัด']"
|
||||||
|
lazy-rules
|
||||||
|
label="สังกัด"
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<q-input
|
||||||
|
:class="inputEdit(isReadOnly)"
|
||||||
|
:readonly="isReadOnly"
|
||||||
|
ref="ocRef"
|
||||||
|
v-model="formData.position"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
:rules="[(val) => !!val || 'กรุณากรอกสังกัด']"
|
||||||
|
lazy-rules
|
||||||
|
label="สังกัด"
|
||||||
|
hide-bottom-space
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div> -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div class="row q-gutter-x-sm">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<datepicker
|
<datepicker
|
||||||
menu-class-name="modalfix"
|
menu-class-name="modalfix"
|
||||||
|
|
@ -316,7 +366,7 @@ function onSubmit(data: any) {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="row" v-if="!isReadOnly">
|
<div class="row" v-if="!isReadOnly">
|
||||||
<!-- multiple
|
<!-- multiple
|
||||||
use-chips -->
|
use-chips -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue