index.php
4.98 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
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
use common\helpers\ImageManager;
$this->title = '贴码预约申请';
$this->params['breadcrumbs'][] = '设备管理';
$this->params['breadcrumbs'][] = ['label' => '设备列表', 'url' => ['/device/device/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="panel panel-default">
<div class="panel-body">
<form action="" method="get" id="search-form" class="filter-form">
<table width="100%">
<tbody>
<tr >
<td width="10%" class="text-right">联系人:</td>
<td width="40%" class="text-left"><input type="text" class="form-control" name="connectName" value="<?=$gets['connectName'] ?>"></td>
<td width="10%" class="text-right">电话:</td>
<td width="40%" class="text-left"><input type="number" class="form-control" name="mobile" value="<?=$gets['mobile'] ?>"></td>
</tr>
<tr>
<td width="10%" class="text-right">地址:</td>
<td width="40%" class="text-left"><input type="text" class="form-control" id="address" name="address" value="<?=$gets['address'] ?>"></td>
<td width="10%" class="text-right">处理状态:</td>
<td width="40%" class="text-left">
<select class="form-control" id="selstatus" name="selstatus">
<option value="0" >全部</option>
<option value="1" <?php if ($gets['selstatus']==1){ echo "selected='selected'"; } ?>>已处理</option>
<option value="2" <?php if ($gets['selstatus']==2){ echo "selected='selected'"; } ?>>未处理</option>
</select>
</td>
</tr>
<tr class="search">
<td class="text-center" colspan="4">
<button type="submit" class="btn btn-primary" id="search"><i class="glyphicon glyphicon-search"></i> 查 询 </button>
<a class="btn btn-default" href="<?=Url::toRoute("/device/bind-device-appointment/index")?>">重 置</a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<?php if (!empty($listdata)) : ?>
<table class="table table-striped table-bordered" id="brand-table">
<thead>
<tr>
<th style="width:5%;" class="text-center align-middle hqy-all-select">请求ID</th>
<th style="width:25%;">联系人</th>
<th style="width:20%;">联系电话</th>
<th style="width:10%;">地址</th>
<th style="width:10%;">状态</th>
<th style="width:15%;">创建时间</th>
<th style="width:10%;">操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($listdata as $item) : ?>
<tr>
<td class="text-center align-middle hqy-row-select"><?= $item['id'] ?></td>
<td >
<?= $item['connect_name'] ?>
</td>
<td >
<?= $item['mobile'] ?>
</td>
<td >
<?= $item['address'] ?>
</td>
<td >
<?= $item['status'] ?>
</td>
<td >
<?= $item['created_at'] ?>
</td>
<td >
<?php if ($item["status"] == "未处理"){ ?>
<a href="<?php echo Url::toRoute(['/device/bind-device-appointment/do-apply', 'id' => $item['id']]) ?>">处理</a>
<?php } ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?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>
$(document).ready(function(){
var filterUrl ='<?=Url::toRoute("/device/bind-device-appointment/index")?>';
$(function(){
$('#search').click(function(e){
$('#search-form').attr('action',filterUrl);
$('#search-form').submit();
return false;
})
})
});
</script>