ออกคำสั่ง เงินเดือน
This commit is contained in:
parent
95dcc45177
commit
64dff5d907
4 changed files with 68 additions and 15 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue