Merge branch 'warunee-dev' into develop
This commit is contained in:
commit
7abb5a99db
2 changed files with 65 additions and 9 deletions
|
|
@ -22,7 +22,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
|
||||
const type = ref<string>("");
|
||||
const rows = ref<DataListRow[]>([])
|
||||
const rows = ref<DataListRow[]>([]);
|
||||
const $q = useQuasar();
|
||||
const selected = ref<ResponseData[]>([]);
|
||||
const mixin = useCounterMixin();
|
||||
|
|
@ -124,9 +124,11 @@ const fecthTypeOption = async () => {
|
|||
.then((res) => {
|
||||
optionsType.value = res.data.result.filter(
|
||||
(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-28"
|
||||
e.commandCode === "C-PM-28" ||
|
||||
e.commandCode === "C-PM-29"
|
||||
);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -140,9 +142,11 @@ const fecthTypeOption = async () => {
|
|||
watchEffect(() => {
|
||||
if (props.Modal === true) {
|
||||
selected.value = [];
|
||||
type.value = ''
|
||||
type.value = "";
|
||||
// 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">
|
||||
import { ref, computed, watch } from "vue";
|
||||
import { ref, computed, watch, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
import type { QTableProps } from "quasar";
|
||||
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 config from "@/app.config";
|
||||
|
|
@ -14,7 +15,7 @@ import config from "@/app.config";
|
|||
const $q = useQuasar();
|
||||
const selected = ref<any>([]);
|
||||
const mixin = useCounterMixin();
|
||||
const { success, dialogConfirm } = mixin;
|
||||
const { showLoader, success, messageError, dialogConfirm, hideLoader } = mixin;
|
||||
const emit = defineEmits([
|
||||
"update:filterKeyword2",
|
||||
"update:selected",
|
||||
|
|
@ -130,20 +131,71 @@ function updateInput(value: any) {
|
|||
function Reset() {
|
||||
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],() => {
|
||||
// selected.value = props.modal ? [] : [];
|
||||
// if (props.modal === true) {
|
||||
// selected.value = props.rows2;
|
||||
// }
|
||||
// });
|
||||
onMounted(() => {
|
||||
fecthTypeOption();
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<q-dialog v-model="props.modal">
|
||||
<q-card style="width: 1200px; max-width: 80vw">
|
||||
<DialogHeader tittle="ส่งไปออกคำสั่ง" :close="closeModal" />
|
||||
<q-separator />
|
||||
<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">
|
||||
<q-toolbar style="padding: 0">
|
||||
<q-input
|
||||
|
|
@ -166,7 +218,7 @@ function Reset() {
|
|||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
|
||||
<q-select
|
||||
v-model="visibleColumns2"
|
||||
multiple
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue