| <script> |
| function doPrint() { |
| |
| var bdhtml = window.document.body.innerHTML; |
| var html = ""; |
| |
| var matchId = $("#match").val(); |
| var campusId = $("#matchTeam").val(); |
| $.ajax({ |
| type : "GET", |
| async : false, |
| url : "/generPrintData?matchId="+matchId+"&campusId="+campusId, |
| error : function(request) { |
| parent.layer.alert("Connection error"); |
| }, |
| success : function(data) { |
| |
| for (var i=0;i<data.length;i++){ |
| var obj = data[i]; |
| var showHtml = ""; |
| showHtml = "<div id=\"printDiv\" style=\"width: 210mm;page-break-after: always\">"; |
| |
| showHtml += "<div style=\"text-align:center;height: 10mm;margin-top: 30mm;font-family: 宋体;font-weight:bold;font-size: 30px\">"+obj.matchName+"</div><br>"; |
| showHtml += "<div style=\"text-align:center;height: 60mm\">"; |
| showHtml += "<table style=\"width: 150mm;text-align: left;margin-left: 20mm;font-size: 20px;font-family: 宋体\">"; |
| showHtml += "<tr style=\"height: 8mm\"><td width=\"400mm\">姓 名:"+obj.name+"</td><td>性别:"+obj.sex+"</td></tr>"; |
| showHtml += "<tr style=\"height: 8mm\"><td>报考单位:"+obj.campusName+"</td></tr>"; |
| showHtml += "<tr style=\"height: 8mm\"><td>出生日期:"+obj.birthday.split(" ")[0]+"</td></tr>"; |
| showHtml += "<tr style=\"height: 8mm\"><td>考试级别:"+obj.levelName+"</td></tr>"; |
| showHtml += "<tr style=\"height: 8mm\"><td>考试带色:"+obj.beltColor+"</td></tr>"; |
| showHtml += "<tr style=\"height: 8mm\"><td>指导教练:"+obj.coach+"</td></tr>"; |
| showHtml += "<tr style=\"height: 8mm\"><td>考试编号:"+obj.matchAddress+obj.stage+obj.stageOrder+"</td></tr>"; |
| showHtml += "</table>"; |
| showHtml += "</div><br><br>"; |
| showHtml += "<div style=\"margin-left: 55mm;font-family: 宋体;font-size: 18px\">备 注</div><br>"; |
| showHtml += "<div style=\"text-align: left;font-family: 宋体;margin-left: 20mm;font-size: 18px\">1.学员凭此证进入考场参加晋级考试;</div>"; |
| showHtml += "<div style=\"text-align: left;font-family: 宋体;margin-left: 20mm;font-size: 18px\">2.学院考级结束后凭准考证和成绩单领取证书和腰带;</div>"; |
| showHtml += "</div>"; |
| html += showHtml; |
| } |
| } |
| }); |
| |
| |
| window.document.body.innerHTML = html; |
| window.print(); |
| |
| window.document.body.innerHTML = bdhtml; |
| window.location.reload(); |
| } |
| </script> |