list ให้เลือกคำสั่งของวินัย
This commit is contained in:
parent
082f0a3bd9
commit
a2302b8ffa
2 changed files with 65 additions and 9 deletions
|
|
@ -22,7 +22,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
const type = ref<string>("");
|
const type = ref<string>("");
|
||||||
const rows = ref<DataListRow[]>([])
|
const rows = ref<DataListRow[]>([]);
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const selected = ref<ResponseData[]>([]);
|
const selected = ref<ResponseData[]>([]);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
|
|
@ -124,9 +124,11 @@ const fecthTypeOption = async () => {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
optionsType.value = res.data.result.filter(
|
optionsType.value = res.data.result.filter(
|
||||||
(e: OpType) =>
|
(e: OpType) =>
|
||||||
e.commandCode === "C-PM-26" ||
|
e.commandCode === "C-PM-19" ||
|
||||||
|
e.commandCode === "C-PM-20" ||
|
||||||
e.commandCode === "C-PM-27" ||
|
e.commandCode === "C-PM-27" ||
|
||||||
e.commandCode === "C-PM-28"
|
e.commandCode === "C-PM-28" ||
|
||||||
|
e.commandCode === "C-PM-29"
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -140,9 +142,11 @@ const fecthTypeOption = async () => {
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
if (props.Modal === true) {
|
if (props.Modal === true) {
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
type.value = ''
|
type.value = "";
|
||||||
// console.log(props.data.status)
|
// console.log(props.data.status)
|
||||||
rows.value = props.data.persons.filter((item: any) => item.status !== 'REPORT');
|
rows.value = props.data.persons.filter(
|
||||||
|
(item: any) => item.status !== "REPORT"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, watch } from "vue";
|
import { ref, computed, watch, onMounted } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main";
|
||||||
|
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -14,7 +15,7 @@ import config from "@/app.config";
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const selected = ref<any>([]);
|
const selected = ref<any>([]);
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { success, dialogConfirm } = mixin;
|
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
"update:filterKeyword2",
|
"update:filterKeyword2",
|
||||||
"update:selected",
|
"update:selected",
|
||||||
|
|
@ -130,20 +131,71 @@ function updateInput(value: any) {
|
||||||
function Reset() {
|
function Reset() {
|
||||||
emit("update:filterKeyword2", "");
|
emit("update:filterKeyword2", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const type = ref<string>("");
|
||||||
|
//----(ดึงข้อมูลประเภทคำสั่ง)------//
|
||||||
|
const optionsType = ref<[]>([]);
|
||||||
|
const fecthTypeOption = async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.get(config.API.typeOrder())
|
||||||
|
.then((res) => {
|
||||||
|
optionsType.value = res.data.result.filter(
|
||||||
|
(e: OpType) =>
|
||||||
|
e.commandCode === "C-PM-25" || e.commandCode === "C-PM-26"
|
||||||
|
);
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// watch([()=>props.modal],() => {
|
// watch([()=>props.modal],() => {
|
||||||
// selected.value = props.modal ? [] : [];
|
// selected.value = props.modal ? [] : [];
|
||||||
// if (props.modal === true) {
|
// if (props.modal === true) {
|
||||||
// selected.value = props.rows2;
|
// selected.value = props.rows2;
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
onMounted(() => {
|
||||||
|
fecthTypeOption();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="props.modal">
|
<q-dialog v-model="props.modal">
|
||||||
<q-card style="width: 1200px; max-width: 80vw">
|
<q-card style="width: 1200px; max-width: 80vw">
|
||||||
<DialogHeader tittle="ส่งไปออกคำสั่ง" :close="closeModal" />
|
<DialogHeader tittle="ส่งไปออกคำสั่ง" :close="closeModal" />
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pt-none">
|
<q-card-section class="q-pt-none">
|
||||||
<div class="row justify-end">
|
<div class="row justify-between">
|
||||||
|
<div class="col-5">
|
||||||
|
<q-toolbar style="padding: 0">
|
||||||
|
<q-select
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
v-model="type"
|
||||||
|
:options="optionsType"
|
||||||
|
label="ประเภทคำสั่ง"
|
||||||
|
style="width: 400px; max-width: auto"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
use-input
|
||||||
|
><template v-slot:no-option>
|
||||||
|
<q-item>
|
||||||
|
<q-item-section class="text-grey">
|
||||||
|
ไม่มีข้อมูล
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</template>
|
||||||
|
</q-select>
|
||||||
|
</q-toolbar>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<q-toolbar style="padding: 0">
|
<q-toolbar style="padding: 0">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue