提交 | 用户 | 时间
|
58d006
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
A |
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml" |
|
4 |
xmlns:c="http://java.sun.com/jsp/jstl/core" |
|
5 |
xmlns:h="http://java.sun.com/jsf/html" |
|
6 |
xmlns:f="http://java.sun.com/jsf/core" |
|
7 |
xmlns:ui="http://java.sun.com/jsf/facelets"> |
|
8 |
<ui:composition template="/template/nit/tmp_brief.xhtml"> |
|
9 |
<ui:define name="acss"> |
|
10 |
<style> |
|
11 |
#searchBtn { |
|
12 |
height: 34px; |
|
13 |
} |
|
14 |
p.error { |
|
15 |
color: #D9534F |
|
16 |
} |
|
17 |
input.error { |
|
18 |
border: 1px solid #D9534F; |
|
19 |
} |
|
20 |
#simple-table th,#simple-table td{ |
|
21 |
text-align: center; |
|
22 |
padding: 1px 8px; |
|
23 |
} |
|
24 |
#form .control-label { |
|
25 |
margin-right: -14px |
|
26 |
} |
|
27 |
.t-error{ |
|
28 |
color: red; |
|
29 |
position: relative; |
|
30 |
right: 2px; |
|
31 |
top: 3px; |
|
32 |
} |
|
33 |
i.fa.danger { |
|
34 |
color: #D15B47 |
|
35 |
} |
|
36 |
i.fa.success { |
|
37 |
color: #87B87F |
|
38 |
} |
|
39 |
.pagination { |
|
40 |
margin: 10px 0; |
|
41 |
} |
|
42 |
#simple-table th { |
|
43 |
padding: 0 |
|
44 |
} |
|
45 |
.th { |
|
46 |
position: relative; |
|
47 |
width: 100%; |
|
48 |
display: block; |
|
49 |
background: #F2F2F2; |
|
50 |
border: 1px solid #DDDDDD; |
|
51 |
z-index: 1; |
|
52 |
border-left: none; |
|
53 |
} |
|
54 |
.btn-xs, .btn-group-xs > .btn{ |
|
55 |
padding-top: 0px; |
|
56 |
padding-bottom: 0px; |
|
57 |
} |
|
58 |
</style> |
|
59 |
</ui:define> |
|
60 |
<ui:define name="acontent"> |
|
61 |
|
|
62 |
<div class="row" style="width: 100%;height: 100%"> |
|
63 |
<div style=" margin:0 auto;margin-top: 200px;"> |
|
64 |
<div class="col-xs-3"> |
|
65 |
</div> |
|
66 |
<div class="col-xs-5"> |
|
67 |
<div class="input-group" style="margin-bottom:20px" > |
|
68 |
<span class="input-group-btn" style="font-size: 20px">厂区:</span> |
|
69 |
<SELECT style="width:120px" id="cq" > |
|
70 |
<OPTION value="04" >明泰科技</OPTION> |
|
71 |
<OPTION value="03" >郑州明泰</OPTION> |
|
72 |
<OPTION value="06" >河南明晟</OPTION> |
|
73 |
<OPTION value="08" >义瑞新材</OPTION> |
|
74 |
</SELECT> |
|
75 |
</div> |
|
76 |
<div class="input-group" > |
|
77 |
<span class="input-group-btn" style="font-size: 20px">卡号:</span> |
|
78 |
<input class="form-control input-mask-date" type="text" id="keyword" style="float: left;" placeholder="输入卡号搜索"/> |
|
79 |
<span class="input-group-btn"> |
|
80 |
<button class="btn btn-sm btn-default" type="button" id="searchBtn"> |
|
81 |
<i class="ace-icon fa fa-search bigger-110"></i> |
|
82 |
搜索 |
|
83 |
</button> |
|
84 |
</span> |
|
85 |
</div> |
|
86 |
</div> |
|
87 |
</div> |
|
88 |
</div> |
|
89 |
</ui:define> |
|
90 |
<ui:define name="myscript"> |
|
91 |
<script type="text/javascript"> |
|
92 |
window.cqNo='cqNo'; |
|
93 |
|
|
94 |
$('#searchBtn').click(function(event) { |
|
95 |
if($('#keyword').val()==null||$('#keyword').val().trim().length!=10 ){ |
|
96 |
alert("卡号不正确,请输入正确的卡号!"); |
|
97 |
}else{ |
|
98 |
let a=$('#keyword').val(); |
|
99 |
let b=$('#cq').children('option:selected').val(); |
40ec16
|
100 |
window.location.href='/task/printbycard.htm?cardno='+a+'&cqNo='+b; |
58d006
|
101 |
// $.post("/task/printbycard.htm", {cardno: a, cqNo: b}, |
A |
102 |
// function (data, textStatus, jqXHR) { |
|
103 |
// if (data.code >= 1) { |
|
104 |
// swal({title:'',text:data.errmsg,type:'error',confirmButtonText:'确定'}); |
|
105 |
// return; |
|
106 |
// } |
|
107 |
// if (data.code == 0) { |
|
108 |
// // showErrmsg('发送成功!'); |
|
109 |
// return; |
|
110 |
// } |
|
111 |
// }, |
|
112 |
// "json" |
|
113 |
// ); |
|
114 |
|
|
115 |
} |
|
116 |
|
|
117 |
|
|
118 |
}); |
|
119 |
//页面初始化的时候查找cookies 存在 |
|
120 |
$(function(){ |
|
121 |
init(); |
|
122 |
}) |
|
123 |
|
|
124 |
function init(){ |
|
125 |
var cqno = getCookie(window.cqNo); |
|
126 |
if(cqno!=null){ |
|
127 |
$("#cq option[value='"+cqno+"']").attr("selected", true); |
|
128 |
}else{ |
|
129 |
$("#cq option[value='04']").attr("selected", true); |
|
130 |
} |
|
131 |
|
|
132 |
} |
|
133 |
|
|
134 |
$('#cq').change(function(){ |
|
135 |
var p1=$(this).children('option:selected').val();//这就是selected的值 |
|
136 |
document.cookie=window.cqNo+"="+p1; |
|
137 |
}) |
|
138 |
|
|
139 |
function getCookie(name) { |
|
140 |
var prefix = name + "=" |
|
141 |
var start = document.cookie.indexOf(prefix) |
|
142 |
|
|
143 |
if (start == -1) { |
|
144 |
return null; |
|
145 |
} |
|
146 |
var end = document.cookie.indexOf(";", start + prefix.length) |
|
147 |
if (end == -1) { |
|
148 |
end = document.cookie.length; |
|
149 |
} |
|
150 |
|
|
151 |
var value = document.cookie.substring(start + prefix.length, end) |
|
152 |
return unescape(value); |
|
153 |
} |
|
154 |
</script> |
|
155 |
</ui:define> |
|
156 |
</ui:composition> |
|
157 |
</html> |