<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
xmlns:h="http://java.sun.com/jsf/html"
|
xmlns:f="http://java.sun.com/jsf/core"
|
xmlns:ui="http://java.sun.com/jsf/facelets">
|
<ui:composition template="/template/nit/tmp_brief.xhtml">
|
<ui:define name="acss">
|
<style>
|
#searchBtn {
|
height: 34px;
|
}
|
p.error {
|
color: #D9534F
|
}
|
input.error {
|
border: 1px solid #D9534F;
|
}
|
#simple-table th,#simple-table td{
|
text-align: center;
|
padding: 1px 8px;
|
}
|
#form .control-label {
|
margin-right: -14px
|
}
|
.t-error{
|
color: red;
|
position: relative;
|
right: 2px;
|
top: 3px;
|
}
|
i.fa.danger {
|
color: #D15B47
|
}
|
i.fa.success {
|
color: #87B87F
|
}
|
.pagination {
|
margin: 10px 0;
|
}
|
#simple-table th {
|
padding: 0
|
}
|
.th {
|
position: relative;
|
width: 100%;
|
display: block;
|
background: #F2F2F2;
|
border: 1px solid #DDDDDD;
|
z-index: 1;
|
border-left: none;
|
}
|
.btn-xs, .btn-group-xs > .btn{
|
padding-top: 0px;
|
padding-bottom: 0px;
|
}
|
</style>
|
</ui:define>
|
<ui:define name="acontent">
|
|
<div class="row" style="width: 100%;height: 100%">
|
<div style=" margin:0 auto;margin-top: 200px;">
|
<div class="col-xs-3">
|
</div>
|
<div class="col-xs-5">
|
<div class="input-group" style="margin-bottom:20px" >
|
<span class="input-group-btn" style="font-size: 20px">厂区:</span>
|
<SELECT style="width:120px" id="cq" >
|
<OPTION value="04" >明泰科技</OPTION>
|
<OPTION value="03" >郑州明泰</OPTION>
|
<OPTION value="06" >河南明晟</OPTION>
|
<OPTION value="08" >义瑞新材</OPTION>
|
</SELECT>
|
</div>
|
<div class="input-group" >
|
<span class="input-group-btn" style="font-size: 20px">卡号:</span>
|
<input class="form-control input-mask-date" type="text" id="keyword" style="float: left;" placeholder="输入卡号搜索"/>
|
<span class="input-group-btn">
|
<button class="btn btn-sm btn-default" type="button" id="searchBtn">
|
<i class="ace-icon fa fa-search bigger-110"></i>
|
搜索
|
</button>
|
</span>
|
</div>
|
</div>
|
</div>
|
</div>
|
</ui:define>
|
<ui:define name="myscript">
|
<script type="text/javascript">
|
window.cqNo='cqNo';
|
|
$('#searchBtn').click(function(event) {
|
if($('#keyword').val()==null||$('#keyword').val().trim().length!=10 ){
|
alert("卡号不正确,请输入正确的卡号!");
|
}else{
|
let a=$('#keyword').val();
|
let b=$('#cq').children('option:selected').val();
|
window.location.href='/task/printbycard.htm?cardno='+a+'&cqNo='+b;
|
// $.post("/task/printbycard.htm", {cardno: a, cqNo: b},
|
// function (data, textStatus, jqXHR) {
|
// if (data.code >= 1) {
|
// swal({title:'',text:data.errmsg,type:'error',confirmButtonText:'确定'});
|
// return;
|
// }
|
// if (data.code == 0) {
|
// // showErrmsg('发送成功!');
|
// return;
|
// }
|
// },
|
// "json"
|
// );
|
|
}
|
|
|
});
|
//页面初始化的时候查找cookies 存在
|
$(function(){
|
init();
|
})
|
|
function init(){
|
var cqno = getCookie(window.cqNo);
|
if(cqno!=null){
|
$("#cq option[value='"+cqno+"']").attr("selected", true);
|
}else{
|
$("#cq option[value='04']").attr("selected", true);
|
}
|
|
}
|
|
$('#cq').change(function(){
|
var p1=$(this).children('option:selected').val();//这就是selected的值
|
document.cookie=window.cqNo+"="+p1;
|
})
|
|
function getCookie(name) {
|
var prefix = name + "="
|
var start = document.cookie.indexOf(prefix)
|
|
if (start == -1) {
|
return null;
|
}
|
var end = document.cookie.indexOf(";", start + prefix.length)
|
if (end == -1) {
|
end = document.cookie.length;
|
}
|
|
var value = document.cookie.substring(start + prefix.length, end)
|
return unescape(value);
|
}
|
</script>
|
</ui:define>
|
</ui:composition>
|
</html>
|