จัดโค้ดวินัย
This commit is contained in:
parent
71d3b54ef0
commit
7262000680
37 changed files with 492 additions and 697 deletions
|
|
@ -1,27 +1,17 @@
|
|||
<script setup lang="ts">
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
watchEffect,
|
||||
onMounted,
|
||||
watch,
|
||||
type PropType,
|
||||
} from "vue";
|
||||
import { ref, computed, watchEffect, watch, type PropType } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import type { QTableProps } from "quasar";
|
||||
import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer";
|
||||
import type { OpType } from "@/modules/05_placement/interface/response/Main";
|
||||
import type {
|
||||
DataListRow,
|
||||
PersonType,
|
||||
} from "@/modules/11_discipline/interface/request/result";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import type { DataListRow } from "@/modules/11_discipline/interface/request/result";
|
||||
import { useRoute } from "vue-router";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
const route = useRoute();
|
||||
|
||||
const optionsType = ref<[]>([]);
|
||||
const idPath = ref<string>(route.params.id as string);
|
||||
const type = ref<string>("");
|
||||
const rows = ref<DataListRow[]>([]);
|
||||
|
|
@ -79,8 +69,7 @@ const saveOrder = () => {
|
|||
}
|
||||
};
|
||||
//ส่งไปออกคำสั่ง
|
||||
const Ordersave = async () => {
|
||||
// const id = selected.value.map((r) => r.id);
|
||||
async function Ordersave(){
|
||||
const persons = selected.value.map((r) => r.id);
|
||||
|
||||
if (props.title == "ส่งไปออกคำสั่งลงโทษทางวินัย") {
|
||||
|
|
@ -127,21 +116,18 @@ const emit = defineEmits([
|
|||
"update:selected",
|
||||
"update:type",
|
||||
]);
|
||||
|
||||
const updateInput = (value: any) => {
|
||||
emit("update:filterKeyword2", value);
|
||||
};
|
||||
|
||||
//รีเซ็ตค่าในช่องค้นหา
|
||||
const Reset = () => {
|
||||
function Reset(){
|
||||
emit("update:filterKeyword2", "");
|
||||
};
|
||||
|
||||
const updateInputType = (value: any) => {
|
||||
emit("update:type", value);
|
||||
};
|
||||
|
||||
//----(ดึงข้อมูลประเภทคำสั่ง)------//
|
||||
const optionsType = ref<[]>([]);
|
||||
const fecthTypeOption = async () => {
|
||||
async function fecthTypeOption(){
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.typeOrder())
|
||||
|
|
@ -174,14 +160,13 @@ watchEffect(() => {
|
|||
if (props.Modal === true) {
|
||||
selected.value = [];
|
||||
type.value = "";
|
||||
// console.log(props.data.status)
|
||||
if (props.title == "ส่งไปออกคำสั่งลงโทษทางวินัย") {
|
||||
rows.value = props.data.persons.filter(
|
||||
(item: any) => item.status !== "REPORT"
|
||||
);
|
||||
} else if (props.title == "ส่งไปออกคำสั่งงดโทษ/เพิ่มโทษ") {
|
||||
rows.value = props.data.persons.filter(
|
||||
(item: any) => item.status == "REPORT" && item.statusDiscard == 'NEW'
|
||||
(item: any) => item.status == "REPORT" && item.statusDiscard == "NEW"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue