Merge branch 'develop' into devTee

This commit is contained in:
setthawutttty 2024-10-24 13:19:55 +07:00
commit 5b89adca00
16 changed files with 117 additions and 197 deletions

View file

@ -86,4 +86,7 @@ export default {
`${salary}/sub-file/${name}/${group}/${id}/${subId}`,
salaryUploadFile: (name: string, group: string, id: string, subId: string) =>
`${salary}/sub-file/${name}/${group}/${id}/${subId}`,
//รายชื่อออกคำสั่ง
orgPosSalaryReport: `${salary}/report/command/`,
};

View file

@ -49,7 +49,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "actFullName",
align: "left",
label: "รักษาการ",
label: "รักษาการแทน",
field: "actFullName",
sortable: true,
headerStyle: "font-size: 14px",

View file

@ -448,7 +448,7 @@ watch(
>
<div
v-if="prop.node.isDeputy == true && prop.node.orgLevel == 0"
class="text-red"
class="text-info"
>
{{ prop.node.orgTreeName }}
</div>

View file

@ -200,126 +200,5 @@ watch(
/>
</div>
</div>
<!-- same address ? -->
<div class="col-xs-12 q-gutter-sm items-center flex q-my-sm">
<label class="text-medium"
>อยจจนตรงกบทอยตามทะเบยนบาน</label
>
<q-radio
dense
val="1"
label="ใช่"
checked-icon="task_alt"
class="inputgreen"
v-model="presentAddress"
unchecked-icon="panorama_fish_eye"
/>
<q-radio
dense
val="0"
label="ไม่"
checked-icon="task_alt"
class="inputgreen"
v-model="presentAddress"
unchecked-icon="panorama_fish_eye"
/>
</div>
<!-- current address -->
<div v-if="presentAddress === '0'">
<div class="col-12 q-pb-xs">
<q-input
dense
outlined
lazy-rules
hide-bottom-space
class="inputgreen"
v-model="formDataAddress.currentAddress"
:label="dataLabel.currentAddress"
:rules="[(val:string) => !!val || `${'กรุณากรอก ที่อยู่ปัจจุบัน'}`]"
/>
</div>
<div class="row col-12 q-col-gutter-x-xs q-col-gutter-y-xs">
<div class="col-xs-6 col-sm-6 col-md-3">
<q-select
dense
outlined
use-input
lazy-rules
emit-value
map-options
hide-bottom-space
option-value="id"
option-label="name"
input-debounce="0"
class="inputgreen"
v-model="formDataAddress.currentProvinceId"
:options="storeLinkCenter.OpsAddress.provinceOps"
:label="dataLabel.currentProvince"
:rules="[(val:string) => !!val || `${'กรุณาเลือก จังหวัด'}`]"
@update:model-value="(value:string) => selectProvince(value, '2')"
@filter="(inputValue:string,
doneFn:Function) => storeLinkCenter.filterSelector(inputValue, doneFn,'provinceOps'
) "
/>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<q-select
dense
outlined
use-input
lazy-rules
emit-value
map-options
hide-bottom-space
option-value="id"
option-label="name"
input-debounce="0"
class="inputgreen"
v-model="formDataAddress.currentDistrictId"
:options="storeLinkCenter.OpsAddress.districtCOps"
:label="dataLabel.currentDistrict"
:rules="[(val:string) => !!val || `${'กรุณาเลือก เขต / อำเภอ'}`]"
@update:model-value="(value:string) => selectDistrict(value, '2')"
@filter="(inputValue:string,
doneFn:Function) => storeLinkCenter.filterSelector(inputValue, doneFn,'districtCOps'
) "
/>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<q-select
dense
outlined
use-input
lazy-rules
emit-value
map-options
hide-bottom-space
option-value="id"
option-label="name"
input-debounce="0"
class="inputgreen"
v-model="formDataAddress.currentSubDistrictId"
:options="storeLinkCenter.OpsAddress.subdistrictCOps"
:label="dataLabel.currentSubDistrict"
:rules="[(val:string) => !!val || `${'กรุณาเลือก แขวง / ตำบล'}`]"
@update:model-value="(value:string) => selectSubDistrict(value, '2')"
@filter="(inputValue:string,
doneFn:Function) => storeLinkCenter.filterSelector(inputValue, doneFn,'subdistrictCOps'
) "
/>
</div>
<div class="col-xs-6 col-sm-6 col-md-3">
<q-input
dense
readonly
outlined
lazy-rules
hide-bottom-space
v-model="formDataAddress.currentZipCode"
:label="dataLabel.registrationZipCode"
/>
</div>
</div>
</div>
</div>
</template>

