วินัยเพิ่มผู้ถูกร้องเรียน
This commit is contained in:
parent
72373a1259
commit
d09e4c25c8
2 changed files with 38 additions and 29 deletions
|
|
@ -27,15 +27,15 @@ interface tableType {
|
||||||
}
|
}
|
||||||
|
|
||||||
const rows = ref<tableType[]>([]);
|
const rows = ref<tableType[]>([]);
|
||||||
const type = ref<string>("001");
|
const type = ref<string>("idcard");
|
||||||
const search = ref<string>("");
|
const search = ref<string>("");
|
||||||
const selected = ref<any>([]);
|
const selected = ref<any>([]);
|
||||||
const dataObject = ref<any>([]);
|
const dataObject = ref<any>([]);
|
||||||
|
|
||||||
const typeOps = ref<typeOp[]>([
|
const typeOps = ref<typeOp[]>([
|
||||||
{ id: "001", name: "เลขประจำตัวประชาชน" },
|
{ id: "idcard", name: "เลขประจำตัวประชาชน" },
|
||||||
{ id: "002", name: "ชื่อ" },
|
{ id: "firstname", name: "ชื่อ" },
|
||||||
{ id: "003", name: "นามสกุล" },
|
{ id: "lastname", name: "นามสกุล" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/** หัวข้อที่เเสดงในตาราง */
|
/** หัวข้อที่เเสดงในตาราง */
|
||||||
|
|
@ -101,6 +101,11 @@ const props = defineProps({
|
||||||
modal: {
|
modal: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
btnTitle: {
|
||||||
|
type: String,
|
||||||
|
default: "เพิ่ม",
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -113,10 +118,12 @@ const props = defineProps({
|
||||||
close: {
|
close: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
|
required: true,
|
||||||
},
|
},
|
||||||
save: {
|
save: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: () => console.log("not function"),
|
default: () => console.log("not function"),
|
||||||
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -227,8 +234,9 @@ onMounted(() => {
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pa-md bg-grey-1">
|
<q-card-section class="q-pa-md bg-grey-1">
|
||||||
<div class="row col-12 q-col-gutter-sm items-start">
|
<div class="row col-12 q-col-gutter-sm items-start">
|
||||||
<div class="col-12 col-sm-6 col-md-4">
|
<div class="col-12 col-sm-6 col-md-3">
|
||||||
<q-select
|
<q-select
|
||||||
|
label="ค้นหาจาก"
|
||||||
v-model="type"
|
v-model="type"
|
||||||
:options="typeOps"
|
:options="typeOps"
|
||||||
emit-value
|
emit-value
|
||||||
|
|
@ -241,31 +249,23 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-6 col-md-4">
|
<div class="col-12 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
v-model="search"
|
v-model="search"
|
||||||
outlined
|
outlined
|
||||||
clearable
|
clearable
|
||||||
@update:model-value="updateInput"
|
@update:model-value="updateInput"
|
||||||
dense
|
dense
|
||||||
:label="
|
label="คำค้น"
|
||||||
type === '001'
|
|
||||||
? 'ค้นหาจากเลขบัตรประชาชน'
|
|
||||||
: type === '002'
|
|
||||||
? 'ค้นหาจากชื่อ'
|
|
||||||
: type === '003'
|
|
||||||
? 'ค้นหาจากนามสกุล'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-6 col-md-4">
|
<div class="col-12 col-sm-6 col-md-2">
|
||||||
<q-btn
|
<q-btn
|
||||||
color="public"
|
color="primary"
|
||||||
|
icon="search"
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
class="full-width"
|
class="full-width q-pa-sm"
|
||||||
style="padding: 7px 0 7px 0"
|
|
||||||
@click="searchInput()"
|
@click="searchInput()"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -342,17 +342,15 @@ onMounted(() => {
|
||||||
<div class="row justify-end q-px-md q-py-sm items-center">
|
<div class="row justify-end q-px-md q-py-sm items-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
dense
|
dense
|
||||||
push
|
color="public"
|
||||||
unelevated
|
|
||||||
color="positive"
|
|
||||||
id="onSubmit"
|
id="onSubmit"
|
||||||
class="q-px-md q-py-xs"
|
class="q-px-md q-py-xs"
|
||||||
@click="savePost"
|
@click="savePost"
|
||||||
>
|
>
|
||||||
<q-icon left name="add" />
|
<!-- <q-icon left name="add" /> -->
|
||||||
<div>เพิ่ม</div>
|
<div>{{ props.btnTitle }}</div>
|
||||||
<!-- icon="mdi-content-save-outline" -->
|
<!-- icon="mdi-content-save-outline" -->
|
||||||
<q-tooltip>บันทึก</q-tooltip>
|
<q-tooltip>{{ props.btnTitle }}</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,16 @@ import type { QTableProps } from "quasar";
|
||||||
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
import type { DataOption } from "@/modules/11_discipline/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
FormData,
|
FormData,
|
||||||
MyObjectComplaintsRef,DataAddRequest
|
MyObjectComplaintsRef,
|
||||||
|
DataAddRequest,
|
||||||
} from "@/modules/11_discipline/interface/request/complaint";
|
} from "@/modules/11_discipline/interface/request/complaint";
|
||||||
|
|
||||||
/** importStroe*/
|
/** importStroe*/
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
import { useComplainstDataStore } from "@/modules/11_discipline/store/ComplaintsStore";
|
||||||
|
|
||||||
|
import DialogAddPersonal from "@/components/Dialogs/AddPersonal.vue";
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const fileDocDataUpload = ref<File[]>([]);
|
const fileDocDataUpload = ref<File[]>([]);
|
||||||
|
|
@ -290,8 +293,9 @@ function onSubmit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**ชั่งฟังเพิ่มข้อมูล ลง ตาราง */
|
/**ชั่งฟังเพิ่มข้อมูล ลง ตาราง */
|
||||||
async function addDatainTable() {
|
const modal = ref<boolean>(false);
|
||||||
console.log("test");
|
const toggleModal = () => (modal.value = !modal.value);
|
||||||
|
async function addPerson() {
|
||||||
const listData: DataAddRequest[] = [
|
const listData: DataAddRequest[] = [
|
||||||
{
|
{
|
||||||
id: "001",
|
id: "001",
|
||||||
|
|
@ -328,6 +332,7 @@ async function addDatainTable() {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
await complainstStore.fetchComplainstAdd(listData);
|
await complainstStore.fetchComplainstAdd(listData);
|
||||||
|
toggleModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -450,10 +455,16 @@ onMounted(() => {
|
||||||
<div class="full-width" v-if="formData.complainantType === '0'">
|
<div class="full-width" v-if="formData.complainantType === '0'">
|
||||||
<div class="row col-12 q-mb-xs">
|
<div class="row col-12 q-mb-xs">
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn color="blue" outline @click="addDatainTable">
|
<q-btn color="blue" outline @click="toggleModal">
|
||||||
<q-icon left name="add" />
|
<q-icon left name="add" />
|
||||||
<div>เพิ่ม</div>
|
<div>เพิ่ม</div>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
<DialogAddPersonal
|
||||||
|
:modal="modal"
|
||||||
|
btn-title="เพิ่มรายชื่อผู้ถูกสอบสวน"
|
||||||
|
:close="toggleModal"
|
||||||
|
:save="addPerson"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<d-table
|
<d-table
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue