fail-list.php
5.77 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
<?php
use yii\helpers\Url;
use app\ht\widgets\LinkPager;
use domain\device\Device;
$this->title = '授权失败管理';
$this->params['breadcrumbs'][] = '数据统计';
$this->params['breadcrumbs'][] = ['label' => '批次列表', 'url' => ['/datas/device/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
.cell-cls{width:60%;word-wrap: break-word}
.td-cls{padding:8px 0}
</style>
<div class="panel panel-default">
<div class="panel-body">
<form action="" method="get" id="search-form" class="filter-form">
<input type="hidden" name="batch_no" value="<?=$gets['batch_no']?>" />
<div class="form-group col-sm-12">
<label for="device_id" class="col-sm-1 control-label text-right">设备ID:</label>
<div class="col-sm-2 form-inline">
<input type="text" class="form-control" id="device_id" name="device_id" value="<?php if (!empty($gets['device_id'])){ echo $gets['device_id'];} ?>" autocomplete="off">
</div>
<label for="apply_at" class="col-sm-1 control-label text-right">申请时间:</label>
<div class="col-sm-4 form-inline">
<input type="date" class="form-control" style="width:140px" id="start_apply_at" name="start_apply_at" value="<?php if (!empty($gets['start_apply_at'])){ echo $gets['start_apply_at'];} ?>" autocomplete="off"> -
<input type="date" class="form-control" style="width:140px" id="end_apply_at" name="end_apply_at" value="<?php if (!empty($gets['end_apply_at'])){ echo $gets['end_apply_at'];} ?>" autocomplete="off">
</div>
</div>
<div class="form-group col-sm-12" style="text-align: center;">
<div style="display: flex;justify-content: space-between;width:40%;margin:0 auto"><button type="submit" class="btn btn-primary font-1" id="submitFilterBtn">查询</button>
<a class="btn btn-default" href="javascript:void(0)" id="btn-export"> 导出数据 </a></div>
</div>
</form>
</div>
</div>
<div class="panel" style="margin-bottom: 0">
<div style="padding:10px ;20px;box-sizing: border-box"><b>厂商:</b><?=$gets['manufacture']?> <b>项目:</b><?=$gets['project']?> <b>型号:</b><?=$gets['model']?> <b>生产日期:</b><?=$gets['production']?>
<b> 批次编号:</b><?=$gets['batch_no']?>
</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="6%">ID</th>
<th width="10%">批次编码</th>
<th width="10%">厂商</th>
<th width="10%">项目</th>
<th width="10%">设备型号</th>
<th width="10%">生产日期</th>
<th width="10%">设备ID</th>
<th width="10%">申请时间</th>
<th width="10%">状态</th>
</tr>
</thead>
<tbody>
<?php if ($deviceList) { ?>
<?php foreach ($deviceList as $item) : ?>
<tr>
<td class="td-cls">
<?= $item['id'] ?>
</td>
<td class="td-cls">
<?= Device::getBatchNo($item['manufacture_no'], $item['project_no'], $item['model_no'], $item['production_no']) ?>
</td>
<td class="td-cls">
<?= $item['manufacture'] ?>
</td>
<td class="td-cls">
<?= $item['project'] ?>
</td>
<td class="td-cls">
<?= $item['model'] ?>
</td>
<td class="td-cls">
<?= $item['production'] ?>
</td>
<td class="td-cls">
<?= $item['device_id']? $item['device_id']:'暂无'?>
</td>
<td class="td-cls">
<?= $item['apply_at']?date('Y-m-d H:i:s', $item['apply_at']):'暂无' ?>
</td>
<td>
超出
</td>
</tr>
<?php endforeach; ?>
<?php } else { ?>
<tr>
<td colspan="7">
<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 = "fail-list-export" + $strQuery;
return false;
})
});
</script>