View file

@ -955,7 +955,7 @@ onMounted(async () => {
>
</q-item>
<q-item
<!-- <q-item
v-if="
props.row.bmaOfficer !== 'บุคคลภายนอก' &&
roleAdmin &&
@ -981,7 +981,7 @@ onMounted(async () => {
/>
</q-item-section>
<q-item-section>เลอกหนวยงานทบเลอน</q-item-section>
</q-item>
</q-item> -->
<q-item
v-if="

View file

@ -93,7 +93,7 @@ const columns = ref<QTableProps["columns"]>([
const modalCommand = ref<boolean>(false);
/** popup ยืนยันส่งัว */
/** popup ยืนยันส่งไปออกคำสั่ง */
function saveOrder() {
dialogConfirm(
$q,
@ -122,7 +122,7 @@ function convertText(val: string) {
case "PENDING":
return "รอดำเนินการ";
case "REPORT":
return "ส่งไปเเต่งตั้ง";
return "ส่งไปออกคำสั่ง";
case "DONE":
return "เสร็จสิ้น";
default:
@ -136,6 +136,7 @@ watchEffect(() => {
}
});
</script>
<template>
<q-dialog v-model="props.modal">
<q-card style="width: 1200px; max-width: 80vw">
@ -190,7 +191,7 @@ watchEffect(() => {
:filter="filterKeyword"
row-key="id"
:visible-columns="visibleColumns"
selection="multiple"
selection="single"
v-model:selected="selected"
>
<template v-slot:header-selection="scope">
@ -243,7 +244,6 @@ watchEffect(() => {
</q-card-actions>
</q-card>
</q-dialog>
<DialogCreateCommand
v-model:modal="modalCommand"
:command-type-code="'C-PM-10'"

View file

@ -134,7 +134,7 @@ function convertText(val: string) {
case "PENDING":
return "รอดำเนินการ";
case "REPORT":
return "ส่งไปเเต่งตั้ง";
return "ส่งไปออกคำสั่ง";
case "DONE":
return "เสร็จสิ้น";
default:

View file

@ -1,38 +1,31 @@
<script setup lang="ts">
import { reactive, computed, watch } from "vue";
import { reactive, computed, watch, ref } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import type { FormData } from "@/modules/11_discipline/interface/request/Director";
import type { FormData } from "@/modules/11_discipline/interface/request/director";
/**
* importComponents
*/
/** importComponents*/
import DialogHeader from "@/components/DialogHeader.vue";
import Form from "@/modules/12_evaluatePersonal/components/Director/Form.vue";
/**
* importStore
*/
/** importStore*/
import { useCounterMixin } from "@/stores/mixin";
/**
* use
*/
/** use*/
const $q = useQuasar();
const { messageError, showLoader, hideLoader, dialogConfirm, success } =
useCounterMixin();
/**
* props
*/
/** props*/
const modal = defineModel<boolean>("modal", { required: true });
const directorId = defineModel<string>("directorId", { required: true });
const actionType = defineModel<string>("actionType", { required: true });
const props = defineProps({
fetchDataList: { type: Function, required: true },
});
const isLoad = ref<boolean>(false);
// Dialog
const title = computed(() =>
@ -55,12 +48,13 @@ const dataDettail = reactive<FormData>({
/**
* function fetch อมลชอกรรมการ
*/
function fetchData() {
async function fetchData() {
isLoad.value = false;
showLoader();
http
await http
.get(config.API.evaluateDirectorById(directorId.value))
.then((res) => {
const data = res.data.result;
.then(async (res) => {
const data = await res.data.result;
dataDettail.personalId = data.Id;
dataDettail.prefix = data.prefix;
dataDettail.firstname = data.firstName;
@ -71,7 +65,10 @@ function fetchData() {
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
isLoad.value = true;
});
}
@ -114,8 +111,8 @@ function onCloseDialog() {
watch(
() => modal.value,
() => {
modal.value && fetchData();
async () => {
modal.value && (await fetchData());
}
);
</script>
@ -125,6 +122,7 @@ watch(
<q-card style="width: 450px">
<DialogHeader :tittle="title" :close="onCloseDialog" />
<Form
v-if="isLoad"
:on-submit="onSubmit"
:data="dataDettail"
:action-type="actionType"

View file

@ -260,13 +260,9 @@ function inputEdit(val: boolean) {
};
}
onMounted(() => {
onMounted(async () => {
if (props.data) {
showLoader();
setTimeout(async () => {
await fetchForm(props.data);
hideLoader();
}, 1000);
await fetchForm(props.data);
}
});
</script>

View file

@ -42,6 +42,7 @@ const pagination = ref({
* function fetch อมลรายการชอกรรมการ
*/
async function getList() {
dataStore.rows = [];
showLoader();
await http
.get(config.API.evaluateDirectorMain())

View file

@ -54,6 +54,7 @@ function onSubmit(formData: FormData) {
});
}
</script>
<template>
<div class="col-xs-12 col-sm-12 col-md-12">
<div class="toptitle col-12 row items-center">

View file

@ -1,29 +1,21 @@
<script setup lang="ts">
import { ref, onMounted, reactive, computed } from "vue";
import { ref, onMounted, reactive, computed, onBeforeMount } from "vue";
import { useQuasar } from "quasar";
import { useRoute } from "vue-router";
import router from "@/router";
import http from "@/plugins/http";
import config from "@/app.config";
/**
* importTyep
*/
/** importTyep*/
import type { FormData } from "@/modules/12_evaluatePersonal/interface/index/meeting";
/**
* importComponents
*/
/** importComponents*/
import Form from "@/modules/12_evaluatePersonal/components/Meeting/Form.vue";
/**
* importStore
*/
/** importStore*/
import { useCounterMixin } from "@/stores/mixin";
/**
* use
*/
/** use*/
const route = useRoute();
const $q = useQuasar();
const {
@ -55,12 +47,13 @@ const data = reactive({
file: [],
});
/**
* function fetch อมลการประช
*/
function fetchData() {
const isLoad = ref<boolean>(false);
/** function fetch ข้อมูลการประชุม*/
async function fetchData() {
isLoad.value = false;
showLoader();
http
await http
.get(config.API.meetingById(personalId.value))
.then(async (res) => {
const dataApi = await res.data.result;
@ -74,11 +67,10 @@ function fetchData() {
})
.catch((e) => {
messageError($q, e);
hideLoader();
})
.finally(() => {
setTimeout(() => {
hideLoader();
}, 2000);
isLoad.value = true;
});
}
@ -115,10 +107,11 @@ function onSubmit(formData: FormData) {
});
}
onMounted(() => {
fetchData();
onMounted(async () => {
await fetchData();
});
</script>
<template>
<div class="col-xs-12 col-sm-12 col-md-11">
<div class="toptitle col-12 row items-center">
@ -135,6 +128,6 @@ onMounted(() => {
{{ title }}
</div>
<Form :on-submit="onSubmit" :data="data" />
<Form v-if="isLoad" :on-submit="onSubmit" :data="data" />
</div>
</template>

View file

@ -35,6 +35,7 @@ const roundFilter = ref<any>(); //รอบการขึ้นเงินเ
const agencyFilter = ref<string>(""); //
const snapFilter = ref<string>(""); //
const periodLatest = ref<DataPeriodLatest>();
const salaryPeriodId = ref<string>("");
//
const roundOptions = ref<DataOptionShort[]>([]); //
@ -70,6 +71,7 @@ async function getRound() {
roundOptions.value = [];
roundFilter.value = [];
const data = res.data.result.data;
if (data.length !== 0) {
isDisable.value = true;
lastPage.value = Math.ceil(res.data.result.total / pageSize.value);
@ -94,6 +96,7 @@ async function getRound() {
store.roundMainCode = roundFilter.value.shortCode;
store.roundYear = roundFilter.value.year;
store.isClosedRound = roundFilter.value.isClose;
salaryPeriodId.value = roundFilter.value.id;
await Promise.all([
getSnap(roundFilter.value.shortCode),
@ -199,6 +202,7 @@ async function getAgencyPosition(id: string) {
.then(async (res) => {
const data = await res.data.result;
store.rootId = data.rootId;
const position = agencyOptions.value?.find(
(e: DataOption) => e.id === data.rootId
);
@ -242,6 +246,7 @@ async function fetchSalalyPeriod(
.post(config.API.salaryListPeriodLatest, body)
.then(async (res) => {
const data = await res.data.result;
console.log(data);
if (roundFilter.value.shortCode !== "SPECIAL") {
if (Object.values(data).includes(null)) {
@ -274,6 +279,7 @@ async function fetchSalalyPeriod(
async function onChangeRound() {
// isClosedRound
store.isClosedRound = roundFilter.value.isClose;
salaryPeriodId.value = roundFilter.value.id;
if (roundFilter.value.shortCode === "SPECIAL") {
store.tabGroup = "group1";
}
@ -357,8 +363,21 @@ function filterSelector(val: string, update: Function, refData: string) {
}
}
onMounted(() => {
getRound();
async function fetchCheckisOfficer() {
http
.get(config.API.workflowKeycloakSystem(`SALARY_OFFICER`))
.then((res) => {
const data = res.data.result;
isOfficer.value = data.isOfficer;
isStaff.value = data.isStaff;
})
.catch((e) => {
messageError($q, e);
});
}
onMounted(async () => {
await Promise.all([getRound(), fetchCheckisOfficer()]);
});
</script>
@ -542,6 +561,7 @@ onMounted(() => {
v-model:is-staff="isStaff"
system-name="SALARY"
:command-type-code-array="['C-PM-33', 'C-PM-34', 'C-PM-35']"
:salary-period-id="salaryPeriodId"
/>
</template>

View file

@ -35,6 +35,7 @@ const roundFilter = ref<any>(); //รอบการขึ้นเงินเ
const agencyFilter = ref<string>(""); //
const snapFilter = ref<string>(""); //
const periodLatest = ref<DataPeriodLatest>();
const salaryPeriodId = ref<string>("");
//
const roundOptions = ref<DataOptionShort[]>([]); //
@ -92,7 +93,7 @@ async function getRound() {
roundFilter.value = await (roundOptions.value
? roundOptions.value[0]
: "");
salaryPeriodId.value = roundFilter.value.id;
store.roundMainCode = roundFilter.value.shortCode;
store.isClosedRound = roundFilter.value.isClose;
@ -262,6 +263,7 @@ async function fetchSalalyPeriod(
async function onChangeRound() {
// isClosedRound
store.isClosedRound = roundFilter.value.isClose;
salaryPeriodId.value = roundFilter.value.id;
await getSnap(roundFilter.value.shortCode);
await getAgency(roundFilter.value.revisionId);
await getAgencyPosition(roundFilter.value.revisionId);
@ -359,8 +361,21 @@ function filterSelector(val: string, update: Function, refData: string) {
}
}
onMounted(() => {
getRound();
async function fetchCheckisOfficer() {
http
.get(config.API.workflowKeycloakSystem(`SALARY_EMP`))
.then((res) => {
const data = res.data.result;
isOfficer.value = data.isOfficer;
isStaff.value = data.isStaff;
})
.catch((e) => {
messageError($q, e);
});
}
onMounted(async() => {
await Promise.all([getRound(), fetchCheckisOfficer()]);
});
</script>
@ -538,6 +553,7 @@ onMounted(() => {
v-model:is-staff="isStaff"
system-name="SALARY_EMP"
:command-type-code-array="['C-PM-36', 'C-PM-37']"
:salary-period-id="salaryPeriodId"
/>
</template>

View file

@ -291,9 +291,8 @@ onMounted(() => {
<q-space />
<q-btn
class="q-px-sm"
v-if="storeActing.isOfficer === true || storeActing.isStaff === true"
v-if="storeActing.isOfficer === true"
dense
:disable="storeActing.isStaff == true && storeActing.rootId == ''"
flat
round
color="add"

View file

@ -40,6 +40,7 @@ const props = defineProps({
commandTypeCodeArray: { type: Array, defult: [] }, //
systemName: String, //
orgPublishDate: { type: Date || undefined, defult: undefined },
salaryPeriodId: { type: String, defult: "" }, //
});
const commandOp = ref<ListCommand[]>([]); //
@ -49,6 +50,8 @@ const commandYear = ref<number>(new Date().getFullYear());
const commandAffectDate = ref<Date | null>(null); //
const commandExcecuteDate = ref<Date | null>(null); //
const commandCode = ref<string>("");
const group = ref<string>("GROUP1.1"); //
const isCheckOrgPublishDate = ref<boolean>(false); //
const groupDataOp = ref<DataOption[]>([
@ -204,11 +207,20 @@ function filterOption(val: string, update: Function) {
}
/**
* งกนเลอกกล
* @param val กลมทองการคนหา
* งกนเลอกประเภทคำสงและเลอกกล
*/
function updateGroup() {
getPerson();
function updateValue() {
if (props.systemName === "SALARY" || props.systemName === "SALARY_EMP") {
const code = commandOp.value.find(
(e: any) => e.id === commandType.value
)?.code;
if (code && props.salaryPeriodId) {
commandCode.value = code;
getPerson();
}
} else {
getPerson();
}
}
/** ดึงข้อมูลคน */
@ -221,10 +233,9 @@ function getPerson() {
const pathAPI =
props.systemName === "ORGANIZATION"
? config.API.orgPosReport
: props.systemName === "SALARY"
? config.API.orgPosReport
: props.systemName === "SALARY_EMP"
? config.API.orgPosReport
: props.systemName === "SALARY" || props.systemName === "SALARY_EMP"
? config.API.orgPosSalaryReport +
`${commandCode.value}/${props.salaryPeriodId}`
: props.systemName === "ACTING"
? config.API.orgPosReport
: "";
@ -259,7 +270,9 @@ watch(modal, async () => {
(item) => item.id !== "GROUP1.1"
);
}
getPerson();
if (props.systemName !== "SALARY" && props.systemName !== "SALARY_EMP") {
getPerson();
}
}
});
</script>
@ -295,6 +308,7 @@ watch(modal, async () => {
? 'inputgreen'
: ''
"
@update:model-value="updateValue"
>
<template v-slot:no-option>
<q-item>
@ -466,7 +480,7 @@ watch(modal, async () => {
map-options
use-input
outlined
@update:model-value="updateGroup"
@update:model-value="updateValue"
@filter="(inputValue:any,doneFn:Function) => filterOption(inputValue, doneFn) "
>
<template v-slot:no-option>