แก้ไขเตรียมบรรจุ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-07-28 17:05:09 +07:00
parent 6e8103c2aa
commit b6553b5fb1
4 changed files with 90 additions and 28 deletions

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, onMounted, watch, reactive, computed } from "vue";
import { ref, onMounted, watch, reactive, computed, watchEffect } from "vue";
import { useQuasar, QForm } from "quasar";
import type { QTableProps } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -209,7 +209,7 @@ const getTable = async () => {
await http
.get(config.API.personalList(examIdString))
.then(async (res: any) => {
console.log(res);
// console.log(res);
dataRes.value = res.data.result;
rowsAll.value = [];
(rowsFilter.value = []),
@ -252,7 +252,9 @@ const getTable = async () => {
? rowsAll.value
: rowsAll.value.filter((x: any) => x.statusId != "CONTAIN");
rowsFilter.value = rows.value.filter((e: any) => e.draft == "รอส่งตัว");
rowsFilter.value = rows.value.filter(
(e: any) => e.draft == "รอส่งตัว" && e.positionNumber == null
);
console.log(rowsFilter.value);
})
.catch((e) => {
@ -433,6 +435,7 @@ const openAppointModal = (pid: string) => {
const clickCloseModalTree = async () => {
await getTable();
appointModal.value = false;
props.statCard();
};
const validateData = async () => {
@ -492,6 +495,11 @@ onMounted(async () => {
}
await getTable();
});
watchEffect(() => {
if (getTable()) {
props.statCard();
}
});
const containStatus = ref<boolean>(false);
watch(containStatus, () => {
@ -532,6 +540,7 @@ const savelist = () => {
})
.finally(async () => {
await getTable();
hideLoader();
});
});