index.php
6.64 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
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
use domain\upgrade\UpgradeStatus;
use domain\upgrade\UpgradeLogStatus;
$this->title = '序列号统计';
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
.table > tbody > tr > td
{
border: white 0px solid;
border-top: solid 1px #fff;
border-bottom: 1px solid #fff;
}
.table{
margin-bottom: 0px!important;
}
</style>
<div class="panel panel-default">
<div class="panel-body">
<form action="" method="get" id="search-form" class="filter-form">
<table width="100%" class="table">
<tbody>
<tr >
<td width="25%" class="text-left">
<label>厂商:</label>
<input type="text" class="form-control" name="manufacture_name" placeholder="输入厂商" value="<?php if (!empty($gets['manufacture_name'])){ echo $gets['manufacture_name']; } ?>">
</td>
<td width="25%" class="text-left">
<label>项目:</label>
<input type="text" class="form-control" name="project_name" placeholder="项目" value="<?php if (!empty($gets['project_name'])){ echo $gets['project_name']; } ?>">
</td>
<td width="25%" class="text-left">
<label>型号:</label>
<input type="text" class="form-control" name="model_name" placeholder="设备型号" value="<?php if (!empty($gets['model_name'])){ echo $gets['model_name']; } ?>">
</td>
<td width="25%" class="text-left">
<label>生产日期:</label>
<input type="text" class="form-control" name="production_name" placeholder="生产日期" value="<?php if (!empty($gets['production_name'])){ echo $gets['production_name']; } ?>">
</td>
</tr>
<tr class="search">
<td colspan="4" 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(["/datas/device/index"])?>">重 置</a>
<a class="btn btn-default" href="javascript:void(0)" id="btn-export"> 导出数据 </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="9%">编码</th>
<th width="9%">厂商</th>
<th width="8%">项目</th>
<th width="8%">型号</th>
<th width="8%">生产日期</th>
<th width="7%" ><span title="预生成数,总生成包含超出部分,但是不包含删除的">预 | 总生成</span></th>
<th width="7%">已删除</th>
<th width="7%">已授权</th>
<th width="7%">未授权</th>
<th width="7%">授权失败(超出)</th>
<th width="7%">已处理(超出)</th>
<th width="7%">授权失败(系统)</th>
</tr>
</thead>
<tbody>
<?php if ($listdata) { ?>
<?php foreach ($listdata as $item) : ?>
<tr>
<td style="padding:12px;"><?= (isset($item["batch_no"]) ? $item["batch_no"] : "") ?></td>
<td style="padding:12px;"><?= (isset($item["manufacture_name"]) ? $item["manufacture_name"] : "") ?></td>
<td style="padding:12px;"><?= (isset($item["project_name"]) ? $item["project_name"] : "") ?></td>
<td style="padding:12px;"><?= (isset($item["model_name"]) ? $item["model_name"] : "") ?></td>
<td style="padding:12px;"><?= (isset($item["production_name"]) ? $item["production_name"] : "") ?></td>
<td style="padding:12px;"><?= (isset($item["num"]) ? $item["num"] : "0") ?>|<a href="<?=Url::toRoute(['device/device-list','batch_id' => $item['id']])?>"><?= (isset($item["total_num"]) ? $item["total_num"] : "0") ?></a></td>
<td style="padding:12px;"><a href="<?=Url::toRoute(['device/delete-device-list','batch_id' => $item['id']])?>"><?= (isset($item["del_num"]) ? $item["del_num"] : "0") ?></a></td>
<td style="padding:12px;"><?= (isset($item["has_auth_num"]) ? $item["has_auth_num"] : "0") ?></td>
<td style="padding:12px;"><?= (!empty($item["no_auth_num"]) ? $item["no_auth_num"] : "0") ?></td>
<td><a href="<?=Url::toRoute(['device/fail-list','batch_no' => $item['batch_no']])?>"><?= (isset($item["out_of_num"]) ? $item["out_of_num"] : "0") ?></a></td>
<td style="padding:12px;"><?= (!empty($item["handle_auth_fail_num"]) ? $item["handle_auth_fail_num"] : "0") ?></td>
<td style="padding:12px;"><?= (!empty($item["auth_fail_num"]) ? $item["auth_fail_num"] : "0") ?></td>
</tr>
<?php endforeach; ?>
<?php } else { ?>
<tr>
<td colspan="9">
<center>暂无记录</center>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<div class="panel-footer">
<div class="hqy-panel-pager">
<?= LinkPager::widget([
'pagination' => $pages,
]); ?>
<div class="clearfix"></div>
</div>
</div>
</div>
<script>
window.queryParams = function(params) {
$("#search-form").find('input[name]').each(function () {
var val = $(this).val();
var name = $(this).attr('name');
if(val){
params[name] = val;
}
});
return params;
}
$(document).ready(function () {
$('#btn-export').click(function(e){
var params = {};
window.queryParams(params);
$strQuery = "?";
if (params) {
for (var p in params) {
$strQuery += p + "=" + params[p] + "&";
}
}
$strQuery = $strQuery.substring(0, $strQuery.length-1);
window.location.href = "export" + $strQuery;
return false;
})
});
</script>