yy_history.html
6.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<script type="text/javascript" src="__PUBLIC__/js/rem_new.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>历史预约</title>
<include file="public/header" />
<link rel="stylesheet" href="__STATIC__/css/public.css?v=__CSSVERSION__">
<link rel="stylesheet" href="__STATIC__/css/maa_service_css/yy_history.css?v=__CSSVERSION__">
<script type="text/javascript" src="__STATIC__/js/jquery.js"></script>
<include file="public/my_msg"/>
</head>
<style>
.no_list img{ width: 3.3rem}
.no_frame{ width: 100%;height: auto;}
.xc_input {width: 2.5rem; margin-left: 0.05rem; }
.xc-time-frame {width: 5.8rem; margin-left: -2.9rem; }
</style>
<body>
<!--头部-->
<div class="top_frame" style="0.8rem">
<div class="frame flex ai_center jc_sb">
<div class="fs026 fg">共使用<font id="total"></font>次服务</div>
<div class="flex three-level-word" >
<div class="flex ai_center" onclick="reset()">
<text class="fs026 fg">重置</text>
<img class="reset_img" src='__STATIC__/images/weixin/reset.png' style='width:0.30rem; height:0.30rem'/>
</div>
<div class="flex" onclick="choice_time(this)">
<text id="screen" class="fs028 fg" style='margin-left: 0.15rem;'>筛选</text>
<div id="symbol"class="box negative" style='position:relative;'></div>
</div>
</div>
</div>
</div>
<!-- 历史服务的列表 -->
<div class="service_list"></div>
<div class="no_frame rel" style="display: none">
<div class="abs no_list flex ai_center jc_center">
<div >
<img src="__STATIC__/images/maa_service/undefined.png">
<div class="fs026 fg t_c flex jc_center ai_center">暂无历史服务</div>
<div onclick="go_use()" class="go_to_use fs026 fc t_c flex jc_center ai_center">前往使用</div>
</div>
</div>
</div>
<!--筛选的弹框-->
<div id="s_select_time"
style="width: 100%;height: 100%;display: none">
<div class="xc-mongolia"></div>
<div class="xc-time-frame" >
<div class="flex jc_center" style="width: 90%;margin:0 auto;padding-top: 0.3rem;">
<div class="t_left" style="position: relative; left:-0.1rem">
<p><text style="margin-left: 0.1rem">开始时间</text></p>
<p style="margin-top: 0.1rem">
<label for="party" >
<input placeholder="Date" type="date"class="xc-stime xc_input"
id="start_time" onfocus="(this.type='date')" name="start" value=""/>
</label>
</p>
</div>
<div class="t_left" style="margin-left: 0.2rem">
<p><text style="margin-left: 0.1rem">结束时间</text></p>
<p style="margin-top: 0.1rem">
<label for="party" >
<input placeholder="Date" type="date" class="xc-etime xc_input"
id="end_time" onfocus= "(this.type='date')" min="{$tyear}" max="{$hyear}" name="end" value=""/>
</label>
</p>
</div>
</div>
<div class="data_btn" onclick="show_submit()">确定</div>
<input id="start" type="hidden" value="{$start}">
<input id="end" type="hidden" value="{$end}">
<div onclick="close_the_pop()" class="close_pop">✕</div>
</div>
</div>
<script>
var page=1;
var loading=0;
var is_no_more=0;
//打开选择时间的弹窗
function choice_time(ob) {
if(!$(ob).hasClass("clicked")){
$(ob).addClass("clicked")
$("#s_select_time").show();
$("#screen").addClass("word");
$("#symbol").addClass("boxs");
var start0=$("#start").val();
var end0=$("#end").val();
$("#start_time").val(start0)
$("#end_time").val(end0)
}else{
$(ob).removeClass("clicked negative")
$("#s_select_time").hide();
}
}
//关闭弹窗
function close_the_pop() {
$("#s_select_time").hide();
$(".xc_sx ").removeClass("clicked");
$("#screen").removeClass("word");
$("#symbol").removeClass("boxs");
}
//确定选择时间
function show_submit() {
$("#s_select_time").hide();
$(".xc_sx ").removeClass("clicked");
$(".xc-list-frame").html("");
$("#screen").removeClass("word");
$("#symbol").removeClass("boxs");
page=1; isnomore=0;
$(".service_list").empty();
getList();
}
//重置
function reset() {
$("#start_time").val("");
$("#end_time").val("");
$(".service_list").empty();
page=1;is_no_more=0; $(".no_frame").hide();
getList();
}
//重置掉的接口
function getList() {
//--获取成长值明细--
var d_data={};
if($.trim($("#start_time").val())){
var tt1=$.trim($("#start_time").val());
d_data.beginDate=tt1.replace("/","-")
}
if($.trim($("#end_time").val())){
var tt2=$.trim($("#end_time").val());
d_data.endDate=tt2.replace("/","-")
}
if(loading) return;
if(is_no_more) return;
loading=1;
var ui= layer.open({type:2,shadeClose: false});
$.ajax({
url:"/index.php/mobile/yyservice/yy_history/is_ajax/1/stoid/{$Think.request.stoid}/p/"+page,
data:d_data,
success:function (res) {
loading=0;
layer.close(ui);
if($.trim(res)){
page++; $(".service_list").append(res);
}else{
is_no_more=1;
if(page==1){
$(".no_frame").show();$("#total").text(0);
if($.isEmptyObject(d_data)) $(".top_frame").hide();
}
}
}
})
}
$(function () { getList(); })
//--滑动到底部事件--
$(document).unbind("scroll");
$(document).bind("scroll", function (event) {
if ($(document).scrollTop() >= $(document).height() - window.innerHeight) {
if(loading!=1) getList()
}
});
//------前往使用------
function go_use() {
window.location.href="/index.php/mobile/yyservice/service_items_list/stoid/{$Think.request.stoid}";
}
</script>
</body>
</html>