index.php
4.92 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
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
use common\models\Address;
$this->title = "地址管理";
$this->params['breadcrumbs'][] = '系统管理';
$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%" class="table table-bordered">
<tbody>
<tr >
<td class="text-right">城市:</td>
<td class="text-left"><input type="text" class="form-control" name="city" value="<?php if (!empty($gets['city'])){ echo $gets['city']; } ?>"></td>
<td class="text-right">地区:</td>
<td class="text-left"><input type="text" class="form-control" name="district" value="<?php if (!empty($gets['district'])){ echo $gets['district']; } ?>"></td>
<td class="text-right">关键字:</td>
<td class="text-left"><input type="text" class="form-control" name="keyword" value="<?php if (!empty($gets['keyword'])){ echo $gets['keyword']; } ?>"></td>
</tr>
<tr >
<td class="text-right">地址类型:</td>
<td class="text-left">
<select class="form-control" name="type">
<option value="">-- 全部 --</option>
<?php foreach ($typeLables as $key => $typeItem):?>
<option value="<?= $key ?>" <?php if ($gets['type'] == $key && $gets['type'] !== null) echo "selected"?> ><?= $typeItem ?></option>
<?php endforeach; ?>
</select>
</td>
<td class="text-right"></td>
<td class="text-left"></td>
<td class="text-right"></td>
<td class="text-left"></td>
</tr>
<tr class="search">
<td colspan="6" 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("/system/address/index")?>">重 置</a>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<table class="table table-striped table-bordered" id="brand-table">
<thead>
<tr>
<th width="4%">ID</th>
<th width="20%">地址</th>
<th width="20%">标题</th>
<th width="8%">门牌号</th>
<th width="5%">省</th>
<th width="5%">市</th>
<th width="5%">区</th>
<th width="8%">坐标</th>
<th width="8%">地址类型</th>
<th width="6%">操作</th>
</tr>
</thead>
<tbody>
<?php foreach ($address as $addressItem) : ?>
<tr>
<td>
<?= $addressItem['id'] ?>
</td>
<td>
<?php $addressInfo = $addressItem['address']; ?>
<?= empty($addressInfo) ? "暂无" : $addressItem['address'] ?>
</td>
<td>
<?= empty($addressItem['title']) ? "暂无" : $addressItem['title'] ?>
</td>
<td>
<?php $detail = $addressItem['detail'] ?>
<?= empty($detail) ? "暂无" : $detail ?>
</td>
<td>
<?= $addressItem['province'] ?>
</td>
<td>
<?= $addressItem['city'] ?>
</td>
<td>
<?= $addressItem['district'] ?>
</td>
<td>
<?= $addressItem['longitude'] ?>, <?= $addressItem['latitude'] ?>
</td>
<td>
<?= Address::typeLabels($addressItem['type']) ?>
</td>
<td>
<a href="<?php echo Url::toRoute(['/system/address/update', 'id' => $addressItem['id']]) ?>" class="btn btn-primary">查看详情</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div class="panel-footer">
<div class="hqy-panel-pager">
<?= LinkPager::widget([
'pagination' => $pages,
]); ?>
<div class="clearfix"></div>
</div>
</div>
</div>