update all ui

This commit is contained in:
kamoa457 2023-10-20 15:56:48 +07:00
parent e6a93a3be9
commit e4001f6e86
13 changed files with 1461 additions and 394 deletions

BIN
src/assets/img/result.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
src/assets/img/seo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -30,6 +30,8 @@ import UserlistView from "../views/Users/UserlistView.vue"
import RoomLayoutView from "../views/RoomLayout/RoomLayoutView.vue" import RoomLayoutView from "../views/RoomLayout/RoomLayoutView.vue"
import UtilitiesRoom from "../views/UtilitiesRoom/UtilitieView.vue" import UtilitiesRoom from "../views/UtilitiesRoom/UtilitieView.vue"
import addUserRoom from "../views/Restroom/AddRoom.vue" import addUserRoom from "../views/Restroom/AddRoom.vue"
import Reports from "../views/Reports/ReportlistView.vue"
import searchFilter from "../views/SearchAll/SearchView.vue"
const router = createRouter({ const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL), history: createWebHistory(import.meta.env.BASE_URL),
routes: [ routes: [
@ -63,6 +65,16 @@ const router = createRouter({
name: "utilities", name: "utilities",
component: UtilitiesRoom, component: UtilitiesRoom,
}, },
{
path: "/reports",
name: "reports",
component: Reports,
},
{
path: "/searchfilter",
name: "searchfilter",
component: searchFilter,
},
{ {
path: '/room/detail/:id', path: '/room/detail/:id',
name: 'DetailRoom', name: 'DetailRoom',

View File

@ -4,11 +4,11 @@
<section class="my-4 py-4"> <section class="my-4 py-4">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-sm-3"> <div class="col-sm-2">
<div class="card"> <div class="card">
<div class="card-body text-center"> <div class="card-body text-center">
<h5 class="card-title">ทะเบยน</h5> <p class="card-title" style="font-weight: bold; color: #000">ทะเบยน</p>
<img src="../../../assets/img/register.png" alt="title" loading="lazy" class="w-70" /> <img src="../../../assets/img/register.png" alt="title" loading="lazy" class="w-50" />
<RouterLink :to="{ name: 'users' }" class="dropdown-item border-radius-md"> <RouterLink :to="{ name: 'users' }" class="dropdown-item border-radius-md">
<a href="#" class="btn btn-primary mt-4">ทะเบยน</a> <a href="#" class="btn btn-primary mt-4">ทะเบยน</a>
</RouterLink> </RouterLink>
@ -16,39 +16,61 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-3 mb-3 mb-sm-0"> <div class="col-sm-2 mb-3 mb-sm-0">
<div class="card"> <div class="card">
<div class="card-body text-center"> <div class="card-body text-center">
<h5 class="card-title">สถานะหองพ</h5> <p class="card-title" style="font-weight: bold; color: #000">สถานะหองพ</p>
<img src="../../../assets/img/status.png" alt="title" loading="lazy" class="w-70" /> <img src="../../../assets/img/status.png" alt="title" loading="lazy" class="w-50" />
<RouterLink :to="{ name: 'room' }" class="dropdown-item border-radius-md"> <RouterLink :to="{ name: 'room' }" class="dropdown-item border-radius-md">
<a href="#" class="btn btn-primary mt-4">สถานะหองพ</a> <a href="#" class="btn btn-primary mt-4">สถานะหองพ</a>
</RouterLink> </RouterLink>
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-2">
<div class="card"> <div class="card">
<div class="card-body text-center"> <div class="card-body text-center">
<h5 class="card-title">งหองพ</h5> <p class="card-title" style="font-weight: bold; color: #000">งหองพ</p>
<img src="../../../assets/img/layout.png" alt="title" loading="lazy" class="w-70" /> <img src="../../../assets/img/layout.png" alt="title" loading="lazy" class="w-50" />
<RouterLink :to="{ name: 'layout' }" class="dropdown-item border-radius-md"> <RouterLink :to="{ name: 'layout' }" class="dropdown-item border-radius-md">
<a href="#" class="btn btn-primary mt-4">งหองพ</a> <a href="#" class="btn btn-primary mt-4">งหองพ</a>
</RouterLink> </RouterLink>
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-2">
<div class="card"> <div class="card">
<div class="card-body text-center"> <div class="card-body text-center">
<h5 class="card-title">าสาธารณปโภค</h5> <p class="card-title" style="font-weight: bold; color: #000">าสาธารณปโภค</p>
<img src="../../../assets/img/utilities.png" alt="title" loading="lazy" class="w-70" /> <img src="../../../assets/img/utilities.png" alt="title" loading="lazy" class="w-50" />
<RouterLink :to="{ name: 'utilities' }" class="dropdown-item border-radius-md"> <RouterLink :to="{ name: 'utilities' }" class="dropdown-item border-radius-md">
<a href="#" class="btn btn-primary mt-4">าสาธารณปโภค</a> <a href="#" class="btn btn-primary mt-4">าสาธารณปโภค</a>
</RouterLink> </RouterLink>
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-2">
<div class="card">
<div class="card-body text-center">
<p class="card-title" style="font-weight: bold; color: #000">ระบบคนหา</p>
<img src="../../../assets/img/seo.png" alt="title" loading="lazy" class="w-50" />
<RouterLink :to="{ name: 'searchfilter' }" class="dropdown-item border-radius-md">
<a href="#" class="btn btn-primary mt-4">ระบบคนหา</a>
</RouterLink>
</div>
</div>
</div>
<div class="col-sm-2">
<div class="card">
<div class="card-body text-center">
<p class="card-title" style="font-weight: bold; color: #000">ระบบเรยกรายงาน</p>
<img src="../../../assets/img/result.png" alt="title" loading="lazy" class="w-50" />
<RouterLink :to="{ name: 'reports' }" class="dropdown-item border-radius-md">
<a href="#" class="btn btn-primary mt-4">ระบบเรยกรายงาน</a>
</RouterLink>
</div>
</div>
</div>
</div> </div>
</div> </div>
</section> </section>

View File

@ -0,0 +1,444 @@
<script>
import MaterialInput from "@/components/MaterialInput.vue";
import MaterialButton from "@/components/MaterialButton.vue";
import Breadcrumbs from "@/examples/Breadcrumbs.vue";
import vueMkHeader from "@/assets/img/bg.jpg";
const listRoom = [
{ title: "ตึก 1" },
{ title: "ตึก 2" },
{ title: "ตึก 3" },
{ title: "ตึก 4" },
{ title: "ตึก 5" },
{ title: "ตึก 6" },
{ title: "ตึก 7" },
];
const NoRoom = [
{ title: "ชั้น 1" },
{ title: "ชั้น 2" },
{ title: "ชั้น 3" },
{ title: "ชั้น 4" },
{ title: "ชั้น 5" },
{ title: "ชั้น 6" },
{ title: "ชั้น 7" },
];
const userlist = [
{
dataIndex: "1",
firstName: "สมชาย",
lastName: "แสงทอง",
Affiliation: "บก", //
rank: "ร้อยตรี", //
old: "32",
birthday: "04/03/2534",
idcard: "134044411441122",
phone: "0325647846",
},
{
dataIndex: "2",
firstName: "สมชัย",
lastName: "แสงสุข",
Affiliation: "กก", //
rank: "ร้อยตรี", //
old: "32",
birthday: "14/07/2534",
idcard: "134044411441178",
phone: "0325647845",
},
];
export default {
components: {
MaterialInput,
MaterialButton,
Breadcrumbs,
},
setup() {
return {
listRoom,
NoRoom,
userlist,
vueMkHeader,
};
},
data() {
return {
value: { name: "Vue.js", language: "JavaScript" },
options: [
{ label: "Vue.js", value: "JavaScript" },
{ label: "Rails", value: "Ruby" },
{ label: "Sinatra", value: "Ruby" },
{ label: "Laravel", value: "PHP" },
{ label: "Phoenix", value: "Elixir" },
],
selectedColor: "",
firstName: "",
lastName: "",
Affiliation: "", //
rank: "", //
idcard: "",
phone: "",
};
},
watch: {
selectedColor: function (newValue) {
// this.updateColor(newValue)
console.log(newValue);
},
},
methods: {
changedLabel(event) {
console.log(event);
// this.selected = event;
},
submitForm() {
let body = {
firstName: this.firstName,
lastName: this.lastName,
Affiliation: this.Affiliation,
rank: this.rank,
idcard: this.idcard,
phone: this.phone,
};
// let b = []
// b.push(body)
this.userlist.push(body);
console.log(this.userlist);
},
},
};
</script>
<template>
<Header>
<div
class="page-header min-vh-45"
:style="`background-image: url(${vueMkHeader})`"
loading="lazy"
>
<div class="container">
<div class="row">
<div class="col-lg-7 text-center mx-auto position-relative">
<h1 class="pt-3 mt-n5 me-2 head-text">ระบบเรยกรายงาน</h1>
</div>
</div>
</div>
</div>
</Header>
<section>
<div class="card card-body blur shadow-blur mx-3 mx-md-4 mt-n6">
<div class="page-header min-vh-45">
<div class="container">
<div class="d-flex justify-content-between">
<div>
<Breadcrumbs
:routes="[{ label: 'หน้าหลัก', route: '/' }, { label: 'ระบบเรียกรายงาน' }]"
/>
</div>
<div class="text-end">
<MaterialButton
variant="gradient"
color="success"
data-bs-toggle="modal"
data-bs-target="#userBackdrop"
>เพมรายงาน</MaterialButton
>
</div>
</div>
<div class="text-center pt-4">
<table class="table border border-2 border-success">
<thead class="border border-2 border-success border-bottom">
<tr>
<th scope="col">ลำด</th>
<th scope="col"></th>
<th scope="col">สก</th>
<th scope="col">นเก</th>
<th scope="col">อาย</th>
<th scope="col">งก</th>
<th scope="col">ยศ</th>
<th scope="col">เลขบตรประชาชน</th>
<th scope="col">เบอรดต</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in userlist" :key="index">
<th scope="row">{{ index + 1 }}</th>
<td>{{ item.firstName }}</td>
<td>{{ item.lastName }}</td>
<td>{{ item.old }}</td>
<td>{{ item.birthday }}</td>
<td>{{ item.Affiliation }}</td>
<td>{{ item.rank }}</td>
<td>{{ item.idcard }}</td>
<td>{{ item.phone }}</td>
<td>
<a data-bs-toggle="modal" data-bs-target="#EdituserBackdrop"
><i
class="material-icons me-2"
style="cursor: pointer"
aria-hidden="true"
>edit</i
></a
>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- modal -->
<div
class="modal fade"
id="userBackdrop"
data-bs-backdrop="static"
data-bs-keyboard="false"
tabindex="-1"
aria-labelledby="staticBackdropLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">เพมสมาช</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div>
<div class="mb-3">
<MaterialInput
name="firstName"
:value="firstName"
@input="(event) => (firstName = event.target.value)"
class="input-group-static"
label="ชื่อ"
type="text"
placeholder="ชื่อ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="lastName"
@input="(event) => (lastName = event.target.value)"
class="input-group-static"
label="สกุล"
type="text"
placeholder="สกุล"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="birthday"
@input="(event) => (birthday = event.target.value)"
class="input-group-static"
label="วันเกิด"
type="text"
placeholder="วันเกิด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="Affiliation"
@input="(event) => (Affiliation = event.target.value)"
class="input-group-static"
label="สังกัด"
type="text"
placeholder="สังกัด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="rank"
@input="(event) => (rank = event.target.value)"
class="input-group-static"
label="ยศ"
type="text"
placeholder="ยศ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="idcard"
@input="(event) => (idcard = event.target.value)"
class="input-group-static"
label="เลขบัตรประชาชน"
type="number"
placeholder="เลขบัตรประชาชน"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="phone"
@input="(event) => (phone = event.target.value)"
class="input-group-static"
label="เบอร์ติดต่อ"
type="number"
placeholder="เบอร์ติดต่อ"
/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง
</button>
<MaterialButton
variant="gradient"
color="success"
@click="submitForm"
html-type="submit"
>นท</MaterialButton
>
</div>
</div>
</div>
</div>
<!-- modal -->
<div
class="modal fade"
id="EdituserBackdrop"
data-bs-backdrop="static"
data-bs-keyboard="false"
tabindex="-1"
aria-labelledby="staticBackdropLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">แกไขสมาช</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div>
<div class="mb-3">
<MaterialInput
name="firstName"
:value="firstName"
@input="(event) => (firstName = event.target.value)"
class="input-group-static"
label="ชื่อ"
type="text"
placeholder="ชื่อ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="lastName"
@input="(event) => (lastName = event.target.value)"
class="input-group-static"
label="สกุล"
type="text"
placeholder="สกุล"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="birthday"
@input="(event) => (birthday = event.target.value)"
class="input-group-static"
label="วันเกิด"
type="text"
placeholder="วันเกิด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="Affiliation"
@input="(event) => (Affiliation = event.target.value)"
class="input-group-static"
label="สังกัด"
type="text"
placeholder="สังกัด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="rank"
@input="(event) => (rank = event.target.value)"
class="input-group-static"
label="ยศ"
type="text"
placeholder="ยศ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="idcard"
@input="(event) => (idcard = event.target.value)"
class="input-group-static"
label="เลขบัตรประชาชน"
type="number"
placeholder="เลขบัตรประชาชน"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="phone"
@input="(event) => (phone = event.target.value)"
class="input-group-static"
label="เบอร์ติดต่อ"
type="number"
placeholder="เบอร์ติดต่อ"
/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง
</button>
<MaterialButton
variant="gradient"
color="success"
@click="submitForm"
html-type="submit"
>นท</MaterialButton
>
</div>
</div>
</div>
</div>
</section>
</template>
<style>
.bg-green {
background: #567b57 !important;
color: #fff;
}
.bg-red {
background: #d24c4a !important;
color: #fff;
}
.bg-waring {
background: #d1d3d5 !important;
color: #fff;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>

View File

@ -39,6 +39,10 @@ const userlist = [
rank: "ร้อยตรี", // rank: "ร้อยตรี", //
idcard: "134044411441122", idcard: "134044411441122",
phone: "0325647846", phone: "0325647846",
ContractDate: "12/11/2566", //
Lengthofstay: "3 เดือน", //
InsuranceMoney: "10,000",
Status: "รอคิว",
}, },
{ {
dataIndex: "2", dataIndex: "2",
@ -48,6 +52,10 @@ const userlist = [
rank: "ร้อยตรี", // rank: "ร้อยตรี", //
idcard: "134044411441178", idcard: "134044411441178",
phone: "0325647845", phone: "0325647845",
ContractDate: "12/11/2566", //
Lengthofstay: "3 เดือน", //
InsuranceMoney: "10,000",
Status: "รอคิว",
}, },
]; ];
@ -70,11 +78,10 @@ export default {
return { return {
value: { name: "Vue.js", language: "JavaScript" }, value: { name: "Vue.js", language: "JavaScript" },
options: [ options: [
{ label: "Vue.js", value: "JavaScript" }, { label: "มานพ", value: "มานพ" },
{ label: "Rails", value: "Ruby" }, { label: "วิชัย", value: "วิชัย" },
{ label: "Sinatra", value: "Ruby" }, { label: "ธนาพร", value: "ธนาพร" },
{ label: "Laravel", value: "PHP" }, { label: "มนตรี", value: "มนตรี" },
{ label: "Phoenix", value: "Elixir" },
], ],
selectedColor: "", selectedColor: "",
firstName: "", firstName: "",
@ -141,17 +148,25 @@ export default {
:routes="[ :routes="[
{ label: 'หน้าหลัก', route: '/' }, { label: 'หน้าหลัก', route: '/' },
{ label: 'สถานะห้องพัก', route: '/room' }, { label: 'สถานะห้องพัก', route: '/room' },
{ label: 'แก้ไขรายละเอียดห้อง' }, { label: 'เพิ่มผู้เช่าห้องพัก' },
]" ]"
/> />
</div> </div>
<!-- d-flex justify-content-between -->
<h4>เพมผเชาหองพ</h4> <h4>เพมผเชาหองพ</h4>
<div class="row pt-4"> <div class="row pt-4">
<div class="card mb-3"> <div class="card mb-3">
<h5>ลำดบค</h5> <h5>ลำดบค</h5>
<div class="text-center pt-4"> <div class="text-end">
<MaterialButton
variant="gradient"
color="success"
data-bs-toggle="modal"
data-bs-target="#contractBackdrop"
>เพมผเชาลงค</MaterialButton
>
</div>
<div class="text-center pt-4 table-responsive">
<table class="table border border-2 border-success"> <table class="table border border-2 border-success">
<thead class="border border-2 border-success border-bottom"> <thead class="border border-2 border-success border-bottom">
<tr> <tr>
@ -162,6 +177,10 @@ export default {
<th scope="col">ยศ</th> <th scope="col">ยศ</th>
<th scope="col">เลขบตรประชาชน</th> <th scope="col">เลขบตรประชาชน</th>
<th scope="col">เบอรดต</th> <th scope="col">เบอรดต</th>
<th scope="col">นทำสญญา</th>
<th scope="col">ระยะเวลาทเขาพ</th>
<th scope="col">เงนคาประก</th>
<th scope="col">สถานะ</th>
<th scope="col"></th> <th scope="col"></th>
</tr> </tr>
</thead> </thead>
@ -174,13 +193,13 @@ export default {
<td>{{ item.rank }}</td> <td>{{ item.rank }}</td>
<td>{{ item.idcard }}</td> <td>{{ item.idcard }}</td>
<td>{{ item.phone }}</td> <td>{{ item.phone }}</td>
<td>{{ item.ContractDate }}</td>
<td>{{ item.Lengthofstay }}</td>
<td>{{ item.InsuranceMoney }}</td>
<td>{{ item.Status }}</td>
<td> <td>
<MaterialButton <MaterialButton variant="gradient" color="success"
variant="gradient" >เพมผเชาหองพ</MaterialButton
color="success"
data-bs-toggle="modal"
data-bs-target="#contractBackdrop"
>เพมรายละเอยดสญญา</MaterialButton
> >
</td> </td>
</tr> </tr>
@ -215,6 +234,11 @@ export default {
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div> <div>
<div class="mb-3">
<label>อผเช</label>
<v-select :options="options" v-model="selectedColor"></v-select>
</div>
<div class="mb-3"> <div class="mb-3">
<MaterialInput <MaterialInput
name="contract" name="contract"
@ -252,14 +276,13 @@ export default {
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง ดหนาตาง
</button> </button>
<button <MaterialButton
type="submit" variant="gradient"
class="btn btn-primary" color="success"
@click="submitForm" @click="submitForm"
html-type="submit" html-type="submit"
>นท</MaterialButton
> >
นท
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,105 +1,40 @@
<script setup> <script>
import { onMounted } from "vue";
//image //image
import image from "@/assets/img/illustrations/illustration-signin.jpg";
import vueMkHeader from "@/assets/img/bg.jpg"; import vueMkHeader from "@/assets/img/bg.jpg";
//material components //material components
import MaterialInput from "@/components/MaterialInput.vue"; // import MaterialInput from "@/components/MaterialInput.vue";
import MaterialButton from "@/components/MaterialButton.vue"; // import MaterialButton from "@/components/MaterialButton.vue";
import Breadcrumbs from "@/examples/Breadcrumbs.vue"; import Breadcrumbs from "@/examples/Breadcrumbs.vue";
// material-input
import setMaterialInput from "@/assets/js/material-input";
onMounted(() => {
setMaterialInput();
});
const listRoom = [
{ title: "ตึก 1" },
{ title: "ตึก 2" },
{ title: "ตึก 3" },
{ title: "ตึก 4" },
{ title: "ตึก 5" },
{ title: "ตึก 6" },
{ title: "ตึก 7" },
];
const NoRoom = [ export default {
{ title: "ชั้น 1" }, components: {
{ title: "ชั้น 2" }, // MaterialInput,
{ title: "ชั้น 3" }, // MaterialButton,
{ title: "ชั้น 4" }, Breadcrumbs,
{ title: "ชั้น 5" }, },
{ title: "ชั้น 6" }, setup() {
{ title: "ชั้น 7" }, return {
]; vueMkHeader,
};
},
const landingColumns = [ data() {
{ return {
title: "ห้อง 1", selectedColor: "",
dataIndex: "1", statusedit: false
status: true, };
}, },
{ created(){
title: "ห้อง 2", console.log(this.$route.query.mode);
dataIndex: "2", let mode = this.$route.query.mode
status: false, mode == "add" ? this.statusedit = false : this.statusedit = true
// this.$route.query
}, },
{
title: "ห้อง 3",
dataIndex: "3", };
status: true,
},
{
title: "ห้อง 4",
dataIndex: "4",
status: true,
},
{
title: "ห้อง 5",
dataIndex: "5",
status: false,
},
{
title: "ห้อง 6",
dataIndex: "6",
status: false,
},
{
title: "ห้อง 7",
dataIndex: "7",
status: true,
},
{
title: "ห้อง 8",
dataIndex: "8",
status: false,
},
{
title: "ห้อง 9",
dataIndex: "9",
status: false,
},
{
title: "ห้อง 10",
dataIndex: "10",
status: false,
},
{
title: "ห้อง 11",
dataIndex: "11",
status: true,
},
{
title: "ห้อง 12",
dataIndex: "12",
status: false,
},
{
title: "ห้อง 13",
dataIndex: "13",
status: false,
},
];
</script> </script>
<template> <template>
<Header> <Header>
@ -145,10 +80,9 @@ const landingColumns = [
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<div class="card-body"> <div class="card-body">
<h5 class="card-title">รายละเอยดเจาของหอง</h5> <div class="row" v-if="statusedit == true">
<h5 class="card-title">รายละเอยดผเช</h5>
<div class="row"> <div class="col-5">
<div class="col-4">
<p class="card-text"> : มานะ</p> <p class="card-text"> : มานะ</p>
<p class="card-text">สถานะหอง : ไมาง</p> <p class="card-text">สถานะหอง : ไมาง</p>
<p class="card-text">ยศ : อยตร</p> <p class="card-text">ยศ : อยตร</p>
@ -157,7 +91,7 @@ const landingColumns = [
<p class="card-text">อาย : 33 </p> <p class="card-text">อาย : 33 </p>
<p class="card-text">ระยะเวลาทเขาพ : 3 เดอน</p> <p class="card-text">ระยะเวลาทเขาพ : 3 เดอน</p>
</div> </div>
<div class="col-4"> <div class="col-7">
<p class="card-text">นามสก : อด</p> <p class="card-text">นามสก : อด</p>
<p class="card-text">งก : กก</p> <p class="card-text">งก : กก</p>
<p class="card-text">เลขบตรประชาชน : 123456123456</p> <p class="card-text">เลขบตรประชาชน : 123456123456</p>
@ -165,6 +99,21 @@ const landingColumns = [
<p class="card-text">เงนคาประก : 12,000</p> <p class="card-text">เงนคาประก : 12,000</p>
</div> </div>
</div> </div>
<div class="row">
<div class="col-5" >
<h5 class="card-title pt-2">รายละเอยดหองพ</h5>
<p class="card-text">ประเภทหองพ : ช๓</p>
<p class="card-text">เตอร/ไฟ : 745/546</p>
<p class="card-text">สภาพหอง : ปกต</p>
</div>
<div class="col-7" v-if="statusedit == true">
<h5 class="card-title pt-2">รายละเอยดคาสาธารณปโภค</h5>
<p class="card-text">านำประปา : 120</p>
<p class="card-text">าไฟฟ : 700</p>
<p class="card-text">าไฟฟาสวนกลาง : 100</p>
<p class="card-text">าบำรงลฟท : 200</p>
</div>
</div>
<!-- <p class="card-text"> <!-- <p class="card-text">
<small class="text-muted">Last updated 3 mins ago</small> <small class="text-muted">Last updated 3 mins ago</small>
</p> --> </p> -->
@ -192,3 +141,4 @@ const landingColumns = [
color: #fff; color: #fff;
} }
</style> </style>

View File

@ -125,15 +125,15 @@ export default {
selectedColor: "", selectedColor: "",
}; };
}, },
created() { created(){
// this.$route.query
}, },
methods: { methods: {
changedLabel(event) { gotodetail(id,index){
console.log(event); let action
index == true ? action = 'edit' : action = 'add'
// this.selected = event; this.$router.push({ path: `/room/detail/${id}`, query: { mode: action } });
}, }
}, },
}; };
</script> </script>
@ -165,7 +165,7 @@ export default {
</div> </div>
<div class="row pt-4"> <div class="row pt-4">
<div class="col-8"> <div class="col-8">
<div class="nav-item dropdown dropdown-hover mx-2"> <div class="nav-item dropdown dropdown-hover mx-2 w-45">
<a <a
role="button" role="button"
class="nav-link ps-2 d-flex cursor-pointer align-items-center" class="nav-link ps-2 d-flex cursor-pointer align-items-center"
@ -174,7 +174,7 @@ export default {
aria-expanded="false" aria-expanded="false"
> >
<i class="material-icons opacity-6 me-2 text-md">home</i> <i class="material-icons opacity-6 me-2 text-md">home</i>
เลอก
</a> </a>
<div <div
class="dropdown-menu dropdown-menu-animation ms-n3 dropdown-md p-3 border-radius-xl mt-0 mt-lg-3" class="dropdown-menu dropdown-menu-animation ms-n3 dropdown-md p-3 border-radius-xl mt-0 mt-lg-3"
@ -200,6 +200,7 @@ export default {
</div> </div>
<div class="col-4"> <div class="col-4">
<div> <div>
<label>นหาผเช</label>
<MaterialInput <MaterialInput
class="input-group-dynamic w-100" class="input-group-dynamic w-100"
icon="search" icon="search"
@ -212,7 +213,7 @@ export default {
<div class="text-center pt-4"> <div class="text-center pt-4">
<!-- v-for="(item, index) in NoRoom" :key="index" --> <!-- v-for="(item, index) in NoRoom" :key="index" -->
<div > <div>
<p class="text-start mt-4"> <p class="text-start mt-4">
<MaterialButton <MaterialButton
variant="outline" variant="outline"
@ -283,13 +284,8 @@ export default {
</div> </div>
<p class="card-title"> <p class="card-title">
<a <a
v-if="item?.status" style="cursor: pointer"
:href="`/room/detail/${item?.dataIndex}`" @click="gotodetail(item?.dataIndex,item?.status)"
class="text-white"
>{{ item?.title }}</a
>
<a
v-if="!item?.status"
class="text-white" class="text-white"
>{{ item?.title }}</a >{{ item?.title }}</a
> >
@ -333,7 +329,7 @@ export default {
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง ดหนาตาง
</button> </button>
<button type="button" class="btn btn-primary">นท</button> <MaterialButton variant="gradient" color="success">นท</MaterialButton>
</div> </div>
</div> </div>
</div> </div>

View File

@ -119,21 +119,28 @@ export default {
return { return {
value: { name: "Vue.js", language: "JavaScript" }, value: { name: "Vue.js", language: "JavaScript" },
options: [ options: [
{ label: "Vue.js", value: "JavaScript" }, { label: "มกราคม", value: "01" },
{ label: "Rails", value: "Ruby" }, { label: "กุมภาพันธ์", value: "02" },
{ label: "Sinatra", value: "Ruby" }, { label: "มีนาคม", value: "03" },
{ label: "Laravel", value: "PHP" }, { label: "เมษายน", value: "04" },
{ label: "Phoenix", value: "Elixir" }, { label: "พฤษภาคม", value: "05" },
{ label: "มิถุนายน", value: "06" },
{ label: "กรกฎาคม ", value: "07" },
{ label: "สิงหาคม", value: "08" },
{ label: "กันยายน", value: "09" },
{ label: "ตุลาคม", value: "10" },
{ label: "พฤศจิกายน", value: "11" },
{ label: "ธันวาคม", value: "12" },
], ],
selectedColor: "", selectedMonth: "ตุลาคม",
firstName: "สมชาย", firstName: "สมชาย",
lastName: "มาดี", lastName: "0237",
Affiliation: "กก", // Affiliation: "0426 ", //
rank: "ร้อยโท", // rank: "ปกติ", //
idcard: "1234", idcard: "120",
phone: "2023654888", phone: "1200",
old: "30", old: "100",
birthday: "12/11/2536", birthday: "200",
}; };
}, },
watch: { watch: {
@ -155,13 +162,12 @@ export default {
Affiliation: this.Affiliation, Affiliation: this.Affiliation,
rank: this.rank, rank: this.rank,
idcard: this.idcard, idcard: this.idcard,
phone: this.phone phone: this.phone,
} };
// let b = [] // let b = []
// b.push(body) // b.push(body)
// this.userlist.push(body) // this.userlist.push(body)
// console.log(this.userlist); // console.log(this.userlist);
}, },
}, },
}; };
@ -191,12 +197,12 @@ export default {
:routes="[ :routes="[
{ label: 'หน้าหลัก', route: '/' }, { label: 'หน้าหลัก', route: '/' },
{ label: 'สถานะห้องพัก', route: '/room' }, { label: 'สถานะห้องพัก', route: '/room' },
{ label: 'แก้ไขรายละเอียดห้อง' }, { label: 'แก้ไขค่าใช้จ่ายประจำเดือน' },
]" ]"
/> />
</div> </div>
<!-- d-flex justify-content-between --> <!-- d-flex justify-content-between -->
<h4>แกไขรายละเอยดหอง</h4> <h4>แกไขาใชายประจำเดอน</h4>
<div class="row pt-4"> <div class="row pt-4">
<div class="card mb-3"> <div class="card mb-3">
<div class="row g-0"> <div class="row g-0">
@ -210,30 +216,19 @@ export default {
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<div class="card-body"> <div class="card-body">
<h5 class="card-title">รายละเอยดเจาของหอง</h5> <h5 class="card-title">าใชายประจำเดอน ลาคม</h5>
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
<div> <div>
<div class="mb-3">
<MaterialInput
name="firstName"
:value="firstName"
@input="(event) => (firstName = event.target.value)"
class="input-group-static"
label="ชื่อ"
type="text"
placeholder="ชื่อ"
/>
</div>
<div class="mb-3"> <div class="mb-3">
<MaterialInput <MaterialInput
:value="lastName" :value="lastName"
@input="(event) => (lastName = event.target.value)" @input="(event) => (lastName = event.target.value)"
class="input-group-static" class="input-group-static"
label="สกุล" label="มิเตอร์น้ำ"
type="text" type="text"
placeholder="สกุล" placeholder="มิเตอร์น้ำ"
/> />
</div> </div>
<div class="mb-3"> <div class="mb-3">
@ -241,32 +236,19 @@ export default {
:value="Affiliation" :value="Affiliation"
@input="(event) => (Affiliation = event.target.value)" @input="(event) => (Affiliation = event.target.value)"
class="input-group-static" class="input-group-static"
label="สังกัด" label="มิเตอร์ไฟ"
type="text" type="text"
placeholder="สังกัด" placeholder="มิเตอร์ไฟ"
/> />
</div> </div>
<div class="mb-3">
<MaterialInput
:value="rank"
@input="(event) => (rank = event.target.value)"
class="input-group-static"
label="ยศ"
type="text"
placeholder="ยศ"
/>
</div>
</div>
</div>
<div class="col-4">
<div class="mb-3"> <div class="mb-3">
<MaterialInput <MaterialInput
:value="idcard" :value="idcard"
@input="(event) => (idcard = event.target.value)" @input="(event) => (idcard = event.target.value)"
class="input-group-static" class="input-group-static"
label="เลขบัตรประชาชน" label="ค่าน้ำประปา"
type="number" type="number"
placeholder="เลขบัตรประชาชน" placeholder="ค่าน้ำประปา"
/> />
</div> </div>
<div class="mb-3"> <div class="mb-3">
@ -274,19 +256,22 @@ export default {
:value="phone" :value="phone"
@input="(event) => (phone = event.target.value)" @input="(event) => (phone = event.target.value)"
class="input-group-static" class="input-group-static"
label="เบอร์ติดต่อ" label="ค่าไฟฟ้า"
type="number" type="number"
placeholder="เบอร์ติดต่อ" placeholder="ค่าไฟฟ้า"
/> />
</div> </div>
</div>
</div>
<div class="col-4">
<div class="mb-3"> <div class="mb-3">
<MaterialInput <MaterialInput
:value="birthday" :value="birthday"
@input="(event) => (birthday = event.target.value)" @input="(event) => (birthday = event.target.value)"
class="input-group-static" class="input-group-static"
label="วันเกิด" label="ค่าไฟฟ้าส่วนกลาง"
type="text" type="text"
placeholder="วันเกิด" placeholder="ค่าไฟฟ้าส่วนกลาง"
/> />
</div> </div>
<div class="mb-3"> <div class="mb-3">
@ -294,9 +279,19 @@ export default {
:value="old" :value="old"
@input="(event) => (old = event.target.value)" @input="(event) => (old = event.target.value)"
class="input-group-static" class="input-group-static"
label="อายุ" label="ค่าบำรุงลิฟท์"
type="number" type="number"
placeholder="อายุ" placeholder="ค่าบำรุงลิฟท์"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="rank"
@input="(event) => (rank = event.target.value)"
class="input-group-static"
label="สภาพห้อง"
type="text"
placeholder="สภาพห้อง"
/> />
</div> </div>
</div> </div>
@ -305,10 +300,9 @@ export default {
<small class="text-muted">Last updated 3 mins ago</small> <small class="text-muted">Last updated 3 mins ago</small>
</p> --> </p> -->
<div class="text-center"> <div class="text-center">
<MaterialButton <MaterialButton variant="gradient" color="success"
variant="gradient" >นท</MaterialButton
color="success" >
>นท</MaterialButton>
</div> </div>
</div> </div>
</div> </div>

View File

@ -257,7 +257,7 @@ export default {
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง ดหนาตาง
</button> </button>
<button type="button" class="btn btn-primary">นท</button> <MaterialButton variant="gradient" color="success">นท</MaterialButton>
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,432 @@
<script>
import MaterialInput from "@/components/MaterialInput.vue";
import MaterialButton from "@/components/MaterialButton.vue";
import Breadcrumbs from "@/examples/Breadcrumbs.vue";
import vueMkHeader from "@/assets/img/bg.jpg";
const listRoom = [
{ title: "ตึก 1" },
{ title: "ตึก 2" },
{ title: "ตึก 3" },
{ title: "ตึก 4" },
{ title: "ตึก 5" },
{ title: "ตึก 6" },
{ title: "ตึก 7" },
];
const NoRoom = [
{ title: "ชั้น 1" },
{ title: "ชั้น 2" },
{ title: "ชั้น 3" },
{ title: "ชั้น 4" },
{ title: "ชั้น 5" },
{ title: "ชั้น 6" },
{ title: "ชั้น 7" },
];
const userlist = [
{
dataIndex: "1",
firstName: "สมชาย",
lastName: "แสงทอง",
Affiliation: "บก", //
rank: "ร้อยตรี", //
old: "32",
birthday: "04/03/2534",
idcard: "134044411441122",
phone: "0325647846",
},
{
dataIndex: "2",
firstName: "สมชัย",
lastName: "แสงสุข",
Affiliation: "กก", //
rank: "ร้อยตรี", //
old: "32",
birthday: "14/07/2534",
idcard: "134044411441178",
phone: "0325647845",
},
];
export default {
components: {
MaterialInput,
MaterialButton,
Breadcrumbs,
},
setup() {
return {
listRoom,
NoRoom,
userlist,
vueMkHeader,
};
},
data() {
return {
value: { name: "Vue.js", language: "JavaScript" },
options: [
{ label: "Vue.js", value: "JavaScript" },
{ label: "Rails", value: "Ruby" },
{ label: "Sinatra", value: "Ruby" },
{ label: "Laravel", value: "PHP" },
{ label: "Phoenix", value: "Elixir" },
],
selectedColor: "",
firstName: "",
lastName: "",
Affiliation: "", //
rank: "", //
idcard: "",
phone: "",
};
},
watch: {
selectedColor: function (newValue) {
// this.updateColor(newValue)
console.log(newValue);
},
},
methods: {
changedLabel(event) {
console.log(event);
// this.selected = event;
},
submitForm() {
let body = {
firstName: this.firstName,
lastName: this.lastName,
Affiliation: this.Affiliation,
rank: this.rank,
idcard: this.idcard,
phone: this.phone,
};
// let b = []
// b.push(body)
this.userlist.push(body);
console.log(this.userlist);
},
},
};
</script>
<template>
<Header>
<div
class="page-header min-vh-45"
:style="`background-image: url(${vueMkHeader})`"
loading="lazy"
>
<div class="container">
<div class="row">
<div class="col-lg-7 text-center mx-auto position-relative">
<h1 class="pt-3 mt-n5 me-2 head-text">ระบบคนหา</h1>
</div>
</div>
</div>
</div>
</Header>
<section>
<div class="card card-body blur shadow-blur mx-3 mx-md-4 mt-n6">
<div class="page-header min-vh-45">
<div class="container">
<div class="d-flex justify-content-between">
<div>
<Breadcrumbs
:routes="[{ label: 'หน้าหลัก', route: '/' }, { label: 'ระบบค้นหา' }]"
/>
</div>
</div>
<div class="d-flex justify-content-end">
<MaterialInput
class="input-group-dynamic w-30"
icon="search"
type="text"
placeholder="Search"
/>
</div>
<div class="text-center pt-4">
<table class="table border border-2 border-success">
<thead class="border border-2 border-success border-bottom">
<tr>
<th scope="col">ลำด</th>
<th scope="col"></th>
<th scope="col">สก</th>
<th scope="col">นเก</th>
<th scope="col">อาย</th>
<th scope="col">งก</th>
<th scope="col">ยศ</th>
<th scope="col">เลขบตรประชาชน</th>
<th scope="col">เบอรดต</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in userlist" :key="index">
<th scope="row">{{ index + 1 }}</th>
<td>{{ item.firstName }}</td>
<td>{{ item.lastName }}</td>
<td>{{ item.old }}</td>
<td>{{ item.birthday }}</td>
<td>{{ item.Affiliation }}</td>
<td>{{ item.rank }}</td>
<td>{{ item.idcard }}</td>
<td>{{ item.phone }}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- modal -->
<div
class="modal fade"
id="userBackdrop"
data-bs-backdrop="static"
data-bs-keyboard="false"
tabindex="-1"
aria-labelledby="staticBackdropLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">เพมสมาช</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div>
<div class="mb-3">
<MaterialInput
name="firstName"
:value="firstName"
@input="(event) => (firstName = event.target.value)"
class="input-group-static"
label="ชื่อ"
type="text"
placeholder="ชื่อ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="lastName"
@input="(event) => (lastName = event.target.value)"
class="input-group-static"
label="สกุล"
type="text"
placeholder="สกุล"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="birthday"
@input="(event) => (birthday = event.target.value)"
class="input-group-static"
label="วันเกิด"
type="text"
placeholder="วันเกิด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="Affiliation"
@input="(event) => (Affiliation = event.target.value)"
class="input-group-static"
label="สังกัด"
type="text"
placeholder="สังกัด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="rank"
@input="(event) => (rank = event.target.value)"
class="input-group-static"
label="ยศ"
type="text"
placeholder="ยศ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="idcard"
@input="(event) => (idcard = event.target.value)"
class="input-group-static"
label="เลขบัตรประชาชน"
type="number"
placeholder="เลขบัตรประชาชน"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="phone"
@input="(event) => (phone = event.target.value)"
class="input-group-static"
label="เบอร์ติดต่อ"
type="number"
placeholder="เบอร์ติดต่อ"
/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง
</button>
<MaterialButton
variant="gradient"
color="success"
@click="submitForm"
html-type="submit"
>นท</MaterialButton
>
</div>
</div>
</div>
</div>
<!-- modal -->
<div
class="modal fade"
id="EdituserBackdrop"
data-bs-backdrop="static"
data-bs-keyboard="false"
tabindex="-1"
aria-labelledby="staticBackdropLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">แกไขสมาช</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div>
<div class="mb-3">
<MaterialInput
name="firstName"
:value="firstName"
@input="(event) => (firstName = event.target.value)"
class="input-group-static"
label="ชื่อ"
type="text"
placeholder="ชื่อ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="lastName"
@input="(event) => (lastName = event.target.value)"
class="input-group-static"
label="สกุล"
type="text"
placeholder="สกุล"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="birthday"
@input="(event) => (birthday = event.target.value)"
class="input-group-static"
label="วันเกิด"
type="text"
placeholder="วันเกิด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="Affiliation"
@input="(event) => (Affiliation = event.target.value)"
class="input-group-static"
label="สังกัด"
type="text"
placeholder="สังกัด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="rank"
@input="(event) => (rank = event.target.value)"
class="input-group-static"
label="ยศ"
type="text"
placeholder="ยศ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="idcard"
@input="(event) => (idcard = event.target.value)"
class="input-group-static"
label="เลขบัตรประชาชน"
type="number"
placeholder="เลขบัตรประชาชน"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="phone"
@input="(event) => (phone = event.target.value)"
class="input-group-static"
label="เบอร์ติดต่อ"
type="number"
placeholder="เบอร์ติดต่อ"
/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง
</button>
<MaterialButton
variant="gradient"
color="success"
@click="submitForm"
html-type="submit"
>นท</MaterialButton
>
</div>
</div>
</div>
</div>
</section>
</template>
<style>
.bg-green {
background: #567b57 !important;
color: #fff;
}
.bg-red {
background: #d24c4a !important;
color: #fff;
}
.bg-waring {
background: #d1d3d5 !important;
color: #fff;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type="number"] {
-moz-appearance: textfield;
}
</style>

View File

@ -31,8 +31,10 @@ const userlist = [
lastName: "แสงทอง", lastName: "แสงทอง",
Affiliation: "บก", // Affiliation: "บก", //
rank: "ร้อยตรี", // rank: "ร้อยตรี", //
old: "32",
birthday: "04/03/2534",
idcard: "134044411441122", idcard: "134044411441122",
phone: "0325647846" phone: "0325647846",
}, },
{ {
dataIndex: "2", dataIndex: "2",
@ -40,9 +42,11 @@ const userlist = [
lastName: "แสงสุข", lastName: "แสงสุข",
Affiliation: "กก", // Affiliation: "กก", //
rank: "ร้อยตรี", // rank: "ร้อยตรี", //
old: "32",
birthday: "14/07/2534",
idcard: "134044411441178", idcard: "134044411441178",
phone: "0325647845" phone: "0325647845",
} },
]; ];
export default { export default {
@ -98,13 +102,12 @@ export default {
Affiliation: this.Affiliation, Affiliation: this.Affiliation,
rank: this.rank, rank: this.rank,
idcard: this.idcard, idcard: this.idcard,
phone: this.phone phone: this.phone,
} };
// let b = [] // let b = []
// b.push(body) // b.push(body)
this.userlist.push(body) this.userlist.push(body);
console.log(this.userlist); console.log(this.userlist);
}, },
}, },
}; };
@ -147,27 +150,42 @@ export default {
</div> </div>
<div class="text-center pt-4"> <div class="text-center pt-4">
<table class="table table-hover border border-2 border-success"> <table class="table border border-2 border-success">
<thead class="border border-2 border-success border-bottom"> <thead class="border border-2 border-success border-bottom">
<tr> <tr>
<th scope="col">ลำด</th> <th scope="col">ลำด</th>
<th scope="col"></th> <th scope="col"></th>
<th scope="col">สก</th> <th scope="col">สก</th>
<th scope="col">นเก</th>
<th scope="col">อาย</th>
<th scope="col">งก</th> <th scope="col">งก</th>
<th scope="col">ยศ</th> <th scope="col">ยศ</th>
<th scope="col">เลขบตรประชาชน</th> <th scope="col">เลขบตรประชาชน</th>
<th scope="col">เบอรดต</th> <th scope="col">เบอรดต</th>
<th scope="col"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(item, index) in userlist" :key="index"> <tr v-for="(item, index) in userlist" :key="index">
<th scope="row">{{ index+1 }}</th> <th scope="row">{{ index + 1 }}</th>
<td>{{ item.firstName }}</td> <td>{{ item.firstName }}</td>
<td>{{ item.lastName }}</td> <td>{{ item.lastName }}</td>
<td>{{ item.old }}</td>
<td>{{ item.birthday }}</td>
<td>{{ item.Affiliation }}</td> <td>{{ item.Affiliation }}</td>
<td>{{ item.rank }}</td> <td>{{ item.rank }}</td>
<td>{{ item.idcard }}</td> <td>{{ item.idcard }}</td>
<td>{{ item.phone }}</td> <td>{{ item.phone }}</td>
<td>
<a data-bs-toggle="modal" data-bs-target="#EdituserBackdrop"
><i
class="material-icons me-2"
style="cursor: pointer"
aria-hidden="true"
>edit</i
></a
>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -220,6 +238,16 @@ export default {
placeholder="สกุล" placeholder="สกุล"
/> />
</div> </div>
<div class="mb-3">
<MaterialInput
:value="birthday"
@input="(event) => (birthday = event.target.value)"
class="input-group-static"
label="วันเกิด"
type="text"
placeholder="วันเกิด"
/>
</div>
<div class="mb-3"> <div class="mb-3">
<MaterialInput <MaterialInput
:value="Affiliation" :value="Affiliation"
@ -266,15 +294,125 @@ export default {
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง ดหนาตาง
</button> </button>
<button <MaterialButton
type="submit" variant="gradient"
class="btn btn-primary" color="success"
@click="submitForm" @click="submitForm"
html-type="submit" html-type="submit"
>นท</MaterialButton
> >
นท </div>
</div>
</div>
</div>
<!-- modal -->
<div
class="modal fade"
id="EdituserBackdrop"
data-bs-backdrop="static"
data-bs-keyboard="false"
tabindex="-1"
aria-labelledby="staticBackdropLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">แกไขสมาช</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div>
<div class="mb-3">
<MaterialInput
name="firstName"
:value="firstName"
@input="(event) => (firstName = event.target.value)"
class="input-group-static"
label="ชื่อ"
type="text"
placeholder="ชื่อ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="lastName"
@input="(event) => (lastName = event.target.value)"
class="input-group-static"
label="สกุล"
type="text"
placeholder="สกุล"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="birthday"
@input="(event) => (birthday = event.target.value)"
class="input-group-static"
label="วันเกิด"
type="text"
placeholder="วันเกิด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="Affiliation"
@input="(event) => (Affiliation = event.target.value)"
class="input-group-static"
label="สังกัด"
type="text"
placeholder="สังกัด"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="rank"
@input="(event) => (rank = event.target.value)"
class="input-group-static"
label="ยศ"
type="text"
placeholder="ยศ"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="idcard"
@input="(event) => (idcard = event.target.value)"
class="input-group-static"
label="เลขบัตรประชาชน"
type="number"
placeholder="เลขบัตรประชาชน"
/>
</div>
<div class="mb-3">
<MaterialInput
:value="phone"
@input="(event) => (phone = event.target.value)"
class="input-group-static"
label="เบอร์ติดต่อ"
type="number"
placeholder="เบอร์ติดต่อ"
/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง
</button> </button>
<MaterialButton
variant="gradient"
color="success"
@click="submitForm"
html-type="submit"
>นท</MaterialButton
>
</div> </div>
</div> </div>
</div> </div>

View File

@ -109,14 +109,30 @@ export default {
data() { data() {
return { return {
value: { name: "Vue.js", language: "JavaScript" }, value: { name: "Vue.js", language: "JavaScript" },
options: [ optionsBuilding: [
{ label: "Vue.js", value: "JavaScript" }, { label: "ตึก 1", value: "1" },
{ label: "Rails", value: "Ruby" }, { label: "ตึก 2", value: "2" },
{ label: "Sinatra", value: "Ruby" }, { label: "ตึก 3", value: "3" },
{ label: "Laravel", value: "PHP" }, { label: "ตึก 4", value: "4" },
{ label: "Phoenix", value: "Elixir" }, { label: "ตึก 5", value: "5" },
], ],
selectedColor: "", optionsFloor: [
{ label: "ชั้น 1", value: "1" },
{ label: "ชั้น 2", value: "2" },
{ label: "ชั้น 3", value: "3" },
{ label: "ชั้น 4", value: "4" },
{ label: "ชั้น 5", value: "5" },
],
optionsRoom: [
{ label: "ห้อง 1", value: "1" },
{ label: "ห้อง 2", value: "2" },
{ label: "ห้อง 3", value: "3" },
{ label: "ห้อง 4", value: "4" },
{ label: "ห้อง 5", value: "5" },
],
selectedBuilding: "ตึก 1",
selectedFloor: "ชั้น 1",
selectedRoom: "ห้อง 1",
fee: "", fee: "",
Waterbill: "", Waterbill: "",
Electricitybill: "", Electricitybill: "",
@ -168,28 +184,61 @@ export default {
</div> </div>
</div> </div>
<div> <div>
<div class="accordion" id="accordionPanelsStayOpenExample"> <ul class="nav nav-tabs" id="myTab" role="tablist">
<div class="accordion-item"> <li class="nav-item" role="presentation">
<h2 class="accordion-header" id="panelsStayOpen-headingOne">
<button <button
style="text-decoration-line: underline" class="nav-link active"
class="accordion-button" style="color: #57b05b"
id="home-tab"
data-bs-toggle="tab"
data-bs-target="#home"
type="button" type="button"
data-bs-toggle="collapse" role="tab"
data-bs-target="#panelsStayOpen-collapseOne" aria-controls="home"
aria-expanded="true" aria-selected="true"
aria-controls="panelsStayOpen-collapseOne"
> >
นทกคาใชายบานพกสวนกลาง ตร. นทกคาใชายบานพกสวนกลาง ตร.
</button> </button>
</h2> </li>
<div <li class="nav-item" role="presentation">
id="panelsStayOpen-collapseOne" <button
class="accordion-collapse collapse show" class="nav-link"
aria-labelledby="panelsStayOpen-headingOne" style="color: #57b05b"
id="profile-tab"
data-bs-toggle="tab"
data-bs-target="#profile"
type="button"
role="tab"
aria-controls="profile"
aria-selected="false"
> >
<div class="accordion-body"> นทกคาใชายบานพกสวนกลาง บช.ตชด.
<div class="text-end"> </button>
</li>
<li class="nav-item" role="presentation">
<button
class="nav-link"
style="color: #57b05b"
id="contact-tab"
data-bs-toggle="tab"
data-bs-target="#contact"
type="button"
role="tab"
aria-controls="contact"
aria-selected="false"
>
สรปรายงานคาใชาย
</button>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div
class="tab-pane fade show active"
id="home"
role="tabpanel"
aria-labelledby="home-tab"
>
<div class="text-end pt-4">
<MaterialButton <MaterialButton
variant="gradient" variant="gradient"
color="success" color="success"
@ -203,6 +252,9 @@ export default {
<thead class="border border-2 border-success border-bottom"> <thead class="border border-2 border-success border-bottom">
<tr> <tr>
<th scope="col">ลำด</th> <th scope="col">ลำด</th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col">อง</th>
<th scope="col">าธรรมเนยม</th> <th scope="col">าธรรมเนยม</th>
<th scope="col">านำประปา</th> <th scope="col">านำประปา</th>
<th scope="col">าไฟฟ</th> <th scope="col">าไฟฟ</th>
@ -213,6 +265,9 @@ export default {
<tbody> <tbody>
<tr> <tr>
<th scope="row">1</th> <th scope="row">1</th>
<td>1</td>
<td>2</td>
<td>3</td>
<td>20,000</td> <td>20,000</td>
<td>8,000</td> <td>8,000</td>
<td>20,000</td> <td>20,000</td>
@ -223,29 +278,13 @@ export default {
</table> </table>
</div> </div>
</div> </div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="panelsStayOpen-headingTwo">
<button
class="accordion-button collapsed"
style="text-decoration-line: underline"
type="button"
data-bs-toggle="collapse"
data-bs-target="#panelsStayOpen-collapseTwo"
aria-expanded="false"
aria-controls="panelsStayOpen-collapseTwo"
>
นทกคาใชายบานพกสวนกลาง บช.ตชด.
</button>
</h2>
<div <div
id="panelsStayOpen-collapseTwo" class="tab-pane fade"
class="accordion-collapse collapse" id="profile"
aria-labelledby="panelsStayOpen-headingTwo" role="tabpanel"
aria-labelledby="profile-tab"
> >
<div class="accordion-body"> <div class="text-end pt-4">
<div class="text-end">
<MaterialButton <MaterialButton
variant="gradient" variant="gradient"
color="success" color="success"
@ -259,6 +298,9 @@ export default {
<thead class="border border-2 border-success border-bottom"> <thead class="border border-2 border-success border-bottom">
<tr> <tr>
<th scope="col">ลำด</th> <th scope="col">ลำด</th>
<th scope="col"></th>
<th scope="col"></th>
<th scope="col">อง</th>
<th scope="col">าบำรงฯ</th> <th scope="col">าบำรงฯ</th>
<th scope="col">าประก</th> <th scope="col">าประก</th>
</tr> </tr>
@ -266,6 +308,9 @@ export default {
<tbody> <tbody>
<tr> <tr>
<th scope="row">1</th> <th scope="row">1</th>
<td>1</td>
<td>2</td>
<td>3</td>
<td>20,000</td> <td>20,000</td>
<td>8,000</td> <td>8,000</td>
</tr> </tr>
@ -273,29 +318,13 @@ export default {
</table> </table>
</div> </div>
</div> </div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="panelsStayOpen-headingThree">
<button
class="accordion-button collapsed"
style="text-decoration-line: underline"
type="button"
data-bs-toggle="collapse"
data-bs-target="#panelsStayOpen-collapseThree"
aria-expanded="false"
aria-controls="panelsStayOpen-collapseThree"
>
สรปรายงานคาใชาย
</button>
</h2>
<div <div
id="panelsStayOpen-collapseThree" class="tab-pane fade"
class="accordion-collapse collapse" id="contact"
aria-labelledby="panelsStayOpen-headingThree" role="tabpanel"
aria-labelledby="contact-tab"
> >
<div class="accordion-body"> <div class="text-end pt-4">
<div class="text-end">
<MaterialButton <MaterialButton
variant="gradient" variant="gradient"
color="success" color="success"
@ -326,8 +355,7 @@ export default {
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -346,7 +374,9 @@ export default {
<div class="modal-dialog modal-dialog-centered"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">นทกคาใชายบานพกสวนกลาง ตร.</h5> <h5 class="modal-title" id="staticBackdropLabel">
นทกคาใชายบานพกสวนกลาง ตร.
</h5>
<button <button
type="button" type="button"
class="btn-close" class="btn-close"
@ -356,6 +386,18 @@ export default {
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div> <div>
<div class="mb-3">
<label></label>
<v-select :options="optionsBuilding" v-model="selectedBuilding"></v-select>
</div>
<div class="mb-3">
<label></label>
<v-select :options="optionsFloor" v-model="selectedFloor"></v-select>
</div>
<div class="mb-3">
<label>อง</label>
<v-select :options="optionsRoom" v-model="selectedRoom"></v-select>
</div>
<div class="mb-3"> <div class="mb-3">
<MaterialInput <MaterialInput
name="fee" name="fee"
@ -413,7 +455,7 @@ export default {
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง ดหนาตาง
</button> </button>
<button type="button" class="btn btn-primary">นท</button> <MaterialButton variant="gradient" color="success">นท</MaterialButton>
</div> </div>
</div> </div>
</div> </div>
@ -432,7 +474,9 @@ export default {
<div class="modal-dialog modal-dialog-centered"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">เพมคาใชายบานพกสวนกลาง บช.ตชด.</h5> <h5 class="modal-title" id="staticBackdropLabel">
เพมคาใชายบานพกสวนกลาง บช.ตชด.
</h5>
<button <button
type="button" type="button"
class="btn-close" class="btn-close"
@ -442,6 +486,18 @@ export default {
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div> <div>
<div class="mb-3">
<label></label>
<v-select :options="optionsBuilding" v-model="selectedBuilding"></v-select>
</div>
<div class="mb-3">
<label></label>
<v-select :options="optionsFloor" v-model="selectedFloor"></v-select>
</div>
<div class="mb-3">
<label>อง</label>
<v-select :options="optionsRoom" v-model="selectedRoom"></v-select>
</div>
<div class="mb-3"> <div class="mb-3">
<MaterialInput <MaterialInput
name="Maintenance" name="Maintenance"
@ -469,7 +525,7 @@ export default {
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง ดหนาตาง
</button> </button>
<button type="button" class="btn btn-primary">นท</button> <MaterialButton variant="gradient" color="success">นท</MaterialButton>
</div> </div>
</div> </div>
</div> </div>
@ -525,7 +581,7 @@ export default {
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
ดหนาตาง ดหนาตาง
</button> </button>
<button type="button" class="btn btn-primary">นท</button> <MaterialButton variant="gradient" color="success">นท</MaterialButton>
</div> </div>
</div> </div>
</div> </div>