初始化

This commit is contained in:
2025-11-25 17:41:24 +08:00
commit 4cdf0f0f85
3383 changed files with 1050962 additions and 0 deletions

View File

@@ -0,0 +1,226 @@
@model PagedList.IPagedList<Face.Domain.Entities.Hotels>
@using PagedList.Mvc;
@using Face.Domain.Entities;
@using Face.Web.Areas.App.Models;
@using Face.Domain.Application;
@{
ViewBag.Title = "HotelInfo";
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
List<Face.Domain.Entities.HotelGroups> hglist = Face.Services.Cache.CacheHelp.GetHotelGroup2();
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
List<TBL_ROOM_BASIC_INFO> roomlist = ZongRoominfo;
}
<style>
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
padding: 0px;
border: 0px;
}
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
padding: 3px;
}
#order {
border-top: solid 2px #ddd;
}
.chaxun {
text-indent: 5px;
}
.PagedList-skipToLast page-item {
display: none;
}
</style>
<div class="content-wrapper">
<section class="content" style="padding:0px;">
<div class="container-fluid">
<div class="row">
<div class="col-sm-8">
<!-- Default box -->
<div class="card">
<div class="card-header">
<span style="font-size:30px">酒店信息</span>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<div class="card-body" >
<div class="input-group " style="width: 30%; float: left;" >
<input type="search" id="txtOpname" class="form-control form-control-lg" placeholder="酒店名称筛选">
<div class="input-group-append">
<button type="submit" class="btn btn-lg btn-default" onclick="Hclick()" id="Btnmodify">
<i class="fa fa-search"></i>
</button>
</div>
</div>
<div class="input-group " style="width: 30%; float: left;">
<input type="search" id="txtId" class="form-control form-control-lg" placeholder="酒店编号筛选">
<div class="input-group-append">
<button type="submit" class="btn btn-lg btn-default" onclick="Hid()" id="BtnmoID">
<i class="fa fa-search"></i>
</button>
</div>
</div>
@*<input type="text" placeholder="酒店名称筛选" name="username" style="height: 35px; " id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="Hclick()">搜索</button>*@
@*<input type="text" placeholder="酒店编号筛选" name="username" style="height:35px;margin-left:5px;" id="txtId"><button class="btn btn-md btn-primary" id="BtnmoID" onclick="Hid()">搜索</button>*@
</div>
@*条件筛选*@
@*内容筛选*@
<div class="ibox-content" style="padding:0px;">
<div id="project">
<table class="table dataTables-example" border="0" id="order">
@if (Model != null)
{
foreach (var item in Model)
{
<tbody class="tbodyList" id="handShow" style="cursor:hand" onclick="asd(this)">
<tr>
<td rowspan="5" style="margin:0px;padding:0px;width:40px">
<input type="hidden" id="ID" value="2">
<div class="lightBoxGallery">
</div>
</td>
<td style="text-align:left;width:60%;">编号:@Html.DisplayFor(modelItem => item.Id)<span class="gray"></span></td>
<td style="width:200px;">
状态:<span style="color:#0094ff">
@item.Status
</span>
</td>
</tr>
<tr>
<td>酒店名称: @Html.DisplayFor(modelItem => item.Name)</td>
@{
if (item.GroupId != 0)
{
if (hglist.Single(s => s.Id == item.GroupId)!=null)
{
<td>项目组:@(hglist.Single(s => s.Id == item.GroupId).Name)</td>
}
else
{
<td>项目组:无</td>
}
}
else
{
<td>项目组:无</td>
}
}
</tr>
<tr></tr>
<tr>
<td>
创建时间: @item.CreateTime.ToString("yyyy/MM/dd")
</td>
<td>
<a href="@Url.Action("Facetest", "Face")"></a> <button class="btn btn-xs btn-success" id="btnaddPLine" onclick="cun(@item.Id)">查看房间信息</button>
</td>
</tr>
@{
List<DeviceManage> hotellist = (List<DeviceManage>)ViewData["dmstate"];
<tr class="entire"><td></td></tr>
<tr class="entire">
<td></td>
<td>空房:@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Where(s => s.RoomStatusID == 16).Count()/(@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Count())</td>
<td>出租中:@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Where(s => s.RoomStatusID == 2).Count()/(@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Count())</td>
</tr>
<tr class="entire">
<td></td>
<td>退房中:@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Where(s => s.RoomStatusID == 8).Count()/(@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Count())</td>
<td>在线人脸机:@hotellist.Where(x => x.HotelCode == item.Id.ToString()).Where(j => j.Status == true).Count()/(@hotellist.Where(x => x.HotelCode == item.Id.ToString()).Count())</td>
</tr>
<tr class="entire">
<td></td>
<td>待租中:@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Where(s => s.RoomStatusID == 4).Count()/(@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Count())</td>
<td>不在线人脸机:@hotellist.Where(x => x.HotelCode == item.Id.ToString()).Where(j => j.Status == false).Count()/(@hotellist.Where(x => x.HotelCode == item.Id.ToString()).Count())</td>
</tr>
}
</tbody>
}
}
</table>
<div style="text-align:center" class="chaxun">
@*分页主要代码*@
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
<nav aria-label="Contacts Page Navigation">
<ul class="pagination justify-content-center m-0">
@if (ViewData["condition"] != null)
{
string TiaoJian = ViewData["condition"].ToString();
@Html.PagedListPager(Model, page => Url.Action("HotelInfo", new { page, TiaoJian }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
}
else
{
@Html.PagedListPager(Model, page => Url.Action("HotelInfo", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
}
</ul>
</nav>
</div>
<div id="btn" onclick="tip()"></div>
</div>
</div>
<!-- /.card-body -->
</div>
</div>
<!-- /.card -->
<div class="col-sm-4" id="faceDetailsBox">
</div>
</div>
</div>
</section>
</div>
<script>
$(".pagination").addClass("pagination pagination-sm");
$(".pagination").children("li").addClass("page-item");
$(".page-item").children("a").addClass("page-link");
$('.entire').hide();
function Hclick() {//查询酒店名称按钮
var myType = document.getElementById("txtOpname").value//获取select对象
var link = "/App/Hotel/HotelInfo" + '?condition=' + myType
window.location.href = link;
}
function Hid() {//查询酒店编号按钮
var myType = document.getElementById("txtId").value//获取select对象
var link = "/App/Hotel/HotelInfo" + '?number=' + myType
window.location.href = link;
}
function cun(str) {
var link = "/App/Hotel/RoomInf" + '?hotelCode=' + str
window.location.href = link;
}
function asd(that) {
$(that).find('.entire').toggle();
}
</script>

View File

@@ -0,0 +1,274 @@
@model PagedList.IPagedList<Face.Web.Areas.App.Models.Roominfo.Result>
@using PagedList.Mvc;
@using Face.Domain.Entities;
@{
ViewBag.Title = "RoomInf";
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
List<Face.Domain.Entities.HotelGroups> hglist = Face.Services.Cache.CacheHelp.GetHotelGroup();
List<CheckInInfo> co = (List<CheckInInfo>)ViewData["shop"];
}
@*<script src="~/Scripts/jquery-3.3.1.js"></script>*@
<style>
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
padding: 0px;
border: 0px;
}
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
padding: 3px;
}
#order {
border-top: solid 2px #ddd;
}
.chaxun {
text-indent: 5px;
}
.PagedList-skipToLast page-item {
display: none;
}
</style>
<div class="content-wrapper">
<section class="content" style="padding:0px;">
<div class="container-fluid">
<div class="row">
<div class="col-sm-8">
<!-- Default box -->
<div class="card">
<div class="card-header">
<span style="font-size:30px">房间信息(共 @ViewData["Roomsum"] 房间)</span>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<div class="card-body">
<div class="input-group " style="width:300px; float:left;">
<input type="search" style="height:40px;" id="txtOpname" class="form-control form-control-lg" placeholder="房间筛选">
<div class="input-group-append">
<button type="submit" class="btn btn-lg btn-default" onclick="HclickShow()" id="Btnmodify">
<i class="fa fa-search"></i>
</button>
</div>
</div>
<div class="input-group " style="width:300px; float:left;">
<input type="search" style="height:40px;" id="txtid" class="form-control form-control-lg" placeholder="房间编号筛选">
<div class="input-group-append">
<button type="submit" class="btn btn-lg btn-default" onclick="Hclic()" id="Btnmodify">
<i class="fa fa-search"></i>
</button>
</div>
</div>
@*<input type="text" placeholder="房间筛选" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="HclickShow()">搜索</button>*@
@*<input type="text" placeholder="房间编号筛选" name="username" style="height:35px;margin-left:5px;" id="txtid"><button class="btn btn-md btn-primary" onclick="Hclic()">搜索</button>*@
<select class="form-control" id="OrgId" style="width:300px; float:left">
<option value="-1">
全部房间
</option>
<option value="16" @( ViewData["rommstate"] != null && ViewData["rommstate"].ToString() == "16" ? "selected='selected'" : "")>
空房
</option>
<option value="4" @( ViewData["rommstate"] != null && ViewData["rommstate"].ToString() == "4" ? "selected='selected'" : "")>
待租中
</option>
<option value="8" @( ViewData["rommstate"] != null && ViewData["rommstate"].ToString() == "8" ? "selected='selected'" : "")>
退房中
</option>
<option value="2" @( ViewData["rommstate"] != null && ViewData["rommstate"].ToString() == "2" ? "selected='selected'" : "")>
出租中
</option>
</select>
</div>
@*条件筛选*@
@*内容筛选*@
<div class="ibox-content" style="padding:0px;">
<div id="project">
<table class="table dataTables-example" border="0" id="order">
@if (Model != null)
{
foreach (var item in Model)
{
<tbody class="tbodyList" id="handShow">
<tr>
<td rowspan="5" style="margin:0px;padding:0px;width:40px">
<input type="hidden" id="ID" value="2">
<div class="lightBoxGallery">
</div>
</td>
<td style="text-align:left;width:60%;">编号: @Html.DisplayFor(modelItem => item.ID)<span class="gray"></span></td>
<td style="width:200px;">
状态:<span style="color:#0094ff">
@if (item.RoomStatusID == 2)
{
<span>:出租中</span>
}
else if (item.RoomStatusID == 4)
{
<span>:待租中</span>
}
else if (item.RoomStatusID == 8)
{
<span>:退房中</span>
}
else if (item.RoomStatusID == 16)
{
<span>:空房</span>
}
</span>
</td>
</tr>
<tr></tr>
<tr>
<td>房间名称: @Html.DisplayFor(modelItem => item.RoomNumber)</td>
@*<td>项目组: @(Html.DisplayFor(modelItem => item.GroupId).ToString() != "" ? hglist.Single(s => s.Id == item.GroupId).Name : "")</td>*@
<td>
@{
int sun = 0;
List<DeviceManage> deviceManages = (List<DeviceManage>)Session["Rommface"];
foreach (var dmitem in deviceManages)
{
if (item.ID == dmitem.RoomId)
{
sun = 1;
if (dmitem.Status == true)
{
<span style="cursor:hand; color:cornflowerblue" onclick="skip('@dmitem.SerialNo')">
人脸机SN号:@dmitem.SerialNo
(在线)
</span>
}
else
{
<span style="cursor:hand; color:darkgrey" onclick="skip('@dmitem.SerialNo')">
人脸机SN号:@dmitem.SerialNo
(不在线)
</span>
}
}
}
if (sun == 0)
{
<button class="btn btn-xs btn-success" id="btnaddPLine" style="background-color:cornflowerblue" onclick="bing('@ViewData["hotelCode"]',@item.ID)">绑定人脸机</button>
}
}
</td>
</tr>
<tr>
<td>
创建时间: @item.RegisterDate.ToString("yyyy-MM-dd")
</td>
<td>
入住人数:
@{
int se = 0;
foreach (var resident in co)
{
if (item.ID == resident.Roomid)
{
se++;
}
}
<span>@se</span>
}
</td>
</tr>
</tbody>
}
}
</table>
<div style="text-align:center" class="chaxun">
@*分页主要代码*@
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
<nav aria-label="Contacts Page Navigation">
<ul class="pagination justify-content-center m-0">
@if (ViewData["conditionShow"] != null)
{
string TiaoJian = ViewData["conditionShow"].ToString();
int hotelCode = int.Parse(ViewData["hotelCode"].ToString());
@Html.PagedListPager(Model, page => Url.Action("RoomInf", new { page, hotelCode, TiaoJian }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
}
else if (ViewData["rommstate"] != null)
{
int hotelCode = int.Parse(ViewData["hotelCode"].ToString());
string rommstate = ViewData["rommstate"].ToString();
@Html.PagedListPager(Model, page => Url.Action("RoomInf", new { page, hotelCode, rommstate }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
}
else
{
int hotelCode = int.Parse(ViewData["hotelCode"].ToString());
@Html.PagedListPager(Model, page => Url.Action("RoomInf", new { page, hotelCode }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
}
</ul>
</nav>
</div>
<div id="btn" onclick="tip()"></div>
</div>
</div>
<!-- /.card-body -->
</div>
</div>
<div class="col-sm-4" id="faceDetailsBox">
</div>
</div>
</div>
</section>
</div>
<script>
$(".pagination").addClass("pagination pagination-sm");
$(".pagination").children("li").addClass("page-item");
$(".page-item").children("a").addClass("page-link");
function HclickShow() {//查询房间名称按钮
var txtName = document.getElementById("txttext")//获取select对象
var myType = document.getElementById("txtOpname").value//获取select对象
var link = "/App/Hotel/RoomInf" + '?hotelCode=' + @ViewData["hotelCode"] + '&condition=' + myType
window.location.href = link;
}
function bing(hotel,room) {
var link = "/App/Face/Roomselect" + '?hotel=' + hotel + '&room=' + room
window.location.href = link;
}
function skip(ts) {
var link = "/App/Face/TestFaceall" + '?Sn=' + ts
window.location.href = link;
}
$('#OrgId').change(function () {//查询酒店按钮
var myType1 = document.getElementById("OrgId");//获取select对象
var index1 = myType1.selectedIndex;//获取选项中的索引selectIndex表示的是当前所选中的index
var code1 = myType1.options[index1].value;//获取酒店编号
var link = "/App/Hotel/RoomInf" + '?hotelCode=' + @ViewData["hotelCode"] + '&rommstate=' + code1
window.location.href = link;
})
function Hclic() {//查询房间编号按钮
var myType = document.getElementById("txtid").value//获取select对象
var link = "/App/Hotel/RoomInf" + '?hotelCode=' + @ViewData["hotelCode"] + '&roommid=' + myType
window.location.href = link;
}
</script>