Merge branch 'develop' into nice_dev

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-12-15 17:23:51 +07:00
commit 4ec797c4ec
6 changed files with 110 additions and 44 deletions

View file

@ -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"
);
}
});

View file

@ -521,7 +521,6 @@ onMounted(async () => {
</div>
<div class="col-4">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
readonly
@ -533,7 +532,6 @@ onMounted(async () => {
</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules

View file

@ -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

View file

@ -162,7 +162,7 @@ watch(
() => currentPage.value,
() => {
rowsPerPage.value = pagination.value.rowsPerPage;
getData()
getData();
}
);
@ -171,7 +171,7 @@ watch(
() => {
rowsPerPage.value = pagination.value.rowsPerPage;
currentPage.value = 1;
getData()
getData();
}
);
@ -201,7 +201,7 @@ watch(
/** ไปยังหน้าเพิ่มข้อมูล */
function redirectToPageadd() {
dataStore.rowsAdd = []
dataStore.rowsAdd = [];
router.push(`/discipline-appealcomplain/add`);
}
@ -209,7 +209,7 @@ function editPage(id: string) {
router.push(`/discipline-appealcomplain/${id}`);
}
function filterFn() {
getData()
getData();
console.log("enter", filterKeyword.value);
}
@ -245,7 +245,7 @@ function getData() {
)
.then((res) => {
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
fetchAppealComplain(res.data.result.data)
fetchAppealComplain(res.data.result.data);
})
.catch((e) => {
messageError($q, e);
@ -255,17 +255,20 @@ function getData() {
});
}
function dataUpdate(){
getData()
function dataUpdate() {
getData();
}
function yearAll() {
formData.year = 0;
getData();
}
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
onMounted(async () => {
getData()
getData();
// await getList();
dataStore.visibleColumns = visibleColumns.value;
dataStore.columns = columns.value;
});
</script>
@ -310,10 +313,18 @@ onMounted(async () => {
dense
lazy-rules
outlined
:model-value="Number(formData.year) + 543"
:model-value="
formData.year === 0 ? null : Number(formData.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>
<template v-if="formData.year" v-slot:append>
<q-icon
name="cancel"
@click.stop.prevent="yearAll"
class="cursor-pointer"
/>
</template>
<template v-slot:prepend>
<q-icon
name="event"

View file

@ -42,6 +42,7 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
// เสร็จสิ้น -> DONE
const visibleColumns = ref<String[]>([
"no",
"citizanId",
"fullName",
"position",
@ -66,6 +67,26 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
}
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "center",
label: "ลำดับ",
sortable: false,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "level",
align: "left",
label: "ระดับที่ยื่นขอ",
sortable: true,
field: "level",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "citizanId",
align: "center",
@ -95,17 +116,6 @@ export const useEvalutuonStore = defineStore("EvalutuonStore", () => {
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "level",
align: "left",
label: "ระดับ",
sortable: true,
field: "level",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
},
{
name: "positionNumber",
align: "left",

View file

@ -43,15 +43,6 @@ onMounted(async () => {
agency: "กลุ่มงานกฎหมาย",
status: "WAIT_CHECK_DOC_V1",
},
{
citizanId: "172223000401",
fullName: "นางธัญพร ปัทมเดชา",
position: "หัวหน้าสำนักงาน",
level: "ปฏิบัติการ",
positionNumber: "สก.ก412",
agency: "กลุ่มงานกฎหมาย",
status: "WAIT_CHECK_DOC_V1",
},
{
citizanId: "122222000401",
fullName: "นายสิริศักดิ์ พรมบุตร",
@ -176,10 +167,10 @@ onMounted(async () => {
<q-icon
color="primary"
size="xs"
name="mdi-bookmark-outline"
name="mdi-eye"
/>
</q-item-section>
<q-item-section>ตรวจสอบคณสมบ</q-item-section>
<q-item-section>รายละเอยดคำขอ</q-item-section>
</q-item>
<q-separator />