diff --git a/src/modules/05_placement/components/Main.vue b/src/modules/05_placement/components/Main.vue
index af79afc85..9ba46025c 100644
--- a/src/modules/05_placement/components/Main.vue
+++ b/src/modules/05_placement/components/Main.vue
@@ -425,7 +425,7 @@ function filterFnYear(val: string, update: any) {
-import { ref, computed,watchEffect } from "vue";
+import { ref, computed, watchEffect } from "vue";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
import type { QTableProps } from "quasar";
@@ -25,8 +25,8 @@ const props = defineProps({
fecthlistOthet: Function,
optionsType: Array,
rows2: Array,
- filterKeyword2:String,
- type:String,
+ filterKeyword2: String,
+ type: String,
});
const visibleColumns2 = ref([
"no",
@@ -96,7 +96,6 @@ const emit = defineEmits([
"update:filterKeyword2",
"update:type",
"update:selected",
-
]);
const updateInput = (value: any) => {
emit("update:filterKeyword2", value);
@@ -107,7 +106,7 @@ const updateInputType = (value: any) => {
};
//รีเซ็ตค่าในช่องค้นหา
const Reset = () => {
- emit("update:filterKeyword2", "");
+ emit("update:filterKeyword2", "");
};
//เปิด modal ยืนยัน
const clickAddlist = () => {
@@ -117,7 +116,7 @@ const clickAddlist = () => {
//อัพเดต ส่งไปออกคำสั่ง
const addOther = async () => {
let pId: string[] = [];
- let Type = props.type as string
+ let Type = props.type as string;
selected.value.forEach((e: any) => {
pId.push(e.personalId);
});
@@ -136,7 +135,7 @@ const addOther = async () => {
.finally(() => {
props.fecthlistOthet?.();
selected.value = [];
- props.clickClose?.()
+ props.clickClose?.();
});
};
watchEffect(() => {
@@ -144,6 +143,23 @@ watchEffect(() => {
selected.value = [];
}
});
+// filter OptionsType
+const OptionsTypeFn = ref([]);
+function filterFnOptionsType(val: string, update: any) {
+ if (val == "") {
+ update(() => {
+ OptionsTypeFn.value = props.optionsType;
+ });
+ } else {
+ update(() => {
+ if (props.optionsType) {
+ OptionsTypeFn.value = props.optionsType.filter(
+ (e: any) => e.name.search(val) !== -1
+ );
+ }
+ });
+ }
+}
@@ -160,14 +176,23 @@ watchEffect(() => {
dense
:model-value="type"
@update:model-value="updateInputType"
- :options="optionsType"
+ :options="OptionsTypeFn"
label="ประเภทคำสั่ง"
style="width: 400px; max-width: auto"
emit-value
map-options
option-label="name"
option-value="id"
- />
+ use-input
+ @filter="filterFnOptionsType"
+ >
+
+
+ ไม่มีข้อมูล
+
+
+
+
@@ -232,7 +257,6 @@ watchEffect(() => {
-