d11ff394
xu
app-ht(v0.0.1 bui...
|
1
2
3
4
|
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
|
afd2f743
xu
app-ht(v0.0.1 bui...
|
5
|
use domain\user\User;
|
d11ff394
xu
app-ht(v0.0.1 bui...
|
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
|
$this->title = '维修厂列表';
$this->params['breadcrumbs'][] = '维修厂管理';
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
.btncls{margin:0 10px!important;}
.combo-select{margin-bottom: 0; width: 100%; text-align: left}
</style>
<div class="panel panel-default">
<div class="panel-body" style="overflow-y: auto">
<form action="" method="get" id="search-form" class="filter-form">
<table width="100%" class="table table-bordered">
<tbody>
<tr >
<td width="10%" class="text-right">维修厂名称:</td>
<td width="10%" class="text-left"><input type="text" class="form-control" name="name" id="name" value="<?php if (!empty($gets['name'])){ echo $gets['name']; } ?>"></td>
<td width="10%" class="text-right">维修厂电话:</td>
<td width="10%" class="text-left"><input type="text" class="form-control" name="mobile" id="mobile" value="<?php if (!empty($gets['mobile'])){ echo $gets['mobile']; } ?>"></td>
<td width="10%" class="text-right">注册时间(起):</td>
<td width="10%" class="text-left"><input type="date" class="form-control" name="createTime" id="createTime" value="<?php if (!empty($gets['createTime'])){ echo $gets['createTime']; } ?>"></td>
<td width="10%" class="text-right">注册时间(止):</td>
<td width="10%" class="text-left"><input type="date" class="form-control" name="endTime" id="endTime" value="<?php if (!empty($gets['endTime'])){ echo $gets['endTime']; } ?>"></td>
</tr>
|
afd2f743
xu
app-ht(v0.0.1 bui...
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<tr >
<td width="10%" class="text-right">状态:</td>
<td width="10%" class="text-left">
<select name="status">
<option value="">全部</option>
<?php foreach($statusList as $k => $status):?>
<option value="<?=$k?>" <?php if($k == $gets['status']) echo "selected = 'selected'"?>><?=$status?></option>
<?php endforeach;?>
</select>
</td>
<td width="10%" class="text-right"></td>
<td width="10%" class="text-left"> </td>
|
d11ff394
xu
app-ht(v0.0.1 bui...
|
49
|
|
afd2f743
xu
app-ht(v0.0.1 bui...
|
50
51
52
53
54
55
56
|
<td width="10%" class="text-right"> </td>
<td width="10%" class="text-left"> </td>
<td width="10%" class="text-right"> </td>
<td width="10%" class="text-left"> </td>
</tr>
|
d11ff394
xu
app-ht(v0.0.1 bui...
|
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
|
<tr class="search">
<td colspan="8" class="text-center">
<button type="submit" class="btn btn-primary btncls" id="search"><i class="glyphicon glyphicon-search"></i> 查 询 </button>
<a class="btn btn-default btncls" href="<?=Url::toRoute(["/maintainer/user/index"])?>">重 置</a>
<a class="btn btn-success btncls" id="exportBtn" href="javascript:void(0)">导出维修厂名单</a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div style="overflow-y: auto">
<?php if (!empty($listdata)) : ?>
<table class="table table-striped table-bordered" id="brand-table">
<thead>
<tr>
<th style="width:4%;">ID</th>
<th style="width:10%;">维修厂名称</th>
<th style="width:10%;">维修厂电话</th>
|
afd2f743
xu
app-ht(v0.0.1 bui...
|
82
83
|
<th style="width:10%;">紧急联系人</th>
<th style="width:10%;">紧急联系电话</th>
|
d11ff394
xu
app-ht(v0.0.1 bui...
|
84
|
<th style="width:10%;">注册时间</th>
|
afd2f743
xu
app-ht(v0.0.1 bui...
|
85
|
<th style="width:10%;">状态</th>
|
d11ff394
xu
app-ht(v0.0.1 bui...
|
86
87
88
89
90
91
92
93
94
|
<th style="width:7%;">操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($listdata as $user) : ?>
<tr>
<td class="hqy-row-select"><?=$user['id'] ?></td>
<td><?=$user['name']?></td>
<td><?=$user['mobile']?></td>
|
afd2f743
xu
app-ht(v0.0.1 bui...
|
95
96
|
<td><?=$user['emergency_person']?$user['emergency_person']: '暂无';?></td>
<td><?=$user['emergency_contact']?$user['emergency_contact']: '暂无';?></td>
|
d11ff394
xu
app-ht(v0.0.1 bui...
|
97
|
<td><?=date('Y-m-d H:i', $user['created_at'])?></td>
|
afd2f743
xu
app-ht(v0.0.1 bui...
|
98
|
<td><?=User::getStatusLabels($user['status'])?></td>
|
d11ff394
xu
app-ht(v0.0.1 bui...
|
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
|
<td >
<a class="btn btn-primary" style="margin: 4px;" href="<?php echo Url::toRoute(['/maintainer/user/info', 'id' => $user['id']]) ?>">查看详情</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php else : ?>
<p class="text-center">
没有找到数据
</p>
<?php endif; ?>
</div>
<div class="panel-footer">
<div class="hqy-panel-pager">
<?= LinkPager::widget([
'pagination' => $pages,
]); ?>
<div class="clearfix"></div>
</div>
</div>
</div>
<script>
$(function(){
var getUrl ='<?=Url::toRoute("/maintainer/user/export-da")?>';
var filterUrl ='<?=Url::toRoute("/maintainer/user/index")?>';
$(function(){
$('#exportBtn').click(function(e){
$('#search-form').attr('action',getUrl);
$('#search-form').submit();
return false;
})
//
$('#search').click(function(e){
$('#search-form').attr('action',filterUrl);
$('#search-form').submit();
return false;
})
})
})
</script>
|