update wrokflow
This commit is contained in:
parent
b4c7ee8129
commit
ecb5e6b7c3
11 changed files with 414 additions and 92 deletions
|
|
@ -13,38 +13,36 @@ const { dialogConfirm, showLoader, hideLoader, messageError } =
|
||||||
useCounterMixin();
|
useCounterMixin();
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const { stateId } = defineProps({
|
const props = defineProps({
|
||||||
stateId: { type: String, require: true },
|
dataUserComment: { type: Object, require: true },
|
||||||
|
fetchData: { type: Function, require: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
const isAcceptSetting = ref<boolean>(false);
|
const isAcceptSetting = ref<boolean>(false);
|
||||||
const isApproveSetting = ref<boolean>(false);
|
const isApproveSetting = ref<boolean>(false);
|
||||||
const isReasonSetting = ref<boolean>(false);
|
const isReasonSetting = ref<boolean>(false);
|
||||||
|
|
||||||
|
const stateUserCommentId = ref<string>("");
|
||||||
const isAccept = ref<boolean>(false);
|
const isAccept = ref<boolean>(false);
|
||||||
const isApprove = ref<string>("");
|
const isApprove = ref<string>("");
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
|
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
showLoader();
|
const data = props.dataUserComment;
|
||||||
await http
|
if (data) {
|
||||||
.post(config.API.workflow + `comment-state-user`, { stateId: stateId })
|
stateUserCommentId.value = data.id;
|
||||||
.then(async (res) => {
|
isAcceptSetting.value = data.isAcceptSetting;
|
||||||
const data = res.data.result;
|
isApproveSetting.value = data.isApproveSetting;
|
||||||
isAcceptSetting.value = data.isAcceptSetting;
|
isReasonSetting.value = data.isReasonSetting;
|
||||||
isApproveSetting.value = data.isApproveSetting;
|
isAccept.value = data.isAccept;
|
||||||
isReasonSetting.value = data.isReasonSetting;
|
isApprove.value =
|
||||||
|
data.isApprove === true
|
||||||
isAccept.value = data.isAccept;
|
? "approve"
|
||||||
isApprove.value = data.isApprove ? "approve" : "";
|
: data.isApprove === false
|
||||||
reason.value = data.reason;
|
? "reject"
|
||||||
})
|
: "";
|
||||||
.catch((err) => {
|
reason.value = data.reason;
|
||||||
messageError($q, err);
|
}
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
|
|
@ -52,7 +50,7 @@ function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.workflow + `comment`, {
|
.post(config.API.workflow + `comment`, {
|
||||||
stateId: stateId,
|
stateUserCommentId: stateUserCommentId.value,
|
||||||
isAccept: isAcceptSetting.value ? isAccept.value : undefined,
|
isAccept: isAcceptSetting.value ? isAccept.value : undefined,
|
||||||
isApprove: isApproveSetting.value
|
isApprove: isApproveSetting.value
|
||||||
? isApprove.value === "approve"
|
? isApprove.value === "approve"
|
||||||
|
|
@ -62,6 +60,7 @@ function onSubmit() {
|
||||||
reason: isReasonSetting.value ? reason.value : undefined,
|
reason: isReasonSetting.value ? reason.value : undefined,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
|
await props.fetchData?.();
|
||||||
onCloseModal();
|
onCloseModal();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -135,6 +134,7 @@ watch(modal, (val) => {
|
||||||
<div class="q-pa-sm q-gutter-sm">
|
<div class="q-pa-sm q-gutter-sm">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
class="inputgreen"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
label="ความเห็น"
|
label="ความเห็น"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ const { dialogConfirm, showLoader, hideLoader, messageError } =
|
||||||
useCounterMixin();
|
useCounterMixin();
|
||||||
|
|
||||||
const modal = defineModel<boolean>("modal", { required: true });
|
const modal = defineModel<boolean>("modal", { required: true });
|
||||||
const { stateId, fetchData } = defineProps({
|
const props = defineProps({
|
||||||
stateId: { type: String, require: true },
|
stateId: { type: String, require: true },
|
||||||
fetchData: { type: Function, require: true },
|
fetchData: { type: Function, require: true },
|
||||||
});
|
});
|
||||||
|
|
@ -89,14 +89,14 @@ function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.post(config.API.workflow + `add-step`, {
|
.post(config.API.workflow + `add-step`, {
|
||||||
stateId: stateId,
|
stateId: props.stateId,
|
||||||
profileId: selected.value[0].id,
|
profileId: selected.value[0].id,
|
||||||
isAcceptSetting: isAcceptSetting.value,
|
isAcceptSetting: isAcceptSetting.value,
|
||||||
isApproveSetting: isApproveSetting.value,
|
isApproveSetting: isApproveSetting.value,
|
||||||
isReasonSetting: isReasonSetting.value,
|
isReasonSetting: isReasonSetting.value,
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fetchData?.();
|
await props.fetchData?.();
|
||||||
onCloseModal();
|
onCloseModal();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -112,6 +112,9 @@ function onCloseModal() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
rows.value = [];
|
rows.value = [];
|
||||||
|
isAcceptSetting.value = false;
|
||||||
|
isApproveSetting.value = false;
|
||||||
|
isReasonSetting.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(modal, (val) => {
|
watch(modal, (val) => {
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ const { id, sysName } = defineProps({
|
||||||
|
|
||||||
const stateId = ref<string>(""); //id state ปัจุบัน
|
const stateId = ref<string>(""); //id state ปัจุบัน
|
||||||
const state = ref<number>(1); //state ปัจุบัน
|
const state = ref<number>(1); //state ปัจุบัน
|
||||||
|
const dataUserComment = ref<any>();
|
||||||
|
|
||||||
const isPermission = ref<boolean>(true); //การเข้าถึง Workflow
|
const isPermission = ref<boolean>(true); //การเข้าถึง Workflow
|
||||||
const permission = ref<Permission>({
|
const permission = ref<Permission>({
|
||||||
|
|
@ -47,8 +48,12 @@ async function fetchCheckState() {
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
await fetchData();
|
await fetchData();
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
|
|
||||||
stateId.value = data.stateId;
|
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 = {
|
permission.value = {
|
||||||
isChangeState: data.can_change_state,
|
isChangeState: data.can_change_state,
|
||||||
isOperate: data.can_operate,
|
isOperate: data.can_operate,
|
||||||
|
|
@ -112,11 +117,6 @@ defineExpose({
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center">
|
<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>
|
<div class="q-pl-sm text-weight-bold text-dark">Workflow</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn
|
|
||||||
@click.prevent="modalApprove = true"
|
|
||||||
label="DialogApprove"
|
|
||||||
color="public"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
|
|
@ -154,10 +154,7 @@ defineExpose({
|
||||||
>
|
>
|
||||||
<div v-if="step.stateUserComments.length !== 0">
|
<div v-if="step.stateUserComments.length !== 0">
|
||||||
<q-list bordered separator style="min-width: 20vw">
|
<q-list bordered separator style="min-width: 20vw">
|
||||||
<q-item
|
<q-item v-for="item in step.stateUserComments">
|
||||||
v-for="(item, index) in step.stateUserComments"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
{{ `${item.prefix}${item.firstName} ${item.lastName}` }}
|
{{ `${item.prefix}${item.firstName} ${item.lastName}` }}
|
||||||
|
|
@ -169,19 +166,32 @@ defineExpose({
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section side top>
|
<q-item-section side top>
|
||||||
<q-item-label class="text-green">
|
<q-item-label
|
||||||
|
:class="!item.isApprove ? 'text-red' : 'text-green'"
|
||||||
|
>
|
||||||
{{
|
{{
|
||||||
item.isAcceptSetting
|
item.isAcceptSetting
|
||||||
? item.isAccept
|
? item.isAccept
|
||||||
? "รับทราบ"
|
? "รับทราบ"
|
||||||
: ""
|
: ""
|
||||||
: item.isApproveSetting
|
: 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-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|
@ -215,5 +225,9 @@ defineExpose({
|
||||||
:fetch-data="fetchCheckState"
|
:fetch-data="fetchCheckState"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DialogApprove v-model:modal="modalApprove" :state-id="stateId" />
|
<DialogApprove
|
||||||
|
v-model:modal="modalApprove"
|
||||||
|
:data-user-comment="dataUserComment"
|
||||||
|
:fetch-data="fetchCheckState"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ interface StateUserComments {
|
||||||
firstName: string;
|
firstName: string;
|
||||||
lastName: string;
|
lastName: string;
|
||||||
prefix: string;
|
prefix: string;
|
||||||
|
isComment: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DataCommander {
|
interface DataCommander {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useRequestEditStore } from "@/modules/04_registryPerson/stores/RequestEdit";
|
import { useRequestEditStore } from "@/modules/04_registryPerson/stores/RequestEdit";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
|
|
||||||
|
|
@ -12,21 +13,23 @@ import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
DataOption,
|
DataOption,
|
||||||
Pagination,
|
Pagination,
|
||||||
|
Request,
|
||||||
} from "@/modules/04_registryPerson/interface/index/Main";
|
} 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*/
|
/** importComponents*/
|
||||||
import DialogStatus from "@/modules/04_registryPerson/components/requestEdit/Dialog01_EditStatus.vue";
|
import DialogStatus from "@/modules/04_registryPerson/components/requestEdit/Dialog01_EditStatus.vue";
|
||||||
import DialogUpdate from "@/modules/04_registryPerson/components/Dialog/DialogUpdate.vue";
|
import DialogUpdate from "@/modules/04_registryPerson/components/Dialog/DialogUpdate.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
const router = useRouter();
|
||||||
const store = useRequestEditStore();
|
const store = useRequestEditStore();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
||||||
|
|
||||||
//Table
|
//Table
|
||||||
const idCard = ref<string>("");
|
const idCard = ref<string>("");
|
||||||
const profileId = ref<string>("");
|
const profileId = ref<string>("");
|
||||||
const rows = ref<DateRequest[]>([]); //รายการข้อมูลคำร้องขอแก้ไขทะเบียนประวัติ
|
const rows = ref<DataRequest[]>([]); //รายการข้อมูลคำร้องขอแก้ไขทะเบียนประวัติ
|
||||||
const page = ref<number>(1); //หน้า
|
const page = ref<number>(1); //หน้า
|
||||||
const pageSize = ref<number>(10); //จำนวนต่อหน้า
|
const pageSize = ref<number>(10); //จำนวนต่อหน้า
|
||||||
const rowsTotal = ref<number>(0); //จำนวนรายการ
|
const rowsTotal = ref<number>(0); //จำนวนรายการ
|
||||||
|
|
@ -176,14 +179,15 @@ function filterOption(val: string, update: Function) {
|
||||||
* funciton แก่ไขคำร้อง
|
* funciton แก่ไขคำร้อง
|
||||||
* @param id รายการคำร้อง
|
* @param id รายการคำร้อง
|
||||||
*/
|
*/
|
||||||
function onclickEdit(data: any) {
|
function onclickEdit(data: Request) {
|
||||||
requestId.value = data.id;
|
requestId.value = data.id;
|
||||||
if (data.topic == "ขออัปเดตข้อมูลจากกรมการปกครอง") {
|
if (data.topic == "ขออัปเดตข้อมูลจากกรมการปกครอง") {
|
||||||
modalUpdate.value = true;
|
modalUpdate.value = true;
|
||||||
idCard.value = data.idcard as string;
|
idCard.value = data.idcard as string;
|
||||||
profileId.value = data.profileId;
|
profileId.value = data.profileId;
|
||||||
} else {
|
} 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:id-card="idCard"
|
||||||
v-model:profile-id="profileId"
|
v-model:profile-id="profileId"
|
||||||
:fetch-data="fetchListRequset"
|
:fetch-data="fetchListRequset"
|
||||||
:request-id=requestId
|
:request-id="requestId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const isReadOnly = ref<boolean>(false); //อ่ายได้อย่าง
|
||||||
//ฟอร์มสถานะคำร้อง
|
//ฟอร์มสถานะคำร้อง
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
status: "", //สถานะ
|
status: "", //สถานะ
|
||||||
remark: "", //หมายเหตุ
|
remark: "", //หมายเหตุแ
|
||||||
});
|
});
|
||||||
//ข้อมูลรายการสถานะ
|
//ข้อมูลรายการสถานะ
|
||||||
const statusOptionMain = ref<DataOption[]>(
|
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;
|
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 {
|
export type {
|
||||||
Pagination,
|
Pagination,
|
||||||
DataOption,
|
DataOption,
|
||||||
|
|
@ -86,4 +101,5 @@ export type {
|
||||||
DataOptionEducation,
|
DataOptionEducation,
|
||||||
DataOptionEducationLevel,
|
DataOptionEducationLevel,
|
||||||
DataItemsDevelopment,
|
DataItemsDevelopment,
|
||||||
|
Request,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ interface DataPerson {
|
||||||
rank?: string;
|
rank?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface DateRequest {
|
interface DataRequest {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
createdFullName: string;
|
createdFullName: string;
|
||||||
detail: string;
|
detail: string;
|
||||||
|
|
@ -182,7 +182,7 @@ export type {
|
||||||
DataType,
|
DataType,
|
||||||
DataLevel,
|
DataLevel,
|
||||||
DataPerson,
|
DataPerson,
|
||||||
DateRequest,
|
DataRequest,
|
||||||
DataProfile,
|
DataProfile,
|
||||||
DataLeave,
|
DataLeave,
|
||||||
DataLeaveType,
|
DataLeaveType,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@ const detailPage = () =>
|
||||||
// รายการคำร้องขอแก้ไขทะเบียนประวัติ
|
// รายการคำร้องขอแก้ไขทะเบียนประวัติ
|
||||||
const requestEdit = () =>
|
const requestEdit = () =>
|
||||||
import("@/modules/04_registryPerson/views/requestEditView.vue");
|
import("@/modules/04_registryPerson/views/requestEditView.vue");
|
||||||
|
const Page01_Detail = () =>
|
||||||
|
import(
|
||||||
|
"@/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue"
|
||||||
|
);
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
|
@ -60,4 +64,14 @@ export default [
|
||||||
Role: "STAFF",
|
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*/
|
/** Function dialog*/
|
||||||
async function openModal(data: string) {
|
// async function openModal(data: string) {
|
||||||
if (data === "approve") {
|
// if (data === "approve") {
|
||||||
modalApprove.value = true;
|
// modalApprove.value = true;
|
||||||
dialogTitle.value = "อนุมัติ";
|
// dialogTitle.value = "อนุมัติ";
|
||||||
}
|
// }
|
||||||
if (data === "UnApprove") {
|
// if (data === "UnApprove") {
|
||||||
modalApprove.value = true;
|
// modalApprove.value = true;
|
||||||
dialogTitle.value = "ไม่อนุมัติ";
|
// dialogTitle.value = "ไม่อนุมัติ";
|
||||||
}
|
// }
|
||||||
if (data === "authority") {
|
// if (data === "authority") {
|
||||||
modalApprove.value = true;
|
// modalApprove.value = true;
|
||||||
dialogTitle.value = "ส่งไปยังผู้มีอำนาจ";
|
// dialogTitle.value = "ส่งไปยังผู้มีอำนาจ";
|
||||||
dialogLabel.value = "ความคิดเห็น";
|
// dialogLabel.value = "ความคิดเห็น";
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/** function ส่งไปผู้บังคับบัญชา*/
|
/** function ส่งไปผู้บังคับบัญชา*/
|
||||||
function sendToCommand() {
|
// function sendToCommand() {
|
||||||
dialogConfirm(
|
// dialogConfirm(
|
||||||
$q,
|
// $q,
|
||||||
async () => {
|
// async () => {
|
||||||
showLoader();
|
// showLoader();
|
||||||
await http
|
// await http
|
||||||
.get(config.API.leaveApproveToComander(formData.id))
|
// .get(config.API.leaveApproveToComander(formData.id))
|
||||||
.then(async () => {
|
// .then(async () => {
|
||||||
await fetchDetailLeave(paramsId);
|
// await fetchDetailLeave(paramsId);
|
||||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
// success($q, "บันทึกข้อมูลสำเร็จ");
|
||||||
})
|
// })
|
||||||
.catch((err) => {
|
// .catch((err) => {
|
||||||
messageError($q, err);
|
// messageError($q, err);
|
||||||
})
|
// })
|
||||||
.finally(async () => {
|
// .finally(async () => {
|
||||||
hideLoader();
|
// hideLoader();
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
"ยืนยันการส่งไปผู้บังคับบัญชา",
|
// "ยืนยันการส่งไปผู้บังคับบัญชา",
|
||||||
"ต้องการยืนยันการส่งไปผู้บังคับบัญชานี้ใช่หรือไม่ ?"
|
// "ต้องการยืนยันการส่งไปผู้บังคับบัญชานี้ใช่หรือไม่ ?"
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
/** Function Save */
|
/** Function Save */
|
||||||
function clickSave(reason: string) {
|
function clickSave(reason: string) {
|
||||||
|
|
@ -695,7 +695,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ความคิดเห็นของผู้บังคับบัญชา -->
|
<!-- ความคิดเห็นของผู้บังคับบัญชา -->
|
||||||
<div
|
<!-- <div
|
||||||
class="col-xs-12 col-sm-12 row"
|
class="col-xs-12 col-sm-12 row"
|
||||||
v-if="
|
v-if="
|
||||||
formData.approveStep === 'st3' ||
|
formData.approveStep === 'st3' ||
|
||||||
|
|
@ -722,10 +722,10 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- ความคิดเห็นของผู้มีอำนาจ -->
|
<!-- ความคิดเห็นของผู้มีอำนาจ -->
|
||||||
<div
|
<!-- <div
|
||||||
class="col-xs-12 col-sm-12 row"
|
class="col-xs-12 col-sm-12 row"
|
||||||
v-if="
|
v-if="
|
||||||
formData.approveStep === 'st4' || formData.approveStep === 'st5'
|
formData.approveStep === 'st4' || formData.approveStep === 'st5'
|
||||||
|
|
@ -761,7 +761,7 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Workflow -->
|
<!-- Workflow -->
|
||||||
|
|
@ -771,8 +771,8 @@ onMounted(async () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-separator v-if="checkPermission($route)?.attrIsUpdate" />
|
<!-- <q-separator v-if="checkPermission($route)?.attrIsUpdate" /> -->
|
||||||
<div class="row q-pa-md q-gutter-md justify-end">
|
<!-- <div class="row q-pa-md q-gutter-md justify-end">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
formData.approveStep === 'st1' &&
|
formData.approveStep === 'st1' &&
|
||||||
|
|
@ -823,7 +823,7 @@ onMounted(async () => {
|
||||||
@click="openModal('approve')"
|
@click="openModal('approve')"
|
||||||
><q-tooltip>อนุมัติ</q-tooltip>
|
><q-tooltip>อนุมัติ</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div> -->
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue