ui ค้นหาทะเบียนประวัติ
This commit is contained in:
parent
f1d1b722d8
commit
4547e3ea34
2 changed files with 169 additions and 0 deletions
|
|
@ -127,6 +127,7 @@
|
|||
"
|
||||
>
|
||||
<selector
|
||||
class="col-3"
|
||||
hide-bottom-space
|
||||
:rules="[(val:string) => !!val || `${'กรุณาเลือก ประเภท'}`]"
|
||||
outlined
|
||||
|
|
@ -147,6 +148,7 @@
|
|||
doneFn:Function) => filterSelector(inputValue, doneFn,'employeeTypeOps'
|
||||
) " -->
|
||||
<q-input
|
||||
class="col-3"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -158,6 +160,7 @@
|
|||
type="number"
|
||||
/>
|
||||
<q-input
|
||||
class="col-2"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -168,6 +171,7 @@
|
|||
@update:model-value="updateFullname"
|
||||
/>
|
||||
<datepicker
|
||||
class="col-2"
|
||||
menu-class-name="modalfix"
|
||||
:model-value="retireYear"
|
||||
:locale="'th'"
|
||||
|
|
@ -208,6 +212,7 @@
|
|||
</template>
|
||||
</datepicker>
|
||||
<q-input
|
||||
class="col-2"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
|
|
@ -219,6 +224,86 @@
|
|||
@update:model-value="updateGovAge"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
:class="
|
||||
$q.screen.lt.md
|
||||
? ' row col-12 q-col-gutter-xs'
|
||||
: 'no-wrap row col-12 q-col-gutter-xs'
|
||||
"
|
||||
>
|
||||
<q-input
|
||||
v-if="employeeClass == 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="positionPath"
|
||||
hide-bottom-space
|
||||
label="ตำแหน่งในสายงาน"
|
||||
@update:model-value="updatePositionPath"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass == 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="positionLevel"
|
||||
hide-bottom-space
|
||||
label="ระดับ"
|
||||
@update:model-value="updatePositionLevel"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass == 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="positionExecutive"
|
||||
hide-bottom-space
|
||||
label="ตำแหน่งทางการบริหาร"
|
||||
@update:model-value="updatePositionExecutive"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass != 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="employeePosition"
|
||||
hide-bottom-space
|
||||
label="ตำแหน่ง"
|
||||
@update:model-value="updateEmployeePosition"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
v-if="employeeClass != 'officer'"
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="employeeLevel"
|
||||
hide-bottom-space
|
||||
label="ระดับชั้นงาน"
|
||||
@update:model-value="updateEmployeeLevel"
|
||||
class="col-3"
|
||||
/>
|
||||
<q-input
|
||||
clearable
|
||||
dense
|
||||
outlined
|
||||
lazy-rules
|
||||
:model-value="posNo"
|
||||
hide-bottom-space
|
||||
label="ตำแหน่งเลขที่"
|
||||
@update:model-value="updatePosNo"
|
||||
class="col-3"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 row items-center">
|
||||
<q-toggle
|
||||
dense
|
||||
|
|
@ -332,6 +417,12 @@ const props = defineProps({
|
|||
// profileType: String,
|
||||
retireYear: Number || null,
|
||||
govAge: Number || null,
|
||||
positionPath: String,
|
||||
positionLevel: String,
|
||||
positionExecutive: String,
|
||||
employeePosition: String,
|
||||
employeeLevel: String,
|
||||
posNo: String,
|
||||
isTab: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
|
@ -363,6 +454,12 @@ const emit = defineEmits([
|
|||
"update:isShowRetire",
|
||||
// "update:profileType",
|
||||
"update:isProbation",
|
||||
"update:positionPath",
|
||||
"update:positionLevel",
|
||||
"update:positionExecutive",
|
||||
"update:employeePosition",
|
||||
"update:employeeLevel",
|
||||
"update:posNo",
|
||||
]);
|
||||
|
||||
const updateInput = (value: string | number | null) => {
|
||||
|
|
@ -393,6 +490,24 @@ const updateIsShowRetire = (value: string | number | null) => {
|
|||
const updateIsProbation = (value: string | number | null) => {
|
||||
emit("update:isProbation", value);
|
||||
};
|
||||
const updatePositionPath = (value: string | number | null) => {
|
||||
emit("update:positionPath", value);
|
||||
};
|
||||
const updatePositionLevel = (value: string | number | null) => {
|
||||
emit("update:positionLevel", value);
|
||||
};
|
||||
const updatePositionExecutive = (value: string | number | null) => {
|
||||
emit("update:positionExecutive", value);
|
||||
};
|
||||
const updateEmployeePosition = (value: string | number | null) => {
|
||||
emit("update:employeePosition", value);
|
||||
};
|
||||
const updateEmployeeLevel = (value: string | number | null) => {
|
||||
emit("update:employeeLevel", value);
|
||||
};
|
||||
const updatePosNo = (value: string | number | null) => {
|
||||
emit("update:posNo", value);
|
||||
};
|
||||
// const updateProfileType = (value: string | number | null) => {
|
||||
// emit("update:profileType", value);
|
||||
// };
|
||||
|
|
|
|||
|
|
@ -73,6 +73,12 @@
|
|||
v-model:govAge="govAge"
|
||||
v-model:isProbation="isProbation"
|
||||
v-model:isTab="isDrawer"
|
||||
v-model:positionPath="positionPath"
|
||||
v-model:positionLevel="positionLevel"
|
||||
v-model:positionExecutive="positionExecutive"
|
||||
v-model:employeePosition="employeePosition"
|
||||
v-model:employeeLevel="employeeLevel"
|
||||
v-model:posNo="posNo"
|
||||
:doSearch="doSearch"
|
||||
:onExport="onExport"
|
||||
:onTab="changeTab"
|
||||
|
|
@ -160,6 +166,12 @@ const profileType = ref<string>("officer");
|
|||
const profileEmployeeType = ref<string>("temp");
|
||||
const retireYear = ref<number>();
|
||||
const govAge = ref<number>();
|
||||
const positionPath = ref<string>("");
|
||||
const positionLevel = ref<string>("");
|
||||
const positionExecutive = ref<string>("");
|
||||
const employeePosition = ref<string>("");
|
||||
const employeeLevel = ref<string>("");
|
||||
const posNo = ref<string>("");
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
|
@ -1256,6 +1268,48 @@ const doSearch = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
if (positionPath.value !== null && positionPath.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "position_path",
|
||||
criteriaValue: positionPath.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (positionLevel.value !== null && positionLevel.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "position_level",
|
||||
criteriaValue: positionLevel.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (positionExecutive.value !== null && positionExecutive.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "position_executive",
|
||||
criteriaValue: positionExecutive.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (employeePosition.value !== null && employeePosition.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "employee_position",
|
||||
criteriaValue: employeePosition.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (employeeLevel.value !== null && employeeLevel.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "employee_level",
|
||||
criteriaValue: employeeLevel.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (posNo.value !== null && posNo.value !== "") {
|
||||
cirteria.push({
|
||||
criteriaType: "pos_no",
|
||||
criteriaValue: posNo.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (selected.value == null || selected.value == "") return;
|
||||
loaderPage(true);
|
||||
await http
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue