Skip to content
Open

ms #14

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 16 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@

#MrCode


- 队伍名称:码先生
- 项目名称:MrCode
- 团队队长:张羽中
- 团队成员:邹辛怀、吴敏、朱源、王嘉廉、吴燕晶
- 项目简介:MrCode 自助酒店终端管理系统!旨在简化目前酒店入住繁琐的登记退房过程。用户自助入住,一键退房,通过DataMining推荐吃喝、玩乐、出行。项目源于美团点评杯,项目流程基于用户已购买美团券。


Expand All @@ -22,79 +17,67 @@



相关链接
---
[MrCode](http://www.monkeyhorse.cn/MrCode) | [文档手册](https://github.com/Uoor/xmu-2016-MrCode/tree/dev/dos) | [酒店管理系统<==>MrCode](http://www.monkeyhorse.cn/JavaPrj_9).


依赖
---

* HTML5
* LAM+SSH
* [Kmeans](https://github.com/Uoor/xmu-2016-MrCode/tree/dev/dos/DataMining)
* [Kmeans](https://github.com/Uoor/xmu-2016-MrCode/tree/dev/doc/DataMining)
* Jquery


快速开始
-------
* 码团用户寓意于美团用户

* 用户身份登陆(已有`admin/111111`),也可动态登陆。
* [MrCode 主页](http://www.monkeyhorse.cn/MrCode)
* 用户身份登陆,也可动态登陆。
* [MrCode Github](https://github.com/Uoor/xmu-2016-MrCode/)


* 酒店管理系统,用于与MrCode交互
* 管理员登陆(已有`admin/admin`)
* [酒店管理系统 主页](http://www.monkeyhorse.cn/JavaPrj_9).
* 管理员登陆
* [酒店管理系统 Github](https://github.com/wjialian/hotelSystem).


扫描以下二维码,或关注微信公众号(厦大开发精英小组),即可享受自助入住体验
---

![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/publicNumber.jpg)



截图
---

#### 流程图
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/flowchart/mrcode.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/flowchart/mrcode.jpg)

#### 登陆
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/login.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/login.jpg)

#### 主页
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/index.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/index.jpg)

#### 团购券列表
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/order0.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/order0.jpg)

#### 选择日期
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/order2.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/order2.jpg)

#### 房间选择
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/order3.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/order3.jpg)

#### 入住人选择并生成订单
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/order4.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/order4.jpg)

#### 支付宝支付
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/order5.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/order5.jpg)

#### 酒店管理
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/manage.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/manage.jpg)

#### 侧栏
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/side.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/side.jpg)

#### 用于交互用的酒店管理系统
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/dos/pic/hotel.jpg)
![](https://github.com/Uoor/xmu-2016-MrCode/blob/dev/doc/pic/hotel.jpg)

交流讨论
-------
- [文档手册](https://github.com/Uoor/xmu-2016-MrCode/tree/dev/dos)
- 若因数据库问题影响运行,请联系我
- [文档手册](https://github.com/Uoor/xmu-2016-MrCode/tree/dev/doc)
- email: i@monkeyhorse.cn
2 changes: 1 addition & 1 deletion WebRoot/WEB-INF/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<div class="text">关于我们</div>
</a>
</div>
<div class="footer" ">
<div class="footer">
<p class="footer-top">&COPY;码先生团队</p>
<p class="footer-bottom">
<a href="${ctx }/customer/toIndex">首页</a>
Expand Down
Binary file added WebRoot/WEB-INF/lib/asyncload-1.0.0-javadoc.jar
Binary file not shown.
Binary file added WebRoot/WEB-INF/lib/asyncload-1.0.0.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion WebRoot/WEB-INF/view/aboutus.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


</head>
<body>
<body >
<div class="head">
<div class="header">
<a href="#menu" class="header-a"><i class="fa fa-reorder head-style"></i></a>
Expand Down
6 changes: 3 additions & 3 deletions WebRoot/WEB-INF/view/add_friends.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
<div class="panel-heading">
<h3 class="panel-title">联系人列表</h3>
</div>
<c:forEach items="${contsList}" var="contsList">
<c:forEach items="${contsList}" var="contsList">
<div class="panel-body" >
<i class="fa fa-pencil search-style" data-target="#rewrite_friends${contsList.id }" data-toggle="modal" ></i>
<span class="add_friends_name">${contsList.name }</span>
<a class='fa fa-times times-style a_deletefriends' param="${contsList.id}" href="#"></a>

<!-- 模态框(Modal)修改联系人 -->
<div class="modal fade" id="rewrite_friends${contsList.id }" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="margin-top: 40px;">
aria-labelledby="myModalLabel" aria-hidden="true" style="margin-top: 40px;height:100px">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
Expand Down Expand Up @@ -117,7 +117,7 @@
<input class="login-in-input" placeholder="身份证" name="identityCard" id="friends_id">
</div>
</div>
<div class="modal-footer">
<div class="modal-footer footer-style">
<button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">
<a href="orderstep3.html" class="modal-default">取消</a>
</button>
Expand Down
7 changes: 4 additions & 3 deletions WebRoot/WEB-INF/view/information.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
-->
<div id="choose-edit" style="margin-bottom: 50px;text-align: center;">
<div class="control-group input-top" style="margin-top:50px">
<input type="text" name="identityCard" id="checkidcard" class="login-in-input" placeholder="请输入身份证号">
<input type="text" name="identityCard" id="checkidcard" class="login-in-input" placeholder="请输入身份证号" value = ${ identityCard}>
</div>
<div class="control-group">
<input type="text" name="truename" class="login-in-input" placeholder="请输入姓名">
<input type="text" name="truename" class="login-in-input" placeholder="请输入姓名" value = ${ truename}>
</div>
<div class="control-group">
<button type="submit" class="login-now">提交</button>
Expand All @@ -71,7 +71,8 @@
var reg=/^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/;
if(reg.test(sId))
{}
else{alert("请输入正确的身份证格式");}
else{
swal("请输入正确的身份证格式");}

}

Expand Down
2 changes: 1 addition & 1 deletion WebRoot/WEB-INF/view/management.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

</div>
<input type="hidden" value="${roomid}" id="roomid">
<input type="hidden" value="${customer.userName}" id="customertrueName">
<input type="hidden" value="${customer.trueName}" id="customertrueName">
<input type="hidden" value="${customer.phoneNumber}" id="customerphoneNumber">
<input type="hidden" value="${roomnumber}" id="roomNumber">
<div class="content">
Expand Down
29 changes: 24 additions & 5 deletions WebRoot/WEB-INF/view/orderstep0.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
<span class="header-word">选择时间</span>
<a href="${ctx }/customer/toIndex"><i class="fa fa-home head-style home-style"></i></a>
</div>
<%@ include file="header.jsp" %>
<%@ include file="header.jsp" %>
</div>

<div class="content">
<form action="${ctx }/order/toSecond" method="post" onsubmit="return check()">
<form id="selectTime" action="${ctx }/order/toSecond" method="post" onsubmit="return check()">
<!--<h3>日期输入框</h3>-->
<div class="date_leave">
<span class="leave_word">入住时间:</span>
Expand All @@ -49,7 +49,7 @@
</div>
</form>
</div>
<%@ include file="footer.jsp" %>
<%@ include file="footer.jsp" %>
<script>
//判断是否选择日期
function check(){
Expand All @@ -72,7 +72,27 @@
swal("您的团购券只有${validCount}张,选择的天数不能超过${validCount}天");
return false;
}
return true;
//查看是否有可用的房间
var flag = false;
var timeForm = new FormData($("#selectTime")[0]);
$.ajax({
async : false,
type : "POST",
url : "${ctx }/order/checkRoom",
dataType : "json",
contentType : false,
processData : false,
data : timeForm,
success : function(result) {
if (result == "1") {
flag = true;
} else if (result == "0") {
swal("对不起,您选择的时间已无可用房间!");
}
}
});

return flag;
}
//在是IPhone5的时候隐藏码先生
window.onload = function()
Expand Down Expand Up @@ -103,7 +123,6 @@
$(".mm-title").text("首页");
$(".mm-navbar-bottom").hide();
});

</script>
</body>
</html>
30 changes: 19 additions & 11 deletions WebRoot/WEB-INF/view/orderstep1.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,23 @@
<%@ include file="header.jsp" %>
</div>
<div class="content choose-floor" >
<div class="choose-floor-div" style="display: flex;">
<div class="choose-floor-div" style="display: flex;width:100%;">
<c:forEach items="${frMap }" var="item">
<div class="hotel-floor col-xs-6">
<div class="hotel-floor col-xs-4">
<a type="radio" data-toggle="modal" class="choose-style " href="#show_room_${item.key.id }">
<span class="floor-style">
<i class="fa fa-building building-style"></i>
</span>
<span class="floor-num" id="f3">
${item.key.floorNumber }楼
</span>
</a>
</a>
</div>

<!-- 模态框展示房间 -->
<div class="modal fade" id="show_room_${item.key.id }" tabindex="-1" role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true" style="margin-top: 40px;position: absolute;margin-bottom: 50px">
<div class="modal-dialog">
<div class="modal-content" style=margin-bottom:50px>
<div class="modal-content" style="margin-bottom:50px;">
<div class="modal-header">
<button type="button" class="close"
data-dismiss="modal" aria-hidden="true">
Expand Down Expand Up @@ -78,7 +77,7 @@
<span class="choose-room-checkbox">${room.roomNumber }</span>
</label>
</p>
</c:forEach>
</c:forEach>
</div>
</div>
</div>
Expand All @@ -94,7 +93,7 @@
</c:forEach>
</div>

<div class="image_bigger_style" style="display: none" id="image_bigger_div">
<div class="image_bigger_style" style="display: none;" id="image_bigger_div">
<div class="paying_content remember-room" id="choosen_room_list">
<div class="panel panel-info" id="panel-body">
<div class="panel-heading">
Expand All @@ -115,10 +114,13 @@
</div>
</div>
<div class="control-group next_step choose-room-next-step" id="choose-room-next-step">
<button class="login-now" style="background-color:#33ccff"><a href="javascript:;" class="next_step_color">下一步</a></button>
<button class="login-now next-step-button" style="background-color:#33ccff"><a href="javascript:;" class="next_step_color">下一步</a></button>
</div>

</div>
<div class="control-group next_step choose-room-before-step">
<button class="login-now" style="background-color:#33ccff"><a href="javascript:;" class="next_step_color">上一步</a></button>
</div>


</div>
<%@ include file="footer.jsp" %>
Expand All @@ -129,19 +131,24 @@
//用来把选择的房间添加到已选房间的列表中
function add_room(){
ids=[];

/* $("#panel-body").html('<div class="panel-heading"><h3 class="panel-title">已选房间</h3></div>'); */


$("#panel-body").html('<div class="panel-heading"><h3 class="panel-title">已选房间</h3></div>');


$(":checked").each(function(){
var temp=$(this);//获得当前的其中一个的input
var room_number=$(this).next().html();//获得房间号
var room_id=$(this).val();//获得房间的id值

$("#panel-body").append(" <div class='panel-body' ><span class='room_value_find'>"+room_number+"</span> " +
$("#panel-body").append(" <div class='panel-body ' ><span class='room_value_find'>"+room_number+"</span> " +
"<i class='fa fa-times times-style' param='"+room_id+"' onclick='delete_number(this)'></i> </div>");
ids.push(room_id);
});
var room_list=$("#panel-body").children().length;
if(room_list>1){
/* alert("do2"); */
$("#image_bigger_div").show();
}
}
Expand All @@ -168,6 +175,7 @@
}
});
}
//检查团购券是否足够
$(".next_step_color").click(function(){
if(ids.length*"${days}">"${validCount}"){
swal("您的团购券只有${validCount}张,已选了${days}天,请重新选择房间");
Expand Down
37 changes: 37 additions & 0 deletions WebRoot/WEB-INF/view/orderstep2.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,26 @@
return false;
}
}
//判断此身份证是否已订房
var flag = true;
$(".friends_list").each(function(){
var cid = $(this).val();
var thiz = this;
$.ajax({
async : false,
type : "POST",
url : "${ctx}/order/checkID?cid="+cid,
dataType : "json",
success : function(result) {
if (result == "0") {
swal($(thiz).find("option:selected").html()+"在该时间段已订房,请不要重复预订");
flag = false;
}
}
})
return flag;
})
return flag;
})

//判断此身份证是否已添加
Expand Down Expand Up @@ -235,6 +255,23 @@
}
})
}
//判断此身份证是否已订房
$(".friends_list").change(function(){
var cid = $(this).val();
$.ajax({
async : false,
type : "POST",
url : "${ctx}/order/checkID?cid="+cid,
dataType : "json",
success : function(result) {
if (result == "0") {
swal("此用户在该时间段已订房");


}
}
})
})
//不在线支付押金
$(".notDeposit").click(function(){
location.href="${ctx}/order/toFifth?room="+room+"&contactor="+contactor;
Expand Down
Loading