|
|
@@ -1,172 +1,198 @@
|
|
1
|
1
|
<!DOCTYPE html>
|
|
2
|
2
|
<html>
|
|
3
|
3
|
|
|
4
|
|
-<head>
|
|
5
|
|
- <meta charset="UTF-8">
|
|
6
|
|
- <title>工单类型试剂</title>
|
|
7
|
|
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
|
|
- <script src="../Script/Common/huayi.load.js"></script>
|
|
9
|
|
- <script src="../Script/Common/huayi.config.js"></script>
|
|
10
|
|
- <link rel="stylesheet" href="../css/laydate/need/laydate.css" />
|
|
11
|
|
- <!--<link href="../css/Table/table1.css" rel="stylesheet" />-->
|
|
12
|
|
- <link rel="stylesheet" href="../css/init.css" />
|
|
13
|
|
- <!--<script src="../My97DatePicker/WdatePicker.js"></script>-->
|
|
14
|
|
- <style>
|
|
15
|
|
- table td {
|
|
16
|
|
- word-break: break-all;
|
|
17
|
|
- word-wrap: break-word;
|
|
18
|
|
- }
|
|
19
|
|
-
|
|
20
|
|
- .add_time input{
|
|
21
|
|
- width: 50%;
|
|
22
|
|
- }
|
|
23
|
|
- .laydate-icon{
|
|
24
|
|
- height: initial!important;
|
|
25
|
|
- }
|
|
26
|
|
- table#list{
|
|
27
|
|
- font-size: 12px;
|
|
28
|
|
- margin-top: 20px;
|
|
29
|
|
- }
|
|
30
|
|
- table#list thead tr td {
|
|
31
|
|
- background: #1ab394;
|
|
32
|
|
- color: #fff;
|
|
|
4
|
+ <head>
|
|
|
5
|
+ <meta charset="UTF-8">
|
|
|
6
|
+ <title>工单类型试剂</title>
|
|
|
7
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
8
|
+ <script src="../Script/Common/huayi.load.js"></script>
|
|
|
9
|
+ <script src="../Script/Common/huayi.config.js"></script>
|
|
|
10
|
+ <link rel="stylesheet" href="../css/laydate/need/laydate.css" />
|
|
|
11
|
+ <!--<link href="../css/Table/table1.css" rel="stylesheet" />-->
|
|
|
12
|
+ <link rel="stylesheet" href="../css/init.css" />
|
|
|
13
|
+ <!--<script src="../My97DatePicker/WdatePicker.js"></script>-->
|
|
|
14
|
+ <style>
|
|
|
15
|
+ table td {
|
|
|
16
|
+ word-break: break-all;
|
|
|
17
|
+ word-wrap: break-word;
|
|
|
18
|
+ }
|
|
|
19
|
+
|
|
|
20
|
+ .add_time input {
|
|
|
21
|
+ width: 50%;
|
|
|
22
|
+ }
|
|
|
23
|
+
|
|
|
24
|
+ .laydate-icon {
|
|
|
25
|
+ height: initial!important;
|
|
|
26
|
+ }
|
|
|
27
|
+
|
|
|
28
|
+ table#list {
|
|
|
29
|
+ font-size: 12px;
|
|
|
30
|
+ margin-top: 20px;
|
|
|
31
|
+ }
|
|
|
32
|
+
|
|
|
33
|
+ table#list thead tr td {
|
|
|
34
|
+ background: #1ab394;
|
|
|
35
|
+ color: #fff;
|
|
33
|
36
|
}
|
|
34
|
|
- </style>
|
|
35
|
|
-</head>
|
|
|
37
|
+ </style>
|
|
|
38
|
+ </head>
|
|
|
39
|
+
|
|
|
40
|
+ <body class="gray-bg">
|
|
|
41
|
+ <div class="daoHang clearfix">
|
|
|
42
|
+ <div class="dhLeft">
|
|
|
43
|
+ <sapn><i class="syIcon"></i>位置:
|
|
|
44
|
+ <a href="javaScript:;" id="ReIndex">首页</a>>
|
|
|
45
|
+ <a href="javaScript:;">报表管理</a>>
|
|
|
46
|
+ <a href="" style="color: #000;">工单类型试剂</a>
|
|
|
47
|
+ </sapn>
|
|
|
48
|
+ </div>
|
|
|
49
|
+ <div class="dhRight">
|
|
|
50
|
+ <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
|
|
|
51
|
+ </div>
|
|
36
|
52
|
|
|
37
|
|
-<body class="gray-bg">
|
|
38
|
|
- <div class="daoHang clearfix">
|
|
39
|
|
- <div class="dhLeft" >
|
|
40
|
|
- <sapn><i class="syIcon"></i>位置:<a href="javaScript:;" id="ReIndex">首页</a>><a href="javaScript:;">报表管理</a>><a href="" style="color: #000;">工单类型试剂</a></sapn>
|
|
41
|
|
- </div>
|
|
42
|
|
- <div class="dhRight">
|
|
43
|
|
- <a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
|
|
44
|
|
- </div>
|
|
45
|
|
-
|
|
46
|
53
|
</div>
|
|
47
|
|
- <div class="wrapper wrapper-content animated fadeInRight">
|
|
48
|
|
- <div class="toolBox">
|
|
|
54
|
+ <div class="wrapper wrapper-content animated fadeInRight">
|
|
|
55
|
+ <div class="toolBox">
|
|
49
|
56
|
<div class="th-bar clearfix">
|
|
50
|
57
|
<div class="pull-left">
|
|
51
|
58
|
<div class="form-inline">
|
|
52
|
|
- <div class="form-group">
|
|
53
|
|
- <input type="text" class="form-control laydate-icon" id="startTime" placeholder="开始时间"/>
|
|
54
|
|
- </div>
|
|
55
|
|
- <div class="form-group">
|
|
56
|
|
- <input type="text" class="form-control laydate-icon" id="endTime" placeholder="结束时间"/>
|
|
57
|
|
- </div>
|
|
|
59
|
+ <div class="form-group">
|
|
|
60
|
+ <input type="text" class="form-control laydate-icon" id="startTime" placeholder="开始时间" />
|
|
|
61
|
+ </div>
|
|
|
62
|
+ <div class="form-group">
|
|
|
63
|
+ <input type="text" class="form-control laydate-icon" id="endTime" placeholder="结束时间" />
|
|
|
64
|
+ </div>
|
|
58
|
65
|
</div>
|
|
59
|
|
- </div>
|
|
60
|
|
- <div class="pull-right">
|
|
61
|
|
- <button class="btns search">搜索</button>
|
|
62
|
|
- <a href="" class="btns export">导出</a>
|
|
63
|
|
- </div>
|
|
|
66
|
+ </div>
|
|
|
67
|
+ <div class="pull-right">
|
|
|
68
|
+ <button class="btns search">搜索</button>
|
|
|
69
|
+ <a href="" class="btns export">导出</a>
|
|
|
70
|
+ </div>
|
|
64
|
71
|
</div>
|
|
65
|
72
|
</div>
|
|
66
|
|
-
|
|
67
|
|
- <div style="width: 100%;padding: 10px;">
|
|
68
|
|
- <table id="list" class="table table-bordered text-center table-hover" style="width: 100%;">
|
|
69
|
|
- <thead>
|
|
70
|
|
- </thead>
|
|
71
|
|
- <tbody class="tbody">
|
|
72
|
|
-
|
|
73
|
|
- </tbody>
|
|
74
|
|
- </table>
|
|
75
|
|
- </div>
|
|
76
|
|
- </div>
|
|
77
|
|
- <script src="../css/laydate/laydate.js"></script>
|
|
78
|
|
- <script>
|
|
79
|
|
- $(document).ready(function () {
|
|
80
|
|
- /*日期选择*/
|
|
81
|
|
- laydate.skin('molv');
|
|
82
|
|
- /*开始日期*/
|
|
83
|
|
- laydate({
|
|
84
|
|
- elem: '#startTime',
|
|
85
|
|
- event: 'focus'
|
|
86
|
|
- });
|
|
87
|
|
- laydate({
|
|
88
|
|
- elem: '#endTime',
|
|
89
|
|
- event: 'focus'
|
|
90
|
|
- });
|
|
91
|
|
- /*搜索*/
|
|
92
|
|
- $(".search").click(function () {
|
|
93
|
|
- initTable();
|
|
94
|
|
- })
|
|
95
|
|
- //导出
|
|
96
|
|
- $('.export').click(function() {
|
|
97
|
|
- dcexcel(this);
|
|
|
73
|
+
|
|
|
74
|
+ <div style="width: 100%;padding: 10px;">
|
|
|
75
|
+ <table id="list" class="table table-bordered text-center table-hover" style="width: 100%;">
|
|
|
76
|
+ <thead>
|
|
|
77
|
+ </thead>
|
|
|
78
|
+ <tbody class="tbody">
|
|
|
79
|
+
|
|
|
80
|
+ </tbody>
|
|
|
81
|
+ </table>
|
|
|
82
|
+ </div>
|
|
|
83
|
+ </div>
|
|
|
84
|
+ <script src="../css/laydate/laydate.js"></script>
|
|
|
85
|
+ <script>
|
|
|
86
|
+ $(document).ready(function() {
|
|
|
87
|
+ /*日期选择*/
|
|
|
88
|
+ laydate.skin('molv');
|
|
|
89
|
+ /*开始日期*/
|
|
|
90
|
+ laydate({
|
|
|
91
|
+ elem: '#startTime',
|
|
|
92
|
+ event: 'focus'
|
|
|
93
|
+ });
|
|
|
94
|
+ laydate({
|
|
|
95
|
+ elem: '#endTime',
|
|
|
96
|
+ event: 'focus'
|
|
|
97
|
+ });
|
|
|
98
|
+ /*搜索*/
|
|
|
99
|
+ $(".search").click(function() {
|
|
|
100
|
+ initTable();
|
|
|
101
|
+ })
|
|
|
102
|
+ //导出
|
|
|
103
|
+ $('.export').click(function() {
|
|
|
104
|
+ dcexcel(this);
|
|
|
105
|
+ })
|
|
|
106
|
+
|
|
|
107
|
+ function dcexcel(obj) {
|
|
|
108
|
+ var dpt = "";
|
|
|
109
|
+ var url = huayi.config.callcenter_url + "GDLXSJ/ExptList?token=" + $.cookie("token");
|
|
|
110
|
+ url += "&stime=" + $('#startTime').val() + "&endtime=" + $('#endTime').val();
|
|
|
111
|
+ obj.href = url;
|
|
|
112
|
+ }
|
|
|
113
|
+
|
|
|
114
|
+ initTable();
|
|
98
|
115
|
})
|
|
99
|
|
- function dcexcel(obj) {
|
|
100
|
|
- var dpt = "";
|
|
101
|
|
- var url = huayi.config.callcenter_url + "GDLXSJ/ExptList?token=" + $.cookie("token");
|
|
102
|
|
- url += "&stime=" + $('#startTime').val() + "&endtime=" + $('#endTime').val();
|
|
103
|
|
- obj.href = url;
|
|
104
|
|
- }
|
|
105
|
|
-
|
|
106
|
|
- initTable();
|
|
107
|
|
- })
|
|
108
|
|
-
|
|
109
|
|
- //表内数据
|
|
110
|
|
- function initTable() {
|
|
111
|
|
- $('#list tbody').html('');
|
|
112
|
|
- $('#list thead').html('');
|
|
113
|
|
- $.ajax({
|
|
114
|
|
- type:'get',
|
|
115
|
|
- url:huayi.config.callcenter_url+"GDLXSJ/GetDataList",
|
|
116
|
|
- async:true,
|
|
117
|
|
- dataType:'json',
|
|
118
|
|
- data:{
|
|
119
|
|
- token:$.cookie("token"),
|
|
120
|
|
- stime:$('#startTime').val(),
|
|
121
|
|
- endtime:$('#endTime').val()
|
|
122
|
|
- },
|
|
123
|
|
- success:function(res){
|
|
124
|
|
- var thead=res.data.linename;
|
|
125
|
|
- var colspan=res.data.linecount;
|
|
126
|
|
- var thead_trs='<tr>'
|
|
127
|
|
- $(thead).each(function(i,n){
|
|
128
|
|
- thead_trs +='<td colspan="'+ colspan[i] +'">' + n + '</td>'
|
|
129
|
|
- })
|
|
130
|
|
- thead_trs +='</tr>';
|
|
131
|
|
- $('#list thead').append(thead_trs);
|
|
132
|
|
- var tbody=res.data.dtlist;
|
|
133
|
|
- var first_tr=res.data.lineSeName;
|
|
134
|
|
- var first_trs='<tr>'
|
|
135
|
|
- $(first_tr).each(function(j,m){
|
|
136
|
|
- first_trs +='<td>' + m + '</td>'
|
|
137
|
|
- })
|
|
138
|
|
- first_trs +='</tr>';
|
|
139
|
|
- $('#list tbody').prepend(first_trs);
|
|
140
|
|
- $(tbody).each(function(k,g){
|
|
141
|
|
- var str="";
|
|
142
|
|
- str='<tr>'
|
|
143
|
|
- $.each(g,function(k,val){
|
|
144
|
|
- str +='<td>' + val + '</td>'
|
|
145
|
|
- console.log(val)
|
|
146
|
|
- })
|
|
147
|
|
- str +='</tr>';
|
|
148
|
|
- $('#list tbody').append(str);
|
|
149
|
|
- $(".tbody tr").each(function(){
|
|
150
|
|
- $(this).find("td:last").css({"color":"#e43926","font-weight":"bold","font-size":"16px"});
|
|
151
|
|
- })
|
|
|
116
|
+
|
|
|
117
|
+ //表内数据
|
|
|
118
|
+ function initTable() {
|
|
|
119
|
+ $('#list tbody').html('');
|
|
|
120
|
+ $('#list thead').html('');
|
|
|
121
|
+ $.ajax({
|
|
|
122
|
+ type: 'get',
|
|
|
123
|
+ url: huayi.config.callcenter_url + "GDLXSJ/GetDataList",
|
|
|
124
|
+ async: true,
|
|
|
125
|
+ dataType: 'json',
|
|
|
126
|
+ data: {
|
|
|
127
|
+ token: $.cookie("token"),
|
|
|
128
|
+ stime: $('#startTime').val(),
|
|
|
129
|
+ endtime: $('#endTime').val()
|
|
|
130
|
+ },
|
|
|
131
|
+ success: function(res) {
|
|
|
132
|
+ var thead = res.data.linename;
|
|
|
133
|
+ var colspan = res.data.linecount;
|
|
|
134
|
+ var thead_trs = '<tr>'
|
|
|
135
|
+ $(thead).each(function(i, n) {
|
|
|
136
|
+ thead_trs += '<td colspan="' + colspan[i] + '">' + n + '</td>'
|
|
|
137
|
+ })
|
|
|
138
|
+ thead_trs += '</tr>';
|
|
|
139
|
+ $('#list thead').append(thead_trs);
|
|
|
140
|
+ var tbody = res.data.dtlist;
|
|
|
141
|
+ var first_tr = res.data.lineSeName;
|
|
|
142
|
+ var first_trs = '<tr>'
|
|
|
143
|
+ $(first_tr).each(function(j, m) {
|
|
|
144
|
+ first_trs += '<td>' + m + '</td>'
|
|
|
145
|
+ })
|
|
|
146
|
+ first_trs += '</tr>';
|
|
|
147
|
+ $('#list tbody').prepend(first_trs);
|
|
|
148
|
+ $(tbody).each(function(k, g) {
|
|
|
149
|
+ var str = "";
|
|
|
150
|
+ str = '<tr>'
|
|
|
151
|
+ //$.each(g, function(k, val) {
|
|
|
152
|
+ // str += '<td>' + val + '</td>'
|
|
|
153
|
+ //});
|
|
|
154
|
+ /**
|
|
|
155
|
+ * 修改于2018/05/07,by fanlongfei
|
|
|
156
|
+ * 修改数据和表头不对应的问题
|
|
|
157
|
+ * */
|
|
|
158
|
+ $.each(first_tr, function(j, m) {
|
|
|
159
|
+ $.each(g, function(k, val) {
|
|
|
160
|
+ if(m == k) {
|
|
|
161
|
+ str += '<td>' + val + '</td>'
|
|
|
162
|
+ } else if(m == "" && k == "总计") {
|
|
|
163
|
+ str += '<td>' + g[k] + '</td>'
|
|
|
164
|
+ }
|
|
152
|
165
|
})
|
|
153
|
|
-//for(var i=0;i<tbody.length;i++){
|
|
154
|
|
-// var str="";
|
|
155
|
|
-// str='<tr>'
|
|
156
|
|
-// for(var key in tbody[i] ){
|
|
157
|
|
-// str +='<td>' + tbody[i][key] + '</td>';
|
|
158
|
|
-// }
|
|
159
|
|
-// str +='</tr>';
|
|
160
|
|
-// $('#list tbody').append(str);
|
|
161
|
|
-//}
|
|
162
|
|
- $('#list tbody tr:last').css({"color":"#e43926","font-weight":"bold","font-size":"16px"});
|
|
163
|
|
- }
|
|
164
|
|
- })
|
|
|
166
|
+ })
|
|
|
167
|
+ str += '</tr>';
|
|
|
168
|
+ $('#list tbody').append(str);
|
|
|
169
|
+ $(".tbody tr").each(function() {
|
|
|
170
|
+ $(this).find("td:last").css({
|
|
|
171
|
+ "color": "#e43926",
|
|
|
172
|
+ "font-weight": "bold",
|
|
|
173
|
+ "font-size": "16px"
|
|
|
174
|
+ });
|
|
|
175
|
+ })
|
|
|
176
|
+ })
|
|
|
177
|
+ //for(var i=0;i<tbody.length;i++){
|
|
|
178
|
+ // var str="";
|
|
|
179
|
+ // str='<tr>'
|
|
|
180
|
+ // for(var key in tbody[i] ){
|
|
|
181
|
+ // str +='<td>' + tbody[i][key] + '</td>';
|
|
|
182
|
+ // }
|
|
|
183
|
+ // str +='</tr>';
|
|
|
184
|
+ // $('#list tbody').append(str);
|
|
|
185
|
+ //}
|
|
|
186
|
+ $('#list tbody tr:last').css({
|
|
|
187
|
+ "color": "#e43926",
|
|
|
188
|
+ "font-weight": "bold",
|
|
|
189
|
+ "font-size": "16px"
|
|
|
190
|
+ });
|
|
|
191
|
+ }
|
|
|
192
|
+ })
|
|
165
|
193
|
}
|
|
166
|
|
-
|
|
167
|
|
-
|
|
168
|
|
- </script>
|
|
|
194
|
+ </script>
|
|
169
|
195
|
|
|
170
|
|
-</body>
|
|
|
196
|
+ </body>
|
|
171
|
197
|
|
|
172
|
|
-</html>
|
|
|
198
|
+</html>
|