แก้ตาม issue
This commit is contained in:
parent
c38990f6ed
commit
0295ec3e5f
5 changed files with 124 additions and 102 deletions
|
|
@ -30,6 +30,7 @@ const { dialogConfirm, showLoader, success, hideLoader, messageError } = mixin;
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const checkStatusResult = ref<boolean>(false);
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineInvestigatefactsDetail"
|
||||
);
|
||||
|
|
@ -184,6 +185,8 @@ async function getData() {
|
|||
data.disciplineInvestigateRelevantDocs =
|
||||
dataList.disciplineInvestigateRelevantDocs;
|
||||
data.investigationStatusResult = dataList.investigationStatusResult;
|
||||
checkStatusResult.value =
|
||||
dataList.investigationStatusResult == "NO_CAUSE" ? true : false;
|
||||
data.investigationExtendStatus = dataList.investigationExtendStatus;
|
||||
data.investigationDaysExtend = dataList.investigationDaysExtend;
|
||||
data.isDisciplinary = dataList.isDisciplinary;
|
||||
|
|
@ -375,7 +378,7 @@ onMounted(async () => {
|
|||
|
||||
<div class="q-gutter-x-sm" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
v-if="data.status === 'NEW'"
|
||||
v-if="data.status === 'NEW' && !checkStatusResult"
|
||||
label="ส่งไปสอบสวน"
|
||||
color="public"
|
||||
@click="sentInvestigate"
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ const store = useInvestigateDisStore();
|
|||
const { dialogConfirm, success, messageError, showLoader, hideLoader } = mixin;
|
||||
const mainStore = useDisciplineMainStore();
|
||||
|
||||
const checkStatusResult = ref<boolean>(false);
|
||||
const isSaveInfo = ref<boolean>(false);
|
||||
const checkRoutePermisson = ref<boolean>(
|
||||
route.name == "disciplineDisciplinaryDetail"
|
||||
|
|
@ -127,9 +128,16 @@ const dataInvestigatefacts = reactive<FormInvestigateFact>({
|
|||
async function fetchDetailDisciplinary() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.disciplineDisciplinaryByGetId(id.value,mainStore.pathDiscip(route.name as string)))
|
||||
.get(
|
||||
config.API.disciplineDisciplinaryByGetId(
|
||||
id.value,
|
||||
mainStore.pathDiscip(route.name as string)
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
data.value = res.data.result;
|
||||
checkStatusResult.value =
|
||||
res.data.result.disciplinaryStatusResult == "NO_CAUSE" ? true : false;
|
||||
status.value = res.data.result.status;
|
||||
idComplaint.value = res.data.result.idComplaint;
|
||||
idInvestigate.value = res.data.result.idInvestigate;
|
||||
|
|
@ -146,7 +154,12 @@ async function fetchDetailDisciplinary() {
|
|||
async function fetchDetailInvestigate() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.investigateByGetId(idInvestigate.value,mainStore.pathInves(route.name as string)))
|
||||
.get(
|
||||
config.API.investigateByGetId(
|
||||
idInvestigate.value,
|
||||
mainStore.pathInves(route.name as string)
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
dataInvestigatefacts.id = dataList.id;
|
||||
|
|
@ -191,7 +204,12 @@ async function fetchDetailInvestigate() {
|
|||
async function fetchDetailComplaints() {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.complaintbyGetId(idComplaint.value,mainStore.pathComplaints(route.name as string)))
|
||||
.get(
|
||||
config.API.complaintbyGetId(
|
||||
idComplaint.value,
|
||||
mainStore.pathComplaints(route.name as string)
|
||||
)
|
||||
)
|
||||
.then((res) => {
|
||||
const dataList = res.data.result;
|
||||
dataComplaints.id = dataList.id;
|
||||
|
|
@ -227,7 +245,7 @@ async function fetchDetailComplaints() {
|
|||
* @param data ข้อมูล ใน form
|
||||
*/
|
||||
async function onSubmitDisciplinary(data: any) {
|
||||
console.log("🚀 ~ onSubmitDisciplinary ~ data:", data)
|
||||
console.log("🚀 ~ onSubmitDisciplinary ~ data:", data);
|
||||
showLoader();
|
||||
await http
|
||||
.put(config.API.disciplineDisciplinaryById(id.value), data)
|
||||
|
|
@ -345,8 +363,8 @@ function emitPerson(data: PersonsArray[]) {
|
|||
.put(config.API.disciplinarySuspend(id.value), {
|
||||
persons: dataMapId,
|
||||
})
|
||||
.then(async(res) => {
|
||||
modalPopup.value = false
|
||||
.then(async (res) => {
|
||||
modalPopup.value = false;
|
||||
success($q, "ส่งไปพักราชการสำเร็จ");
|
||||
// router.push(`/discipline/investigatefacts`);
|
||||
await fetchDetailDisciplinary();
|
||||
|
|
@ -407,14 +425,14 @@ onMounted(async () => {
|
|||
<q-space />
|
||||
<div class="q-gutter-x-sm" v-if="!checkRoutePermisson">
|
||||
<q-btn
|
||||
v-if="status === 'NEW'"
|
||||
v-if="status === 'NEW' && !checkStatusResult"
|
||||
label="ส่งไปสรุปผลการพิจารณา"
|
||||
color="public"
|
||||
@click="sentIssueGate"
|
||||
:disable="isSaveInfo"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="status === 'NEW'"
|
||||
v-if="status === 'NEW' && !checkStatusResult"
|
||||
label="ส่งไปพักราชการ"
|
||||
color="primary"
|
||||
@click="sentIssue"
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ interface Pagination {
|
|||
|
||||
interface ResOrg {
|
||||
labelName: string;
|
||||
orgTreeDnaId: string;
|
||||
orgCode: string;
|
||||
orgLevel: number;
|
||||
orgName: string;
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ async function getActiveId() {
|
|||
)
|
||||
.then(async (res) => {
|
||||
const data = await res.data.result.map((item: ResOrg) => ({
|
||||
id: item.orgTreeId,
|
||||
id: item.orgTreeDnaId,
|
||||
name: item.orgName,
|
||||
}));
|
||||
organizationOpsMain.value = data;
|
||||
|
|
|
|||
|
|
@ -387,6 +387,97 @@ onMounted(() => {
|
|||
/>
|
||||
</q-card-section>
|
||||
<q-card-section class="q-pa-none">
|
||||
<div class="col-12 q-px-sm">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="onChangeYear"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
borderless
|
||||
:model-value="
|
||||
year === 0 ? 'ทั้งหมด' : Number(year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
bg-color="white"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
size="18px"
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-px-sm">
|
||||
<q-select
|
||||
v-model="round"
|
||||
label="รอบการขึ้นเงินเดือน"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="roundOptions"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
bg-color="white"
|
||||
@update:model-value="report = ''"
|
||||
>
|
||||
</q-select>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div
|
||||
class="col-12 q-px-sm"
|
||||
v-if="employeeClass === 'officer'"
|
||||
>
|
||||
<q-select
|
||||
v-model="group"
|
||||
label="กลุ่ม"
|
||||
dense
|
||||
borderless
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="groupOptions"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
bg-color="white"
|
||||
/>
|
||||
</div>
|
||||
<q-separator v-if="employeeClass === 'officer'" />
|
||||
<div class="col-12 q-px-sm">
|
||||
<q-select
|
||||
borderless
|
||||
dense
|
||||
v-model="report"
|
||||
:options="reportOption"
|
||||
label="รายงาน"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
class="bg-white"
|
||||
/>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12">
|
||||
<q-expansion-item
|
||||
v-model="expandedModal"
|
||||
|
|
@ -481,97 +572,6 @@ onMounted(() => {
|
|||
</q-card-section>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-px-sm">
|
||||
<datepicker
|
||||
menu-class-name="modalfix"
|
||||
v-model="year"
|
||||
:locale="'th'"
|
||||
autoApply
|
||||
year-picker
|
||||
:enableTimePicker="false"
|
||||
@update:model-value="onChangeYear"
|
||||
>
|
||||
<template #year="{ year }">{{ year + 543 }}</template>
|
||||
<template #year-overlay-value="{ value }">{{
|
||||
parseInt(value + 543)
|
||||
}}</template>
|
||||
<template #trigger>
|
||||
<q-input
|
||||
dense
|
||||
borderless
|
||||
:model-value="
|
||||
year === 0 ? 'ทั้งหมด' : Number(year) + 543
|
||||
"
|
||||
:label="`${'ปีงบประมาณ'}`"
|
||||
bg-color="white"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
size="18px"
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
style="color: var(--q-primary)"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div class="col-12 q-px-sm">
|
||||
<q-select
|
||||
v-model="round"
|
||||
label="รอบการขึ้นเงินเดือน"
|
||||
dense
|
||||
borderless
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="roundOptions"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
bg-color="white"
|
||||
@update:model-value="report = ''"
|
||||
>
|
||||
</q-select>
|
||||
</div>
|
||||
<q-separator />
|
||||
<div
|
||||
class="col-12 q-px-sm"
|
||||
v-if="employeeClass === 'officer'"
|
||||
>
|
||||
<q-select
|
||||
v-model="group"
|
||||
label="กลุ่ม"
|
||||
dense
|
||||
borderless
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
:options="groupOptions"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
bg-color="white"
|
||||
/>
|
||||
</div>
|
||||
<q-separator v-if="employeeClass === 'officer'" />
|
||||
<div class="col-12 q-px-sm">
|
||||
<q-select
|
||||
borderless
|
||||
dense
|
||||
v-model="report"
|
||||
:options="reportOption"
|
||||
label="รายงาน"
|
||||
emit-value
|
||||
map-options
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
class="bg-white"
|
||||
/>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right">
|
||||
|
|
@ -711,7 +711,7 @@ onMounted(() => {
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scope>
|
||||
<style lang="scss" scoped>
|
||||
.q-item.hover-green:hover {
|
||||
background-color: #d5f1ee57;
|
||||
border-radius: 2px;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue