ปรับ table popup ส่งไปสืบสวน

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-23 10:30:55 +07:00
parent b5c021e895
commit 48f9bc77e4

View file

@ -114,9 +114,14 @@ const selected = ref<any>([]);
const inspectionResults = ref<string>("");
const inputRef = ref<any>(null);
const initialPagination = ref<any>({
descending: false,
rowsPerPage: 25,
});
function onclickSend() {
inputRef.value.validate();
if (!inputRef.value.hasError) {
if (!inputRef.value.hasError && selected.value.length > 0) {
dialogConfirm(
$q,
async () => {
@ -137,6 +142,8 @@ function onClickClose() {
watch([() => props.modal], () => {
inspectionResults.value = props.modal ? "" : "";
selected.value = props.modal ? [] : [];
selected.value.push(complainstStore.rowsAdd);
});
</script>
@ -164,22 +171,24 @@ watch([() => props.modal], () => {
row-key="id"
flat
bordered
:paging="true"
:paging="false"
dense
class="custom-header-table"
:visible-columns="visibleColumns"
selection="multiple"
v-model:selected="selected"
:pagination="initialPagination"
hide-bottom
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width>
<q-checkbox
<!-- <q-checkbox
keep-color
color="primary"
dense
v-model="props.selected"
/>
/> -->
</q-th>
<q-th
v-for="col in props.cols"