Merge branch 'nice' into develop
This commit is contained in:
commit
506739061f
11 changed files with 414 additions and 92 deletions
|
|
@ -13,38 +13,36 @@ const { dialogConfirm, showLoader, hideLoader, messageError } =
|
|||
useCounterMixin();
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const { stateId } = defineProps({
|
||||
stateId: { type: String, require: true },
|
||||
const props = defineProps({
|
||||
dataUserComment: { type: Object, require: true },
|
||||
fetchData: { type: Function, require: true },
|
||||
});
|
||||
|
||||
const isAcceptSetting = ref<boolean>(false);
|
||||
const isApproveSetting = ref<boolean>(false);
|
||||
const isReasonSetting = ref<boolean>(false);
|
||||
|
||||
const stateUserCommentId = ref<string>("");
|
||||
const isAccept = ref<boolean>(false);
|
||||
const isApprove = ref<string>("");
|
||||
const reason = ref<string>("");
|
||||
|
||||
async function fetchData() {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.workflow + `comment-state-user`, { stateId: stateId })
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
isAcceptSetting.value = data.isAcceptSetting;
|
||||
isApproveSetting.value = data.isApproveSetting;
|
||||
isReasonSetting.value = data.isReasonSetting;
|
||||
|
||||
isAccept.value = data.isAccept;
|
||||
isApprove.value = data.isApprove ? "approve" : "";
|
||||
reason.value = data.reason;
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
const data = props.dataUserComment;
|
||||
if (data) {
|
||||
stateUserCommentId.value = data.id;
|
||||
isAcceptSetting.value = data.isAcceptSetting;
|
||||
isApproveSetting.value = data.isApproveSetting;
|
||||
isReasonSetting.value = data.isReasonSetting;
|
||||
isAccept.value = data.isAccept;
|
||||
isApprove.value =
|
||||
data.isApprove === true
|
||||
? "approve"
|
||||
: data.isApprove === false
|
||||
? "reject"
|
||||
: "";
|
||||
reason.value = data.reason;
|
||||
}
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
|
@ -52,7 +50,7 @@ function onSubmit() {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.workflow + `comment`, {
|
||||
stateId: stateId,
|
||||
stateUserCommentId: stateUserCommentId.value,
|
||||
isAccept: isAcceptSetting.value ? isAccept.value : undefined,
|
||||
isApprove: isApproveSetting.value
|
||||
? isApprove.value === "approve"
|
||||
|
|
@ -62,6 +60,7 @@ function onSubmit() {
|
|||
reason: isReasonSetting.value ? reason.value : undefined,
|
||||
})
|
||||
.then(async () => {
|
||||
await props.fetchData?.();
|
||||
onCloseModal();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -135,6 +134,7 @@ watch(modal, (val) => {
|
|||
<div class="q-pa-sm q-gutter-sm">
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
class="inputgreen"
|
||||
dense
|
||||
outlined
|
||||
label="ความเห็น"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const { dialogConfirm, showLoader, hideLoader, messageError } =
|
|||
useCounterMixin();
|
||||
|
||||
const modal = defineModel<boolean>("modal", { required: true });
|
||||
const { stateId, fetchData } = defineProps({
|
||||
const props = defineProps({
|
||||
stateId: { type: String, require: true },
|
||||
fetchData: { type: Function, require: true },
|
||||
});
|
||||
|
|
@ -89,14 +89,14 @@ function onSubmit() {
|
|||
showLoader();
|
||||
await http
|
||||
.post(config.API.workflow + `add-step`, {
|
||||
stateId: stateId,
|
||||
stateId: props.stateId,
|
||||
profileId: selected.value[0].id,
|
||||
isAcceptSetting: isAcceptSetting.value,
|
||||
isApproveSetting: isApproveSetting.value,
|
||||
isReasonSetting: isReasonSetting.value,
|
||||
})
|
||||
.then(async () => {
|
||||
await fetchData?.();
|
||||
await props.fetchData?.();
|
||||
onCloseModal();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
|
@ -112,6 +112,9 @@ function onCloseModal() {
|
|||
modal.value = false;
|
||||
selected.value = [];
|
||||
rows.value = [];
|
||||
isAcceptSetting.value = false;
|
||||
isApproveSetting.value = false;
|
||||
isReasonSetting.value = false;
|
||||
}
|
||||
|
||||
watch(modal, (val) => {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ const { id, sysName } = defineProps({
|
|||
|
||||
const stateId = ref<string>(""); //id state ปัจุบัน
|
||||
const state = ref<number>(1); //state ปัจุบัน
|
||||
const dataUserComment = ref<any>();
|
||||
|
||||
const isPermission = ref<boolean>(true); //การเข้าถึง Workflow
|
||||
const permission = ref<Permission>({
|
||||
|
|
@ -47,8 +48,12 @@ async function fetchCheckState() {
|
|||
.then(async (res) => {
|
||||
await fetchData();
|
||||
const data = await res.data.result;
|
||||
|
||||
stateId.value = data.stateId;
|
||||
state.value = data.stateNo === 4 ? 5 : data.stateNo;
|
||||
state.value =
|
||||
data.stateNo === itemState.value.length
|
||||
? data.stateNo + 1
|
||||
: data.stateNo;
|
||||
permission.value = {
|
||||
isChangeState: data.can_change_state,
|
||||
isOperate: data.can_operate,
|
||||
|
|
@ -112,11 +117,6 @@ defineExpose({
|
|||
<div class="bg-grey-1 q-pa-sm col-12 row items-center">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">Workflow</div>
|
||||
<q-space />
|
||||
<q-btn
|
||||
@click.prevent="modalApprove = true"
|
||||
label="DialogApprove"
|
||||
color="public"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-card-section>
|
||||
|
|
@ -154,10 +154,7 @@ defineExpose({
|
|||
>
|
||||
<div v-if="step.stateUserComments.length !== 0">
|
||||
<q-list bordered separator style="min-width: 20vw">
|
||||
<q-item
|
||||
v-for="(item, index) in step.stateUserComments"
|
||||
:key="index"
|
||||
>
|
||||
<q-item v-for="item in step.stateUserComments">
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
{{ `${item.prefix}${item.firstName} ${item.lastName}` }}
|
||||
|
|
@ -169,19 +166,32 @@ defineExpose({
|
|||
</q-item-section>
|
||||
|
||||
<q-item-section side top>
|
||||
<q-item-label class="text-green">
|
||||
<q-item-label
|
||||
:class="!item.isApprove ? 'text-red' : 'text-green'"
|
||||
>
|
||||
{{
|
||||
item.isAcceptSetting
|
||||
? item.isAccept
|
||||
? "รับทราบ"
|
||||
: ""
|
||||
: item.isApproveSetting
|
||||
? item.isApprove
|
||||
? item.isApprove === true
|
||||
? "อนุมันติ"
|
||||
: item.isApprove === false
|
||||
? "ไม่อนุมันติ"
|
||||
: ""
|
||||
: ""
|
||||
}}</q-item-label
|
||||
>
|
||||
}}
|
||||
</q-item-label>
|
||||
|
||||
<q-btn
|
||||
v-if="item.isComment && state === index + 1"
|
||||
@click.prevent="
|
||||
(dataUserComment = item), (modalApprove = true)
|
||||
"
|
||||
label="แสดงความเห็น"
|
||||
color="public"
|
||||
/>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
|
@ -215,5 +225,9 @@ defineExpose({
|
|||
:fetch-data="fetchCheckState"
|
||||
/>
|
||||
|
||||
<DialogApprove v-model:modal="modalApprove" :state-id="stateId" />
|
||||
<DialogApprove
|
||||
v-model:modal="modalApprove"
|
||||
:data-user-comment="dataUserComment"
|
||||
:fetch-data="fetchCheckState"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ interface StateUserComments {
|
|||
firstName: string;
|
||||
lastName: string;
|
||||
prefix: string;
|
||||
isComment: boolean;
|
||||
}
|
||||
|
||||
interface DataCommander {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { useQuasar } from "quasar";
|
|||
|
||||
import { useRequestEditStore } from "@/modules/04_registryPerson/stores/RequestEdit";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRouter } from "vue-router";
|
||||
import config from "@/app.config";
|
||||
import http from "@/plugins/http";
|
||||
|
||||
|
|
@ -12,21 +13,23 @@ import type { QTableProps } from "quasar";
|
|||
import type {
|
||||
DataOption,
|
||||
Pagination,
|
||||
Request,
|
||||
} from "@/modules/04_registryPerson/interface/index/Main";
|
||||
import type { DateRequest } from "@/modules/04_registryPerson/interface/response/Main";
|
||||
import type { DataRequest } from "@/modules/04_registryPerson/interface/response/Main";
|
||||
|
||||
/** importComponents*/
|
||||
import DialogStatus from "@/modules/04_registryPerson/components/requestEdit/Dialog01_EditStatus.vue";
|
||||
import DialogUpdate from "@/modules/04_registryPerson/components/Dialog/DialogUpdate.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const store = useRequestEditStore();
|
||||
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
||||
|
||||
//Table
|
||||
const idCard = ref<string>("");
|
||||
const profileId = ref<string>("");
|
||||
const rows = ref<DateRequest[]>([]); //รายการข้อมูลคำร้องขอแก้ไขทะเบียนประวัติ
|
||||
const rows = ref<DataRequest[]>([]); //รายการข้อมูลคำร้องขอแก้ไขทะเบียนประวัติ
|
||||
const page = ref<number>(1); //หน้า
|
||||
const pageSize = ref<number>(10); //จำนวนต่อหน้า
|
||||
const rowsTotal = ref<number>(0); //จำนวนรายการ
|
||||
|
|
@ -176,14 +179,15 @@ function filterOption(val: string, update: Function) {
|
|||
* funciton แก่ไขคำร้อง
|
||||
* @param id รายการคำร้อง
|
||||
*/
|
||||
function onclickEdit(data: any) {
|
||||
function onclickEdit(data: Request) {
|
||||
requestId.value = data.id;
|
||||
if (data.topic == "ขออัปเดตข้อมูลจากกรมการปกครอง") {
|
||||
modalUpdate.value = true;
|
||||
idCard.value = data.idcard as string;
|
||||
profileId.value = data.profileId;
|
||||
} else {
|
||||
modalStatus.value = true;
|
||||
// modalStatus.value = true;
|
||||
router.push(`/registry-officer/request-edit/personal/${data.id}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -416,7 +420,7 @@ onMounted(() => {
|
|||
v-model:id-card="idCard"
|
||||
v-model:profile-id="profileId"
|
||||
:fetch-data="fetchListRequset"
|
||||
:request-id=requestId
|
||||
:request-id="requestId"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ const isReadOnly = ref<boolean>(false); //อ่ายได้อย่าง
|
|||
//ฟอร์มสถานะคำร้อง
|
||||
const formData = reactive({
|
||||
status: "", //สถานะ
|
||||
remark: "", //หมายเหตุ
|
||||
remark: "", //หมายเหตุแ
|
||||
});
|
||||
//ข้อมูลรายการสถานะ
|
||||
const statusOptionMain = ref<DataOption[]>(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,270 @@
|
|||
<script setup lang="ts">
|
||||
import { onMounted, ref, reactive } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import { useRequestEditStore } from "@/modules/04_registryPerson/stores/RequestEdit";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
import type { DataOption } from "@/modules/04_registryPerson/interface/index/Main";
|
||||
import type { DataRequest } from "@/modules/04_registryPerson/interface/response/Main";
|
||||
|
||||
import Workflow from "@/components/Workflow/Main.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const store = useRequestEditStore();
|
||||
const { date2Thai, showLoader, hideLoader, messageError, success } =
|
||||
useCounterMixin();
|
||||
|
||||
const requestId = ref<string>(route.params.id.toString());
|
||||
const dataRequest = ref<any>({
|
||||
fullname: "",
|
||||
createdAt: null,
|
||||
topic: "",
|
||||
detail: "",
|
||||
});
|
||||
|
||||
//ฟอร์มสถานะคำร้อง
|
||||
const formData = reactive({
|
||||
status: "", //สถานะ
|
||||
remark: "", //หมายเหตุ
|
||||
});
|
||||
|
||||
const isReadOnly = ref<boolean>(false); //อ่ายได้อย่างเดียว
|
||||
//ข้อมูลรายการสถานะ
|
||||
const statusOptionMain = ref<DataOption[]>(
|
||||
store.optionStatus.filter((e) => e.id !== "")
|
||||
);
|
||||
const statusOption = ref<DataOption[]>(statusOptionMain.value); //ตัวเลือกรายการสถานะ
|
||||
|
||||
/** function fetch ข้อมูลคำร้องแก้ไข*/
|
||||
async function fetchDataRequest() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.requestEdit + `${requestId.value}`)
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
dataRequest.value = {
|
||||
fullname: data.fullname,
|
||||
createdAt: data.createdAt,
|
||||
topic: data.topic,
|
||||
detail: data.detail,
|
||||
};
|
||||
|
||||
// formData.status = data.status;
|
||||
// formData.remark = data.remark;
|
||||
// if (data.status !== "PENDING") {
|
||||
// isReadOnly.value = true;
|
||||
// } else {
|
||||
// isReadOnly.value = false;
|
||||
// }
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* function ค้นหาคำใน select สถานะคำร้อง
|
||||
* @param val คำค้น
|
||||
* @param update Function
|
||||
*/
|
||||
function filterOption(val: string, update: Function) {
|
||||
update(() => {
|
||||
statusOption.value = statusOptionMain.value.filter(
|
||||
(v: DataOption) => v.name.indexOf(val) > -1
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* class inpui
|
||||
* @param val ค่าสถานะ
|
||||
*/
|
||||
function classInput(val: boolean) {
|
||||
return {
|
||||
"full-width cursor-pointer ": val,
|
||||
"full-width cursor-pointer inputgreen": !val,
|
||||
};
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchDataRequest();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="row items-center">
|
||||
<div class="toptitle text-dark row items-center q-py-xs">
|
||||
<q-btn
|
||||
icon="mdi-arrow-left"
|
||||
unelevated
|
||||
round
|
||||
dense
|
||||
flat
|
||||
color="primary"
|
||||
class="q-mr-sm"
|
||||
@click="router.go(-1)"
|
||||
/>
|
||||
รายละเอียดคำร้องขอแก้ไขทะเบียนประวัติของ{{ dataRequest.fullname }}
|
||||
</div>
|
||||
</div>
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="row q-gutter-sm">
|
||||
<!-- รายละเอียดคำร้องขอแก้ไข -->
|
||||
<q-card bordered class="row col-12">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">
|
||||
รายละเอียดคำร้องขอแก้ไข
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-card-section class="col-12">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<!-- วันที่ยื่นขอ -->
|
||||
<div class="col-md-2 col-xs-12">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="dataRequest.createdAt"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
readonly
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
>
|
||||
<template #year="{ year }">
|
||||
{{ year + 543 }}
|
||||
</template>
|
||||
<template #year-overlay-value="{ value }">
|
||||
{{ parseInt(value + 543) }}
|
||||
</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
outlined
|
||||
readonly
|
||||
dense
|
||||
hide-bottom-space
|
||||
class="full-width"
|
||||
:model-value="
|
||||
dataRequest.createdAt != null
|
||||
? date2Thai(dataRequest.createdAt)
|
||||
: null
|
||||
"
|
||||
:label="`${'วันที่ยื่นขอ'}`"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
|
||||
<!-- เรื่อง -->
|
||||
<div class="col-md-10 col-xs-12">
|
||||
<q-input
|
||||
:class="classInput(true)"
|
||||
readonly
|
||||
v-model="dataRequest.topic"
|
||||
label="เรื่อง"
|
||||
dense
|
||||
outlined
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- รายละเอียด -->
|
||||
<div class="col-12">
|
||||
<q-input
|
||||
:class="classInput(true)"
|
||||
readonly
|
||||
v-model="dataRequest.detail"
|
||||
label="รายละเอียด"
|
||||
dense
|
||||
outlined
|
||||
type="textarea"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
<!-- แก้ไขสถานะคำร้อง -->
|
||||
<q-card bordered class="row col-12">
|
||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center">
|
||||
<div class="q-pl-sm text-weight-bold text-dark">
|
||||
แก้ไขสถานะคำร้อง
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-card-section class="col-12">
|
||||
<div class="row q-col-gutter-sm">
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<q-select
|
||||
:class="classInput(isReadOnly)"
|
||||
:readonly="isReadOnly"
|
||||
v-model="formData.status"
|
||||
label="สถานะ"
|
||||
dense
|
||||
outlined
|
||||
emit-value
|
||||
map-options
|
||||
:options="statusOption"
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกสถานะ'}`]"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
use-input
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
@filter="(inputValue:string,
|
||||
doneFn:Function) => filterOption(inputValue, doneFn
|
||||
) "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-md-12">
|
||||
<q-input
|
||||
:class="classInput(isReadOnly)"
|
||||
:readonly="isReadOnly"
|
||||
v-model="formData.remark"
|
||||
label="หมายเหตุ"
|
||||
dense
|
||||
outlined
|
||||
type="textarea"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
||||
<div class="col-12">
|
||||
<Workflow :id="requestId" sys-name=" REGISTRY_PROFILE" />
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
@ -72,6 +72,21 @@ interface DataItemsDevelopment {
|
|||
label: string;
|
||||
}
|
||||
|
||||
interface Request {
|
||||
createdAt: string;
|
||||
createdFullName: string;
|
||||
detail: string;
|
||||
fullname: string;
|
||||
id: string;
|
||||
idcard: string;
|
||||
lastUpdateFullName: string;
|
||||
lastUpdatedAt: string;
|
||||
profileId: string;
|
||||
remark: string;
|
||||
status: string;
|
||||
topic: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
Pagination,
|
||||
DataOption,
|
||||
|
|
@ -86,4 +101,5 @@ export type {
|
|||
DataOptionEducation,
|
||||
DataOptionEducationLevel,
|
||||
DataItemsDevelopment,
|
||||
Request,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ interface DataPerson {
|
|||
rank?: string;
|
||||
}
|
||||
|
||||
interface DateRequest {
|
||||
interface DataRequest {
|
||||
createdAt: string;
|
||||
createdFullName: string;
|
||||
detail: string;
|
||||
|
|
@ -182,7 +182,7 @@ export type {
|
|||
DataType,
|
||||
DataLevel,
|
||||
DataPerson,
|
||||
DateRequest,
|
||||
DataRequest,
|
||||
DataProfile,
|
||||
DataLeave,
|
||||
DataLeaveType,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ const detailPage = () =>
|
|||
// รายการคำร้องขอแก้ไขทะเบียนประวัติ
|
||||
const requestEdit = () =>
|
||||
import("@/modules/04_registryPerson/views/requestEditView.vue");
|
||||
const Page01_Detail = () =>
|
||||
import(
|
||||
"@/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue"
|
||||
);
|
||||
|
||||
export default [
|
||||
{
|
||||
|
|
@ -60,4 +64,14 @@ export default [
|
|||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/registry-officer/request-edit/personal/:id",
|
||||
name: "registryNewRequestEdit/personal",
|
||||
component: Page01_Detail,
|
||||
meta: {
|
||||
Auth: true,
|
||||
Key: "SYS_REGISTRY_OFFICER",
|
||||
Role: "STAFF",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
|||
|
|
@ -329,45 +329,45 @@ function checkLeaveType(leaveTypeId: string, formData: FremData) {
|
|||
}
|
||||
|
||||
/** Function dialog*/
|
||||
async function openModal(data: string) {
|
||||
if (data === "approve") {
|
||||
modalApprove.value = true;
|
||||
dialogTitle.value = "อนุมัติ";
|
||||
}
|
||||
if (data === "UnApprove") {
|
||||
modalApprove.value = true;
|
||||
dialogTitle.value = "ไม่อนุมัติ";
|
||||
}
|
||||
if (data === "authority") {
|
||||
modalApprove.value = true;
|
||||
dialogTitle.value = "ส่งไปยังผู้มีอำนาจ";
|
||||
dialogLabel.value = "ความคิดเห็น";
|
||||
}
|
||||
}
|
||||
// async function openModal(data: string) {
|
||||
// if (data === "approve") {
|
||||
// modalApprove.value = true;
|
||||
// dialogTitle.value = "อนุมัติ";
|
||||
// }
|
||||
// if (data === "UnApprove") {
|
||||
// modalApprove.value = true;
|
||||
// dialogTitle.value = "ไม่อนุมัติ";
|
||||
// }
|
||||
// if (data === "authority") {
|
||||
// modalApprove.value = true;
|
||||
// dialogTitle.value = "ส่งไปยังผู้มีอำนาจ";
|
||||
// dialogLabel.value = "ความคิดเห็น";
|
||||
// }
|
||||
// }
|
||||
|
||||
/** function ส่งไปผู้บังคับบัญชา*/
|
||||
function sendToCommand() {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.leaveApproveToComander(formData.id))
|
||||
.then(async () => {
|
||||
await fetchDetailLeave(paramsId);
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
},
|
||||
"ยืนยันการส่งไปผู้บังคับบัญชา",
|
||||
"ต้องการยืนยันการส่งไปผู้บังคับบัญชานี้ใช่หรือไม่ ?"
|
||||
);
|
||||
}
|
||||
// function sendToCommand() {
|
||||
// dialogConfirm(
|
||||
// $q,
|
||||
// async () => {
|
||||
// showLoader();
|
||||
// await http
|
||||
// .get(config.API.leaveApproveToComander(formData.id))
|
||||
// .then(async () => {
|
||||
// await fetchDetailLeave(paramsId);
|
||||
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
// })
|
||||
// .catch((err) => {
|
||||
// messageError($q, err);
|
||||
// })
|
||||
// .finally(async () => {
|
||||
// hideLoader();
|
||||
// });
|
||||
// },
|
||||
// "ยืนยันการส่งไปผู้บังคับบัญชา",
|
||||
// "ต้องการยืนยันการส่งไปผู้บังคับบัญชานี้ใช่หรือไม่ ?"
|
||||
// );
|
||||
// }
|
||||
|
||||
/** Function Save */
|
||||
function clickSave(reason: string) {
|
||||
|
|
@ -695,7 +695,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<!-- ความคิดเห็นของผู้บังคับบัญชา -->
|
||||
<div
|
||||
<!-- <div
|
||||
class="col-xs-12 col-sm-12 row"
|
||||
v-if="
|
||||
formData.approveStep === 'st3' ||
|
||||
|
|
@ -722,10 +722,10 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- ความคิดเห็นของผู้มีอำนาจ -->
|
||||
<div
|
||||
<!-- <div
|
||||
class="col-xs-12 col-sm-12 row"
|
||||
v-if="
|
||||
formData.approveStep === 'st4' || formData.approveStep === 'st5'
|
||||
|
|
@ -761,7 +761,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- Workflow -->
|
||||
|
|
@ -771,8 +771,8 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<q-separator v-if="checkPermission($route)?.attrIsUpdate" />
|
||||
<div class="row q-pa-md q-gutter-md justify-end">
|
||||
<!-- <q-separator v-if="checkPermission($route)?.attrIsUpdate" /> -->
|
||||
<!-- <div class="row q-pa-md q-gutter-md justify-end">
|
||||
<q-btn
|
||||
v-if="
|
||||
formData.approveStep === 'st1' &&
|
||||
|
|
@ -823,7 +823,7 @@ onMounted(async () => {
|
|||
@click="openModal('approve')"
|
||||
><q-tooltip>อนุมัติ</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div> -->
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue