mirror of
https://github.com/creativetimofficial/vue-material-kit.git
synced 2025-05-23 04:04:22 +08:00
update fuction scapcia
This commit is contained in:
parent
8cc788ecce
commit
b7ab0821a7
@ -1 +1 @@
|
||||
[{"id":"3f7e1c45-a2e9-4b08-a56d-e687ea79ba61","no":1,"firstName":"สมชัย14","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"1234","queue":"inqueue","roomnumber":"201","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"ebd367bf-396f-4bae-8130-1ce3fa130d38","no":2,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","queue":"inqueue","roomnumber":"202","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"507e0867-4d56-4f4e-81d1-f3a1ab0d0fde","no":1,"firstName":"มานา","lastName":"มานี","affiliation":"ลูกจ้าง","rank":"นาย","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","queue":"inroom","roomnumber":"209","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","queue":"inqueue","roomnumber":"204","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inqueue","roomnumber":"206","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"fc3710ca-c3af-4781-9c8f-4aa6657ddff4","no":5,"firstName":"สมาน788","lastName":"แสงสุข7","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"13404441144","phone":"0325647847","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"14","queue":"none","roomnumber":"205","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","typeRoom":"ช2","queue":"inroom","contract":"123","checkintime":"5","maintenance":"200","insurance":"2000","installments":"5","pickedBook":"2023-11-02T14:10:26.374Z"}]
|
||||
[{"id":"3f7e1c45-a2e9-4b08-a56d-e687ea79ba61","no":1,"firstName":"สมชัย14","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"1234","queue":"inqueue","roomnumber":"201","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"ebd367bf-396f-4bae-8130-1ce3fa130d38","no":2,"firstName":"สมชัย","lastName":"แสงสุข","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"134044411441178","phone":"0325647845","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","queue":"inqueue","roomnumber":"202","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"507e0867-4d56-4f4e-81d1-f3a1ab0d0fde","no":1,"firstName":"มานา","lastName":"มานี","affiliation":"ลูกจ้าง","rank":"นาย","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"","queue":"inroom","roomnumber":"209","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"2c388c78-b2a3-4ea2-bca5-48521eb7e5db","no":3,"firstName":"มานี","lastName":"มานอน","affiliation":"ลูกจ้าง","rank":"ส.ต.ต.","idcard":"134044411441178","phone":"0325647845","status":"สมรส","typeAffiliation":"ลูกจ้าง","typeRanks":"ประทวน","typeUser":"ตร.","bookNumber":"1234","queue":"inqueue","roomnumber":"204","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inqueue","roomnumber":"206","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"fc3710ca-c3af-4781-9c8f-4aa6657ddff4","no":5,"firstName":"สมาน788","lastName":"แสงสุข7","affiliation":"ลูกจ้าง","rank":"นาง","idcard":"13404441144","phone":"0325647847","status":"โสด","typeAffiliation":"ลูกจ้าง","typeRanks":"ลูกจ้าง","typeUser":"ตร.","bookNumber":"14","queue":"none","roomnumber":"205","insurancecost":254,"installments":266,"waterbill":150,"electricitybill":945,"central":500,"costs":200,"sumCost":1000,"typeContract":"หักได้","contract":"...","Checkintime":"","Maintenance":"","insurance":""},{"id":"1cb479fa-e217-422d-938e-47f6fc9b9f32","no":4,"firstName":"มานพ","lastName":"มานี","affiliation":"ฝอ.2","rank":"ร.ต.ต.","idcard":"13404441144555","phone":"0325647845","status":"สมรส","typeRoom":"ช2","typeAffiliation":"บก.อก.","typeRanks":"สัญญาบัตร","typeUser":"บช.ตชด.","bookNumber":"1234","queue":"inroom","installments":"","pickedBook":"2023-11-07T14:10:26.374Z","Affiliation":"ฝอ.2"}]
|
@ -12,6 +12,7 @@
|
||||
"typeAffiliation": "ลูกจ้าง",
|
||||
"typeRanks": "ลูกจ้าง",
|
||||
"bookNumber": "1234",
|
||||
"queue": "none",
|
||||
"pickedBook":""
|
||||
},
|
||||
{
|
||||
@ -26,6 +27,7 @@
|
||||
"phone": "0325647845",
|
||||
"typeAffiliation": "บช.ตซด.",
|
||||
"typeRanks": "ประทวน",
|
||||
"queue": "none",
|
||||
"bookNumber": "1234",
|
||||
"pickedBook":""
|
||||
},
|
||||
@ -42,6 +44,7 @@
|
||||
"typeAffiliation": "ลูกจ้าง",
|
||||
"typeRanks": "ลูกจ้าง",
|
||||
"bookNumber": "1234",
|
||||
"queue": "none",
|
||||
"pickedBook":""
|
||||
},
|
||||
{
|
||||
@ -56,6 +59,7 @@
|
||||
"typeRoom": "ช2",
|
||||
"typeAffiliation": "บช.ตซด.",
|
||||
"typeRanks": "ประทวน",
|
||||
"queue": "none",
|
||||
"bookNumber": "14578963",
|
||||
"pickedBook":""
|
||||
},
|
||||
@ -72,6 +76,7 @@
|
||||
"typeAffiliation": "ลูกจ้าง",
|
||||
"typeRanks": "ลูกจ้าง",
|
||||
"typeUser": "ตร.",
|
||||
"queue": "none",
|
||||
"bookNumber": "กกกกกกกกกก",
|
||||
"pickedBook":""
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
@ -197,22 +197,6 @@
|
||||
"roomStatus": "free",
|
||||
"pickedBook": "2023-11-02T14:10:26.374Z"
|
||||
},
|
||||
{
|
||||
"buildingId": "8bc8b393-8ae2-4e65-9a35-32c0e76545b3",
|
||||
"id": "a10eff34-cbe2-4a71-a44e-0d95bfe33410",
|
||||
"name": "023",
|
||||
"floor": 1,
|
||||
"index": 2,
|
||||
"numberRoom": 2,
|
||||
"ranks": "",
|
||||
"firstName": "",
|
||||
"laststName": "",
|
||||
"Affiliation": "",
|
||||
"roomconditions": "ปกติ",
|
||||
"typeRoom": "ช1",
|
||||
"roomStatus": "free",
|
||||
"pickedBook": "2023-11-02T14:10:26.374Z"
|
||||
},
|
||||
{
|
||||
"buildingId": "8bc8b393-8ae2-4e65-9a35-32c0e76545b3",
|
||||
"id": "03dc297e-ea5e-4852-8e49-6c9f3d2d47d4",
|
||||
@ -395,5 +379,28 @@
|
||||
"typeAffiliation": "ลูกจ้าง",
|
||||
"typeRanks": "ประทวน",
|
||||
"pickedBook": "2023-11-02T14:10:26.374Z"
|
||||
},
|
||||
{
|
||||
"buildingId": "8bc8b393-8ae2-4e65-9a35-32c0e76545b3",
|
||||
"id": "a10eff34-cbe2-4a71-a44e-0d95bfe33410",
|
||||
"name": "023",
|
||||
"floor": 1,
|
||||
"index": 2,
|
||||
"numberRoom": 2,
|
||||
"ranks": " ",
|
||||
"firstName": "มานพ",
|
||||
"laststName": "",
|
||||
"Affiliation": "",
|
||||
"roomconditions": "ปกติ",
|
||||
"typeRoom": "ช2",
|
||||
"roomStatus": "special",
|
||||
"pickedBook": "2023-11-07T14:10:26.374Z",
|
||||
"lastName": "มานี",
|
||||
"affiliation": "ฝอ.2",
|
||||
"idcard": "13404441144555",
|
||||
"phone": "0325647845",
|
||||
"status": "สมรส",
|
||||
"typeAffiliation": "บก.อก.",
|
||||
"typeRanks": "สัญญาบัตร"
|
||||
}
|
||||
]
|
@ -22,29 +22,6 @@
|
||||
"installments": "",
|
||||
"pickedBook": "2023-11-03T14:10:26.374Z"
|
||||
},
|
||||
{
|
||||
"id": "1cb479fa-e217-422d-938e-47f6fc9b9f32",
|
||||
"no": 4,
|
||||
"firstName": "มานพ",
|
||||
"lastName": "มานี",
|
||||
"affiliation": "ฝอ.2",
|
||||
"rank": "ร.ต.ต.",
|
||||
"idcard": "13404441144555",
|
||||
"phone": "0325647845",
|
||||
"status": "สมรส",
|
||||
"typeRoom": "ช2",
|
||||
"typeAffiliation": "บก.อก.",
|
||||
"typeRanks": "สัญญาบัตร",
|
||||
"typeUser": "บช.ตชด.",
|
||||
"bookNumber": "1234",
|
||||
"queue": "inqueue",
|
||||
"contract": "",
|
||||
"checkintime": "",
|
||||
"maintenance": "",
|
||||
"insurance": "",
|
||||
"installments": "",
|
||||
"pickedBook": "2023-11-07T14:10:26.374Z"
|
||||
},
|
||||
{
|
||||
"id": "fae8c402-f815-44cc-8702-bf843dc97db4",
|
||||
"no": 6,
|
||||
@ -82,7 +59,7 @@
|
||||
"typeRanks": "ลูกจ้าง",
|
||||
"typeUser": "ตร.",
|
||||
"bookNumber": "14",
|
||||
"queue": "none",
|
||||
"queue": "inqueue",
|
||||
"contract": "",
|
||||
"checkintime": "",
|
||||
"maintenance": "",
|
||||
@ -103,7 +80,7 @@
|
||||
"typeRanks": "ประทวน",
|
||||
"typeUser": "บช.ตชด.",
|
||||
"bookNumber": "123",
|
||||
"queue": "none",
|
||||
"queue": "inqueue",
|
||||
"status": "โสด",
|
||||
"typeRoom": "ช1",
|
||||
"contract": "",
|
||||
@ -204,5 +181,28 @@
|
||||
"insurance": "",
|
||||
"installments": "",
|
||||
"pickedBook": "2023-11-02T14:10:26.374Z"
|
||||
},
|
||||
{
|
||||
"id": "1cb479fa-e217-422d-938e-47f6fc9b9f32",
|
||||
"no": 4,
|
||||
"firstName": "มานพ",
|
||||
"lastName": "มานี",
|
||||
"affiliation": "ฝอ.2",
|
||||
"rank": "ร.ต.ต.",
|
||||
"idcard": "13404441144555",
|
||||
"phone": "0325647845",
|
||||
"status": "สมรส",
|
||||
"typeRoom": "ช2",
|
||||
"typeAffiliation": "บก.อก.",
|
||||
"typeRanks": "สัญญาบัตร",
|
||||
"typeUser": "บช.ตชด.",
|
||||
"bookNumber": "1234",
|
||||
"queue": "inroom",
|
||||
"contract": "",
|
||||
"checkintime": "",
|
||||
"maintenance": "",
|
||||
"insurance": "",
|
||||
"installments": "",
|
||||
"pickedBook": "2023-11-07T14:10:26.374Z"
|
||||
}
|
||||
]
|
@ -47,7 +47,9 @@ export default {
|
||||
queueList: [],
|
||||
queuefilter: [],
|
||||
statusRoom: "",
|
||||
dateApproved: ""
|
||||
dateApproved: "",
|
||||
userList: [],
|
||||
selectedUser: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -56,6 +58,12 @@ export default {
|
||||
this.id = this.$route.params.id;
|
||||
this.getroomByid(this.id);
|
||||
}
|
||||
this.getAllinqueue();
|
||||
},
|
||||
watch: {
|
||||
selectedUser: function (newValue) {
|
||||
this.getAllusersByid(newValue.value);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
gotoAction() {
|
||||
@ -67,7 +75,6 @@ export default {
|
||||
.get(`http://localhost:3001/queue/inqueue`)
|
||||
.then((res) => {
|
||||
this.queueList = res.data;
|
||||
console.log(this.queueList);
|
||||
this.queuefilter = this.queueList.filter((e) => e.typeRoom === this.typeroom);
|
||||
})
|
||||
.catch((err) => {
|
||||
@ -77,21 +84,58 @@ export default {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
|
||||
getAllinqueue() {
|
||||
try {
|
||||
axios
|
||||
.get(`http://localhost:3001/queue/inqueue`)
|
||||
.then((res) => {
|
||||
this.userList = res.data.map((ele) => {
|
||||
return {
|
||||
label: ele.rank + " " + ele.firstName + " " + ele.lastName,
|
||||
value: ele.id,
|
||||
};
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
|
||||
getAllusersByid(id) {
|
||||
this.userId = id;
|
||||
try {
|
||||
axios
|
||||
.get(`http://localhost:3001/users/${id}`)
|
||||
.then((res) => {
|
||||
let data = res.data;
|
||||
this.userByid = data;
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
},
|
||||
|
||||
async getroomByid(id) {
|
||||
try {
|
||||
axios.get(`http://localhost:3001/rooms/${id}`).then((res) => {
|
||||
this.data = res.data;
|
||||
console.log(this.data);
|
||||
this.dateApproved = this.convertDateTolocal(this.data.pickedBook)
|
||||
this.dateApproved = this.convertDateTolocal(this.data.pickedBook);
|
||||
this.typeroom = this.data.typeRoom;
|
||||
if(this.data.affiliation) this.Affiliation = this.data.affiliation
|
||||
if (this.data.affiliation) this.Affiliation = this.data.affiliation;
|
||||
if (this.data.roomStatus == "return") this.statusRoom = "ผ่อนผัน";
|
||||
if (this.data.roomStatus == "special") this.statusRoom = "กรณีพิเศษ";
|
||||
if (this.data.roomStatus == "waiting") this.statusRoom = "ชำรุด";
|
||||
if (this.data.roomStatus == "unavailable") this.statusRoom = "ไม่ว่าง";
|
||||
if (this.data.roomStatus == "free") this.statusRoom = "ว่าง";
|
||||
|
||||
|
||||
|
||||
this.getAllqueue();
|
||||
});
|
||||
} catch (e) {
|
||||
@ -99,11 +143,15 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
convertDateTolocal(index){
|
||||
convertDateTolocal(index) {
|
||||
const date = new Date(index);
|
||||
const formatter = new Intl.DateTimeFormat('en-US', { day: '2-digit', month: '2-digit', year: 'numeric' });
|
||||
const formattedDate = formatter.format(date)
|
||||
return formattedDate
|
||||
const formatter = new Intl.DateTimeFormat("en-US", {
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric",
|
||||
});
|
||||
const formattedDate = formatter.format(date);
|
||||
return formattedDate;
|
||||
},
|
||||
|
||||
getAllusersByid(id) {
|
||||
@ -123,7 +171,7 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
async submitForm() {
|
||||
async submitForm(index) {
|
||||
let body = {
|
||||
...this.userByid,
|
||||
queue: "inroom",
|
||||
@ -144,7 +192,11 @@ export default {
|
||||
.then((res) => {
|
||||
this.submitForm2();
|
||||
this.submitForm3();
|
||||
this.submitFormRoom();
|
||||
if (index == "spacia") {
|
||||
this.submitRoomScapia();
|
||||
} else if (index == "normal") {
|
||||
this.submitFormRoom();
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
@ -215,6 +267,35 @@ export default {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
|
||||
async submitRoomScapia() {
|
||||
// this.data.roomStatus == "special"
|
||||
let body = {
|
||||
...this.userByid,
|
||||
queue: "inroom",
|
||||
roomStatus: "special",
|
||||
contract: this.contract,
|
||||
checkintime: this.Checkintime,
|
||||
maintenance: this.Maintenance,
|
||||
insurance: this.insurance,
|
||||
installments: this.installments,
|
||||
};
|
||||
|
||||
await axios
|
||||
.put(`http://localhost:3001/rooms/${this.id}`, body, {
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
this.getAllqueue();
|
||||
this.$router.push({ path: `/room` });
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -261,6 +342,15 @@ export default {
|
||||
<div class="d-flex justify-content-between align-items-baseline">
|
||||
<h4>รายละเอียดห้องพัก {{ data?.numberRoom }}</h4>
|
||||
<div>
|
||||
<MaterialButton
|
||||
v-if="this.mode == 'add'"
|
||||
style="margin-right: 20px"
|
||||
variant="gradient"
|
||||
color="danger"
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#addSpaciaBackdrop"
|
||||
>กรณีพิเศษ</MaterialButton
|
||||
>
|
||||
<MaterialButton variant="gradient" color="success" @click="gotoAction()"
|
||||
>จัดการห้องพัก</MaterialButton
|
||||
>
|
||||
@ -275,14 +365,16 @@ export default {
|
||||
<h5 class="card-title">รายละเอียดผู้เช่า</h5>
|
||||
<div class="col-5">
|
||||
<p class="card-text">
|
||||
ชือ : {{ data?.rank }} {{ data?.firstName }}
|
||||
ชือ : {{ data?.rank }} {{ data?.firstName }}
|
||||
</p>
|
||||
<p class="card-text">สถานะห้อง : {{ statusRoom }}</p>
|
||||
<p class="card-text">สังกัด : {{ Affiliation }} </p>
|
||||
<p class="card-text">เลขบัตรประชาชน : {{ data?.idcard }} </p>
|
||||
<p class="card-text">วันที่ได้รับอนุมัติ : {{ dateApproved }} </p>
|
||||
<p class="card-text">สังกัด : {{ Affiliation }}</p>
|
||||
<p class="card-text">เลขบัตรประชาชน : {{ data?.idcard }}</p>
|
||||
<p class="card-text">วันที่ได้รับอนุมัติ : {{ dateApproved }}</p>
|
||||
|
||||
<p class="card-text">ระยะเวลาที่เข้าพัก : {{ data?.Checkintime || 0 }} เดือน</p>
|
||||
<p class="card-text">
|
||||
ระยะเวลาที่เข้าพัก : {{ data?.Checkintime || 0 }} เดือน
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-7">
|
||||
<p class="card-text">นามสกุล : {{ data?.lastName }}</p>
|
||||
@ -433,7 +525,7 @@ export default {
|
||||
<MaterialButton
|
||||
variant="gradient"
|
||||
color="success"
|
||||
@click="submitForm"
|
||||
@click="submitForm('normal')"
|
||||
html-type="submit"
|
||||
data-bs-dismiss="modal"
|
||||
>บันทึก</MaterialButton
|
||||
@ -609,6 +701,49 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="modal fade"
|
||||
id="addSpaciaBackdrop"
|
||||
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 class="mb-3">
|
||||
<label>ชื่อผู้เช่า</label>
|
||||
<v-select :options="userList" v-model="selectedUser"></v-select>
|
||||
</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('spacia')"
|
||||
data-bs-dismiss="modal"
|
||||
html-type="submit"
|
||||
>บันทึก</MaterialButton
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
<style>
|
||||
|
@ -159,7 +159,6 @@ export default {
|
||||
.get(`http://localhost:3001/rooms/${id}`)
|
||||
.then((res) => {
|
||||
this.roomData = res.data;
|
||||
console.log(this.roomData);
|
||||
this.numberRoom = this.roomData.numberRoom;
|
||||
this.selectedRoomtype = this.roomData.typeRoom
|
||||
|
||||
@ -201,7 +200,8 @@ export default {
|
||||
firstName: " ",
|
||||
laststName: " ",
|
||||
ranks: " ",
|
||||
Affiliation: " "
|
||||
Affiliation: " ",
|
||||
queue: "none"
|
||||
};
|
||||
axios
|
||||
.put(`http://localhost:3001/rooms/${this.id}`, body, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user