Merge branch 'develop' into devTee

# Conflicts:
#	src/modules/18_command/components/DialogCreateCommandORG.vue
This commit is contained in:
setthawutttty 2024-10-21 13:54:57 +07:00
commit 1b6bb495a5
10 changed files with 317 additions and 247 deletions

View file

@ -141,7 +141,7 @@ defineExpose({
<q-btn
v-if="permission.isChangeState"
@click.prevent="onChangeState"
label="Next Step"
label="ดำเนินการต่อ"
color="primary"
/>
</div>
@ -216,7 +216,7 @@ defineExpose({
<div v-if="permission.isChangeState && state === index + 1">
<q-btn
@click.prevent="onChangeState"
label="Next Step"
label="ดำเนินการต่อ"
color="primary"
/>
</div>

View file

@ -421,7 +421,7 @@ onMounted(async () => {
v-model:is-officer="store.isOfficer as boolean"
v-model:is-staff="store.isStaff as boolean"
v-model:root-id="store.rootId"
:system-name="'organization'"
:system-name="'ORGANIZATION'"
/>
</template>

View file

@ -475,7 +475,7 @@ watch(
<q-dialog v-model="modal" persistent>
<q-card class="col-12" style="width: 80vw">
<q-form greedy @submit.prevent @validation-success="onSubmit">
<Header tittle="ขออัปเดตข้อมูลจากกรมการปกครอง" :close="closeDialog" />
<Header tittle="ขอปรับปรุงข้อมูลจากกรมการปกครอง" :close="closeDialog" />
<q-separator />
<q-card-section class="scroll" style="max-height: 80vh">
@ -512,9 +512,11 @@ watch(
<q-separator />
<q-card-actions align="right">
<q-btn label="อัพเดต" color="secondary" type="submit"
><q-tooltip>พเดต</q-tooltip></q-btn
>
<q-btn
label="บันทึกลงทะเบียนประวัติ"
color="secondary"
type="submit"
/>
<q-btn label="ยกเลิก" color="orange" @click="modal = false"
><q-tooltip>ยกเล</q-tooltip></q-btn
>

View file

@ -181,7 +181,7 @@ function filterOption(val: string, update: Function) {
*/
function onclickEdit(data: Request) {
requestId.value = data.id;
if (data.topic == "ขออัปเดตข้อมูลจากกรมการปกครอง") {
if (data.topic == "ขอปรับปรุงข้อมูลจากกรมการปกครอง") {
modalUpdate.value = true;
idCard.value = data.idcard as string;
profileId.value = data.profileId;
@ -351,7 +351,7 @@ onMounted(() => {
<q-td auto-width>
<q-btn
:icon="
props.row.topic == 'ขออัปเดตข้อมูลจากกรมการปกครอง'
props.row.topic == 'ขอปรับปรุงข้อมูลจากกรมการปกครอง'
? 'mdi-sync-circle'
: 'edit'
"
@ -359,15 +359,15 @@ onMounted(() => {
dense
flat
:color="
props.row.topic == 'ขออัปเดตข้อมูลจากกรมการปกครอง'
props.row.topic == 'ขอปรับปรุงข้อมูลจากกรมการปกครอง'
? 'info'
: 'edit'
"
@click.pervent="onclickEdit(props.row)"
>
<q-tooltip>{{
props.row.topic == "ขออัปเดตข้อมูลจากกรมการปกครอง"
? "ขออัปเดตข้อมูลจากกรมการปกครอง"
props.row.topic == "ขอปรับปรุงข้อมูลจากกรมการปกครอง"
? "ขอปรับปรุงข้อมูลจากกรมการปกครอง"
: "แก้ไขสถานะคำร้อง"
}}</q-tooltip>
</q-btn>

View file

@ -17,7 +17,7 @@ export const useRequestEditStore = defineStore("requestEditStore", () => {
{ id: "", name: "ทั้งหมด" },
{ id: "PENDING", name: "รอดำเนินการ" },
{ id: "COMPLETE", name: "ดำเนินการแก้ไขแล้ว" },
{ id: "REJECT", name: "ไม่อนุมัตการแก้ไข" },
{ id: "REJECT", name: "ไม่อนุมัตการแก้ไข" },
]);
const optionStatusIDP = ref<DataOption[]>([
@ -34,7 +34,7 @@ export const useRequestEditStore = defineStore("requestEditStore", () => {
case "COMPLETE":
return "ดำเนินการแก้ไขแล้ว";
case "REJECT":
return "ไม่อนุมัตการแก้ไข";
return "ไม่อนุมัตการแก้ไข";
default:
return "-";
}

View file

@ -423,8 +423,8 @@ watch(
<q-separator />
<q-card-actions align="right">
<q-btn label="อัพเดต" color="secondary" type="submit"
><q-tooltip>พเดต</q-tooltip></q-btn
<q-btn label="บันทึก" color="secondary" type="submit"
><q-tooltip>นทกขอม</q-tooltip></q-btn
>
<q-btn label="ยกเลิก" color="orange" @click="modal = false"
><q-tooltip>ยกเล</q-tooltip></q-btn

View file

@ -22,8 +22,7 @@ import type {
import TabGroup from "@/modules/13_salary/components/04_salaryLists/TabMain.vue";
import ProcessStep from "@/modules/13_salary/components/04_salaryLists/ProcessStep.vue";
import PageDashBoard from "@/modules/13_salary/components/04_salaryLists/Dashboard.vue";
/** importStore*/
import DialogCommand from "@/modules/18_command/components/DialogCreateCommandORG.vue";
/** use*/
const store = useSalaryListSDataStore();
@ -51,6 +50,11 @@ const page = ref<number>(1);
const pageSize = ref<number>(50);
const lastPage = ref<number>(0);
/** ออกคำสั่ง*/
const modalCommand = ref<boolean>(false);
const isOfficer = ref<boolean>(false);
const isStaff = ref<boolean>(false);
/**
* function เรยกขอมลรอบการขนเงนเดอน
*/
@ -364,117 +368,126 @@ onMounted(() => {
รายการเลอนเงนเดอนขาราชการ
</div>
<q-space />
<datepicker
v-model="year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
style="width: 150px"
@update:model-value="getRound()"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
outlined
:model-value="Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
bg-color="white"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<q-select
class="q-ml-xs"
v-model="roundFilter"
label="รอบการขึ้นเงินเดือน"
dense
outlined
map-options
option-label="name"
option-value="id"
:options="roundOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeRound"
:disable="!isDisable"
>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">
<q-item-section>
<q-item-label>{{ scope.opt.name }}</q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
<q-select
v-if="roundFilter ? roundFilter.shortCode !== 'SPECIAL' : false"
class="q-ml-xs"
v-model="snapFilter"
label="รอบ"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="snapOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeSnap"
:disable="!isDisable"
/>
<q-select
class="q-ml-xs"
v-model="agencyFilter"
label="หน่วยงาน"
lazy-rules
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="agencyOptions"
hide-bottom-space
bg-color="white"
@update:model-value="onChangeAgency"
:disable="!isDisable"
use-input
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'agencyFilter'
) "
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey"> ไมอม </q-item-section>
</q-item>
</template>
<template v-if="agencyFilter !== 'ALL'" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="
(agencyOptions = agencyOptionsMain), (agencyFilter = 'ALL')
"
class="cursor-pointer"
<div class="row q-col-gutter-sm items-center q-py-xs">
<div>
<q-btn
color="primary"
label="ออกคำสั่ง"
@click.pervent="modalCommand = true"
/>
</template>
</q-select>
</div>
<datepicker
v-model="year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
style="width: 150px"
@update:model-value="getRound()"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
outlined
:model-value="Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
bg-color="white"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<q-select
v-model="roundFilter"
label="รอบการขึ้นเงินเดือน"
dense
outlined
map-options
option-label="name"
option-value="id"
:options="roundOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeRound"
:disable="!isDisable"
>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">
<q-item-section>
<q-item-label>{{ scope.opt.name }}</q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
<q-select
v-if="roundFilter ? roundFilter.shortCode !== 'SPECIAL' : false"
v-model="snapFilter"
label="รอบ"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="snapOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeSnap"
:disable="!isDisable"
/>
<q-select
v-model="agencyFilter"
label="หน่วยงาน"
lazy-rules
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="agencyOptions"
hide-bottom-space
bg-color="white"
@update:model-value="onChangeAgency"
:disable="!isDisable"
use-input
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'agencyFilter'
) "
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey"> ไมอม </q-item-section>
</q-item>
</template>
<template v-if="agencyFilter !== 'ALL'" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="
(agencyOptions = agencyOptionsMain), (agencyFilter = 'ALL')
"
class="cursor-pointer"
/>
</template>
</q-select>
</div>
</div>
<q-card flat bordered>
@ -516,6 +529,15 @@ onMounted(() => {
:get-data="getQuota"
/>
</q-card>
<DialogCommand
v-model:modal="modalCommand"
v-model:root-id="agencyFilter"
v-model:is-officer="isOfficer"
v-model:is-staff="isStaff"
system-name="SALARY"
:command-type-code-array="['C-PM-33', 'C-PM-34', 'C-PM-35']"
/>
</template>
<style lang="sass" scoped>

View file

@ -22,6 +22,7 @@ import type {
import TabGroup from "@/modules/13_salary/components/05_salaryListsEmployee/TabMain.vue";
import ProcessStep from "@/modules/13_salary/components/05_salaryListsEmployee/ProcessStep.vue";
import PageDashBoard from "@/modules/13_salary/components/05_salaryListsEmployee/Dashboard.vue";
import DialogCommand from "@/modules/18_command/components/DialogCreateCommandORG.vue";
/** use*/
const store = useSalaryEmployeeListSDataStore();
@ -51,6 +52,11 @@ const lastPage = ref<number>(0);
const loading = ref(false);
const nextPage = ref<number>(1);
/** ออกคำสั่ง*/
const modalCommand = ref<boolean>(false);
const isOfficer = ref<boolean>(false);
const isStaff = ref<boolean>(false);
/**
* function เรยกขอมลรอบการขนคาจาง
*/
@ -364,114 +370,120 @@ onMounted(() => {
รายการเลอนคาจางลกจางประจำ
</div>
<q-space />
<datepicker
menu-class-name="modalfix"
v-model="year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
style="width: 150px"
@update:model-value="getRound"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
outlined
:model-value="Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
bg-color="white"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<div class="row q-col-gutter-sm items-center q-py-xs">
<div>
<q-btn
color="primary"
label="ออกคำสั่ง"
@click.pervent="modalCommand = true"
/>
</div>
<datepicker
menu-class-name="modalfix"
v-model="year"
:locale="'th'"
autoApply
year-picker
:enableTimePicker="false"
style="width: 150px"
@update:model-value="getRound"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
dense
outlined
:model-value="Number(year) + 543"
:label="`${'ปีงบประมาณ'}`"
bg-color="white"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
style="color: var(--q-primary)"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
<q-select
class="q-ml-xs"
v-model="roundFilter"
label="รอบการขึ้นค่าจ้าง"
dense
outlined
map-options
option-label="name"
option-value="id"
:options="roundOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeRound"
:loading="loading"
@virtual-scroll="onScroll"
:disable="!isDisable"
>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">
<q-item-section>
<q-item-label>{{ scope.opt.name }}</q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
<q-select
v-if="roundFilter ? roundFilter.shortCode !== 'SPECIAL' : false"
class="q-ml-xs"
v-model="snapFilter"
label="รอบ"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="snapOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeSnap"
:disable="!isDisable"
/>
<q-select
class="q-ml-xs"
v-model="agencyFilter"
label="หน่วยงาน"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="agencyOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeAgency"
:disable="!isDisable"
use-input
@filter="(inputValue:string,
<q-select
v-model="roundFilter"
label="รอบการขึ้นค่าจ้าง"
dense
outlined
map-options
option-label="name"
option-value="id"
:options="roundOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeRound"
:loading="loading"
@virtual-scroll="onScroll"
:disable="!isDisable"
>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">
<q-item-section>
<q-item-label>{{ scope.opt.name }}</q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
<q-select
v-if="roundFilter ? roundFilter.shortCode !== 'SPECIAL' : false"
v-model="snapFilter"
label="รอบ"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="snapOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeSnap"
:disable="!isDisable"
/>
<q-select
v-model="agencyFilter"
label="หน่วยงาน"
dense
outlined
emit-value
map-options
option-label="name"
option-value="id"
:options="agencyOptions"
lazy-rules
hide-bottom-space
bg-color="white"
@update:model-value="onChangeAgency"
:disable="!isDisable"
use-input
@filter="(inputValue:string,
doneFn:Function) => filterSelector(inputValue, doneFn,'agencyFilter'
) "
>
<template v-if="agencyFilter !== 'ALL'" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="
(agencyOptions = agencyOptionsMain), (agencyFilter = 'ALL')
"
class="cursor-pointer"
/> </template
></q-select>
>
<template v-if="agencyFilter !== 'ALL'" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="
(agencyOptions = agencyOptionsMain), (agencyFilter = 'ALL')
"
class="cursor-pointer"
/> </template
></q-select>
</div>
</div>
<q-card flat bordered>
@ -514,7 +526,14 @@ onMounted(() => {
/>
</q-card>
<!-- </q-card> -->
<DialogCommand
v-model:modal="modalCommand"
v-model:root-id="agencyFilter"
v-model:is-officer="isOfficer"
v-model:is-staff="isStaff"
system-name="SALARY_EMP"
:command-type-code-array="['C-PM-36', 'C-PM-37']"
/>
</template>
<style lang="sass" scoped>

View file

@ -630,7 +630,7 @@ onMounted(() => {
v-model:is-officer="storeActing.isOfficer as boolean"
v-model:is-staff="storeActing.isStaff as boolean"
v-model:root-id="storeActing.rootId"
:system-name="'acting'"
:system-name="'ACTING'"
/>
</template>

View file

@ -36,7 +36,8 @@ const isStaff = defineModel<boolean>("isStaff");
const rootId = defineModel<string>("rootId");
const props = defineProps({
commandTypeCode: String, //
commandTypeCode: { type: String, defult: "" }, //
commandTypeCodeArray: { type: Array, defult: [] }, //
systemName: String, //
orgPublishDate: { type: Date || undefined, defult: undefined },
});
@ -168,16 +169,23 @@ function closeModal() {
isCheckOrgPublishDate.value = false;
rows.value = [];
selected.value = [];
commandType.value = "";
}
/** ฟังก์ชันดึงข้อมูลคำสั่ง */
async function fetchCommandType() {
const data = await storeCommand.getCommandTypes(); // get store
// filter code
commandOp.value = await data.filter(
(v: ListCommand) => v.code == props.commandTypeCode
);
commandType.value = commandOp.value[0].id;
if (props.systemName === "SALARY" || props.systemName === "SALARY_EMP") {
commandOp.value = await data.filter((v: ListCommand) =>
props.commandTypeCodeArray?.includes(v.code)
);
} else {
commandOp.value = await data.filter(
(v: ListCommand) => v.code == props.commandTypeCode
);
commandType.value = commandOp.value[0].id;
}
}
/**
@ -210,20 +218,31 @@ function getPerson() {
type: group.value,
};
const pathAPI =
props.systemName === "ORGANIZATION"
? config.API.orgPosReport
: props.systemName === "SALARY"
? config.API.orgPosReport
: props.systemName === "SALARY_EMP"
? config.API.orgPosReport
: props.systemName === "ACTING"
? config.API.orgPosReport
: "";
showLoader();
http
.post(config.API.orgPosReport, body)
.post(pathAPI, body)
.then((res) => {
const data = res.data.result;
rows.value = data;
selected.value = data; //select all
hideLoader();
selected.value = rows.value;
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
watch(modal, async () => {
@ -264,10 +283,18 @@ watch(modal, async () => {
emit-value
map-options
lazy-rules
use-input
hide-bottom-space
outlined
readonly
:readonly="
props.systemName !== 'SALARY' &&
props.systemName !== 'SALARY_EMP'
"
:class="
props.systemName === 'SALARY' ||
props.systemName === 'SALARY_EMP'
? 'inputgreen'
: ''
"
>
<template v-slot:no-option>
<q-item>