Merge branch 'develop' into warunee-dev
This commit is contained in:
commit
d4211c6dd5
3 changed files with 93 additions and 14 deletions
|
|
@ -32,7 +32,7 @@ export default {
|
||||||
listExitInterview: () => `${retirement}/resign/questionnaire`,
|
listExitInterview: () => `${retirement}/resign/questionnaire`,
|
||||||
ExitInterviewByid: (id: string) => `${retirement}/resign/questionnaire/${id}`,
|
ExitInterviewByid: (id: string) => `${retirement}/resign/questionnaire/${id}`,
|
||||||
ExitInterviewReport: `${retirement}/resign/questionnaire/report`,
|
ExitInterviewReport: `${retirement}/resign/questionnaire/report`,
|
||||||
AppointInterview:(id: string) =>`${retirement}/resign/questionnaire/appoint/${id}`,
|
AppointInterview: (id: string) => `${retirement}/resign/questionnaire/appoint/${id}`,
|
||||||
// ปลดออก
|
// ปลดออก
|
||||||
retirementDischarge,
|
retirementDischarge,
|
||||||
listDischarge: () => `${retirement}/discharge`,
|
listDischarge: () => `${retirement}/discharge`,
|
||||||
|
|
@ -52,5 +52,9 @@ export default {
|
||||||
outReport: `${retirement}/out/report`,
|
outReport: `${retirement}/out/report`,
|
||||||
|
|
||||||
fileRetirement: (id: string) => `${retirement}/upload/${id}`,
|
fileRetirement: (id: string) => `${retirement}/upload/${id}`,
|
||||||
checkfileupload: (id: string) => `${retirement}/upload/check/${id}`
|
checkfileupload: (id: string) => `${retirement}/upload/check/${id}`,
|
||||||
|
|
||||||
|
editDetail: (retireId: string) => `${retirement}/detail/${retireId}`
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
const reason = ref<string>("");
|
const reason = ref<string | undefined>("");
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modal: {
|
modal: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -18,16 +18,21 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
clickClose: {
|
clickClose: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => { },
|
default: () => {},
|
||||||
},
|
},
|
||||||
savaForm: {
|
savaForm: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => { },
|
default: () => {},
|
||||||
|
},
|
||||||
|
textReport: {
|
||||||
|
type: String,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
watch(props, () => {
|
watch(props, () => {
|
||||||
if (props.modal === true) {
|
if (props.modal === true && props.textReport == "") {
|
||||||
reason.value = "";
|
reason.value = "";
|
||||||
|
} else {
|
||||||
|
reason.value = props.textReport;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -51,18 +56,31 @@ const submit = () => {
|
||||||
<div class="row col-12 q-col-gutter-sm">
|
<div class="row col-12 q-col-gutter-sm">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<div class="col-12 row q-py-sm items-center q-col-gutter-sm">
|
<div class="col-12 row q-py-sm items-center q-col-gutter-sm">
|
||||||
|
<q-input
|
||||||
<q-input type="textarea" class="full-width inputgreen cursor-pointer" hide-bottom-space outlined dense
|
type="textarea"
|
||||||
lazy-rules :rules="[(val) => !!val || `กรุณากรอก${label}`]" v-model="reason" :label="`${label}`" />
|
class="full-width inputgreen cursor-pointer"
|
||||||
|
hide-bottom-space
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:rules="[(val) => !!val || `กรุณากรอก${label}`]"
|
||||||
|
v-model="reason"
|
||||||
|
:label="`${label}`"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn dense unelevated label="บันทึก" color="public" @click="submit" class="q-px-md">
|
<q-btn
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
label="บันทึก"
|
||||||
|
color="public"
|
||||||
|
@click="submit"
|
||||||
|
class="q-px-md"
|
||||||
|
>
|
||||||
<!-- icon="mdi-content-save-outline" -->
|
<!-- icon="mdi-content-save-outline" -->
|
||||||
<q-tooltip>บันทึก</q-tooltip>
|
<q-tooltip>บันทึก</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,13 @@ import { useRouter } from "vue-router";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { showLoader, hideLoader, messageError, success } = mixin;
|
const { showLoader, hideLoader, messageError, success, dialogConfirm } = mixin;
|
||||||
// const type_params = route.params.type;
|
// const type_params = route.params.type;
|
||||||
// const year_params = route.params.year;
|
// const year_params = route.params.year;
|
||||||
const retireld_params = route.params.retirementId;
|
const retireld_params = route.params.retirementId;
|
||||||
|
|
@ -26,6 +27,8 @@ const retireld = ref<string>(retireld_params.toString());
|
||||||
const profileId = ref<string>("");
|
const profileId = ref<string>("");
|
||||||
const filter = ref<string>("");
|
const filter = ref<string>("");
|
||||||
const statusUpload = ref<boolean>();
|
const statusUpload = ref<boolean>();
|
||||||
|
const modalEdit = ref<boolean>(false);
|
||||||
|
const textReport = ref<string>("");
|
||||||
|
|
||||||
const columns = ref<any["columns"]>([
|
const columns = ref<any["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -177,6 +180,7 @@ const fecthlistprofile = async (id: string) => {
|
||||||
round.value = res.data.result.round;
|
round.value = res.data.result.round;
|
||||||
statusReport.value = res.data.result.json;
|
statusReport.value = res.data.result.json;
|
||||||
typeReport.value = res.data.result.typeReport;
|
typeReport.value = res.data.result.typeReport;
|
||||||
|
textReport.value = res.data.result.detail;
|
||||||
rows.value = res.data.result.profile.map((e: any) => ({
|
rows.value = res.data.result.profile.map((e: any) => ({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
profileId: e.profileId,
|
profileId: e.profileId,
|
||||||
|
|
@ -312,6 +316,7 @@ const uploadFile = async (event: any) => {
|
||||||
console.log(selectedFile);
|
console.log(selectedFile);
|
||||||
const formdata = new FormData();
|
const formdata = new FormData();
|
||||||
formdata.append("file", selectedFile);
|
formdata.append("file", selectedFile);
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.put(config.API.fileRetirement(retireld.value.toString()), formdata)
|
.put(config.API.fileRetirement(retireld.value.toString()), formdata)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
@ -381,6 +386,36 @@ const downloadFile = (response: any, filename: string) => {
|
||||||
// return "color: #26a69a;";
|
// return "color: #26a69a;";
|
||||||
// } else return "";
|
// } else return "";
|
||||||
// };
|
// };
|
||||||
|
const saveEdiitReport = (reason: string) => {
|
||||||
|
const formdata = new FormData();
|
||||||
|
formdata.append("Detail", reason);
|
||||||
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
async () => {
|
||||||
|
await http
|
||||||
|
.put(config.API.editDetail(retireld.value), formdata)
|
||||||
|
.then(() => {
|
||||||
|
success($q, "แก้ไขข้อความสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
messageError($q, err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
fecthlistprofile(retireld.value);
|
||||||
|
closemodalEditReport();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
"ยืนยันการแก้ไขข้อมูล",
|
||||||
|
"ต้องการยืนยันการแก้ไขข้อมูลนี้หรือไม่ ?"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
const openmodalEditReport = () => {
|
||||||
|
modalEdit.value = true;
|
||||||
|
};
|
||||||
|
const closemodalEditReport = () => {
|
||||||
|
modalEdit.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
const paging = ref<boolean>(true);
|
const paging = ref<boolean>(true);
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
sortBy: "order",
|
sortBy: "order",
|
||||||
|
|
@ -427,9 +462,22 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
<!-- <q-btn flat round style="color: #016987;" icon="save" @click="saveList">
|
<!-- <q-btn flat round style="color: #016987;" icon="save" @click="saveList">
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
</q-btn> -->
|
</q-btn> -->
|
||||||
<q-btn color="primary" flat round icon="download">
|
<q-btn color="primary" flat round icon="mdi-dots-vertical">
|
||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list style="min-width: 100px">
|
<q-list style="min-width: 100px">
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
type="a"
|
||||||
|
@click="openmodalEditReport()"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<q-item-section avatar
|
||||||
|
><q-icon color="primary" name="mdi-pencil"
|
||||||
|
/></q-item-section>
|
||||||
|
<q-item-section>แก้ไข มติ อ.ก.ก. </q-item-section>
|
||||||
|
</q-item>
|
||||||
|
<q-separator />
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
|
|
@ -743,6 +791,15 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
|
<DialogPopupReason
|
||||||
|
:modal="modalEdit"
|
||||||
|
title="แก้ไขมติ อ.ก.ก."
|
||||||
|
label="มติ อ.ก.ก."
|
||||||
|
:click-close="closemodalEditReport"
|
||||||
|
:savaForm="saveEdiitReport"
|
||||||
|
:textReport="textReport"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scope>
|
<style lang="scss" scope>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue